gm-cc 2.0.416 → 2.0.417

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.416",
7
+ "version": "2.0.417",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
package/agents/gm.md CHANGED
@@ -13,6 +13,7 @@ enforce: critical
13
13
 
14
14
  All work coordination, planning, execution, and verification happens through the skill tree:
15
15
  - `gm` skill → `planning` skill → `gm-execute` skill → `gm-emit` skill → `gm-complete` skill → `update-docs` skill
16
+ - `memorize` skill — background only, non-sequential, launched via Agent with model=haiku and run_in_background=true
16
17
 
17
18
  All code execution uses `exec:<lang>` via the Bash tool — never direct `Bash(node ...)` or `Bash(npm ...)`.
18
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.416",
3
+ "version": "2.0.417",
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.416",
3
+ "version": "2.0.417",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",
@@ -121,6 +121,7 @@ Invoke `browser` skill. Escalation — exhaust each before advancing:
121
121
  **`gm-complete`** — VERIFY state. End-to-end verification and git enforcement. EXIT: invoke `gm-execute` if .prd items remain; invoke `update-docs` if .prd empty and pushed.
122
122
  **`update-docs`** — Refresh README, CLAUDE.md, and docs to reflect session changes. Invoked by `gm-complete`. Terminal state — declares COMPLETE.
123
123
  **`browser`** — Browser automation. Invoke inside EXECUTE state for all browser/UI work.
124
+ **`memorize`** — Background memory agent (haiku, run_in_background=true). Launch when structural changes occur. Never blocks execution.
124
125
 
125
126
  ## PARALLEL SUBAGENTS (post-PLAN)
126
127
 
@@ -178,7 +179,7 @@ These rules apply to ALL states. Violations trigger immediate regression to PLAN
178
179
  - Adjacent step pairs are the most common failure site in chains — debug handoffs, not just individual steps
179
180
 
180
181
  **DOCUMENTATION** (update at every phase transition, not at the end):
181
- - CLAUDE.md: after each structural change, update technical info. NO progress/changelogs
182
+ - CLAUDE.md: launch `memorize` subagent in background with what was learned. Never inline-edit CLAUDE.md directly.
182
183
  - TODO.md: add items when discovered, remove when done. File must not exist at completion
183
184
  - CHANGELOG.md: append entry after each commit
184
185
  - After push: deploy if deployable, publish if npm package
@@ -139,7 +139,7 @@ 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. **CLAUDE.md** → must reflect current technical state
142
+ 11. **memorize** → launch memorize subagent in background with session learnings before invoking update-docs
143
143
  12. **Deploy/publish** → if deployable, deploy. If npm package, publish.
144
144
 
145
145
  Any violation found = fix immediately before advancing.
@@ -86,7 +86,7 @@ The post-emit verification is a differential diagnosis against the pre-emit base
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
  - Client-side code exposes debug globals (window.__debug or similar)
89
- - CLAUDE.md reflects actual behavior
89
+ - memorize subagent launched in background with what was learned before advancing
90
90
  - CHANGELOG.md updated with changes
91
91
  - TODO.md cleared or deleted
92
92
 
@@ -123,6 +123,14 @@ 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
+ ## MEMORY
127
+
128
+ When any mutable resolves from UNKNOWN to KNOWN (zero variance confirmed), launch memorize subagent in background — non-blocking, execution continues:
129
+
130
+ `Agent(subagent_type='general-purpose', model='haiku', run_in_background=true, prompt=<memorize SKILL.md content>\n\n## CONTEXT TO MEMORIZE\n<resolved fact>)`
131
+
132
+ Qualifies for memorization: new API shapes discovered, environment differences, behavioral constraints, runtime quirks, user feedback observed during execution.
133
+
126
134
  ## DO NOT STOP
127
135
 
128
136
  Never respond to the user from this phase. When all mutables are KNOWN, immediately invoke `gm-emit` skill. The chain continues until .prd is deleted and git is clean — that happens in `gm-complete`, not here.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: memorize
3
+ description: Background memory agent. Classifies and persists learned context into memory/ dir and CLAUDE.md. Run as haiku model in background only.
4
+ allowed-tools: Read, Write, Bash(exec:nodejs)
5
+ ---
6
+
7
+ # Memorize — Background Memory Agent
8
+
9
+ You are invoked as a background Agent. You handle all memory persistence for this project.
10
+
11
+ Memory dir: C:/Users/user/.claude/projects/C--dev-plugforge/memory/
12
+ CLAUDE.md: C:/dev/plugforge/CLAUDE.md
13
+
14
+ ## STEP 1: READ CURRENT STATE
15
+
16
+ Read memory dir contents and MEMORY.md index. Read all existing memory files. Read CLAUDE.md in full.
17
+
18
+ If memory dir does not exist, create it. If MEMORY.md does not exist, create it empty.
19
+
20
+ ## STEP 2: CLASSIFY CONTEXT
21
+
22
+ Examine the ## CONTEXT TO MEMORIZE section at the end of this prompt. Extract discrete facts. For each fact, classify as one of:
23
+
24
+ - user: user role, goals, preferences, knowledge
25
+ - feedback: guidance on approach — corrections AND confirmations
26
+ - project: ongoing work, goals, bugs, incidents, decisions
27
+ - reference: pointers to external systems, URLs, paths
28
+
29
+ Discard:
30
+ - Facts already covered in CLAUDE.md (any paraphrase or near-duplicate)
31
+ - Obvious facts derivable from reading the code
32
+ - Active task state, current progress, what was done in this session
33
+ - Git history narration
34
+
35
+ ## STEP 3: CHECK CLAUDE.md FOR NON-OBVIOUS CAVEATS
36
+
37
+ A non-obvious technical caveat is a fact that required multiple failed runs to discover — something that would not be apparent from reading the code or documentation.
38
+
39
+ For each fact in context that qualifies:
40
+ - If CLAUDE.md already covers it (exact or equivalent) → skip
41
+ - If it is genuinely non-obvious and cost multiple runs → append to the appropriate section in CLAUDE.md
42
+
43
+ Never add:
44
+ - Obvious patterns visible in the code
45
+ - Active task progress or session state
46
+ - Redundant restatements of existing entries
47
+
48
+ ## STEP 4: WRITE MEMORY FILES
49
+
50
+ For each classified fact:
51
+ 1. Check all existing memory files — if an existing file covers the same topic, merge the new fact into that file
52
+ 2. If no existing file covers it, create a new file: memory/<slug>.md
53
+
54
+ File format:
55
+ ```
56
+ ---
57
+ name: <descriptive name>
58
+ description: <one-line description under 80 chars>
59
+ type: user|feedback|project|reference
60
+ ---
61
+
62
+ <body>
63
+ ```
64
+
65
+ For feedback type, body must include:
66
+ - The rule
67
+ - Why: <reason>
68
+ - How to apply: <concrete application>
69
+
70
+ For project type, body must include:
71
+ - The fact or decision
72
+ - Why: <reason>
73
+ - How to apply: <concrete application>
74
+
75
+ ## STEP 5: UPDATE MEMORY.md INDEX
76
+
77
+ Rewrite the MEMORY.md index to reflect all current files in the memory dir.
78
+
79
+ Format: one line per file, under 150 chars each:
80
+ `- [Title](file.md) — one-line hook`
81
+
82
+ No frontmatter. Max 200 lines.
83
+
84
+ ## STEP 6: CONSOLIDATE
85
+
86
+ For each memory file: if its content is already fully covered by CLAUDE.md (exact or equivalent coverage), delete the memory file and remove its line from MEMORY.md.
87
+
88
+ Do not delete memory files that cover topics CLAUDE.md does not address.
89
+
90
+ ## STEP 7: DONE
91
+
92
+ No output required. Write files silently. Do not respond to the user.
93
+
94
+ ---
95
+
96
+ ## CONTEXT TO MEMORIZE
@@ -50,7 +50,7 @@ Write only sections that changed. Do not rewrite unchanged content. Rules per fi
50
50
 
51
51
  **README.md**: platform count matches adapters in `platforms/`, skill tree diagram matches current state machine, quick start commands work.
52
52
 
53
- **CLAUDE.md**: Only non-obvious technical caveats that required multiple runs to discover — things that could not be known without hitting the problem first. Remove anything that no longer applies. Never add anything obvious from reading the code or that any developer would already know. The test: "would a developer need to discover this the hard way, or is it self-evident?" If self-evident, exclude it.
53
+ **CLAUDE.md**: Launch memorize subagent in background with session learnings. Do not inline-edit CLAUDE.md the memorize agent handles extraction, deduplication, and writing.
54
54
 
55
55
  **docs/index.html**: `PHASES` array matches current skill state machine phases. Platform lists match `platforms/` directory. State machine diagram updated if new phases added.
56
56
 
@@ -77,7 +77,7 @@ Witness each written file from disk. Any variance from expected content → fix
77
77
 
78
78
  ```
79
79
  exec:bash
80
- git add README.md CLAUDE.md docs/index.html plugforge-starter/agents/gm.md
80
+ git add README.md docs/index.html plugforge-starter/agents/gm.md
81
81
  git diff --cached --stat
82
82
  ```
83
83