Skip to content

Commit dd4360a

Browse files
authored
Merge pull request #59 from ClaydeCode/clayde/issue-58-run-tests-reliably
Fix #58: Reliably run tests after implementation
2 parents e05e10d + 83d3364 commit dd4360a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/clayde/prompts/address_review.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ Steps:
1818
1. Check out the branch: git checkout {{ branch_name }} && git pull origin {{ branch_name }}
1919
2. Read and understand each review comment
2020
3. Make the requested changes
21-
4. Run tests if applicable
21+
4. Run tests if a test command is discoverable (check CLAUDE.md, README, Makefile, package.json, pyproject.toml, justfile):
22+
- If no test runner is discoverable, skip this step.
23+
- If a test suite exists: ensure all tests pass after your changes (pre-existing failures are exempt). Do NOT commit if your changes introduced new test failures.
2224
5. Commit with a clear message referencing the review, e.g.: "Address review: <summary>"
2325
6. Push: git push origin {{ branch_name }}
2426

src/clayde/prompts/implement.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ Steps:
1818
2. Create or switch to branch: git checkout -b {{ branch_name }} (or git checkout {{ branch_name }} if it exists)
1919
3. Implement the plan carefully, following existing code style and paying attention to agents.md files if they exist
2020
4. Write or update tests if applicable
21-
5. Run tests if a test command is discoverable (check CLAUDE.md, README, Makefile, package.json, pyproject.toml, justfile)
21+
5. Run tests if a test command is discoverable (check CLAUDE.md, README, Makefile, package.json, pyproject.toml, justfile):
22+
- If no test runner is discoverable, skip this step.
23+
- If a test suite exists: first note any pre-existing failures (run tests on the base branch before your changes if needed), then ensure all tests pass after your changes (pre-existing failures are exempt). If there are pre-existing failures, you MUST mention them in your PR summary. Do NOT commit if your changes introduced new test failures.
2224
6. Review your own changes for correctness, edge cases, and style and run "just cleanup" if it exists before committing
2325
7. Commit with a clear message, e.g.: "Fix #{{ number }}: <summary>"
2426
8. Push: git push origin {{ branch_name }}

0 commit comments

Comments
 (0)