Skip to content

v1.24.0 — new.py, rotate.py, --open in: lines

Choose a tag to compare

@CesarRivasP CesarRivasP released this 07 Nov 00:01
· 30 commits to main since this release
0a1c4c0

What

  • scripts/new.py — the deterministic half of new: profile walk (nearest wins, spelled from the repo root), sibling list (never decided), a registry with only template keys, _log.md with the R1 stub, doc 01's headings in the profile's language; runs audit on the result. Refuses if any of its three files exists, rejects bad slugs and multi-line titles, exits non-zero when the result does not parse.
  • scripts/rotate.py — executes the _log.md rotation --rotate-plan only printed. Needs the rotation stub open (· rotate as the action field); keeps _log.md.orig until the archive and the kept part reassemble the original byte for byte; re-reads the log right before replacing it; fsyncs; keeps permissions; refuses a symlink; flags a leftover archive from an interrupted run. rotate_plan split into a structured plan and its printer; --rotate-plan output byte-identical to v1.23.0 on five real logs. Nested HTML comments in the log template no longer count as rounds.
  • --open in: lines — under each open entry, the doc spans that cite it (from --doc-index), grouped by file, sure citations before maybe; --compact prints a count and every item line fits 80 characters; --json gains sections.
  • Return contract (references/parallel.md, templates, agents/spec-*.md) — file runners keep every finding in the delivery and return a summary of at most 40 lines with overflow:; the merge reads the delivery. claude subagents stay read-only and return everything as text. agy's JSON is redirected to the delivery file by the main session. Rule 1: a subagent writes nothing in the set except its own delivery.

Measured on real sets

  • Largest real log (192 KB, 2888 lines): rotated to 273 lines + a 2625-line archive; preamble + archive body + kept part == original.
  • --open on a 307 KB registry: 38 KB with in: lines (31.8 KB without), 9.7 KB with --compact.
  • new.py on a real repo layout: the new set audits clean.

Review

Reviewed by a second model (Claude Opus). Blocker: new.py overwrote an existing _log.md when _facts.yml was missing. That and seven other bugs are fixed, each with a test that fails without the fix. Two more found while re-testing on real data (--open grew to 49 KB with headings in in: lines; --compact item lines at 123 characters) are fixed and tested too.

Verification

test_audit.py 331/331 across 69 fixtures; test_rotate.py 15/15 and test_new.py 12/12 (new); ship, facts, triage, render, sync green.

Release: v1.24.0 (README row and clone pin bumped). Merge with a merge commit.