Publication Status
Publication Status
Section titled “Publication Status”Definition
Section titled “Definition”Closed enumeration of the publication lifecycle state for a source document or Q&A pair. Standard editorial workflow: draft → in_review → published → archived. Source of truth for the publication state machine: docs/specs/publication-lifecycle-state-machine-spec.md per source §6.2.
Synonyms / Acronyms
Section titled “Synonyms / Acronyms”None.
Baseline values
Section titled “Baseline values”| key | label | provenance |
|---|---|---|
| draft | Draft | core |
| in_review | In Review | core |
| published | Published | core |
| archived | Archived | core |
Relationships
Section titled “Relationships”source_documents.publication_status—textDEFAULT'published'NOT NULL. Added INLINE at ID-131 M3 (20260628191700_id131_sd_classification_cols); the migration’s own column comment records it as “inline-hot read-path lifecycle field (q_a_searchfilterspublication_statuson every query)”. Re-homed offcontent_items.publication_status, which carried CHECKcontent_items_publication_status_check;content_itemsitself was DROPPED at ID-131 M6.source_documents.publication_statuscarries no DB CHECK — the 4-value enum is soft here.q_a_pairs.publication_status—textNOT NULL DEFAULT'draft', CHECKq_a_pairs_publication_status_checkover the same 4 values (32-q-a-pair.md§2.1). This column is NATIVE toq_a_pairs(baseline T6 schema, not an ID-131 re-home) — this CV was already the correct register for it.- Bound to
change_type(CV 11) valuepublication_state— pre-M6, transitions were recorded incontent_history;content_historywas DROPPED alongsidecontent_itemsat ID-131 M6. The transition-audit home forsource_documents/q_a_pairspublication_status changes post-M6 is not resolved by this CV (q_a_pair_history—32-q-a-pair.md§1 — capturesq_a_pairsversion snapshots generally, not a publication_status-specific audit trail). source_documents.archived_at(baseline column, pre-M3) is the closest adjacent lifecycle-anchor timestamp;source_documentshas nopublished_atcolumn.- Layer 2 (administrative metadata): publication state is a top-level lifecycle signal on both
source_documentsandq_a_pairsrows.
Consumers
Section titled “Consumers”lib/governance/publication-transitions.ts—VALID_PUBLICATION_STATUSEScanonical Zod constant tuple (separate fromlib/validation/schemas.tsper spec note there).lib/ingest/draft-final-to-publication-status.ts— draft → published transition logic.lib/mcp/tools/content.ts,lib/mcp/tools/search.ts— MCP publication-state filter (defaultpublished).app/api/items/*— publication state machine entry points (pre-M6content_items-shaped; not re-verified againstsource_documentsby this subtask).app/library/library-content.tsx,app/item/[id]/item-detail-client.tsx— editorial UI surfaces.- See
docs/specs/publication-lifecycle-state-machine-spec.mdfor transition rules.
- Closed enum, but only HARD-enforced on
q_a_pairs(DB CHECK);source_documents.publication_statusis currently soft (no CHECK) — a candidate ID-131-successor hardening item, not raised as a blocking flag here. - See
docs/specs/publication-lifecycle-state-machine-spec.mdfor transition rules.