claude-fsd 1.1.5 → 1.2.0
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 +63 -13
- package/bin/{claudefsd-plan → claudefsd-analyze-brief} +17 -23
- package/bin/claudefsd-create-plan +83 -0
- package/bin/claudefsd-dev +9 -3
- package/package.json +3 -3
- package/bin/claudefsd-plan-gen +0 -73
package/bin/claudefsd
CHANGED
|
@@ -21,8 +21,8 @@ show_menu() {
|
|
|
21
21
|
echo "What would you like to do?"
|
|
22
22
|
echo
|
|
23
23
|
echo " 1) Development mode (default) - AI agents work on coding tasks"
|
|
24
|
-
echo " 2)
|
|
25
|
-
echo " 3)
|
|
24
|
+
echo " 2) Analyze brief - Generate questions from project brief"
|
|
25
|
+
echo " 3) Create plan - Generate requirements and plan from answered questions"
|
|
26
26
|
echo " 4) Exit"
|
|
27
27
|
echo
|
|
28
28
|
}
|
|
@@ -43,14 +43,64 @@ if [ $# -eq 0 ]; then
|
|
|
43
43
|
exec "$(dirname "$0")/claudefsd-dev"
|
|
44
44
|
;;
|
|
45
45
|
2)
|
|
46
|
-
echo -e "${GREEN}
|
|
46
|
+
echo -e "${GREEN}Analyzing brief and generating questions...${NC}"
|
|
47
47
|
echo
|
|
48
|
-
|
|
48
|
+
"$(dirname "$0")/claudefsd-analyze-brief"
|
|
49
|
+
|
|
50
|
+
if [ $? -eq 0 ]; then
|
|
51
|
+
echo
|
|
52
|
+
echo -e "${GREEN}Questions generated in docs/QUESTIONS.md${NC}"
|
|
53
|
+
echo "Please answer the questions before proceeding."
|
|
54
|
+
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
|
+
|
|
65
|
+
case $editor_choice in
|
|
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
|
|
93
|
+
|
|
94
|
+
echo
|
|
95
|
+
echo -e "${GREEN}Now creating plan from answered questions...${NC}"
|
|
96
|
+
echo
|
|
97
|
+
exec "$(dirname "$0")/claudefsd-create-plan"
|
|
98
|
+
fi
|
|
49
99
|
;;
|
|
50
100
|
3)
|
|
51
|
-
echo -e "${GREEN}
|
|
101
|
+
echo -e "${GREEN}Creating plan from answered questions...${NC}"
|
|
52
102
|
echo
|
|
53
|
-
exec "$(dirname "$0")/claudefsd-plan
|
|
103
|
+
exec "$(dirname "$0")/claudefsd-create-plan"
|
|
54
104
|
;;
|
|
55
105
|
4)
|
|
56
106
|
echo "Goodbye!"
|
|
@@ -68,13 +118,13 @@ else
|
|
|
68
118
|
shift
|
|
69
119
|
exec "$(dirname "$0")/claudefsd-dev" "$@"
|
|
70
120
|
;;
|
|
71
|
-
|
|
121
|
+
analyze-brief)
|
|
72
122
|
shift
|
|
73
|
-
exec "$(dirname "$0")/claudefsd-
|
|
123
|
+
exec "$(dirname "$0")/claudefsd-analyze-brief" "$@"
|
|
74
124
|
;;
|
|
75
|
-
plan
|
|
125
|
+
create-plan)
|
|
76
126
|
shift
|
|
77
|
-
exec "$(dirname "$0")/claudefsd-plan
|
|
127
|
+
exec "$(dirname "$0")/claudefsd-create-plan" "$@"
|
|
78
128
|
;;
|
|
79
129
|
*)
|
|
80
130
|
echo -e "${RED}Unknown command: $1${NC}"
|
|
@@ -82,9 +132,9 @@ else
|
|
|
82
132
|
echo "Usage: claudefsd [command]"
|
|
83
133
|
echo
|
|
84
134
|
echo "Commands:"
|
|
85
|
-
echo " dev
|
|
86
|
-
echo "
|
|
87
|
-
echo " plan-
|
|
135
|
+
echo " dev - Run development mode"
|
|
136
|
+
echo " analyze-brief - Analyze brief and generate questions"
|
|
137
|
+
echo " create-plan - Create plan from answered questions"
|
|
88
138
|
echo
|
|
89
139
|
echo "Run without arguments for interactive mode."
|
|
90
140
|
exit 1
|
|
@@ -30,29 +30,29 @@ echo -e "\033[32m===============================================================
|
|
|
30
30
|
prompt1="
|
|
31
31
|
Read all of these documents if they exist:
|
|
32
32
|
- BRIEF.md -- the project brief
|
|
33
|
-
- docs/
|
|
33
|
+
- docs/CLAUDE-NOTES.md -- AI's working notes and understanding
|
|
34
34
|
- docs/PLAN.md -- the project plan
|
|
35
35
|
- docs/QUESTIONS.md -- the project questions
|
|
36
36
|
- docs/IDEAS.md -- the backlog of future ideas
|
|
37
37
|
- docs/WEBTESTS.md -- the project web tests
|
|
38
38
|
- README.md -- the project README
|
|
39
39
|
|
|
40
|
-
Your job, as a megathinking business analyst,
|
|
41
|
-
the requirements and plan.
|
|
40
|
+
Your job, as a megathinking business analyst, is to analyze the project brief and generate clarifying questions.
|
|
42
41
|
|
|
43
|
-
1. Read through
|
|
44
|
-
2.
|
|
45
|
-
3. Create
|
|
42
|
+
1. Read through the BRIEF.md and any existing documents to understand the project.
|
|
43
|
+
2. Generate 10-15 relevant questions to clarify ambiguous aspects of the brief.
|
|
44
|
+
3. Create or update docs/QUESTIONS.md with these questions.
|
|
45
|
+
4. Focus on questions that would help an AI developer avoid making incorrect assumptions.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Types of questions to include:
|
|
48
|
+
- Technical architecture and platform choices
|
|
49
|
+
- User experience and interface requirements
|
|
50
|
+
- Data requirements and integrations
|
|
51
|
+
- Performance and scalability expectations
|
|
52
|
+
- Security and compliance needs
|
|
53
|
+
- Deployment and operational requirements
|
|
48
54
|
|
|
49
|
-
|
|
50
|
-
the system is compliant. Make sure the basics like a git repo and a pre-commit hook that call a custom
|
|
51
|
-
linter are in the plan to be established if they don't exist now.
|
|
52
|
-
Also make sure our work is being done on a feature branch.
|
|
53
|
-
Other than that, DO NOT get distracted by infrastructure, stick with the YAGNI principle.
|
|
54
|
-
Just ensure the basic branching and linter is working and move on.
|
|
55
|
-
Focus on the user's brief and answers from docs/QUESTIONS.md, and the plan.
|
|
55
|
+
DO NOT answer the questions yourself - just generate them for the user to answer.
|
|
56
56
|
"
|
|
57
57
|
|
|
58
58
|
# run BA's
|
|
@@ -68,13 +68,7 @@ else
|
|
|
68
68
|
fi
|
|
69
69
|
|
|
70
70
|
echo -e "\033[32m==================================================================\033[0m"
|
|
71
|
-
echo -e "\033[32m==
|
|
71
|
+
echo -e "\033[32m== ANALYSIS COMPLETE\033[0m"
|
|
72
72
|
echo -e "\033[32m==================================================================\033[0m"
|
|
73
|
-
|
|
74
|
-
echo "
|
|
75
|
-
read -n 1 -s
|
|
76
|
-
|
|
77
|
-
echo "Opening QUESTIONS.md in $EDITOR..."
|
|
78
|
-
$EDITOR QUESTIONS.md
|
|
79
|
-
|
|
80
|
-
$(dirname "$0")/claudefsd-plan-gen
|
|
73
|
+
echo "Questions have been generated in docs/QUESTIONS.md"
|
|
74
|
+
echo "Please answer these questions before proceeding to create the plan."
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Check dependencies
|
|
6
|
+
$(dirname "$0")/claudefsd-check-dependencies
|
|
7
|
+
|
|
8
|
+
mkdir -p logs
|
|
9
|
+
|
|
10
|
+
# Use a temporary directory for tmp files, as codex is sandboxed to this directory
|
|
11
|
+
mkdir -p tmp
|
|
12
|
+
export TMPDIR=tmp/
|
|
13
|
+
|
|
14
|
+
# look for required files
|
|
15
|
+
if [ ! -f BRIEF.md ]; then
|
|
16
|
+
echo "No BRIEF.md file found, please create one first "
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
if [ ! -f docs/QUESTIONS.md ]; then
|
|
21
|
+
echo "No docs/QUESTIONS.md file found. Please run 'claudefsd analyze-brief' first to generate questions."
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
LOGFILE="logs/claude-$(date +%Y%m%d_%H%M%S).txt"
|
|
26
|
+
|
|
27
|
+
echo -e "\033[32m==================================================================\033[0m"
|
|
28
|
+
echo -e "\033[32m== CREATING PLAN FROM ANSWERED QUESTIONS\033[0m"
|
|
29
|
+
echo -e "\033[32m==================================================================\033[0m"
|
|
30
|
+
|
|
31
|
+
prompt2="
|
|
32
|
+
Read all of these documents if they exist:
|
|
33
|
+
- BRIEF.md -- the project brief
|
|
34
|
+
- docs/CLAUDE-NOTES.md -- AI's working notes and understanding
|
|
35
|
+
- docs/PLAN.md -- the project plan
|
|
36
|
+
- docs/QUESTIONS.md -- the project questions (with answers)
|
|
37
|
+
- docs/IDEAS.md -- the backlog of future ideas
|
|
38
|
+
- docs/WEBTESTS.md -- the project web tests
|
|
39
|
+
- README.md -- the project README
|
|
40
|
+
|
|
41
|
+
Your job, as a megathinking architect and project manager, is to create the project plan and working notes.
|
|
42
|
+
|
|
43
|
+
1. Read through the BRIEF.md and the answered questions in docs/QUESTIONS.md.
|
|
44
|
+
2. Update or create docs/CLAUDE-NOTES.md with your interpretation and understanding of the project.
|
|
45
|
+
3. Update or create docs/PLAN.md with a detailed implementation plan based on the brief and answered questions.
|
|
46
|
+
|
|
47
|
+
The CLAUDE-NOTES.md should contain:
|
|
48
|
+
- Your understanding of the project goals and requirements
|
|
49
|
+
- Key technical decisions and rationale
|
|
50
|
+
- Important assumptions and constraints
|
|
51
|
+
- Areas that may need future clarification
|
|
52
|
+
|
|
53
|
+
The PLAN.md should contain:
|
|
54
|
+
- Ordered list of development tasks with [ ] checkboxes
|
|
55
|
+
- Each task should be specific and actionable
|
|
56
|
+
- Include infrastructure setup (git, linting, testing) as early tasks
|
|
57
|
+
- Group related tasks into logical phases
|
|
58
|
+
|
|
59
|
+
Ensure the plan includes basic SDLC infrastructure like git repo setup, pre-commit hooks, and linting.
|
|
60
|
+
Use feature branches for development work. Follow YAGNI principle - don't over-engineer.
|
|
61
|
+
"
|
|
62
|
+
|
|
63
|
+
# run BA's
|
|
64
|
+
echo "Running claude..."
|
|
65
|
+
claude --dangerously-skip-permissions -p "$prompt2" | tee >(cat > $LOGFILE-ba3-$round)
|
|
66
|
+
|
|
67
|
+
# Only run codex if available
|
|
68
|
+
if command -v codex >/dev/null 2>&1; then
|
|
69
|
+
echo "Running codex o3 (results won't display)..."
|
|
70
|
+
codex -m o3 --full-auto -q "$prompt2" > $LOGFILE-ba4-$round
|
|
71
|
+
else
|
|
72
|
+
echo "Codex not available, skipping o3 analysis" > $LOGFILE-ba4-$round
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
echo -e "\033[32m==================================================================\033[0m"
|
|
76
|
+
echo -e "\033[32m== PLAN CREATION COMPLETE\033[0m"
|
|
77
|
+
echo -e "\033[32m==================================================================\033[0m"
|
|
78
|
+
echo "Plan created in docs/PLAN.md"
|
|
79
|
+
echo "Working notes saved in docs/CLAUDE-NOTES.md"
|
|
80
|
+
echo "You can now run 'claudefsd dev' to start the development process."
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
package/bin/claudefsd-dev
CHANGED
|
@@ -38,7 +38,7 @@ $MEGATHINKING_MODE
|
|
|
38
38
|
Read docs/PLAN.md in order and tell me what's the first open task that needs to be
|
|
39
39
|
done by the developer. Include any context that relates to it , such as sub-bullet
|
|
40
40
|
points or the section the todo item lives in.
|
|
41
|
-
Also bring in any related context from BRIEF.md, docs/QUESTIONS.md and docs/
|
|
41
|
+
Also bring in any related context from BRIEF.md, docs/QUESTIONS.md and docs/CLAUDE-NOTES.md.
|
|
42
42
|
Really think this through, as
|
|
43
43
|
the developer will need not just to have blinders on when doing a dev task, but
|
|
44
44
|
also sometimes will need to think about the bigger picture. Particularly if it's
|
|
@@ -63,6 +63,12 @@ If the plan is complete, say <ALL DONE>.
|
|
|
63
63
|
echo -e "\033[32m== RUNNING DEVELOPER TASK\033[0m"
|
|
64
64
|
echo -e "\033[32m==================================================================\033[0m"
|
|
65
65
|
|
|
66
|
+
# Show megathinking banner for developer if active
|
|
67
|
+
if [ $((LOOP_COUNTER % 4)) -eq 0 ]; then
|
|
68
|
+
echo -e "\033[33m**** MEGATHINKING MODE ACTIVATED ****\033[0m"
|
|
69
|
+
echo -e "\033[33mThis is your 4th development cycle. Taking a step back for architectural planning.\033[0m"
|
|
70
|
+
fi
|
|
71
|
+
|
|
66
72
|
# run the task
|
|
67
73
|
time claude --dangerously-skip-permissions -p "
|
|
68
74
|
$MEGATHINKING_MODE
|
|
@@ -156,7 +162,7 @@ Related docs:
|
|
|
156
162
|
- BRIEF.md
|
|
157
163
|
- docs/PLAN.md
|
|
158
164
|
- docs/QUESTIONS.md
|
|
159
|
-
- docs/
|
|
165
|
+
- docs/CLAUDE-NOTES.md
|
|
160
166
|
- README.md
|
|
161
167
|
|
|
162
168
|
Please review the task and make sure it's complete, and done to satisfaction.
|
|
@@ -191,7 +197,7 @@ Related docs:
|
|
|
191
197
|
- BRIEF.md
|
|
192
198
|
- docs/PLAN.md
|
|
193
199
|
- docs/QUESTIONS.md
|
|
194
|
-
- docs/
|
|
200
|
+
- docs/CLAUDE-NOTES.md
|
|
195
201
|
- README.md
|
|
196
202
|
|
|
197
203
|
Please review the task and uncommitted changes, and make sure the task is complete, and done to satisfaction.
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-fsd",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Claude Full Stack Development tools for managing development projects",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-fsd": "./bin/claude-fsd",
|
|
7
7
|
"claudefsd": "./bin/claudefsd",
|
|
8
8
|
"claudefsd-check-dependencies": "./bin/claudefsd-check-dependencies",
|
|
9
9
|
"claudefsd-dev": "./bin/claudefsd-dev",
|
|
10
|
-
"claudefsd-
|
|
11
|
-
"claudefsd-plan
|
|
10
|
+
"claudefsd-analyze-brief": "./bin/claudefsd-analyze-brief",
|
|
11
|
+
"claudefsd-create-plan": "./bin/claudefsd-create-plan"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"bin/"
|
package/bin/claudefsd-plan-gen
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -e
|
|
4
|
-
|
|
5
|
-
# Check dependencies
|
|
6
|
-
$(dirname "$0")/claudefsd-check-dependencies
|
|
7
|
-
|
|
8
|
-
mkdir -p logs
|
|
9
|
-
|
|
10
|
-
# Use a temporary directory for tmp files, as codex is sandboxed to this directory
|
|
11
|
-
mkdir -p tmp
|
|
12
|
-
export TMPDIR=tmp/
|
|
13
|
-
|
|
14
|
-
# look for a brief file
|
|
15
|
-
if [ ! -f BRIEF.md ]; then
|
|
16
|
-
echo "No BRIEF.md file found, please create one first "
|
|
17
|
-
exit 1
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
LOGFILE="logs/claude-$(date +%Y%m%d_%H%M%S).txt"
|
|
21
|
-
|
|
22
|
-
echo -e "\033[32m==================================================================\033[0m"
|
|
23
|
-
echo -e "\033[32m== PROCESSING THE QUESTIONS IN QUESTIONS.md\033[0m"
|
|
24
|
-
echo -e "\033[32m==================================================================\033[0m"
|
|
25
|
-
|
|
26
|
-
prompt2="
|
|
27
|
-
Read all of these documents if they exist:
|
|
28
|
-
- BRIEF.md -- the project brief
|
|
29
|
-
- docs/REQUIREMENTS.md -- the project requirements
|
|
30
|
-
- docs/PLAN.md -- the project plan
|
|
31
|
-
- docs/QUESTIONS.md -- the project questions
|
|
32
|
-
- docs/IDEAS.md -- the backlog of future ideas
|
|
33
|
-
- docs/WEBTESTS.md -- the project web tests
|
|
34
|
-
- README.md -- the project README
|
|
35
|
-
|
|
36
|
-
Your job, as a megathinking business analyst, project manager, architect and product manager, is to help solidify
|
|
37
|
-
the requirements and plan.
|
|
38
|
-
|
|
39
|
-
1. Read through these documents and pay particular attention to the questions and answers in QUESTIONS.md.
|
|
40
|
-
2. Update the docs/REQUIREMENTS.md and docs/PLAN.md documents to incorporate the full brief and all answers.
|
|
41
|
-
3. If the requirements and plan don't already exist, create them.
|
|
42
|
-
|
|
43
|
-
If the brief, questions or answers have been updated, the requirements and plan will need to be updated.
|
|
44
|
-
|
|
45
|
-
As part of this work, please consider our SDLC and what infrastructure will need to be established to ensure
|
|
46
|
-
the system is compliant. Make sure the basics like a git repo and a pre-commit hook that call a custom
|
|
47
|
-
linter are in the plan to be established if they don't exist now.
|
|
48
|
-
Also make sure our work is being done on a feature branch.
|
|
49
|
-
Other than that, DO NOT get distracted by infrastructure, stick with the YAGNI principle.
|
|
50
|
-
Just ensure the basic branching and linter is working and move on.
|
|
51
|
-
Focus on the user's brief and answers from docs/QUESTIONS.md, and the plan.
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
# run BA's
|
|
55
|
-
echo "Running claude..."
|
|
56
|
-
claude --dangerously-skip-permissions -p "$prompt2" | tee >(cat > $LOGFILE-ba3-$round)
|
|
57
|
-
|
|
58
|
-
# Only run codex if available
|
|
59
|
-
if command -v codex >/dev/null 2>&1; then
|
|
60
|
-
echo "Running codex o3 (results won't display)..."
|
|
61
|
-
codex -m o3 --full-auto -q "$prompt2" > $LOGFILE-ba4-$round
|
|
62
|
-
else
|
|
63
|
-
echo "Codex not available, skipping o3 analysis" > $LOGFILE-ba4-$round
|
|
64
|
-
fi
|
|
65
|
-
|
|
66
|
-
echo -e "\033[32m==================================================================\033[0m"
|
|
67
|
-
echo -e "\033[32m== DONE\033[0m"
|
|
68
|
-
echo -e "\033[32m==================================================================\033[0m"
|
|
69
|
-
echo "You can now run claudefsd-dev to start the development process."
|
|
70
|
-
echo "Or do one more round of claudefsd-plan to cover more questions."
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|