@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,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Code Captain status report for project orientation and next actions
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Code Captain Status Workflow
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
Provides comprehensive status report when starting work or switching context. Analyzes git state, active work, and project health to orient developers and suggest next actions.
|
|
9
|
+
|
|
10
|
+
## Core Functionality
|
|
11
|
+
|
|
12
|
+
### 1. Git Status & Context Analysis
|
|
13
|
+
Use `run_command` to gather git information:
|
|
14
|
+
- Current branch and relationship to main/origin
|
|
15
|
+
- Commits ahead/behind main branch
|
|
16
|
+
- Last commit message and timestamp
|
|
17
|
+
- Uncommitted changes summary
|
|
18
|
+
- Stash status
|
|
19
|
+
|
|
20
|
+
### 2. Active Work Detection
|
|
21
|
+
Use `codebase_search` and `view_file` to find:
|
|
22
|
+
- Code Captain specs in `.code-captain/specs/`
|
|
23
|
+
- Current task progress from most recent spec
|
|
24
|
+
- Completed vs pending tasks
|
|
25
|
+
- Current user story context
|
|
26
|
+
|
|
27
|
+
### 3. Project Health Check
|
|
28
|
+
Use `run_command` for language-specific checks:
|
|
29
|
+
- Can the project build/compile?
|
|
30
|
+
- Dependencies status (package.json, requirements.txt, etc.)
|
|
31
|
+
- Configuration issues
|
|
32
|
+
- Missing environment variables
|
|
33
|
+
|
|
34
|
+
### 4. Contextual Suggestions
|
|
35
|
+
Based on current state, suggest appropriate next commands.
|
|
36
|
+
|
|
37
|
+
## Implementation Steps
|
|
38
|
+
|
|
39
|
+
### Step 1: Git Analysis
|
|
40
|
+
```bash
|
|
41
|
+
# Use run_command for these git operations:
|
|
42
|
+
git status --porcelain # File changes
|
|
43
|
+
git log --oneline -5 # Recent commits
|
|
44
|
+
git log main..HEAD --oneline # Commits ahead
|
|
45
|
+
git log HEAD..main --oneline # Commits behind
|
|
46
|
+
git stash list # Stashed changes
|
|
47
|
+
git branch -v # Branch info
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 2: Code Captain Integration
|
|
51
|
+
Use `find_by_name` to locate specs:
|
|
52
|
+
```bash
|
|
53
|
+
# Find most recent spec directory
|
|
54
|
+
find .code-captain/specs -name "spec.md" -type f
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use `view_file` to read spec content and task progress:
|
|
58
|
+
- Read overall progress from user stories overview
|
|
59
|
+
- Parse individual story files for task completion
|
|
60
|
+
- Count completed tasks (marked with [x])
|
|
61
|
+
- Find next incomplete task
|
|
62
|
+
|
|
63
|
+
### Step 3: Project Health
|
|
64
|
+
Use `run_command` for health checks:
|
|
65
|
+
```bash
|
|
66
|
+
# Node.js
|
|
67
|
+
npm run build --if-present
|
|
68
|
+
node -c package.json
|
|
69
|
+
|
|
70
|
+
# Python
|
|
71
|
+
python -m py_compile main.py
|
|
72
|
+
pip check
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 4: Generate Status Report
|
|
76
|
+
|
|
77
|
+
**Output Format** (clean formatted text, not code blocks):
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
⚓ Code Captain Status Report
|
|
81
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
82
|
+
|
|
83
|
+
📍 CURRENT POSITION
|
|
84
|
+
Branch: feature/dashboard-websockets (2 commits ahead of main)
|
|
85
|
+
Last commit: "Add WebSocket connection hook" (2 hours ago)
|
|
86
|
+
Uncommitted: 3 modified files in src/components/
|
|
87
|
+
|
|
88
|
+
📋 ACTIVE WORK
|
|
89
|
+
Spec: Real-time Dashboard with WebSocket Integration
|
|
90
|
+
Progress: Story 2 (User receives real-time notifications) - In Progress
|
|
91
|
+
Tasks completed: 3/6 tasks (50%)
|
|
92
|
+
Next task: 2.4 Implement client-side WebSocket connection
|
|
93
|
+
|
|
94
|
+
🎯 SUGGESTED ACTIONS
|
|
95
|
+
• Continue with task 2.4 (WebSocket connection management)
|
|
96
|
+
• Commit current changes before switching tasks
|
|
97
|
+
• Review recent main branch changes
|
|
98
|
+
|
|
99
|
+
⚡ QUICK COMMANDS
|
|
100
|
+
Execute task workflow # Continue current task
|
|
101
|
+
Code cleanup workflow # Quick code improvements
|
|
102
|
+
Sync main workflow # Pull latest from main
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Task Progress Analysis
|
|
106
|
+
|
|
107
|
+
### Parsing Logic
|
|
108
|
+
For each story file in `user-stories/story-N-{name}.md`:
|
|
109
|
+
|
|
110
|
+
1. **Count completed tasks**:
|
|
111
|
+
```bash
|
|
112
|
+
grep -c "^\- \[x\].*✅" story-file.md
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
2. **Count total tasks**:
|
|
116
|
+
```bash
|
|
117
|
+
grep -c "^\- \[[x ]\]" story-file.md
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
3. **Find next incomplete task**:
|
|
121
|
+
```bash
|
|
122
|
+
grep -n "^\- \[ \]" story-file.md | head -1
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
4. **Extract status from story header**:
|
|
126
|
+
```bash
|
|
127
|
+
grep "^> \*\*Status:\*\*" story-file.md
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Status Detection
|
|
131
|
+
- `Not Started` - No tasks completed
|
|
132
|
+
- `In Progress` - Some tasks completed, some remaining
|
|
133
|
+
- `Completed ✅` - All tasks and acceptance criteria completed
|
|
134
|
+
|
|
135
|
+
## Error Handling
|
|
136
|
+
|
|
137
|
+
### Not a Git Repository
|
|
138
|
+
```
|
|
139
|
+
❌ Not in a git repository
|
|
140
|
+
Initialize git first: git init
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### No Code Captain Structure
|
|
144
|
+
```
|
|
145
|
+
📋 ACTIVE WORK
|
|
146
|
+
No Code Captain specifications found
|
|
147
|
+
Project structure: Standard git repository
|
|
148
|
+
|
|
149
|
+
🎯 SUGGESTED ACTIONS
|
|
150
|
+
• Set up Code Captain workflow
|
|
151
|
+
• Create first feature specification
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Project Issues
|
|
155
|
+
```
|
|
156
|
+
⚠️ PROJECT ISSUES DETECTED
|
|
157
|
+
• package.json syntax error
|
|
158
|
+
• Missing critical dependencies
|
|
159
|
+
• Build process failing
|
|
160
|
+
|
|
161
|
+
🔧 SUGGESTED FIXES
|
|
162
|
+
• Fix package.json syntax
|
|
163
|
+
• Run npm install or equivalent
|
|
164
|
+
• Check build configuration
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Decision Tree for Suggestions
|
|
168
|
+
|
|
169
|
+
1. **Merge conflict?** → Suggest conflict resolution
|
|
170
|
+
2. **Working directory dirty?** → Suggest commit or stash
|
|
171
|
+
3. **Branch behind main?** → Suggest sync
|
|
172
|
+
4. **Active task?** → Suggest continue task
|
|
173
|
+
5. **Current task complete?** → Suggest next task
|
|
174
|
+
6. **No active work?** → Suggest create spec
|
|
175
|
+
7. **Always** → Suggest code cleanup
|
|
176
|
+
|
|
177
|
+
## Usage Patterns
|
|
178
|
+
|
|
179
|
+
### Morning Routine
|
|
180
|
+
Developer starts day, gets oriented on yesterday's work, sees exactly what to do next.
|
|
181
|
+
|
|
182
|
+
### Context Switching
|
|
183
|
+
After meetings or interruptions, quick reminder of current state, resume work efficiently.
|
|
184
|
+
|
|
185
|
+
### Project Handoff
|
|
186
|
+
When picking up someone else's work, understand current project state without diving into code.
|
|
187
|
+
|
|
188
|
+
## Performance Considerations
|
|
189
|
+
|
|
190
|
+
- Target <2 second execution time
|
|
191
|
+
- Limit git log queries to reasonable ranges
|
|
192
|
+
- Cache expensive operations when possible
|
|
193
|
+
- Use efficient file scanning with `find_by_name`
|
|
194
|
+
|
|
195
|
+
## Windsurf Tools Used
|
|
196
|
+
|
|
197
|
+
- `run_command`: Git operations, build checks
|
|
198
|
+
- `codebase_search`: Find specs and project structure
|
|
199
|
+
- `view_file`: Read spec content and progress
|
|
200
|
+
- `find_by_name`: Locate Code Captain files
|
|
201
|
+
- `grep_search`: Parse task completion status
|
|
202
|
+
- `list_dir`: Directory structure analysis
|
|
203
|
+
|
|
204
|
+
## Security & Privacy
|
|
205
|
+
|
|
206
|
+
- All analysis happens locally
|
|
207
|
+
- No external API calls or data transmission
|
|
208
|
+
- Git history and file contents remain private
|
|
209
|
+
- Sanitize sensitive information in output
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
*⚓ Keep your bearings, maintain your heading, and always know where you stand in the code.*
|