ralph-mcp 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/agent.js +22 -4
- package/package.json +1 -1
package/dist/utils/agent.js
CHANGED
|
@@ -57,13 +57,30 @@ ${progressLog ? `## Progress & Learnings\n${progressLog}\n` : ""}
|
|
|
57
57
|
## Pending User Stories
|
|
58
58
|
${storiesText}
|
|
59
59
|
|
|
60
|
+
## Story Size Check (CRITICAL)
|
|
61
|
+
|
|
62
|
+
Before implementing, verify the story is small enough to complete in ONE context window.
|
|
63
|
+
|
|
64
|
+
**Right-sized stories:**
|
|
65
|
+
- Add a database column and migration
|
|
66
|
+
- Add a UI component to an existing page
|
|
67
|
+
- Update a server action with new logic
|
|
68
|
+
- Add a filter dropdown to a list
|
|
69
|
+
|
|
70
|
+
**Too big (should have been split):**
|
|
71
|
+
- "Build the entire dashboard" → schema, queries, UI components, filters
|
|
72
|
+
- "Add authentication" → schema, middleware, login UI, session handling
|
|
73
|
+
- "Refactor the API" → one story per endpoint
|
|
74
|
+
|
|
75
|
+
**If a story seems too big:** Complete what you can, commit it, then call \`ralph_update\` with \`passes: false\` and notes explaining what remains. Do NOT produce broken code trying to finish everything.
|
|
76
|
+
|
|
60
77
|
## Instructions
|
|
61
78
|
|
|
62
79
|
1. Work on ONE user story at a time, starting with the highest priority.
|
|
63
80
|
2. ${progressLog ? "Review the 'Progress & Learnings' section above - especially the 'Codebase Patterns' section at the top." : "Check if 'ralph-progress.md' exists and review it for context."}
|
|
64
81
|
3. Implement the feature to satisfy all acceptance criteria.
|
|
65
82
|
4. Run quality checks: \`pnpm check-types\` and \`pnpm --filter api build\` (adjust for repo structure).
|
|
66
|
-
5. **
|
|
83
|
+
5. **Testing**: Run relevant tests. For UI changes, run component tests if available. If no browser tools are available, note "Manual UI verification needed" in your update notes.
|
|
67
84
|
6. Commit changes with message: \`feat: [${pendingStories[0].storyId}] - ${pendingStories[0].title}\`
|
|
68
85
|
7. **Update Directory CLAUDE.md**: If you discovered reusable patterns, add them to the CLAUDE.md in the directory you modified (create if needed). Only add genuinely reusable knowledge, not story-specific details.
|
|
69
86
|
8. Call \`ralph_update\` to mark the story as passed. Include detailed notes:
|
|
@@ -83,11 +100,12 @@ Provide structured learnings in the \`notes\` field:
|
|
|
83
100
|
**Codebase Pattern:** (if discovered a general pattern worth consolidating)
|
|
84
101
|
\`\`\`
|
|
85
102
|
|
|
86
|
-
## Quality Requirements
|
|
87
|
-
- ALL commits must pass typecheck and build
|
|
103
|
+
## Quality Requirements (Feedback Loops)
|
|
104
|
+
- ALL commits must pass typecheck and build - broken code compounds across iterations
|
|
105
|
+
- Run relevant tests before committing
|
|
88
106
|
- Keep changes focused and minimal
|
|
89
107
|
- Follow existing code patterns
|
|
90
|
-
-
|
|
108
|
+
- Do NOT commit broken code - if checks fail, fix before committing
|
|
91
109
|
|
|
92
110
|
## Stop Condition
|
|
93
111
|
When all stories are complete, report completion.
|
package/package.json
CHANGED