diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 143faed..4c8d97d 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -749,3 +749,6 @@ rules: - /bugfix feedback-followups (block H5, 4d follow-ups): post-fix split + 3rd pick retired + one-slot transcript cache + strict labels/state + key-set pins (9f9412a, docs). 3 challenge lenses FATAL on r1 (midnight cutoff, validator rejecting own rows, text-block extraction losing every join); 3 executor rounds (locals, at bound, legacy closed flag). RSS 279.8 → 267.7 MB on 16 records. tsc not done (no compiler, new dep), l: kept (49.7 KB of 4 MiB), image prompts dropped (0 instances). LRN-288. - /bugfix bugs-found-prose (block H6a): 10 prose BUGS-FOUND items closed (77041e5): handover rooting + PROJECT_ROOT line + BDR status filter, plugin-gate quoting/unsafe-root/common-dir/$HOME (+ profile.sh refusal T27), advisor rules, packs vocabulary, graphify labels. 4 rounds; GATE 2 MEDIUM single-quote break-out closed by the unsafe-root rule. D1b and dead-entry items closed; 5 pre-existing findings logged. LRN-154 corrected. - /bugfix bugs-found-scripts (block H6b): 7 BUGS-FOUND script items closed (9045a60): profile-state.jq clean + plugin id shape, digest open none/unknown (+ doctrine line), deny_lost PIPESTATUS, T63 ask/deny split, T7 lock, mktemp guard. Verifier ECARTS(1) (profile.test.sh:123 comment broke shellcheck) → r2 CONFORME, security PASS. Docs 599684c, audits 7c8726b. 3 new LOW in BUGS-FOUND (memory_index rc 0 on unreadable registry). + +## 2026-11-14 +- /hotfix doctor-skilloverrides-residue (block H7): doctor residue check compares {enabledPlugins, skillOverrides} HEAD vs work (9c9a024); doc audit caught MIGRATION step 1 restoring enabledPlugins only → extended to both keys (8dcee03). Security PASS, 1 LOW (echo -e escapes) in BUGS-FOUND. H + I TODO lines closed; LRN-270 bisect files moved to plans/2026-11-14-lrn270-bisect/ for the user. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 7f72967..d703d48 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -13,8 +13,8 @@ Decisions at start (asked once): faunosteo memory v2 on `chore/memory-v2` off de - [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 - [x] G (2026-11-13): BLK-044 resolved, origin = sshd drop-in OOMScoreAdjust=-1000 inherited; lib/cc.sh raises oom_score_adj to 500 raise-only (6c10d3a, T7-oom, LRN-285); live proof `/proc//oom_score_adj` = 500 needs a fresh `cc` session (user, this session predates the fix) -- [ ] 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 -- [ ] I model-router live checks: W4-B AC9 + parentModel done from transcripts/logs; Fable-out-of-credits + StopFailure closed "not reproducible, reopen on incident" +- [x] H (2026-11-13/14): H1 project-rules 9d5530a, H2 memory.sh d8e62c1 (BLK-038 resolved), H3 pack-census 2fb9a2f, H4a deny rows a43ba1b, H4b safety LOWs 1f107c3, H5 feedback 9f9412a (not done, justified: tsc = no compiler, `l:` 1.2 % of cap, image prompts 0 instances), H6a prose 77041e5, H6b scripts 9045a60, H7 doctor skillOverrides 9c9a024. BLK-049 strict types 08308a6; Fable 5.2 ca1dc9f. LRN-270 bisect handed to user (files in plans/2026-11-14-lrn270-bisect/). New pre-existing LOWs in BUGS-FOUND (not BDR-125). +- [x] I (2026-11-14, from 240 subagent meta files): pins hold (sonnet executors, fable verifier/security 5.1→5.2, opus analyzer); parentModel = not in logs (meta has model + pickedEffortModel only), no unpinned spawn in a demoted turn → not reproducible from logs, reopen when one runs; W4-B AC9 = user step (`/route verbose on`, classifier line is UI-only); Fable-out-of-credits + StopFailure closed "not reproducible, reopen on incident". - [ ] J /reconcile, CHANGELOG (gate 1 at 57 % delivered + each block), 0 BDR-125 line left, EVAL of the run, /close ### Context mod queue (BDR-125): one /ship-feature per phase, order (user 2026-10-25): 0 → 4a → 1 → 5 → 2 → 3 (conditional) → 4b-4d @@ -60,8 +60,8 @@ Open children of the shipped phases (History 2026-11-12), text verbatim. - Phase 2 leftovers: security-gate LOWs done 2026-11-13 (block H4a, bugfix/phase2-deny-lows a43ba1b: awk `system (`/`-f`/`getline`/`| "` + gawk/mawk, `.key`/`.pem`/`id_rsa`/`id_ed25519` root forms + rtk twins, doctor.sh:255 message). The "stated residuals" line (Bash write forms outside the routing guard, latch reset on reload, `.claude/worktrees/` writes, state dirs in TMPDIR, `| bash -s` / sourced `gitflow_finish` / `git -C merge` = soft_deny prose) names ACCEPTED limits of BDR-125 phase 2 (Amendment 7: interpreters and Bash write forms are classifier territory, no static rule), not tasks: removed. rtk `cat|head|tail *.env*` forms: benched 2026-11-13 (`rtk cat|head|tail --help` = coreutils pass-through on rtk 0.50.0), all six kept, T42 untouched. Remaining phase 2 items (code-limits `mkdir -m 700` + owner check, pre-commit allowlist fail-closed, session-start timeout fallback, `_mem_path_safe` wrap) → block H4b. - [x] push-guard T63 split per kind (9045a60, H6b): 16 ask rows checked in .permissions.ask, 37 deny rows in .permissions.deny; demotion flip red. - Context measure leftovers (2026-11-09, LRN-270): - - [ ] Open: dev System tools 11.3k vs full 7.7k (interactive) comes from some pack being off, not MCP; unattributable via `/context`. Bisect by toggling one pack at a time interactively if it matters. - - [ ] Follow-up candidate (accepted risk): doctor residue check covers `enabledPlugins` only; a UI write into user-scope `skillOverrides` would dirty tracked settings.json unseen. + - [x] dev System tools 11.3k vs full 7.7k: bisect handed to user (user rule 2026-11-12, interactive only): 7 files `.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+.json`, run `claude --settings ` then `/context`, compare System tools; a pack worth >1k → new TODO line. Not Claude-runnable (headless defers built-ins, LRN-270). + - [x] doctor residue check covers enabledPlugins + skillOverrides (9c9a024, H7). ### Actionable - [x] BDR-125 obsolescence pass (2026-11-09, /code-clean merged db5bbe5; report `.claude/tasks/plans/2026-11-09-bdr125-obsolescence-clean-1650.md`): D1-D6, G1-G5 and the D3 add-ons done and merged by 2026-11-12; still open below: D1b and the G2 measured passive-cost feature. diff --git a/.claude/tasks/contracts/2026-11-14-doctor-skilloverrides-residue-0010.md b/.claude/tasks/contracts/2026-11-14-doctor-skilloverrides-residue-0010.md new file mode 100644 index 0000000..65ba070 --- /dev/null +++ b/.claude/tasks/contracts/2026-11-14-doctor-skilloverrides-residue-0010.md @@ -0,0 +1,27 @@ +# CONTRACT — doctor-skilloverrides-residue (block H7) +- date: 2026-11-14 | flow: hotfix | branch: bugfix/doctor-skilloverrides-residue (off develop) +- status: active + +## REQUEST (verbatim — IMMUTABLE) +doctor.sh skillOverrides residue (block H7, TODO H line "doctor skillOverrides residue" + TODO:64 follow-up candidate): doctor.sh:145-152 user-scope residue check compares only `jq -S .enabledPlugins` HEAD vs working settings.json; a UI write into user-scope `skillOverrides` dirties tracked settings.json unseen. Fix: compare `jq -S '{enabledPlugins, skillOverrides}'` on both sides (HEAD and work), pass/skip/warn messages name both keys. 1 file, doctor.sh only. + +## CLARIFICATIONS +- [gated 2026-11-14] challenge step skipped: diagnostic-only warn, one jq filter widened on both sides, no control-flow change. + +## ACCEPTANCE CRITERIA +1. Both sides read the two keys; no `.enabledPlugins`-only filter left in the check. + CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c "jq -S '{enabledPlugins, skillOverrides}'" doctor.sh)$(grep -c 'jq -S .enabledPlugins' doctor.sh) + EXPECT: 20 + EVIDENCE: MET exit=0 marker-found :: 20 +2. Messages name both keys. + CHECK: cd /home/bchanot/Documents/claude && grep -c 'enabledPlugins and skillOverrides\|enabledPlugins/skillOverrides' doctor.sh | grep -c '^[2-9]' + EXPECT: 1 + EVIDENCE: MET exit=0 marker-found :: 1 +3. shellcheck clean on doctor.sh. + CHECK: cd /home/bchanot/Documents/claude && shellcheck -x doctor.sh && echo SC-OK + EXPECT: SC-OK + EVIDENCE: MET exit=0 marker-found :: SC-OK +4. make doctor prints the pass line on the clean tree; make test green (manual, bun on PATH). + +## FILE SCOPE +doctor.sh (:145-152). TODO lines → STEP 6. diff --git a/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-design.json b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-design.json new file mode 100644 index 0000000..bb25439 --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-design.json @@ -0,0 +1,19 @@ +{ + "enabledPlugins": { + "model-router@skills-dir": true, + "pack-design@skills-dir": true, + "pack-scroll3d@skills-dir": false, + "pack-seo@skills-dir": false, + "pack-web-validate@skills-dir": false, + "pack-gstack-dev@skills-dir": true, + "pack-gstack-browser@skills-dir": false, + "pack-gstack-design@skills-dir": false, + "pack-higgsfield@skills-dir": false, + "pack-extras@skills-dir": false, + "ui-ux-pro-max@ui-ux-pro-max-skill": false, + "security-guidance@claude-code-plugins": true, + "pr-review-toolkit@claude-code-plugins": false, + "example-skills@anthropic-agent-skills": false, + "brightdata-plugin@synced": false + } +} diff --git a/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-gstack-browser.json b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-gstack-browser.json new file mode 100644 index 0000000..edb5d8b --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-gstack-browser.json @@ -0,0 +1,19 @@ +{ + "enabledPlugins": { + "model-router@skills-dir": true, + "pack-design@skills-dir": false, + "pack-scroll3d@skills-dir": false, + "pack-seo@skills-dir": false, + "pack-web-validate@skills-dir": false, + "pack-gstack-dev@skills-dir": true, + "pack-gstack-browser@skills-dir": true, + "pack-gstack-design@skills-dir": false, + "pack-higgsfield@skills-dir": false, + "pack-extras@skills-dir": false, + "ui-ux-pro-max@ui-ux-pro-max-skill": false, + "security-guidance@claude-code-plugins": true, + "pr-review-toolkit@claude-code-plugins": false, + "example-skills@anthropic-agent-skills": false, + "brightdata-plugin@synced": false + } +} diff --git a/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-gstack-design.json b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-gstack-design.json new file mode 100644 index 0000000..ca6111b --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-gstack-design.json @@ -0,0 +1,19 @@ +{ + "enabledPlugins": { + "model-router@skills-dir": true, + "pack-design@skills-dir": false, + "pack-scroll3d@skills-dir": false, + "pack-seo@skills-dir": false, + "pack-web-validate@skills-dir": false, + "pack-gstack-dev@skills-dir": true, + "pack-gstack-browser@skills-dir": false, + "pack-gstack-design@skills-dir": true, + "pack-higgsfield@skills-dir": false, + "pack-extras@skills-dir": false, + "ui-ux-pro-max@ui-ux-pro-max-skill": false, + "security-guidance@claude-code-plugins": true, + "pr-review-toolkit@claude-code-plugins": false, + "example-skills@anthropic-agent-skills": false, + "brightdata-plugin@synced": false + } +} diff --git a/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-scroll3d.json b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-scroll3d.json new file mode 100644 index 0000000..b64b353 --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-scroll3d.json @@ -0,0 +1,19 @@ +{ + "enabledPlugins": { + "model-router@skills-dir": true, + "pack-design@skills-dir": false, + "pack-scroll3d@skills-dir": true, + "pack-seo@skills-dir": false, + "pack-web-validate@skills-dir": false, + "pack-gstack-dev@skills-dir": true, + "pack-gstack-browser@skills-dir": false, + "pack-gstack-design@skills-dir": false, + "pack-higgsfield@skills-dir": false, + "pack-extras@skills-dir": false, + "ui-ux-pro-max@ui-ux-pro-max-skill": false, + "security-guidance@claude-code-plugins": true, + "pr-review-toolkit@claude-code-plugins": false, + "example-skills@anthropic-agent-skills": false, + "brightdata-plugin@synced": false + } +} diff --git a/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-seo.json b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-seo.json new file mode 100644 index 0000000..71c402b --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-seo.json @@ -0,0 +1,19 @@ +{ + "enabledPlugins": { + "model-router@skills-dir": true, + "pack-design@skills-dir": false, + "pack-scroll3d@skills-dir": false, + "pack-seo@skills-dir": true, + "pack-web-validate@skills-dir": false, + "pack-gstack-dev@skills-dir": true, + "pack-gstack-browser@skills-dir": false, + "pack-gstack-design@skills-dir": false, + "pack-higgsfield@skills-dir": false, + "pack-extras@skills-dir": false, + "ui-ux-pro-max@ui-ux-pro-max-skill": false, + "security-guidance@claude-code-plugins": true, + "pr-review-toolkit@claude-code-plugins": false, + "example-skills@anthropic-agent-skills": false, + "brightdata-plugin@synced": false + } +} diff --git a/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-web-validate.json b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-web-validate.json new file mode 100644 index 0000000..77d96e6 --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+pack-web-validate.json @@ -0,0 +1,19 @@ +{ + "enabledPlugins": { + "model-router@skills-dir": true, + "pack-design@skills-dir": false, + "pack-scroll3d@skills-dir": false, + "pack-seo@skills-dir": false, + "pack-web-validate@skills-dir": true, + "pack-gstack-dev@skills-dir": true, + "pack-gstack-browser@skills-dir": false, + "pack-gstack-design@skills-dir": false, + "pack-higgsfield@skills-dir": false, + "pack-extras@skills-dir": false, + "ui-ux-pro-max@ui-ux-pro-max-skill": false, + "security-guidance@claude-code-plugins": true, + "pr-review-toolkit@claude-code-plugins": false, + "example-skills@anthropic-agent-skills": false, + "brightdata-plugin@synced": false + } +} diff --git a/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+ui-ux-pro-max.json b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+ui-ux-pro-max.json new file mode 100644 index 0000000..59443dc --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-lrn270-bisect/dev+ui-ux-pro-max.json @@ -0,0 +1,19 @@ +{ + "enabledPlugins": { + "model-router@skills-dir": true, + "pack-design@skills-dir": false, + "pack-scroll3d@skills-dir": false, + "pack-seo@skills-dir": false, + "pack-web-validate@skills-dir": false, + "pack-gstack-dev@skills-dir": true, + "pack-gstack-browser@skills-dir": false, + "pack-gstack-design@skills-dir": false, + "pack-higgsfield@skills-dir": false, + "pack-extras@skills-dir": false, + "ui-ux-pro-max@ui-ux-pro-max-skill": true, + "security-guidance@claude-code-plugins": true, + "pr-review-toolkit@claude-code-plugins": false, + "example-skills@anthropic-agent-skills": false, + "brightdata-plugin@synced": false + } +} diff --git a/.claude/tasks/plans/2026-11-14-perl-timeout-group-0030.md b/.claude/tasks/plans/2026-11-14-perl-timeout-group-0030.md new file mode 100644 index 0000000..0e20555 --- /dev/null +++ b/.claude/tasks/plans/2026-11-14-perl-timeout-group-0030.md @@ -0,0 +1,11 @@ +# PLAN — perl-timeout-group (phase 4b-4d residual, GATE 2 LOW 2026-11-13) r1 +Scope: hooks/session-start.sh (:39-47), lib/tests/session-digest.test.sh (SD19 area). + +DIAGNOSIS: `_SS_TMO=(perl -e "alarm shift; exec { \$ARGV[0] } @ARGV" 2)` (fallback when neither timeout nor gtimeout is on PATH, stock macOS). alarm's SIGALRM kills the exec'd process only. A child of memory.sh (background job, subshell) inherits stdout/stderr; the callers capture them (:263 `$(… 2>&1 >/dev/null)` stderr, :320 `rows=$(…)` stdout), so the command substitution waits for EOF until that child exits: the 2 s bound does not hold. timeout(1) has the same single-process limit only without --kill-after... (GNU timeout signals the child only too, but runs it in its own foreground handling; out of scope: timeout/gtimeout paths unchanged). SD19 (`exec sleep 8` stub) passes because the hung process IS the exec'd one. +RELATED MEMORY: none bears (no BLK/LRN on perl alarm or process groups); honors BDR-136 spirit (hooks fail open: digest prints `unknown` on rc 124). + +FIX PLAN: +1. hooks/session-start.sh:45-46: perl runner forks; child `setpgrp(0,0)` then `exec { $ARGV[0] } @ARGV` (exit 127 on exec failure); parent `setpgrp($pid,$pid)` too (closes the race before the child's own call; failure after exec ignored), `$SIG{ALRM}` → `kill 'KILL', -$pid; exit 124`; `alarm $t; waitpid $pid, 0`; exit with the child's status (`$? & 127` → 128+signal, else `$? >> 8`); fork failure → exit 125. Single-quoted perl program (no `\$` escapes). Comment :39-40 updated: "perl forks the command into its own process group and kills the group, so a child holding the pipe dies too." +2. lib/tests/session-digest.test.sh: new SD19b after SD19: memory.sh stub `sleep 8 & exec sleep 8`… no: `( sleep 8 ) &` then `sleep 8` (the background child keeps stdout/stderr open after the main process dies); same no-timeout PATH; assert run < 6 s and the digest shows `- open: unknown (memory.sh index failed)`. Flip: old runner → ≥ 8 s, red. +3. SD19 unchanged (direct hang still bounded). +RISK: low. KILL (not TERM) on the group: the bound is the goal, memory.sh read-only calls hold no lock state worth a graceful stop. Linux/macOS perl both have setpgrp/fork/kill negative pid.