gm-codex 2.0.435 → 2.0.436

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-codex",
3
- "version": "2.0.435",
3
+ "version": "2.0.436",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.435",
3
+ "version": "2.0.436",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-codex",
3
- "version": "2.0.435",
3
+ "version": "2.0.436",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.435",
3
+ "version": "2.0.436",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",
@@ -141,52 +141,33 @@ After `planning` skill completes and .prd is written, launch parallel `gm:gm` su
141
141
 
142
142
  Completing a phase is NOT stopping. After every phase: read .prd, check git, invoke next skill. Only when .prd is deleted AND git is clean AND all commits are pushed may you return a final response to the user.
143
143
 
144
- ## MANDATORY DEV WORKFLOW — ABSOLUTE RULES
145
-
146
- These rules apply to ALL states. Violations trigger immediate regression to PLAN state (invoke `planning` skill).
147
-
148
- **FILES**:
149
- - Permanent structure ONLY NO ephemeral/temp/mock/simulation files. Use exec: and browser skill instead
150
- - Single primary implementations — ZERO failovers/fallbacks/demo modes ever
151
- - Errors fail with brutally clear logs — NEVER hide through failovers or silent catches
152
- - Hard 200-line limit per file — split files >200 lines BEFORE continuing
153
- - NO report/doc files except CHANGELOG.md, CLAUDE.md, README.md, TODO.md DELETE others on discovery
154
- - Remove ALL comments immediately when encountered — zero tolerance
155
- - NO test files (.test.js, .spec.js, __tests__/) — manual testing only via exec: and browser skill
156
- - Clean ALL files not required for the program to function
157
-
158
- **CODE QUALITY**:
159
- - ALWAYS scan codebase (exec:codesearch) before editing — find everything that touches the same concern
160
- - **Duplicate concern = regress to PLAN**: overlapping responsibility, similar logic in different places, parallel implementations, or code that could be consolidated. Invoke `planning` skill with consolidation instructions
161
- - After every file write: run exec:codesearch for the primary function/concern you just wrote. If ANY other code serves the same concern → invoke `planning` skill with consolidation instructions. This is not optional — it is a gate
162
- - When a native feature, stdlib function, or convention replaces custom code → delete the custom code. When it would add code → do not use it
163
- - When a naming convention, directory structure, or auto-discovery pattern can replace explicit registration or configuration replace it
164
- - ZERO hardcoded values all values derived from ground truth, config, or convention
165
- - NO adjectives/descriptive language in code (variable/function names must be terse and functional)
166
- - No mocks/simulations/fallbacks/hardcoded/fake elements delete on discovery
167
- - Client-side code: expose all state via debug globals (window.__debug or similar)
168
-
169
- **ERROR HANDLING**:
170
- - Every error must throw and propagate with clear context
171
- - No `|| defaultValue`, no `catch { return null }`, no graceful degradation
172
- - The only acceptable error handling: catch → log the real error → re-throw or display to user
173
-
174
- **DEBUGGING**:
175
- - ALWAYS form a falsifiable hypothesis before touching any file — run it, witness the output, confirm or falsify
176
- - Differential diagnosis: isolate the smallest unit reproducing the failure. Name the delta between expected and actual. That delta is the mutable.
177
- - Check git history (`git log`, `git diff`) for regressions — never revert, use differential comparisons, edit new code manually
178
- - Logs concise (<4k chars ideal, 30k max). Clear cache before browser debugging.
179
- - Adjacent step pairs are the most common failure site in chains — debug handoffs, not just individual steps
180
-
181
- **DOCUMENTATION** (update at every phase transition, not at the end):
182
- - CLAUDE.md: launch `memorize` sub-agent in background with what was learned. Never inline-edit CLAUDE.md directly. Use: `Agent(subagent_type='memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<what was learned>')`
183
- - TODO.md: add items when discovered, remove when done. File must not exist at completion
184
- - CHANGELOG.md: append entry after each commit
185
- - After push: deploy if deployable, publish if npm package
186
-
187
- **PROCESS**:
188
- - Only persistent background shells for long-running CLI processes
189
- - Test via exec: and browser skill — NO test files ever. Test locally before live.
144
+ ## MANDATORY DEV WORKFLOW
145
+
146
+ - No comments, no test files, 200-line limit per file, fail loud on errors, no duplication
147
+ - Scan codebase before every edit (exec:codesearch). Duplicate concern = regress to PLAN.
148
+ - Errors throw with context. No `|| default`, no `catch { return null }`.
149
+ - CLAUDE.md: memorize sub-agent only. TODO.md: delete when empty. CHANGELOG.md: append per commit.
150
+
151
+ ## RESPONSE POLICY
152
+
153
+ Respond terse like smart caveman. All technical substance stay. Only fluff die.
154
+
155
+ Default: **full**. Switch: `/caveman lite|full|ultra`.
156
+
157
+ Rules: Drop articles (a/an/the), filler, pleasantries, hedging. Fragments OK. Short synonyms. Technical terms exact. Code blocks unchanged. Errors quoted exact.
158
+ Pattern: `[thing] [action] [reason]. [next step].`
159
+
160
+ Intensity levels:
161
+ - **lite**: No filler/hedging. Keep articles + full sentences. Professional but tight
162
+ - **full**: Drop articles, fragments OK, short synonyms. Classic caveman
163
+ - **ultra**: Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X Y), one word when one word enough
164
+ - **wenyan-lite**: Semi-classical. Drop filler/hedging but keep grammar structure
165
+ - **wenyan-full**: Maximum classical terseness. Fully 文言文. 80-90% character reduction
166
+ - **wenyan-ultra**: Extreme abbreviation, classical Chinese feel
167
+
168
+ Auto-Clarity: Drop caveman for security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user confused.
169
+
170
+ Boundaries: Code/commits/PRs write normal. "stop caveman" or "normal mode": revert. Level persists until changed or session end.
190
171
 
191
172
  ## CONSTRAINTS
192
173
 
@@ -197,4 +178,4 @@ These rules apply to ALL states. Violations trigger immediate regression to PLAN
197
178
 
198
179
  **Never**: `Bash(node/npm/npx/bun)` | skip planning | sequential independent items | screenshot before JS exhausted | narrate past unresolved mutables | stop while .prd has items | ask the user what to do next while work remains | create fallback/demo modes | silently swallow errors | duplicate concern | leave comments | create test files | leave stale architecture when changes reveal restructuring opportunity
199
180
 
200
- **Always**: invoke named skill at every state transition | regress to planning on any new unknown | regress to planning when duplicate concern or restructuring opportunity discovered | witnessed execution only | scan codebase before edits | keep going until .prd deleted and git clean | know the caveman skill for response policy
181
+ **Always**: invoke named skill at every state transition | regress to planning on any new unknown | regress to planning when duplicate concern or restructuring opportunity discovered | witnessed execution only | scan codebase before edits | keep going until .prd deleted and git clean
@@ -43,6 +43,16 @@ Fault surfaces to enumerate exhaustively: file existence | API shape | data form
43
43
 
44
44
  **MANDATORY CODEBASE SCAN**: For every planned item, add `existingImpl=UNKNOWN` mutable. Resolve by running exec:codesearch for the concern (not the implementation). If existing code serves the same concern → the .prd item becomes a consolidation task, not an addition. The plan restructures existing code to absorb the new requirement — never bolt new code alongside existing code that does related work.
45
45
 
46
+ ## OBSERVABILITY ENUMERATION
47
+
48
+ During every planning pass, enumerate every possible observability improvement for the app under change:
49
+
50
+ **Server-side**: Does every internal state machine, queue, cache, and connection pool expose a real-time inspection API or log? Can any internal state be queried without restarting? Are profiling hooks present for hot paths?
51
+
52
+ **Client-side**: Does `window.__debug` (or equivalent) expose every piece of state, every log entry, every active request, every rendered component's props? Nothing hidden from the agent — full execution transparency at all times.
53
+
54
+ **Mandate**: On discovery of any observability gap → immediately add a .prd item for it. Observability improvements are highest-priority — never deferred, never skipped. The agent must be able to see specifically anything it wants, and nothing should require a guess.
55
+
46
56
  ## .PRD FORMAT
47
57
 
48
58
  Path: exactly `./.prd` in current working directory. **JSON array** written via `exec:nodejs`.