muse-agent-example/meta/schemas/generation_context.yaml
zizi 091b66a9bb 重构: 收敛 Agent/Skill 运行时与创作质量闭环
将角色与 Skill 从 .claude 迁入 .agent,移除 Claude CLI 运行时并接入固定 Opus 角色 profile、完整 schema、预算 deadline、raw 与回执证据链。

同步拆分 Skill 职责、复利 lesson、Gate 回放、Dashboard 人审入口、数据库登记和机械门禁;候选设计正文不包含在本提交中。
2026-08-22 02:12:32 +08:00

75 lines
2.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

target_type: generation_context
中文名: 生成上下文
domain: ai_context
scope: agent
本体分组: 配套
状态: 启用
判据: AI 上下文组装与输出合同的结构模具,运行时对象、用户不可见
实例落点: 以 read-context 的 JSON 上下文与 Markdown manifest 回显落 works/*/评审/,不建知识卡
严格合同:
版本:
WriterContext: writer-context-v1
WriterOutput: writer-output-v1
RetrievalPlan: writer-retrieval-plan-v1
RetrievalManifest: writer-retrieval-manifest-v1
规范化: UTF-8、Unicode NFC、LF 换行、对象键排序、无额外空白
身份规则: runId、generatedAt、timestamp、executionNode 不参与检索与上下文身份
未知字段: 拒绝
WriterContext必填字段:
- schemaVersion
- runId
- attempt
- mode
- purpose
- qualityPolicyVersion
- workId
- targetChapter
- asOf
- contextSnapshot
- sourceVersion
- authorizationSnapshot
- sourceStatus
- retrievalPlan
- retrievalManifest
- fineOutline
- narrativeState
- factEvidence
- proseEvidence
- patternReferences
- evidenceCoverage
- outputContract
- tokenBudget
- omittedSources
- acceptanceEligible
WriterContext可选字段:
evidenceStrategy:
枚举: [production_dual_evidence, historical_prose_only, card_index_only, card_index_plus_prose]
约束: 生产固定 production_dual_evidence;card_index_only 仅诊断可跳过连续前四章基线
indexHints:
每项严格字段: [cardId, name, type, content, sourceId, sourceVersion, asOf]
来源: retrieval_result.indexHints,覆盖同批检索命中的全部冻结卡,不以 sourceRefs 是否存在为准
约束: 仅 mode=diagnostic_only、purpose 为 evaluation/diagnostic、acceptanceEligible=false;生产硬拒绝;asOf 不得越过上下文冻结线
WriterOutput必填字段:
- schemaVersion
- runId
- attempt
- mode
- qualityPolicyVersion
- contextSnapshotId
- contextSnapshotSha256
- candidateVersion
- candidateSha256
- acceptanceEligible
- candidateBody
- claimLedger
- evidenceRequests
- newSettingDeclarations
- selfCheck
双证据:
factEvidence来源: [historical_prose, formal_setting, canonical_state, fine_outline_declared_new]
proseEvidence来源: 历史 Canonical 原文,必须带章号、块、字符区间与内容哈希
indexHints用途: 只用于诊断卡索引替代效应,卡负责定位原文而不替代原文事实,不是事实证据,claimLedger不得引用
接受边界: evaluation、diagnostic、diagnostic_only 一律 acceptanceEligible=false
稳定排序: score DESC, sourceVersion ASC, sourceId ASC, sourceOffset ASC
实现校验器: .agent/skills/assemble-context/scripts/writer_contract.py