opencodekit 0.15.21 → 0.16.1

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 (144) hide show
  1. package/dist/index.js +5 -7
  2. package/dist/template/.opencode/AGENTS.md +85 -23
  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 +231 -91
  13. package/dist/template/.opencode/command/design.md +40 -7
  14. package/dist/template/.opencode/command/handoff.md +22 -0
  15. package/dist/template/.opencode/command/init.md +49 -78
  16. package/dist/template/.opencode/command/plan.md +36 -16
  17. package/dist/template/.opencode/command/pr.md +15 -0
  18. package/dist/template/.opencode/command/research.md +3 -0
  19. package/dist/template/.opencode/command/resume.md +8 -18
  20. package/dist/template/.opencode/command/review-codebase.md +30 -0
  21. package/dist/template/.opencode/command/ship.md +199 -0
  22. package/dist/template/.opencode/command/start.md +316 -28
  23. package/dist/template/.opencode/command/status.md +24 -1
  24. package/dist/template/.opencode/command/ui-review.md +36 -7
  25. package/dist/template/.opencode/command/verify.md +307 -0
  26. package/dist/template/.opencode/memory/_templates/prd.md +29 -0
  27. package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
  28. package/dist/template/.opencode/memory/_templates/spec.md +66 -0
  29. package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
  30. package/dist/template/.opencode/memory/_templates/tech-stack.md +50 -0
  31. package/dist/template/.opencode/memory/project/tech-stack.md +53 -0
  32. package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
  33. package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
  34. package/dist/template/.opencode/memory.db +0 -0
  35. package/dist/template/.opencode/memory.db-shm +0 -0
  36. package/dist/template/.opencode/memory.db-wal +0 -0
  37. package/dist/template/.opencode/opencode.json +18 -4
  38. package/dist/template/.opencode/package.json +1 -0
  39. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +418 -0
  40. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +170 -0
  41. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +278 -0
  42. package/dist/template/.opencode/plugin/lib/memory-db.ts +828 -0
  43. package/dist/template/.opencode/plugin/memory.ts +38 -1
  44. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +76 -31
  45. package/dist/template/.opencode/skill/memory-system/SKILL.md +110 -55
  46. package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
  47. package/dist/template/.opencode/tool/memory-get.ts +143 -0
  48. package/dist/template/.opencode/tool/memory-maintain.ts +167 -0
  49. package/dist/template/.opencode/tool/memory-migrate.ts +319 -0
  50. package/dist/template/.opencode/tool/memory-read.ts +17 -46
  51. package/dist/template/.opencode/tool/memory-search.ts +131 -28
  52. package/dist/template/.opencode/tool/memory-timeline.ts +105 -0
  53. package/dist/template/.opencode/tool/memory-update.ts +21 -26
  54. package/dist/template/.opencode/tool/observation.ts +112 -100
  55. package/dist/template/.opencode/tsconfig.json +19 -19
  56. package/package.json +1 -1
  57. package/dist/template/.opencode/command/accessibility-check.md +0 -331
  58. package/dist/template/.opencode/command/agent-browser.md +0 -21
  59. package/dist/template/.opencode/command/analyze-mockup.md +0 -423
  60. package/dist/template/.opencode/command/analyze-project.md +0 -295
  61. package/dist/template/.opencode/command/brainstorm.md +0 -373
  62. package/dist/template/.opencode/command/cloudflare.md +0 -70
  63. package/dist/template/.opencode/command/commit.md +0 -245
  64. package/dist/template/.opencode/command/complete-next-task.md +0 -77
  65. package/dist/template/.opencode/command/design-audit.md +0 -480
  66. package/dist/template/.opencode/command/edit-image.md +0 -242
  67. package/dist/template/.opencode/command/finish.md +0 -255
  68. package/dist/template/.opencode/command/fix-ci.md +0 -109
  69. package/dist/template/.opencode/command/fix-types.md +0 -104
  70. package/dist/template/.opencode/command/fix-ui.md +0 -117
  71. package/dist/template/.opencode/command/fix.md +0 -168
  72. package/dist/template/.opencode/command/frontend-design.md +0 -21
  73. package/dist/template/.opencode/command/generate-diagram.md +0 -349
  74. package/dist/template/.opencode/command/generate-icon.md +0 -283
  75. package/dist/template/.opencode/command/generate-image.md +0 -246
  76. package/dist/template/.opencode/command/generate-pattern.md +0 -247
  77. package/dist/template/.opencode/command/generate-storyboard.md +0 -250
  78. package/dist/template/.opencode/command/implement.md +0 -609
  79. package/dist/template/.opencode/command/import-plan.md +0 -406
  80. package/dist/template/.opencode/command/index-knowledge.md +0 -25
  81. package/dist/template/.opencode/command/integration-test.md +0 -424
  82. package/dist/template/.opencode/command/issue.md +0 -102
  83. package/dist/template/.opencode/command/new-feature.md +0 -651
  84. package/dist/template/.opencode/command/opensrc.md +0 -58
  85. package/dist/template/.opencode/command/quick-build.md +0 -238
  86. package/dist/template/.opencode/command/ralph.md +0 -41
  87. package/dist/template/.opencode/command/research-and-implement.md +0 -148
  88. package/dist/template/.opencode/command/research-ui.md +0 -466
  89. package/dist/template/.opencode/command/restore-image.md +0 -424
  90. package/dist/template/.opencode/command/revert-feature.md +0 -386
  91. package/dist/template/.opencode/command/skill-create.md +0 -517
  92. package/dist/template/.opencode/command/skill-optimize.md +0 -556
  93. package/dist/template/.opencode/command/summarize.md +0 -412
  94. package/dist/template/.opencode/command/triage.md +0 -398
  95. package/dist/template/.opencode/memory/_templates/README.md +0 -35
  96. package/dist/template/.opencode/memory/_templates/observation.md +0 -39
  97. package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
  98. package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
  99. package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
  100. package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
  101. package/dist/template/.opencode/memory/_templates/prompt-engineering.md +0 -333
  102. package/dist/template/.opencode/memory/observations/2026-01-22-decision-agents-md-prompt-engineering-improvement.md +0 -29
  103. package/dist/template/.opencode/memory/observations/2026-01-25-decision-agent-roles-build-orchestrates-general-e.md +0 -14
  104. package/dist/template/.opencode/memory/observations/2026-01-25-decision-simplified-swarm-helper-tool-to-fix-type.md +0 -20
  105. package/dist/template/.opencode/memory/observations/2026-01-25-decision-use-beads-as-swarm-board-source-of-truth.md +0 -14
  106. package/dist/template/.opencode/memory/observations/2026-01-25-learning-user-wants-real-swarm-coordination-guida.md +0 -15
  107. package/dist/template/.opencode/memory/observations/2026-01-28-decision-created-deep-research-skill-for-thorough.md +0 -29
  108. package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +0 -21
  109. package/dist/template/.opencode/memory/observations/2026-01-28-decision-oracle-tool-optimal-usage-patterns.md +0 -32
  110. package/dist/template/.opencode/memory/observations/2026-01-28-learning-ampcode-deep-mode-research-integration-w.md +0 -42
  111. package/dist/template/.opencode/memory/observations/2026-01-28-pattern-research-delegation-pattern-explore-for-.md +0 -32
  112. package/dist/template/.opencode/memory/observations/2026-01-29-decision-copilot-auth-plugin-rate-limit-handling.md +0 -27
  113. package/dist/template/.opencode/memory/observations/2026-01-29-decision-spec-driven-approach-for-opencodekit.md +0 -21
  114. package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +0 -44
  115. package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +0 -32
  116. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +0 -14
  117. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-kimi-k2-5-agent-swarm-architecture-patte.md +0 -45
  118. package/dist/template/.opencode/memory/observations/2026-01-30-pattern-swarm-tools-architecture.md +0 -28
  119. package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +0 -63
  120. package/dist/template/.opencode/memory/observations/2026-01-31-decision-created-dedicated-worker-agent-for-swarm.md +0 -20
  121. package/dist/template/.opencode/memory/observations/2026-01-31-decision-rollback-to-v1-1-47-for-copilot-claude-r.md +0 -21
  122. package/dist/template/.opencode/memory/observations/2026-01-31-decision-simplified-swarm-to-task-tool-pattern.md +0 -44
  123. package/dist/template/.opencode/memory/observations/2026-01-31-decision-swarm-architecture-task-tool-over-tmux.md +0 -33
  124. package/dist/template/.opencode/memory/observations/2026-01-31-decision-worker-skills-defined-for-swarm-delegati.md +0 -30
  125. package/dist/template/.opencode/memory/observations/2026-01-31-learning-gpt-reasoning-config-for-github-copilot.md +0 -51
  126. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +0 -61
  127. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +0 -66
  128. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-custom-tools-api.md +0 -48
  129. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-v1-1-48-skills-as-slash-command.md +0 -21
  130. package/dist/template/.opencode/memory/observations/2026-01-31-learning-swarm-system-simplified-removed-mailbox-.md +0 -30
  131. package/dist/template/.opencode/memory/observations/2026-01-31-learning-v1-1-48-native-copilot-reasoning-via-pr-.md +0 -45
  132. package/dist/template/.opencode/memory/observations/2026-01-31-warning-cannot-add-custom-config-to-opencode-jso.md +0 -18
  133. package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +0 -48
  134. package/dist/template/.opencode/memory/observations/2026-01-31-warning-opencode-v1-1-48-claude-thinking-block-s.md +0 -51
  135. package/dist/template/.opencode/memory/project/architecture.md +0 -60
  136. package/dist/template/.opencode/memory/project/commands.md +0 -72
  137. package/dist/template/.opencode/memory/project/conventions.md +0 -68
  138. package/dist/template/.opencode/memory/project/gotchas.md +0 -41
  139. package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
  140. package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
  141. package/dist/template/.opencode/tool/notebooklm.ts +0 -488
  142. package/dist/template/.opencode/tool/oracle.ts +0 -240
  143. /package/dist/template/.opencode/memory/{user.example.md → _templates/user.md} +0 -0
  144. /package/dist/template/.opencode/memory/{user.md → project/user.md} +0 -0
@@ -0,0 +1,53 @@
1
+ ---
2
+ purpose: Tech stack, constraints, and integrations for AI context injection
3
+ updated: 2026-02-02
4
+ ---
5
+
6
+ # Tech Stack
7
+
8
+ This file is automatically injected into ALL AI prompts via `opencode.json` instructions[].
9
+
10
+ ## Framework & Language
11
+
12
+ - **Framework:** CLI tool (cac for argument parsing)
13
+ - **Language:** TypeScript (ESNext, strict mode, bundler moduleResolution)
14
+ - **Runtime:** Bun >= 1.3.2
15
+
16
+ ## Key Dependencies
17
+
18
+ - **CLI Framework:** cac (^6.7.14) - Command-line argument parsing
19
+ - **UI Prompts:** @clack/prompts (^0.7.0) - Interactive CLI prompts
20
+ - **TUI Framework:** @opentui/core (^0.1.72) + @opentui/solid (^0.1.72) - Terminal UI
21
+ - **Validation:** zod (^3.25.76) - Schema validation
22
+ - **Task Tracking:** beads-village (^1.3.3) - Git-backed task management
23
+ - **AI SDK:** @ai-sdk/provider (^3.0.6) - AI provider integration
24
+
25
+ ## Build & Tools
26
+
27
+ - **Build:** `bun run build.ts` + rsync for template bundling
28
+ - **Lint:** oxlint (^1.38.0) - Fast JavaScript/TypeScript linter
29
+ - **Format:** oxfmt (^0.23.0) - Code formatter
30
+ - **TypeCheck:** TypeScript 5.9.3
31
+
32
+ ## Testing
33
+
34
+ - **Unit Tests:** bun test (native Bun test runner)
35
+ - **Test Location:** src/\*_/_.test.ts (colocated)
36
+ - **Run Single:** bun test src/commands/init.test.ts
37
+
38
+ ## Key Constraints
39
+
40
+ - Must maintain Bun compatibility (engines.bun >= 1.3.2)
41
+ - Node.js not officially supported
42
+ - Build copies .opencode/ to dist/template/ - don't edit dist/ directly
43
+ - Keep .opencode/ structure minimal and focused
44
+
45
+ ## Active Integrations
46
+
47
+ - **OpenCode AI:** @opencode-ai/plugin (^1.1.12) - OpenCode integration
48
+ - **Beads CLI:** @beads/bd (^0.29.0) - Task tracking CLI
49
+
50
+ ---
51
+
52
+ _Update this file when tech stack or constraints change._
53
+ _AI will capture architecture, conventions, and gotchas via the `observation` tool as it works._
@@ -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)
@@ -88,7 +88,10 @@
88
88
  ]
89
89
  }
90
90
  },
91
- "instructions": [".opencode/memory/user.md", ".opencode/memory/project/*.md"],
91
+ "instructions": [
92
+ ".opencode/memory/project/user.md",
93
+ ".opencode/memory/project/tech-stack.md"
94
+ ],
92
95
  "keybinds": {
93
96
  "command_list": ";",
94
97
  "leader": "`",
@@ -114,15 +117,21 @@
114
117
  "*": "allow",
115
118
  "cat *": "allow",
116
119
  "git branch *": "allow",
120
+ "git checkout *": "ask",
121
+ "git clean *": "ask",
117
122
  "git commit *": "ask",
118
123
  "git diff *": "allow",
119
124
  "git log *": "allow",
125
+ "git merge *": "ask",
120
126
  "git push *": "ask",
121
127
  "git rebase *": "ask",
122
128
  "git reset *": "ask",
123
129
  "git status *": "allow",
124
130
  "ls *": "allow",
125
131
  "npm *": "allow",
132
+ "npm publish *": "ask",
133
+ "npm run db:push*": "ask",
134
+ "npm run db:reset*": "deny",
126
135
  "npx *": "allow",
127
136
  "rm *": "deny",
128
137
  "rm -rf *": "deny",
@@ -134,9 +143,15 @@
134
143
  "question": "allow",
135
144
  "read": {
136
145
  "*": "allow",
146
+ "*credentials*": "deny",
137
147
  "*.env": "deny",
138
148
  "*.env.*": "deny",
139
- "*.env.example": "allow"
149
+ "*.env.example": "allow",
150
+ "*.key": "deny",
151
+ "*.pem": "deny",
152
+ "*password*": "deny",
153
+ "*secret*": "deny",
154
+ "*token*": "deny"
140
155
  }
141
156
  },
142
157
  "plugin": [
@@ -782,8 +797,7 @@
782
797
  "tools": {
783
798
  "context7-query-docs": true,
784
799
  "context7-resolve-library-id": true,
785
- "grepsearch": true,
786
- "oracle": true
800
+ "grepsearch": true
787
801
  },
788
802
  "tui": {
789
803
  "diff_style": "auto",
@@ -15,6 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/node": "^25.1.0",
18
+ "bun-types": "^1.3.8",
18
19
  "typescript": "^5.9.3"
19
20
  }
20
21
  }