gm-skill 2.0.1480 → 2.0.1482

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/AGENTS.md CHANGED
@@ -50,6 +50,8 @@ Only record non-obvious technical caveats that cost multiple runs to discover. R
50
50
 
51
51
  **Detail-heavy caveats live in rs-learn (`.gm/rs-learn.db`), not here.** Per-crate runtime quirks, Windows process-spawn mechanics, hook implementation details, ocw/site/workflow specifics, and similar fact-base material are exfiltrated to rs-learn and reachable via `exec:recall`. AGENTS.md keeps only top-level rules that govern gm-the-repo. When in doubt: gm-the-repo architecture or cross-cutting policy stays here; single-crate or single-platform mechanism goes to rs-learn.
52
52
 
53
+ **Every memorize run also drains AGENTS.md — migration is bidirectional, deflation is the back-pressure.** AGENTS.md grows monotonically if facts only flow in; left unchecked it bloats past the context budget it protects. So every session that dispatches `memorize-fire` for new facts ALSO picks a few existing AGENTS.md entries that have become detail-heavy / single-crate / single-platform (the material this policy says belongs in rs-learn) and exfiltrates them: `memorize-fire` the entry's substance to the default namespace, then delete or compress its AGENTS.md paragraph to a one-line pointer in the same commit. Witnessed by both the store gaining the fact (recallable next turn) and the AGENTS.md byte-count dropping. A few entries per run, never a wholesale rewrite; top-level cross-cutting rules stay, everything reachable by `recall` drains. Skipping the drain on a memorize run is the slow-bloat drift this policy exists to prevent.
54
+
53
55
  ## Coding Style
54
56
 
55
57
  **No comments in code.** No inline, block, or JSDoc comments in every possible location, source, generated output, hooks, scripts.
@@ -112,7 +114,7 @@ Every possible skill's `allowed-tools:` frontmatter is reduced to `Skill, Read,
112
114
 
113
115
  **The agent IS the LLM rs-learn calls; every judgment rs-learn needs is the agent deciding on the spot**: rs-learn never reaches out to a model for a quality score, a relevance call, a prune decision, a route outcome, or a loss signal. plugkit IS the harness and the agent IS the model it dispatched, so each of those is a decision the agent makes inline, from its knowledge of the current situation, and reports back through the spool. The MicroLoRA adapter trains from a trajectory-quality the agent self-reports (`learn{feedback, embedding, payload:{quality}}`, a rank-2 learned scoring head that reads a bge-small embedding and emits a per-target logit `B·(A·embedding)`, sona-style — it scores targets from embeddings, it does not reshape the vector; consuming its score in recall re-ranking is the open integration. Distinct from the FastGRNN model-selection router, which takes `learn{record_outcome, target:<model id>, quality}`); bad-memory pruning is the agent judging a recall hit stale and dispatching `memorize-prune{key}`; the deep core takes the agent's `record_loss`; the attention takes `nudge_relation`. None of these wait on a signal the host must expose, because the agent already holds it. Encourage heavy `recall` and `learn` use so the on-the-spot judgments are grounded in prior context, not guessed — every mutable resolution is already a memorization run, and the same recall-first reflex should inform every quality/prune/optimization call. The instruction prose names where each self-report fires (VERIFY closes the training loop); the principle here is the load-bearing one: there is no separate judge model, the agent is it, and it decides now.
114
116
 
115
- **host_exec_js is synchronous**: wasm host runs `exec_js` via Node `child_process.spawnSync`; long subprocesses block the watcher. Pass a real per-call timeout; orphaned background work unsupported under wasm.
117
+ **host_exec_js is synchronous**: pass a real per-call `timeoutMs` (zero/missing is a hard error); long subprocesses block the watcher; no async/background exec under wasm. Mechanism detail in rs-learn (`recall: host_exec_js synchronous`).
116
118
 
117
119
  **Sync-before-emit (codeinsight + search)**: outputs must come from freshly-completed indices. Cache serves only on digest match (mtime sum + git HEAD + dirty-tree marker). Default invocation runs fresh. `--read-cache` permitted only when `.codeinsight.digest` matches; mismatch auto-refreshes. rs-search runs scan + embed + sweep before first result; emits `[index fully synced: …]`. Unverified-index emit = stale ground truth.
118
120
 
@@ -120,11 +122,11 @@ Every possible skill's `allowed-tools:` frontmatter is reduced to `Skill, Read,
120
122
 
121
123
  **Skill SKILL.md frontmatter `allowed-tools:` is harness-enforced**: If a skill omits `allowed-tools` or does not list `Skill`, the model loses the ability to invoke downstream skills that turn. The shipped surface is a single skill (`gm-skill`); this rule governs every possible future skill that participates in a chain.
122
124
 
123
- **rs-learn observability**: every possible learning-pipeline state change emits a structured `evt: {event, sess, ts, ...}` line via `wasm_dispatch::emit_event` (host_log level 1) into `.gm/exec-spool/.watcher.log` and gm-log/<date>/plugkit.jsonl. Event taxonomy: `embed_fail` (step + error), `embed_init_ok/fail/cached_fail`, `memorize_reject` (reason, text_prefix, namespace), `memorize_embed_rollback` (key, namespace, error), `discipline_sigil_ignored` (sigil in @<name> request routed to default), `table_dropped` (dim-mismatch silent drops), `recall_score_unavailable` (host_vec_search strips score). Recall replies now include `mode` (vector_top_k|fallback_like|kv_query), `namespace`, `derived_query`, and per-hit `score` (null when host elides). gmsniff flags: `--embed-failures`, `--recall-misses`, `--recall-scores`, `--classifier-rejects`, `--memory-leverage`, `--recall-modes`, `--table-drops`, `--discipline-sigil-ignored`. ccsniff `--learning-xref` joins transcript turn windows to rs_learn events by sess (now stamped) + project + time-window. Learning quality is observable, not algorithmic black box.
125
+ **rs-learn observability**: every learning-pipeline state change emits a structured `evt:{event,sess,ts,...}` line into `.gm/exec-spool/.watcher.log` + gm-log; recall replies carry `mode`/`namespace`/`derived_query`/per-hit `score`; gmsniff/ccsniff expose the taxonomy. Learning quality is observable, not a black box. Full event taxonomy + flag list in rs-learn (`recall: rs-learn observability taxonomy`).
124
126
 
125
- **SKILL.md auto-refresh**: every possible bootstrap call (`bootstrapPlugkit`) compares the sha256 of the bundled `gm-skill/skills/gm-skill/SKILL.md` (shipped inside the npm package) against the installed copies at `~/.agents/skills/gm-skill/SKILL.md` and `~/.claude/skills/gm-skill/SKILL.md`. Hash mismatch triggers atomic write (`.tmp` + rename) of both targets so the agent sees the latest prose on next session, no manual reinstall needed. Logged to `bootstrap.jsonl` as `SKILL.md refreshed`. The bundled SKILL.md is the source of truth; reinstalling gm-skill only matters when the npm package itself changes, which the cascade pipeline guarantees on every possible plugkit version bump.
127
+ **SKILL.md auto-refresh**: `bootstrapPlugkit` sha256-compares the bundled SKILL.md against installed copies and atomically rewrites on mismatch, so the agent always sees the latest prose. Mechanism detail in rs-learn (`recall: SKILL.md auto-refresh`).
126
128
 
127
- **Skill-initiated bootstrap contract**: `lib/skill-bootstrap.js` performs wasm initialization for skill-driven dispatch without hook infrastructure. `bootstrapPlugkit(sessionId)` accepts optional SESSION_ID, ensures the wasm artifact and `plugkit-wasm-wrapper.js` are in place, writes status/error to `.gm/exec-spool/.bootstrap-status.json` and `.bootstrap-error.json` for spool awareness, and returns `{ ok: true }` on success or `{ ok: false, error: message }` on failure. Failures are non-fatal, callers fall back to a degraded surface.
129
+ **Skill-initiated bootstrap contract**: `lib/skill-bootstrap.js::bootstrapPlugkit(sessionId)` initializes wasm for skill-driven dispatch without hooks; failures are non-fatal (degraded fallback). Mechanism detail in rs-learn (`recall: skill-initiated bootstrap contract`).
128
130
 
129
131
  ## Cascade pipeline
130
132
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1480",
3
+ "version": "2.0.1482",
4
4
  "description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1480",
3
+ "version": "2.0.1482",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, 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-skill",
3
- "version": "2.0.1480",
3
+ "version": "2.0.1482",
4
4
  "description": "Canonical universal harness — AI-native software engineering via skill-driven orchestration; bootstraps plugkit for task execution and session isolation. Install in any AI coding agent host.",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",