claude-fsd 1.3.5 → 1.3.6
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/bin/claudefsd-dev +162 -108
- package/package.json +1 -1
package/bin/claudefsd-dev
CHANGED
|
@@ -42,19 +42,46 @@ while true; do
|
|
|
42
42
|
|
|
43
43
|
time claude -p "
|
|
44
44
|
$MEGATHINKING_MODE
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
You are an AI assistant specialized in project management and software development workflows. Your task is to analyze project documentation and identify the next open task for a developer to work on.
|
|
46
|
+
|
|
47
|
+
Please follow these steps to complete your task:
|
|
48
|
+
|
|
49
|
+
1. Read the contents of docs/PLAN.md in order.
|
|
50
|
+
2. Identify all open tasks that need to be done by the developer.
|
|
51
|
+
3. Gather related context from docs/PLAN.md, BRIEF.md, docs/QUESTIONS.md, and docs/CLAUDE-NOTES.md.
|
|
52
|
+
4. Consider the bigger picture of the project and potential impacts of each task.
|
|
53
|
+
5. Evaluate the risk and efficiency of potential changes for each task.
|
|
54
|
+
6. Prioritize the tasks based primarily on their order in the plan, but also factor in importance, risk, and efficiency.
|
|
55
|
+
7. Select the most appropriate next task and formulate a response that includes the task description and relevant context.
|
|
56
|
+
|
|
57
|
+
In your analysis, please consider the following:
|
|
58
|
+
- Include any sub-bullet points or section information related to the tasks.
|
|
59
|
+
- Think about how each task fits into the overall project goals.
|
|
60
|
+
- Be aware of potential bottlenecks or situations where a single fix might resolve multiple issues.
|
|
61
|
+
- Consider dependencies between tasks and how they might affect prioritization.
|
|
62
|
+
|
|
63
|
+
Before providing your final task description, wrap your analysis inside <analysis> tags in your thinking block. This should include:
|
|
64
|
+
- A list of all open tasks identified from docs/PLAN.md
|
|
65
|
+
- An evaluation of each task's priority, risk, and efficiency
|
|
66
|
+
- Consideration of task dependencies
|
|
67
|
+
- Your reasoning for the final task selection, including how it fits into the project's broader context
|
|
68
|
+
|
|
69
|
+
Your final output should be a clear, concise description of the next task, including relevant context and considerations. Use <task_description> tags for this output.
|
|
70
|
+
|
|
71
|
+
If the plan is complete and there are no more tasks to be done, simply respond with <ALL DONE>.
|
|
72
|
+
|
|
73
|
+
Example output structure:
|
|
74
|
+
|
|
75
|
+
<analysis>
|
|
76
|
+
[Your detailed analysis of the project documentation, list of open tasks, evaluation of each task, consideration of risks and impacts, and reasoning for task selection]
|
|
77
|
+
</analysis>
|
|
78
|
+
|
|
79
|
+
<task_description>
|
|
80
|
+
[A concise description of the next task, including relevant context and considerations]
|
|
81
|
+
</task_description>
|
|
82
|
+
|
|
83
|
+
Please proceed with your analysis and task identification based on the project documentation. Your final output should consist only of the task description in <task_description> tags or <ALL DONE>, and should not duplicate or rehash any of the work you did in the analysis section.
|
|
84
|
+
|
|
58
85
|
" | tee >(cat > $LOGFILE-planner)
|
|
59
86
|
|
|
60
87
|
nexttask=$(cat $LOGFILE-planner)
|
|
@@ -72,80 +99,77 @@ If the plan is complete, say <ALL DONE>.
|
|
|
72
99
|
# run the task
|
|
73
100
|
time claude --dangerously-skip-permissions -p "
|
|
74
101
|
$MEGATHINKING_MODE
|
|
75
|
-
You are an AI developer working within an automated development environment. Your role is
|
|
76
|
-
to complete tasks, plan implementations, and maintain high-quality code. Here is the
|
|
77
|
-
specific task you need to complete:
|
|
102
|
+
You are an AI developer working within an automated development environment. Your role is to complete tasks, plan implementations, and maintain high-quality code. Here is the specific task you need to complete:
|
|
78
103
|
|
|
79
104
|
<next_task>
|
|
80
105
|
$nexttask
|
|
81
106
|
</next_task>
|
|
82
107
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
1. Analyze the task
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Do not include any additional commentary or explanations outside of these tagged sections. Your final output should not duplicate or rehash any of the work you did in the task analysis section.
|
|
108
|
+
Please follow these steps to complete the task:
|
|
109
|
+
|
|
110
|
+
1. Analyze the task and plan your approach. In your thinking block, create an implementation plan wrapped in <implementation_plan> tags. Include:
|
|
111
|
+
- A detailed breakdown of the task into clear, actionable steps
|
|
112
|
+
- For each step, identify:
|
|
113
|
+
* Potential challenges and proposed solutions
|
|
114
|
+
* Architectural implications
|
|
115
|
+
* How to adhere to clean code principles
|
|
116
|
+
* Impact on the overall system
|
|
117
|
+
* Defensive programming techniques to employ
|
|
118
|
+
* Potential edge cases and how to handle them
|
|
119
|
+
* A testing strategy for the component
|
|
120
|
+
|
|
121
|
+
2. Execute the necessary changes or Bash commands to complete the task. Use parallel agents for dev work when appropriate to increase efficiency.
|
|
122
|
+
|
|
123
|
+
3. If a linter is defined for this project, run it and include the output in <linter_output> tags.
|
|
124
|
+
|
|
125
|
+
4. Describe the changes you've made in <changes> tags. Include:
|
|
126
|
+
- A summary of implemented changes
|
|
127
|
+
- Explanation of architectural decisions
|
|
128
|
+
- Potential areas of concern or future considerations
|
|
129
|
+
- Confirmation of defensive programming techniques
|
|
130
|
+
- Verification that all failure modes throw exceptions
|
|
131
|
+
- How edge cases were addressed
|
|
132
|
+
- Outline of the testing strategy
|
|
133
|
+
|
|
134
|
+
5. Add any questions for future reference to the QUESTIONS.md file. Summarize these additions in <questions_update> tags.
|
|
135
|
+
|
|
136
|
+
6. Add any ideas for future improvements or features to the IDEAS.md file. Summarize these additions in <ideas_update> tags.
|
|
137
|
+
|
|
138
|
+
Important guidelines:
|
|
139
|
+
|
|
140
|
+
- Simplicity: Delete old code, avoid hoarding. Use git for version control.
|
|
141
|
+
- Brutal honesty: Disagree when needed. If something fails, let it fail visibly.
|
|
142
|
+
- No cheating: Fix failing tests, don't skip them. No mocks without permission.
|
|
143
|
+
- No production fallbacks: Never catch exceptions to return fallback values or silently handle integration failures.
|
|
144
|
+
- Write real integration tests and run linters/tests frequently during development.
|
|
145
|
+
- Stay on the current git branch if it's a feature branch.
|
|
146
|
+
- Set up pre-commit hooks for basic SDLC protections.
|
|
147
|
+
|
|
148
|
+
Your final output should follow this structure:
|
|
149
|
+
|
|
150
|
+
<execution>
|
|
151
|
+
[Details of executed changes or commands]
|
|
152
|
+
</execution>
|
|
153
|
+
|
|
154
|
+
<linter_output>
|
|
155
|
+
[Linter output, if applicable]
|
|
156
|
+
</linter_output>
|
|
157
|
+
|
|
158
|
+
<changes>
|
|
159
|
+
[Description of changes as outlined above]
|
|
160
|
+
</changes>
|
|
161
|
+
|
|
162
|
+
<questions_update>
|
|
163
|
+
[Summary of questions added to QUESTIONS.md]
|
|
164
|
+
</questions_update>
|
|
165
|
+
|
|
166
|
+
<ideas_update>
|
|
167
|
+
[Summary of ideas added to IDEAS.md]
|
|
168
|
+
</ideas_update>
|
|
169
|
+
|
|
170
|
+
Remember to adhere to the project's standards and best practices. Your work will be reviewed before being committed to the repository.
|
|
171
|
+
|
|
172
|
+
Your final output should consist only of the execution details, linter output, changes description, questions update, and ideas update. Do not duplicate or rehash any of the work you did in the implementation planning section.
|
|
149
173
|
" | tee >(cat > $LOGFILE-developer)
|
|
150
174
|
|
|
151
175
|
echo -e "\033[32m==================================================================\033[0m"
|
|
@@ -170,9 +194,13 @@ Related docs:
|
|
|
170
194
|
|
|
171
195
|
Please review the task and make sure it's complete, and done to satisfaction.
|
|
172
196
|
DO NOT trust the developer's notes, always review the code and build/test results yourself.
|
|
173
|
-
Look for typical 'cheating' patterns
|
|
174
|
-
|
|
175
|
-
|
|
197
|
+
Look for typical 'cheating' patterns:
|
|
198
|
+
- Turning off unit tests or marking them as ignored
|
|
199
|
+
- Taking files out of the compilation configuration
|
|
200
|
+
- Redefining the plan to skip tasks that aren't working
|
|
201
|
+
- Silent exception handlers that return fallback values instead of failing
|
|
202
|
+
- Try/catch blocks that log warnings but continue with empty/default data
|
|
203
|
+
- Any code that catches integration failures and returns mock responses
|
|
176
204
|
|
|
177
205
|
Also note: please avoid switching git branches - stay on the current branch, as
|
|
178
206
|
long as it's a proper feature branch.
|
|
@@ -193,43 +221,69 @@ If you have any ideas for the future, you can add them to IDEAS.md.
|
|
|
193
221
|
|
|
194
222
|
# run the reviewer/tester
|
|
195
223
|
time claude --dangerously-skip-permissions -p "
|
|
196
|
-
You are
|
|
197
|
-
A developer has completed this task: $nexttask
|
|
224
|
+
You are an expert megathinker static code reviewer tasked with thoroughly examining a developer's work on a specific task. Your goal is to ensure the task is complete and meets high-quality standards.
|
|
198
225
|
|
|
199
|
-
|
|
200
|
-
The static code reviewer reviewed the code and its (possibly partial) result is at $LOGFILE-reviewer .
|
|
226
|
+
Here is the task the developer has completed:
|
|
201
227
|
|
|
202
|
-
|
|
228
|
+
<task_description>
|
|
229
|
+
${nexttask}
|
|
230
|
+
</task_description>
|
|
231
|
+
|
|
232
|
+
To conduct your review, you have access to the following related documents:
|
|
203
233
|
- BRIEF.md
|
|
204
234
|
- docs/PLAN.md
|
|
205
235
|
- docs/QUESTIONS.md
|
|
206
236
|
- docs/CLAUDE-NOTES.md
|
|
207
237
|
- README.md
|
|
208
238
|
|
|
209
|
-
|
|
210
|
-
1. Ensuring ALL code compiles successfully
|
|
211
|
-
2. Running ALL tests and linters
|
|
212
|
-
3. Confirming there are truly no remaining tasks
|
|
239
|
+
The developer's notes are available in a file named ${LOGFILE}-developer.
|
|
213
240
|
|
|
214
|
-
|
|
241
|
+
Instructions for your review process:
|
|
215
242
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
243
|
+
1. Carefully read and understand the task description.
|
|
244
|
+
2. Review the developer's notes, but do not trust them implicitly.
|
|
245
|
+
3. Examine the code and build/test results independently.
|
|
246
|
+
4. Look for common 'cheating' patterns, including but not limited to:
|
|
247
|
+
- Disabling or ignoring unit tests
|
|
248
|
+
- Excluding files from compilation
|
|
249
|
+
- Redefining the plan to skip challenging tasks
|
|
250
|
+
- Using silent exception handlers that return fallback values
|
|
251
|
+
- Implementing try/catch blocks that log warnings but continue with empty/default data
|
|
252
|
+
- Catching integration failures and returning mock responses
|
|
253
|
+
5. Stay on the current git branch, as long as it's a proper feature branch.
|
|
254
|
+
6. If the task is incomplete or unsatisfactory, update docs/PLAN.md with detailed suggestions for the developer to complete the task properly.
|
|
255
|
+
7. If you have questions for future consideration, add them to docs/QUESTIONS.md.
|
|
256
|
+
8. If you have ideas for future improvements, add them to docs/IDEAS.md.
|
|
222
257
|
|
|
223
|
-
|
|
224
|
-
long as it's a proper feature branch.
|
|
258
|
+
Before providing your final review, please break down your review process and show your thought process inside <code_review_process> tags in your thinking block:
|
|
225
259
|
|
|
226
|
-
|
|
227
|
-
the
|
|
260
|
+
1. Summarize the task description in your own words.
|
|
261
|
+
2. List out the key documents you need to review.
|
|
262
|
+
3. For each document, note down relevant quotes or information that pertain to the task.
|
|
263
|
+
4. Explicitly look for any 'cheating' patterns and list any that you find.
|
|
264
|
+
5. Consider arguments for and against the task being complete and of satisfactory quality.
|
|
228
265
|
|
|
229
|
-
|
|
266
|
+
This will ensure a thorough and careful examination of the developer's work. It's OK for this section to be quite long.
|
|
230
267
|
|
|
231
|
-
|
|
232
|
-
|
|
268
|
+
After your analysis, provide a summary of your findings and any necessary actions in the following format:
|
|
269
|
+
|
|
270
|
+
<review_summary>
|
|
271
|
+
Task Status: [Complete/Incomplete]
|
|
272
|
+
Quality Assessment: [Satisfactory/Unsatisfactory]
|
|
273
|
+
|
|
274
|
+
Key Findings:
|
|
275
|
+
1. [Finding 1]
|
|
276
|
+
2. [Finding 2]
|
|
277
|
+
...
|
|
278
|
+
|
|
279
|
+
Actions Taken:
|
|
280
|
+
- [Action 1, e.g., 'Updated PLAN.md with suggestions for improvement']
|
|
281
|
+
- [Action 2, e.g., 'Added question to QUESTIONS.md']
|
|
282
|
+
...
|
|
283
|
+
|
|
284
|
+
</review_summary>
|
|
285
|
+
|
|
286
|
+
Please proceed with your thorough code review and analysis. Your final output should consist only of the review summary and should not duplicate or rehash any of the work you did in the thinking block.
|
|
233
287
|
" | tee >(cat > $LOGFILE-tester)
|
|
234
288
|
|
|
235
289
|
# Check if verifier has confirmed all tasks are truly complete
|