gm-copilot-cli 2.0.185 → 2.0.188
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/gm.md +6 -96
- package/copilot-profile.md +1 -1
- package/hooks/session-start-hook.js +1 -19
- package/index.html +8 -2
- package/manifest.yml +1 -1
- package/package.json +1 -1
- package/skills/gm/SKILL.md +84 -53
- package/skills/gm-complete/SKILL.md +59 -50
- package/skills/gm-emit/SKILL.md +65 -48
- package/skills/gm-execute/SKILL.md +75 -45
- package/skills/planning/SKILL.md +53 -47
- package/tools.json +1 -1
- package/skills/code-search/SKILL.md +0 -376
- package/skills/process-management/SKILL.md +0 -84
package/skills/gm-emit/SKILL.md
CHANGED
|
@@ -1,84 +1,101 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gm-emit
|
|
3
|
-
description: EMIT phase
|
|
3
|
+
description: EMIT phase. Pre-emit debug, write files, post-emit verify from disk. Any new unknown triggers immediate snake back to planning — restart chain.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# GM EMIT —
|
|
6
|
+
# GM EMIT — Writing and Verifying Files
|
|
7
7
|
|
|
8
|
-
You are in the **EMIT** phase.
|
|
8
|
+
You are in the **EMIT** phase. Every mutable is KNOWN. Prove the write is correct, write, confirm from disk. Any new unknown = snake to `planning`, restart chain.
|
|
9
9
|
|
|
10
10
|
**GRAPH POSITION**: `PLAN → EXECUTE → [EMIT] → VERIFY → COMPLETE`
|
|
11
|
-
- **
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
- **Entry**: All .prd mutables resolved. Entered from `gm-execute` or via snake from VERIFY.
|
|
12
|
+
|
|
13
|
+
## TRANSITIONS
|
|
14
|
+
|
|
15
|
+
**FORWARD**: All gate conditions true simultaneously → invoke `gm-complete` skill
|
|
16
|
+
|
|
17
|
+
**SELF-LOOP**: Post-emit variance with known cause → fix immediately, re-verify, do not advance until zero variance
|
|
18
|
+
|
|
19
|
+
**BACKWARD**:
|
|
20
|
+
- Pre-emit reveals logic error (known mutable) → invoke `gm-execute` skill, re-resolve, return here
|
|
21
|
+
- Pre-emit reveals new unknown → invoke `planning` skill, restart chain
|
|
22
|
+
- Post-emit variance with unknown cause → invoke `planning` skill, restart chain
|
|
23
|
+
- Scope changed → invoke `planning` skill, restart chain
|
|
24
|
+
- From VERIFY: end-to-end reveals broken file → re-enter here, fix, re-verify, re-advance
|
|
15
25
|
|
|
16
26
|
## MUTABLE DISCIPLINE
|
|
17
27
|
|
|
18
|
-
Each gate condition is a mutable
|
|
28
|
+
Each gate condition is a mutable. Pre-emit run witnesses expected value. Post-emit run witnesses current value. Zero variance = resolved. Variance with unknown cause = new unknown = snake to `planning`.
|
|
19
29
|
|
|
20
|
-
##
|
|
30
|
+
## CODE EXECUTION
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
2. Execute proposed logic in isolation — WITHOUT writing to any file
|
|
24
|
-
3. Witness correct output with real inputs. Test failure paths with real error inputs.
|
|
25
|
-
4. For browser code: inject `__gm` globals, run interactions, dump captures, verify
|
|
32
|
+
**exec:<lang> is the only way to run code.** Bash tool body: `exec:<lang>\n<code>`
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
`exec:nodejs` (default) | `exec:bash` | `exec:python` | `exec:typescript` | `exec:go` | `exec:rust` | `exec:java` | `exec:deno` | `exec:cmd`
|
|
28
35
|
|
|
29
|
-
|
|
36
|
+
Only git in bash directly. `Bash(node/npm/npx/bun)` = violations. File writes via exec:nodejs + require('fs').
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
## PRE-EMIT DEBUGGING (before writing any file)
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
1. Import actual module from disk via `exec:nodejs` — witness current on-disk behavior
|
|
41
|
+
2. Run proposed logic in isolation WITHOUT writing — witness output with real inputs
|
|
42
|
+
3. Debug failure paths with real error inputs — record expected values
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
```
|
|
45
|
+
exec:nodejs
|
|
46
|
+
const { fn } = await import('/abs/path/to/module.js');
|
|
47
|
+
console.log(await fn(realInput));
|
|
48
|
+
```
|
|
39
49
|
|
|
40
|
-
|
|
50
|
+
Pre-emit revealing unexpected behavior → new unknown → snake to `planning`.
|
|
41
51
|
|
|
42
|
-
|
|
43
|
-
- Every scenario tested: success, failure, edge, corner, error, recovery
|
|
44
|
-
- Real witnessed output proves goal achieved
|
|
45
|
-
- Hot reloadable: state outside reloadable modules, handlers swap atomically
|
|
46
|
-
- Crash-proof: catch at every boundary, recovery hierarchy, every component supervised
|
|
47
|
-
- No mocks/fakes/stubs anywhere in codebase
|
|
48
|
-
- Files ≤200 lines each
|
|
49
|
-
- No duplicate code
|
|
50
|
-
- No comments in code
|
|
51
|
-
- No hardcoded values
|
|
52
|
-
- Docs-code sync: CLAUDE.md reflects actual code behavior
|
|
52
|
+
## WRITING FILES
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
`exec:nodejs` with `require('fs')`. Write only when every gate mutable is `resolved=true` simultaneously.
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
## POST-EMIT VERIFICATION (immediately after writing)
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
1. Re-import the actual file from disk — not in-memory version
|
|
59
|
+
2. Run same inputs as pre-emit — output must match exactly
|
|
60
|
+
3. For browser: reload from disk, re-inject `__gm` globals, re-run, compare captures
|
|
61
|
+
4. Known variance → fix and re-verify | Unknown variance → snake to `planning`
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
## GATE CONDITIONS (all true simultaneously before advancing)
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
- Pre-emit debug passed with real inputs and error inputs
|
|
66
|
+
- Post-emit verification matches pre-emit exactly
|
|
67
|
+
- Hot reloadable: state outside reloadable modules, handlers swap atomically
|
|
68
|
+
- Crash-proof: catch at every boundary, recovery hierarchy
|
|
69
|
+
- No mocks/fakes/stubs anywhere
|
|
70
|
+
- Files ≤200 lines, no duplicate code, no comments, no hardcoded values
|
|
71
|
+
- CLAUDE.md reflects actual behavior
|
|
63
72
|
|
|
64
|
-
|
|
73
|
+
## CODEBASE EXPLORATION
|
|
65
74
|
|
|
66
|
-
|
|
75
|
+
```
|
|
76
|
+
exec:codesearch
|
|
77
|
+
<natural language description>
|
|
78
|
+
```
|
|
67
79
|
|
|
68
|
-
|
|
80
|
+
Alias: `exec:search`. Glob, Grep, Explore = blocked.
|
|
69
81
|
|
|
70
|
-
|
|
82
|
+
## BROWSER DEBUGGING
|
|
71
83
|
|
|
72
|
-
|
|
84
|
+
Invoke `agent-browser` skill. Escalation: (1) `exec:agent-browser\n<js>` → (2) skill + `__gm` globals → (3) navigate/click → (4) screenshot last resort.
|
|
85
|
+
|
|
86
|
+
## SELF-CHECK (before and after each file)
|
|
73
87
|
|
|
74
|
-
|
|
88
|
+
File ≤200 lines | No duplication | Pre-emit passed | No mocks | No comments | Docs match | All spotted issues fixed
|
|
75
89
|
|
|
76
|
-
## CONSTRAINTS
|
|
90
|
+
## CONSTRAINTS
|
|
77
91
|
|
|
78
|
-
**Never**:
|
|
92
|
+
**Never**: write before pre-emit passes | advance with post-emit variance | absorb surprises silently | comments | hardcoded values | defer spotted issues
|
|
79
93
|
|
|
80
|
-
**Always**: pre-emit
|
|
94
|
+
**Always**: pre-emit debug before writing | post-emit verify from disk | snake to planning on any new unknown | fix immediately
|
|
81
95
|
|
|
82
96
|
---
|
|
83
97
|
|
|
84
|
-
**→
|
|
98
|
+
**→ FORWARD**: All gates pass → invoke `gm-complete` skill.
|
|
99
|
+
**↺ SELF-LOOP**: Known post-emit variance → fix, re-verify.
|
|
100
|
+
**↩ SNAKE to EXECUTE**: Known logic error → invoke `gm-execute` skill.
|
|
101
|
+
**↩ SNAKE to PLAN**: Any new unknown → invoke `planning` skill, restart chain.
|
|
@@ -1,42 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gm-execute
|
|
3
|
-
description: EXECUTE phase
|
|
3
|
+
description: EXECUTE phase. Resolve all mutables via witnessed execution. Any new unknown triggers immediate snake back to planning — restart chain from PLAN.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# GM EXECUTE —
|
|
6
|
+
# GM EXECUTE — Resolving Every Unknown
|
|
7
7
|
|
|
8
|
-
You are in the **EXECUTE** phase.
|
|
8
|
+
You are in the **EXECUTE** phase. Resolve every named mutable via witnessed execution. Any new unknown = stop, snake to `planning`, restart chain.
|
|
9
9
|
|
|
10
10
|
**GRAPH POSITION**: `PLAN → [EXECUTE] → EMIT → VERIFY → COMPLETE`
|
|
11
|
-
- **
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
- **Entry**: .prd exists with all unknowns named. Entered from `planning` or via snake from EMIT/VERIFY.
|
|
12
|
+
|
|
13
|
+
## TRANSITIONS
|
|
14
|
+
|
|
15
|
+
**FORWARD**: All mutables KNOWN → invoke `gm-emit` skill
|
|
16
|
+
|
|
17
|
+
**SELF-LOOP**: Mutable still UNKNOWN after one pass → re-run with different angle (max 2 passes then snake)
|
|
18
|
+
|
|
19
|
+
**BACKWARD**:
|
|
20
|
+
- New unknown discovered → invoke `planning` skill immediately, restart chain
|
|
21
|
+
- From EMIT: logic error → re-enter here, re-resolve mutable
|
|
22
|
+
- From VERIFY: runtime failure → re-enter here, re-resolve with real system state
|
|
16
23
|
|
|
17
24
|
## MUTABLE DISCIPLINE
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
Each mutable: name | expected | current | resolution method. Execute → witness → assign → compare. Zero variance = resolved. Unresolved after 2 passes = new unknown = snake to `planning`. Never narrate past an unresolved mutable.
|
|
20
27
|
|
|
21
|
-
##
|
|
28
|
+
## CODE EXECUTION
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
**exec:<lang> is the only way to run code.** Bash tool body: `exec:<lang>\n<code>`
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
`exec:nodejs` (default) | `exec:bash` | `exec:python` | `exec:typescript` | `exec:go` | `exec:rust` | `exec:c` | `exec:cpp` | `exec:java` | `exec:deno` | `exec:cmd`
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
Lang auto-detected if omitted. `cwd` sets directory. File I/O via exec:nodejs + require('fs'). Only git in bash directly. `Bash(node/npm/npx/bun)` = violations.
|
|
28
35
|
|
|
29
|
-
|
|
36
|
+
**Background tasks** (auto-backgrounded when execution exceeds 15s):
|
|
37
|
+
```
|
|
38
|
+
exec:sleep
|
|
39
|
+
<task_id> [seconds]
|
|
40
|
+
```
|
|
41
|
+
```
|
|
42
|
+
exec:status
|
|
43
|
+
<task_id>
|
|
44
|
+
```
|
|
45
|
+
```
|
|
46
|
+
exec:close
|
|
47
|
+
<task_id>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Runner** (PM2-backed — all activity visible in `pm2 list` and `pm2 monit` in user terminal):
|
|
51
|
+
```
|
|
52
|
+
exec:runner
|
|
53
|
+
start|stop|status
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## CODEBASE EXPLORATION
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
exec:codesearch
|
|
60
|
+
<natural language description of what you need>
|
|
61
|
+
```
|
|
30
62
|
|
|
31
|
-
|
|
32
|
-
1. List every distinct operation as numbered steps
|
|
33
|
-
2. Per step: define input shape, output shape, success condition, failure condition
|
|
34
|
-
3. Execute step 1 in isolation → witness → assign mutable → proceed only when KNOWN
|
|
35
|
-
4. Execute step 2 with step 1's witnessed output as input. Repeat for every step.
|
|
36
|
-
5. After all steps pass individually, test adjacent pairs for handoff correctness
|
|
37
|
-
6. Only after all pairs pass: run full chain end-to-end
|
|
63
|
+
Alias: `exec:search`. Glob, Grep, Read-for-discovery, Explore, WebSearch = blocked.
|
|
38
64
|
|
|
39
|
-
## IMPORT-BASED
|
|
65
|
+
## IMPORT-BASED DEBUGGING
|
|
40
66
|
|
|
41
67
|
Always import actual codebase modules. Never rewrite logic inline.
|
|
42
68
|
|
|
@@ -48,44 +74,48 @@ console.log(await fn(realInput));
|
|
|
48
74
|
|
|
49
75
|
Witnessed import output = resolved mutable. Reimplemented output = UNKNOWN.
|
|
50
76
|
|
|
51
|
-
##
|
|
77
|
+
## EXECUTION DENSITY
|
|
52
78
|
|
|
53
|
-
|
|
79
|
+
Pack every related hypothesis into one run. Each run ≤15s. Witnessed output = ground truth. Narrated assumption = nothing.
|
|
54
80
|
|
|
55
|
-
|
|
81
|
+
Parallel waves: ≤3 `gm:gm` subagents via Task tool — independent items simultaneously, never sequentially.
|
|
56
82
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
83
|
+
## CHAIN DECOMPOSITION
|
|
84
|
+
|
|
85
|
+
Break every multi-step operation before running end-to-end:
|
|
86
|
+
1. Number every distinct step
|
|
87
|
+
2. Per step: input shape, output shape, success condition, failure mode
|
|
88
|
+
3. Run each step in isolation — witness — assign mutable — KNOWN before next
|
|
89
|
+
4. Debug adjacent pairs for handoff correctness
|
|
90
|
+
5. Only when all pairs pass: run full chain end-to-end
|
|
91
|
+
|
|
92
|
+
Step failure revealing new unknown → snake to `planning`.
|
|
62
93
|
|
|
63
|
-
|
|
94
|
+
## BROWSER DEBUGGING
|
|
64
95
|
|
|
65
|
-
|
|
96
|
+
Invoke `agent-browser` skill. Escalation — exhaust each before advancing:
|
|
97
|
+
1. `exec:agent-browser\n<js>` — query DOM/state. Always first.
|
|
98
|
+
2. `agent-browser` skill + `__gm` globals — instrument and capture
|
|
99
|
+
3. navigate/click/type — only when real events required
|
|
100
|
+
4. screenshot — last resort
|
|
66
101
|
|
|
67
|
-
|
|
102
|
+
`__gm` scaffold:
|
|
68
103
|
```js
|
|
69
104
|
window.__gm = { captures: [], log: (...a) => window.__gm.captures.push({t:Date.now(),a}), assert: (l,c) => { window.__gm.captures.push({l,pass:!!c,val:c}); return !!c; }, dump: () => JSON.stringify(window.__gm.captures,null,2) };
|
|
70
105
|
```
|
|
71
106
|
|
|
72
|
-
## DUAL-SIDE VALIDATION
|
|
73
|
-
|
|
74
|
-
Backend via `exec:nodejs`, frontend via `agent-browser` + `__gm`. Neither substitutes. Single-side = UNKNOWN mutable = blocked gate.
|
|
75
|
-
|
|
76
107
|
## GROUND TRUTH
|
|
77
108
|
|
|
78
|
-
Real services, real
|
|
79
|
-
|
|
80
|
-
## CONSTRAINTS (EXECUTE-PHASE)
|
|
109
|
+
Real services, real data, real timing. Mocks/fakes/stubs = delete immediately. No .test.js/.spec.js. Delete on discovery.
|
|
81
110
|
|
|
82
|
-
|
|
83
|
-
**Tier 1 (CRITICAL)**: max_file_lines=200, hot_reloadable, checkpoint_state
|
|
111
|
+
## CONSTRAINTS
|
|
84
112
|
|
|
85
|
-
**Never**: fake data |
|
|
113
|
+
**Never**: `Bash(node/npm/npx/bun)` | fake data | mock files | Glob/Grep/Explore | sequential independent items | absorb surprises silently
|
|
86
114
|
|
|
87
|
-
**Always**: import real modules |
|
|
115
|
+
**Always**: witness every hypothesis | import real modules | snake to planning on any new unknown | fix immediately on discovery
|
|
88
116
|
|
|
89
117
|
---
|
|
90
118
|
|
|
91
|
-
**→
|
|
119
|
+
**→ FORWARD**: All mutables KNOWN → invoke `gm-emit` skill.
|
|
120
|
+
**↺ SELF-LOOP**: Still UNKNOWN → re-run (max 2 passes).
|
|
121
|
+
**↩ SNAKE to PLAN**: Any new unknown → invoke `planning` skill, restart chain.
|
package/skills/planning/SKILL.md
CHANGED
|
@@ -1,78 +1,84 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: planning
|
|
3
|
-
description:
|
|
3
|
+
description: Mutable discovery and PRD construction. Invoke at session start and any time new unknowns surface during execution. Loop until no new mutables are discovered.
|
|
4
4
|
allowed-tools: Write
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# PRD Construction
|
|
7
|
+
# PRD Construction — Mutable Discovery Loop
|
|
8
8
|
|
|
9
|
-
You are in the **PLAN** phase.
|
|
9
|
+
You are in the **PLAN** phase. Your job is to discover every unknown before execution begins.
|
|
10
10
|
|
|
11
11
|
**GRAPH POSITION**: `[PLAN] → EXECUTE → EMIT → VERIFY → COMPLETE`
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **Exit**: .prd written to disk → invoke `gm-execute` skill to begin EXECUTE phase.
|
|
12
|
+
- **Entry chain**: prompt-submit hook → `gm` skill → `planning` skill (here).
|
|
13
|
+
- **Also entered**: any time a new unknown surfaces in EXECUTE, EMIT, or VERIFY.
|
|
15
14
|
|
|
16
|
-
##
|
|
15
|
+
## TRANSITIONS
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
**FORWARD**:
|
|
18
|
+
- No new mutables discovered in latest pass → .prd is complete → invoke `gm-execute` skill
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**SELF-LOOP (stay in PLAN)**:
|
|
21
|
+
- Each planning pass may surface new unknowns → add them to .prd → plan again
|
|
22
|
+
- Loop until a full pass produces zero new items
|
|
23
|
+
- Do not advance to EXECUTE while unknowns remain discoverable through reasoning alone
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
**BACKWARD (snakes back here from later phases)**:
|
|
26
|
+
- From EXECUTE: execution reveals an unknown not in .prd → snake here, add it, re-plan
|
|
27
|
+
- From EMIT: scope shifted mid-write → snake here, revise affected items, re-plan
|
|
28
|
+
- From VERIFY: end-to-end reveals requirement was wrong → snake here, rewrite items, re-plan
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
## WHAT PLANNING MEANS
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
Planning = exhaustive mutable discovery. For every aspect of the task ask:
|
|
33
|
+
- What do I not know? → name it as a mutable
|
|
34
|
+
- What could go wrong? → name it as an edge case item
|
|
35
|
+
- What depends on what? → map blocking/blockedBy
|
|
36
|
+
- What assumptions am I making? → validate each as a mutable
|
|
37
|
+
|
|
38
|
+
**Iterate until**: a full reasoning pass adds zero new items to .prd.
|
|
39
|
+
|
|
40
|
+
Categories of unknowns to enumerate: file existence | API shape | data format | dependency versions | runtime behavior | environment differences | error conditions | concurrency | integration points | backwards compatibility | rollback paths | deployment steps | verification criteria
|
|
41
|
+
|
|
42
|
+
## .PRD SCHEMA
|
|
43
|
+
|
|
44
|
+
Path: exactly `./.prd` in current working directory. Valid JSON array.
|
|
27
45
|
|
|
28
46
|
```json
|
|
29
47
|
{
|
|
30
48
|
"id": "descriptive-kebab-id",
|
|
31
|
-
"subject": "Imperative verb
|
|
49
|
+
"subject": "Imperative verb phrase — what must be true when done",
|
|
32
50
|
"status": "pending",
|
|
33
|
-
"description": "
|
|
34
|
-
"blocking": ["ids
|
|
35
|
-
"blockedBy": ["ids
|
|
51
|
+
"description": "Precise completion criterion",
|
|
52
|
+
"blocking": ["ids this prevents from starting"],
|
|
53
|
+
"blockedBy": ["ids that must complete first"],
|
|
36
54
|
"effort": "small|medium|large",
|
|
37
|
-
"category": "feature|bug|refactor|
|
|
38
|
-
"acceptance": ["measurable criteria"],
|
|
39
|
-
"edge_cases": ["known
|
|
55
|
+
"category": "feature|bug|refactor|infra",
|
|
56
|
+
"acceptance": ["measurable, binary criteria"],
|
|
57
|
+
"edge_cases": ["known failure modes and boundary conditions"]
|
|
40
58
|
}
|
|
41
59
|
```
|
|
42
60
|
|
|
43
|
-
**
|
|
44
|
-
**
|
|
45
|
-
**
|
|
46
|
-
**Blocking/blockedBy**: bidirectional. Every dependency explicit.
|
|
47
|
-
|
|
48
|
-
## Construction
|
|
49
|
-
|
|
50
|
-
1. Enumerate every possible unknown as a work item.
|
|
51
|
-
2. Map every possible dependency (blocking/blockedBy).
|
|
52
|
-
3. Group independent items into parallel waves (max 3 per wave).
|
|
53
|
-
4. Capture every edge case as either a separate item or edge_case field.
|
|
54
|
-
5. Write `./.prd` to disk.
|
|
55
|
-
6. **FREEZE** — no additions after creation. Only mutation: removing finished items.
|
|
56
|
-
|
|
57
|
-
## Execution
|
|
58
|
-
|
|
59
|
-
1. Find all `pending` items with empty `blockedBy`.
|
|
60
|
-
2. Launch ≤3 parallel subagents (`subagent_type: gm:gm`) per wave.
|
|
61
|
-
3. Each subagent completes one item, verifies via witnessed execution.
|
|
62
|
-
4. On completion: remove item from `.prd`, write updated file.
|
|
63
|
-
5. Check for newly unblocked items. Launch next wave.
|
|
64
|
-
6. Continue until `.prd` is empty.
|
|
61
|
+
**Status flow**: `pending` → `in_progress` → `completed` (completed items are removed from file).
|
|
62
|
+
**Effort**: `small` = single execution, under 15min | `medium` = 2-3 rounds, under 45min | `large` = multiple rounds, over 1h.
|
|
63
|
+
**blocking/blockedBy**: always bidirectional. Every dependency must be explicit in both directions.
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
## EXECUTION WAVES
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
Independent items (empty `blockedBy`) run in parallel waves of ≤3 subagents.
|
|
68
|
+
- Find all pending items with empty `blockedBy`
|
|
69
|
+
- Launch ≤3 parallel `gm:gm` subagents via Task tool
|
|
70
|
+
- Each subagent handles one item: resolves it, witnesses output, removes from .prd
|
|
71
|
+
- After each wave: check newly unblocked items, launch next wave
|
|
72
|
+
- Never run independent items sequentially. Never launch more than 3 at once.
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
## COMPLETION CRITERION
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
.prd is ready when: one full reasoning pass produces zero new items AND all items have explicit acceptance criteria AND all dependencies are mapped.
|
|
73
77
|
|
|
74
|
-
Skip
|
|
78
|
+
**Skip planning entirely** if: task is single-step, trivially bounded, zero unknowns, under 5 minutes.
|
|
75
79
|
|
|
76
80
|
---
|
|
77
81
|
|
|
78
|
-
**→
|
|
82
|
+
**→ FORWARD**: No new mutables → invoke `gm-execute` skill.
|
|
83
|
+
**↺ SELF-LOOP**: New items discovered → add to .prd → plan again.
|
|
84
|
+
**↩ SNAKE here**: New unknown surfaces in any later phase → add it, re-plan, re-advance.
|