@devobsessed/code-captain 0.0.6 → 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 (44) hide show
  1. package/README.md +36 -37
  2. package/bin/install.js +1166 -983
  3. package/claude-code/agents/code-captain.md +31 -22
  4. package/copilot/README.md +26 -16
  5. package/copilot/chatmodes/Code Captain.chatmode.md +41 -25
  6. package/copilot/prompts/create-adr.prompt.md +6 -4
  7. package/copilot/prompts/create-spec.prompt.md +62 -45
  8. package/copilot/prompts/explain-code.prompt.md +7 -23
  9. package/copilot/prompts/new-command.prompt.md +60 -21
  10. package/copilot/prompts/research.prompt.md +14 -30
  11. package/copilot/prompts/status.prompt.md +13 -2
  12. package/copilot/prompts/swab.prompt.md +1 -0
  13. package/cursor/README.md +77 -88
  14. package/cursor/cc.mdc +13 -42
  15. package/cursor/commands/create-adr.md +7 -13
  16. package/cursor/commands/create-spec.md +73 -64
  17. package/cursor/commands/edit-spec.md +2 -15
  18. package/cursor/commands/execute-task.md +7 -15
  19. package/cursor/commands/explain-code.md +16 -35
  20. package/cursor/commands/initialize.md +19 -18
  21. package/cursor/commands/new-command.md +173 -81
  22. package/cursor/commands/plan-product.md +7 -13
  23. package/cursor/commands/research.md +5 -27
  24. package/cursor/commands/status.md +34 -23
  25. package/cursor/commands/swab.md +63 -12
  26. package/manifest.json +110 -229
  27. package/package.json +13 -4
  28. package/cursor/cc.md +0 -183
  29. package/cursor/integrations/azure-devops/create-azure-work-items.md +0 -403
  30. package/cursor/integrations/azure-devops/sync-azure-work-items.md +0 -486
  31. package/cursor/integrations/github/create-github-issues.md +0 -765
  32. package/cursor/integrations/github/scripts/create-issues-batch.sh +0 -272
  33. package/cursor/integrations/github/sync-github-issues.md +0 -237
  34. package/cursor/integrations/github/sync.md +0 -305
  35. package/windsurf/README.md +0 -254
  36. package/windsurf/rules/cc.md +0 -5
  37. package/windsurf/workflows/create-adr.md +0 -331
  38. package/windsurf/workflows/create-spec.md +0 -280
  39. package/windsurf/workflows/edit-spec.md +0 -273
  40. package/windsurf/workflows/execute-task.md +0 -276
  41. package/windsurf/workflows/explain-code.md +0 -292
  42. package/windsurf/workflows/initialize.md +0 -298
  43. package/windsurf/workflows/new-command.md +0 -321
  44. package/windsurf/workflows/status.md +0 -213
@@ -51,7 +51,7 @@ Provide developers with a comprehensive status report when starting work or swit
51
51
  **Based on Current State:**
52
52
  - If mid-task: Suggest `/execute-task`
53
53
  - If no active work: Suggest `/create-spec`
54
- - If specifications exist: Suggest `/create-github-issues`
54
+ - If specifications exist: Suggest implementation with `/execute-task`
55
55
  - Always suggest `/swab` for code cleanup
56
56
 
57
57
  ## Output Format
@@ -421,4 +421,15 @@ $ /status
421
421
 
422
422
  ---
423
423
 
424
- *⚓ Keep your bearings, maintain your heading, and always know where you stand in the code.*
424
+ *⚓ Keep your bearings, maintain your heading, and always know where you stand in the code.*
425
+
426
+ ## Suggested Next Actions
427
+
428
+ Based on project state analysis, suggest relevant next steps:
429
+
430
+ - **No specs**: Suggest `/create-spec` or `/plan-product`
431
+ - **Specs ready for implementation**: Suggest `/execute-task`
432
+ - **Tasks ready**: Suggest `/execute-task`
433
+ - **Code quality issues**: Suggest `/swab`
434
+ - **Missing architecture**: Suggest `/create-adr`
435
+ - **Research needed**: Suggest `/research`
@@ -203,6 +203,7 @@ This command integrates with the existing Code Captain ecosystem by:
203
203
  2. **Leveraging existing tools** - Uses GitHub Copilot's native capabilities
204
204
  3. **Maintaining simplicity** - No complex configuration or state management
205
205
  4. **Respecting user control** - Always asks permission before making changes
206
+ 5. **Quality foundation** - Complements specification and implementation commands by maintaining code quality, supporting the overall project foundation alongside `.code-captain` documentation
206
207
 
207
208
  ## Future Enhancements
208
209
 
package/cursor/README.md CHANGED
@@ -13,87 +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
56
 
57
- ### 🔗 Platform Integration
58
- - **`cc: create-github-issues [spec-path]`** - Create GitHub issues from specifications
59
- - **`cc: sync [--full|--my-work-only|--spec]`** - Advanced bidirectional GitHub sync
60
- - **`cc: sync-github-issues`** - Basic GitHub issue synchronization
61
- - **`cc: create-azure-work-items [spec-path]`** - Create Azure DevOps work items
62
- - **`cc: sync-azure-work-items [options]`** - Azure DevOps synchronization
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)
63
60
 
64
61
  ## 🔄 Workflow Examples
65
62
 
66
63
  ### Complete Feature Development
64
+
67
65
  ```bash
68
66
  # 1. Project setup and analysis
69
- cc: initialize
67
+ /initialize
70
68
 
71
69
  # 2. Research and planning
72
- cc: research "WebSocket vs Server-Sent Events for real-time features"
73
- 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"
74
72
 
75
73
  # 3. Feature specification
76
- cc: create-spec "real-time chat with message history"
74
+ /create-spec "real-time chat with message history"
77
75
 
78
76
  # 4. Implementation
79
- cc: execute-task
80
-
81
- # 5. Project management integration
82
- cc: create-github-issues
83
- cc: sync --spec realtime-chat
77
+ /execute-task
84
78
  ```
85
79
 
86
80
  ### Code Understanding and Cleanup
81
+
87
82
  ```bash
88
83
  # Understand existing code
89
- cc: explain-code AuthenticationService
90
- cc: explain-code "src/components/UserDashboard.tsx:45-120"
84
+ /explain-code AuthenticationService
85
+ /explain-code "src/components/UserDashboard.tsx:45-120"
91
86
 
92
87
  # Make incremental improvements
93
- cc: swab
88
+ /swab
94
89
 
95
90
  # Check project health
96
- cc: status
91
+ /status
97
92
  ```
98
93
 
99
94
  ## 📁 File Organization
@@ -102,109 +97,103 @@ Cursor integration creates this structure:
102
97
 
103
98
  ```
104
99
  .cursor/
100
+ ├── commands/ # Native Cursor command files
101
+ │ ├── initialize.md
102
+ │ ├── create-spec.md
103
+ │ ├── execute-task.md
104
+ │ └── ...
105
105
  └── rules/
106
- └── cc.mdc # Command recognition file
106
+ └── cc.mdc # Code Captain identity & behavior rules
107
107
 
108
108
  .code-captain/
109
- ├── commands/ # All available commands
110
109
  ├── docs/ # Generated documentation
111
110
  ├── research/ # Technical research reports
112
111
  ├── decision-records/ # Architecture Decision Records
113
- ├── specs/ # Feature specifications
114
- └── YYYY-MM-DD-feature/
115
- ├── spec.md
116
- ├── user-stories/
117
- └── tasks.md
118
- └── cc.md # Complete reference guide
112
+ └── specs/ # Feature specifications
113
+ └── YYYY-MM-DD-feature/
114
+ ├── spec.md
115
+ ├── user-stories/
116
+ └── tasks.md
119
117
  ```
120
118
 
121
119
  ## 🎯 Cursor-Specific Features
122
120
 
123
121
  ### Native Command Recognition
122
+
124
123
  - Commands auto-complete in the chat interface
125
124
  - Syntax highlighting for Code Captain commands
126
125
  - Contextual command suggestions
127
126
 
128
127
  ### Seamless Tool Integration
128
+
129
129
  - Leverages Cursor's native `codebase_search`, `file_search`, `edit_file`
130
130
  - Automatic progress tracking with `todo_write`
131
131
  - Parallel tool execution for maximum efficiency
132
132
 
133
133
  ### Smart Context Awareness
134
- - Reads `.code-captain/state.json` for platform and shell detection
135
- - 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
136
137
  - Maintains context across command executions
137
138
 
138
139
  ## 🚀 Advanced Usage
139
140
 
140
141
  ### Custom Command Creation
142
+
141
143
  ```bash
142
144
  # Create domain-specific commands
143
- cc: new-command "audit" "Security and code quality auditing"
144
- cc: new-command "deploy" "Production deployment workflow"
145
+ /new-command "audit" "Security and code quality auditing"
146
+ /new-command "deploy" "Production deployment workflow"
145
147
  ```
146
148
 
147
149
  ### Specification Management
150
+
148
151
  ```bash
149
152
  # Create and modify specifications
150
- cc: create-spec "user profile management"
151
- 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"
155
+ ```
152
156
 
153
- # Generate project management artifacts
154
- cc: create-github-issues .code-captain/specs/2024-12-28-user-profile/
157
+ ```bash
158
+ # Implementation workflow
159
+ /execute-task
155
160
  ```
156
161
 
157
162
  ### Research and Decision Making
163
+
158
164
  ```bash
159
165
  # Systematic research
160
- cc: research "React state management: Redux vs Zustand vs Context"
166
+ /research "React state management: Redux vs Zustand vs Context"
161
167
 
162
168
  # Document architectural decisions
163
- cc: create-adr "state management library selection"
169
+ /create-adr "state management library selection"
164
170
  ```
165
171
 
166
- ## 🔧 Configuration
167
-
168
- ### Environment Setup
169
- Code Captain automatically reads your environment from `.code-captain/state.json`:
170
-
171
- ```json
172
- {
173
- "platform": "darwin",
174
- "shell": "/bin/zsh",
175
- "ide": "cursor"
176
- }
177
- ```
178
-
179
- ### Project Management Platform
180
- Choose during installation or configure manually:
181
- - **GitHub Issues & Projects**
182
- - **Azure DevOps Work Items**
183
-
184
172
  ## 📊 Command Reference
185
173
 
186
- | Command | Purpose | Output Location |
187
- |---------|---------|-----------------|
188
- | `initialize` | Project analysis & setup | `.code-captain/docs/` |
189
- | `plan-product` | Product planning | `.code-captain/product/` |
190
- | `create-spec` | Feature specification | `.code-captain/specs/YYYY-MM-DD-feature/` |
191
- | `execute-task` | TDD implementation | Source code + tests |
192
- | `create-github-issues` | GitHub integration | Updates spec with issue numbers |
193
- | `sync` | Advanced GitHub sync | `.code-captain/state/github/` |
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 |
194
180
 
195
181
  ## 🛠️ Troubleshooting
196
182
 
197
183
  ### Command Not Recognized
198
- **Problem**: Cursor doesn't recognize `cc:` commands
199
- **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
200
187
 
201
188
  ### Commands Execute But No Output
189
+
202
190
  **Problem**: Commands run but don't generate expected files
203
191
  **Solution**: Check `.code-captain/` folder permissions and verify command completion
204
192
 
205
- ### GitHub Integration Issues
206
- **Problem**: GitHub commands fail
207
- **Solution**: Verify repository has GitHub remote and check network connectivity
193
+ ### Task Generation Issues
194
+
195
+ **Problem**: Task generation produces incomplete results
196
+ **Solution**: Ensure specifications are detailed and requirements are clear
208
197
 
209
198
  ## 🤝 Contributing
210
199
 
@@ -220,5 +209,5 @@ Cursor-specific contributions:
220
209
  **Ready to supercharge your Cursor development?**
221
210
 
222
211
  1. **Install:** `npx @devobsessed/code-captain`
223
- 2. **Start:** `cc: initialize`
224
- 3. **Explore:** `cc: status` for next steps
212
+ 2. **Start:** `/initialize`
213
+ 3. **Explore:** `/status` for next steps
package/cursor/cc.mdc CHANGED
@@ -1,22 +1,19 @@
1
- ---
2
- description:
3
- globs:
4
- alwaysApply: true
5
- ---
1
+ # Code Captain - System Instructions
6
2
 
7
- # Code Captain (cc:) - System Instructions
3
+ ## Identity & Approach
8
4
 
9
- **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.
10
6
 
11
- ## Identity
7
+ **Personality:**
12
8
 
13
- 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
14
13
 
15
14
  ## Command Execution Protocol
16
15
 
17
- 1. **ALWAYS read `.code-captain/cc.md` FIRST** - Contains your complete methodology, personality, and detailed command instructions
18
- 2. **ALWAYS read `.code-captain/state.json` FIRST** - Contains user's platform and shell for environment-specific commands and instructions
19
- 3. **Display welcome message**: Randomly select one of these greetings:
16
+ 1. **Display welcome message**: Randomly select one of these greetings:
20
17
  - "⚓ All aboard! Code Captain ready to steer your development ship."
21
18
  - "🧭 Ahoy! Your Code Captain is charting the course to quality code."
22
19
  - "⛵ Welcome aboard! Code Captain at your service, ready to navigate your codebase."
@@ -27,43 +24,17 @@ You are **Code Captain** - a methodical AI development partner who executes comp
27
24
  - "🚢 Steady as she goes! Code Captain prepared to steer your project to success."
28
25
  - "⚓ Anchors aweigh! Code Captain ready to lead your development expedition."
29
26
  - "🧭 All hands on deck! Code Captain here to guide your coding voyage."
30
- 4. **For complex commands, read command-specific documentation** (paths in cc.md)
31
- 5. **Use parallel tool execution** when possible for efficiency
32
-
33
- ## Core Commands
34
-
35
- - `initialize` - Project technical foundation setup and analysis (recommends plan-product for product strategy)
36
- - `new-command "name" "description"` - Meta command to create new Code Captain commands
37
- - `plan-product "idea"` - Product strategy and vision through structured discovery
38
- - `create-spec "feature"` - Feature specifications with implementation roadmaps
39
- - `generate-tasks` - LLM-powered task generation from specs
40
- - `create-adr "decision"` - Architecture Decision Records (auto-executes research)
41
- - `research "topic"` - 4-phase systematic research
42
- - `execute-task` - TDD implementation from specifications
43
- - `status` - Comprehensive status report with git state, active work, and suggested actions
44
- - `swab` - Code cleanup: one small improvement following Boy Scout Rule
45
-
46
- ## Enhanced GitHub Workflow
47
-
48
- - `generate-tasks` / `create-github-issues` - Spec to GitHub issues workflow
49
- - `sync` - Advanced bidirectional GitHub sync with partitioned cache
50
- - `next-task` / `start-work` / `claim-task` - Intelligent task management
51
- - `my-tasks` / `available-tasks` / `team-status` - Work coordination
52
- - `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
53
29
 
54
30
  ## File Organization
55
31
 
56
32
  ```
57
33
  .code-captain/
58
- ├── cc.md # Complete reference (READ THIS FIRST)
59
- ├── state.json # User platform and shell environment (READ THIS FIRST)
60
- ├── commands/ # All command documentation (core + platform-specific)
61
34
  ├── specs/ # Requirements, specifications, and tasks
62
35
  ├── research/ # Technical research and analysis
63
36
  ├── decision-records/ # Architecture Decision Records
64
- ├── docs/ # Generated documentation
65
- ├── state/ # GitHub sync cache (created when needed)
66
- └── work-context/ # Generated LLM context for active tasks (created when needed)
37
+ └── docs/ # Generated documentation, best practices
67
38
  ```
68
39
 
69
- **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
@@ -204,7 +198,7 @@ Use `todo_write` to track the ADR creation process:
204
198
  3. **Use `codebase_search` to understand current implementation approaches**
205
199
 
206
200
  4. **Identify and document alternative options:**
207
- - Current state/status quo option
201
+ - Current state or status quo option
208
202
  - Industry standard approaches
209
203
  - Innovative or emerging alternatives
210
204
  - Hybrid approaches combining multiple patterns
@@ -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