chore(todo): reconcile the BDR-125 phases 0, 1, 4a, 5 against git and the registries

Gates re-run (phase 5, memory v2 write and minors MET; phase 0 and 1 oracles drift from later gated changes), 31 SHAs checked. Five done-but-open items ticked, phase 5 follow-ups split, router ask-tier marked in progress.
This commit is contained in:
bchanot committed 2026-11-02 15:28:53 +01:00
1 parent 3cc4e0d541
commit e58a617e54
1 file changed
+11 -9
+11 -9
View File
@@ -1,6 +1,6 @@
# TODO # TODO
## Open (reconciled 2026-10-23, /reconcile) ## Open (reconciled 2026-11-02, /reconcile on the BDR-125 phases; full pass 2026-10-23)
Done history before 2026-10-08 removed 2026-10-23 (git keeps it: `git log -p -- .claude/tasks/TODO.md`); decisions live in `.claude/memory/`. Done history before 2026-10-08 removed 2026-10-23 (git keeps it: `git log -p -- .claude/tasks/TODO.md`); decisions live in `.claude/memory/`.
### Context mod queue (BDR-125): one /ship-feature per phase, order (user 2026-10-25): 0 → 4a → 1 → 5 → 2 → 3 (conditional) → 4b-4d ### Context mod queue (BDR-125): one /ship-feature per phase, order (user 2026-10-25): 0 → 4a → 1 → 5 → 2 → 3 (conditional) → 4b-4d
@@ -18,8 +18,8 @@ Shared rules for every phase:
- [x] **/feat picker scope** (done 2026-10-25, 2202964 + docs 5d262d3, BDR-127; live check DONE 2026-10-29 (Sonnet 5.5 pick held by the hook, scope asked; same-model pick fires no hook → BLK-037, fixed by BDR-132 657e5cb); still unchecked: PostModelSwitch on a denied pick) (BLK-036, user ask 2026-10-25): bare `/model` → pick in native picker → ask project scope (`.claude/settings.local.json`) or user scope. First: engine types for a settings-write intercept; none → mod restores user settings.json = BDR-116 amendment, user decides before code. - [x] **/feat picker scope** (done 2026-10-25, 2202964 + docs 5d262d3, BDR-127; live check DONE 2026-10-29 (Sonnet 5.5 pick held by the hook, scope asked; same-model pick fires no hook → BLK-037, fixed by BDR-132 657e5cb); still unchecked: PostModelSwitch on a denied pick) (BLK-036, user ask 2026-10-25): bare `/model` → pick in native picker → ask project scope (`.claude/settings.local.json`) or user scope. First: engine types for a settings-write intercept; none → mod restores user settings.json = BDR-116 amendment, user decides before code.
- [x] **Phase 0, no mod: split project CLAUDE.md** (this repo + the lever, feature/claude-md-split, 2026-10-26; merge on user signal). Four rules under `.claude/rules/` (rules-maintenance, graphify-vendored, mods, transient-artifacts `# static-check: skip`), `lib/project-rules.sh` check/matches/sections/extract/emit (`-C <dir>`) + suite, `hooks/instructions-loaded.sh` (log `~/.claude/logs/instructions-loaded.jsonl`, session + agent ids), `!.claude/rules/` here + socle, `/onboard split` + onboarder `MODE: split`, generators emit docker/testing/ci from `templates/project-rules/`. Baseline 2026-10-26 `/context`: 32.2k total, Memory files 11.6k, project CLAUDE.md 2.1k. - [x] **Phase 0, no mod: split project CLAUDE.md** (this repo + the lever, feature/claude-md-split, 2026-10-26; merge on user signal). Four rules under `.claude/rules/` (rules-maintenance, graphify-vendored, mods, transient-artifacts `# static-check: skip`), `lib/project-rules.sh` check/matches/sections/extract/emit (`-C <dir>`) + suite, `hooks/instructions-loaded.sh` (log `~/.claude/logs/instructions-loaded.jsonl`, session + agent ids), `!.claude/rules/` here + socle, `/onboard split` + onboarder `MODE: split`, generators emit docker/testing/ci from `templates/project-rules/`. Baseline 2026-10-26 `/context`: 32.2k total, Memory files 11.6k, project CLAUDE.md 2.1k.
- [ ] Proof, this repo: `/context` after the merge; one fresh session Reading one file per rule → 4 Project `path_glob_match` lines; one sub-agent Read → does a path rule load inside a sub-agent (decides what the per-repo pass may move). Results in the journal. - [x] Proof, this repo (journal 2026-10-26: headless 17:00:07Z 4 Project `path_glob_match`, sub-agent 17:00:33Z loads rules too; `/context` after merge = the 2026-10-28 baseline 30.5k; verified 2026-11-02 /reconcile). Was: `/context` after the merge; one fresh session Reading one file per rule → 4 Project `path_glob_match` lines; one sub-agent Read → does a path rule load inside a sub-agent. Results in the journal.
- [ ] User step: `claude mcp remove -s user higgsfield` (user-scope MCP, no toggle ownership, no doctor check; phase 5 `.mcp.json` owns it). - [x] User step: `claude mcp remove -s user higgsfield` (done: `~/.claude.json` mcpServers empty 2026-11-02; higgsfield is a claude.ai connector, denied per profile since phase 5).
- [ ] Phase 2 folds: narrow the pre-commit `.claude/**` exemption so a rules-only commit cannot land on develop/main (deferred 2026-10-26). - [ ] Phase 2 folds: narrow the pre-commit `.claude/**` exemption so a rules-only commit cannot land on develop/main (deferred 2026-10-26).
- [x] **Phase 0b, per-repo pass** (2026-10-27: 10 repos classified; split on branches awaiting the user's merge: zenquality 1942dcf 4 rules 46%, game 527bdcc 2 rules, angelscar356 ab75ecd 1 rule; keep-everything verdict, no branch: config, integration_alphalink, robin_petier, trucks_at_work, bchanot-cv, for_you, nuit-folle (all sections always-on by the S4 rule); faunosteo 7a75974 11 rules on the user's feature branch, 31.9k → 27.2k; zenquality/game/angelscar356 merged 0ff05f1/d9be6b1/853b55b; proof per repo = the user's next session there) (after phase 0 merges; via `/onboard split`, one `chore/claude-md-split` per repo off develop, approval per repo, never an automatic merge; `/context` before/after in that repo's journal). Order by size: faunosteo 52,322 chars (on feature/v1-1-clients-animals with 5 dirty files: finish or stash first, S1 refuses otherwise), zenquality 23,378, game 14,918 (on feature/replay-hint), robin_petier 12,895, config 4,990, integration_alphalink 4,249. None has `.claude/rules/` yet; all use the `.claude/*` file form (BDR-003). Sections a sub-agent needs stay always-on unless the phase 0 sub-agent proof says path rules load there (proof 2026-10-26: they do; verify per repo). - [x] **Phase 0b, per-repo pass** (2026-10-27: 10 repos classified; split on branches awaiting the user's merge: zenquality 1942dcf 4 rules 46%, game 527bdcc 2 rules, angelscar356 ab75ecd 1 rule; keep-everything verdict, no branch: config, integration_alphalink, robin_petier, trucks_at_work, bchanot-cv, for_you, nuit-folle (all sections always-on by the S4 rule); faunosteo 7a75974 11 rules on the user's feature branch, 31.9k → 27.2k; zenquality/game/angelscar356 merged 0ff05f1/d9be6b1/853b55b; proof per repo = the user's next session there) (after phase 0 merges; via `/onboard split`, one `chore/claude-md-split` per repo off develop, approval per repo, never an automatic merge; `/context` before/after in that repo's journal). Order by size: faunosteo 52,322 chars (on feature/v1-1-clients-animals with 5 dirty files: finish or stash first, S1 refuses otherwise), zenquality 23,378, game 14,918 (on feature/replay-hint), robin_petier 12,895, config 4,990, integration_alphalink 4,249. None has `.claude/rules/` yet; all use the `.claude/*` file form (BDR-003). Sections a sub-agent needs stay always-on unless the phase 0 sub-agent proof says path rules load there (proof 2026-10-26: they do; verify per repo).
- [x] Before faunosteo: `###` granularity shipped 2026-10-27 (feature/rules-h3-extract ab5049e: `extract '### title'`, `sections --depth 3`, split rows `### <title>`). Was: decide `###` granularity (STEP 6 review 2026-10-26). - [x] Before faunosteo: `###` granularity shipped 2026-10-27 (feature/rules-h3-extract ab5049e: `extract '### title'`, `sections --depth 3`, split rows `### <title>`). Was: decide `###` granularity (STEP 6 review 2026-10-26).
@@ -48,7 +48,7 @@ Shared rules for every phase:
- [x] **Phase 1, native context diet: no mod** (redesigned 2026-10-24, shrunk 2026-10-25: one carrier per section, existing files first) - [x] **Phase 1, native context diet: no mod** (redesigned 2026-10-24, shrunk 2026-10-25: one carrier per section, existing files first)
- Done 2026-10-29 on feature/context-diet (4bbb3c5..789a2b2): BDR-130, BDR-131, LRN-238..241, EVAL-053. `/context` 30.5k → 26.2k (own −2.8k). Verifier CONFORME 21/21, security PASS. Contract `.claude/tasks/contracts/2026-10-28-context-diet-1944.md` § PROOF. - Done 2026-10-29 on feature/context-diet (4bbb3c5..789a2b2): BDR-130, BDR-131, LRN-238..241, EVAL-053. `/context` 30.5k → 26.2k (own −2.8k). Verifier CONFORME 21/21, security PASS. Contract `.claude/tasks/contracts/2026-10-28-context-diet-1944.md` § PROOF.
- [ ] User step: delete the auto-memory leftovers by hand (`~/.claude/projects/-home-bchanot-Documents-{faunosteo,jeux-deploy,robin-petier}/memory/`); doctor warns until then. - [x] User step: delete the auto-memory leftovers by hand (done: the three dirs are gone, every `~/.claude/projects/*/memory/` empty 2026-11-02).
- [x] Remove the dead `memory: project` field from agents/analyzer.md (/hotfix 7899670, 2026-10-31). - [x] Remove the dead `memory: project` field from agents/analyzer.md (/hotfix 7899670, 2026-10-31).
- [ ] Deferred (gate 2026-10-29): "Skill routing" lines → our skills' `description:` (phase 3 bullet said phase 1 cleanup). - [ ] Deferred (gate 2026-10-29): "Skill routing" lines → our skills' `description:` (phase 3 bullet said phase 1 cleanup).
- [x] Census blind spots (2026-10-31, feature/citers-blind-spots 5bd0de4 → develop 4175401, T8a-T8h): nested `lib/<dir>/x.md § Y`, templates/ and .claude/rules/ outside doctrine-citers. Measured 2026-10-31: 0 real citations in all three today (preventive). - [x] Census blind spots (2026-10-31, feature/citers-blind-spots 5bd0de4 → develop 4175401, T8a-T8h): nested `lib/<dir>/x.md § Y`, templates/ and .claude/rules/ outside doctrine-citers. Measured 2026-10-31: 0 real citations in all three today (preventive).
@@ -70,8 +70,10 @@ Shared rules for every phase:
- Proof: static glob check per moved rule + logged session; hook tests (design-toolchain-reminder one-liner, session-start graph branch); the four skills Read the lib (grep census); `/context` delta. - Proof: static glob check per moved rule + logged session; hook tests (design-toolchain-reminder one-liner, session-start graph branch); the four skills Read the lib (grep census); `/context` delta.
- Cleanup: CLAUDE.global.md loses the moved sections (one pointer line each where needed), citers patched (doctrine-citers census); BDR-031 citers. - Cleanup: CLAUDE.global.md loses the moved sections (one pointer line each where needed), citers patched (doctrine-citers census); BDR-031 citers.
- [ ] **model-router: ask before routing to Fable** (user ask 2026-11-02, after the phase 5 merge: both touch `mods/model-router/routing.json`). `/feat` on the mod: a `routing.json` key `askTier` (default `best`; `/route ask-tier on|off`) makes the router ask, once per span, BEFORE applying a route whose resolved model sits in that tier, with the reason (phase + its `about`, origin: skill row / `/route` / prompt rule / agent row) and the options `Fable` · `Opus instead (big tier)` · `stop asking this session`; no memory in `confirmed` (the existing first-use confirmation stays as is); never asks in `-p` (`askOr` already falls back to LATER). Files: mods/model-router/hooks/register.ts (+ register.test.ts), routing.json, USAGE.md (`/route` section). - [ ] **model-router: ask before routing to Fable** (in progress 2026-11-02: /feat on feature/router-ask-tier, contract `.claude/tasks/contracts/2026-11-02-router-ask-tier-1434.md`, plan r3 after 3 lenses + confirmation) (user ask 2026-11-02, after the phase 5 merge: both touch `mods/model-router/routing.json`). `/feat` on the mod: a `routing.json` key `askTier` (default `best`; `/route ask-tier on|off`) makes the router ask, once per span, BEFORE applying a route whose resolved model sits in that tier, with the reason (phase + its `about`, origin: skill row / `/route` / prompt rule / agent row) and the options `Fable` · `Opus instead (big tier)` · `stop asking this session`; no memory in `confirmed` (the existing first-use confirmation stays as is); never asks in `-p` (`askOr` already falls back to LATER). Files: mods/model-router/hooks/register.ts (+ register.test.ts), routing.json, USAGE.md (`/route` section).
- [x] **Phase 5, per-project and per-conversation profiles, native packs** (redesigned 2026-10-25, shrunk the same day; shipped 2026-11-02 on feature/phase5-profiles-packs: BDR-134, spec docs/superpowers/specs/2026-11-01-phase5-profiles-packs-design.md, contract .claude/tasks/contracts/2026-11-01-phase5-profiles-packs-1300.md; user steps left: MIGRATION "Profiles and packs (2026-11)" step 4 `.bashrc`, `/context` on full/dev/web; follow-ups: census `grep -qxF`, fragment top-level key allowlist, MIGRATION step 2 `$root` re-derivation + autostash-conflict note) - [x] **Phase 5, per-project and per-conversation profiles, native packs** (redesigned 2026-10-25, shrunk the same day; shipped 2026-11-02 on feature/phase5-profiles-packs, merged 3cc4e0d: BDR-134, contract .claude/tasks/contracts/2026-11-01-phase5-profiles-packs-1300.md; spec and plan purged at finish (BDR-065), facts in LRN-248 and the contract; gates re-run 2026-11-02: 7/7 MET)
- [ ] User steps: MIGRATION "Profiles and packs (2026-11)" step 4 `.bashrc` (source `lib/cc.sh`, drop `dtach_claude` + `alias cc`; closes the TMPDIR item of BLK-021), then `/context` under `cc t full`, `cc t dev`, `cc t web` (phase 3 decides on them).
- [ ] Follow-ups: `lib/pack-census.sh:67` `grep -qx` → `grep -qxF`; fragment top-level key allowlist in `lib/pack-census-fragments.jq` (today only `enabledPlugins` keys are compared). Done 2026-11-02: MIGRATION step 2 `$root` re-derivation + autostash-conflict note (0463583, 9cd9591).
- Facts 2026-10-24/25 (scratch projects, fresh headless sessions, canaries, run concurrently, one shared ~/.claude): `.claude/settings.local.json` `enabledPlugins` per project works both ways and concurrently; `claude --settings '<json>'` gives two SIMULTANEOUS conversations in the SAME project different plugin sets; a skills-dir plugin obeys both; plugin skills keep their short name (`ui-styling` resolves) but verify `<plugin>:<name>` too (router rows must match both); plugin agents need the `plugin:` prefix; `permissions.deny Skill(x)` does not hide a skill; `skillOverrides` does not reach plugin skills (packs hide by disabling, guide); a user-scope MCP cannot be switched off per project by settings: project MCP belongs in a pack `.mcp.json`; claude.ai connectors do not load under `-p`. - Facts 2026-10-24/25 (scratch projects, fresh headless sessions, canaries, run concurrently, one shared ~/.claude): `.claude/settings.local.json` `enabledPlugins` per project works both ways and concurrently; `claude --settings '<json>'` gives two SIMULTANEOUS conversations in the SAME project different plugin sets; a skills-dir plugin obeys both; plugin skills keep their short name (`ui-styling` resolves) but verify `<plugin>:<name>` too (router rows must match both); plugin agents need the `plugin:` prefix; `permissions.deny Skill(x)` does not hide a skill; `skillOverrides` does not reach plugin skills (packs hide by disabling, guide); a user-scope MCP cannot be switched off per project by settings: project MCP belongs in a pack `.mcp.json`; claude.ai connectors do not load under `-p`.
- User answers 2026-10-25: profile per project and per conversation, never one for all; tracked `.claude/settings.json` keeps deny/allow only, profiles go local; a project without a profile gets a proposal once, written on accept; the global mode (skills/ ↔ skills-disabled/ symlinks + user-scope plugin toggling) is DELETED; core = everything except the heavy packs (design, seo/geo, web-validate, scroll/3d, higgsfield, gstack); agents stay global; a skill needing an off pack proposes to enable it then `/reload-plugins` (spike first); all 11 profiles kept as pack compositions. - User answers 2026-10-25: profile per project and per conversation, never one for all; tracked `.claude/settings.json` keeps deny/allow only, profiles go local; a project without a profile gets a proposal once, written on accept; the global mode (skills/ ↔ skills-disabled/ symlinks + user-scope plugin toggling) is DELETED; core = everything except the heavy packs (design, seo/geo, web-validate, scroll/3d, higgsfield, gstack); agents stay global; a skill needing an off pack proposes to enable it then `/reload-plugins` (spike first); all 11 profiles kept as pack compositions.
- Packs: each heavy group becomes a skills-dir plugin `skills/pack-<name>/` (`.claude-plugin/plugin.json` + `skills/<skill>/SKILL.md`, + `.mcp.json` for higgsfield, + hooks if any). Spike first: nested skills load once as plugin skills; gstack (external installer, symlinks) as a pack. - Packs: each heavy group becomes a skills-dir plugin `skills/pack-<name>/` (`.claude-plugin/plugin.json` + `skills/<skill>/SKILL.md`, + `.mcp.json` for higgsfield, + hooks if any). Spike first: nested skills load once as plugin skills; gstack (external installer, symlinks) as a pack.
@@ -113,9 +115,9 @@ Shared rules for every phase:
### Actionable ### Actionable
- [ ] deferred (BDR-123): remap inline-writing best-tier skills (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /audit-delta 3d, /harden STEP 3); stale citers skills/feat/SKILL.md:6, skills/code-clean/SKILL.md:36; + impeccable row in routing.json (design Build stack has none; frontend-design has `reflect`; census test pins the table) - [ ] deferred (BDR-123): remap inline-writing best-tier skills (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /audit-delta 3d, /harden STEP 3); stale citers skills/feat/SKILL.md:6, skills/code-clean/SKILL.md:36; + impeccable row in routing.json (design Build stack has none; frontend-design has `reflect`; census test pins the table)
- [ ] parked (GATE 2 LOW, 5a98c2c): probe table names not checked with `IDENT.fullmatch` per table (a `/` walks a path on the approved Supabase host); `printable` lets Unicode bidi/format controls (U+202E, U+2066…) through to the tty - [ ] parked (GATE 2 LOW, 5a98c2c): probe table names not checked with `IDENT.fullmatch` per table (a `/` walks a path on the approved Supabase host); `printable` lets Unicode bidi/format controls (U+202E, U+2066…) through to the tty
- [ ] profile name charset check (LOW, security gate): `^[A-Za-z0-9_-]+$` on the cached profile / `<prof>` argument before it becomes a path in `read_profile()` (lib/profile.sh:154-156) and install Step 11 - [x] profile name charset check (done by phase 5: `NAME_RE='^[a-z0-9][a-z0-9-]*$'` lib/profile.sh:63 on every profile and session name; the old `read_profile()` is gone)
- [ ] P22 `make new-skill` scaffold: agent stub lacks `effort:` pin, skill stub lacks entry level, body loads `.claude/agents/$(name).md` instead of `$HOME/.claude/agents/<name>.md` → /hotfix; also: no routing.json row reminder - [ ] P22 `make new-skill` scaffold: agent stub lacks `effort:` pin, skill stub lacks entry level, body loads `.claude/agents/$(name).md` instead of `$HOME/.claude/agents/<name>.md` → /hotfix; also: no routing.json row reminder
- [ ] `lib/tests/design-tool-gate.test.sh` reds on any machine with the 21st CLI installed ("FAIL precondition: system-wide 21st present, CLI_ABSENT case not hermetic") — pre-existing on develop (fa67664), independent of the diff. Make the CLI_ABSENT case hermetic (PATH shim / stubbed probe) so `make test` is green on a design-profile machine. Until then full-suite oracles (`make test` exit 0) cannot be MET here. - [x] `lib/tests/design-tool-gate.test.sh` hermetic CLI_ABSENT case (done by the phase 5 rewrite: suite green 2026-11-02 with `~/.local/bin/21st` installed, `make test` all suites green on this machine)
- [ ] post-run-D residuals (gates, 2026-10-07): settings.json soft_deny names only `gitflow.autopush false` → add "or an unparseable value" (restriction only, settings run); capitalize STEP 6: manual mode with `ahead` = 0 (user pushed by hand between merge and read) matches no closing line, and the 5C `ahead` = 0 bullet still says "(auto-push mode did it)"; release-executor:86 line > 80 cols; push-guard header line 4 > 80 cols (pre-existing); unpushed-guard Stop silence now also covers a missing lib (SessionStart names it) — accepted - [ ] post-run-D residuals (gates, 2026-10-07): settings.json soft_deny names only `gitflow.autopush false` → add "or an unparseable value" (restriction only, settings run); capitalize STEP 6: manual mode with `ahead` = 0 (user pushed by hand between merge and read) matches no closing line, and the 5C `ahead` = 0 bullet still says "(auto-push mode did it)"; release-executor:86 line > 80 cols; push-guard header line 4 > 80 cols (pre-existing); unpushed-guard Stop silence now also covers a missing lib (SessionStart names it) — accepted
- [ ] gitflow LOW leftovers (run B, rest done in run D 472cccb): `--end-of-options`/`--` on refname args and `printf %q` in copy-paste hints; `gitflow_delete`: check `_gitflow_checkout_containing_base` rc (lib/gitflow.sh:270) before `--unset-upstream` - [ ] gitflow LOW leftovers (run B, rest done in run D 472cccb): `--end-of-options`/`--` on refname args and `printf %q` in copy-paste hints; `gitflow_delete`: check `_gitflow_checkout_containing_base` rc (lib/gitflow.sh:270) before `--unset-upstream`
@@ -143,7 +145,7 @@ Shared rules for every phase:
### Blocked ### Blocked
- [ ] G2 `hooks/guard-bash.sh` (BLK-022, safety classifier withheld the body): PreToolUse Bash, exit 2 + reason, `logger` trace, fail-closed without jq; spec `lib/tests/guard-bash.test.sh` (214 cases) SKIPs until it exists - [ ] G2 `hooks/guard-bash.sh` (BLK-022, safety classifier withheld the body): PreToolUse Bash, exit 2 + reason, `logger` trace, fail-closed without jq; spec `lib/tests/guard-bash.test.sh` (214 cases) SKIPs until it exists
- [ ] launch claude with `TMPDIR=$HOME/.cache/claude-tmp` in `dtach_claude()` (~/.bashrc), user side (BLK-021) - [x] launch claude with `TMPDIR=$HOME/.cache/claude-tmp` (BLK-021 resolved by `lib/cc.sh`, phase 5; the remaining user step is the `.bashrc` swap listed under phase 5)
### Model-router live checks (opportunistic, need a real session or incident) ### Model-router live checks (opportunistic, need a real session or incident)
- [ ] LIVE CHECK after `/reload-plugins`: best-tier phase w/ Fable out of credits → `/route show` lists fable down (probe), main on opus, effort bumped. - [ ] LIVE CHECK after `/reload-plugins`: best-tier phase w/ Fable out of credits → `/route show` lists fable down (probe), main on opus, effort bumped.