Open kit for Claude Code

An expert's method becoming your mentor

Teaches by building, reviews before delivery and only says "it works" after running it. Each rule points to a real passage of what the expert published.

Mentor-Especialista banner: an expert's method becoming your mentor in Claude Code
What it is

A mentor that copies the method, not the person

When you ask an AI to explain something, it tends to over-explain, sound right without being right, assume things without telling you and answer in generic terms. This kit builds a mentor that teaches the way someone you admire would, with proof for every step.

The six pieces of the kit: archive, wiki, rules with proof, mentor agent, execution gate and continuous ingestion

📚 Real knowledge, organized

Everything the expert published (videos, texts, repositories, posts) becomes an interlinked wiki that the AI consults without getting lost in the haystack.

🔎 Rules with proof

Each conduct rule carries a passage copied from the archive and the exact place it came from. A script rejects invented citations.

▶️ Speaks only after running

The mentor follows a fixed step-by-step, and an automatic gate won't let the turn end if code was written and not executed.

How it works

Six layers, each with a proof of done

Each phase has a command that answers "finished?" with exit 0 or with the reason for failure. Nothing depends on the AI saying it's done.

Raw archive→ Compiled wiki→ Rules with citations→ Agent + skills→ Execution gate→ Continuous ingestion
1

Archive and wiki

raw/ is read-only, with a manifest and a hash for each item. The wiki has pages for sources, topics, principles and methods, plus index, hot and log.

2

Rules

active requires 2 different sources; bank waits for the 2nd; inference is flagged to the user. The comparison ignores case, accents and punctuation.

3

The mentor loop

Ready → Smallest version → Prediction → Real output → Broken version → Report with the rule that guided each step.

Prerequisites

What you need

The scripts use only the Python standard library. No paid API.

Python 3.10+ and git

For the generator, the collectors and the validators.

python3 --version
git --version

Claude Code

Where the agent, the skills and the gate run.

claude --version

Optional

yt-dlp for video subtitles and a local transcriber (Whisper, faster-whisper…) for videos without subtitles. pytest only for testing the kit.

yt-dlp --version
User guide · step by step

From zero to your first mentor

Real kit commands. Replace prof-redes with your mentor's short name.

1

Download the kit and see the example working

The example is a fictional expert with 3 sources and 7 rules, passing all validators.

git clone https://github.com/inematds/mentor-especialista.git
cd mentor-especialista
python3 exemplo/tools/stats.py --raiz exemplo
python3 exemplo/tools/validar_citacoes.py --raiz exemplo
2

Create your mentor

Generates the folder with the archive, the wiki, the rules, the scripts, the agent, the 6 skills and the execution gate.

python3 novo-mentor.py prof-redes \
  --nome "Expert's name" \
  --dominio "teach neural networks by building from scratch" \
  --destino ~/mentores
3

Define the scope and adapt it to your environment

The sources go in ESCOPO.md. The collection targets, subtitle languages and your transcriber go in mentor.config.json (see docs/ADAPTAR.md (in Portuguese)).

cd ~/mentores/mentor-prof-redes
# in mentor.config.json, for example:
"transcrever_cmd": "your-transcriber --url {url} --out {saida}"
4

Collect the archive

In Claude Code, inside the mentor folder. One subagent per source, in parallel. Anything that fails goes to raw/RELATORIO-FALHAS.md.

/prof-redes-coletar
# done when:
python3 tools/stats.py   # → exit 0 (targets met, raw intact)
5

Compile the wiki and extract the rules

The wiki links sources, topics, principles and methods in both directions. The rules come out with a passage copied from the archive.

/prof-redes-compilar
python3 tools/validar_links.py     # → 0 broken links
/prof-redes-regras
python3 tools/validar_citacoes.py  # → 0 missing
6

Learn and review with the mentor

ensina builds along with you and checks the answer externally. revisa predicts where it breaks, reproduces it and proves the lean version side by side.

/prof-redes-ensina teach me to build a BPE tokenizer from scratch
/prof-redes-revisa scripts/coleta.py
python3 tools/validar_resposta.py testes/respostas/<arquivo>.md
7

Make the mentor learn something new

A new link becomes a source page, updates the affected pages and can promote a rule from the bank to active.

/prof-redes-ingere https://exemplo.com/post-novo
python3 tools/stats.py && python3 tools/validar_links.py && python3 tools/validar_citacoes.py
8

Run the 3 acceptance tests

Build and teach; review a script that "works" but breaks without UTF-8; ingest a new source. Results go in testes/aceitacao/RESULTADOS.md.

PYTHONIOENCODING=cp1252 python3 testes/aceitacao/script_emoji.py
# → UnicodeEncodeError: the mentor must predict this before running
Examples

What you see on screen

Real outputs from the example that ships with the kit, and the gate in action. Outputs shown as the kit prints them (in Portuguese).

Archive within targets

tipo          itens   palavras   meta
blog              1        123   ≥1 itens / ≥100 pal.
posts             1         73   ≥1 itens / ≥50 pal.
video             1        145   ≥1 itens / ≥100 pal.
TOTAL             3        341

OK: acervo dentro das metas

Citations checked

7 regras (4 ativas), 12 citações encontradas, 0 faltando
OK

# with an invented citation:
7 regras (4 ativas), 11 citações encontradas, 1 faltando
REPROVADO

Gate blocking

{"decision": "block",
 "reason": "Você escreveu código e não rodou: calc.py.
  Rode cada um (ou os testes) e mostre a saída real
  antes de dizer que funciona."}

Listing or opening the file (ls, cat), git commit or py_compile do not count as execution.

Mentor report

| passo            | rodou              | saiu               | regra  |
|------------------|--------------------|--------------------|--------|
| menor versão     | contar('a b a')    | {'a': 2, 'b': 1}   | R2     |
| previsão × saída | o mesmo            | bateu              | R3, R4 |
| versão quebrada  | 'a  b'.split(' ')  | ['a', '', 'b']     | R5     |
Roadmap

Where the kit is and where it's going

The full documentation is in the repository: solution plan, training plan and adaptation guide.

1.0
Kit publishedGenerator, 4 collectors, 4 validators, agent, 6 skills, execution gate, fictional example and 56 automated tests.
Pilot
First real mentorA real expert going through the phases and the 3 acceptance tests in a Claude Code session.
Training
Training track6 modules, 14 short lessons and a final project with a 10-point rubric (docs/TREINAMENTO.md (in Portuguese)).
Later
Mentor council and other agentsSeveral experts consulted together, and the core (archive, wiki, rules) ported to Codex and other agents.