From 789a2b202787db86e2a53905c1c21dd8bf41cb28 Mon Sep 17 00:00:00 2001 From: bchanot Date: Thu, 29 Oct 2026 13:51:53 +0100 Subject: [PATCH] =?UTF-8?q?fix(doctrine):=20final-review=20wave=20?= =?UTF-8?q?=E2=80=94=20Supabase/functions=20pointers=20say=20Read=20before?= =?UTF-8?q?=20a=20new=20file,=20graphify/API/ship-feature=20wording?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.global.md | 5 +++-- hooks/session-start.sh | 2 +- lib/architecture-defaults.md | 6 +++--- rules/secure-by-default.md | 10 ++++++---- skills/ship-feature/SKILL.md | 5 +++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CLAUDE.global.md b/CLAUDE.global.md index ae7f491..492ae5e 100644 --- a/CLAUDE.global.md +++ b/CLAUDE.global.md @@ -284,5 +284,6 @@ office-hours…) are gone: use the fallback above, else say so. Threshold: graphify from 200 tracked code files, never below (banner line `graphify? N code files ≥ 200, no graph` informs, the user decides; never build or `graphify claude install` without that go). With a graph -(`graphify-out/graph.json`): `graphify query` before raw grep, -`graphify update .` after code edits; the session banner prints the rest. +(`graphify-out/graph.json`): `graphify query` before raw grep on +codebase-wide questions, `graphify update .` after code edits; the session +banner prints the rest. diff --git a/hooks/session-start.sh b/hooks/session-start.sh index b81d262..9cbcdac 100644 --- a/hooks/session-start.sh +++ b/hooks/session-start.sh @@ -256,7 +256,7 @@ if [ -n "$GRAPHIFY_HINT" ]; then fi # CLAUDE.global.md line-count guard (anti-regression, BDR-062): warn past # 320. BDR-125 phase 1 moved Design work, the graphify usage and the -# architecture defaults to their carriers (333 → ~285 lines). +# architecture defaults to their carriers. if [ -n "$REPO_DIR" ] && [ -f "$REPO_DIR/CLAUDE.global.md" ]; then _claude_lines=$(wc -l < "$REPO_DIR/CLAUDE.global.md") if [ "$_claude_lines" -gt 320 ]; then diff --git a/lib/architecture-defaults.md b/lib/architecture-defaults.md index 5866d39..39c712c 100644 --- a/lib/architecture-defaults.md +++ b/lib/architecture-defaults.md @@ -44,6 +44,6 @@ CLI, systems and tooling; the exception stays scoped to the part that earned it. ## Web APIs — always versioned -Every endpoint `/api/v1/...` from day one; breaking change → `v2`, the old -version keeps working. Full rule: `~/.claude/rules/rest-api.md` § Versioning -(loads on API files). +Every endpoint `/api/v1/...` from day one, the router mirrors it +(`api/v1/routes/`); breaking change → `v2`, the old version keeps working. +Full rule: `~/.claude/rules/rest-api.md` § Versioning (loads on API files). diff --git a/rules/secure-by-default.md b/rules/secure-by-default.md index d31753b..1392443 100644 --- a/rules/secure-by-default.md +++ b/rules/secure-by-default.md @@ -39,8 +39,9 @@ never claimed done: write it as a manual step in the project's deploy notes. comments carry no token, hash, key or secret. ## 4. Supabase -- RLS on every table, never a service_role or secret key client-side. Full - domain: rules/supabase.md (loads on Supabase files). +- RLS on every table, never a service_role or secret key client-side. + Full domain: ~/.claude/rules/supabase.md; Read it before writing a + migration, policy or client (a new file's Write loads no path rule). ## 5. SMS and email - Prior consent recorded per contact: who, when, channel, source, wording. @@ -49,5 +50,6 @@ never claimed done: write it as a manual step in the project's deploy notes. SMS says STOP, and a STOP reply is processed and stored automatically. ## 6. Cloud functions -- Max instances and a timeout on every function, never a self-trigger. Full - domain: rules/cloud-functions.md (loads on function files). +- Max instances and a timeout on every function, never a self-trigger. + Full domain: ~/.claude/rules/cloud-functions.md; Read it before + writing a function (a new file's Write loads no path rule). diff --git a/skills/ship-feature/SKILL.md b/skills/ship-feature/SKILL.md index 850bee4..f0cef63 100644 --- a/skills/ship-feature/SKILL.md +++ b/skills/ship-feature/SKILL.md @@ -111,8 +111,9 @@ not the raw request alone: Brainstorm WITHIN these — don't re-explore a direction an in-force BDR rejects or a BLK already closed." When the feature picks a language, a framework or an API shape, Read -`~/.claude/lib/architecture-defaults.md` first and add its defaults to the -in-force constraints. +`~/.claude/lib/architecture-defaults.md` first and add to the in-force +constraints the defaults whose Scope applies (an existing codebase keeps its +language). Inject ONLY what constrains: the NON-BINDING count does NOT enter the brainstorm input (the injection inherits the OUTPUT filter — detail what binds, drop what doesn't). Consumption = INPUT INJECTION (we can't modify the external skill; we control its input).