@devobsessed/code-captain 0.0.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/README.md +214 -0
- package/bin/install.js +1048 -0
- package/claude-code/README.md +276 -0
- package/claude-code/agents/code-captain.md +121 -0
- package/claude-code/agents/spec-generator.md +271 -0
- package/claude-code/agents/story-creator.md +309 -0
- package/claude-code/agents/tech-spec.md +440 -0
- package/claude-code/commands/cc-initialize.md +520 -0
- package/copilot/README.md +210 -0
- package/copilot/chatmodes/Code Captain.chatmode.md +60 -0
- package/copilot/docs/best-practices.md +74 -0
- package/copilot/prompts/create-adr.prompt.md +468 -0
- package/copilot/prompts/create-spec.prompt.md +430 -0
- package/copilot/prompts/edit-spec.prompt.md +396 -0
- package/copilot/prompts/execute-task.prompt.md +144 -0
- package/copilot/prompts/explain-code.prompt.md +292 -0
- package/copilot/prompts/initialize.prompt.md +65 -0
- package/copilot/prompts/new-command.prompt.md +310 -0
- package/copilot/prompts/plan-product.prompt.md +450 -0
- package/copilot/prompts/research.prompt.md +329 -0
- package/copilot/prompts/status.prompt.md +424 -0
- package/copilot/prompts/swab.prompt.md +217 -0
- package/cursor/README.md +224 -0
- package/cursor/cc.md +183 -0
- package/cursor/cc.mdc +69 -0
- package/cursor/commands/create-adr.md +504 -0
- package/cursor/commands/create-spec.md +430 -0
- package/cursor/commands/edit-spec.md +405 -0
- package/cursor/commands/execute-task.md +514 -0
- package/cursor/commands/explain-code.md +289 -0
- package/cursor/commands/initialize.md +397 -0
- package/cursor/commands/new-command.md +312 -0
- package/cursor/commands/plan-product.md +466 -0
- package/cursor/commands/research.md +317 -0
- package/cursor/commands/status.md +413 -0
- package/cursor/commands/swab.md +209 -0
- package/cursor/docs/best-practices.md +74 -0
- package/cursor/integrations/azure-devops/create-azure-work-items.md +403 -0
- package/cursor/integrations/azure-devops/sync-azure-work-items.md +486 -0
- package/cursor/integrations/github/create-github-issues.md +765 -0
- package/cursor/integrations/github/scripts/create-issues-batch.sh +272 -0
- package/cursor/integrations/github/sync-github-issues.md +237 -0
- package/cursor/integrations/github/sync.md +305 -0
- package/manifest.json +381 -0
- package/package.json +58 -0
- package/windsurf/README.md +254 -0
- package/windsurf/rules/cc.md +5 -0
- package/windsurf/workflows/create-adr.md +331 -0
- package/windsurf/workflows/create-spec.md +280 -0
- package/windsurf/workflows/edit-spec.md +273 -0
- package/windsurf/workflows/execute-task.md +276 -0
- package/windsurf/workflows/explain-code.md +292 -0
- package/windsurf/workflows/initialize.md +298 -0
- package/windsurf/workflows/new-command.md +321 -0
- package/windsurf/workflows/status.md +213 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# New Command Creator (cc: new-command)
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
A meta command that creates new Code Captain commands following established patterns and conventions. This command generates properly structured command files, updates documentation, and ensures consistency across the Code Captain ecosystem.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cc: new-command "command-name" "brief description"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Examples:**
|
|
14
|
+
```bash
|
|
15
|
+
cc: new-command "optimize" "Performance optimization for slow code sections"
|
|
16
|
+
cc: new-command "deploy" "Deploy applications to various cloud platforms"
|
|
17
|
+
cc: new-command "test-gen" "Generate comprehensive test suites from existing code"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Command Process
|
|
21
|
+
|
|
22
|
+
### Step 1: Command Specification Gathering
|
|
23
|
+
|
|
24
|
+
**Initial Input Processing:**
|
|
25
|
+
- Parse command name (validate format: lowercase, hyphens allowed)
|
|
26
|
+
- Extract brief description from user input
|
|
27
|
+
- Validate command name doesn't conflict with existing commands
|
|
28
|
+
|
|
29
|
+
**Interactive Specification Building:**
|
|
30
|
+
Ask clarifying questions to build complete command specification:
|
|
31
|
+
|
|
32
|
+
1. **Command Category**: "Is this a [Setup/Analysis/Implementation/Integration] command?"
|
|
33
|
+
2. **Execution Style**: "Should this use contract style (extensive clarification rounds like create-spec) or direct execution (immediate action like swab)?"
|
|
34
|
+
3. **Usage Pattern**: "Does it take arguments, flags, or is it standalone?"
|
|
35
|
+
4. **AI Coordination**: "Does it need AI prompts for complex decision-making?"
|
|
36
|
+
5. **Output Location**: "Where should outputs be stored? (.code-captain/[folder])"
|
|
37
|
+
6. **Tool Integration**: "Which Cursor tools will it use? (codebase_search, read_file, etc.)"
|
|
38
|
+
7. **Workflow Steps**: "What are the main phases/steps the command follows?"
|
|
39
|
+
|
|
40
|
+
### Step 2: Command Structure Generation
|
|
41
|
+
|
|
42
|
+
**Generate Standard Command File Structure:**
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
# [Command Name] Command (cc: [command-name])
|
|
46
|
+
|
|
47
|
+
## Overview
|
|
48
|
+
[Generated from description and clarifying questions]
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
```bash
|
|
52
|
+
cc: [command-name] [arguments]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Command Process
|
|
56
|
+
|
|
57
|
+
### Step 1: [Phase Name]
|
|
58
|
+
[Generated workflow steps]
|
|
59
|
+
|
|
60
|
+
### Step 2: [Phase Name]
|
|
61
|
+
[Generated workflow steps]
|
|
62
|
+
|
|
63
|
+
## Core Rules
|
|
64
|
+
[Generated based on command type]
|
|
65
|
+
|
|
66
|
+
## AI Implementation Prompt
|
|
67
|
+
[Generated if AI coordination needed]
|
|
68
|
+
|
|
69
|
+
## Integration Notes
|
|
70
|
+
[Generated integration details]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Template Sections Based on Command Type and Execution Style:**
|
|
74
|
+
|
|
75
|
+
**Contract Style Commands** (like `create-spec`, `create-adr`):
|
|
76
|
+
- Phase 1: Contract Establishment (No File Creation)
|
|
77
|
+
- Interactive clarification rounds with structured questions
|
|
78
|
+
- Critical analysis and assumption challenging
|
|
79
|
+
- Echo check/contract proposal phase
|
|
80
|
+
- Explicit user agreement before proceeding
|
|
81
|
+
|
|
82
|
+
**Direct Execution Commands** (like `swab`, `execute-task`):
|
|
83
|
+
- Immediate action workflows
|
|
84
|
+
- Minimal clarification if needed
|
|
85
|
+
- Clear step-by-step execution
|
|
86
|
+
- Progress feedback and completion confirmation
|
|
87
|
+
|
|
88
|
+
**Setup/Analysis Commands:**
|
|
89
|
+
- Context scanning steps
|
|
90
|
+
- File generation workflows
|
|
91
|
+
- Progress tracking with `todo_write`
|
|
92
|
+
|
|
93
|
+
**Implementation Commands:**
|
|
94
|
+
- TDD workflows if applicable
|
|
95
|
+
- Code modification steps
|
|
96
|
+
- Verification procedures
|
|
97
|
+
|
|
98
|
+
**Integration Commands:**
|
|
99
|
+
- Platform-specific API interactions
|
|
100
|
+
- Sync and conflict resolution
|
|
101
|
+
- Error handling patterns
|
|
102
|
+
|
|
103
|
+
### Step 3: Documentation Updates
|
|
104
|
+
|
|
105
|
+
**Automatically update main documentation files:**
|
|
106
|
+
|
|
107
|
+
1. **cc.md Updates:**
|
|
108
|
+
- Add to appropriate category section
|
|
109
|
+
- Add to command documentation reading list
|
|
110
|
+
- Add to usage examples
|
|
111
|
+
|
|
112
|
+
2. **cc.mdc Updates:**
|
|
113
|
+
- Add to Core Commands or Platform Integration section
|
|
114
|
+
- Include brief description
|
|
115
|
+
|
|
116
|
+
3. **README.md Updates:**
|
|
117
|
+
- Add to appropriate feature section
|
|
118
|
+
- Add to command reference table
|
|
119
|
+
- Include in workflow examples if relevant
|
|
120
|
+
|
|
121
|
+
### Step 4: Validation and Integration
|
|
122
|
+
|
|
123
|
+
**Verify Command Integration:**
|
|
124
|
+
- Check command file syntax and structure
|
|
125
|
+
- Validate documentation updates
|
|
126
|
+
- Ensure no conflicts with existing commands
|
|
127
|
+
- Run basic structure validation
|
|
128
|
+
|
|
129
|
+
**Present Summary:**
|
|
130
|
+
```
|
|
131
|
+
✅ New command created successfully!
|
|
132
|
+
|
|
133
|
+
📁 Files Created/Updated:
|
|
134
|
+
- .code-captain/commands/[command-name].md
|
|
135
|
+
- cc.md (updated)
|
|
136
|
+
- cc.mdc (updated)
|
|
137
|
+
- README.md (updated)
|
|
138
|
+
|
|
139
|
+
🚀 Command Ready:
|
|
140
|
+
Usage: cc: [command-name] [args]
|
|
141
|
+
Documentation: .code-captain/commands/[command-name].md
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Core Rules
|
|
145
|
+
|
|
146
|
+
1. **Consistent Structure** - All generated commands follow established patterns
|
|
147
|
+
2. **Clear Documentation** - Each section has purpose and implementation details
|
|
148
|
+
3. **Automatic Integration** - Updates all necessary documentation files
|
|
149
|
+
4. **Validation Required** - Check for conflicts and proper structure
|
|
150
|
+
5. **Template Flexibility** - Adapt template based on command type and requirements
|
|
151
|
+
6. **Language & Shell Agnostic** - Commands should work across different programming languages and shell environments, using Code Captain's existing tools rather than making assumptions about tech stack
|
|
152
|
+
|
|
153
|
+
## AI Implementation Prompt
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
You are creating a new Code Captain command following established patterns.
|
|
157
|
+
|
|
158
|
+
MISSION: Generate a complete, well-structured command file and update documentation.
|
|
159
|
+
|
|
160
|
+
COMMAND SPECIFICATION:
|
|
161
|
+
- Name: {command_name}
|
|
162
|
+
- Description: {description}
|
|
163
|
+
- Category: {category}
|
|
164
|
+
- Execution Style: {contract_style_or_direct_execution}
|
|
165
|
+
- Usage Pattern: {usage_pattern}
|
|
166
|
+
- AI Coordination: {needs_ai_prompts}
|
|
167
|
+
- Output Location: {output_location}
|
|
168
|
+
- Tool Integration: {cursor_tools}
|
|
169
|
+
- Workflow Steps: {workflow_phases}
|
|
170
|
+
|
|
171
|
+
TEMPLATE STRUCTURE:
|
|
172
|
+
1. Title: # [Command Name] Command (cc: [command-name])
|
|
173
|
+
2. Overview: Purpose and capabilities
|
|
174
|
+
3. Usage: Command syntax with examples
|
|
175
|
+
4. Command Process: Detailed step-by-step workflow
|
|
176
|
+
5. Core Rules: Implementation guidelines
|
|
177
|
+
6. AI Implementation Prompt: (if AI coordination needed)
|
|
178
|
+
7. Integration Notes: Cursor tool coordination
|
|
179
|
+
|
|
180
|
+
TEMPLATE ADAPTATION RULES:
|
|
181
|
+
- Contract Style commands: Include clarification phases, contract establishment, critical analysis, user agreement checkpoints
|
|
182
|
+
- Direct Execution commands: Include immediate action workflows, minimal interaction, clear progress feedback
|
|
183
|
+
- Setup/Analysis commands: Include context scanning, file generation, todo tracking
|
|
184
|
+
- Implementation commands: Include TDD workflows, code modification, verification
|
|
185
|
+
- Integration commands: Include API interactions, sync, error handling
|
|
186
|
+
- All commands: Include clear examples, tool coordination, progress tracking
|
|
187
|
+
- CRITICAL: Be language and shell agnostic - use codebase_search, list_dir, file_search instead of language-specific find commands or hardcoded file extensions
|
|
188
|
+
|
|
189
|
+
DOCUMENTATION UPDATES:
|
|
190
|
+
Update these files with the new command:
|
|
191
|
+
- cc.md: Add to appropriate category, command list, examples
|
|
192
|
+
- cc.mdc: Add to Core Commands with brief description
|
|
193
|
+
- README.md: Add to features, command table, workflow examples
|
|
194
|
+
|
|
195
|
+
OUTPUT REQUIREMENTS:
|
|
196
|
+
1. Generate complete command file following the template
|
|
197
|
+
2. Identify exact locations in documentation files to update
|
|
198
|
+
3. Provide specific text additions for each documentation file
|
|
199
|
+
4. Ensure consistency with existing command patterns
|
|
200
|
+
5. Validate no conflicts with existing commands
|
|
201
|
+
|
|
202
|
+
QUALITY CHECKS:
|
|
203
|
+
- Command name follows naming conventions (lowercase, hyphens)
|
|
204
|
+
- Usage examples are clear and practical
|
|
205
|
+
- Workflow steps are actionable and specific
|
|
206
|
+
- Integration points are clearly documented
|
|
207
|
+
- All sections serve a clear purpose
|
|
208
|
+
- No hardcoded language assumptions or shell-specific commands
|
|
209
|
+
- Uses Code Captain's existing tools (codebase_search, list_dir, file_search) rather than system-specific commands
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Implementation Details
|
|
213
|
+
|
|
214
|
+
### Command Name Validation
|
|
215
|
+
|
|
216
|
+
**Validation Rules:**
|
|
217
|
+
- Lowercase letters, numbers, hyphens only
|
|
218
|
+
- No spaces or special characters
|
|
219
|
+
- Maximum 20 characters
|
|
220
|
+
- Cannot start with number or hyphen
|
|
221
|
+
- Must not conflict with existing commands
|
|
222
|
+
|
|
223
|
+
**Validation Process:**
|
|
224
|
+
```bash
|
|
225
|
+
# Check format
|
|
226
|
+
echo "command-name" | grep -E '^[a-z][a-z0-9-]*[a-z0-9]$'
|
|
227
|
+
|
|
228
|
+
# Check conflicts
|
|
229
|
+
ls .code-captain/commands/ | grep "^command-name.md$"
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Template Selection Logic
|
|
233
|
+
|
|
234
|
+
**Command Categories and Templates:**
|
|
235
|
+
|
|
236
|
+
1. **Setup/Analysis** (`initialize`, `research`, `explain-code`)
|
|
237
|
+
- Context scanning workflows
|
|
238
|
+
- Documentation generation
|
|
239
|
+
- Progress tracking emphasis
|
|
240
|
+
|
|
241
|
+
2. **Planning/Specification** (`create-spec`, `create-adr`, `plan-product`)
|
|
242
|
+
- Interactive clarification phases
|
|
243
|
+
- Structured output formats
|
|
244
|
+
- Contract-based workflows
|
|
245
|
+
|
|
246
|
+
3. **Implementation** (`execute-task`, `swab`)
|
|
247
|
+
- Code modification workflows
|
|
248
|
+
- TDD patterns
|
|
249
|
+
- Verification steps
|
|
250
|
+
|
|
251
|
+
4. **Integration** (`sync`, `create-github-issues`)
|
|
252
|
+
- Platform API interactions
|
|
253
|
+
- Sync and conflict handling
|
|
254
|
+
- Status reporting
|
|
255
|
+
|
|
256
|
+
### Documentation Update Locations
|
|
257
|
+
|
|
258
|
+
**cc.md Update Points:**
|
|
259
|
+
- Line ~15-50: Available Commands sections
|
|
260
|
+
- Line ~95-110: Command documentation list
|
|
261
|
+
- Line ~150-190: Usage examples
|
|
262
|
+
|
|
263
|
+
**cc.mdc Update Points:**
|
|
264
|
+
- Line ~25-35: Core Commands list
|
|
265
|
+
- Line ~35-45: Enhanced workflows (if integration)
|
|
266
|
+
|
|
267
|
+
**README.md Update Points:**
|
|
268
|
+
- Line ~120-140: Feature sections
|
|
269
|
+
- Line ~400-415: Command reference table
|
|
270
|
+
- Line ~250-270: Source structure
|
|
271
|
+
|
|
272
|
+
### Error Handling
|
|
273
|
+
|
|
274
|
+
**Common Issues:**
|
|
275
|
+
- **Duplicate command name**: Check existing commands, suggest alternatives
|
|
276
|
+
- **Invalid command name format**: Provide format guidance and examples
|
|
277
|
+
- **Documentation update conflicts**: Use safe merge strategies, manual review if needed
|
|
278
|
+
- **Template generation errors**: Validate inputs, provide clear error messages
|
|
279
|
+
|
|
280
|
+
**Error Messages:**
|
|
281
|
+
```
|
|
282
|
+
❌ Command creation failed: [specific reason]
|
|
283
|
+
|
|
284
|
+
Suggestions:
|
|
285
|
+
- Check command name format (lowercase, hyphens only)
|
|
286
|
+
- Ensure name doesn't conflict with existing commands
|
|
287
|
+
- Verify all required inputs are provided
|
|
288
|
+
|
|
289
|
+
Try: cc: new-command "valid-name" "clear description"
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Integration Notes
|
|
293
|
+
|
|
294
|
+
This command integrates with Code Captain by:
|
|
295
|
+
|
|
296
|
+
1. **Following Established Patterns** - Uses same structure as existing commands
|
|
297
|
+
2. **Maintaining Consistency** - Ensures all new commands match style and format
|
|
298
|
+
3. **Automatic Documentation** - Updates all necessary files without manual intervention
|
|
299
|
+
4. **Extensibility** - Makes it easy to add new capabilities to Code Captain
|
|
300
|
+
5. **Quality Assurance** - Validates structure and prevents conflicts
|
|
301
|
+
|
|
302
|
+
## Future Enhancements
|
|
303
|
+
|
|
304
|
+
Potential improvements (not in initial version):
|
|
305
|
+
|
|
306
|
+
- **Template Library**: Multiple command templates for different use cases
|
|
307
|
+
- **Interactive Wizard**: Step-by-step command creation with guidance
|
|
308
|
+
- **Integration Testing**: Automated testing of generated commands
|
|
309
|
+
- **Version Control**: Track command changes and updates
|
|
310
|
+
- **Command Dependencies**: Handle commands that depend on other commands
|
|
311
|
+
|
|
312
|
+
But for now: Focus on core functionality - create well-structured commands that integrate seamlessly with the existing Code Captain ecosystem.
|