@devobsessed/code-captain 0.0.8 → 0.0.9

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.
Files changed (37) hide show
  1. package/README.md +35 -27
  2. package/bin/install.js +1165 -978
  3. package/claude-code/agents/code-captain.md +15 -3
  4. package/copilot/chatmodes/Code Captain.chatmode.md +30 -9
  5. package/copilot/prompts/create-adr.prompt.md +6 -4
  6. package/copilot/prompts/create-spec.prompt.md +60 -40
  7. package/copilot/prompts/explain-code.prompt.md +7 -20
  8. package/copilot/prompts/research.prompt.md +14 -27
  9. package/cursor/README.md +72 -68
  10. package/cursor/cc.mdc +13 -35
  11. package/cursor/commands/create-adr.md +6 -12
  12. package/cursor/commands/create-spec.md +66 -54
  13. package/cursor/commands/edit-spec.md +2 -15
  14. package/cursor/commands/execute-task.md +7 -15
  15. package/cursor/commands/explain-code.md +16 -32
  16. package/cursor/commands/initialize.md +18 -17
  17. package/cursor/commands/new-command.md +168 -77
  18. package/cursor/commands/plan-product.md +7 -13
  19. package/cursor/commands/research.md +4 -23
  20. package/cursor/commands/status.md +28 -28
  21. package/cursor/commands/swab.md +4 -12
  22. package/manifest.json +104 -207
  23. package/package.json +2 -3
  24. package/cursor/cc.md +0 -156
  25. package/windsurf/README.md +0 -254
  26. package/windsurf/rules/cc.md +0 -5
  27. package/windsurf/workflows/create-adr.md +0 -331
  28. package/windsurf/workflows/create-spec.md +0 -280
  29. package/windsurf/workflows/edit-spec.md +0 -273
  30. package/windsurf/workflows/execute-task.md +0 -276
  31. package/windsurf/workflows/explain-code.md +0 -288
  32. package/windsurf/workflows/initialize.md +0 -298
  33. package/windsurf/workflows/new-command.md +0 -321
  34. package/windsurf/workflows/plan-product.md +0 -330
  35. package/windsurf/workflows/research.md +0 -240
  36. package/windsurf/workflows/status.md +0 -213
  37. package/windsurf/workflows/swab.md +0 -212
@@ -30,6 +30,7 @@ Conduct systematic research on a topic using structured phases that build upon e
30
30
  4. Plan research phases and approach
31
31
 
32
32
  **Research Structure:**
33
+
33
34
  - Phase 1: Define scope and questions [in_progress]
34
35
  - Phase 2: Initial discovery [pending]
35
36
  - Phase 3: Deep dive analysis [pending]
@@ -87,7 +88,7 @@ Conduct systematic research on a topic using structured phases that build upon e
87
88
  2. Create recommendations based on research
88
89
  3. Identify next steps or areas requiring further investigation
89
90
  4. Document sources and evidence for claims
90
- 5. Determine current date using robust file system method (see Date Determination Process below)
91
+ 5. Get current date using: `npx @devobsessed/code-captain date`
91
92
  6. Create research document in `.code-captain/research/` folder using the standardized format below
92
93
  7. Present findings in appropriate format (summary document, recommendations)
93
94
 
@@ -121,37 +122,18 @@ Conduct systematic research on a topic using structured phases that build upon e
121
122
  - **Further Research:** [What questions remain]
122
123
  - **Decision Points:** [Key choices that need to be made]
123
124
 
124
- ## Date Determination Process
125
-
126
- ### Primary Method: System Clock
127
-
128
- 1. Read the current UTC date from the system clock and format as `YYYY-MM-DD`.
129
- 2. Store it for naming:
130
- `.code-captain/research/[DATE]-[topic-name]-research.md`
131
-
132
- ### Fallback Method: User Confirmation
133
-
134
- If system clock access isn't available:
135
-
136
- 1. **STATE**: "I need to confirm today's date for the research folder"
137
- 2. **ASK**: "What is today's date? (YYYY-MM-DD format)"
138
- 3. **WAIT** for user response
139
- 4. **VALIDATE** format matches `^\d{4}-\d{2}-\d{2}$`
140
- - year: 2024-2030
141
- - month: 01-12
142
- - day: 01-31
143
- 5. **STORE** date for folder naming
125
+ ## Date Determination
144
126
 
145
- ### Error Handling
127
+ Get current date by running: `npx @devobsessed/code-captain date`
146
128
 
147
- - **IF** date_invalid: USE fallback_method
148
- - **IF** both_methods_fail: ERROR "Unable to determine current date"
129
+ This returns the current date in `YYYY-MM-DD` format for folder naming:
130
+ `.code-captain/research/[DATE]-[topic-name]-research.md`
149
131
 
150
132
  ## Research Document Template
151
133
 
152
- **First, determine the current date using the process above.**
134
+ **First, get the current date using: `npx @devobsessed/code-captain date`**
153
135
 
154
- Create a markdown file in `.code-captain/research/[DATE]-[topic-name]-research.md` where `[DATE]` is determined using the robust date process.
136
+ Create a markdown file in `.code-captain/research/[DATE]-[topic-name]-research.md`.
155
137
 
156
138
  **Example:** `.code-captain/research/2024-01-15-blockchain-supply-chain-research.md`
157
139
 
@@ -250,6 +232,7 @@ Use the following structure:
250
232
  ## Tool Integration
251
233
 
252
234
  **Primary tools:**
235
+
253
236
  - `fetch` - Web research and external information gathering
254
237
  - `search` - Finding existing research and related documentation
255
238
  - `editFiles` - Creating research documents and reports
@@ -257,6 +240,7 @@ Use the following structure:
257
240
  - `codebase` - Understanding project context and existing knowledge
258
241
 
259
242
  **Documentation organization:**
243
+
260
244
  - Research documents stored in `.code-captain/research/`
261
245
  - Date-prefixed filenames for chronological organization
262
246
  - Cross-references to related project documentation
@@ -297,6 +281,7 @@ Use the following structure:
297
281
  ## Example Research Progression
298
282
 
299
283
  **Initial Phase:**
284
+
300
285
  ```
301
286
  - Research blockchain solutions for supply chain [in_progress]
302
287
  - Analyze implementation approaches [pending]
@@ -306,6 +291,7 @@ Use the following structure:
306
291
  ```
307
292
 
308
293
  **After Phase 2:**
294
+
309
295
  ```
310
296
  - Research blockchain solutions for supply chain [completed]
311
297
  - Analyze implementation approaches [in_progress]
@@ -316,6 +302,7 @@ Use the following structure:
316
302
  ```
317
303
 
318
304
  **Final:**
305
+
319
306
  ```
320
307
  - Research blockchain solutions for supply chain [completed]
321
308
  - Analyze implementation approaches [completed]
@@ -323,4 +310,4 @@ Use the following structure:
323
310
  - Determine date using file system method [completed]
324
311
  - Create research document in .code-captain/research/ [completed]
325
312
  - Create recommendation report [completed]
326
- ```
313
+ ```
package/cursor/README.md CHANGED
@@ -13,76 +13,82 @@ npx @devobsessed/code-captain
13
13
  ```
14
14
 
15
15
  The installer will auto-detect Cursor and install to:
16
+
16
17
  - `.cursor/rules/cc.mdc` - Command recognition and auto-completion
17
18
  - `.code-captain/` - Complete workflow system
18
19
 
19
20
  ### Manual Installation
20
21
 
21
22
  ```bash
22
- # Clone or download the cursor/ directory contents
23
+ # Install Cursor rules and commands
23
24
  cp cursor/cc.mdc .cursor/rules/
24
- cp -r cursor/ .code-captain/
25
+ cp cursor/commands/*.md .cursor/commands/
25
26
  ```
26
27
 
27
28
  ## 🎯 Command Syntax
28
29
 
29
- Code Captain commands in Cursor use the `cc:` prefix:
30
+ Code Captain commands in Cursor use the `/` slash prefix:
30
31
 
31
32
  ```bash
32
- cc: initialize
33
- cc: create-spec "user authentication system"
34
- cc: execute-task
35
- cc: status
33
+ /initialize
34
+ /create-spec "user authentication system"
35
+ /execute-task
36
+ /status
36
37
  ```
37
38
 
38
39
  ## 🛠️ Available Commands
39
40
 
40
41
  ### 📋 Project Setup & Analysis
41
- - **`cc: initialize`** - Analyze project and generate foundational documentation
42
- - **`cc: plan-product "product idea"`** - Comprehensive product planning with vision and roadmap
43
- - **`cc: research "topic"`** - Systematic 4-phase technical research
44
- - **`cc: new-command "name" "description"`** - Create custom Code Captain commands
42
+
43
+ - **`/initialize`** - Analyze project and generate foundational documentation
44
+ - **`/plan-product "product idea"`** - Comprehensive product planning with vision and roadmap
45
+ - **`/research "topic"`** - Systematic 4-phase technical research
46
+ - **`/new-command "name" "description"`** - Create custom Code Captain commands
45
47
 
46
48
  ### 📝 Requirements & Planning
47
- - **`cc: create-spec "feature description"`** - Generate comprehensive feature specifications
48
- - **`cc: edit-spec [spec-identifier] "changes"`** - Modify existing specifications with impact analysis
49
- - **`cc: create-adr "architectural decision"`** - Create Architecture Decision Records (auto-research)
50
- - **`cc: explain-code [target]`** - Generate code explanations with visual diagrams
49
+
50
+ - **`/create-spec "feature description"`** - Generate comprehensive feature specifications
51
+ - **`/edit-spec [spec-identifier] "changes"`** - Modify existing specifications with impact analysis
52
+ - **`/create-adr "architectural decision"`** - Create Architecture Decision Records (auto-research)
53
+ - **`/explain-code [target]`** - Generate code explanations with visual diagrams
51
54
 
52
55
  ### ⚙️ Implementation
53
- - **`cc: execute-task`** - Test-driven development workflow with progress tracking
54
- - **`cc: status`** - Comprehensive project status and next action recommendations
55
- - **`cc: swab`** - Apply one small improvement (Boy Scout Rule)
56
+
57
+ - **`/execute-task`** - Test-driven development workflow with progress tracking
58
+ - **`/status`** - Comprehensive project status and next action recommendations
59
+ - **`/swab`** - Apply one small improvement (Boy Scout Rule)
56
60
 
57
61
  ## 🔄 Workflow Examples
58
62
 
59
63
  ### Complete Feature Development
64
+
60
65
  ```bash
61
66
  # 1. Project setup and analysis
62
- cc: initialize
67
+ /initialize
63
68
 
64
69
  # 2. Research and planning
65
- cc: research "WebSocket vs Server-Sent Events for real-time features"
66
- cc: create-adr "real-time communication architecture"
70
+ /research "WebSocket vs Server-Sent Events for real-time features"
71
+ /create-adr "real-time communication architecture"
67
72
 
68
73
  # 3. Feature specification
69
- cc: create-spec "real-time chat with message history"
74
+ /create-spec "real-time chat with message history"
70
75
 
71
76
  # 4. Implementation
72
- cc: execute-task
77
+ /execute-task
73
78
  ```
74
79
 
75
80
  ### Code Understanding and Cleanup
81
+
76
82
  ```bash
77
83
  # Understand existing code
78
- cc: explain-code AuthenticationService
79
- cc: explain-code "src/components/UserDashboard.tsx:45-120"
84
+ /explain-code AuthenticationService
85
+ /explain-code "src/components/UserDashboard.tsx:45-120"
80
86
 
81
87
  # Make incremental improvements
82
- cc: swab
88
+ /swab
83
89
 
84
90
  # Check project health
85
- cc: status
91
+ /status
86
92
  ```
87
93
 
88
94
  ## 📁 File Organization
@@ -91,103 +97,101 @@ Cursor integration creates this structure:
91
97
 
92
98
  ```
93
99
  .cursor/
100
+ ├── commands/ # Native Cursor command files
101
+ │ ├── initialize.md
102
+ │ ├── create-spec.md
103
+ │ ├── execute-task.md
104
+ │ └── ...
94
105
  └── rules/
95
- └── cc.mdc # Command recognition file
106
+ └── cc.mdc # Code Captain identity & behavior rules
96
107
 
97
108
  .code-captain/
98
- ├── commands/ # All available commands
99
109
  ├── docs/ # Generated documentation
100
110
  ├── research/ # Technical research reports
101
111
  ├── decision-records/ # Architecture Decision Records
102
- ├── specs/ # Feature specifications
103
- └── YYYY-MM-DD-feature/
104
- ├── spec.md
105
- ├── user-stories/
106
- └── tasks.md
107
- └── cc.md # Complete reference guide
112
+ └── specs/ # Feature specifications
113
+ └── YYYY-MM-DD-feature/
114
+ ├── spec.md
115
+ ├── user-stories/
116
+ └── tasks.md
108
117
  ```
109
118
 
110
119
  ## 🎯 Cursor-Specific Features
111
120
 
112
121
  ### Native Command Recognition
122
+
113
123
  - Commands auto-complete in the chat interface
114
124
  - Syntax highlighting for Code Captain commands
115
125
  - Contextual command suggestions
116
126
 
117
127
  ### Seamless Tool Integration
128
+
118
129
  - Leverages Cursor's native `codebase_search`, `file_search`, `edit_file`
119
130
  - Automatic progress tracking with `todo_write`
120
131
  - Parallel tool execution for maximum efficiency
121
132
 
122
133
  ### Smart Context Awareness
123
- - Reads `.code-captain/state.json` for platform and shell detection
124
- - Adapts commands and file paths for your specific environment
134
+
135
+ - Native Cursor integration with automatic environment detection
136
+ - Adapts commands and file paths for your specific platform
125
137
  - Maintains context across command executions
126
138
 
127
139
  ## 🚀 Advanced Usage
128
140
 
129
141
  ### Custom Command Creation
142
+
130
143
  ```bash
131
144
  # Create domain-specific commands
132
- cc: new-command "audit" "Security and code quality auditing"
133
- cc: new-command "deploy" "Production deployment workflow"
145
+ /new-command "audit" "Security and code quality auditing"
146
+ /new-command "deploy" "Production deployment workflow"
134
147
  ```
135
148
 
136
149
  ### Specification Management
150
+
137
151
  ```bash
138
152
  # Create and modify specifications
139
- cc: create-spec "user profile management"
140
- cc: edit-spec "user-profile-management" "add avatar upload functionality"
153
+ /create-spec "user profile management"
154
+ /edit-spec "user-profile-management" "add avatar upload functionality"
141
155
  ```
142
156
 
143
157
  ```bash
144
158
  # Implementation workflow
145
- cc: execute-task
159
+ /execute-task
146
160
  ```
147
161
 
148
162
  ### Research and Decision Making
163
+
149
164
  ```bash
150
165
  # Systematic research
151
- cc: research "React state management: Redux vs Zustand vs Context"
166
+ /research "React state management: Redux vs Zustand vs Context"
152
167
 
153
168
  # Document architectural decisions
154
- cc: create-adr "state management library selection"
155
- ```
156
-
157
- ## 🔧 Configuration
158
-
159
- ### Environment Setup
160
- Code Captain automatically reads your environment from `.code-captain/state.json`:
161
-
162
- ```json
163
- {
164
- "platform": "darwin",
165
- "shell": "/bin/zsh",
166
- "ide": "cursor"
167
- }
169
+ /create-adr "state management library selection"
168
170
  ```
169
171
 
170
172
  ## 📊 Command Reference
171
173
 
172
- | Command | Purpose | Output Location |
173
- |---------|---------|-----------------|
174
- | `initialize` | Project analysis & setup | `.code-captain/docs/` |
175
- | `plan-product` | Product planning | `.code-captain/product/` |
176
- | `create-spec` | Feature specification | `.code-captain/specs/YYYY-MM-DD-feature/` |
177
- | `execute-task` | TDD implementation | Source code + tests |
178
-
174
+ | Command | Purpose | Output Location |
175
+ | -------------- | ------------------------ | ----------------------------------------- |
176
+ | `initialize` | Project analysis & setup | `.code-captain/docs/` |
177
+ | `plan-product` | Product planning | `.code-captain/product/` |
178
+ | `create-spec` | Feature specification | `.code-captain/specs/YYYY-MM-DD-feature/` |
179
+ | `execute-task` | TDD implementation | Source code + tests |
179
180
 
180
181
  ## 🛠️ Troubleshooting
181
182
 
182
183
  ### Command Not Recognized
183
- **Problem**: Cursor doesn't recognize `cc:` commands
184
- **Solution**: Ensure `.cursor/rules/cc.mdc` exists and restart Cursor
184
+
185
+ **Problem**: Cursor doesn't recognize `/` commands
186
+ **Solution**: Ensure `.cursor/commands/` and `.cursor/rules/cc.mdc` exist and restart Cursor
185
187
 
186
188
  ### Commands Execute But No Output
189
+
187
190
  **Problem**: Commands run but don't generate expected files
188
191
  **Solution**: Check `.code-captain/` folder permissions and verify command completion
189
192
 
190
193
  ### Task Generation Issues
194
+
191
195
  **Problem**: Task generation produces incomplete results
192
196
  **Solution**: Ensure specifications are detailed and requirements are clear
193
197
 
@@ -205,5 +209,5 @@ Cursor-specific contributions:
205
209
  **Ready to supercharge your Cursor development?**
206
210
 
207
211
  1. **Install:** `npx @devobsessed/code-captain`
208
- 2. **Start:** `cc: initialize`
209
- 3. **Explore:** `cc: status` for next steps
212
+ 2. **Start:** `/initialize`
213
+ 3. **Explore:** `/status` for next steps
package/cursor/cc.mdc CHANGED
@@ -1,17 +1,19 @@
1
+ # Code Captain - System Instructions
1
2
 
2
- # Code Captain (cc:) - System Instructions
3
+ ## Identity & Approach
3
4
 
4
- **CRITICAL: Before responding to ANY cc: command, FIRST read `.code-captain/cc.md` for complete instructions and methodology.**
5
+ You are **Code Captain** - a methodical AI development partner who executes comprehensive software workflows. You organize all work in `.code-captain/` folders and use `todo_write` for progress tracking.
5
6
 
6
- ## Identity
7
+ **Personality:**
7
8
 
8
- You are **Code Captain** - a methodical AI development partner who executes comprehensive software workflows. You organize all work in `.code-captain/` folders and use `todo_write` for progress tracking.
9
+ - **Methodical but efficient** - Break complex tasks into clear, manageable steps while leveraging parallel execution
10
+ - **Detail-oriented** - Provide context, rationale, and comprehensive documentation, not just code
11
+ - **Critically minded** - Question assumptions, challenge potentially problematic requests, provide evidence-based pushback when needed
12
+ - **Adaptable** - Adjust standards based on whether you need a quick prototype or production-ready code
9
13
 
10
14
  ## Command Execution Protocol
11
15
 
12
- 1. **ALWAYS read `.code-captain/cc.md` FIRST** - Contains your complete methodology, personality, and detailed command instructions
13
- 2. **ALWAYS read `.code-captain/state.json` FIRST** - Contains user's platform and shell for environment-specific commands and instructions
14
- 3. **Display welcome message**: Randomly select one of these greetings:
16
+ 1. **Display welcome message**: Randomly select one of these greetings:
15
17
  - "⚓ All aboard! Code Captain ready to steer your development ship."
16
18
  - "🧭 Ahoy! Your Code Captain is charting the course to quality code."
17
19
  - "⛵ Welcome aboard! Code Captain at your service, ready to navigate your codebase."
@@ -22,41 +24,17 @@ You are **Code Captain** - a methodical AI development partner who executes comp
22
24
  - "🚢 Steady as she goes! Code Captain prepared to steer your project to success."
23
25
  - "⚓ Anchors aweigh! Code Captain ready to lead your development expedition."
24
26
  - "🧭 All hands on deck! Code Captain here to guide your coding voyage."
25
- 4. **For complex commands, read command-specific documentation** (paths in cc.md)
26
- 5. **Use parallel tool execution** when possible for efficiency
27
-
28
- ## Core Commands
29
-
30
- - `initialize` - Project technical foundation setup and analysis (recommends plan-product for product strategy)
31
- - `new-command "name" "description"` - Meta command to create new Code Captain commands
32
- - `plan-product "idea"` - Product strategy and vision through structured discovery
33
- - `create-spec "feature"` - Feature specifications with implementation roadmaps
34
-
35
- - `create-adr "decision"` - Architecture Decision Records (auto-executes research)
36
- - `research "topic"` - 4-phase systematic research
37
- - `execute-task` - TDD implementation from specifications
38
- - `status` - Comprehensive status report with git state, active work, and suggested actions
39
- - `swab` - Code cleanup: one small improvement following Boy Scout Rule
40
-
41
- ## Enhanced Core Workflow
42
-
43
-
44
- - `next-task` / `start-work` / `claim-task` - Intelligent task management
45
- - `my-tasks` / `available-tasks` / `team-status` - Work coordination
46
- - `complete-task` / `resolve-conflicts` - Task completion and conflict resolution
27
+ 2. **Use parallel tool execution** when possible for efficiency
28
+ 3. **Follow critical thinking guidelines** in `.code-captain/docs/best-practices.md` - disagree constructively rather than automatically agreeing
47
29
 
48
30
  ## File Organization
49
31
 
50
32
  ```
51
33
  .code-captain/
52
- ├── cc.md # Complete reference (READ THIS FIRST)
53
- ├── state.json # User platform and shell environment (READ THIS FIRST)
54
- ├── commands/ # All command documentation (core + platform-specific)
55
34
  ├── specs/ # Requirements, specifications, and tasks
56
35
  ├── research/ # Technical research and analysis
57
36
  ├── decision-records/ # Architecture Decision Records
58
- ├── docs/ # Generated documentation
59
- └── work-context/ # Generated LLM context for active tasks (created when needed)
37
+ └── docs/ # Generated documentation, best practices
60
38
  ```
61
39
 
62
- **Remember: All details, examples, workflows, and personality are in `.code-captain/cc.md` - read it before executing any commands.**
40
+ **Core Principle:** Always organize work into the `.code-captain/` folder structure to keep everything clean and discoverable. Focus on what's right for the project over being agreeable.
@@ -1,15 +1,9 @@
1
- # Create ADR Command (cc: create-adr)
1
+ # Create ADR Command (create-adr)
2
2
 
3
3
  ## Overview
4
4
 
5
5
  Create comprehensive Architecture Decision Records (ADRs) that systematically document architectural decisions with clear rationale, alternatives considered, and consequences through a structured analysis and review process.
6
6
 
7
- ## Usage
8
-
9
- ```bash
10
- cc: create-adr "architectural decision description"
11
- ```
12
-
13
7
  ## When to Use
14
8
 
15
9
  - Making significant architectural decisions that affect system structure or design
@@ -233,10 +227,10 @@ For each alternative, evaluate against established criteria:
233
227
 
234
228
  **Preparation Actions:**
235
229
 
236
- 1. **Get current date:**
230
+ 1. **Get current date for document content:**
237
231
 
238
232
  ```bash
239
- date +%Y-%m-%d
233
+ npx @devobsessed/code-captain date
240
234
  ```
241
235
 
242
236
  2. **Determine ADR number:**
@@ -245,8 +239,8 @@ For each alternative, evaluate against established criteria:
245
239
  - Use sequential numbering (0001, 0002, etc.)
246
240
 
247
241
  3. **Create ADR directory structure:**
248
-
249
- Create the decision records directory (Code Captain will use platform-appropriate commands based on your shell from `state.json`):
242
+
243
+ Create the decision records directory:
250
244
 
251
245
  **ADR Creation:**
252
246
 
@@ -257,7 +251,7 @@ Create markdown file: `.code-captain/decision-records/NNNN-decision-title.md`
257
251
  ```markdown
258
252
  # NNNN. [Decision Title]
259
253
 
260
- **Date:** [Use output from date +%Y-%m-%d command]
254
+ **Date:** [Use output from npx @devobsessed/code-captain date]
261
255
 
262
256
  **Status:** [Proposed/Accepted/Deprecated/Superseded]
263
257