feat(linkedin-studio): N13 — publiserings-slots + vacancy-varsel + WIP-roll-up + slot-default [skip-docs]
A1-10 + D-5. The queue answers "what is scheduled"; nothing answered "is the week covered, and what is still being written". N13 makes both readable at session start. - Publishing slots are operator config: profile/publishing-slots.json in the per-user data dir, schema + OPT-IN template in config/publishing-slots.template.json. The plugin ships no publishing times and writes the grid for nobody; absent config means every slot surface stays silent (same never-nag discipline as the trend/brain nudges). Data dir rather than the state file, which is machine-written and whose frontmatter reader does not parse lists. - hooks/scripts/slots.mjs (new): one implementation behind four surfaces. Zero-dep (a SessionStart hook must not spawn tsx), pure core (dates in as strings, no clock), imported by the commands exactly as queue-manager.mjs already is — so session-start's vacancy warning and Step 10's slot default cannot drift apart. - Coverage counts the short-form queue (scheduled/published; cancelled frees the slot) AND editions-register rows claiming that date, counted per date, so long-form and short-form cannot be double-booked and a two-slot day needs two posts. - Session start gains "## Editions in Flight" (series, phase, next action, claimed slot, days in flight) and "## Publishing Slots" (next open slot, open count in 14 days, and how to fill it when the gap is <=3 days). The existing discovery nudge is untouched. - /linkedin router + /linkedin:calendar surface the same roll-up; calendar documents the opt-in copy. /linkedin:newsletter Step 10 defaults to the next open slot (one confirmation, not an interview) and writes --slot onto the register row. - D-5: references/scheduling-strategy.md marked "confidence: low / directional" per the algorithm reference's own standard, deferring to the operator's grid and their own analytics. Neutral example time replaces the operator-specific one in the N12 docs. TDD: red proven first (module absent; 5 session-start behaviours failing). hooks 140 -> 174 · test-runner 184 -> 197 (Section 16t: 13 unconditional greps incl. a de-niche check that no publishing time is hardcoded in the slot path and no operator grid is committed, + non-vacuity self-test; anti-erosion floor 166 -> 179). Suites green: trends 300/0 · brain 134/0 · editions 72/0 · specifics-bank 45/0 · tests 35/0 · render 60/0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QxvWAjte7vPcF79QeSRvRJ
This commit is contained in:
parent
657539ef09
commit
677eab9294
14 changed files with 1069 additions and 19 deletions
|
|
@ -89,7 +89,7 @@ and mirrors the edition's row into the register.
|
|||
# at EVERY phase transition (after currentPhase has been written)
|
||||
node --import tsx src/cli.ts register-upsert \
|
||||
--edition-state "<serie>/linkedin/edition-state.json" \
|
||||
--next "Step 3a — spine prose" [--slot "2026-07-28 07:45"] [--path <series-root>]
|
||||
--next "Step 3a — spine prose" [--slot "2026-07-28 08:30"] [--path <series-root>]
|
||||
|
||||
# the week's work-in-progress, without opening a single series folder
|
||||
node --import tsx src/cli.ts register-list [--all] [--json]
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ describe("register — upsert", () => {
|
|||
test("omitted nextAction/slot/title are PRESERVED, not blanked", () => {
|
||||
const withSlot = upsertEdition(
|
||||
seed(),
|
||||
{ series: "seres", editionId: "05", path: "/p", currentPhase: "draft", slot: "2026-07-28 07:45" },
|
||||
{ series: "seres", editionId: "05", path: "/p", currentPhase: "draft", slot: "2026-07-28 08:30" },
|
||||
T1,
|
||||
).register;
|
||||
const { row } = upsertEdition(
|
||||
|
|
@ -123,7 +123,7 @@ describe("register — upsert", () => {
|
|||
{ series: "seres", editionId: "05", path: "/p", currentPhase: "consistency-quality" },
|
||||
T2,
|
||||
);
|
||||
assert.equal(row.slot, "2026-07-28 07:45");
|
||||
assert.equal(row.slot, "2026-07-28 08:30");
|
||||
assert.equal(row.nextAction, "Step 2.5 — skeleton");
|
||||
assert.equal(row.title, "Da pipelinen brøt sammen");
|
||||
});
|
||||
|
|
@ -137,12 +137,12 @@ describe("register — upsert", () => {
|
|||
path: "/p",
|
||||
currentPhase: "draft",
|
||||
nextAction: "Step 4 — consistency",
|
||||
slot: "2026-07-28 07:45",
|
||||
slot: "2026-07-28 08:30",
|
||||
},
|
||||
T1,
|
||||
);
|
||||
assert.equal(row.nextAction, "Step 4 — consistency");
|
||||
assert.equal(row.slot, "2026-07-28 07:45");
|
||||
assert.equal(row.slot, "2026-07-28 08:30");
|
||||
});
|
||||
|
||||
test("two editions of the same series are two rows", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue