@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.
Files changed (55) hide show
  1. package/README.md +214 -0
  2. package/bin/install.js +1048 -0
  3. package/claude-code/README.md +276 -0
  4. package/claude-code/agents/code-captain.md +121 -0
  5. package/claude-code/agents/spec-generator.md +271 -0
  6. package/claude-code/agents/story-creator.md +309 -0
  7. package/claude-code/agents/tech-spec.md +440 -0
  8. package/claude-code/commands/cc-initialize.md +520 -0
  9. package/copilot/README.md +210 -0
  10. package/copilot/chatmodes/Code Captain.chatmode.md +60 -0
  11. package/copilot/docs/best-practices.md +74 -0
  12. package/copilot/prompts/create-adr.prompt.md +468 -0
  13. package/copilot/prompts/create-spec.prompt.md +430 -0
  14. package/copilot/prompts/edit-spec.prompt.md +396 -0
  15. package/copilot/prompts/execute-task.prompt.md +144 -0
  16. package/copilot/prompts/explain-code.prompt.md +292 -0
  17. package/copilot/prompts/initialize.prompt.md +65 -0
  18. package/copilot/prompts/new-command.prompt.md +310 -0
  19. package/copilot/prompts/plan-product.prompt.md +450 -0
  20. package/copilot/prompts/research.prompt.md +329 -0
  21. package/copilot/prompts/status.prompt.md +424 -0
  22. package/copilot/prompts/swab.prompt.md +217 -0
  23. package/cursor/README.md +224 -0
  24. package/cursor/cc.md +183 -0
  25. package/cursor/cc.mdc +69 -0
  26. package/cursor/commands/create-adr.md +504 -0
  27. package/cursor/commands/create-spec.md +430 -0
  28. package/cursor/commands/edit-spec.md +405 -0
  29. package/cursor/commands/execute-task.md +514 -0
  30. package/cursor/commands/explain-code.md +289 -0
  31. package/cursor/commands/initialize.md +397 -0
  32. package/cursor/commands/new-command.md +312 -0
  33. package/cursor/commands/plan-product.md +466 -0
  34. package/cursor/commands/research.md +317 -0
  35. package/cursor/commands/status.md +413 -0
  36. package/cursor/commands/swab.md +209 -0
  37. package/cursor/docs/best-practices.md +74 -0
  38. package/cursor/integrations/azure-devops/create-azure-work-items.md +403 -0
  39. package/cursor/integrations/azure-devops/sync-azure-work-items.md +486 -0
  40. package/cursor/integrations/github/create-github-issues.md +765 -0
  41. package/cursor/integrations/github/scripts/create-issues-batch.sh +272 -0
  42. package/cursor/integrations/github/sync-github-issues.md +237 -0
  43. package/cursor/integrations/github/sync.md +305 -0
  44. package/manifest.json +381 -0
  45. package/package.json +58 -0
  46. package/windsurf/README.md +254 -0
  47. package/windsurf/rules/cc.md +5 -0
  48. package/windsurf/workflows/create-adr.md +331 -0
  49. package/windsurf/workflows/create-spec.md +280 -0
  50. package/windsurf/workflows/edit-spec.md +273 -0
  51. package/windsurf/workflows/execute-task.md +276 -0
  52. package/windsurf/workflows/explain-code.md +292 -0
  53. package/windsurf/workflows/initialize.md +298 -0
  54. package/windsurf/workflows/new-command.md +321 -0
  55. package/windsurf/workflows/status.md +213 -0
@@ -0,0 +1,450 @@
1
+ ---
2
+ mode: agent
3
+ ---
4
+
5
+ # Plan Product Command
6
+
7
+ ## Overview
8
+
9
+ Generate comprehensive product planning documentation using a contract-first approach that establishes clear product vision, mission, and roadmap before creating any supporting files. This command eliminates assumptions by gathering complete product context through structured discovery, then creates a complete product planning package for AI-assisted development.
10
+
11
+ ## Command Process
12
+
13
+ ### Phase 1: Product Discovery & Contract Establishment (No File Creation)
14
+
15
+ **Mission Statement:**
16
+ > Your goal is to transform a rough product idea into a comprehensive, actionable product plan. You will deliver the complete product planning package only after we both agree on the product contract. **Important: Challenge ideas that don't make business or technical sense - it's better to surface concerns early than build the wrong product.**
17
+
18
+ #### Step 1.1: Initial Context Scan
19
+
20
+ - Scan existing `.code-captain/product/` for any existing product documentation
21
+ - Load available project context from `.code-captain/docs/` (tech-stack.md if available)
22
+ - Review any existing product mission or objectives
23
+ - **Output:** Product context summary and foundation assessment
24
+
25
+ #### Step 1.2: Gap Analysis & Silent Enumeration
26
+
27
+ **Internal Process (not shown to user):**
28
+ - Silently list every missing product detail and requirement
29
+ - Identify ambiguities in the initial product description
30
+ - Note potential market and technical constraints
31
+ - Catalog unknowns across these domains:
32
+ - Product vision and core value proposition
33
+ - Target market and user personas
34
+ - Key features and functionality scope
35
+ - Business model and monetization strategy
36
+ - Technical feasibility and architecture requirements
37
+ - Competitive landscape and differentiation
38
+ - Success metrics and validation criteria
39
+ - Timeline expectations and resource constraints
40
+ - Risk factors and mitigation strategies
41
+
42
+ #### Step 1.3: Structured Product Discovery Loop
43
+
44
+ **Rules:**
45
+ - Ask ONE focused question at a time
46
+ - After each answer, re-analyze context and technical feasibility
47
+ - Continue until reaching 95% confidence on product deliverable
48
+ - Each question should target the highest-impact unknown
49
+ - **Never declare "final question"** - let the conversation flow naturally
50
+ - Let the user signal when they're ready to lock the contract
51
+ - **Challenge ideas that don't make business or technical sense** - better to surface concerns early than plan the wrong product
52
+
53
+ **Critical Analysis Responsibility:**
54
+ - If product scope seems too large for available resources, recommend phasing
55
+ - If target market is unclear or too broad, suggest narrowing focus
56
+ - If technical requirements conflict with existing codebase, explain implications
57
+ - If business model doesn't align with user value, ask clarifying questions
58
+ - If competitive landscape presents challenges, surface them proactively
59
+
60
+ **Pushback Phrasing Examples:**
61
+ - "I see a potential issue with [scope] because [business/technical reason]. Would focusing on [core value] first work better?"
62
+ - "Based on your existing codebase, [proposed approach] might require significant architecture changes. Are you prepared for that?"
63
+ - "The market you're describing sounds very broad. Should we focus on [specific segment] to start?"
64
+ - "I'm concerned that [requirement] could face [specific challenge]. Have you considered [alternative approach]?"
65
+
66
+ **Question Categories (examples):**
67
+ - "Who specifically has this problem, and how painful is it for them?"
68
+ - "What would make someone switch from their current solution to yours?"
69
+ - "How will you measure product success in the first 6 months?"
70
+ - "What's your biggest constraint - time, budget, technical expertise, or market access?"
71
+ - "How does this align with your existing business/project goals?"
72
+ - "What happens if your first assumption about users turns out to be wrong?"
73
+
74
+ **Transition to Contract:**
75
+ - When confidence is high, present contract without declaring it "final"
76
+ - Use phrases like "I think I have enough to create a solid product contract" or "Based on our discussion, here's what I understand"
77
+ - Always leave room for more questions if needed
78
+
79
+ #### Step 1.4: Product Contract Proposal
80
+
81
+ When confident, present a product contract proposal with any concerns surfaced:
82
+
83
+ **Format:**
84
+ ```
85
+ ## Product Planning Contract
86
+
87
+ **Product Vision:** [One clear sentence describing the product and its primary value]
88
+
89
+ **Target Market:** [Specific user segment with their core problem]
90
+
91
+ **Unique Value:** [What makes this different/better than alternatives]
92
+
93
+ **Success Criteria:** [How you'll measure product-market fit and growth]
94
+
95
+ **MVP Scope:**
96
+ - Core Features: [3-5 essential features for first version]
97
+ - Success Metrics: [Key performance indicators]
98
+
99
+ **Product Architecture:**
100
+ - Complexity Level: [Simple/Moderate/Complex based on features]
101
+ - Integration Needs: [How this fits with existing business systems]
102
+ - Scale Requirements: [Expected user growth and feature expansion]
103
+
104
+ **⚠️ Product Risks (if any):**
105
+ - [Market risk, technical risk, or business model concerns]
106
+ - [Suggested validation approach or risk mitigation]
107
+
108
+ **πŸ’‘ Recommendations:**
109
+ - [Suggestions for improving product-market fit]
110
+ - [Ways to validate assumptions early and reduce risk]
111
+
112
+ **Roadmap Phases:**
113
+ - Phase 1 (MVP): [Core value delivery - weeks/months]
114
+ - Phase 2 (Growth): [Key expansion features - months]
115
+ - Phase 3 (Scale): [Advanced capabilities - quarters]
116
+
117
+ ---
118
+ Options:
119
+ - Type 'yes' to lock this contract and create the product planning package
120
+ - Type 'edit: [your changes]' to modify the contract
121
+ - Type 'risks' to explore potential market/technical risks in detail
122
+ - Type 'competition' to analyze competitive landscape
123
+ - Ask more questions if anything needs clarification
124
+ ```
125
+
126
+ ### Phase 2: Product Planning Package Creation (Post-Agreement Only)
127
+
128
+ **Triggered only after user confirms contract with 'yes'**
129
+
130
+ #### Step 2.1: Create Directory Structure
131
+
132
+ **Generated folder:**
133
+ ```
134
+ .code-captain/product/
135
+ β”œβ”€β”€ mission.md # Complete product vision and strategy
136
+ β”œβ”€β”€ mission-lite.md # Condensed version for AI context
137
+ β”œβ”€β”€ roadmap.md # Development phases and timeline
138
+ β”œβ”€β”€ decisions.md # Decision log with rationale
139
+ └── research/ # Supporting research and analysis
140
+ β”œβ”€β”€ market-analysis.md # Target market and competition (if needed)
141
+ β”œβ”€β”€ user-personas.md # Detailed user profiles (if needed)
142
+ └── feature-specs/ # Individual feature specifications (if needed)
143
+ ```
144
+
145
+ #### Step 2.2: Generate Core Product Documents
146
+
147
+ **mission.md** - Built directly from the locked contract:
148
+ ```markdown
149
+ # Product Mission
150
+
151
+ > Created: [DATE]
152
+ > Status: Planning
153
+ > Contract Locked: βœ…
154
+
155
+ ## Pitch
156
+ [PRODUCT_NAME] is a [PRODUCT_TYPE] that helps [TARGET_USERS] [SOLVE_PROBLEM] by providing [KEY_VALUE_PROPOSITION].
157
+
158
+ ## Users
159
+ ### Primary Customers
160
+ - [CUSTOMER_SEGMENT]: [DESCRIPTION and pain points]
161
+
162
+ ### User Personas
163
+ **[PRIMARY_USER_TYPE]** ([AGE_RANGE])
164
+ - **Role:** [JOB_TITLE or context]
165
+ - **Context:** [Where/when they encounter the problem]
166
+ - **Pain Points:** [Specific problems this product solves]
167
+ - **Goals:** [What success looks like for them]
168
+
169
+ ## The Problem
170
+ ### [MAIN_PROBLEM_TITLE]
171
+ [Problem description with quantifiable impact where possible]
172
+
173
+ **Our Solution:** [How the product specifically addresses this problem]
174
+
175
+ ## Differentiators
176
+ ### [KEY_DIFFERENTIATOR]
177
+ Unlike [EXISTING_ALTERNATIVES], we provide [SPECIFIC_ADVANTAGE]. This results in [MEASURABLE_BENEFIT].
178
+
179
+ ## Key Features
180
+ ### Core Features (MVP)
181
+ - **[FEATURE_NAME]:** [User benefit and value]
182
+
183
+ ### Growth Features (Phase 2)
184
+ - **[FEATURE_NAME]:** [User benefit and expansion value]
185
+
186
+ ### Scale Features (Phase 3)
187
+ - **[FEATURE_NAME]:** [Advanced capabilities]
188
+ ```
189
+
190
+ **roadmap.md** - Phased development plan:
191
+ ```markdown
192
+ # Product Roadmap
193
+
194
+ > Based on Product Contract: [DATE]
195
+
196
+ ## Phase 1: MVP (Minimum Viable Product)
197
+ **Timeline:** [Weeks/months]
198
+ **Goal:** Validate core value proposition with target users
199
+
200
+ ### Success Criteria
201
+ - [Measurable criteria for product-market fit]
202
+ - [Key metrics to track]
203
+
204
+ ### Core Features
205
+ - [ ] [FEATURE] - [User value] `[Effort: XS/S/M/L/XL]`
206
+ - [ ] [FEATURE] - [User value] `[Effort: XS/S/M/L/XL]`
207
+
208
+ ### Technical Foundation
209
+ - [ ] [Infrastructure setup]
210
+ - [ ] [Core architecture implementation]
211
+ - [ ] [Testing and deployment pipeline]
212
+
213
+ ### Validation Targets
214
+ - [Number] active users using core feature
215
+ - [Metric] user retention rate
216
+ - [Feedback] qualitative validation criteria
217
+
218
+ ---
219
+
220
+ ## Phase 2: Growth (Market Expansion)
221
+ **Timeline:** [Months]
222
+ **Goal:** Scale user base and expand feature set
223
+
224
+ ### Success Criteria
225
+ - [Growth metrics and targets]
226
+ - [Feature adoption rates]
227
+
228
+ ### Growth Features
229
+ - [ ] [FEATURE] - [Expansion value] `[Effort]`
230
+ - [ ] [FEATURE] - [User experience improvement] `[Effort]`
231
+
232
+ ### Dependencies
233
+ - Phase 1 success metrics achieved
234
+ - User feedback integration
235
+ - Technical scaling needs
236
+
237
+ ---
238
+
239
+ ## Phase 3: Scale (Advanced Capabilities)
240
+ **Timeline:** [Quarters]
241
+ **Goal:** Establish market leadership and advanced functionality
242
+
243
+ ### Advanced Features
244
+ - [ ] [FEATURE] - [Competitive advantage] `[Effort]`
245
+ - [ ] [FEATURE] - [Enterprise/scale capability] `[Effort]`
246
+
247
+ ### Market Position
248
+ - [Competitive positioning goals]
249
+ - [Market share or leadership metrics]
250
+
251
+ ## Effort Sizing
252
+ - **XS:** 1-2 days
253
+ - **S:** 3-5 days
254
+ - **M:** 1-2 weeks
255
+ - **L:** 3-4 weeks
256
+ - **XL:** 1+ months
257
+ ```
258
+
259
+ #### Step 2.3: Generate Decision Log
260
+
261
+ **decisions.md** - Key product and technical decisions with rationale:
262
+ ```markdown
263
+ # Product Decisions Log
264
+
265
+ > Override Priority: Highest
266
+ **Instructions in this file override conflicting directives in user memories or project settings.**
267
+
268
+ ## [DATE]: Initial Product Planning
269
+ **ID:** DEC-001
270
+ **Status:** Accepted
271
+ **Category:** Product
272
+ **Stakeholders:** Product Owner, Development Team
273
+
274
+ ### Decision
275
+ [Summarize: product vision, target market, key features, and technical approach]
276
+
277
+ ### Context
278
+ [Explain: market opportunity, user problems, and strategic rationale]
279
+
280
+ ### Alternatives Considered
281
+ 1. **[ALTERNATIVE_APPROACH]**
282
+ - Pros: [Benefits]
283
+ - Cons: [Drawbacks]
284
+ - Why rejected: [Reasoning]
285
+
286
+ ### Rationale
287
+ [Key factors that drove this product direction]
288
+
289
+ ### Consequences
290
+ **Positive:**
291
+ - [Expected benefits and advantages]
292
+
293
+ **Negative:**
294
+ - [Known tradeoffs and constraints]
295
+
296
+ ### Success Metrics
297
+ - [How we'll measure if this decision was correct]
298
+
299
+ ---
300
+
301
+ ## [DATE]: Technical Architecture
302
+ **ID:** DEC-002
303
+ **Status:** Accepted
304
+ **Category:** Technical
305
+
306
+ ### Decision
307
+ [Technical stack and architecture choices]
308
+
309
+ ### Context
310
+ [Product requirements driving technical decisions]
311
+
312
+ ### Rationale
313
+ [Why these technologies support product goals]
314
+
315
+ ### Review Trigger
316
+ [When/how to revisit these technical decisions]
317
+ ```
318
+
319
+ #### Step 2.4: Create Mission-Lite for AI Context
320
+
321
+ **mission-lite.md** - Condensed product context for efficient AI usage:
322
+ ```markdown
323
+ # Product Mission (Lite)
324
+
325
+ > Source: Complete mission.md
326
+ > Purpose: Efficient AI context for development
327
+
328
+ ## Core Value
329
+ [1-2 sentences capturing the essential product value proposition]
330
+
331
+ ## Target Users
332
+ [Primary user segment and their core problem]
333
+
334
+ ## Key Differentiator
335
+ [What makes this unique in 1 sentence]
336
+
337
+ ## Success Definition
338
+ [How we measure product success]
339
+
340
+ ## Current Phase
341
+ [MVP/Growth/Scale - what we're building now]
342
+
343
+ ---
344
+
345
+ **Example:**
346
+ TaskMaster is a project management tool that helps remote software teams coordinate work efficiently through automated workflow integration and intelligent task prioritization. TaskMaster serves distributed development teams who struggle with task coordination across time zones and development tools. Unlike traditional project management tools, TaskMaster automatically syncs with Git workflows and provides AI-powered task prioritization based on team capacity and code dependencies.
347
+ ```
348
+
349
+ #### Step 2.5: Final Package Review & User Validation
350
+
351
+ Present complete package with file references:
352
+ ```
353
+ βœ… Product planning package created successfully!
354
+
355
+ πŸ“ .code-captain/product/
356
+ β”œβ”€β”€ πŸ“‹ mission.md - Complete product vision and strategy
357
+ β”œβ”€β”€ πŸ“ mission-lite.md - AI context summary
358
+ β”œβ”€β”€ πŸ—ΊοΈ roadmap.md - Phased development plan
359
+ └── πŸ“Š decisions.md - Decision log and rationale
360
+
361
+ The product plan captures everything we discussed, including:
362
+ - [Brief summary of product vision]
363
+ - [Key market positioning and user value]
364
+ - [Roadmap approach or notable phases]
365
+
366
+ Please review the planning documents and let me know:
367
+ - Does this accurately capture your product vision?
368
+ - Are there any missing requirements or incorrect assumptions?
369
+ - Should any product decisions be reconsidered?
370
+ - Does the roadmap timeline align with your expectations?
371
+
372
+ Once you're satisfied with the product plan, you can use:
373
+ - `/create-spec` to detail specific features from the roadmap
374
+ - `/execute-task` to begin implementing planned features
375
+ - `/research` to investigate any market or product unknowns
376
+ ```
377
+
378
+ ## Tool Integration
379
+
380
+ **Primary tools:**
381
+ - `codebase` - Analyzing existing project context and architecture
382
+ - `search` - Finding existing product documentation
383
+ - `editFiles` - Creating product planning documents
384
+ - `runCommands` - Directory creation and date operations
385
+ - `fetch` - Market research and competitive analysis (if needed)
386
+
387
+ **Documentation organization:**
388
+ - Product plans stored in `.code-captain/product/`
389
+ - Cross-references with existing project documentation
390
+ - Integration with feature specification workflow
391
+
392
+ ## Key Improvements Over Basic Product Planning
393
+
394
+ ### 1. Contract-First Product Discovery
395
+ - **No presumptuous planning** - Nothing gets created until product contract is locked
396
+ - **Structured discovery** - One question at a time, building complete understanding
397
+ - **Critical analysis** - Challenges assumptions and surfaces risks early
398
+
399
+ ### 2. Context-Aware Planning
400
+ - **Product continuity** - Plans build on existing product foundation if present
401
+ - **Integration considerations** - Product features consider current business context
402
+ - **Realistic scoping** - Development effort estimates based on team capabilities
403
+
404
+ ### 3. User Control & Risk Assessment
405
+ - **Clear decision points** - User explicitly approves before file creation
406
+ - **Risk exploration option** - Can analyze market/technical risks before committing
407
+ - **Edit capability** - Can modify contract before locking
408
+ - **Competition analysis** - Can explore competitive landscape
409
+
410
+ ### 4. AI-Optimized Output
411
+ - **Mission-lite for context** - Efficient AI consumption during development
412
+ - **Decision tracking** - Clear rationale for AI to follow in future work
413
+ - **Integration with specs** - Seamless flow to detailed feature specification
414
+
415
+ ## Integration with Code Captain Ecosystem
416
+
417
+ **Project foundation dependency:**
418
+ - Works with existing `.code-captain/docs/` context files for technical awareness
419
+ - Builds on any existing product documentation
420
+ - Integrates with established project patterns if present
421
+
422
+ **Cross-command integration:**
423
+ - Feeds into `/create-spec` for detailed feature planning
424
+ - Supports `/execute-task` with clear product context
425
+ - Can trigger `/research` for market or technical investigation
426
+
427
+ **Output integration:**
428
+ - Product documents provide context for all future development
429
+ - Decision log guides technical choices
430
+ - Roadmap phases structure feature development
431
+
432
+ ## Best Practices
433
+
434
+ **Product discovery:**
435
+ - Challenge assumptions early and often
436
+ - Focus on user problems over solution features
437
+ - Validate business model alignment with user value
438
+ - Surface technical constraints before committing to features
439
+
440
+ **Documentation quality:**
441
+ - Keep mission-lite focused and efficient for AI context
442
+ - Maintain decision rationale for future reference
443
+ - Structure roadmap for incremental value delivery
444
+ - Connect technical decisions to product requirements
445
+
446
+ **Risk management:**
447
+ - Identify market risks and validation strategies
448
+ - Assess technical feasibility realistically
449
+ - Plan for scope reduction if needed
450
+ - Build learning and iteration into roadmap phases