Skip to content

English · Español

Claude Code slash commands & subagents — reference

A user-facing summary of every slash command in .claude/commands/ and every subagent in .claude/agents/. The source prompts stay in English (they are tool config consumed by Claude, not curriculum prose — see CLAUDE.md §0.6). This page documents what they do, so you can audit the workflow without reading the prompts.

Slash commands

Invoke any of these inside Claude Code as /<name>. The argument hint (when present) tells you what to pass after the command.

/phase-start <NN>

Opens a new phase per LYNX_CORTEX.md §7. Re-reads the spec section for the requested phase plus the addendum, creates the docs/phase-NN-<slug>/ tree with empty theory/, lab/, solutions/, notebooks/, diagrams/ placeholders, seeds the active learner's learners/<name>/phase-NN/ directory, and writes PHASE_NN_PLAN.md at repo root with seven mandatory sections (coverage, status, files to create, DoD, steps, open questions, risks). Then it stops and waits for approved / revise / dig-deeper. It will not install dependencies, not populate solutions/, not write theory, not commit.

/phase-checkpoint

Mid-phase health snapshot — useful any time you want to know where you stand without closing the phase. Identifies the active phase from learners/<name>/progress.md, lists what's populated vs. stubbed under docs/phase-NN-*/ and learners/<name>/phase-NN/, inspects the DoD checks in checkpoint.json, runs just lint and just test (read-only — never auto-fixes), updates progress.md, appends a journal entry, and replies with a ≤200-word status block: active phase, DoD progress, blockers, next concrete step.

/phase-report

Closes the active phase per the §7 ritual. Verifies every DoD check in checkpoint.json (any false aborts — no fudging), runs the full gate set with timings (just setup, just lint, just test, just audit-deps, bandit, plus any phase-specific gate), invokes the four subagents below where applicable, then writes PHASE_NN_REPORT.md with eight sections (summary, goals vs. outcomes, DoD verification, measurements, math derivations, pitfalls, reflection, open threads). Marks the phase done in progress.md and stops, waiting for proceed to open the next phase.

/derive <topic>

Produces a long-form derivation of the requested topic in the active phase's theory/ directory. Locates the active phase, confirms the topic is in-scope per the spec row (pushes back if not), checks prerequisites and links to prior derivations, picks the next numeric prefix in theory/, then writes a derivation with seven sections (motivation, setup, derivation, worked example, numerical stability, pitfalls, exercises) plus a short Spanish summary at the end per the bilingual policy. Hands off to math-reviewer for a sanity pass before declaring done. Solutions go in solutions/ — never inline.

/break <concept>

Introduces a single, instructive, fully-reversible bug related to the named concept so the learner debugs it from logs, charts, or failing tests. Locates the target code (aborts if the concept isn't implemented yet), picks one bug from a defined taxonomy (numerical, indexing, gradient, memory, determinism — never compound, never security-relevant, never test-masking), makes the smallest possible diff, records the bug with a hint cascade and the fix diff in learners/<name>/phase-NN/notes/breaks.md, then verifies the failure is observable via just test. The fix must be ≤5 lines.

/quiz <NN>

Generates a Socratic quiz on the requested phase. Reads all theory/ files plus the learner's attempts and reflections (so the topics they struggled with get more pressure), generates 8–12 mixed-type questions — "why", "derive", "predict", "break", "transfer" (never multiple-choice, never definition-only), saves the quiz and a secret answer key under learners/<name>/phase-NN/quizzes/, and tells the learner where to write answers. When the learner replies graded, scores each question (✅/⚠️/❌), proposes a 1-line follow-up for every wrong or partial answer, and blocks /phase-report if the score is under 70%.

Subagents

These live in .claude/agents/ and are invoked by the main Claude session (or via Agent from another agent). The "use proactively" hint in the frontmatter tells Claude when to volunteer them.

math-reviewer

Reads a derivation in docs/phase-NN-*/theory/ or a math-bearing function in src/, and reports — specifically — what is wrong, ambiguous, or missing. Checks eight things: definitions before use, consistent conventions (row vs column, indexing, broadcasting), every step justified (no "it can be shown that"), numerical stability traps (log-sum-exp without max-shift, softmax without max-subtract), edge cases (x = 0, batch 1, empty input), sign and chain-rule errors in backward passes, dimension composition, and the presence of a worked example. Outputs a bullet list with location, severity (🔴 / 🟡 / 🟢), finding, and fix. Verdict: PASS or REVISE. Does not rewrite — only flags.

numerical-stability-checker

Reviews src/ and experiments/ code for the places where floating-point reality bites. Checks for stable forms (log_sum_exp, softmax with max-shift, expm1, log1p), division-by-zero and log-of-zero shields with named ε, overflow / underflow envelopes (in float32, exp(89) overflows, exp(-104) underflows), determinism plumbing (seed_everything at every entrypoint, manifest.json persisted, no bare np.random.rand(), cudnn.deterministic when CUDA is used), dtype consistency at boundaries, reduction order for long sums, in-place aliasing, and gradient checks against finite-difference references. Outputs file:line findings with a ≤5-line reproduction snippet and a concrete fix. Same PASS/REVISE verdict as math-reviewer.

journal-summarizer

Reads all learners/<name>/journal/YYYY-MM-DD.md entries between a phase's start and report dates, plus the learner's own reflection draft and the attempts/ history, then distills a tight evidence-grounded block for PHASE_NN_REPORT.md §6. Extracts five things: what clicked (with a journal-date pointer), what didn't (carryover candidates), surprises (spec-vs-reality gaps), workflow friction (recurring tooling/structure complaints — feeds PROPOSAL_REVIEW.md), and a rough study-hour count. Outputs a ready-to-paste markdown block under 250 words. Never invents emotions; only quotes from files.

phase-gatekeeper

The adversarial reviewer at phase close. Both the learner and the main session have incentives to declare a phase done — the gatekeeper's only job is to verify the Definition of Done independently. Reads the spec row plus PHASE_NN_PLAN.md §3, then for every check in checkpoint.json it independently re-runs the proof: re-runs just test rather than trusting the JSON, checks file existence and substance rather than just paths, verifies the learner attempted the lab before peeking at solutions. Audits the anti-goals (no PyTorch before Phase 24, no scope expansion of the §A13 verb-grammar corpus without explicit proceed), reproducibility (seeds, manifests), and security (pip-audit, bandit, no model weights committed). Verdict: PASS or BLOCK — bluntly, no politeness padding.

Why these stay English

These are infrastructure prompts — read by Claude Code, not by the learner. Translating them risks split-language prompts where the frontmatter (which Claude Code's registry indexes) stays English but the body becomes Spanish, which is fragile. The bilingual policy (§A17) explicitly excludes stable refs like commands, identifiers, and tool configuration. This page is the Spanish-speaker's audit path: read here to understand what each command does, read the .claude/ source if you want to see how the prompt achieves it.