Offering a few small tools back: typecheck step, document-fidelity gate, PDF/docx renderers, archive purge
Offering some tools back, if any are wanted
Running LifeOS daily produced a handful of small tools that fill gaps in the shipped set. Rather than open a pile of unsolicited PRs, here they are as a list — happy to send a PR for any that look useful, one at a time, and equally happy to hear that a given one belongs in a user's own install rather than in the project.
Ordered roughly by how general the value is.
1. A real typecheck step. bun build does not typecheck. A field that is read but never declared bundles cleanly, so it "compiles" — and stays broken for days. This runs tsc --noEmit over two roots (the root config, and the Pulse server, which needs its own config because its dependencies differ and the file cannot be named tsconfig.json without Bun picking it up). Roughly 60 lines.
2. A document-fidelity checker. For any pipeline that renders markdown to PDF: extract the text back out with an independent extractor (poppler, so the verifier does not share the renderer's assumptions) and diff it against the source, failing if a word or number was dropped. A PDF that opens is not a PDF that is correct — the first run of ours found a command silently deleted by the renderer. This also caught a defect in itself: the vocabulary rule required tokens of pure letters and digits, so every word followed by punctuation was never checked. On a real document it was watching 400 tokens out of 508.
3. A markdown → PDF renderer for decision documents. Pure JS (pdfmake 0.2.x — 0.3 removed the server-side stream), base-14 fonts, no browser, no native binary, native image embedding. Exists because decisions read in a terminal are reflexes; the same document on a phone or on paper is a decision. Pairs with (2), which gates it.
4. A markdown → .docx builder. Builds OOXML directly rather than converting, so no word processor is in the path. The gate that matters: after writing, open the package and assert images are embedded, not linked — a linked image looks identical until the recipient opens the file somewhere else and sees an empty rectangle.
5. An archive-purge tool with a grace window. Deletes files older than N days only inside a directory whose basename matches exactly, refuses any other path, spares files marked with a KEEP- prefix, and touches nothing under --dry-run. Small, but the fail-closed directory check is what makes it safe to point at anything.
6. A local-delta verifier. Described separately in a discussion — a registry of local changes plus behavioral probes, so an upgrade can report what it reverted instead of reverting it silently.
Two notes on fit. Some of these carry comments in a language other than English and would be translated before any PR. And a couple of them (the cross-vendor audit runners we use) are tied to a specific external CLI, so the useful thing there is the pattern — a review pass from a model family other than the executor's — rather than our implementation; Forge and Grok already occupy that slot in this project, so there may be nothing to add.
No expectation attached to any of this — just did not want to keep useful pieces private if the project wants them.
Decisions, one per tool: (1) typecheck step — yes, please send the PR; bun build not typechecking has bitten us too. (5) archive purge with the fail-closed directory check — yes, send it. (2) document-fidelity checker and (3)/(4) PDF/docx renderers — passing; nothing in the shipped payload renders documents, so they'd be dead weight in the release (great pattern for your install though). (6) local-delta verifier — the overlay tool that landed this week covers the report-what-changed half; if a gap remains after the next release, open it as its own issue. Translated comments are fine, English preferred for new code.
Status: the typecheck step (#1793) and the archive purge (#1794) are ported, credited, and shipped in v7.40.4. Keeping this open for the document-fidelity gate and the PDF/docx renderers. A PR for the fidelity gate would be welcome next, one at a time as you offered.
Fidelity gate PR is up: #1855, as offered — one at a time.
Next in the queue, if you want it: UpgradeVerify.ts — deterministic post-upgrade verification. Eight checks, each one born from an incident an install actually paid for: version coherence; typecheck relative to a pre-upgrade baseline (--baseline snapshots the pre-existing debt first, so the gate is 'no NEW errors', never 'zero errors'); every hook registered in settings.json resolves to a real file; hooks on disk that nothing registers and nothing imports (an aggregator like a Stop-gate runner keeps hooks live that no settings line names — the import graph is followed, so the inert list doesn't cry wolf); launchd jobs whose ProgramArguments resolve against WorkingDirectory before being called missing; the dashboard answering on its port; the statusline rendering at all; and a class 7.40.4 taught us tonight: cross-version evidence skew — a fail-closed validator judging an evidence row written by the pre-upgrade producer goes red on a healthy system, and the check names it 'stale evidence, self-heals on the next producer run' instead of letting the operator debug a ghost. --selftest proves every check can fail; --decisions renders the open items as an answer sheet.
Context on why we built it: OverlaySystem (v7.40.4) now protects by location — USER/ and MEMORY/ are never touched, CLAUDE.md and the system prompt get a backup — but inside the system-owned trees it overwrites wherever the payload ships a file, so an install's local patches to system files still get flattened with no report. We upgraded with a delta-aware reconciler instead (adopt a payload file only when the local copy is byte-identical to the installed version's own payload after identity substitution — anything else is local work, kept and reported), and UpgradeVerify is its verification half. Happy to send UpgradeVerify as the next PR, and the delta-test itself after that if the overlay direction interests you.
Final status, one line per tool: typecheck—shipped 7.40.4; archive purge—shipped 7.40.4; document-fidelity gate—ported from PR #1855 today; post-upgrade verifier—ported from PR #1857 today; PDF/docx renderers—passing for now (no pipeline on our side needs them yet; TextFidelity stands alone by design, so the gate is ready if one appears). Thank you for the one-at-a-time discipline—it made every one of these easy to take.