opencode-metis 0.1.0

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 (156) hide show
  1. package/README.md +140 -0
  2. package/dist/cli.cjs +63 -0
  3. package/dist/mcp-server.cjs +51 -0
  4. package/dist/plugin.cjs +4 -0
  5. package/dist/worker.cjs +224 -0
  6. package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
  7. package/opencode/agent/the-analyst/market-research.md +77 -0
  8. package/opencode/agent/the-analyst/project-coordination.md +81 -0
  9. package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
  10. package/opencode/agent/the-architect/compatibility-review.md +138 -0
  11. package/opencode/agent/the-architect/complexity-review.md +137 -0
  12. package/opencode/agent/the-architect/quality-review.md +67 -0
  13. package/opencode/agent/the-architect/security-review.md +127 -0
  14. package/opencode/agent/the-architect/system-architecture.md +119 -0
  15. package/opencode/agent/the-architect/system-documentation.md +83 -0
  16. package/opencode/agent/the-architect/technology-research.md +85 -0
  17. package/opencode/agent/the-chief.md +79 -0
  18. package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
  19. package/opencode/agent/the-designer/design-foundation.md +74 -0
  20. package/opencode/agent/the-designer/interaction-architecture.md +75 -0
  21. package/opencode/agent/the-designer/user-research.md +70 -0
  22. package/opencode/agent/the-meta-agent.md +155 -0
  23. package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
  24. package/opencode/agent/the-platform-engineer/containerization.md +106 -0
  25. package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
  26. package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
  27. package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
  28. package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
  29. package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
  30. package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
  31. package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
  32. package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
  33. package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
  34. package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
  35. package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
  36. package/opencode/agent/the-software-engineer/api-development.md +78 -0
  37. package/opencode/agent/the-software-engineer/component-development.md +79 -0
  38. package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
  39. package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
  40. package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
  41. package/opencode/command/analyze.md +149 -0
  42. package/opencode/command/constitution.md +178 -0
  43. package/opencode/command/debug.md +194 -0
  44. package/opencode/command/document.md +178 -0
  45. package/opencode/command/implement.md +225 -0
  46. package/opencode/command/refactor.md +207 -0
  47. package/opencode/command/review.md +229 -0
  48. package/opencode/command/simplify.md +267 -0
  49. package/opencode/command/specify.md +191 -0
  50. package/opencode/command/validate.md +224 -0
  51. package/opencode/skill/accessibility-design/SKILL.md +566 -0
  52. package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
  53. package/opencode/skill/agent-coordination/SKILL.md +224 -0
  54. package/opencode/skill/api-contract-design/SKILL.md +550 -0
  55. package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
  56. package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
  57. package/opencode/skill/architecture-design/SKILL.md +160 -0
  58. package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
  59. package/opencode/skill/architecture-design/template.md +749 -0
  60. package/opencode/skill/architecture-design/validation.md +99 -0
  61. package/opencode/skill/architecture-selection/SKILL.md +522 -0
  62. package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
  63. package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
  64. package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
  65. package/opencode/skill/code-quality-review/SKILL.md +337 -0
  66. package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
  67. package/opencode/skill/code-quality-review/reference.md +322 -0
  68. package/opencode/skill/code-review/SKILL.md +363 -0
  69. package/opencode/skill/code-review/reference.md +450 -0
  70. package/opencode/skill/codebase-analysis/SKILL.md +139 -0
  71. package/opencode/skill/codebase-navigation/SKILL.md +227 -0
  72. package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
  73. package/opencode/skill/coding-conventions/SKILL.md +178 -0
  74. package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
  75. package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
  76. package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
  77. package/opencode/skill/constitution-validation/SKILL.md +315 -0
  78. package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
  79. package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
  80. package/opencode/skill/constitution-validation/template.md +115 -0
  81. package/opencode/skill/context-preservation/SKILL.md +445 -0
  82. package/opencode/skill/data-modeling/SKILL.md +385 -0
  83. package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
  84. package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
  85. package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
  86. package/opencode/skill/documentation-extraction/SKILL.md +259 -0
  87. package/opencode/skill/documentation-sync/SKILL.md +431 -0
  88. package/opencode/skill/domain-driven-design/SKILL.md +509 -0
  89. package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
  90. package/opencode/skill/domain-driven-design/reference.md +465 -0
  91. package/opencode/skill/drift-detection/SKILL.md +383 -0
  92. package/opencode/skill/drift-detection/reference.md +340 -0
  93. package/opencode/skill/error-recovery/SKILL.md +162 -0
  94. package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
  95. package/opencode/skill/feature-prioritization/SKILL.md +419 -0
  96. package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
  97. package/opencode/skill/feature-prioritization/reference.md +256 -0
  98. package/opencode/skill/git-workflow/SKILL.md +453 -0
  99. package/opencode/skill/implementation-planning/SKILL.md +215 -0
  100. package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
  101. package/opencode/skill/implementation-planning/template.md +220 -0
  102. package/opencode/skill/implementation-planning/validation.md +88 -0
  103. package/opencode/skill/implementation-verification/SKILL.md +272 -0
  104. package/opencode/skill/knowledge-capture/SKILL.md +265 -0
  105. package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
  106. package/opencode/skill/knowledge-capture/reference.md +444 -0
  107. package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
  108. package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
  109. package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
  110. package/opencode/skill/observability-design/SKILL.md +291 -0
  111. package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
  112. package/opencode/skill/pattern-detection/SKILL.md +171 -0
  113. package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
  114. package/opencode/skill/performance-analysis/SKILL.md +266 -0
  115. package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
  116. package/opencode/skill/requirements-analysis/SKILL.md +139 -0
  117. package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
  118. package/opencode/skill/requirements-analysis/template.md +177 -0
  119. package/opencode/skill/requirements-analysis/validation.md +69 -0
  120. package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
  121. package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
  122. package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
  123. package/opencode/skill/safe-refactoring/SKILL.md +312 -0
  124. package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
  125. package/opencode/skill/security-assessment/SKILL.md +421 -0
  126. package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
  127. package/opencode/skill/specification-management/SKILL.md +143 -0
  128. package/opencode/skill/specification-management/readme-template.md +32 -0
  129. package/opencode/skill/specification-management/reference.md +115 -0
  130. package/opencode/skill/specification-management/spec.py +229 -0
  131. package/opencode/skill/specification-validation/SKILL.md +397 -0
  132. package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
  133. package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
  134. package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
  135. package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
  136. package/opencode/skill/task-delegation/SKILL.md +607 -0
  137. package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
  138. package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
  139. package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
  140. package/opencode/skill/task-delegation/reference.md +825 -0
  141. package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
  142. package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
  143. package/opencode/skill/technical-writing/SKILL.md +190 -0
  144. package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
  145. package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
  146. package/opencode/skill/test-design/SKILL.md +464 -0
  147. package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
  148. package/opencode/skill/testing/SKILL.md +213 -0
  149. package/opencode/skill/testing/examples/test-pyramid.md +724 -0
  150. package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
  151. package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
  152. package/opencode/skill/user-research/SKILL.md +508 -0
  153. package/opencode/skill/user-research/examples/interview-questions.md +265 -0
  154. package/opencode/skill/user-research/examples/personas.md +267 -0
  155. package/opencode/skill/vibe-security/SKILL.md +654 -0
  156. package/package.json +45 -0
@@ -0,0 +1,256 @@
1
+ # Prioritization Workshop Guide
2
+
3
+ Advanced frameworks and facilitation techniques for running effective prioritization sessions. Load this when the SKILL.md frameworks are insufficient, when running a multi-stakeholder session, or when selecting between frameworks requires more context.
4
+
5
+ ---
6
+
7
+ ## When to Use Each Framework
8
+
9
+ The SKILL.md covers RICE, Value vs Effort, Kano, MoSCoW, Cost of Delay, and Weighted Scoring. This guide adds context on when each fits best and how to run group sessions around them.
10
+
11
+ | Situation | Best Framework | Why |
12
+ |-----------|---------------|-----|
13
+ | Large backlog (10+ features), quantitative team | RICE | Objective scores cut through opinion |
14
+ | Stakeholders disagree on value | Weighted Scoring | Makes implicit criteria explicit |
15
+ | New product area, unclear user expectations | Kano | Reveals what users expect vs. what delights |
16
+ | Release scope negotiation | MoSCoW | Produces a commitment, not just a ranking |
17
+ | Regulatory or time-sensitive deadline | Cost of Delay / CD3 | Quantifies urgency in dollar terms |
18
+ | Quick triage, team is time-constrained | Value vs Effort | Fast visual sort, no calculation needed |
19
+ | Strategic alignment review | WSJF (see below) | Connects features to business risk and economics |
20
+
21
+ ---
22
+
23
+ ## WSJF: Weighted Shortest Job First
24
+
25
+ WSJF is the SAFe adaptation of Cost of Delay for agile teams. It balances economic value, urgency, and job duration.
26
+
27
+ ### Formula
28
+
29
+ ```
30
+ WSJF = Cost of Delay / Job Duration
31
+
32
+ Cost of Delay = User-Business Value + Time Criticality + Risk Reduction / Opportunity Enablement
33
+ ```
34
+
35
+ ### Scoring (1-21 Fibonacci scale)
36
+
37
+ Using Fibonacci numbers forces relative sizing and avoids false precision.
38
+
39
+ | Factor | 1 | 2 | 3 | 5 | 8 | 13 | 21 |
40
+ |--------|---|---|---|---|---|----|----|
41
+ | User-Business Value | Negligible | Minor | Small | Moderate | Significant | Large | Transformative |
42
+ | Time Criticality | None | Low | Slight | Moderate | Urgent | Very urgent | Extreme |
43
+ | Risk Reduction / Opportunity | None | Minor | Small | Moderate | Significant | Large | Critical |
44
+ | Job Duration | Very small | Small | Medium-small | Medium | Medium-large | Large | Very large |
45
+
46
+ ### Example
47
+
48
+ ```
49
+ Feature: API rate limiting
50
+ User-Business Value: 8 (prevents outages for paying customers)
51
+ Time Criticality: 13 (competitor incidents increasing)
52
+ Risk Reduction: 13 (prevents potential SLA breach)
53
+
54
+ Cost of Delay = 8 + 13 + 13 = 34
55
+
56
+ Job Duration: 3 (2-week sprint)
57
+
58
+ WSJF = 34 / 3 = 11.3
59
+
60
+ Feature: Redesigned onboarding flow
61
+ User-Business Value: 13
62
+ Time Criticality: 3 (no deadline pressure)
63
+ Risk Reduction: 2 (minor churn risk)
64
+
65
+ Cost of Delay = 13 + 3 + 2 = 18
66
+
67
+ Job Duration: 8 (6-week effort)
68
+
69
+ WSJF = 18 / 8 = 2.25
70
+
71
+ Decision: API rate limiting first (11.3 vs 2.25)
72
+ ```
73
+
74
+ ### When to Use WSJF
75
+
76
+ - SAFe or PI planning environments
77
+ - When business risk and urgency are key factors
78
+ - Features with compliance or SLA implications
79
+ - When engineering effort is the constraint, not just value
80
+
81
+ ---
82
+
83
+ ## Kano in Practice: Running a Survey
84
+
85
+ The Kano model requires user data to classify features correctly. This section covers how to gather and interpret that data.
86
+
87
+ ### Survey Design
88
+
89
+ For each feature candidate, ask both questions:
90
+
91
+ ```
92
+ Functional question: "If [feature] were available, how would you feel?"
93
+ Dysfunctional question: "If [feature] were NOT available, how would you feel?"
94
+
95
+ Answer options (same for both):
96
+ 1. I like it
97
+ 2. I expect it
98
+ 3. I'm neutral
99
+ 4. I can tolerate it
100
+ 5. I dislike it
101
+ ```
102
+
103
+ Target 20-50 respondents per customer segment. Results below 20 respondents are directional only.
104
+
105
+ ### Interpreting Results
106
+
107
+ Tally each functional/dysfunctional response pair against the interpretation matrix in SKILL.md. Calculate the percentage of respondents in each category (M, O, A, I, R, Q).
108
+
109
+ ```
110
+ Rule of thumb:
111
+ If Must-Have > 50% -> Non-negotiable, ship before anything else
112
+ If Attractive > 40% -> Strong differentiator, high ROI
113
+ If Indifferent > 50% -> Deprioritize, spend effort elsewhere
114
+ If Reverse > 20% -> Do not build -- it actively harms satisfaction
115
+ ```
116
+
117
+ ### Segment Separately
118
+
119
+ New users and power users often rate the same feature differently. A feature that is Indifferent to new users may be a Must-Have for power users. Segment your analysis when retention strategy depends on a specific user cohort.
120
+
121
+ ---
122
+
123
+ ## MoSCoW in Practice: Running the Session
124
+
125
+ MoSCoW is simple to explain but breaks down without clear rules. These facilitation steps prevent scope creep.
126
+
127
+ ### Pre-Session Preparation
128
+
129
+ 1. Define the constraint upfront: "We have 6 weeks of engineering capacity."
130
+ 2. Identify who has authority to commit. Observers attend; decision-makers vote.
131
+ 3. Prepare a feature list. Do not allow new items during the session.
132
+
133
+ ### Session Steps
134
+
135
+ ```
136
+ Step 1: Classify independently (10 minutes)
137
+ Each participant assigns M/S/C/W to every feature.
138
+ No discussion yet.
139
+
140
+ Step 2: Reveal and identify splits (10 minutes)
141
+ Show a tally of votes per feature.
142
+ Flag features with significant disagreement (>30% split).
143
+
144
+ Step 3: Discuss splits only (20-30 minutes)
145
+ Do not revisit consensus items -- they are done.
146
+ For each split, ask: "What would have to be true for this to be a Must?"
147
+
148
+ Step 4: Apply the budget rule (10 minutes)
149
+ Total Must items. If they exceed 60% of capacity, someone must move an item.
150
+ The product owner has final say when consensus fails.
151
+
152
+ Step 5: Confirm Won't list explicitly (5 minutes)
153
+ Read the Won't list aloud. Agreement here prevents later scope creep.
154
+ ```
155
+
156
+ ### Common Failure Modes
157
+
158
+ | Problem | Symptom | Fix |
159
+ |---------|---------|-----|
160
+ | Must inflation | >80% of items classified as Must | Enforce the 60% capacity rule -- force trade-offs |
161
+ | Scope creep | New items added after session | Lock the list before the session starts |
162
+ | Silent dissent | Everyone agrees in the room, feature gets cut later | Explicitly read Won't list, get verbal confirmation |
163
+ | No Won't items | Team avoids hard conversations | Ask: "What are we explicitly NOT doing this cycle?" |
164
+
165
+ ---
166
+
167
+ ## Value vs Effort: Running a Dot Vote Session
168
+
169
+ The Value vs Effort matrix works best as a participatory exercise, not a solo analysis.
170
+
171
+ ### Materials
172
+
173
+ - Whiteboard or digital canvas (Miro, Figma)
174
+ - Sticky notes or virtual cards for each feature (one per card)
175
+ - Dot stickers or voting tokens (3-5 per participant)
176
+
177
+ ### Session Format
178
+
179
+ ```
180
+ Step 1: Draw the matrix (2 minutes)
181
+ Label axes: Value (Low -> High) and Effort (Low -> High).
182
+ Mark quadrant names: Quick Wins, Strategic, Fill-Ins, Time Sinks.
183
+
184
+ Step 2: Silent placement (10 minutes)
185
+ Each participant places features on the board without discussion.
186
+ Everyone works simultaneously. No lobbying.
187
+
188
+ Step 3: Discuss outliers (15 minutes)
189
+ Find features with the widest placement spread.
190
+ Ask: "Why did you place this here?" Identify assumption gaps.
191
+ Move to consensus position.
192
+
193
+ Step 4: Dot vote on Quick Wins (5 minutes)
194
+ Give each participant 3 votes. They place dots on Quick Win quadrant items.
195
+ Top-voted items become first priorities.
196
+ ```
197
+
198
+ ### Effort Calibration Tip
199
+
200
+ Effort disagreements usually reflect different assumptions about scope, not different engineering estimates. Before placing items, agree on a reference point: "Feature X took 2 weeks -- that is Medium effort." Calibrate everything relative to that anchor.
201
+
202
+ ---
203
+
204
+ ## Facilitation Tips for Any Session
205
+
206
+ ### Pre-Session
207
+
208
+ - Send the feature list 24 hours before so participants can think independently.
209
+ - Define the decision boundary: what is in scope for this session, what is locked.
210
+ - Time-box ruthlessly. State the duration at the start and stick to it.
211
+
212
+ ### During the Session
213
+
214
+ - Separate generating from evaluating. Do not debate while placing items.
215
+ - Name the HiPPO dynamic explicitly if it emerges: "Let's hear from others before we discuss your view."
216
+ - Use silence deliberately. After asking a question, wait 10 seconds before speaking.
217
+ - Park tangents in a visible "parking lot" -- acknowledge them without letting them derail.
218
+
219
+ ### Post-Session
220
+
221
+ - Publish the ranked output within 24 hours. Delay breeds doubt.
222
+ - Document the rationale for top decisions, not just the ranking.
223
+ - Set a review date for deferred items so they are not forgotten.
224
+
225
+ ---
226
+
227
+ ## Combining Frameworks
228
+
229
+ No single framework covers every dimension. Combining two frameworks often produces better decisions than using one exclusively.
230
+
231
+ ### Recommended Combinations
232
+
233
+ | Goal | Primary Framework | Validation Framework |
234
+ |------|-------------------|----------------------|
235
+ | Quarterly roadmap | RICE (objective ranking) | Value vs Effort (gut-check on outliers) |
236
+ | Release scope | MoSCoW (commitment) | Cost of Delay (urgency validation) |
237
+ | New market entry | Kano (user expectations) | Weighted Scoring (strategic fit) |
238
+ | Resource allocation | WSJF (economic priority) | MoSCoW (feasibility check) |
239
+
240
+ ### Validation Rule
241
+
242
+ If two frameworks produce the same top 3, confidence is high. If they diverge, investigate why before committing. The divergence usually points to a hidden assumption worth surfacing.
243
+
244
+ ---
245
+
246
+ ## Decision Quality Checklist
247
+
248
+ Before finalizing a prioritization output, verify:
249
+
250
+ - [ ] Multiple frameworks used or at least one framework applied rigorously
251
+ - [ ] Confidence levels are explicit -- not everything rated 80%+ by default
252
+ - [ ] Effort estimates reviewed by at least one engineer
253
+ - [ ] Won't / defer items documented with a review date
254
+ - [ ] Decision rationale captured in a Priority Decision Record (see SKILL.md)
255
+ - [ ] Stakeholders who disagreed are documented, not silenced
256
+ - [ ] Outcome metrics defined -- how will you know if this decision was right?
@@ -0,0 +1,453 @@
1
+ ---
2
+ name: git-workflow
3
+ description: Manage git operations for spec-driven development. Use when creating branches for specs/features, generating commits, or creating PRs. Provides consistent git workflow across specify, implement, and refactor commands. Handles branch naming, commit messages, and PR descriptions based on spec context.
4
+ license: MIT
5
+ compatibility: opencode
6
+ metadata:
7
+ category: devops
8
+ version: "1.0"
9
+ ---
10
+
11
+ # Git Workflow
12
+
13
+ Roleplay as a git workflow specialist that provides consistent version control operations across the development lifecycle.
14
+
15
+ GitWorkflow {
16
+ Activation {
17
+ Checking git repository status before starting work
18
+ Creating branches for specifications or implementations
19
+ Generating commits with conventional commit messages
20
+ Creating pull requests with spec-based descriptions
21
+ Managing branch lifecycle (cleanup, merge status)
22
+ }
23
+
24
+ CorePrinciples {
25
+ GitSafety {
26
+ Preserve history on main/master (no force push)
27
+ Keep git config unchanged unless explicitly requested
28
+ Check repository status before operations
29
+ Create backups before destructive operations
30
+ }
31
+
32
+ BranchNamingConvention {
33
+ | Context | Pattern | Example |
34
+ | --- | --- | --- |
35
+ | Specification | spec/[id]-[name] | spec/001-user-auth |
36
+ | Implementation | feature/[id]-[name] | feature/001-user-auth |
37
+ | Migration | migrate/[from]-to-[to] | migrate/react-17-to-18 |
38
+ | Refactor | refactor/[scope] | refactor/auth-module |
39
+ }
40
+
41
+ CommitMessageConvention {
42
+ Format {
43
+ ```
44
+ <type>(<scope>): <description>
45
+
46
+ [optional body]
47
+
48
+ [optional footer]
49
+
50
+ Co-authored-by: Opencode <claude@anthropic.com>
51
+ ```
52
+ }
53
+
54
+ Types {
55
+ feat => New feature
56
+ fix => Bug fix
57
+ docs => Documentation
58
+ refactor => Code refactoring
59
+ test => Adding tests
60
+ chore => Maintenance
61
+ }
62
+ }
63
+ }
64
+
65
+ Operations {
66
+ RepositoryCheck {
67
+ When => Before any git operation
68
+
69
+ Commands {
70
+ ```bash
71
+ # Check if git repository
72
+ git rev-parse --is-inside-work-tree 2>/dev/null
73
+
74
+ # Get current branch
75
+ git branch --show-current
76
+
77
+ # Check for uncommitted changes
78
+ git status --porcelain
79
+
80
+ # Get remote info
81
+ git remote -v
82
+ ```
83
+ }
84
+
85
+ Output {
86
+ ```
87
+ Repository Status
88
+
89
+ Repository: [check] Git repository detected
90
+ Current Branch: [branch-name]
91
+ Remote: [origin-url]
92
+ Uncommitted Changes: [N] files
93
+
94
+ Ready for git operations: [Yes/No]
95
+ ```
96
+ }
97
+ }
98
+
99
+ BranchCreation {
100
+ When => Starting new spec or implementation
101
+
102
+ InputRequired {
103
+ context => "spec" | "feature" | "migrate" | "refactor"
104
+ identifier => Spec ID, feature name, or migration description
105
+ name => Human-readable name (will be slugified)
106
+ }
107
+
108
+ Process {
109
+ ```bash
110
+ # Ensure clean state or stash changes
111
+ if [ -n "$(git status --porcelain)" ]; then
112
+ echo "Uncommitted changes detected"
113
+ # Ask user: stash, commit, or abort
114
+ fi
115
+
116
+ # Get base branch
117
+ base_branch=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
118
+
119
+ # Create branch based on context
120
+ case $context in
121
+ "spec")
122
+ branch_name="spec/${identifier}-${name_slug}"
123
+ ;;
124
+ "feature")
125
+ branch_name="feature/${identifier}-${name_slug}"
126
+ ;;
127
+ "migrate")
128
+ branch_name="migrate/${name_slug}"
129
+ ;;
130
+ "refactor")
131
+ branch_name="refactor/${name_slug}"
132
+ ;;
133
+ esac
134
+
135
+ # Create and checkout
136
+ git checkout -b "$branch_name"
137
+ ```
138
+ }
139
+
140
+ Output {
141
+ ```
142
+ Branch Created
143
+
144
+ Branch: [branch-name]
145
+ Base: [base-branch]
146
+ Context: [spec/feature/migrate/refactor]
147
+
148
+ Ready to proceed.
149
+ ```
150
+ }
151
+ }
152
+
153
+ SpecCommit {
154
+ When => After creating/updating specification documents
155
+
156
+ InputRequired {
157
+ spec_id => Spec identifier (e.g., "001")
158
+ spec_name => Spec name
159
+ phase => "prd" | "sdd" | "plan" | "all"
160
+ }
161
+
162
+ CommitMessagesByPhase {
163
+ PRD {
164
+ ```bash
165
+ git commit -m "docs(spec-${spec_id}): Add product requirements
166
+
167
+ Defines requirements for ${spec_name}.
168
+
169
+ See: docs/specs/${spec_id}-${spec_name_slug}/product-requirements.md
170
+
171
+ Co-authored-by: Opencode <claude@anthropic.com>"
172
+ ```
173
+ }
174
+
175
+ SDD {
176
+ ```bash
177
+ git commit -m "docs(spec-${spec_id}): Add solution design
178
+
179
+ Architecture and technical design for ${spec_name}.
180
+
181
+ See: docs/specs/${spec_id}-${spec_name_slug}/solution-design.md
182
+
183
+ Co-authored-by: Opencode <claude@anthropic.com>"
184
+ ```
185
+ }
186
+
187
+ PLAN {
188
+ ```bash
189
+ git commit -m "docs(spec-${spec_id}): Add implementation plan
190
+
191
+ Phased implementation tasks for ${spec_name}.
192
+
193
+ See: docs/specs/${spec_id}-${spec_name_slug}/implementation-plan.md
194
+
195
+ Co-authored-by: Opencode <claude@anthropic.com>"
196
+ ```
197
+ }
198
+
199
+ All {
200
+ ```bash
201
+ git commit -m "docs(spec-${spec_id}): Create specification for ${spec_name}
202
+
203
+ Complete specification including:
204
+ - Product requirements (PRD)
205
+ - Solution design (SDD)
206
+ - Implementation plan (PLAN)
207
+
208
+ See: docs/specs/${spec_id}-${spec_name_slug}/
209
+
210
+ Co-authored-by: Opencode <claude@anthropic.com>"
211
+ ```
212
+ }
213
+ }
214
+ }
215
+
216
+ ImplementationCommit {
217
+ When => After implementing spec phases
218
+
219
+ InputRequired {
220
+ spec_id => Spec identifier
221
+ spec_name => Spec name
222
+ phase => Current implementation phase
223
+ summary => Brief description of changes
224
+ }
225
+
226
+ CommitMessage {
227
+ ```bash
228
+ git commit -m "feat(${spec_id}): ${summary}
229
+
230
+ Implements phase ${phase} of specification ${spec_id}-${spec_name}.
231
+
232
+ See: docs/specs/${spec_id}-${spec_name_slug}/
233
+
234
+ Co-authored-by: Opencode <claude@anthropic.com>"
235
+ ```
236
+ }
237
+ }
238
+
239
+ PullRequestCreation {
240
+ When => After completing spec or implementation
241
+
242
+ InputRequired {
243
+ context => "spec" | "feature"
244
+ spec_id => Spec identifier
245
+ spec_name => Spec name
246
+ summary => Executive summary (from PRD if available)
247
+ }
248
+
249
+ SpecificationPRTemplate {
250
+ ```bash
251
+ gh pr create \
252
+ --title "docs(spec-${spec_id}): ${spec_name}" \
253
+ --body "$(cat <<'EOF'
254
+ ## Specification: ${spec_name}
255
+
256
+ ${summary}
257
+
258
+ ## Documents
259
+
260
+ - [ ] Product Requirements (PRD)
261
+ - [ ] Solution Design (SDD)
262
+ - [ ] Implementation Plan (PLAN)
263
+
264
+ ## Review Checklist
265
+
266
+ - [ ] Requirements are clear and testable
267
+ - [ ] Architecture is sound and scalable
268
+ - [ ] Implementation plan is actionable
269
+ - [ ] No [NEEDS CLARIFICATION] markers remain
270
+
271
+ ## Related
272
+
273
+ - Spec Directory: \`docs/specs/${spec_id}-${spec_name_slug}/\`
274
+ EOF
275
+ )"
276
+ ```
277
+ }
278
+
279
+ ImplementationPRTemplate {
280
+ ```bash
281
+ gh pr create \
282
+ --title "feat(${spec_id}): ${spec_name}" \
283
+ --body "$(cat <<'EOF'
284
+ ## Summary
285
+
286
+ ${summary}
287
+
288
+ ## Specification
289
+
290
+ Implements specification [\`${spec_id}-${spec_name}\`](docs/specs/${spec_id}-${spec_name_slug}/).
291
+
292
+ ## Changes
293
+
294
+ [Auto-generated from git diff summary]
295
+
296
+ ## Test Plan
297
+
298
+ - [ ] All existing tests pass
299
+ - [ ] New tests added for new functionality
300
+ - [ ] Manual verification completed
301
+
302
+ ## Checklist
303
+
304
+ - [ ] Code follows project conventions
305
+ - [ ] Documentation updated if needed
306
+ - [ ] No breaking changes (or migration path provided)
307
+ - [ ] Specification compliance verified
308
+ EOF
309
+ )"
310
+ ```
311
+ }
312
+ }
313
+ }
314
+
315
+ UserInteraction {
316
+ BranchCreationOptions {
317
+ ```
318
+ Git Workflow
319
+
320
+ This work could benefit from version control tracking.
321
+
322
+ Options:
323
+ 1. Create [context] branch (Recommended)
324
+ -> Creates [branch-name] from [base-branch]
325
+
326
+ 2. Work on current branch
327
+ -> Continue on [current-branch]
328
+
329
+ 3. Skip git integration
330
+ -> No branch management
331
+ ```
332
+ }
333
+
334
+ UncommittedChangesHandling {
335
+ ```
336
+ [warn] Uncommitted Changes Detected
337
+
338
+ [N] files have uncommitted changes.
339
+
340
+ Options:
341
+ 1. Stash changes (Recommended)
342
+ -> Save changes, create branch, restore later
343
+
344
+ 2. Commit changes first
345
+ -> Commit current work, then create branch
346
+
347
+ 3. Proceed anyway
348
+ -> Create branch with uncommitted changes
349
+
350
+ 4. Cancel
351
+ -> Abort branch creation
352
+ ```
353
+ }
354
+
355
+ PRCreationOptions {
356
+ ```
357
+ Work Complete
358
+
359
+ Ready to create a pull request?
360
+
361
+ Options:
362
+ 1. Create PR (Recommended)
363
+ -> Push branch and create PR with description
364
+
365
+ 2. Commit only
366
+ -> Commit changes without PR
367
+
368
+ 3. Push only
369
+ -> Push branch without PR
370
+
371
+ 4. Skip
372
+ -> Leave changes uncommitted
373
+ ```
374
+ }
375
+ }
376
+
377
+ IntegrationPoints {
378
+ WithSpecify {
379
+ 1. Branch check at start => Offer to create spec/[id]-[name] branch
380
+ 2. Commit after each phase => Generate phase-specific commit
381
+ 3. PR creation at completion => Create spec review PR
382
+ }
383
+
384
+ WithImplement {
385
+ 1. Branch check at start => Offer to create feature/[id]-[name] branch
386
+ 2. Commit after each phase => Generate implementation commit
387
+ 3. PR creation at completion => Create implementation PR
388
+ }
389
+
390
+ WithRefactor {
391
+ 1. Branch check at start => Offer to create refactor/[scope] branch
392
+ 2. Commit after each refactoring => Generate refactor commit
393
+ 3. Migration branches => Create migrate/[from]-to-[to] for migrations
394
+ }
395
+ }
396
+
397
+ OutputFormat {
398
+ AfterBranchOperation {
399
+ ```
400
+ Git Operation Complete
401
+
402
+ Operation: [Branch Created / Commit Made / PR Created]
403
+ Branch: [branch-name]
404
+ Status: [Success / Failed]
405
+
406
+ [Context-specific details]
407
+
408
+ Next: [What happens next]
409
+ ```
410
+ }
411
+
412
+ AfterPRCreation {
413
+ ```
414
+ Pull Request Created
415
+
416
+ PR: #[number] - [title]
417
+ URL: [github-url]
418
+ Branch: [source] -> [target]
419
+
420
+ Status: Ready for review
421
+
422
+ Reviewers: [if auto-assigned]
423
+ Labels: [if auto-added]
424
+ ```
425
+ }
426
+ }
427
+
428
+ ErrorHandling {
429
+ CommonIssues {
430
+ | Error | Cause | Resolution |
431
+ | --- | --- | --- |
432
+ | "Not a git repository" | Not in git repo | Skip git operations or init |
433
+ | "Branch already exists" | Duplicate name | Offer to checkout or rename |
434
+ | "Uncommitted changes" | Dirty working tree | Stash, commit, or proceed |
435
+ | "No remote configured" | No upstream | Skip push/PR or configure |
436
+ | "gh not installed" | Missing GitHub CLI | Use git push, skip PR |
437
+ }
438
+
439
+ GracefulDegradation {
440
+ ```
441
+ [warn] Git Operation Limited
442
+
443
+ Issue: [What's wrong]
444
+ Impact: [What can't be done]
445
+
446
+ Available Options:
447
+ 1. [Alternative 1]
448
+ 2. [Alternative 2]
449
+ 3. Proceed without git integration
450
+ ```
451
+ }
452
+ }
453
+ }