4.0 KiB
4.0 KiB
规则 Schema 工作流检查摘要 v0.1
Completed
- 新增 GPT 规划本地化协议。
- 新增模型抽取规则。
- 新增模型卡 Markdown contract。
- 新增模型抽取 workflow。
- 新增机器模型索引
models/model_index.json。 - 新增人读模型卡索引
cards/card_index.md。 - 新增权威机器模型卡 schema
schemas/model_card.schema.json。 - 新增
schemas/model_index.schema.json。 - 新增
schemas/card_index.schema.json。 - 为 source article、source excerpt、regression case schema 补充中文
description。 - 为 regression case schema 增加
case_type枚举:positive、boundary、misuse。 - 升级
scripts/validate_model_library.py,增加本地 contract 子集、index、回归覆盖检查。 - 新增
scripts/check_card_contract.py。 - 新增
scripts/run_selector_demo.py。 - 新增和更新单元测试。
- 更新 README、workflow、schema/scripts/selector/cards/models 目录说明。
Files Changed
Created:
docs/MODEL_CARD_CONTRACT.mddocs/MODEL_EXTRACTION_WORKFLOW.mdschemas/model_card.schema.jsonschemas/model_index.schema.jsonschemas/card_index.schema.jsonmodels/model_index.jsoncards/card_index.mdscripts/check_card_contract.pyscripts/run_selector_demo.pytests/test_card_contract.pyreports/规则Schema工作流检查摘要_v0.1.md
Modified:
README.mddocs/WORKFLOW.mdschemas/README.mdschemas/source_article.schema.jsonschemas/source_excerpt.schema.jsonschemas/regression_case.schema.jsonscripts/README.mdscripts/validate_model_library.pyselector/README.mdmodels/README.mdcards/README.mdtests/test_validate_model_library.pyreports/validation_report.md
Checks Run
python -m unittest discover -s tests -p "test*.py" -v
Result:
- PASS
- 9 tests run.
python scripts\check_card_contract.py
Result:
- FAIL as expected.
- Current
cards/qpi.mdandcards/intellectual_archaeology.mdare stilldraft_pre_contractand do not yet contain all required headings. cards/README.mdis now ignored by the checker.
python scripts\validate_model_library.py
Result:
- FAIL as expected.
- Current
models/qpi.model.jsonandmodels/intellectual_archaeology.model.jsonare stilldraft_pre_contract. - Main failures are missing recommended/required GPT-plan fields, invalid enum values, invalid
selection_priorityrange, and incompletestability_profile.
python scripts\run_selector_demo.py
Result:
- PASS.
- Demo outputs recommended model IDs, scores, reasons, and routing notes.
- Scores are low because current model JSON has not yet been repaired with trigger keywords and 1-10 priority values.
Known Limits
scripts/validate_model_library.pyimplements the local schema subset required by current contracts. It does not implement a complete JSON Schema draft 2020-12 engine.- Current model/card content is intentionally not repaired in this pass.
models/model_index.jsonandcards/card_index.mdmark both sample models asdraft_pre_contract.- Selector demo works, but its output quality depends on model JSON fields that are not yet repaired.
card_index.schema.jsondefines card index metadata, butcards/card_index.mditself is Markdown and is checked by local tooling rather than full JSON Schema.
Owner Review Checklist
- GPT 规划是否已正确本地化?
- card contract 是否覆盖模型卡样例?
- model schema 是否覆盖机器 JSON 样例?
- index 设计是否满足当前和未来扩展?
- 工作流 gate 是否足以防止直接跳内容?
- 工具需求是否足够但不过度?
- 是否接受
tests/regression_cases.json继续作为合并式 regression case 文件? - 是否接受
model_spec.schema.json暂时保留为 pre-contract legacy schema?
Do Not Proceed Before Owner Confirms
Do not repair QPI or Intellectual Archaeology content until this foundation is reviewed or the owner explicitly authorizes content repair.