Merge bugfix/bugs-found-prose into develop

This commit is contained in:
bchanot committed 2026-11-13 20:45:09 +01:00
commit 4900ca54a3
21 files changed
+231 -102

No files matched your search

+19
View File
@@ -17,21 +17,30 @@
<!-- /bugfix G5 2026-11-11: challenge rounds and gates, plan .claude/tasks/plans/2026-11-10-handover-memory-status-1600.md --> <!-- /bugfix G5 2026-11-11: challenge rounds and gates, plan .claude/tasks/plans/2026-11-10-handover-memory-status-1600.md -->
- agents/handover-doc-writer.md §6.1 — vulgarizes BDRs with no status filter: a superseded or deprecated decision can read as current in the client deliverable. Severity: medium (client deliverable). Discovered while: /bugfix G5 challenge round 1. Not fixed. - agents/handover-doc-writer.md §6.1 — vulgarizes BDRs with no status filter: a superseded or deprecated decision can read as current in the client deliverable. Severity: medium (client deliverable). Discovered while: /bugfix G5 challenge round 1. Not fixed.
FIXED 2026-11-13 (77041e5, block H6a): §6.1 lists accepted/implemented/proposed only, superseded/deprecated left out, empty status counted as unreadable in the closing sentence.
- lib/memory.sh `upgrade` (`mem_want`, `_mem_verdict_diff` skips Index-stated IDs) — may take a stale v1 `## Index` cell over a `**Statut** :` body line. UNVERIFIED: check before recommending `upgrade` on v1 repos (faunosteo). Severity: medium if real (wrong status written into the body). Discovered while: /bugfix G5 challenge round 1. Not fixed. - lib/memory.sh `upgrade` (`mem_want`, `_mem_verdict_diff` skips Index-stated IDs) — may take a stale v1 `## Index` cell over a `**Statut** :` body line. UNVERIFIED: check before recommending `upgrade` on v1 repos (faunosteo). Severity: medium if real (wrong status written into the body). Discovered while: /bugfix G5 challenge round 1. Not fixed.
FIXED 2026-11-13 (/bugfix, bugfix/memory-sh-residuals d8e62c1): VERIFIED real (a `**Statut** :` label is unreadable by the strict reader, so the Index cell was written); one effective status (strict word, else the v1 body word) feeds flush, Index-stated and the oracle; the body word is written as the dated upgrade line; Index `superseded`/`deprecated` still wins; fixtures ix1-ix7. FIXED 2026-11-13 (/bugfix, bugfix/memory-sh-residuals d8e62c1): VERIFIED real (a `**Statut** :` label is unreadable by the strict reader, so the Index cell was written); one effective status (strict word, else the v1 body word) feeds flush, Index-stated and the oracle; the body word is written as the dated upgrade line; Index `superseded`/`deprecated` still wins; fixtures ix1-ix7.
- agents/handover-doc-writer.md STEP 10 and other paths — `git log` and file reads are cwd-relative, not rooted on the PACKAGE root; the PACKAGE `PROJECT:` line is space-separated, so a root containing a space mis-parses (the G5 orchestrator check only catches it when blockers.md exists). Severity: low. Discovered while: /bugfix G5 challenge round 1. Not fixed. - agents/handover-doc-writer.md STEP 10 and other paths — `git log` and file reads are cwd-relative, not rooted on the PACKAGE root; the PACKAGE `PROJECT:` line is space-separated, so a root containing a space mis-parses (the G5 orchestrator check only catches it when blockers.md exists). Severity: low. Discovered while: /bugfix G5 challenge round 1. Not fixed.
FIXED 2026-11-13 (77041e5): whole-line PROJECT_ROOT in the PACKAGE, every git/file read and the draft path rooted on "${ROOT:?}".
- lib/memory.sh `memory_legacy_status` default range (`## ID` to the next `## BLK-`) — on a v1 registry a `### BLK-` entry after a `## BLK-` entry feeds its status line to the `##` entry: a resolved `###` entry can close the open `##` entry above it, which then leaves the handover §5 (the `###` ID itself is flagged unreadable). Severity: low (rare dialect, flagged indirectly). Discovered while: /bugfix G5 verifier. Not fixed. - lib/memory.sh `memory_legacy_status` default range (`## ID` to the next `## BLK-`) — on a v1 registry a `### BLK-` entry after a `## BLK-` entry feeds its status line to the `##` entry: a resolved `###` entry can close the open `##` entry above it, which then leaves the handover §5 (the `###` ID itself is flagged unreadable). Severity: low (rare dialect, flagged indirectly). Discovered while: /bugfix G5 verifier. Not fixed.
FIXED 2026-11-13 (d8e62c1): one awk reader, the range ends at the next heading of another entry of the prefix at any level; T15-probed-openset. FIXED 2026-11-13 (d8e62c1): one awk reader, the range ends at the next heading of another entry of the prefix at any level; T15-probed-openset.
- agents/handover-doc-writer.md:83 + agents/client-handover-writer.md:1201-1202 — `ROOT="<PROJECT root from the PACKAGE>"` pastes the root into a double-quoted literal, and the printed remedy `memory.sh -C <root> status …` leaves `<root>` unquoted: a root with `"`, `$(…)`, a backtick or a space breaks the line or splits the path. Value is the operator's own `git rev-parse --show-toplevel`, not registry data. Severity: low. Discovered while: /bugfix G5 security gate. Not fixed. - agents/handover-doc-writer.md:83 + agents/client-handover-writer.md:1201-1202 — `ROOT="<PROJECT root from the PACKAGE>"` pastes the root into a double-quoted literal, and the printed remedy `memory.sh -C <root> status …` leaves `<root>` unquoted: a root with `"`, `$(…)`, a backtick or a space breaks the line or splits the path. Value is the operator's own `git rev-parse --show-toplevel`, not registry data. Severity: low. Discovered while: /bugfix G5 security gate. Not fixed.
FIXED 2026-11-13 (77041e5): ROOT read through a quoted heredoc with a one-line pre-paste rule, control-char root BLOCKED, remedy single-quoted with a `'` rule.
- lib/profile-state.jq (`jq -r` output read by lib/detect-plugins.sh `list_on_plugins` / `detect_gstack`) — a settings value carrying a newline can forge a `plugin:<id>=on` line in the PROFILE_PLAIN text, so the banner or status shows a plugin ON that is not. Display-only, pre-existing for detect_gstack. Severity: low. Discovered while: /bugfix G1+G4 security gate 2026-11-10. Not fixed. - lib/profile-state.jq (`jq -r` output read by lib/detect-plugins.sh `list_on_plugins` / `detect_gstack`) — a settings value carrying a newline can forge a `plugin:<id>=on` line in the PROFILE_PLAIN text, so the banner or status shows a plugin ON that is not. Display-only, pre-existing for detect_gstack. Severity: low. Discovered while: /bugfix G1+G4 security gate 2026-11-10. Not fixed.
<!-- /feat D2+D3 2026-11-11 (feature/banner-drop-plugin-dev): non-blocking gate findings, plan .claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md --> <!-- /feat D2+D3 2026-11-11 (feature/banner-drop-plugin-dev): non-blocking gate findings, plan .claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md -->
- agents/plugin-advisor.md embedded RULE (~:217) — the `embedded` signal can come from REQUEST keywords alone ("driver", "kernel", :58) and maps to `↻ SET : minimal`, against the gated rule "minimal reachable from project-level signals only" (only DISABLE is limited to project signals, :124-126). Gate confirmation limits it. Severity: medium (gated decision not fully enforced). Discovered while: /feat D3 verifier 2026-11-11. Not fixed. - agents/plugin-advisor.md embedded RULE (~:217) — the `embedded` signal can come from REQUEST keywords alone ("driver", "kernel", :58) and maps to `↻ SET : minimal`, against the gated rule "minimal reachable from project-level signals only" (only DISABLE is limited to project signals, :124-126). Gate confirmation limits it. Severity: medium (gated decision not fully enforced). Discovered while: /feat D3 verifier 2026-11-11. Not fixed.
FIXED 2026-11-13 (77041e5): SET minimal needs a project-level probe; REQUEST keywords alone give a NOTE.
- lib/plugin-gate.md:49-51 — pack `extras` accepted from an advisor token, but pack-extras bundles 21st-ai (credit-metered generate/iterate), same reason as the higgsfield exclusion; no advisor rule emits it. Severity: medium. Discovered while: /feat D3 security gate. Not fixed. - lib/plugin-gate.md:49-51 — pack `extras` accepted from an advisor token, but pack-extras bundles 21st-ai (credit-metered generate/iterate), same reason as the higgsfield exclusion; no advisor rule emits it. Severity: medium. Discovered while: /feat D3 security gate. Not fixed.
FIXED 2026-11-13 (77041e5): extras never accepted from an advisor token (manual `profile.sh enable extras` only).
- skills/onboard/SKILL.md:255 + agents/plugin-advisor.md:289 — say `make plugin` installs a pinned ctx7; plugins.lock.json pins "latest" (install-plugins.sh:573-574). Fix the wording or pin ctx7. Severity: low. Discovered while: /feat D3 security gate. Not fixed. - skills/onboard/SKILL.md:255 + agents/plugin-advisor.md:289 — say `make plugin` installs a pinned ctx7; plugins.lock.json pins "latest" (install-plugins.sh:573-574). Fix the wording or pin ctx7. Severity: low. Discovered while: /feat D3 security gate. Not fixed.
FIXED 2026-11-13 (77041e5): wording says ctx7 latest (plugins.lock.json pins `latest`).
- agents/plugin-advisor.md:281 BLOCK "Superpowers skills missing → make plugin" + lib/plugin-gate.md:61 "A) fix plugins" undefined — cwd-dependent `make plugin` in an onboarded foreign repo; qualify with the claude-config repo or make it print-only. Severity: low. Discovered while: /feat D3 security gate. Not fixed. - agents/plugin-advisor.md:281 BLOCK "Superpowers skills missing → make plugin" + lib/plugin-gate.md:61 "A) fix plugins" undefined — cwd-dependent `make plugin` in an onboarded foreign repo; qualify with the claude-config repo or make it print-only. Severity: low. Discovered while: /feat D3 security gate. Not fixed.
FIXED 2026-11-13 (77041e5): print-only "run `make plugin` in your claude-config checkout"; "A) fix plugins" defined the same in plugin-gate, init-project, ship-feature.
- lib/plugin-gate.md templates — tokens and `"<PROJECT_ROOT>"` sit in double quotes (`$()` / backticks still expand; protection = the prose closed-list check); linked worktree: the apply check compares `--show-toplevel` but profile.sh writes at the parent of `--git-common-dir` (confirmed path ≠ written path, same repo); PROJECT_ROOT = $HOME as a git repo passes the check and find_root writes `~/.claude/settings.local.json`. Severity: low (defense in depth). Discovered while: /feat D3 security gates. Not fixed. - lib/plugin-gate.md templates — tokens and `"<PROJECT_ROOT>"` sit in double quotes (`$()` / backticks still expand; protection = the prose closed-list check); linked worktree: the apply check compares `--show-toplevel` but profile.sh writes at the parent of `--git-common-dir` (confirmed path ≠ written path, same repo); PROJECT_ROOT = $HOME as a git repo passes the check and find_root writes `~/.claude/settings.local.json`. Severity: low (defense in depth). Discovered while: /feat D3 security gates. Not fixed.
FIXED 2026-11-13 (77041e5): single quotes, unsafe roots printed never run, apply check vs parent of --git-common-dir, $HOME refused (and deterministically in profile.sh require_project_root, T27).
- skills/onboard/SKILL.md:387-762 and skills/tour/SKILL.md:155 — still "gstack ON/OFF" (packs vocabulary elsewhere since D3); cosmetic: unwrapped lines skills/plugin-check/SKILL.md:17, lib/plugin-gate.md:45, USAGE.md:182, USAGE.md:1022 transcript without the ↻ glyph. Severity: low. Discovered while: /feat D3 verifier. Not fixed. - skills/onboard/SKILL.md:387-762 and skills/tour/SKILL.md:155 — still "gstack ON/OFF" (packs vocabulary elsewhere since D3); cosmetic: unwrapped lines skills/plugin-check/SKILL.md:17, lib/plugin-gate.md:45, USAGE.md:182, USAGE.md:1022 transcript without the ↻ glyph. Severity: low. Discovered while: /feat D3 verifier. Not fixed.
FIXED 2026-11-13 (77041e5): packs vocabulary (pack gstack-dev/design/browser), gstack-design probe added, lines rewrapped, USAGE transcript glyph.
<!-- /feat D4 2026-11-12 (feature/prune-memory-status-reader): follow-ups from challenge rounds and gates, plan .claude/tasks/plans/2026-11-11-prune-memory-status-reader-1400.md r3 --> <!-- /feat D4 2026-11-12 (feature/prune-memory-status-reader): follow-ups from challenge rounds and gates, plan .claude/tasks/plans/2026-11-11-prune-memory-status-reader-1400.md r3 -->
- Registry dialects the classifier cannot read: game is `format: 2` but written in the `date: … · status:` dialect (decision statuses unreadable), faunosteo uses `closed` / `active` words, v1 date dialects give no 90-day `proposed` candidate. /prune-memory shows them on the info-only `[Status unreadable]` line; a dialect migration (memory.sh upgrade or a one-shot rewrite per project) is not designed. Severity: medium (prune finds no candidate on those projects). Discovered while: /feat D4 challenge round 1. Not fixed. - Registry dialects the classifier cannot read: game is `format: 2` but written in the `date: … · status:` dialect (decision statuses unreadable), faunosteo uses `closed` / `active` words, v1 date dialects give no 90-day `proposed` candidate. /prune-memory shows them on the info-only `[Status unreadable]` line; a dialect migration (memory.sh upgrade or a one-shot rewrite per project) is not designed. Severity: medium (prune finds no candidate on those projects). Discovered while: /feat D4 challenge round 1. Not fixed.
@@ -44,8 +53,10 @@
<!-- /feat D1+D5+D6 2026-11-12 (feature/doctrine-rules-graphify, c69ce9c): follow-ups from challenge rounds and gates, plan .claude/tasks/plans/2026-11-12-doctrine-rules-graphify-1123.md r3 --> <!-- /feat D1+D5+D6 2026-11-12 (feature/doctrine-rules-graphify, c69ce9c): follow-ups from challenge rounds and gates, plan .claude/tasks/plans/2026-11-12-doctrine-rules-graphify-1123.md r3 -->
- hooks/session-start.sh:329-333 `_digest_todo` reads only a `### Actionable` heading (this repo only); init-project and onboard TODOs never show in the digest. Tracked as TODO D1b (user 2026-11-12). Severity: medium. Discovered while: /feat D1 challenge round 1. Not fixed. - hooks/session-start.sh:329-333 `_digest_todo` reads only a `### Actionable` heading (this repo only); init-project and onboard TODOs never show in the digest. Tracked as TODO D1b (user 2026-11-12). Severity: medium. Discovered while: /feat D1 challenge round 1. Not fixed.
FIXED 2026-11-12 (block D, feature/digest-todo-fallback 1124758, BDR-147): Actionable ##/### else the file's first items.
- hooks/session-start.sh digest blocker line fails open: a failed or timed-out `memory.sh index blocker` (timeout 2, stderr dropped) prints no `- open:` line, same as zero open blockers. Fix: print `- open: none` after a successful read. Severity: low. Discovered while: /feat D1 challenge round 2. Not fixed. - hooks/session-start.sh digest blocker line fails open: a failed or timed-out `memory.sh index blocker` (timeout 2, stderr dropped) prints no `- open:` line, same as zero open blockers. Fix: print `- open: none` after a successful read. Severity: low. Discovered while: /feat D1 challenge round 2. Not fixed.
- Stale graphify claims outside the D6 scope: .gitignore:54-56 ("written into the repo by `graphify claude install`"), plugins.lock.json:37 (bare `graphify install && graphify claude install` recipe), update-all.sh:310-312 (re-run `graphify claude install` MANUALLY, no trap, cwd-dependent → point at `make plugin`), install-plugins.sh:688/690/1269 labels ("dependencies", "Claude Code integration", "PreToolUse hook" for steps the trap reverts), install-plugins.sh:694-695 LRN-071 comment now gates only `graphify install`, guard comment vs rule duplication. LRN-154 (learnings.md:1381) still says `graphify install --platform claude` "touches nothing else". Severity: low. Discovered while: /feat D6 challenge + gates. Not fixed. - Stale graphify claims outside the D6 scope: .gitignore:54-56 ("written into the repo by `graphify claude install`"), plugins.lock.json:37 (bare `graphify install && graphify claude install` recipe), update-all.sh:310-312 (re-run `graphify claude install` MANUALLY, no trap, cwd-dependent → point at `make plugin`), install-plugins.sh:688/690/1269 labels ("dependencies", "Claude Code integration", "PreToolUse hook" for steps the trap reverts), install-plugins.sh:694-695 LRN-071 comment now gates only `graphify install`, guard comment vs rule duplication. LRN-154 (learnings.md:1381) still says `graphify install --platform claude` "touches nothing else". Severity: low. Discovered while: /feat D6 challenge + gates. Not fixed.
FIXED 2026-11-13 (77041e5): .gitignore, plugins.lock.json, update-all.sh (points at make plugin), install-plugins.sh labels/comment match the trap; LRN-154 corrected by a status line.
- lib/tests/curated-config-guard.test.sh does not lock the Step 7 `(cd "$REPO" && graphify claude install)` subshell; a later edit dropping it passes make test. Severity: low. Discovered while: /feat D6 challenge round 2. Not fixed. - lib/tests/curated-config-guard.test.sh does not lock the Step 7 `(cd "$REPO" && graphify claude install)` subshell; a later edit dropping it passes make test. Severity: low. Discovered while: /feat D6 challenge round 2. Not fixed.
- install-plugins.sh Step 7 hook window (pre-existing): `graphify claude install` hooks sit live in $REPO/.claude/settings.json until the EXIT trap; a SIGKILL skips the trap. Severity: low. Discovered while: /feat D6 security gate. Not fixed. - install-plugins.sh Step 7 hook window (pre-existing): `graphify claude install` hooks sit live in $REPO/.claude/settings.json until the EXIT trap; a SIGKILL skips the trap. Severity: low. Discovered while: /feat D6 security gate. Not fixed.
@@ -53,4 +64,12 @@
- lib/tests/push-guard.test.sh T42c — passes even if the `$WORK/s-probe.json` jq write fails (empty slurp makes every base entry look lost); weakens what T42c proves, not the lock. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. - lib/tests/push-guard.test.sh T42c — passes even if the `$WORK/s-probe.json` jq write fails (empty slurp makes every base entry look lost); weakens what T42c proves, not the lock. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed.
- lib/tests/push-guard.test.sh deny_lost — no pipefail: a missing list file or jq failure empties `lost` (T42 green); mitigated by T42c (red) and T40. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. - lib/tests/push-guard.test.sh deny_lost — no pipefail: a missing list file or jq failure empties `lost` (T42 green); mitigated by T42c (red) and T40. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed.
- Dead-entry premise (Write(glob) deny never blocks Write; mixed `* :*` / `* -v /:*` forms never match) rests on one live probe 2026-10-23 (journal); nothing re-proves it if Claude Code permission semantics change. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. - Dead-entry premise (Write(glob) deny never blocks Write; mixed `* :*` / `* -v /:*` forms never match) rests on one live probe 2026-10-23 (journal); nothing re-proves it if Claude Code permission semantics change. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed.
RESOLVED 2026-11-13 by live evidence: Claude Code 2.1.323 warns that `Bash(git push * :**)` (mid-pattern `:*`) matches as a `*` wildcard; the kept deny row is live and matches remote `:ref` deletes; the removed `* :*` forms were wildcards too, so the live `:**` row is the one that holds.
- lib/tests/push-guard.test.sh:421-424 T62F (pre-existing) — `mktemp` settings copy outside `$WORK`, removed only on the normal path (no trap). Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. - lib/tests/push-guard.test.sh:421-424 T62F (pre-existing) — `mktemp` settings copy outside `$WORK`, removed only on the normal path (no trap). Severity: low. Discovered while: /feat dead-deny security gate. Not fixed.
<!-- /bugfix bugs-found-prose 2026-11-13 (77041e5): pre-existing findings from its GATE 2, not BDR-125 -->
- skills/tour/SKILL.md:244,246 (run) and :249,287 (printed) — `git -C "<abs project>"` double-quoted path template: a path holding `$(…)`, a backtick or `"` expands. Same class fixed in plugin-gate. Severity: medium. Discovered while: /bugfix H6a security gate 2026-11-13. Not fixed.
- agents/handover-doc-writer.md:790-797 render mode — PROJECT_NAME, CLIENT_NAME, PROJECT_URL, OUTPUT_MD reach the renderer call with no quoting rule (PROJECT.name from package.json, CLIENT_NAME free text). Severity: medium. Discovered while: /bugfix H6a security gate. Not fixed.
- agents/handover-doc-writer.md:208,210,757,758 — fixed temp names /tmp/refs.txt, /tmp/ids.txt (use mktemp). Severity: low. Discovered while: /bugfix H6a security gate. Not fixed.
- skills/onboard/SKILL.md:427,612 — unquoted `$HOME` in an executed probe line (:614 fixed). Severity: low. Discovered while: /bugfix H6a security gate. Not fixed.
- lib/profile.sh:68-72,85 — a root ABOVE a symlinked $HOME is caught by a string compare only (is_home covers exactly $HOME). Severity: low. Discovered while: /bugfix H6a security gate. Not fixed.
+1
View File
@@ -747,3 +747,4 @@ rules:
- feature/fable-5-2 (user ask mid-run): fable alias → claude-fable-5-2 (ca1dc9f), rename done by another session in this checkout, split from BLK-049, id probed live, kit 640/0. Live CLI warns: deny Bash(git push * :**) matches as * wildcard (pre-existing, H item). - feature/fable-5-2 (user ask mid-run): fable alias → claude-fable-5-2 (ca1dc9f), rename done by another session in this checkout, split from BLK-049, id probed live, kit 640/0. Live CLI warns: deny Bash(git push * :**) matches as * wildcard (pre-existing, H item).
- /bugfix safety-lows (block H4b): code-limits private state dir (mkdir -m 700 no -p + one find test), session-start runner timeout→gtimeout→perl alarm, pre-commit fails closed on git diff and filter errors (generator lib/gitflow.sh + both copies), memory.sh rewrap, claude-stub env log path (1f107c3). 4 rounds: generator was the hook source (decision a), GATE 2 MEDIUM stat/lstat race closed, lint regressions fixed. Residual: perl alarm kills the exec'd process only (TODO). - /bugfix safety-lows (block H4b): code-limits private state dir (mkdir -m 700 no -p + one find test), session-start runner timeout→gtimeout→perl alarm, pre-commit fails closed on git diff and filter errors (generator lib/gitflow.sh + both copies), memory.sh rewrap, claude-stub env log path (1f107c3). 4 rounds: generator was the hook source (decision a), GATE 2 MEDIUM stat/lstat race closed, lint regressions fixed. Residual: perl alarm kills the exec'd process only (TODO).
- /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:<root> kept (49.7 KB of 4 MiB), image prompts dropped (0 instances). LRN-288. - /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:<root> 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.
+1
View File
@@ -1380,6 +1380,7 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
- **Future application**: untracking any generated file — know regeneration command BEFORE merging, `ls` the path right after `finish`. If nothing regenerates it, keep it tracked. - **Future application**: untracking any generated file — know regeneration command BEFORE merging, `ls` the path right after `finish`. If nothing regenerates it, keep it tracked.
- **graphify specifics**: `graphify install --platform claude` copies the skill and touches nothing else. `graphify claude install` is a different command — it writes the CLAUDE.md section and the `.claude/settings.json` hooks, rewrites both guarded configs, and does NOT copy the skill. Confusing the two wastes a recovery attempt. - **graphify specifics**: `graphify install --platform claude` copies the skill and touches nothing else. `graphify claude install` is a different command — it writes the CLAUDE.md section and the `.claude/settings.json` hooks, rewrites both guarded configs, and does NOT copy the skill. Confusing the two wastes a recovery attempt.
- **Reference**: `CLAUDE.md` machine-owned section, commit 80ccdaf. Links [[BDR-090]]. - **Reference**: `CLAUDE.md` machine-owned section, commit 80ccdaf. Links [[BDR-090]].
- **Status (2026-11-13)**: superseded in part 2026-11-13 (77041e5): graphifyy 0.9.67 'graphify install --platform claude' appends a # graphify block to ~/.claude/CLAUDE.md and a hook; install-plugins.sh's EXIT trap reverts both; 'touches nothing else' is wrong
## LRN-155 — `permissions.ask` under auto mode: the probe beats the doc ## LRN-155 — `permissions.ask` under auto mode: the probe beats the doc
- **Date**: 2026-09-16 - **Date**: 2026-09-16
@@ -18,24 +18,38 @@ Fix the BUGS-FOUND entries unfixed since 2026-11-09 that live in agent, skill, l
9. onboard SKILL.md:387-762 and tour SKILL.md:155 "gstack ON/OFF" → the packs vocabulary used since D3 (`pack gstack-dev on/off`, `profile.sh current`); rewrap plugin-check SKILL.md:17, plugin-gate.md:45, USAGE.md:182; USAGE.md:1022 transcript gains the ↻ glyph. 9. onboard SKILL.md:387-762 and tour SKILL.md:155 "gstack ON/OFF" → the packs vocabulary used since D3 (`pack gstack-dev on/off`, `profile.sh current`); rewrap plugin-check SKILL.md:17, plugin-gate.md:45, USAGE.md:182; USAGE.md:1022 transcript gains the ↻ glyph.
10. graphify: .gitignore:54-56, plugins.lock.json:37, update-all.sh:310-312 (point at `make plugin`, no manual `graphify claude install`), install-plugins.sh:688/690/1269 labels and :694-695 comment say what the steps do now (the trap reverts the CLAUDE.md block and hook). LRN-154 gets a `memory.sh status` correction line in STEP 8 (registry append-only), not an edit. 10. graphify: .gitignore:54-56, plugins.lock.json:37, update-all.sh:310-312 (point at `make plugin`, no manual `graphify claude install`), install-plugins.sh:688/690/1269 labels and :694-695 comment say what the steps do now (the trap reverts the CLAUDE.md block and hook). LRN-154 gets a `memory.sh status` correction line in STEP 8 (registry append-only), not an edit.
- [gated 2026-11-13, round 2: GATE 1 ECARTS(2) + GATE 2 MEDIUM/LOWs] FILE SCOPE += lib/tests/session-banner.test.sh (SB10 locks follow item 8: lock `diff '<profile>'` single-quoted and `--git-common-dir`), lib/profile.sh + lib/tests/profile.test.sh (deterministic refusal: `find_root`/`require_project_root` reject a root that resolves (`cd -P`) to `$HOME`, test included), skills/init-project/SKILL.md:43, skills/ship-feature/SKILL.md:27 (the "A) fix plugins" citers get the print-only definition).
R2-a plugin-gate + plugin-check: before any template, a PROJECT_ROOT holding `'` or a newline or control char is never substituted: print the commands and run nothing (one rule sentence); refusal text at :75-76 names the three causes (no git root, linked worktree/submodule, $HOME).
R2-b handover-doc-writer: the ROOT read block opens EVERY Bash call that uses $ROOT (say so once), uses `"${ROOT:?}"` at each use; :158-159 commits read rooted with `git -C "${ROOT:?}"`; draft/audit paths rooted (`"${ROOT:?}/.audit/…"`) in both agents; a root holding a newline or control char → `STATUS: BLOCKED` (client-handover-writer checks before writing the PACKAGE).
R2-c client-handover-writer remedy: `memory.sh -C '<root>' status …` single-quoted, plus the same "root holding `'` → print with a warning, never run" rule.
R2-d item 9 residue: plugin-gate.md:46 ≤ 80, tour SKILL.md:155 ≤ 80, onboard :673/:682/:706 consistent (the design-review fallback condition and its note name the SAME pack, the one the L3b probe at :610-611 actually reads, or add the gstack-design probe there), onboard :549-550 qualified `make plugin`, plugin-advisor :265-266 drops `extras` from pack values, USAGE.md:179 ≤ 80.
R2-e handover §6.1: decisions with an empty status word are listed separately as "status unreadable (n)" in the method sentence, not silently dropped; the sentence sits at the close of §6.1 (no method-note section exists).
- [gated 2026-11-13, round 2 executor deviation accepted] the $HOME refusal sits in `require_project_root` (every mutating command); `find_root` still answers $HOME for read-only `current`/`diff`.
## ACCEPTANCE CRITERIA ## ACCEPTANCE CRITERIA
1. Each of the 10 items changed in its file (read check by the verifier, item by item). 1. Each of the 10 items changed in its file (read check by the verifier, item by item).
CHECK: cd /home/bchanot/Documents/claude && git diff --stat develop -- agents/handover-doc-writer.md agents/client-handover-writer.md agents/plugin-advisor.md lib/plugin-gate.md skills/onboard/SKILL.md skills/tour/SKILL.md skills/plugin-check/SKILL.md USAGE.md .gitignore plugins.lock.json update-all.sh install-plugins.sh | tail -1 | grep -c '12 files changed' CHECK: cd /home/bchanot/Documents/claude && git diff --stat develop -- agents/handover-doc-writer.md agents/client-handover-writer.md agents/plugin-advisor.md lib/plugin-gate.md skills/onboard/SKILL.md skills/tour/SKILL.md skills/plugin-check/SKILL.md USAGE.md .gitignore plugins.lock.json update-all.sh install-plugins.sh | tail -1 | grep -c '12 files changed'
EXPECT: 1 EXPECT: 1
EVIDENCE: PENDING EVIDENCE: MET exit=0 marker-found :: 1
2. No "gstack ON/OFF" left in onboard/tour; no `extras` among plugin-gate's accepted tokens. 2. No "gstack ON/OFF" left in onboard/tour; no `extras` among plugin-gate's accepted tokens.
CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c 'gstack ON/OFF\|gstack ON\b' skills/onboard/SKILL.md skills/tour/SKILL.md | grep -vc ':0$') CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c 'gstack ON/OFF\|gstack ON\b' skills/onboard/SKILL.md skills/tour/SKILL.md | grep -vc ':0$')
EXPECT: 0 EXPECT: 0
EVIDENCE: PENDING EVIDENCE: MET exit=0 marker-found :: 0
3. plugins.lock.json valid JSON; shellcheck clean on update-all.sh and install-plugins.sh changes (no new finding vs develop). 3. plugins.lock.json valid JSON; shellcheck clean on update-all.sh and install-plugins.sh changes (no new finding vs develop).
CHECK: cd /home/bchanot/Documents/claude && jq . plugins.lock.json >/dev/null && echo JSON-OK CHECK: cd /home/bchanot/Documents/claude && jq . plugins.lock.json >/dev/null && echo JSON-OK
EXPECT: JSON-OK EXPECT: JSON-OK
EVIDENCE: PENDING EVIDENCE: MET exit=0 marker-found :: JSON-OK
4. Suites that read these files stay green: handover-memory-contract, doctrine-citers, skill-routing-census, curated-config-guard, portability-census. 4. Suites that read these files stay green: handover-memory-contract, doctrine-citers, skill-routing-census, curated-config-guard, portability-census.
CHECK: cd /home/bchanot/Documents/claude && PATH=$HOME/.bun/bin:$PATH make test suite=lib/tests/handover-memory-contract.test.sh 2>&1 | tail -1 CHECK: cd /home/bchanot/Documents/claude && PATH=$HOME/.bun/bin:$PATH make test suite=lib/tests/handover-memory-contract.test.sh 2>&1 | tail -1
EXPECT: all suites green EXPECT: all suites green
EVIDENCE: PENDING EVIDENCE: MET exit=0 marker-found :: all suites green
6. session-banner and profile suites green.
CHECK: cd /home/bchanot/Documents/claude && PATH=$HOME/.bun/bin:$PATH make test suite="lib/tests/session-banner.test.sh lib/tests/profile.test.sh" 2>&1 | tail -1
EXPECT: all suites green
EVIDENCE: MET exit=0 marker-found :: all suites green
5. make test green (manual, bun on PATH). 5. make test green (manual, bun on PATH).
(manual: full run by the round-2 executor 2026-11-13 → "SUITE: all GREEN / all suites green")
## FILE SCOPE ## FILE SCOPE
agents/handover-doc-writer.md, agents/client-handover-writer.md, agents/plugin-advisor.md, lib/plugin-gate.md, skills/onboard/SKILL.md, skills/tour/SKILL.md, skills/plugin-check/SKILL.md, USAGE.md, .gitignore, plugins.lock.json, update-all.sh, install-plugins.sh. LRN-154 + BUGS-FOUND → STEP 8. agents/handover-doc-writer.md, agents/client-handover-writer.md, agents/plugin-advisor.md, lib/plugin-gate.md, skills/onboard/SKILL.md, skills/tour/SKILL.md, skills/plugin-check/SKILL.md, USAGE.md, .gitignore, plugins.lock.json, update-all.sh, install-plugins.sh. LRN-154 + BUGS-FOUND → STEP 8.
+3 -3
View File
@@ -52,9 +52,9 @@ rules/context7.md
graphify-out/ graphify-out/
.ctx7-cache/ .ctx7-cache/
# graphify's vendored skill — written into the repo by `graphify claude # graphify's vendored skill — written by `graphify install` (install-plugins.sh
# install` (install-plugins.sh STEP graphify), since ~/.claude/skills is a # STEP graphify) into ~/.claude/skills, a symlink to skills/.
# symlink to skills/. Untracked so a tool upgrade stops dirtying the tree. # Untracked so a tool upgrade stops dirtying the tree.
# test-prompts.json is hand-written for darwin and stays tracked. # test-prompts.json is hand-written for darwin and stays tracked.
skills/graphify/SKILL.md skills/graphify/SKILL.md
skills/graphify/references/ skills/graphify/references/
+7 -6
View File
@@ -176,11 +176,12 @@ Tu veux...
| `/route` | Voir ou fixer la route du mod model-router | show / clear / off / on / reload / pending / ask on\|off / ask-tier on\|off / <phase> / model=… effort=… / switch on\|off / classify on\|off (classifieur de prompt) / verbose on\|off (transitions seules) ; `clear`, `off` et `/clear` réarment le garde d'écriture (voir ci-dessous) | | `/route` | Voir ou fixer la route du mod model-router | show / clear / off / on / reload / pending / ask on\|off / ask-tier on\|off / <phase> / model=… effort=… / switch on\|off / classify on\|off (classifieur de prompt) / verbose on\|off (transitions seules) ; `clear`, `off` et `/clear` réarment le garde d'écriture (voir ci-dessous) |
| `/profile` | Changer le profil de packs du projet (`set`), ou l'état effectif (`current`) | Profils dans `lib/profiles/*.json`, packs dans `skills/pack-*/` | | `/profile` | Changer le profil de packs du projet (`set`), ou l'état effectif (`current`) | Profils dans `lib/profiles/*.json`, packs dans `skills/pack-*/` |
> Cette table couvre les skills personnels principaux. `/seo` et `/geo` (pack-seo) > Cette table couvre les skills personnels principaux. `/seo` et `/geo`
> et `/web-validate` (pack-web-validate) vivent dans des packs : un profil qui laisse > (pack-seo) et `/web-validate` (pack-web-validate) vivent dans des packs : un profil
> le pack éteint les masque (`/profile current`). Les packs gstack-dev, > qui laisse le pack éteint les masque (`/profile current`). Les packs
> gstack-browser et gstack-design, les plugins (pr-review-toolkit…) et marketplaces externes en ajoutent beaucoup d'autres ; > gstack-dev, gstack-browser et gstack-design, les plugins
> `/skills-perso` liste tes skills personnels. > (pr-review-toolkit…) et marketplaces externes en ajoutent beaucoup
> d'autres ; `/skills-perso` liste tes skills personnels.
--- ---
@@ -1019,7 +1020,7 @@ SIGNALS: simple, CLI/embedded
COST: ~0t (skills superpowers vendorisés, toujours actifs, 0 t passif) COST: ~0t (skills superpowers vendorisés, toujours actifs, 0 t passif)
RECOMMENDATIONS: RECOMMENDATIONS:
SET : minimal (embedded : tous les packs éteints) ↻ SET : minimal (embedded : tous les packs éteints)
NOTE : skills superpowers (brainstorming, writing-plans...) restent NOTE : skills superpowers (brainstorming, writing-plans...) restent
disponibles par nom bare, même pour un disponibles par nom bare, même pour un
firmware minimal. firmware minimal.
+17 -6
View File
@@ -106,7 +106,9 @@ ROUTING: follow $HOME/.claude/lib/effort-shift.md (phases via mcp__model-router_
git rev-parse --is-inside-work-tree 2>/dev/null || { echo "NOT_GIT_REPO"; exit 1; } git rev-parse --is-inside-work-tree 2>/dev/null || { echo "NOT_GIT_REPO"; exit 1; }
# Project root # Project root
PROJECT_ROOT=$(git rev-parse --show-toplevel) # Sentinel keeps a trailing newline that $(...) would strip
PROJECT_ROOT=$(git rev-parse --show-toplevel; printf x)
PROJECT_ROOT=${PROJECT_ROOT%x}; PROJECT_ROOT=${PROJECT_ROOT%$'\n'}
cd "$PROJECT_ROOT" cd "$PROJECT_ROOT"
# First commit (the start of the project) # First commit (the start of the project)
@@ -123,6 +125,9 @@ PIPELINE_BASE_SHA=$(git rev-parse HEAD)
``` ```
If not in a git repo: stop and report `STATUS: BLOCKED — not a git repository`. If not in a git repo: stop and report `STATUS: BLOCKED — not a git repository`.
A `PROJECT_ROOT` holding a newline or control character (`case
"$PROJECT_ROOT" in *[[:cntrl:]]*`) → `STATUS: BLOCKED` before anything
is written, the PACKAGE line cannot carry it.
--- ---
@@ -1110,6 +1115,10 @@ it, don't recompute) or resolved in 9.1–9.5:
`is_local_business` (`IS_LOCAL_BUSINESS`), `deployed_url` `is_local_business` (`IS_LOCAL_BUSINESS`), `deployed_url`
(`DEPLOYED_URL`), `period` (`FIRST_COMMIT_DATE` → `LAST_COMMIT_DATE`, (`DEPLOYED_URL`), `period` (`FIRST_COMMIT_DATE` → `LAST_COMMIT_DATE`,
reformatted DD/MM/YYYY). reformatted DD/MM/YYYY).
- `PROJECT_ROOT` — its own line `PROJECT_ROOT: <path>`, the STEP 1
`PROJECT_ROOT` verbatim (the `PROJECT` line is space-separated and
mis-parses a root holding a space; the doc-writer reads this line
whole).
- `SCORES` — `SCORE_SEO_BEFORE/AFTER`, `SCORE_GEO_BEFORE/AFTER`, - `SCORES` — `SCORE_SEO_BEFORE/AFTER`, `SCORE_GEO_BEFORE/AFTER`,
`SCORE_HARDEN_BEFORE/AFTER`, `SCORE_VALIDATE_AFTER` (web) or `SCORE_HARDEN_BEFORE/AFTER`, `SCORE_VALIDATE_AFTER` (web) or
`SCORE_CSO_BEFORE/AFTER` (non-web), each with the pass-status and `SCORE_CSO_BEFORE/AFTER` (non-web), each with the pass-status and
@@ -1136,7 +1145,7 @@ contract.
Dispatch the two-mode pipeline (BDR-077 — synthesis on opus, render on the Dispatch the two-mode pipeline (BDR-077 — synthesis on opus, render on the
sonnet pin, full PACKAGE both times per LRN-126). Mint a RUNID first sonnet pin, full PACKAGE both times per LRN-126). Mint a RUNID first
(`RUNID=$(date +%s)`); the draft crosses via the run-scoped, gitignored (`RUNID=$(date +%s)`); the draft crosses via the run-scoped, gitignored
`.audit/handover-draft-<RUNID>.md`; clean it after 9.7. `"${PROJECT_ROOT:?}/.audit/handover-draft-<RUNID>.md"`; clean it after 9.7.
FIRST — synthesize: FIRST — synthesize:
@@ -1163,6 +1172,7 @@ prompt: "MODE: render
RUNID: <RUNID> RUNID: <RUNID>
PACKAGE: PACKAGE:
LANG: <LANG> LANG: <LANG>
PROJECT_ROOT: <PROJECT_ROOT>
PROJECT: name=<name> root=<root> type=<type> sub-type=<sub-type> PROJECT: name=<name> root=<root> type=<type> sub-type=<sub-type>
is_local_business=<bool> deployed_url=<url> period=<first→last> is_local_business=<bool> deployed_url=<url> period=<first→last>
SCORES: seo=<before→after,status> geo=<before→after,status> SCORES: seo=<before→after,status> geo=<before→after,status>
@@ -1199,8 +1209,9 @@ Parse the returned `HANDOVER-DOC REPORT`:
add the bullet: add the bullet:
- Memory: <value> - Memory: <value>
For unreadable IDs, give the remedy: `bash ~/.claude/lib/memory.sh -C For unreadable IDs, give the remedy: `bash ~/.claude/lib/memory.sh -C
<root> status <ID> "<word>, …"` (a status word, e.g. resolved or '<root>' status <ID> "<word>, …"` (a status word, e.g. resolved or
open), then re-run. open), then re-run. A root holding `'` → print the remedy with a
warning that the path needs manual quoting, never run it.
- `STATUS: BLOCKED` → surface the report verbatim (including which - `STATUS: BLOCKED` → surface the report verbatim (including which
PACKAGE field the doc-writer flagged) and stop — do not retry or PACKAGE field the doc-writer flagged) and stop — do not retry or
patch the PACKAGE silently. Re-run PUSH STATE READ and add the same patch the PACKAGE silently. Re-run PUSH STATE READ and add the same
@@ -1208,5 +1219,5 @@ Parse the returned `HANDOVER-DOC REPORT`:
- Push: <state> - Push: <state>
In BOTH branches, then clean the transient draft: In BOTH branches, then clean the transient draft:
`rm -f ".audit/handover-draft-${RUNID}.md"` (run-scoped, gitignored — `rm -f "${PROJECT_ROOT:?}/.audit/handover-draft-${RUNID}.md"` (run-scoped,
cleanup keeps `.audit/` from accumulating stranded drafts). gitignored — cleanup keeps `.audit/` from accumulating stranded drafts).
+62 -18
View File
@@ -18,6 +18,9 @@ parent already resolved:
- `LANG` — output language (`fr` | `en`). - `LANG` — output language (`fr` | `en`).
- `PROJECT` — name, root, type, sub-type, `is_local_business`, - `PROJECT` — name, root, type, sub-type, `is_local_business`,
`deployed_url`, period (first commit → last commit). `deployed_url`, period (first commit → last commit).
- `PROJECT_ROOT` — the project root on its own line, `PROJECT_ROOT: <path>`.
Read it whole-line (a path may hold spaces); every git and file read
below is rooted on it.
- `SCORES` — seo / geo / harden / validate (web) or cso (non-web) — - `SCORES` — seo / geo / harden / validate (web) or cso (non-web) —
before & after values, each with pass-status and any code-ceiling before & after values, each with pass-status and any code-ceiling
note. Source of truth for §2 — do not recompute. note. Source of truth for §2 — do not recompute.
@@ -52,8 +55,8 @@ The parent dispatches this agent TWICE, with the FULL PACKAGE both times
- **`MODE: synthesize`** — dispatched with `model: "opus"` (judgment tier; - **`MODE: synthesize`** — dispatched with `model: "opus"` (judgment tier;
call-site override over the sonnet pin). Runs STEP 9 → 10 → 12 and writes call-site override over the sonnet pin). Runs STEP 9 → 10 → 12 and writes
the chapters (§1-§6 full, §7/§8 stubs) into the RUN-SCOPED DRAFT the chapters (§1-§6 full, §7/§8 stubs) into the RUN-SCOPED DRAFT
`.audit/handover-draft-<RUNID>.md`, ending the file with the line `"${ROOT:?}/.audit/handover-draft-<RUNID>.md"`, ending the file with
`DRAFT COMPLETE — RUNID: <RUNID>`. Then emits a `SYNTH REPORT` the line `DRAFT COMPLETE — RUNID: <RUNID>`. Then emits a `SYNTH REPORT`
(template below, `MEMORY:` line mandatory on DONE) and STOPS — STEP 13-16, the final MD, HTML and PDF are NEVER (template below, `MEMORY:` line mandatory on DONE) and STOPS — STEP 13-16, the final MD, HTML and PDF are NEVER
this mode's job. this mode's job.
- **`MODE: render`** — runs on its sonnet row (frontmatter = off-state floor). FIRST loads the - **`MODE: render`** — runs on its sonnet row (frontmatter = off-state floor). FIRST loads the
@@ -79,9 +82,23 @@ MEMORY: unreadable BLK: <IDs comma-separated | none> | no blockers file | reader
## STEP 9 — LOAD MEMORY REGISTRIES ## STEP 9 — LOAD MEMORY REGISTRIES
The PACKAGE `PROJECT_ROOT` value pasted between the markers below is
exactly one line with no control character, checked BEFORE the paste: a
value holding a newline or a control character → `STATUS: BLOCKED`
before any Bash call (the block cannot see a newline, `read -r` keeps
only the first line and a line equal to `ROOT_END` would close the
heredoc).
```bash ```bash
ROOT="<PROJECT root from the PACKAGE>" # Whole-line read of the PACKAGE `PROJECT_ROOT: <path>` value (spaces kept,
MEMORY_DIR="$ROOT/.claude/memory" # nothing expanded): replace the placeholder line with the path, never
# paste it into a double-quoted literal. This block opens EVERY Bash call
# that uses $ROOT (the shell keeps no state between calls).
IFS= read -r ROOT <<'ROOT_END'
<PROJECT root from the PACKAGE>
ROOT_END
case "$ROOT" in *[[:cntrl:]]*) echo "ROOT_UNSAFE"; exit 1 ;; esac
MEMORY_DIR="${ROOT:?}/.claude/memory"
test -d "$MEMORY_DIR" || MEMORY_DIR="" test -d "$MEMORY_DIR" || MEMORY_DIR=""
# Blocker statuses through the shared reader (BDR-129): never parsed by hand. # Blocker statuses through the shared reader (BDR-129): never parsed by hand.
B="$MEMORY_DIR/blockers.md" B="$MEMORY_DIR/blockers.md"
@@ -96,6 +113,21 @@ SYNTH REPORT `MEMORY:` line. `blockers: no-file` → no blocker in §5,
`MEMORY: no blockers file`. `blockers: reader-unavailable` → no blocker `MEMORY: no blockers file`. `blockers: reader-unavailable` → no blocker
in §5, `MEMORY: reader unavailable`. in §5, `MEMORY: reader unavailable`.
Decision statuses come from the same shared reader, never from the
entry prose:
```bash
bash "$HOME/.claude/lib/memory.sh" -C "${ROOT:?}" index decision
```
Only BDRs whose current word is `accepted`, `implemented` or `proposed`
feed §6.1; `superseded` and `deprecated` ones are left out. A decision
whose word is empty is counted as unreadable, not dropped silently.
A `ROOT_UNSAFE` print (the first line of the root holds a control
character) or a pre-paste refusal (see above) → `STATUS: BLOCKED` naming
the PACKAGE `PROJECT_ROOT` field.
If memory dir exists, read each file in full for the narrative fields If memory dir exists, read each file in full for the narrative fields
(titles, decisions, why, alternatives, cause, solution, journal (titles, decisions, why, alternatives, cause, solution, journal
summaries). A blocker's status is never taken from the file's prose, summaries). A blocker's status is never taken from the file's prose,
@@ -116,22 +148,29 @@ final report that memory was unavailable.
## STEP 10 — GIT HISTORY SUMMARY ## STEP 10 — GIT HISTORY SUMMARY
Every git command is rooted on the PACKAGE root (`$ROOT`, STEP 9), never
on the working directory:
```bash ```bash
git log --reverse --format='%h|%aI|%an|%s' | head -200 git -C "${ROOT:?}" log --reverse --format='%h|%aI|%an|%s' | head -200
git log --name-only --format='---COMMIT---' | grep -v '^---' | sort -u | head -50 git -C "${ROOT:?}" log --name-only --format='---COMMIT---' \
| grep -v '^---' | sort -u | head -50
git log --diff-filter=A --name-only --format='' | sort -u | wc -l # added git -C "${ROOT:?}" log --diff-filter=A --name-only --format='' \
git log --diff-filter=M --name-only --format='' | sort -u | wc -l # modified | sort -u | wc -l # added
git log --diff-filter=D --name-only --format='' | sort -u | wc -l # deleted git -C "${ROOT:?}" log --diff-filter=M --name-only --format='' \
| sort -u | wc -l # modified
git -C "${ROOT:?}" log --diff-filter=D --name-only --format='' \
| sort -u | wc -l # deleted
git tag --sort=-creatordate | head -5 git -C "${ROOT:?}" tag --sort=-creatordate | head -5
``` ```
Cluster commits into 3-7 chronological phases based on commit message Cluster commits into 3-7 chronological phases based on commit message
themes. Do this **inline**, yourself — this agent has no `Agent` tool, themes. Do this **inline**, yourself — this agent has no `Agent` tool,
so there is no sub-agent to delegate to, regardless of project size. so there is no sub-agent to delegate to, regardless of project size.
For projects with 200+ commits, read the full `git log --reverse For projects with 200+ commits, read the full `git -C "${ROOT:?}" log
--format='%h|%aI|%s'` output and group it by theme directly. For each --reverse --format='%h|%aI|%s'` output and group it by theme directly. For each
phase: name, commit count, 2-line summary. Do NOT include dates or date phase: name, commit count, 2-line summary. Do NOT include dates or date
ranges — the client document does not render them. ranges — the client document does not render them.
@@ -339,7 +378,8 @@ End with two callouts:
## 5. Ce qui vous reste à faire ## 5. Ce qui vous reste à faire
[Action-only checklist for the client. Pull from: [Action-only checklist for the client. Pull from:
**`.claude/audits/HUMAN-ACTIONS.md` FIRST when present** (the /seo//geo **`"${ROOT:?}/.claude/audits/HUMAN-ACTIONS.md"` FIRST when present**
(the /seo//geo
audit-end checklist — carry its automation notes, vulgarized), then open audit-end checklist — carry its automation notes, vulgarized), then open
blockers from STEP 9 (unreadable ones excluded), ongoing-monitoring items, external platforms to blockers from STEP 9 (unreadable ones excluded), ongoing-monitoring items, external platforms to
claim, content updates only the client can make, deploy steps if claim, content updates only the client can make, deploy steps if
@@ -419,10 +459,14 @@ visibilité."]
### 6.1 Choix techniques importants ### 6.1 Choix techniques importants
[Vulgarize 3–7 BDR entries. Design, framework, security, hosting [Vulgarize 3–7 BDR entries whose STEP 9 status is accepted,
decisions the client would care about. One paragraph each: implemented or proposed (superseded and deprecated ones stay out).
what was chosen, why over the alternative, what it changes for the Design, framework, security, hosting decisions the client would care
client. Drop entries the client cannot act on or care about.] about. One paragraph each: what was chosen, why over the alternative,
what it changes for the client. Drop entries the client cannot act on
or care about. Close §6.1 with one method sentence: superseded and
deprecated decisions are left out, and "status unreadable (n)" counts those with
an empty status word.]
### 6.2 Comment on en est arrivé là (phases) ### 6.2 Comment on en est arrivé là (phases)
@@ -503,7 +547,7 @@ des audits de santé. Pour toute question, contactez [contact].*
--- ---
> **MODE BOUNDARY.** STEP 12 is the last synthesize-mode step: write the > **MODE BOUNDARY.** STEP 12 is the last synthesize-mode step: write the
> drafted chapters to `.audit/handover-draft-<RUNID>.md` (+ the > drafted chapters to `"${ROOT:?}/.audit/handover-draft-<RUNID>.md"` (+ the
> `DRAFT COMPLETE — RUNID: <RUNID>` terminal line), emit the SYNTH > `DRAFT COMPLETE — RUNID: <RUNID>` terminal line), emit the SYNTH
> REPORT, stop. Everything below (STEP 13-16) is `MODE: render` and > REPORT, stop. Everything below (STEP 13-16) is `MODE: render` and
> operates ON that draft. > operates ON that draft.
+8 -5
View File
@@ -214,8 +214,8 @@ RULE: IF "simple" OR "hotfix":
→ recommend the lightweight skill only (see Skill routing by task size); a REQUEST-only → recommend the lightweight skill only (see Skill routing by task size); a REQUEST-only
signal drives no SET and no DISABLE (both are project-wide, persistent) signal drives no SET and no DISABLE (both are project-wide, persistent)
RULE: IF "embedded" signal (firmware, bare-metal, microcontroller, or Makefile+C without Node/Rust/Go): RULE: IF "embedded" signal from a project-level probe (`platformio.ini`, linker script, or Makefile+C without Node/Rust/Go):
→ all packs off (profile `minimal`) → all packs off (profile `minimal`, `↻ SET : minimal`)
→ superpowers skills stay on (vendored, no toggle): useful for initial → superpowers skills stay on (vendored, no toggle): useful for initial
design brainstorm on complex drivers, unnecessary for single-function design brainstorm on complex drivers, unnecessary for single-function
patches; just don't invoke them, no disable needed patches; just don't invoke them, no disable needed
@@ -223,6 +223,9 @@ RULE: IF "embedded" signal (firmware, bare-metal, microcontroller, or Makefile+C
→ Recommend workflow: /analyze <file> → /hotfix (patch) or /bugfix (investigation) or /ship-feature (multi-file) → Recommend workflow: /analyze <file> → /hotfix (patch) or /bugfix (investigation) or /ship-feature (multi-file)
→ NOTE: print "embedded project detected — minimal plugin footprint recommended" → NOTE: print "embedded project detected — minimal plugin footprint recommended"
RULE: IF "embedded" keywords appear in the REQUEST only (firmware, bare-metal, microcontroller, driver, kernel…), no project-level probe:
→ NOTE only, no SET and no DISABLE (both are project-wide, persistent)
RULE: IF `browser-qa` signal (e2e tests, Playwright/Cypress/Puppeteer in deps): RULE: IF `browser-qa` signal (e2e tests, Playwright/Cypress/Puppeteer in deps):
→ pack gstack-browser ON — browser automation and QA → pack gstack-browser ON — browser automation and QA
→ ctx7 CLI OPTIONAL (depends on framework version) → ctx7 CLI OPTIONAL (depends on framework version)
@@ -260,7 +263,7 @@ the command. Never write files directly.
| one pack off | — | `⚠️ DISABLE : … — disable <pack or full plugin id>` | | one pack off | — | `⚠️ DISABLE : … — disable <pack or full plugin id>` |
`<pack>` is one of design, scroll3d, seo, web-validate, gstack-dev, `<pack>` is one of design, scroll3d, seo, web-validate, gstack-dev,
gstack-browser, gstack-design, higgsfield, extras. Managed plugins take gstack-browser, gstack-design, higgsfield. Managed plugins take
their full id, never the bare name: `ui-ux-pro-max@ui-ux-pro-max-skill`, their full id, never the bare name: `ui-ux-pro-max@ui-ux-pro-max-skill`,
`pr-review-toolkit@claude-code-plugins`. `pr-review-toolkit@claude-code-plugins`.
@@ -278,7 +281,7 @@ generation service; explicit user ask only (CLAUDE.md "Skill routing").
## BLOCK if ## BLOCK if
- Superpowers skills missing → `make plugin` (vendors them) then `make link` - Superpowers skills missing → run `make plugin` in your claude-config checkout (vendors them) then `make link`
## WARN (no block) ## WARN (no block)
@@ -286,7 +289,7 @@ generation service; explicit user ask only (CLAUDE.md "Skill routing").
- Multi-session feature + `gsd` CLI not installed → `npm install -g gsd-pi` - Multi-session feature + `gsd` CLI not installed → `npm install -g gsd-pi`
- **Next.js/React 18+/Prisma/Supabase detected + context7 not configured** - **Next.js/React 18+/Prisma/Supabase detected + context7 not configured**
→ Risk: Claude may generate code using outdated APIs (App Router changes frequently) → Risk: Claude may generate code using outdated APIs (App Router changes frequently)
→ Fix: `npm install -g ctx7` (`make plugin` from the claude-config repo pins the version and wires find-docs) → Fix: `npm install -g ctx7` (`make plugin` in your claude-config checkout installs ctx7 (latest, plugins.lock.json pins `latest`) and wires find-docs)
→ Or standalone: `ctx7 docs /vercel/next.js "middleware"` → Or standalone: `ctx7 docs /vercel/next.js "middleware"`
→ Free higher rate limits: `ctx7 login` (OAuth) or API key from context7.com/dashboard → Free higher rate limits: `ctx7 login` (OAuth) or API key from context7.com/dashboard
→ Type "force" to proceed without context7 (not recommended for fast-evolving libs) → Type "force" to proceed without context7 (not recommended for fast-evolving libs)
+8 -7
View File
@@ -687,16 +687,17 @@ else
fi fi
if command -v graphify &>/dev/null; then if command -v graphify &>/dev/null; then
_graphify_ok=1 _graphify_ok=1
info "Running graphify install (dependencies)..." info "Running graphify install (appends its block to ~/.claude/CLAUDE.md; the exit trap reverts the repo copy)..."
graphify install 2>/dev/null || { warn "graphify install failed — run manually"; _graphify_ok=0; } graphify install 2>/dev/null || { warn "graphify install failed — run manually"; _graphify_ok=0; }
info "Configuring Claude Code integration..." info "Running graphify claude install (CLAUDE.md block + PreToolUse hook; the exit trap reverts both)..."
(cd "$REPO" && graphify claude install) 2>/dev/null || warn "graphify claude install failed" (cd "$REPO" && graphify claude install) 2>/dev/null || warn "graphify claude install failed"
# Success message gated on the real outcome (LRN-071 class: an # The message below is gated on `graphify install` only (LRN-071 class:
# unconditional ok after `|| warn` lies when a step failed). # an unconditional ok after `|| warn` lies when a step failed); `graphify
# claude install` just warns, the trap reverts what it wrote.
if [ "$_graphify_ok" -eq 1 ]; then if [ "$_graphify_ok" -eq 1 ]; then
ok "Graphify configured for Claude Code" ok "Graphify installed (its CLAUDE.md block and hook reverted by the guard)"
else else
warn "Graphify NOT fully configured — re-run the failed step manually" warn "Graphify install failed — re-run it manually"
fi fi
fi fi
echo "" echo ""
@@ -1268,7 +1269,7 @@ echo " 🔄 gsd v2 — standalone CLI 'gsd' (gsd-pi, not a Claud
echo " 🔄 pr-review-toolkit — /review-pr + 6 PR agents (~2.2k tokens when enabled) [claude-code-plugins]" echo " 🔄 pr-review-toolkit — /review-pr + 6 PR agents (~2.2k tokens when enabled) [claude-code-plugins]"
echo " 🔄 ui-ux-pro-max — user scope (~780 tokens when enabled)" echo " 🔄 ui-ux-pro-max — user scope (~780 tokens when enabled)"
echo " 🔄 context7 CLI — ctx7 (npm global, standalone or MCP setup)" echo " 🔄 context7 CLI — ctx7 (npm global, standalone or MCP setup)"
echo " 🔄 graphifyy (CLI: graphify) — codebase knowledge graph (pipx, PreToolUse hook)" echo " 🔄 graphifyy (CLI: graphify) — codebase knowledge graph (pipx; its CLAUDE.md block and hook are reverted by the guard)"
echo " 🔄 emil-design-eng — UI polish, animations, component craft (curl → symlink)" echo " 🔄 emil-design-eng — UI polish, animations, component craft (curl → symlink)"
echo " 🔄 frontend-design — distinctive frontend interfaces, anti-AI-slop (anthropic-agent-skills)" echo " 🔄 frontend-design — distinctive frontend interfaces, anti-AI-slop (anthropic-agent-skills)"
echo " 🔄 impeccable — /impeccable design verbs + 61-rule deterministic detector (npx impeccable detect)" echo " 🔄 impeccable — /impeccable design verbs + 61-rule deterministic detector (npx impeccable detect)"
+27 -20
View File
@@ -41,24 +41,28 @@ PROBE REPORT (ground truth — do not re-detect):
Show the returned PLUGIN CHECK block. The advisor emits tokens only; the Show the returned PLUGIN CHECK block. The advisor emits tokens only; the
main loop builds every command from the fixed templates of step 5, never main loop builds every command from the fixed templates of step 5, never
pastes the advisor's text into a shell. Before running ANY command (the pastes the advisor's text into a shell. A PROJECT_ROOT holding `'`, a
step-4 diff included) check each token: a profile name is one of the advisor's own set newline or a control character is never substituted into a template: print
(web, seo, dev, design, qa, audit, minimal; never `full`, `max` or a the commands with the root shown as `'<root>'` and a warning that the
user must quote it by hand, and run nothing. Before running ANY command (the step-4 diff
included) check each token: a profile name is one of the advisor's own
set (web, seo, dev, design, qa, audit, minimal; never `full`, `max` or a
user-added profile) and matches `^[a-z0-9][a-z0-9-]*$` with an existing user-added profile) and matches `^[a-z0-9][a-z0-9-]*$` with an existing
`$HOME/.claude/lib/profiles/<name>.json`; `$HOME/.claude/lib/profiles/<name>.json`; a pack is one of design, scroll3d,
a pack is one of design, scroll3d, seo, web-validate, gstack-dev, seo, web-validate, gstack-dev, gstack-browser, gstack-design (`higgsfield`
gstack-browser, gstack-design, extras (`higgsfield` is never accepted from an and `extras` are never accepted from an advisor token: paid or
advisor token: paid service, explicit user ask only); a plugin is one of the credit-metered services, explicit user ask only, `profile.sh enable extras`
two managed full ids `ui-ux-pro-max@ui-ux-pro-max-skill`, by hand); a plugin is one of the two managed full ids
`pr-review-toolkit@claude-code-plugins`. A token matching none is printed as `ui-ux-pro-max@ui-ux-pro-max-skill`, `pr-review-toolkit@claude-code-plugins`.
rejected and skipped, never run. A token matching none is printed as rejected and skipped, never run.
For a `↻ SET <profile>` line run For a `↻ SET <profile>` line run
`bash "$HOME/.claude/lib/profile.sh" -C "<PROJECT_ROOT>" diff "<profile>"` and `bash "$HOME/.claude/lib/profile.sh" -C '<PROJECT_ROOT>' diff '<profile>'` and
print its `→ off` lines under it as "turns off" (none → "turns off: nothing") print its `→ off` lines under it as "turns off" (none → "turns off: nothing")
and its `→ on` lines as "turns on" (none → "turns on: nothing"). and its `→ on` lines as "turns on" (none → "turns on: nothing").
The diff exits non-zero on a bad name, an unknown profile or a missing The diff exits non-zero on a bad name, an unknown profile or a missing
profiles dir: on any non-zero exit print "turns off: unknown" and continue. profiles dir: on any non-zero exit print "turns off: unknown" and continue.
- `ACTION REQUIRED? YES` → offer: A) fix plugins B) type "force". STOP until - `ACTION REQUIRED? YES` → offer: A) fix plugins (print "run `make plugin`
in your claude-config checkout", run nothing) B) type "force". STOP until
answered. answered.
- OK → print `✅ Plugin check passed — [active plugins] — complexity: <score>%`. - OK → print `✅ Plugin check passed — [active plugins] — complexity: <score>%`.
@@ -66,10 +70,13 @@ profiles dir: on any non-zero exit print "turns off: unknown" and continue.
Trigger: a `↻ SET`, `⚡ ENABLE` or `⚠️ DISABLE` line. Under `source=flag` Trigger: a `↻ SET`, `⚡ ENABLE` or `⚠️ DISABLE` line. Under `source=flag`
(`PROFILE :` block) the advisor emits only `relaunch: cc <name> <profile>`: (`PROFILE :` block) the advisor emits only `relaunch: cc <name> <profile>`:
nothing is applied. Apply only when nothing is applied. Apply only when the parent of
`git -C "<PROJECT_ROOT>" rev-parse --show-toplevel` equals PROJECT_ROOT; `git -C '<PROJECT_ROOT>' rev-parse --path-format=absolute --git-common-dir`
otherwise print the commands and apply nothing ("no git root yet: run them (the root profile.sh writes at, same in a linked worktree) equals
after git init"). PROJECT_ROOT and PROJECT_ROOT is not `$HOME`;
otherwise print the commands and apply nothing, naming the cause: no git
root yet (run them after git init), a linked worktree or submodule, or
PROJECT_ROOT is `$HOME`.
1. List the changes, saying they are project-wide and persist in 1. List the changes, saying they are project-wide and persist in
`<PROJECT_ROOT>/.claude/settings.local.json`: `<PROJECT_ROOT>/.claude/settings.local.json`:
``` ```
@@ -82,9 +89,9 @@ after git init").
``` ```
2. "yes" → run the changes in order, the SET first, then the deltas (after 2. "yes" → run the changes in order, the SET first, then the deltas (after
"customize" too). Each one is "customize" too). Each one is
`bash "$HOME/.claude/lib/profile.sh" -C "<PROJECT_ROOT>" set "<name>"`, `bash "$HOME/.claude/lib/profile.sh" -C '<PROJECT_ROOT>' set '<name>'`,
`... enable "<pack | full plugin id>"` or `... enable '<pack | full plugin id>'` or
`... disable "<pack | full plugin id>"` (same prefix). Each call `... disable '<pack | full plugin id>'` (same prefix). Each call
writes `.claude/settings.local.json` atomically or refuses (rc 2, nothing writes `.claude/settings.local.json` atomically or refuses (rc 2, nothing
written): stop at the first non-zero rc, print its stderr, and continue written): stop at the first non-zero rc, print its stderr, and continue
with the current config. "customize" → user picks. "no" → proceed with with the current config. "customize" → user picks. "no" → proceed with
@@ -93,7 +100,7 @@ after git init").
/reload-plugins to load the packs in this session (connectors and model: /reload-plugins to load the packs in this session (connectors and model:
next session).` Say the change is project-wide and persists in next session).` Say the change is project-wide and persists in
`<PROJECT_ROOT>/.claude/settings.local.json`. Print the undo: after a SET: `<PROJECT_ROOT>/.claude/settings.local.json`. Print the undo: after a SET:
`bash "$HOME/.claude/lib/profile.sh" -C "<PROJECT_ROOT>" unset`, after `bash "$HOME/.claude/lib/profile.sh" -C '<PROJECT_ROOT>' unset`, after
deltas the inverse enable / disable. deltas the inverse enable / disable.
**Never auto-activate without showing the list and getting confirmation. **Never auto-activate without showing the list and getting confirmation.
+10 -3
View File
@@ -37,8 +37,8 @@
# and the statusline (supersedes `show --plain`, BDR-024). # and the statusline (supersedes `show --plain`, BDR-024).
# #
# Exit: 0 ok · 2 usage, unknown profile or pack, not a project root (no # Exit: 0 ok · 2 usage, unknown profile or pack, not a project root (no
# CLAUDE.md and no .git), unreadable or invalid local JSON; nothing # CLAUDE.md and no .git), refusing $HOME as the project root,
# is written on any refusal. # unreadable or invalid local JSON; nothing is written on any refusal.
# ============================================================ # ============================================================
set -euo pipefail set -euo pipefail
@@ -70,6 +70,12 @@ home_or_above() { # $1 dir
case "$HOME/" in "$1"/*) return 0 ;; esac case "$HOME/" in "$1"/*) return 0 ;; esac
return 1 return 1
} }
is_home() { # $1 dir: same physical dir as $HOME (symlinks resolved)
local d h
d="$(cd -P "$1" 2>/dev/null && pwd -P)" || return 1
h="$(cd -P "$HOME" 2>/dev/null && pwd -P)" || return 1
[ "$d" = "$h" ]
}
git_root() { # $1 dir → parent of the git common dir, unless $HOME or above git_root() { # $1 dir → parent of the git common dir, unless $HOME or above
local common root local common root
common="$(git -C "$1" rev-parse --path-format=absolute --git-common-dir \ common="$(git -C "$1" rev-parse --path-format=absolute --git-common-dir \
@@ -82,7 +88,7 @@ git_root() { # $1 dir → parent of the git common dir, unless $HOME or above
find_root() { # $1 dir → the project root (see header) find_root() { # $1 dir → the project root (see header)
local d="$1" local d="$1"
git_root "$d" && return 0 git_root "$d" && return 0
while [ "$d" != / ] && [ "$d" != "$HOME" ]; do while [ "$d" != / ] && ! is_home "$d"; do
if [ -d "$d/.claude" ] || [ -f "$d/CLAUDE.md" ] || [ -e "$d/.git" ]; then if [ -d "$d/.claude" ] || [ -f "$d/CLAUDE.md" ] || [ -e "$d/.git" ]; then
echo "$d"; return 0 echo "$d"; return 0
fi fi
@@ -91,6 +97,7 @@ find_root() { # $1 dir → the project root (see header)
echo "$1" echo "$1"
} }
require_project_root() { require_project_root() {
is_home "$PROJECT" && die "refusing \$HOME as the project root: $PROJECT"
[ -f "$PROJECT/CLAUDE.md" ] || [ -e "$PROJECT/.git" ] \ [ -f "$PROJECT/CLAUDE.md" ] || [ -e "$PROJECT/.git" ] \
|| die "not a project root (no CLAUDE.md and no .git): $PROJECT" || die "not a project root (no CLAUDE.md and no .git): $PROJECT"
} }
+7
View File
@@ -178,6 +178,13 @@ check T26-home-rc "$rc" 0
check T26-home-local "$([ -f "$H2/work/.claude/settings.local.json" ] && echo yes)" yes check T26-home-local "$([ -f "$H2/work/.claude/settings.local.json" ] && echo yes)" yes
check T26-home-not-root "$([ -e "$H2/.claude" ] && echo leaked)" "" check T26-home-not-root "$([ -e "$H2/.claude" ] && echo leaked)" ""
# a root that is $HOME (even through a symlink) is refused, rc 2, nothing written
H3="$FX/home3"; mkdir -p "$H3"; printf '# h\n' > "$H3/CLAUDE.md"; ln -s "$H3" "$FX/home3-link"
out="$(HOME="$FX/home3-link" PX "$H3" set devx 2>&1)"; rc=$?
check T27-home-root-rc "$rc" 2
check_has T27-home-root-msg "$out" "refusing \$HOME as the project root"
check T27-home-root-nothing "$([ -e "$H3/.claude" ] && echo leaked)" ""
# timing: two jq calls, under 100 ms here (spec target 50 ms, measured in Task 12) # timing: two jq calls, under 100 ms here (spec target 50 ms, measured in Task 12)
t0=$(date +%s%N); P current --plain >/dev/null; t1=$(date +%s%N) t0=$(date +%s%N); P current --plain >/dev/null; t1=$(date +%s%N)
ms=$(( (t1 - t0) / 1000000 )); echo "current --plain: ${ms} ms" ms=$(( (t1 - t0) / 1000000 )); echo "current --plain: ${ms} ms"
+2 -2
View File
@@ -163,8 +163,8 @@ check SB10-gate-vocab "$(gone lib/plugin-gate.md \
'Pre-fetch ctx7|Enable ui-ux-pro-max \(')" 1 'Pre-fetch ctx7|Enable ui-ux-pro-max \(')" 1
gate="$(cat "$ROOT/lib/plugin-gate.md")" gate="$(cat "$ROOT/lib/plugin-gate.md")"
check SB10-gate-diff "$(has "$gate" 'profile.sh" -C')" 1 check SB10-gate-diff "$(has "$gate" 'profile.sh" -C')" 1
check SB10-gate-diff2 "$(has "$gate" 'diff "<profile>"')" 1 check SB10-gate-diff2 "$(has "$gate" "diff '<profile>'")" 1
check SB10-gate-root "$(has "$gate" 'rev-parse --show-toplevel')" 1 check SB10-gate-root "$(has "$gate" '--git-common-dir')" 1
check SB10-gate-rejected "$(has "$gate" 'rejected')" 1 check SB10-gate-rejected "$(has "$gate" 'rejected')" 1
check SB10-gate-quoted "$(gone lib/plugin-gate.md '-C <PROJECT_ROOT>')" 1 check SB10-gate-quoted "$(gone lib/plugin-gate.md '-C <PROJECT_ROOT>')" 1
check SB10-advisor-fullid "$(has "$(cat "$ROOT/agents/plugin-advisor.md")" \ check SB10-advisor-fullid "$(has "$(cat "$ROOT/agents/plugin-advisor.md")" \
+1 -1
View File
@@ -34,7 +34,7 @@
"source": "pypi:graphifyy", "source": "pypi:graphifyy",
"version": "latest", "version": "latest",
"managed_by": "pipx", "managed_by": "pipx",
"note": "Codebase knowledge graph. CLI is 'graphify'. Install: pipx install graphifyy && graphify install && graphify claude install. Adds PreToolUse hook for Glob/Grep. pipx/PyPI ONLY — never npm/npx: a different publisher (rhanka/graphify) squats the same 'graphifyy' name on npm, a version-shadowing shim with its own conflicting 'graphify' bin." "note": "Codebase knowledge graph. CLI is 'graphify'. Install: `make plugin` (pipx install graphifyy, then graphify install and graphify claude install; the installer's exit trap reverts the CLAUDE.md block and PreToolUse hook it writes into the repo). pipx/PyPI ONLY — never npm/npx: a different publisher (rhanka/graphify) squats the same 'graphifyy' name on npm, a version-shadowing shim with its own conflicting 'graphify' bin."
}, },
"semgrep": { "semgrep": {
"source": "pypi:semgrep", "source": "pypi:semgrep",
+3 -1
View File
@@ -40,7 +40,9 @@ so the user does not assume Claude has hung.
## STEP 0 — PLUGIN CHECK + AUTO-ACTIVATE ## STEP 0 — PLUGIN CHECK + AUTO-ACTIVATE
Run `$HOME/.claude/lib/plugin-gate.md`. Feed request (dispatch plugin-probe → Run `$HOME/.claude/lib/plugin-gate.md`. Feed request (dispatch plugin-probe →
checkpoint → dispatch plugin-advisor; gates stay in this loop — BDR-077). checkpoint → dispatch plugin-advisor; gates stay in this loop — BDR-077).
- ACTION REQUIRED → show RECOMMENDATIONS block, offer: A) fix plugins B) type "force". STOP. - ACTION REQUIRED → show RECOMMENDATIONS block, offer: A) fix plugins
(print "run `make plugin` in your claude-config checkout", run nothing)
B) type "force". STOP.
- PROPOSED CHANGES exist → show list, ask "Apply? (yes / no / customize)". Apply on confirm. - PROPOSED CHANGES exist → show list, ask "Apply? (yes / no / customize)". Apply on confirm.
- OK → `✅ Plugin check passed — [active plugins] — complexity: <score>%`, continue. - OK → `✅ Plugin check passed — [active plugins] — complexity: <score>%`, continue.
+21 -18
View File
@@ -252,7 +252,7 @@ Pour chaque fast-lib détectée :
⚠️ ctx7 non installé — risque de code utilisant des APIs obsolètes ⚠️ ctx7 non installé — risque de code utilisant des APIs obsolètes
sur : [liste fast-libs] sur : [liste fast-libs]
Install : `npm install -g ctx7` Install : `npm install -g ctx7`
Version épinglée et find-docs : `make plugin` depuis le dépôt claude-config Installe ctx7 (latest, plugins.lock.json pin `latest`) et find-docs : `make plugin` depuis le dépôt claude-config
Ou continuer sans (non recommandé pour fast-libs). Ou continuer sans (non recommandé pour fast-libs).
``` ```
Demander : `yes install now / continue without / skip audit`. Demander : `yes install now / continue without / skip audit`.
@@ -384,12 +384,12 @@ passer ce chemin dans chaque brief d'audit.
|---|---|---| |---|---|---|
| `analyze` | Déjà fait en STEP 5 | L3a | | `analyze` | Déjà fait en STEP 5 | L3a |
| `code-clean` | Spawn subagent `general-purpose` (audit-only, `model="opus"`, `effort="xhigh"` — BDR-076: dispatched audits off the session model) | L3a | | `code-clean` | Spawn subagent `general-purpose` (audit-only, `model="opus"`, `effort="xhigh"` — BDR-076: dispatched audits off the session model) | L3a |
| `cso` | Si gstack ON → Skill(cso). Sinon → Agent general-purpose avec checklist OWASP + deps audit | L3a | | `cso` | Si `pack gstack-dev on` → Skill(cso). Sinon → Agent general-purpose avec checklist OWASP + deps audit | L3a |
| `doc` | Spawn subagent `doc-syncer` (auto-mode OFF, report-only) | L3a | | `doc` | Spawn subagent `doc-syncer` (auto-mode OFF, report-only) | L3a |
| `seo` | Subagents seo-analyzer + geo-analyzer en parallèle | L3b | | `seo` | Subagents seo-analyzer + geo-analyzer en parallèle | L3b |
| `design-review` | Si gstack ON → Skill design-review. Sinon → Agent ui-ux-pro-max context statique | L3b | | `design-review` | Si `pack gstack-design on` → Skill design-review. Sinon → Agent ui-ux-pro-max context statique | L3b |
| `perf` | Si gstack ON + URL → Lighthouse. Sinon → static bundle audit | L3b | | `perf` | Si `pack gstack-browser on` + URL → Lighthouse. Sinon → static bundle audit | L3b |
| `a11y` | Si gstack ON + URL → axe-core. Sinon → Agent static a11y audit | L3b | | `a11y` | Si `pack gstack-browser on` + URL → axe-core. Sinon → Agent static a11y audit | L3b |
### STEP 6 dispatch (L3a portion) ### STEP 6 dispatch (L3a portion)
@@ -423,17 +423,17 @@ Agent(
**Décision selon plugin state :** **Décision selon plugin state :**
```bash ```bash
# gstack actif ? # pack gstack-dev actif ? (`profile.sh current`)
bash $HOME/.claude/lib/profile.sh -C "$PWD" current --plain 2>/dev/null | grep -q '^pack-gstack-dev=on' bash $HOME/.claude/lib/profile.sh -C "$PWD" current --plain 2>/dev/null | grep -q '^pack-gstack-dev=on'
``` ```
- **gstack ON** → invoquer le skill cso via Skill tool en lui passant le contexte archétype : - **`pack gstack-dev on`** → invoquer le skill cso via Skill tool en lui passant le contexte archétype :
``` ```
Skill(skill="cso", args="comprehensive --report-only --output .onboard-audit/cso.md --archetype <archetype> --context-file .onboard-audit/archetype-context.md") Skill(skill="cso", args="comprehensive --report-only --output .onboard-audit/cso.md --archetype <archetype> --context-file .onboard-audit/archetype-context.md")
``` ```
Note : le skill cso écrit son rapport lui-même ; on redirige via `--output` si supporté, sinon on capture la sortie et on écrit `.onboard-audit/cso.md` dans le skill parent. Les flags `--archetype` / `--context-file` informent le skill même s'il ne les consomme pas nativement (lisibilité + compat future). Note : le skill cso écrit son rapport lui-même ; on redirige via `--output` si supporté, sinon on capture la sortie et on écrit `.onboard-audit/cso.md` dans le skill parent. Les flags `--archetype` / `--context-file` informent le skill même s'il ne les consomme pas nativement (lisibilité + compat future).
- **gstack OFF** → fallback via Agent general-purpose, prompt **archetype-adaptive** : - **`pack gstack-dev off`** → fallback via Agent general-purpose, prompt **archetype-adaptive** :
``` ```
Agent( Agent(
subagent_type="general-purpose", subagent_type="general-purpose",
@@ -530,7 +530,7 @@ bash $HOME/.claude/lib/profile.sh -C "$PWD" current --plain 2>/dev/null | grep -
En complément de cso (ON) OU du fallback (OFF) — un moteur SAST déterministe En complément de cso (ON) OU du fallback (OFF) — un moteur SAST déterministe
à côté de l'audit grep/raisonné. cso est un submodule gstack non modifiable ; à côté de l'audit grep/raisonné. cso est un submodule gstack non modifiable ;
semgrep vit dans cet agent local. Lancé dans les DEUX branches gstack. semgrep vit dans cet agent local. Lancé dans les DEUX branches (pack gstack-dev on / off).
``` ```
Agent( Agent(
@@ -547,7 +547,8 @@ Agent(
) )
``` ```
Si semgrep absent → l'agent rend DEGRADED (checklist seule) + recommande Si semgrep absent → l'agent rend DEGRADED (checklist seule) + recommande
`make plugin` ; NON bloquant en onboard (audit, pas gate). `make plugin` (dans ton checkout claude-config) ; NON bloquant en
onboard (audit, pas gate).
**Onboard n'a PAS de boucle verify→dev (`lib/verify-secure-loop.md`) — par **Onboard n'a PAS de boucle verify→dev (`lib/verify-secure-loop.md`) — par
conception.** onboard produit un RAPPORT d'audit, pas une modification à conception.** onboard produit un RAPPORT d'audit, pas une modification à
@@ -607,8 +608,10 @@ Options :
Pré-check ressources navigateur : Pré-check ressources navigateur :
```bash ```bash
# gstack actif ? # pack gstack-browser actif ?
bash $HOME/.claude/lib/profile.sh -C "$PWD" current --plain 2>/dev/null | grep -q '^pack-gstack-browser=on' bash $HOME/.claude/lib/profile.sh -C "$PWD" current --plain 2>/dev/null | grep -q '^pack-gstack-browser=on'
# pack gstack-design actif ? (condition du dispatch design-review)
bash "$HOME"/.claude/lib/profile.sh -C "$PWD" current --plain 2>/dev/null | grep -q '^pack-gstack-design=on'
# URL déployée fournie par l'utilisateur en STEP 3 ? # URL déployée fournie par l'utilisateur en STEP 3 ?
echo "${BRIEF_deployed_url:-none}" echo "${BRIEF_deployed_url:-none}"
# dev server launchable ? # dev server launchable ?
@@ -636,7 +639,7 @@ Agent(
- Core Web Vitals (estimé si pas d'URL live) - Core Web Vitals (estimé si pas d'URL live)
- headings hierarchy, alt attrs, images formats - headings hierarchy, alt attrs, images formats
- i18n / lang attribute - i18n / lang attribute
Si URL live fournie AND gstack actif: utiliser les outils live. Si URL live fournie AND `pack gstack-browser on`: utiliser les outils live.
Sinon: audit statique sur le code (HTML templates, Astro pages, Next Metadata API, etc.). Sinon: audit statique sur le code (HTML templates, Astro pages, Next Metadata API, etc.).
Write report to `<PROJECT_ROOT>/.onboard-audit/seo.md`. Write report to `<PROJECT_ROOT>/.onboard-audit/seo.md`.
Structure sections par catégorie, chaque issue cite fichier:ligne + sévérité. Structure sections par catégorie, chaque issue cite fichier:ligne + sévérité.
@@ -670,7 +673,7 @@ Agent(
#### Dispatch design-review (si `design-review` dans audit_stack) #### Dispatch design-review (si `design-review` dans audit_stack)
**Cas gstack ON + URL live OU dev server launchable :** **Cas `pack gstack-design on` + URL live OU dev server launchable :**
``` ```
Skill( Skill(
skill="design-review", skill="design-review",
@@ -679,7 +682,7 @@ Skill(
``` ```
Si le skill ne supporte pas `--output`, capturer la sortie et écrire à la main vers `.onboard-audit/design.md`. Si le skill ne supporte pas `--output`, capturer la sortie et écrire à la main vers `.onboard-audit/design.md`.
**Cas gstack OFF OU pas de site déployable (ex: react-spa sans dev server):** **Cas `pack gstack-design off` OU pas de site déployable (ex: react-spa sans dev server):**
``` ```
Agent( Agent(
subagent_type="general-purpose", subagent_type="general-purpose",
@@ -703,7 +706,7 @@ Agent(
8. Interactions : focus visible, hover states, disabled states 8. Interactions : focus visible, hover states, disabled states
9. Micro-interactions (billboard design ? transform scale(0.97) on :active ?) 9. Micro-interactions (billboard design ? transform scale(0.97) on :active ?)
Write report to `<PROJECT_ROOT>/.onboard-audit/design.md`. Write report to `<PROJECT_ROOT>/.onboard-audit/design.md`.
Note en haut : "STATIC MODE — gstack inactif ou pas de dev server ; audit limité au code." Note en haut : "STATIC MODE — pack gstack-design off ou pas de dev server ; audit limité au code."
Max 500 lignes. Cite fichier:ligne. Max 500 lignes. Cite fichier:ligne.
""" """
) )
@@ -715,7 +718,7 @@ Agent(
#### Dispatch perf (si `perf` dans audit_stack) #### Dispatch perf (si `perf` dans audit_stack)
**Cas gstack ON + URL live :** **Cas `pack gstack-browser on` + URL live :**
``` ```
Skill( Skill(
skill="browse", skill="browse",
@@ -724,7 +727,7 @@ Skill(
``` ```
Puis parser le JSON Lighthouse (scores perf/a11y/bp/seo/pwa + top opportunities) → écrire `.onboard-audit/perf.md`. Puis parser le JSON Lighthouse (scores perf/a11y/bp/seo/pwa + top opportunities) → écrire `.onboard-audit/perf.md`.
**Cas gstack OFF OU pas d'URL :** **Cas `pack gstack-browser off` OU pas d'URL :**
``` ```
Agent( Agent(
subagent_type="general-purpose", subagent_type="general-purpose",
@@ -759,7 +762,7 @@ Agent(
#### Dispatch a11y (si `a11y` dans audit_stack) #### Dispatch a11y (si `a11y` dans audit_stack)
**Cas gstack ON + URL live :** **Cas `pack gstack-browser on` + URL live :**
``` ```
Skill( Skill(
skill="browse", skill="browse",
+7 -3
View File
@@ -13,9 +13,13 @@ dispatched, gates in this loop).
/plugin-check is READ-ONLY advisory: SKIP the gate's step 5 (apply) — show /plugin-check is READ-ONLY advisory: SKIP the gate's step 5 (apply) — show
the commands the main loop builds from the gate's step-5 templates (`set` / the commands the main loop builds from the gate's step-5 templates (`set` /
`enable` / `disable`, with `-C "<PROJECT_ROOT>"`), after the gate's token `enable` / `disable`, with `-C '<PROJECT_ROOT>'`), after the gate's token
check, for the user instead. Never write: the user runs them (`lib/profile.sh` `set <profile>` / `enable <pack>` writes the check, for the user instead. A PROJECT_ROOT holding `'`, a newline or a
project's `.claude/settings.local.json`, never the user scope). control character is never substituted: print the commands with the root shown as `'<root>'` and a warning that
the user must quote it by hand, run nothing.
Never write: the user runs them
(`lib/profile.sh` `set <profile>` / `enable <pack>` writes the project's
`.claude/settings.local.json`, never the user scope).
If `$HOME/.claude/lib/plugin-gate.md` unreachable: emit `Plugin gate include If `$HOME/.claude/lib/plugin-gate.md` unreachable: emit `Plugin gate include
missing.` and STOP. missing.` and STOP.
+3 -1
View File
@@ -24,7 +24,9 @@ $ARGUMENTS
## STEP 0 — PLUGIN CHECK + AUTO-ACTIVATE ## STEP 0 — PLUGIN CHECK + AUTO-ACTIVATE
Run `$HOME/.claude/lib/plugin-gate.md`. Feed request (dispatch plugin-probe → Run `$HOME/.claude/lib/plugin-gate.md`. Feed request (dispatch plugin-probe →
checkpoint → dispatch plugin-advisor; gates stay in this loop — BDR-077). checkpoint → dispatch plugin-advisor; gates stay in this loop — BDR-077).
- ACTION REQUIRED → show RECOMMENDATIONS block, offer: A) fix plugins B) type "force". STOP. - ACTION REQUIRED → show RECOMMENDATIONS block, offer: A) fix plugins
(print "run `make plugin` in your claude-config checkout", run nothing)
B) type "force". STOP.
- PROPOSED CHANGES exist → show list, ask "Apply? (yes / no / customize)". Apply on confirm. - PROPOSED CHANGES exist → show list, ask "Apply? (yes / no / customize)". Apply on confirm.
- OK → `✅ Plugin check passed — [active plugins] — complexity: <score>%`, continue. - OK → `✅ Plugin check passed — [active plugins] — complexity: <score>%`, continue.
+3 -2
View File
@@ -152,8 +152,9 @@ honestly in the summary. Never loop past 3.
``` ```
semgrep ABSENT → DEGRADED (checklist only) is surfaced in the semgrep ABSENT → DEGRADED (checklist only) is surfaced in the
report, not a silent downgrade and not a blocker. report, not a silent downgrade and not a blocker.
2. gstack ON (`/cso` available) → **iteration 1 only**, dispatch a cso 2. `pack gstack-dev on` (`profile.sh current`; `/cso` available) →
posture audit (deps CVE, OWASP) in audit mode; fold its findings in. **iteration 1 only**, dispatch a cso posture audit (deps CVE, OWASP)
in audit mode; fold its findings in.
3. Fix policy (skip in `--report-only`): CRITICAL/HIGH → fix now. 3. Fix policy (skip in `--report-only`): CRITICAL/HIGH → fix now.
MEDIUM/LOW → fix only if local and behavior-preserving, else leave MEDIUM/LOW → fix only if local and behavior-preserving, else leave
`open`. Every fix minimal, CLAUDE.md security defaults apply. `open`. Every fix minimal, CLAUDE.md security defaults apply.
+3 -2
View File
@@ -308,8 +308,9 @@ else
fi fi
# NOT updated here, deliberately (audit 2026-07-02): # NOT updated here, deliberately (audit 2026-07-02):
# - graphify Claude integration (`graphify claude install`): rewrites curated # - graphify Claude integration (`graphify claude install`): rewrites curated
# CLAUDE.md / .claude/settings.json (BDR-028 guard territory) — re-run # CLAUDE.md / .claude/settings.json (BDR-028 guard territory) — run
# MANUALLY only if a graphify upgrade changes its hook format. # `make plugin` in your claude-config checkout (its exit trap reverts the
# drift); never run `graphify claude install` by hand.
# - gsd: pinned in plugins.lock.json — Step 4 reinstalls the PIN, it does not # - gsd: pinned in plugins.lock.json — Step 4 reinstalls the PIN, it does not
# advance it. Bump the lock deliberately, then re-run. # advance it. Bump the lock deliberately, then re-run.