Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

chore(harness): drop dangling audit/plan references

Jerome19f7ce83a188
diff --git a/.claude/adapters/supabase/README.md b/.claude/adapters/supabase/README.md
index bde8584c..44bfd413 100644
--- a/.claude/adapters/supabase/README.md
+++ b/.claude/adapters/supabase/README.md
@@ -2,7 +2,7 @@
This adapter provides the harness's optional **deploy phase**: the deploy-time SQL
migration round (STATE PD-* in the orchestrator). It is a pluggable capability
-under the optionality model (see `adr/harness-action-plan.md`):
+under the optionality model:
- The phase exists **iff** `harness.config.json` has a `deploy` block whose
`adapter` is `supabase`. Remove that block and a schema-free feature runs end
@@ -26,6 +26,4 @@ sufficient to decide whether to offer the migration round.
The adapter's files still live at their discoverable locations
(`.claude/skills/writing-migrations`, `.claude/scripts/*`, `.claude/hooks/block-migration-writes.mjs`)
because Claude Code discovers skills only under `.claude/skills/`. `manifest.json`
-declares the boundary by pointing at them. The physical relocation under this
-directory happens in Phase C (TC.1), together with the renderer's symlink
-mechanism that keeps the skill discoverable after the move.
+declares the boundary by pointing at them.
diff --git a/.claude/adapters/supabase/manifest.json b/.claude/adapters/supabase/manifest.json
index 8c83b2fd..ec627d02 100644
--- a/.claude/adapters/supabase/manifest.json
+++ b/.claude/adapters/supabase/manifest.json
@@ -26,5 +26,5 @@
"script": ".claude/scripts/e2e-smoke.sh"
},
"locations": "in-place",
- "note": "Files are referenced at their current discoverable locations (.claude/skills, .claude/scripts, .claude/hooks). The physical relocation under adapters/supabase/ happens in Phase C (TC.1), which also gives the renderer the symlink mechanism that keeps the skill discoverable. This manifest is the adapter-boundary declaration in the meantime."
+ "note": "Files are referenced at their current discoverable locations (.claude/skills, .claude/scripts, .claude/hooks)."
}
diff --git a/.claude/agents/developer.md b/.claude/agents/developer.md
index def5abb7..fb6f9cfb 100644
--- a/.claude/agents/developer.md
+++ b/.claude/agents/developer.md
@@ -170,7 +170,7 @@ Bash writes bypass the harness's edit tracking and reach reviewers unformatted.
See `.claude/rules/validation-commands.md` for the full list and rationale. Short version: typecheck / prettier / unit / e2e / lint / build are blocked by `bash-guard`. After implementation + commit, emit the OUTPUT CONTRACT line and stop — the SubagentStop validation chain (typecheck + prettier + unit + e2e) runs automatically before your stop is accepted. If validation fails, fix the issues, commit, and stop again.
-**Escalate a harness/infra defect, do NOT work around it (audit A5).** If a stop fails on something that is NOT your diff (a validation step referencing a config the repo does not define, a port already in use, a missing tool, a stale shared fixture), do NOT edit shared config (`vitest.config.ts`, `.claude/settings.json`, root `.env`, build config) from your worktree to make it pass. That pollutes every other ticket. Emit `FAILED: harness config gap: <what broke>` so it is fixed centrally. Your worktree-local code and tests are yours to fix; the shared harness plumbing is not.
+**Escalate a harness/infra defect, do NOT work around it.** If a stop fails on something that is NOT your diff (a validation step referencing a config the repo does not define, a port already in use, a missing tool, a stale shared fixture), do NOT edit shared config (`vitest.config.ts`, `.claude/settings.json`, root `.env`, build config) from your worktree to make it pass. That pollutes every other ticket. Emit `FAILED: harness config gap: <what broke>` so it is fixed centrally. Your worktree-local code and tests are yours to fix; the shared harness plumbing is not.
## Bash — what IS allowed
@@ -261,5 +261,5 @@ Implement the plan. Stick to ticket scope.
- No features outside ticket scope. An adjacent problem you notice (a nearby bug, a tempting refactor) is REPORTED in your final message, never fixed silently in this diff (`coding-style.md` scope discipline).
- e2e tests in `e2e/` if ticket touches UI/filters/forms/interactions, unless acceptance criteria say otherwise. Call `Skill({skill: "e2e-conventions"})` and `Skill({skill: "playwright-testing"})` before writing e2e tests. Don't run them — ship the spec, CI executes.
- Silent mode: Playwright `--headless`, Vite without `--open`, Vitest without `browser.ui`.
-- **Self-verification in the browser (optional, before commit).** When a change is behavior-visible and you want to confirm it renders before handing off to review, drive it via the Playwright MCP against a demo-mode server you start **inside your own worktree** (never `$REPO`). The launch command and port base come from `config.app` (`smokeCommand` + `portBase`, currently `npm run dev:demo` and `5300`): `cd <WORKTREE_PATH> && npm run dev:demo -- --port <PORT> --strictPort` (run in background; pick a port unique to this task, e.g. `5300` + the TASK number). Demo mode is FakeRest + auto-authenticated (no Supabase, no login); with `config.app.hashRouting` the app uses hash routing, so navigate to `http://localhost:<PORT>/#/<route>`. Prefer `browser_snapshot` (accessibility tree, token-cheap) over `browser_take_screenshot` (reserve pixels for visual/legibility checks). **Always tear down** — `browser_close` and kill the server — before you stop, or the SubagentStop validation chain stalls. This is for your own confidence; the quality-reviewer re-verifies in its Part C. It does **not** replace the required e2e spec.
+- **Self-verification in the browser (optional, before commit).** When a change is behavior-visible and you want to confirm it renders before handing off to review, drive it via the Playwright MCP against a demo-mode server you start **inside your own worktree** (never `$REPO`). The launch command and port base come from `config.app` (`smokeCommand` + `portBase`, currently `npm run dev:demo` and `5300`): `cd <WORKTREE_PATH> && npm run dev:demo -- --port <PORT> --strictPort` (run in background; pick a port unique to this task, e.g. `5300` + the TASK number). Demo mode is FakeRest + auto-authenticated (no Supabase, no login); with `config.app.hashRouting` the app uses hash routing, so navigate to `http://localhost:<PORT>/#/<route>`. Prefer `browser_snapshot` (accessibility tree, token-cheap) over `browser_take_screenshot` (reserve pixels for visual/legibility checks). **Always tear down** `browser_close` and kill the server before you stop, or the SubagentStop validation chain stalls. This is for your own confidence; the quality-reviewer re-verifies in its Part C. It does **not** replace the required e2e spec.
- Architecture Decision Records: load `Skill({skill: "adr-writing"})` only when the change introduces a structural decision (see WORKFLOW step 3). Skip by default.
diff --git a/.claude/agents/merger.md b/.claude/agents/merger.md
index f11a750e..d40f6d3a 100644
--- a/.claude/agents/merger.md
+++ b/.claude/agents/merger.md
@@ -83,7 +83,7 @@ The orchestrator parses this line by regex. Any other format is treated as `FAIL
```
`<type>` = ticket's `type` field (feat / fix / chore). On `CONFLICT`: `git merge --abort`, emit `FAILED: <TASK_ID> merge conflict in <files>`, stop. Do NOT resolve — the developer rebases onto `session/<SESSION_SHORT_ID>` and retries.
- **MIGRATION mode with `APPROVAL_TRAILER`**: append it as a second commit paragraph so the migration's approval provenance is recorded in git history (audit finding: PD-ASK provenance), e.g. `git merge --no-ff <BRANCH_NAME> -m "chore(MIGRATION): apply approved schema change" -m "<APPROVAL_TRAILER>"`.
+ **MIGRATION mode with `APPROVAL_TRAILER`**: append it as a second commit paragraph so the migration's approval provenance is recorded in git history (traceable in the commit), e.g. `git merge --no-ff <BRANCH_NAME> -m "chore(MIGRATION): apply approved schema change" -m "<APPROVAL_TRAILER>"`.
3. **Update ticket status** (skip when `TASK_ID` is `SIMPLE` / `MIGRATION` / `ROLLBACK` or `TICKETS_DIR` is absent)
```bash
@@ -130,8 +130,8 @@ cd $CLAUDE_PROJECT_DIR && flock $CLAUDE_PROJECT_DIR/.promote.lock bash -c '
[ -n "$DEFAULT" ] && ! git show-ref --verify --quiet "refs/heads/$DEFAULT" && DEFAULT=
[ -z "$DEFAULT" ] && DEFAULT=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed "s@^origin/@@")
[ -z "$DEFAULT" ] && { git show-ref --verify --quiet refs/heads/master && DEFAULT=master || DEFAULT=main; }
- case "$DEFAULT" in main|master) [ "$ALLOW_MAIN" = "1" ] || { echo "main opt-in required for $DEFAULT"; exit 3; } ;; esac # audit A3: never silently commit to main/master without an explicit ALLOW_MAIN=1
- git checkout -f "$DEFAULT" || exit 1 # switch to the promotion target (session fork-base branch, NOT $CLAUDE_PROJECT_DIR HEAD), discarding demo working-tree debris in the same step. `-f` replaces the old `git reset --hard HEAD; git checkout`: same clean-then-switch effect, but without `git reset --hard`, which the auto-mode command classifier blocks (audit #08).
+ case "$DEFAULT" in main|master) [ "$ALLOW_MAIN" = "1" ] || { echo "main opt-in required for $DEFAULT"; exit 3; } ;; esac
+ git checkout -f "$DEFAULT" || exit 1 # switch to the promotion target (session fork-base branch, NOT $CLAUDE_PROJECT_DIR HEAD), discarding demo working-tree debris in the same step. `-f` replaces the old `git reset --hard HEAD; git checkout`: same clean-then-switch effect, but without `git reset --hard`, which the auto-mode command classifier blocks.
# Launcher post-checkout script (config.launcher.postCheckoutScript, see rules/launcher-interface.md): re-applies the App.tsx variant that checkout reverts. The `-x` test makes it inert wherever the script is absent (a local checkout, or a project with no launcher).
[ -x /entrypoint-helpers/apply-app-variant.sh ] && /entrypoint-helpers/apply-app-variant.sh
git merge --no-ff session/<SESSION_SHORT_ID> -m "merge(session): <SESSION_SHORT_ID>" \
@@ -152,7 +152,7 @@ correct.
Do NOT resolve — the orchestrator dispatches a resolver.
- The `flock` serialises promotions across concurrent sessions sharing the base branch.
-- **Direct `main`/`master` promotion needs an opt-in (audit A3).** The Stage-B block above
+- **Direct `main`/`master` promotion needs an opt-in.** The Stage-B block above
refuses (`exit 3`) when the resolved target is `main`/`master` and `ALLOW_MAIN` is not set,
so the harness never silently commits to main. If your dispatch prompt carries `ALLOW_MAIN`,
prefix the `flock` command with `ALLOW_MAIN=1` (it propagates into the `bash -c` subshell).
@@ -175,7 +175,7 @@ cd $CLAUDE_PROJECT_DIR && flock $CLAUDE_PROJECT_DIR/.promote.lock bash -c '
[ -n "$DEFAULT" ] && ! git show-ref --verify --quiet "refs/heads/$DEFAULT" && DEFAULT=
[ -z "$DEFAULT" ] && DEFAULT=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed "s@^origin/@@")
[ -z "$DEFAULT" ] && { git show-ref --verify --quiet refs/heads/master && DEFAULT=master || DEFAULT=main; }
- git checkout -f "$DEFAULT" || exit 1 # clean-then-switch in one step; no `git reset --hard` (auto-mode classifier blocks it, audit #08)
+ git checkout -f "$DEFAULT" || exit 1 # clean-then-switch in one step; no `git reset --hard`
# Launcher post-checkout script (config.launcher.postCheckoutScript, see rules/launcher-interface.md): re-applies the App.tsx variant that checkout reverts. The `-x` test makes it inert wherever the script is absent (a local checkout, or a project with no launcher).
[ -x /entrypoint-helpers/apply-app-variant.sh ] && /entrypoint-helpers/apply-app-variant.sh
git merge --no-ff <BRANCH_NAME> -m "rollback(<SESSION_SHORT_ID>): undo via agent" \
diff --git a/.claude/agents/orchestrator.md b/.claude/agents/orchestrator.md
index 0aa7ddc7..e8d5fa46 100644
--- a/.claude/agents/orchestrator.md
+++ b/.claude/agents/orchestrator.md
@@ -23,12 +23,12 @@ Your developer / reviewer / merger subagents run one level below you: their inte
These instructions are the **mechanics**. Two concerns are owned by your surface, NOT by these instructions:
-- **User-facing messaging.** Where these instructions say "emit a progress line" or "report to the user", phrase it for your surface. The web-chat surface persona (injected into your system prompt by the launcher) uses plain, non-technical language in the user's language (no file paths, no `TASK-XXX`, no git terms) and writes `ask-state` cartouches for confirmations; a developer session uses normal technical language. **If your dispatch prompt carries `PERSONA: technical`, you are talking to a real developer: use the full technical register unconditionally — file paths, `TASK-XXX`, git terms, `database`/`migration`/`Supabase` — and do NOT apply any plain-language / non-technical softening even if a web-chat persona is also present.** Example phrasings below are guidance, not literal scripts.
+- **User-facing messaging.** Where these instructions say "emit a progress line" or "report to the user", phrase it for your surface. The web-chat surface persona (injected into your system prompt by the launcher) uses plain, non-technical language in the user's language (no file paths, no `TASK-XXX`, no git terms) and writes `ask-state` cartouches for confirmations; a developer session uses normal technical language. **If your dispatch prompt carries `PERSONA: technical`, you are talking to a real developer: use the full technical register unconditionally file paths, `TASK-XXX`, git terms, `database`/`migration`/`Supabase` and do NOT apply any plain-language / non-technical softening even if a web-chat persona is also present.** Example phrasings below are guidance, not literal scripts.
- **Data-mode (demo/full).** The MODE-SWITCH intent and the demo→live data switch live in the web-chat surface persona (injected by the launcher), never here, and exist only when a `<mode>` tag is present in your context. With no `<mode>` tag — the default — data-mode does not exist: treat applying the migration (STATE PD-DEPLOY) as the terminal POST-DEV step. **When a `<mode>` tag IS present, PD-DEPLOY is NOT terminal** — after it succeeds you hand off to the surface's post-deploy step (in `demo` that is a mandatory demo→live offer; see STATE PD-DEPLOY).
-### `PERSONA: technical` — the developer-harness contract
+### `PERSONA: technical` the developer-harness contract
-When your dispatch prompt carries `PERSONA: technical` (the `#technical-harness` opt-in), the request comes from a real developer who owns the merge and the deploy. Three behaviours change versus a normal run — they apply to every flow (SIMPLE, COMPLEX, SETUP):
+When your dispatch prompt carries `PERSONA: technical` (the `#technical-harness` opt-in), the request comes from a real developer who owns the merge and the deploy. Three behaviours change versus a normal run, they apply to every flow (SIMPLE, COMPLEX, SETUP):
1. **Full technical register** — as stated in the User-facing-messaging bullet above.
2. **Raw reporting.** Your final report is not a summary; it is the mechanical truth. Include: each `TASK-XXX` and its status, the branch names (`session/<SESSION_SHORT_ID>` and the per-task branches), the commit SHAs, each reviewer verdict (`APPROVED` / `REJECTED: <feedback>`), and any ADR file paths the developer wrote. Do not soften or omit failures.
@@ -66,7 +66,7 @@ SIMPLE vs COMPLEX is a routing decision you own — the `developer` itself has n
**NOT SIMPLE (push to COMPLEX):** "Add an 'industry' field importable from CSV" (import); "Add a 'manager' relation to contacts" (cross-entity); "Add a tags field with its own table" (new entity); "Add two fields" (multiple); "Add a date-range filter with a calendar picker" (new custom component).
-**Classify by RISK and SCOPE, not raw file count (audit A1).** The SIMPLE ceiling is "contained and low-risk", not "one file". A pre-diagnosed, cohesive change with no schema change, no import/export, no new component and no cross-entity relation stays SIMPLE even when it spans ~2-3 files (e.g. a localized bug fix, or a flaky-test fix that is already diagnosed). File count is a signal, not the rule: do not force COMPLEX just because a well-understood change touches more than one file. When the scope or risk is genuinely uncertain, still push to COMPLEX.
+**Classify by RISK and SCOPE, not raw file count.** The SIMPLE ceiling is "contained and low-risk", not "one file". A pre-diagnosed, cohesive change with no schema change, no import/export, no new component and no cross-entity relation stays SIMPLE even when it spans ~2-3 files (e.g. a localized bug fix, or a flaky-test fix that is already diagnosed). File count is a signal, not the rule: do not force COMPLEX just because a well-understood change touches more than one file. When the scope or risk is genuinely uncertain, still push to COMPLEX.
When the SETUP signal is ambiguous (e.g. *"new project"*), do not enter SETUP-INTERVIEW silently — ask the user to confirm once. Only an explicit confirmation or the `<intent>setup</intent>` marker enters SETUP-INTERVIEW.
@@ -88,7 +88,7 @@ SIMPLE: S-DEV (turn N) → (S-REVIEW if diff touched supabase/ → BLOCKED?
COMPLEX: STATE A (turn N) → STATE B (same turn: Stage 1 develop → Stage 2 review → Stage 3 merge, per wave,
all foreground; then promotion to the base branch) → (POST-DEV) → STATE DONE
-POST-DEV runs ONLY if the project configures a deploy adapter (`config.deploy` in `harness.config.json`). With no deploy adapter, `pending-deploys.mjs` returns empty for every run, so each flow terminates at promotion / STATE DONE with NO PD state and no migration mention (the pluggable deploy phase, TB.1). When configured, it is (end of COMPLEX, SETUP, schema-touching SIMPLE), conditional on a deploy-relevant diff:
+POST-DEV runs ONLY if the project configures a deploy adapter (`config.deploy` in `harness.config.json`). With no deploy adapter, `pending-deploys.mjs` returns empty for every run, so each flow terminates at promotion / STATE DONE with NO PD state and no migration mention (the pluggable deploy phase). When configured, it is (end of COMPLEX, SETUP, schema-touching SIMPLE), conditional on a deploy-relevant diff:
PD-ASK (turn N, then END the turn) → resume one of two ways:
• chat surface: user's own next message → PD-RESPOND (turn N+1)
• dev surface: coordinator re-dispatches you FRESH —
@@ -344,7 +344,7 @@ Entered only from S-REVIEW on `BLOCKED:`.
The planner runs in the **foreground**: its result returns this same turn.
-**Plan gate (audit D8).** Read `GATE` from your dispatch prompt: `none` | `plan` | `waves`. **Resolve the default fail-closed: any value other than the exact literal `none` (including an ABSENT or unrecognized `GATE`) is treated as `plan`** (only the CRM Builder launcher sets an explicit `none`). You must NEVER silently skip the plan gate: absence is not permission. So unless `GATE` is exactly `none`, do NOT continue to STATE B. Emit the plan (one line per ticket: id, title, `files_to_modify`, `dependencies`, acceptance) plus an approval question, and **END THE TURN** so the user can review and edit the tickets on disk (`${TICKETS_DIR}/TASK-*.json`). On approval a FRESH orchestrator resumes with `<intent>execute-plan</intent>` and enters STATE B (no re-planning); wants-changes re-plans with their new input; abort stops. If `GATE=none` (autonomous / overnight / CRM Builder): **do NOT end the turn**, continue straight into STATE B. Additionally, if `GATE=waves`, pause the same way after EACH wave's merges (before the next wave); the `<intent>execute-plan</intent>` resume continues from the merged state (RECOVERY dispatches only tickets whose dependencies are now merged).
+**Plan gate.** Read `GATE` from your dispatch prompt: `none` | `plan` | `waves`. **Resolve the default fail-closed: any value other than the exact literal `none` (including an ABSENT or unrecognized `GATE`) is treated as `plan`** (only the CRM Builder launcher sets an explicit `none`). You must NEVER silently skip the plan gate: absence is not permission. So unless `GATE` is exactly `none`, do NOT continue to STATE B. Emit the plan (one line per ticket: id, title, `files_to_modify`, `dependencies`, acceptance) plus an approval question, and **END THE TURN** so the user can review and edit the tickets on disk (`${TICKETS_DIR}/TASK-*.json`). On approval a FRESH orchestrator resumes with `<intent>execute-plan</intent>` and enters STATE B (no re-planning); wants-changes re-plans with their new input; abort stops. If `GATE=none` (autonomous / overnight / CRM Builder): **do NOT end the turn**, continue straight into STATE B. Additionally, if `GATE=waves`, pause the same way after EACH wave's merges (before the next wave); the `<intent>execute-plan</intent>` resume continues from the merged state (RECOVERY dispatches only tickets whose dependencies are now merged).
---
@@ -356,7 +356,7 @@ For every COMPLEX request (and the continuation right after STATE A / SETUP-PLAN
**Always dispatch FOREGROUND; you are NOT re-invoked.** You are a nested subagent (spawnDepth >= 1), and a nested subagent is NEVER woken when a background child completes (verified: `task-notif-reinvokes = 0`). So a background dispatch is a dead end: if you launch a child in the background and end your turn "to await the notification", the wakeup never comes, review/merge/promotion never run, and the finished dev work is orphaned. Verified by probe: an explicit `run_in_background: false` DOES block and returns the child's result inline (the runtime default is background). Therefore: set `run_in_background: false` on EVERY dispatch, and NEVER end your turn to wait for a child. The `force-foreground-orchestrator-dispatch` hook enforces this (it denies a background/absent pipeline dispatch); if you are ever denied, re-dispatch the same call with `run_in_background: false`. **Do NOT re-dispatch the same role for the same ticket** to "get a result": a foreground call already returns it inline (`block-duplicate-dispatch` is a backstop, not a license to fire twice; two `quality-reviewer`s once raced on one worktree). If a completed dev ticket is somehow left unmerged when you stop, the `completion-invariant` hook rejects the stop and the launching surface re-runs `<intent>recovery</intent>`. Stage barriers hold: every agent dispatched in a stage must have returned (inline) before you start the next.
-**No wasted dispatches (audit #09).** (1) NEVER dispatch with a stub / `placeholder` prompt: build the full spawn prompt or do not dispatch at all. (2) Learn an agent's result from its OUTPUT-CONTRACT line (its last line), not by re-reading its transcript to "figure out what happened" (burns budget, misreads). (3) The reviewer verdict has ONE source: the `reviews/<TASK>-quality-reviewer` flag (the reviewer self-writes it; `record-review-verdict` is the fallback). Never re-dispatch a reviewer to "re-confirm" a verdict already recorded.
+**No wasted dispatches.** (1) NEVER dispatch with a stub / `placeholder` prompt: build the full spawn prompt or do not dispatch at all. (2) Learn an agent's result from its OUTPUT-CONTRACT line (its last line), not by re-reading its transcript to "figure out what happened" (burns budget, misreads). (3) The reviewer verdict has ONE source: the `reviews/<TASK>-quality-reviewer` flag (the reviewer self-writes it; `record-review-verdict` is the fallback). Never re-dispatch a reviewer to "re-confirm" a verdict already recorded.
Parse the planner's output into dependency-ordered **waves**:
- Wave 1 = tickets with `dependencies: []`.
@@ -464,7 +464,7 @@ Bash("for b in $(git -C $CLAUDE_PROJECT_DIR for-each-ref --format='%(refname:sho
- **Non-empty** → those branches were developed but never merged. For each, resume its normal stages (review if no recorded verdict, then merge), then re-run the check until empty.
- **Empty** → every developed ticket is on the session branch.
-#### Feature-review (fresh global pass, before promotion, audit D4)
+#### Feature-review (fresh global pass, before promotion)
With all tickets merged, run ONE fresh global review of the integrated feature before promoting. Skip for SIMPLE and for a diff that changes no `src/` (docs/config only). Dispatch foreground:
```
@@ -478,11 +478,11 @@ Agent({
- `APPROVED` → forward any non-blocking notes (nits, ponytail `net: -N`) to the final report; proceed to promotion. **`PERSONA: technical` only:** also relay the reviewer's `Hotspots for human review:` section verbatim in the final report (it points the developer at the spots most worth eyeballing before promotion). Omit it for the non-technical web-chat persona (file:line risks are noise there).
- `BLOCKED:` <imperative findings> → fix them on the shared `<SESSION_SHORT_ID>/simple` worktree, which `setup-worktree` forks from the session branch (so the fix lands on top of the merged work). Do NOT invent a `featurefix` branch: `setup-worktree` / `enforce-dev-dispatch` only recognize `TASK-XXX` and `<SESSION_SHORT_ID>/simple`, so a bespoke branch is rejected (fail-closed) and the fix cannot get a worktree. Dispatch ONE `developer` with the SIMPLE template: `CHANGE_REQUEST` = the findings verbatim, `BRANCH_NAME: <SESSION_SHORT_ID>/simple`, `WORKTREE_PATH: <WORKTREE_BASE>/simple`, `run_in_background: false`. Then merge it into `session/<SESSION_SHORT_ID>` with a SIMPLE-mode merger carrying `STAGE: a-only` (Stage A only, no promotion), and re-run feature-review. **Bound to 2 rounds**: if still `BLOCKED` after 2, report the remaining findings in the handoff and proceed anyway (never wedge the pipeline on review). `#technical-harness` runs feature-review before its stop (no promotion after).
-#### Feature-smoke (does it actually run? audit D5)
+#### Feature-smoke (does it actually run?)
After feature-review passes, confirm the integrated feature RUNS before promotion / handoff. Two parts, both reported in the handoff:
- **Demo smoke** (when the diff changes UI under `src/components/`): dispatch the quality-reviewer with `MODE: feature-smoke` (foreground, `run_in_background: false`) to drive the feature's key user flows in demo mode via the Playwright MCP and report PASS/FAIL. Runs for any UI change; needs no Supabase.
-- **Supabase e2e** (conditional): if the diff changed `e2e/**` OR touches behavior the specs assert (`src/components/**` / `supabase/**`), run `Bash("E2E_SMOKE_SRC=<WORKTREE_BASE>/_session bash $CLAUDE_PROJECT_DIR/.claude/scripts/e2e-smoke.sh")`. `E2E_SMOKE_SRC` MUST point at the `_session` worktree (on `session/<SESSION_SHORT_ID>`, node_modules provisioned) so the suite runs the INTEGRATED FEATURE's code + specs, NOT the base-branch checkout (`$REPO`) - without it the smoke is only a base-branch baseline and never exercises the feature. Per-ticket validation does NOT run e2e (D2: e2e is end-of-feature only), so this is the one place the e2e specs actually run. It uses an ISOLATED, slot-leased Supabase instance and tears it down (guaranteed via `trap`). Exit 0 = passed OR gracefully skipped (it prints `SKIP: ...` when there is no free slot / too little RAM / the stack cannot start); exit 1 = the suite FAILED.
+- **Supabase e2e** (conditional): if the diff changed `e2e/**` OR touches behavior the specs assert (`src/components/**` / `supabase/**`), run `Bash("E2E_SMOKE_SRC=<WORKTREE_BASE>/_session bash $CLAUDE_PROJECT_DIR/.claude/scripts/e2e-smoke.sh")`. `E2E_SMOKE_SRC` MUST point at the `_session` worktree (on `session/<SESSION_SHORT_ID>`, node_modules provisioned) so the suite runs the INTEGRATED FEATURE's code + specs, NOT the base-branch checkout (`$REPO`) - without it the smoke is only a base-branch baseline and never exercises the feature. Per-ticket validation does NOT run e2e (e2e is end-of-feature only), so this is the one place the e2e specs actually run. It uses an ISOLATED, slot-leased Supabase instance and tears it down (guaranteed via `trap`). Exit 0 = passed OR gracefully skipped (it prints `SKIP: ...` when there is no free slot / too little RAM / the stack cannot start); exit 1 = the suite FAILED.
A smoke FAIL is surfaced (like a feature-review finding; it may drive a bounded fix), never silently swallowed. A skip is fine (deferred to a human `make test-e2e`). `#technical-harness` runs feature-smoke before its stop and reports the result; it does not promote.
@@ -499,7 +499,7 @@ Then promote the session branch to the base branch (the branch the session was f
```
- `DONE: PROMOTE commit=…` → SETUP path → STATE SETUP-DONE. COMPLEX path → report one line per ticket, then STATE PD-ASK.
- `FAILED: PROMOTE promote conflict: files=[…]` → one progress line (*"Synchronising your changes…"*) and STATE PD-PROMOTE-FIX.
- - `FAILED: PROMOTE main opt-in required` → the base resolves to `main`/`master`; do NOT bypass. Surface to the user that this commits **directly to `main`** and confirm; on confirmation, re-dispatch the promote merger with `ALLOW_MAIN: 1` added to its prompt (audit A3). `#technical-harness` never promotes, so it never reaches here.
+ - `FAILED: PROMOTE main opt-in required` → the base resolves to `main`/`master`; do NOT bypass. Surface to the user that this commits **directly to `main`** and confirm; on confirmation, re-dispatch the promote merger with `ALLOW_MAIN: 1` added to its prompt. `#technical-harness` never promotes, so it never reaches here.
- `FAILED: PROMOTE …` (other) → one failure line and STATE DONE.
- **Every ticket FAILED** → skip promotion. SETUP → STATE SETUP-DONE; COMPLEX → report per-ticket and STATE DONE.
diff --git a/.claude/agents/planner.md b/.claude/agents/planner.md
index a0ce34c1..5967c23e 100644
--- a/.claude/agents/planner.md
+++ b/.claude/agents/planner.md
@@ -107,7 +107,7 @@ Rules:
Normal feature tickets (type / component / config prop) → `parallel_safe: true`.
-**Derive `parallel_safe` from REAL file overlap, schema files included (audit A2).** Set it `false` whenever two tickets would edit the SAME file, especially a schema file (`supabase/schemas/01_tables.sql`, `03_views.sql`, ...): two tickets each adding a column to the same table race and produce duplicate or conflicting DDL (this once shipped a duplicate `leads.form_token` column to prod). If `files_to_modify` undercounts the shared schema file, the overlap is invisible and both tickets wrongly look safe, so compute overlap from the FULL `files_to_modify` (see the checklist below), not the primary source file alone.
+**Derive `parallel_safe` from REAL file overlap, schema files included.** Set it `false` whenever two tickets would edit the SAME file, especially a schema file (`supabase/schemas/01_tables.sql`, `03_views.sql`, ...): two tickets each adding a column to the same table race and produce duplicate or conflicting DDL (this once shipped a duplicate `leads.form_token` column to prod). If `files_to_modify` undercounts the shared schema file, the overlap is invisible and both tickets wrongly look safe, so compute overlap from the FULL `files_to_modify` (see the checklist below), not the primary source file alone.
**`branch_name`**: descriptive only — a human-readable label, `<TICKET_ID>-<short-kebab>` (e.g. `TASK-002-deal-stage-filter`). It is NOT used as the git branch: the orchestrator always dispatches with the canonical `BRANCH_NAME: <SESSION_SHORT_ID>/TASK-XXX`, and `setup-worktree` derives the branch it creates solely from the ticket id (`<SESSION_SHORT_ID>/TASK-XXX`), ignoring any suffix. Keep it readable; never prefix with `feature/` or `fix/`.
@@ -123,7 +123,7 @@ Normal feature tickets (type / component / config prop) → `parallel_safe: true
`files_to_modify` is a hint, not a contract. DEVELOPER may add/remove/substitute.
-**List the FULL set, and ONLY files the ticket MODIFIES (audit A2).** Undercounting is what makes two tickets wrongly look `parallel_safe` when they share a file. For an entity / field change, include: the TS type, the schema file(s) (`supabase/schemas/*`), the view(s) it feeds (`03_views.sql`), i18n labels, the e2e spec, unit tests, and the 2nd-provider (FakeRest) parity files / generators, not just the primary component. A file the ticket only READS for reference goes in a separate `reference_files` array (or is omitted); never list a reference file as a target, since it corrupts the overlap and dependency computation.
+**List the FULL set, and ONLY files the ticket MODIFIES.** Undercounting is what makes two tickets wrongly look `parallel_safe` when they share a file. For an entity / field change, include: the TS type, the schema file(s) (`supabase/schemas/*`), the view(s) it feeds (`03_views.sql`), i18n labels, the e2e spec, unit tests, and the 2nd-provider (FakeRest) parity files / generators, not just the primary component. A file the ticket only READS for reference goes in a separate `reference_files` array (or is omitted); never list a reference file as a target, since it corrupts the overlap and dependency computation.
## Step 4 — Persist tickets
@@ -221,8 +221,7 @@ Deploy-relevant schema files (the `config.deploy` adapter's source of truth, e.g
deploy artifacts (migrations) are generated at deploy time, not during tickets. A
project with no deploy adapter has no such distinction, so this whole section is
inert there. For the Supabase adapter: any AC that implies the developer must
-write a migration is a bug that produces a 7+ min reviewer-arbitration loop
-(observed in session 3f810745). NEVER write:
+write a migration is a bug that produces a 7+ min reviewer-arbitration loop. NEVER write:
- *"A Supabase migration is generated"* / *"… is applied locally"* / *"… is committed"*
- *"Run `supabase db diff`"* / *"Run `npx supabase migration up`"*
diff --git a/.claude/hooks/block-duplicate-dispatch.mjs b/.claude/hooks/block-duplicate-dispatch.mjs
index 0260a4b0..1a331e58 100755
--- a/.claude/hooks/block-duplicate-dispatch.mjs
+++ b/.claude/hooks/block-duplicate-dispatch.mjs
@@ -56,7 +56,7 @@ const sha = (s) => createHash("sha1").update(s).digest("hex").slice(0, 16);
// force-foreground-orchestrator-dispatch and re-issued with false. Do NOT record or
// check a marker for it here: otherwise the denied attempt's marker would reject the
// corrective retry as a "duplicate" (a regression from force-foreground's deny-and-retry,
-// caught by fresh-session run 8468cc06 - the planner never ran yet its marker blocked the
+// seen when the planner never ran yet its marker blocked the
// retry for 60 min). Only debounce dispatches that will actually proceed (rib === false).
const PIPELINE_ROLES = pipelineRoleSet();
const childRole = PIPELINE_ROLES.has(d.subagentType)
diff --git a/.claude/hooks/circuit-breaker.mjs b/.claude/hooks/circuit-breaker.mjs
index 12598c66..4d904f18 100755
--- a/.claude/hooks/circuit-breaker.mjs
+++ b/.claude/hooks/circuit-breaker.mjs
@@ -23,7 +23,7 @@ import { TMP_ROOT } from "./lib/paths.mjs";
// migrations, rebases). 45 work calls is comfortable and catches infinite loops
// (which hit 100+ fast). Before this exclusion, devs burned the whole budget on
// grep-based symbol search (0 LSP / 209 grep in one session) and had none left to
-// commit -- audit finding #02, ADR P2.
+// commit.
const ITERATION_LIMIT = 45;
// A Bash call is "free" (never counted) when its primary command is read-only
@@ -85,7 +85,7 @@ if (!ctx.agentId) process.exit(0);
// Read-only exploration (grep/find/ls/cat/...) and git plumbing (add/commit/status)
// do NOT count against the budget. The breaker exists to catch stuck WORK loops, not
-// to ration symbol search or starve the final commit. See ADR P2 / audit #02.
+// to ration symbol search or starve the final commit.
if (isFreeCommand(input.tool_input?.command)) {
ctx.log(`free: ${String(input.tool_input?.command ?? "").slice(0, 80)}`);
process.exit(0);
diff --git a/.claude/hooks/completion-invariant.mjs b/.claude/hooks/completion-invariant.mjs
index 6a2d422a..f0ae6e5c 100755
--- a/.claude/hooks/completion-invariant.mjs
+++ b/.claude/hooks/completion-invariant.mjs
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-// SubagentStop(orchestrator) - completion invariant. INSURANCE for the P1 handoff
-// stall: P1a (force-foreground) + P1b are the real fix (foreground blocks, verified),
+// SubagentStop(orchestrator) - completion invariant. INSURANCE for the handoff
+// stall: forcing foreground dispatch is the real fix (foreground blocks, verified),
// but if the orchestrator ever stops with APPROVED dev work NOT merged into the session
// branch, that is an orphaned / incomplete pipeline. Reject the stop a few times (keep
// it alive to finish the merges FOREGROUND); if it still stops orphaned, drop a
diff --git a/.claude/hooks/force-foreground-orchestrator-dispatch.mjs b/.claude/hooks/force-foreground-orchestrator-dispatch.mjs
index f50914e0..21be6672 100755
--- a/.claude/hooks/force-foreground-orchestrator-dispatch.mjs
+++ b/.claude/hooks/force-foreground-orchestrator-dispatch.mjs
@@ -5,7 +5,7 @@
// tool to BACKGROUND, and a nested subagent (the orchestrator, spawnDepth >= 1) is NEVER
// re-invoked when a background child completes. So a background dispatch from the
// orchestrator ends its turn "to await a notification" that never comes - review / merge /
-// promotion never run and finished dev work is orphaned (audit finding #01, 4/11 sessions).
+// promotion never run and finished dev work is orphaned.
// A probe confirmed explicit run_in_background:false DOES block (child output inline) while
// the default is async; CLI defaults to foreground, so the bug only ever bit the extension.
//
diff --git a/.claude/hooks/lib/config.mjs b/.claude/hooks/lib/config.mjs
index 959cff82..2a10c336 100644
--- a/.claude/hooks/lib/config.mjs
+++ b/.claude/hooks/lib/config.mjs
@@ -12,8 +12,7 @@ export const CONFIG_FILENAME = "harness.config.json";
// Minimal safe baseline. The committed harness.config.json overrides these.
// Optional capabilities (deploy, app) are ABSENT here on purpose: a capability
-// exists iff its block is present in the config (see the optionality design
-// note in adr/harness-action-plan.md).
+// exists iff its block is present in the config.
const DEFAULTS = {
name: "harness",
layout: { src: "src", e2e: "e2e", adr: "adr" },
@@ -122,7 +121,7 @@ export function clearConfigCache() {
cache.clear();
}
-// ---- Typed readers used by the config consumers (TA.2..TB.4) ----------------
+// ---- Typed readers used by the config consumers ----------------
export const validationSteps = (cfg) => cfg.validation?.steps ?? [];
export const extraForbidden = (cfg) => cfg.validation?.extraForbidden ?? [];
diff --git a/.claude/hooks/lib/validation.mjs b/.claude/hooks/lib/validation.mjs
index f7761c42..33e84bf3 100644
--- a/.claude/hooks/lib/validation.mjs
+++ b/.claude/hooks/lib/validation.mjs
@@ -73,7 +73,7 @@ function runVitest(wt, configFile, projects = [], changedSince = "") {
const projectFlags = projects.map((p) => `--project ${p}`).join(" ");
// Scope to tests related to THIS worktree's diff since `changedSince` (the session
// branch it forked from), so a ticket runs only its own affected tests, not the whole
- // suite (ADR D1). Pass the ref EXPLICITLY: the ticket's work is committed by stop time,
+ // suite. Pass the ref EXPLICITLY: the ticket's work is committed by stop time,
// so a bare `--changed` (uncommitted-only) would find nothing and run zero tests (false
// green). Empty ref -> full run (safe fallback). The end-of-feature smoke re-runs the
// full suite on the integrated session branch, catching anything the module graph missed.
diff --git a/.claude/hooks/test/bash-guard.test.mjs b/.claude/hooks/test/bash-guard.test.mjs
index 7379592c..6f87399b 100644
--- a/.claude/hooks/test/bash-guard.test.mjs
+++ b/.claude/hooks/test/bash-guard.test.mjs
@@ -124,7 +124,7 @@ describe("bash-guard hook", () => {
});
});
- describe("forbidden set is config-driven (TA.2: no triple-encoding)", () => {
+ describe("forbidden set is config-driven (no triple-encoding)", () => {
// A config with only a typecheck step and no extraForbidden: typecheck stays
// guarded, but unit/e2e/build are no longer part of the chain, so the guard
// must NOT block them.
diff --git a/.claude/hooks/test/circuit-breaker.test.mjs b/.claude/hooks/test/circuit-breaker.test.mjs
index 7651080d..c22978bc 100644
--- a/.claude/hooks/test/circuit-breaker.test.mjs
+++ b/.claude/hooks/test/circuit-breaker.test.mjs
@@ -1,6 +1,6 @@
// Tests for circuit-breaker.mjs - per-subagent WORK-call counter. Blocks are decision
// JSON on stdout with exit 0; the main session (no agent_id) is never throttled.
-// Read-only exploration and git plumbing/commit are "free" (never counted) - ADR P2.
+// Read-only exploration and git plumbing/commit are "free" (never counted).
import { mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
diff --git a/.claude/rules/git-policy.md b/.claude/rules/git-policy.md
index 7e144cba..ae26c70b 100644
--- a/.claude/rules/git-policy.md
+++ b/.claude/rules/git-policy.md
@@ -9,12 +9,6 @@ The user owns the REMOTE and the promotion of shared history. Agents never push,
pull, or force-push. What an agent MAY do LOCALLY depends on its role and is scoped
to its own worktree / branch.
-(Audit #03: the previous blanket "agents must not commit" contradicted the
-developer's need to build its own branch and the `validate-on-stop` auto-commit, so
-devs wasted budget on a "forbidden" commit and one suspected a prompt injection.
-SOMETHING must commit the task branch - it is exactly what the reviewer reads and the
-merger merges. This rule scopes commit rights instead of banning them.)
-
## Developer / simple-developer - commit your OWN task branch (required)
Building your task branch IS the mechanism the reviewer reads and the merger merges,
diff --git a/.claude/scripts/e2e-smoke.sh b/.claude/scripts/e2e-smoke.sh
index 848becff..363b1c2a 100755
--- a/.claude/scripts/e2e-smoke.sh
+++ b/.claude/scripts/e2e-smoke.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# e2e-smoke.sh - run the Playwright e2e suite against an ISOLATED, disposable Supabase
# instance so multiple harness sessions can run it in parallel without colliding.
-# Guaranteed teardown via `trap ... EXIT`. Audit D5/D7.
+# Guaranteed teardown via `trap ... EXIT`.
#
# Isolation per run: a leased SLOT (0..K-1) gives offset = slot*20, applied to the
# project_id, every Supabase port, and the app port + auth URLs, in a throwaway workdir.
@@ -109,11 +109,11 @@ export VITE_SUPABASE_URL="http://127.0.0.1:$api_port"
export VITE_SUPABASE_ANON_KEY="$ANON_KEY"
export SERVICE_ROLE_KEY
-# --- P-001: materialize the session schema the deploy-time migration will carry -
+# --- materialize the session schema the deploy-time migration will carry --------
# Ticket developers never write migrations, so a schema-touching session has
# supabase/schemas/ ahead of supabase/migrations/. The CLI builds the DB from
# migrations/ only, so without this the isolated stack lacks the new columns and
-# schema-exercising specs 400 against PostgREST - a false FAIL (P-001). When the
+# schema-exercising specs 400 against PostgREST - a false FAIL. When the
# session changed supabase/schemas/, generate a THROWAWAY migration from the delta
# INTO THE WORKDIR (never $SRC) and apply it. Best-effort: on any failure SKIP the
# leg rather than emit a false FAIL (the real migration lands in the deploy round).
diff --git a/.claude/scripts/pending-deploys.mjs b/.claude/scripts/pending-deploys.mjs
index 26c60d91..129c89a4 100755
--- a/.claude/scripts/pending-deploys.mjs
+++ b/.claude/scripts/pending-deploys.mjs
@@ -36,7 +36,7 @@ export function globToRegexSource(glob) {
}
// The single deploy-relevance matcher, built from config.deploy.relevantGlobs
-// (TB.2: one definition, shared with the orchestrator's SIMPLE-review gate and
+// (one definition, shared with the orchestrator's SIMPLE-review gate and
// the planner's schema wording). Empty globs -> matches nothing.
export function relevanceRegex(globs) {
if (!globs.length) return /a^/; // never matches
@@ -52,7 +52,7 @@ function main() {
const APP = get("--app", process.env.CLAUDE_PROJECT_DIR || "/app");
const SESSION = get("--session", "");
- // Pluggable deploy phase (TB.1): the migration round exists ONLY if this
+ // Pluggable deploy phase: the migration round exists ONLY if this
// project configures a deploy adapter. With no config.deploy, there is nothing
// to deploy, so exit 0 (empty) and the orchestrator terminates at promotion
// with no PD state.
@@ -122,7 +122,7 @@ function main() {
process.exit(0); // no session topology anywhere -> nothing to deploy
}
- // Deploy-relevance from config.deploy.relevantGlobs (TB.2): one definition of
+ // Deploy-relevance from config.deploy.relevantGlobs: one definition of
// "deploy-relevant paths", not a hardcoded regex. A real migration requires a
// change under these globs (the DDL source of truth), so this is both
// necessary and sufficient to decide whether to offer the migration round.
diff --git a/.claude/scripts/playwright-mcp.sh b/.claude/scripts/playwright-mcp.sh
index 8e047d7d..69c346f4 100755
--- a/.claude/scripts/playwright-mcp.sh
+++ b/.claude/scripts/playwright-mcp.sh
@@ -4,7 +4,7 @@
# uses), instead of the MCP's default `chrome` channel (/opt/google/chrome/chrome),
# which provisioning never installs. Without this the feature-smoke reviewer's first
# navigate fails with "Chromium distribution 'chrome' is not found" and only works if
-# someone symlinks the bundled binary by hand. Audit: verify item 5 residual.
+# someone symlinks the bundled binary by hand.
#
# The bundled path is version-pinned (chromium-<rev>), so resolve it dynamically via
# playwright-core rather than hardcoding it in .mcp.json. If resolution fails (e.g.
diff --git a/.claude/scripts/test/pending-deploys.test.mjs b/.claude/scripts/test/pending-deploys.test.mjs
index 9ec49ab0..5445f89d 100644
--- a/.claude/scripts/test/pending-deploys.test.mjs
+++ b/.claude/scripts/test/pending-deploys.test.mjs
@@ -1,5 +1,5 @@
// Tests for .claude/scripts/pending-deploys.mjs: decides whether a session has
-// deploy-relevant changes worth a migration round. Config-driven (TB.1/TB.2):
+// deploy-relevant changes worth a migration round. Config-driven:
// the round exists iff config.deploy is present, and relevance comes from
// config.deploy.relevantGlobs (one definition, unified with the orchestrator's
// SIMPLE-review gate).
@@ -50,7 +50,7 @@ const run = (dir, ...args) =>
.toString()
.trim();
-describe("pending-deploys relevance (TB.2)", () => {
+describe("pending-deploys relevance", () => {
test("globToRegexSource anchors and expands ** / *", () => {
expect(globToRegexSource("supabase/**")).toBe("^supabase/.*");
expect(globToRegexSource("**/types.ts")).toBe("^(?:.*/)?types\\.ts");
@@ -99,7 +99,7 @@ describe("pending-deploys", () => {
rmSync(dir, { recursive: true, force: true });
});
- test("no config.deploy -> exit 0 empty (deploy phase not configured, TB.1)", () => {
+ test("no config.deploy -> exit 0 empty (deploy phase not configured)", () => {
const dir = setupRepo({ deploy: false });
git(dir, "checkout", "-q", "session/ab12cd34");
writeFileSync(
diff --git a/docs/learnings/patterns.md b/docs/learnings/patterns.md
index d6c048fc..736fadb6 100644
--- a/docs/learnings/patterns.md
+++ b/docs/learnings/patterns.md
@@ -1,50 +1,5 @@
# Pattern Ledger
-Index of captured patterns (rules, skills, hooks, agents, escalations). See
-`/home/developer/.claude/local/{rules,skills,hooks,agents}/` for artifacts.
-
-## P-001 — Feature-smoke e2e runs before the deploy-time migration exists
-
-- **Status** : resolved (2026-07-17, TB.3 of adr/harness-action-plan.md)
-- **Resolution** : `e2e-smoke.sh` now materializes the session schema before running
- the suite. When the session changed `supabase/schemas/`, it generates a THROWAWAY
- migration from the schema delta into the isolated workdir (`npx supabase db diff`)
- and applies it, so the isolated Postgres has the session's columns. The throwaway
- never leaves the workdir (no file under `supabase/migrations/`). If diff or apply
- fails, the Supabase e2e leg is SKIPPED ("schema pending migration round"), never a
- false FAIL. Detection of "deploy-relevant paths" is unified in
- `config.deploy.relevantGlobs` (TB.2).
-- **Type** : escalation
-- **Created** : 2026-07-17 (session 2e030b92, TASK-001)
-- **Last updated** : 2026-07-17 (session 2e030b92, TASK-001)
-- **Symptom** : `.claude/scripts/e2e-smoke.sh` fails specs that persist newly-added
- schema columns through the real Supabase/PostgREST API. In session 2e030b92,
- `e2e/TASK-001-company-twitter-fax-fields.spec.ts` failed 2/8 tests (new fields not
- persisting/rendering, plus a secondary Mobile Chrome nav timeout), even though the
- ticket's own scope was correct (schema files only, no SQL migration, per the harness
- rule that ticket developers never write migrations).
-- **Trigger** : any COMPLEX ticket that adds/renames columns in `supabase/schemas/*.sql`
- and ships an e2e spec exercising those columns, run through STATE B's Feature-smoke
- step (before promotion, before the deploy-time migration round exists).
-- **Why no additive lever** : `e2e-smoke.sh` provisions its isolated stack by copying
- `supabase/migrations/` (line 80-82) into a throwaway workdir and running
- `npx supabase start` (line 102); the Supabase CLI builds the actual Postgres schema
- from `migrations/*.sql` only, it never applies `supabase/schemas/*.sql` directly
- (`schemas/` is source-of-truth used by `supabase db diff` to GENERATE a migration,
- not something the CLI reads to build a DB). The harness deliberately defers migration
- generation to PD-MIG-DEV, after promotion, so that many parallel tickets don't produce
- conflicting migrations. Any schema-touching ticket therefore hits a real gap: its e2e
- spec exercises columns the isolated stack's Postgres does not have yet, and the
- insert/read 400s against PostgREST (unknown column) - a correct failure, not a feature
- bug. Fixing the sequencing requires either (a) teaching `e2e-smoke.sh` to run
- `supabase db diff` and apply a throwaway migration before starting the stack, or (b)
- teaching the orchestrator to skip/defer the Supabase e2e leg for schema-touching diffs
- until after PD-MIG-MERGE. Both are changes to a base harness script
- (`.claude/scripts/e2e-smoke.sh`) or an orchestrator state rule
- (`.claude/agents/orchestrator.md`), out of scope for a documentator/developer/orchestrator
- to self-apply; a maintainer must decide and implement. Will reproduce on every future
- schema-touching COMPLEX ticket until fixed, silently wasting an e2e round each time.
-- **Evidence** : session 2e030b92, TASK-001 - `e2e-smoke.sh` exit=1 log shows
- `getByText('@acmecorp')` not found and a Mobile Chrome `goToCompanies` timeout;
- confirmed `supabase/migrations/` contains no file touching `twitter_handle`/
- `fax_number` while `supabase/schemas/01_tables.sql` and `03_views.sql` do.
+Index of patterns captured by the `documentator` agent (rules, skills, hooks,
+agents, escalations). Empty until the first capture. Artifacts live under
+`/home/developer/.claude/local/{rules,skills,hooks,agents}/`.