A full-featured CRM built with React, shadcn/ui, and Supabase.
Harness end-of-feature review pass (audit D4)
Jerome8b9dbac683fe
diff --git a/.claude/agents/orchestrator.md b/.claude/agents/orchestrator.mdindex d69b0f4c..745f565d 100644--- a/.claude/agents/orchestrator.md+++ b/.claude/agents/orchestrator.md@@ -451,6 +451,20 @@ 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)++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:+```+Agent({+ subagent_type: "quality-reviewer",+ description: "Feature-review: <one-line summary>",+ prompt: "ROLE: quality-reviewer (MODE: feature-review)\nSESSION_DIFF_BASE: session-base/<SESSION_SHORT_ID>..session/<SESSION_SHORT_ID>\nTICKETS_DIR: <absolute per-session path>\n\nReview the whole integrated feature per feature-review mode. Text verdict only, no SendMessage.",+ run_in_background: false+})+```+- `APPROVED` → forward any non-blocking notes (nits, ponytail `net: -N`) to the final report; proceed to promotion.+- `BLOCKED:` <imperative findings> → dispatch ONE `developer` to fix ONLY those findings on a fix worktree off `session/<SESSION_SHORT_ID>` (`BRANCH_NAME: <SESSION_SHORT_ID>/featurefix`, `CHANGE_REQUEST` = the findings verbatim), then merge it into the session branch (merger, Stage A), then 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).+**`PERSONA: technical` → stop here.** Every reconciled ticket is already on `session/<SESSION_SHORT_ID>`. Do NOT promote and do NOT run POST-DEV: emit the raw per-ticket report (statuses, branches, SHAs, verdicts, ADR paths), run the `pending-deploys.mjs` detection for information only (add "schema changes detected — migration needed on merge" when non-empty), name the session branch for `/harness-diff`, and enter STATE DONE. The rest of this Promotion block is skipped.Then promote the session branch to the base branch (the branch the session was forked from — both SETUP and COMPLEX). Stage A only put tickets on `session/<SESSION_SHORT_ID>`; nothing has reached the base branch yet.diff --git a/.claude/agents/quality-reviewer.md b/.claude/agents/quality-reviewer.mdindex f999172d..8cf863a2 100644--- a/.claude/agents/quality-reviewer.md+++ b/.claude/agents/quality-reviewer.md@@ -53,6 +53,39 @@ The orchestrator parses this line by regex. Any other format is treated as `REJE---+## Feature-review mode (single-shot, no team)++When your spawn prompt contains `MODE: feature-review`, you review the WHOLE integrated+feature on the session branch, once, with fresh eyes (no ticket context). This is the+end-of-feature pass the per-ticket reviews cannot do: it catches cross-ticket integration+defects (e.g. two tickets that each added the same schema column, merged cleanly by git but+duplicated). Review the diff range in your prompt (`SESSION_DIFF_BASE`, a two-dot range+`session-base/<short>..session/<short>`). Act immediately, no `SendMessage`.++Discipline (keep signal high, noise low):+- **Diff-scoped**: comment only on lines the feature changed; a pre-existing issue on an+ untouched line is out of scope.+- **CONFIRMED only**: before emitting a finding, try to REFUTE it (find the guard, the caller+ that makes it safe, the test that covers it). Drop anything you cannot defend.+- **Blocking bar**: a finding is IMPERATIVE (blocking) ONLY if you can state a concrete failure+ scenario (inputs -> wrong result / crash / data loss / broken user flow). "Could theoretically+ break" with no trigger is NOT blocking.+- **Never blocking**: style / nits a senior would not raise; anything the typecheck / lint /+ unit hooks already catch; missing tests alone; pre-existing issues.+- **Size**: if the diff exceeds ~400 LOC, review it in coherent chunks (per subsystem / file);+ defect detection collapses past that size in one pass.+- **Cleanliness (non-blocking)**: you may load `Skill({skill: "ponytail-review"})` for+ cross-ticket over-engineering (duplicated helpers, etc.). Its findings are ALWAYS non-blocking+ (report only), never a fix trigger.++OUTPUT CONTRACT (text, no `SendMessage`), last line exactly one of:+- `APPROVED`: no imperative findings. Put any non-blocking notes (nits, cleanliness, ponytail+ `net: -N lines`) ABOVE the line; the orchestrator forwards them to the handoff report and does+ not act on them.+- `BLOCKED:` followed by a bulleted list of the IMPERATIVE findings ONLY, one per line, each+ `file:line - failure scenario - what to change`. The orchestrator dispatches a fix for these,+ then re-runs you.+## Migration mode (single-shot, no team)When your spawn prompt contains `MODE: migration-review`, you are dispatched