v1.1.0 to v2.0.0

55 added, 24 removed. Audit A to A.

---
name: study-session
- version: 1.1.0
- description: "Use when the user asks for a guided comprehension/study session over existing code: '/study-session', 'study session', 'sesión de estudio', 'repasemos <subsystem>', 'help me understand <area>', or a recurring comprehension-recovery ritual. Recovers the mental model of code the user delegated to coding agents. Do NOT use for implementing features, fixing bugs, or code review — nothing is modified in a study session except the comprehension tracking page."
+ version: 2.0.0
+ description: "Use when the user asks for a guided comprehension/study session over existing code: '/study-session', 'study session', 'sesión de estudio', 'repasemos <subsystem>', 'help me understand <area>', or a recurring comprehension-recovery ritual. Recovers AND measures the mental model of code the user delegated to coding agents. Two modes: deep (45-60 min) and checkpoint (10-15 min). Do NOT use for implementing features, fixing bugs, or code review — nothing is modified in a study session except the comprehension tracking page."
---
- # Study Session — recover the theory of a subsystem
+ # Study Session — recover and measure the theory of a subsystem
- A ~1 hour socratic session over **real code in the repo**. The user reads and explains; you probe and correct. The goal is Naur's "theory": after the session the user can defend the subsystem's design, invariants, and failure modes without help.
+ A session over **real code in the repo**. The user reads and explains; you probe and grade. The goal is Naur's "theory": the user can defend the subsystem's design, invariants, and failure modes without help. Two modes:
- **Never lecture first.** You only explain after the user attempted. An agent-written summary builds your understanding, not theirs.
+ - **Deep** (45-60 min): learn or repair one subsystem/unit. Default for `not-assessed`, `practiced`, or `code-changed` targets.
+ - **Checkpoint** (10-15 min): measure retention of a due unit — one cold reconstruction + one transfer scenario. Default when the row's next-due date expired.
- ## Session flow
+ **Core principle: cold evidence is graded separately from learning.** What the user produces BEFORE your corrections is what gets measured; what they learn after counts as learning, never as certification.
- 1. **Pick the target.** Read the project's comprehension tracking page (see pr-quiz for the format; find it via the user's instructions/memory, or ask). Propose the weakest or stalest subsystem with a one-line reason; the user can override. No tracking page → ask what to study and offer to create the page.
- 2. **Prepare silently.** Read the subsystem's code yourself and choose 2–4 files or flows that carry its theory: the entry point, the core invariant, the hardest edge case. Don't dump what you learned — you're building the itinerary, not the lesson.
- 3. **Run ~3 blocks of 15–20 min.** Per block:
- - Point the user at one file/flow (`file:line` range) and ask them to read it and explain it back to you — what it does, why it's shaped that way.
- - Probe with ONE question at a time (design-why, failure mode, invariant — same types as the pr-quiz skill), waiting for each answer.
- - Correct with evidence: quote the actual code (`file:line`) that confirms or refutes what they said.
- - It's fine for the user to ask you to explain a concept they've never met (a concurrency primitive, a protocol detail) — that's a question, not an un-attempted answer. Explain it anchored in the code at hand, then hand the thread back with a question.
- 4. **Close with THEIR summary.** Ask the user for 3–5 sentences in their own words: what this subsystem does, its key invariant, its main failure mode. Fix factual errors if any; the wording stays theirs.
- 5. **Update the tracking page**: status per the rubric below, last-defended = today, resolve/add weak topics, and paste the user's closing summary (verbatim) into the page's session history. If the user's notes system keeps an append-only log, add an entry there too.
+ ## Finding the comprehension map
- ## Status rubric
+ The map's schema (columns, status vocabularies, event format, spacing rule) lives in the user's knowledge wiki — this skill defers to it. To locate the map:
- Grade what happened, not what you hope:
+ 1. Resolve the wiki root: follow the `~/.claude/work-wiki` symlink if present; otherwise ask once and offer to create that symlink.
+ 2. Glob `**/projects/*-comprension.md` (or the wiki's declared comprehension-map convention) with `kind: comprehension-map` frontmatter; match the current repo/workspace (git remote or basename) against each map's repo/paths column — one project may span several repos.
+ 3. Exactly one match → use it. None → derive the path from the project name per the wiki's convention, confirm with the user, create from the wiki's schema template. Several → ask.
- - **defensible** — explained design AND failure modes with at most light nudging.
- - **shaky** — needed substantial correction, or couldn't explain the why.
- - **not-assessed** — untouched (never downgrade to this).
+ No wiki or schema at all → offer a minimal inline map: `| Subsystem | Repo/paths | Current evidence | Scope | Last passed | Next due | Gaps |` with outcome (`not-assessed | practiced | partial | defensible`) and validity (`current | evidence-expired | code-changed | code-currentness-unknown`) vocabularies.
- Upgrading status requires demonstration in THIS session. A session where you did most of the talking leaves the status where it was.
+ ## Target selection (risk-first)
+ Propose ONE target with a one-line reason, in this priority order — the user can override:
+
+ 1. Relevant code changed since the row's last evidence SHA (`code-changed`).
+ 2. An open gap implicated by a recent MR or incident.
+ 3. High-blast-radius unit overdue.
+ 4. Any other overdue unit.
+ 5. Untested low-risk units.
+
+ Preflight: record the current `repo@sha`. If the row has prior evidence, diff the studied paths since its SHA — behavioral drift marks the row `code-changed` regardless of calendar age.
+
+ ## Deep session flow
+
+ 1. **Prepare the hidden rubric FIRST — before hearing any answer** (so you can't fit it to what the user says). Read the subsystem, pick 2-4 files/flows that carry its theory, and note internally: expected claims per dimension, acceptable alternatives, the evidence source for each claim, and your uncertainty. Evidence hierarchy: behavior ← code/tests/traces; contracts/invariants ← tests/schemas/API contracts; operational ← tests/logs/runbooks/incidents; design intent ← ADRs/issues/commits/the user's own remembered decision. **Undocumented intent is graded "intent unknown", never as a wrong answer.** If the subsystem is high-risk and has no study units yet, define 3-5 now (request paths, reconciliation loops, retry semantics — coherent responsibilities, not files).
+ 2. **Cold reconstruction (5 min).** No map page, no code, no hints: the user describes from memory the boundaries, the end-to-end flow, one invariant, and the main failure mode. Grade silently against the rubric.
+ 3. **Guided investigation (25-30 min).** Open-repo: code and tests allowed; your hints are not free. Point the user at one file/flow (`file:line`), have them read and explain it back, probe with ONE question at a time, correct with `file:line` evidence. A **substantive hint** (supplies a missing causal link, component, or failure mechanism) caps that item below solid. The user asking you to explain a concept they've never met is a question, not a failed answer — explain it anchored in the code, then hand the thread back.
+ 4. **Novel transfer task (10-15 min).** One exercise the session hasn't rehearsed: predict the externally visible result of a dependency failure; given a symptom, name where to look first and the first three checks; trace a value across components and name where its invariant can break. Include **at least one executable prediction** when test infra is available: the user commits to an answer, then run the test/command and compare. Record only what the execution can establish — a passing test proves the exercised behavior, not the design rationale.
+ 5. **Close.** Ask the user for a 3-5 sentence summary in their own words (reflection evidence, not the grade). Score the four dimensions from the user's INITIAL answers, resolve/open dated gaps, set the next-due date per the wiki's spacing rule, and append the event to the map (verdicts = pre-correction answers).
+
+ ## Checkpoint flow
+
+ One cold reconstruction + one transfer scenario, chosen to cover the row's required dimensions. Renews `defensible` only if the two exercises together cover **every** required dimension — any required dimension left `not-tested` blocks renewal. Score, update dates/gaps, append the event. Escalate to a deep session if the checkpoint fails.
+
+ ## Grading
+
+ Four dimensions, each `solid | partial | weak | not-tested`:
+
+ - **Model** — boundaries, dependencies, end-to-end data flow.
+ - **Invariants** — what must remain true and what enforces it.
+ - **Failure/debugging** — predict a failure; first useful diagnostic steps.
+ - **Operations** — observable signals, consumers, blast radius, recovery.
+
+ Outcomes: **defensible** — solid across the required dimensions from cold/pre-correction evidence (solid cold baseline + transfer in-session, or a delayed checkpoint); **partial** — solid on some required dimensions; **practiced** — the session was learning-heavy (substantial correction needed): schedule a checkpoint at +7 days; **not-assessed** — untouched (never downgrade to this).
+
+ Degradation by environment: tests unavailable → executable dimensions are `not-tested`. Code unavailable (e.g. travelling) → recall-only checkpoint: a pass records "memory check passed; code-currentness unknown" and cannot renew full `defensible`.
+
## Red flags — stop and fix
- - You explained a file before the user attempted it.
+ - You heard the user's answer before writing the rubric, or explained a file before they attempted it.
+ - Status upgraded from post-correction performance, or after a session of you lecturing.
+ - `defensible` awarded without a cold baseline or delayed check.
+ - A failed/assisted session refreshing approval dates (record it as a new event; never overwrite the historical pass).
+ - Flow-level evidence written as subsystem-wide status (the scope column exists for a reason).
- Covering more than one subsystem "since we're on a roll".
- - Status upgraded after a session of you lecturing.
- The closing summary written by you instead of the user.
- Session drifting into refactoring or bug fixing — park findings in one line, stay on comprehension.
- Match the conversation's language.
+ Match the conversation's language (the map's display vocabulary may be localized; keep its tokens consistent within a wiki).