gm-cc 2.0.649 → 2.0.651

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.649",
7
+ "version": "2.0.651",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
@@ -1,39 +1,18 @@
1
1
  ---
2
2
  name: memorize
3
- description: Background memory agent. Classifies context into memory/ dir and AGENTS.md. Aggressively prunes stale/derivable/duplicate entries.
3
+ description: Background memory agent. Classifies context and writes to AGENTS.md + rs-learn. No memory dir, no MEMORY.md.
4
4
  agent: true
5
5
  ---
6
6
 
7
7
  # Memorize — Background Memory Agent
8
8
 
9
- Memory dir and AGENTS.md live with the current project not a fixed path. Resolve at start of every run:
9
+ Writes facts to two places only: **AGENTS.md** (non-obvious technical caveats) and **rs-learn** (all classified facts via fast ingest).
10
10
 
11
- - **Project root** = `process.cwd()` when you are invoked (the user's working directory, e.g. `C:/dev/devbox/spawnpoint`). `AGENTS.md` is `<project root>/AGENTS.md`.
12
- - **Memory dir** = `<HOME>/.claude/projects/<slug>/memory/` where `<slug>` is `process.cwd()` with `:` stripped and `/` or `\\` replaced by `--` (example: `C:/dev/devbox/spawnpoint` → `C--dev-devbox-spawnpoint`). On Windows `<HOME>` = `C:/Users/<user>`; on POSIX it is `$HOME`.
11
+ Resolve at start of every run:
13
12
 
14
- If either path does not yet exist, create it. Never write to a different project's memory dir.
13
+ - **Project root** = `process.cwd()` when invoked. `AGENTS.md` is `<project root>/AGENTS.md`.
15
14
 
16
- ## STEP 1: READ
17
-
18
- Read memory dir contents and MEMORY.md index. Read all existing memory files. Read AGENTS.md in full.
19
-
20
- If memory dir does not exist, create it. If MEMORY.md does not exist, create it empty.
21
-
22
- ## STEP 2: PRUNE
23
-
24
- Run BEFORE writing any new content.
25
-
26
- Remove entries that are:
27
- - Contradicted or superseded by current AGENTS.md or observable codebase facts
28
- - Duplicates of other entries (merge into one)
29
- - Derivable at runtime via exec:codesearch: file paths, function names, API shapes, architecture patterns
30
- - Active task state, current progress, session narration
31
-
32
- Keep ONLY: cross-session unknowns that required multiple failed attempts to discover, user preferences and feedback, project decisions with non-obvious rationale.
33
-
34
- When in doubt: DELETE. Memory must stay lean.
35
-
36
- ## STEP 3: CLASSIFY
15
+ ## STEP 1: CLASSIFY
37
16
 
38
17
  Examine the ## CONTEXT TO MEMORIZE section at the end of this prompt. For each fact, classify as:
39
18
 
@@ -43,50 +22,28 @@ Examine the ## CONTEXT TO MEMORIZE section at the end of this prompt. For each f
43
22
  - reference: pointers to external systems, URLs, paths
44
23
 
45
24
  Discard:
46
- - Facts already covered in AGENTS.md (exact or paraphrase)
47
25
  - Obvious facts derivable from reading the code
48
26
  - Active task state or session progress
27
+ - Facts that would not be useful in a future session
49
28
 
50
- ## STEP 4: WRITE
29
+ ## STEP 2: INGEST INTO RS-LEARN
51
30
 
52
- For each classified fact:
53
- 1. Check all existing memory files — if one covers the same topic, merge the new fact in
54
- 2. If no existing file covers it, create memory/<slug>.md
31
+ For each classified fact, run (one call per fact):
55
32
 
56
- File format:
33
+ ```bash
34
+ bun x rs-learn add "<fact text>" --source "<type>/<slug>" --no-extract
57
35
  ```
58
- ---
59
- name: <descriptive name>
60
- description: <one-line under 80 chars>
61
- type: user|feedback|project|reference
62
- ---
63
-
64
- <body>
65
- ```
66
-
67
- For feedback and project types, body must include:
68
- - The fact or rule
69
- - Why: <reason>
70
- - How to apply: <concrete application>
71
-
72
- ## STEP 5: UPDATE MEMORY.md
73
-
74
- Rewrite the MEMORY.md index to reflect all current files in the memory dir.
75
-
76
- Format: one line per file, under 150 chars each:
77
- `- [Title](file.md) — one-line hook`
78
-
79
- No frontmatter. Max 200 lines.
80
36
 
81
- ## STEP 6: CONSOLIDATE
37
+ Where `<fact text>` is a self-contained one-to-three sentence summary of the fact, and `<slug>` is a short kebab-case label (e.g. `feedback/terse-responses`, `project/merge-freeze`).
82
38
 
83
- For each memory file: if its content is already fully covered by AGENTS.md (exact or equivalent), delete the memory file and remove its line from MEMORY.md.
39
+ Use `--no-extract` always fast path, no LLM overhead, ~1s per call.
84
40
 
85
- ## STEP 7: AGENTS.md
41
+ ## STEP 3: AGENTS.md
86
42
 
87
43
  A non-obvious technical caveat qualifies if it required multiple failed runs to discover and would not be apparent from reading code or docs.
88
44
 
89
45
  For each qualifying fact from context:
46
+ - Read AGENTS.md first if not already read this run
90
47
  - If AGENTS.md already covers it → skip
91
48
  - If genuinely non-obvious → append to the appropriate section
92
49
 
@@ -23,7 +23,7 @@ if (isSkillTool && skillName) {
23
23
  process.exit(0);
24
24
  }
25
25
  if (fs.existsSync(needsGmPath)) {
26
- process.stdout.write(JSON.stringify({ decision: 'block', reason: 'HARD CONSTRAINT: invoke the Skill tool with skill: "gm" before any other tool. The gm skill must be the first action after every user message.' }));
26
+ process.stdout.write(JSON.stringify({ decision: 'block', reason: 'HARD CONSTRAINT: invoke the Skill tool with skill: "gm:gm" before any other tool. The gm:gm skill must be the first action after every user message.' }));
27
27
  process.exit(0);
28
28
  }
29
29
  const lastSkill = (() => { try { return fs.readFileSync(lastskillPath, 'utf8').trim(); } catch (_) { return ''; } })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.649",
3
+ "version": "2.0.651",
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.649",
3
+ "version": "2.0.651",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",