Skip to content

Offering a few small tools back: typecheck step, document-fidelity gate, PDF/docx renderers, archive purge #1614

Description

@xmasyx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions