fix(agents): close the 10 prose BUGS-FOUND items, root quoting and $HOME refusal

Handover: rooted reads, whole-line PROJECT_ROOT read with a one-line
pre-paste rule, BDR status filter. plugin-gate: single-quoted templates,
unsafe roots printed never run, apply check against the git common dir,
$HOME refused (and in profile.sh). Advisor: minimal only from project
signals, no extras token, ctx7 wording, print-only plugin remedy. Packs
vocabulary in onboard/tour; graphify labels match the trap.
This commit is contained in:
bchanot committed 2026-11-13 20:43:59 +01:00
1 parent a967fd93dc
commit 77041e5360
17 files changed
+192 -98

No files matched your search

+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.