Files

96 lines
4.5 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "report.schema.json",
"title": "Org OS report — common report-header contract",
"description": "모든 산출물이 공유하는 최소 구조. report-type가 있으면 <type>.schema.json 델타가 required/properties에 병합된다. 없거나 미지 유형이면 이 공통 스키마만 적용(sane default). additionalProperties는 허용(findings/storyline 등 자유 본문 필드).",
"type": "object",
"required": ["report-header", "report-type", "report-id", "workflow-id", "role-id"],
"properties": {
"report-type": {
"description": "판별자(필수, P0-5). 신규 산출물은 workflow-artifact envelope를 사용한다. legacy 유형은 읽기 호환만 유지한다.",
"type": "string"
},
"report-id": {
"description": "보고서 자기식별자(필수, P0-3). new_report.py가 파일명 기반으로 발급. 소유·freshness 바인딩에 쓰인다.",
"type": ["string", "number"]
},
"workflow-id": {
"description": "이 보고서가 속한 워크플로 id(필수, P0-3). SubagentStop이 등록 레코드와 대조해 peer/stale 보고서 재사용을 차단한다.",
"type": ["string", "number"]
},
"role-id": {
"description": "이 보고서를 낸 역할 id(필수, P0-3). 등록 role과 일치해야 소유로 인정.",
"type": ["string", "number"]
},
"created-at": {
"description": "보고서 생성 시각(UTC). SubagentStop freshness 검사(등록 started_at 이후 생성)에 쓰인다.",
"type": ["string", "number"]
},
"attempt-id": {
"description": "P1-G(#14): 이 (workflow, role) 쌍에서 몇 번째 시도인가(1부터). 리포트는 불변 스냅샷이라 상태를 바꾸는 대신 새 시도를 새 스냅샷으로 남긴다. 선택 필드(옛 최소 리포트는 없어도 유효).",
"type": ["integer", "string"]
},
"supersedes-report-id": {
"description": "P1-G(#14): 이 스냅샷이 대체(supersede)하는 이전 report-id(계보 연결). 상태 변화 자체는 acceptance-events.jsonl(append-only)에 이벤트로 기록된다. 선택 필드.",
"type": ["string", "null"]
},
"projection-version": {
"description": "Bounded synthesis/read projection contract. New reports use version 1.",
"type": "integer",
"enum": [1]
},
"decision-summary": {
"type": "object",
"required": ["bottom-line", "recommendation", "decision-needed", "confidence"],
"properties": {
"bottom-line": {"type": "string"},
"recommendation": {"type": "string"},
"decision-needed": {"type": "boolean"},
"confidence": {"type": "string", "enum": ["High", "Med", "Low"]}
}
},
"evidence-index": {"type": "array"},
"dissent": {"type": "array"},
"open-risks": {"type": "array"},
"artifact-refs": {"type": "array"},
"primary-artifacts": {
"description": "P1-D(#9): 보고서와 분리된 1급 실물 산출물 목록. 보고서는 이들의 envelope(경로+검증+리스크). design/spec/build/completion 유형에서 필수이며, 각 path는 실존해야 한다(validate_report가 대조).",
"type": "array",
"items": {
"type": "object",
"required": ["path", "kind", "verification"],
"properties": {
"path": {"type": "string", "description": "실물 산출물 파일 경로(실존해야 함)"},
"kind": {"type": "string", "description": "rfc|adr|data-model|threat-model|api-contract|code|prd|design-doc|verification-record|…"},
"sha": {"type": "string", "description": "(선택) 산출물 해시 — evidence-ledger receipt(C5)의 artifact_sha256과 교차검증"},
"verification": {"description": "이 산출물을 무엇으로 검증했는가(command/test/review). E4/E5 주장은 receipt 필요."}
}
}
},
"report-header": {
"type": "object",
"required": ["bottom-line", "decision-needed", "confidence", "risks", "evidence"],
"properties": {
"bottom-line": {"type": "string"},
"decision-needed": {
"type": "object",
"required": ["needed"],
"properties": {
"needed": {"type": "boolean"},
"approver": {}
}
},
"confidence": {
"type": "object",
"required": ["value"],
"properties": {
"value": {"type": "string"}
}
},
"risks": {"type": "array"},
"evidence": {"type": "array"}
}
}
}
}