-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: rewrite agent instructions from agent perspective #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
koriyoshi2041
wants to merge
1
commit into
snarktank:main
Choose a base branch
from
koriyoshi2041:fix/agent-perspective-instructions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+45
−27
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,8 @@ | |
|
|
||
| You are an autonomous coding agent working on a software project. | ||
|
|
||
| **Important:** Each session starts fresh with no memory of previous sessions. Your only knowledge comes from reading files. This is why documenting learnings in `progress.txt` and `CLAUDE.md` is critical—future sessions will rely on what you write. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider whether Claude Code agents should document learnings in Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: CLAUDE.md
Line: 5:5
Comment:
Consider whether Claude Code agents should document learnings in `AGENTS.md` (to match `prompt.md:5`) instead of `CLAUDE.md` for cross-tool consistency
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise. |
||
|
|
||
| ## Your Task | ||
|
|
||
| 1. Read the PRD at `prd.json` (in the same directory as this file) | ||
|
|
@@ -22,18 +24,18 @@ APPEND to progress.txt (never replace, always append): | |
| ## [Date/Time] - [Story ID] | ||
| - What was implemented | ||
| - Files changed | ||
| - **Learnings for future iterations:** | ||
| - **Learnings for future sessions:** | ||
| - Patterns discovered (e.g., "this codebase uses X for Y") | ||
| - Gotchas encountered (e.g., "don't forget to update Z when changing W") | ||
| - Useful context (e.g., "the evaluation panel is in component X") | ||
| --- | ||
| ``` | ||
|
|
||
| The learnings section is critical - it helps future iterations avoid repeating mistakes and understand the codebase better. | ||
| The learnings section is critical—future sessions have no memory of your work except what you write to files. Document anything that would help them avoid mistakes or understand the codebase better. | ||
|
|
||
| ## Consolidate Patterns | ||
|
|
||
| If you discover a **reusable pattern** that future iterations should know, add it to the `## Codebase Patterns` section at the TOP of progress.txt (create it if it doesn't exist). This section should consolidate the most important learnings: | ||
| If you discover a **reusable pattern**, add it to the `## Codebase Patterns` section at the TOP of progress.txt (create it if it doesn't exist). This section should consolidate the most important learnings: | ||
|
|
||
| ``` | ||
| ## Codebase Patterns | ||
|
|
@@ -87,18 +89,25 @@ For any story that changes UI, verify it works in the browser if you have browse | |
|
|
||
| If no browser tools are available, note in your progress report that manual browser verification is needed. | ||
|
|
||
| ## Stop Condition | ||
| ## Completion Criteria | ||
|
|
||
| After completing a user story, check if ALL stories have `passes: true`. | ||
| A story is **complete** when you have: | ||
| - Implemented the code (step 5) | ||
| - Passed all quality checks (step 6) | ||
| - Committed with proper message format (step 8) | ||
| - Set `passes: true` in prd.json (step 9) | ||
| - Appended progress to progress.txt (step 10) | ||
|
|
||
| ## Stop Condition | ||
|
|
||
| If ALL stories are complete and passing, reply with: | ||
| <promise>COMPLETE</promise> | ||
| After completing steps 1-10 for a user story, check if ALL stories have `passes: true`. | ||
|
|
||
| If there are still stories with `passes: false`, end your response normally (another iteration will pick up the next story). | ||
| - **If ALL stories are complete:** Reply with `<promise>COMPLETE</promise>` and stop. | ||
| - **If stories remain with `passes: false`:** End your session after completing steps 1-10. Your work is done for this session. | ||
|
|
||
| ## Important | ||
|
|
||
| - Work on ONE story per iteration | ||
| - Work on ONE story per session | ||
| - Commit frequently | ||
| - Keep CI green | ||
| - Read the Codebase Patterns section in progress.txt before starting | ||
| - Read the Codebase Patterns section in progress.txt before starting—it contains knowledge from previous sessions | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File name inconsistency:
CLAUDE.mdshould referenceAGENTS.mdinstead for consistency withprompt.md(which referencesAGENTS.mdon the equivalent line)Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI