4.4 KiB
Data Contract
1. Machine-Readable Format
Use JSON for machine-readable data.
Model JSON files own the model asset state, including status, regression_status, and stability_profile.stability_level.
Main JSON objects:
- Model spec
- Source article
- Source excerpt
- Regression case
- Selector example
- Model index
2. Human-Readable Format
Use Markdown for:
- Model cards
- Project documentation
- Extraction notes
- Validation reports
- Handoff reports
3. Model Spec Contract
Every model JSON should include:
model_idmodel_namemodel_typepipeline_positionone_sentence_definitioncore_questioncore_mechanismstatussource_articlessource_evidenceinput_typesoutput_typescall_whendo_not_call_whencommon_misusesfailure_modesselection_priorityconfidence_levelstability_profileregression_statusoutput_contractstructured_output_contractproductization_notes
structured_output_contract is model-specific. It must not turn QPI-only or Intellectual-Archaeology-only runtime fields into global top-level required fields for every model.
Model-specific required runtime output fields are checked by scripts/validate_model_library.py.
4. Source Article Contract
Every source article should include:
source_idtitlesource_typerelated_modelssource_status
Optional:
authordatefile_pathnotes
5. Source Excerpt Contract
Every source excerpt should include:
excerpt_idsource_idrelated_model_idexcerpt_typesummaryused_for
Optional:
raw_excerptconfidencenotes
6. Regression Case Contract
Every regression case should include:
case_idmodel_idcase_typeinputexpected_behaviorfailure_signal
Optional:
expected_output_elementsshould_call_modelexpected_primary_modelnegative_expected_modelsexpected_classificationexpected_dominant_scarcityexpected_max_depthminimum_required_elementsforbidden_elementsevaluation_modenotes
7. Reference Integrity
The following references must be valid:
model.source_articles->sources/source_articles.jsonmodel.source_evidence->sources/source_excerpts.jsonregression_case.model_id->models/*.model.jsonsource_excerpt.source_id->sources/source_articles.jsonsource_excerpt.related_model_id->models/*.model.json
8. Index Integrity
models/model_index.json is generated or checked from model JSON, card files, source references, and regression cases.
cards/card_index.md is the human-readable projection of models/model_index.json.
Indexes must not drift from model state, source/evidence counts, regression case counts, or card file existence.
9. Content Stabilization Integrity
Engineering validation does not imply content stability.
Before content stabilization review, every core model should have at least 15 regression cases and field-level evidence coverage.
Source excerpts must distinguish exact quotes from condensed or paraphrased excerpts with quote_status.
10. Local CCRA Review Run Contract
Local CCRA review runs are process records, not model assets.
They live under:
local_ccra_reviews/<public-round>/<local-pass>/
Each local pass should contain:
run-notes.mdreview-metadata.jsongate-manifest.yamllifecycle-guard-config.yamlagent-invocation-packet.mdprompt-to-send.mdturn-prompts/review-context.mdreview-file-manifest.jsonhelper-outputs/04_LOCAL_CCRA_REVIEW_REPORT.mdnext-review-requirements.mdreturned-output.mdowner-decision.md
review-metadata.json, review-file-manifest.json, and helper JSON outputs are machine-readable process records.
Markdown files in the run directory are human-readable process records.
04_LOCAL_CCRA_REVIEW_REPORT.md is the review_turn judgment output.
next-review-requirements.md is the same-child planning_turn output and should not be treated as Owner approval or proof that a patch worked.
Local CCRA review records must not become source of truth for model status, selector behavior, regression cases, or source evidence. Accepted actions must be applied back to the canonical project files and validated there.
Formal Web CCRA upload bundles exclude the Local CCRA report by default unless the owner explicitly asks to include it.