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