Implement SPEC-08: handful generator + banded non-domination (Stage 3)#20
Open
IanMayo wants to merge 1 commit into
Open
Implement SPEC-08: handful generator + banded non-domination (Stage 3)#20IanMayo wants to merge 1 commit into
IanMayo wants to merge 1 commit into
Conversation
/plan/handful — the last unit of the spine (delivery plan §δ): generate → score → organise. A seeded, strategy-biased fan-out over Meridian's four axes (approach × suppression × causeway × extraction) produces 16 candidate plans; the SPEC-07 scorer (reused, not re-implemented) turns each into a C1–C6 margin vector; a banded ε-non-domination organiser keeps the plans no other conservatively beats on every commitment, capped by axis diversity — never by a scalar (DEC-19). Decided in research note 03-score-plan.md §5 (DEC-11 gate): distinctness is ε-non-domination on the conservative interval order (ε defaults to 0, scale-free); the four generation axes are Meridian's own (closes concept §6.2). No schema change. - src/dominance.ts — noWorse / strictlyBetter / dominates / nonDominated; irreflexive, asymmetric, monotone in ε; violated = conservatively worst. - src/generate.ts — documented axis→route mapping; 16 valid Plans, clean reaches, C4 exercises the banded threat channel; deterministic in (config, seed). - src/handful.ts — HandfulService: clamp count to [3,5], generate/store/score, organise, diversity cap (axis Hamming, FNV-1a seed tie-break), derive distinct_because, stamp over (world.stamp, seed, count, engine). - src/components/handfulStrip.ts + gallery — the honest matrix now renders the generated handful (organised, not authored) with derived reasons. Both Stage-3 handful exits hold on Meridian: 4 genuinely distinct plans (each pair mutually non-dominated; survivors split along the two trade axes — approach C1↔C2, suppression C3↔C4), and same stamp + seed ⇒ identical handful (G1). Every verdict opens a complete trace chain (G3). specs/008-handful/ via spec-kit. 163 tests, typecheck clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yWb83axhXcr22oHDWNCoL
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
/plan/handful— the last unit of the spine (delivery plan §δ): generate → score → organise. A seeded, strategy-biased fan-out over Meridian's four axes produces candidate plans; the SPEC-07 scorer (reused, not re-implemented) turns each into a C1–C6 margin vector; a banded ε-non-domination organiser keeps the plans no other conservatively beats on every commitment, capped by axis diversity — never by a scalar (DEC-19).This closes both Stage-3 handful exits and completes the spine
SPEC-05 → SPEC-06 → SPEC-07 → SPEC-08.Why it's honest (the point of the slice)
The handful is where a demonstrator could most easily cheat — pick a flattering three and call them "the options". SPEC-08 refuses that by construction:
A ⪯ BiffA.hi ≤ B.lo). Overlapping bands are honestly incomparable and both survive; a plan is dropped only when another is conservatively at-or-above it on every commitment and strictly separated-above on at least one. No scalar total, weighted sum, or midpoint decides membership (DEC-15, DEC-19).distinct_becauseis derived, not captioned — each reason names the commitments a plan leads on and its axis signature.Decision provenance
Decided in research note
03-score-plan.md§5 (the DEC-11 gate, reserved for SPEC-08 when it gated SPEC-07): banded ε-non-domination and Meridian's four generation axes (closing the concept §6.2 open question under Stage-3 latitude). No new register decision; no schema change (npm run gennot run).Changes
src/dominance.tsnoWorse/strictlyBetter/dominates/nonDominated; irreflexive, asymmetric, monotone in ε;violated= conservatively worstsrc/generate.tsPlans (documented axis→route mapping; clean reaches, C4 exercises the banded threat channel)src/handful.tsHandfulService.handful— clampcountto[3,5], generate/store/score, organise, diversity cap (axis Hamming, FNV-1a seed tie-break), derivedistinct_because, deterministic stampsrc/components/handfulStrip.ts+ gallerysrc/seam.tsHandfulRequest/HandfulSuccess/HandfulResultmovement typesspecs/008-handful/Result on Meridian
/plan/handfulover the base world returns 4 genuinely distinct plans — each pair mutually non-dominated, the survivors splitting cleanly along the two trade axes (approach trades C1↔C2, suppression trades C3↔C4) — and same stamp + seed ⇒ identical handful (G1). Every verdict opens a complete trace chain to named knowledge (G3).Verification
npm run typecheckcleannpm test— 163 passed (SPEC-07 baseline +dominance/generate/handfulsuites)npm run galleryrenders the generated handful +distinct_becausestrip🤖 Generated with Claude Code
https://claude.ai/code/session_018yWb83axhXcr22oHDWNCoL
Generated by Claude Code