gm-cc 2.0.520 → 2.0.521
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/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/gm/SKILL.md +27 -0
- package/skills/gm-complete/SKILL.md +22 -1
- package/skills/gm-emit/SKILL.md +27 -1
- package/skills/gm-execute/SKILL.md +14 -6
- package/skills/planning/SKILL.md +20 -0
|
@@ -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.521",
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "State machine agent with hooks, skills, and automated git enforcement"
|
|
10
10
|
},
|
package/package.json
CHANGED
package/plugin.json
CHANGED
package/skills/gm/SKILL.md
CHANGED
|
@@ -9,6 +9,33 @@ description: Agent (not skill) - immutable programming state machine. Always inv
|
|
|
9
9
|
|
|
10
10
|
**CRITICAL: Skills are invoked via the Skill tool ONLY. Do NOT use the Agent tool to load skills.**
|
|
11
11
|
|
|
12
|
+
## WHERE YOU ARE
|
|
13
|
+
|
|
14
|
+
Top of state machine. No mutables resolved, no files read, no phase protocols loaded. Each phase (PLAN, EXECUTE, EMIT, VERIFY, UPDATE-DOCS) carries its own protocols (mutable discipline, pre-emit diagnostic, post-emit verify, hygiene sweep, CI watch). Protocols enter context only when you invoke the corresponding Skill. Reading a summary ≠ being in them.
|
|
15
|
+
|
|
16
|
+
Transitions = state changes, not reminders. Phase exit condition met → next Skill invocation moves you. Without invocation: still in prior state, regardless of prose.
|
|
17
|
+
|
|
18
|
+
`gm-execute` = execution contract. Defines "running code" across every phase: `exec:<lang>` = only runner; `exec:codesearch` = only exploration; witnessed output = only ground truth; import real modules over reimplementation. Execution happens in every phase, not only EXECUTE. About to run anything, `gm-execute` protocols not fresh in context → operating outside contract → reload `gm-execute` first.
|
|
19
|
+
|
|
20
|
+
## FRAGILE LEARNINGS
|
|
21
|
+
|
|
22
|
+
Every fact resolved this session lives only in current context. Context compacts. Sessions end. Next agent starts blind. `memorize` subagent = handoff. One background call per fact at moment of resolution. Non-blocking; work continues. Worth memorizing: API shapes, environment quirks, timeouts, user preferences, build cadences, CI behaviors — facts that would have saved today's time if in memory at start.
|
|
23
|
+
|
|
24
|
+
Resolve a mutable, skip memorize = forget on purpose.
|
|
25
|
+
|
|
26
|
+
## USER DONE TALKING
|
|
27
|
+
|
|
28
|
+
User gave task. User waiting. Not co-pilot — person whose time you conserve by running chain end-to-end. Mid-chain questions ("should I proceed?", "which approach?", "look right before continue?") = chain breaks. Every break forces user back into loop they offloaded.
|
|
29
|
+
|
|
30
|
+
Unknown resolution order — fixed:
|
|
31
|
+
1. **Code execution** — witnessed run (`exec:<lang>`, `exec:codesearch`, import real module). Covers 90%+ of mutables.
|
|
32
|
+
2. **Web** — `WebFetch` / `WebSearch` for API docs, spec PDFs, library versions, framework conventions. Covers environment facts not in this codebase.
|
|
33
|
+
3. **User** — only after code and web exhausted. Only for genuinely ambiguous scope that makes planning impossible, or destructive-irreversible decisions (force-push, drop prod table, publish). Not for preferences resolvable from existing code conventions.
|
|
34
|
+
|
|
35
|
+
An unknown that could fall to step 1 or 2 is not a clarifying question — it is a missed run. "Want me to..." or "Should I..." mid-chain = invoke next skill instead.
|
|
36
|
+
|
|
37
|
+
Clarification allowed at top of chain (before first `planning`) when scope is genuinely unreadable. After chain starts: policy carries it.
|
|
38
|
+
|
|
12
39
|
All work coordination, planning, execution, and verification happens through the skill tree starting with `planning`:
|
|
13
40
|
- `planning` skill → `gm-execute` skill → `gm-emit` skill → `gm-complete` skill → `update-docs` skill
|
|
14
41
|
- `memorize` sub-agent — background only, non-sequential. `Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<what was learned>')`
|
|
@@ -10,6 +10,27 @@ You are in the **VERIFY → COMPLETE** phase. Files are written. Prove the whole
|
|
|
10
10
|
**GRAPH POSITION**: `PLAN → EXECUTE → EMIT → [VERIFY] → UPDATE-DOCS → COMPLETE`
|
|
11
11
|
- **Entry**: All EMIT gates passed. Entered from `gm-emit`.
|
|
12
12
|
|
|
13
|
+
## WHERE YOU ARE
|
|
14
|
+
|
|
15
|
+
Files written. Question now: does the whole system work end-to-end, and does the world outside local repo (CI, downstream pipelines, deployed surfaces) agree. Every check = witnessed execution: `node test.js`, `gh run watch`, diagnostic repros on failure. Contract in `gm-execute`; protocols not fresh → verification drifts to narrated claims ("change should work") over witnessed ones ("change produced output X"). Load first.
|
|
16
|
+
|
|
17
|
+
## VERIFICATION → UNKNOWNS
|
|
18
|
+
|
|
19
|
+
Failing test, red CI, surprising downstream cascade ≠ things to patch around. = new fault surfaces becoming visible. Classify failure:
|
|
20
|
+
- Wrong file output → regress to EMIT
|
|
21
|
+
- Wrong logic → regress to EXECUTE
|
|
22
|
+
- Genuinely new unknown or wrong requirement → regress to PLANNING
|
|
23
|
+
|
|
24
|
+
Let chain carry you. Stop-and-fix-here = how silent-failure bugs reach prod. Machine assumes you regress; trust it.
|
|
25
|
+
|
|
26
|
+
## FRAGILE LEARNINGS
|
|
27
|
+
|
|
28
|
+
Phase where environment reality hits hardest — CI runner quirks, flaky-test patterns, timing thresholds, deploy cadences, cross-repo cascade behaviors. These facts most reward future sessions. Each → memorize call, one per fact, non-blocking, at moment of resolution:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<fact>')
|
|
32
|
+
```
|
|
33
|
+
|
|
13
34
|
## TRANSITIONS
|
|
14
35
|
|
|
15
36
|
**EXIT — .gm/prd.yml items remain**: Verified items completed, .gm/prd.yml still has pending items → invoke `gm-execute` skill immediately (next wave). Do not stop.
|
|
@@ -156,7 +177,7 @@ Before declaring complete, sweep the entire codebase for violations:
|
|
|
156
177
|
9. **TODO.md** → must be empty/deleted before completion
|
|
157
178
|
10. **CHANGELOG.md** → must have entries for this session's changes
|
|
158
179
|
11. **Observability gaps** → every server subsystem added this session exposes a `/debug/<subsystem>` endpoint; every client module added this session registers into `window.__debug` by key. Ad-hoc console.log is not observability — permanent queryable structures are. Any gap found → fix before advancing.
|
|
159
|
-
12. **memorize** →
|
|
180
|
+
12. **memorize** → every fact surfaced during verification that would have saved this session's time if it had been in memory at the start (CI timing, flaky-test patterns, environment quirks, runtime behaviors, user preferences stated this session) is handed off via a background memorize call at the moment of resolution. One call per fact, non-blocking. `Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<fact>')`
|
|
160
181
|
13. **Deploy/publish** → if deployable, deploy. If npm package, publish.
|
|
161
182
|
14. **GitHub Pages** → check if repo has a GH Pages site. If `.github/workflows/pages.yml` is absent OR `docs/index.html` is absent: invoke the `pages` skill to scaffold the site before advancing.
|
|
162
183
|
|
package/skills/gm-emit/SKILL.md
CHANGED
|
@@ -10,6 +10,32 @@ You are in the **EMIT** phase. Every mutable is KNOWN. Prove the write is correc
|
|
|
10
10
|
**GRAPH POSITION**: `PLAN → EXECUTE → [EMIT] → VERIFY → COMPLETE`
|
|
11
11
|
- **Entry**: All .gm/prd.yml mutables resolved. Entered from `gm-execute` or via snake from VERIFY.
|
|
12
12
|
|
|
13
|
+
## WHERE YOU ARE
|
|
14
|
+
|
|
15
|
+
About to mutate on-disk state. Every write bracketed by two witnessed executions: pre-emit (import module from disk, run proposed logic in isolation, record expected outputs as baseline) and post-emit (re-import from disk, confirm identical output to pre-emit baseline). Both = executions. Contract in `gm-execute`. Protocols not fresh → runs drift to reimplementation + narrated assumption → write ships unfalsified. Load first.
|
|
16
|
+
|
|
17
|
+
## SURPRISE → STATE REGRESSION
|
|
18
|
+
|
|
19
|
+
Pre-emit unexpected output ≠ bug to patch in this phase. Classify:
|
|
20
|
+
- Identifiable logic error against a known mutable → regress to `gm-execute` (re-resolve the mutable properly, return here)
|
|
21
|
+
- Newly visible unknown (cause not nameable) → regress to `planning` (enumerate, let chain return you with complete mutable map)
|
|
22
|
+
|
|
23
|
+
Post-emit divergence from pre-emit baseline:
|
|
24
|
+
- Identified cause → known mutable → fix in place, re-verify (EMIT self-loop, zero variance before advancing)
|
|
25
|
+
- Unidentified cause → unknown → regress to `planning`
|
|
26
|
+
|
|
27
|
+
Urge to "just fix real quick" = signal mutable map was incomplete. Trust state machine: regress to correct phase, resolve, return.
|
|
28
|
+
|
|
29
|
+
## FRAGILE LEARNINGS
|
|
30
|
+
|
|
31
|
+
Pre-emit and post-emit runs surface facts you lacked: actual function signatures, edge-case return values, adjacent-module interactions, hidden invariants. Each dies on context compaction unless handed off.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<fact witnessed this phase>')
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
One call per fact, non-blocking, at moment of resolution.
|
|
38
|
+
|
|
13
39
|
## TRANSITIONS
|
|
14
40
|
|
|
15
41
|
**EXIT — invoke `gm-complete` skill immediately when**: All gate conditions are true simultaneously. Do not pause. Invoke the skill.
|
|
@@ -87,7 +113,7 @@ The post-emit verification is a differential diagnosis against the pre-emit base
|
|
|
87
113
|
- No unnecessary files — clean anything not required for the program to function
|
|
88
114
|
- Observability: every new server subsystem exposes a named inspection endpoint; every new client module registers into `window.__debug` by key and deregisters on unmount. Ad-hoc `console.log` is not observability — permanent queryable structure is. Any new code path not reachable via `window.__debug` or a `/debug/<subsystem>` endpoint → do NOT advance, add observability before writing feature code.
|
|
89
115
|
- Structural quality: if/else chains where a dispatch table or pipeline suffices → regress to `gm-execute` for restructuring. One-liners that compress logic at the cost of readability → expand. Any logic that reinvents a native API or library → replace with the native/library call. Structure must make wrong states unrepresentable — if it doesn't, it's not done.
|
|
90
|
-
-
|
|
116
|
+
- every fact resolved in this phase (pre-emit discoveries, post-emit surprises, newly-confirmed behaviors) has been handed off via a background memorize call at the moment of resolution: `Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<what was learned>')`
|
|
91
117
|
- CHANGELOG.md updated with changes
|
|
92
118
|
- TODO.md cleared or deleted
|
|
93
119
|
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gm-execute
|
|
3
|
-
description: EXECUTE phase. 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 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.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# GM EXECUTE — Resolving Every Unknown
|
|
7
7
|
|
|
8
|
-
You are in the **EXECUTE** phase.
|
|
8
|
+
You are in the **EXECUTE** phase. Every mutable on `.gm/prd.yml` carries UNKNOWN status until witnessed execution resolves it. Job here = the witnessing.
|
|
9
|
+
|
|
10
|
+
This skill also carries the **execution contract** applying in every phase, not only this one. Planning runs codebase scans; EMIT runs pre-emit diagnostics; VERIFY runs integration tests and CI watches — all executions, all subject to discipline below. Other skills reference this skill because protocols stay live in context only while this text is nearby. About to run anything → this skill freshly loaded OR operating outside contract.
|
|
11
|
+
|
|
12
|
+
New unknown surfaced by a run → stop, state-regress to `planning`, restart chain.
|
|
9
13
|
|
|
10
14
|
**GRAPH POSITION**: `PLAN → [EXECUTE] → EMIT → VERIFY → COMPLETE`
|
|
11
15
|
- **Entry**: .prd exists with all unknowns named. Entered from `planning` or via snake from EMIT/VERIFY.
|
|
@@ -134,13 +138,17 @@ Real services, real data, real timing. Mocks/fakes/stubs/simulations = diagnosti
|
|
|
134
138
|
|
|
135
139
|
**CODE QUALITY PROCESS**: The goal is minimal code / maximal DX. When writing or reviewing any block of code, run this mental process: (1) What native language/platform feature already does this? Use it. (2) What library already solves this pattern? Use it. (3) Can this branch/loop be a data structure — a map, array, or pipeline — where the structure itself enforces correctness? Make it so. (4) Would a newcomer read this top-to-bottom and immediately understand what it does without running it? If no, restructure. One-liners that compress logic are the opposite of DX — clarity comes from structure, not brevity. Dispatch tables, pipeline chains, and native APIs eliminate entire categories of bugs by making wrong states unrepresentable.
|
|
136
140
|
|
|
137
|
-
##
|
|
141
|
+
## FRAGILE LEARNINGS
|
|
142
|
+
|
|
143
|
+
Every UNKNOWN→KNOWN transition = fact living only in current context. Session ends. Next agent starts blind. `memorize` subagent = only bridge. One background call per fact at moment of resolution:
|
|
138
144
|
|
|
139
|
-
|
|
145
|
+
```
|
|
146
|
+
Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<resolved fact>')
|
|
147
|
+
```
|
|
140
148
|
|
|
141
|
-
|
|
149
|
+
Non-blocking; work continues. Highest-value facts = ones that would have saved today's time if in memory at start: API shapes resolved by import-and-witness, environment quirks, runtime constraints, user-stated preferences, project-specific cadences. Resolve a mutable, skip memorize = forget on purpose.
|
|
142
150
|
|
|
143
|
-
|
|
151
|
+
Self-check: after any witnessed run that resolved something, next action = another witnessing run (more mutables) OR `Agent` memorize call (fact was memorable). Neither = something evaporated.
|
|
144
152
|
|
|
145
153
|
## DO NOT STOP
|
|
146
154
|
|
package/skills/planning/SKILL.md
CHANGED
|
@@ -10,6 +10,26 @@ Root of all work. Runs `PLAN → EXECUTE → EMIT → VERIFY → UPDATE-DOCS →
|
|
|
10
10
|
|
|
11
11
|
**Entry**: prompt-submit hook → `gm` agent → invoke `planning` skill (here). Also re-entered any time a new unknown surfaces in any phase.
|
|
12
12
|
|
|
13
|
+
## WHERE YOU ARE
|
|
14
|
+
|
|
15
|
+
Phase where work shape still unknown. Codebase scans, `exec:codesearch` queries, quick imports to probe APIs = all executions. Execution contract in `gm-execute`; protocols not fresh → runs drift (reimplement over import, narrate over witness). Load first.
|
|
16
|
+
|
|
17
|
+
## UNKNOWNS = PRODUCT
|
|
18
|
+
|
|
19
|
+
Output of this phase ≠ task list. Output = enumeration of every fault surface work could fail on. Each unknown named + resolved → cheaper downstream. Each unknown skipped → EMIT/VERIFY surprise → snake back anyway at higher cost.
|
|
20
|
+
|
|
21
|
+
**Unknown emerges later (EXECUTE, EMIT, VERIFY) → return here. Not failure — machine working as designed.** Later-phase unknown means mutable map incomplete. Come back. Think laterally — what else could this touch, what invariant assumed, what subsystem unexamined? Enumerate newly-visible fault surfaces. Only then push forward.
|
|
22
|
+
|
|
23
|
+
Patch-around-unknowns-in-place = compounding silent-failure debt. Regress early = stay inside contract.
|
|
24
|
+
|
|
25
|
+
## FRAGILE LEARNINGS
|
|
26
|
+
|
|
27
|
+
Every mutable resolved here (existingImpl absent, dep version confirmed, user constraint stated, build quirk observed) = fact that dies on context compaction unless handed off. `memorize` subagent = handoff. One background call per fact at moment of resolution. Non-blocking; continue.
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<single resolved fact>')
|
|
31
|
+
```
|
|
32
|
+
|
|
13
33
|
## STATE MACHINE
|
|
14
34
|
|
|
15
35
|
**FORWARD**: PLAN complete → `gm-execute` | EXECUTE complete → `gm-emit` | EMIT complete → `gm-complete` | VERIFY .prd remains → `gm-execute` | VERIFY .prd empty+pushed → `update-docs`
|