gm-cc 2.0.727 → 2.0.1064

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.
Files changed (44) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/agents/gm.md +1 -3
  3. package/agents/memorize.md +22 -2
  4. package/agents/research-worker.md +36 -0
  5. package/agents/textprocessing.md +47 -0
  6. package/bin/bootstrap.js +624 -34
  7. package/bin/plugkit.js +95 -53
  8. package/bin/plugkit.sha256 +6 -6
  9. package/bin/plugkit.version +1 -1
  10. package/bin/rtk.sha256 +6 -0
  11. package/bin/rtk.version +1 -0
  12. package/hooks/hooks.json +2 -46
  13. package/hooks/hooks.spec.json +48 -0
  14. package/package.json +2 -2
  15. package/plugin.json +1 -1
  16. package/skills/browser/SKILL.md +18 -16
  17. package/skills/code-search/SKILL.md +15 -15
  18. package/skills/create-lang-plugin/SKILL.md +22 -26
  19. package/skills/gm/SKILL.md +31 -66
  20. package/skills/gm-cc/SKILL.md +19 -0
  21. package/skills/gm-codex/SKILL.md +19 -0
  22. package/skills/gm-complete/SKILL.md +52 -69
  23. package/skills/gm-copilot-cli/SKILL.md +19 -0
  24. package/skills/gm-cursor/SKILL.md +19 -0
  25. package/skills/gm-emit/SKILL.md +44 -61
  26. package/skills/gm-execute/SKILL.md +42 -84
  27. package/skills/gm-gc/SKILL.md +19 -0
  28. package/skills/gm-jetbrains/SKILL.md +19 -0
  29. package/skills/gm-kilo/SKILL.md +19 -0
  30. package/skills/gm-oc/SKILL.md +19 -0
  31. package/skills/gm-vscode/SKILL.md +19 -0
  32. package/skills/gm-zed/SKILL.md +19 -0
  33. package/skills/governance/SKILL.md +24 -23
  34. package/skills/pages/SKILL.md +42 -92
  35. package/skills/planning/SKILL.md +83 -80
  36. package/skills/research/SKILL.md +43 -0
  37. package/skills/ssh/SKILL.md +15 -9
  38. package/skills/textprocessing/SKILL.md +40 -0
  39. package/skills/update-docs/SKILL.md +27 -21
  40. package/.github/workflows/publish-npm.yml +0 -44
  41. package/hooks/post-tool-use-hook.js +0 -34
  42. package/hooks/pre-tool-use-hook.js +0 -45
  43. package/hooks/prompt-submit-hook.js +0 -19
  44. package/hooks/session-start-hook.js +0 -23
@@ -1,125 +1,83 @@
1
1
  ---
2
2
  name: gm-execute
3
- description: EXECUTE phase AND the foundational execution contract for every skill. Every exec:<lang> run, every witnessed check, every code search, in every phase, follows this skill's discipline. Resolve all mutables via witnessed execution. Any new unknown triggers immediate snake back to planning — restart chain from PLAN.
3
+ description: EXECUTE phase AND the foundational execution contract for every skill. Every spool dispatch run, every witnessed check, every code search, in every phase, follows this skill's discipline. 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 — Resolve Every Unknown
6
+ # GM EXECUTE — Resolve every unknown by witness
7
7
 
8
- GRAPH: `PLAN [EXECUTE] EMIT VERIFYCOMPLETE`. Entry: .prd with named unknowns.
8
+ Entry: `.prd` with named unknowns. Exit: every mutable KNOWN invoke `gm-emit`.
9
9
 
10
- This skill = execution contract for ALL phases. About to run anything load this first.
10
+ A `@<discipline>` sigil propagates from PLAN through every recall, codesearch, and memorize call; reads without one fan across default plus enabled disciplines, writes without one go to default only.
11
11
 
12
- ## TRANSITIONS
12
+ This skill is the execution contract for ALL phases — pre-emit witnesses, post-emit verifies, e2e checks all run on this discipline. Cross-cutting dispositions live in `gm` SKILL.md.
13
13
 
14
- - **EXIT → EMIT**: all mutables KNOWN → invoke `gm-emit`.
15
- - **SELF-LOOP**: still UNKNOWN → re-run different angle (max 2 passes).
16
- - **REGRESS → PLAN**: new unknown | unresolvable after 2 passes.
14
+ ## Transitions
17
15
 
18
- ## MUTABLE DISCIPLINE
16
+ - All mutables KNOWN → `gm-emit`
17
+ - Still UNKNOWN → re-run from a different angle (max 2 passes)
18
+ - New unknown OR unresolvable after 2 passes → `planning`
19
19
 
20
- Each mutable: name | expected | current | resolution method.
20
+ ## Mutable discipline
21
21
 
22
- Resolves to KNOWN only when ALL four pass:
23
- - **ΔS=0** — witnessed output equals expected
24
- - **λ≥2** — two independent paths agree
25
- - **ε intact** — adjacent invariants hold
26
- - **Coverage≥0.70** — enough corpus inspected
22
+ Each mutable carries: name, expected, current, resolution method.
27
23
 
28
- Unresolved after 2 passes = regress to `planning`. Never narrate past an unresolved mutable.
24
+ Resolves to KNOWN only when all four pass:
29
25
 
30
- ## PRIORS DON'T AUTHORIZE
26
+ - **ΔS = 0** — witnessed output equals expected
27
+ - **λ ≥ 2** — two independent paths agree
28
+ - **ε intact** — adjacent invariants hold
29
+ - **Coverage ≥ 0.70** — enough corpus inspected to rule out contradiction
31
30
 
32
- Route candidates from PLAN = `weak_prior` only. Plausibility = right to TEST, not BELIEVE.
33
- weak_prior → witnessed probe → witnessed → feed to EMIT. "The plan says" / "obviously X" = prior, not fact.
31
+ Unresolved after 2 passes regresses to `planning`. Never narrate past an unresolved mutable.
34
32
 
35
- Claims in response prose stand or fall by their last witness. A claim with no witness in this session is a hypothesis, not a finding say so when you state it, and say what would settle it. The next reader (you, next turn) needs to know which lines were earned and which were carried forward.
33
+ Every witness that resolves a mutable writes back to `.gm/mutables.yml` the same step: set `status: witnessed` and fill `witness_evidence` with concrete proof (file:line, codesearch hit, exec output snippet). No write-back = the mutable stays unknown and the EMIT-gate stays closed. The hook reads this file; the agent's memory of "I resolved it" does not unblock anything.
36
34
 
37
- ## VERIFICATION BUDGET
35
+ Route candidates from PLAN are `weak_prior` only. Plausibility is the right to test, not the right to believe. A claim with no witness in the current session is a hypothesis — say so when stating it, and say what would settle it. The next reader (you, next turn) needs to know which lines were earned and which were carried forward.
38
36
 
39
- Spend on `.prd` items in descending order of consequence-if-wrong × distance-from-witnessed. Items whose failure would collapse the headline finding must reach witnessed status before EMIT; items with sub-argument-level consequence need at minimum a stated fallback path.
37
+ ## Verification budget
40
38
 
41
- ## CODE EXECUTION
39
+ Spend on `.prd` items in descending order of consequence-if-wrong × distance-from-witnessed. Items whose failure would collapse the headline finding must reach witnessed status before EMIT; sub-argument-level items need at minimum a stated fallback path.
42
40
 
43
- `exec:<lang>` only via Bash: `exec:<lang>\n<code>`
41
+ ## Code execution
44
42
 
45
- Langs: `nodejs` (default) | `bash` | `python` | `typescript` | `go` | `rust` | `c` | `cpp` | `java` | `deno` | `cmd`
43
+ Code AND utility verbs both run through the file-spool. Write a file to `.gm/exec-spool/in/<lang-or-verb>/<N>.<ext>` — language stems (`in/nodejs/42.js`, `in/python/43.py`, `in/bash/44.sh`, plus typescript, go, rust, c, cpp, java, deno) or verb stems (`in/codesearch/45.txt`, `in/recall/46.txt`, `in/memorize/47.md`, plus wait, sleep, status, close, browser, runner, type, kill-port, forget, feedback, learn-status, learn-debug, learn-build, discipline, pause, health). The spool watcher executes and streams stdout to `out/<N>.out`, stderr to `out/<N>.err`, then writes `out/<N>.json` metadata sidecar at completion (taskId, lang, ok, exitCode, durationMs, timedOut, startedAt, endedAt). Both streams return as systemMessage with `--- stdout ---` / `--- stderr ---` separators. File I/O via a nodejs spool file + `require('fs')`. Only `git` and `gh` run directly in Bash. Never `Bash(node/npm/npx/bun)`, never `Bash(exec:<anything>)`.
46
44
 
47
- File I/O: exec:nodejs + require('fs'). Git directly in Bash. **Never** Bash(node/npm/npx/bun).
45
+ Pack runs: `Promise.allSettled`, each idea own try/catch, under 12s per call. Runner: write `in/runner/<N>.txt` with body `start` | `stop` | `status`.
48
46
 
49
- Pack runs: Promise.allSettled parallel, each idea own try/catch, under 12s per call.
50
- Runner: `exec:runner\nstart|stop|status`
47
+ Every exec daemonizes. The hook tails the task logfile up to 30s wall-clock and returns whatever is there — short tasks complete inside the window and look synchronous; long tasks return a task_id with partial output. Continue with `exec:tail` (drain, bounded), `exec:watch` (resume blocking until match or timeout), or `exec:close` (terminate). Never re-spawn a long task to check on it — that orphans the first one. `exec:wait` is a pure timer; `exec:sleep` blocks on a specific task's output; `exec:watch` is the match-or-timeout primitive. Every execution-platform RPC returns the live list of running tasks for this session — close stragglers via `exec:close\n<id>` so the list stays scannable. Session-end (clear/logout/prompt_input_exit) kills the session's tasks; compaction/handoff preserves them.
51
48
 
52
- ## CODEBASE SEARCH
49
+ Every utility verb dispatches via `in/<verb>/<N>.txt`; the body of the file is the verb's argument. There is no inline form and no Bash-prefix form — both are denied by the hook.
53
50
 
54
- `exec:codesearch` only. Grep/Glob/Find/Explore/grep/rg/find = hook-blocked.
51
+ ## Codebase search
55
52
 
56
- Known absolute path `Read`. Known dir exec:nodejs + fs.readdirSync.
53
+ Codesearch only. Grep, Glob, Find, Explore, raw grep/rg/find inside Bash are all hook-blocked. Write query to `.gm/exec-spool/in/codesearch/<N>.txt`. Read result from `.gm/exec-spool/out/<N>.out`.
57
54
 
58
- ```
59
- exec:codesearch
60
- <two-word query>
61
- ```
55
+ Start two words, change/add one per pass, minimum four attempts before concluding absent. Known absolute path → `Read`. Known directory → nodejs spool file + `fs.readdirSync`.
56
+
57
+ ## Utility verb failure handling
62
58
 
63
- Iterate: change/add one word per pass. Min 4 attempts before concluding absent.
59
+ **Utility verb failures must surface**: memorize, recall, codesearch, and other utility verbs may fail (socket unavailable, timeout, network error). Failures do not block witness completion but must be reported to the user with error context. Fallback mechanisms (AGENTS.md for memorize) ensure memory preservation even when rs-learn is temporarily unavailable.
64
60
 
65
- ## IMPORT-BASED EXECUTION
61
+ ## Import-based execution
66
62
 
67
- Always import actual modules. Reimplemented = UNKNOWN.
63
+ Hypotheses become real by importing actual modules from disk. Reimplemented behavior is UNKNOWN. Write the import probe to the spool:
68
64
 
69
65
  ```
70
- exec:nodejs
66
+ # write .gm/exec-spool/in/nodejs/42.js
71
67
  const { fn } = await import('/abs/path/to/module.js');
72
68
  console.log(await fn(realInput));
73
69
  ```
74
70
 
75
- Differential diagnosis: smallest reproduction → compare actual vs expected → name the delta = mutable.
76
-
77
- ## CI — AUTOMATED
78
-
79
- `git push` → Stop hook auto-watches Actions for pushed HEAD. Same-repo only — downstream cascades not auto-watched.
80
- - Green → Stop approves with summary
81
- - Failure → run names+IDs → `gh run view <id> --log-failed`
82
- - Deadline 180s (override `GM_CI_WATCH_SECS`)
83
-
84
- ## GROUND TRUTH
85
-
86
- Real services, real data, real timing. Mocks/stubs/scattered tests/fallbacks = delete.
87
-
88
- **Scan before edit**: exec:codesearch before creating/modifying. Duplicate concern = regress to `planning`.
89
- **Hypothesize via execution**: hypothesis → run → witness → edit. Never edit on unwitnessed assumption.
90
- **Code quality**: native → library → structure (map/pipeline) → write.
91
-
92
- ## PARALLEL SUBAGENTS
93
-
94
- ≤3 `gm:gm` subagents for independent items in ONE message. Browser escalation: exec:browser → browser skill → screenshot last resort.
71
+ Differential diagnosis: smallest reproduction → compare actual vs expected → name the delta that delta is the mutable.
95
72
 
96
- ## RECALL HARD RULE
97
-
98
- Before resolving any new unknown via fresh execution, recall first.
99
-
100
- ```
101
- exec:recall
102
- <2-6 word query>
103
- ```
104
-
105
- Triggers: "did we hit this" | feels familiar | new sub-task in known project | about to comment a non-obvious choice | about to ask user something likely discussed.
106
-
107
- Hits = weak_prior; still witness. Empty = proceed. Capped 6s, ~5ms when serve running. ~200 tokens / 5 hits.
108
-
109
- ## MEMORIZE — HARD RULE
110
-
111
- Unknown→known = same-turn memorize.
112
-
113
- ```
114
- Agent(subagent_type='gm:memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<fact>')
115
- ```
73
+ ## Edits depend on witnesses
116
74
 
117
- Triggers: exec output answers prior unknown | CI log reveals root cause | code read confirms/refutes | env quirk | user states preference/constraint.
75
+ Hypothesis run witness edit. An edit before a witness is a guess. Scan via codesearch (write to `.gm/exec-spool/in/codesearch/<N>.txt`) before creating or modifying duplicate concern regresses to `planning`. Code-quality preference: native → library → structure → write.
118
76
 
119
- N facts → N parallel Agent calls in ONE message. End-of-turn self-check mandatory.
77
+ ## Parallel subagents
120
78
 
121
- ## CONSTRAINTS
79
+ Up to 3 `gm:gm` subagents for independent items in one message. Browser escalation: write to `.gm/exec-spool/in/browser/<N>.txt` → `browser` skill → screenshot only as last resort.
122
80
 
123
- **Never**: Bash(node/npm/npx/bun) | fake data | mocks | scattered tests | fallbacks | Grep/Glob/Find/Explore | sequential independent items | respond mid-phase | edit before witnessing | duplicate code | if/else where dispatch suffices | one-liners that obscure | reinvent native/library
81
+ ## CI is automated
124
82
 
125
- **Always**: witness every hypothesis | import real modules | scan before edit | regress on new unknown | delete mocks/comments/scattered tests on discovery | update test.js for behavior changes | invoke next skill immediately when done | weight verification by load
83
+ `git push` triggers the Stop hook to watch Actions for the pushed HEAD on the same repo (downstream cascades are not auto-watched). Green Stop approves with summary; failure run names + IDs surfaced, investigate via `gh run view <id> --log-failed`. Deadline 180s (override `GM_CI_WATCH_SECS`).
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: gm-gc
3
+ description: AI-native software engineering via skill-driven orchestration on gc; bootstraps plugkit for task execution and session isolation
4
+ allowed-tools: Skill
5
+ ---
6
+
7
+ # GM — gc Platform
8
+
9
+ AI-native software engineering orchestrated via skill chain: PLAN → EXECUTE → EMIT → VERIFY → UPDATE-DOCS.
10
+
11
+ **Bootstrap pattern**: `bun x gm-plugkit@latest --daemon` downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Call once at session start; idempotent on subsequent calls. All execution routes through the file-spool: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` or `in/<verb>/<N>.txt`, poll `out/<N>.json` for results.
12
+
13
+ **Session-ID threading (no session-start hook)**: At skill invoke time, generate or detect SESSION_ID (env var `SESSION_ID` or `uuid()`). Pass `sessionId: "<id>"` in every rs-exec RPC body (spawn, tail, watch, etc.) and every spool-written task body. All task-scoped cleanup (deleteTask, getTask, appendOutput, killSessionTasks) requires matching sessionId. Absence is forbidden — hard reject by rs-exec handler.
14
+
15
+ **Spool dispatch surface**: Write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (languages: nodejs, python, bash, typescript, go, rust, c, cpp, java, deno) or `in/<verb>/<N>.txt` (verbs: codesearch, recall, memorize, wait, sleep, status, close, browser, runner, etc.). Watcher executes and streams `out/<N>.out` (stdout) + `out/<N>.err` (stderr) line-by-line, then `out/<N>.json` metadata (exitCode, durationMs, timedOut, startedAt, endedAt) at completion.
16
+
17
+ **End-to-end skill chaining (skills-based platforms)**: When gm SKILL.md includes `end-to-end: true`, adapter detects signal and parses stdout for trailing JSON: `{"nextSkill": "...", "context": {...}, "phase": "..."}`. If nextSkill is non-null, invoke `Skill(skill="gm:<nextSkill>")` with context dict, repeat until null. This auto-chains 5 invocations into 1 user invocation.
18
+
19
+ Every task returns complete: taskId, exitCode, durationMs, timedOut, stdout, stderr. Background tasks return immediately with task_id; continue with `in/status/<N>.txt` (tail), `in/watch/<N>.txt` (watch), or `in/close/<N>.txt` (close).
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: gm-jetbrains
3
+ description: AI-native software engineering via skill-driven orchestration on jetbrains; bootstraps plugkit for task execution and session isolation
4
+ allowed-tools: Skill
5
+ ---
6
+
7
+ # GM — jetbrains Platform
8
+
9
+ AI-native software engineering orchestrated via skill chain: PLAN → EXECUTE → EMIT → VERIFY → UPDATE-DOCS.
10
+
11
+ **Bootstrap pattern**: `bun x gm-plugkit@latest --daemon` downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Call once at session start; idempotent on subsequent calls. All execution routes through the file-spool: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` or `in/<verb>/<N>.txt`, poll `out/<N>.json` for results.
12
+
13
+ **Session-ID threading (no session-start hook)**: At skill invoke time, generate or detect SESSION_ID (env var `SESSION_ID` or `uuid()`). Pass `sessionId: "<id>"` in every rs-exec RPC body (spawn, tail, watch, etc.) and every spool-written task body. All task-scoped cleanup (deleteTask, getTask, appendOutput, killSessionTasks) requires matching sessionId. Absence is forbidden — hard reject by rs-exec handler.
14
+
15
+ **Spool dispatch surface**: Write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (languages: nodejs, python, bash, typescript, go, rust, c, cpp, java, deno) or `in/<verb>/<N>.txt` (verbs: codesearch, recall, memorize, wait, sleep, status, close, browser, runner, etc.). Watcher executes and streams `out/<N>.out` (stdout) + `out/<N>.err` (stderr) line-by-line, then `out/<N>.json` metadata (exitCode, durationMs, timedOut, startedAt, endedAt) at completion.
16
+
17
+ **End-to-end skill chaining (skills-based platforms)**: When gm SKILL.md includes `end-to-end: true`, adapter detects signal and parses stdout for trailing JSON: `{"nextSkill": "...", "context": {...}, "phase": "..."}`. If nextSkill is non-null, invoke `Skill(skill="gm:<nextSkill>")` with context dict, repeat until null. This auto-chains 5 invocations into 1 user invocation.
18
+
19
+ Every task returns complete: taskId, exitCode, durationMs, timedOut, stdout, stderr. Background tasks return immediately with task_id; continue with `in/status/<N>.txt` (tail), `in/watch/<N>.txt` (watch), or `in/close/<N>.txt` (close).
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: gm-kilo
3
+ description: AI-native software engineering via skill-driven orchestration on kilo; bootstraps plugkit for task execution and session isolation
4
+ allowed-tools: Skill
5
+ ---
6
+
7
+ # GM — kilo Platform
8
+
9
+ AI-native software engineering orchestrated via skill chain: PLAN → EXECUTE → EMIT → VERIFY → UPDATE-DOCS.
10
+
11
+ **Bootstrap pattern**: `bun x gm-plugkit@latest --daemon` downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Call once at session start; idempotent on subsequent calls. All execution routes through the file-spool: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` or `in/<verb>/<N>.txt`, poll `out/<N>.json` for results.
12
+
13
+ **Session-ID threading (no session-start hook)**: At skill invoke time, generate or detect SESSION_ID (env var `SESSION_ID` or `uuid()`). Pass `sessionId: "<id>"` in every rs-exec RPC body (spawn, tail, watch, etc.) and every spool-written task body. All task-scoped cleanup (deleteTask, getTask, appendOutput, killSessionTasks) requires matching sessionId. Absence is forbidden — hard reject by rs-exec handler.
14
+
15
+ **Spool dispatch surface**: Write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (languages: nodejs, python, bash, typescript, go, rust, c, cpp, java, deno) or `in/<verb>/<N>.txt` (verbs: codesearch, recall, memorize, wait, sleep, status, close, browser, runner, etc.). Watcher executes and streams `out/<N>.out` (stdout) + `out/<N>.err` (stderr) line-by-line, then `out/<N>.json` metadata (exitCode, durationMs, timedOut, startedAt, endedAt) at completion.
16
+
17
+ **End-to-end skill chaining (skills-based platforms)**: When gm SKILL.md includes `end-to-end: true`, adapter detects signal and parses stdout for trailing JSON: `{"nextSkill": "...", "context": {...}, "phase": "..."}`. If nextSkill is non-null, invoke `Skill(skill="gm:<nextSkill>")` with context dict, repeat until null. This auto-chains 5 invocations into 1 user invocation.
18
+
19
+ Every task returns complete: taskId, exitCode, durationMs, timedOut, stdout, stderr. Background tasks return immediately with task_id; continue with `in/status/<N>.txt` (tail), `in/watch/<N>.txt` (watch), or `in/close/<N>.txt` (close).
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: gm-oc
3
+ description: AI-native software engineering via skill-driven orchestration on oc; bootstraps plugkit for task execution and session isolation
4
+ allowed-tools: Skill
5
+ ---
6
+
7
+ # GM — oc Platform
8
+
9
+ AI-native software engineering orchestrated via skill chain: PLAN → EXECUTE → EMIT → VERIFY → UPDATE-DOCS.
10
+
11
+ **Bootstrap pattern**: `bun x gm-plugkit@latest --daemon` downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Call once at session start; idempotent on subsequent calls. All execution routes through the file-spool: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` or `in/<verb>/<N>.txt`, poll `out/<N>.json` for results.
12
+
13
+ **Session-ID threading (no session-start hook)**: At skill invoke time, generate or detect SESSION_ID (env var `SESSION_ID` or `uuid()`). Pass `sessionId: "<id>"` in every rs-exec RPC body (spawn, tail, watch, etc.) and every spool-written task body. All task-scoped cleanup (deleteTask, getTask, appendOutput, killSessionTasks) requires matching sessionId. Absence is forbidden — hard reject by rs-exec handler.
14
+
15
+ **Spool dispatch surface**: Write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (languages: nodejs, python, bash, typescript, go, rust, c, cpp, java, deno) or `in/<verb>/<N>.txt` (verbs: codesearch, recall, memorize, wait, sleep, status, close, browser, runner, etc.). Watcher executes and streams `out/<N>.out` (stdout) + `out/<N>.err` (stderr) line-by-line, then `out/<N>.json` metadata (exitCode, durationMs, timedOut, startedAt, endedAt) at completion.
16
+
17
+ **End-to-end skill chaining (skills-based platforms)**: When gm SKILL.md includes `end-to-end: true`, adapter detects signal and parses stdout for trailing JSON: `{"nextSkill": "...", "context": {...}, "phase": "..."}`. If nextSkill is non-null, invoke `Skill(skill="gm:<nextSkill>")` with context dict, repeat until null. This auto-chains 5 invocations into 1 user invocation.
18
+
19
+ Every task returns complete: taskId, exitCode, durationMs, timedOut, stdout, stderr. Background tasks return immediately with task_id; continue with `in/status/<N>.txt` (tail), `in/watch/<N>.txt` (watch), or `in/close/<N>.txt` (close).
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: gm-vscode
3
+ description: AI-native software engineering via skill-driven orchestration on vscode; bootstraps plugkit for task execution and session isolation
4
+ allowed-tools: Skill
5
+ ---
6
+
7
+ # GM — vscode Platform
8
+
9
+ AI-native software engineering orchestrated via skill chain: PLAN → EXECUTE → EMIT → VERIFY → UPDATE-DOCS.
10
+
11
+ **Bootstrap pattern**: `bun x gm-plugkit@latest --daemon` downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Call once at session start; idempotent on subsequent calls. All execution routes through the file-spool: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` or `in/<verb>/<N>.txt`, poll `out/<N>.json` for results.
12
+
13
+ **Session-ID threading (no session-start hook)**: At skill invoke time, generate or detect SESSION_ID (env var `SESSION_ID` or `uuid()`). Pass `sessionId: "<id>"` in every rs-exec RPC body (spawn, tail, watch, etc.) and every spool-written task body. All task-scoped cleanup (deleteTask, getTask, appendOutput, killSessionTasks) requires matching sessionId. Absence is forbidden — hard reject by rs-exec handler.
14
+
15
+ **Spool dispatch surface**: Write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (languages: nodejs, python, bash, typescript, go, rust, c, cpp, java, deno) or `in/<verb>/<N>.txt` (verbs: codesearch, recall, memorize, wait, sleep, status, close, browser, runner, etc.). Watcher executes and streams `out/<N>.out` (stdout) + `out/<N>.err` (stderr) line-by-line, then `out/<N>.json` metadata (exitCode, durationMs, timedOut, startedAt, endedAt) at completion.
16
+
17
+ **End-to-end skill chaining (skills-based platforms)**: When gm SKILL.md includes `end-to-end: true`, adapter detects signal and parses stdout for trailing JSON: `{"nextSkill": "...", "context": {...}, "phase": "..."}`. If nextSkill is non-null, invoke `Skill(skill="gm:<nextSkill>")` with context dict, repeat until null. This auto-chains 5 invocations into 1 user invocation.
18
+
19
+ Every task returns complete: taskId, exitCode, durationMs, timedOut, stdout, stderr. Background tasks return immediately with task_id; continue with `in/status/<N>.txt` (tail), `in/watch/<N>.txt` (watch), or `in/close/<N>.txt` (close).
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: gm-zed
3
+ description: AI-native software engineering via skill-driven orchestration on zed; bootstraps plugkit for task execution and session isolation
4
+ allowed-tools: Skill
5
+ ---
6
+
7
+ # GM — zed Platform
8
+
9
+ AI-native software engineering orchestrated via skill chain: PLAN → EXECUTE → EMIT → VERIFY → UPDATE-DOCS.
10
+
11
+ **Bootstrap pattern**: `bun x gm-plugkit@latest --daemon` downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Call once at session start; idempotent on subsequent calls. All execution routes through the file-spool: write to `.gm/exec-spool/in/<lang>/<N>.<ext>` or `in/<verb>/<N>.txt`, poll `out/<N>.json` for results.
12
+
13
+ **Session-ID threading (no session-start hook)**: At skill invoke time, generate or detect SESSION_ID (env var `SESSION_ID` or `uuid()`). Pass `sessionId: "<id>"` in every rs-exec RPC body (spawn, tail, watch, etc.) and every spool-written task body. All task-scoped cleanup (deleteTask, getTask, appendOutput, killSessionTasks) requires matching sessionId. Absence is forbidden — hard reject by rs-exec handler.
14
+
15
+ **Spool dispatch surface**: Write to `.gm/exec-spool/in/<lang>/<N>.<ext>` (languages: nodejs, python, bash, typescript, go, rust, c, cpp, java, deno) or `in/<verb>/<N>.txt` (verbs: codesearch, recall, memorize, wait, sleep, status, close, browser, runner, etc.). Watcher executes and streams `out/<N>.out` (stdout) + `out/<N>.err` (stderr) line-by-line, then `out/<N>.json` metadata (exitCode, durationMs, timedOut, startedAt, endedAt) at completion.
16
+
17
+ **End-to-end skill chaining (skills-based platforms)**: When gm SKILL.md includes `end-to-end: true`, adapter detects signal and parses stdout for trailing JSON: `{"nextSkill": "...", "context": {...}, "phase": "..."}`. If nextSkill is non-null, invoke `Skill(skill="gm:<nextSkill>")` with context dict, repeat until null. This auto-chains 5 invocations into 1 user invocation.
18
+
19
+ Every task returns complete: taskId, exitCode, durationMs, timedOut, stdout, stderr. Background tasks return immediately with task_id; continue with `in/status/<N>.txt` (tail), `in/watch/<N>.txt` (watch), or `in/close/<N>.txt` (close).
@@ -3,24 +3,25 @@ name: governance
3
3
  description: Governance reference invoked by PLAN/EXECUTE/EMIT/VERIFY. Separates route discovery (PLAN) from weak-prior handoff (EXECUTE) from earned-emission legitimacy (EMIT/VERIFY). Encodes 16-failure taxonomy, 4 state planes, ΔS/λ/ε/Coverage metrics, governance stress suite.
4
4
  ---
5
5
 
6
- # Governance — Route, Bridge, Legitimacy
6
+ # Governance — Route, bridge, legitimacy
7
7
 
8
- Three roles, three failure surfaces:
9
- 1. **Route discovery** — what family of fault? Owned by `planning`.
10
- 2. **Weak-prior bridge** — plausibility ≠ authorization. Owned by `gm-execute`.
11
- 3. **Legitimacy gate** — did this answer earn its strength? Owned by `gm-emit`/`gm-complete`.
8
+ Three roles, three failure surfaces.
12
9
 
13
- ## Five Refused Collapses
10
+ 1. Route discovery — what family of fault? Owned by `planning`.
11
+ 2. Weak-prior bridge — plausibility is not authorization. Owned by `gm-execute`.
12
+ 3. Legitimacy gate — did this answer earn its strength? Owned by `gm-emit` and `gm-complete`.
14
13
 
15
- 1. Route authorization ("plan looks good" → "code is right")
16
- 2. Candidate → structural repair (local patch presented as architectural fix)
14
+ ## Five refused collapses
15
+
16
+ 1. Route → authorization ("plan looks good" treated as "code is right")
17
+ 2. Candidate → structural repair (local patch shipped as architectural fix)
17
18
  3. Hidden → public law (internal convenience shipped as contract)
18
- 4. Cleanliness → legitimacy (compiles = evidence-supports)
19
+ 4. Cleanliness → legitimacy (compiles treated as evidence-supports)
19
20
  5. One strong route → universal closure (best answer treated as only answer)
20
21
 
21
- When in doubt: preserve ambiguity. Lawful downgrade beats forced closure.
22
+ When in doubt, preserve ambiguity. Lawful downgrade beats forced closure.
22
23
 
23
- ## 7 Route Families
24
+ ## 7 route families
24
25
 
25
26
  | Family | What breaks | Repair |
26
27
  |---|---|---|
@@ -32,7 +33,7 @@ When in doubt: preserve ambiguity. Lawful downgrade beats forced closure.
32
33
  | boundary | Interfaces, contracts, seams | Re-assert contract from one source |
33
34
  | representation | Data shape, schema, type | Make illegal states unrepresentable |
34
35
 
35
- ## 16 Failure Modes
36
+ ## 16 failure modes
36
37
 
37
38
  | # | Name | Family |
38
39
  |---|---|---|
@@ -53,7 +54,7 @@ When in doubt: preserve ambiguity. Lawful downgrade beats forced closure.
53
54
  | 15 | Deployment deadlock | execution |
54
55
  | 16 | Pre-deploy collapse | execution |
55
56
 
56
- ## 4 State Planes
57
+ ## 4 state planes
57
58
 
58
59
  | Plane | Owner | States | Implication |
59
60
  |---|---|---|---|
@@ -62,18 +63,18 @@ When in doubt: preserve ambiguity. Lawful downgrade beats forced closure.
62
63
  | repair_legality | gm-emit | unverified → local_candidate → structural | Local cannot ship as structural |
63
64
  | hidden_decision_posture | gm-complete | open → down_weighted → closed | Close only after CI green |
64
65
 
65
- ## Quality Metrics
66
+ ## Quality metrics
66
67
 
67
68
  - **ΔS** — witnessed output equals expected. ΔS≠0 = still open.
68
- - **λ≥2** — two independent paths agree. λ=1 = still unknown.
69
+ - **λ ≥ 2** — two independent paths agree. λ=1 = still unknown.
69
70
  - **ε** — adjacent invariants hold (types, tests, neighboring callers).
70
- - **Coverage≥0.70** — enough corpus inspected to rule out contradicting evidence.
71
+ - **Coverage 0.70** — enough corpus inspected to rule out contradicting evidence.
71
72
 
72
- All four must pass before mutable flips UNKNOWN→KNOWN.
73
+ All four pass before a mutable flips UNKNOWN KNOWN.
73
74
 
74
- ## Stress Suite (8 Cases)
75
+ ## Stress suite
75
76
 
76
- Run before declaring COMPLETE:
77
+ Run before declaring COMPLETE.
77
78
 
78
79
  | # | Case | Failure if flunked |
79
80
  |---|---|---|
@@ -86,11 +87,11 @@ Run before declaring COMPLETE:
86
87
  | A1 | Authenticity eval partial signals | Surface appearance beats evidence |
87
88
  | D1 | Deploy-gate under CI flake | Treats noise as green |
88
89
 
89
- Legal: illegal_commitment=0, evidence_boundary_violation=0, lawful_downgrade=available in all 8, outlier_visibility=preserved.
90
+ Legal: `illegal_commitment=0`, `evidence_boundary_violation=0`, `lawful_downgrade=available` in all 8, `outlier_visibility=preserved`.
90
91
 
91
- ## Phase Application
92
+ ## Phase application
92
93
 
93
94
  - **planning** — tag every `.prd` item with route family + failure-mode IDs
94
- - **gm-execute** — weak prior only; witnessed probe required before authorization
95
+ - **gm-execute** — weak prior only; witnessed probe before authorization
95
96
  - **gm-emit** — legitimacy gate; unearned specificity → lawful downgrade
96
- - **gm-complete** — stress-suite pass; close posture only CI green
97
+ - **gm-complete** — stress-suite pass; close posture only when CI is green