@devobsessed/code-captain 0.3.0 → 0.3.3
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/install.js +43 -7
- package/copilot/Directory.Build.props +6 -4
- package/copilot/copilot-instructions.md +39 -6
- package/copilot/prompts/create-spec.prompt.md +46 -7
- package/copilot/prompts/execute-task.prompt.md +32 -0
- package/cursor/commands/create-spec.md +47 -8
- package/cursor/commands/execute-task.md +14 -1
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -444,6 +444,16 @@ class CodeCaptainInstaller {
|
|
|
444
444
|
return recommendations;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
+
// Detect .sln files in the current directory
|
|
448
|
+
async detectSlnFiles() {
|
|
449
|
+
try {
|
|
450
|
+
const entries = await fs.readdir(".");
|
|
451
|
+
return entries.filter((entry) => entry.endsWith(".sln"));
|
|
452
|
+
} catch {
|
|
453
|
+
return [];
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
447
457
|
// Auto-detect IDE preference
|
|
448
458
|
detectIDE() {
|
|
449
459
|
const detections = [];
|
|
@@ -527,9 +537,33 @@ class CodeCaptainInstaller {
|
|
|
527
537
|
const changeInfo = await this.detectChanges(selectedIDE);
|
|
528
538
|
|
|
529
539
|
if (changeInfo.isFirstInstall) {
|
|
530
|
-
// Fresh installation - install everything
|
|
540
|
+
// Fresh installation - install everything, but check for VS Solution View opt-in
|
|
541
|
+
let installVsSolution = false;
|
|
542
|
+
if (selectedIDE === "copilot") {
|
|
543
|
+
// Auto-detect .sln files to determine if VS Solution View is relevant
|
|
544
|
+
const slnFiles = await this.detectSlnFiles();
|
|
545
|
+
if (slnFiles.length > 0) {
|
|
546
|
+
console.log(
|
|
547
|
+
chalk.green(
|
|
548
|
+
`\n✨ Detected .NET solution file(s): ${slnFiles.join(", ")}`
|
|
549
|
+
)
|
|
550
|
+
);
|
|
551
|
+
const { enableVsSolution } = await inquirer.prompt([
|
|
552
|
+
{
|
|
553
|
+
type: "confirm",
|
|
554
|
+
name: "enableVsSolution",
|
|
555
|
+
message:
|
|
556
|
+
"Install VS Solution View (Directory.Build.props) to make Code Captain files visible in Visual Studio Solution Explorer?",
|
|
557
|
+
default: true,
|
|
558
|
+
},
|
|
559
|
+
]);
|
|
560
|
+
installVsSolution = enableVsSolution;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
531
564
|
return {
|
|
532
565
|
installAll: true,
|
|
566
|
+
installVsSolution,
|
|
533
567
|
changeInfo,
|
|
534
568
|
};
|
|
535
569
|
}
|
|
@@ -1111,13 +1145,15 @@ class CodeCaptainInstaller {
|
|
|
1111
1145
|
spinner.text = `Installing files... (${completed}/${files.length})`;
|
|
1112
1146
|
}
|
|
1113
1147
|
|
|
1114
|
-
// Handle Directory.Build.props for vs-solution component
|
|
1148
|
+
// Handle Directory.Build.props for vs-solution component
|
|
1115
1149
|
let vsSolutionResult = null;
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1150
|
+
const shouldInstallVsSolution =
|
|
1151
|
+
(installOptions.installAll && installOptions.installVsSolution) ||
|
|
1152
|
+
(!installOptions.installAll &&
|
|
1153
|
+
selectedComponents &&
|
|
1154
|
+
selectedComponents.includes("vs-solution"));
|
|
1155
|
+
|
|
1156
|
+
if (shouldInstallVsSolution) {
|
|
1121
1157
|
spinner.text = "Installing Directory.Build.props...";
|
|
1122
1158
|
vsSolutionResult = await this.installDirectoryBuildProps();
|
|
1123
1159
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<Project>
|
|
2
|
-
<!-- Code Captain: Make
|
|
2
|
+
<!-- Code Captain: Make Copilot and Code Captain files visible in VS Solution Explorer -->
|
|
3
3
|
<ItemGroup Label="Code Captain">
|
|
4
|
-
<None Include=".github\copilot-instructions.md" Link="Code Captain\copilot-instructions.md" />
|
|
5
|
-
<None Include=".github\agents\**\*" Link="Code Captain\agents\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
6
|
-
<None Include=".github\prompts\**\*" Link="Code Captain\prompts\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
4
|
+
<None Include="$(MSBuildThisFileDirectory).github\copilot-instructions.md" Link="Code Captain\copilot-instructions.md" />
|
|
5
|
+
<None Include="$(MSBuildThisFileDirectory).github\agents\**\*" Link="Code Captain\agents\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
6
|
+
<None Include="$(MSBuildThisFileDirectory).github\prompts\**\*" Link="Code Captain\prompts\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
7
|
+
<None Include="$(MSBuildThisFileDirectory).code-captain\docs\**\*" Link="Code Captain\docs\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
8
|
+
<None Include="$(MSBuildThisFileDirectory).code-captain\specs\**\*" Link="Code Captain\specs\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
7
9
|
</ItemGroup>
|
|
8
10
|
</Project>
|
|
@@ -17,8 +17,34 @@ When a user invokes any Code Captain command, you MUST:
|
|
|
17
17
|
- "Steady as she goes! Code Captain prepared to steer your project to success."
|
|
18
18
|
- "Anchors aweigh! Code Captain ready to lead your development expedition."
|
|
19
19
|
- "All hands on deck! Code Captain here to guide your coding voyage."
|
|
20
|
-
2. **
|
|
21
|
-
3. **
|
|
20
|
+
2. **Locate the repository root (mandatory)** - Before accessing any `.code-captain/` path or executing any command workflow, confirm you are at the repository root. See **Working Directory Bootstrap** below.
|
|
21
|
+
3. **Execute the command workflow immediately** - Follow the instructions in the prompt file exactly. Do NOT describe or summarize the instructions back to the user. Act on them.
|
|
22
|
+
4. **Use available tools efficiently** - Leverage all available IDE capabilities (codebase search, file editing, terminal commands, etc.)
|
|
23
|
+
|
|
24
|
+
## Working Directory Bootstrap
|
|
25
|
+
|
|
26
|
+
IDEs may open the terminal in a sub-project directory instead of the repository root (common with Visual Studio + .NET solutions). The `.code-captain/` folder lives at the repo root, so you MUST locate it before any file access or terminal command that references `.code-captain/`.
|
|
27
|
+
|
|
28
|
+
**Detection steps (run once at the start of every command):**
|
|
29
|
+
|
|
30
|
+
1. **Prefer tool-based search (no shell dependency)** — Use `codebase` or `search` to look for `.code-captain/` or `.git/`. These tools work regardless of shell type or OS. If the repo root is found this way, record the path and skip to step 5.
|
|
31
|
+
2. **If terminal fallback is needed, detect the shell first** — Run this single command via `runCommands`:
|
|
32
|
+
```
|
|
33
|
+
echo $PSVersionTable
|
|
34
|
+
```
|
|
35
|
+
- If the output contains version info (e.g., `PSVersion`), the shell is **PowerShell** (typical: Windows + Visual Studio).
|
|
36
|
+
- If the output is blank or errors, the shell is **bash/zsh** (typical: macOS, Linux, VS Code on any OS).
|
|
37
|
+
- **Record the detected shell type** and use only the matching syntax for all subsequent commands in this session.
|
|
38
|
+
3. **Check for `.code-captain/` in the current directory:**
|
|
39
|
+
- **PowerShell:** `if (Test-Path .code-captain) { 'FOUND' } else { 'NOT_FOUND' }`
|
|
40
|
+
- **Bash/Zsh:** `test -d .code-captain && echo FOUND || echo NOT_FOUND`
|
|
41
|
+
4. If `NOT_FOUND`, navigate to the parent directory and check again. Repeat up to 3 levels:
|
|
42
|
+
- **PowerShell:** `Set-Location .. ; if (Test-Path .code-captain) { Get-Location } else { 'NOT_FOUND' }`
|
|
43
|
+
- **Bash/Zsh:** `cd .. && test -d .code-captain && pwd || echo NOT_FOUND`
|
|
44
|
+
5. Once the root is found, **record the repo root path** and prefix all `.code-captain/` references with that path for the remainder of the session.
|
|
45
|
+
6. If `.code-captain/` is not found after 3 levels, inform the user: "Could not locate the .code-captain directory. Please ensure you opened the repository root folder in your IDE, or run `/initialize` to create the project foundation."
|
|
46
|
+
|
|
47
|
+
**Important:** Do NOT skip this step even if you assume you are at the root. The one-time cost of verification prevents repeated failures and retries.
|
|
22
48
|
|
|
23
49
|
## File Organization
|
|
24
50
|
|
|
@@ -65,15 +91,22 @@ When executing terminal commands via `runCommands`:
|
|
|
65
91
|
3. **CWD preservation** — Use single-expression commands when working in subdirectories: `cd <subdir> && <command>`. Never leave the terminal in a shifted working directory. All `.code-captain/` paths are relative to the repository root.
|
|
66
92
|
4. **Quick verification** — Prefer non-blocking checks over full builds. Use `--dry-run`, `--no-restore`, or type-check-only flags when assessing project health.
|
|
67
93
|
5. **Verify before using npm scripts** — If a `package.json` `test` or `build` script exists, check its contents before running it. Scripts may invoke watch mode or dev servers.
|
|
94
|
+
6. **Detect the shell before running commands** — The shell type varies by IDE and OS. The Working Directory Bootstrap detects this once per session. Use the detected shell type for all commands:
|
|
95
|
+
- **Windows + Visual Studio:** Typically PowerShell. Uses `Test-Path`, `Set-Location`, `Get-ChildItem`, and `;` to chain statements.
|
|
96
|
+
- **macOS / Linux (any IDE):** Typically zsh or bash. Uses `test -d`, `cd`, `ls`, and `&&` to chain statements. PowerShell is NOT available unless explicitly installed.
|
|
97
|
+
- **Windows + VS Code:** Usually PowerShell, but may be configured to use Git Bash, WSL, or CMD.
|
|
98
|
+
- **Path separators:** Always use `/` (forward slash) — it works in PowerShell, bash, and zsh.
|
|
99
|
+
- **When in doubt:** Prefer tool-based operations (`codebase`, `search`, `editFiles`) over terminal commands. Tools are shell-independent.
|
|
68
100
|
|
|
69
101
|
## Monorepo & Solution Awareness
|
|
70
102
|
|
|
71
103
|
Projects may contain multiple sub-projects (e.g., .NET solutions with React frontends). When working in these projects:
|
|
72
104
|
|
|
73
|
-
1. **
|
|
74
|
-
2. **
|
|
75
|
-
3. **
|
|
76
|
-
4. **
|
|
105
|
+
1. **Repo root is already known** — The Working Directory Bootstrap (above) has already located the repo root. Use that recorded path for all `.code-captain/` references.
|
|
106
|
+
2. **Detect project topology early** — Look for `.sln` files, multiple `package.json` files, or workspace configurations (`pnpm-workspace.yaml`, `lerna.json`, `nx.json`). This tells you the project has subdirectories with independent tooling.
|
|
107
|
+
3. **Identify the target subdirectory** — Determine which sub-project contains the code relevant to the current task. Note its path relative to the repo root.
|
|
108
|
+
4. **Root-relative file references** — All `.code-captain/` paths (specs, progress trackers, docs) are relative to the repository root, not any subdirectory. When running terminal commands in a subdirectory, always return to or reference the repo root path for `.code-captain/` operations.
|
|
109
|
+
5. **Subdirectory-specific tooling** — Each sub-project may have its own `package.json`, test runner, build tool, and configuration. Don't assume the root-level tooling applies to subdirectories.
|
|
77
110
|
|
|
78
111
|
## Behavioral Rules
|
|
79
112
|
|
|
@@ -11,12 +11,36 @@ Your mission: Turn the user's rough feature idea into a clear work specification
|
|
|
11
11
|
|
|
12
12
|
### Phase 1: Contract Establishment (No File Creation)
|
|
13
13
|
|
|
14
|
+
#### Step 1.0: Pre-flight Check
|
|
15
|
+
|
|
16
|
+
Before starting, verify these foundational files exist in `.code-captain/docs/`:
|
|
17
|
+
|
|
18
|
+
- `tech-stack.md`
|
|
19
|
+
- `code-style.md`
|
|
20
|
+
- `objective.md`
|
|
21
|
+
|
|
22
|
+
If **ANY** of these files are missing, inform the user before proceeding:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
I notice this project hasn't been fully initialized — the foundational docs
|
|
26
|
+
(tech-stack, code-style, objective) are missing from .code-captain/docs/.
|
|
27
|
+
Running /initialize first will produce better specification results because
|
|
28
|
+
I'll have your project's architecture, conventions, and patterns as context.
|
|
29
|
+
|
|
30
|
+
Would you like to:
|
|
31
|
+
1. Switch to /initialize now (recommended)
|
|
32
|
+
2. Continue with /create-spec without the foundational context
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If the user chooses option 2, proceed but note that pattern detection will rely entirely on live codebase scanning rather than pre-analyzed documentation.
|
|
36
|
+
|
|
14
37
|
#### Step 1.1: Initial Context Scan
|
|
15
38
|
|
|
16
39
|
- Scan existing `.code-captain/specs/` for related specifications
|
|
17
40
|
- Analyze current codebase architecture and patterns using `codebase`
|
|
18
|
-
- Load project context files (`tech-stack.md`, `code-style.md`, `objective.md`)
|
|
19
|
-
- **
|
|
41
|
+
- Load project context files if they exist (`tech-stack.md`, `code-style.md`, `objective.md`)
|
|
42
|
+
- **Identify existing codebase patterns** — Catalog naming conventions, project structure patterns, architectural layers (e.g., repository/service/controller), dependency injection patterns, and any established conventions. These become automatic constraints for the specification.
|
|
43
|
+
- **Output:** Context summary including detected patterns (no files created yet)
|
|
20
44
|
|
|
21
45
|
#### Step 1.2: Gap Analysis & Silent Enumeration
|
|
22
46
|
|
|
@@ -85,7 +109,7 @@ When confident, present a contract proposal with any concerns surfaced:
|
|
|
85
109
|
|
|
86
110
|
**Format:**
|
|
87
111
|
|
|
88
|
-
```
|
|
112
|
+
```text
|
|
89
113
|
## Specification Contract
|
|
90
114
|
|
|
91
115
|
**Deliverable:** [One clear sentence describing what will be built]
|
|
@@ -104,6 +128,11 @@ When confident, present a contract proposal with any concerns surfaced:
|
|
|
104
128
|
- [Specific concern about feasibility, performance, or architecture]
|
|
105
129
|
- [Suggested alternative or mitigation approach]
|
|
106
130
|
|
|
131
|
+
**Existing Patterns to Follow:**
|
|
132
|
+
- [Patterns detected from codebase scan or code-style.md — e.g., repository pattern, service layer, naming conventions]
|
|
133
|
+
- [Architectural layers and their relationships]
|
|
134
|
+
- [Any relevant conventions that new code must adhere to]
|
|
135
|
+
|
|
107
136
|
**Recommendations:**
|
|
108
137
|
- [Suggestions for improving the approach based on codebase analysis]
|
|
109
138
|
- [Ways to reduce risk or complexity]
|
|
@@ -132,7 +161,7 @@ This returns the current date in `YYYY-MM-DD` format for folder naming:
|
|
|
132
161
|
|
|
133
162
|
**Generated folder (using determined date):**
|
|
134
163
|
|
|
135
|
-
```
|
|
164
|
+
```text
|
|
136
165
|
.code-captain/specs/[DATE]-{feature-name}/
|
|
137
166
|
├── spec.md # Main specification (from contract)
|
|
138
167
|
├── spec-lite.md # Condensed version for AI context
|
|
@@ -273,7 +302,7 @@ Each user story gets its own file for better organization. Keep implementation t
|
|
|
273
302
|
|
|
274
303
|
Present complete package with file references:
|
|
275
304
|
|
|
276
|
-
```
|
|
305
|
+
```text
|
|
277
306
|
Specification package created successfully!
|
|
278
307
|
|
|
279
308
|
.code-captain/specs/[DATE]-feature-name/
|
|
@@ -302,9 +331,19 @@ Please read through the files and let me know:
|
|
|
302
331
|
- Are the user stories appropriately sized (5-7 tasks each)?
|
|
303
332
|
- Should any stories be split further or combined?
|
|
304
333
|
|
|
305
|
-
Once you're satisfied with the specification,
|
|
334
|
+
Once you're satisfied with the specification, you can start implementation using /execute-task, or we can make any needed adjustments.
|
|
306
335
|
```
|
|
307
336
|
|
|
337
|
+
## CRITICAL: Command Boundary — STOP HERE
|
|
338
|
+
|
|
339
|
+
**This command ENDS after presenting the spec package review above.**
|
|
340
|
+
|
|
341
|
+
- **DO NOT** proceed to implement any code from the stories.
|
|
342
|
+
- **DO NOT** begin executing tasks, writing tests, or making code changes.
|
|
343
|
+
- **DO NOT** offer to "get started on the first story" and then begin coding.
|
|
344
|
+
- Your ONLY job is to create the specification documents. Implementation is handled by the `/execute-task` command.
|
|
345
|
+
- After presenting the final review, **STOP and wait for the user's response.**
|
|
346
|
+
|
|
308
347
|
## Tool Integration
|
|
309
348
|
|
|
310
349
|
**Primary tools:**
|
|
@@ -323,7 +362,7 @@ Once you're satisfied with the specification, I can help you start implementatio
|
|
|
323
362
|
|
|
324
363
|
## Example of expected interaction
|
|
325
364
|
|
|
326
|
-
```
|
|
365
|
+
```text
|
|
327
366
|
Developer: /create-spec "real-time multiplayer chat with blockchain integration"
|
|
328
367
|
|
|
329
368
|
Agent: I'm ready to help you create a comprehensive specification.
|
|
@@ -169,6 +169,17 @@ For each implementation task within the story:
|
|
|
169
169
|
|
|
170
170
|
**STORY CANNOT BE MARKED COMPLETE WITH ANY FAILING TESTS**
|
|
171
171
|
|
|
172
|
+
### CRITICAL: One Story at a Time
|
|
173
|
+
|
|
174
|
+
**Execute ONLY the single selected story per invocation of this command.**
|
|
175
|
+
|
|
176
|
+
- After completing Step 4 (all tasks within the story) and verifying tests pass, proceed to Step 5.
|
|
177
|
+
- After Step 5, **STOP execution completely.**
|
|
178
|
+
- **DO NOT** automatically begin the next story.
|
|
179
|
+
- **DO NOT** ask "shall I continue with story 2?" and then start coding before the user responds.
|
|
180
|
+
- Present the completion summary and **wait for the user** to explicitly request the next story.
|
|
181
|
+
- The user must invoke `/execute-task` again or explicitly ask to continue with the next story.
|
|
182
|
+
|
|
172
183
|
### Step 5: Story Completion & Status Updates
|
|
173
184
|
|
|
174
185
|
Update story file status and progress tracking files with completion details, ensuring all tests pass before marking complete.
|
|
@@ -194,3 +205,24 @@ Update story file status and progress tracking files with completion details, en
|
|
|
194
205
|
- File-based progress tracking in `.code-captain/current-task-progress.md`
|
|
195
206
|
- Story status updates in specification files
|
|
196
207
|
- Test execution results documentation with pass/fail counts
|
|
208
|
+
|
|
209
|
+
## CRITICAL: Command Boundary — STOP After Story Completion
|
|
210
|
+
|
|
211
|
+
After completing a story and updating status files, present a summary in this format:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Story [N]: [Title] — COMPLETED
|
|
215
|
+
|
|
216
|
+
Results:
|
|
217
|
+
- Tests: [X] passed, [Y] failed
|
|
218
|
+
- Tasks completed: [N/N]
|
|
219
|
+
- Acceptance criteria: [all met / details]
|
|
220
|
+
|
|
221
|
+
Updated files:
|
|
222
|
+
- [list of modified/created files]
|
|
223
|
+
|
|
224
|
+
Next available story: Story [N+1]: [Title]
|
|
225
|
+
To continue, invoke /execute-task again or ask me to proceed with the next story.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**STOP here. Do NOT begin the next story automatically.**
|
|
@@ -12,12 +12,36 @@ Generate comprehensive feature specifications using a contract-first approach th
|
|
|
12
12
|
|
|
13
13
|
> Your goal is to turn my rough feature idea into a very clear work specification. You will deliver the complete spec package only after we both agree on the requirements contract. **Important: Challenge ideas that don't make technical or business sense - it's better to surface concerns early than build the wrong thing.**
|
|
14
14
|
|
|
15
|
+
#### Step 1.0: Pre-flight Check
|
|
16
|
+
|
|
17
|
+
Before starting, verify these foundational files exist in `.code-captain/docs/`:
|
|
18
|
+
|
|
19
|
+
- `tech-stack.md`
|
|
20
|
+
- `code-style.md`
|
|
21
|
+
- `objective.md`
|
|
22
|
+
|
|
23
|
+
If **ANY** of these files are missing, inform the user before proceeding:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
I notice this project hasn't been fully initialized — the foundational docs
|
|
27
|
+
(tech-stack, code-style, objective) are missing from .code-captain/docs/.
|
|
28
|
+
Running /initialize first will produce better specification results because
|
|
29
|
+
I'll have your project's architecture, conventions, and patterns as context.
|
|
30
|
+
|
|
31
|
+
Would you like to:
|
|
32
|
+
1. Switch to /initialize now (recommended)
|
|
33
|
+
2. Continue with /create-spec without the foundational context
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If the user chooses option 2, proceed but note that pattern detection will rely entirely on live codebase scanning rather than pre-analyzed documentation.
|
|
37
|
+
|
|
15
38
|
#### Step 1.1: Initial Context Scan
|
|
16
39
|
|
|
17
40
|
- Scan existing `.code-captain/specs/` for related specifications
|
|
18
41
|
- Analyze current codebase architecture and patterns using `codebase_search`
|
|
19
|
-
- Load project context files (`tech-stack.md`, `code-style.md`, `objective.md`)
|
|
20
|
-
- **
|
|
42
|
+
- Load project context files if they exist (`tech-stack.md`, `code-style.md`, `objective.md`)
|
|
43
|
+
- **Identify existing codebase patterns** — Catalog naming conventions, project structure patterns, architectural layers (e.g., repository/service/controller), dependency injection patterns, and any established conventions. These become automatic constraints for the specification.
|
|
44
|
+
- **Output:** Context summary including detected patterns (no files created yet)
|
|
21
45
|
|
|
22
46
|
#### Step 1.2: Gap Analysis & Silent Enumeration
|
|
23
47
|
|
|
@@ -86,7 +110,7 @@ When confident, present a contract proposal with any concerns surfaced:
|
|
|
86
110
|
|
|
87
111
|
**Format:**
|
|
88
112
|
|
|
89
|
-
```
|
|
113
|
+
```text
|
|
90
114
|
## Specification Contract
|
|
91
115
|
|
|
92
116
|
**Deliverable:** [One clear sentence describing what will be built]
|
|
@@ -105,6 +129,11 @@ When confident, present a contract proposal with any concerns surfaced:
|
|
|
105
129
|
- [Specific concern about feasibility, performance, or architecture]
|
|
106
130
|
- [Suggested alternative or mitigation approach]
|
|
107
131
|
|
|
132
|
+
**Existing Patterns to Follow:**
|
|
133
|
+
- [Patterns detected from codebase scan or code-style.md — e.g., repository pattern, service layer, naming conventions]
|
|
134
|
+
- [Architectural layers and their relationships]
|
|
135
|
+
- [Any relevant conventions that new code must adhere to]
|
|
136
|
+
|
|
108
137
|
**💡 Recommendations:**
|
|
109
138
|
- [Suggestions for improving the approach based on codebase analysis]
|
|
110
139
|
- [Ways to reduce risk or complexity]
|
|
@@ -124,7 +153,7 @@ Options:
|
|
|
124
153
|
|
|
125
154
|
#### Step 2.1: Initialize Tracking
|
|
126
155
|
|
|
127
|
-
```
|
|
156
|
+
```text
|
|
128
157
|
# Use todo_write to track creation process
|
|
129
158
|
1. Get current date and create spec folder structure
|
|
130
159
|
2. Generate core specification document
|
|
@@ -145,7 +174,7 @@ This returns the current date in `YYYY-MM-DD` format for folder naming:
|
|
|
145
174
|
|
|
146
175
|
**Generated folder (using determined date):**
|
|
147
176
|
|
|
148
|
-
```
|
|
177
|
+
```text
|
|
149
178
|
.code-captain/specs/[DATE]-{feature-name}/
|
|
150
179
|
├── spec.md # Main specification (from contract)
|
|
151
180
|
├── spec-lite.md # Condensed version for AI context
|
|
@@ -311,7 +340,7 @@ This returns the current date in `YYYY-MM-DD` format for folder naming:
|
|
|
311
340
|
|
|
312
341
|
Present complete package with file references:
|
|
313
342
|
|
|
314
|
-
```
|
|
343
|
+
```text
|
|
315
344
|
✅ Specification package created successfully!
|
|
316
345
|
|
|
317
346
|
📁 .code-captain/specs/[DATE]-feature-name/
|
|
@@ -347,9 +376,19 @@ The user-stories folder structure allows you to:
|
|
|
347
376
|
- Assign different stories to different team members
|
|
348
377
|
- Keep task lists manageable and actionable
|
|
349
378
|
|
|
350
|
-
Once you're satisfied with the specification,
|
|
379
|
+
Once you're satisfied with the specification, you can start implementation using /execute-task, or we can make any needed adjustments.
|
|
351
380
|
```
|
|
352
381
|
|
|
382
|
+
## CRITICAL: Command Boundary — STOP HERE
|
|
383
|
+
|
|
384
|
+
**This command ENDS after presenting the spec package review above.**
|
|
385
|
+
|
|
386
|
+
- **DO NOT** proceed to implement any code from the stories.
|
|
387
|
+
- **DO NOT** begin executing tasks, writing tests, or making code changes.
|
|
388
|
+
- **DO NOT** offer to "get started on the first story" and then begin coding.
|
|
389
|
+
- Your ONLY job is to create the specification documents. Implementation is handled by the `/execute-task` command.
|
|
390
|
+
- After presenting the final review, **STOP and wait for the user's response.**
|
|
391
|
+
|
|
353
392
|
## Key Improvements Over Original
|
|
354
393
|
|
|
355
394
|
### 1. Contract-First Approach
|
|
@@ -379,7 +418,7 @@ Once you're satisfied with the specification, I can help you start implementatio
|
|
|
379
418
|
|
|
380
419
|
## Example Usage Flow
|
|
381
420
|
|
|
382
|
-
```
|
|
421
|
+
```text
|
|
383
422
|
Developer: /create-spec "real-time multiplayer chat with blockchain integration"
|
|
384
423
|
|
|
385
424
|
Agent: I'm ready to help you create a comprehensive specification.
|
|
@@ -285,6 +285,17 @@ Use available testing tools to verify:
|
|
|
285
285
|
4. Repeat until NO tests fail
|
|
286
286
|
5. Only then mark story as complete
|
|
287
287
|
|
|
288
|
+
### CRITICAL: One Story at a Time
|
|
289
|
+
|
|
290
|
+
**Execute ONLY the single selected story per invocation of this command.**
|
|
291
|
+
|
|
292
|
+
- After completing Step 6 (test validation) and verifying tests pass, proceed to Step 7.
|
|
293
|
+
- After Step 7, **STOP execution completely.**
|
|
294
|
+
- **DO NOT** automatically begin the next story.
|
|
295
|
+
- **DO NOT** ask "shall I continue with story 2?" and then start coding before the user responds.
|
|
296
|
+
- Present the completion summary and **wait for the user** to explicitly request the next story.
|
|
297
|
+
- The user must invoke `/execute-task` again or explicitly ask to continue with the next story.
|
|
298
|
+
|
|
288
299
|
### Step 7: Story Completion & Status Updates
|
|
289
300
|
|
|
290
301
|
**Update story file status:**
|
|
@@ -367,9 +378,11 @@ Next available stories:
|
|
|
367
378
|
- Story 2: Password Reset (4 tasks) - Not Started
|
|
368
379
|
- Story 3: Profile Management (6 tasks) - Not Started
|
|
369
380
|
|
|
370
|
-
|
|
381
|
+
To continue, invoke /execute-task again or ask me to proceed with the next story.
|
|
371
382
|
```
|
|
372
383
|
|
|
384
|
+
**STOP here. Do NOT begin the next story automatically.**
|
|
385
|
+
|
|
373
386
|
**If ANY tests fail, present this instead:**
|
|
374
387
|
|
|
375
388
|
```
|