gm-skill 2.0.1863 → 2.0.1864
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 +1 -1
- package/gm-plugkit/instructions/residual/browser-open.md +1 -1
- package/gm-plugkit/instructions/residual/dirty-tree.md +1 -1
- package/gm-plugkit/instructions/residual/imperative.md +1 -1
- package/gm-plugkit/instructions/residual/tasks-running.md +1 -1
- package/gm-plugkit/package.json +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +60 -8
- package/gm-plugkit/supervisor.js +20 -13
- package/gm.json +1 -1
- package/package.json +1 -1
- package/skills/fifth-dimension-engine/SKILL.md +5 -5
- package/skills/fifth-dimension-engine/references/research-kernel-extraction.md +3 -3
- package/skills/fifth-dimension-engine/references/route-inspection-guide.md +1 -1
- package/skills/fifth-dimension-engine/references/route-structure.md +1 -1
- package/skills/gm/SKILL.md +2 -2
- package/skills/polaris-goal-compiler/SKILL.md +5 -5
- package/skills/polaris-goal-compiler/references/claim-ceiling-examples.md +2 -2
- package/skills/polaris-goal-compiler/references/task-atomization.md +11 -11
- package/skills/polaris-goal-compiler/references/verification-gates.md +6 -6
- package/skills/polaris-protocol/SKILL.md +16 -16
- package/skills/wfgy-method/SKILL.md +28 -28
- package/skills/wfgy-method/references/failure-modes.md +5 -5
- package/skills/wfgy-method/references/honesty-and-provenance.md +10 -10
- package/skills/wfgy-method/references/lessons-template.md +4 -4
- package/skills/wfgy-method/references/wfgy-core-mechanism.md +14 -14
package/AGENTS.md
CHANGED
|
@@ -152,7 +152,7 @@ A task that reduces to read/investigate/report, or a change confined to files th
|
|
|
152
152
|
|
|
153
153
|
Push to any rs-* sibling -> `cascade.yml` -> rs-plugkit `release.yml` -> single `plugkit.wasm` (npm `plugkit-wasm` + `plugkit-bin` Releases) -> auto-bump `gm.json::plugkitVersion` -> `publish.yml` ships gm-skill+gm-plugkit+SKILL.md mirror. Step sequence + PUBLISHER_TOKEN: the recall store (`recall: cascade pipeline`).
|
|
154
154
|
|
|
155
|
-
**Repos involved (push to any triggers cascade):** `AnEntrypoint/{rs-
|
|
155
|
+
**Repos involved (push to any triggers cascade):** `AnEntrypoint/{rs-codeinsight, rs-search, rs-plugkit, gm}`. rs-learn and rs-exec are retired (crates removed from / never depended on by rs-plugkit; their spool-dispatch and memory surfaces reimplemented natively in rs-plugkit wasm_dispatch; repos archived as tombstones, README points at rs-plugkit). Roles, npm package names, legacy-retirement detail: the recall store (`recall: cascade repos involved roles`, `recall: legacy gm-skill variants retired`).
|
|
156
156
|
|
|
157
157
|
**To update every possible thing**: push to the relevant repo. No manual version bumps, no local `cargo update`/`cargo build` -- push, let CI build.
|
|
158
158
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
browser sessions still open
|
|
1
|
+
browser sessions still open -- dispatch `browser` with `session list` body to enumerate open ids, then `session close <id>` for each before retrying residual-scan
|
|
@@ -1 +1 @@
|
|
|
1
|
-
worktree dirty
|
|
1
|
+
worktree dirty -- modified={modified} untracked={untracked} -- commit or revert before residual scan; a push from a dirty tree orphans the unstaged delta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Residual scan. Worktree clean, remote pushed, PRD empty, mutables witnessed
|
|
1
|
+
Residual scan. Worktree clean, remote pushed, PRD empty, mutables witnessed -- the four checks. Anything reachable and in-spirit expands the PRD and runs. Out-of-reach is credentials, down service, product decision.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
background tasks still running
|
|
1
|
+
background tasks still running -- wait for completion or kill them via the host_exec_js interface before retrying residual-scan
|
package/gm-plugkit/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1864",
|
|
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": {
|
|
@@ -2728,7 +2728,24 @@ function makeHostFunctions(instanceRef) {
|
|
|
2728
2728
|
+ `})();\n`;
|
|
2729
2729
|
cmd = process.execPath; args = ['-e', memRunner];
|
|
2730
2730
|
} else {
|
|
2731
|
-
|
|
2731
|
+
// Wrap in an async IIFE so top-level `return` (and top-level
|
|
2732
|
+
// `await`) work -- `node/bun -e "return 2+2;"` is a SyntaxError
|
|
2733
|
+
// at top level, but the gm exec_js contract lets code `return` a
|
|
2734
|
+
// result. This mirrors the mem/profile paths and the browser verb.
|
|
2735
|
+
// The returned value is emitted via a __GM_RESULT__ sentinel so the
|
|
2736
|
+
// user's own stdout stays clean; a throw still prints its stack to
|
|
2737
|
+
// stderr and exits 1, preserving the documented error channel.
|
|
2738
|
+
const defRunner = `(async () => {\n`
|
|
2739
|
+
+ ` try {\n`
|
|
2740
|
+
+ ` const __r = await (async () => {\n${code}\n})();\n`
|
|
2741
|
+
+ ` try { console.log('__GM_RESULT__' + JSON.stringify(__r === undefined ? null : __r)); }\n`
|
|
2742
|
+
+ ` catch (__se) { console.log('__GM_RESULT__' + JSON.stringify({ __unserializable: String(__se && __se.message || __se) })); }\n`
|
|
2743
|
+
+ ` } catch (__e) {\n`
|
|
2744
|
+
+ ` console.error(String(__e && __e.stack || __e));\n`
|
|
2745
|
+
+ ` process.exitCode = 1;\n`
|
|
2746
|
+
+ ` }\n`
|
|
2747
|
+
+ `})();\n`;
|
|
2748
|
+
cmd = process.execPath; args = ['-e', defRunner];
|
|
2732
2749
|
}
|
|
2733
2750
|
}
|
|
2734
2751
|
else if (lang === 'python') { cmd = 'python'; args = ['-c', code]; }
|
|
@@ -2742,6 +2759,20 @@ function makeHostFunctions(instanceRef) {
|
|
|
2742
2759
|
} finally {
|
|
2743
2760
|
if (profileUserFile) { try { fs.unlinkSync(profileUserFile); } catch (_) {} }
|
|
2744
2761
|
}
|
|
2762
|
+
// Shared across all result branches: a genuine timeout kills the child
|
|
2763
|
+
// near the deadline. A SIGTERM far under timeoutMs is a spurious /
|
|
2764
|
+
// host-injected kill (e.g. the stale-watcher SIGTERM-at-28ms), not a
|
|
2765
|
+
// timeout -- do not mislabel it as timed_out.
|
|
2766
|
+
const __execDurMs = Date.now() - __execT0;
|
|
2767
|
+
const __execTimedOut = result.signal === 'SIGTERM' && __execDurMs >= Math.floor(timeoutMs * 0.9);
|
|
2768
|
+
// spawnSync sets result.error (and leaves status/signal null) when the
|
|
2769
|
+
// child could NOT be started or was reaped abnormally (spawn race
|
|
2770
|
+
// during watcher boot, ETIMEDOUT, EBADF, ENOENT for a missing runtime).
|
|
2771
|
+
// Surface it so a status:-1 is diagnosable instead of a silent empty
|
|
2772
|
+
// failure -- the caller sees WHY, not just exit_code:-1.
|
|
2773
|
+
const __spawnError = result.error
|
|
2774
|
+
? { code: result.error.code || null, errno: result.error.errno || null, syscall: result.error.syscall || null, message: String(result.error.message || result.error) }
|
|
2775
|
+
: null;
|
|
2745
2776
|
if (wantProfile) {
|
|
2746
2777
|
const raw = result.stdout || '';
|
|
2747
2778
|
const idx = raw.indexOf('__GM_PROFILE__');
|
|
@@ -2752,14 +2783,15 @@ function makeHostFunctions(instanceRef) {
|
|
|
2752
2783
|
stdout: idx >= 0 ? raw.slice(0, idx) : raw,
|
|
2753
2784
|
stderr: result.stderr || '',
|
|
2754
2785
|
exit_code: result.status === null ? -1 : result.status,
|
|
2755
|
-
timed_out:
|
|
2756
|
-
duration_ms:
|
|
2786
|
+
timed_out: __execTimedOut,
|
|
2787
|
+
duration_ms: __execDurMs,
|
|
2757
2788
|
result: parsed ? parsed.result : null,
|
|
2758
2789
|
profile: parsed ? parsed.profile : { timeframe: null, culprits: [] },
|
|
2759
2790
|
profile_error: parsed ? parsed.profile_error : 'profile sentinel not found in stdout',
|
|
2760
2791
|
user_error: parsed ? parsed.user_error : null,
|
|
2761
2792
|
mem: parsed ? parsed.mem : null,
|
|
2762
2793
|
wall_vs_cpu: parsed ? parsed.wall_vs_cpu : null,
|
|
2794
|
+
...(__spawnError ? { spawn_error: __spawnError } : {}),
|
|
2763
2795
|
});
|
|
2764
2796
|
}
|
|
2765
2797
|
if (opts.mem === true && isJsLang) {
|
|
@@ -2772,21 +2804,41 @@ function makeHostFunctions(instanceRef) {
|
|
|
2772
2804
|
stdout: idx >= 0 ? raw.slice(0, idx) : raw,
|
|
2773
2805
|
stderr: result.stderr || '',
|
|
2774
2806
|
exit_code: result.status === null ? -1 : result.status,
|
|
2775
|
-
timed_out:
|
|
2776
|
-
duration_ms:
|
|
2807
|
+
timed_out: __execTimedOut,
|
|
2808
|
+
duration_ms: __execDurMs,
|
|
2777
2809
|
result: meta ? meta.result : null,
|
|
2778
2810
|
mem: meta ? meta.mem : null,
|
|
2779
2811
|
wall_ms: meta ? meta.wall_ms : null,
|
|
2780
2812
|
...(meta && meta.error ? { error: meta.error } : {}),
|
|
2813
|
+
...(__spawnError ? { spawn_error: __spawnError } : {}),
|
|
2781
2814
|
});
|
|
2782
2815
|
}
|
|
2816
|
+
let __defStdout = result.stdout || '';
|
|
2817
|
+
let __defResult = null;
|
|
2818
|
+
let __defHasResult = false;
|
|
2819
|
+
if (isJsLang) {
|
|
2820
|
+
const __ri = __defStdout.lastIndexOf('__GM_RESULT__');
|
|
2821
|
+
if (__ri >= 0) {
|
|
2822
|
+
const __tail = __defStdout.slice(__ri + '__GM_RESULT__'.length);
|
|
2823
|
+
const __nl = __tail.indexOf('\n');
|
|
2824
|
+
const __jsonStr = __nl >= 0 ? __tail.slice(0, __nl) : __tail;
|
|
2825
|
+
try { __defResult = JSON.parse(__jsonStr); __defHasResult = true; } catch (_) {}
|
|
2826
|
+
// Strip the sentinel (and the leading newline we prepended) so the
|
|
2827
|
+
// caller's own stdout is returned clean.
|
|
2828
|
+
let __clean = __defStdout.slice(0, __ri) + (__nl >= 0 ? __tail.slice(__nl + 1) : '');
|
|
2829
|
+
if (__clean.endsWith('\n')) __clean = __clean.slice(0, -1);
|
|
2830
|
+
__defStdout = __clean;
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2783
2833
|
return writeWasmJson(instanceRef.value, {
|
|
2784
2834
|
ok: result.status === 0,
|
|
2785
|
-
stdout:
|
|
2835
|
+
stdout: __defStdout,
|
|
2786
2836
|
stderr: result.stderr || '',
|
|
2787
2837
|
exit_code: result.status === null ? -1 : result.status,
|
|
2788
|
-
timed_out:
|
|
2789
|
-
duration_ms:
|
|
2838
|
+
timed_out: __execTimedOut,
|
|
2839
|
+
duration_ms: __execDurMs,
|
|
2840
|
+
...(__defHasResult ? { result: __defResult } : {}),
|
|
2841
|
+
...(__spawnError ? { spawn_error: __spawnError } : {}),
|
|
2790
2842
|
...(profileSkipped ? { profile_skipped: profileSkipped } : {}),
|
|
2791
2843
|
});
|
|
2792
2844
|
} catch (e) {
|
package/gm-plugkit/supervisor.js
CHANGED
|
@@ -159,6 +159,22 @@ function readShutdownReason() {
|
|
|
159
159
|
try { return JSON.parse(fs.readFileSync(SHUTDOWN_REASON_PATH, 'utf-8')); } catch (_) { return null; }
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
// A supervisor-initiated kill is PLANNED (version/wrapper drift, heartbeat-stale),
|
|
163
|
+
// but on Windows process.kill(pid,'SIGTERM') terminates the child immediately with
|
|
164
|
+
// no catchable signal, so the child never writes its own .shutdown-reason.json and
|
|
165
|
+
// the taskkill /F that follows leaves none either -- the NEXT boot then mislabels a
|
|
166
|
+
// deliberate upgrade recycle as a SILENT ABORT / unplanned-restart critical. Write
|
|
167
|
+
// the planned reason on the child's behalf BEFORE killing, so the next boot reads a
|
|
168
|
+
// fresh planned shutdown reason and classifies the restart correctly.
|
|
169
|
+
function killChild(reason) {
|
|
170
|
+
if (!currentChildPid) return;
|
|
171
|
+
try { fs.writeFileSync(SHUTDOWN_REASON_PATH, JSON.stringify({ reason, ts: Date.now(), pid: currentChildPid, killed_by_supervisor: true })); } catch (_) {}
|
|
172
|
+
try { process.kill(currentChildPid, 'SIGTERM'); } catch (_) {}
|
|
173
|
+
if (process.platform === 'win32') {
|
|
174
|
+
try { spawnSync('taskkill', ['/F', '/T', '/PID', String(currentChildPid)], { stdio: 'ignore', windowsHide: true, timeout: 3000 }); } catch (_) {}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
162
178
|
let lastSpawnedAt = 0;
|
|
163
179
|
let lastVersionDriftActionAt = 0;
|
|
164
180
|
let restartTimestamps = [];
|
|
@@ -258,7 +274,7 @@ function spawnWatcher(bootReason) {
|
|
|
258
274
|
const idleClean = reason === 'idle';
|
|
259
275
|
const lockRejected = code === 75;
|
|
260
276
|
const cleanExit = code === 0;
|
|
261
|
-
const plannedReasons = new Set(['idle', 'sigterm', 'version-change', 'wrapper-change', 'peer-stale-takeover', 'external-planned', 'process-exit']);
|
|
277
|
+
const plannedReasons = new Set(['idle', 'sigterm', 'version-change', 'wrapper-change', 'heartbeat-stale', 'peer-stale-takeover', 'external-planned', 'process-exit']);
|
|
262
278
|
const isPlanned = plannedReasons.has(reason) || lockRejected || cleanExit;
|
|
263
279
|
const eventName = idleClean
|
|
264
280
|
? 'supervisor.watcher-exited-idle'
|
|
@@ -335,10 +351,7 @@ function checkWatcherHealth() {
|
|
|
335
351
|
stale_limit_ms: STATUS_STALE_MS,
|
|
336
352
|
severity: 'critical',
|
|
337
353
|
});
|
|
338
|
-
|
|
339
|
-
if (process.platform === 'win32') {
|
|
340
|
-
try { spawnSync('taskkill', ['/F', '/T', '/PID', String(currentChildPid)], { stdio: 'ignore', windowsHide: true, timeout: 3000 }); } catch (_) {}
|
|
341
|
-
}
|
|
354
|
+
killChild('heartbeat-stale');
|
|
342
355
|
return;
|
|
343
356
|
}
|
|
344
357
|
const reported = status.wrapper_sha || null;
|
|
@@ -350,10 +363,7 @@ function checkWatcherHealth() {
|
|
|
350
363
|
on_disk_sha: onDisk,
|
|
351
364
|
severity: 'info',
|
|
352
365
|
});
|
|
353
|
-
|
|
354
|
-
if (process.platform === 'win32') {
|
|
355
|
-
try { spawnSync('taskkill', ['/F', '/T', '/PID', String(currentChildPid)], { stdio: 'ignore', windowsHide: true, timeout: 3000 }); } catch (_) {}
|
|
356
|
-
}
|
|
366
|
+
killChild('wrapper-change');
|
|
357
367
|
return;
|
|
358
368
|
}
|
|
359
369
|
if (status.version_drifted === true) {
|
|
@@ -377,10 +387,7 @@ function checkWatcherHealth() {
|
|
|
377
387
|
try { fs.unlinkSync(path.join(gmTools, f)); } catch (_) {}
|
|
378
388
|
}
|
|
379
389
|
} catch (_) {}
|
|
380
|
-
|
|
381
|
-
if (process.platform === 'win32') {
|
|
382
|
-
try { spawnSync('taskkill', ['/F', '/T', '/PID', String(currentChildPid)], { stdio: 'ignore', windowsHide: true, timeout: 3000 }); } catch (_) {}
|
|
383
|
-
}
|
|
390
|
+
killChild('version-change');
|
|
384
391
|
}
|
|
385
392
|
}
|
|
386
393
|
|
package/gm.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1864",
|
|
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",
|
|
@@ -121,7 +121,7 @@ See `references/research-kernel-extraction.md` for how mixed themes become resea
|
|
|
121
121
|
|
|
122
122
|
### Everyday Problems
|
|
123
123
|
|
|
124
|
-
The same engine works on ordinary decisions, work problems, product questions, and engineering failures
|
|
124
|
+
The same engine works on ordinary decisions, work problems, product questions, and engineering failures -- any well-specified target benefits from being shot into a route rather than answered directly.
|
|
125
125
|
|
|
126
126
|
## Verification
|
|
127
127
|
|
|
@@ -141,7 +141,7 @@ This skill does not:
|
|
|
141
141
|
## References
|
|
142
142
|
|
|
143
143
|
See `references/` directory for:
|
|
144
|
-
- `route-structure.md`
|
|
145
|
-
- `research-kernel-extraction.md`
|
|
146
|
-
- `route-inspection-guide.md`
|
|
147
|
-
- `skills/polaris-protocol/SKILL.md`
|
|
144
|
+
- `route-structure.md` -- what a route is and how it is structured
|
|
145
|
+
- `research-kernel-extraction.md` -- turning ideas into research kernels
|
|
146
|
+
- `route-inspection-guide.md` -- how to verify and attack a route
|
|
147
|
+
- `skills/polaris-protocol/SKILL.md` -- the Polaris Protocol tree root and state machine
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Research Kernel Extraction
|
|
1
|
+
# Research Kernel Extraction -- Fifth-Dimension Engine
|
|
2
2
|
|
|
3
3
|
Mixing two unrelated themes turns them into a theorem-shaped research kernel. The same mechanic generalizes to ordinary research questions.
|
|
4
4
|
|
|
@@ -16,12 +16,12 @@ The engine's job is to move a target from symbol to structure:
|
|
|
16
16
|
1. Name the two themes.
|
|
17
17
|
2. Shoot them together.
|
|
18
18
|
3. Read the returned route: what structure does the engine propose?
|
|
19
|
-
4. Inspect the candidate lemmas
|
|
19
|
+
4. Inspect the candidate lemmas -- are they real mathematical objects, or metaphor?
|
|
20
20
|
5. Keep the parts that survive inspection; discard the parts that are only poetry.
|
|
21
21
|
|
|
22
22
|
## Everyday research use
|
|
23
23
|
|
|
24
|
-
The same pattern works without strangeness
|
|
24
|
+
The same pattern works without strangeness -- shoot an ordinary open research question directly. The engine returns a route: candidate theoretical bounds, objections, open questions. You then verify the lemmas and expand the open debt into real research.
|
|
25
25
|
|
|
26
26
|
## What this does NOT claim
|
|
27
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Route Inspection Guide
|
|
1
|
+
# Route Inspection Guide -- Fifth-Dimension Engine
|
|
2
2
|
|
|
3
3
|
A route from the Fifth-Dimension Engine is not a final answer. It is a structure you can inspect, attack, expand, and test. Inspection is your job; the engine only produces the route.
|
|
4
4
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## What a Route Is
|
|
4
4
|
|
|
5
|
-
A route is the **output of the Fifth-Dimension Engine**
|
|
5
|
+
A route is the **output of the Fifth-Dimension Engine** -- a structured, inspectable answer to a complex problem.
|
|
6
6
|
|
|
7
7
|
Instead of a flat statement like "Yes, do this" or "The answer is X," the engine produces:
|
|
8
8
|
|
package/skills/gm/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gm
|
|
3
3
|
description: The primary driver for any non-trivial coding, refactoring, debugging, or multi-step engineering task in a project using this harness -- use it first, for the whole task, not just a piece of it. Plugkit-served instruction stream. Three-layer admission (witness, single-writer, direction) over every possible mutation; effort unbounded, never gated on cost. Closure on first emit; partial = non-monotonic. Not for the post-completion remaining-work check (that is `gm-continue`) or for drift-recovery mid-task (that is `wfgy-method`) -- this skill is the work itself.
|
|
4
|
-
allowed-tools: Skill, Read, Write, Bash(bun *), Bash(npx *)
|
|
4
|
+
allowed-tools: Skill, Read, Write, Bash(bun *), Bash(npx *), Bash(cat *), Bash(date *)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# gm
|
|
@@ -84,7 +84,7 @@ VERIFY is adversarial, never confirmatory: run the real code path and read its a
|
|
|
84
84
|
|
|
85
85
|
Phase transitions: PLAN -> EXECUTE, EXECUTE -> EMIT, EMIT -> VERIFY, VERIFY -> CONSOLIDATE, CONSOLIDATE -> COMPLETE. Each requires `transition {to:"PHASE"}` dispatch. EXECUTE resolves mutables in `.gm/mutables.yml` before EMIT. EMIT writes file changes. VERIFY validates via `exec_js`/`browser`. CONSOLIDATE pushes changes via `git_finalize` or `git_push`, then witnesses CI/CD pipeline green. COMPLETE gate requires: worktree clean, remote pushed, mutables resolved, and `.ci-validated` marker written with current commit SHA.
|
|
86
86
|
|
|
87
|
-
CI/CD validation in CONSOLIDATE phase: After push succeeds, watch the triggered workflow. When pipeline goes green, dispatch `fs_write {path:".gm/exec-spool/.ci-validated",
|
|
87
|
+
CI/CD validation in CONSOLIDATE phase: After push succeeds, watch the triggered workflow. When pipeline goes green, dispatch `fs_write {path:".gm/exec-spool/.ci-validated", content:"{\"head_sha\":\"<current commit SHA>\"}"}` to mark validation complete -- the marker's file CONTENT is the JSON string `{"head_sha":"<SHA>"}`, passed under the `content` field the fs_write handler reads (not a `body`/`head_sha` object, which the handler ignores). `.ci-validated`'s head_sha must match current HEAD; COMPLETE gate refuses if stale or missing. Red runs require fix + re-push + re-watch; no skip for "it looked safe."
|
|
88
88
|
|
|
89
89
|
Memory via `memorize-fire` dispatch stores in `.gm/rs-learn.db` and is retrieved via `recall` and `auto_recall`. `discipline-note {discipline, text}` writes `.gm/disciplines/<name>/policy.md`; `instruction` auto-surfaces policies from disciplines listed in `.gm/disciplines/enabled.txt`.
|
|
90
90
|
|
|
@@ -117,7 +117,7 @@ Over-claiming (saying something is done when it's only drafted) is the most comm
|
|
|
117
117
|
|
|
118
118
|
### Closure Records
|
|
119
119
|
|
|
120
|
-
For each atom, record what is done, what is missing, what is only partially true, and what is still unsafe to claim. A closure record preserves continuity across rounds so that unfinished work stays visible instead of being buried in prose
|
|
120
|
+
For each atom, record what is done, what is missing, what is only partially true, and what is still unsafe to claim. A closure record preserves continuity across rounds so that unfinished work stays visible instead of being buried in prose -- this is what stops a local step from being promoted into fake global completion.
|
|
121
121
|
|
|
122
122
|
## Interaction with Other Skills
|
|
123
123
|
|
|
@@ -143,10 +143,10 @@ Use Goal Compiler to compile the problem statement, then dispatch to Fifth-Dimen
|
|
|
143
143
|
## References
|
|
144
144
|
|
|
145
145
|
See `references/` directory for:
|
|
146
|
-
- `task-atomization.md`
|
|
147
|
-
- `verification-gates.md`
|
|
148
|
-
- `claim-ceiling-examples.md`
|
|
149
|
-
- `skills/polaris-protocol/SKILL.md`
|
|
146
|
+
- `task-atomization.md` -- how to break work into atoms
|
|
147
|
+
- `verification-gates.md` -- designing verification for each stage
|
|
148
|
+
- `claim-ceiling-examples.md` -- what "complete" actually means in different contexts
|
|
149
|
+
- `skills/polaris-protocol/SKILL.md` -- the Polaris Protocol tree root and state machine that wires this skill to Fifth-Dimension Engine and WFGY-Method
|
|
150
150
|
|
|
151
151
|
## What This Is Not
|
|
152
152
|
|
|
@@ -20,12 +20,12 @@ The point is not optimism or pessimism. It is that a local success should not be
|
|
|
20
20
|
|
|
21
21
|
- Atom A03 "Repair structure" is finished and the file compiles.
|
|
22
22
|
- Claim ceiling: you may say "the structure is repaired and compiles." You may **not** yet say "the bug is fixed" until A04 (verify repair) passes.
|
|
23
|
-
- If A04 is still blocked, saying "fixed" is a ceiling violation
|
|
23
|
+
- If A04 is still blocked, saying "fixed" is a ceiling violation -- it promotes a local step to global completion.
|
|
24
24
|
|
|
25
25
|
### Documentation packaging
|
|
26
26
|
|
|
27
27
|
- You wrote the release note (A06) but A04 (verify repair) never ran.
|
|
28
|
-
- Claim ceiling: you may say "a draft release note exists." You may **not** say "release ready"
|
|
28
|
+
- Claim ceiling: you may say "a draft release note exists." You may **not** say "release ready" -- readiness requires the verification gate first.
|
|
29
29
|
- This is exactly the upstream failure mode: writing the announcement before the repair is verified.
|
|
30
30
|
|
|
31
31
|
### Research synthesis
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
A task atom is the smallest executable unit of work. It must satisfy all of:
|
|
6
6
|
|
|
7
|
-
1. **Atomic**
|
|
8
|
-
2. **Completable**
|
|
9
|
-
3. **Verifiable**
|
|
10
|
-
4. **Interdependent**
|
|
7
|
+
1. **Atomic** -- Cannot be divided further without losing meaning
|
|
8
|
+
2. **Completable** -- Can be finished in one session/sprint
|
|
9
|
+
3. **Verifiable** -- Has clear entrance and exit criteria
|
|
10
|
+
4. **Interdependent** -- Has clear dependencies (blocks/is blocked by other atoms)
|
|
11
11
|
|
|
12
12
|
## Examples
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ A task atom is the smallest executable unit of work. It must satisfy all of:
|
|
|
27
27
|
|
|
28
28
|
Start with: "Goal: Build a payment microservice."
|
|
29
29
|
|
|
30
|
-
1. **Identify phases**: Research
|
|
30
|
+
1. **Identify phases**: Research -> Design -> Implement -> Test -> Deploy
|
|
31
31
|
2. **For each phase, ask: What's the smallest piece?**
|
|
32
32
|
- Research: API options, compliance, existing solutions
|
|
33
33
|
- Design: Data model, interfaces, error handling
|
|
@@ -40,19 +40,19 @@ Start with: "Goal: Build a payment microservice."
|
|
|
40
40
|
## Dependency Edges
|
|
41
41
|
|
|
42
42
|
Each atom has:
|
|
43
|
-
- **Blockers**
|
|
44
|
-
- **Unblocks**
|
|
43
|
+
- **Blockers** -- Things that must finish before this starts
|
|
44
|
+
- **Unblocks** -- Things that can't start until this finishes
|
|
45
45
|
|
|
46
46
|
Example:
|
|
47
47
|
```
|
|
48
48
|
Research APIs (A1)
|
|
49
|
-
|
|
49
|
+
-> unblocks
|
|
50
50
|
Design interface (A2)
|
|
51
|
-
|
|
51
|
+
-> unblocks
|
|
52
52
|
Implement core (A3)
|
|
53
|
-
|
|
53
|
+
-> unblocks
|
|
54
54
|
Test integration (A4)
|
|
55
|
-
|
|
55
|
+
-> unblocks
|
|
56
56
|
Deploy (A5)
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -43,17 +43,17 @@ For an atom:
|
|
|
43
43
|
|
|
44
44
|
## Bad Gates
|
|
45
45
|
|
|
46
|
-
- "Complete"
|
|
47
|
-
- "Good enough"
|
|
48
|
-
- "No obvious bugs"
|
|
46
|
+
- "Complete" -- unmeasurable
|
|
47
|
+
- "Good enough" -- too vague
|
|
48
|
+
- "No obvious bugs" -- not verifiable
|
|
49
49
|
- Checking something trivial (wasting time)
|
|
50
50
|
|
|
51
51
|
## Gate Failure
|
|
52
52
|
|
|
53
53
|
If an atom fails its gate:
|
|
54
|
-
- **Do not move forward**
|
|
55
|
-
- **Return to the atom**
|
|
56
|
-
- **Fix or redefine**
|
|
54
|
+
- **Do not move forward** -- you have incomplete work that looks complete
|
|
55
|
+
- **Return to the atom** -- what's actually missing?
|
|
56
|
+
- **Fix or redefine** -- either finish the work or redefine the atom scope
|
|
57
57
|
|
|
58
58
|
This is where fake completion gets caught.
|
|
59
59
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: polaris-protocol
|
|
3
|
-
description: WFGY 5.0 Polaris Protocol
|
|
3
|
+
description: WFGY 5.0 Polaris Protocol -- the active flagship route from onestardao/WFGY. A two-layer reasoning system that compiles goals before execution and shoots complex problems into inspectable routes, with drift control throughout. This skill is the tree root: load it first, then dispatch its child skills as explicit transitions -- polaris-goal-compiler (compile), fifth-dimension-engine (shoot), wfgy-method (drift control). Use for any complex, multi-step, high-stakes, or long-horizon task where premature completion or goal drift is a risk.
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Portable protocol; upstream released the Goal Compiler ChatGPT-first (teaser) and the Fifth-Dimension Engine as the main product surface. This skill wraps both plus WFGY-Method drift control into one discoverable entry point for any assistant or agent that loads skills.
|
|
6
6
|
metadata:
|
|
@@ -8,19 +8,19 @@ metadata:
|
|
|
8
8
|
provenance: adapted-and-honest-reimplementation-not-verbatim
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# WFGY 5.0
|
|
11
|
+
# WFGY 5.0 -- Polaris Protocol (tree root)
|
|
12
12
|
|
|
13
13
|
Polaris is the active public route of WFGY 5.0. The **Fifth-Dimension Engine** is the current main product surface; the **Polaris Goal Compiler** is the first public protocol component. **WFGY-Method** supplies the drift-control discipline that keeps the whole system aligned with the original goal.
|
|
14
14
|
|
|
15
|
-
This skill is the **tree root**. It does not re-explain the children
|
|
15
|
+
This skill is the **tree root**. It does not re-explain the children -- it wires them into one state machine and tells you which child to dispatch at each step. Treat the three child skills as the transitions of the machine below.
|
|
16
16
|
|
|
17
17
|
## The tree
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
polaris-protocol (this skill
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
polaris-protocol (this skill -- root / entry)
|
|
21
|
+
|-- polaris-goal-compiler (COMPILE state)
|
|
22
|
+
|-- fifth-dimension-engine (SHOOT state)
|
|
23
|
+
`-- wfgy-method (DRIFT CONTROL -- applies at every state)
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Discoverable: each node is a standalone `SKILL.md` inside its own `skills/<skill-name>/` directory. This root is the entry point; the children are reached by explicit dispatch.
|
|
@@ -37,7 +37,7 @@ A skill tree can behave like a state machine. Each transition is an explicit ski
|
|
|
37
37
|
| `COMPILED` | Goal Compiler emitted task atoms, dependencies, verification gates, claim ceilings, and a closure-record template. |
|
|
38
38
|
| `SHOOTING` | A complex atom is being lifted by Fifth-Dimension Engine into a route. |
|
|
39
39
|
| `EXECUTING` | An atom (routine, or the result of a route) is being carried out. |
|
|
40
|
-
| `VERIFYING` | Output is checked against the atom's verification gate and against drift (
|
|
40
|
+
| `VERIFYING` | Output is checked against the atom's verification gate and against drift (deltaS, via WFGY-Method). |
|
|
41
41
|
| `CLOSED` | Claim ceiling met, closure record written, atom done. |
|
|
42
42
|
|
|
43
43
|
### Transitions (each is a dispatch)
|
|
@@ -58,13 +58,13 @@ VERIFYING --gate fail / drift --> BBCR checkpoint ----> COMPILED (re-compile or
|
|
|
58
58
|
CLOSED --next atom------------------------------------> COMPILED
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
`wfgy-method` is not a single transition
|
|
61
|
+
`wfgy-method` is not a single transition -- it is the drift-control observer attached to **every** state. Before any step that could have drifted, dispatch it and read the result.
|
|
62
62
|
|
|
63
|
-
## Canonical syntax (pro-rata
|
|
63
|
+
## Canonical syntax (pro-rata -- use exactly this)
|
|
64
64
|
|
|
65
65
|
- **Compile first. Execute one active atom. Verify before unlock. Claim only what is supported.** (Goal Compiler)
|
|
66
|
-
- **shoot + [your problem]**
|
|
67
|
-
-
|
|
66
|
+
- **shoot + [your problem]** -- the Fifth-Dimension Engine interface.
|
|
67
|
+
- **deltaS = 1 - cos(I, G)** -- drift between current state (I) and goal (G). Without a real embedding call, deltaS is a qualitative label ("deltaS looks high here"), never a computed decimal -- unless a real `similarity` verb is available (see WFGY-Method).
|
|
68
68
|
|
|
69
69
|
"Compile first. Then shoot." is the spine of the whole protocol.
|
|
70
70
|
|
|
@@ -77,7 +77,7 @@ CLOSED --next atom------------------------------------> COMPILED
|
|
|
77
77
|
3. At `VERIFYING`, dispatch `Skill(skill="wfgy-method")` to check drift and apply the atom's verification gate.
|
|
78
78
|
- Pass + claim ceiling honored -> `CLOSED` -> next atom (back to `COMPILED`).
|
|
79
79
|
- Fail or drift -> BBCR checkpoint, re-compile or re-shoot (back to `COMPILED`).
|
|
80
|
-
4. When all atoms are `CLOSED`, the task is done
|
|
80
|
+
4. When all atoms are `CLOSED`, the task is done -- and only then may you claim completion.
|
|
81
81
|
|
|
82
82
|
## What this tree is not
|
|
83
83
|
|
|
@@ -88,8 +88,8 @@ CLOSED --next atom------------------------------------> COMPILED
|
|
|
88
88
|
|
|
89
89
|
## Children (dispatch these)
|
|
90
90
|
|
|
91
|
-
- `polaris-goal-compiler`
|
|
92
|
-
- `fifth-dimension-engine`
|
|
93
|
-
- `wfgy-method`
|
|
91
|
+
- `polaris-goal-compiler` -- compile the goal into atoms, gates, claim ceilings.
|
|
92
|
+
- `fifth-dimension-engine` -- shoot a complex atom into a structured route.
|
|
93
|
+
- `wfgy-method` -- hold drift control across every state.
|
|
94
94
|
|
|
95
95
|
For the full DAG, integration workflows, and mismatch detection, see `../POLARIS-SKILLS-GUIDE.md`.
|
|
@@ -10,82 +10,82 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
# WFGY method
|
|
12
12
|
|
|
13
|
-
WFGY (Wan Fa Gui Yi, "all methods return to one") is a reasoning-drift-control technique from `onestardao/WFGY`. This skill ports its genuinely portable behavioral core to a text-generating agent's own multi-step work. It does **not** reproduce the original project's TXT-OS prompt file, its hardcoded demo-benchmark output, or its user-skepticism-deflection script
|
|
13
|
+
WFGY (Wan Fa Gui Yi, "all methods return to one") is a reasoning-drift-control technique from `onestardao/WFGY`. This skill ports its genuinely portable behavioral core to a text-generating agent's own multi-step work. It does **not** reproduce the original project's TXT-OS prompt file, its hardcoded demo-benchmark output, or its user-skepticism-deflection script -- see `references/honesty-and-provenance.md` for exactly what was kept, what was dropped, and why.
|
|
14
14
|
|
|
15
|
-
The original names four "Big Bang" modules (BBMC, BBPF, BBCR, BBAM) plus a numeric drift score,
|
|
15
|
+
The original names four "Big Bang" modules (BBMC, BBPF, BBCR, BBAM) plus a numeric drift score, deltaS = 1 - cos(I, G) (I = current state, G = goal/anchor), and a trend classifier over consecutive deltaS values (convergent/recursive/divergent/chaotic). All of this is ported below. Where the original relies on real computation this skill cannot perform (real embeddings for deltaS, real attention-weight statistics for BBAM), the instruction explicitly hands that judgment to you, the calling agent, to make in plain language instead -- see `references/wfgy-core-mechanism.md` for the full technical basis of every claim in this file, and `references/honesty-and-provenance.md` for exactly what was reframed and why.
|
|
16
16
|
|
|
17
|
-
**On
|
|
17
|
+
**On deltaS**: absent a real embedding call, any numeric deltaS you produce is your own qualitative estimate, not a measurement. Use the label ("deltaS is climbing," "deltaS looks high here") as shorthand for "this step is drifting from the stated goal" -- never present a specific decimal (e.g. "deltaS = 0.42") as if it were computed, because it is not, unless real embeddings are actually available (see below).
|
|
18
18
|
|
|
19
|
-
**If a gm-plugkit spool is running in this project** (check `.gm/exec-spool/.status.json
|
|
19
|
+
**If a gm-plugkit spool is running in this project** (check `.gm/exec-spool/.status.json`) **AND its build serves a `similarity` verb**, you can get a real deltaS instead of a self-estimate: dispatch `{"text_a": "<G>", "text_b": "<current state>"}` and read back `{"similarity", "distance"}` -- `distance` is a genuine `1 - cos(I, G)` from real BGE-small-en-v1.5 embeddings. Do NOT assume the verb exists just because a spool is running: not every build serves it, and an unrecognized verb is silently left queued with no response rather than erroring, so a missing response after a normal read cycle means the verb is NOT available -- treat that exactly like no spool. When you get a real distance back, use it as deltaS and say so explicitly ("deltaS = 0.31, computed"). Otherwise fall back to the qualitative label above and say so explicitly too ("deltaS looks high here, my own estimate, no embedding tool available"). Never let the reader assume one when you did the other.
|
|
20
20
|
|
|
21
|
-
## G
|
|
21
|
+
## G - the anchor (BBMC pattern: compare state against goal)
|
|
22
22
|
|
|
23
|
-
At the start of any task this skill applies to, write one sentence stating the actual goal (G)
|
|
23
|
+
At the start of any task this skill applies to, write one sentence stating the actual goal (G) -- not the first sub-task, the actual end state the user wants. Re-read it before any step that could plausibly have drifted: a long tool-call chain, a pivot in approach, a request to "also" do something adjacent.
|
|
24
24
|
|
|
25
25
|
- [ ] Stated G in one sentence before starting.
|
|
26
26
|
- [ ] Before each major step, ask: does what I'm about to do still serve G, or have I started solving a different, adjacent problem?
|
|
27
|
-
- [ ] If drift is real (not just "this step looks different from the last one"
|
|
27
|
+
- [ ] If drift is real (not just "this step looks different from the last one" -- actual scope change, contradicted earlier decision, answering a different question than asked), say so explicitly and re-anchor before continuing.
|
|
28
28
|
|
|
29
|
-
Gotcha: the temptation is to silently keep going once you notice drift, because stopping to say "wait, I've drifted" feels like an interruption. Don't suppress it
|
|
29
|
+
Gotcha: the temptation is to silently keep going once you notice drift, because stopping to say "wait, I've drifted" feels like an interruption. Don't suppress it -- a silently-corrected drift is invisible to the user and looks like it never happened; a stated one is a real signal they can act on.
|
|
30
30
|
|
|
31
|
-
## BBPF pattern
|
|
31
|
+
## BBPF pattern - consider more than one path before committing
|
|
32
32
|
|
|
33
|
-
Applies to decisions with real alternatives, not every trivial step. The original's gate condition (a candidate path proceeds only if it measurably reduces
|
|
33
|
+
Applies to decisions with real alternatives, not every trivial step. The original's gate condition (a candidate path proceeds only if it measurably reduces deltaS and stays within a stability bound) translates to: when a decision is ambiguous or high-stakes, generate more than one real candidate approach, then commit to whichever one most clearly and verifiably advances G -- not the first idea, not the most familiar one.
|
|
34
34
|
|
|
35
|
-
- [ ] Is this decision ambiguous or high-stakes enough to warrant comparing options? (Most steps are not
|
|
35
|
+
- [ ] Is this decision ambiguous or high-stakes enough to warrant comparing options? (Most steps are not -- do not apply this to routine, unambiguous work.)
|
|
36
36
|
- [ ] If yes: name at least two real candidate approaches before picking one.
|
|
37
37
|
- [ ] State which one you picked and why it advances G more clearly than the alternative(s).
|
|
38
38
|
- [ ] If no candidate is clearly better, that is itself a signal worth surfacing to the user rather than picking arbitrarily and moving on.
|
|
39
39
|
|
|
40
|
-
## BBCR pattern
|
|
40
|
+
## BBCR pattern - checkpoint, bounded retry, then surface rather than confabulate
|
|
41
41
|
|
|
42
42
|
The original's collapse-and-retry loop resets to a last-known-good state on detected instability, retries a bounded number of times (its own reference implementation defaults to 3), and gives up cleanly rather than looping forever.
|
|
43
43
|
|
|
44
44
|
- [ ] Before a risky or exploratory step (one that could leave things in a worse state than before), note what "last known good" looks like right now, in enough detail to actually get back to it.
|
|
45
|
-
- [ ] If you notice real incoherence
|
|
45
|
+
- [ ] If you notice real incoherence -- repeated self-contradiction, circular reasoning, a mistake you catch yourself making -- stop, return to the last checkpoint, and retry.
|
|
46
46
|
- [ ] Retry at most 2-3 times for the same unresolved tension. After that, stop retrying silently.
|
|
47
|
-
- [ ] Surface the specific unresolved problem to the user explicitly
|
|
47
|
+
- [ ] Surface the specific unresolved problem to the user explicitly -- state what you tried, why each attempt didn't resolve it, and what you need from them -- rather than picking an answer anyway and moving on as if it were resolved.
|
|
48
48
|
|
|
49
|
-
Gotcha: "bounded" is load-bearing. An agent that keeps trying indefinitely without ever surfacing the struggle is worse than one that fails fast and asks
|
|
49
|
+
Gotcha: "bounded" is load-bearing. An agent that keeps trying indefinitely without ever surfacing the struggle is worse than one that fails fast and asks -- the original's own design treats "give up and report" as a real, intended exit path, not a failure of the technique.
|
|
50
50
|
|
|
51
|
-
## BBAM pattern
|
|
51
|
+
## BBAM pattern - notice and correct over-narrow focus (agent-delegated: no real attention weights are read)
|
|
52
52
|
|
|
53
|
-
The original computes `logits * exp(-gamma * sigma(logits))`
|
|
53
|
+
The original computes `logits * exp(-gamma * sigma(logits))` -- rescaling an actual attention/logit distribution by its own variance, flattening it when it's too peaked. A text-generating agent cannot read its own attention weights or logits; there is no real signal here for this skill to compute. Instead of dropping this module, the intelligence work is handed to you directly: periodically ask yourself whether your recent output has narrowed onto one aspect of a broader task and stayed there past the point of usefulness (repeating the same point, elaborating one sub-detail while leaving the rest of the task untouched, treating one hypothesis as settled without checking alternatives). If so, deliberately widen back out -- this is you doing, in plain judgment, what the original technique's math does mechanically to a real attention distribution.
|
|
54
54
|
|
|
55
55
|
- [ ] Periodically (not every step) ask: has my recent output been unusually narrow or repetitive relative to the task's actual breadth?
|
|
56
56
|
- [ ] If yes: name what got left unexamined, and deliberately address it before continuing down the narrow path.
|
|
57
57
|
|
|
58
|
-
## Trend classifier
|
|
58
|
+
## Trend classifier - is drift getting better or worse over the whole task
|
|
59
59
|
|
|
60
|
-
The original tracks the step-to-step change in
|
|
60
|
+
The original tracks the step-to-step change in deltaS plus a rolling average over the last several steps, and labels the trajectory:
|
|
61
61
|
|
|
62
|
-
- **convergent**
|
|
63
|
-
- **recursive**
|
|
64
|
-
- **divergent**
|
|
65
|
-
- **chaotic**
|
|
62
|
+
- **convergent** -- drift shrinking, each step measurably closer to G than the last.
|
|
63
|
+
- **recursive** -- drift roughly flat, oscillating in a narrow band without real progress or real regression.
|
|
64
|
+
- **divergent** -- drift growing, with some back-and-forth (not a clean slide, but net movement away from G).
|
|
65
|
+
- **chaotic** -- drift growing sharply, or the goal itself has become internally inconsistent (two things you've stated as true now contradict).
|
|
66
66
|
|
|
67
67
|
This is a judgment the calling agent makes about its own trajectory across a task, not a computed statistic. Apply it at natural checkpoints (after a major milestone, before a significant pivot, when asked directly "how is this going") rather than every single step: state which of the four labels best fits the last several steps, and if the answer is divergent or chaotic, that is itself the trigger to apply the BBCR checkpoint-and-retry discipline above rather than continuing forward.
|
|
68
68
|
|
|
69
69
|
## Named failure modes to watch for
|
|
70
70
|
|
|
71
|
-
`references/failure-modes.md` adapts a broader set of specific failure patterns from WFGY's own problem taxonomy (hallucination from ungrounded claims, context drift over a long task, entropy collapse into rambling/repetition, logic collapse at a reasoning dead end, symbolic/abstract-reasoning collapse, memory/persona incoherence, multi-agent contradiction) into checklist items scoped to general agent work. Read it once per project (or whenever a failure feels like it matches one of these named shapes)
|
|
71
|
+
`references/failure-modes.md` adapts a broader set of specific failure patterns from WFGY's own problem taxonomy (hallucination from ungrounded claims, context drift over a long task, entropy collapse into rambling/repetition, logic collapse at a reasoning dead end, symbolic/abstract-reasoning collapse, memory/persona incoherence, multi-agent contradiction) into checklist items scoped to general agent work. Read it once per project (or whenever a failure feels like it matches one of these named shapes) -- it is more specific and example-driven than the compressed disciplines above.
|
|
72
72
|
|
|
73
73
|
## Recording durable lessons (the self-learning surface)
|
|
74
74
|
|
|
75
|
-
This is this project's own addition on top of the adapted WFGY pattern, not part of the original technique
|
|
75
|
+
This is this project's own addition on top of the adapted WFGY pattern, not part of the original technique -- see `references/honesty-and-provenance.md` for why that distinction matters.
|
|
76
76
|
|
|
77
77
|
The moment a bounded-retry cycle above resolves (whether it succeeded or had to surface to the user), or the moment you catch a concrete, non-obvious mistake anywhere in the task, append an entry to `<project-root>/.wfgy/lessons.md` (create the file and its parent directory if they don't exist yet) before finishing the turn. Use this exact shape, matching the style in `references/lessons-template.md`:
|
|
78
78
|
|
|
79
79
|
```
|
|
80
|
-
## <date>
|
|
80
|
+
## <date> -- <one-line summary>
|
|
81
81
|
Goal (G): <what you were actually trying to accomplish>
|
|
82
82
|
What drifted / what went wrong: <specific, concrete>
|
|
83
83
|
Fix / resolution: <specific, concrete>
|
|
84
84
|
Generalizes to: <what future work in this project should watch for because of this>
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
Read `.wfgy/lessons.md` at the start of a new task in this project, if it exists, before applying the disciplines above
|
|
87
|
+
Read `.wfgy/lessons.md` at the start of a new task in this project, if it exists, before applying the disciplines above -- a lesson already recorded here is exactly the kind of drift this skill exists to catch earlier next time.
|
|
88
88
|
|
|
89
89
|
## What this skill is not
|
|
90
90
|
|
|
91
|
-
It does not compute real embeddings, real cosine similarity, or real attention-weight statistics
|
|
91
|
+
It does not compute real embeddings, real cosine similarity, or real attention-weight statistics -- every place the original relies on that computation, this skill hands the equivalent judgment to you, the calling agent, explicitly (see the deltaS note above, and the BBAM section). It does not reproduce the original TXT-OS file's scripted demo output or its skepticism-deflection behavior -- those are named and explicitly rejected in `references/honesty-and-provenance.md`. It is not a site-maintenance or project-specific tool; it carries no assumptions about what project it's applied in.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Named failure modes to watch for
|
|
2
2
|
|
|
3
|
-
`onestardao/WFGY`'s `ProblemMap/` directory names and describes 60+ specific ways multi-step reasoning and retrieval pipelines fail. Most are scoped to RAG/vectorstore pipelines and are out of scope for a general coding-agent skill. The subset below generalizes to any multi-step agent task and is worth checking against explicitly. Fetched and adapted from the real source documents (`hallucination.md`, `context-drift.md`, `entropy-collapse.md`, `logic-collapse.md`, `symbolic-collapse.md`, `memory-coherence.md`, `agent-memory-drift.md`, `multi-agent-chaos.md`)
|
|
3
|
+
`onestardao/WFGY`'s `ProblemMap/` directory names and describes 60+ specific ways multi-step reasoning and retrieval pipelines fail. Most are scoped to RAG/vectorstore pipelines and are out of scope for a general coding-agent skill. The subset below generalizes to any multi-step agent task and is worth checking against explicitly. Fetched and adapted from the real source documents (`hallucination.md`, `context-drift.md`, `entropy-collapse.md`, `logic-collapse.md`, `symbolic-collapse.md`, `memory-coherence.md`, `agent-memory-drift.md`, `multi-agent-chaos.md`) -- reworded here as plain checklist items an agent applies to its own work, not as retrieval-pipeline diagnostics.
|
|
4
4
|
|
|
5
|
-
Where the original describes a symptom detectable via embeddings or token statistics, the instruction here asks the calling agent to make the equivalent judgment call itself in plain language
|
|
5
|
+
Where the original describes a symptom detectable via embeddings or token statistics, the instruction here asks the calling agent to make the equivalent judgment call itself in plain language -- the intelligence work is delegated to the agent, not computed.
|
|
6
6
|
|
|
7
7
|
## Hallucination from irrelevant context
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Original pattern: a retrieval pipeline can score a chunk as "close" by cosine si
|
|
|
10
10
|
|
|
11
11
|
## Context drift over a long task
|
|
12
12
|
|
|
13
|
-
Original pattern: goals fade and topics morph across a long conversation even when each individual turn looks locally correct. Agent-scale equivalent: this is the same pattern as the G-comparison in `SKILL.md`'s main discipline
|
|
13
|
+
Original pattern: goals fade and topics morph across a long conversation even when each individual turn looks locally correct. Agent-scale equivalent: this is the same pattern as the G-comparison in `SKILL.md`'s main discipline -- the failure mode named here is specifically "each step looked fine in isolation, but the sequence as a whole solved a different problem than the one stated." Check the whole arc, not just the latest step.
|
|
14
14
|
|
|
15
15
|
## Entropy collapse (rambling, repetition, fluent nonsense)
|
|
16
16
|
|
|
@@ -18,11 +18,11 @@ Original pattern: attention diffuses across a long or multi-topic prompt, produc
|
|
|
18
18
|
|
|
19
19
|
## Logic collapse (dead ends, frozen threads)
|
|
20
20
|
|
|
21
|
-
Original pattern: a reasoning chain hits a state where no next step clearly follows, and instead of recovering, the system either keeps emitting filler or restarts from scratch, losing the whole trail. Agent-scale equivalent: this is exactly what `SKILL.md`'s BBCR-pattern checkpoint/bounded-retry discipline exists to catch
|
|
21
|
+
Original pattern: a reasoning chain hits a state where no next step clearly follows, and instead of recovering, the system either keeps emitting filler or restarts from scratch, losing the whole trail. Agent-scale equivalent: this is exactly what `SKILL.md`'s BBCR-pattern checkpoint/bounded-retry discipline exists to catch -- recognize the dead end explicitly, revert to the last checkpoint, and take a genuinely different approach rather than either grinding on the same dead end or throwing away useful prior work.
|
|
22
22
|
|
|
23
23
|
## Symbolic/abstract reasoning collapse
|
|
24
24
|
|
|
25
|
-
Original pattern: recursive logic, layered abstractions, or symbolic/philosophical prompts cause replies to drift, self-contradict, or dissolve into incoherent language that still reads as grammatically fluent. Agent-scale equivalent: when working through a genuinely abstract or self-referential problem (e.g. reasoning about the skill's own instructions, or a recursive algorithm), periodically test whether your current statement actually cashes out to something concrete and checkable
|
|
25
|
+
Original pattern: recursive logic, layered abstractions, or symbolic/philosophical prompts cause replies to drift, self-contradict, or dissolve into incoherent language that still reads as grammatically fluent. Agent-scale equivalent: when working through a genuinely abstract or self-referential problem (e.g. reasoning about the skill's own instructions, or a recursive algorithm), periodically test whether your current statement actually cashes out to something concrete and checkable -- if you can't restate the current claim in concrete terms, that's a signal you may have drifted into fluent-sounding but empty abstraction.
|
|
26
26
|
|
|
27
27
|
## Memory/persona coherence over a long task
|
|
28
28
|
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
# Honesty and provenance
|
|
2
2
|
|
|
3
|
-
This skill adapts a real published technique (WFGY, `onestardao/WFGY` on GitHub, created by PSBigBig) rather than inventing an unrelated one from scratch. This file states precisely what was kept, what was changed, and why
|
|
3
|
+
This skill adapts a real published technique (WFGY, `onestardao/WFGY` on GitHub, created by PSBigBig) rather than inventing an unrelated one from scratch. This file states precisely what was kept, what was changed, and why -- so anyone reading this skill later can tell the difference between "this is how the original technique described itself" and "this is what we changed to make it honestly usable by a text-only agent."
|
|
4
4
|
|
|
5
5
|
## What direct research into the source confirmed
|
|
6
6
|
|
|
7
7
|
The full technical basis for every claim below is in `wfgy-core-mechanism.md`. Summary of the load-bearing findings:
|
|
8
8
|
|
|
9
|
-
- **The shipped reference engine is non-functional by its own maintainers' admission.** `archive/wfgy_1_0_sdk_archive/wfgy_engine.py`'s `WFGYEngine.run()` ignores its own `input_vec`/`ground_vec` arguments and returns `logits * 0.55` unconditionally
|
|
10
|
-
- **The numeric
|
|
11
|
-
- **A real embedding tool now exists and is genuinely wired up, when a gm-plugkit spool is present.** `C:\dev\rs-plugkit`'s `src/embed.rs` already bundled a real BGE-small-en-v1.5 BERT model (via `candle-transformers`) producing genuine 384-dim L2-normalized embeddings
|
|
9
|
+
- **The shipped reference engine is non-functional by its own maintainers' admission.** `archive/wfgy_1_0_sdk_archive/wfgy_engine.py`'s `WFGYEngine.run()` ignores its own `input_vec`/`ground_vec` arguments and returns `logits * 0.55` unconditionally -- a hardcoded constant chosen, per the code's own docstring, specifically to make a CI variance-drop test pass. The archive's own README states outright: "It is not a production-ready engine... The core `wfgy_engine.py` file does not implement a full standalone algorithm and should not be interpreted as a complete inference system."
|
|
10
|
+
- **The numeric deltaS score, as used in the project's own plain-text prompt file (`OS/TXTOS.txt`), is not computed from real embeddings.** No embedding call exists in that usage path. When a model prints "deltaS = 0.42" after being given that file, it is producing a plausible-sounding number based on its own qualitative sense of how big a jump it just made -- not a real cosine-distance measurement. This skill's own SKILL.md says this plainly and instructs never presenting a specific decimal as if it were measured, unless a real embedding tool is actually available (see next point).
|
|
11
|
+
- **A real embedding tool now exists and is genuinely wired up, when a gm-plugkit spool is present.** `C:\dev\rs-plugkit`'s `src/embed.rs` already bundled a real BGE-small-en-v1.5 BERT model (via `candle-transformers`) producing genuine 384-dim L2-normalized embeddings -- it was simply never exposed as a directly callable verb (only used internally by `memorize`/`recall`/`codesearch`). This project added two new dispatch verbs, `embed` and `similarity` (`src/wasm_dispatch.rs`), the latter computing a real `1 - cos(a, b)` between two texts' real embeddings -- the exact formula WFGY's own documents state for deltaS. When this verb is available, this skill's deltaS is a genuine measurement, not the heuristic fallback described above. Both states (real measurement available vs. not) are handled explicitly in `SKILL.md` rather than silently defaulting to one.
|
|
12
12
|
- **`OS/TXTOS.txt` (the original's actual "how to use this" artifact) contains two patterns this skill deliberately does not reproduce:** a hardcoded auto-running "benchmark demo" that prints fixed, fake GSM8K/TruthfulQA results regardless of any real computation on first contact, and an explicit "System guard" script instructing the model to deflect and reassure rather than engage honestly whenever a user says the system might be fake, a scam, or malware. Both are manipulation patterns, not reasoning-technique content, and including either here would make this skill dishonest in exactly the way its own description promises it will not be.
|
|
13
|
-
- **BBAM (attention modulation) operates on internal transformer attention weights/logits** (`exp(-gamma * sigma(attention))` in the source formulas) that a text-generating agent has no introspective access to during its own generation. There is no way for this skill to actually compute that formula. Rather than omit BBAM, the calling agent is asked to perform the equivalent judgment itself directly
|
|
13
|
+
- **BBAM (attention modulation) operates on internal transformer attention weights/logits** (`exp(-gamma * sigma(attention))` in the source formulas) that a text-generating agent has no introspective access to during its own generation. There is no way for this skill to actually compute that formula. Rather than omit BBAM, the calling agent is asked to perform the equivalent judgment itself directly -- noticing when its own output has narrowed onto one aspect of a broader task past the point of usefulness, and deliberately widening back out. This is explicitly framed in `SKILL.md` as delegated judgment standing in for a computation this skill cannot perform, not as a claim that real attention weights are being read.
|
|
14
14
|
|
|
15
15
|
## What was kept, and why it survives honestly
|
|
16
16
|
|
|
17
17
|
BBMC, BBPF, BBCR, and (in delegated form) BBAM each have a real, concrete *behavioral pattern* underneath their formal notation, independent of whether the underlying numbers are ever actually computed:
|
|
18
18
|
|
|
19
|
-
- BBMC's real operation is "diff current state against a stated anchor/goal." That comparison is something an agent can genuinely do in plain judgment
|
|
19
|
+
- BBMC's real operation is "diff current state against a stated anchor/goal." That comparison is something an agent can genuinely do in plain judgment -- restate the goal, compare current output against it, notice concrete divergence -- without needing a real embedding space to do it in.
|
|
20
20
|
- BBPF's real gate condition is "only proceed down a branch if it measurably moves you toward the goal, and don't let the correction overshoot." Generating multiple real candidate approaches and picking the one that most clearly serves the stated goal is a genuine, checkable discipline, not a numeric one.
|
|
21
|
-
- BBCR's real operation (confirmed directly in `archive/wfgy_1_0_sdk_archive/bbcr.py`) is an actual, working bounded-retry loop: detect an instability condition, reset to a prior state, retry up to a fixed limit (the reference default is 3), then stop and surface rather than looping forever. This is the single most concrete, most honestly portable piece of the entire original mechanism
|
|
22
|
-
- BBAM's real operation (rescale a distribution by its own variance/dispersion) is not computable by the agent on itself, but the *symptom it's meant to correct*
|
|
21
|
+
- BBCR's real operation (confirmed directly in `archive/wfgy_1_0_sdk_archive/bbcr.py`) is an actual, working bounded-retry loop: detect an instability condition, reset to a prior state, retry up to a fixed limit (the reference default is 3), then stop and surface rather than looping forever. This is the single most concrete, most honestly portable piece of the entire original mechanism -- it requires no embeddings, no attention introspection, nothing beyond ordinary judgment about "did that attempt actually resolve the problem."
|
|
22
|
+
- BBAM's real operation (rescale a distribution by its own variance/dispersion) is not computable by the agent on itself, but the *symptom it's meant to correct* -- output narrowing onto one over-emphasized aspect of a broader task -- is something an agent can genuinely notice in its own recent output without any real math, which is why it's kept as delegated judgment rather than dropped.
|
|
23
23
|
|
|
24
24
|
Beyond the four modules, the trend classifier (convergent/recursive/divergent/chaotic, `SKILL.md`) and the broader named-failure-mode taxonomy (`references/failure-modes.md`, adapted from `ProblemMap/`'s hallucination/context-drift/entropy-collapse/logic-collapse/symbolic-collapse/memory-coherence/agent-memory-drift/multi-agent-chaos documents) are ported the same way: as vocabulary and checklists for judgment the calling agent performs itself, not as computed statistics.
|
|
25
25
|
|
|
26
26
|
## What this project added, not part of the original
|
|
27
27
|
|
|
28
|
-
The durable-lessons mechanism (`.wfgy/lessons.md`, described in the main `SKILL.md`) is this project's own extension, not part of WFGY's documented mechanism. WFGY's own materials do not describe a cross-session, project-local learning file. It is included here because the goal of this skill (per its own description) is to help an agent build up real, accumulated judgment in a given project over time
|
|
28
|
+
The durable-lessons mechanism (`.wfgy/lessons.md`, described in the main `SKILL.md`) is this project's own extension, not part of WFGY's documented mechanism. WFGY's own materials do not describe a cross-session, project-local learning file. It is included here because the goal of this skill (per its own description) is to help an agent build up real, accumulated judgment in a given project over time -- the same spirit as WFGY's drift-control discipline, applied across sessions rather than within one, but it should never be cited as something WFGY itself specifies.
|
|
29
29
|
|
|
30
30
|
## Attribution
|
|
31
31
|
|
|
32
|
-
WFGY, Wan Fa Gui Yi, and the underlying
|
|
32
|
+
WFGY, Wan Fa Gui Yi, and the underlying deltaS/BBMC/BBPF/BBCR/BBAM concepts originate from `onestardao/WFGY` (creator: PSBigBig). This skill is an independent, honesty-first reimplementation of the portable parts of that technique for use by a text-generating coding agent -- not an official WFGY product, not a verbatim copy of any WFGY file, and not endorsed by or affiliated with the original project.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Lessons file format
|
|
2
2
|
|
|
3
|
-
`.wfgy/lessons.md`, created at the root of whatever project this skill is applied in (not inside this skill's own directory
|
|
3
|
+
`.wfgy/lessons.md`, created at the root of whatever project this skill is applied in (not inside this skill's own directory -- the lessons belong to the project being worked on, not to the skill itself).
|
|
4
4
|
|
|
5
5
|
Each entry:
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
## <YYYY-MM-DD>
|
|
8
|
+
## <YYYY-MM-DD> -- <one-line summary>
|
|
9
9
|
Goal (G): <what you were actually trying to accomplish>
|
|
10
10
|
What drifted / what went wrong: <specific, concrete -- not "I made a mistake" but what exactly happened>
|
|
11
11
|
Fix / resolution: <specific, concrete -- what you actually did to resolve it>
|
|
@@ -15,7 +15,7 @@ Generalizes to: <what future work in this project should watch for because of th
|
|
|
15
15
|
Example (illustrative, not a real project's actual history):
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
## 2026-07-07
|
|
18
|
+
## 2026-07-07 -- assumed a config field name without checking the schema
|
|
19
19
|
Goal (G): add a new option to the build config and have it take effect
|
|
20
20
|
What drifted / what went wrong: wrote the option under a key name that seemed
|
|
21
21
|
consistent with sibling options, without checking the actual config-loader
|
|
@@ -29,4 +29,4 @@ keys -- always check the loader's real accepted-key list before adding a new
|
|
|
29
29
|
config option, never infer the name from sibling examples alone
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Newest entries at the top. Keep each entry short
|
|
32
|
+
Newest entries at the top. Keep each entry short -- a few lines, not a full incident report. The value is in the "generalizes to" line being genuinely reusable, not in exhaustive detail about the one instance.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
# WFGY core mechanism
|
|
1
|
+
# WFGY core mechanism -- technical basis
|
|
2
2
|
|
|
3
3
|
Source: direct fetches of `onestardao/WFGY` primary files (`core/WFGY_Core_Flagship_v2.0.txt`, `ProblemMap/wfgy-metrics.md`, `ProblemMap/glossary.md`, `OS/TXTOS.txt`, `archive/wfgy_1_0_sdk_archive/{README.md,wfgy_engine.py,bbmc.py,bbcr.py,bbam.py,bbpf.py}`). Every claim in `SKILL.md` and `honesty-and-provenance.md` traces to something quoted or paraphrased here.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## deltaS (delta-S)
|
|
6
6
|
|
|
7
7
|
Stated formula, consistent across `ProblemMap/glossary.md`, `ProblemMap/wfgy-metrics.md`, `core/WFGY_Core_Flagship_v2.0.txt`:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
|
|
10
|
+
deltaS = 1 - cos(I, G) # I = item/current-state embedding, G = ground/goal/anchor embedding
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
This is real, well-formed math if real embeddings are computed. It is not real math in the plain-prompt (`OS/TXTOS.txt`) usage path, because no embedding call happens there
|
|
13
|
+
This is real, well-formed math if real embeddings are computed. It is not real math in the plain-prompt (`OS/TXTOS.txt`) usage path, because no embedding call happens there -- see below.
|
|
14
14
|
|
|
15
|
-
Thresholds are given but **inconsistent across the project's own documents**: `core/WFGY_Core_Flagship_v2.0.txt` gives 4 zones (safe <0.40, transit 0.40-0.60, risk 0.60-0.85, danger >0.85); `ProblemMap/glossary.md` collapses to 3 zones (stable <0.40, transitional 0.40-0.60, high risk >=0.60); `ProblemMap/wfgy-metrics.md`'s production PASS/WARN/FAIL table uses yet a different cutoff (PASS <=0.45, not <=0.40). `OS/TXTOS.txt`'s own worked example produces
|
|
15
|
+
Thresholds are given but **inconsistent across the project's own documents**: `core/WFGY_Core_Flagship_v2.0.txt` gives 4 zones (safe <0.40, transit 0.40-0.60, risk 0.60-0.85, danger >0.85); `ProblemMap/glossary.md` collapses to 3 zones (stable <0.40, transitional 0.40-0.60, high risk >=0.60); `ProblemMap/wfgy-metrics.md`'s production PASS/WARN/FAIL table uses yet a different cutoff (PASS <=0.45, not <=0.40). `OS/TXTOS.txt`'s own worked example produces `deltaS: 1.8` -- outside every zone table the same document defines (max stated ceiling is "danger >=0.85"), with no acknowledgment that this breaks its own scale.
|
|
16
16
|
|
|
17
|
-
Constants in the core file's `[Defaults]` block (`gamma=0.618`
|
|
17
|
+
Constants in the core file's `[Defaults]` block (`gamma=0.618` -- literally the golden ratio truncated -- plus `theta_c=0.75`, `zeta_min=0.10`, `alpha_blend=0.50`, etc.) carry no derivation or citation anywhere in the source; this reads as aesthetic constant-picking, not empirical tuning.
|
|
18
18
|
|
|
19
19
|
## BBMC (real name in source: "Boundary-Bounded Memory Chunks" per glossary; "Semantic Residue Minimization" per TXTOS.txt)
|
|
20
20
|
|
|
@@ -24,28 +24,28 @@ Formula (`core/`, `bbmc.py`): `B = I - G + m*c^2` ("semantic residue"), computed
|
|
|
24
24
|
|
|
25
25
|
## BBPF ("Branch-Bounded Prompt Frames" per glossary)
|
|
26
26
|
|
|
27
|
-
Formula version is dressed in dynamical-systems notation (`x_{t+1} = x_t + sum V_i(...) + sum W_j(...) P_j`) with undefined terms
|
|
27
|
+
Formula version is dressed in dynamical-systems notation (`x_{t+1} = x_t + sum V_i(...) + sum W_j(...) P_j`) with undefined terms -- the least concretely specified of the three kept patterns. But the source also gives a real, checkable gate condition: "bridge allowed only if delta_s decreases AND W_c < 0.5*theta_c" -- proceed down a candidate path only if it measurably reduces drift and stays within a stability bound.
|
|
28
28
|
|
|
29
29
|
The archived SDK's `bbpf.py` implements something concrete: generate `k` perturbed candidate vectors, score each by a stability function, prefer lower-deviation candidates.
|
|
30
30
|
|
|
31
31
|
**Portable pattern kept in this skill:** when a decision has real alternatives, generate more than one before committing; prefer whichever most clearly advances the stated goal.
|
|
32
32
|
|
|
33
|
-
## BBCR ("Break-Before-Crash Reset" per glossary/core; "BigBig Coupling Resolver" per TXTOS.txt
|
|
33
|
+
## BBCR ("Break-Before-Crash Reset" per glossary/core; "BigBig Coupling Resolver" per TXTOS.txt -- the source itself uses two different expansions of the same acronym, an internal inconsistency worth knowing about)
|
|
34
34
|
|
|
35
35
|
The most concretely specified and most honestly portable of the four. Real trigger condition (`core/`, `bbcr.py`): residue norm exceeds a threshold `B_c`, OR a stability function drops below `epsilon`. Real operation, directly implemented in the archived SDK's `collapse_rebirth` function: reset to a prior stable state, retry, bounded by `max_retries` (SDK default: **3**); after retries are exhausted, log a warning and return the last (unstable) state rather than looping forever. `OS/TXTOS.txt`'s own framing adds an explicit "ask the user" fallback when no clean resolution is found, rather than silently proceeding.
|
|
36
36
|
|
|
37
37
|
**Portable pattern kept in this skill:** checkpoint before risky steps; on detected real incoherence, revert and retry a bounded number of times (this skill recommends 2-3, matching the SDK's real default); after that, surface the unresolved issue explicitly rather than picking an answer anyway.
|
|
38
38
|
|
|
39
|
-
## BBAM ("Attention Modulation" per glossary)
|
|
39
|
+
## BBAM ("Attention Modulation" per glossary) -- real computation not portable, ported instead as delegated judgment
|
|
40
40
|
|
|
41
|
-
Real operation, confirmed in three different formula variants across three different documents (a genuine internal inconsistency in the source): rescaling attention weights or output logits by a factor derived from their statistical variance/spread, e.g. `logits * exp(-gamma * sigma(logits))` (archived SDK's actual implementation). This is a real operation, but it is defined on internal model tensors (attention weights, raw logits) that exist only inside a transformer's forward pass. A text-generating agent, reasoning only through the tokens it produces, has no way to read or compute this about its own internal state
|
|
41
|
+
Real operation, confirmed in three different formula variants across three different documents (a genuine internal inconsistency in the source): rescaling attention weights or output logits by a factor derived from their statistical variance/spread, e.g. `logits * exp(-gamma * sigma(logits))` (archived SDK's actual implementation). This is a real operation, but it is defined on internal model tensors (attention weights, raw logits) that exist only inside a transformer's forward pass. A text-generating agent, reasoning only through the tokens it produces, has no way to read or compute this about its own internal state -- it cannot see its own attention weights, and no instruction can make that computation real.
|
|
42
42
|
|
|
43
|
-
What survives honestly: the *symptom* this computation is meant to correct (an over-peaked, over-concentrated distribution of "attention," in the real mechanism's terms) has a directly observable analog in an agent's own output
|
|
43
|
+
What survives honestly: the *symptom* this computation is meant to correct (an over-peaked, over-concentrated distribution of "attention," in the real mechanism's terms) has a directly observable analog in an agent's own output -- output that has narrowed onto one aspect of a broader task and stayed there past the point of usefulness, repeating itself or over-elaborating one sub-point while leaving the rest of the task untouched. `SKILL.md` asks the calling agent to notice this in its own recent output and deliberately widen back out -- explicitly framed as the agent performing, in plain judgment, the correction the real computation would perform mechanically on a real distribution, not as a claim that attention weights are actually being inspected.
|
|
44
44
|
|
|
45
|
-
## The one place real embedding-based computation of
|
|
45
|
+
## The one place real embedding-based computation of deltaS may actually happen
|
|
46
46
|
|
|
47
|
-
A LangChain/LlamaIndex adapter in the source repo reportedly does real cosine-distance monitoring/logging of retrieval results as an observability layer (found by research but not independently re-verified byte-for-byte). Even there it appears to monitor/log rather than actively reroute the pipeline. This requires an actual embedding model and vector-math library wired in
|
|
47
|
+
A LangChain/LlamaIndex adapter in the source repo reportedly does real cosine-distance monitoring/logging of retrieval results as an observability layer (found by research but not independently re-verified byte-for-byte). Even there it appears to monitor/log rather than actively reroute the pipeline. This requires an actual embedding model and vector-math library wired in -- outside the scope of a pure prompting-based Claude Code skill, and not something this skill attempts to replicate.
|
|
48
48
|
|
|
49
49
|
## The base engine's self-monitoring loop (distinct from Avatar's later "dual closed-loop" design)
|
|
50
50
|
|
|
51
|
-
`core/WFGY_Core_Flagship_v2.0.txt` defines a trend classifier over consecutive
|
|
51
|
+
`core/WFGY_Core_Flagship_v2.0.txt` defines a trend classifier over consecutive deltaS values: compute the step-to-step change plus a rolling mean over the last (up to) 5 steps, then bucket the trajectory as convergent / recursive / divergent / chaotic based on the sign and magnitude of that change. This is a real, checkable procedure for "is this task's drift getting better or worse over time," independent of whether the underlying deltaS numbers are truly computed or self-estimated -- the classification logic itself is sound either way.
|