opencodekit 0.21.10 → 0.23.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 (213) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +4 -25
  3. package/dist/template/.opencode/.template-manifest.json +115 -188
  4. package/dist/template/.opencode/AGENTS.md +127 -484
  5. package/dist/template/.opencode/README.md +2 -2
  6. package/dist/template/.opencode/agent/build.md +158 -356
  7. package/dist/template/.opencode/agent/explore.md +0 -1
  8. package/dist/template/.opencode/agent/plan.md +7 -16
  9. package/dist/template/.opencode/agent/review.md +0 -1
  10. package/dist/template/.opencode/agent/scout.md +2 -3
  11. package/dist/template/.opencode/agent/vision.md +0 -1
  12. package/dist/template/.opencode/artifacts/.active +1 -0
  13. package/dist/template/.opencode/artifacts/example/plan.md +12 -0
  14. package/dist/template/.opencode/artifacts/example/progress.md +4 -0
  15. package/dist/template/.opencode/artifacts/example/research.md +4 -0
  16. package/dist/template/.opencode/artifacts/example/spec.md +16 -0
  17. package/dist/template/.opencode/artifacts/todo.md +5 -0
  18. package/dist/template/.opencode/artifacts/verify.log +4 -0
  19. package/dist/template/.opencode/command/clarify.md +46 -0
  20. package/dist/template/.opencode/command/commit.md +53 -0
  21. package/dist/template/.opencode/command/create.md +29 -71
  22. package/dist/template/.opencode/command/design.md +1 -2
  23. package/dist/template/.opencode/command/explore.md +3 -4
  24. package/dist/template/.opencode/command/fix.md +55 -0
  25. package/dist/template/.opencode/command/improve-architecture.md +55 -0
  26. package/dist/template/.opencode/command/init.md +86 -69
  27. package/dist/template/.opencode/command/plan.md +30 -60
  28. package/dist/template/.opencode/command/pr.md +10 -28
  29. package/dist/template/.opencode/command/refactor.md +65 -0
  30. package/dist/template/.opencode/command/research.md +7 -29
  31. package/dist/template/.opencode/command/review-codebase.md +6 -13
  32. package/dist/template/.opencode/command/ship.md +136 -78
  33. package/dist/template/.opencode/command/test.md +66 -0
  34. package/dist/template/.opencode/command/ui-review.md +2 -4
  35. package/dist/template/.opencode/command/verify.md +15 -23
  36. package/dist/template/.opencode/dcp.jsonc +96 -85
  37. package/dist/template/.opencode/memory/README.md +4 -6
  38. package/dist/template/.opencode/memory/_templates/adr.md +45 -0
  39. package/dist/template/.opencode/memory/_templates/prd.md +1 -1
  40. package/dist/template/.opencode/memory/_templates/roadmap.md +1 -1
  41. package/dist/template/.opencode/memory/_templates/state.md +1 -1
  42. package/dist/template/.opencode/memory/project/gotchas.md +4 -4
  43. package/dist/template/.opencode/memory/project/project.md +2 -2
  44. package/dist/template/.opencode/memory/project/roadmap.md +1 -1
  45. package/dist/template/.opencode/memory/project/state.md +2 -2
  46. package/dist/template/.opencode/memory/project/tech-stack.md +2 -2
  47. package/dist/template/.opencode/memory/session-context.md +1 -1
  48. package/dist/template/.opencode/opencode.json +14 -152
  49. package/dist/template/.opencode/plugin/README.md +2 -2
  50. package/dist/template/.opencode/plugin/guard.ts +62 -0
  51. package/dist/template/.opencode/plugin/{lib/memory-admin-tools.ts → memory/admin.ts} +4 -4
  52. package/dist/template/.opencode/plugin/{lib → memory}/capture.ts +1 -1
  53. package/dist/template/.opencode/plugin/{lib → memory}/compile.ts +2 -2
  54. package/dist/template/.opencode/plugin/{lib → memory}/context.ts +1 -1
  55. package/dist/template/.opencode/plugin/{lib → memory}/curator.ts +1 -1
  56. package/dist/template/.opencode/plugin/{lib → memory}/db/observations.ts +102 -3
  57. package/dist/template/.opencode/plugin/{lib → memory}/db/schema.ts +43 -1
  58. package/dist/template/.opencode/plugin/{lib → memory}/db/types.ts +22 -0
  59. package/dist/template/.opencode/plugin/{lib/memory-db.ts → memory/db.ts} +1 -1
  60. package/dist/template/.opencode/plugin/{lib → memory}/distill.ts +1 -1
  61. package/dist/template/.opencode/plugin/{lib/memory-helpers.ts → memory/helpers.ts} +5 -1
  62. package/dist/template/.opencode/plugin/{lib/memory-hooks.ts → memory/hooks.ts} +1 -1
  63. package/dist/template/.opencode/plugin/{lib → memory}/index-generator.ts +2 -2
  64. package/dist/template/.opencode/plugin/{lib → memory}/inject.ts +1 -1
  65. package/dist/template/.opencode/plugin/{lib → memory}/lint.ts +2 -2
  66. package/dist/template/.opencode/plugin/memory/tools.ts +322 -0
  67. package/dist/template/.opencode/plugin/{lib → memory}/validate.ts +2 -2
  68. package/dist/template/.opencode/plugin/memory.ts +7 -17
  69. package/dist/template/.opencode/plugin/srcwalk.ts +721 -0
  70. package/dist/template/.opencode/skill/agent-code-quality-gate/SKILL.md +98 -0
  71. package/dist/template/.opencode/skill/behavioral-kernel/SKILL.md +52 -0
  72. package/dist/template/.opencode/skill/brainstorming/SKILL.md +1 -1
  73. package/dist/template/.opencode/skill/browser-testing-with-devtools/SKILL.md +85 -0
  74. package/dist/template/.opencode/skill/code-cleanup/SKILL.md +114 -0
  75. package/dist/template/.opencode/skill/code-navigation/SKILL.md +142 -0
  76. package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +131 -0
  77. package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
  78. package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +109 -0
  79. package/dist/template/.opencode/skill/deep-module-design/SKILL.md +207 -0
  80. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +26 -45
  81. package/dist/template/.opencode/skill/gemini-large-context/SKILL.md +4 -4
  82. package/dist/template/.opencode/skill/git-workflow-and-versioning/SKILL.md +77 -0
  83. package/dist/template/.opencode/skill/grill-me/SKILL.md +140 -0
  84. package/dist/template/.opencode/skill/memory-system/SKILL.md +9 -10
  85. package/dist/template/.opencode/skill/opensrc/references/example-workflow.md +1 -1
  86. package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +116 -0
  87. package/dist/template/.opencode/skill/shipping-and-launch/SKILL.md +95 -0
  88. package/dist/template/.opencode/skill/source-driven-development/SKILL.md +103 -0
  89. package/dist/template/.opencode/skill/spec-driven-development/SKILL.md +121 -0
  90. package/dist/template/.opencode/skill/srcwalk/SKILL.md +161 -0
  91. package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +1 -1
  92. package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +184 -0
  93. package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +6 -6
  94. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +6 -6
  95. package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +5 -5
  96. package/package.json +76 -76
  97. package/dist/template/.opencode/AGENT_ALIGNMENT.md +0 -564
  98. package/dist/template/.opencode/agent/painter.md +0 -83
  99. package/dist/template/.opencode/command/compound.md +0 -240
  100. package/dist/template/.opencode/command/curate.md +0 -299
  101. package/dist/template/.opencode/command/handoff.md +0 -149
  102. package/dist/template/.opencode/command/health.md +0 -356
  103. package/dist/template/.opencode/command/init-context.md +0 -297
  104. package/dist/template/.opencode/command/init-user.md +0 -125
  105. package/dist/template/.opencode/command/iterate.md +0 -200
  106. package/dist/template/.opencode/command/lfg.md +0 -173
  107. package/dist/template/.opencode/command/resume.md +0 -78
  108. package/dist/template/.opencode/command/status.md +0 -126
  109. package/dist/template/.opencode/command/ui-slop-check.md +0 -169
  110. package/dist/template/.opencode/plans/1768385996691-silent-wizard.md +0 -247
  111. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +0 -418
  112. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +0 -170
  113. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +0 -278
  114. package/dist/template/.opencode/plans/1770112267595-shiny-rocket.md +0 -258
  115. package/dist/template/.opencode/plans/swarm-protocol.md +0 -123
  116. package/dist/template/.opencode/plugin/lib/memory-tools.ts +0 -535
  117. package/dist/template/.opencode/skill/agent-evals/SKILL.md +0 -208
  118. package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +0 -76
  119. package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +0 -122
  120. package/dist/template/.opencode/skill/augment-context-engine/mcp.json +0 -6
  121. package/dist/template/.opencode/skill/beads/SKILL.md +0 -182
  122. package/dist/template/.opencode/skill/beads/references/BEST_PRACTICES.md +0 -27
  123. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +0 -219
  124. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +0 -124
  125. package/dist/template/.opencode/skill/beads/references/EXAMPLES.md +0 -45
  126. package/dist/template/.opencode/skill/beads/references/FILE_CLAIMING.md +0 -101
  127. package/dist/template/.opencode/skill/beads/references/GIT_SYNC.md +0 -25
  128. package/dist/template/.opencode/skill/beads/references/HIERARCHY.md +0 -71
  129. package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +0 -40
  130. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +0 -177
  131. package/dist/template/.opencode/skill/beads/references/SESSION_PROTOCOL.md +0 -61
  132. package/dist/template/.opencode/skill/beads/references/TASK_CREATION.md +0 -38
  133. package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +0 -38
  134. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +0 -226
  135. package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +0 -222
  136. package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +0 -224
  137. package/dist/template/.opencode/skill/code-simplification/SKILL.md +0 -211
  138. package/dist/template/.opencode/skill/context-condensation/SKILL.md +0 -149
  139. package/dist/template/.opencode/skill/context-initialization/SKILL.md +0 -69
  140. package/dist/template/.opencode/skill/context-management/SKILL.md +0 -390
  141. package/dist/template/.opencode/skill/deep-research/SKILL.md +0 -384
  142. package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +0 -139
  143. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +0 -191
  144. package/dist/template/.opencode/skill/executing-plans/SKILL.md +0 -247
  145. package/dist/template/.opencode/skill/figma-go/SKILL.md +0 -65
  146. package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +0 -357
  147. package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +0 -62
  148. package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +0 -29
  149. package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +0 -237
  150. package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +0 -38
  151. package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +0 -509
  152. package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +0 -253
  153. package/dist/template/.opencode/skill/html-deck-export/SKILL.md +0 -189
  154. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +0 -413
  155. package/dist/template/.opencode/skill/memory-grounding/SKILL.md +0 -68
  156. package/dist/template/.opencode/skill/playwriter/SKILL.md +0 -158
  157. package/dist/template/.opencode/skill/portless/SKILL.md +0 -109
  158. package/dist/template/.opencode/skill/prd/SKILL.md +0 -146
  159. package/dist/template/.opencode/skill/prd-task/SKILL.md +0 -182
  160. package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +0 -124
  161. package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +0 -90
  162. package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +0 -91
  163. package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +0 -157
  164. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +0 -263
  165. package/dist/template/.opencode/skill/reconcile/SKILL.md +0 -183
  166. package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +0 -183
  167. package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +0 -443
  168. package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +0 -108
  169. package/dist/template/.opencode/skill/requesting-code-review/review.md +0 -160
  170. package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +0 -134
  171. package/dist/template/.opencode/skill/screenshot/SKILL.md +0 -48
  172. package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +0 -54
  173. package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +0 -22
  174. package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +0 -40
  175. package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +0 -126
  176. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +0 -163
  177. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +0 -585
  178. package/dist/template/.opencode/skill/security-threat-model/SKILL.md +0 -36
  179. package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +0 -255
  180. package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +0 -32
  181. package/dist/template/.opencode/skill/sharing-skills/SKILL.md +0 -214
  182. package/dist/template/.opencode/skill/skill-creator/SKILL.md +0 -181
  183. package/dist/template/.opencode/skill/skill-installer/SKILL.md +0 -58
  184. package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +0 -21
  185. package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +0 -313
  186. package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +0 -106
  187. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +0 -244
  188. package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +0 -39
  189. package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +0 -145
  190. package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +0 -50
  191. package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +0 -90
  192. package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +0 -20
  193. package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +0 -186
  194. package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +0 -172
  195. package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +0 -78
  196. package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +0 -134
  197. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +0 -402
  198. package/dist/template/.opencode/skill/terse-output-mode/SKILL.md +0 -95
  199. package/dist/template/.opencode/skill/think-in-code/SKILL.md +0 -136
  200. package/dist/template/.opencode/skill/ux-quality-gates/SKILL.md +0 -137
  201. package/dist/template/.opencode/skill/v1-run/SKILL.md +0 -175
  202. package/dist/template/.opencode/skill/v1-run/mcp.json +0 -6
  203. package/dist/template/.opencode/skill/verification-gates/SKILL.md +0 -63
  204. package/dist/template/.opencode/skill/visual-analysis/SKILL.md +0 -154
  205. package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +0 -46
  206. package/dist/template/.opencode/skill/workspace-setup/SKILL.md +0 -76
  207. package/dist/template/.opencode/skill/writing-plans/SKILL.md +0 -320
  208. /package/dist/template/.opencode/plugin/{lib → memory}/compact.ts +0 -0
  209. /package/dist/template/.opencode/plugin/{lib → memory}/db/graph.ts +0 -0
  210. /package/dist/template/.opencode/plugin/{lib → memory}/db/maintenance.ts +0 -0
  211. /package/dist/template/.opencode/plugin/{lib → memory}/db/pipeline.ts +0 -0
  212. /package/dist/template/.opencode/plugin/{lib → memory}/notify.ts +0 -0
  213. /package/dist/template/.opencode/plugin/{lib → memory}/operation-log.ts +0 -0
@@ -1,31 +1,46 @@
1
1
  ---
2
- description: Initialize core project setup (AGENTS.md + tech-stack detection only)
3
- argument-hint: "[--deep]"
2
+ description: Initialize project setup AGENTS.md, planning context, user profile, and tech stack
3
+ argument-hint: "[--deep] [--context|--user|--all]"
4
4
  agent: build
5
5
  ---
6
6
 
7
7
  # Init: $ARGUMENTS
8
8
 
9
- Core project setup. Creates AGENTS.md and detects tech stack. Run once per project.
9
+ Initialize project setup. Run once per project. Supports three modes via argument flags.
10
10
 
11
- > **Next steps:** `/init-user` for personalization, `/init-context` for GSD planning workflow
11
+ > **Next step for fresh projects:** `/plan` to create first implementation plan.
12
+ > **Next step for brownfield:** `/review-codebase` for deep codebase analysis.
12
13
 
13
14
  ## Load Skills
14
15
 
15
16
  ```typescript
16
- skill({ name: "index-knowledge" });
17
+ skill({ name: "brainstorming" });
18
+ skill({ name: "verification-before-completion" });
17
19
  ```
18
20
 
19
- ## Options
21
+ ## Parse Arguments
20
22
 
21
- | Argument | Default | Description |
22
- | -------- | ------- | ----------------------------------------- |
23
- | `--deep` | false | Comprehensive research (~100+ tool calls) |
23
+ | Argument | Default | Description |
24
+ |---|---|---|
25
+ | `--deep` | false | Comprehensive research for AGENTS.md (~100+ tool calls) |
26
+ | `--context` | false | Init planning context (roadmap, state) |
27
+ | `--user` | false | Init user profile |
28
+ | `--all` | false | Full init: AGENTS.md + context + user profile |
24
29
 
25
- ## Phase 1: Detect Project
30
+ **Mode rules:**
31
+ - No flags (default): Core project setup — AGENTS.md + tech stack only
32
+ - `--context`: Planning context (roadmap.md, state.md)
33
+ - `--user`: User profile (user.md)
34
+ - `--all`: Everything
35
+ - `--deep` applies to AGENTS.md generation only
26
36
 
27
- Detect and validate:
37
+ ---
38
+
39
+ ## Mode 1: Core Setup (Default)
28
40
 
41
+ ### Phase 1: Detect Project
42
+
43
+ Detect and validate:
29
44
  - Package manager and dependencies (with versions)
30
45
  - Build, test, lint, dev commands — **validate each actually works**
31
46
  - CI/CD configuration
@@ -34,82 +49,84 @@ Detect and validate:
34
49
 
35
50
  With `--deep`: Also analyze git history, source patterns, subsystem candidates.
36
51
 
37
- ## Phase 2: Preview Detection
52
+ ### Phase 2: Preview Detection
38
53
 
39
- After detecting project, show summary and ask for confirmation:
54
+ Show detected summary and ask for confirmation before writing.
40
55
 
41
- ```typescript
42
- question({
43
- questions: [
44
- {
45
- header: "Preview",
46
- question: `Detected: ${detectedTechStack}. Create AGENTS.md?`,
47
- options: [
48
- { label: "Yes, create it (Recommended)" },
49
- { label: "Show me what you'll write first" },
50
- { label: "Cancel" },
51
- ],
52
- },
53
- ],
54
- });
55
- ```
56
+ ### Phase 3: Create AGENTS.md
57
+
58
+ Create `./AGENTS.md` — target <60 lines (max 150). Include:
59
+ - Tech stack with versions, file structure, validated commands
60
+ - Code example from actual codebase
61
+ - Testing conventions, boundaries, gotchas
62
+
63
+ **Principles:** Examples > explanations. Pointers > copies. If AGENTS.md exists, improve it don't overwrite blindly.
56
64
 
57
- **If "Show me":** Display detected values without writing files, then ask again.
65
+ ### Phase 4: Create tech-stack.md
58
66
 
59
- ## Phase 3: Create AGENTS.md
67
+ Write detected values to `.opencode/memory/project/tech-stack.md`. Persist with memory update.
60
68
 
61
- Create `./AGENTS.md` — **target <60 lines** (max 150). Follow the `index-knowledge` skill format:
69
+ ---
70
+
71
+ ## Mode 2: Planning Context (`--context`)
72
+
73
+ Initialize project planning context with roadmap and state files.
62
74
 
63
- - Tech stack with versions
64
- - File structure
65
- - Commands (validated)
66
- - Code example from actual codebase (5-10 lines)
67
- - Testing conventions
68
- - Boundaries (always/ask-first/never)
69
- - Gotchas
75
+ ### Phase 1: Discovery
70
76
 
71
- **Principles**: Examples > explanations. Pointers > copies. If AGENTS.md exists, improve it don't overwrite blindly.
77
+ If `--brownfield` (detected from existing codebase), run parallel codebase analysis:
78
+ - `explore` for architecture patterns
79
+ - `explore` for data flow
80
+ - `explore` for domain boundaries
72
81
 
73
- ## Phase 4: Create tech-stack.md
82
+ If greenfield, skip to requirements gathering.
74
83
 
75
- From template `.opencode/memory/_templates/tech-stack.md`:
84
+ ### Phase 2: Requirements Gathering
76
85
 
77
- Read the template from `.opencode/memory/_templates/tech-stack.md` and write it to `.opencode/memory/project/tech-stack.md`.
86
+ Ask questions to define:
87
+ - Project vision and goals (1-2 sentences each)
88
+ - Target users and their needs
89
+ - Core features (what must exist)
90
+ - Technical constraints
91
+ - Success criteria
78
92
 
79
- Fill detected values:
93
+ ### Phase 3: Create Files
80
94
 
81
- - Framework, language, runtime
82
- - Styling, components, design system
83
- - Database, ORM, state management
84
- - Testing tools
85
- - Verification commands
95
+ - `.opencode/memory/project/roadmap.md` — vision, goals, user personas, feature roadmap, constraints, success criteria
96
+ - `.opencode/memory/project/state.md` — current status, active decisions, known issues, next priorities
97
+ - Update `.opencode/opencode.json` instructions to include roadmap.md and state.md
98
+
99
+ ---
86
100
 
87
- ## Phase 5: Subsystems (--deep only)
101
+ ## Mode 3: User Profile (`--user`)
88
102
 
89
- Identify candidates for nested AGENTS.md:
103
+ Create personalized user profile at `.opencode/memory/project/user.md`.
90
104
 
91
- - `packages/*/` in monorepos
92
- - `frontend/` vs `backend/` directories
93
- - Significantly different subsystem patterns
105
+ ### Phase 1: Gather Preferences
94
106
 
95
- Ask user before creating nested files.
107
+ Ask questions about:
108
+ - **Identity**: Name, role, experience level
109
+ - **Communication**: Verbosity preference, feedback style, update frequency
110
+ - **Workflow**: Branch strategy, commit style, review expectations, test expectations
111
+ - **Technical**: Preferred tools, avoided patterns, dev environment
96
112
 
97
- ## Phase 6: Verify and Report
113
+ ### Phase 2: Create user.md
98
114
 
99
- Verify:
115
+ Write to `.opencode/memory/project/user.md` with the captured preferences.
100
116
 
101
- - [ ] AGENTS.md is <60 lines (or justified)
102
- - [ ] Commands validated and work
103
- - [ ] Boundaries include Never rules
104
- - [ ] Code example from actual codebase
105
- - [ ] tech-stack.md created
117
+ ### Phase 3: Update opencode.json
118
+
119
+ Ensure user.md is in `instructions[]` as one of the 4 auto-injected files (user.md, tech-stack.md, project.md, git-context.md).
120
+
121
+ > **Warning:** Do not add more files to `instructions[]` unless essential. Per-prompt injection of too many files causes session OOM. Use `memory-search({ file: "..." })` for on-demand access.
122
+
123
+ ---
106
124
 
107
- Output:
125
+ ## Output
108
126
 
109
- 1. Files created (with line counts)
110
- 2. Tech stack detected
111
- 3. Commands validated (yes/no)
112
- 4. Suggested next steps:
113
- - `/init-user` Create user profile
114
- - `/init-context` Set up GSD planning workflow
115
- - `/review-codebase` — Deep codebase analysis
127
+ Report what was created:
128
+ 1. AGENTS.md (if core setup ran)
129
+ 2. tech-stack.md (if core setup ran)
130
+ 3. roadmap.md + state.md (if `--context`)
131
+ 4. user.md (if `--user`)
132
+ 5. Recommended next command: `/plan`, `/review-codebase`, or `/resume`
@@ -1,41 +1,27 @@
1
1
  ---
2
- description: Create detailed implementation plan with TDD steps for a bead
3
- argument-hint: "<bead-id> [--create-beads]"
2
+ description: Create detailed implementation plan with TDD steps
4
3
  agent: plan
5
4
  ---
6
5
 
7
- # Plan: $ARGUMENTS
6
+ # Plan
8
7
 
9
8
  Create a detailed implementation plan with TDD steps. Optional deep-planning between `/create` and `/ship`.
10
9
 
11
- > **Workflow:** `/create` → **`/plan <id>`** (optional) → `/ship <id>`
10
+ > **Workflow:** `/create` → **`/plan`** (optional) → `/ship`
12
11
  >
13
- > Bead MUST be `in_progress` with `prd.md`. Use `/create` first.
14
- >
15
- > **When to use:** Complex tasks where PRD verification steps aren't enough guidance. Skip for simple tasks.
16
-
17
- ## Load Skills
18
-
19
- ```typescript
20
- skill({ name: "beads" });
21
- skill({ name: "memory-grounding" });
22
- skill({ name: "writing-plans" }); // TDD plan format
23
- // For user-facing UI work: skill({ name: "ux-quality-gates" });
24
- ```
12
+ > **When to use:** Complex tasks where spec verification steps aren't enough guidance. Skip for simple tasks.
25
13
 
26
14
  ## Parse Arguments
27
15
 
28
- | Argument | Default | Description |
29
- | ---------------- | -------- | --------------------------------- |
30
- | `<bead-id>` | required | The bead to plan |
31
- | `--create-beads` | false | Create child beads for each phase |
16
+ | Argument | Default | Description |
17
+ | -------- | -------- | --------------------------------- |
18
+ | none | | Plan based on current spec |
32
19
 
33
20
  ## Before You Plan
34
21
 
35
22
  - **Be certain**: Only create tasks you're confident about
36
- - **Don't over-plan**: If the PRD is clear, trust it
23
+ - **Don't over-plan**: If the spec is clear, trust it
37
24
  - **Budget context**: Target ~50% context per execution
38
- - **Split signals**: Create child beads for complex work
39
25
  - **Vertical slices**: Each task should cover one feature end-to-end
40
26
 
41
27
  ## Phase 0: Institutional Research (Mandatory)
@@ -46,7 +32,7 @@ Before touching the PRD or planning anything, load what the codebase already kno
46
32
 
47
33
  ### Step 1: Search institutional memory
48
34
 
49
- Follow the [memory-grounding](../skill/memory-grounding/SKILL.md) skill protocol. Focus on: bugfixes, existing plans (ask user before overwriting).
35
+ Search memory for: bugfixes, existing plans (ask user before overwriting).
50
36
 
51
37
  If relevant observations found: incorporate them directly into the plan. Don't re-solve solved problems.
52
38
 
@@ -92,17 +78,10 @@ task({
92
78
 
93
79
  ## Phase 1: Guards
94
80
 
95
- ```bash
96
- br show $ARGUMENTS
97
- ```
98
-
99
- Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
100
-
101
81
  Verify:
102
82
 
103
- - Bead is `in_progress`
104
- - `prd.md` exists
105
- - If `plan.md` already exists, ask user: overwrite or skip?
83
+ - `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` exists (if not, tell user to run `/create` first)
84
+ - If `.opencode/artifacts/$(cat .opencode/artifacts/.active)/plan.md` already exists, ask user: overwrite or skip?
106
85
 
107
86
  ## Phase 2: Discovery Assessment
108
87
 
@@ -243,7 +222,7 @@ Assess size to determine plan structure:
243
222
  | ------------- | --------- | ---------------------------------------- |
244
223
  | S (1-3 files) | 2-4 tasks | Single plan, no phases |
245
224
  | M (3-8 files) | 5-8 tasks | 2-3 phases |
246
- | L (8+ files) | 9+ tasks | Create child beads with `--create-beads` |
225
+ | L (8+ files) | 9+ tasks | Split into separate plans for each subsystem |
247
226
 
248
227
  ## Phase 6: Dependency Graph & Wave Assignment
249
228
 
@@ -272,14 +251,14 @@ Wave 3: C (depends on B)
272
251
 
273
252
  ## Phase 7: Write Plan
274
253
 
275
- Write `.beads/artifacts/$ARGUMENTS/plan.md` following the `writing-plans` skill format:
254
+ Write `.opencode/artifacts/$(cat .opencode/artifacts/.active)/plan.md`:
276
255
 
277
256
  ### Required Plan Header
278
257
 
279
258
  ```markdown
280
259
  # [Feature] Implementation Plan
281
260
 
282
- > **For Claude:** REQUIRED SUB-SKILL: Use skill({ name: "executing-plans" }) to implement this plan task-by-task.
261
+ > **For Claude:** Implement this plan task-by-task.
283
262
 
284
263
  **Goal:** [Outcome-shaped goal from PRD]
285
264
 
@@ -361,15 +340,18 @@ Scan `plan.md` content for these patterns:
361
340
  ### Check Process
362
341
 
363
342
  ```bash
343
+ ACTIVE_SLUG=$(cat .opencode/artifacts/.active 2>/dev/null)
344
+ if [ -z "$ACTIVE_SLUG" ]; then echo "No active feature."; exit 1; fi
345
+ ARTIFACT_DIR=".opencode/artifacts/$ACTIVE_SLUG"
364
346
  # Scan plan for violation patterns (fixed-string mode to avoid regex false positives)
365
- grep -inF "git add ." .beads/artifacts/$ARGUMENTS/plan.md
366
- grep -inF "git add -A" .beads/artifacts/$ARGUMENTS/plan.md
367
- grep -inF -- "--no-verify" .beads/artifacts/$ARGUMENTS/plan.md
368
- grep -inF "force push" .beads/artifacts/$ARGUMENTS/plan.md
369
- grep -inF -- "--force" .beads/artifacts/$ARGUMENTS/plan.md
370
- grep -inF "reset --hard" .beads/artifacts/$ARGUMENTS/plan.md
371
- grep -inF "checkout ." .beads/artifacts/$ARGUMENTS/plan.md
372
- grep -inF "clean -fd" .beads/artifacts/$ARGUMENTS/plan.md
347
+ grep -inF "git add ." "$ARTIFACT_DIR/plan.md"
348
+ grep -inF "git add -A" "$ARTIFACT_DIR/plan.md"
349
+ grep -inF -- "--no-verify" "$ARTIFACT_DIR/plan.md"
350
+ grep -inF "force push" "$ARTIFACT_DIR/plan.md"
351
+ grep -inF -- "--force" "$ARTIFACT_DIR/plan.md"
352
+ grep -inF "reset --hard" "$ARTIFACT_DIR/plan.md"
353
+ grep -inF "checkout ." "$ARTIFACT_DIR/plan.md"
354
+ grep -inF "clean -fd" "$ARTIFACT_DIR/plan.md"
373
355
  ```
374
356
 
375
357
  Also check:
@@ -400,16 +382,7 @@ If violations found:
400
382
  Violations resolved. Plan is compliant.
401
383
  ```
402
384
 
403
- ## Phase 9: Create Child Beads (if --create-beads or L size)
404
-
405
- For large work, create child beads for each plan phase:
406
-
407
- ```bash
408
- CHILD=$(br create "[Phase title]" --type task --json | jq -r '.id')
409
- br dep add $CHILD $ARGUMENTS
410
- ```
411
-
412
- ## Phase 10: Report
385
+ ## Phase 9: Report
413
386
 
414
387
  Output:
415
388
 
@@ -419,18 +392,15 @@ Output:
419
392
  4. **Dependency Waves:** [N] waves for parallel execution
420
393
  5. **Task count:** [N] tasks, [M] TDD steps
421
394
  6. **Files affected:** [List]
422
- 7. **Plan location:** `.beads/artifacts/$ARGUMENTS/plan.md`
423
- 8. **Child bead hierarchy:** (if created)
424
- 9. **Next step:** `/ship $ARGUMENTS`
395
+ 7. **Plan location:** `.opencode/artifacts/$(cat .opencode/artifacts/.active)/plan.md`
396
+ 8. **Next step:** `/ship`
425
397
 
426
- ```bash
427
- br comments add $ARGUMENTS "Created plan.md: Level [N] discovery, [X] waves, [Y] tasks, [Z] TDD steps"
428
- ```
398
+ ---
429
399
 
430
400
  ## Related Commands
431
401
 
432
402
  | Need | Command |
433
403
  | -------------- | ------------ |
434
404
  | Create spec | `/create` |
435
- | Execute plan | `/ship <id>` |
405
+ | Execute plan | `/ship` |
436
406
  | Research first | `/research` |
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Create and submit pull request with bead traceability
3
- argument-hint: "[bead-id] [--draft]"
2
+ description: Create and submit a pull request
3
+ argument-hint: "[--draft]"
4
4
  agent: build
5
5
  ---
6
6
 
@@ -9,18 +9,14 @@ agent: build
9
9
  ## Load Skills
10
10
 
11
11
  ```typescript
12
- skill({ name: "beads" });
13
- skill({ name: "memory-grounding" });
14
- skill({ name: "verification-gates" });
15
12
  skill({ name: "verification-before-completion" });
16
13
  ```
17
14
 
18
15
  ## Parse Arguments
19
16
 
20
- | Argument | Default | Description |
21
- | ----------- | -------- | ------------------ |
22
- | `<bead-id>` | optional | Link PR to bead |
23
- | `--draft` | false | Create as draft PR |
17
+ | Argument | Default | Description |
18
+ | --------- | ------- | ------------------ |
19
+ | `--draft` | false | Create as draft PR |
24
20
 
25
21
  ## Phase 1: Pre-PR Verification
26
22
 
@@ -30,7 +26,7 @@ git status --porcelain
30
26
 
31
27
  If uncommitted changes exist, ask whether to commit first.
32
28
 
33
- Follow the [verification-gates](../skill/verification-gates/SKILL.md) skill protocol. All gates must pass before creating the PR.
29
+ All gates must pass before creating the PR.
34
30
 
35
31
  Check `package.json` scripts, `Makefile`, or `justfile` for project-specific commands first — prefer those over generic defaults.
36
32
 
@@ -40,7 +36,7 @@ If any gate fails, stop. Fix errors first, then run `/pr` again.
40
36
 
41
37
  ### Memory Grounding
42
38
 
43
- Follow the [memory-grounding](../skill/memory-grounding/SKILL.md) skill protocol. Include relevant findings in the PR description.
39
+ Search memory for relevant findings to include in the PR description.
44
40
 
45
41
  ### Git Context
46
42
 
@@ -50,27 +46,13 @@ git log main...HEAD --oneline
50
46
  git diff main...HEAD --stat
51
47
  ```
52
48
 
53
- If bead ID provided:
54
-
55
- ```bash
56
- br show $ARGUMENTS
57
- ```
58
-
59
- Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
60
-
61
- Read the PRD to extract goal and success criteria for the PR description.
49
+ Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` to extract goal and success criteria for the PR description.
62
50
 
63
51
  ## Phase 2B: Pre-PR Review
64
52
 
65
53
  This is the last gate before code hits GitHub. Run it every time.
66
54
 
67
- Load the review skill:
68
-
69
- ```typescript
70
- skill({ name: "requesting-code-review" });
71
- ```
72
-
73
- Run **5 parallel agents**: security/correctness, performance/architecture, type-safety/tests, conventions/patterns, simplicity/completeness.
55
+ Run **5 parallel agents** for review: security/correctness, performance/architecture, type-safety/tests, conventions/patterns, simplicity/completeness.
74
56
 
75
57
  ```bash
76
58
  BASE_SHA=$(git rev-parse origin/main 2>/dev/null || git merge-base HEAD origin/main)
@@ -147,7 +129,7 @@ EOF
147
129
 
148
130
  If `--draft`, add `--draft` flag.
149
131
 
150
- If bead ID provided, add artifacts section linking to `.beads/artifacts/$ARGUMENTS/prd.md`.
132
+ Add a link to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` for requirements context.
151
133
 
152
134
  ## Output
153
135
 
@@ -0,0 +1,65 @@
1
+ ---
2
+ description: Refactor code for clarity, performance, or maintainability
3
+ argument-hint: "<file or path> [--scope minimal|moderate|aggressive]"
4
+ agent: build
5
+ ---
6
+
7
+ # Refactor: $ARGUMENTS
8
+
9
+ Improve code quality without changing external behavior.
10
+
11
+ ## Load Skills
12
+
13
+ ```typescript
14
+ skill({ name: "verification-before-completion" });
15
+ ```
16
+
17
+ ## Parse Arguments
18
+
19
+ | Argument | Default | Description |
20
+ |---|---|---|
21
+ | `<file or path>` | required | File or directory to refactor |
22
+ | `--scope` | minimal | `minimal` (rename/restructure), `moderate` (extract modules), `aggressive` (redesign) |
23
+
24
+ ## When to Refactor
25
+
26
+ - Module has grown beyond its original purpose
27
+ - Tests are hard to write because of tight coupling
28
+ - Similar logic appears in multiple places
29
+ - Files have crossed 300+ lines with unclear boundaries
30
+
31
+ ## Process
32
+
33
+ ### Phase 1: Assess
34
+
35
+ 1. Read all files in scope
36
+ 2. Identify: duplication, shallow interfaces, unclear naming, mixed concerns
37
+ 3. Plan the refactor — show plan if >3 files would change
38
+
39
+ ### Phase 2: Lock Behavior
40
+
41
+ - If the module has tests, they must still pass after refactor
42
+ - If no tests exist, run existing verification (typecheck, lint)
43
+ - No behavior changes in a refactor — external API must be preserved
44
+
45
+ ### Phase 3: Execute
46
+
47
+ - One change at a time, verify after each
48
+ - Prefer small commits with clear messages
49
+ - `refactor(scope): what changed`
50
+
51
+ ### Phase 4: Verify
52
+
53
+ ```bash
54
+ npm run typecheck
55
+ npm run lint
56
+ npm test
57
+ ```
58
+
59
+ ## Output
60
+
61
+ Report:
62
+ 1. What changed and why
63
+ 2. Files modified
64
+ 3. Verification results
65
+ 4. What was left for future refactors
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Research a topic or bead before implementation
3
- argument-hint: "<topic-or-bead-id> [--quick|--thorough]"
2
+ description: Research a topic before implementation
3
+ argument-hint: "<topic> [--quick|--thorough]"
4
4
  agent: scout
5
5
  ---
6
6
 
@@ -10,39 +10,23 @@ Gather information before implementation. Find answers, document findings, stop
10
10
 
11
11
  > Research can happen at any phase when you need external information or codebase understanding.
12
12
 
13
- ## Load Skills
14
-
15
- ```typescript
16
- skill({ name: "beads" });
17
- skill({ name: "memory-grounding" });
18
- // For --thorough mode:
19
- skill({ name: "deep-research" });
20
- ```
21
-
22
13
  ## Parse Arguments
23
14
 
24
15
  | Argument | Default | Description |
25
16
  | ---------------- | -------- | ----------------------------------- |
26
- | Topic or bead ID | required | What to research |
17
+ | Topic | required | What to research |
27
18
  | `--quick` | false | ~10 tool calls, single question |
28
19
  | `--thorough` | false | ~100+ calls, comprehensive analysis |
29
20
 
30
21
  Default depth: ~30 tool calls for moderate exploration.
31
22
 
32
- ## Determine Input Type
33
-
34
- | Input Type | Detection | Action |
35
- | ---------- | --------------------------- | --------------------------------- |
36
- | Bead ID | Matches `br-xxx` or numeric | Research within that bead context |
37
- | Topic | String | Standalone research |
38
-
39
23
  ## Before You Research
40
24
 
41
25
  - **Be certain**: Only research what you need for implementation
42
26
  - **Don't over-research**: Stop when you have enough to proceed
43
27
  - **Use source priority**: Codebase → Docs → Source → GitHub → Web
44
28
  - **Verify confidence**: Medium+ confidence required before stopping
45
- - **Document findings**: Write to research.md for beads, report for topics
29
+ - **Document findings**: Write to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md` or report directly
46
30
 
47
31
  ## Available Tools
48
32
 
@@ -57,17 +41,11 @@ Default depth: ~30 tool calls for moderate exploration.
57
41
 
58
42
  ## Phase 1: Load Context
59
43
 
60
- If argument is a bead ID:
61
-
62
- ```bash
63
- br show $ARGUMENTS
64
- ```
65
-
66
- Read PRD if it exists and extract questions that need answering.
44
+ Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` if it exists and extract questions that need answering.
67
45
 
68
46
  ### Memory Search (Required)
69
47
 
70
- Follow the [memory-grounding](../skill/memory-grounding/SKILL.md) skill protocol. Use findings to: skip already-answered questions, narrow scope to gaps only, avoid contradicting prior decisions without justification.
48
+ Search memory for existing findings. Use them to: skip already-answered questions, narrow scope to gaps only, avoid contradicting prior decisions without justification.
71
49
 
72
50
  ## Phase 2: Research
73
51
 
@@ -102,7 +80,7 @@ Follow the [memory-grounding](../skill/memory-grounding/SKILL.md) skill protocol
102
80
 
103
81
  ## Phase 4: Document
104
82
 
105
- Write findings to `.beads/artifacts/$ARGUMENTS/research.md` (if bead) or report directly (if topic):
83
+ Write findings to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md` (if plan exists) or report directly (if topic):
106
84
 
107
85
  - Questions asked → answered/partial/unanswered with confidence
108
86
  - Key findings with sources (file paths, docs)
@@ -1,19 +1,11 @@
1
1
  ---
2
2
  description: Review code for quality, security, and compliance
3
- argument-hint: "[path|bead-id|pr-number|'all'] [--quick|--thorough]"
3
+ argument-hint: "[path|pr-number|'all'] [--quick|--thorough]"
4
4
  agent: review
5
5
  ---
6
6
 
7
7
  # Review: $ARGUMENTS
8
8
 
9
- ## Load Skills
10
-
11
- ```typescript
12
- skill({ name: "beads" });
13
- skill({ name: "requesting-code-review" });
14
- skill({ name: "verification-gates" });
15
- ```
16
-
17
9
  ## Determine Input Type
18
10
 
19
11
  | Input Type | Detection | Action |
@@ -22,6 +14,7 @@ skill({ name: "verification-gates" });
22
14
  | Commit hash (40-char) | SHA pattern | `git show <hash>` |
23
15
  | Branch name | String, not matching above | `git diff main...HEAD` |
24
16
  | PR URL/number | Contains "github.com" or "#" | `gh pr diff` |
17
+ | Current plan | `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` | Review against spec |
25
18
 
26
19
  ## Before You Review
27
20
 
@@ -54,22 +47,22 @@ For each changed file:
54
47
  - Read the full file to understand context
55
48
  - Don't rely on diff alone — code that looks wrong in isolation may be correct
56
49
 
57
- If bead provided, read `.beads/artifacts/$ID/prd.md` to review against spec.
50
+ If plan exists, read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` to review against spec.
58
51
 
59
52
  ## Phase 2: Determine Scope
60
53
 
61
54
  | Input | Scope | How to Get Code |
62
55
  | ------------------------ | --------------------- | ------------------------- |
63
56
  | File/directory path | That path only | `read` or `glob` + `read` |
64
- | Bead ID (e.g., `br-123`) | Implementation vs PRD | `br show` then `git diff` |
57
+ | Current plan | Implementation vs spec | Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` then `git diff` |
65
58
  | PR number (e.g., `#45`) | PR changes | `gh pr diff 45` |
66
59
  | `all` or empty | Recent changes | `git diff main...HEAD` |
67
60
 
68
- If bead provided, read `.beads/artifacts/$ID/prd.md` to review against spec.
61
+ If plan exists, read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` to review against spec.
69
62
 
70
63
  ## Phase 3: Automated Checks
71
64
 
72
- Follow the [verification-gates](../skill/verification-gates/SKILL.md) skill protocol.
65
+ Use the `verification-before-completion` skill to run gates.
73
66
 
74
67
  Check `package.json` scripts, `Makefile`, or `justfile` for project-specific commands first — prefer those over generic defaults.
75
68