clikit-plugin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/AGENTS.md +46 -0
  2. package/README.md +282 -0
  3. package/command/commit.md +137 -0
  4. package/command/create.md +150 -0
  5. package/command/debug.md +185 -0
  6. package/command/design.md +82 -0
  7. package/command/handoff.md +95 -0
  8. package/command/import-plan.md +175 -0
  9. package/command/init.md +112 -0
  10. package/command/issue.md +110 -0
  11. package/command/plan.md +205 -0
  12. package/command/pr.md +174 -0
  13. package/command/research.md +103 -0
  14. package/command/resume.md +80 -0
  15. package/command/review-codebase.md +228 -0
  16. package/command/review.md +135 -0
  17. package/command/ship.md +109 -0
  18. package/command/start.md +77 -0
  19. package/command/status.md +123 -0
  20. package/command/verify.md +79 -0
  21. package/command/vision.md +142 -0
  22. package/dist/agents/index.d.ts +4 -0
  23. package/dist/agents/index.d.ts.map +1 -0
  24. package/dist/cli.d.ts +3 -0
  25. package/dist/cli.d.ts.map +1 -0
  26. package/dist/cli.js +103 -0
  27. package/dist/clikit.schema.json +423 -0
  28. package/dist/commands/index.d.ts +4 -0
  29. package/dist/commands/index.d.ts.map +1 -0
  30. package/dist/config.d.ts +118 -0
  31. package/dist/config.d.ts.map +1 -0
  32. package/dist/hooks/auto-format.d.ts +30 -0
  33. package/dist/hooks/auto-format.d.ts.map +1 -0
  34. package/dist/hooks/comment-checker.d.ts +17 -0
  35. package/dist/hooks/comment-checker.d.ts.map +1 -0
  36. package/dist/hooks/compaction.d.ts +60 -0
  37. package/dist/hooks/compaction.d.ts.map +1 -0
  38. package/dist/hooks/empty-message-sanitizer.d.ts +9 -0
  39. package/dist/hooks/empty-message-sanitizer.d.ts.map +1 -0
  40. package/dist/hooks/env-context.d.ts +43 -0
  41. package/dist/hooks/env-context.d.ts.map +1 -0
  42. package/dist/hooks/git-guard.d.ts +14 -0
  43. package/dist/hooks/git-guard.d.ts.map +1 -0
  44. package/dist/hooks/index.d.ts +35 -0
  45. package/dist/hooks/index.d.ts.map +1 -0
  46. package/dist/hooks/ritual-enforcer.d.ts +29 -0
  47. package/dist/hooks/ritual-enforcer.d.ts.map +1 -0
  48. package/dist/hooks/security-check.d.ts +20 -0
  49. package/dist/hooks/security-check.d.ts.map +1 -0
  50. package/dist/hooks/session-notification.d.ts +23 -0
  51. package/dist/hooks/session-notification.d.ts.map +1 -0
  52. package/dist/hooks/subagent-question-blocker.d.ts +11 -0
  53. package/dist/hooks/subagent-question-blocker.d.ts.map +1 -0
  54. package/dist/hooks/swarm-enforcer.d.ts +31 -0
  55. package/dist/hooks/swarm-enforcer.d.ts.map +1 -0
  56. package/dist/hooks/todo-enforcer.d.ts +19 -0
  57. package/dist/hooks/todo-enforcer.d.ts.map +1 -0
  58. package/dist/hooks/truncator.d.ts +28 -0
  59. package/dist/hooks/truncator.d.ts.map +1 -0
  60. package/dist/hooks/typecheck-gate.d.ts +31 -0
  61. package/dist/hooks/typecheck-gate.d.ts.map +1 -0
  62. package/dist/index.d.ts +13 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +5785 -0
  65. package/dist/skills/index.d.ts +9 -0
  66. package/dist/skills/index.d.ts.map +1 -0
  67. package/dist/tools/beads-memory-sync.d.ts +17 -0
  68. package/dist/tools/beads-memory-sync.d.ts.map +1 -0
  69. package/dist/tools/context-summary.d.ts +21 -0
  70. package/dist/tools/context-summary.d.ts.map +1 -0
  71. package/dist/tools/index.d.ts +7 -0
  72. package/dist/tools/index.d.ts.map +1 -0
  73. package/dist/tools/memory.d.ts +56 -0
  74. package/dist/tools/memory.d.ts.map +1 -0
  75. package/dist/tools/observation.d.ts +28 -0
  76. package/dist/tools/observation.d.ts.map +1 -0
  77. package/dist/tools/quick-research.d.ts +16 -0
  78. package/dist/tools/quick-research.d.ts.map +1 -0
  79. package/dist/tools/swarm.d.ts +57 -0
  80. package/dist/tools/swarm.d.ts.map +1 -0
  81. package/dist/types.d.ts +32 -0
  82. package/dist/types.d.ts.map +1 -0
  83. package/memory/_templates/handoff.md +114 -0
  84. package/memory/_templates/plan.md +135 -0
  85. package/memory/_templates/prd.md +147 -0
  86. package/memory/_templates/research.md +108 -0
  87. package/memory/_templates/review.md +117 -0
  88. package/memory/_templates/spec.md +116 -0
  89. package/memory/beads/.gitkeep +0 -0
  90. package/memory/handoffs/.gitkeep +0 -0
  91. package/memory/plans/.gitkeep +0 -0
  92. package/memory/prds/.gitkeep +0 -0
  93. package/memory/research/.gitkeep +0 -0
  94. package/memory/reviews/.gitkeep +0 -0
  95. package/memory/specs/.gitkeep +0 -0
  96. package/package.json +64 -0
  97. package/skill/accessibility-audit/SKILL.md +115 -0
  98. package/skill/beads/SKILL.md +56 -0
  99. package/skill/beads-bridge/SKILL.md +45 -0
  100. package/skill/brainstorming/SKILL.md +41 -0
  101. package/skill/chrome-devtools/SKILL.md +36 -0
  102. package/skill/cloudflare/SKILL.md +96 -0
  103. package/skill/condition-based-waiting/SKILL.md +92 -0
  104. package/skill/deep-research/SKILL.md +130 -0
  105. package/skill/defense-in-depth/SKILL.md +89 -0
  106. package/skill/design-system-audit/SKILL.md +136 -0
  107. package/skill/development-lifecycle/SKILL.md +58 -0
  108. package/skill/dispatching-parallel-agents/SKILL.md +94 -0
  109. package/skill/executing-plans/SKILL.md +54 -0
  110. package/skill/figma/SKILL.md +34 -0
  111. package/skill/finishing-a-development-branch/SKILL.md +127 -0
  112. package/skill/frontend-aesthetics/SKILL.md +63 -0
  113. package/skill/gemini-large-context/SKILL.md +80 -0
  114. package/skill/mockup-to-code/SKILL.md +98 -0
  115. package/skill/mqdh/SKILL.md +54 -0
  116. package/skill/notebooklm/SKILL.md +71 -0
  117. package/skill/playwright/SKILL.md +37 -0
  118. package/skill/playwriter/SKILL.md +56 -0
  119. package/skill/polar/SKILL.md +39 -0
  120. package/skill/receiving-code-review/SKILL.md +47 -0
  121. package/skill/requesting-code-review/SKILL.md +47 -0
  122. package/skill/resend/SKILL.md +85 -0
  123. package/skill/ritual-workflow/SKILL.md +101 -0
  124. package/skill/root-cause-tracing/SKILL.md +73 -0
  125. package/skill/session-management/SKILL.md +53 -0
  126. package/skill/sharing-skills/SKILL.md +50 -0
  127. package/skill/source-code-research/SKILL.md +138 -0
  128. package/skill/subagent-driven-development/SKILL.md +69 -0
  129. package/skill/supabase/SKILL.md +80 -0
  130. package/skill/supabase-postgres-best-practices/SKILL.md +168 -0
  131. package/skill/swarm-coordination/SKILL.md +54 -0
  132. package/skill/systematic-debugging/SKILL.md +58 -0
  133. package/skill/test-driven-development/SKILL.md +53 -0
  134. package/skill/testing-anti-patterns/SKILL.md +100 -0
  135. package/skill/testing-skills-with-subagents/SKILL.md +102 -0
  136. package/skill/ui-ux-research/SKILL.md +93 -0
  137. package/skill/using-git-worktrees/SKILL.md +129 -0
  138. package/skill/v0/SKILL.md +67 -0
  139. package/skill/v1-run/SKILL.md +85 -0
  140. package/skill/vercel-react-best-practices/SKILL.md +174 -0
  141. package/skill/verification-before-completion/SKILL.md +55 -0
  142. package/skill/visual-analysis/SKILL.md +113 -0
  143. package/skill/writing-plans/SKILL.md +55 -0
  144. package/skill/writing-skills/SKILL.md +68 -0
  145. package/src/agents/AGENTS.md +46 -0
  146. package/src/agents/build.md +170 -0
  147. package/src/agents/explore.md +113 -0
  148. package/src/agents/general.md +92 -0
  149. package/src/agents/index.ts +64 -0
  150. package/src/agents/librarian.md +116 -0
  151. package/src/agents/looker.md +107 -0
  152. package/src/agents/oracle.md +138 -0
  153. package/src/agents/plan.md +78 -0
  154. package/src/agents/review.md +98 -0
  155. package/src/agents/scout.md +84 -0
  156. package/src/agents/vision.md +159 -0
package/AGENTS.md ADDED
@@ -0,0 +1,46 @@
1
+ # CliKit
2
+
3
+ OpenCode plugin with 10 agents, 19 commands, 48 skills, 14 hooks.
4
+
5
+ ## Agents
6
+
7
+ | Agent | Role |
8
+ |-------|------|
9
+ | @build | Primary executor |
10
+ | @plan | Strategic planning |
11
+ | @general | Multi-step tasks |
12
+ | @oracle | Architecture advisor |
13
+ | @librarian | Multi-repo analysis |
14
+ | @explore | Fast navigation |
15
+ | @looker | Deep inspection |
16
+ | @scout | External research |
17
+ | @review | Code review |
18
+ | @vision | Design + visuals |
19
+
20
+ ## Workflow
21
+
22
+ ```
23
+ /create → /plan → /start → /verify → /ship
24
+ ```
25
+
26
+ ## Rules
27
+
28
+ - Always verify before claiming done
29
+ - Use TDD for new features
30
+ - Check todos before session end
31
+ - Run typecheck + lint + test before commit
32
+ - Never force push without --force-with-lease
33
+
34
+ ## Memory
35
+
36
+ - Specs: `.opencode/memory/specs/`
37
+ - Plans: `.opencode/memory/plans/`
38
+ - Handoffs: `.opencode/memory/handoffs/`
39
+
40
+ ## Skills
41
+
42
+ Load relevant skills before tasks:
43
+ - TDD: `test-driven-development`
44
+ - Debugging: `systematic-debugging`
45
+ - Planning: `brainstorming` → `writing-plans`
46
+ - Design: `frontend-aesthetics`
package/README.md ADDED
@@ -0,0 +1,282 @@
1
+ # CliKit Plugin for OpenCode
2
+
3
+ Curated agents, commands, skills, and memory system for OpenCode.
4
+
5
+ ## Features
6
+
7
+ - **10 Specialized Agents**: build, general, oracle, librarian, explore, looker, plan, review, scout, vision
8
+ - **19 Slash Commands**: /create, /start, /plan, /ship, /verify, /review, /debug, /pr, and more
9
+ - **48 Workflow Skills**: TDD, debugging, design, UI/UX, integrations, ritual-workflow, and more
10
+ - **6 Custom Tools**: memory (6), observation, swarm, beads-memory-sync, quick-research, context-summary
11
+ - **14 Runtime Hooks**: git guard, security check, auto-format, typecheck gate, truncator, compaction, ritual enforcer, session notifications, and more
12
+ - **Memory System**: Templates, specs, plans, research artifacts with FTS5 search
13
+ - **Ritual Workflow**: Enforces DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE phases
14
+ - **Extended Permissions**: doom_loop, external_directory controls
15
+ - **Configurable**: Enable/disable agents, override models, customize behavior
16
+
17
+ ## Installation
18
+
19
+ ### Option 1: Via npm (Recommended)
20
+
21
+ ```bash
22
+ # In your project
23
+ bun add -d clikit-plugin
24
+
25
+ # Create .opencode/index.ts
26
+ echo 'import CliKitPlugin from "clikit-plugin";
27
+ export default CliKitPlugin;' > .opencode/index.ts
28
+ ```
29
+
30
+ ### Option 2: Direct Copy
31
+
32
+ ```bash
33
+ # Copy the built plugin to OpenCode plugin directory
34
+ cp dist/index.js ~/.config/opencode/plugin/clikit-plugin.js
35
+ ```
36
+
37
+ ## Configuration
38
+
39
+ Create `clikit.config.json` in one of these locations:
40
+
41
+ - **User (global)**:
42
+ - Linux/macOS: `~/.config/opencode/clikit.config.json`
43
+ - Windows: `%APPDATA%\opencode\clikit.config.json`
44
+ - **Project**: `.opencode/clikit.config.json`
45
+
46
+ Project config overrides user config.
47
+
48
+ ### Example Configuration
49
+
50
+ ```json
51
+ {
52
+ "$schema": "https://unpkg.com/clikit-plugin/schema.json",
53
+ "disabled_agents": ["scout"],
54
+ "disabled_commands": ["security"],
55
+ "agents": {
56
+ "oracle": {
57
+ "model": "openai/gpt-4o"
58
+ },
59
+ "build": {
60
+ "model": "anthropic/claude-sonnet-4-5-20250514",
61
+ "temperature": 0.2,
62
+ "permission": {
63
+ "doom_loop": "deny",
64
+ "external_directory": "ask"
65
+ }
66
+ }
67
+ },
68
+ "hooks": {
69
+ "session_logging": true,
70
+ "tool_logging": false,
71
+ "todo_enforcer": { "enabled": true },
72
+ "empty_message_sanitizer": { "enabled": true },
73
+ "git_guard": { "enabled": true },
74
+ "security_check": { "enabled": true },
75
+ "subagent_question_blocker": { "enabled": true },
76
+ "comment_checker": { "enabled": true, "threshold": 0.3 },
77
+ "env_context": { "enabled": true },
78
+ "auto_format": { "enabled": false },
79
+ "typecheck_gate": { "enabled": false },
80
+ "session_notification": { "enabled": true },
81
+ "truncator": { "enabled": true },
82
+ "compaction": { "enabled": true },
83
+ "swarm_enforcer": { "enabled": false }
84
+ }
85
+ }
86
+ ```
87
+
88
+ ### Configuration Options
89
+
90
+ | Option | Type | Default | Description |
91
+ |--------|------|---------|-------------|
92
+ | `disabled_agents` | `string[]` | `[]` | Agent names to disable |
93
+ | `disabled_commands` | `string[]` | `[]` | Command names to disable |
94
+ | `agents` | `object` | `{}` | Per-agent overrides (model, temperature, etc.) |
95
+ | `commands` | `object` | `{}` | Per-command overrides |
96
+ | `hooks.session_logging` | `boolean` | `true` | Session lifecycle logging |
97
+ | `hooks.tool_logging` | `boolean` | `false` | Tool execution logging |
98
+
99
+ ### Hooks
100
+
101
+ | Hook | Default | Description |
102
+ |------|---------|-------------|
103
+ | `todo_enforcer` | on | Warns when todos are incomplete at session idle |
104
+ | `empty_message_sanitizer` | on | Replaces empty tool outputs with placeholder |
105
+ | `git_guard` | on | Blocks dangerous git commands (force push, hard reset, rm -rf) |
106
+ | `security_check` | on | Scans for secrets/credentials before git commits |
107
+ | `subagent_question_blocker` | on | Prevents subagents from asking clarifying questions |
108
+ | `comment_checker` | on | Detects excessive AI-generated comments in code |
109
+ | `env_context` | on | Injects git branch, package info, project structure |
110
+ | `auto_format` | **off** | Runs prettier/biome/dprint after file edits |
111
+ | `typecheck_gate` | **off** | Runs tsc after TypeScript file edits |
112
+ | `session_notification` | on | Desktop notifications on idle/error (Linux/macOS/Windows) |
113
+ | `truncator` | on | Truncates large outputs to prevent context overflow |
114
+ | `compaction` | on | Preserves beads state + memory during context compaction |
115
+ | `swarm_enforcer` | **off** | Enforces task isolation in multi-agent swarms |
116
+
117
+ ## Agents
118
+
119
+ | Agent | Mode | Description |
120
+ |-------|------|-------------|
121
+ | `build` | primary | Primary code executor, implements plans |
122
+ | `general` | subagent | General-purpose, multi-step tasks & complex questions |
123
+ | `plan` | primary | Creates implementation plans from specs |
124
+ | `oracle` | subagent | Expert advisor for architecture & debugging |
125
+ | `librarian` | subagent | Multi-repo analysis, doc lookup |
126
+ | `explore` | subagent | Fast codebase exploration |
127
+ | `looker` | subagent | Deep code inspection & architecture analysis |
128
+ | `scout` | subagent | External research & web search |
129
+ | `review` | subagent | Code review & quality gate |
130
+ | `vision` | subagent | Design direction + visual implementation |
131
+
132
+ ## Commands
133
+
134
+ Run with `/command-name` in OpenCode:
135
+
136
+ - `/create` - Start new bead, create specification
137
+ - `/start` - Begin implementing from a plan
138
+ - `/plan` - Create implementation plan
139
+ - `/debug` - Debug issues, find root cause, implement fix
140
+ - `/verify` - Run full verification suite
141
+ - `/ship` - Final verification + PR + cleanup
142
+ - `/review` - Request code review
143
+ - `/review-codebase` - Full codebase audit
144
+ - `/vision` - Review UI for design, a11y, responsiveness
145
+ - `/pr` - Create pull request
146
+ - `/init` - Initialize CliKit in a project
147
+ - `/research` - External research
148
+ - `/design` - UI/UX design implementation
149
+ - `/handoff` - Save state for session break
150
+ - `/resume` - Continue from handoff
151
+ - `/status` - Workspace and bead overview
152
+ - `/commit` - Intelligent git commit
153
+ - `/issue` - Quick issue creation
154
+ - `/import-plan` - Import from Jira/Notion/Linear
155
+
156
+ ## Skills
157
+
158
+ 47 workflow skills organized into 8 categories:
159
+
160
+ ### Design & Planning (4)
161
+ | Skill | Use When |
162
+ |-------|----------|
163
+ | `brainstorming` | Starting without clear requirements |
164
+ | `writing-plans` | Requirements clear, need implementation plan |
165
+ | `executing-plans` | Plan exists, need to execute tasks |
166
+ | `development-lifecycle` | Building complete feature from scratch |
167
+
168
+ ### UI/UX & Frontend (7)
169
+ | Skill | Use When |
170
+ |-------|----------|
171
+ | `frontend-aesthetics` | Building UI, avoid "AI slop" |
172
+ | `gemini-large-context` | Analyzing 100KB+ files |
173
+ | `ui-ux-research` | Multimodal UI/UX analysis |
174
+ | `mockup-to-code` | Converting mockups to code |
175
+ | `visual-analysis` | Analyzing images/screenshots |
176
+ | `accessibility-audit` | WCAG compliance check |
177
+ | `design-system-audit` | Design system consistency |
178
+
179
+ ### Development (8)
180
+ | Skill | Use When |
181
+ |-------|----------|
182
+ | `subagent-driven-development` | Fast iteration with quality gates |
183
+ | `dispatching-parallel-agents` | 3+ independent failures |
184
+ | `deep-research` | LSP exploration with confidence scores |
185
+ | `source-code-research` | Library internals research |
186
+ | `using-git-worktrees` | Isolated workspace on new branch |
187
+ | `finishing-a-development-branch` | Complete branch workflow |
188
+ | `vercel-react-best-practices` | React/Next.js optimization |
189
+ | `supabase-postgres-best-practices` | Postgres optimization |
190
+
191
+ ### Testing (4)
192
+ | Skill | Use When |
193
+ |-------|----------|
194
+ | `test-driven-development` | Implementing any feature |
195
+ | `condition-based-waiting` | Flaky tests from race conditions |
196
+ | `testing-anti-patterns` | Avoiding testing mistakes |
197
+ | `testing-skills-with-subagents` | TDD for process docs |
198
+
199
+ ### Debugging (4)
200
+ | Skill | Use When |
201
+ |-------|----------|
202
+ | `systematic-debugging` | Encountering a bug |
203
+ | `root-cause-tracing` | Finding original trigger |
204
+ | `defense-in-depth` | Multi-layer validation |
205
+ | `verification-before-completion` | Marking task complete |
206
+
207
+ ### Integration (16)
208
+ | Skill | Use When |
209
+ |-------|----------|
210
+ | `figma` | Access Figma design data |
211
+ | `playwright` | Browser automation |
212
+ | `chrome-devtools` | Browser debugging |
213
+ | `polar` | Payment integration |
214
+ | `beads` | Multi-agent task coordination |
215
+ | `beads-bridge` | Bridge Beads with todo system |
216
+ | `swarm-coordination` | Parallel task execution |
217
+ | `session-management` | Context growth management |
218
+ | `playwriter` | Chrome extension browser automation |
219
+ | `mqdh` | Meta Quest VR/AR development |
220
+ | `v0` | AI-powered UI generation |
221
+ | `resend` | Transactional emails |
222
+ | `notebooklm` | Query NotebookLM |
223
+ | `supabase` | Supabase platform |
224
+ | `cloudflare` | Cloudflare Workers/Pages |
225
+ | `v1-run` | npm package intelligence |
226
+
227
+ ### Collaboration (3)
228
+ | Skill | Use When |
229
+ |-------|----------|
230
+ | `requesting-code-review` | After completing a task |
231
+ | `receiving-code-review` | Handling review feedback |
232
+ | `sharing-skills` | Contributing skills via PR |
233
+
234
+ ### Meta (1)
235
+ | Skill | Use When |
236
+ |-------|----------|
237
+ | `writing-skills` | Creating new skills |
238
+
239
+ ## Development
240
+
241
+ ```bash
242
+ # Install dependencies
243
+ bun install
244
+
245
+ # Build
246
+ bun run build
247
+
248
+ # Type check
249
+ bun run typecheck
250
+
251
+ # Watch mode
252
+ bun run dev
253
+ ```
254
+
255
+ ## Structure
256
+
257
+ ```
258
+ .opencode/
259
+ ├── src/
260
+ │ ├── index.ts # Plugin entrypoint
261
+ │ ├── config.ts # Config loader
262
+ │ ├── types.ts # Type definitions
263
+ │ ├── agents/ # Agent loaders
264
+ │ ├── skills/ # Skill loaders
265
+ │ └── hooks/ # Runtime hooks (13 modules)
266
+ ├── skill/ # Skill definitions (*.md)
267
+ ├── command/ # Command definitions (*.md)
268
+ ├── memory/ # Memory system
269
+ │ ├── _templates/ # Document templates
270
+ │ ├── specs/ # Specifications
271
+ │ ├── plans/ # Implementation plans
272
+ │ ├── research/ # Research artifacts
273
+ │ ├── reviews/ # Code reviews
274
+ │ ├── handoffs/ # Session handoffs
275
+ │ ├── beads/ # Beads task artifacts
276
+ │ └── prds/ # Product requirements
277
+ └── clikit.config.json
278
+ ```
279
+
280
+ ## License
281
+
282
+ MIT
@@ -0,0 +1,137 @@
1
+ ---
2
+ description: Intelligent git commit with Conventional Commits format.
3
+ agent: build
4
+ ---
5
+
6
+ You are creating an **intelligent git commit** with proper message formatting.
7
+
8
+ ## Your Task
9
+
10
+ Analyze changes and create a well-formatted commit following Conventional Commits.
11
+
12
+ ## Process
13
+
14
+ ### 1. Analyze Changes
15
+
16
+ ```bash
17
+ git status
18
+ git diff --staged
19
+ git diff # if nothing staged
20
+ ```
21
+
22
+ ### 2. Determine Commit Type
23
+
24
+ | Type | When |
25
+ |------|------|
26
+ | `feat` | New feature |
27
+ | `fix` | Bug fix |
28
+ | `docs` | Documentation only |
29
+ | `style` | Formatting, no code change |
30
+ | `refactor` | Code change, no feature/fix |
31
+ | `perf` | Performance improvement |
32
+ | `test` | Adding/updating tests |
33
+ | `chore` | Build, deps, tooling |
34
+ | `ci` | CI/CD changes |
35
+
36
+ ### 3. Identify Scope
37
+
38
+ Based on changed files:
39
+ - `auth` — Authentication related
40
+ - `api` — API changes
41
+ - `ui` — Frontend/UI
42
+ - `db` — Database
43
+ - `core` — Core logic
44
+ - Or specific module name
45
+
46
+ ### 4. Generate Message
47
+
48
+ Format:
49
+ ```
50
+ <type>(<scope>): <description>
51
+
52
+ [optional body]
53
+
54
+ [optional footer]
55
+ bead_id: [id if applicable]
56
+ ```
57
+
58
+ ### 5. Stage & Commit
59
+
60
+ ```bash
61
+ # Stage if needed
62
+ git add [files]
63
+
64
+ # Commit
65
+ git commit -m "[message]"
66
+ ```
67
+
68
+ ## Commit Template
69
+
70
+ ```markdown
71
+ ## 📝 Commit Preview
72
+
73
+ ### Changes Detected
74
+ | File | Status | Lines |
75
+ |------|--------|-------|
76
+ | path/to/file.ts | Modified | +10 / -5 |
77
+
78
+ ### Suggested Commit
79
+
80
+ ```
81
+ feat(auth): add JWT refresh token support
82
+
83
+ - Implement token refresh endpoint
84
+ - Add automatic refresh on 401
85
+ - Update auth middleware
86
+
87
+ bead_id: T-xxx
88
+ ```
89
+
90
+ ### Actions
91
+ - [x] Stage all changes
92
+ - [ ] Stage specific files
93
+ - [ ] Edit message
94
+ - [ ] Commit
95
+
96
+ Proceed with commit? [Y/n/edit]
97
+ ```
98
+
99
+ ## Smart Detection
100
+
101
+ | Changes In | Suggested Type |
102
+ |------------|----------------|
103
+ | `*.test.ts` | `test` |
104
+ | `*.md`, `docs/` | `docs` |
105
+ | `package.json` (deps) | `chore(deps)` |
106
+ | `.github/`, CI files | `ci` |
107
+ | Bug fix patterns | `fix` |
108
+ | New files + exports | `feat` |
109
+
110
+ ## Options
111
+
112
+ ```
113
+ /commit # Auto-detect and suggest
114
+ /commit -a # Stage all + commit
115
+ /commit --amend # Amend last commit
116
+ /commit -m "msg" # Use specific message
117
+ /commit --dry-run # Preview only
118
+ ```
119
+
120
+ ## Breaking Changes
121
+
122
+ If breaking change detected:
123
+ ```
124
+ feat(api)!: change response format
125
+
126
+ BREAKING CHANGE: Response now returns {data, meta} wrapper
127
+ ```
128
+
129
+ ## Rules
130
+
131
+ - ✅ ALWAYS use Conventional Commits format
132
+ - ✅ ALWAYS include bead_id if working on a bead
133
+ - ✅ ALWAYS verify staged changes before commit
134
+ - ❌ NEVER commit with generic messages like "fix" or "update"
135
+ - ❌ NEVER commit sensitive data (secrets, keys)
136
+
137
+ Now analyzing changes for commit...
@@ -0,0 +1,150 @@
1
+ ---
2
+ description: Start a new bead. Gather requirements and create specification.
3
+ agent: plan
4
+ ---
5
+
6
+ You are the **Plan Agent**. Execute the `/create` command.
7
+
8
+ ## Template
9
+
10
+ Use template at: `@.opencode/memory/_templates/spec.md`
11
+
12
+ ## Your Task
13
+
14
+ Create a new specification and bead for the user's goal/idea.
15
+
16
+ ## Process
17
+
18
+ 1. **Interview** the user using 5 core dimensions:
19
+ - **Problem & Context** — Why is this needed? Who is affected?
20
+ - **Outcomes** — What changes if successful?
21
+ - **Scope** — What's in/out of boundaries?
22
+ - **Users** — Primary and secondary users?
23
+ - **Constraints** — Performance, security, timeline?
24
+
25
+ 2. **Paraphrase and confirm**: "Is anything missing or wrong?"
26
+
27
+ 3. **Generate `spec.md`** at `.opencode/memory/specs/YYYY-MM-DD-<descriptor>.md` using the canonical template
28
+
29
+ 4. **Create bead** via `mcp__beads_village__add()` with title, description, and priority
30
+
31
+ ## Spec Structure (follows `_templates/spec.md`)
32
+
33
+ The spec MUST include:
34
+
35
+ ```markdown
36
+ # Specification: [Title]
37
+
38
+ **Date:** YYYY-MM-DD
39
+ **Author:** [Name]
40
+ **Status:** Draft | Confirmed
41
+ **bead_id:** [ID]
42
+
43
+ ---
44
+
45
+ ## Problem & Context
46
+
47
+ ### Problem Statement
48
+ [Why is this needed?]
49
+
50
+ ### Background
51
+ [Context and history]
52
+
53
+ ### Who is Affected
54
+ [Stakeholders and users impacted]
55
+
56
+ ---
57
+
58
+ ## Outcomes
59
+
60
+ ### Success Criteria
61
+ 1. [Measurable outcome 1]
62
+ 2. [Measurable outcome 2]
63
+
64
+ ### Key Results
65
+ | Outcome | Metric | Target |
66
+ |---------|--------|--------|
67
+ | [Outcome] | [How to measure] | [Target value] |
68
+
69
+ ---
70
+
71
+ ## Scope
72
+
73
+ ### In Scope
74
+ - [Feature/capability 1]
75
+
76
+ ### Out of Scope
77
+ - [Excluded item 1]
78
+
79
+ ### Boundaries
80
+ [Clear boundaries of what this spec covers]
81
+
82
+ ---
83
+
84
+ ## Users
85
+
86
+ ### Primary Users
87
+ | User Type | Description | Needs |
88
+ |-----------|-------------|-------|
89
+ | [Type] | [Who they are] | [What they need] |
90
+
91
+ ### Secondary Users
92
+ | User Type | Description | Needs |
93
+ |-----------|-------------|-------|
94
+
95
+ ---
96
+
97
+ ## Constraints
98
+
99
+ ### Technical Constraints
100
+ - [Constraint 1]
101
+
102
+ ### Business Constraints
103
+ - [Timeline, budget, etc.]
104
+
105
+ ### Dependencies
106
+ | Dependency | Type | Status |
107
+ |------------|------|--------|
108
+ | [Dependency] | Blocking/Soft | Ready/Pending |
109
+
110
+ ---
111
+
112
+ ## Acceptance Criteria
113
+
114
+ | ID | Criteria | Verification |
115
+ |----|----------|--------------|
116
+ | AC-01 | [Criteria] | [How to verify] |
117
+ | AC-02 | [Criteria] | [How to verify] |
118
+
119
+ ---
120
+
121
+ ## Assumptions
122
+
123
+ | ID | Assumption | Status | Notes |
124
+ |----|------------|--------|-------|
125
+ | A-01 | [Assumption] | Confirmed/Unconfirmed | [Notes] |
126
+
127
+ ---
128
+
129
+ ## Open Questions
130
+
131
+ - [ ] [Question 1]
132
+ - [ ] [Question 2]
133
+
134
+ ---
135
+
136
+ ## References
137
+
138
+ - [Link to related docs]
139
+ ```
140
+
141
+ ## Rules
142
+
143
+ - ✅ ALWAYS use the full template structure from `_templates/spec.md`
144
+ - ✅ ALWAYS include frontmatter (Date, Author, Status, bead_id)
145
+ - ✅ ALWAYS ask clarifying questions if goal is vague
146
+ - ✅ ALWAYS tag assumptions clearly as "Confirmed" vs "Unconfirmed"
147
+ - ✅ ALWAYS get user confirmation before finalizing
148
+ - ❌ NEVER skip the Acceptance Criteria section
149
+
150
+ Now, ask the user about their goal/idea to begin the interview process.