claude-fsd 1.2.1 → 1.3.1
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 +139 -49
- package/bin/claudefsd-dev +16 -8
- package/package.json +9 -9
package/bin/claudefsd
CHANGED
|
@@ -11,6 +11,31 @@ NC='\033[0m' # No Color
|
|
|
11
11
|
# Source the dependency checker
|
|
12
12
|
source "$(dirname "$0")/claudefsd-check-dependencies"
|
|
13
13
|
|
|
14
|
+
# Function to get saved editor preference
|
|
15
|
+
get_saved_editor() {
|
|
16
|
+
if [ -f ~/.claudefsd ]; then
|
|
17
|
+
grep "^editor=" ~/.claudefsd | cut -d'=' -f2
|
|
18
|
+
fi
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# Function to save editor preference
|
|
22
|
+
save_editor_preference() {
|
|
23
|
+
echo "editor=$1" > ~/.claudefsd
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# Function to determine default choice based on existing docs
|
|
27
|
+
get_default_choice() {
|
|
28
|
+
if [ ! -f BRIEF.md ]; then
|
|
29
|
+
echo "0"
|
|
30
|
+
elif [ ! -f docs/QUESTIONS.md ]; then
|
|
31
|
+
echo "1"
|
|
32
|
+
elif [ ! -f docs/PLAN.md ]; then
|
|
33
|
+
echo "2"
|
|
34
|
+
else
|
|
35
|
+
echo "3"
|
|
36
|
+
fi
|
|
37
|
+
}
|
|
38
|
+
|
|
14
39
|
# Function to display the menu
|
|
15
40
|
show_menu() {
|
|
16
41
|
echo -e "${GREEN}🤖 Claude Full Self Drive (FSD) Tool${NC}"
|
|
@@ -20,11 +45,86 @@ show_menu() {
|
|
|
20
45
|
echo
|
|
21
46
|
echo "What would you like to do?"
|
|
22
47
|
echo
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
48
|
+
|
|
49
|
+
local default_choice=$(get_default_choice)
|
|
50
|
+
|
|
51
|
+
if [ ! -f BRIEF.md ]; then
|
|
52
|
+
echo " 0) Create project brief - Start your project with a BRIEF.md file"
|
|
53
|
+
fi
|
|
54
|
+
echo " 1) Analyze brief - Generate questions from project brief"
|
|
55
|
+
echo " 2) Create plan - Generate requirements and plan from answered questions"
|
|
56
|
+
echo " 3) Development mode - AI agents work on coding tasks"
|
|
26
57
|
echo " 4) Exit"
|
|
27
58
|
echo
|
|
59
|
+
|
|
60
|
+
# Show status of required files
|
|
61
|
+
echo "Current status:"
|
|
62
|
+
[ -f BRIEF.md ] && echo " ✓ BRIEF.md exists" || echo " ✗ BRIEF.md missing"
|
|
63
|
+
[ -f docs/QUESTIONS.md ] && echo " ✓ docs/QUESTIONS.md exists" || echo " ✗ docs/QUESTIONS.md missing"
|
|
64
|
+
[ -f docs/PLAN.md ] && echo " ✓ docs/PLAN.md exists" || echo " ✗ docs/PLAN.md missing"
|
|
65
|
+
echo
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# Function to open file with editor
|
|
69
|
+
open_with_editor() {
|
|
70
|
+
local file="$1"
|
|
71
|
+
local editor_choice="$2"
|
|
72
|
+
local saved_editor=$(get_saved_editor)
|
|
73
|
+
|
|
74
|
+
# If no editor choice provided and we have a saved preference, use it
|
|
75
|
+
if [ -z "$editor_choice" ] && [ -n "$saved_editor" ]; then
|
|
76
|
+
editor_choice=$saved_editor
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
# If still no editor choice, prompt
|
|
80
|
+
if [ -z "$editor_choice" ]; then
|
|
81
|
+
echo "What editor would you like to use?"
|
|
82
|
+
echo " 1) nano (default)"
|
|
83
|
+
echo " 2) vim"
|
|
84
|
+
echo " 3) code (VS Code)"
|
|
85
|
+
echo " 4) cursor"
|
|
86
|
+
echo " 5) other"
|
|
87
|
+
echo
|
|
88
|
+
read -p "Enter your choice [1]: " editor_choice
|
|
89
|
+
editor_choice=${editor_choice:-1}
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
case $editor_choice in
|
|
93
|
+
1|""|nano)
|
|
94
|
+
save_editor_preference "nano"
|
|
95
|
+
nano "$file"
|
|
96
|
+
;;
|
|
97
|
+
2|vim)
|
|
98
|
+
save_editor_preference "vim"
|
|
99
|
+
vim "$file"
|
|
100
|
+
;;
|
|
101
|
+
3|code)
|
|
102
|
+
save_editor_preference "code"
|
|
103
|
+
code . && sleep 2 && code "$file"
|
|
104
|
+
echo "Opening in VS Code. Please edit the file, then press Enter to continue..."
|
|
105
|
+
read -n 1 -s
|
|
106
|
+
;;
|
|
107
|
+
4|cursor)
|
|
108
|
+
save_editor_preference "cursor"
|
|
109
|
+
cursor . && sleep 2 && cursor "$file"
|
|
110
|
+
echo "Opening in Cursor. Please edit the file, then press Enter to continue..."
|
|
111
|
+
read -n 1 -s
|
|
112
|
+
;;
|
|
113
|
+
5|other)
|
|
114
|
+
read -p "Enter editor command: " custom_editor
|
|
115
|
+
save_editor_preference "$custom_editor"
|
|
116
|
+
$custom_editor "$file"
|
|
117
|
+
echo "Please edit the file, then press Enter to continue..."
|
|
118
|
+
read -n 1 -s
|
|
119
|
+
;;
|
|
120
|
+
*)
|
|
121
|
+
# Use the saved editor as a command
|
|
122
|
+
save_editor_preference "$editor_choice"
|
|
123
|
+
$editor_choice "$file"
|
|
124
|
+
echo "Please edit the file, then press Enter to continue..."
|
|
125
|
+
read -n 1 -s
|
|
126
|
+
;;
|
|
127
|
+
esac
|
|
28
128
|
}
|
|
29
129
|
|
|
30
130
|
# Check dependencies first
|
|
@@ -33,16 +133,37 @@ check_dependencies
|
|
|
33
133
|
# If no arguments provided, show interactive menu
|
|
34
134
|
if [ $# -eq 0 ]; then
|
|
35
135
|
show_menu
|
|
36
|
-
|
|
37
|
-
|
|
136
|
+
default_choice=$(get_default_choice)
|
|
137
|
+
read -p "Enter your choice [$default_choice]: " choice
|
|
138
|
+
choice=${choice:-$default_choice} # Use smart default
|
|
38
139
|
|
|
39
140
|
case $choice in
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
141
|
+
0)
|
|
142
|
+
if [ ! -f BRIEF.md ]; then
|
|
143
|
+
echo -e "${GREEN}Creating project brief...${NC}"
|
|
144
|
+
echo
|
|
145
|
+
echo "# Project Brief" > BRIEF.md
|
|
146
|
+
echo "" >> BRIEF.md
|
|
147
|
+
echo "## Overview" >> BRIEF.md
|
|
148
|
+
echo "Describe your project here..." >> BRIEF.md
|
|
149
|
+
echo "" >> BRIEF.md
|
|
150
|
+
echo "## Goals" >> BRIEF.md
|
|
151
|
+
echo "- Goal 1" >> BRIEF.md
|
|
152
|
+
echo "- Goal 2" >> BRIEF.md
|
|
153
|
+
echo "" >> BRIEF.md
|
|
154
|
+
echo "## Requirements" >> BRIEF.md
|
|
155
|
+
echo "- Requirement 1" >> BRIEF.md
|
|
156
|
+
echo "- Requirement 2" >> BRIEF.md
|
|
157
|
+
|
|
158
|
+
open_with_editor "BRIEF.md"
|
|
159
|
+
echo
|
|
160
|
+
echo -e "${GREEN}Brief created! Run claudefsd again to analyze it.${NC}"
|
|
161
|
+
else
|
|
162
|
+
echo -e "${RED}BRIEF.md already exists!${NC}"
|
|
163
|
+
exit 1
|
|
164
|
+
fi
|
|
44
165
|
;;
|
|
45
|
-
|
|
166
|
+
1)
|
|
46
167
|
echo -e "${GREEN}Analyzing brief and generating questions...${NC}"
|
|
47
168
|
echo
|
|
48
169
|
"$(dirname "$0")/claudefsd-analyze-brief"
|
|
@@ -52,44 +173,8 @@ if [ $# -eq 0 ]; then
|
|
|
52
173
|
echo -e "${GREEN}Questions generated in docs/QUESTIONS.md${NC}"
|
|
53
174
|
echo "Please answer the questions before proceeding."
|
|
54
175
|
echo
|
|
55
|
-
echo "What editor would you like to use?"
|
|
56
|
-
echo " 1) nano (default)"
|
|
57
|
-
echo " 2) vim"
|
|
58
|
-
echo " 3) code (VS Code)"
|
|
59
|
-
echo " 4) cursor"
|
|
60
|
-
echo " 5) other"
|
|
61
|
-
echo
|
|
62
|
-
read -p "Enter your choice [1]: " editor_choice
|
|
63
|
-
editor_choice=${editor_choice:-1}
|
|
64
176
|
|
|
65
|
-
|
|
66
|
-
1|"")
|
|
67
|
-
nano docs/QUESTIONS.md
|
|
68
|
-
;;
|
|
69
|
-
2)
|
|
70
|
-
vim docs/QUESTIONS.md
|
|
71
|
-
;;
|
|
72
|
-
3)
|
|
73
|
-
code docs/QUESTIONS.md
|
|
74
|
-
echo "Please answer the questions in VS Code, then press Enter to continue..."
|
|
75
|
-
read -n 1 -s
|
|
76
|
-
;;
|
|
77
|
-
4)
|
|
78
|
-
cursor docs/QUESTIONS.md
|
|
79
|
-
echo "Please answer the questions in Cursor, then press Enter to continue..."
|
|
80
|
-
read -n 1 -s
|
|
81
|
-
;;
|
|
82
|
-
5)
|
|
83
|
-
read -p "Enter editor command: " custom_editor
|
|
84
|
-
$custom_editor docs/QUESTIONS.md
|
|
85
|
-
echo "Please answer the questions, then press Enter to continue..."
|
|
86
|
-
read -n 1 -s
|
|
87
|
-
;;
|
|
88
|
-
*)
|
|
89
|
-
echo -e "${RED}Invalid choice. Please edit docs/QUESTIONS.md manually and run option 3 when ready.${NC}"
|
|
90
|
-
exit 1
|
|
91
|
-
;;
|
|
92
|
-
esac
|
|
177
|
+
open_with_editor "docs/QUESTIONS.md"
|
|
93
178
|
|
|
94
179
|
echo
|
|
95
180
|
echo -e "${GREEN}Now creating plan from answered questions...${NC}"
|
|
@@ -97,11 +182,16 @@ if [ $# -eq 0 ]; then
|
|
|
97
182
|
exec "$(dirname "$0")/claudefsd-create-plan"
|
|
98
183
|
fi
|
|
99
184
|
;;
|
|
100
|
-
|
|
185
|
+
2)
|
|
101
186
|
echo -e "${GREEN}Creating plan from answered questions...${NC}"
|
|
102
187
|
echo
|
|
103
188
|
exec "$(dirname "$0")/claudefsd-create-plan"
|
|
104
189
|
;;
|
|
190
|
+
3)
|
|
191
|
+
echo -e "${GREEN}Starting development mode...${NC}"
|
|
192
|
+
echo
|
|
193
|
+
exec "$(dirname "$0")/claudefsd-dev"
|
|
194
|
+
;;
|
|
105
195
|
4)
|
|
106
196
|
echo "Goodbye!"
|
|
107
197
|
exit 0
|
|
@@ -132,9 +222,9 @@ else
|
|
|
132
222
|
echo "Usage: claudefsd [command]"
|
|
133
223
|
echo
|
|
134
224
|
echo "Commands:"
|
|
135
|
-
echo " dev - Run development mode"
|
|
136
225
|
echo " analyze-brief - Analyze brief and generate questions"
|
|
137
226
|
echo " create-plan - Create plan from answered questions"
|
|
227
|
+
echo " dev - Run development mode"
|
|
138
228
|
echo
|
|
139
229
|
echo "Run without arguments for interactive mode."
|
|
140
230
|
exit 1
|
package/bin/claudefsd-dev
CHANGED
|
@@ -50,14 +50,7 @@ doesn't necessarily see it.
|
|
|
50
50
|
If the plan is complete, say <ALL DONE>.
|
|
51
51
|
" | tee >(cat > $LOGFILE-planner)
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
if grep -q "<ALL DONE>" $LOGFILE-planner; then
|
|
55
|
-
echo -e "\033[32mNo more tasks to do\033[0m"
|
|
56
|
-
exit 0
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
nexttask=$(cat $LOGFILE-planner | grep -v "<ALL DONE>")
|
|
60
|
-
set -e
|
|
53
|
+
nexttask=$(cat $LOGFILE-planner)
|
|
61
54
|
|
|
62
55
|
echo -e "\033[32m==================================================================\033[0m"
|
|
63
56
|
echo -e "\033[32m== RUNNING DEVELOPER TASK\033[0m"
|
|
@@ -200,6 +193,13 @@ Related docs:
|
|
|
200
193
|
- docs/CLAUDE-NOTES.md
|
|
201
194
|
- README.md
|
|
202
195
|
|
|
196
|
+
IMPORTANT: First check if the planner declared the plan complete with <ALL DONE>. If so, you must verify this by:
|
|
197
|
+
1. Ensuring ALL code compiles successfully
|
|
198
|
+
2. Running ALL tests and linters
|
|
199
|
+
3. Confirming there are truly no remaining tasks
|
|
200
|
+
|
|
201
|
+
Only declare the project complete by outputting <VERIFIED_ALL_DONE> if you have verified compilation and testing success.
|
|
202
|
+
|
|
203
203
|
Please review the task and uncommitted changes, and make sure the task is complete, and done to satisfaction.
|
|
204
204
|
DO NOT trust the developer's notes, always review the code and build/test results yourself.
|
|
205
205
|
Look for typical 'cheating' patterns, such as turning off unit tests, taking files
|
|
@@ -216,6 +216,14 @@ If you have any questions of the user for the future, you can add them to QUESTI
|
|
|
216
216
|
If you have any ideas for the future, you can add them to IDEAS.md.
|
|
217
217
|
" | tee >(cat > $LOGFILE-tester)
|
|
218
218
|
|
|
219
|
+
# Check if verifier has confirmed all tasks are truly complete
|
|
220
|
+
set +e
|
|
221
|
+
if grep -q "<VERIFIED_ALL_DONE>" $LOGFILE-tester; then
|
|
222
|
+
echo -e "\033[32mAll tasks verified complete by reviewer - project finished!\033[0m"
|
|
223
|
+
exit 0
|
|
224
|
+
fi
|
|
225
|
+
set -e
|
|
226
|
+
|
|
219
227
|
sleep 1
|
|
220
228
|
done
|
|
221
229
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-fsd",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Claude Full Self Drive tools for autonomous AI-powered development",
|
|
5
5
|
"bin": {
|
|
6
|
-
"claude-fsd": "
|
|
7
|
-
"claudefsd": "
|
|
8
|
-
"claudefsd-check-dependencies": "
|
|
9
|
-
"claudefsd-dev": "
|
|
10
|
-
"claudefsd-analyze-brief": "
|
|
11
|
-
"claudefsd-create-plan": "
|
|
6
|
+
"claude-fsd": "bin/claude-fsd",
|
|
7
|
+
"claudefsd": "bin/claudefsd",
|
|
8
|
+
"claudefsd-check-dependencies": "bin/claudefsd-check-dependencies",
|
|
9
|
+
"claudefsd-dev": "bin/claudefsd-dev",
|
|
10
|
+
"claudefsd-analyze-brief": "bin/claudefsd-analyze-brief",
|
|
11
|
+
"claudefsd-create-plan": "bin/claudefsd-create-plan"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"bin/"
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "https://github.com/yourusername/claude-fsd.git"
|
|
26
|
+
"url": "git+https://github.com/yourusername/claude-fsd.git"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=14.0.0"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|