Persist approved playlist decisions in GitHub by maintaining the canonical ledger, discoveries log, rejected list, revisit queue, listener-feedback discussions, structural notes, and journey-map annotations. Use only after audit approval.
Instal·la
npx skillscat add broskmenmi/editorial-engine/librarian Instal·la des del registre de SkillsCat.
Librarian
Read first
Read feedback-protocol.md, under-review.md, journey-annotations.json, and journey-map-spec.md before writing anything related to a user complaint or visualization state.
Complaint persistence gate
A complaint is not authorization to edit the playlist.
When the user comments negatively but does not explicitly order an exact action:
- preserve the exact wording in
under-review.md; - set status to
AWAITING CLARIFICATION; - record the current ledger state and affected region;
- update
journey-annotations.jsononly to mark the existing region frozen when needed; - do not edit
ledger.md; - do not publish Spotify;
- do not add the track to
rejected.md; - do not resolve the review;
- do not add, remove, move, or replace any neighbour;
- do not turn a proposed alternative placement into an active REVISIT candidate before the diagnosis is agreed.
Repeated skipping, stress, dislike, and relief are strong evidence but do not bypass this gate unless the user explicitly orders removal or another exact change.
Only these states authorize a ledger change:
APPROVED — KEEPAPPROVED — MOVEAPPROVED — REPLACEAPPROVED — REMOVE
An exact first-message action command constitutes approval for exactly its named scope and must be recorded as the matching APPROVED — ... state before the ledger write. It does not authorize an unspecified replacement, changed neighbour, bridge, or wider reorder.
If a repair changes more than the complained-about track, persist it only after the user explicitly approved the named multi-track scope.
Audio-evidence persistence
audio-evidence.json is an evidence registry, not an editorial verdict store.
- Persist only newly supplied lawful measurements or explicit tool exports.
- Preserve provenance, tool and version, timestamp, confidence, evidence class, and exact Spotify URI.
- Keep measured values separate from model-derived scores.
- Never infer or backfill unknown values.
- Do not update the registry merely because a scheduled run occurred.
- Tool evidence may support a decision but cannot encode ADD, REJECT, listener report, or approval state.
live-mixing.md governs a separate performance graph. Persisting a live edge must not change ledger.md, Spotify order, journey annotations, protected state, or frozen review state.
Responsibilities after approval
- Use the frozen candidate snapshot approved by the Auditor; do not rerun Scout.
- Update
ledger.mdwith approved ADD, REMOVE, REPLACE, and REORDER decisions. - Require exact Spotify URI and verified BPM when available.
- Keep ledger row order equal to publication order and renumber consecutively.
- Recalculate the complete BPM trajectory.
- Append the run or feedback resolution to
discoveries.md. - Add durable REJECT decisions to
rejected.mdonly after approval. - Add or update external REVISIT candidates when appropriate.
- Maintain feedback discussions and resolutions in
under-review.md. - Update
notes.mdwith current structure, frozen regions, and approved changes. - Update
journey-annotations.jsonin the same approved change set whenever any track, chapter, story band, protected state, provisional state, or frozen region changes. - Preserve history; do not silently rewrite prior decisions.
- Prevent duplicate URIs.
The Librarian is conditional. If the audited result changes no durable editorial state, perform no write and create no commit.
Durable editorial state includes the ledger, rejected or revisit decisions, listener-review state, substantive structural notes, journey annotations, lawful audio evidence, or the live-mixing graph. A scan timestamp, exploration receipt, unchanged Spotify/map status, or repeated no-change result alone is not durable editorial state.
Journey-map annotation duties
journey-annotations.json is editorial input. journey-map.json and journey-map.svg are generated outputs and must not be hand-edited.
For every canonical ledger track, maintain exactly one annotation keyed by Spotify URI with:
chapter;storyBand;status— accepted, provisional, protected, or frozen;- plain labels describing its role.
Rules:
- Every ledger URI must have an annotation.
- Remove an annotation when its track leaves the ledger, unless it remains as an external discussion candidate under
discussions. - Story height is ordinal editorial interpretation, not measured audio energy.
- BPM and duration remain separate measured data.
- Mark the protected opener, protected handoffs, protected ending, and frozen discussion regions accurately.
- Add newly approved tracks with provisional status unless positive listener evidence or an explicit rule supports protected status.
- When a listener discussion opens, freeze the exact current region without changing its ledger membership.
- When a discussion resolves, update or remove its map overlay in the same approved change set.
Atomic editorial commit
- Do not write partial approved changes.
- Prepare complete contents first.
- Use one logical editorial commit when possible.
- Include
journey-annotations.jsonin that logical change set whenever map state changes. - Do not rerun earlier phases between file writes.
- Do not modify scout request or snapshot after audit.
- Publication-status and generated-map bot commits are separate.
Opening an AWAITING CLARIFICATION discussion may be persisted without changing the ledger. This is the only pre-approval editorial write allowed for a complaint.
Relaxation-first persistence
- Never record mandatory A/B tests, rankings, or prescribed listening sessions.
- Clarifying questions belong in the conversation, not as user homework.
MANUAL ACTIONis technical only.- Park alternatives when no approved action exists.
Evidence persistence
Distinguish:
- Measured evidence — BPM, duration, identity, order, lawful audio measurements.
- Craft convention — sequencing guidance.
- Listener report — preserve wording closely.
- Editorial interpretation — proposed role, chapter, story band, and hypothesis.
Do not store speculative sonic claims as facts.
Feedback record fields
For each discussion, store:
- subject track or transition;
- current ledger and Spotify state;
- exact user wording;
- original editorial role;
- affected region;
- clarification questions asked;
- shared diagnosis when reached;
- possible KEEP, MOVE, REPLACE, REMOVE options;
- every track affected by a proposed wider repair;
- approval state;
- final resolution and date.
Required ledger columns
#ArtistTrackSpotify URIBPMDecisionStructural roleAdded
Required run record
For a scouted run with one to three evaluated candidates:
- Date and candidate snapshot
runId - Candidates, exact URIs, BPM, verdicts
- Evidence map
- Approved scope
- Placement and purpose
- Removal, replacement, or reorder rationale
- BPM trajectory
- Review state and resolution
- Journey-map annotation change
- Audit outcome
- Canonical order
- Editorial note
For EXPLORATION COMPLETE — NO QUALIFIED CANDIDATES, do not append an idle entry to discoveries.md and do not commit merely to preserve scan telemetry. The Auditor's in-run receipt supports the user-facing report. A later aggregation mechanism may retain operational telemetry outside canonical editorial history.
For EXPLORATION NOT COMPLETED, do not write editorial state. Report the technical blocker accurately.
For REPAIR SEARCH COMPLETE — NO QUALIFIED CANDIDATES or REPAIR SEARCH NOT COMPLETED, likewise perform no write unless another independently audited durable state change exists.
GitHub is the persistent source of truth. The Librarian never publishes through a generative playlist tool, never invokes Scout after decisions are persisted, and never hand-edits generated map outputs.