Small pure-stdlib helpers for maintaining this content repository.
These tools do not introduce an external build system. They are local editorial
checks, copy helpers, launchers, installers, and generated-file drift gates. The
small llms/ package exists only to expose python -m llms.build.
bash tools/check_gonol_authority.shFails if active skill-lib doctrine drifts back to assigning gonol/text construction authority to EDCM. The active split is:
UCNS = gonol objects, constructors, geometry
Stack = active language-gonol construction research
EDCM = measurement/evaluation only
tools/ai.sh is the canonical Termux-side launcher for the coding-agent CLIs on
the a0 VM. It uses the SSH host alias a0 and owns the remote tmux session
layout (0:shell, 1:grok, 2:codex, 3:deepcode), real pane/process status,
explicit restart, remain-on-exit, and persistent VM logs under
~/.local/state/a0/logs.
Install the stable ai.sh command into the caller PATH:
bash tools/install_ai.shOn Termux the installer symlinks the canonical source to $PREFIX/bin/ai.sh,
which is already on PATH. Elsewhere it uses ~/.local/bin/ai.sh and adds one
idempotent login-shell PATH line only when required. No second launcher
implementation is copied.
Examples:
ai.sh
ai.sh status
ai.sh restart deepcode
ai.sh logs deepcode
ai.sh codexProvider credentials remain the responsibility of the VM/provider CLIs.
ai.sh keys only copies already-present VM login-environment values into the
remote tmux environment so restarted CLIs can see them; it prints only
present/missing and never stores or displays key values.
python tools/check_skill_lib_drift.py
python tools/check_skill_lib_drift.py --json
python tools/check_skill_lib_drift.py --warnings-failChecks that:
- every root directory with
SKILL.mdappears inskills.json; - every
skills.jsonentry has a matching<skill>/SKILL.mdpath; README.mdlists every indexed skill;ORG_DISTRIBUTION.mdlists every indexed skill;AGENTS.mdandCLAUDE.mdmention every indexed skill.
python tools/check_skill_compliance.py
python tools/check_skill_compliance.py --json
python tools/check_skill_compliance.py --warnings-failChecks baseline skill-build invariants for every SKILL.md: frontmatter
name, explicit load/use trigger text, skills.json registration, and visible
hmmm boundary. It reports softer shape guidance as warnings so historical
skills can be normalized one family at a time.
Dry-run by default:
python tools/propagate_skills.py ../target-repoApply copy:
python tools/propagate_skills.py ../target-repo --applyCopy only selected skills:
python tools/propagate_skills.py ../target-repo --skills char-compress canon --applyThe helper copies canonical skill directories into:
.agents/skills/<skill-name>/
It also carries any shared doctrine/<file> docs the propagated skills link to
(e.g. msdmd/test-build → doctrine/msdmd-checks.md) into
.agents/skills/doctrine/, so those relative links resolve in the vendored tree,
and writes .agents/skills/README.md in the target repo with the source commit
SHA. It does not commit, push, open pull requests, or contact GitHub.
The read-only counterpart to propagate_skills.py: given a checked-out consumer
repo, it reports whether that repo's vendored .agents/skills/ subset still
matches this canonical skill-lib. This is what catches "canonical moved ahead"
drift before it accumulates between manual propagation PRs.
python tools/check_consumer_drift.py ../target-repo
python tools/check_consumer_drift.py ../target-repo --sha <skill-lib-commit>
python tools/check_consumer_drift.py ../target-repo --sha <commit> --strict-sha --jsonThe vendored subset is auto-detected (the intersection of the consumer's skill directories with the canonical ones), so no per-repo config is needed. It:
- flags any canonical file missing from or differing in the vendored copy as
drift (exit
1); - ignores repo-local additions — extra files, local runners, or repo-only skills beside the canonical assets;
- verifies a vendored
manifest/generate.py.sha256still pins itsgenerate.py; - verifies any shared
doctrine/<file>doc a vendored skill links to is present at.agents/skills/doctrine/<file>and matches canonical (a missing or stale referenced doctrine doc is drift); - with
--sha, warns when.agents/skills/README.mddoes not cite that source commit (an error under--strict-sha); - with
--require-vendored, fails when the repo vendors no canonical skills at all — used by the scheduled workflow, whose matrix is repos that must carry a subset, so an empty vendored set is itself a regression.
Read-only: it never writes to the consumer repo. The scheduled workflow
.github/workflows/consumer-drift.yml runs it against every consumer repo
weekly (and on demand); the consumer repos are public, so it checks them out
with the default GITHUB_TOKEN — no extra secret required.
Append repo-local rec.md recommendations into one org-level rec.md without
rewriting repo-owned reports:
python3 tools/aggregate_org_rec.py --root .. --out ../rec.md
python3 tools/aggregate_org_rec.py --root .. --out ../rec.md --append
python3 tools/aggregate_org_rec.py --root .. --out ../rec.md --strictThe runner discovers immediate child git checkouts, extracts the latest
### Recommendations section from each repo's rec.md, falls back to
### Remaining for repair-pass records, carries ### hmmm forward, and appends
one timestamped aggregate section only when --append is supplied.
Repository-local rec.md files remain source reports; the org aggregate is a
derived index, not transferred canon.
Collect shallow scalar/vector metrics across sibling repo checkouts and append
oddities into docs.report:
python3 tools/org_ratio_compare.py --root ..
python3 tools/org_ratio_compare.py --root .. --out ../docs.report --append
python3 tools/org_ratio_compare.py --root .. --jsonThe runner skips vendored .agents, dependency folders, build outputs, and
caches by default. Large text files are counted by bytes but not fully
line-counted past the configured byte ceiling; the report carries those limits
as hmmm instead of spending unbounded scan resources.
Dry-run generated root instructions:
python -m llms.build --root . --out llms.txtWrite the generated file:
python -m llms.build --root . --out llms.txt --applyCheck committed drift:
python -m llms.build --root . --out llms.txt --checkThe runner parses LLMS blocks, ignores Markdown fenced-code examples, emits
unknowns as hmmm, and generates the canonical root llms.txt shape declared
in llms-build/SKILL.md.
python tools/char_compress_check.py
python tools/char_compress_check.py --jsonRuns the preservation fixtures in:
char-compress/fixtures.json
This is not a full natural-language compressor. It is a guardrail runner for
minimum preservation claims: negation, quantifier, order, values, statuses,
secrets, hmmm, and no UCNS-A / edcmbone status leakage.
.github/workflows/ci.yml runs the repo verification stack on pull requests and
pushes to main: unit tests, gonol-authority gate, skill drift, skill
compliance, ratios strict gate, llms-build drift, RepoLOTO audit, and RepoLOTO
checks.
.github/workflows/consumer-drift.yml runs check_consumer_drift.py against
every consumer repo on a weekly schedule (and on demand) to detect vendored-copy
drift. The consumer repos are public, so it uses the default GITHUB_TOKEN — no
extra secret required.
consumer-drift.ymlonly detects drift; re-propagation still requires a human or agent to runpropagate_skills.py --apply, review, commit, and open PRschar_compress_check.pyverifies preservation fixtures but is not yet a complete codec- third-party coding CLI command names and authentication methods can change;
tools/ai.shexposes command overrides rather than pretending those interfaces are permanent