@devobsessed/code-captain 0.2.0 → 0.2.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.
- package/bin/install.js +40 -10
- package/copilot/agents/Code Captain.agent.md +16 -18
- package/copilot/copilot-instructions.md +64 -0
- package/copilot/prompts/create-adr.prompt.md +18 -106
- package/copilot/prompts/create-spec.prompt.md +26 -113
- package/copilot/prompts/edit-spec.prompt.md +11 -180
- package/copilot/prompts/execute-task.prompt.md +7 -22
- package/copilot/prompts/explain-code.prompt.md +14 -139
- package/copilot/prompts/initialize.prompt.md +9 -12
- package/copilot/prompts/new-command.prompt.md +25 -213
- package/copilot/prompts/plan-product.prompt.md +15 -306
- package/copilot/prompts/research.prompt.md +12 -139
- package/copilot/prompts/status.prompt.md +37 -365
- package/copilot/prompts/swab.prompt.md +9 -135
- package/manifest.json +92 -84
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
agent:
|
|
2
|
+
agent: agent
|
|
3
|
+
description: "Create new Code Captain commands following established patterns"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
# New Command
|
|
6
|
+
# You are executing the New Command command.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
You MUST follow these instructions exactly. Do NOT describe this process — execute it.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Your mission: Create a new Code Captain command file following established patterns and conventions. Generate a properly structured prompt file and provide integration guidance.
|
|
10
11
|
|
|
11
12
|
## Examples
|
|
12
13
|
|
|
@@ -14,15 +15,13 @@ A meta command that creates new Code Captain commands following established patt
|
|
|
14
15
|
# Create optimization command
|
|
15
16
|
/new-command "optimize" "Performance optimization for slow code sections"
|
|
16
17
|
|
|
17
|
-
# Create deployment command
|
|
18
|
+
# Create deployment command
|
|
18
19
|
/new-command "deploy" "Deploy applications to various cloud platforms"
|
|
19
20
|
|
|
20
21
|
# Create test generation command
|
|
21
22
|
/new-command "test-gen" "Generate comprehensive test suites from existing code"
|
|
22
23
|
```
|
|
23
24
|
|
|
24
|
-
## Command Process
|
|
25
|
-
|
|
26
25
|
### Step 1: Command Specification Gathering
|
|
27
26
|
|
|
28
27
|
**Initial Input Processing:**
|
|
@@ -47,15 +46,15 @@ Ask clarifying questions to build complete command specification:
|
|
|
47
46
|
|
|
48
47
|
```markdown
|
|
49
48
|
---
|
|
50
|
-
agent:
|
|
49
|
+
agent: agent
|
|
50
|
+
description: "[Short description]"
|
|
51
51
|
---
|
|
52
52
|
|
|
53
|
-
# [Command Name]
|
|
53
|
+
# You are executing the [Command Name] command.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
[Generated from description and clarifying questions]
|
|
55
|
+
You MUST follow these instructions exactly. Do NOT describe this process — execute it.
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
Your mission: [Generated from description and clarifying questions]
|
|
59
58
|
|
|
60
59
|
### Step 1: [Phase Name]
|
|
61
60
|
[Generated workflow steps]
|
|
@@ -65,15 +64,9 @@ agent: Code Captain
|
|
|
65
64
|
|
|
66
65
|
## Tool Integration
|
|
67
66
|
[Generated based on command type]
|
|
68
|
-
|
|
69
|
-
## AI Implementation Prompt
|
|
70
|
-
[Generated if AI coordination needed]
|
|
71
|
-
|
|
72
|
-
## Integration Notes
|
|
73
|
-
[Generated integration details]
|
|
74
67
|
```
|
|
75
68
|
|
|
76
|
-
**Template
|
|
69
|
+
**Template Adaptation Based on Execution Style:**
|
|
77
70
|
|
|
78
71
|
**Contract Style Commands** (like `/create-spec`, `/create-adr`):
|
|
79
72
|
- Phase 1: Contract Establishment (No File Creation)
|
|
@@ -88,36 +81,6 @@ agent: Code Captain
|
|
|
88
81
|
- Clear step-by-step execution
|
|
89
82
|
- Progress feedback and completion confirmation
|
|
90
83
|
|
|
91
|
-
**Foundation Commands:**
|
|
92
|
-
- Project initialization steps
|
|
93
|
-
- Planning and product setup workflows
|
|
94
|
-
- Configuration and environment setup
|
|
95
|
-
|
|
96
|
-
**Analysis Commands:**
|
|
97
|
-
- Context scanning steps
|
|
98
|
-
- Research and analysis workflows
|
|
99
|
-
- Documentation review and assessment
|
|
100
|
-
|
|
101
|
-
**Specification Commands:**
|
|
102
|
-
- Specification creation and editing
|
|
103
|
-
- Structured documentation workflows
|
|
104
|
-
- Contract-based clarification processes
|
|
105
|
-
|
|
106
|
-
**Implementation Commands:**
|
|
107
|
-
- TDD workflows if applicable
|
|
108
|
-
- Code modification steps
|
|
109
|
-
- Task execution procedures
|
|
110
|
-
|
|
111
|
-
**Quality Commands:**
|
|
112
|
-
- Health and status reporting
|
|
113
|
-
- QA-oriented checks and validations
|
|
114
|
-
- Lightweight remediation workflows
|
|
115
|
-
|
|
116
|
-
**Meta Commands:**
|
|
117
|
-
- Command scaffolding and documentation updates
|
|
118
|
-
- Code understanding and explanation
|
|
119
|
-
- Process and tooling refinements
|
|
120
|
-
|
|
121
84
|
### Step 3: Documentation Integration
|
|
122
85
|
|
|
123
86
|
**Provide guidance for documentation updates:**
|
|
@@ -142,15 +105,15 @@ agent: Code Captain
|
|
|
142
105
|
|
|
143
106
|
**Present Summary:**
|
|
144
107
|
```
|
|
145
|
-
|
|
108
|
+
New command prompt created successfully!
|
|
146
109
|
|
|
147
|
-
|
|
110
|
+
Generated Content:
|
|
148
111
|
- .github/prompts/[command-name].prompt.md
|
|
149
112
|
- Complete prompt file structure with frontmatter
|
|
150
113
|
- Usage examples and documentation
|
|
151
114
|
- Integration guidelines and recommendations
|
|
152
115
|
|
|
153
|
-
|
|
116
|
+
Command Ready:
|
|
154
117
|
Usage: /[command-name] [args]
|
|
155
118
|
Implementation: Follow generated prompt structure
|
|
156
119
|
```
|
|
@@ -159,159 +122,30 @@ agent: Code Captain
|
|
|
159
122
|
|
|
160
123
|
1. **Consistent Structure** - All generated commands follow established patterns
|
|
161
124
|
2. **Clear Documentation** - Each section has purpose and implementation details
|
|
162
|
-
3. **Integration Guidance** -
|
|
125
|
+
3. **Integration Guidance** - Provide recommendations for documentation and workflow integration
|
|
163
126
|
4. **Validation Required** - Check for conflicts and proper structure
|
|
164
127
|
5. **Template Flexibility** - Adapt template based on command type and requirements
|
|
165
|
-
6. **Language & Shell Agnostic** - Commands should work across different programming languages and shell environments
|
|
166
|
-
|
|
167
|
-
## AI Implementation Prompt
|
|
128
|
+
6. **Language & Shell Agnostic** - Commands should work across different programming languages and shell environments
|
|
168
129
|
|
|
169
|
-
|
|
170
|
-
You are creating a new Code Captain command following established patterns.
|
|
171
|
-
|
|
172
|
-
MISSION: Generate a complete, well-structured command file and update documentation.
|
|
173
|
-
|
|
174
|
-
COMMAND SPECIFICATION:
|
|
175
|
-
- Name: {command_name}
|
|
176
|
-
- Description: {description}
|
|
177
|
-
- Category: {category}
|
|
178
|
-
- Execution Style: {contract_style_or_direct_execution}
|
|
179
|
-
- Usage Pattern: {usage_pattern}
|
|
180
|
-
- AI Coordination: {needs_ai_prompts}
|
|
181
|
-
- Output Location: {output_location}
|
|
182
|
-
- Tool Integration: {copilot_tools}
|
|
183
|
-
- Workflow Steps: {workflow_phases}
|
|
184
|
-
|
|
185
|
-
TEMPLATE STRUCTURE:
|
|
186
|
-
1. Frontmatter: agent: Code Captain
|
|
187
|
-
2. Title: # [Command Name] Command
|
|
188
|
-
3. Overview: Purpose and capabilities
|
|
189
|
-
4. Command Process: Detailed step-by-step workflow
|
|
190
|
-
5. Tool Integration: GitHub Copilot tool coordination
|
|
191
|
-
6. AI Implementation Prompt: (if AI coordination needed)
|
|
192
|
-
7. Integration Notes: Platform coordination
|
|
193
|
-
|
|
194
|
-
TEMPLATE ADAPTATION RULES:
|
|
195
|
-
- Contract Style commands: Include clarification phases, contract establishment, critical analysis, user agreement checkpoints
|
|
196
|
-
- Direct Execution commands: Include immediate action workflows, minimal interaction, clear progress feedback
|
|
197
|
-
- Foundation commands: Include project initialization, planning workflows, configuration setup
|
|
198
|
-
- Analysis commands: Include context scanning, research workflows, documentation assessment
|
|
199
|
-
- Specification commands: Include specification creation, structured documentation, contract-based processes
|
|
200
|
-
- Implementation commands: Include TDD workflows, code modification, task execution
|
|
201
|
-
- Quality commands: Include health and status reporting, QA-oriented checks and validations, lightweight remediation workflows
|
|
202
|
-
- Meta commands: Include command scaffolding and documentation updates, code understanding and explanation, process and tooling refinements
|
|
203
|
-
- All commands: Include clear examples, tool coordination, progress tracking
|
|
204
|
-
- CRITICAL: Be language and shell agnostic - use codebase, search instead of language-specific commands or hardcoded file extensions
|
|
205
|
-
|
|
206
|
-
DOCUMENTATION GUIDANCE:
|
|
207
|
-
Provide recommendations for integrating the new command:
|
|
208
|
-
- Suggest workflow placement and related commands
|
|
209
|
-
- Include usage examples and best practices
|
|
210
|
-
- Recommend documentation structure and content
|
|
211
|
-
|
|
212
|
-
OUTPUT REQUIREMENTS:
|
|
213
|
-
1. Generate complete .prompt.md file with frontmatter following the template
|
|
214
|
-
2. Provide integration recommendations and workflow guidance
|
|
215
|
-
3. Include clear usage examples and implementation notes
|
|
216
|
-
4. Ensure consistency with existing command patterns
|
|
217
|
-
5. Validate no conflicts with existing commands
|
|
218
|
-
|
|
219
|
-
QUALITY CHECKS:
|
|
220
|
-
- Command name follows naming conventions (lowercase, hyphens)
|
|
221
|
-
- Usage examples are clear and practical
|
|
222
|
-
- Workflow steps are actionable and specific
|
|
223
|
-
- Integration points are clearly documented
|
|
224
|
-
- All sections serve a clear purpose
|
|
225
|
-
- No hardcoded language assumptions or shell-specific commands
|
|
226
|
-
- Uses Code Captain's existing tools (codebase, search) rather than system-specific commands
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Implementation Details
|
|
230
|
-
|
|
231
|
-
### Command Name Validation
|
|
232
|
-
|
|
233
|
-
**Validation Rules:**
|
|
234
|
-
- Lowercase letters, numbers, hyphens only
|
|
235
|
-
- No spaces or special characters
|
|
236
|
-
- Maximum 20 characters
|
|
237
|
-
- Cannot start with number or hyphen
|
|
238
|
-
- Must not conflict with existing commands
|
|
239
|
-
|
|
240
|
-
**Validation Process:**
|
|
241
|
-
```bash
|
|
242
|
-
# Check format
|
|
243
|
-
echo "command-name" | grep -E '^[a-z][a-z0-9-]*[a-z0-9]$'
|
|
244
|
-
|
|
245
|
-
# Check conflicts
|
|
246
|
-
ls .github/prompts/ | grep "^command-name.prompt.md$"
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Command Categories
|
|
130
|
+
## Command Categories
|
|
250
131
|
|
|
251
132
|
Commands are organized into logical categories:
|
|
252
133
|
|
|
253
134
|
1. **Foundation** (`initialize`, `plan-product`)
|
|
254
|
-
2. **Analysis** (`research`, `create-adr`)
|
|
255
|
-
3. **Specification** (`create-spec`, `edit-spec`)
|
|
256
|
-
4. **Implementation** (`execute-task`)
|
|
257
|
-
5. **Quality** (`status`, `swab`)
|
|
258
|
-
6. **Meta** (`new-command`, `explain-code`)
|
|
259
|
-
|
|
260
|
-
### Template Selection Logic
|
|
261
|
-
|
|
262
|
-
**Command Categories and Templates:**
|
|
263
|
-
|
|
264
|
-
1. **Foundation** (`initialize`, `plan-product`)
|
|
265
|
-
- Project initialization workflows
|
|
266
|
-
- Planning and setup processes
|
|
267
|
-
- Configuration and environment preparation
|
|
268
|
-
|
|
269
135
|
2. **Analysis** (`research`, `create-adr`)
|
|
270
|
-
- Context scanning workflows
|
|
271
|
-
- Documentation generation
|
|
272
|
-
- Research and assessment emphasis
|
|
273
|
-
|
|
274
136
|
3. **Specification** (`create-spec`, `edit-spec`)
|
|
275
|
-
- Interactive clarification phases
|
|
276
|
-
- Structured output formats
|
|
277
|
-
- Contract-based workflows
|
|
278
|
-
|
|
279
137
|
4. **Implementation** (`execute-task`)
|
|
280
|
-
- Code modification workflows
|
|
281
|
-
- TDD patterns
|
|
282
|
-
- Task execution steps
|
|
283
|
-
|
|
284
138
|
5. **Quality** (`status`, `swab`)
|
|
285
|
-
- Health and status reporting
|
|
286
|
-
- QA-oriented checks and validations
|
|
287
|
-
- Lightweight remediation workflows
|
|
288
|
-
|
|
289
139
|
6. **Meta** (`new-command`, `explain-code`)
|
|
290
|
-
- Command scaffolding and documentation updates
|
|
291
|
-
- Code understanding and explanation
|
|
292
|
-
- Process and tooling refinements
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
### Error Handling
|
|
297
|
-
|
|
298
|
-
**Common Issues:**
|
|
299
|
-
- **Duplicate command name**: Check existing prompts, suggest alternatives
|
|
300
|
-
- **Invalid command name format**: Provide format guidance and examples
|
|
301
|
-
- **Documentation integration conflicts**: Use safe merge strategies, manual review if needed
|
|
302
|
-
- **Template generation errors**: Validate inputs, provide clear error messages
|
|
303
|
-
|
|
304
|
-
**Error Messages:**
|
|
305
|
-
```
|
|
306
|
-
❌ Command creation failed: [specific reason]
|
|
307
140
|
|
|
308
|
-
|
|
309
|
-
- Check command name format (lowercase, hyphens only)
|
|
310
|
-
- Ensure name doesn't conflict with existing commands
|
|
311
|
-
- Verify all required inputs are provided
|
|
141
|
+
## Command Name Validation
|
|
312
142
|
|
|
313
|
-
|
|
314
|
-
|
|
143
|
+
**Validation Rules:**
|
|
144
|
+
- Lowercase letters, numbers, hyphens only
|
|
145
|
+
- No spaces or special characters
|
|
146
|
+
- Maximum 20 characters
|
|
147
|
+
- Cannot start with number or hyphen
|
|
148
|
+
- Must not conflict with existing commands
|
|
315
149
|
|
|
316
150
|
## Tool Integration
|
|
317
151
|
|
|
@@ -325,25 +159,3 @@ Try: /new-command "valid-name" "clear description"
|
|
|
325
159
|
- Prompt files stored in `.github/prompts/`
|
|
326
160
|
- Integration guidance for documentation updates
|
|
327
161
|
- Validation and conflict checking before creation
|
|
328
|
-
|
|
329
|
-
## Integration Notes
|
|
330
|
-
|
|
331
|
-
This command integrates with Code Captain by:
|
|
332
|
-
|
|
333
|
-
1. **Following Established Patterns** - Uses same structure as existing prompts
|
|
334
|
-
2. **Maintaining Consistency** - Ensures all new prompts match style and format
|
|
335
|
-
3. **Documentation Guidance** - Provides clear recommendations for integration and usage
|
|
336
|
-
4. **Extensibility** - Makes it easy to add new capabilities to Code Captain
|
|
337
|
-
5. **Quality Assurance** - Validates structure and prevents conflicts
|
|
338
|
-
|
|
339
|
-
## Future Enhancements
|
|
340
|
-
|
|
341
|
-
Potential improvements (not in initial version):
|
|
342
|
-
|
|
343
|
-
- **Template Library**: Multiple prompt templates for different use cases
|
|
344
|
-
- **Interactive Wizard**: Step-by-step prompt creation with guidance
|
|
345
|
-
- **Integration Testing**: Automated testing of generated prompts
|
|
346
|
-
- **Version Control**: Track prompt changes and updates
|
|
347
|
-
- **Command Dependencies**: Handle prompts that depend on other prompts
|
|
348
|
-
|
|
349
|
-
But for now: Focus on core functionality - create well-structured prompts that integrate seamlessly with the existing Code Captain ecosystem.
|