diff --git a/.claude/rules/agent-workflow.md b/.claude/rules/agent-workflow.md index 18a84f0d..ed0a58fa 100644 --- a/.claude/rules/agent-workflow.md +++ b/.claude/rules/agent-workflow.md @@ -10,7 +10,7 @@ decided feature ──────► /to-spec ──► /to-tickets ──► / new issue ────────────► /triage bug / regression ─────► /diagnosing-bugs ──► /tdd code to write ────────► /tdd (red → green → refactor, one vertical slice at a time) -diff ready ───────────► /code-review ──► /pr +diff ready ───────────► /code-review ──► /pr ──► review on the PR (a person or a review agent, never its author) ──► a human merges design question ──────► /prototype · facts from primary sources ──► /research big, foggy piece of work ► /wayfinder codebase drift ───────► /improve-codebase-architecture @@ -35,6 +35,7 @@ audits ──────────────────► /agent-readines - Read `AGENTS.md`, these rules and `docs/agents/*.md` before working. Read `GLOSSARY.md` and the relevant ADRs when they exist and you have access. - Work on a branch, end with a **draft** PR. Never merge, never push to `main`, never force-push. +- Every PR gets a review on the PR itself before merge, by someone other than its author (see `engineering-standards.md`). Your own `/code-review` on your diff doesn't count as that review, and you never review or approve a PR you wrote. - Run `yarn test` before declaring anything done; paste the result as evidence. - Ask a human when a decision is product or architecture, not code. Record the answer where it belongs (ADR, spec, glossary) rather than only in chat. - Stay in scope: fix what the ticket asks. File what else you notice as a new ticket instead of fixing it on the side. diff --git a/.claude/rules/engineering-standards.md b/.claude/rules/engineering-standards.md index 6142c63f..daf238a4 100644 --- a/.claude/rules/engineering-standards.md +++ b/.claude/rules/engineering-standards.md @@ -39,4 +39,5 @@ A change is done when `yarn test` passes from the repo root. It runs, in order: - `bamlab/flashlight-cloud` (private): put the EPIC URL on the `**Notion EPIC:**` line of the PR template. - `bamlab/flashlight` (public): link the GitHub issue only (`Closes #n`), then add the PR link to the EPIC page in Notion. - Maintenance with no feature of its own (dependencies, CVEs, EOL upgrades, CI, agent rules, refactors) belongs to the EPIC « Maintenance de Flashlight ». No fitting EPIC: create one first with `/log-task`. -- Never push to `main`, never force-push a shared branch, never merge your own PR as an agent. +- **Every PR is reviewed before merge** by at least one reviewer other than its author: a person, or a review agent (`/code-review`, the factory's review-pr). An agent never reviews or approves a PR it wrote, and a human merges. `main` requires one approval on GitHub. +- Never push to `main`, never force-push a shared branch, never merge a PR as an agent. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b40fde07..5f23cf0f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,6 +2,8 @@ Closes # +**Reviewer:** + ## Description