clikit-plugin 0.2.28 → 0.2.29
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.
- package/AGENTS.md +30 -32
- package/README.md +25 -20
- package/command/create.md +37 -122
- package/command/handoff.md +45 -69
- package/command/init.md +125 -48
- package/command/plan.md +101 -159
- package/command/research.md +1 -1
- package/command/resume.md +34 -55
- package/command/vision.md +132 -64
- package/dist/.tsbuildinfo +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/cli.js +7 -1
- package/dist/clikit.schema.json +245 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/config.d.ts +43 -43
- package/dist/config.d.ts.map +1 -1
- package/dist/hooks/git-guard.test.d.ts +2 -0
- package/dist/hooks/git-guard.test.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -14
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/memory-digest.d.ts +27 -0
- package/dist/hooks/memory-digest.d.ts.map +1 -0
- package/dist/hooks/security-check.test.d.ts +2 -0
- package/dist/hooks/security-check.test.d.ts.map +1 -0
- package/dist/hooks/todo-beads-sync.d.ts +23 -0
- package/dist/hooks/todo-beads-sync.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +658 -902
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/tools/beads-memory-sync.d.ts.map +1 -1
- package/dist/tools/context-summary.d.ts.map +1 -1
- package/dist/tools/memory-db.d.ts +12 -0
- package/dist/tools/memory-db.d.ts.map +1 -0
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/observation.d.ts.map +1 -1
- package/memory/_templates/plan.md +18 -0
- package/package.json +6 -3
- package/src/agents/AGENTS.md +11 -39
- package/src/agents/build.md +152 -94
- package/src/agents/index.ts +31 -5
- package/src/agents/looker.md +5 -0
- package/src/agents/oracle.md +2 -0
- package/src/agents/plan.md +247 -44
- package/src/agents/review.md +1 -0
- package/src/agents/vision.md +251 -115
- package/dist/cli.test.d.ts +0 -2
- package/dist/cli.test.d.ts.map +0 -1
- package/dist/hooks/auto-format.d.ts +0 -30
- package/dist/hooks/auto-format.d.ts.map +0 -1
- package/dist/hooks/comment-checker.d.ts +0 -17
- package/dist/hooks/comment-checker.d.ts.map +0 -1
- package/dist/hooks/compaction.d.ts +0 -60
- package/dist/hooks/compaction.d.ts.map +0 -1
- package/dist/hooks/env-context.d.ts +0 -43
- package/dist/hooks/env-context.d.ts.map +0 -1
- package/dist/hooks/ritual-enforcer.d.ts +0 -29
- package/dist/hooks/ritual-enforcer.d.ts.map +0 -1
- package/dist/hooks/session-notification.d.ts +0 -23
- package/dist/hooks/session-notification.d.ts.map +0 -1
- package/dist/hooks/session-notification.test.d.ts +0 -2
- package/dist/hooks/session-notification.test.d.ts.map +0 -1
- package/dist/hooks/typecheck-gate.d.ts +0 -31
- package/dist/hooks/typecheck-gate.d.ts.map +0 -1
- package/memory/handoffs/2026-02-15-complete-audit.md +0 -136
- package/memory/handoffs/2026-02-15-complete-fix.md +0 -140
- package/memory/handoffs/2026-02-15-importmeta-fix.md +0 -121
- package/memory/handoffs/2026-02-15-installing.md +0 -90
- package/memory/handoffs/2026-02-15-plugin-install-fix.md +0 -140
- package/memory/handoffs/2026-02-15-runtime-fixes.md +0 -80
- package/memory/plans/2026-02-16-plugin-install.md +0 -195
- package/memory/research/2026-02-16-opencode-plugin-alignment.md +0 -128
package/AGENTS.md
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
# CliKit
|
|
2
2
|
|
|
3
|
-
OpenCode plugin
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
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 |
|
|
3
|
+
An OpenCode plugin that provides agents, commands, skills, hooks, and a memory system for AI-assisted development. Built with TypeScript and Bun.
|
|
4
|
+
|
|
5
|
+
## How It Works
|
|
6
|
+
|
|
7
|
+
The plugin (`src/index.ts`) loads agents from `src/agents/*.md`, commands from `command/*.md`, and skills from `skill/*/SKILL.md`. Runtime hooks in `src/hooks/` intercept tool execution for safety (git guard, security scan) and quality (typecheck, formatting). Configuration lives in `clikit.config.json`.
|
|
19
8
|
|
|
20
9
|
## Workflow
|
|
21
10
|
|
|
@@ -23,24 +12,33 @@ OpenCode plugin with 10 agents, 19 commands, 48 skills, 14 hooks.
|
|
|
23
12
|
/create → /plan → /start → /verify → /ship
|
|
24
13
|
```
|
|
25
14
|
|
|
26
|
-
|
|
15
|
+
Always verify before claiming done. Run typecheck + lint + test before commit.
|
|
27
16
|
|
|
28
|
-
|
|
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
|
|
17
|
+
## Where to Find Things
|
|
33
18
|
|
|
34
|
-
|
|
19
|
+
- **Agent behavior**: Read the specific agent's `.md` file in `src/agents/` — each has full instructions in its prompt.
|
|
20
|
+
- **Commands**: `command/*.md` — each slash command's template and instructions.
|
|
21
|
+
- **Skills**: `skill/*/SKILL.md` — load relevant skills before tasks. List available skills with `ls skill/`.
|
|
22
|
+
- **Schemas**: `@.opencode/schemas.md` — canonical schemas for tasks, beads, delegation, artifacts.
|
|
23
|
+
- **Templates**: `memory/_templates/*.md` — templates for specs, plans, research, reviews, handoffs, PRDs.
|
|
24
|
+
- **Memory**: `memory/_digest.md` (auto-generated from SQLite observations on session start), plus `memory/specs/`, `memory/plans/`, `memory/research/`, `memory/handoffs/`.
|
|
25
|
+
- **Config**: `clikit.config.json` — enable/disable agents, hooks, override models.
|
|
26
|
+
- **Full docs**: `@.opencode/README.md` — complete reference for all agents, commands, skills, hooks, and config options.
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
## Development
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bun install # dependencies
|
|
32
|
+
bun run build # compile plugin
|
|
33
|
+
bun run typecheck # type check
|
|
34
|
+
bun run dev # watch mode
|
|
35
|
+
```
|
|
39
36
|
|
|
40
|
-
##
|
|
37
|
+
## Key Conventions
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
39
|
+
- Plugin entrypoint: `src/index.ts`
|
|
40
|
+
- Agents are parsed from markdown frontmatter (gray-matter): `src/agents/index.ts`
|
|
41
|
+
- Commands are parsed the same way: `src/commands/index.ts`
|
|
42
|
+
- Hooks export from `src/hooks/index.ts`, wired in `src/index.ts` event handlers
|
|
43
|
+
- Memory tools in `src/tools/` are library code used by hooks, not registered as agent tools
|
|
44
|
+
- Never force push without `--force-with-lease`
|
package/README.md
CHANGED
|
@@ -7,10 +7,9 @@ Curated agents, commands, skills, and memory system for OpenCode.
|
|
|
7
7
|
- **10 Specialized Agents**: build, general, oracle, librarian, explore, looker, plan, review, scout, vision
|
|
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
|
|
11
|
-
- **
|
|
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
|
|
12
12
|
- **Memory System**: Templates, specs, plans, research artifacts with FTS5 search
|
|
13
|
-
- **Ritual Workflow**: Enforces DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE phases
|
|
14
13
|
- **Extended Permissions**: doom_loop, external_directory controls
|
|
15
14
|
- **Configurable**: Enable/disable agents, override models, customize behavior
|
|
16
15
|
|
|
@@ -51,6 +50,11 @@ Project config overrides user config.
|
|
|
51
50
|
"$schema": "https://unpkg.com/clikit-plugin/schema.json",
|
|
52
51
|
"disabled_agents": ["scout"],
|
|
53
52
|
"disabled_commands": ["security"],
|
|
53
|
+
"disabled_skills": ["playwright"],
|
|
54
|
+
"skills": {
|
|
55
|
+
"enable": ["test-driven-development", "systematic-debugging"],
|
|
56
|
+
"disable": ["sharing-skills"]
|
|
57
|
+
},
|
|
54
58
|
"agents": {
|
|
55
59
|
"oracle": {
|
|
56
60
|
"model": "openai/gpt-4o"
|
|
@@ -65,21 +69,17 @@ Project config overrides user config.
|
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
71
|
"hooks": {
|
|
68
|
-
"session_logging":
|
|
72
|
+
"session_logging": false,
|
|
69
73
|
"tool_logging": false,
|
|
70
74
|
"todo_enforcer": { "enabled": true },
|
|
71
75
|
"empty_message_sanitizer": { "enabled": true },
|
|
72
76
|
"git_guard": { "enabled": true },
|
|
73
77
|
"security_check": { "enabled": true },
|
|
74
78
|
"subagent_question_blocker": { "enabled": true },
|
|
75
|
-
"comment_checker": { "enabled": true, "threshold": 0.3 },
|
|
76
|
-
"env_context": { "enabled": true },
|
|
77
|
-
"auto_format": { "enabled": false },
|
|
78
|
-
"typecheck_gate": { "enabled": false },
|
|
79
|
-
"session_notification": { "enabled": true },
|
|
80
79
|
"truncator": { "enabled": true },
|
|
81
|
-
"
|
|
82
|
-
"
|
|
80
|
+
"swarm_enforcer": { "enabled": true },
|
|
81
|
+
"memory_digest": { "enabled": true },
|
|
82
|
+
"todo_beads_sync": { "enabled": true }
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
```
|
|
@@ -90,9 +90,11 @@ Project config overrides user config.
|
|
|
90
90
|
|--------|------|---------|-------------|
|
|
91
91
|
| `disabled_agents` | `string[]` | `[]` | Agent names to disable |
|
|
92
92
|
| `disabled_commands` | `string[]` | `[]` | Command names to disable |
|
|
93
|
+
| `disabled_skills` | `string[]` | `[]` | Skill names to disable |
|
|
93
94
|
| `agents` | `object` | `{}` | Per-agent overrides (model, temperature, etc.) |
|
|
94
95
|
| `commands` | `object` | `{}` | Per-command overrides |
|
|
95
|
-
| `
|
|
96
|
+
| `skills` | `object \| string[]` | `{}` | Skill enable/disable and per-skill overrides |
|
|
97
|
+
| `hooks.session_logging` | `boolean` | `false` | Session lifecycle logging |
|
|
96
98
|
| `hooks.tool_logging` | `boolean` | `false` | Tool execution logging |
|
|
97
99
|
|
|
98
100
|
### Hooks
|
|
@@ -104,14 +106,10 @@ Project config overrides user config.
|
|
|
104
106
|
| `git_guard` | on | Blocks dangerous git commands (force push, hard reset, rm -rf) |
|
|
105
107
|
| `security_check` | on | Scans for secrets/credentials before git commits |
|
|
106
108
|
| `subagent_question_blocker` | on | Prevents subagents from asking clarifying questions |
|
|
107
|
-
| `comment_checker` | on | Detects excessive AI-generated comments in code |
|
|
108
|
-
| `env_context` | on | Injects git branch, package info, project structure |
|
|
109
|
-
| `auto_format` | **off** | Runs prettier/biome/dprint after file edits |
|
|
110
|
-
| `typecheck_gate` | **off** | Runs tsc after TypeScript file edits |
|
|
111
|
-
| `session_notification` | on | Desktop notifications on idle/error (Linux/macOS/Windows) |
|
|
112
109
|
| `truncator` | on | Truncates large outputs to prevent context overflow |
|
|
113
|
-
| `compaction` | on | Preserves beads state + memory during context compaction |
|
|
114
110
|
| `swarm_enforcer` | on | Enforces task isolation in multi-agent swarms |
|
|
111
|
+
| `memory_digest` | on | Generates `memory/_digest.md` from SQLite observations |
|
|
112
|
+
| `todo_beads_sync` | on | Mirrors OpenCode todos into Beads issues |
|
|
115
113
|
|
|
116
114
|
## Agents
|
|
117
115
|
|
|
@@ -154,7 +152,7 @@ Run with `/command-name` in OpenCode:
|
|
|
154
152
|
|
|
155
153
|
## Skills
|
|
156
154
|
|
|
157
|
-
|
|
155
|
+
48 workflow skills organized into 8 categories:
|
|
158
156
|
|
|
159
157
|
### Design & Planning (4)
|
|
160
158
|
| Skill | Use When |
|
|
@@ -247,6 +245,12 @@ bun run build
|
|
|
247
245
|
# Type check
|
|
248
246
|
bun run typecheck
|
|
249
247
|
|
|
248
|
+
# Unit tests
|
|
249
|
+
bun run test
|
|
250
|
+
|
|
251
|
+
# Full local verification
|
|
252
|
+
bun run verify
|
|
253
|
+
|
|
250
254
|
# Watch mode
|
|
251
255
|
bun run dev
|
|
252
256
|
```
|
|
@@ -261,7 +265,8 @@ bun run dev
|
|
|
261
265
|
│ ├── types.ts # Type definitions
|
|
262
266
|
│ ├── agents/ # Agent loaders
|
|
263
267
|
│ ├── skills/ # Skill loaders
|
|
264
|
-
│
|
|
268
|
+
│ ├── tools/ # Internal utilities (memory, swarm, etc.)
|
|
269
|
+
│ └── hooks/ # Runtime hooks (10 modules)
|
|
265
270
|
├── skill/ # Skill definitions (*.md)
|
|
266
271
|
├── command/ # Command definitions (*.md)
|
|
267
272
|
├── memory/ # Memory system
|
package/command/create.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Start a new bead.
|
|
2
|
+
description: Start a new bead. Explore codebase, gather requirements, create specification.
|
|
3
3
|
agent: plan
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,142 +9,57 @@ You are the **Plan Agent**. Execute the `/create` command.
|
|
|
9
9
|
|
|
10
10
|
Use template at: `@.opencode/memory/_templates/spec.md`
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Execution Rules
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- **DO NOT** start with generic questions — explore the codebase FIRST
|
|
15
|
+
- **DO NOT** end turns passively — always end with a specific question or action
|
|
16
|
+
- Auto-transition to spec generation when self-clearance passes
|
|
15
17
|
|
|
16
18
|
## Process
|
|
17
19
|
|
|
18
|
-
1.
|
|
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?
|
|
20
|
+
### 1. Proactive Exploration (BEFORE asking questions)
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
Fire Explore agents in parallel immediately:
|
|
23
|
+
- Find similar implementations, patterns, and conventions in the codebase
|
|
24
|
+
- Find test infrastructure (framework, coverage, examples)
|
|
25
|
+
- Find related code that this feature will integrate with
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
### 2. Informed Interview
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Use exploration results to ask SPECIFIC questions across 5 dimensions:
|
|
30
|
+
- **Problem & Context** — Why is this needed? (reference what you found in codebase)
|
|
31
|
+
- **Outcomes** — What measurable changes?
|
|
32
|
+
- **Scope** — In/out boundaries? (suggest based on codebase patterns)
|
|
33
|
+
- **Users** — Primary/secondary users?
|
|
34
|
+
- **Constraints** — Technical, business, timeline?
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
Max 3 questions per turn. Update draft after each exchange.
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
### 3. Self-Clearance Check
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
When ALL of these are true, auto-transition to spec generation:
|
|
41
|
+
- Core problem understood and confirmed
|
|
42
|
+
- Scope boundaries defined
|
|
43
|
+
- Enough info for acceptance criteria
|
|
44
|
+
- Codebase patterns identified
|
|
45
|
+
- No critical open questions
|
|
37
46
|
|
|
38
|
-
|
|
39
|
-
**Author:** [Name]
|
|
40
|
-
**Status:** Draft | Confirmed
|
|
41
|
-
**bead_id:** [ID]
|
|
47
|
+
### 4. Generate Spec
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## Problem & Context
|
|
46
|
-
|
|
47
|
-
### Problem Statement
|
|
48
|
-
[Why is this needed?]
|
|
49
|
+
Write to `.opencode/memory/specs/YYYY-MM-DD-<descriptor>.md` using full template structure.
|
|
49
50
|
|
|
50
|
-
|
|
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
|
-
---
|
|
51
|
+
**Acceptance criteria MUST be agent-executable** — commands with expected outputs, not "user manually verifies."
|
|
70
52
|
|
|
71
|
-
|
|
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
|
-
---
|
|
53
|
+
### 5. Create Bead
|
|
96
54
|
|
|
97
|
-
|
|
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
|
-
```
|
|
55
|
+
Call `mcp__beads_village__add()` with title, description, and priority.
|
|
140
56
|
|
|
141
57
|
## Rules
|
|
142
58
|
|
|
143
|
-
- ✅
|
|
144
|
-
- ✅
|
|
145
|
-
- ✅
|
|
146
|
-
- ✅
|
|
147
|
-
-
|
|
148
|
-
- ❌ NEVER skip
|
|
149
|
-
|
|
150
|
-
Now, ask the user about their goal/idea to begin the interview process.
|
|
59
|
+
- ✅ Explore codebase BEFORE asking user questions
|
|
60
|
+
- ✅ Write agent-executable acceptance criteria
|
|
61
|
+
- ✅ Tag assumptions as Confirmed/Unconfirmed
|
|
62
|
+
- ✅ Auto-transition when clearance check passes
|
|
63
|
+
- ❌ NEVER ask generic questions without codebase context
|
|
64
|
+
- ❌ NEVER skip acceptance criteria
|
|
65
|
+
- ❌ NEVER end passively — always question or action
|
package/command/handoff.md
CHANGED
|
@@ -1,95 +1,71 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Save state for session break.
|
|
3
|
-
agent:
|
|
2
|
+
description: Save state for session break. Auto-gathers context and writes handoff immediately.
|
|
3
|
+
agent: build
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are the **
|
|
6
|
+
You are the **Build Agent**. Execute the `/handoff` command **immediately without asking for confirmation**.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Execution Rules
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
- **DO NOT** ask the user any questions
|
|
11
|
+
- **DO NOT** wait for confirmation
|
|
12
|
+
- **DO NOT** present a plan before acting
|
|
13
|
+
- Gather all state automatically and write the handoff document in one shot
|
|
11
14
|
|
|
12
|
-
##
|
|
15
|
+
## Process (execute all steps silently)
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
### 1. Auto-Gather State
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
Run these in parallel:
|
|
20
|
+
- `git branch --show-current` — current branch
|
|
21
|
+
- `git log --oneline -5` — recent commits
|
|
22
|
+
- `git status --short` — uncommitted changes
|
|
23
|
+
- `git diff --stat` — what changed
|
|
24
|
+
- Check `.opencode/memory/plans/` for active plan
|
|
25
|
+
- Check `.opencode/memory/specs/` for active spec
|
|
26
|
+
- Check ritual state if exists
|
|
17
27
|
|
|
18
|
-
|
|
19
|
-
- Which phase are we in? (spec'd, researched, planned, implementing, validating)
|
|
20
|
-
- What tasks are completed/in-progress/blocked?
|
|
21
|
-
- What files have been modified?
|
|
28
|
+
### 2. Write Handoff
|
|
22
29
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
3. **Update bead metadata** with handoff reference
|
|
26
|
-
|
|
27
|
-
## Handoff Template
|
|
30
|
+
Create `.opencode/memory/handoffs/YYYY-MM-DD-handoff.md` with this structure:
|
|
28
31
|
|
|
29
32
|
```markdown
|
|
30
33
|
---
|
|
31
34
|
date: YYYY-MM-DD
|
|
32
|
-
phase:
|
|
33
|
-
branch:
|
|
34
|
-
bead_id: [optional]
|
|
35
|
+
phase: discover | plan | implement | verify | complete
|
|
36
|
+
branch: <branch>
|
|
35
37
|
---
|
|
36
38
|
|
|
37
|
-
# Handoff:
|
|
38
|
-
|
|
39
|
-
## Status Summary
|
|
40
|
-
[2-5 sentences describing current state]
|
|
41
|
-
|
|
42
|
-
## Artifacts
|
|
43
|
-
|
|
44
|
-
| Type | Path | Status |
|
|
45
|
-
|------|------|--------|
|
|
46
|
-
| Spec | `.opencode/memory/specs/YYYY-MM-DD-descriptor.md` | ✅ Complete |
|
|
47
|
-
| Plan | `.opencode/memory/plans/YYYY-MM-DD-feature.md` | ✅ Complete |
|
|
48
|
-
| Research | `.opencode/memory/research/YYYY-MM-DD-topic.md` | 📚 Reference |
|
|
39
|
+
# Handoff: <what we were working on>
|
|
49
40
|
|
|
50
|
-
##
|
|
41
|
+
## What Was Done
|
|
42
|
+
<2-3 bullet points of concrete accomplishments>
|
|
51
43
|
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
44
|
+
## Current State
|
|
45
|
+
- Branch: `<branch>`
|
|
46
|
+
- Last commit: `<hash>` — <message>
|
|
47
|
+
- Uncommitted: <yes/no, list if yes>
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
- **Next step:** [What to do next]
|
|
49
|
+
## Active Artifacts
|
|
50
|
+
- Spec: `<path>` (if exists)
|
|
51
|
+
- Plan: `<path>` (if exists)
|
|
60
52
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
## What To Do Next
|
|
54
|
+
1. <immediate next action — be specific>
|
|
55
|
+
2. <following action>
|
|
56
|
+
3. <after that>
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
## Files Modified
|
|
69
|
-
| File | Status | Notes |
|
|
70
|
-
|------|--------|-------|
|
|
71
|
-
| path/to/file.ts | Modified | [Brief note] |
|
|
72
|
-
|
|
73
|
-
## Git State
|
|
74
|
-
- **Branch:** [branch name]
|
|
75
|
-
- **Last commit:** [hash] - [message]
|
|
76
|
-
- **Uncommitted changes:** Yes/No
|
|
77
|
-
|
|
78
|
-
## Known Issues
|
|
79
|
-
- [Issue 1]
|
|
58
|
+
## Key Context
|
|
59
|
+
<1-3 sentences of critical context the next session must know — decisions made, gotchas, things that didn't work>
|
|
60
|
+
```
|
|
80
61
|
|
|
81
|
-
|
|
82
|
-
1. [Next action 1]
|
|
83
|
-
2. [Next action 2]
|
|
62
|
+
### 3. Confirm Completion
|
|
84
63
|
|
|
85
|
-
|
|
86
|
-
|
|
64
|
+
After writing, output a single line:
|
|
65
|
+
```
|
|
66
|
+
✅ Handoff saved to .opencode/memory/handoffs/<filename>. Resume with /resume.
|
|
87
67
|
```
|
|
88
68
|
|
|
89
|
-
##
|
|
90
|
-
- Include all relevant artifact paths
|
|
91
|
-
- Be specific about what's done vs what's remaining
|
|
92
|
-
- Note any blockers or issues
|
|
93
|
-
- Provide clear next steps
|
|
69
|
+
## Philosophy
|
|
94
70
|
|
|
95
|
-
|
|
71
|
+
Inspired by Amp's handoff: focus on **what needs to be done next**, not exhaustive history. Keep it short — a future agent should understand the situation in 30 seconds. The handoff is a launchpad, not a journal.
|