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 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 "## Overview" >> BRIEF.md
166
- echo "Describe your project here..." >> BRIEF.md
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 "## Goals" >> BRIEF.md
169
- echo "- Goal 1" >> BRIEF.md
170
- echo "- Goal 2" >> BRIEF.md
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 "## Requirements" >> BRIEF.md
173
- echo "- Requirement 1" >> BRIEF.md
174
- echo "- Requirement 2" >> BRIEF.md
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-$round)
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-$round
70
+ codex -m o3 --full-auto -q "$prompt2" > $LOGFILE-ba4
71
71
  else
72
- echo "Codex not available, skipping o3 analysis" > $LOGFILE-ba4-$round
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
- Read docs/PLAN.md in order and tell me what's the first open task that needs to be
46
- done by the developer. Include any context that relates to it, such as sub-bullet
47
- points or the section the todo item lives in.
48
- Also bring in any related context from BRIEF.md, docs/QUESTIONS.md and docs/CLAUDE-NOTES.md.
49
- Really think this through, as
50
- the developer will need not just to have blinders on when doing a dev task, but
51
- also sometimes will need to think about the bigger picture. Particularly if it's
52
- been stuck in the weeds making a ton of changes when sometimes a single fix
53
- can clear out a thousand errors. Please consider what are the lowest risk changes
54
- that achieve the task goal, since you knoow the full plan and the developer
55
- doesn't necessarily see it.
56
-
57
- If the plan is complete, say <ALL DONE>.
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
- Before you begin working on this task, please follow these steps:
84
-
85
- 1. Analyze the task with full megathinking and plan your approach.
86
- Wrap your analysis in <task_analysis> tags inside your thinking block:
87
- <task_analysis>
88
- - Break down the task into clear, actionable steps
89
- - For each step:
90
- - Identify potential challenges
91
- - Propose solutions for each challenge
92
- - Consider architectural implications
93
- - Ensure your plan adheres to clean code principles
94
- - Consider how your changes will affect the overall system
95
- - Verify that your approach uses defensive programming techniques
96
- - Double-check that you're not implementing any 'cheats' (e.g., unnecessary fallbacks, ignoring issues, or marking tests to be ignored)
97
- - Consider potential edge cases and how to handle them
98
- - Think about testing strategies for your changes
99
- - Evaluate the impact on system performance and scalability
100
- </task_analysis>
101
-
102
- 2. Execute the necessary changes or Bash commands to complete the task.
103
- You have the ability to launch parallel agents to do this dev work,
104
- so use this when appropriate to speed up the dev work.
105
-
106
- 3. If a linter is defined for this project, run it after your work.
107
- Include the linter output in <linter_output> tags if applicable.
108
-
109
- 4. Describe the changes you've made:
110
- <changes>
111
- - Provide a clear, concise summary of the implemented changes
112
- - Explain any architectural decisions you made
113
- - Highlight any potential areas of concern or future considerations
114
- - Confirm that your implementation uses defensive programming techniques
115
- - Verify that all failure modes throw exceptions rather than using silent warnings or fallbacks
116
- - Describe how you've addressed potential edge cases
117
- - Outline the testing strategy implemented for these changes
118
- </changes>
119
-
120
- 5. If you have any questions for future reference, add them to the QUESTIONS.md file. Wrap these additions in <questions_update> tags.
121
-
122
- 6. If you have any ideas for future improvements or features, add them to the IDEAS.md file. Wrap these additions in <ideas_update> tags.
123
-
124
- Important guidelines to follow:
125
- - Prioritize simplicity in your code and project structure
126
- - Always use git for version control; do not create backup copies
127
- - Delete unused code and options
128
- - Maintain clean directory structures and consistent file placement
129
- - Be brutally honest about potential issues or disagreements with the given task
130
- - Throw exceptions for errors instead of adding fallbacks; errors should be visible and fixable
131
- - Focus on creating a bulletproof system
132
- - Create unit and integration tests whenever possible, focusing on real system interactions
133
- - Maintain web tests in a WEBTESTS.md file if applicable
134
- - Add lint/architecture/static code analysis tests as you go
135
- - Run cheap and easy tests (lint, architecture, unit) frequently during development
136
- - Please stay on the current git branch if it's a feature branch; don't make new ones and especially don't switch out of it
137
- - If you need basic SDLC protections, just ensure pre-commit hooks are set up, but avoid adding extensive CI/CD infrastructure
138
-
139
- Remember, your work will be reviewed before being committed to the repository. Ensure your changes are well-documented and adhere to the project's standards and best practices.
140
-
141
- Your final output should consist of the following sections in this order:
142
- 1. <execution>
143
- 2. <linter_output> (if applicable)
144
- 3. <changes>
145
- 4. <questions_update> summarizing the questions you added to QUESTIONS.md
146
- 5. <ideas_update> summarizing the ideas you added to IDEAS.md
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, such as turning off unit tests, taking files
174
- out of the compilation configuration, and redefining the plan to skip tasks
175
- that aren't working.
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 a megathinking reviewer, tester, and architect.
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
- The developer's notes are at $LOGFILE-developer .
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
- Related docs:
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
- IMPORTANT: First check if the planner declared the plan complete with <ALL DONE>. If so, you must verify this by:
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
- Only declare the project complete by outputting <VERIFIED_ALL_DONE> if you have verified compilation and testing success.
243
+ Instructions for your review process:
215
244
 
216
- Please review the task and uncommitted changes, and make sure the task is complete, and done to satisfaction.
217
- DO NOT trust the developer's notes, always review the code and build/test results yourself.
218
- Look for typical 'cheating' patterns, such as turning off unit tests, taking files
219
- out of the compilation configuration, and redefining the plan to skip tasks
220
- that aren't working.
221
- If there's a linter defined for this project, run it.
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
- Also note: please avoid switching git branches - stay on the current branch, as
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
- If the task is not complete, adjust the item in docs/PLAN.md with suggestions for
227
- the developer to complete the task properly.
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
- If the task is complete and we're happy with the code, run a git commit+push.
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
- If you have any questions of the user for the future, you can add them to QUESTIONS.md.
232
- If you have any ideas for the future, you can add them to IDEAS.md.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-fsd",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "Claude Full Self Drive tools for autonomous AI-powered development",
5
5
  "bin": {
6
6
  "claude-fsd": "bin/claude-fsd",