meto-cli 0.7.6 → 0.9.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.
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: meto-epic-{{EPIC_ID}}
3
+ description: Use to implement tasks belonging to {{EPIC_NAME}} ({{EPIC_ID}}). Owns {{EPIC_DOMAIN}}. Picks tasks tagged {{EPIC_ID}} from tasks-todo.md and runs independent tasks in parallel. Reports checkpoint status to SWARM_AWARENESS.md every 3 completed tasks. Do NOT use for tasks belonging to other epics.
4
+ tools: Read, Write, Edit, Bash, Glob, Grep
5
+ ---
6
+
7
+ # Epic Agent — {{EPIC_NAME}} ({{EPIC_ID}})
8
+
9
+ ## Domain Ownership
10
+ - **My files:** `{{EPIC_DOMAIN}}`
11
+ - **Shared files (READ ONLY):** `ai/swarm/SWARM_AWARENESS.md`, `ai/swarm/domain-map.md`
12
+ - **Board files I touch:** `tasks-todo.md`, `tasks-in-progress.md`, `tasks-in-testing.md`
13
+
14
+ ## Session Start
15
+ 1. Read `CLAUDE.md`
16
+ 2. Read `ai/swarm/domain-map.md` — confirm my domain, check for conflicts
17
+ 3. Read `ai/swarm/SWARM_AWARENESS.md` — check what other epic agents are doing
18
+ 4. Read `.claude/agent-memory/meto-epic-{{EPIC_ID}}/MEMORY.md`
19
+ 5. Proceed with task pickup
20
+
21
+ ## Session End
22
+ 1. Write checkpoint to `ai/swarm/SWARM_AWARENESS.md`
23
+ 2. Update `.claude/agent-memory/meto-epic-{{EPIC_ID}}/MEMORY.md`
24
+
25
+ ## Task Pickup Protocol
26
+
27
+ **Parallelism first:** Read all tasks tagged `{{EPIC_ID}}` in `tasks-todo.md`. Check dependency chains. Launch independent tasks in parallel (background agents or worktrees). Only run tasks sequentially when one depends on another's output.
28
+
29
+ For each task:
30
+ 1. Check `ai/swarm/domain-map.md` — confirm no file conflicts with active epic agents
31
+ 2. Copy full task block to `tasks-in-progress.md`, add `Started: [date] | Agent: meto-epic-{{EPIC_ID}}`
32
+ 3. Delete from `tasks-todo.md`
33
+ 4. Implement against acceptance criteria
34
+ 5. Run self-check
35
+ 6. Copy full task block to `tasks-in-testing.md`, add `Completed: [date] | Files changed: [list]`
36
+ 7. Delete from `tasks-in-progress.md`
37
+ 8. Commit: `feat({{EPIC_ID}}): description [epic-{{EPIC_ID}}]`
38
+ 9. Increment completed task counter — at 3, write checkpoint
39
+
40
+ ## Self-Check Before Moving to Testing
41
+ - [ ] All acceptance criteria implemented
42
+ - [ ] TypeScript compiles — no errors
43
+ - [ ] No `any` types
44
+ - [ ] No `console.log`
45
+ - [ ] No commented-out code
46
+ - [ ] Error states handled
47
+ - [ ] No hardcoded secrets
48
+ - [ ] Only touched files within `{{EPIC_DOMAIN}}`
49
+
50
+ ## Checkpoint Protocol (every 3 completed tasks)
51
+ Update `ai/swarm/SWARM_AWARENESS.md` under my epic section:
52
+ ```
53
+ {{EPIC_ID}} | [date] | Completed: [n] tasks | Status: [on-track/blocked] | Blocker: [none or description]
54
+ ```
55
+ Then pause and surface status to user before continuing.
56
+
57
+ ## NEVER DO
58
+ - Touch files outside `{{EPIC_DOMAIN}}` without checking domain-map first
59
+ - Pick tasks tagged for a different epic
60
+ - Write to `ai/swarm/domain-map.md`
61
+ - Run dependent tasks in parallel — check dependency chains first
62
+ - Skip the domain conflict check
63
+ - Continue past 3 tasks without writing a checkpoint
@@ -9,17 +9,7 @@
9
9
 
10
10
  ---
11
11
 
12
- ## Agents
13
-
14
- Human orchestrator reads the board and calls the right agent.
15
-
16
- | Agent | Owns |
17
- |---|---|
18
- | `@meto-pm` | `/ai/backlog/`, `tasks-backlog.md`, `tasks-todo.md` |
19
- | `@meto-developer` | `/src/`, `tasks-in-progress.md`, `tasks-in-testing.md` |
20
- | `@meto-tester` | `tasks-in-testing.md` → done or back to todo |
21
-
22
- Each agent has a memory file in `.claude/agent-memory/` — read at session start, update at session end.
12
+ {{WORKFLOW_AGENTS_SECTION}}
23
13
 
24
14
  ---
25
15
 
@@ -0,0 +1,62 @@
1
+ # SWARM_AWARENESS — {{PROJECT_NAME}}
2
+
3
+ > **READ ONLY for epic agents. Only `@meto-pm` and checkpoint protocol may write here.**
4
+ > Parsed by `npx meto-cli status` — keep section headers and format exact.
5
+
6
+ ---
7
+
8
+ ## [swarm:meta]
9
+ - **Project:** {{PROJECT_NAME}}
10
+ - **Mode:** swarm
11
+ - **Started:** *(date)*
12
+ - **Total epics:** *(n)*
13
+ - **Total tasks:** *(n)*
14
+ - **Acceptance criteria:** 0 / 0 passed
15
+
16
+ ---
17
+
18
+ ## [swarm:epics]
19
+
20
+ | Epic ID | Name | Agent | Status | Tasks Done | Blocker |
21
+ |---|---|---|---|---|---|
22
+ | *(populated at swarm init by @meto-pm)* | | | not-started | 0 | none |
23
+
24
+ Status values: `not-started` · `on-track` · `blocked` · `complete`
25
+
26
+ ---
27
+
28
+ ## [swarm:domains]
29
+
30
+ See full ownership rules in `ai/swarm/domain-map.md`.
31
+
32
+ | Epic ID | Owns |
33
+ |---|---|
34
+ | *(populated at swarm init by @meto-pm)* | |
35
+
36
+ ---
37
+
38
+ ## [swarm:checkpoints]
39
+
40
+ Append only. Never delete entries. One line per checkpoint.
41
+
42
+ ```
43
+ [ISO date] | [EPIC_ID] | done:[n] | status:[on-track/blocked] | blocker:[none or description]
44
+ ```
45
+
46
+ ---
47
+
48
+ ## [swarm:conflicts]
49
+
50
+ ```
51
+ [ISO date] | CONFLICT | file:[path] | agents:[e1] vs [e2] | resolution:[pending/resolved]
52
+ ```
53
+
54
+ ---
55
+
56
+ ## [swarm:log]
57
+
58
+ Free text. Epic agents append observations, decisions, or notes here.
59
+
60
+ ```
61
+ [ISO date] | [EPIC_ID] | [note]
62
+ ```
@@ -0,0 +1,46 @@
1
+ # Domain Map — {{PROJECT_NAME}}
2
+
3
+ > Generated by `@meto-pm` at swarm init. **READ ONLY after generation.**
4
+ > Epic agents use this to check for file conflicts before picking up a task.
5
+
6
+ ---
7
+
8
+ ## Ownership Rules
9
+
10
+ 1. Each epic agent owns its declared domain exclusively
11
+ 2. Before touching any file, check it is within your domain
12
+ 3. If a task requires a file outside your domain — STOP, log conflict in `SWARM_AWARENESS.md`, wait for user
13
+ 4. Shared config files (e.g. `package.json`, `tsconfig.json`) require user coordination before editing
14
+
15
+ ---
16
+
17
+ ## Epic Domains
18
+
19
+ *(Populated by @meto-pm during swarm init based on confirmed epics)*
20
+
21
+ | Epic ID | Epic Name | Owns | Shared With |
22
+ |---|---|---|---|
23
+ | E1 | *(name)* | *(paths)* | none |
24
+ | E2 | *(name)* | *(paths)* | none |
25
+
26
+ ---
27
+
28
+ ## Shared Files (requires coordination)
29
+
30
+ Files that multiple epics may need to touch. Epic agents must flag before editing.
31
+
32
+ | File | Reason shared | Protocol |
33
+ |---|---|---|
34
+ | `package.json` | All epics may add deps | Flag in SWARM_AWARENESS, user approves |
35
+ | `tsconfig.json` | Compiler config affects all | Flag in SWARM_AWARENESS, user approves |
36
+ | `CLAUDE.md` | Project-wide context | Only @meto-pm writes |
37
+
38
+ ---
39
+
40
+ ## Conflict Resolution Protocol
41
+
42
+ 1. Epic agent detects file outside its domain is needed
43
+ 2. Agent logs conflict in `SWARM_AWARENESS.md`
44
+ 3. Agent pauses — does NOT proceed
45
+ 4. User reviews and assigns ownership or approves shared edit
46
+ 5. Agent continues only after user confirmation
@@ -0,0 +1,97 @@
1
+ # Swarm Workflow — {{PROJECT_NAME}}
2
+
3
+ ## What is Swarm Mode
4
+
5
+ Each epic runs its own agent in parallel. Epic agents are scoped to their domain and cannot touch files owned by other epics. They report status every 3 completed tasks. The user stays in control at every checkpoint.
6
+
7
+ ---
8
+
9
+ ## Swarm vs Sprint
10
+
11
+ | | Sprint | Swarm |
12
+ |---|---|---|
13
+ | Tasks | One at a time, sequential | Parallel per epic |
14
+ | Agents | meto-developer (generic) | meto-epic-[id] (scoped) |
15
+ | Speed | Careful, deliberate | Faster on independent epics |
16
+ | Risk | Low | Medium — requires domain discipline |
17
+ | Best for | Solo, small scope, tight control | Multiple epics, independent domains |
18
+
19
+ ---
20
+
21
+ ## Starting a Swarm
22
+
23
+ 1. `@meto-pm` confirms all epics are defined in `epics.md`
24
+ 2. `@meto-pm` generates `ai/swarm/domain-map.md` — one domain per epic
25
+ 3. `@meto-pm` generates one `epic-agent.md` per epic in `.claude/agents/`
26
+ 4. `@meto-pm` initialises `ai/swarm/SWARM_AWARENESS.md` with active epic table
27
+ 5. User launches epic agents — one per epic, in separate Claude Code sessions
28
+
29
+ ---
30
+
31
+ ## Checkpoint Rhythm
32
+
33
+ ```
34
+ Epic agent reads todo -> identifies independent tasks -> launches in parallel
35
+ Each task: implement -> self-check -> move to testing
36
+ After 3 tasks complete (parallel or sequential):
37
+ -> Write checkpoint to SWARM_AWARENESS.md
38
+ -> Surface status to user
39
+ -> User runs: npx meto-cli status
40
+ -> User reviews: continue / intervene / reassign
41
+ -> Repeat
42
+ ```
43
+
44
+ **Parallelism within an epic:** Independent tasks (no dependency chain) run in parallel using background agents or worktrees. Only tasks that depend on another's output run sequentially.
45
+
46
+ A checkpoint is NOT a blocker — if status is `on-track` the agent continues automatically. Only `blocked` status requires user intervention.
47
+
48
+ ---
49
+
50
+ ## npx meto-cli status
51
+
52
+ Reads `ai/swarm/SWARM_AWARENESS.md` and prints a formatted terminal report:
53
+
54
+ ```
55
+ Last Swarm Checkpoint
56
+
57
+ Project: {{PROJECT_NAME}}
58
+ Duration: [start] – [latest checkpoint]
59
+
60
+ Epics Active:
61
+ - E1 · [name] [n] tasks done
62
+ - E2 · [name] [n] tasks in progress
63
+ - E3 · [name] blocked — [reason]
64
+ - E4 · [name] not started
65
+
66
+ Acceptance Criteria: [n] of [n] passed
67
+
68
+ Blockers:
69
+ - [EPIC_ID]: [description]
70
+
71
+ Next: [instruction to user]
72
+ ```
73
+
74
+ Run at any time — not only at checkpoints. Gives a live read of the swarm state.
75
+
76
+ ---
77
+
78
+ ## Conflict Resolution Protocol
79
+
80
+ 1. Epic agent detects it needs a file outside its domain
81
+ 2. Agent logs conflict in `SWARM_AWARENESS.md` under Shared File Conflicts
82
+ 3. Agent sets its status to `blocked`
83
+ 4. Agent pauses — does NOT proceed
84
+ 5. User runs `npx meto-cli status` — sees the blocker
85
+ 6. User resolves: assigns ownership or approves shared edit
86
+ 7. Agent continues only after user confirmation
87
+
88
+ ---
89
+
90
+ ## Ending a Swarm
91
+
92
+ A swarm ends when all epics reach 0 tasks in `tasks-todo.md` tagged to them and `@meto-tester` has signed off all items in `tasks-done.md`.
93
+
94
+ `@meto-pm` writes final swarm summary to `SWARM_AWARENESS.md`:
95
+ ```
96
+ SWARM COMPLETE | [date] | [n] epics | [n] tasks | [n/n] AC passed
97
+ ```