claude-fsd 1.5.26 → 1.5.27

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/README.md CHANGED
@@ -137,12 +137,13 @@ This isn't sci-fi level "sleep through the entire project" automation - it's mor
137
137
  - Unix-like environment (macOS, Linux)
138
138
  - [Claude CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude` command)
139
139
 
140
- ### Optional (but recommended)
141
- - [Codex](https://github.com/Codex-ai/codex) - For enhanced code review capabilities
142
- - OpenAI API key - For Codex features (set `OPENAI_API_KEY` environment variable)
143
-
144
140
  ## Project Structure
145
141
 
142
+ **Flexible Structure:** Files can be placed in either `docs/` (default) or root directory `.`
143
+ - System automatically detects file locations
144
+ - Use `docs/` for larger projects to keep files organized
145
+ - Use root `.` for smaller projects for simplicity
146
+
146
147
  Default structure (using 'docs' as working directory):
147
148
  ```
148
149
  your-project/
@@ -158,6 +159,16 @@ your-project/
158
159
  └── [your code files]
159
160
  ```
160
161
 
162
+ Simple structure (files in root):
163
+ ```
164
+ your-project/
165
+ ├── BRIEF.md
166
+ ├── PLAN.md
167
+ ├── CLAUDE-NOTES.md
168
+ ├── logs/
169
+ └── [your code files]
170
+ ```
171
+
161
172
  With custom working directory:
162
173
  ```
163
174
  your-project/
package/bin/claudefsd CHANGED
@@ -42,11 +42,18 @@ get_default_choice() {
42
42
  source "$(dirname "$0")/claudefsd-find-brief"
43
43
  if ! find_brief_file >/dev/null 2>&1; then
44
44
  echo "0"
45
- elif [ ! -f "$WORKING_DIR/REQUIREMENTS.md" ] && [ ! -f "$WORKING_DIR/QUESTIONS.md" ]; then
45
+ fi
46
+
47
+ # Use flexible file detection
48
+ local requirements_file=$(find_project_file "REQUIREMENTS.md" 2>/dev/null || echo "")
49
+ local questions_file=$(find_project_file "QUESTIONS.md" 2>/dev/null || echo "")
50
+ local plan_file=$(find_project_file "PLAN.md" 2>/dev/null || echo "")
51
+
52
+ if [ -z "$requirements_file" ] && [ -z "$questions_file" ]; then
46
53
  echo "1" # Interactive interview
47
- elif [ -f "$WORKING_DIR/REQUIREMENTS.md" ] && [ ! -f "$WORKING_DIR/PLAN.md" ]; then
54
+ elif [ -n "$requirements_file" ] && [ -z "$plan_file" ]; then
48
55
  echo "2" # Create plan from requirements
49
- elif [ -f "$WORKING_DIR/QUESTIONS.md" ] && [ ! -f "$WORKING_DIR/PLAN.md" ]; then
56
+ elif [ -n "$questions_file" ] && [ -z "$plan_file" ]; then
50
57
  echo "2" # Create plan from questions
51
58
  else
52
59
  echo "3" # Development mode
@@ -83,10 +90,14 @@ show_menu() {
83
90
  echo " 1) Interview - Gather requirements through expert Q&A"
84
91
  fi
85
92
 
86
- # Show create plan option based on what exists
87
- if [ -f "$WORKING_DIR/REQUIREMENTS.md" ]; then
93
+ # Show create plan option based on what exists (use flexible detection)
94
+ source "$(dirname "$0")/claudefsd-find-brief"
95
+ local requirements_file=$(find_project_file "REQUIREMENTS.md" 2>/dev/null || echo "")
96
+ local questions_file=$(find_project_file "QUESTIONS.md" 2>/dev/null || echo "")
97
+
98
+ if [ -n "$requirements_file" ]; then
88
99
  echo " 2) Create plan - Generate development plan from requirements"
89
- elif [ -f "$WORKING_DIR/QUESTIONS.md" ]; then
100
+ elif [ -n "$questions_file" ]; then
90
101
  echo " 2) Create plan - Generate plan from answered questions"
91
102
  else
92
103
  echo " 2) [Requires interview first]"
@@ -113,9 +124,14 @@ show_menu() {
113
124
  echo " 📝 Interview session: $session_status ($total_questions questions)"
114
125
  fi
115
126
 
116
- [ -f "$WORKING_DIR/REQUIREMENTS.md" ] && echo " ✓ $WORKING_DIR/REQUIREMENTS.md exists" || echo " ✗ $WORKING_DIR/REQUIREMENTS.md missing"
117
- [ -f "$WORKING_DIR/QUESTIONS.md" ] && echo " ✓ $WORKING_DIR/QUESTIONS.md exists" || echo " ✗ $WORKING_DIR/QUESTIONS.md missing"
118
- [ -f "$WORKING_DIR/PLAN.md" ] && echo " ✓ $WORKING_DIR/PLAN.md exists" || echo " ✗ $WORKING_DIR/PLAN.md missing"
127
+ # Show status with flexible file detection
128
+ local requirements_file=$(find_project_file "REQUIREMENTS.md" 2>/dev/null || echo "")
129
+ local questions_file=$(find_project_file "QUESTIONS.md" 2>/dev/null || echo "")
130
+ local plan_file=$(find_project_file "PLAN.md" 2>/dev/null || echo "")
131
+
132
+ [ -n "$requirements_file" ] && echo " ✓ $requirements_file exists" || echo " ✗ REQUIREMENTS.md missing"
133
+ [ -n "$questions_file" ] && echo " ✓ $questions_file exists" || echo " ✗ QUESTIONS.md missing"
134
+ [ -n "$plan_file" ] && echo " ✓ $plan_file exists" || echo " ✗ PLAN.md missing"
119
135
  echo
120
136
  }
121
137
 
@@ -262,8 +278,12 @@ if [ $# -eq 0 ]; then
262
278
  exec "$(dirname "$0")/claudefsd-interview" --working-dir="$WORKING_DIR"
263
279
  ;;
264
280
  2)
265
- # Create plan - check what source to use
266
- if [ -f "$WORKING_DIR/REQUIREMENTS.md" ] || [ -f "$WORKING_DIR/QUESTIONS.md" ]; then
281
+ # Create plan - check what source to use (flexible detection)
282
+ source "$(dirname "$0")/claudefsd-find-brief"
283
+ requirements_file=$(find_project_file "REQUIREMENTS.md" 2>/dev/null || echo "")
284
+ questions_file=$(find_project_file "QUESTIONS.md" 2>/dev/null || echo "")
285
+
286
+ if [ -n "$requirements_file" ] || [ -n "$questions_file" ]; then
267
287
  echo -e "${GREEN}Creating plan from project inputs...${NC}"
268
288
  echo
269
289
  exec "$(dirname "$0")/claudefsd-create-plan" --working-dir="$WORKING_DIR"
@@ -16,7 +16,7 @@ exec "$(dirname "$0")/claudefsd-analyze-brief-personas" "$@"
16
16
 
17
17
  mkdir -p logs
18
18
 
19
- # Use a temporary directory for tmp files, as codex is sandboxed to this directory
19
+ # Use a temporary directory for tmp files
20
20
  mkdir -p tmp
21
21
  export TMPDIR=tmp/
22
22
 
@@ -67,17 +67,8 @@ DO NOT answer the questions yourself - just generate them for the user to answer
67
67
  "
68
68
 
69
69
  # run BA's
70
- echo "Running claude with sonnet model with ultrathink..."
71
- claude --model sonnet --dangerously-skip-permissions -p "$prompt1" | tee >(cat > $LOGFILE-ba1)
72
-
73
- # Only run codex if available
74
- if command -v codex >/dev/null 2>&1; then
75
- echo "Running codex o3 (results won't display)..."
76
- codex -m o3 --full-auto -q "$prompt1" > $LOGFILE-ba2
77
- else
78
- echo "Warning: codex not found, skipping enhanced analysis"
79
- echo "Codex not available, skipping o3 analysis" > $LOGFILE-ba2
80
- fi
70
+ echo "Running claude with opus model with ultrathink..."
71
+ claude --model opus --dangerously-skip-permissions -p "$prompt1" | tee >(cat > $LOGFILE-ba1)
81
72
 
82
73
  echo -e "\033[32m==================================================================\033[0m"
83
74
  echo -e "\033[32m== ANALYSIS COMPLETE\033[0m"
@@ -83,7 +83,7 @@ Include only personas that are truly relevant to this project.
83
83
  "
84
84
 
85
85
  echo "Determining relevant expert personas..."
86
- PERSONAS=$(claude --model sonnet -p "$coordinator_prompt" 2>/dev/null | tail -1)
86
+ PERSONAS=$(claude --model opus -p "$coordinator_prompt" 2>/dev/null | tail -1)
87
87
 
88
88
  # Clean up and validate personas
89
89
  PERSONAS=$(echo "$PERSONAS" | tr -d ' \n\r')
@@ -172,7 +172,7 @@ Output ONLY the questions, one per line, no numbering or bullets.
172
172
  "
173
173
 
174
174
  # Generate questions
175
- QUESTIONS=$(claude --model sonnet -p "$batch_prompt" 2>/dev/null)
175
+ QUESTIONS=$(claude --model opus -p "$batch_prompt" 2>/dev/null)
176
176
 
177
177
  # Add section header
178
178
  echo "" >> "$WORKING_DIR/QUESTIONS.md"
@@ -19,7 +19,7 @@ $(dirname "$0")/claudefsd-check-dependencies
19
19
 
20
20
  mkdir -p logs
21
21
 
22
- # Use a temporary directory for tmp files, as codex is sandboxed to this directory
22
+ # Use a temporary directory for tmp files
23
23
  mkdir -p tmp
24
24
  export TMPDIR=tmp/
25
25
 
@@ -31,8 +31,12 @@ if [ $? -ne 0 ]; then
31
31
  exit 1
32
32
  fi
33
33
 
34
- if [ ! -f "$WORKING_DIR/QUESTIONS.md" ] && [ ! -f "$WORKING_DIR/REQUIREMENTS.md" ]; then
35
- echo "No $WORKING_DIR/QUESTIONS.md or $WORKING_DIR/REQUIREMENTS.md found."
34
+ # Check for required input files using flexible detection
35
+ questions_file=$(find_project_file "QUESTIONS.md" 2>/dev/null || echo "")
36
+ requirements_file=$(find_project_file "REQUIREMENTS.md" 2>/dev/null || echo "")
37
+
38
+ if [ -z "$questions_file" ] && [ -z "$requirements_file" ]; then
39
+ echo "No QUESTIONS.md or REQUIREMENTS.md found in $WORKING_DIR/ or root directory."
36
40
  echo "Please run either:"
37
41
  echo " - 'claudefsd analyze-brief' to generate questions, or"
38
42
  echo " - 'claudefsd interview' to conduct an interactive interview"
@@ -45,22 +49,48 @@ echo -e "\033[32m===============================================================
45
49
  echo -e "\033[32m== CREATING PLAN FROM PROJECT INPUTS\033[0m"
46
50
  echo -e "\033[32m==================================================================\033[0m"
47
51
 
52
+ # Build list of files to read (using flexible paths)
53
+ plan_file=$(find_project_file "PLAN.md" 2>/dev/null || echo "")
54
+ notes_file=$(find_project_file "CLAUDE-NOTES.md" 2>/dev/null || echo "")
55
+ ideas_file=$(find_project_file "IDEAS.md" 2>/dev/null || echo "")
56
+ webtests_file=$(find_project_file "WEBTESTS.md" 2>/dev/null || echo "")
57
+ readme_file=$(find_project_file "README.md" 2>/dev/null || echo "")
58
+
59
+ # Build file list for prompt
60
+ file_list="- $BRIEF_FILE -- the project brief"
61
+ [ -n "$questions_file" ] && file_list="$file_list
62
+ - $questions_file -- the project questions (with answers) from analyze-brief or interview"
63
+ [ -n "$requirements_file" ] && file_list="$file_list
64
+ - $requirements_file -- consolidated requirements from interview process"
65
+ [ -n "$notes_file" ] && file_list="$file_list
66
+ - $notes_file -- AI's working notes and understanding"
67
+ [ -n "$plan_file" ] && file_list="$file_list
68
+ - $plan_file -- the project plan"
69
+ [ -n "$ideas_file" ] && file_list="$file_list
70
+ - $ideas_file -- the backlog of future ideas"
71
+ [ -n "$webtests_file" ] && file_list="$file_list
72
+ - $webtests_file -- the project web tests"
73
+ [ -n "$readme_file" ] && file_list="$file_list
74
+ - $readme_file -- the project README"
75
+
76
+ # Determine output paths (prefer working dir if it exists, otherwise root)
77
+ if [ -d "$WORKING_DIR" ] && [ "$WORKING_DIR" != "." ]; then
78
+ output_notes="$WORKING_DIR/CLAUDE-NOTES.md"
79
+ output_plan="$WORKING_DIR/PLAN.md"
80
+ else
81
+ output_notes="CLAUDE-NOTES.md"
82
+ output_plan="PLAN.md"
83
+ fi
84
+
48
85
  prompt2="
49
86
  Read and analyze these project files if they exist:
50
- - $BRIEF_FILE -- the project brief
51
- - $WORKING_DIR/QUESTIONS.md -- the project questions (with answers) from analyze-brief or interview
52
- - $WORKING_DIR/REQUIREMENTS.md -- consolidated requirements from interview process
53
- - $WORKING_DIR/CLAUDE-NOTES.md -- AI's working notes and understanding
54
- - $WORKING_DIR/PLAN.md -- the project plan
55
- - $WORKING_DIR/IDEAS.md -- the backlog of future ideas
56
- - $WORKING_DIR/WEBTESTS.md -- the project web tests
57
- - $WORKING_DIR/README.md -- the project README (if exists in working directory)
87
+ $file_list
58
88
 
59
89
  Your job, as a megathinking architect and project manager, is to create the project plan and working notes.
60
90
 
61
- 1. Read through the BRIEF.md and any available requirements/questions ($WORKING_DIR/QUESTIONS.md and/or $WORKING_DIR/REQUIREMENTS.md).
62
- 2. Update or create $WORKING_DIR/CLAUDE-NOTES.md with your interpretation and understanding of the project.
63
- 3. Update or create $WORKING_DIR/PLAN.md with a detailed implementation plan based on all available inputs.
91
+ 1. Read through the BRIEF.md and any available requirements/questions.
92
+ 2. Update or create $output_notes with your interpretation and understanding of the project.
93
+ 3. Update or create $output_plan with a detailed implementation plan based on all available inputs.
64
94
 
65
95
  The CLAUDE-NOTES.md should contain:
66
96
  - Your understanding of the project goals and requirements
@@ -71,7 +101,7 @@ The CLAUDE-NOTES.md should contain:
71
101
  The PLAN.md should contain:
72
102
  - Master plan limited to 100 lines maximum
73
103
  - High-level sections with [ ] checkboxes for completion tracking
74
- - For complex projects, reference detailed sub-plans in separate files ($WORKING_DIR/plan-section1.md, $WORKING_DIR/plan-section2.md, etc.)
104
+ - For complex projects, reference detailed sub-plans in separate files (plan-section1.md, plan-section2.md, etc.)
75
105
  - Include proportional infrastructure setup (basic linting + pre-commit hooks)
76
106
  - Group related tasks into logical phases
77
107
  - If the plan would exceed 100 lines, create a master plan with section references and detailed sub-plans
@@ -102,15 +132,15 @@ Take your time to think deeply about the best solution before generating your pl
102
132
  # Prepend ultrathink to the prompt
103
133
  prompt2="$ultrathink_instruction$prompt2"
104
134
 
105
- # Run planning with sonnet + ultrathink
106
- echo "Running claude with sonnet model (ultrathink mode)..."
107
- claude --model sonnet --dangerously-skip-permissions -p "$prompt2" | tee >(cat > $LOGFILE-ba3)
135
+ # Run planning with opus + ultrathink
136
+ echo "Running claude with opus model (ultrathink mode)..."
137
+ claude --model opus --dangerously-skip-permissions -p "$prompt2" | tee >(cat > $LOGFILE-ba3)
108
138
 
109
139
  echo -e "\033[32m==================================================================\033[0m"
110
140
  echo -e "\033[32m== PLAN CREATION COMPLETE\033[0m"
111
141
  echo -e "\033[32m==================================================================\033[0m"
112
- echo "Plan created in $WORKING_DIR/PLAN.md"
113
- echo "Working notes saved in $WORKING_DIR/CLAUDE-NOTES.md"
142
+ echo "Plan created in $output_plan"
143
+ echo "Working notes saved in $output_notes"
114
144
  echo "You can now run 'claudefsd dev' to start the development process."
115
145
 
116
146
 
package/bin/claudefsd-dev CHANGED
@@ -46,17 +46,18 @@ SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
46
46
 
47
47
  # Function to check for required files
48
48
  check_requirements() {
49
- # Load find_brief_file function
49
+ # Load file finding functions
50
50
  source "$SCRIPT_DIR/claudefsd-find-brief"
51
51
  brief_file=$(find_brief_file 2>/dev/null || echo "")
52
-
52
+
53
53
  if [ -z "$brief_file" ]; then
54
54
  echo "No BRIEF.md file found in $WORKING_DIR/ or root directory. Please create one first."
55
55
  exit 1
56
56
  fi
57
-
58
- if [ ! -f "$WORKING_DIR/PLAN.md" ]; then
59
- echo "No $WORKING_DIR/PLAN.md file found. Please run 'claudefsd create-plan' first."
57
+
58
+ plan_file=$(find_project_file "PLAN.md" 2>/dev/null || echo "")
59
+ if [ -z "$plan_file" ]; then
60
+ echo "No PLAN.md file found in $WORKING_DIR/ or root directory. Please run 'claudefsd create-plan' first."
60
61
  exit 1
61
62
  fi
62
63
  }
@@ -107,10 +108,10 @@ Take your time to think deeply about the optimal approach before proceeding.
107
108
  </ultrathink>
108
109
 
109
110
  "
110
- CLAUDE_MODEL="sonnet"
111
+ CLAUDE_MODEL="opus"
111
112
  else
112
113
  MEGATHINKING_MODE=""
113
- CLAUDE_MODEL="sonnet"
114
+ CLAUDE_MODEL="opus"
114
115
  fi
115
116
 
116
117
  # Build the development prompt combining intelligent task selection with parallel execution
@@ -119,37 +120,43 @@ You are an elite AI developer working in an automated development environment. Y
119
120
 
120
121
  **PROJECT FILES TO READ AND ANALYZE:**"
121
122
 
122
- # Build file list more safely
123
+ # Build file list using flexible file detection
123
124
  source "$SCRIPT_DIR/claudefsd-find-brief"
125
+
124
126
  brief_file=$(find_brief_file 2>/dev/null || echo "")
125
127
  if [ -n "$brief_file" ]; then
126
128
  DEVELOPMENT_PROMPT="$DEVELOPMENT_PROMPT
127
129
  - $brief_file (project brief)"
128
130
  fi
129
-
130
- if [ -f "$WORKING_DIR/PLAN.md" ]; then
131
+
132
+ plan_file=$(find_project_file "PLAN.md" 2>/dev/null || echo "")
133
+ if [ -n "$plan_file" ]; then
131
134
  DEVELOPMENT_PROMPT="$DEVELOPMENT_PROMPT
132
- - $WORKING_DIR/PLAN.md (development plan with tasks)"
135
+ - $plan_file (development plan with tasks)"
133
136
  fi
134
-
135
- if [ -f "$WORKING_DIR/REQUIREMENTS.md" ]; then
137
+
138
+ requirements_file=$(find_project_file "REQUIREMENTS.md" 2>/dev/null || echo "")
139
+ if [ -n "$requirements_file" ]; then
136
140
  DEVELOPMENT_PROMPT="$DEVELOPMENT_PROMPT
137
- - $WORKING_DIR/REQUIREMENTS.md (project requirements)"
141
+ - $requirements_file (project requirements)"
138
142
  fi
139
-
140
- if [ -f "$WORKING_DIR/QUESTIONS.md" ]; then
143
+
144
+ questions_file=$(find_project_file "QUESTIONS.md" 2>/dev/null || echo "")
145
+ if [ -n "$questions_file" ]; then
141
146
  DEVELOPMENT_PROMPT="$DEVELOPMENT_PROMPT
142
- - $WORKING_DIR/QUESTIONS.md (interview Q&A)"
147
+ - $questions_file (interview Q&A)"
143
148
  fi
144
-
145
- if [ -f "$WORKING_DIR/CLAUDE-NOTES.md" ]; then
149
+
150
+ notes_file=$(find_project_file "CLAUDE-NOTES.md" 2>/dev/null || echo "")
151
+ if [ -n "$notes_file" ]; then
146
152
  DEVELOPMENT_PROMPT="$DEVELOPMENT_PROMPT
147
- - $WORKING_DIR/CLAUDE-NOTES.md (technical notes)"
153
+ - $notes_file (technical notes)"
148
154
  fi
149
-
150
- if [ -f "$WORKING_DIR/README.md" ]; then
155
+
156
+ readme_file=$(find_project_file "README.md" 2>/dev/null || echo "")
157
+ if [ -n "$readme_file" ]; then
151
158
  DEVELOPMENT_PROMPT="$DEVELOPMENT_PROMPT
152
- - $WORKING_DIR/README.md (project readme)"
159
+ - $readme_file (project readme)"
153
160
  fi
154
161
 
155
162
  if [ -f "CLAUDE.md" ]; then
@@ -179,7 +186,7 @@ You are an elite AI developer working in an automated development environment. Y
179
186
  **YOUR MISSION:**
180
187
 
181
188
  **PHASE 1: TASK SELECTION**
182
- 1. Read $WORKING_DIR/PLAN.md and work through tasks in order
189
+ 1. Read $plan_file and work through tasks in order
183
190
  2. If a phase references a sub-plan file, read that file as well
184
191
  3. Complete tasks in the order they appear - don't skip ahead
185
192
  4. Identify if tasks can be done in parallel
@@ -189,7 +196,7 @@ Choose the optimal approach:
189
196
 
190
197
  **Option A: Single Focus Task** (for sequential dependencies or complex architectural work)
191
198
  - Implement the next task in order using appropriate tools (Edit, Write, Bash, etc.)
192
- - Update $WORKING_DIR/PLAN.md to mark task as complete with [x]
199
+ - Update $plan_file to mark task as complete with [x]
193
200
 
194
201
  **Option B: Parallel Task Execution** (for independent tasks)
195
202
  - Identify 2-4 related but independent tasks that can be done simultaneously
@@ -199,13 +206,13 @@ Choose the optimal approach:
199
206
 
200
207
  **PHASE 3: COMPLETION CHECK**
201
208
  After completing work:
202
- 1. Update $WORKING_DIR/PLAN.md to reflect completed tasks
209
+ 1. Update $plan_file to reflect completed tasks
203
210
  2. Run any linters or tests specified in the project
204
211
  3. Report on what was accomplished and what remains
205
212
 
206
213
  **EXECUTION GUIDELINES:**
207
214
  - **BUILD BULLETPROOF**: Create robust solutions that handle edge cases
208
- - **STAY FOCUSED**: Only implement what's specified in $WORKING_DIR/PLAN.md
215
+ - **STAY FOCUSED**: Only implement what's specified in $plan_file
209
216
  - **QUALITY FIRST**: Proper error handling, testing, and documentation
210
217
  - **ARCHITECTURAL THINKING**: Consider long-term maintainability
211
218
 
@@ -220,10 +227,10 @@ When using parallel Task agents, ensure each one:
220
227
  **OUTPUT FORMAT:**
221
228
  1. **<task_analysis>**: List identified open tasks and selected approach
222
229
  2. **<execution>**: Details of your ACTUAL implementation work (code written, files edited, commands run)
223
- 3. **<plan_updates>**: How you updated $WORKING_DIR/PLAN.md to reflect progress
230
+ 3. **<plan_updates>**: How you updated $plan_file to reflect progress
224
231
  4. **<completion_check>**: Status of remaining work
225
232
 
226
- IMPORTANT: You must ACTUALLY IMPLEMENT tasks, not just describe what should be done. Use Edit, Write, Bash, and Task tools to complete real work. Begin by analyzing $WORKING_DIR/PLAN.md and then IMPLEMENT the next task in order."
233
+ IMPORTANT: You must ACTUALLY IMPLEMENT tasks, not just describe what should be done. Use Edit, Write, Bash, and Task tools to complete real work. Begin by analyzing $plan_file and then IMPLEMENT the next task in order."
227
234
 
228
235
  # Save the prompt to the log file first
229
236
  echo "=== DEVELOPMENT PROMPT ===" > $LOGFILE
@@ -243,7 +250,7 @@ IMPORTANT: You must ACTUALLY IMPLEMENT tasks, not just describe what should be d
243
250
  echo -e "\033[32m== REVIEWING/VERIFYING WORK\033[0m"
244
251
  echo -e "\033[32m==================================================================\033[0m"
245
252
 
246
- # Define the verifier prompt
253
+ # Define the verifier prompt (reuse plan_file from earlier)
247
254
  VERIFIER_PROMPT="You are an expert code reviewer tasked with verifying a developer's work.
248
255
 
249
256
  **DEVELOPER'S OUTPUT:**
@@ -254,13 +261,13 @@ $DEVELOPER_OUTPUT
254
261
  2. Verify the work was actually completed by checking files
255
262
  3. Look for any cheating patterns (disabled tests, silent fallbacks, etc.)
256
263
  4. Create a git commit (see guidelines below)
257
- 5. Check if ALL tasks in $WORKING_DIR/PLAN.md are now complete
264
+ 5. Check if ALL tasks in $plan_file are now complete
258
265
 
259
266
  **VERIFICATION CHECKLIST:**
260
267
  - Did the developer actually implement code (not just analyze)?
261
268
  - Are all changes working correctly?
262
269
  - Do tests pass (if applicable)?
263
- - Is the task properly marked as complete in $WORKING_DIR/PLAN.md?
270
+ - Is the task properly marked as complete in $plan_file?
264
271
 
265
272
  **GIT COMMIT GUIDELINES:**
266
273
  - If the code looks good: Definitely commit with a clear message
@@ -5,7 +5,7 @@
5
5
  find_brief_file() {
6
6
  # Use environment variable if set, otherwise default to "docs"
7
7
  local working_dir="${CLAUDEFSD_WORKING_DIR:-docs}"
8
-
8
+
9
9
  if [ -f "$working_dir/BRIEF.md" ]; then
10
10
  echo "$working_dir/BRIEF.md"
11
11
  elif [ -f "BRIEF.md" ]; then
@@ -15,6 +15,22 @@ find_brief_file() {
15
15
  fi
16
16
  }
17
17
 
18
+ # Generic function to find any file in working dir or root
19
+ # Usage: find_project_file "PLAN.md"
20
+ # Returns: path to file (prefers $WORKING_DIR/file, falls back to ./file)
21
+ find_project_file() {
22
+ local filename="$1"
23
+ local working_dir="${CLAUDEFSD_WORKING_DIR:-docs}"
24
+
25
+ if [ -f "$working_dir/$filename" ]; then
26
+ echo "$working_dir/$filename"
27
+ elif [ -f "$filename" ]; then
28
+ echo "$filename"
29
+ else
30
+ return 1
31
+ fi
32
+ }
33
+
18
34
  # If called directly, just output the path
19
35
  if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
20
36
  find_brief_file
@@ -193,7 +193,7 @@ prepare_next_question_bg() {
193
193
  coordinator_prompt="${coordinator_prompt//\{qa_summary_by_domain\}/$qa_summary}"
194
194
 
195
195
  # Get coordinator decision
196
- local next_persona=$(claude --model sonnet -p "$coordinator_prompt" 2>/dev/null | tail -1)
196
+ local next_persona=$(claude --model opus -p "$coordinator_prompt" 2>/dev/null | tail -1)
197
197
 
198
198
  # Validate and clean decision - remove spaces, newlines, and markdown formatting
199
199
  next_persona=$(echo "$next_persona" | tr -d ' \n\r' | sed 's/[*_`]//g')
@@ -312,7 +312,7 @@ ${prompt_template}"
312
312
  prompt_template="${prompt_template//\{security_qa_history\}/$persona_qa}"
313
313
 
314
314
  # Get question from Claude
315
- local question=$(claude --model sonnet -p "$prompt_template" 2>/dev/null | tail -1)
315
+ local question=$(claude --model opus -p "$prompt_template" 2>/dev/null | tail -1)
316
316
  echo "$question" > "$QUESTION_CACHE"
317
317
 
318
318
  # Question is ready in cache, no output needed
@@ -384,7 +384,7 @@ Create a comprehensive requirements document that:
384
384
  Format the output as a clean, well-structured markdown document suitable for feeding into project planning.
385
385
  "
386
386
 
387
- claude --model sonnet -p "$consolidation_prompt" > "$REQUIREMENTS_FILE"
387
+ claude --model opus -p "$consolidation_prompt" > "$REQUIREMENTS_FILE"
388
388
 
389
389
  echo -e "${GREEN}Requirements consolidated in $REQUIREMENTS_FILE${NC}"
390
390
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-fsd",
3
- "version": "1.5.26",
3
+ "version": "1.5.27",
4
4
  "description": "Claude Full Self Drive tools for autonomous AI-powered development",
5
5
  "bin": {
6
6
  "claude-fsd": "bin/claude-fsd",