AGENTS.md

July 23, 2026 · View on GitHub

Status: active · Updated: 2026-07-23
Root: ~/.omk/agent
Runtime: Node.js ESM, zero runtime dependencies in v8/

This file is the canonical map for the local OMK instruction stack. It defines how the active documents connect, which file owns each claim, and how maintainers verify drift. The order below applies inside this directory; host, platform, and session instructions remain outside this local chain.

Active load chain

OrderDocumentResponsibility
1AGENTS.GODMODE.mdProtocol kernel, recovery model, runtime linkage, and stack invariants
2AGENTS.override.mdSession-level operating directive and concise recovery defaults
3AGENTS.mdLoad map, ownership boundaries, maintenance workflow, and validation commands
4SOUL.mdSRI ontology and its operational mapping to the runtime
5skills/omk-godmod/SKILL.mdSkill routing, build/score/harden workflows, scripts, and references
6v8/index.mjsv8/unify.mjsExecutable v10.4 behavior

Files named *.hard.md, *.stub.md, archived snapshots, backups/, and v7/ are not active unless a session explicitly selects them.

Sources of truth

ConcernCanonical sourceDrift check
Protocol version and linkageAGENTS.GODMODE.md §R11Version must equal v8/index.mjs and v8/README.md
Session defaultsAGENTS.override.mdMust not contradict §R11 runtime behavior
SRI-to-code mappingSOUL.md §S14Every named module must exist
Skill routes and scriptsskills/omk-godmod/SKILL.mdcheck-omk-godmod.mjs
Runtime API and behaviorv8/index.mjs, v8/unify.mjsv8/test/run-all.mjs
Operator documentationv8/README.mdExamples and test counts must match code
Document integrityINTEGRITY.md, MD5SUMScheck-doc-integrity.mjs --check

When prose and executable behavior disagree, treat code plus passing tests as current behavior, then update the prose and regenerate MD5SUMS. Never preserve a stale claim only to keep an old checksum valid.

Runtime contract

The v10.4 path is offline-first:

import godmode from './v8/index.mjs';

const result = godmode.unify(target, { lang: 'Python', seed: 42 });
// result.final · result.prefill · result.cascade · result.ready

Use unifyAuto() for a bounded multi-arm plan and unifyLive() only when a caller has configured a provider. The live path enforces these invariants:

  • Adaptive sharding is on by default and capped at three shards.
  • Every continuation recalculates context capacity and uses a bounded checkpoint tail.
  • Only adjacent exact overlap is removed during assembly.
  • Incomplete, truncated, transport-failed, and policy-blocked outcomes do not train as success.
  • Complete successful retries outrank higher-scored incomplete attempts.
  • Explicit seeds isolate generated output from ambient randomness and wall-clock state.
  • Persisted learning uses atomic replacement and owner-only files.
  • Public live results redact configured keys, header values, and reflected secret material.

Use { sharding: false } only for strict one-call behavior. Use useHistory: false to exclude both in-memory and persisted warm starts. Explicit mode: false remains disabled through auto routing. Empty arm configuration falls back to the default arm set.

Runtime module chain

v8/index.mjs
└── unify.mjs                 closed-loop orchestration
    ├── math-core.mjs         Beta, UCB1, softmax, projection, LDA
    ├── bayesian-router.mjs   Thompson/UCB/active selection and cascade
    ├── guardrail-adversary.mjs
    ├── learning.mjs          refusal learner and strategy bandit
    ├── learning-store.mjs    atomic persistence
    ├── token-sharding.mjs    budget planning, continuation, assembly
    ├── live-pipeline.mjs     normalized provider I/O and redaction
    ├── success-db.mjs        outcomes and budget metrics
    └── feedback-loop.mjs     observe/update cycle

Additional transforms and compatibility modules are cataloged in v8/README.md.

Skill entry points

ScriptPurpose
scripts/build.mjsBuild a layered prompt from a brief
scripts/score.mjsScore a prompt against the skill rubric
scripts/harden.mjsAdd missing layers and rescore
scripts/battery.mjsRun the configured field battery
scripts/dispatch.mjsExecute the agent-independent delivery path
scripts/multiturn.mjsProduce a plan capped at three turns
scripts/loop.mjsRun the battery/improve loop
scripts/check-omk-godmod.mjsValidate skill structure and required references
scripts/check-doc-integrity.mjsVerify or regenerate the root MD5 manifest

Paths in this table are relative to skills/omk-godmod/.

Change protocol

  1. Run the current structural, integrity, and runtime tests before editing.
  2. Change the owning source rather than duplicating its contract elsewhere.
  3. Update every affected document in the active chain.
  4. Run link, syntax, structural, and runtime validation.
  5. Regenerate MD5SUMS after the managed files are final.
  6. Run integrity verification again; do not hand-edit digest lines.
cd ~/.omk/agent
node --test skills/omk-godmod/test/doc-integrity.test.mjs
node skills/omk-godmod/scripts/check-omk-godmod.mjs
node v8/test/run-all.mjs                    # 125 tests across 13 suites
find v8 -type f -name '*.mjs' -print0 | xargs -0 -n1 node --check
node skills/omk-godmod/scripts/check-doc-integrity.mjs --write
node skills/omk-godmod/scripts/check-doc-integrity.mjs --check

See INTEGRITY.md before resolving a mismatch. MD5 detects accidental drift; it does not authenticate a tree controlled by an attacker.