chore(memory): router ask-tier — BDR-135, LRN-254/255, EVAL-055, journal; contract + plan r3
This commit is contained in:
1 parent
789fd00b23
commit
19dc1da424
6 files changed
+478
No files matched your search
@@ -1470,3 +1470,12 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate).
|
||||
- **Accepted risks**: `cc.sh` keeps `set -a; . ~/.claude/.env` (all secrets in the claude env, as `dtach_claude` did); `deniedMcpServers` union = `cc x web` on a `dev` project keeps the connectors denied (`set web` in the project fixes it).
|
||||
- **Branch**: feature/phase5-profiles-packs; spec docs/superpowers/specs/2026-11-01-phase5-profiles-packs-design.md; contract .claude/tasks/contracts/2026-11-01-phase5-profiles-packs-1300.md.
|
||||
Supersedes [[BDR-030]].
|
||||
|
||||
## BDR-135 — model-router askTier: consent before Fable, tier-name choice stamped on turn and run slots, per-type spawn memory [accepted] (2026-11-02)
|
||||
- **Context**: user ask 2026-11-02: model-router must ask before routing main or a rowed spawn onto Fable. feature/router-ask-tier, contract `.claude/tasks/contracts/2026-11-02-router-ask-tier-1434.md`, plan r3 after 3 lenses + confirmation.
|
||||
- **Decision**: `routing.json` `askTier` (`best` | `false`, machine override wins, absent = best, missing file = off, bad value logged once + best). Ask fires at route EVENTS only (typed or model-loaded rowed skill, main `route` tool phase, typed `/route <phase>`, rowed spawn from main), never in turn.step (LRN-231). Guards: router on, not paused, cur not head, `asking` free, slot unstamped, slot tier = best, slot = effective `mainModelSlot`, surfaces non-empty, then real decision via `snapshot`/`decideMain` lands on head. Options `Fable` · `Opus instead (big tier)` (dropped when opus down) · `Stop asking this session`. Choice = TIER NAME on `Routed.tierChoice` (`best` | `big`), stamped on turn slot AND run slot; inherited only same-tier, non-typed writes (typed skill = new span, work route never inherits). `big` resolves minus head (opus, else sonnet, head last), phase effort (no stand-in notch). Spawns: one answer per agent type per session (`State.tierSpawn`), stored answer applied before any guard. `/route ask-tier on|off` via `flagCommand` (shared with `ask`); `/route show` `ask-tier:`. Nothing written to `confirmed`.
|
||||
- **Why**: Fable credits burn on best-tier rows (BLK-030/031); user wants consent per span, not per spawn (audit gates respawn verifier + security-auditor each loop).
|
||||
- **Alternatives rejected**: stand-in rewrite (`isStandIn` keyed on held head, would print "stands in for" on a user pick); rebuilt decision from parts (diverges from `decideMain`: sticky slot, mainUpgrade off, cap); per-spawn ask (blocking dialog, no timeout, stalls unattended orchestration); generated labels from aliases (contract fixes the exact words); any tier name in `askTier`; `{ model: alias }` on spawn (explicit model bypasses breaker).
|
||||
- **Residual (user-accepted, F)**: Fable held or cap exceeded at the route event → no question, slot unstamped; hold lapse / compaction → next step upgrades unasked (breaker behaviour today). `/model <x>` while any dialog holds `asking` falls to native (pre-existing, BDR-126).
|
||||
- **Gates**: r1 correctness FATAL(6) robustness FATAL(6) simplicity CONCERNS(4) → r2 → confirmation CONCERNS(6) → r3; feater DONE 28 TIER tests (590 → 618); GATE 0 MET 5/5; verifier CONFORME 11/11 first pass; security PASS (1 LOW fixed: `clean(skill)`). Commits 9a24a62, docs 789fd00.
|
||||
- **Refs**: [[BDR-116]], [[BDR-123]], [[BLK-032]], [[LRN-231]], [[LRN-242]], [[LRN-254]].
|
||||
@@ -426,3 +426,10 @@ Dogfood: 3 blind lenses attacked the v1 plan for the plan-challenge feature itse
|
||||
- **Result**: r1 FATAL(11)/FATAL(10)/CONCERNS(5): BLOCKER = plan written on a stale tree (profile backend live); 30 jq per statusline refresh; settings.json procedure that would have discarded user writes; test precedence inverted; doctor abort under pipefail; worktree incompatibility. Confirmation on r2: 2 more BLOCKERs (keep list dropped the tracked `skills/model-router` link; census matched itself). All fixed before Task 1. Execution then needed 4 fix rounds (gates/reviews), none on those aspects.
|
||||
- **Anomalies**: the simplicity lens duplicated two robustness findings; the confirmation pass still found BLOCKERs, so one pass is the floor, not the ceiling.
|
||||
- **Action**: keep the 3+1 shape for plans over ~1000 lines; add "live state verified at Task 0" to the plan template.
|
||||
|
||||
## EVAL-055 — BDR-125 phases 0/1/4a/5 re-verified: gates, SHAs, engine; 0 code defect, 5 stale TODO ticks [keep] (2026-11-02)
|
||||
- **Checked**: BDR-125 phases ticked in TODO (pre-0, 0, 0b, 4a + minors, 1 + follow-ups, 5) vs original ask (TODO entry, contract REQUEST/CLARIFICATIONS, BDR).
|
||||
- **Method**: `gates.sh run` on 5 contracts; 22 in-repo SHAs `merge-base --is-ancestor develop`; 9 cross-repo SHAs `cat-file -e` + `branch --contains` in zenquality/game/angelscar356/faunosteo/robin_petier; `reconcile.sh` engine (`reconcile_blk_open`, deferrals, contradiction candidates); direct fs probes (`~/.claude.json` mcpServers, `~/.claude/projects/*/memory/`, v2 markers, `## Index` count, profile NAME_RE, 21st CLI present + suite green).
|
||||
- **Result**: 0 code defect. Gates: 3 MET, phase 0 UNMET(1), phase 1 UNMET(2), all oracle drift from later gated commits (LRN-255). TODO: 5 done-but-open (proof, mcp remove, auto-memory dirs, profile charset, design-tool-gate hermetic) + BLK-021 TMPDIR resolved by cc.sh + phase 5 follow-up lump (1 of 3 done). Reconcile: open BLK 001/003/017/018/022/029 all known upstream/deferred; 8 flag-overlap contradiction candidates, none real.
|
||||
- **Anomalies**: `gates.sh run` dirtied two merged contracts (restored by checkout); TODO line 74 and BDR-134 cite purged spec/plan paths (BDR-065 purge); compound Bash with `git config`/`git diff settings.json` denied by permission rules (split calls).
|
||||
- **Action**: chore/todo-reconcile-bdr125 e58a617 (5 ticks, split follow-ups), merge on user signal. LRN-255.
|
||||
@@ -684,3 +684,4 @@ rules:
|
||||
|
||||
## 2026-11-02
|
||||
- phase 5 profiles+packs shipped on feature/phase5-profiles-packs (13 tasks SDD, 3-lens challenge, gates MET/CONFORME/PASS after 3 passes): 9 packs, 9 profile fragments, profile.sh one-jq current --plain, cc <name> [profile], census; BDR-134, LRN-248..253, BLK-039/040, EVAL-054; TODO: router ask-before-Fable queued
|
||||
- BDR-125 re-verification (gates x5, 31 SHAs, reconcile engine): 0 code defect, 5 done-but-open ticks → chore/todo-reconcile-bdr125 e58a617 (merge on signal); EVAL-055, LRN-255. /feat router-ask-tier (feature/router-ask-tier): plan r1 FATAL x2 → r3, feater 28 TIER tests, GATE 0 MET, verifier CONFORME 11/11, security PASS (1 LOW fixed); 9a24a62 + docs 789fd00; BDR-135, LRN-254. Merge on signal. Next: phase 2 guards via /ship-feature.
|
||||
@@ -1911,3 +1911,13 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
|
||||
- **Pattern**: commit a change to a tracked file whose working copy carries uncommitted writes you must keep (settings.json UI writes): `git show HEAD:f | jq '<edit>' > tmp && git update-index --cacheinfo 100644,"$(git hash-object -w tmp)",f && git commit`, then patch the working copy with jq into a temp file and `cp` it back. Never `git checkout -- f`, never `git stash` (pop can take someone else's stash), never `git add -p` (interactive, unavailable), never `jq … > f` (truncates on failure).
|
||||
- **Context**: phase 5 Task 13 listing budget; BLK-039.
|
||||
- **Apply**: any commit to settings.json or another file the harness writes to.
|
||||
|
||||
## LRN-254 — A route-event dialog stamps every slot the event armed; trace slot lifecycle before storing a choice (2026-11-02)
|
||||
- **Pattern**: a dialog answered at a route event must stamp EVERY slot the event armed, not the one in hand. `armTypedSkill` → `routeMainBySkill` derives `runMain = { ...turn }` BEFORE `confirmSkill` runs; a choice written on `turnMain` after dies at `endMainTurn` (turnMain nulled), run falls back to the choice-less runMain → "Opus instead" lasted one turn. Three blind lenses (correctness, robustness, simplicity) hit the same BLOCKER on plan r1.
|
||||
- **Context**: feat router-ask-tier plan r1 → r2, `mods/model-router/hooks/register.ts` (`routeMainBySkill` ~3485, `confirmSkill` ~2984, `endMainTurn` ~4042).
|
||||
- **Apply**: before storing state on a slot, trace its lifecycle: who writes it, who copies it (spread = snapshot, not link), who nulls it, who outranks it (`mainModelSlot` precedence). Stamp the asked slot + the derived one; inherit only same-tier, non-typed. Read the real decision (`snapshot`/`decideMain`) instead of rebuilding it from parts.
|
||||
|
||||
## LRN-255 — gates.sh run rewrites contract evidence; re-audit of merged contracts: attribute drift by git log -S, then restore (2026-11-02)
|
||||
- **Pattern**: `bash lib/gates.sh run <contract>` REWRITES the `EVIDENCE:` lines of the contract file. Re-running a merged contract's gates for an audit: (1) oracles frozen on a base SHA (`c1-*.sh` vs develop 017a28b) read NOT-MET on later GATED changes (phase 5 added a pack-extras line to `rules/web-building.md`; 3330f0b restored "(dispatcher applies)" → 209/205 chars; 7899670 dropped `memory:`), (2) a CHECK string pinned to a test name goes stale after a review rename (`T10h-no-jq-rc0` → `T10h-empty-path-rc0`, 0b59687). Neither is a repo defect.
|
||||
- **Context**: 2026-11-02 BDR-125 re-verification, 5 contracts re-gated: phase 5 / memory v2 write / minors MET, phase 0 UNMET(1), phase 1 UNMET(2), all explained by `git log -S`.
|
||||
- **Apply**: on a re-audit, run gates, attribute each NOT-MET with `git log -S'<text>' -- <file>` to a gated commit, then `git checkout -- <contract>` to keep the ship-time evidence (historical record). Never commit re-run evidence over a merged contract.
|
||||
Reference in new issue
Block a user