docs(linkedin-studio): snevre inn newline-korreksjonen etter kryssjekk mot andres svar

Forrige commit hevdet at delt fixture-korpus MÅ bære et verbatim,
ikke-normalisert tilfelle. Kryssjekk mot claude-playlist-corpus' trinn
D-svar viser at det var overdrevet: vår newline-frie serializer gjelder
ingest/published/, som er ekskludert fra OKF-bundelen ved design.
Filene write_concept faktisk ville skrevet (brain/) far trailing newline
fra var egen serializer. Pa konseptstien er vi enige med dem.

Det som overlever: write_concept skal ogsa tjene som generell verbatim-
writer utenfor en bundle, sa ramme-normalisering bor vaere en dokumentert
parameter, ikke en ubetinget garanti.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019uzhvLjCm39mNQXVFwG7w2
This commit is contained in:
Kjell Tore Guttormsen 2026-07-20 09:46:17 +02:00
commit f9ff2bc6ee

View file

@ -130,11 +130,20 @@ halves so byte-identity is the test, not the promise.
> - **We have no stable error codes.** None of the four CLIs set a machine-readable code; every failure is a
> free-text `Error` plus a numeric `process.exit` (`scripts/brain/src/ingest.ts:99,:113`,
> `scripts/trends/src/cli.ts:125,:255`). `err.code` is an ask *of* the library, not a discipline we mirror.
> - **"Exactly one trailing newline" is not our invariant, and must not become the library's.** Nothing
> asserts it here, and `serializePublishedRecord` deliberately omits it (`scripts/brain/src/ingest.ts:71`)
> because the record must end on the verbatim body or the byte-exact round-trip (SC2, §5) breaks. A shared
> fixture corpus therefore has to carry a *verbatim, non-normalized* case; a corpus where every valid
> output ends in one newline encodes normalization as contract and tests byte-identity away.
> - **"Exactly one trailing newline" is not asserted here either.** Nothing tests it, and
> `serializePublishedRecord` deliberately omits it (`scripts/brain/src/ingest.ts:71`) because the record
> must end on the verbatim body or the byte-exact round-trip (SC2, §5) breaks.
>
> **Second correction, same day, narrowing the one above.** The trinn D-review first read this as a
> conflict with `claude-playlist-corpus`, who asked the library to own frame normalization (LF-only, one
> blank line, trailing newline). It is not a conflict, and the check should have come first: our
> newline-free serializer governs `ingest/published/`, which is **excluded from the OKF bundle by design**
> (§5, `scripts/brain/tests/okf-conform.test.ts:22-27`). The files `write_concept` would actually write for
> us — the `brain/` bundle — get their trailing newline from our own serializer
> (`scripts/brain/src/profile.ts:65`). On the concept-writing path we agree with them. What survives is
> narrower: `write_concept` is also being asked to serve as a *general* verbatim writer callable outside a
> bundle (`ms-ai-architect`, `po-claude`), so frame normalization should be a documented parameter rather
> than an unconditional guarantee. The fixture ask applies to that general writer, not to the concept corpus.
>
> Zero-dep/ESM does hold (sole exception: `scripts/analytics` depends on `csv-parse`).