Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .claude/skills/generate-spec/references/audit-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Run every check on the whole file, not a sample:
(m) contract fields vs what ACs assert;
(n) pairwise AC consistency: each AC's Given is true after the AC it builds on;
(o) the provenance header pins the guide commit (and the overlay commit, with an overlay).
(r) the CTX-C trade-off table: every entry the course argues as a builder's choice is dispositioned
row / bake-in / lever, never `narrative`; every bake-in or lever entry names its tie-breaker; no
§1 item tagged `restorable` is a side of an entry in this table (§5.5 three dispositions).
With an overlay also: (p) nothing labelled [environment] inside CTX-A or CTX-B; the
Environment Resolutions table accounts for all six dimensions and each row points at a rule
and AC that exercise its invariant, or says "Invariant empty"; the "Adapting this beyond the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Applies only when `/generate-spec` is invoked with `--env=coding-agent-lab`.** Without that
flag this file is not read and the base guide governs alone.

Written against base guide **`11b3673`**. This file carries the **rules**; its companion
Written against base guide **`a6064cb`**. This file carries the **rules**; its companion
`spec-generation-guide.coding-agent-lab.runtime.md` carries the environment's **facts**, and is
opened later, at OVERRIDE 2 Phase 2. Both are distilled from `environments/coding-agent-lab.md`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Notebooks give you *what and how-configured*; transcripts give you *why and what
**Pass B — Transcripts.** Extract:
- **Lesson numbering and titles exactly as the transcripts state them.** Platform numbering frequently differs from notebook filenames (e.g. an "Introduction" counted as Lesson 1 shifts everything by one). Transcripts win; the CTX-E provenance map uses their numbering.
- The *why*: rationale, analogies, intuition (why overlap exists; why a failure happens mechanistically).
- **Trade-offs spoken aloud that never appear in code** (e.g. "this method ran slower *and* answered worse here"). These feed two consumers: the §5.5 `design-argued` route, and the §6 Ask-First tier, whose entries are derived from this mined list — keep it complete. **The list ships:** CTX-C carries it as a table — every mined spoken trade-off, its lesson, and its disposition (`row <id>` / `bake-in R<n>` / `lever R<n>` / `narrative`) — so a subject that never entered the litmus is visible as an omission rather than silent. A subject the course argued that appears nowhere in this table is a defect.
- **Trade-offs spoken aloud that never appear in code** (e.g. "this method ran slower *and* answered worse here"). These feed two consumers: the §5.5 `design-argued` route, and the §6 Ask-First tier, whose entries are derived from this mined list — keep it complete. **The list ships:** CTX-C carries it as a table — every mined spoken trade-off, its lesson, and its disposition (`row <id>` / `bake-in R<n>` / `lever R<n>`, each non-row entry naming the tie-breaker that decided it / `narrative`, only for a subject the course did not argue as a builder's choice — §5.5) — so a subject that never entered the litmus is visible as an omission rather than silent. A subject the course argued that appears nowhere in this table is a defect.
- Instructor heuristics and parameter guidance (e.g. how results degrade as k grows).
- A spoken heuristic the spec must quantify ("most runs", "a few") becomes a value only with a label beside it that the number is the generator's reading of the course's words, and it is a post-build lever (§6 Ask First), never a Ledger row.

Expand Down Expand Up @@ -163,14 +163,16 @@ When several routes apply, Category records the highest-precedence one: `design-

**No route admits a non-decision.** Every route admits *decisions*, and a decision requires at least two legitimate options. When every alternative to the taught side is a course-warned anti-pattern or its degenerate case (the `design-argued` bake-in rule), there is no decision left to surface — the subject enters the Ledger through **no** route, `design-structural` included, even where its guarantee would pass the structural litmus: the guarantee lives in a business rule and its AC, and the warned side lives in the Trade-off/CTX narrative. (Left unstated, one baked-in subject re-entered the Ledger through three different route readings across successive regenerations.)

**An argued subject has three dispositions and no fourth.** Every subject in the Pass B trade-off table that the course argues as a choice the builder makes (procedure step (c)) resolves to exactly one of: a **row** (both sides shown working, sides differ in a component, identity or role), a **bake-in** (tie-breaker 1: the course showed the other side failing), or a **lever** (tie-breaker 2: the sides differ only in a value). `narrative` is reserved for subjects step (c) already excludes — framing, taxonomy, a maturity story — and is never the disposition of an argued choice. A §1 "Not Included" tag, a §2 pin, and a CTX-C paragraph are *where a side is recorded*, not dispositions: a side the course built and argued is an Options entry on its row, however small the example it was built on (a primer, a toy agent), and its §1 item, if one is kept, is tagged *owned by that row*. The table's disposition column names the tie-breaker that decided every non-row entry. (Left unstated, one argued subject — instruction placement — was a row in eleven generations and a `restorable` exclusion or `narrative` in five, on one guide.)

Everything else — a single-valued parameter the course sets once, never varies, and never argues (a chunk size, a token-estimate heuristic, a max-iteration cap) — stays a **defaulted value in the spec body**, not a Ledger row. It still carries its value and provenance; it is simply not promoted. Do not drown the Ledger in low-stakes rows; do not bury a design decision or a stakes-passing contradicted decision in prose (that is the failure §12.9 and the old CTX-C mis-home caused). The course's own framework or harness — keyless, never argued, structurally identical across alternatives — is likewise a §2 pin with its CTX-D perishables, not a row: swapping the framework is a different course, not a learner choice this spec offers.

**The scope-boundary row (what the out-of-scope dimension becomes).** Subtraction is the wrong verb for this dimension in standalone-takeaway mode: the deliverable is fixed and pinned by the acceptance criteria, and every subtraction a learner would plausibly want is already an Options pick on some other row. What the dimension *can* carry is the inverse — the build's exclusion list, shown to the learner, who may ask for something back. So write it as a **scope-boundary row**:

- Its **Decision** cell instructs the gate to present the §1 "Not Included" list *inside the question*. §1 is not a Ledger row, so the gate — which presents only rows, one at a time — otherwise never renders it, and the learner is asked to amend a list they have never seen. This is the row's whole job; a Default that merely points at §1 does not do it.
- Its **Default** is keep-as-is: every §1 exclusion stands, the full acceptance set is built.
- Its **Options** offer restoration *without naming what the learner should want back* — they name it. Two options (keep / bring something back) plus the question tool's free-text is enough; a single-option cell cannot be asked at all, since structured question tools require at least two.
- Classify each excluded item by a **handling rule**, so the agent's answer is determinate rather than improvised: *additive and owned by no other row* → restorable at the gate; *named by the course but never built* → buildable, but say plainly that the spec supplies no parameters and no acceptance criteria for it; *owned by another row* (a store capability, a keyed tool) → defer to that row, never decide the same thing twice; *outside the delivered build mode* (e.g. integration into an existing codebase) → unavailable.
- Classify each excluded item by a **handling rule**, so the agent's answer is determinate rather than improvised: *additive and owned by no other row* → restorable at the gate (never a side of an argued subject — those have three dispositions, above); *named by the course but never built* → buildable, but say plainly that the spec supplies no parameters and no acceptance criteria for it; *owned by another row* (a store capability, a keyed tool) → defer to that row, never decide the same thing twice; *outside the delivered build mode* (e.g. integration into an existing codebase) → unavailable.

A genuine additional exclusion still reaches the agent through free-text, and must name the acceptance criteria it retires.

Expand Down Expand Up @@ -541,6 +543,7 @@ Fix, don't annotate.
- [ ] Every row's Category field carries exactly one valid value (design-argued / design-structural / realization / contradicted / learner), chosen by the §5.5 precedence.
- [ ] Every `design-argued` row cites, in its Trade-off cell, the lesson whose narration argued the trade-off.
- [ ] Every `design-argued` subject — row, bake-in, or lever — records which litmus branch decided it; no row exists for an alternative the course showed failing, no row's sides differ only in a value, and no subject entered through design-argued on presentation alone (§5.5).
- [ ] Every argued subject in the trade-off table is a row, a bake-in or a lever, with the deciding tie-breaker named beside each non-row entry; no argued subject is `narrative`, and no §1 `restorable` item is a side of one (§5.5 three dispositions).
- [ ] CTX-C carries the mined trade-off table (§4 Pass B): every spoken trade-off with its lesson and disposition; every Ask-First entry and every design-argued row traces to a line of it.
- [ ] Row identifiers follow §5.5's prefix rule; no row id is a bare `R<n>`.
- [ ] An LLM-driven course carries the §3 scripted-model realization (a row in standalone mode; resolved by an overlay otherwise), and its scripted model is declared in §5.
Expand Down