From 40a993c3e02a3ce35305cd428527bbe40a83b030 Mon Sep 17 00:00:00 2001 From: bchanot Date: Sat, 31 Oct 2026 14:38:11 +0100 Subject: [PATCH] fix(docs): interviewer and guardrails cite rule files by absolute ~/.claude/rules path --- .../2026-10-31-rule-paths-absolute-0010.md | 18 ++++++++++++++++++ agents/interviewer.md | 2 +- skills/guardrails/SKILL.md | 7 ++++--- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 .claude/tasks/contracts/2026-10-31-rule-paths-absolute-0010.md diff --git a/.claude/tasks/contracts/2026-10-31-rule-paths-absolute-0010.md b/.claude/tasks/contracts/2026-10-31-rule-paths-absolute-0010.md new file mode 100644 index 0000000..b58819c --- /dev/null +++ b/.claude/tasks/contracts/2026-10-31-rule-paths-absolute-0010.md @@ -0,0 +1,18 @@ +# CONTRACT — rule-paths-absolute + +## REQUEST (verbatim — IMMUTABLE) +Two relative rule paths beside absolute ones: agents/interviewer.md:27 and skills/guardrails/SKILL.md:10-11 cite `rules/secure-by-default.md`, `rules/supabase.md`, `rules/cloud-functions.md`, `rules/a11y.md` while the same files use `~/.claude/lib/…` absolute paths; a reader in a project repo resolves `rules/` against that project. Make them `~/.claude/rules/.md` (TODO phase 1 minor). + +## CLARIFICATIONS +none (hotfix autofill) + +## ACCEPTANCE CRITERIA +1. Symptom gone: no bare `rules/.md` path left in the two files; each now reads `~/.claude/rules/.md`. + CHECK: cd /home/bchanot/Documents/claude && ! grep -nE '(^|[^/~.a-z])rules/[a-z0-9-]+\.md' agents/interviewer.md skills/guardrails/SKILL.md && grep -q '~/.claude/rules/supabase.md' agents/interviewer.md && grep -q '~/.claude/rules/supabase.md' skills/guardrails/SKILL.md && echo PATHS-OK + EXPECT: PATHS-OK + EVIDENCE: pending +2. Build/tests green: `make test` suites touching these files (routing, citers) pass. + +## FILE SCOPE +- agents/interviewer.md +- skills/guardrails/SKILL.md diff --git a/agents/interviewer.md b/agents/interviewer.md index 95c83e2..f9d6d0e 100644 --- a/agents/interviewer.md +++ b/agents/interviewer.md @@ -24,7 +24,7 @@ Gather context. Produce complete PROJECT BRIEF as single source of truth. | "I don't know / you decide" | Propose ONE concrete default + why, ask yes/no | Take the default, mark `(assumed)`, list in OPEN DECISIONS | | Contradictory answers (e.g. embedded runtime + managed cloud DB) | Name the contradiction, ask which side wins | Put BOTH options in OPEN DECISIONS; do not silently pick one | | Language not stated (new project / from scratch / whole-project rewrite) | Propose Rust + why (`~/.claude/lib/architecture-defaults.md` § Default language); name the contraindication if another language fits better (browser frontend, mandated platform, missing ecosystem) | Rust, marked `(assumed)`, listed in OPEN DECISIONS | -| Project has an API, a database, messaging, cloud functions or a UI | Apply `rules/secure-by-default.md` (Supabase and cloud-function detail: `rules/supabase.md`, `rules/cloud-functions.md`): note under QUALITY which of the six guardrail domains apply, and whether the accessibility baseline (`rules/a11y.md`) applies, and list each dashboard-only item (spend cap, WAF, budget alert) in OPEN DECISIONS as manual | A domain applies and nothing is planned: list it in OPEN DECISIONS, never drop it silently | +| Project has an API, a database, messaging, cloud functions or a UI | Apply `~/.claude/rules/secure-by-default.md` (Supabase and cloud-function detail: `~/.claude/rules/supabase.md`, `~/.claude/rules/cloud-functions.md`): note under QUALITY which of the six guardrail domains apply, and whether the accessibility baseline (`~/.claude/rules/a11y.md`) applies, and list each dashboard-only item (spend cap, WAF, budget alert) in OPEN DECISIONS as manual | A domain applies and nothing is planned: list it in OPEN DECISIONS, never drop it silently | | Partial answer to the block | Re-ask ONLY the missing items in the follow-up round | Missing fields → `none stated` + OPEN DECISIONS entry | | Feature list balloons (>10) | Keep the 10 the user ranks first as V1 | Overflow goes to OUT OF SCOPE with a `(deferred by budget)` tag | diff --git a/skills/guardrails/SKILL.md b/skills/guardrails/SKILL.md index 3b98a8a..7ab339c 100644 --- a/skills/guardrails/SKILL.md +++ b/skills/guardrails/SKILL.md @@ -7,9 +7,10 @@ argument-hint: '[project path] [--domain api,hosting,supabase,messaging,function # /guardrails -Checks a project against `rules/secure-by-default.md` (domains 4 and 6 in -full: `rules/supabase.md`, `rules/cloud-functions.md`), then fixes what the -user accepts and proves each fix. A scanner reads the tree as data and finds +Checks a project against `~/.claude/rules/secure-by-default.md` (domains +4 and 6 in full: `~/.claude/rules/supabase.md`, +`~/.claude/rules/cloud-functions.md`), then fixes what the user accepts +and proves each fix. A scanner reads the tree as data and finds what text can prove. This skill judges the hits, covers what text cannot prove, lists what only a dashboard can set and, on request, probes a running target the user owns. It then proposes fixes, applies the accepted ones and