akw-factory-floorsfloors.akwlabs.com · ga

Generators

What writes the mailrooms and the manifest, and how --check turns them into gates.

scripts/generators/ holds every writer in this repository. Nothing under it is edited by hand, and each one carries a --check mode that writes nothing and exits non-zero on a fault. npm run check runs both check modes.

floor-mailroom.jsonl

```bash create npm run gen:mailroom ``` ```bash verify npm run gen:mailroom -- --check ``` ```bash rewrite npm run gen:mailroom -- --force ```

Creates the mailroom on any floor that lacks one, and validates every row on the floors that have one. Because a mailroom is append-only, the generator creates and never rewrites unless --force says so. That is what makes --check meaningful: a re-run produces no diff, so any diff is a real change.

It checks four things a hand-written log gets wrong:

A file that fails its own schema is worse than an absent file. The next reader trusts it. A gap means a row was dropped, which an append-only log cannot do. A mailroom whose first row is a delivery lost its opening. Catches a mailroom copied between floors without an edit.

manifest.jsonl

```bash rebuild npm run gen:manifest ``` ```bash verify npm run gen:manifest -- --check ```

Rebuilds the manifest from the floors on disk. --check fails when the committed manifest no longer describes the tree — the exact staleness a hand-maintained list acquires without anything disagreeing with it.

Paths

Both generators resolve the repository root from their own file location and from nothing else. No environment variable participates, which is the point rather than an omission: a variable naming a different checkout than the one the code was loaded from is a bug that appears only in a worktree. rel() is the only way a path is printed, so an absolute path never reaches a committed file.