brain-dev 1.0.0 → 1.0.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.
|
@@ -78,14 +78,24 @@ function stepQuestions(brainDir, rootDir) {
|
|
|
78
78
|
]
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
+
const detectionSummary = detection.type === 'brownfield'
|
|
82
|
+
? `Brain detected your existing ${detection.summary}.`
|
|
83
|
+
: 'No existing code detected — starting fresh.';
|
|
84
|
+
|
|
81
85
|
const humanText = [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
`[brain] ${detectionSummary}`,
|
|
87
|
+
'',
|
|
88
|
+
'IMPORTANT: Use the AskUserQuestion tool NOW to ask the user what they want to do.',
|
|
89
|
+
'Do NOT print the options as text. Use AskUserQuestion with these exact parameters:',
|
|
90
|
+
'',
|
|
91
|
+
` question: "${detectionSummary} What do you want to do?"`,
|
|
92
|
+
' options:',
|
|
93
|
+
' - "Story — Start a story (multi-phase feature or milestone)"',
|
|
94
|
+
' - "Task — Work on a specific task"',
|
|
95
|
+
' - "Quick — Quick fix or small change"',
|
|
86
96
|
'',
|
|
87
|
-
'
|
|
88
|
-
'brain-dev new-project --answers \'{"goal":"
|
|
97
|
+
'After the user selects, run:',
|
|
98
|
+
' npx brain-dev new-project --answers \'{"goal":"story|task|quick","name":"ProjectName"}\''
|
|
89
99
|
];
|
|
90
100
|
|
|
91
101
|
const result = {
|
|
@@ -93,7 +103,16 @@ function stepQuestions(brainDir, rootDir) {
|
|
|
93
103
|
detection,
|
|
94
104
|
question,
|
|
95
105
|
mapperInstructions,
|
|
96
|
-
|
|
106
|
+
tool: 'AskUserQuestion',
|
|
107
|
+
askUserQuestion: {
|
|
108
|
+
question: `${detectionSummary} What do you want to do?`,
|
|
109
|
+
options: [
|
|
110
|
+
'Story — Start a story (multi-phase feature or milestone)',
|
|
111
|
+
'Task — Work on a specific task',
|
|
112
|
+
'Quick — Quick fix or small change'
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
instruction: 'Use the AskUserQuestion tool with the askUserQuestion parameters above. Do NOT show options as text.'
|
|
97
116
|
};
|
|
98
117
|
|
|
99
118
|
output(result, humanText.join('\n'));
|
|
@@ -1,38 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brain:new-project
|
|
3
|
-
description:
|
|
3
|
+
description: Detect project, map codebase, and choose next step
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Write
|
|
7
|
-
- Edit
|
|
8
|
-
- Glob
|
|
9
|
-
- Grep
|
|
10
7
|
- Bash
|
|
11
|
-
- Task
|
|
12
8
|
- AskUserQuestion
|
|
13
9
|
---
|
|
14
10
|
<objective>
|
|
15
|
-
|
|
16
|
-
Creates PROJECT.md, REQUIREMENTS.md, and ROADMAP.md with the gathered context.
|
|
11
|
+
Set up Brain for an existing or new project. Detects your stack, maps the codebase, then asks what you want to do next.
|
|
17
12
|
</objective>
|
|
18
13
|
|
|
19
|
-
<context>
|
|
20
|
-
No arguments required. The CLI handles interactive setup.
|
|
21
|
-
</context>
|
|
22
|
-
|
|
23
14
|
<process>
|
|
24
|
-
1. Run the
|
|
15
|
+
1. Run the detection:
|
|
25
16
|
```bash
|
|
26
17
|
npx brain-dev new-project
|
|
27
18
|
```
|
|
28
19
|
|
|
29
|
-
2.
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
2. Read the CLI output. It will contain project detection results (stack, type, sibling projects).
|
|
21
|
+
|
|
22
|
+
3. IMPORTANT: Use the **AskUserQuestion** tool to present the goal question to the user. Format:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Use AskUserQuestion with these parameters:
|
|
26
|
+
- question: The detection summary + "What do you want to do?"
|
|
27
|
+
- options: ["Story — Start a story (multi-phase feature or milestone)", "Task — Work on a specific task", "Quick — Quick fix or small change"]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The user will select one of the options via the interactive UI at the bottom of the screen.
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
4. After the user selects, run the finalize step with their choice:
|
|
33
|
+
```bash
|
|
34
|
+
npx brain-dev new-project --answers '{"goal":"story","name":"ProjectName"}'
|
|
35
|
+
```
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
Replace `"story"` with `"task"` or `"quick"` based on what the user selected.
|
|
38
|
+
Replace `"ProjectName"` with the project name (use the detected framework name or ask).
|
|
36
39
|
|
|
37
|
-
5.
|
|
40
|
+
5. The CLI will set up the project and suggest the next command:
|
|
41
|
+
- Story → `/brain:story "v1.0 Feature title"`
|
|
42
|
+
- Task → `/brain:new-task "description"`
|
|
43
|
+
- Quick → `/brain:quick "description"`
|
|
38
44
|
</process>
|