@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,468 @@
1
+ ---
2
+ mode: agent
3
+ ---
4
+
5
+ # Create ADR Command
6
+
7
+ ## Overview
8
+
9
+ 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.
10
+
11
+ ## When to Use
12
+
13
+ - Making significant architectural decisions that affect system structure or design
14
+ - Documenting technology choices with vendor lock-in or high switching costs
15
+ - Recording decisions contrary to team expectations or industry standards
16
+ - Capturing complex trade-offs between competing architectural approaches
17
+ - Establishing architectural patterns and standards for team consistency
18
+ - Onboarding new team members to architectural reasoning and context
19
+ - Creating audit trails for compliance and governance requirements
20
+
21
+ ## Prerequisites
22
+
23
+ **MANDATORY:** This command **automatically executes research** if no relevant research exists. The ADR creation process will:
24
+
25
+ 1. Check for existing research on the decision topic
26
+ 2. If no research found: **automatically read and execute** the complete research workflow from `/research`
27
+ 3. Only proceed with ADR creation after research is completed and documented
28
+
29
+ ## Command Process
30
+
31
+ ### Step 0: Check for Existing Research and Auto-Execute if Missing
32
+
33
+ **Objective:** Ensure comprehensive research exists before creating ADR - automatically execute research if missing
34
+
35
+ **Actions:**
36
+
37
+ 1. **Check for existing research:**
38
+
39
+ - Use `search` to look for related research in `.code-captain/research/` directory
40
+ - Search for research documents that might relate to the architectural decision
41
+ - Use `codebase` to explore the research directory structure
42
+
43
+ 2. **Automatic research execution if missing:**
44
+
45
+ ```
46
+ If no relevant research found:
47
+ "❌ No existing research found for this architectural decision.
48
+
49
+ Architecture Decision Records require comprehensive research to document alternatives properly.
50
+
51
+ 🔄 AUTOMATICALLY EXECUTING RESEARCH WORKFLOW FIRST...
52
+
53
+ Reading research workflow and executing complete research process..."
54
+ ```
55
+
56
+ 3. **Execute research workflow automatically:**
57
+
58
+ - **IMMEDIATELY** execute the complete `/research` command
59
+ - **CREATE** research document in `.code-captain/research/{date}-{topic}-research.md`
60
+ - **ONLY CONTINUE** with ADR creation after research is completed
61
+
62
+ 4. **Handle research workflow:**
63
+ - If no research found: **AUTOMATICALLY execute complete research workflow first**
64
+ - If existing research found: Load and reference it throughout the ADR process
65
+ - If research is incomplete: Execute additional research before continuing
66
+
67
+ **Deliverables:**
68
+
69
+ - Research availability assessment
70
+ - **Completed research documentation** (auto-executed if missing)
71
+ - Research document ready for ADR reference
72
+
73
+ ### Step 1: Analyze Decision Context and Current State
74
+
75
+ **Objective:** Understand the current architectural state and decision context before proceeding
76
+
77
+ **PREREQUISITE:** This step only begins AFTER Step 0 confirms research exists or completes automatic research execution
78
+
79
+ **CRITICAL:** If Step 0 executed research automatically, load and reference the newly created research document
80
+
81
+ **Analysis Actions:**
82
+
83
+ 1. **Understand current architectural patterns:**
84
+
85
+ - Use `codebase` with queries:
86
+ - "What architectural patterns are currently in use?"
87
+ - "How are similar decisions handled in the codebase?"
88
+ - "What dependencies and integrations exist?"
89
+
90
+ 2. **Find existing ADRs and documentation:**
91
+
92
+ - Use `search` to find existing ADRs in `.code-captain/decision-records/` directory
93
+ - Use `codebase` to explore system structure and identify affected components
94
+
95
+ 3. **Gather decision context:**
96
+ - Identify decision stakeholders and their concerns
97
+ - Determine the specific decision that needs to be made and its urgency
98
+ - Document current architectural context summary
99
+
100
+ **Deliverables:**
101
+
102
+ - Current architectural context summary
103
+ - Decision scope and stakeholder identification
104
+ - Existing ADR inventory and numbering
105
+
106
+ ### Step 2: Define Decision Scope and Criteria
107
+
108
+ **Objective:** Clearly define what decision needs to be made and establish evaluation criteria
109
+
110
+ **Actions:**
111
+
112
+ 1. **Define the specific architectural decision** requiring documentation
113
+
114
+ 2. **Identify driving forces and constraints:**
115
+
116
+ - Business requirements and goals
117
+ - Technical constraints and limitations
118
+ - Performance, security, and scalability requirements
119
+ - Team skills and organizational capabilities
120
+ - Timeline and budget constraints
121
+
122
+ 3. **Establish decision criteria and priorities**
123
+
124
+ 4. **Determine decision maker(s) and approval process**
125
+
126
+ 5. **Set boundaries for the decision scope**
127
+
128
+ **Deliverables:**
129
+
130
+ - Clear problem statement
131
+ - Decision criteria and evaluation framework
132
+ - Stakeholder roles and responsibilities
133
+ - Decision timeline and process
134
+
135
+ ### Step 3: Research Alternatives and Evaluate Options
136
+
137
+ **Objective:** Systematically research and evaluate alternative approaches to the architectural decision
138
+
139
+ **Research Actions:**
140
+
141
+ 1. **Leverage existing research (if found in Step 0):**
142
+
143
+ - Review research documents from `.code-captain/research/` for relevant findings
144
+ - Extract key insights, alternatives, and recommendations from prior research
145
+ - Identify gaps in existing research that need additional investigation
146
+
147
+ 2. **Conduct additional research as needed:**
148
+
149
+ - Use `fetch` for external documentation and best practices
150
+ - "[technology/pattern] architectural approaches"
151
+ - "[decision area] best practices"
152
+ - "[technology] vs [alternative] comparison"
153
+
154
+ 3. **Use `codebase` to understand current implementation approaches**
155
+
156
+ 4. **Identify and document alternative options:**
157
+ - Current state/status quo option
158
+ - Industry standard approaches
159
+ - Innovative or emerging alternatives
160
+ - Hybrid approaches combining multiple patterns
161
+
162
+ **Evaluation Framework:**
163
+
164
+ For each alternative, evaluate against established criteria:
165
+
166
+ - Technical feasibility and complexity
167
+ - Performance and scalability implications
168
+ - Security and compliance considerations
169
+ - Development effort and timeline
170
+ - Long-term maintenance and evolution
171
+ - Risk assessment and mitigation strategies
172
+
173
+ **Deliverables:**
174
+
175
+ - Comprehensive alternatives analysis
176
+ - Pros and cons evaluation matrix
177
+ - Risk assessment for each option
178
+ - Expert opinions and team input summary
179
+
180
+ ### Step 4: Document ADR with Decision Rationale
181
+
182
+ **Objective:** Create comprehensive ADR documentation with clear decision rationale and consequences
183
+
184
+ **Preparation Actions:**
185
+
186
+ 1. **Get current date:**
187
+
188
+ ```bash
189
+ date +%Y-%m-%d
190
+ ```
191
+
192
+ 2. **Determine ADR number:**
193
+
194
+ - Check existing ADRs in `.code-captain/decision-records/` directory
195
+ - Use sequential numbering (0001, 0002, etc.)
196
+
197
+ 3. **Create ADR directory structure:**
198
+
199
+ Create the decision records directory using `runCommands`
200
+
201
+ **ADR Creation:**
202
+
203
+ Create markdown file: `.code-captain/decision-records/NNNN-decision-title.md` using `editFiles`
204
+
205
+ **ADR Document Template:**
206
+
207
+ ```markdown
208
+ # NNNN. [Decision Title]
209
+
210
+ **Date:** [Use output from date +%Y-%m-%d command]
211
+
212
+ **Status:** [Proposed/Accepted/Deprecated/Superseded]
213
+
214
+ **Deciders:** [Names or roles of decision makers]
215
+
216
+ **Technical Story:** [Brief reference to related issue, epic, or requirement]
217
+
218
+ ## Context and Problem Statement
219
+
220
+ [Describe the architectural problem or decision that needs to be made. Include the business context, technical context, and driving forces that led to this decision being necessary.]
221
+
222
+ ### Driving Forces
223
+
224
+ - **Business Driver 1:** [e.g., Need to support 10x user growth]
225
+ - **Technical Driver 2:** [e.g., Current monolith becoming unmaintainable]
226
+ - **Organizational Driver 3:** [e.g., Team scaling requires better separation of concerns]
227
+
228
+ ### Assumptions
229
+
230
+ - [Any assumptions made during the decision process]
231
+ - [External dependencies or constraints assumed to remain stable]
232
+
233
+ ## Decision Drivers
234
+
235
+ [List the key factors that influenced this architectural decision, in order of importance]
236
+
237
+ - **Driver 1:** [e.g., Scalability requirements]
238
+ - **Driver 2:** [e.g., Team autonomy and development velocity]
239
+ - **Driver 3:** [e.g., Technology stack modernization]
240
+ - **Driver 4:** [e.g., Operational complexity management]
241
+
242
+ ## Considered Options
243
+
244
+ ### Option 1: [Name of option, e.g., "Maintain Current Monolithic Architecture"]
245
+
246
+ **Description:** [Brief description of this approach]
247
+
248
+ **Pros:**
249
+
250
+ - [Positive aspect 1]
251
+ - [Positive aspect 2]
252
+
253
+ **Cons:**
254
+
255
+ - [Negative aspect 1]
256
+ - [Negative aspect 2]
257
+
258
+ **Effort:** [Implementation effort assessment]
259
+
260
+ **Risk:** [Risk level and key risks]
261
+
262
+ ### Option 2: [Name of option, e.g., "Migrate to Microservices Architecture"]
263
+
264
+ **Description:** [Brief description of this approach]
265
+
266
+ **Pros:**
267
+
268
+ - [Positive aspect 1]
269
+ - [Positive aspect 2]
270
+
271
+ **Cons:**
272
+
273
+ - [Negative aspect 1]
274
+ - [Negative aspect 2]
275
+
276
+ **Effort:** [Implementation effort assessment]
277
+
278
+ **Risk:** [Risk level and key risks]
279
+
280
+ ### Option 3: [Name of option, e.g., "Hybrid Modular Monolith Approach"]
281
+
282
+ **Description:** [Brief description of this approach]
283
+
284
+ **Pros:**
285
+
286
+ - [Positive aspect 1]
287
+ - [Positive aspect 2]
288
+
289
+ **Cons:**
290
+
291
+ - [Negative aspect 1]
292
+ - [Negative aspect 2]
293
+
294
+ **Effort:** [Implementation effort assessment]
295
+
296
+ **Risk:** [Risk level and key risks]
297
+
298
+ ## Decision Outcome
299
+
300
+ **Chosen Option:** [Selected option with brief rationale]
301
+
302
+ ### Rationale
303
+
304
+ [Detailed explanation of why this option was selected over the alternatives. Reference the decision drivers and how this option best addresses them.]
305
+
306
+ ### Confirmation
307
+
308
+ [How will we know this decision is working? What metrics or indicators will we monitor?]
309
+
310
+ ## Consequences
311
+
312
+ ### Positive Consequences
313
+
314
+ - [Positive outcome 1 - what improvements this decision enables]
315
+ - [Positive outcome 2 - what capabilities this decision provides]
316
+ - [Positive outcome 3 - what risks this decision mitigates]
317
+
318
+ ### Negative Consequences
319
+
320
+ - [Negative outcome 1 - what complexities this decision introduces]
321
+ - [Negative outcome 2 - what trade-offs this decision requires]
322
+ - [Negative outcome 3 - what new risks this decision creates]
323
+
324
+ ### Mitigation Strategies
325
+
326
+ - [Strategy 1 for addressing negative consequences]
327
+ - [Strategy 2 for managing introduced complexities]
328
+
329
+ ## Implementation Notes
330
+
331
+ ### Prerequisites
332
+
333
+ - [What needs to be in place before implementing this decision]
334
+ - [Dependencies that must be resolved first]
335
+
336
+ ### Implementation Steps
337
+
338
+ 1. [Step 1 - immediate actions required]
339
+ 2. [Step 2 - follow-up activities]
340
+ 3. [Step 3 - validation and monitoring setup]
341
+
342
+ ### Success Criteria
343
+
344
+ - [Measurable criteria for successful implementation]
345
+ - [Timeline for achieving implementation milestones]
346
+
347
+ ## Follow-up Actions
348
+
349
+ - [Action item 1 with owner and timeline]
350
+ - [Action item 2 with owner and timeline]
351
+ - [Review date for evaluating decision effectiveness]
352
+
353
+ ## References
354
+
355
+ - [Link to related ADRs]
356
+ - [Prior research documents from .code-captain/research/ (if applicable)]
357
+ - [External documentation, articles, or research]
358
+ - [Code repositories or examples]
359
+ - [Meeting notes or discussion records]
360
+
361
+ ## Related Decisions
362
+
363
+ - [ADR-XXXX: Related decision that influences this one]
364
+ - [ADR-YYYY: Decision that this one supersedes or is superseded by]
365
+ ```
366
+
367
+ **Review and Finalization:**
368
+
369
+ 1. **Review ADR with stakeholders and decision makers**
370
+ 2. **Update ADR status based on team consensus and approval**
371
+ 3. **Link related ADRs to show decision evolution**
372
+ 4. **Commit ADR to version control**
373
+
374
+ **Deliverables:**
375
+
376
+ - Comprehensive ADR document in `.code-captain/decision-records/NNNN-decision-title.md`
377
+ - Stakeholder review and approval record
378
+ - Updated completion status
379
+
380
+ ## Tool Integration
381
+
382
+ **Primary tools:**
383
+ - `codebase` - Understanding existing architecture and patterns
384
+ - `search` - Finding existing ADRs and related documentation
385
+ - `editFiles` - Creating ADR documents
386
+ - `runCommands` - Getting date and creating directories
387
+ - `fetch` - Retrieving external research and documentation
388
+
389
+ **Documentation organization:**
390
+ - ADRs stored in `.code-captain/decision-records/`
391
+ - Research documents in `.code-captain/research/`
392
+ - Sequential numbering for easy reference
393
+
394
+ ## Best Practices
395
+
396
+ ### Decision Scope and Focus
397
+
398
+ - Focus on one significant architectural decision per ADR
399
+ - Clearly separate the problem from potential solutions
400
+ - Include sufficient context for future readers to understand the decision
401
+ - Document the decision even if it seems obvious at the time
402
+ - Consider both technical and business implications
403
+
404
+ ### Alternatives Analysis
405
+
406
+ - Always include the "do nothing" or "status quo" option
407
+ - Research industry standards and best practices
408
+ - Consider both short-term and long-term implications
409
+ - Include effort and risk assessments for each option
410
+ - Seek diverse perspectives and expert opinions
411
+
412
+ ### Decision Documentation
413
+
414
+ - Use clear, jargon-free language that new team members can understand
415
+ - Include relevant diagrams, code examples, or architectural sketches
416
+ - Reference external sources and supporting documentation
417
+ - Document both positive and negative consequences honestly
418
+ - Plan for decision review and potential revision
419
+
420
+ ### Stakeholder Engagement
421
+
422
+ - Involve all teams affected by the architectural decision
423
+ - Allow time for thoughtful review and feedback
424
+ - Document dissenting opinions and how they were addressed
425
+ - Ensure decision makers have sufficient context and time
426
+ - Follow up on implementation and measure success
427
+
428
+ ### ADR Management
429
+
430
+ - Maintain sequential numbering for easy reference
431
+ - Store ADRs in version control alongside code
432
+ - Link related ADRs to show decision evolution
433
+ - Update status when decisions are superseded or deprecated
434
+ - Regular review of ADR effectiveness and team satisfaction
435
+
436
+ ## Common Pitfalls to Avoid
437
+
438
+ ### Decision Process Issues
439
+
440
+ - Rushing to document a decision without proper analysis
441
+ - Making decisions in isolation without stakeholder input
442
+ - Failing to research alternative approaches thoroughly
443
+ - Not considering long-term consequences and evolution
444
+ - Avoiding difficult trade-off discussions
445
+
446
+ ### Documentation Problems
447
+
448
+ - Writing ADRs that are too technical for business stakeholders
449
+ - Failing to include sufficient context for future understanding
450
+ - Not updating ADR status when decisions change
451
+ - Creating ADRs for trivial decisions that don't warrant documentation
452
+ - Writing overly long ADRs that obscure the key decision
453
+
454
+ ### Team and Process Challenges
455
+
456
+ - Not establishing clear decision-making authority
457
+ - Failing to follow up on implementation and monitoring
458
+ - Creating ADRs after decisions are already implemented
459
+ - Not linking ADRs to related architectural documentation
460
+ - Ignoring dissenting opinions without proper consideration
461
+
462
+ ### Maintenance and Evolution
463
+
464
+ - Letting ADRs become stale or outdated
465
+ - Not reviewing and learning from past decisions
466
+ - Failing to update related ADRs when superseding decisions
467
+ - Not considering the cumulative effect of multiple ADRs
468
+ - Avoiding difficult conversations about failed decisions