opencodekit 0.15.21 → 0.16.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 (116) hide show
  1. package/dist/index.js +5 -7
  2. package/dist/template/.opencode/AGENTS.md +21 -20
  3. package/dist/template/.opencode/agent/build.md +88 -7
  4. package/dist/template/.opencode/agent/explore.md +1 -1
  5. package/dist/template/.opencode/agent/general.md +54 -4
  6. package/dist/template/.opencode/agent/looker.md +1 -1
  7. package/dist/template/.opencode/agent/painter.md +1 -1
  8. package/dist/template/.opencode/agent/plan.md +52 -0
  9. package/dist/template/.opencode/agent/review.md +1 -1
  10. package/dist/template/.opencode/agent/scout.md +3 -3
  11. package/dist/template/.opencode/agent/vision.md +1 -1
  12. package/dist/template/.opencode/command/create.md +201 -95
  13. package/dist/template/.opencode/command/design.md +5 -7
  14. package/dist/template/.opencode/command/handoff.md +7 -0
  15. package/dist/template/.opencode/command/init.md +25 -47
  16. package/dist/template/.opencode/command/plan.md +35 -16
  17. package/dist/template/.opencode/command/resume.md +7 -18
  18. package/dist/template/.opencode/command/ship.md +156 -0
  19. package/dist/template/.opencode/command/start.md +315 -28
  20. package/dist/template/.opencode/command/ui-review.md +5 -7
  21. package/dist/template/.opencode/command/verify.md +279 -0
  22. package/dist/template/.opencode/memory/_templates/README.md +57 -19
  23. package/dist/template/.opencode/memory/_templates/prd.md +29 -0
  24. package/dist/template/.opencode/memory/_templates/project/tech-stack.md +50 -0
  25. package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
  26. package/dist/template/.opencode/memory/_templates/spec.md +66 -0
  27. package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
  28. package/dist/template/.opencode/memory/observations/2026-02-01-decision-add-skills-vs-commands-to-global-agents-.md +15 -0
  29. package/dist/template/.opencode/memory/observations/2026-02-01-decision-build-agent-auto-loads-skills-contextual.md +31 -0
  30. package/dist/template/.opencode/memory/observations/2026-02-01-decision-fixed-agent-configuration-for-opencodeki.md +25 -0
  31. package/dist/template/.opencode/memory/observations/2026-02-01-decision-focused-agents-md-upgrade-for-opencode-k.md +14 -0
  32. package/dist/template/.opencode/memory/observations/2026-02-01-decision-implement-tier-1-permission-upgrades.md +15 -0
  33. package/dist/template/.opencode/memory/observations/2026-02-01-decision-instructions-config-explicit-paths-not-w.md +40 -0
  34. package/dist/template/.opencode/memory/observations/2026-02-01-decision-merged-context-into-memory-project-singl.md +42 -0
  35. package/dist/template/.opencode/memory/observations/2026-02-01-decision-oracle-tool-should-use-review-agent-not-.md +14 -0
  36. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-agent-auto-loads-skills-contextuall.md +31 -0
  37. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-phased-oracle-command-merge-into-ne.md +14 -0
  38. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prd-workflow-uses-prd-and-prd-task-skill.md +23 -0
  39. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prefer-review-agent-via-opencode-cli-ove.md +14 -0
  40. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-add-ship-command-with.md +14 -0
  41. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command-.md +14 -0
  42. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command.md +14 -0
  43. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-skills-vs-commands-section-from-a.md +14 -0
  44. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-tool-with-ship-command-fl.md +14 -0
  45. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-with-ship-command-workflo.md +14 -0
  46. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-proxypal-oracle-with-cli-review-.md +14 -0
  47. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-dist-template-only-tech-stack.md +50 -0
  48. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-templates-only-tech-stack-md.md +26 -0
  49. package/dist/template/.opencode/memory/observations/2026-02-01-decision-subagents-load-minimal-skills-stay-lean.md +29 -0
  50. package/dist/template/.opencode/memory/observations/2026-02-01-decision-user-approved-permission-upgrades-in-ope.md +15 -0
  51. package/dist/template/.opencode/memory/observations/2026-02-01-discovery-verify-command-already-implemented.md +28 -0
  52. package/dist/template/.opencode/memory/observations/2026-02-01-feature-openspec-phase-b-complete-template-upgra.md +43 -0
  53. package/dist/template/.opencode/memory/observations/2026-02-01-learning-build-agent-should-use-dynamic-lsp-not-f.md +14 -0
  54. package/dist/template/.opencode/memory/observations/2026-02-01-learning-kimi-k2-5-model-requires-temperature-1-0.md +22 -0
  55. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-already-imple.md +27 -0
  56. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-uses-instruct.md +35 -0
  57. package/dist/template/.opencode/memory/observations/2026-02-01-learning-update-build-agent-prompt-to-use-context.md +14 -0
  58. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-using-opencode-expert-.md +14 -0
  59. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-g.md +14 -0
  60. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-r.md +14 -0
  61. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-prefers-copilot-gpt-5-2-codex-mediu.md +14 -0
  62. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-contextu.md +15 -0
  63. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-reviewed.md +15 -0
  64. package/dist/template/.opencode/memory/project/command-rules.md +122 -0
  65. package/dist/template/.opencode/memory/project/tech-stack.md +50 -0
  66. package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
  67. package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
  68. package/dist/template/.opencode/opencode.json +916 -803
  69. package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
  70. package/package.json +1 -1
  71. package/dist/template/.opencode/command/accessibility-check.md +0 -331
  72. package/dist/template/.opencode/command/agent-browser.md +0 -21
  73. package/dist/template/.opencode/command/analyze-mockup.md +0 -423
  74. package/dist/template/.opencode/command/analyze-project.md +0 -295
  75. package/dist/template/.opencode/command/brainstorm.md +0 -373
  76. package/dist/template/.opencode/command/cloudflare.md +0 -70
  77. package/dist/template/.opencode/command/commit.md +0 -245
  78. package/dist/template/.opencode/command/complete-next-task.md +0 -77
  79. package/dist/template/.opencode/command/design-audit.md +0 -480
  80. package/dist/template/.opencode/command/edit-image.md +0 -242
  81. package/dist/template/.opencode/command/finish.md +0 -255
  82. package/dist/template/.opencode/command/fix-ci.md +0 -109
  83. package/dist/template/.opencode/command/fix-types.md +0 -104
  84. package/dist/template/.opencode/command/fix-ui.md +0 -117
  85. package/dist/template/.opencode/command/fix.md +0 -168
  86. package/dist/template/.opencode/command/frontend-design.md +0 -21
  87. package/dist/template/.opencode/command/generate-diagram.md +0 -349
  88. package/dist/template/.opencode/command/generate-icon.md +0 -283
  89. package/dist/template/.opencode/command/generate-image.md +0 -246
  90. package/dist/template/.opencode/command/generate-pattern.md +0 -247
  91. package/dist/template/.opencode/command/generate-storyboard.md +0 -250
  92. package/dist/template/.opencode/command/implement.md +0 -609
  93. package/dist/template/.opencode/command/import-plan.md +0 -406
  94. package/dist/template/.opencode/command/index-knowledge.md +0 -25
  95. package/dist/template/.opencode/command/integration-test.md +0 -424
  96. package/dist/template/.opencode/command/issue.md +0 -102
  97. package/dist/template/.opencode/command/new-feature.md +0 -651
  98. package/dist/template/.opencode/command/opensrc.md +0 -58
  99. package/dist/template/.opencode/command/quick-build.md +0 -238
  100. package/dist/template/.opencode/command/ralph.md +0 -41
  101. package/dist/template/.opencode/command/research-and-implement.md +0 -148
  102. package/dist/template/.opencode/command/research-ui.md +0 -466
  103. package/dist/template/.opencode/command/restore-image.md +0 -424
  104. package/dist/template/.opencode/command/revert-feature.md +0 -386
  105. package/dist/template/.opencode/command/skill-create.md +0 -517
  106. package/dist/template/.opencode/command/skill-optimize.md +0 -556
  107. package/dist/template/.opencode/command/summarize.md +0 -412
  108. package/dist/template/.opencode/command/triage.md +0 -398
  109. package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
  110. package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
  111. package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
  112. package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
  113. package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
  114. package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
  115. package/dist/template/.opencode/tool/notebooklm.ts +0 -488
  116. package/dist/template/.opencode/tool/oracle.ts +0 -240
@@ -0,0 +1,334 @@
1
+ # CCPM Research Analysis
2
+
3
+ **Source:** https://github.com/automazeio/ccpm
4
+ **Research Date:** 2026-02-01
5
+ **Purpose:** Learn and adapt patterns into OpenCodeKit
6
+
7
+ ---
8
+
9
+ ## Executive Summary
10
+
11
+ CCPM (Claude Code PM) is a comprehensive workflow system for spec-driven development using GitHub Issues as the task database. Key innovations include:
12
+
13
+ 1. **PRD → Epic → Task → Issue pipeline** - Full traceability from idea to code
14
+ 2. **Parallel agent execution** - Multiple agents working simultaneously via git worktrees
15
+ 3. **Context preservation** - Agents as "context firewalls" shielding main thread
16
+ 4. **GitHub-native integration** - Issues as source of truth, no external databases
17
+
18
+ ---
19
+
20
+ ## Architecture Overview
21
+
22
+ ```
23
+ ccpm/
24
+ ├── commands/
25
+ │ ├── pm/ # 40+ project management commands
26
+ │ │ ├── prd-new.md # Create PRD via brainstorming
27
+ │ │ ├── prd-parse.md # PRD → Epic conversion
28
+ │ │ ├── epic-decompose.md # Epic → Tasks breakdown
29
+ │ │ ├── epic-sync.md # Push to GitHub Issues
30
+ │ │ ├── issue-start.md # Begin parallel work
31
+ │ │ ├── next.md # Get prioritized task
32
+ │ │ └── status.md # Project dashboard
33
+ │ ├── context/ # Context management
34
+ │ │ ├── create.md # Initialize project context
35
+ │ │ ├── prime.md # Load context for session
36
+ │ │ └── update.md # Refresh context
37
+ │ └── testing/ # Test execution
38
+ ├── agents/ # Specialized workers
39
+ │ ├── parallel-worker.md # Coordinates parallel streams
40
+ │ ├── code-analyzer.md # Bug hunting specialist
41
+ │ ├── test-runner.md # Test execution + analysis
42
+ │ └── file-analyzer.md # Verbose file summarization
43
+ ├── rules/ # Operational guidelines
44
+ │ ├── agent-coordination.md # Parallel work rules
45
+ │ ├── standard-patterns.md # Command patterns
46
+ │ └── worktree-operations.md # Git worktree usage
47
+ ├── context/ # Project context files
48
+ ├── prds/ # Product requirement docs
49
+ └── epics/ # Local workspace
50
+ └── {epic-name}/
51
+ ├── epic.md # Implementation plan
52
+ ├── {issue}.md # Individual tasks
53
+ └── updates/ # Progress tracking
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Key Patterns to Adopt
59
+
60
+ ### 1. PRD-First Development Flow
61
+
62
+ **CCPM Flow:**
63
+
64
+ ```
65
+ /pm:prd-new feature → Brainstorm + create PRD
66
+ /pm:prd-parse feature → Convert PRD to Epic
67
+ /pm:epic-decompose → Break into tasks
68
+ /pm:epic-sync → Push to GitHub Issues
69
+ /pm:issue-start 123 → Begin parallel work
70
+ ```
71
+
72
+ **OpenCodeKit Equivalent:**
73
+
74
+ ```
75
+ /create <bead> --prd → Create PRD artifact
76
+ /plan <bead> → Generate implementation plan
77
+ /start <bead> → Begin work with task allocation
78
+ ```
79
+
80
+ **Gap:** We don't have `/pm:epic-decompose` equivalent - our `/plan` command does both epic creation AND task decomposition. Consider separating.
81
+
82
+ ---
83
+
84
+ ### 2. Agent Philosophy: "Context Firewalls"
85
+
86
+ **CCPM Quote:**
87
+
88
+ > "Don't anthropomorphize subagents. Use them to organize your prompts and elide context. Subagents are best when they can do lots of work but then provide small amounts of information back."
89
+
90
+ **Key Insight:** Agents aren't "experts" - they're task executors that protect main thread from information overload.
91
+
92
+ **CCPM Agent Pattern:**
93
+
94
+ ```typescript
95
+ // Agent reads 10 files → Main gets 1 summary
96
+ Task({
97
+ subagent_type: "code-analyzer",
98
+ prompt: "Hunt bugs in auth module",
99
+ // Returns: "Found 3 issues: [concise list]"
100
+ // Main thread never sees: All the files examined
101
+ });
102
+ ```
103
+
104
+ **OpenCodeKit Gap:** Our subagents return too much detail. Should adopt concise summary pattern.
105
+
106
+ ---
107
+
108
+ ### 3. Parallel Work via Git Worktrees
109
+
110
+ **CCPM Innovation:** Each epic gets its own worktree for isolated parallel development.
111
+
112
+ ```bash
113
+ # Create worktree for epic
114
+ git worktree add ../epic-{name} -b epic/{name}
115
+
116
+ # Multiple agents work in SAME worktree on DIFFERENT files
117
+ Agent-A: src/db/* → No conflict
118
+ Agent-B: src/api/* → No conflict
119
+ Agent-C: src/ui/* → No conflict
120
+ ```
121
+
122
+ **Coordination Rules:**
123
+
124
+ 1. File-level parallelism - different files = no conflict
125
+ 2. Explicit coordination for shared files
126
+ 3. Atomic commits with clear messages
127
+ 4. Human resolution for conflicts (never auto-merge)
128
+
129
+ **OpenCodeKit Gap:** We have `using-git-worktrees` skill but don't integrate it into task execution flow.
130
+
131
+ ---
132
+
133
+ ### 4. Task File Format with Dependencies
134
+
135
+ **CCPM Task Frontmatter:**
136
+
137
+ ```yaml
138
+ ---
139
+ name: Implement user authentication
140
+ status: open
141
+ created: 2024-01-20T10:00:00Z
142
+ updated: 2024-01-20T10:00:00Z
143
+ github: https://github.com/org/repo/issues/1234
144
+ depends_on: [001, 002] # Task dependencies
145
+ parallel: true # Can run in parallel
146
+ conflicts_with: [003] # Same files modified
147
+ ---
148
+ ```
149
+
150
+ **Key Fields Missing in OpenCodeKit:**
151
+
152
+ - `depends_on` - Task dependencies
153
+ - `parallel` - Parallelization flag
154
+ - `conflicts_with` - File conflict tracking
155
+
156
+ ---
157
+
158
+ ### 5. Context Management System
159
+
160
+ **CCPM Context Files:**
161
+
162
+ ```
163
+ .claude/context/
164
+ ├── project-brief.md # What + why
165
+ ├── project-overview.md # Features + capabilities
166
+ ├── project-vision.md # Long-term direction
167
+ ├── tech-context.md # Stack + dependencies
168
+ ├── project-structure.md # Directory organization
169
+ ├── system-patterns.md # Architecture patterns
170
+ ├── project-style-guide.md # Coding conventions
171
+ ├── product-context.md # Users + requirements
172
+ └── progress.md # Current status
173
+ ```
174
+
175
+ **Commands:**
176
+
177
+ - `/context:create` - Initialize all context files
178
+ - `/context:prime` - Load context at session start
179
+ - `/context:update` - Refresh after changes
180
+
181
+ **OpenCodeKit Comparison:**
182
+
183
+ - We have `.opencode/memory/` but less structured
184
+ - We lack `/context:prime` equivalent for session start
185
+ - Our `memory-read` is more ad-hoc
186
+
187
+ ---
188
+
189
+ ### 6. Standard Output Patterns
190
+
191
+ **CCPM Standard:**
192
+
193
+ ```markdown
194
+ # Success
195
+
196
+ ✅ {Action} complete
197
+
198
+ - {Key result 1}
199
+ - {Key result 2}
200
+ Next: {Single suggested action}
201
+
202
+ # Error
203
+
204
+ ❌ {What failed}: {Exact solution}
205
+
206
+ # List
207
+
208
+ {Count} {items} found:
209
+
210
+ - {item 1}: {key detail}
211
+ - {item 2}: {key detail}
212
+ ```
213
+
214
+ **Principles:**
215
+
216
+ - Fail fast - check essentials, trust the system
217
+ - Minimal output - show what matters, skip decoration
218
+ - Clear errors - say exactly what and how to fix
219
+ - Smart defaults - only ask when destructive
220
+
221
+ ---
222
+
223
+ ### 7. Parallel Execution System
224
+
225
+ **CCPM Insight:** One issue ≠ one task. One issue = multiple parallel work streams.
226
+
227
+ ```bash
228
+ # Issue #1234 explodes into parallel streams:
229
+ Agent 1: Database tables
230
+ Agent 2: Service layer
231
+ Agent 3: API endpoints
232
+ Agent 4: UI components
233
+ Agent 5: Tests + docs
234
+ ```
235
+
236
+ **Velocity Math:**
237
+
238
+ - Traditional: 3 issues × 1 agent = 3 sequential tasks
239
+ - CCPM: 3 issues × 4 streams each = 12 parallel agents
240
+
241
+ **OpenCodeKit Gap:** Our `/start` command doesn't do stream analysis or parallel agent spawning.
242
+
243
+ ---
244
+
245
+ ## Recommended Adaptations for OpenCodeKit
246
+
247
+ ### Priority 1: Command Enhancements
248
+
249
+ 1. **`/context:prime`** - Load all memory files at session start
250
+ 2. **`/status`** - Project dashboard showing beads, progress, blockers
251
+ 3. **`/next`** - Get next priority task with full context
252
+ 4. **Enhanced `/start`** - Include parallel stream analysis
253
+
254
+ ### Priority 2: Agent Improvements
255
+
256
+ 1. **Concise Returns** - Agents should return summaries, not verbose output
257
+ 2. **Parallel Worker Pattern** - Coordinator agent that spawns sub-agents
258
+ 3. **Code Analyzer** - Dedicated bug-hunting agent with structured output
259
+
260
+ ### Priority 3: Task System Enhancements
261
+
262
+ 1. **Dependency Tracking** - `depends_on`, `parallel`, `conflicts_with` fields
263
+ 2. **Stream Analysis** - Break tasks into parallel work streams
264
+ 3. **Worktree Integration** - Auto-create worktrees for epics
265
+
266
+ ### Priority 4: Context System
267
+
268
+ 1. **Structured Context Files** - Adopt CCPM's context file categories
269
+ 2. **Auto-Context Loading** - Prime context automatically on session start
270
+ 3. **Context Staleness Detection** - Warn when context is outdated
271
+
272
+ ---
273
+
274
+ ## Implementation Recommendations
275
+
276
+ ### Immediate Actions
277
+
278
+ 1. **Create `/prime` command** - Equivalent to `/context:prime`
279
+ - Load `.opencode/memory/` files
280
+ - Show project status
281
+ - List active beads
282
+
283
+ 2. **Create `/status` command** - Project dashboard
284
+ - Bead count by status
285
+ - Recent activity
286
+ - Blockers
287
+
288
+ 3. **Enhance agent return format** - Adopt CCPM's concise summary pattern
289
+
290
+ ### Medium-Term Actions
291
+
292
+ 1. **Add task dependency fields** to bead artifacts
293
+ 2. **Create `parallel-worker` skill** for coordinated parallel execution
294
+ 3. **Integrate git worktrees** into `/start` command
295
+
296
+ ### Long-Term Actions
297
+
298
+ 1. **Full context system** with structured categories
299
+ 2. **GitHub Issues integration** (optional, for teams)
300
+ 3. **Progress visualization** with dashboard commands
301
+
302
+ ---
303
+
304
+ ## Key Quotes Worth Remembering
305
+
306
+ > "Every line of code must trace back to a specification." - No vibe coding
307
+
308
+ > "Simple is not simplistic - we still handle errors properly, we just don't try to prevent every possible edge case."
309
+
310
+ > "Your main conversation becomes the conductor, not the orchestra."
311
+
312
+ > "Context preservation: Use extremely concise language. Every word must earn its place."
313
+
314
+ ---
315
+
316
+ ## Files Worth Studying Further
317
+
318
+ 1. `ccpm/commands/pm/issue-analyze.md` - Stream analysis logic
319
+ 2. `ccpm/commands/pm/epic-start.md` - Worktree creation flow
320
+ 3. `ccpm/agents/parallel-worker.md` - Coordination patterns
321
+ 4. `ccpm/rules/agent-coordination.md` - Parallel work rules
322
+
323
+ ---
324
+
325
+ ## Conclusion
326
+
327
+ CCPM provides a mature, battle-tested workflow for AI-assisted development. The key innovations are:
328
+
329
+ 1. **PRD-driven discipline** - Requirements before code
330
+ 2. **Parallel by default** - One task = many agents
331
+ 3. **Context as firewall** - Agents protect main thread
332
+ 4. **GitHub as database** - No external dependencies
333
+
334
+ OpenCodeKit can adopt these patterns incrementally, starting with `/prime`, `/status`, and enhanced agent return formats.
@@ -0,0 +1,226 @@
1
+ # OpenSpec Research Analysis
2
+
3
+ **Date:** 2026-02-01
4
+ **Source:** https://github.com/Fission-AI/OpenSpec
5
+
6
+ ## What is OpenSpec?
7
+
8
+ OpenSpec is a **spec-driven development framework** for AI coding assistants. It provides:
9
+ - A structured workflow for planning → implementing → verifying changes
10
+ - Schema-based artifact generation (proposal → specs → design → tasks)
11
+ - Git-tracked change folders with delta specs
12
+ - Archive system that merges changes into canonical specs
13
+
14
+ ## Core Philosophy
15
+
16
+ | Principle | Description |
17
+ |-----------|-------------|
18
+ | **Fluid, not rigid** | Commands are actions, not phase gates |
19
+ | **Iterative, not waterfall** | Edit artifacts during implementation |
20
+ | **Easy, not complex** | Sensible defaults, minimal config |
21
+ | **Brownfield-first** | Existing code > greenfield patterns |
22
+
23
+ ## Key Concepts
24
+
25
+ ### Directory Structure
26
+ ```
27
+ openspec/
28
+ ├── config.yaml # Project settings, context, rules
29
+ ├── specs/ # Source of truth for current behavior
30
+ └── changes/
31
+ └── <change-name>/
32
+ ├── .openspec.yaml
33
+ ├── proposal.md
34
+ ├── specs/ # Delta specs (ADDED/MODIFIED/REMOVED)
35
+ ├── design.md
36
+ └── tasks.md
37
+ ```
38
+
39
+ ### Artifact Flow (DAG)
40
+ ```
41
+ proposal → specs → design → tasks → apply
42
+ ```
43
+
44
+ Dependencies are **enablers not gates** - can edit earlier artifacts later.
45
+
46
+ ### Commands (OPSX Syntax)
47
+ | Command | Purpose |
48
+ |---------|---------|
49
+ | `/opsx:explore` | Think through ideas before committing |
50
+ | `/opsx:new` | Create change folder |
51
+ | `/opsx:continue` | Create next artifact |
52
+ | `/opsx:ff` | Fast-forward (create all artifacts) |
53
+ | `/opsx:apply` | Implement from tasks |
54
+ | `/opsx:verify` | Validate completeness/correctness/coherence |
55
+ | `/opsx:sync` | Merge delta specs to main specs |
56
+ | `/opsx:archive` | Complete and archive change |
57
+
58
+ ---
59
+
60
+ ## Schema System
61
+
62
+ ### schema.yaml Format
63
+ ```yaml
64
+ name: spec-driven
65
+ version: 1
66
+ description: The default workflow
67
+
68
+ artifacts:
69
+ - id: proposal
70
+ generates: proposal.md
71
+ template: proposal.md
72
+ instruction: |
73
+ Create a proposal explaining WHY this change is needed.
74
+ requires: []
75
+
76
+ - id: specs
77
+ generates: specs/**/*.md
78
+ template: spec.md
79
+ instruction: |
80
+ Create spec files for each capability.
81
+ requires: [proposal]
82
+
83
+ - id: design
84
+ generates: design.md
85
+ template: design.md
86
+ requires: [specs]
87
+
88
+ - id: tasks
89
+ generates: tasks.md
90
+ template: tasks.md
91
+ requires: [design]
92
+
93
+ apply:
94
+ requires: [tasks]
95
+ tracks: tasks.md
96
+ ```
97
+
98
+ ### config.yaml Format
99
+ ```yaml
100
+ schema: spec-driven
101
+
102
+ context: |
103
+ Tech stack: TypeScript, React, Node.js
104
+ API style: RESTful
105
+ Testing: Jest
106
+
107
+ rules:
108
+ proposal:
109
+ - Include rollback plan
110
+ specs:
111
+ - Use Given/When/Then format
112
+ ```
113
+
114
+ - **context**: Injected into ALL artifacts
115
+ - **rules**: Injected only into MATCHING artifact
116
+
117
+ ---
118
+
119
+ ## What OpenCodeKit Can Learn
120
+
121
+ ### 1. **Artifact-Based Workflow** (HIGH VALUE)
122
+ OpenSpec separates planning artifacts with explicit dependencies:
123
+ - `proposal.md` → Why + scope
124
+ - `specs/**/*.md` → Behavioral specs
125
+ - `design.md` → How to implement
126
+ - `tasks.md` → Checklist
127
+
128
+ **Current gap:** Our `/plan` creates a single plan.md. Consider:
129
+ - Explicit spec files per capability
130
+ - Delta spec format for changes to existing behavior
131
+
132
+ ### 2. **Schema-Driven Configuration** (MEDIUM VALUE)
133
+ OpenSpec uses YAML schemas that define:
134
+ - Artifact types and their dependencies
135
+ - Templates for each artifact
136
+ - Instructions for AI
137
+
138
+ **Current gap:** Our commands are hardcoded. Consider:
139
+ - Making command workflows configurable via schema
140
+ - Custom workflows per project (rapid, spec-driven, research-first)
141
+
142
+ ### 3. **Context + Rules Injection** (HIGH VALUE)
143
+ OpenSpec injects project context and per-artifact rules into prompts.
144
+
145
+ **Current gap:** Our AGENTS.md is global. Consider:
146
+ - `config.yaml` with `context:` block for project-specific injection
147
+ - Per-artifact rules in command definitions
148
+
149
+ ### 4. **Verify Command** (MEDIUM VALUE)
150
+ OpenSpec has explicit `/opsx:verify` that checks:
151
+ - Completeness: All artifacts exist, tasks itemized
152
+ - Correctness: Implementation matches specs
153
+ - Coherence: Artifacts don't contradict each other
154
+
155
+ **Current gap:** Our `/ship` has verification gates but not coherence checking.
156
+
157
+ ### 5. **Archive/Sync Flow** (LOW VALUE for now)
158
+ OpenSpec maintains canonical specs and merges deltas.
159
+
160
+ **Current gap:** Not needed yet. We don't track specs long-term.
161
+
162
+ ### 6. **Fluid Actions vs Phase Gates** (HIGH VALUE)
163
+ OpenSpec allows editing artifacts during implementation - no rigid phases.
164
+
165
+ **Current status:** Our workflow is already fluid (Beads). No change needed.
166
+
167
+ ---
168
+
169
+ ## Recommended Adaptations
170
+
171
+ ### Phase 1: Config-Based Context Injection
172
+ Add to `.opencode/opencode.json`:
173
+ ```json
174
+ {
175
+ "context": "Tech stack: TypeScript, React...",
176
+ "rules": {
177
+ "plan": ["Include rollback plan"],
178
+ "ship": ["Run all verification gates"]
179
+ }
180
+ }
181
+ ```
182
+
183
+ ### Phase 2: Schema-Configurable Workflows
184
+ Create `.opencode/schema/` for custom command workflows:
185
+ ```yaml
186
+ # .opencode/schema/rapid.yaml
187
+ name: rapid
188
+ artifacts:
189
+ - id: proposal
190
+ template: proposal.md
191
+ - id: tasks
192
+ template: tasks.md
193
+ requires: [proposal]
194
+ ```
195
+
196
+ ### Phase 3: Spec Files Per Bead
197
+ Create spec structure:
198
+ ```
199
+ .beads/artifacts/<bead-id>/
200
+ ├── spec.md # Current (single file)
201
+ ├── specs/ # NEW: Per-capability specs
202
+ │ └── <capability>.md
203
+ └── plan.md
204
+ ```
205
+
206
+ ---
207
+
208
+ ## Key Differences
209
+
210
+ | Aspect | OpenSpec | OpenCodeKit |
211
+ |--------|----------|-------------|
212
+ | Task tracking | Filesystem-based | Beads (git-backed) |
213
+ | Workflow | Schema-defined | Command-defined |
214
+ | Specs | Canonical + Delta | Per-bead only |
215
+ | Config | YAML | JSON |
216
+ | Context injection | Built-in | Manual (AGENTS.md) |
217
+ | Verification | 3 dimensions | Test/lint gates |
218
+
219
+ ---
220
+
221
+ ## Next Steps
222
+
223
+ 1. **Immediate:** Add `context` block to opencode.json spec
224
+ 2. **Short-term:** Create `/verify` command with coherence checking
225
+ 3. **Medium-term:** Schema-configurable workflows
226
+ 4. **Long-term:** Canonical spec maintenance (if needed)