greprag 5.49.8 → 5.49.9

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.
Files changed (34) hide show
  1. package/dist/commands/collision-reminder.d.ts +14 -0
  2. package/dist/commands/collision-reminder.js +40 -0
  3. package/dist/commands/collision-reminder.js.map +1 -0
  4. package/dist/commands/coordinate-gate.d.ts +12 -6
  5. package/dist/commands/coordinate-gate.js +24 -10
  6. package/dist/commands/coordinate-gate.js.map +1 -1
  7. package/dist/commands/friction-reminder.d.ts +22 -44
  8. package/dist/commands/friction-reminder.js +45 -63
  9. package/dist/commands/friction-reminder.js.map +1 -1
  10. package/dist/commands/init.js +7 -14
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/commands/load-primer-reminder.d.ts +28 -0
  13. package/dist/commands/load-primer-reminder.js +51 -0
  14. package/dist/commands/load-primer-reminder.js.map +1 -0
  15. package/dist/commands/load.d.ts +15 -0
  16. package/dist/commands/load.js +112 -0
  17. package/dist/commands/load.js.map +1 -0
  18. package/dist/commands/memory-reflex.d.ts +17 -104
  19. package/dist/commands/memory-reflex.js +23 -215
  20. package/dist/commands/memory-reflex.js.map +1 -1
  21. package/dist/commands/reminder-registry.d.ts +12 -1
  22. package/dist/commands/reminder-registry.js +46 -4
  23. package/dist/commands/reminder-registry.js.map +1 -1
  24. package/dist/commands/reminder-types.d.ts +28 -0
  25. package/dist/commands/version-reminder.d.ts +15 -0
  26. package/dist/commands/version-reminder.js +34 -0
  27. package/dist/commands/version-reminder.js.map +1 -0
  28. package/dist/hook.js +111 -219
  29. package/dist/hook.js.map +1 -1
  30. package/dist/index.js +6 -0
  31. package/dist/index.js.map +1 -1
  32. package/package.json +1 -1
  33. package/skill/templates/chip-leader.md +188 -0
  34. package/skill/templates/chip-spawn.md +4 -4
@@ -0,0 +1,14 @@
1
+ /** collision-reminder — the coordinate gate as a registry MATCH(command) module
2
+ * (docs/reminder-interrupt.md — the landed map). The first `source: 'command'`
3
+ * reminder: it reads `env.toolCommand` (the Bash command about to run, populated
4
+ * only at PreToolUse), matches it against the risky shared-state signatures, and
5
+ * fires the coordinate directive IF a same-repo peer is live.
6
+ *
7
+ * PURE, like every module: the hot-path I/O (the fresh watcher read → live peers)
8
+ * stays in the hook, which passes the result as `env.collisionPeers`. This module
9
+ * only classifies the command (pure) + formats the directive — reusing the proven
10
+ * `classifyRiskyCommand` / `buildCoordinateDirective` from coordinate-gate.ts. So
11
+ * the standalone PreToolUse coordinate-gate control point is folded into the one
12
+ * registry `detect(env)` path. */
13
+ import { ReminderModule } from './reminder-types';
14
+ export declare const collisionMatchModule: ReminderModule;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /** collision-reminder — the coordinate gate as a registry MATCH(command) module
3
+ * (docs/reminder-interrupt.md — the landed map). The first `source: 'command'`
4
+ * reminder: it reads `env.toolCommand` (the Bash command about to run, populated
5
+ * only at PreToolUse), matches it against the risky shared-state signatures, and
6
+ * fires the coordinate directive IF a same-repo peer is live.
7
+ *
8
+ * PURE, like every module: the hot-path I/O (the fresh watcher read → live peers)
9
+ * stays in the hook, which passes the result as `env.collisionPeers`. This module
10
+ * only classifies the command (pure) + formats the directive — reusing the proven
11
+ * `classifyRiskyCommand` / `buildCoordinateDirective` from coordinate-gate.ts. So
12
+ * the standalone PreToolUse coordinate-gate control point is folded into the one
13
+ * registry `detect(env)` path. */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.collisionMatchModule = void 0;
16
+ const coordinate_gate_1 = require("./coordinate-gate");
17
+ exports.collisionMatchModule = {
18
+ id: 'collision',
19
+ source: 'command',
20
+ // Fire only when: there is a command, it is a risky shared-state action, AND a
21
+ // same-repo peer is live. Any miss → silent (the action proceeds ungated).
22
+ detect: (env) => {
23
+ if (!env.toolCommand)
24
+ return { tier: 'silent' };
25
+ if (!(0, coordinate_gate_1.classifyRiskyCommand)(env.toolCommand))
26
+ return { tier: 'silent' };
27
+ if (!env.collisionPeers || env.collisionPeers.length === 0)
28
+ return { tier: 'silent' };
29
+ return { tier: 'nag' };
30
+ },
31
+ announce: () => null,
32
+ reminder: (_d, env) => {
33
+ const trigger = env.toolCommand ? (0, coordinate_gate_1.classifyRiskyCommand)(env.toolCommand) : null;
34
+ const peers = env.collisionPeers ?? [];
35
+ if (!trigger || peers.length === 0)
36
+ return null;
37
+ return (0, coordinate_gate_1.buildCoordinateDirective)(trigger, peers, env.short, env.alias ?? null);
38
+ },
39
+ };
40
+ //# sourceMappingURL=collision-reminder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collision-reminder.js","sourceRoot":"","sources":["../../src/commands/collision-reminder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;mCAWmC;;;AAGnC,uDAAmF;AAEtE,QAAA,oBAAoB,GAAmB;IAClD,EAAE,EAAE,WAAW;IACf,MAAM,EAAE,SAAS;IACjB,+EAA+E;IAC/E,2EAA2E;IAC3E,MAAM,EAAE,CAAC,GAAgB,EAAa,EAAE;QACtC,IAAI,CAAC,GAAG,CAAC,WAAW;YAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAChD,IAAI,CAAC,IAAA,sCAAoB,EAAC,GAAG,CAAC,WAAW,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACtE,IAAI,CAAC,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACtF,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IACD,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;IACpB,QAAQ,EAAE,CAAC,EAAE,EAAE,GAAgB,EAAiB,EAAE;QAChD,MAAM,OAAO,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,sCAAoB,EAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/E,MAAM,KAAK,GAAG,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAChD,OAAO,IAAA,0CAAwB,EAAC,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;IAChF,CAAC;CACF,CAAC"}
@@ -56,7 +56,9 @@ export declare function triggerFromPreToolUse(toolName: string, toolInput: Recor
56
56
  /** The LOUD coordinate directive — names the action + the live same-repo peers
57
57
  * and tells the agent to message them BEFORE proceeding. PURE, source-agnostic
58
58
  * (takes a CoordinateTrigger, not a PreToolUse event). */
59
- export declare function buildCoordinateDirective(trigger: CoordinateTrigger, peers: CollisionPeer[], myShort: string, alias: string | null): string;
59
+ export declare function buildCoordinateDirective(trigger: CoordinateTrigger, peers: Array<{
60
+ short: string;
61
+ }>, myShort: string, alias: string | null): string;
60
62
  export interface CoordinateGateOptions {
61
63
  short: string;
62
64
  projectId: string | null;
@@ -65,9 +67,13 @@ export interface CoordinateGateOptions {
65
67
  apiKey: string;
66
68
  alias: string | null;
67
69
  }
68
- /** Source-agnostic eval+message. Given a trigger from ANY source, do a FRESH
69
- * watcher read, detect same-repo peers, and return the LOUD directive or null
70
- * if no peer is live in this repo. NO dedup, NO local state: a fresh read every
71
- * call. Best-effort: any failure (network, unanchored) null (fail-open, the
72
- * action proceeds ungated). */
70
+ /** FRESH watcher read → the same-repo peers live right now (the I/O half, kept out
71
+ * of the pure module). NO dedup, NO local state: a fresh read every call. Empty on
72
+ * any failure / no peer (fail-open). The collision Match-on-command module
73
+ * (collision-reminder.ts) calls this in the hook, then detects purely on the result. */
74
+ export declare function resolveCollisionPeers(opts: CoordinateGateOptions): Promise<CollisionPeer[]>;
75
+ /** Source-agnostic eval+message. Given a trigger from ANY source, resolve live
76
+ * same-repo peers and return the LOUD directive — or null if none. Retained for
77
+ * the existing PreToolUse path + tests; the registry now reaches the same result
78
+ * via resolveCollisionPeers + the collision module. */
73
79
  export declare function runCoordinateGate(trigger: CoordinateTrigger, opts: CoordinateGateOptions): Promise<string | null>;
@@ -40,13 +40,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.classifyRiskyCommand = classifyRiskyCommand;
41
41
  exports.triggerFromPreToolUse = triggerFromPreToolUse;
42
42
  exports.buildCoordinateDirective = buildCoordinateDirective;
43
+ exports.resolveCollisionPeers = resolveCollisionPeers;
43
44
  exports.runCoordinateGate = runCoordinateGate;
44
45
  const collision_check_1 = require("./collision-check");
45
46
  /** Risky shared-state command signatures. Each segment of a (possibly chained)
46
47
  * Bash command is tested against these. SPECIFIC to the Bash/PreToolUse source. */
47
48
  const RISKY_PATTERNS = [
48
49
  { kind: 'merge', label: 'git merge', re: /^git\s+merge\b/ },
49
- { kind: 'push', label: 'git push', re: /^git\s+push\b/ },
50
+ { kind: 'merge', label: 'git rebase', re: /^git\s+rebase\b/ }, // rewrites shared history
51
+ { kind: 'merge', label: 'gh pr merge', re: /^gh\s+pr\s+merge\b/ },
52
+ { kind: 'push', label: 'git push', re: /^git\s+push\b/ }, // incl. --force
50
53
  { kind: 'deploy', label: 'wrangler deploy', re: /^(?:npx\s+)?wrangler\s+deploy\b/ },
51
54
  { kind: 'deploy', label: 'npm run deploy', re: /^npm\s+run\s+deploy\b/ },
52
55
  { kind: 'deploy', label: 'npm publish', re: /^npm\s+publish\b/ },
@@ -91,16 +94,27 @@ function buildCoordinateDirective(trigger, peers, myShort, alias) {
91
94
  + `Ping before proceeding — greprag send "heads up, about to ${trigger.label}" `
92
95
  + `--to ${handle}@greprag.com/<8hex> --from-session ${myShort}`);
93
96
  }
94
- /** Source-agnostic eval+message. Given a trigger from ANY source, do a FRESH
95
- * watcher read, detect same-repo peers, and return the LOUD directive or null
96
- * if no peer is live in this repo. NO dedup, NO local state: a fresh read every
97
- * call. Best-effort: any failure (network, unanchored) null (fail-open, the
98
- * action proceeds ungated). */
97
+ /** FRESH watcher read → the same-repo peers live right now (the I/O half, kept out
98
+ * of the pure module). NO dedup, NO local state: a fresh read every call. Empty on
99
+ * any failure / no peer (fail-open). The collision Match-on-command module
100
+ * (collision-reminder.ts) calls this in the hook, then detects purely on the result. */
101
+ async function resolveCollisionPeers(opts) {
102
+ try {
103
+ const watchers = await (0, collision_check_1.fetchTenantWatchers)(opts.apiUrl, opts.apiKey);
104
+ if (watchers.length === 0)
105
+ return [];
106
+ return (0, collision_check_1.detectCollisions)(opts.short, opts.projectId, opts.projectName, watchers);
107
+ }
108
+ catch {
109
+ return [];
110
+ }
111
+ }
112
+ /** Source-agnostic eval+message. Given a trigger from ANY source, resolve live
113
+ * same-repo peers and return the LOUD directive — or null if none. Retained for
114
+ * the existing PreToolUse path + tests; the registry now reaches the same result
115
+ * via resolveCollisionPeers + the collision module. */
99
116
  async function runCoordinateGate(trigger, opts) {
100
- const watchers = await (0, collision_check_1.fetchTenantWatchers)(opts.apiUrl, opts.apiKey);
101
- if (watchers.length === 0)
102
- return null;
103
- const peers = (0, collision_check_1.detectCollisions)(opts.short, opts.projectId, opts.projectName, watchers);
117
+ const peers = await resolveCollisionPeers(opts);
104
118
  if (peers.length === 0)
105
119
  return null;
106
120
  return buildCoordinateDirective(trigger, peers, opts.short, opts.alias);
@@ -1 +1 @@
1
- {"version":3,"file":"coordinate-gate.js","sourceRoot":"","sources":["../../src/commands/coordinate-gate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAoCiF;;AAkCjF,oDAQC;AAMD,sDAMC;AAKD,4DAWC;AAgBD,8CAQC;AA5FD,uDAE2B;AAW3B;oFACoF;AACpF,MAAM,cAAc,GAA0E;IAC5F,EAAE,IAAI,EAAE,OAAO,EAAG,KAAK,EAAE,WAAW,EAAU,EAAE,EAAE,gBAAgB,EAAE;IACpE,EAAE,IAAI,EAAE,MAAM,EAAI,KAAK,E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AAC,MAAM,QAAQ,MAAM,uBAAuB,IAAI,KAAK;UAC/F,6DAA6D,OAAO,CAAC,KAAK,IAAI;UAC9E,QAAQ,MAAM,sCAAsC,OAAO,EAAE,CAChE,CAAC;AACJ,CAAC;AAWD;;;yFAGyF;AAClF,KAAK,UAAU,qBAAqB,CAAC,IAA2B;IACrE,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,IAAA,qCAAmB,EAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACrE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACrC,OAAO,IAAA,kCAAgB,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAClF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED;;;wDAGwD;AACjD,KAAK,UAAU,iBAAiB,CACrC,OAA0B,EAAE,IAA2B;IAEvD,MAAM,KAAK,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,OAAO,wBAAwB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC"}
@@ -13,46 +13,26 @@
13
13
  * network, no clock — the hook does ALL I/O. Keeping detect/tier a pure function is what
14
14
  * makes the detect→silent transition (the auto-stop) unit-testable (the regression-lock). */
15
15
  import { Tier, ReminderModule } from './reminder-types';
16
- /** The firing-tier ladder (docs/reminder-interrupt.md §Firing tiers). `silent`
17
- * is the off rung; the other three escalate wording intensity with the cost of
18
- * inaction: ambient = soft pointer, nudge = imperative + reason, nag = LOUD
19
- * forced-decision. */
20
16
  export type FrictionTier = Tier;
21
- /** Ambient (calm-state) cadence: one soft pointer every N turns. The low-rate
22
- * trickle for a capability with no live bad-state to gate on. */
23
- export declare const AMBIENT_EVERY_N = 5;
24
- /** Decide the friction reminder's firing tier from the live state bag PURE so
25
- * the ladder is unit-testable (the regression-lock rung). DYNAMIC: urgency tracks
26
- * the live stress level (docs/stress-trigger.md), not a hand-set knob.
27
- *
28
- * stress HIGH (2) → nag — LOUD forced-decision; fires while the live bad
29
- * state holds and goes silent the instant it flips.
30
- * stress ELEVATED (1) nudge imperative + reason, while elevated.
31
- * stress CALM (0) → ambient every Nth turn (turnCount % AMBIENT_EVERY_N),
32
- * else silent.
33
- *
34
- * Defensive: non-finite inputs collapse to 0 (calm / turn 0 → silent), so a
35
- * missing or corrupt state bag can never escalate — fail-quiet by construction. */
36
- export declare function frictionReminderTier(turnCount: number, stress: number): FrictionTier;
37
- /** SessionStart announce — the mechanic-launch schema, loaded ONCE. The heavy
38
- * half of the pair: it (1) TEACHES the method the per-turn reminder triggers, so
39
- * the reminder stays a thin pointer, and (2) PRIMES adherence — the agent acts on
40
- * a reminder for a capability it was *taught*, not a cold mid-session imperative
41
- * (the no-orphan invariant, docs/reminder-interrupt.md). Written for an AGENT under
42
- * token pressure per the doc's authoring rules: action-first, reason+method
43
- * bundled, directive-framed, token-minimal. ~150 tokens; amortized over the
44
- * session. */
45
- export declare function buildMechanicAnnounce(): string;
46
- /** Per-turn reminder line for a given tier — the thin pointer back at the announce
47
- * schema; null on `silent`. Wording intensity scales with the tier (the doc):
48
- * ambient = soft pointer, nudge = imperative + reason, nag = LOUD forced-decision.
49
- * Every non-silent line is action-first, bundles reason+method, and ends on a
50
- * forced binary (act → spawn / clear → continue) so it CONVERTS instead of becoming
51
- * wallpaper (the fix-`16a29a8b` banner-blindness failure mode). Grounded to the
52
- * live signal where there is one (nudge/nag name the stress). The act-now directive
53
- * envelope (authoring rule #4) is applied by the hook, not here — this module owns
54
- * the wording, the caller owns the framing. */
17
+ /** The friction reminder fires ONLY on DETECTED STRESS (docs/stress-trigger.md)
18
+ * no turn-cadence ambient nagging (that was the wallpaper removed 2026-06-22).
19
+ * `computeStress` (the validated AUC-0.835 composite: repetition · retry ·
20
+ * seq-trigram · errors · churn) emits the level; this maps it to a tier:
21
+ * HIGH (2) → nag (LOUD)
22
+ * ELEVATED (1) nudge (the detector fires pre-error at this band)
23
+ * CALM (0) → silent — the reminder NEVER fires at rest.
24
+ * Defensive: a non-finite stress collapses to calm (fail-quiet). */
25
+ export declare function frictionReminderTier(stress: number): FrictionTier;
26
+ /** The per-turn reminder linefires only on detected stress, points back at the
27
+ * primer's repair vehicles, ends on a forced binary so it converts. null = calm. */
55
28
  export declare function buildFrictionReminder(tier: FrictionTier): string | null;
29
+ /** SessionStart primer — the active-Mechanic schema, loaded ONCE. Full doctrine
30
+ * inline (a PRIMER, not a pointer): it teaches WHEN friction is a fix-now signal,
31
+ * the two repair vehicles (reflex vs workshop, by friction tier), and the modes.
32
+ * Depends on the chip concept being loaded first (chip-spawn-pointer) — it names
33
+ * chip vehicles. Written for an agent under token pressure: action-first,
34
+ * reason+method bundled, no per-turn nag to lean on. */
35
+ export declare function buildMechanicAnnounce(): string;
56
36
  /** Persisted fire-counter (docs/reminder-interrupt.md §Measurement). The
57
37
  * DENOMINATOR of the adherence ratio: how many friction reminders were shown, by
58
38
  * tier. The numerator (reflex chips actually spawned after a reminder) is the next
@@ -83,10 +63,8 @@ export declare function tallyFrictionFire(prior: FrictionStats | null, tier: Fri
83
63
  * path calls this when it sees a chip preloaded from the reflex-chip template land
84
64
  * after a reminder. Never decrements; idempotency is the caller's concern. */
85
65
  export declare function tallyReflexSpawn(prior: FrictionStats | null): FrictionStats;
86
- /** The active Mechanic, recast onto the detector model (docs/reminder-interrupt.md
87
- * §Registry spec). `detect` is stress-gated the friction signal IS the live
88
- * deficiency; `announce` teaches the reflex-chip schema once; `reminder` is the thin
89
- * per-turn line. Wired through the container (reminder-registry.ts). Unlike the
90
- * watcher-arm reference module (binary, auto-silences when armed), this one is
91
- * GRADED — silent at calm, escalating with the live stress level. */
66
+ /** The active Mechanic a PRIMER-ONLY module (docs/load-system.md): one strong
67
+ * SessionStart announce, no per-turn reminder (the friction nag was removed
68
+ * 2026-06-22 as wallpaper). `dependsOn` the chip-spawn pointer so the chip concept
69
+ * it references is already loaded — the boot sequence places it AFTER chips. */
92
70
  export declare const mechanicFrictionModule: ReminderModule;
@@ -14,82 +14,64 @@
14
14
  * network, no clock — the hook does ALL I/O. Keeping detect/tier a pure function is what
15
15
  * makes the detect→silent transition (the auto-stop) unit-testable (the regression-lock). */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.mechanicFrictionModule = exports.AMBIENT_EVERY_N = void 0;
17
+ exports.mechanicFrictionModule = void 0;
18
18
  exports.frictionReminderTier = frictionReminderTier;
19
- exports.buildMechanicAnnounce = buildMechanicAnnounce;
20
19
  exports.buildFrictionReminder = buildFrictionReminder;
20
+ exports.buildMechanicAnnounce = buildMechanicAnnounce;
21
21
  exports.tallyFrictionFire = tallyFrictionFire;
22
22
  exports.tallyReflexSpawn = tallyReflexSpawn;
23
23
  const state_trigger_1 = require("./state-trigger");
24
- /** Ambient (calm-state) cadence: one soft pointer every N turns. The low-rate
25
- * trickle for a capability with no live bad-state to gate on. */
26
- exports.AMBIENT_EVERY_N = 5;
27
- /** Decide the friction reminder's firing tier from the live state bag PURE so
28
- * the ladder is unit-testable (the regression-lock rung). DYNAMIC: urgency tracks
29
- * the live stress level (docs/stress-trigger.md), not a hand-set knob.
30
- *
31
- * stress HIGH (2) → nag — LOUD forced-decision; fires while the live bad
32
- * state holds and goes silent the instant it flips.
33
- * stress ELEVATED (1) → nudge — imperative + reason, while elevated.
34
- * stress CALM (0) → ambient every Nth turn (turnCount % AMBIENT_EVERY_N),
35
- * else silent.
36
- *
37
- * Defensive: non-finite inputs collapse to 0 (calm / turn 0 → silent), so a
38
- * missing or corrupt state bag can never escalate — fail-quiet by construction. */
39
- function frictionReminderTier(turnCount, stress) {
24
+ /** The friction reminder fires ONLY on DETECTED STRESS (docs/stress-trigger.md)
25
+ * no turn-cadence ambient nagging (that was the wallpaper removed 2026-06-22).
26
+ * `computeStress` (the validated AUC-0.835 composite: repetition · retry ·
27
+ * seq-trigram · errors · churn) emits the level; this maps it to a tier:
28
+ * HIGH (2) → nag (LOUD)
29
+ * ELEVATED (1) nudge (the detector fires pre-error at this band)
30
+ * CALM (0) → silent — the reminder NEVER fires at rest.
31
+ * Defensive: a non-finite stress collapses to calm (fail-quiet). */
32
+ function frictionReminderTier(stress) {
40
33
  const s = Number.isFinite(stress) ? stress : 0;
41
- const t = Number.isFinite(turnCount) ? turnCount : 0;
42
34
  if (s >= state_trigger_1.STRESS_HIGH)
43
35
  return 'nag';
44
36
  if (s >= state_trigger_1.STRESS_ELEVATED)
45
37
  return 'nudge';
46
- if (t >= 1 && t % exports.AMBIENT_EVERY_N === 0)
47
- return 'ambient';
48
38
  return 'silent';
49
39
  }
50
- // ---------- Authored text (announce + per-turn reminder) ---------------------
51
- /** The HOW string the method every tier points at. Kept in one place so the
52
- * announce and the per-turn line can never drift on the spawn mechanic. */
53
- const SPAWN_METHOD = 'spawn a fire-and-forget reflex chip (spawn_task → packages/cli/skill/templates/reflex-chip.md)';
54
- /** SessionStart announce — the mechanic-launch schema, loaded ONCE. The heavy
55
- * half of the pair: it (1) TEACHES the method the per-turn reminder triggers, so
56
- * the reminder stays a thin pointer, and (2) PRIMES adherence — the agent acts on
57
- * a reminder for a capability it was *taught*, not a cold mid-session imperative
58
- * (the no-orphan invariant, docs/reminder-interrupt.md). Written for an AGENT under
59
- * token pressure per the doc's authoring rules: action-first, reason+method
60
- * bundled, directive-framed, token-minimal. ~150 tokens; amortized over the
61
- * session. */
62
- function buildMechanicAnnounce() {
63
- return [
64
- '[Active Mechanic — keep the harness healthy IN-SESSION. Friction is a signal to fix now, not to defer.]',
65
- 'WHEN you hit friction this session — repeated yourself, fought a tool, got corrected ≥2× on the same thing, or rediscovered something already known — fix the PATTERN now; do not push through.',
66
- `HOW: ${SPAWN_METHOD}. The chip is preloaded with the mechanic tools + live \`greprag mechanic status\`, so it orients instantly, lands a Tier-0 born-shadow repair, and ends — no gate to wait at.`,
67
- 'MODES: fix (land the repair) · log (`greprag fix log "<obs>"` when it is a mechanism for /mechanic later) · ask-human (the operator must decide).',
68
- 'WHY now: immediate-fix beats the backlog — the moment that produced the friction still holds the context the fix needs; deferred, that context is gone.',
69
- 'A per-turn reminder fires LOUD when live friction is detected — act on it, or say "clear" and continue.',
70
- ].join('\n');
71
- }
72
- /** Per-turn reminder line for a given tier — the thin pointer back at the announce
73
- * schema; null on `silent`. Wording intensity scales with the tier (the doc):
74
- * ambient = soft pointer, nudge = imperative + reason, nag = LOUD forced-decision.
75
- * Every non-silent line is action-first, bundles reason+method, and ends on a
76
- * forced binary (act → spawn / clear → continue) so it CONVERTS instead of becoming
77
- * wallpaper (the fix-`16a29a8b` banner-blindness failure mode). Grounded to the
78
- * live signal where there is one (nudge/nag name the stress). The act-now directive
79
- * envelope (authoring rule #4) is applied by the hook, not here — this module owns
80
- * the wording, the caller owns the framing. */
40
+ /** The per-turn reminder line — fires only on detected stress, points back at the
41
+ * primer's repair vehicles, ends on a forced binary so it converts. null = calm. */
81
42
  function buildFrictionReminder(tier) {
82
43
  switch (tier) {
83
44
  case 'nag':
84
- return `⚠ FRICTION HIGH (live signal: repetition / errors / churn) — STOP pushing through; fix the PATTERN now → ${SPAWN_METHOD}. No friction? say "clear" + continue.`;
45
+ return '⚠ FRICTION HIGH (live signal: repetition / errors / churn) — STOP pushing through; fix the PATTERN now → `greprag load reflex-chip` (sentence-tier) or `greprag load workshop-chip` (machinery), then spawn_task. No friction? say "clear" + continue.';
85
46
  case 'nudge':
86
- return `⚠ Friction rising — if you have repeated yourself or fought a tool, fix it now → ${SPAWN_METHOD}. Otherwise say "clear" + continue.`;
87
- case 'ambient':
88
- return `💡 Hit friction since the last check (repeated yourself, fought a tool, corrected ≥2×)? → ${SPAWN_METHOD}. If not, say "clear" + continue.`;
47
+ return '⚠ Friction detected (live signal) — if you have repeated yourself, fought a tool, or hit a wall, fix the PATTERN now → `greprag load reflex-chip` (sentence-tier) or `greprag load workshop-chip` (machinery), then spawn_task. Otherwise say "clear" + continue.';
89
48
  default:
90
49
  return null;
91
50
  }
92
51
  }
52
+ // ---------- The Mechanic primer (announce-only) ------------------------------
53
+ /** The method the primer points at. `greprag load reflex-chip` carries the full
54
+ * in-the-moment repair-chip schema; `greprag load workshop-chip` the heavier
55
+ * mechanism-tier one. Kept in one place so the two branches never drift. */
56
+ const REFLEX_METHOD = 'spawn a fire-and-forget reflex chip — `greprag load reflex-chip` for the method, then `spawn_task`';
57
+ const WORKSHOP_METHOD = 'spawn a workshop chip — `greprag load workshop-chip` (investigates + drafts the repair, parks at your merge gate)';
58
+ /** SessionStart primer — the active-Mechanic schema, loaded ONCE. Full doctrine
59
+ * inline (a PRIMER, not a pointer): it teaches WHEN friction is a fix-now signal,
60
+ * the two repair vehicles (reflex vs workshop, by friction tier), and the modes.
61
+ * Depends on the chip concept being loaded first (chip-spawn-pointer) — it names
62
+ * chip vehicles. Written for an agent under token pressure: action-first,
63
+ * reason+method bundled, no per-turn nag to lean on. */
64
+ function buildMechanicAnnounce() {
65
+ return [
66
+ '[Active Mechanic — keep the harness healthy IN-SESSION. Friction is a signal to fix NOW, not to defer; the moment that produced it still holds the context the fix needs.]',
67
+ 'WHEN you hit friction this session — repeated yourself, fought a tool, got corrected ≥2× on the same thing, or rediscovered something already known — fix the PATTERN now; do not push through.',
68
+ `SENTENCE-TIER friction (the fix is words in a file you own — a skill / doc / CLAUDE.md): ${REFLEX_METHOD}. The chip is preloaded with the mechanic tools + live \`greprag mechanic status\`, lands a Tier-0 born-shadow repair, and ends — no gate to wait at.`,
69
+ `MECHANISM-TIER friction (the fix is machinery — a hook / gate / trigger / code, anything you can't fix in words): ${WORKSHOP_METHOD}.`,
70
+ 'MODES (when unsure which, or when it is not a chip): fix (land the repair inline) · log (`greprag fix log "<obs>"` to queue it for /mechanic) · ask-human (the operator must decide).',
71
+ 'Every repair is ROOT-CAUSE — fix the pattern that makes the friction class possible, never a guard on today\'s trigger.',
72
+ 'A per-turn reminder fires ONLY when live friction is DETECTED (the stress signal — repetition / errors / churn), never on a timer — act on it, or say "clear" and continue.',
73
+ ].join('\n');
74
+ }
93
75
  /** Normalize any prior-stats blob (possibly missing/partial/corrupt) into a fully
94
76
  * populated FrictionStats. Pure, total. */
95
77
  function normalizeStats(prior) {
@@ -132,15 +114,15 @@ function tallyReflexSpawn(prior) {
132
114
  return s;
133
115
  }
134
116
  // ---------- Registry module --------------------------------------------------
135
- /** The active Mechanic, recast onto the detector model (docs/reminder-interrupt.md
136
- * §Registry spec). `detect` is stress-gated the friction signal IS the live
137
- * deficiency; `announce` teaches the reflex-chip schema once; `reminder` is the thin
138
- * per-turn line. Wired through the container (reminder-registry.ts). Unlike the
139
- * watcher-arm reference module (binary, auto-silences when armed), this one is
140
- * GRADED — silent at calm, escalating with the live stress level. */
117
+ /** The active Mechanic a PRIMER-ONLY module (docs/load-system.md): one strong
118
+ * SessionStart announce, no per-turn reminder (the friction nag was removed
119
+ * 2026-06-22 as wallpaper). `dependsOn` the chip-spawn pointer so the chip concept
120
+ * it references is already loaded — the boot sequence places it AFTER chips. */
141
121
  exports.mechanicFrictionModule = {
142
122
  id: 'mechanic-friction',
143
- detect: (env) => ({ tier: frictionReminderTier(env.turnCount, env.stress) }),
123
+ dependsOn: ['chip-spawn-pointer'],
124
+ // Fires ONLY on detected stress (elevated/high) — no turn-cadence nag.
125
+ detect: (env) => ({ tier: frictionReminderTier(env.stress) }),
144
126
  announce: () => buildMechanicAnnounce(),
145
127
  reminder: (d) => buildFrictionReminder(d.tier),
146
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"friction-reminder.js","sourceRoot":"","sources":["../../src/commands/friction-reminder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;8FAa8F;;;AA6B9F,oDAOC;AAiBD,sDASC;A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B,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,CAAC,CAAC,aAAa,GAAG,SAAS,CAAC;IAC5D,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;+EAE+E;AAC/E,SAAgB,gBAAgB,CAAC,KAA2B;IAC1D,MAAM,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC;IACpB,OAAO,CAAC,CAAC;AACX,CAAC;AAED,gFAAgF;AAEhF;;;iFAGiF;AACpE,QAAA,sBAAsB,GAAmB;IACpD,EAAE,EAAE,mBAAmB;IACvB,SAAS,EAAE,CAAC,oBAAoB,CAAC;IACjC,uEAAuE;IACvE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;IAC7D,QAAQ,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAE;IACvC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC;CAC/C,CAAC"}
@@ -300,20 +300,13 @@ async function runInit(opts) {
300
300
  optionalSkills.push(entry.name);
301
301
  }
302
302
  }
303
- // Step 6b: Install the chip-spawn doc to ~/.claude/docs/chip-spawn.md. The
304
- // global CLAUDE.md (Step 3b of the skill) carries only a single loud pointer
305
- // to this file; the actual chip-spawn protocol lives here, read on demand
306
- // by the agent when about to call spawn_task. Keeping the protocol out of
307
- // CLAUDE.md saves tokens on every session that doesn't spawn a chip.
308
- const docsDir = path.join(os.homedir(), '.claude', 'docs');
309
- const chipSpawnSrc = path.join(__dirname, '../../skill/templates/chip-spawn.md');
310
- if (fs.existsSync(chipSpawnSrc)) {
311
- if (!fs.existsSync(docsDir))
312
- fs.mkdirSync(docsDir, { recursive: true });
313
- const chipSpawnDest = path.join(docsDir, 'chip-spawn.md');
314
- fs.copyFileSync(chipSpawnSrc, chipSpawnDest);
315
- changes.push(`Installed chip-spawn doc → ${chipSpawnDest}`);
316
- }
303
+ // Step 6b RETIRED 2026-06-22 (docs/load-system.md): the chip-spawn protocol is
304
+ // no longer copied to ~/.claude/docs/chip-spawn.md. greprag function never
305
+ // depends on a `.md` file on disk — the doctrine ships in the binary and is
306
+ // loaded on demand via `greprag load chip-spawn` (the Interrupt System's
307
+ // chip-spawn POINTER announce names the trigger + the command). One less
308
+ // install-time file write, and it works in every project, not just where the
309
+ // file happened to be installed.
317
310
  // Step 7: Patch ~/.claude/CLAUDE.md greprag CLI section (migrates legacy ## Inbox).
318
311
  const claudeMdPatched = patchGlobalClaudeMd();
319
312
  changes.push(claudeMdPatched ? 'Patched ~/.claude/CLAUDE.md greprag CLI section' : '~/.claude/CLAUDE.md greprag CLI section already up to date');