You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
definitions.py:185 says "Write tests for every new or changed behavior" but doesn't enforce test-first methodology. The agent is free to write implementation first and backfill tests (or skip them).
Proposal
Replace the single "Write tests for every new or changed behavior" line in the DEVELOP prompt (askcc/definitions.py) with red/green TDD guidance, per the refined suggestion in the comment below.
Acceptance Criteria
askcc/definitions.py DEVELOP prompt replaces the existing Write tests for every new or changed behavior bullet with a Testing methodology — red/green TDD (non-negotiable): block covering RED (write failing test, confirm failure), GREEN (minimum code to pass), and REFACTOR (only on clear duplication/naming), plus rules requiring behavioral assertions and committing tests with implementation.
Prompt includes an explicit phase gate: do NOT proceed from RED to GREEN without a confirmed failing test run.
The DEVELOP prompt's anti-rationalization list gains one new entry rejecting "I'll write the test after, it's faster" (tests-after verify code, not requirement).
Existing Write tests for every new or changed behavior line is removed (no duplication of testing guidance in the DEVELOP prompt).
Tests covering the DEVELOP prompt content assert that the new TDD block and anti-rationalization entry are present (red/green TDD discipline applied to this change itself).
uv run pytest, uv run ruff check, and uv run pyright all pass.
No changes to other prompts (PLAN, PREPARE, VALIDATE, etc.) in this PR.
Dependencies
None.
Rationale
Research shows TDD enforcement significantly improves code quality in agent-driven development. See the updated suggestion comment for findings from Simon Willison's agentic patterns, alexop.dev's forced-TDD workflow, Superpowers, and agent-skills. Test-first catches requirement misunderstandings before implementation begins, rather than discovering them after the code is written.
Context
definitions.py:185says "Write tests for every new or changed behavior" but doesn't enforce test-first methodology. The agent is free to write implementation first and backfill tests (or skip them).Proposal
Replace the single "Write tests for every new or changed behavior" line in the DEVELOP prompt (
askcc/definitions.py) with red/green TDD guidance, per the refined suggestion in the comment below.Acceptance Criteria
askcc/definitions.pyDEVELOP prompt replaces the existingWrite tests for every new or changed behaviorbullet with aTesting methodology — red/green TDD (non-negotiable):block covering RED (write failing test, confirm failure), GREEN (minimum code to pass), and REFACTOR (only on clear duplication/naming), plus rules requiring behavioral assertions and committing tests with implementation.Write tests for every new or changed behaviorline is removed (no duplication of testing guidance in the DEVELOP prompt).uv run pytest,uv run ruff check, anduv run pyrightall pass.Dependencies
None.
Rationale
Research shows TDD enforcement significantly improves code quality in agent-driven development. See the updated suggestion comment for findings from Simon Willison's agentic patterns, alexop.dev's forced-TDD workflow, Superpowers, and agent-skills. Test-first catches requirement misunderstandings before implementation begins, rather than discovering them after the code is written.