gm-cc 2.0.440 → 2.0.442
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.
|
@@ -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.442",
|
|
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
|
@@ -139,8 +139,9 @@ Before declaring complete, sweep the entire codebase for violations:
|
|
|
139
139
|
8. **Fallback/demo modes** → remove, fail loud instead
|
|
140
140
|
9. **TODO.md** → must be empty/deleted before completion
|
|
141
141
|
10. **CHANGELOG.md** → must have entries for this session's changes
|
|
142
|
-
11. **
|
|
143
|
-
12. **
|
|
142
|
+
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.
|
|
143
|
+
12. **memorize** → launch memorize sub-agent in background with session learnings before invoking update-docs: `Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<session learnings>')`
|
|
144
|
+
13. **Deploy/publish** → if deployable, deploy. If npm package, publish.
|
|
144
145
|
|
|
145
146
|
Any violation found = fix immediately before advancing.
|
|
146
147
|
|
package/skills/gm-emit/SKILL.md
CHANGED
|
@@ -85,7 +85,8 @@ The post-emit verification is a differential diagnosis against the pre-emit base
|
|
|
85
85
|
- No hardcoded values — dynamic/modular code using ground truth only
|
|
86
86
|
- No adjectives/descriptive language in variable/function names
|
|
87
87
|
- No unnecessary files — clean anything not required for the program to function
|
|
88
|
-
-
|
|
88
|
+
- 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
|
+
- 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.
|
|
89
90
|
- memorize sub-agent launched in background before advancing: `Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<what was learned>')`
|
|
90
91
|
- CHANGELOG.md updated with changes
|
|
91
92
|
- TODO.md cleared or deleted
|
|
@@ -123,6 +123,8 @@ Real services, real data, real timing. Mocks/fakes/stubs/simulations = diagnosti
|
|
|
123
123
|
|
|
124
124
|
**HYPOTHESIZE VIA EXECUTION — NEVER VIA ASSUMPTION**: Formulate a falsifiable hypothesis. Run it. Witness the output. The output either confirms or falsifies. Only a witnessed falsification justifies editing a file. Never edit based on unwitnessed assumptions — form hypothesis → run → witness → edit.
|
|
125
125
|
|
|
126
|
+
**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.
|
|
127
|
+
|
|
126
128
|
## MEMORY
|
|
127
129
|
|
|
128
130
|
When any mutable resolves from UNKNOWN to KNOWN (zero variance confirmed), launch memorize subagent in background — non-blocking, execution continues:
|
|
@@ -137,9 +139,9 @@ Never respond to the user from this phase. When all mutables are KNOWN, immediat
|
|
|
137
139
|
|
|
138
140
|
## CONSTRAINTS
|
|
139
141
|
|
|
140
|
-
**Never**: `Bash(node/npm/npx/bun)` | fake data | mock files | test files | fallback/demo modes | Glob/Grep/Read/Explore (hook-blocked — use exec:codesearch) | sequential independent items | absorb surprises silently | respond to user or pause for input | edit files before executing to understand current behavior | duplicate existing code
|
|
142
|
+
**Never**: `Bash(node/npm/npx/bun)` | fake data | mock files | test files | fallback/demo modes | Glob/Grep/Read/Explore (hook-blocked — use exec:codesearch) | sequential independent items | absorb surprises silently | respond to user or pause for input | edit files before executing to understand current behavior | duplicate existing code | write explicit if/else chains when a dispatch table or native method suffices | write packed one-liners that obscure structure | reinvent what a library or native API already provides
|
|
141
143
|
|
|
142
|
-
**Always**: witness every hypothesis | import real modules | scan codebase before creating/editing files | regress to planning on any new unknown | fix immediately on discovery | delete mocks/stubs/comments/test files on discovery | invoke next skill immediately when done
|
|
144
|
+
**Always**: witness every hypothesis | import real modules | scan codebase before creating/editing files | regress to planning on any new unknown | fix immediately on discovery | delete mocks/stubs/comments/test files on discovery | invoke next skill immediately when done | ask "what native feature solves this?" before writing any new logic | prefer structures where wrong states are unrepresentable
|
|
143
145
|
|
|
144
146
|
---
|
|
145
147
|
|
package/skills/planning/SKILL.md
CHANGED
|
@@ -47,11 +47,13 @@ Planning = exhaustive fault-surface enumeration. For every aspect of the task:
|
|
|
47
47
|
|
|
48
48
|
## OBSERVABILITY ENUMERATION — MANDATORY EVERY PASS
|
|
49
49
|
|
|
50
|
-
During every planning pass, enumerate every possible aspect of the app's runtime observability that can be improved
|
|
50
|
+
During every planning pass, enumerate every possible aspect of the app's runtime observability that can be improved. The goal is permanent structures — not ad-hoc logs — that make any future debugging session start from a complete, live picture of system state.
|
|
51
51
|
|
|
52
|
-
**Server-side**:
|
|
52
|
+
**Server-side permanent structures**: Every internal subsystem — state machine, queue, cache, connection pool, active task map, process registry, RPC handler, hook dispatcher — must expose a named, queryable inspection endpoint (e.g. `/debug/<subsystem>`). State must be readable, filterable, and ideally modifiable without restart. Profiling hooks on every hot path. Structured logs with subsystem tag, severity, and timestamp — filterable at runtime by subsystem, not just log level. Any internal state that requires a restart to inspect is an observability gap.
|
|
53
53
|
|
|
54
|
-
**Client-side**:
|
|
54
|
+
**Client-side permanent structures**: `window.__debug` must be a live, structured registry — not a dump. Every component's state, every active request, every event queue, every WebSocket connection, every rendered prop, every error boundary — all addressable by key, all queryable without refreshing. New modules register themselves into `window.__debug` on mount and deregister on unmount. Any execution path not traceable via `window.__debug` is an observability gap.
|
|
55
|
+
|
|
56
|
+
**Permanent vs ad-hoc**: `console.log` = ad-hoc = not observability. A structured logger with subsystem routing = permanent. `window.__debug.myModule.state` = permanent. `window.__debug = { ...window.__debug, tmp: x }` = ad-hoc = not acceptable. Permanent structures survive deploys and accumulate diagnostic value across sessions.
|
|
55
57
|
|
|
56
58
|
**Mandate**: on discovery of any observability gap → immediately add a .prd item. Observability improvements are highest-priority — never deferred. The agent must be able to see specifically anything it wants and nothing else — no guessing, no blind spots.
|
|
57
59
|
|
|
@@ -111,6 +113,14 @@ Invoke `browser` skill. Escalation: (1) `exec:browser <js>` → (2) browser skil
|
|
|
111
113
|
|
|
112
114
|
No comments. No test files. 200-line limit — split before continuing. Fail loud. No duplication. Scan before every edit. Duplicate concern = regress to PLAN. Errors throw with context — no `|| default`, no `catch { return null }`. `window.__debug` exposes all client state. CLAUDE.md via memorize only. CHANGELOG.md: append per commit.
|
|
113
115
|
|
|
116
|
+
**Minimal code / maximal DX process**: Before writing any logic, run this process in order — stop at the first step that resolves the need:
|
|
117
|
+
1. **Native first** — does the language or runtime already do this? Use it exactly as designed.
|
|
118
|
+
2. **Library second** — does an existing dependency already solve this pattern? Use its API directly.
|
|
119
|
+
3. **Structure third** — can the problem be encoded as data (map, table, pipeline) so the structure enforces correctness and eliminates branching entirely?
|
|
120
|
+
4. **Write last** — only author new logic when the above three are exhausted. New logic = new surface area = new bugs.
|
|
121
|
+
|
|
122
|
+
When structure eliminates a whole class of wrong states — name that pattern explicitly. Dispatch tables replacing switch chains, pipelines replacing loop-with-accumulator, maps replacing if/else forests — these are not just style preferences, they are correctness properties. Code that cannot be wrong because of how it is shaped is the goal. Readable top-to-bottom without mental simulation = done right. Requires decoding = not done.
|
|
123
|
+
|
|
114
124
|
## RESPONSE POLICY
|
|
115
125
|
|
|
116
126
|
Terse like smart caveman. Technical substance stays. Fluff dies. Default: **full**. Switch: `/caveman lite|full|ultra`.
|
|
@@ -128,6 +138,6 @@ Auto-Clarity: drop caveman for security warnings, irreversible confirmations, am
|
|
|
128
138
|
**Tier 2**: no_duplication, no_hardcoded_values, modularity
|
|
129
139
|
**Tier 3**: no_comments, convention_over_code
|
|
130
140
|
|
|
131
|
-
**Never**: `Bash(node/npm/npx/bun)` | skip planning | partial execution | stop while .prd has items | stop while git dirty | sequential independent items | screenshot before JS exhausted | fallback/demo modes | silently swallow errors | duplicate concern | leave comments | create test files
|
|
141
|
+
**Never**: `Bash(node/npm/npx/bun)` | skip planning | partial execution | stop while .prd has items | stop while git dirty | sequential independent items | screenshot before JS exhausted | fallback/demo modes | silently swallow errors | duplicate concern | leave comments | create test files | write if/else chains where a map or pipeline suffices | write one-liners that require decoding | branch on enumerated cases when a dispatch table exists
|
|
132
142
|
|
|
133
|
-
**Always**: invoke named skill at every state transition | regress to planning on any new unknown | witnessed execution only | scan codebase before edits | enumerate every possible observability improvement every planning pass | follow skill chain completely end-to-end on every task without exception
|
|
143
|
+
**Always**: invoke named skill at every state transition | regress to planning on any new unknown | witnessed execution only | scan codebase before edits | enumerate every possible observability improvement every planning pass | follow skill chain completely end-to-end on every task without exception | prefer dispatch tables over switch/if chains | prefer pipelines over loop-with-accumulator | make wrong states structurally impossible | name patterns when structure eliminates a whole class of bugs
|