Content Type
Content Type
Section titled “Content Type”Definition
Section titled “Definition”Closed enumeration of the editorial shape a source_documents row can take: article, blog post, PDF, note, research document, generic document, or other. Re-homed off content_items.content_type onto source_documents.content_type at ID-131 M3 (20260628191700_id131_sd_classification_cols); content_items itself was DROPPED at ID-131 M6 (S450 GO) — the table no longer exists on any env. The source_documents.content_type column is character varying(50), nullable (DROP NOT NULL at 20260628191704_id131_sd_content_type_nullable — content_type is a classification OUTPUT, unknown at ingest, so the column cannot be NOT NULL). Closed for v1 per Q-OQR1-12 ratification — adding new content types is research-deferred to v2 per §6.2 of the WP-ONTO-R1 doc.
BI-3 three-way split (ID-133), now applied to this register: the pre-ID-131 15-value enum split three ways —
- Record classifications stay here as the 7 values below.
q_a_pairmigrated out — DONE. See §Synonyms/Acronyms.- L-concept type discriminators moved to
concept_type(37-concept-type.md, ID-133 BI-6). See §Notes for the mapping.
Synonyms / Acronyms
Section titled “Synonyms / Acronyms”q_a_pair— migration-out DONE.q_a_pairsis a peer Layer-5 class (32-q-a-pair.md) with nocontent_typecolumn; it never re-enteredsource_documents.content_typepost-M3. The historiccontent_items.content_type='q_a_pair'rows died with thecontent_itemstable at M6.policy/compliance/methodology/capability/case_study/certification/product_descriptionare no longercontent_typevalues — they left this register at BI-3 and now live asconcept_typediscriminators (37-concept-type.md). The Ratified-S237policy(prescriptive statement) vscompliance(evidence of adherence) boundary and thecapability-retirement decision are historical content_type context, preserved for provenance in §Notes; both currently collapse toconcept_type=topic/concept_type=productper the mapping below.
Baseline values
Section titled “Baseline values”| key | label | provenance |
|---|---|---|
| article | Article | core |
| blog | Blog | core |
| core | ||
| note | Note | core |
| research | Research | core |
| other | Other | core |
| document | Document | core |
Relationships
Section titled “Relationships”source_documents.content_type— nullablecharacter varying(50)(ID-131 M320260628191700, nullable at20260628191704). No DB CHECK constrains the column directly; the closed 7-value set is HARD-rejected at the pipeline layer — see §Consumers.- The pre-M3
content_items.content_typeCHECK constraintcontent_items_valid_content_type(15 values) is GONE —content_itemswas DROPPED at ID-131 M6. - Neither
q_a_pairsnorfeed_articlescarries acontent_typecolumn (feed_articlesconstrainsextraction_methodvia CHECK instead). - L-concept
type(the six migrated-out discriminators, collapsed to a 5-value set) now lives in37-concept-type.md’sconcept_typeregister — a SIBLING closed vocabulary, not a subset of this one. See §Notes. - Layer 2 (descriptive metadata): content_type is the primary “what is this?” descriptor on every
source_documentsrow. - Layer 5: consumed by classifiers (
lib/quality/,scripts/cocoindex_pipeline/extraction.py) at extraction time.
Consumers
Section titled “Consumers”lib/validation/schemas.ts—VALID_CONTENT_TYPEScanonical Zod constant tuple (export const VALID_CONTENT_TYPES = CONTENT_TYPE_VALUES;);ItemCreateBodySchema.content_type = z.enum(VALID_CONTENT_TYPES).lib/validation/ingest-schemas.ts—IngestUrlBodySchema.content_type.lib/taxonomy/taxonomy.ts— re-export shim (CONTENT_TYPES = VALID_CONTENT_TYPES).lib/ontology/content-type-registry.ts→lib/ontology/content-type-values.generated.ts— build-time-generatedCONTENT_TYPE_VALUEStuple (public-repo mirror of this register’sbaseline_values, per the ID-133 BI-7 Decision-A authority chain — seeREADME.md).scripts/cocoindex_pipeline/extraction.py:470-481—_validate_content_typefield validator; the HARD-reject gate (see §Definition). Reads_VALID_CONTENT_TYPESoffscripts/tests/fixtures/taxonomy_snapshot.json:content_types[].scripts/kb_pipeline/classifier.py— ML classification target (one of the 7 values, post-BI-3 trim).app/item/[id]/new/page.tsx,components/create-content/upload-tab-content.tsx— content_type form select.lib/mcp/tools/content.ts,lib/mcp/tools/search.ts— MCP search/filter input.- Markdown parity test (
__tests__/lib/ontology/markdown-parity.test.ts) — asserts the frozencontent_typebaseline validates againstOntologyCVSchemaand (where thetaxonomy_snapshot.jsonfixture is present) matches the live DB CHECK. The fixture itself still carries the pre-BI-3 15-value set — the trim to 7 is subtask {133.13}‘s FREEZE, gated onbun run sync:taxonomy; this register authors the decision in parallel (ID-133 BI-3 note above).
-
BI-3 split is JOINT-RATIFY (owner escalation, non-blocking for authoring). The resulting
source_documents.content_typevalue set MUST equal ID-131 M3’scontent_typecolumn semantics, and the L-concepttypeset MUST equal ID-132’s concepttypediscriminators — this is a joint ratification across ID-131 §3 / ID-133 BI-3 / ID-132, flagged for the owner before thetaxonomy_snapshot.jsonfixture +content-type-values.generated.tsare frozen at {133.13}. Drive from the id-71 strawman + the client’s hand-built topic index. -
RECOMMENDED content_type → concept_type mapping (from the {133.1}/{133.4} journal; mirrored at
37-concept-type.md, the mapping’s canonical home):raw content_type (pre-BI-3) maps to concept_typecase_studycase_studycertificationcertificationpolicytopiccompliancetopicmethodologytopiccapability(already ratified-S237 to retire)productproduct_descriptionproductID-132 BI-4 concept set =
{topic, product, company, certification, case_study}(companyhas no rawcontent_typepredecessor — sourced from the client’s company-overview corpus). -
policyvscompliance— Ratified-S237 author-vs-evidence rule (historical; now informs the mapping above). Liam ratified S237:policy= the organisation’s prescriptive statement (“we do X”);compliance= evidence of adherence to an external regime (“audit of X”). Industry-aligned with ISO management-system framing. Both collapse toconcept_type=topicpost-BI-3, so the distinction is preserved as provenance context, not an open content_type decision. -
methodologyvscapability— Ratified-S237 retirecapability(historical). Liam ratified S237:capabilityretires (0 prod rows);methodologyabsorbs the remaining concept space. Both now migrate toconcept_type(methodology→topic,capability→product) rather than remainingcontent_typevalues. -
INV-2 source. No authoritative spec defined the pre-S237 boundaries; see
docs/specs/wp6-ontology-harness/investigations/INV-2-content-type-semantics.mdfor the archaeology. Superseded by the BI-3 migration above — the values these investigations concerned are no longercontent_typemembers. -
Prod-data evidence (verified 14/05/2026, pre-ID-131; historic
content_itemscounts — table now dropped):policy19 rows,compliance17 rows,methodology7 rows,capability0 rows,q_a_pair395 of 629 rows (~63%, dominant pre-migration content_type). Not re-verified againstsource_documentspost-M3 — the classification/reclassification run over the migrated corpus is separate work. -
Closed enum for v1; client-extensible content types are research-deferred to v2 per §6.2.
-
The full pre-BI-3 list mirrored
phase-b-prerequisite-1-onthology-pipeline.md§2.1 row 4 verbatim; that document is now stale against this trimmed register (BI-9 prose-sweep scope, not this subtask).