Skip to content

Commit 3baf867

Browse files
authored
Merge pull request #63 from ClaydeCode/clayde/issue-62-agents-readme-prompts
Fix #62: Always consider agents.md and readme files
2 parents b05c4c2 + 3d59a47 commit 3baf867

5 files changed

Lines changed: 30 additions & 17 deletions

File tree

src/clayde/prompts/address_review.j2

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ REPOSITORY ON DISK: {{ repo_path }}
1616

1717
Steps:
1818
1. Check out the branch: git checkout {{ branch_name }} && git pull origin {{ branch_name }}
19-
2. Read and understand each review comment
20-
3. Make the requested changes
21-
4. Run tests if a test command is discoverable (check CLAUDE.md, README, Makefile, package.json, pyproject.toml, justfile):
19+
2. Read the README (README.md, README.rst, README.txt, or README) and agents.md at the root and in any relevant subdirectories.
20+
3. Read and understand each review comment.
21+
4. Make the requested changes.
22+
5. If any changes affect documented usage, configuration, architecture, or behavior, update the README and agents.md accordingly.
23+
6. Run tests if a test command is discoverable (check CLAUDE.md, README, Makefile, package.json, pyproject.toml, justfile):
2224
- If no test runner is discoverable, skip this step.
2325
- 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.
24-
5. Commit with a clear message referencing the review, e.g.: "Address review: <summary>"
25-
6. Push: git push origin {{ branch_name }}
26+
7. Commit with a clear message referencing the review, e.g.: "Address review: <summary>"
27+
8. Push: git push origin {{ branch_name }}
2628

2729
After making all changes, provide a short summary of what you changed in response
2830
to each review comment.

src/clayde/prompts/implement.j2

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ REPOSITORY ON DISK: {{ repo_path }}
1616
Steps:
1717
1. Before creating a branch, check whether branch `{{ branch_name }}` already exists. If so, resume from the existing state rather than starting fresh.
1818
2. Create or switch to branch: git checkout -b {{ branch_name }} (or git checkout {{ branch_name }} if it exists)
19-
3. Implement the plan carefully, following existing code style and paying attention to agents.md files if they exist
20-
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):
19+
3. Read the README (README.md, README.rst, README.txt, or README) and agents.md at the root and in any relevant subdirectories before writing any code.
20+
4. Implement the plan carefully, following existing code style.
21+
5. After implementing, update the README and agents.md as needed to reflect any changes to usage, configuration, architecture, or behavior.
22+
6. Write or update tests if applicable
23+
7. Run tests if a test command is discoverable (check CLAUDE.md, README, Makefile, package.json, pyproject.toml, justfile):
2224
- If no test runner is discoverable, skip this step.
2325
- 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.
24-
6. Review your own changes for correctness, edge cases, and style and run "just cleanup" if it exists before committing
25-
7. Commit with a clear message, e.g.: "Fix #{{ number }}: <summary>"
26-
8. Push: git push origin {{ branch_name }}
26+
8. Review your own changes for correctness, edge cases, and style and run "just cleanup" if it exists before committing
27+
9. Commit with a clear message, e.g.: "Fix #{{ number }}: <summary>"
28+
10. Push: git push origin {{ branch_name }}
2729

2830
Do NOT create a pull request — it will be created automatically after you finish.
2931

src/clayde/prompts/preliminary_plan.j2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ EXISTING COMMENTS:
1212

1313
REPOSITORY ON DISK: {{ repo_path }}
1414

15-
Explore the repository briefly to understand the codebase relevant to this issue.
16-
Pay special attention to agents.md files throughout.
17-
Then produce a SHORT preliminary plan that includes:
15+
Before doing anything else, read the following files if they exist in the repository:
16+
- README (any of: README.md, README.rst, README.txt, README)
17+
- agents.md (at the root and any subdirectories relevant to this issue)
18+
19+
Then explore the repository briefly to understand the codebase relevant to this issue.
20+
Produce a SHORT preliminary plan that includes:
1821
- A brief overview of your approach (a few paragraphs, NOT an exhaustive plan)
1922
- Any clarifying questions you have
2023

src/clayde/prompts/thorough_plan.j2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ DISCUSSION AFTER PRELIMINARY PLAN:
1515

1616
REPOSITORY ON DISK: {{ repo_path }}
1717

18-
Explore the repository to understand the codebase relevant to this issue.
19-
Pay special attention to agents.md files throughout.
20-
Then produce a plan that describes WHAT needs to change, not HOW to change it.
18+
Before doing anything else, read the following files if they exist in the repository:
19+
- README (any of: README.md, README.rst, README.txt, README)
20+
- agents.md (at the root and any subdirectories relevant to this issue)
21+
22+
Then explore the repository to understand the codebase relevant to this issue.
23+
Produce a plan that describes WHAT needs to change, not HOW to change it.
2124
The plan will be reviewed by a human, so prioritize clarity and readability.
2225
Use clear structure, short paragraphs, and plain language.
2326

src/clayde/prompts/update_plan.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ NEW COMMENTS SINCE LAST UPDATE:
1515

1616
REPOSITORY ON DISK: {{ repo_path }}
1717

18+
If you need to re-explore the repository to answer questions or evaluate feedback,
19+
remember to also read the README and agents.md files.
20+
1821
{% if phase == "preliminary" -%}
1922
IMPORTANT: This is a PRELIMINARY plan — a short overview with questions and a
2023
scope estimate. Do NOT escalate it into a thorough implementation plan. Keep the

0 commit comments

Comments
 (0)