feat(linkedin-studio): per-edition lived-specifics binding + kilder artifact (fix #2 slice 2)

Slice 2 of fix #2 (kilde-så-draft): the per-edition bridge between the global
specifics-bank (slice 1) and a draft. In scripts/specifics-bank:

- binding.ts — livedSpecifics slot-map model + validateBinding, the «vaghet
  avvises» gate (G4). BLOCK on unresolved / dangling specific-id / unjustified
  abstrakt; WARN on an unverified-number-backed slot (regel 6/7); PASS otherwise.
- kilder.ts — renderKilder, the read-only NN-kilder.md sources ledger, rendered
  deterministically from the slot-map + bank (coverage via validateBinding, so
  the artifact and the skeleton-gate cannot disagree).
- cli.ts — validate-binding (exit 1 = BLOCK) + render-kilder subcommands.

edition-state schema gains articles.NN.livedSpecifics ({ slots, status }) + _doc.
Design record + the Step 2 research re-scope spec: docs/fix2/slice2-binding.md.

Wiring into newsletter.md (Step 1.5 elicitation + Step 2.5 gate + pipeline 17->18)
is slice 3 — not in this commit.

Tests 28/28 (specifics-bank; +9 binding +4 kilder), tsc clean, plugin gate 83/0/0
unaffected, gitleaks clean on all 8 files.

[skip-docs] internal plumbing — no command/agent/pipeline surface change until
slice 3 wires it; documenting it in the user-facing root CLAUDE.md/README now would
overclaim unreachable functionality. Docs ARE updated where they belong: the design
record docs/fix2/slice2-binding.md, scripts/specifics-bank/README.md, and the
edition-state _doc. Root-doc update lands with the slice-3 wiring feat.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-06-20 21:33:44 +02:00
commit 33f18c35e6
8 changed files with 744 additions and 1 deletions

View file

@ -57,6 +57,28 @@ guilty-until-checked — regel 6/7) and `--source` to `manual`.
recency (`capturedAt` desc); archived material is kept but never offered.
- **Content is stored verbatim**; only the id is normalized.
## Per-edition binding (slice 2)
The bank is the *global* inventory; an edition *binds* its load-bearing claims to
real material before any prose exists. That bridge lives here too:
- `binding.ts` — the per-edition slot-map model + `validateBinding`, the
«vaghet avvises» gate (a slot must be `specific` / `abstrakt` / `ekstern`; an
`unresolved` slot, a dangling specific id, or an unjustified `abstrakt` → BLOCK;
an unverified-number-backed slot → WARN per regel 6/7).
- `kilder.ts``renderKilder`, the read-only `NN-kilder.md` sources artifact,
rendered deterministically from the slot-map + the bank.
```bash
# Gate one edition's binding (exit 1 = BLOCK)
node --import tsx src/cli.ts validate-binding --edition "<abs>/linkedin/edition-state.json"
# Render the sources ledger
node --import tsx src/cli.ts render-kilder --edition "<abs>/linkedin/edition-state.json" --out "<abs>/linkedin/NN-kilder.md"
```
Design record + the Step 2 research re-scope spec: `docs/fix2/slice2-binding.md`.
The elicitation interview that POPULATES the slot-map (Step 1.5) is slice 3.
## Test
```bash