feat(linkedin-studio): wire lived-specifics extraction into newsletter pipeline (fix #2 slice 3)
Wire the kilde-så-draft binding (slices 1–2) into the live /linkedin:newsletter pipeline so a draft is grounded in the operator's real material BEFORE any prose. - New Step 1.5 "Lived-specifics extraction" BETWEEN brief (1) and research (2): query the bank → 3–5 sharp elicitation questions (vagueness refused, never fabricated — invariant 3) → `add` to the specifics-bank → populate the articles.NN.livedSpecifics slot-map → render the NN-kilder.md ledger. First phase to write machine state (persists brief + personas + binding). - Deterministic binding-gate (`validate-binding`, exit 1 = BLOCK) wired as a new step 5 of the Step 2.5 skeleton-gate (renumbered 5→9): no prose is written on an unresolved load-bearing claim; livedSpecifics → "bound" on pass. - Step 2 re-scoped BY the binding: research fills the ekstern/unresolved slots + verifies the operator's own numbers (regel 6/7) → flips bank unverified→verified → re-renders NN-kilder.md, instead of re-sourcing what is already grounded. - Pipeline 17 → 18 phases: new `lived-specifics` phase id in edition-state _doc.phases; resumption table + pipeline overview + CLAUDE.md + README updated. - Lint: new Section 15 "Specifics-Bank Binding" wires the specifics-bank suite into CI (suite green + case-count floor 28, KTG-only/adopter-skip); the assertion-count anti-erosion floor moves to Section 16. Verification: structure gate 84/0/0 (was 83), specifics-bank 28/28, contract-gate ratify 1:1, edition-state template valid JSON (18 phases), gitleaks clean on all 5 files. Design record: docs/fix2/slice2-binding.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
33f18c35e6
commit
527391ab47
5 changed files with 255 additions and 44 deletions
|
|
@ -22,8 +22,11 @@
|
|||
# user data) in Section 13, each with a non-vacuity self-test; the contract-gate
|
||||
# binding guard (Slice 3: the §B/§C1 gate's own suite stays green and rules.ts
|
||||
# ratifies 1:1 against the maskinrommet §E-manifest — KTG-only, skipped for an adopter
|
||||
# shipping no deps/contract) in Section 14; the assertion-count anti-erosion floor
|
||||
# (SC6) in Section 15. All are live below (Sections 8–15).
|
||||
# shipping no deps/contract) in Section 14; the specifics-bank binding guard (Fix #2
|
||||
# slice 3: the lived-specifics store/binding suite stays green and its case count
|
||||
# never erodes — KTG-only, skipped for an adopter shipping no deps) in Section 15;
|
||||
# the assertion-count anti-erosion floor (SC6) in Section 16. All are live below
|
||||
# (Sections 8–16).
|
||||
#
|
||||
# Usage: bash scripts/test-runner.sh
|
||||
# bash 3.2-safe: plain arrays only, no `declare -A`, no `mapfile`/`readarray`.
|
||||
|
|
@ -618,7 +621,35 @@ fi
|
|||
|
||||
echo ""
|
||||
|
||||
# --- Section 15: Assertion-Count Anti-Erosion (SC6) ---
|
||||
# --- Section 15: Specifics-Bank Binding (Fix #2 slice 3) ---
|
||||
echo "--- Specifics-Bank Binding ---"
|
||||
|
||||
# The lived-specifics store + per-edition binding (scripts/specifics-bank) is wired
|
||||
# into /linkedin:newsletter as Step 1.5 (elicitation + slot-map) and its
|
||||
# validate-binding gate into the Step 2.5 skeleton-gate. The seam is now load-bearing,
|
||||
# so its suite belongs in CI: the bank/binding/kilder tests stay green and the case
|
||||
# count never erodes. KTG-internal: skipped (warn, never fail) for an adopter that
|
||||
# ships no specifics-bank deps — so the lint stays green everywhere. Same set +e /
|
||||
# subshell discipline as Section 14 (bash 3.2-safe; keeps a red npm test from
|
||||
# aborting the runner under set -e).
|
||||
SB_DIR="scripts/specifics-bank"
|
||||
if [ -x "$SB_DIR/node_modules/.bin/tsx" ]; then
|
||||
SB_OUT=$( set +e; (cd "$SB_DIR" && npm test) 2>&1; echo "SB_EXIT:$?" )
|
||||
SB_EXIT=$(echo "$SB_OUT" | grep -oE 'SB_EXIT:[0-9]+' | grep -oE '[0-9]+' | head -1)
|
||||
SB_TESTS=$(echo "$SB_OUT" | grep -oE 'tests [0-9]+' | grep -oE '[0-9]+' | tail -1)
|
||||
SPECIFICS_BANK_TESTS_FLOOR=28
|
||||
if [ "$SB_EXIT" = "0" ] && [ -n "$SB_TESTS" ] && [ "$SB_TESTS" -ge "$SPECIFICS_BANK_TESTS_FLOOR" ]; then
|
||||
pass "specifics-bank suite green: $SB_TESTS tests pass (floor $SPECIFICS_BANK_TESTS_FLOOR)"
|
||||
else
|
||||
fail "specifics-bank suite NOT green (exit=${SB_EXIT:-?}, tests=${SB_TESTS:-?}, floor $SPECIFICS_BANK_TESTS_FLOOR) — run: (cd $SB_DIR && npm test)"
|
||||
fi
|
||||
else
|
||||
warn "specifics-bank skipped — deps absent ($SB_DIR/node_modules); run: (cd $SB_DIR && npm install)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
# --- Section 16: Assertion-Count Anti-Erosion (SC6) ---
|
||||
# The lint self-modifies its own checks, so a green run could mask a silently dropped
|
||||
# assertion. Pin the pre-M0 total (74 pass()+fail() invocations) as a floor; the count
|
||||
# may only grow (brief-reviewer assumption 3). Runs last so TOTAL_CHECKS sees every prior check.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue