From d2e5f195484e11308f2c4c79a3483c993804ff4a Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 13 Nov 2026 11:41:16 +0100 Subject: [PATCH] chore(memory): BDR-149, LRN-284, block E ticked, gates.sh label guard TODO --- .claude/memory/decisions.md | 8 ++++++++ .claude/memory/journal.md | 1 + .claude/memory/learnings.md | 5 +++++ .claude/tasks/TODO.md | 7 ++++--- .../2026-11-13-skill-routing-descriptions-0120.md | 13 +++++++------ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index 4c48cd8..17688fe 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -1576,3 +1576,11 @@ Supersedes [[BDR-030]]. - **Alternatives rejected**: narrow the hook's signals (still 0 Reads measured, nothing proves a narrower set reads); keep as log-only (user data log `~/.claude/logs/design-toolchain-fires.log` left in place, no new writes). - **Heading pin**: only the "Design work" prefix stays pinned (CLAUDE.global.md citer, doctrine-citers census row `rules/web-building.md:Design work`, `_citers_resolve` prefix match). Full heading "Design work — full toolchain" has no citer left; T7c (real hook fixture) → T8i synthetic one-line fixture, quoted label kept whole. - **Supersedes / amends**: BDR-125 Amendment 7 "hook one-liner" carrier clause; BDR-130 "hook one-liner says Read it" + "hook = pointer"; BDR-098 "design hook needs the section in context" + hook heading-match reference; BDR-021 Durability "design-toolchain-reminder.sh quotes it". Hand-off: open sessions log a non-blocking hook error per prompt until restarted. + +## BDR-149 — Skill routing section = gstack/pack cases only; our skills route by description (BDR-130 Deferred + BDR-125 phase 3 done) [accepted] (2026-11-13) +- **Context**: block E2 (user 2026-11-12 "lignes « Skill routing » → description: des skills"), BDR-130 Deferred + BDR-125 phase 3 bullet. feature/skill-routing-descriptions 3b30153. +- **Decision**: CLAUDE.global.md § Skill routing keeps only what no description can carry: gstack counterweight (investigate on explicit ask only, bugs → bugfix; gstack ship retired BDR-105, ship/PR → ship-feature, deploy → deploy), document-release/doc fallback, Design pointer, plan-eng-review, superpowers aliases, pack-aware SEO/GEO/W3C line (`profile.sh enable seo|web-validate` + `/reload-plugins`), cso, media pack, OFF paragraph covering every pack. Dropped: file-count split, tour, reconcile, capitalize/close (descriptions already say it). bugfix triggers += "error", "500", "stack trace + fix"; ship-feature += "ship this feature". 311 → 306 lines. +- **Why**: skills route by description (listing always loaded); a doctrine line duplicating a description = always-on cost, zero routing gain. gstack injects its own "Bugs → /investigate" routing: the counterweight line must stay always-on (robustness challenge, 3 lenses r2). +- **Alternatives rejected**: drop every routing line (loses the gstack counterweight + pack-off remedy); "never gstack ship" text in ship-feature description (ship retired from every pack, lib/gstack-removed.list: dead text); trigger "open a PR" (no skill opens a PR). +- **Accepted**: description triggers not pinned by a test (darwin rewrite risk, MINOR); listing budget +~60 chars. +- **Amends**: BDR-130 Deferred item done; BDR-125 phase 3 "Skill routing table lines → descriptions" done. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index afa56cc..537daef 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -735,3 +735,4 @@ rules: ## 2026-11-13 - 2026-11-13: /hotfix blk022-burial (block E4): lib/tests/guard-bash.test.sh (SKIP-only, 214 cases) + 2 census ALLOW rows deleted; BLK-022 superseded by BDR-125 phase 2 (static rules + routing guard); security PASS (LOW: no executable destructive-command suite left, accepted). - /feat design-hook-removal (block E1): hooks/design-toolchain-reminder.sh + test + UserPromptSubmit entry deleted (9c038fd), T7c → T8i synthetic fixture, docs 19ec5b7 (CHANGELOG Removed wording = doc-syncer draft, user asked no mid-run questions). BDR-148. Gates 0 MET / 1 four oracles MET / 2 PASS, make test all green. Open sessions log one non-blocking hook error per prompt until restart. +- /feat skill-routing-descriptions (block E2): CLAUDE.global.md § Skill routing 311 → 306 lines, 6 lines dropped into bugfix/ship-feature descriptions (3b30153, docs 88b67ab). Feater died mid-run (API 403 Cloudflare) after the 3 edits: gates proved the diff, no re-dispatch. Verifier caught a contract ledger bug: 1b. row absorbed by gates.sh → LRN-284, row renumbered 6. BDR-149. diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index 0438ae1..c07028e 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -2067,3 +2067,8 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s - **Pattern**: `git log --since=YYYY-MM-DD` reads bare date at CURRENT time of day: same-day commits earlier than now drop out. Use `--since="YYYY-MM-DD 00:00"`, or no window when an idempotence token in the subject does the job. - **Context**: /feat recall-gate1-fixes 2026-11-12 confirmation challenger: `git log --since=2026-11-12` at 19:01 returned nothing despite commits at 18:44. - **Apply**: any skill/test filtering commits by a FEEDBACK/report date; pin time explicitly. + +## LRN-284 — gates.sh criterion labels: integers only; a 1b. row clobbers the previous criterion's oracle (false MET) (2026-11-13) +- **Context**: E2 contract 2026-11-13 wrote a criterion `1b.`; `gates.sh run` printed VERDICT MET; fresh verifier found criterion 1 EVIDENCE still PENDING. +- **Pattern**: `lib/gates.sh` `_absorb` recognizes a criterion only as `^([0-9]+)\.` (gates.sh:88). A `1b.`/`2a.` row = continuation of the previous criterion: its CHECK/EXPECT overwrite that criterion's own (`_set_attr`, :71-79), its EVIDENCE lands on the wrong line. Result = false MET by ledger clobbering, the real oracle of criterion 1 never runs. +- **Apply**: contract criteria = integer labels only; a sub-case gets the next integer (`6.`), never a letter suffix. Verifier re-running every CHECK by hand caught it: keep that habit. Candidate fix (TODO): gates.sh warns on `^[0-9]+[a-z]\.` rows. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 0f0be02..d90333c 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -5,12 +5,12 @@ Done history before 2026-10-08 removed 2026-10-23 (git keeps it: `git log -p -- ### BDR-125 close-out run (user 2026-11-12): no phase 0/0b/4a/1/5/2/4b/4c/4d line left in TODO or BUGS-FOUND Decisions at start (asked once): faunosteo memory v2 on `chore/memory-v2` off develop in a fresh worktree (split already on develop 7a75974, 11 rules); settings.json `npm -g` deny lines removed on the block E branch, classifier test = `npm install -g --dry-run cowsay`; 3.0.0 cut right after block A (/release-candidate), later blocks land under the next Unreleased; LRN-270 bisect = user-run interactive sessions, one `--settings` file per pack. Merge prompts (`gitflow finish` ask) = the human signal per block once gates are green. -- [ ] A merge chore/memory-feedback-gate1 (b7505d1 + routing `confirmed` row) into develop -- [ ] A' /release-candidate 3.0.0 (scope as ticked 2026-11-11) +- [x] A merged 1b82a25 (routing `confirmed` row a2f352e) +- [x] A' 3.0.0 cut: main 2480be6, develop 8cf91e9, tag v3.0.0 pushed - [x] B chore/phase4-proofs (journal 2026-11-12): known-error replay → `memory: known BLK-013` + tool record; redaction proven (0 raw hits); /context full 27.1k / dev 25.2k; digest-after-compaction waits for this run's first auto-compact (no compaction in retained transcripts) - [x] C /feat gate 1 (feature/recall-gate1-fixes 7e87d77 + 39f9790, BDR-146): idle ≥ 8 words, cap 2, body was already indexed (replay: BM25 13-38 ms; p90 3355 ms is the haiku rerank) → no-overlap misses accepted; 4d.4 built - [x] D D1b (BDR-147, feature/digest-todo-fallback merged): digest Actionable ##/### else first 3 + overflow marker, seeds emit `## Actionable`, Session start reads no TODO; 6 repos migrated insert-only on `chore/todo-actionable`, merged on ask (robin_petier 7f87947, config, integration_alphalink, zenquality, game, faunosteo via scratch worktrees); faunosteo stale worktree entries pruned (dirs already gone) -- [ ] E phase 1 + 2 decisions: design hook DELETED (web-building.md loads by path); "Skill routing" lines → skills' `description:`; `npm -g` deny lines out + dry-run test; rtk `cat|head|tail *.env*` forms benched, every form kept without proof of obsolescence, T42 list updated; BLK-022 buried (phase 2 covers it): guard-bash.test.sh SKIP spec deleted, BLK-022 → superseded, TODO "Blocked" block removed +- [x] E (2026-11-13): E1 design hook deleted, BDR-148 (9c038fd, T7c → T8i); E2 Skill routing 311 → 306 lines, bugfix/ship-feature triggers, BDR-149 (3b30153); E4 BLK-022 buried (ce62d2b); rtk `cat|head|tail *.env*` forms benched: `rtk cat|head|tail --help` = coreutils pass-through (rtk 0.50.0), all 6 forms live and kept, T42 list unchanged; E3 `npm -g` 4 deny lines NOT removed: sub-agent dispatch refused by the auto-mode classifier (Undermining Oversight), branch bugfix/npm-global-deny empty, patch handed to the user in the run report (user hand edit, as before the run) - [ ] F faunosteo `chore/memory-v2`: `memory.sh upgrade`, `/context` before/after, /prune-memory there for BDR-080 (noisy) + LRN-080 (promotion); never merged by me - [ ] G BLK-044: trace `oom_score_adj` origin (unit, cc.sh), `OOMScoreAdjust` on the `cc` scope, proof via `/proc//oom_score_adj` - [ ] H residuals in order: phase 0 (project-rules.sh emit/extract/`..`), 4a (BLK-038, MIGRATION.md:209), 5 (fragment key allowlist), 2 LOWs (awk, `mkdir -m 700`, `cat x.key`, doctor.sh:255), 4d follow-ups (transcripts per (root, session, agent), image prompts, threshold boundary tests, `tsc`, `l:` one global key), BUGS-FOUND unfixed since 11-09, LRN-270 bisect (user-run), doctor skillOverrides residue; a residual NOT done = justified in the TODO line removal @@ -85,6 +85,7 @@ Open children of the shipped phases (History 2026-11-12), text verbatim. - [ ] feature (G2 split, user 2026-11-10): measured passive-cost API, one source for doctor / /status / plugin-advisor (probe COSTS field). Spec input = the two challenge rounds in the G2 plan: unit = pack or ON plugin (skills + agents + commands descriptions; pr-review-toolkit ~1550t, example-skills ~2350t), doctor counts OFF packs (higgsfield, extras), `detect_plugin_dev` globs the wrong cache level and ignores enabled state, `?` for not-installed or empty units, rc-0 sentinels (`costs-unavailable`/`unknown`) for doctor's `set -euo pipefail`, profile.sh failure → unknown, `python3 -I` (probe runs in the user's project), installPath from installed_plugins.json. Doctor keeps its measured ui-ux 670 until then. - [x] D3 add-ons (done 9b12b12) from G2 (plugin-advisor.md): plan-budget WARN :317 (unreachable: plugin-gate never sends PLAN, detect_plan gone), :42 "absolute COST ESTIMATE still reported", :105 `(budget: ~t | n/a)`, :222 "passive cost estimate = highest-cost package profile", "0t passive" claims for impeccable / design-motion-principles (:226 :227 :268 :269); USAGE.md :248 "Budget Pro (~11k tokens/5h)", :494 `(~400t)`, :923 `(~200t)`; session-banner.test.sh SB10 `gone()` passes on a missing file (add an existence check) - [x] D6 project rule (done c69ce9c; lead paragraph fixed too, follow-ups in BUGS-FOUND): .claude/rules/graphify-vendored.md says `graphify install --platform claude` "touches nothing else", but graphifyy 0.9.67 appends a `# graphify` block to ~/.claude/CLAUDE.md (= CLAUDE.global.md); `graphify claude install` writes into the caller's cwd, so the install-plugins.sh trap protects $REPO only when run from $REPO +- [ ] gates.sh: warn or reject a criterion row labelled `^[0-9]+[a-z]\.` (LRN-284: `1b.` absorbed into criterion 1, its CHECK/EXPECT overwritten, false MET) - [ ] parked (code-clean 2026-11-09): hooks/rtk-rewrite.sh:84 no-op `[ "$CMD" = "$REWRITTEN" ] && REWRITTEN="$CMD"`: remove with the next real rtk-hook edit, re-pin `hooks/.rtk-hook.sha256` + rtk-rewrite.test.sh T13 in the same step - [ ] 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 diff --git a/.claude/tasks/contracts/2026-11-13-skill-routing-descriptions-0120.md b/.claude/tasks/contracts/2026-11-13-skill-routing-descriptions-0120.md index 46c5745..5c1ab95 100644 --- a/.claude/tasks/contracts/2026-11-13-skill-routing-descriptions-0120.md +++ b/.claude/tasks/contracts/2026-11-13-skill-routing-descriptions-0120.md @@ -15,24 +15,25 @@ E2 (user decision 2026-11-12, block E: "lignes « Skill routing » → `descript 1. Dropped lines gone from CLAUDE.global.md (r3 text is final); the two kept lines present; line count lower than develop's. CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c 'gstack investigate only on explicit ask\|W3C + WCAG → web-validate' CLAUDE.global.md)$( [ $(wc -l < CLAUDE.global.md) -lt $(git show develop:CLAUDE.global.md | wc -l) ] && echo LT) EXPECT: 2LT - EVIDENCE: PENDING -1b. Dropped lines absent. + EVIDENCE: MET exit=0 marker-found :: 2LT +6. Dropped lines absent (was 1b: gates.sh accepts integer labels only). CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c 'distinguished by file count\|Grouped all-axes sweep\|Open-work inventory\|Before /clear or /compact\|Bug / error / 500' CLAUDE.global.md) EXPECT: 0 - EVIDENCE: PENDING + EVIDENCE: MET exit=0 marker-found :: 0 2. bugfix and ship-feature descriptions gain the r3 triggers. CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c '"stack trace + fix"' skills/bugfix/SKILL.md)$(grep -c '"ship this feature"' skills/ship-feature/SKILL.md) EXPECT: 11 - EVIDENCE: PENDING + EVIDENCE: MET exit=0 marker-found :: 11 3. Census + skill frontmatter suites green. CHECK: cd /home/bchanot/Documents/claude && bash lib/tests/doctrine-citers.test.sh 2>&1 | tail -1 EXPECT: FAIL=0 - EVIDENCE: PENDING + EVIDENCE: MET exit=0 marker-found :: PASS=23 FAIL=0 4. make test green (manual, bun on PATH); skill-routing-census no new WARN/FAIL. + (manual: run 2026-11-13 on the feater diff, `PATH=$HOME/.bun/bin:$PATH make test` → "SUITE: all GREEN / all suites green", rc=0; skill-routing-census PASS=6 FAIL=0, WARN count 136 = E1 baseline) 5. Both frontmatters parse as YAML. CHECK: cd /home/bchanot/Documents/claude && python3 -I -c 'import yaml,sys; [yaml.safe_load(open(f).read().split("---")[1]) for f in sys.argv[1:]]; print("YAML-OK")' skills/bugfix/SKILL.md skills/ship-feature/SKILL.md EXPECT: YAML-OK - EVIDENCE: PENDING + EVIDENCE: MET exit=0 marker-found :: YAML-OK ## FILE SCOPE CLAUDE.global.md (§ Skill routing), skills/bugfix/SKILL.md (frontmatter), skills/ship-feature/SKILL.md (frontmatter). README/USAGE routing mirrors → STEP 6 doc sync.