From 0a0d00f53a3598a8ed6f34b576f3b1343c5c72f4 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Sat, 13 Jun 2026 15:32:35 -0400 Subject: [PATCH] docs: mandate plan-first, red-green TDD, and pre-commit UI validation Make the three workflow expectations explicit, non-negotiable defaults: always plan before execution, always use red-green TDD, and always attempt manual UI validation before committing (skippable only when the tooling is unavailable, and only with an explicit callout + handoff). Co-Authored-By: Claude Opus 4.8 (1M context) --- AGENTS.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a1db0f3..e640636 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -79,10 +79,22 @@ docs/SWIFT_GUIDELINES.md Swift coding/testing/patterns/security standards ## Workflow expectations (user preference) -- **Red-green TDD**: update `docs/RULES_FEATURE_SPEC.md` first for behavior - changes, write the failing test, run it (compile failure counts as red), - implement, re-run focused tests, then the full suite. Run tests often and - fail fast. +These three are non-negotiable defaults — follow them on every task, not only +when reminded: + +- **Always plan before execution.** Think through and lay out the approach (a + written plan / plan mode for anything non-trivial) and confirm scope before + editing code. Do not start changing files until the plan is clear. +- **Always use red-green TDD.** Update `docs/RULES_FEATURE_SPEC.md` first for + behavior changes, write the failing test, run it (compile failure counts as + red), implement, re-run focused tests, then the full suite. Run tests often + and fail fast. +- **Always attempt to validate the UI manually before committing.** Build and + run the app (simulator/device) and visually confirm the change behaves as + intended. This step **may be skipped only when such tooling is unavailable** + (e.g. the Xcode MCP / a simulator is not reachable in the session) — in that + case, say so explicitly and hand the verification back to the user rather + than silently skipping it. - Conventional commits (`feat:`, `fix:`, `refactor:` …). **Agent attribution is required**: every commit an agent authors or co-authors must end with a `Co-Authored-By:` trailer naming the specific agent/model that did the work,