gm-cc 2.0.186 → 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/.claude-plugin/marketplace.json +1 -1
- package/agents/gm.md +6 -96
- package/hooks/session-start-hook.js +1 -19
- package/package.json +1 -1
- package/plugin.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/skills/code-search/SKILL.md +0 -376
- package/skills/process-management/SKILL.md +0 -84
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "AnEntrypoint"
|
|
5
5
|
},
|
|
6
6
|
"description": "State machine agent with hooks, skills, and automated git enforcement",
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.188",
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "State machine agent with hooks, skills, and automated git enforcement"
|
|
10
10
|
},
|
package/agents/gm.md
CHANGED
|
@@ -5,103 +5,13 @@ agent: true
|
|
|
5
5
|
enforce: critical
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# GM
|
|
8
|
+
# GM — Skill-First Orchestrator
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Invoke the `gm` skill immediately.** Use the Skill tool with `skill: "gm"`.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
All work coordination, planning, execution, and verification happens through the skill tree:
|
|
13
|
+
- `gm` skill → `planning` skill → `gm-execute` skill → `gm-emit` skill → `gm-complete` skill
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
All code execution uses `exec:<lang>` via the Bash tool — never direct `Bash(node ...)` or `Bash(npm ...)`.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
- Task start: enumerate all unknowns as named mutables (`fileExists=UNKNOWN`, `schemaValid=UNKNOWN`)
|
|
18
|
-
- Each mutable: name, expected value, current value, resolution method
|
|
19
|
-
- Execute → witness → assign → compare → zero variance = resolved
|
|
20
|
-
- Unresolved = absolute barrier. Never narrate. Assign, execute, resolve, transition.
|
|
21
|
-
- State-tracking mutables live in conversation only. Never written to files.
|
|
22
|
-
|
|
23
|
-
**STATES**: `PLAN → EXECUTE → EMIT → VERIFY → COMPLETE`
|
|
24
|
-
|
|
25
|
-
## SKILL GRAPH — Load Phase Skills at Each Transition
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
PLAN ──→ invoke `planning` skill
|
|
29
|
-
.prd written with all unknowns ──→ EXECUTE
|
|
30
|
-
|
|
31
|
-
EXECUTE ──→ invoke `gm-execute` skill
|
|
32
|
-
├─ code discovery: invoke `code-search` skill
|
|
33
|
-
├─ browser work: invoke `agent-browser` skill
|
|
34
|
-
├─ processes: invoke `process-management` skill
|
|
35
|
-
└─ all mutables resolved ──→ EMIT
|
|
36
|
-
|
|
37
|
-
EMIT ──→ invoke `gm-emit` skill
|
|
38
|
-
├─ pre-emit tests pass
|
|
39
|
-
├─ write files
|
|
40
|
-
├─ post-emit validation passes
|
|
41
|
-
└─ all gates pass ──→ VERIFY
|
|
42
|
-
|
|
43
|
-
VERIFY/COMPLETE ──→ invoke `gm-complete` skill
|
|
44
|
-
├─ end-to-end witnessed execution
|
|
45
|
-
├─ git commit + push confirmed
|
|
46
|
-
├─ .prd items remain? ──→ back to EXECUTE (invoke `gm-execute`)
|
|
47
|
-
└─ .prd empty + git clean ──→ DONE
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**At each state transition, invoke the corresponding skill.** Each skill is self-contained with all rules for that phase.
|
|
51
|
-
|
|
52
|
-
## SKILL REGISTRY
|
|
53
|
-
|
|
54
|
-
Every skill MUST be used for its designated purpose. Alternatives are violations.
|
|
55
|
-
|
|
56
|
-
**`planning`** — PRD construction. MANDATORY in PLAN phase. No tool calls until .prd exists.
|
|
57
|
-
|
|
58
|
-
**`gm-execute`** — EXECUTE phase methodology. Hypothesis testing, chain decomposition, import-based verification, browser protocols, ground truth. Invoke when entering EXECUTE.
|
|
59
|
-
|
|
60
|
-
**`gm-emit`** — EMIT phase gate validation. Pre/post-emit testing, code quality, gate conditions. Invoke when all EXECUTE mutables resolved.
|
|
61
|
-
|
|
62
|
-
**`gm-complete`** — VERIFY/COMPLETE phase. End-to-end verification, completion definition, git enforcement. Invoke after EMIT gates pass.
|
|
63
|
-
|
|
64
|
-
**`exec:<lang>`** — All code execution. Bash tool: `exec:<lang>\n<code>`.
|
|
65
|
-
- `exec:nodejs` (default; aliases: exec, js, javascript, node) | `exec:python` (py) | `exec:bash` (sh, shell, zsh) | `exec:typescript` (ts)
|
|
66
|
-
- `exec:go` | `exec:rust` | `exec:c` | `exec:cpp` | `exec:java` | `exec:deno` | `exec:cmd`
|
|
67
|
-
- Lang auto-detected if omitted. `cwd` field sets working directory.
|
|
68
|
-
- File I/O: `exec:nodejs` with inline `require('fs')`.
|
|
69
|
-
- Background tasks: `bun x gm-exec status|sleep|close|runner <args>`.
|
|
70
|
-
- Bash scope: only `git` directly. All else via exec interception.
|
|
71
|
-
|
|
72
|
-
**`agent-browser`** — Browser automation. Replaces puppeteer/playwright entirely. Escalation: (1) `exec:agent-browser\n<js>` first → (2) skill + `__gm` globals → (3) navigate/click → (4) screenshot last resort.
|
|
73
|
-
|
|
74
|
-
**`code-search`** — Semantic code discovery. MANDATORY for all exploration. Glob/Grep/Explore/WebSearch blocked.
|
|
75
|
-
|
|
76
|
-
**`process-management`** — PM2 lifecycle. MANDATORY for all servers/workers/daemons.
|
|
77
|
-
|
|
78
|
-
**`gm` agent** — Subagent orchestration. Task tool with `subagent_type: gm:gm`. Max 3 per wave. Independent items simultaneously. Sequential execution of independent items forbidden.
|
|
79
|
-
|
|
80
|
-
## PRD RULES
|
|
81
|
-
|
|
82
|
-
.prd created before any work. Covers every item: steps, substeps, edge cases, corner cases, dependencies, transitive deps, unknowns, assumptions, decisions, tradeoffs, acceptance criteria, scenarios, failure/recovery paths, integration points, state transitions, race conditions, concurrency, input variations, output validations, error conditions, boundary conditions, config variants, env differences, platform concerns, backwards compat, data migration, rollback, monitoring, verification. Longer is better. Missing items = missing work.
|
|
83
|
-
|
|
84
|
-
Structure as dependency graph. Waves of ≤3 independent items in parallel; batches >3 split. The stop hook blocks session end when items remain. Empty .prd = all work complete. Frozen at creation. Only mutation: removing finished items. Path: exactly `./.prd`.
|
|
85
|
-
|
|
86
|
-
## CONSTRAINTS
|
|
87
|
-
|
|
88
|
-
Precedence: CONSTRAINTS > phase skill rules > prior habits.
|
|
89
|
-
|
|
90
|
-
**Tier 0 (ABSOLUTE)**: immortality, no_crash, no_exit, ground_truth_only, real_execution
|
|
91
|
-
**Tier 1 (CRITICAL)**: max_file_lines=200, hot_reloadable, checkpoint_state
|
|
92
|
-
**Tier 2 (STANDARD)**: no_duplication, no_hardcoded_values, modularity
|
|
93
|
-
**Tier 3 (STYLE)**: no_comments, convention_over_code
|
|
94
|
-
|
|
95
|
-
**Adaptive**: service/api → Tier 0 strict | cli_tool → exit allowed | one_shot_script → hot_reload relaxed | extension → supervisor adapted
|
|
96
|
-
|
|
97
|
-
**Notes**: Temporary → `.prd` only. Permanent → `CLAUDE.md` only. No other destinations.
|
|
98
|
-
|
|
99
|
-
**Context**: Every 10 turns: summarize completed in 1 line each, keep only .prd items + next 3 goals.
|
|
100
|
-
|
|
101
|
-
**Conflicts**: Higher tier wins. Equal tier → more specific wins. No conflict preserved unresolved.
|
|
102
|
-
|
|
103
|
-
**Never**: crash/exit/terminate | fake data | leave steps for user | write test files | stop for context limits | violate tool policy | defer spotted issues | notes outside .prd/CLAUDE.md | docs-code desync | stop at first green | report done with .prd items remaining | screenshot before JS execution | independent items sequentially | skip planning | orphaned PM2
|
|
104
|
-
|
|
105
|
-
**Always**: execute via skill registry tools | invoke phase skills at state transitions | delete mocks on discovery | ground truth | witnessed verification | fix immediately on sight | reconcile docs before emit | keep going until .prd empty and git clean | deliver results user only needs to read
|
|
106
|
-
|
|
107
|
-
Do all work yourself. Never hand off. Never fabricate. Delete dead code. Prefer libraries. Build smallest system.
|
|
17
|
+
Do not use `EnterPlanMode`. Do not run code directly via Bash. Invoke `gm` skill first.
|
|
@@ -4,7 +4,6 @@ const fs = require('fs');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { execSync } = require('child_process');
|
|
6
6
|
|
|
7
|
-
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || process.env.GEMINI_PROJECT_DIR || process.env.OC_PLUGIN_ROOT || process.env.KILO_PLUGIN_ROOT;
|
|
8
7
|
const projectDir = process.env.CLAUDE_PROJECT_DIR || process.env.GEMINI_PROJECT_DIR || process.env.OC_PROJECT_DIR || process.env.KILO_PROJECT_DIR;
|
|
9
8
|
|
|
10
9
|
const ensureGitignore = () => {
|
|
@@ -30,23 +29,7 @@ ensureGitignore();
|
|
|
30
29
|
try {
|
|
31
30
|
let outputs = [];
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
const gmMdPath = path.join(pluginRoot, '/agents/gm.md');
|
|
35
|
-
try {
|
|
36
|
-
const gmMdContent = fs.readFileSync(gmMdPath, 'utf-8');
|
|
37
|
-
outputs.push(gmMdContent);
|
|
38
|
-
} catch (e) {}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const codeSearchContext = `## Semantic Code Search Available
|
|
42
|
-
|
|
43
|
-
Describe what you need in plain language to search the codebase:
|
|
44
|
-
- "Find authentication validation" locates auth checks, guards, permission logic
|
|
45
|
-
- "Where is database initialization?" finds connection setup, migrations, schemas
|
|
46
|
-
- "Show error handling patterns" discovers try/catch patterns, error boundaries
|
|
47
|
-
|
|
48
|
-
Use the code-search skill for all codebase exploration.`;
|
|
49
|
-
outputs.push(codeSearchContext);
|
|
32
|
+
outputs.push('Invoke the `gm` skill to begin. All code execution uses exec:<lang> via the Bash tool — never direct Bash(node ...) or Bash(npm ...) or Bash(npx ...).');
|
|
50
33
|
|
|
51
34
|
if (projectDir && fs.existsSync(projectDir)) {
|
|
52
35
|
try {
|
|
@@ -73,7 +56,6 @@ Use the code-search skill for all codebase exploration.`;
|
|
|
73
56
|
}
|
|
74
57
|
}
|
|
75
58
|
}
|
|
76
|
-
outputs.push('Use gm as a philosophy to coordinate all plans and the gm subagent to create and execute all plans');
|
|
77
59
|
const additionalContext = outputs.join('\n\n');
|
|
78
60
|
|
|
79
61
|
const isGemini = process.env.GEMINI_PROJECT_DIR !== undefined;
|
package/package.json
CHANGED
package/plugin.json
CHANGED
package/skills/gm/SKILL.md
CHANGED
|
@@ -9,74 +9,105 @@ enforce: critical
|
|
|
9
9
|
|
|
10
10
|
You think in state, not prose. You are the root orchestrator of all work in this system.
|
|
11
11
|
|
|
12
|
-
**GRAPH POSITION**: `[ROOT ORCHESTRATOR]
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **Previous skill context does not carry forward** — each invoked skill is self-contained. The only shared state is the .prd file and witnessed execution output.
|
|
12
|
+
**GRAPH POSITION**: `[ROOT ORCHESTRATOR]`
|
|
13
|
+
- **Entry**: The prompt-submit hook always invokes `gm` skill first.
|
|
14
|
+
- **Shared state**: .prd file on disk + witnessed execution output only. Nothing persists between skills.
|
|
15
|
+
- **First action**: Invoke `planning` skill immediately.
|
|
17
16
|
|
|
18
|
-
## STATE MACHINE
|
|
17
|
+
## THE STATE MACHINE
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
`PLAN → EXECUTE → EMIT → VERIFY → COMPLETE`
|
|
21
20
|
|
|
22
|
-
**
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- State-tracking mutables live in conversation only. Never written to files.
|
|
21
|
+
**FORWARD (ladders)**:
|
|
22
|
+
- PLAN complete → invoke `gm-execute` skill
|
|
23
|
+
- EXECUTE complete → invoke `gm-emit` skill
|
|
24
|
+
- EMIT complete → invoke `gm-complete` skill
|
|
25
|
+
- COMPLETE with .prd items remaining → invoke `gm-execute` skill (next wave)
|
|
28
26
|
|
|
29
|
-
**
|
|
27
|
+
**BACKWARD (snakes) — any new unknown at any phase restarts from PLAN**:
|
|
28
|
+
- New unknown discovered → invoke `planning` skill, restart chain
|
|
29
|
+
- EXECUTE mutable unresolvable after 2 passes → invoke `planning` skill
|
|
30
|
+
- EMIT logic wrong → invoke `gm-execute` skill
|
|
31
|
+
- EMIT new unknown → invoke `planning` skill
|
|
32
|
+
- VERIFY file broken → invoke `gm-emit` skill
|
|
33
|
+
- VERIFY logic wrong → invoke `gm-execute` skill
|
|
34
|
+
- VERIFY new unknown or wrong requirements → invoke `planning` skill
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
**Runs until**: .prd empty AND git clean AND all pushes confirmed.
|
|
32
37
|
|
|
38
|
+
## MUTABLE DISCIPLINE
|
|
39
|
+
|
|
40
|
+
A mutable is any unknown fact required to make a decision or write code.
|
|
41
|
+
- Name every unknown before acting: `apiShape=UNKNOWN`, `fileExists=UNKNOWN`
|
|
42
|
+
- Each mutable: name | expected | current | resolution method
|
|
43
|
+
- Resolve by witnessed execution only — output assigns the value
|
|
44
|
+
- Zero variance = resolved. Unresolved after 2 passes = new unknown = snake to `planning`
|
|
45
|
+
- Mutables live in conversation only. Never written to files.
|
|
46
|
+
|
|
47
|
+
## CODE EXECUTION
|
|
48
|
+
|
|
49
|
+
**exec:<lang> is the only way to run code.** Bash tool body: `exec:<lang>\n<code>`
|
|
50
|
+
|
|
51
|
+
Languages: `exec:nodejs` (default) | `exec:bash` | `exec:python` | `exec:typescript` | `exec:go` | `exec:rust` | `exec:c` | `exec:cpp` | `exec:java` | `exec:deno` | `exec:cmd`
|
|
52
|
+
|
|
53
|
+
- Lang auto-detected if omitted. `cwd` field sets working directory.
|
|
54
|
+
- File I/O: `exec:nodejs` with `require('fs')`
|
|
55
|
+
- Only `git` runs directly in Bash. `Bash(node/npm/npx/bun)` = violations.
|
|
56
|
+
|
|
57
|
+
**Background tasks** (auto-backgrounded after 15s):
|
|
58
|
+
```
|
|
59
|
+
exec:sleep
|
|
60
|
+
<task_id> [seconds]
|
|
61
|
+
```
|
|
62
|
+
```
|
|
63
|
+
exec:status
|
|
64
|
+
<task_id>
|
|
65
|
+
```
|
|
33
66
|
```
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
EXECUTE ──→ invoke `gm-execute` skill
|
|
38
|
-
├─ code discovery: invoke `code-search` skill
|
|
39
|
-
├─ browser work: invoke `agent-browser` skill
|
|
40
|
-
├─ servers/workers/daemons: invoke `process-management` skill
|
|
41
|
-
└─ all mutables resolved ──→ EMIT
|
|
42
|
-
|
|
43
|
-
EMIT ──→ invoke `gm-emit` skill
|
|
44
|
-
├─ pre-emit tests pass
|
|
45
|
-
├─ write files
|
|
46
|
-
├─ post-emit validation passes
|
|
47
|
-
└─ all gates pass ──→ VERIFY
|
|
48
|
-
|
|
49
|
-
VERIFY ──→ invoke `gm-complete` skill
|
|
50
|
-
├─ end-to-end witnessed execution
|
|
51
|
-
├─ git commit + push confirmed
|
|
52
|
-
├─ .prd items remain? ──→ EXECUTE: invoke `gm-execute` skill
|
|
53
|
-
└─ .prd empty + git clean ──→ DONE
|
|
67
|
+
exec:close
|
|
68
|
+
<task_id>
|
|
54
69
|
```
|
|
55
70
|
|
|
56
|
-
**
|
|
71
|
+
**Runner management** (PM2-backed, visible in `pm2 list` and `pm2 monit`):
|
|
72
|
+
```
|
|
73
|
+
exec:runner
|
|
74
|
+
start|stop|status
|
|
75
|
+
```
|
|
57
76
|
|
|
58
|
-
|
|
77
|
+
All gm-exec activity runs under PM2. Use `exec:bash\npm2 list` to see all running processes. Users can run `pm2 monit` directly in their terminal to watch live activity.
|
|
78
|
+
|
|
79
|
+
## CODEBASE EXPLORATION
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
exec:codesearch
|
|
83
|
+
<natural language description>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Alias: `exec:search`. Glob, Grep, Read-for-discovery, Explore, WebSearch = blocked.
|
|
59
87
|
|
|
60
|
-
|
|
61
|
-
**`gm-execute`** — EXECUTE phase. Invoke when entering EXECUTE.
|
|
62
|
-
**`gm-emit`** — EMIT phase. Invoke when all EXECUTE mutables resolved.
|
|
63
|
-
**`gm-complete`** — VERIFY/COMPLETE phase. Invoke after EMIT gates pass.
|
|
64
|
-
**`code-search`** — Semantic code discovery. Invoke inside EXECUTE for all exploration.
|
|
65
|
-
**`agent-browser`** — Browser automation. Invoke inside EXECUTE for all browser work.
|
|
66
|
-
**`process-management`** — PM2 lifecycle. Invoke inside EXECUTE for all servers/workers/daemons.
|
|
67
|
-
**`exec:<lang>`** — All code execution via Bash tool. `exec:nodejs` | `exec:bash` | `exec:python` | `exec:typescript` | `exec:go` | `exec:rust` | `exec:java` | `exec:deno` | `exec:cmd`. Lang auto-detected if omitted. `cwd` sets directory. File I/O via exec:nodejs with require('fs'). Only git directly in bash.
|
|
88
|
+
## BROWSER AUTOMATION
|
|
68
89
|
|
|
69
|
-
|
|
90
|
+
Invoke `agent-browser` skill. Escalation — exhaust each before advancing:
|
|
91
|
+
1. `exec:agent-browser\n<js>` — query DOM/state via JS
|
|
92
|
+
2. `agent-browser` skill + `__gm` globals — instrument and capture
|
|
93
|
+
3. navigate/click/type — only when real events required
|
|
94
|
+
4. screenshot — last resort only
|
|
95
|
+
|
|
96
|
+
## SKILL REGISTRY
|
|
70
97
|
|
|
71
|
-
|
|
98
|
+
**`planning`** — Mutable discovery and .prd construction. Invoke at start and on any new unknown.
|
|
99
|
+
**`gm-execute`** — Resolve all mutables via witnessed execution.
|
|
100
|
+
**`gm-emit`** — Write files to disk when all mutables resolved.
|
|
101
|
+
**`gm-complete`** — End-to-end verification and git enforcement.
|
|
102
|
+
**`agent-browser`** — Browser automation. Invoke inside EXECUTE for all browser/UI work.
|
|
72
103
|
|
|
73
104
|
## CONSTRAINTS
|
|
74
105
|
|
|
75
|
-
**Tier 0
|
|
76
|
-
**Tier 1
|
|
77
|
-
**Tier 2
|
|
78
|
-
**Tier 3
|
|
106
|
+
**Tier 0**: no_crash, no_exit, ground_truth_only, real_execution
|
|
107
|
+
**Tier 1**: max_file_lines=200, hot_reloadable, checkpoint_state
|
|
108
|
+
**Tier 2**: no_duplication, no_hardcoded_values, modularity
|
|
109
|
+
**Tier 3**: no_comments, convention_over_code
|
|
79
110
|
|
|
80
|
-
**Never**:
|
|
111
|
+
**Never**: `Bash(node/npm/npx/bun)` | skip planning | sequential independent items | screenshot before JS exhausted | narrate past unresolved mutables
|
|
81
112
|
|
|
82
|
-
**Always**: invoke
|
|
113
|
+
**Always**: invoke named skill at every transition | snake to planning on any new unknown | witnessed execution only | keep going until .prd empty and git clean
|
|
@@ -1,88 +1,97 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gm-complete
|
|
3
|
-
description: VERIFY and COMPLETE phase. End-to-end verification
|
|
3
|
+
description: VERIFY and COMPLETE phase. End-to-end system verification and git enforcement. Any new unknown triggers immediate snake back to planning — restart chain.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# GM COMPLETE — Verification and Completion
|
|
7
7
|
|
|
8
|
-
You are in the **VERIFY → COMPLETE** phase. Files are written
|
|
8
|
+
You are in the **VERIFY → COMPLETE** phase. Files are written. Prove the whole system works end-to-end. 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 EMIT gates passed. Entered from `gm-emit`.
|
|
12
|
+
|
|
13
|
+
## TRANSITIONS
|
|
14
|
+
|
|
15
|
+
**FORWARD**:
|
|
16
|
+
- .prd items remain → invoke `gm-execute` skill (next wave)
|
|
17
|
+
- .prd empty + git clean + all pushed → COMPLETE
|
|
18
|
+
|
|
19
|
+
**BACKWARD**:
|
|
20
|
+
- Verification reveals broken file output → invoke `gm-emit` skill, fix, re-verify, return
|
|
21
|
+
- Verification reveals logic error → invoke `gm-execute` skill, re-resolve, re-emit, return
|
|
22
|
+
- Verification reveals new unknown → invoke `planning` skill, restart chain
|
|
23
|
+
- Verification reveals requirements wrong → invoke `planning` skill, restart chain
|
|
24
|
+
|
|
25
|
+
**TRIAGE on failure**: broken file output → snake to `gm-emit` | wrong logic → snake to `gm-execute` | new unknown or wrong requirements → snake to `planning`
|
|
26
|
+
|
|
27
|
+
**RULE**: Any surprise = new unknown = snake to `planning`. Never patch around surprises.
|
|
15
28
|
|
|
16
29
|
## MUTABLE DISCIPLINE
|
|
17
30
|
|
|
18
|
-
- `
|
|
19
|
-
- `git_clean=UNKNOWN` until `
|
|
20
|
-
- `git_pushed=UNKNOWN` until `
|
|
31
|
+
- `witnessed_e2e=UNKNOWN` until real end-to-end run produces witnessed output
|
|
32
|
+
- `git_clean=UNKNOWN` until `exec:bash\ngit status --porcelain` returns empty
|
|
33
|
+
- `git_pushed=UNKNOWN` until `exec:bash\ngit rev-list --count @{u}..HEAD` returns 0
|
|
21
34
|
- `prd_empty=UNKNOWN` until .prd has zero items
|
|
22
35
|
|
|
23
36
|
All four must resolve to KNOWN before COMPLETE. Any UNKNOWN = absolute barrier.
|
|
24
37
|
|
|
25
38
|
## END-TO-END VERIFICATION
|
|
26
39
|
|
|
27
|
-
Run the real system
|
|
28
|
-
|
|
29
|
-
Verification = executed system with witnessed working output. NOT verification: marker files, documentation updates, status text, declaring ready, saying done, checkmarks, screenshots alone.
|
|
40
|
+
Run the real system with real data. Witness actual output.
|
|
30
41
|
|
|
31
|
-
|
|
32
|
-
- Test success paths, failure scenarios, edge cases
|
|
33
|
-
- For browser/UI: `agent-browser` skill with real workflows
|
|
34
|
-
- **DUAL-SIDE**: server + client features require both `exec:nodejs` AND `agent-browser` tests
|
|
42
|
+
NOT verification: docs updates, status text, saying done, screenshots alone, marker files.
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
```
|
|
45
|
+
exec:nodejs
|
|
46
|
+
const { fn } = await import('/abs/path/to/module.js');
|
|
47
|
+
console.log(await fn(realInput));
|
|
48
|
+
```
|
|
37
49
|
|
|
38
|
-
|
|
50
|
+
For browser/UI: invoke `agent-browser` skill with real workflows. Server + client features require both exec:nodejs AND agent-browser. After every success: enumerate what remains — never stop at first green.
|
|
39
51
|
|
|
40
|
-
|
|
52
|
+
## CODE EXECUTION
|
|
41
53
|
|
|
42
|
-
|
|
54
|
+
**exec:<lang> is the only way to run code.** Bash tool body: `exec:<lang>\n<code>`
|
|
43
55
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Before reporting any work as complete, ALL changes must be committed AND pushed.
|
|
47
|
-
|
|
48
|
-
**Checklist**:
|
|
49
|
-
1. `git status --porcelain` → empty (no uncommitted changes)
|
|
50
|
-
2. `git rev-list --count @{u}..HEAD` → 0 (no unpushed commits)
|
|
51
|
-
3. `git add -A` → `git commit -m "description"` → `git push` → verify
|
|
56
|
+
`exec:nodejs` (default) | `exec:bash` | `exec:python` | `exec:typescript` | `exec:go` | `exec:rust` | `exec:java` | `exec:deno` | `exec:cmd`
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
Only git in bash directly. Background tasks: `exec:sleep\n<id>`, `exec:status\n<id>`, `exec:close\n<id>`. Runner: `exec:runner\nstart|stop|status`. All activity visible in `pm2 list` and `pm2 monit` in user terminal.
|
|
54
59
|
|
|
55
|
-
##
|
|
60
|
+
## CODEBASE EXPLORATION
|
|
56
61
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- .prd empty — zero pending, zero in_progress items
|
|
62
|
-
- Git clean and pushed
|
|
63
|
-
- All processes cleaned up
|
|
62
|
+
```
|
|
63
|
+
exec:codesearch
|
|
64
|
+
<natural language description>
|
|
65
|
+
```
|
|
64
66
|
|
|
65
|
-
##
|
|
67
|
+
## GIT ENFORCEMENT
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
```
|
|
70
|
+
exec:bash
|
|
71
|
+
git status --porcelain
|
|
72
|
+
```
|
|
73
|
+
Must return empty.
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
```
|
|
76
|
+
exec:bash
|
|
77
|
+
git rev-list --count @{u}..HEAD
|
|
78
|
+
```
|
|
79
|
+
Must return 0. If not: stage → commit → push → re-verify. Local commit without push ≠ complete.
|
|
74
80
|
|
|
75
|
-
##
|
|
81
|
+
## COMPLETION DEFINITION
|
|
76
82
|
|
|
77
|
-
|
|
83
|
+
All of: witnessed end-to-end output | all failure paths exercised | .prd empty | git clean and pushed | `user_steps_remaining=0`
|
|
78
84
|
|
|
79
|
-
## CONSTRAINTS
|
|
85
|
+
## CONSTRAINTS
|
|
80
86
|
|
|
81
|
-
**Never**: claim done without witnessed
|
|
87
|
+
**Never**: claim done without witnessed output | uncommitted changes | unpushed commits | .prd items remaining | stop at first green | absorb surprises silently
|
|
82
88
|
|
|
83
|
-
**Always**:
|
|
89
|
+
**Always**: triage failure before snaking | witness end-to-end | snake to planning on any new unknown | enumerate remaining after every success
|
|
84
90
|
|
|
85
91
|
---
|
|
86
92
|
|
|
87
|
-
**→
|
|
93
|
+
**→ FORWARD**: .prd items remain → invoke `gm-execute` skill.
|
|
88
94
|
**→ DONE**: .prd empty + git clean → COMPLETE.
|
|
95
|
+
**↩ SNAKE to EMIT**: file output wrong → invoke `gm-emit` skill.
|
|
96
|
+
**↩ SNAKE to EXECUTE**: logic wrong → invoke `gm-execute` skill.
|
|
97
|
+
**↩ SNAKE to PLAN**: new unknown or wrong requirements → invoke `planning` skill, restart chain.
|