Repository navigation
v1.22.0 — sync.py, audit --get and --compact
Why
Measured on the largest real sets the skill has run on (registries up to 307 KB, sets up to ~720 KB): the scripts are fast (1–5 s, under 70 MB peak RSS), so the cost of a round is the text that lands in the agent's context and the mechanical work the agent does by hand. A Rust port was evaluated and rejected for the same reason.
Audit output
audit.py --get KEY [KEY ...]prints the exact YAML of single registry entries under# KEY L<a>-<b>, sharing the span logic with--index. Unknown key exits 2. Replaces--index+ offset reads.--open --compactcuts each open item to one line of 80 characters (31.8 KB → 8.6 KB on the largest set).--openstays whole by default, becausehandoff --sessionreads it.--compactwithout--openexits 2.- The human-pass block prints checks with candidates in full and every other check as one
check <id> <name>line, so none is skipped by omission;--fullrestores the descriptions. Plain audit output −21 to −32% on three real sets.--jsonunchanged.
sync.py
scripts/sync.py <spec_dir> [--from REF] [--apply] diffs _facts.yml at REF (default HEAD) against disk and replaces each changed value in the docs in scope, with the provenance view's word boundaries and the audit's stage gating (both imported, not reimplemented).
- Dry run by default;
--applywrites atomically (temp file +os.replace). - Never guesses: a value shared by several paths, part of another datum, under 3 characters, or without a new value is reported, not applied (exit 1).
- Never writes
_log.mdorlegacy/deriveddocs; changeddecisions.*are listed with theircited_in:. - Skips a doc that changed since the plan (exit 1); warns when
HEADequals disk (pass--from); exits 2 on an untracked or ignored registry.
Docs
SKILL.md mode rows, scripts and tests lists; mode-audit, mode-sync, mode-handoff, handoff.md, parallel.md and the inbox brief template name the new flags. Subagents have no Bash, so parallel.md has the main session paste --get output into the brief.
Review
Implemented by Orca workers, then reviewed by a second model (OpenCode, Kimi K3.1 Pro) against the code. The review moved --compact to opt-in, kept every human-pass check named, and added the stale-doc check, atomic writes and base-ref warning to sync.py.
Verification
tests/test_audit.py 329/329 across 69 fixtures; test_sync.py 9/9 (new, temporary git repo); test_ship.py, test_facts.py, test_triage.py, test_render.py green.
Release: v1.22.0 (README row and clone pin bumped). Merge with a merge commit.