feat: rewrite the shape skill around the Change model#97
Conversation
Shapes the pilot's shape-skill-rewrite follow-up: fog register as a quadrant dispatch table, blindspot pass sequenced before grilling, architecture-first question ordering, likelihood-of-change unit ordering (breakdown absorbed), critique gate as a shaping step, CLI boundary teaching. Includes the blast-radius blindspot reports (shape/breakdown, routing targets, implement/ship) as write-once evidence.
The generated Loaf CLI Reference omitted the top-level loaf doctor command and routed 'start working' exclusively through TASK-XXX with no loaf change path. Add doctor metadata (verified against doctor.go flag wiring) and a Change-first Quick Decision Guide entry to the generator; task/spec entries stay per the transitional model. Regenerated skill, rebuilt targets and tracked binaries ride along. Records Decision 10 and unit U6 in the shape-skill-rewrite change doc.
'cli' is too generic β this skill is the Loaf operating manual for agents. Rename lands generator output path and frontmatter name, sidecar, README, routing-eval fixture, release-verification path, and test assertions; the old skill name retires via config/deprecations.json (since v2.0.0-alpha.6, one-release window) so installed copies clean up on upgrade. Change doc records the full loaf-reference acceptance contract (Decision 10, U6) from the Codex-session convergence; the thinning slice follows.
Replace the ~1,450-line generated command catalog with an 82-line router: operating rules (discover syntax live via loaf --help, prefer --json diagnosis surfaces, --fix for safe repairs only, ask the user for project-owned choices, never hand-edit managed hooks, re-check, log decisions), a compact drift-proof command index generated from the same metadata, and three hand-authored references β configuration.md carries the guided config-maintenance workflow (config check --json β --fix β targeted questions β re-validate β install --upgrade β doctor), command-routing.md the decision guide and JSON surfaces, and troubleshooting.md the doctor-vs-state-doctor split, LOAF_DB isolation, and backup/restore. Dead rendering helpers removed from the generator; metadata and tests updated. Change doc records the full acceptance contract (Decision 10, U6) from the Codex-session convergence.
U1-U5 of the shape-skill-rewrite Change. The skill now produces a Change, never a numbered spec: fog register with quadrant routing ([KU] grilling, [UK] reaction artifact, [UU] blindspot pass) dispatches techniques deterministically and in-session; blindspot pass precedes grilling, offered never imposed; grilling runs one question at a time ordered by architectural impact with a recommended answer each; decomposition absorbs breakdown's Right Size Test re-principled as likelihood-of-change ordering for review; the critique gate closes shaping before check and the opt-in draft PR offer. Six references carry the technique mechanics; the CLI boundary doc is written from change.go's actual behavior. Spec-first machinery deleted (ID generation, lifecycle, templates/spec.md β verified unreferenced); change template gains the fog-register comment; routing eval gains idea-shape and brainstorm-shape probes (115 -> 119). Fog register in the change doc fully resolved; implemented by Codex at high effort against the mattpocock review evidence per Decision 7, reviewed and integrated by the orchestrator.
Architectural walkthrough β read this before the diff(The Decision 20 pattern: architecture first, code second.) What structurally changedShaping used to be a linear interview that ended in a numbered spec, with technique choice (interview? brainstorm? research?) left to whatever the agent felt like. The center of the rewrite is a dispatch table: every named unknown gets a quadrant tag, and the tag β not agent judgment β picks the technique. Two structural rules fall out of the blindspot evidence (
Where things live
The loaf-reference rider
Commit map
Provenance: the fog taxonomy and blindspot/interview/tweakable-plan patterns harvest Thariq's "A Field Guide to Fable" (flagged as a confirming input per the pilot's survivorship-bias rule β third independent convergence after Wayfinder and the SDD Blueprint); grilling/prototype semantics import from the mattpocock review evidence; the loaf-reference contract came from the Codex-session convergence. All cited in the change doc's Source Inputs. |
Review guide β H1/H2 checkpoints and your veto pointsSuggested reading order: H1 β CLI boundary accuracy
H2 β reconnaissance, not ordersEach technique reference must return fog entries and evidence, never decisions. The give-away failure would be any wording that lets the technique conclude ("therefore we shouldβ¦"). Spots to poke: Judgment calls made during implementation (all adjudicated, flag any you'd reverse)
Your explicit veto points
What deliberately did NOT change
Verification to re-run locallyloaf change check docs/changes/20260707-shape-skill-rewrite # 0 violations, executable: yes
node cli/scripts/eval-skill-routing.mjs --dry-run # 119 cases
grep -rn "SPEC-" content/skills/shape/ # zero hits
npm run test && npm run buildH3 (the likelihood-of-change ordering observed actually steering a review) trails on the first Change shaped with the new skill β not a gate here. |
External review round 1 on the PR caught both: the Go-embedded template loaf change init scaffolds from had drifted from the canonical skill copy when the fog-register comment landed (TestChangeTemplateMatchesCanonicalContent failed; freshly initialized Changes missed the comment), and shape's Step 3 claimed init switches to the slug branch when it only prints the suggestion β an agent following it literally could commit shaping work to main.
External review β round 1 (Codex, off-PR) β findings and dispositionsAdversarial two-axis review (general standards β₯ contract conformance), diff/repo-only; the reviewer ran the Verification Contract gates itself. Verdict was not merge-ready pending two mechanical fixes β both now landed in
Reviewer confirmed V1βV4 independently (check executable, build + eval dry-run at 119 cases, zero One meta-note: the reviewer's own |
Change
docs/changes/20260707-shape-skill-rewrite/ β the Change artifact lives in this diff. It was shaped, implemented, and its fog register fully resolved on this branch; draft status here means the human H1βH2 review hasn't happened yet. Flipping ready-for-review is that declaration.
What & Why
The shape skill β the primary shaping surface β still taught the retired spec-first model: SPEC-NNN ID generation, a status lifecycle, and a breakdown handoff, all superseded by the TRANSITIONAL note. Beyond staleness, three structural gaps: technique selection during shaping was judgment-by-vibes, no step surfaced unknown unknowns (interviews can only clear questions someone knows to ask), and nothing taught the
loaf changeCLI boundary the pilot shipped.This PR rewrites
/shapearound the Change model with a fog-routed narrowing protocol: every named unknown carries a quadrant tag that dispatches it to exactly one technique β[KU]known unknowns β grilling (one question at a time, architecture-changing answers first),[UK]unknown knowns β reaction artifacts (build the smallest thing the user can react to),[UU]suspected blind spots β blindspot pass (reconnaissance before the interview). Decomposition is absorbed from breakdown, re-principled from execution order to likelihood-of-change order so review attention lands on what's most likely to need changing. A critique gate closes shaping beforeloaf change checkand the opt-in draft-PR offer.Riding along per the recorded acceptance contract:
cli-referenceβloaf-reference, thinned from a ~1,450-line generated command catalog to an 82-line operational router (operating rules + compact drift-proof command index) with three hand-authored references, including the guided config-maintenance workflow (loaf config check --jsonβ--fixβ targeted questions β re-validate βinstall --upgradeβdoctor).Review focus
change.md): fog routes name in-session techniques, never skill invocations β the blindspot evidence for why research/brainstorm can't serve the handoff is inresearch/blindspot-routing-targets.md. This is the most load-bearing design call.references/decomposition.mdkeeps what mattered from the Right Size Test.references/cli-boundary.mdread true tointernal/cli/change.gobehavior (violations vs. derived executability,--require-executableownership)?templates/change.md(applied recommended answer; convention, never parsed bycheck).config/deprecations.jsonentry (since: v2.0.0-alpha.6, one-release window) the correct retirement contract?Verification
All executable gates green on this branch; re-run locally:
Human review (H1βH2) is this PR's review; H3 (ordering rule observed working) trails on the first Change shaped with the new skill.
Migration / breaking changes
/shapenow produces a Change underdocs/changes/, never a numbered spec β documented behavior since the TRANSITIONAL note; this makes the skill match it.loaf spec/loaf tasksurfaces are untouched (conversion pass owns them).cli-referenceretires via the deprecation manifest βloaf install --upgraderemoves stale copies;loaf-referenceinstalls in its place.Deferred
--require-executablepreflight, Verification-Contract-as-merge-gate) β sweep; captured as a spark with evidence inresearch/blindspot-implement-ship.md.research/blindspot-routing-targets.md.