clikit-plugin 0.2.35 → 0.2.37

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 (53) hide show
  1. package/README.md +13 -14
  2. package/command/init.md +70 -152
  3. package/command/issue.md +1 -1
  4. package/command/plan.md +9 -4
  5. package/command/research.md +5 -5
  6. package/command/ship.md +51 -59
  7. package/command/verify.md +74 -50
  8. package/dist/.tsbuildinfo +1 -1
  9. package/dist/agents/index.d.ts.map +1 -1
  10. package/dist/cli.d.ts +1 -1
  11. package/dist/cli.d.ts.map +1 -1
  12. package/dist/cli.js +45 -107
  13. package/dist/cli.test.d.ts +2 -0
  14. package/dist/cli.test.d.ts.map +1 -0
  15. package/dist/clikit.schema.json +154 -136
  16. package/dist/commands/index.d.ts.map +1 -1
  17. package/dist/config.d.ts +13 -0
  18. package/dist/config.d.ts.map +1 -1
  19. package/dist/config.test.d.ts +2 -0
  20. package/dist/config.test.d.ts.map +1 -0
  21. package/dist/hooks/error-logger.d.ts +10 -0
  22. package/dist/hooks/error-logger.d.ts.map +1 -0
  23. package/dist/hooks/index.d.ts +1 -1
  24. package/dist/hooks/index.d.ts.map +1 -1
  25. package/dist/hooks/memory-digest.d.ts +2 -0
  26. package/dist/hooks/memory-digest.d.ts.map +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +770 -154
  29. package/dist/skills/index.d.ts +10 -0
  30. package/dist/skills/index.d.ts.map +1 -1
  31. package/dist/tools/cass-memory.d.ts +61 -0
  32. package/dist/tools/cass-memory.d.ts.map +1 -0
  33. package/dist/tools/index.d.ts +1 -0
  34. package/dist/tools/index.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/skill/cass-village/SKILL.md +217 -0
  37. package/src/agents/AGENTS.md +2 -1
  38. package/src/agents/build.md +17 -16
  39. package/src/agents/index.ts +33 -4
  40. package/src/agents/oracle.md +49 -68
  41. package/src/agents/plan.md +14 -15
  42. package/src/agents/research.md +76 -0
  43. package/src/agents/review.md +1 -1
  44. package/src/agents/vision.md +1 -1
  45. package/dist/hooks/git-guard.test.d.ts +0 -2
  46. package/dist/hooks/git-guard.test.d.ts.map +0 -1
  47. package/dist/hooks/security-check.test.d.ts +0 -2
  48. package/dist/hooks/security-check.test.d.ts.map +0 -1
  49. package/src/agents/general.md +0 -92
  50. package/src/agents/librarian.md +0 -116
  51. package/src/agents/looker.md +0 -112
  52. package/src/agents/scout.md +0 -84
  53. /package/command/{status.md → status-beads.md} +0 -0
package/README.md CHANGED
@@ -4,11 +4,11 @@ Curated agents, commands, skills, and memory system for OpenCode.
4
4
 
5
5
  ## Features
6
6
 
7
- - **10 Specialized Agents**: build, general, oracle, librarian, explore, looker, plan, review, scout, vision
7
+ - **7 Specialized Agents**: build, plan, explore, review, vision, oracle, research
8
8
  - **19 Slash Commands**: /create, /start, /plan, /ship, /verify, /review, /debug, /pr, and more
9
9
  - **48 Workflow Skills**: TDD, debugging, design, UI/UX, integrations, ritual-workflow, and more
10
- - **6 Internal Utilities**: memory (read/search/get/timeline/update/admin), observation, swarm, beads-memory-sync, quick-research, context-summary (used by hooks, not directly registered as agent tools)
11
- - **10 Runtime Hooks**: todo enforcer, empty output sanitizer, git guard, security check, subagent blocker, truncator, swarm enforcer, memory digest, and todo→beads sync
10
+ - **7 Internal Utilities**: memory (read/search/get/timeline/update/admin), observation, swarm, beads-memory-sync, quick-research, context-summary, cass-memory (used by hooks, not directly registered as agent tools)
11
+ - **10 Runtime Hooks**: todo enforcer, empty output sanitizer, git guard, security check, subagent blocker, truncator, swarm enforcer, memory digest, todo→beads sync, and cass-memory
12
12
  - **Memory System**: Templates, specs, plans, research artifacts with FTS5 search
13
13
  - **Extended Permissions**: doom_loop, external_directory controls
14
14
  - **Configurable**: Enable/disable agents, override models, customize behavior
@@ -24,7 +24,7 @@ bun x clikit-plugin install
24
24
 
25
25
  That's it! The plugin will be registered in `~/.config/opencode/opencode.json`.
26
26
 
27
- Installer also adds default MCP servers if missing:
27
+ CliKit injects default MCP server entries at runtime when missing:
28
28
 
29
29
  - `beads-village` (`npx beads-village`)
30
30
  - `context7` (`https://mcp.context7.com/mcp`)
@@ -62,7 +62,7 @@ Project config overrides user config.
62
62
  ```json
63
63
  {
64
64
  "$schema": "https://unpkg.com/clikit-plugin@latest/schema.json",
65
- "disabled_agents": ["scout"],
65
+ "disabled_agents": ["review"],
66
66
  "disabled_commands": ["security"],
67
67
  "disabled_skills": ["playwright"],
68
68
  "skills": {
@@ -70,7 +70,7 @@ Project config overrides user config.
70
70
  "disable": ["sharing-skills"]
71
71
  },
72
72
  "agents": {
73
- "oracle": {
73
+ "vision": {
74
74
  "model": "openai/gpt-4o"
75
75
  },
76
76
  "build": {
@@ -93,7 +93,8 @@ Project config overrides user config.
93
93
  "truncator": { "enabled": true },
94
94
  "swarm_enforcer": { "enabled": true },
95
95
  "memory_digest": { "enabled": true },
96
- "todo_beads_sync": { "enabled": true }
96
+ "todo_beads_sync": { "enabled": true },
97
+ "cass_memory": { "enabled": true }
97
98
  }
98
99
  }
99
100
  ```
@@ -122,21 +123,19 @@ Project config overrides user config.
122
123
  | `subagent_question_blocker` | on | Prevents subagents from asking clarifying questions |
123
124
  | `truncator` | on | Truncates large outputs to prevent context overflow |
124
125
  | `swarm_enforcer` | on | Enforces task isolation in multi-agent swarms |
125
- | `memory_digest` | on | Generates `memory/_digest.md` from SQLite observations |
126
+ | `memory_digest` | on | Generates `memory/_digest.md` index + topic files (`decision.md`, `learning.md`, etc.) from SQLite observations |
126
127
  | `todo_beads_sync` | on | Mirrors OpenCode todos into Beads issues |
128
+ | `cass_memory` | on | Loads embedded memory context on session start and runs idle reflection (`cassMemoryContext`, `cassMemoryReflect`) |
127
129
 
128
130
  ## Agents
129
131
 
130
132
  | Agent | Mode | Description |
131
133
  |-------|------|-------------|
132
134
  | `build` | primary | Primary code executor, implements plans |
133
- | `general` | subagent | General-purpose, multi-step tasks & complex questions |
134
135
  | `plan` | primary | Creates implementation plans from specs |
135
- | `oracle` | subagent | Expert advisor for architecture & debugging |
136
- | `librarian` | subagent | Multi-repo analysis, doc lookup |
136
+ | `oracle` | subagent | Deep code inspection + architecture trade-off analysis |
137
+ | `research` | subagent | External docs + GitHub evidence research |
137
138
  | `explore` | subagent | Fast codebase exploration |
138
- | `looker` | subagent | Deep code inspection & architecture analysis |
139
- | `scout` | subagent | External research & web search |
140
139
  | `review` | subagent | Code review & quality gate |
141
140
  | `vision` | subagent | Design direction + visual implementation |
142
141
 
@@ -159,7 +158,7 @@ Run with `/command-name` in OpenCode:
159
158
  - `/design` - UI/UX design implementation
160
159
  - `/handoff` - Save state for session break
161
160
  - `/resume` - Continue from handoff
162
- - `/status` - Workspace and bead overview
161
+ - `/status-beads` - Workspace and bead overview
163
162
  - `/commit` - Intelligent git commit
164
163
  - `/issue` - Quick issue creation
165
164
  - `/import-plan` - Import from Jira/Notion/Linear
package/command/init.md CHANGED
@@ -1,189 +1,107 @@
1
1
  ---
2
- description: Initialize CliKit plugin and generate a well-crafted AGENTS.md for the project.
2
+ description: Initialize CliKit and craft a high-quality AGENTS.md for this project.
3
3
  agent: build
4
4
  ---
5
5
 
6
- You are the **Build Agent**. Execute the `/init` command.
6
+ You are running `/init` for this repository.
7
7
 
8
- ## Your Task
8
+ Goal: set up CliKit and produce a **carefully written** `AGENTS.md` (not autogenerated fluff).
9
9
 
10
- Set up CliKit AND generate a high-quality `AGENTS.md` file. The AGENTS.md is the highest-leverage file in the project — it goes into every single session. Craft it carefully.
10
+ ## Execution Plan
11
11
 
12
- ## Process
12
+ ### 1) Detect project context first (parallel)
13
13
 
14
- ### 1. Check Prerequisites
14
+ Run focused discovery to identify:
15
+ - runtime/language/framework
16
+ - package manager + canonical install/test/build/lint/typecheck commands
17
+ - monorepo vs single app
18
+ - key top-level directories and entry points
19
+ - existing guidance files (`AGENTS.md`, `CLAUDE.md`, `README*`, `CONTRIBUTING*`)
15
20
 
16
- ```bash
17
- ls -la .opencode/ 2>/dev/null
18
- ls package.json 2>/dev/null
19
- ls bun.lockb pnpm-lock.yaml yarn.lock 2>/dev/null
20
- ```
21
-
22
- If `.opencode/` already exists with CliKit files, warn user and ask before overwriting.
23
-
24
- ### 2. Install Plugin
25
-
26
- ```bash
27
- bun add -d clikit-plugin 2>/dev/null || \
28
- pnpm add -D clikit-plugin 2>/dev/null || \
29
- npm install -D clikit-plugin 2>/dev/null
30
- ```
21
+ ### 2) Install plugin + entrypoint
31
22
 
32
- ### 3. Create Plugin Entry Point
23
+ Install `clikit-plugin` with the project’s package manager.
33
24
 
34
- Create `.opencode/index.ts`:
25
+ Create/ensure `.opencode/index.ts`:
35
26
 
36
- ```typescript
27
+ ```ts
37
28
  import CliKitPlugin from "clikit-plugin";
29
+
38
30
  export default CliKitPlugin;
39
31
  ```
40
32
 
41
- ### 4. Create Default Configuration
33
+ ### 3) Create `.opencode` structure
42
34
 
43
- Create `.opencode/clikit.config.json` with sensible defaults (see existing template).
35
+ Ensure these exist:
36
+ - `.opencode/memory/specs`
37
+ - `.opencode/memory/plans`
38
+ - `.opencode/memory/research`
39
+ - `.opencode/memory/reviews`
40
+ - `.opencode/memory/handoffs`
41
+ - `.opencode/memory/prds`
42
+ - `.opencode/memory/beads`
43
+ - `.opencode/memory/_templates`
44
44
 
45
- ### 5. Create Memory Directory Structure
45
+ ### 4) Handle existing AGENTS.md safely
46
46
 
47
- ```bash
48
- mkdir -p .opencode/memory/{specs,plans,research,reviews,handoffs,prds,beads,_templates}
49
- ```
47
+ If root `AGENTS.md` exists:
48
+ 1. Read it.
49
+ 2. Audit briefly for relevance/conciseness.
50
+ 3. Ask before replacing.
50
51
 
51
- ### 6. Generate AGENTS.md
52
+ If none exists, create one directly.
52
53
 
53
- **This is the most important step.** The AGENTS.md file goes into EVERY session. Follow these principles:
54
+ ### 5) Write AGENTS.md (high-signal only)
54
55
 
55
- #### 6a. Explore the Project First (parallel)
56
+ Use **WHAT / WHY / HOW** and keep it concise.
56
57
 
57
- Fire these immediately to understand the project:
58
+ Required sections:
59
+ 1. `# <Project Name>`
60
+ 2. 1–2 lines: what this project is and why it exists
61
+ 3. `## Stack`
62
+ 4. `## Project Structure` (compact map of important dirs)
63
+ 5. `## Development` (only core universal commands)
64
+ 6. `## Where to Find More` (progressive disclosure pointers)
58
65
 
59
- ```
60
- Explore: "Identify: 1) Language/runtime (check package.json, Cargo.toml, go.mod, pyproject.toml, etc.) 2) Framework (Next.js, Express, FastAPI, etc.) 3) Package manager (bun, pnpm, npm, yarn, cargo, pip) 4) Build command 5) Test command 6) Lint command"
61
- Explore: "Map top-level structure. What are the main directories? Is this a monorepo? What are the apps vs packages vs shared code?"
62
- Explore: "Find entry points, main config files, and any existing AGENTS.md/CLAUDE.md/CONTRIBUTING.md/README.md with project conventions."
63
- ```
66
+ Quality constraints:
67
+ - target **< 60 lines**
68
+ - include only universally applicable guidance
69
+ - no task-specific playbooks
70
+ - no style-guide/linter content
71
+ - no stale code snippets when a file reference is better
72
+ - prefer pointers to authoritative files
64
73
 
65
- #### 6b. Write AGENTS.md Following Best Practices
74
+ ### 6) Validate result
66
75
 
67
- Write to `AGENTS.md` in the project root. Follow these rules strictly:
76
+ Check:
77
+ - plugin entrypoint exists and imports `clikit-plugin`
78
+ - AGENTS.md exists at project root
79
+ - AGENTS.md length and clarity are within target
68
80
 
69
- **TARGET: Under 60 lines. Every line must be universally applicable to every session.**
81
+ ### 7) Final response format
70
82
 
71
- **Structure — WHAT / WHY / HOW:**
83
+ Return:
72
84
 
73
85
  ```markdown
74
- # [Project Name]
75
-
76
- [1-2 sentences: WHAT this project is and WHY it exists. Be specific — not "a web app" but "a real-time collaboration platform for design teams using WebSocket sync".]
77
-
78
- ## Stack
79
-
80
- [Language, runtime, framework, key libraries. One line each, no fluff.]
81
-
82
- ## Project Structure
83
-
84
- [Map the top-level directories. For monorepos, explain what each app/package does. Use a compact tree — max 10-15 lines. Focus on WHERE things are, not what every file does.]
85
-
86
- ## Development
87
-
88
- [Only the commands an agent needs for ANY task. Build, test, typecheck, lint, dev server. Nothing task-specific.]
89
-
90
- ```bash
91
- [package-manager] install
92
- [package-manager] run build
93
- [package-manager] run test
94
- [package-manager] run lint
95
- ```
96
-
97
- ## Where to Find More
98
-
99
- [Progressive disclosure — point to files, don't inline their contents. Only include files that actually exist in the project.]
100
-
101
- - Architecture decisions: [path or "ask the team"]
102
- - API patterns: [path]
103
- - Testing conventions: [path]
104
- - Contributing guide: [path]
105
- ```
106
-
107
- #### 6c. What NOT to Include
108
-
109
- Applying the blog's principles strictly:
110
-
111
- - ❌ **No code style rules** — that's what linters and formatters do. Hooks handle auto-format and typecheck.
112
- - ❌ **No task-specific instructions** — "how to create a database migration" doesn't belong. Put that in a separate doc and point to it.
113
- - ❌ **No model/agent details** — agents know their own config. Don't list all 10 agents and their models.
114
- - ❌ **No inline code snippets** — they go stale. Use `file:line` pointers instead.
115
- - ❌ **No exhaustive command lists** — agent can discover commands. Only include the core workflow.
116
- - ❌ **No "rules" that are just good engineering** — "write clean code" wastes instruction budget. The agent already knows.
117
- - ❌ **No skill recommendations** — that's task-specific. Skills are discovered at task time.
118
-
119
- #### 6d. What TO Include (universally applicable)
120
-
121
- - ✅ **What the project IS** — 1-2 sentences, specific.
122
- - ✅ **Tech stack** — language, runtime, framework, key deps.
123
- - ✅ **Project map** — where things live (especially monorepos).
124
- - ✅ **Essential commands** — build, test, lint, dev server.
125
- - ✅ **Progressive disclosure pointers** — "Read X for Y" references to existing docs.
126
- - ✅ **Non-obvious conventions** — only things the agent would get WRONG without being told (e.g., "We use Bun, not Node" or "Database migrations use Drizzle push, not migrate").
127
- - ✅ **Verification commands** — how to confirm changes work.
128
-
129
- ### 7. If AGENTS.md Already Exists
130
-
131
- If the project already has an `AGENTS.md` or `CLAUDE.md`:
132
-
133
- 1. Read it first
134
- 2. Audit it against the blog principles (concise? universally applicable? progressive disclosure?)
135
- 3. Propose improvements to the user — don't overwrite without asking
136
- 4. If user approves, rewrite following the principles above
137
-
138
- ### 8. Verify Setup
139
-
140
- - Check that plugin loads correctly
141
- - Verify agents are available
142
- - Verify AGENTS.md exists and is under 60 lines
143
- - Count instructions in AGENTS.md — warn if over 30 (LLMs reliably follow ~150 instructions, Claude Code's system prompt already uses ~50)
144
-
145
- ### 9. Report
146
-
147
- ```
148
86
  ## CliKit Initialized
149
87
 
150
88
  ✅ Plugin installed
151
- ✅ Entry point: .opencode/index.ts
152
- Config: .opencode/clikit.config.json
153
- Memory directories created
154
- ✅ AGENTS.md generated ([N] lines, [M] instructions)
89
+ ✅ Entry point configured
90
+ Memory directories ready
91
+ AGENTS.md created/updated
155
92
 
156
93
  ### AGENTS.md Quality
157
- - Lines: [N] (target: <60)
158
- - Instructions: [M] (target: <30, budget shared with system prompt)
159
- - Progressive disclosure: [Y/N]
160
- - Task-specific content: [none found / WARNING: found N task-specific items]
161
-
162
- ### Next Steps
163
- 1. Review AGENTS.md every line matters, it affects every session
164
- 2. Run `/create` to start a new feature
165
- 3. Customize `.opencode/clikit.config.json` as needed
94
+ - Lines: <count>
95
+ - Universally applicable: yes/no
96
+ - Progressive disclosure pointers: yes/no
97
+
98
+ ### Next
99
+ 1. Restart OpenCode
100
+ 2. Run /create to begin work
166
101
  ```
167
102
 
168
- ## AGENTS.md Quality Principles (from humanlayer.dev)
169
-
170
- 1. **Less is more** — frontier models follow ~150 instructions reliably. System prompt uses ~50. Your AGENTS.md gets ~100 max. Each unnecessary instruction degrades ALL instructions uniformly.
171
- 2. **Universally applicable only** if it doesn't matter for EVERY session, it doesn't belong here.
172
- 3. **Progressive disclosure** point to detailed docs, don't inline them. The agent reads them only when relevant.
173
- 4. **Not a linter** — never put code style in AGENTS.md. Use formatters, hooks, and tooling.
174
- 5. **Pointers over copies** — reference `file:line`, not code snippets. Snippets go stale.
175
- 6. **Carefully crafted** — this is the highest leverage point. Every line either helps or hurts.
176
-
177
- ## Rules
178
-
179
- - ✅ ALWAYS explore the project before generating AGENTS.md
180
- - ✅ ALWAYS keep AGENTS.md under 60 lines
181
- - ✅ ALWAYS use WHAT/WHY/HOW structure
182
- - ✅ ALWAYS use progressive disclosure (pointers, not copies)
183
- - ✅ ALWAYS verify the final instruction count
184
- - ✅ ALWAYS check for existing AGENTS.md before overwriting
185
- - ❌ NEVER put code style rules in AGENTS.md
186
- - ❌ NEVER put task-specific instructions in AGENTS.md
187
- - ❌ NEVER inline code snippets (they go stale)
188
- - ❌ NEVER generate more than 30 instructions
189
- - ❌ NEVER overwrite existing AGENTS.md without asking
103
+ ## Important behavior
104
+
105
+ - Be deliberate: AGENTS.md is high-leverage context for every session.
106
+ - Prefer concise, accurate, project-specific instructions over long generic rules.
107
+ - Do not overwrite existing AGENTS.md without explicit confirmation.
package/command/issue.md CHANGED
@@ -90,7 +90,7 @@ mcp__beads_village__add(
90
90
  ### Next Steps
91
91
  - Claim with `/implement`
92
92
  - Add to plan with `/plan`
93
- - View all with `/status`
93
+ - View all with `/status-beads`
94
94
  ```
95
95
 
96
96
  ## Advanced Options
package/command/plan.md CHANGED
@@ -32,14 +32,19 @@ Fire these immediately alongside codebase exploration:
32
32
 
33
33
  **Memory mining** (Plan reads directly — has file read access):
34
34
  ```
35
- Read: ".opencode/memory/_digest.md" — Auto-generated from SQLite (decisions, learnings, blockers, handoffs)
35
+ Read: ".opencode/memory/_digest.md" — Compact index of memory topics and highlights
36
+ Read: ".opencode/memory/decision.md" — Detailed architectural decisions
37
+ Read: ".opencode/memory/learning.md" — Detailed learnings and gotchas
38
+ Read: ".opencode/memory/blocker.md" — Past blockers and mitigations
39
+ Read: ".opencode/memory/progress.md" — Recent progress notes
40
+ Read: ".opencode/memory/handoff.md" — Session handoff observations
36
41
  Read: ".opencode/memory/research/" — List files, read any related to the feature
37
42
  Read: ".opencode/memory/handoffs/" — Read recent handoffs for prior session context
38
43
  Read: ".opencode/memory/reviews/" — Check past review findings on related code
39
44
  Read: ".opencode/memory/specs/" — Check for prior/related specs
40
45
  ```
41
46
 
42
- > `_digest.md` is generated by the Memory Digest hook on session start. Contains past decisions, learnings, blockers, and handoffs from the SQLite observations DB.
47
+ > `_digest.md` is an index generated by the Memory Digest hook. Use topic files (`decision.md`, `learning.md`, etc.) for full details.
43
48
 
44
49
  Surface from memory files:
45
50
  - Past decisions that constrain this plan
@@ -65,9 +70,9 @@ Explore: "Find existing patterns for similar features — structure, naming, tes
65
70
  Explore: "Find test infrastructure and conventions — framework, helpers, fixtures."
66
71
  ```
67
72
 
68
- For complex features, also fire:
73
+ For complex features, also delegate in parallel:
69
74
  ```
70
- Scout: "Find docs and production patterns for [relevant libraries/APIs]."
75
+ Research: "Find docs and production patterns for [relevant libraries/APIs]."
71
76
  Oracle: "Analyze architecture trade-offs for [key decisions]."
72
77
  ```
73
78
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  description: Deep exploration and research before planning.
3
- agent: plan
3
+ agent: research
4
4
  subtask: true
5
5
  ---
6
6
 
7
- You are the **Plan Agent** delegating to **Scout Agent**. Execute the `/research` command.
7
+ You are the **Research Agent**. Execute the `/research` command.
8
8
 
9
9
  ## Template
10
10
 
@@ -18,7 +18,7 @@ Conduct deep research on a topic before planning implementation.
18
18
 
19
19
  1. **Identify research questions** from spec or user request
20
20
 
21
- 2. **Delegate to Scout Agent** with:
21
+ 2. **Run focused external research** with:
22
22
  - Question to research
23
23
  - Constraints (language, framework, versions)
24
24
  - Format: summary | comparison | deep-dive
@@ -30,7 +30,7 @@ Conduct deep research on a topic before planning implementation.
30
30
 
31
31
  ## Research Request Format
32
32
 
33
- When delegating, use:
33
+ Use this request schema:
34
34
  ```yaml
35
35
  type: "research"
36
36
  question: "[Research question]"
@@ -98,6 +98,6 @@ bead_id: [optional]
98
98
  - `mcp__context7__*` — Library documentation
99
99
  - `mcp__exa__*` — Code examples, recent content
100
100
  - `mcp__gh_grep__searchGitHub` — Real-world code patterns
101
- - `librarian` — Deep repository analysis
101
+ - `web_search` + source links Cross-check and evidence gathering
102
102
 
103
103
  Identify the research questions from the user's request or the active spec, then begin research immediately.
package/command/ship.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Ship completed work. Final verification, PR creation, and cleanup.
2
+ description: Ship completed work. Enforce verify gate, create PR, and cleanup.
3
3
  agent: build
4
4
  ---
5
5
 
@@ -7,103 +7,95 @@ You are the **Build Agent**. Execute the `/ship` command.
7
7
 
8
8
  ## Your Task
9
9
 
10
- Finalize and ship the current work run all verification gates, create a PR, and clean up.
10
+ Finalize and ship the current work only after `/verify` passes with a ship-ready verdict.
11
11
 
12
12
  ## Process
13
13
 
14
- ### 1. Pre-Ship Verification
14
+ ### 1. Enforce Verify Gate (Mandatory)
15
15
 
16
- Run ALL hard gates before shipping:
16
+ Run `/verify` first and require:
17
+ - Overall Verdict: `PASS`
18
+ - Ship Recommendation: `SHIP_READY`
19
+ - No `Critical` or `High` findings
17
20
 
18
- ```bash
19
- # Type checking
20
- pnpm typecheck || npm run typecheck || yarn typecheck
21
-
22
- # Tests
23
- pnpm test || npm test || yarn test
24
-
25
- # Linting
26
- pnpm lint || npm run lint || yarn lint
27
-
28
- # Build
29
- pnpm build || npm run build || yarn build
30
- ```
31
-
32
- If ANY gate fails, stop and fix before continuing.
21
+ If `/verify` returns `FAIL`, `CHANGES_REQUIRED`, or `BLOCKED`:
22
+ - Stop shipping
23
+ - Present required fixes
24
+ - Ask user whether to fix now
33
25
 
34
- ### 2. Self-Review
26
+ ### 2. Final Self-Review
35
27
 
36
28
  Before creating PR:
37
- - Review all changed files (`git diff main`)
38
- - Check for debug code, console.logs, TODOs
39
- - Verify acceptance criteria from spec.md
40
- - Ensure no files outside plan's file impact were changed
29
+ - Review changed files (`git diff --name-only` and `git diff`)
30
+ - Confirm acceptance criteria from spec/plan are satisfied
31
+ - Confirm no debug artifacts (`console.log`, `TODO`, temporary hacks)
32
+ - Confirm changes stay within planned file impact
41
33
 
42
- ### 3. Request Review (Optional)
34
+ ### 3. Optional Formal Review
43
35
 
44
- Delegate to Review Agent for formal review:
45
- - Pass changed files list
46
- - Pass spec.md and plan.md references
47
- - Wait for verdict
48
-
49
- If verdict is `changes_required`, fix issues before continuing.
50
- If verdict is `blocked`, escalate to user.
36
+ If requested, run `/review` and apply verdict:
37
+ - `approved` continue
38
+ - `changes_required` stop and fix first
39
+ - `blocked` escalate to user
51
40
 
52
41
  ### 4. Git Preparation
53
42
 
54
43
  ```bash
55
- # Ensure clean state
44
+ # Ensure clean understanding of local state
56
45
  git status
57
46
 
58
- # Stage changes
59
- git add -A
47
+ # Stage only files related to this work (never blanket add)
48
+ git add <explicit-file-list>
60
49
 
61
- # Create commit with conventional format
50
+ # Commit using conventional format
62
51
  git commit -m "type(scope): description"
63
52
  ```
64
53
 
65
54
  ### 5. Create PR
66
55
 
67
- Delegate to `/pr` command flow:
68
- - Generate comprehensive PR description
69
- - Link spec, plan, review artifacts
56
+ Use `/pr` flow:
57
+ - Generate complete PR description
58
+ - Link spec, plan, verify, and review artifacts
70
59
  - Create PR via `gh pr create`
71
60
 
72
61
  ### 6. Post-Ship Cleanup
73
62
 
74
- - Update bead status to `done` or `validating`
75
- - Create handoff document for tracking
76
- - Report PR URL to user
63
+ - Update bead/task status
64
+ - Create handoff note if needed
65
+ - Report PR URL + final ship summary to user
77
66
 
78
67
  ## Ship Checklist
79
68
 
80
69
  ```
81
- Pre-Ship:
82
- - [ ] Typecheck passes
83
- - [ ] All tests pass
84
- - [ ] Lint passes
85
- - [ ] Build succeeds
70
+ Verify Gate:
71
+ - [ ] /verify executed
72
+ - [ ] Overall Verdict = PASS
73
+ - [ ] Ship Recommendation = SHIP_READY
74
+ - [ ] No Critical/High findings
75
+
76
+ Pre-PR:
86
77
  - [ ] Self-review completed
78
+ - [ ] Acceptance criteria verified
87
79
  - [ ] No debug/temporary code
88
80
 
89
81
  Ship:
90
- - [ ] Changes committed
91
- - [ ] PR created with full description
92
- - [ ] Artifacts linked
82
+ - [ ] Relevant files staged explicitly
83
+ - [ ] Commit created
84
+ - [ ] PR created with linked artifacts
93
85
 
94
86
  Post-Ship:
95
- - [ ] Bead status updated
87
+ - [ ] Status updated
96
88
  - [ ] PR URL reported
97
89
  ```
98
90
 
99
91
  ## Rules
100
92
 
101
- - ✅ ALWAYS run full verification before shipping
102
- - ✅ ALWAYS self-review changes
103
- - ✅ ALWAYS create proper commit messages
104
- - ✅ ALWAYS link artifacts in PR
105
- - ❌ NEVER ship with failing tests
106
- - ❌ NEVER ship without verification
107
- - ❌ NEVER skip self-review
93
+ - ✅ ALWAYS run `/verify` before shipping
94
+ - ✅ ALWAYS block ship when verify is not ship-ready
95
+ - ✅ ALWAYS stage explicit files only
96
+ - ✅ ALWAYS include verification artifacts in PR
97
+ - ❌ NEVER ship with failing gates
98
+ - ❌ NEVER bypass verify verdict
99
+ - ❌ NEVER use `git add -A` or `git add .`
108
100
 
109
- Now, let me verify and ship your work...
101
+ Now, enforcing verify gate before ship...