Skip to content

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

Open
Carr1005 wants to merge 1 commit into
mainfrom
fix/no-learner-intake-during-spec-gen
Open

Harden generate-spec: build-time intake, SKILL↔guide seam, Decision Ledger + §0 pre-build gate#3
Carr1005 wants to merge 1 commit 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

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>
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