@automagik/genie 0.260202.1833 → 0.260203.43
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/.beads/README.md +81 -0
- package/.beads/config.yaml +67 -0
- package/.beads/interactions.jsonl +0 -0
- package/.beads/issues.jsonl +9 -0
- package/.beads/metadata.json +4 -0
- package/.claude/skills/brainstorm/SKILL.md +53 -0
- package/.claude/skills/genie-base/SKILL.md +66 -0
- package/.claude/skills/genie-base/assets/workspace/AGENTS.md +191 -0
- package/.claude/skills/genie-base/assets/workspace/ENVIRONMENT.md +18 -0
- package/.claude/skills/genie-base/assets/workspace/HEARTBEAT.md +4 -0
- package/.claude/skills/genie-base/assets/workspace/IDENTITY.md +17 -0
- package/.claude/skills/genie-base/assets/workspace/MEMORY.md +16 -0
- package/.claude/skills/genie-base/assets/workspace/ROLE.md +14 -0
- package/.claude/skills/genie-base/assets/workspace/SOUL.md +36 -0
- package/.claude/skills/genie-base/assets/workspace/TOOLS.md +25 -0
- package/.claude/skills/genie-base/assets/workspace/USER.md +13 -0
- package/.claude/skills/genie-base/assets/workspace/memory/2026-01-30.md +6 -0
- package/.claude/skills/genie-base/assets/workspace/memory/2026-01-31.md +16 -0
- package/.claude/skills/genie-base/assets/workspace/memory/882c22be-9710-41c1-91f8-ed82947ef6ce.txt +1 -0
- package/.claude/skills/genie-base/scripts/install-workspace.sh +107 -0
- package/.claude/skills/genie-base/scripts/sanity-sweep.sh +60 -0
- package/.claude/skills/genie-blank-init/SKILL.md +37 -0
- package/.claude/skills/genie-blank-init/assets/BOOTSTRAP.md +44 -0
- package/.claude/skills/genie-blank-init/assets/IDENTITY.md +9 -0
- package/.claude/skills/genie-blank-init/assets/SOUL.md +10 -0
- package/.claude/skills/genie-blank-init/assets/USER.md +9 -0
- package/.claude/skills/genie-blank-init/scripts/apply-blank-init.sh +117 -0
- package/.claude/skills/genie-forge/SKILL.md +171 -0
- package/.claude/skills/genie-plan-review/CLAUDE.md +11 -0
- package/.claude/skills/genie-plan-review/SKILL.md +53 -0
- package/.claude/skills/genie-review/SKILL.md +171 -0
- package/.claude/skills/genie-wish/SKILL.md +141 -0
- package/.claude-plugin/marketplace.json +18 -0
- package/.genie/.gitkeep +3 -0
- package/.genie/backlog/hooks-v2.md +82 -0
- package/.genie/wishes/upgrade-brainstorm-handoff/wish.md +124 -0
- package/.gitattributes +3 -0
- package/AGENTS.md +75 -0
- package/bun.lock +55 -0
- package/dist/claudio.js +1 -1
- package/dist/genie.js +1 -1
- package/dist/term.js +123 -99
- package/docs/CO-ORCHESTRATION-GUIDE.md +368 -0
- package/package.json +5 -1
- package/plugin/.claude-plugin/plugin.json +18 -0
- package/plugin/README.md +120 -0
- package/plugin/agents/implementor.md +92 -0
- package/plugin/agents/quality-reviewer.md +113 -0
- package/plugin/agents/spec-reviewer.md +90 -0
- package/plugin/hooks/hooks.json +3 -0
- package/plugin/references/review-criteria.md +72 -0
- package/plugin/references/wish-template.md +92 -0
- package/plugin/scripts/genie.cjs +141 -0
- package/plugin/scripts/smart-install.js +308 -0
- package/plugin/scripts/src/install-genie-cli.sh +120 -0
- package/plugin/scripts/src/validate-completion.ts +142 -0
- package/plugin/scripts/src/validate-wish.ts +137 -0
- package/plugin/scripts/term.cjs +229 -0
- package/plugin/scripts/validate-completion.cjs +16 -0
- package/plugin/scripts/validate-wish.cjs +17 -0
- package/plugin/scripts/worker-service.cjs +28 -0
- package/plugin/skills/brainstorm/SKILL.md +106 -0
- package/plugin/skills/forge/SKILL.md +171 -0
- package/plugin/skills/genie-base/SKILL.md +99 -0
- package/plugin/skills/genie-base/assets/workspace/AGENTS.md +191 -0
- package/plugin/skills/genie-base/assets/workspace/ENVIRONMENT.md +18 -0
- package/plugin/skills/genie-base/assets/workspace/HEARTBEAT.md +4 -0
- package/plugin/skills/genie-base/assets/workspace/IDENTITY.md +17 -0
- package/plugin/skills/genie-base/assets/workspace/MEMORY.md +16 -0
- package/plugin/skills/genie-base/assets/workspace/ROLE.md +14 -0
- package/plugin/skills/genie-base/assets/workspace/SOUL.md +36 -0
- package/plugin/skills/genie-base/assets/workspace/TOOLS.md +25 -0
- package/plugin/skills/genie-base/assets/workspace/USER.md +13 -0
- package/plugin/skills/genie-base/scripts/install-workspace.sh +107 -0
- package/plugin/skills/genie-base/scripts/sanity-sweep.sh +60 -0
- package/plugin/skills/genie-blank-init/SKILL.md +73 -0
- package/plugin/skills/genie-blank-init/assets/BOOTSTRAP.md +44 -0
- package/plugin/skills/genie-blank-init/assets/IDENTITY.md +9 -0
- package/plugin/skills/genie-blank-init/assets/SOUL.md +10 -0
- package/plugin/skills/genie-blank-init/assets/USER.md +9 -0
- package/plugin/skills/genie-blank-init/scripts/apply-blank-init.sh +117 -0
- package/plugin/skills/genie-cli-dev/CLAUDE.md +19 -0
- package/plugin/skills/genie-cli-dev/SKILL.md +292 -0
- package/plugin/skills/plan-review/SKILL.md +101 -0
- package/plugin/skills/review/SKILL.md +221 -0
- package/plugin/skills/wish/SKILL.md +110 -0
- package/plugin/skills/work-orchestration/SKILL.md +110 -0
- package/scripts/build.js +132 -0
- package/scripts/smart-install.js +308 -0
- package/scripts/sync.js +134 -0
- package/src/lib/beads-registry.ts +595 -0
- package/src/lib/orchestrator/event-monitor.ts +2 -0
- package/src/lib/skill-loader.ts +215 -0
- package/src/lib/tmux.ts +30 -11
- package/src/lib/version.ts +1 -1
- package/src/lib/worker-registry.ts +10 -0
- package/src/services/worker-service.ts +351 -0
- package/src/term-commands/close.ts +48 -3
- package/src/term-commands/create.ts +95 -0
- package/src/term-commands/daemon.ts +176 -0
- package/src/term-commands/kill.ts +56 -2
- package/src/term-commands/orchestrate.ts +3 -2
- package/src/term-commands/send.ts +43 -15
- package/src/term-commands/spawn.ts +446 -0
- package/src/term-commands/split.ts +20 -8
- package/src/term-commands/work.ts +279 -37
- package/src/term-commands/workers.ts +36 -2
- package/src/term.ts +120 -7
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
# Co-Orchestration Guide: AI-Human Software Development
|
|
2
|
+
|
|
3
|
+
This guide explains how to use genie-cli's worker orchestration system for collaborative software development between humans and AI agents.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The system enables multiple Claude agents to work on different tasks simultaneously, each in isolated git worktrees, while a human orchestrates and reviews their work. All state is tracked in beads for unified visibility.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Human (Orchestrator)
|
|
11
|
+
│
|
|
12
|
+
├── term work bd-1 ──▶ Worker 1 (Claude in pane %1)
|
|
13
|
+
│ └── worktree: .worktrees/bd-1/
|
|
14
|
+
│
|
|
15
|
+
├── term work bd-2 ──▶ Worker 2 (Claude in pane %2)
|
|
16
|
+
│ └── worktree: .worktrees/bd-2/
|
|
17
|
+
│
|
|
18
|
+
└── term workers ──▶ Status dashboard
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
1. **tmux session**: You must be in a tmux session
|
|
24
|
+
2. **beads initialized**: Run `bd init` in your repo if not already done
|
|
25
|
+
3. **Claude CLI**: The `claude` command must be available
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# 1. Start the beads daemon for auto-sync
|
|
31
|
+
term daemon start
|
|
32
|
+
|
|
33
|
+
# 2. Create issues to work on
|
|
34
|
+
bd create "Implement user authentication"
|
|
35
|
+
bd create "Add unit tests for auth module"
|
|
36
|
+
bd create "Update API documentation"
|
|
37
|
+
|
|
38
|
+
# 3. Start a worker on the first issue
|
|
39
|
+
term work bd-1
|
|
40
|
+
|
|
41
|
+
# 4. Check worker status
|
|
42
|
+
term workers
|
|
43
|
+
|
|
44
|
+
# 5. When worker needs approval
|
|
45
|
+
term approve bd-1
|
|
46
|
+
|
|
47
|
+
# 6. When done, close the issue
|
|
48
|
+
term close bd-1
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Detailed Workflow
|
|
52
|
+
|
|
53
|
+
### Phase 1: Planning & Issue Creation
|
|
54
|
+
|
|
55
|
+
Before spawning workers, create well-defined issues in beads:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Create issues with clear titles
|
|
59
|
+
bd create "Add login endpoint with JWT tokens"
|
|
60
|
+
bd create "Create user registration form"
|
|
61
|
+
bd create "Write integration tests for auth flow"
|
|
62
|
+
|
|
63
|
+
# Set dependencies if needed
|
|
64
|
+
bd update bd-2 --blocked-by bd-1
|
|
65
|
+
bd update bd-3 --blocked-by bd-1,bd-2
|
|
66
|
+
|
|
67
|
+
# View the queue
|
|
68
|
+
bd ready # Shows issues ready to work on
|
|
69
|
+
bd list # Shows all issues with status
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Phase 2: Spawning Workers
|
|
73
|
+
|
|
74
|
+
Start workers for ready issues:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Work on a specific issue
|
|
78
|
+
term work bd-1
|
|
79
|
+
|
|
80
|
+
# Or let the system pick the next ready issue
|
|
81
|
+
term work next
|
|
82
|
+
|
|
83
|
+
# Options:
|
|
84
|
+
# --no-worktree Use shared repo (no isolation)
|
|
85
|
+
# --session <name> Target different tmux session
|
|
86
|
+
# --prompt <msg> Custom initial prompt
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**What happens when you run `term work bd-1`:**
|
|
90
|
+
1. Daemon starts (if not running) for auto-sync
|
|
91
|
+
2. Issue is claimed (status → in_progress)
|
|
92
|
+
3. Worktree created via `bd worktree create bd-1`
|
|
93
|
+
4. New tmux pane spawned in the worktree directory
|
|
94
|
+
5. Claude CLI launched with initial prompt
|
|
95
|
+
6. Agent bead created to track the worker
|
|
96
|
+
7. Work bound to agent via slot system
|
|
97
|
+
|
|
98
|
+
### Phase 3: Monitoring Workers
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Check all workers
|
|
102
|
+
term workers
|
|
103
|
+
|
|
104
|
+
# Output:
|
|
105
|
+
# ┌─────────────────────────────────────────────────────────────────┐
|
|
106
|
+
# │ WORKERS │
|
|
107
|
+
# ├──────────┬──────────┬───────────────────────────┬──────────┬────┤
|
|
108
|
+
# │ Name │ Pane │ Task │ State │Time│
|
|
109
|
+
# ├──────────┼──────────┼───────────────────────────┼──────────┼────┤
|
|
110
|
+
# │ bd-1 │ %16 │ "Add login endpoint..." │ working │ 5m │
|
|
111
|
+
# │ bd-2 │ %17 │ "Create user registra..." │ ⚠️ perm │ 2m │
|
|
112
|
+
# └──────────┴──────────┴───────────────────────────┴──────────┴────┘
|
|
113
|
+
|
|
114
|
+
# JSON output for scripting
|
|
115
|
+
term workers --json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Worker States:**
|
|
119
|
+
- `spawning` - Worker being initialized
|
|
120
|
+
- `working` - Actively producing output
|
|
121
|
+
- `idle` - At prompt, waiting for input
|
|
122
|
+
- `⚠️ perm` - Waiting for permission approval
|
|
123
|
+
- `⚠️ question` - Waiting for human answer
|
|
124
|
+
- `✅ done` - Task completed
|
|
125
|
+
- `❌ error` - Encountered error
|
|
126
|
+
- `💀 dead` - Pane no longer exists
|
|
127
|
+
|
|
128
|
+
### Phase 4: Interacting with Workers
|
|
129
|
+
|
|
130
|
+
**Approve permissions:**
|
|
131
|
+
```bash
|
|
132
|
+
term approve bd-1 # Approve pending permission
|
|
133
|
+
term approve bd-1 --deny # Deny permission
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Answer questions:**
|
|
137
|
+
```bash
|
|
138
|
+
term answer bd-1 1 # Select option 1
|
|
139
|
+
term answer bd-1 "text:custom" # Provide custom text answer
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Send additional instructions:**
|
|
143
|
+
```bash
|
|
144
|
+
# Focus the worker pane and type directly, or:
|
|
145
|
+
term orc send <session> "Additional instructions here" --pane %16
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Phase 5: Closing Issues
|
|
149
|
+
|
|
150
|
+
When a worker completes its task:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Close issue and cleanup worker
|
|
154
|
+
term close bd-1
|
|
155
|
+
|
|
156
|
+
# Options:
|
|
157
|
+
# --merge Merge worktree branch to main before cleanup
|
|
158
|
+
# --keep-worktree Don't delete the worktree
|
|
159
|
+
# --no-sync Skip bd sync
|
|
160
|
+
# -y, --yes Skip confirmation
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**What happens:**
|
|
164
|
+
1. Issue closed in beads (status → done)
|
|
165
|
+
2. Beads synced to git
|
|
166
|
+
3. Worktree removed (unless --keep-worktree)
|
|
167
|
+
4. Worker pane killed
|
|
168
|
+
5. Agent bead deleted
|
|
169
|
+
|
|
170
|
+
### Phase 6: Force Killing Workers
|
|
171
|
+
|
|
172
|
+
If a worker is stuck or needs to be terminated:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
term kill bd-1
|
|
176
|
+
|
|
177
|
+
# Options:
|
|
178
|
+
# --keep-worktree Preserve worktree for manual inspection
|
|
179
|
+
# -y, --yes Skip confirmation
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Note: This does NOT close the issue. The task remains `in_progress` in beads.
|
|
183
|
+
|
|
184
|
+
## Daemon Management
|
|
185
|
+
|
|
186
|
+
The beads daemon auto-commits and syncs changes:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
term daemon start # Start with auto-commit
|
|
190
|
+
term daemon status # Check if running
|
|
191
|
+
term daemon stop # Stop daemon
|
|
192
|
+
term daemon restart # Restart with fresh config
|
|
193
|
+
|
|
194
|
+
# Options for start/restart:
|
|
195
|
+
# --no-auto-commit Disable auto-commit
|
|
196
|
+
# --auto-push Enable auto-push to remote
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Multi-Worker Patterns
|
|
200
|
+
|
|
201
|
+
### Pattern 1: Sequential Dependencies
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Create dependent tasks
|
|
205
|
+
bd create "Design database schema" # bd-1
|
|
206
|
+
bd create "Implement models" # bd-2
|
|
207
|
+
bd update bd-2 --blocked-by bd-1
|
|
208
|
+
|
|
209
|
+
# Start first task
|
|
210
|
+
term work bd-1
|
|
211
|
+
|
|
212
|
+
# When bd-1 completes, bd-2 becomes ready
|
|
213
|
+
term close bd-1
|
|
214
|
+
term work next # Picks bd-2
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Pattern 2: Parallel Independent Tasks
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Create independent tasks
|
|
221
|
+
bd create "Add user profile page"
|
|
222
|
+
bd create "Add settings page"
|
|
223
|
+
bd create "Add notifications page"
|
|
224
|
+
|
|
225
|
+
# Spawn multiple workers
|
|
226
|
+
term work bd-1
|
|
227
|
+
term work bd-2
|
|
228
|
+
term work bd-3
|
|
229
|
+
|
|
230
|
+
# Monitor all
|
|
231
|
+
term workers
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Pattern 3: Review and Iterate
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Worker completes, but needs revision
|
|
238
|
+
# Don't close yet - send feedback
|
|
239
|
+
term orc send genie "Please also add input validation" --pane %16
|
|
240
|
+
|
|
241
|
+
# Or if already closed, reopen
|
|
242
|
+
bd update bd-1 --status open
|
|
243
|
+
term work bd-1
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## CLI Improvement Loop
|
|
247
|
+
|
|
248
|
+
**Important:** When using this system, you may identify opportunities to improve the CLI itself. Do NOT implement these directly in your current work. Instead:
|
|
249
|
+
|
|
250
|
+
1. Create an improvement issue:
|
|
251
|
+
```bash
|
|
252
|
+
bd create "CLI: <improvement description>" --label cli-improvement
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
2. A dedicated `genie-cli-improver` worker handles these:
|
|
256
|
+
```bash
|
|
257
|
+
term work <cli-improvement-issue>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
3. This separation ensures:
|
|
261
|
+
- Current work stays focused
|
|
262
|
+
- CLI changes are properly isolated
|
|
263
|
+
- Improvements can be reviewed independently
|
|
264
|
+
|
|
265
|
+
## Environment Variables
|
|
266
|
+
|
|
267
|
+
| Variable | Default | Description |
|
|
268
|
+
|----------|---------|-------------|
|
|
269
|
+
| `TERM_USE_BEADS_REGISTRY` | `true` | Set to `false` to use JSON registry fallback |
|
|
270
|
+
|
|
271
|
+
## Troubleshooting
|
|
272
|
+
|
|
273
|
+
### Worker shows as dead but pane exists
|
|
274
|
+
```bash
|
|
275
|
+
# The registry may be out of sync
|
|
276
|
+
term kill <worker-id> # Clean up registry entry
|
|
277
|
+
term work <task-id> # Start fresh
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Worktree creation fails
|
|
281
|
+
```bash
|
|
282
|
+
# Check if branch already exists
|
|
283
|
+
git branch -a | grep <task-id>
|
|
284
|
+
|
|
285
|
+
# Remove orphaned worktree
|
|
286
|
+
git worktree remove .worktrees/<task-id> --force
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Daemon won't start
|
|
290
|
+
```bash
|
|
291
|
+
# Check bd daemon directly
|
|
292
|
+
bd daemon status
|
|
293
|
+
bd daemon start --auto-commit
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Permission loop
|
|
297
|
+
If a worker keeps asking for the same permission:
|
|
298
|
+
```bash
|
|
299
|
+
# Check Claude's permission settings
|
|
300
|
+
# Consider using --dangerously-skip-permissions for trusted repos
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Best Practices
|
|
304
|
+
|
|
305
|
+
1. **Clear issue titles**: Workers use titles as context
|
|
306
|
+
2. **One task per worker**: Keep issues focused
|
|
307
|
+
3. **Use dependencies**: `--blocked-by` prevents premature work
|
|
308
|
+
4. **Review before closing**: Check worker output before `term close`
|
|
309
|
+
5. **Use worktrees**: They provide isolation and can be reviewed independently
|
|
310
|
+
6. **Keep daemon running**: Ensures beads state is synced to git
|
|
311
|
+
7. **Delegate CLI improvements**: Create issues, don't implement inline
|
|
312
|
+
|
|
313
|
+
## Command Reference
|
|
314
|
+
|
|
315
|
+
| Command | Description |
|
|
316
|
+
|---------|-------------|
|
|
317
|
+
| `term work <bd-id>` | Spawn worker for issue |
|
|
318
|
+
| `term work next` | Work on next ready issue |
|
|
319
|
+
| `term workers` | List all workers |
|
|
320
|
+
| `term approve <id>` | Approve permission |
|
|
321
|
+
| `term answer <id> <choice>` | Answer question |
|
|
322
|
+
| `term close <id>` | Close issue and cleanup |
|
|
323
|
+
| `term kill <id>` | Force kill worker |
|
|
324
|
+
| `term daemon start` | Start beads daemon |
|
|
325
|
+
| `term daemon stop` | Stop beads daemon |
|
|
326
|
+
| `term daemon status` | Show daemon status |
|
|
327
|
+
|
|
328
|
+
## Architecture
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
332
|
+
│ Human Terminal │
|
|
333
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
334
|
+
│ │ Worker 1 │ │ Worker 2 │ │ Worker 3 │ ... │
|
|
335
|
+
│ │ (Claude) │ │ (Claude) │ │ (Claude) │ │
|
|
336
|
+
│ │ pane %16 │ │ pane %17 │ │ pane %18 │ │
|
|
337
|
+
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
|
|
338
|
+
│ │ │ │ │
|
|
339
|
+
│ ▼ ▼ ▼ │
|
|
340
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
341
|
+
│ │ .worktrees/ │ │ .worktrees/ │ │ .worktrees/ │ │
|
|
342
|
+
│ │ bd-1/ │ │ bd-2/ │ │ bd-3/ │ │
|
|
343
|
+
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
|
|
344
|
+
│ │ │ │ │
|
|
345
|
+
│ └────────────────┼────────────────┘ │
|
|
346
|
+
│ ▼ │
|
|
347
|
+
│ ┌─────────────┐ │
|
|
348
|
+
│ │ .genie/ │ ◀── Shared via redirect │
|
|
349
|
+
│ │ issues.jsonl│ │
|
|
350
|
+
│ └──────┬──────┘ │
|
|
351
|
+
│ │ │
|
|
352
|
+
│ ▼ │
|
|
353
|
+
│ ┌─────────────┐ │
|
|
354
|
+
│ │ bd daemon │ ◀── Auto-commit & sync │
|
|
355
|
+
│ └─────────────┘ │
|
|
356
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Next Steps
|
|
360
|
+
|
|
361
|
+
After reading this guide:
|
|
362
|
+
1. Start with `term daemon start`
|
|
363
|
+
2. Create a few test issues with `bd create`
|
|
364
|
+
3. Try `term work <id>` to spawn your first worker
|
|
365
|
+
4. Practice the workflow with simple tasks
|
|
366
|
+
5. Scale up to multi-worker orchestration
|
|
367
|
+
|
|
368
|
+
Happy co-orchestrating!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automagik/genie",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.260203.0043",
|
|
4
4
|
"description": "Collaborative terminal toolkit for human + AI workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"version": "bun run scripts/version.ts",
|
|
15
15
|
"prebuild": "bun run version",
|
|
16
16
|
"build": "bun build src/claudio.ts src/term.ts src/genie.ts --outdir dist --target bun --minify && chmod +x dist/*.js",
|
|
17
|
+
"build:plugin": "node scripts/build.js",
|
|
18
|
+
"sync": "node scripts/sync.js",
|
|
19
|
+
"build-and-sync": "npm run build:plugin && npm run sync",
|
|
17
20
|
"prepack": "bun run build"
|
|
18
21
|
},
|
|
19
22
|
"dependencies": {
|
|
@@ -25,6 +28,7 @@
|
|
|
25
28
|
"devDependencies": {
|
|
26
29
|
"@types/bun": "^1.1.0",
|
|
27
30
|
"@types/node": "^20.10.5",
|
|
31
|
+
"esbuild": "^0.27.2",
|
|
28
32
|
"typescript": "^5.3.3"
|
|
29
33
|
},
|
|
30
34
|
"repository": {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "automagik-genie",
|
|
3
|
+
"version": "0.260202.1953",
|
|
4
|
+
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, forge with parallel agents, ship as one team. A coding genie that grows with your project.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Namastex Labs"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://github.com/namastexlabs/genie-cli",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"workflow",
|
|
12
|
+
"orchestration",
|
|
13
|
+
"collaboration",
|
|
14
|
+
"claude-code",
|
|
15
|
+
"tmux",
|
|
16
|
+
"agents"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/plugin/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# automagik-genie Plugin
|
|
2
|
+
|
|
3
|
+
Company-standard Claude Code plugin that packages the Genie workflow automation system.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Workflow Skills**: brainstorm, wish, forge, review, plan-review
|
|
8
|
+
- **Bootstrap Skills**: genie-base, genie-blank-init
|
|
9
|
+
- **Validation Hooks**: Pre-write validation for wish documents
|
|
10
|
+
- **Agent Definitions**: implementor, spec-reviewer, quality-reviewer
|
|
11
|
+
- **Reference Documents**: wish-template, review-criteria
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### Global Install (Recommended)
|
|
16
|
+
|
|
17
|
+
Copy the plugin to your Claude Code plugins directory:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
mkdir -p ~/.claude/plugins
|
|
21
|
+
cp -r tools/genie-cli/.claude-plugin ~/.claude/plugins/automagik-genie
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or create a symlink for development:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
ln -s $(pwd)/tools/genie-cli/.claude-plugin ~/.claude/plugins/automagik-genie
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Install genie-cli (Optional)
|
|
31
|
+
|
|
32
|
+
The plugin includes an installation script for the genie-cli companion tool:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bash ~/.claude/plugins/automagik-genie/scripts/install-genie-cli.sh --global
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
The Genie workflow follows this progression:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/brainstorm → /wish → /plan-review → /forge → /review → SHIP
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 1. Brainstorm (`/brainstorm`)
|
|
47
|
+
|
|
48
|
+
Explore ideas through dialogue. One question at a time. Outputs validated design.
|
|
49
|
+
|
|
50
|
+
### 2. Wish (`/wish`)
|
|
51
|
+
|
|
52
|
+
Convert design into structured plan with:
|
|
53
|
+
- Scope (IN/OUT)
|
|
54
|
+
- Success criteria
|
|
55
|
+
- Execution groups with acceptance criteria
|
|
56
|
+
- Validation commands
|
|
57
|
+
|
|
58
|
+
Creates `.genie/wishes/<slug>/wish.md`
|
|
59
|
+
|
|
60
|
+
### 3. Plan Review (`/plan-review`)
|
|
61
|
+
|
|
62
|
+
Fast structural validation of wish document. Catches missing sections before execution.
|
|
63
|
+
|
|
64
|
+
### 4. Forge (`/forge`)
|
|
65
|
+
|
|
66
|
+
Execute the plan by dispatching subagents:
|
|
67
|
+
- **Implementor**: Executes tasks using TDD
|
|
68
|
+
- **Spec Reviewer**: Verifies acceptance criteria (3 loop max)
|
|
69
|
+
- **Quality Reviewer**: Checks security/maintainability (2 loop max)
|
|
70
|
+
|
|
71
|
+
Never implements directly - always dispatches agents.
|
|
72
|
+
|
|
73
|
+
### 5. Review (`/review`)
|
|
74
|
+
|
|
75
|
+
Final validation producing:
|
|
76
|
+
- **SHIP**: Ready to deploy
|
|
77
|
+
- **FIX-FIRST**: Return to forge with specific fixes
|
|
78
|
+
- **BLOCKED**: Return to wish for scope changes
|
|
79
|
+
|
|
80
|
+
## Directory Structure
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
automagik-genie/
|
|
84
|
+
├── plugin.json # Plugin manifest
|
|
85
|
+
├── skills/
|
|
86
|
+
│ ├── brainstorm/ # Idea exploration
|
|
87
|
+
│ ├── wish/ # Plan creation
|
|
88
|
+
│ ├── forge/ # Plan execution
|
|
89
|
+
│ ├── review/ # Final validation
|
|
90
|
+
│ ├── plan-review/ # Wish validation
|
|
91
|
+
│ ├── genie-base/ # Workspace bootstrap
|
|
92
|
+
│ └── genie-blank-init/ # First activation
|
|
93
|
+
├── agents/
|
|
94
|
+
│ ├── implementor.md # Task executor
|
|
95
|
+
│ ├── spec-reviewer.md # Criteria verifier
|
|
96
|
+
│ └── quality-reviewer.md # Quality checker
|
|
97
|
+
├── hooks/
|
|
98
|
+
│ └── hooks.json # Validation hooks
|
|
99
|
+
├── scripts/
|
|
100
|
+
│ ├── validate-wish.ts # Wish validation
|
|
101
|
+
│ ├── validate-completion.ts # Forge completion check
|
|
102
|
+
│ └── install-genie-cli.sh # CLI installer
|
|
103
|
+
└── references/
|
|
104
|
+
├── wish-template.md # Wish document template
|
|
105
|
+
└── review-criteria.md # Review severity guide
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Verification
|
|
109
|
+
|
|
110
|
+
After installation, verify the plugin is discovered:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
ls ~/.claude/plugins/automagik-genie/plugin.json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Test skills are invocable:
|
|
117
|
+
- `/brainstorm` should enter exploration mode
|
|
118
|
+
- `/wish` should create wish documents
|
|
119
|
+
- `/forge` should dispatch implementor agents
|
|
120
|
+
- `/review` should produce SHIP/FIX-FIRST/BLOCKED verdict
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implementor
|
|
3
|
+
description: "Task execution agent following TDD discipline. Reads wish from disk, implements deliverables, runs validation."
|
|
4
|
+
tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementor Agent
|
|
8
|
+
|
|
9
|
+
## Role
|
|
10
|
+
|
|
11
|
+
Execute a single task from a wish document. Follow TDD discipline: RED → GREEN → REFINE.
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
|
|
15
|
+
You receive:
|
|
16
|
+
- Path to wish document: `.genie/wishes/<slug>/wish.md`
|
|
17
|
+
- Task name and description
|
|
18
|
+
- Acceptance criteria (checkboxes to satisfy)
|
|
19
|
+
- Validation command (how to verify completion)
|
|
20
|
+
|
|
21
|
+
## Process
|
|
22
|
+
|
|
23
|
+
### 1. Read the Wish
|
|
24
|
+
|
|
25
|
+
Read the wish document from disk. Parse:
|
|
26
|
+
- The specific execution group you're implementing
|
|
27
|
+
- Acceptance criteria for this task
|
|
28
|
+
- Validation command to run when done
|
|
29
|
+
- Files to create/modify listed in the wish
|
|
30
|
+
|
|
31
|
+
### 2. Understand Before Acting
|
|
32
|
+
|
|
33
|
+
- Read existing code that will be modified
|
|
34
|
+
- Understand the patterns and conventions in use
|
|
35
|
+
- Check related tests to understand expected behavior
|
|
36
|
+
|
|
37
|
+
### 3. RED: Write Failing Test
|
|
38
|
+
|
|
39
|
+
Before implementing:
|
|
40
|
+
- Write a test that captures the acceptance criteria
|
|
41
|
+
- Run the test to confirm it fails
|
|
42
|
+
- This proves we're testing the right thing
|
|
43
|
+
|
|
44
|
+
Skip if:
|
|
45
|
+
- Task is purely documentation
|
|
46
|
+
- Task is refactoring with existing test coverage
|
|
47
|
+
- User explicitly said no tests needed
|
|
48
|
+
|
|
49
|
+
### 4. GREEN: Implement to Pass
|
|
50
|
+
|
|
51
|
+
Write the minimum code needed to pass the test:
|
|
52
|
+
- Follow existing conventions in the codebase
|
|
53
|
+
- Don't over-engineer
|
|
54
|
+
- Focus on the acceptance criteria, nothing more
|
|
55
|
+
|
|
56
|
+
### 5. REFINE: Clean Up
|
|
57
|
+
|
|
58
|
+
After tests pass:
|
|
59
|
+
- Remove duplication
|
|
60
|
+
- Improve naming
|
|
61
|
+
- Ensure code is readable
|
|
62
|
+
- Don't add features or "improvements"
|
|
63
|
+
|
|
64
|
+
### 6. Validate
|
|
65
|
+
|
|
66
|
+
Run the validation command from the wish document:
|
|
67
|
+
- Report the output
|
|
68
|
+
- Confirm each acceptance criterion is met
|
|
69
|
+
|
|
70
|
+
### 7. Report
|
|
71
|
+
|
|
72
|
+
Report to forge:
|
|
73
|
+
- What was implemented (files changed)
|
|
74
|
+
- Test results
|
|
75
|
+
- Validation command output
|
|
76
|
+
- Any issues encountered
|
|
77
|
+
|
|
78
|
+
## Key Principles
|
|
79
|
+
|
|
80
|
+
- **Read wish from disk** - Don't rely solely on what's in the prompt
|
|
81
|
+
- **TDD when possible** - Tests before implementation
|
|
82
|
+
- **Minimum viable** - Implement exactly what's asked, no more
|
|
83
|
+
- **Follow conventions** - Match existing code style
|
|
84
|
+
- **Validate before reporting** - Run the validation command
|
|
85
|
+
|
|
86
|
+
## Never Do
|
|
87
|
+
|
|
88
|
+
- Implement more than the task asks for
|
|
89
|
+
- Skip reading the wish document
|
|
90
|
+
- Change files not related to the task
|
|
91
|
+
- Add "nice to have" features
|
|
92
|
+
- Guess at requirements - ask if unclear
|