Shard schema
Topic shard
A curated topic landing produced by the auto-topic pipeline. Carries the display name, neutral description, date boundary, headline counts per record type, per-actor record counts (the mostActiveActors array), most-recent records, yearly timeline, and provenance for the topic itself (embedding model, labeling model, review timestamps).
This page is the field reference for developers and AI clients. If you came here looking for a topic, browse the topic index instead.
Required fields
6
Optional fields
3
Dialect
JSON Schema draft 2020-12
Version
Required fields
Every shard validating against topic@0.3.0 ships these fields. Provenance lines show where each value comes from — the load-bearing column for the structured-evidence promise.
-
slugstring<slug>URL-safe topic identifier.
Provenance: Derived from displayName by the auto-topic pipeline; stable once published.
-
displayNamestringHuman-readable topic name.
Provenance: Generated by topic-labeling LLM (decision #18); reviewed and merged by operator via GitHub PR.
-
neutralDescriptionstringNeutral, ≤500-char summary of what the topic covers.
Provenance: Generated by topic-labeling LLM under NEUTRALITY_POLICY.md constraints; reviewed and merged by operator.
-
dateBoundarystringInclusive date floor for records assigned to this topic.
Provenance: Configured per topic by operator at publish; usually the start of the current Parliament.
-
headlineCountsarray<object>Counts per record-type for the at-a-glance band.
Provenance: Aggregated over records assigned to this topic, grouped by record type.
Nested fields (2)
-
recordTypeenum (7 values)Record-type bucket the count applies to.
written_questionwritten_statementoral_contributionoral_evidencedivision_votebillcommittee_report
Provenance: Determined at intake from the source endpoint that supplied the record.
-
countintegerNumber of records of that type assigned to this topic.
Provenance: Count over the topic-assignment table at shard-build time.
-
-
provenanceobjectTopic-level provenance — pipeline run that created this topic.
Provenance: Emitted by auto-topic pipeline at GitHub PR creation time.
Nested fields (5)
-
embeddingModelstringEmbedding model + version used to cluster records.
Provenance: Pipeline config; pinned per run.
-
clusterIdintegerStable HDBSCAN cluster identifier.
Provenance: Centroid-matched against the previous run.
-
labelingModelstringLLM that produced displayName + neutralDescription.
Provenance: Pipeline config; per-run pinned.
-
detectedAtstring<ISO 8601>Timestamp the topic candidate was emitted.
Provenance: Pipeline run timestamp.
-
approvedAtstring<ISO 8601>Timestamp the operator merged the candidate PR.
Provenance: GitHub merge event.
-
Optional fields
Present where the source carries the value or the derivation succeeds. Code consuming this schema should treat them as nullable.
-
mostActiveActorsarray<object> · optionalUp to 25 actors with the most records on this topic.
Provenance: Ranked by record count per entity over the records assigned to this topic.
-
mostRecentRecordsarray<object> · optionalUp to 50 most-recent records assigned to this topic.
Provenance: Records assigned to this topic, ordered by published date, limit 50.
-
timelineYearlyarray<object> · optionalCount of records per calendar year.
Provenance: Aggregated by year over the published-at field of records assigned to this topic.
Related schemas
Entities referenced by this shard kind. A topic shard's entities[] / nested references resolve to shards of these kinds.
Versioning + dialect
Each planned schema follows semver. Patch bumps are additive and backwards-compatible. Minor bumps may add required fields or change validation rules. Major bumps will use a new URL path once canonical files are published.
Published structured data will declare its version in a $schema field. AI clients should respect that version when files become available.