Skip to content

Harden generate-spec: build-time intake, SKILL↔guide seam, Decision Ledger + §0 pre-build gate - #3

Merged
Carr1005 merged 2 commits into
mainfrom
fix/no-learner-intake-during-spec-gen
Jul 14, 2026
Merged

Harden generate-spec: build-time intake, SKILL↔guide seam, Decision Ledger + §0 pre-build gate#3
Carr1005 merged 2 commits into
mainfrom
fix/no-learner-intake-during-spec-gen

Conversation

@Carr1005

Copy link
Copy Markdown
Collaborator

Hardens the generate-spec skill and its guide so a generated spec.md is buildable, reproducible, and surfaces its design decisions to the learner. Four commits, each a distinct fix found by running a course (agent-memory) through the loop.

Commits

  1. Make learner intake a build-time input, not a generation input (e1d2b3f)
    One spec.md serves many learners, so the generator can't collect a specific learner's project. Intake becomes a build-time substitution: every learner-specific value is emitted as a [slot] carrying a course-derived default, so the spec builds as-is with zero intake and the generator never blocks asking for a project.

  2. Harden the SKILL.md ↔ guide seam; track the eval suite (0eae7fe)
    Keep the spec-quality contract in one place. SKILL.md defers entirely to references/spec-generation-guide.md ("do not restate its rules here") so the two files can't drift into two sources of truth.

  3. Untrack generate-spec evals/; keep the contract in the guide only (772611e)
    Point-in-time eval artifacts were a second source of truth that drifts from the guide. Untracked via .gitignore; the durable spec-quality contract lives in the guide's §3/§13/§14.

  4. Add Decision Ledger + §0 pre-build gate to the guide (a45e738)
    The core restructure of how a spec surfaces design decisions, fixing three failure modes observed run-to-run:

    • Decision Ledger (§5.5, §6) replaces the fixed six-slot intake table with one course-derived, reviewable table of every point where a build could diverge — learner-context AND pattern-critical / course-contradicted technique & dependency decisions — each pinned to exactly one buildable default. Adds the invariant/options/default/trade-off/owner row anatomy and a surfacing bar.
    • §3 dependency precedence so a heavy course dependency (e.g. a cloud DB) resolves to one baked default — substitute-local unless the tech is the taught subject — never a menu or contract (new traps §12.8/§12.9, closing an observed non-determinism where one generation baked a local store and another emitted a menu).
    • §0 "Before you build — REQUIRED" gate (§6.0): an imperative, build-agent-addressed, mechanism-agnostic instruction (works for Claude Code / claude.ai / Codex / Cursor / a custom harness) to present every Ledger row (labeled "course default") and hard stop — end the turn and wait for the user's reply before writing any code — with no "proceed on no response" escape (new trap §12.10, which that escape would re-open).
    • Demotes CTX-C to reference-only, adds the owner provenance label (§9), and adds matching §14 pre-handoff checks.

Scope / notes

  • Touches only the harness: spec-generation-guide.md, SKILL.md, .gitignore. No course content ships (courses/* is gitignored by policy — per-user workspace).
  • The §0 gate is a portable prose mechanism: it maximizes cross-environment compliance but is not a hard guarantee (only a PreToolUse hook could enforce, which isn't portable to an arbitrary learner environment — deferred).

🤖 Generated with Claude Code

Carr1005 and others added 2 commits July 13, 2026 00:52
Restructure how the generated spec surfaces design decisions, fixing three
failure modes found while running the agent-memory course through the loop:

- Replace the fixed six-slot "learner-intake" table with a course-derived
  **Decision Ledger** (§5.5, §6): one reviewable table holding every point
  where a build could diverge — learner-context AND pattern-critical /
  course-contradicted technique & dependency decisions — each pinned to one
  buildable course-derived default. Adds the invariant/options/default/
  trade-off/owner row anatomy and a surfacing bar (§5.5).
- Add a §3 dependency-precedence rule so a heavy course dependency (e.g. a
  cloud DB) resolves to one baked default — substitute-local unless the tech
  IS the taught subject — never a menu or contract (new traps §12.8/§12.9).
- Add the **§0 "Before you build — REQUIRED" gate** (§6.0): an imperative,
  build-agent-addressed, mechanism-agnostic instruction to present every
  Ledger row (labeled "course default") and HARD STOP — end the turn and wait
  for the user's reply before writing code, with no "proceed on no response"
  escape (new trap §12.10).
- Demote CTX-C to reference-only; add the owner provenance label (§9); add the
  matching §14 pre-handoff checks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… checklist

Fixes a failure that surfaced on the 14-row agent-memory Ledger: the gate said
"present every row" and released the build once "the user replied", but an
interactive question tool caps items per call (Claude Code's AskUserQuestion
takes only a few). So the agent presented a first batch, got a reply, treated
the build as unblocked, and buried the remaining rows — and different agents
improvised different batchings (inconsistency).

Deterministic mechanism (§6.0), no hardcoded cap:
- Require a structured question tool when the environment has one (else plain
  text) — it is the reliability lever, not a mere example.
- Present ONE QUESTION PER ROW, looped until every row is asked. No batch seam
  to mis-track; completeness is a plain count (N rows ⇒ N questions).
- Gate the build on a printed resolved-decision checklist covering EVERY row,
  not on a single reply — answers to some rows never release the build.

Adds trap §12.11 (Partial-present build) and matching §14 checklist items.
Portable: an agent without a structured tool lists rows in its reply and still
echoes the checklist before code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Carr1005
Carr1005 merged commit 5c26cf2 into main Jul 14, 2026
@Carr1005
Carr1005 deleted the fix/no-learner-intake-during-spec-gen branch July 15, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant