feat: add artifact schema registry

This commit is contained in:
chungyeong
2026-05-10 01:11:37 +09:00
parent 0d90cd97b6
commit 1338e72e96
9 changed files with 976 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "common/final-report@1",
"title": "Devflow Final Report",
"type": "object",
"required": [
"runId",
"templateHash",
"bindings",
"inputs",
"phases",
"approvals",
"findings",
"commands",
"artifacts",
"events",
"unresolved",
"endedAt",
"status"
],
"properties": {
"runId": { "type": "string", "format": "uuid" },
"templateHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
"bindings": {
"type": "array",
"items": {
"type": "object",
"required": ["roleId", "personaHash", "backend"],
"properties": {
"roleId": { "type": "string", "minLength": 1 },
"personaHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
"backend": { "type": "string", "enum": ["codex", "claude", "fake"] }
}
}
},
"inputs": { "type": "object" },
"phases": { "type": "array" },
"approvals": { "type": "array" },
"findings": { "type": "array" },
"commands": {
"type": "array",
"items": {
"type": "object",
"required": ["kind", "argv", "exit_code"],
"properties": {
"kind": { "type": "string", "minLength": 1 },
"argv": {
"type": "array",
"items": { "type": "string" }
},
"exit_code": { "type": ["integer", "null"] }
}
}
},
"artifacts": { "type": "array" },
"events": {
"type": "object",
"required": ["tail"],
"properties": {
"tail": {
"type": "array",
"maxItems": 200
}
}
},
"unresolved": { "type": "array" },
"endedAt": { "type": "string", "format": "utc-date-time" },
"status": {
"type": "string",
"enum": ["completed", "failed", "aborted"]
}
}
}

View File

@@ -0,0 +1,73 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "dev/phase-plan@1",
"title": "Devflow Phase Plan",
"type": "object",
"additionalProperties": false,
"required": ["phases"],
"properties": {
"phases": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["key", "title", "objective", "roles"],
"properties": {
"key": { "type": "string", "minLength": 1 },
"title": { "type": "string", "minLength": 1 },
"objective": { "type": "string", "minLength": 1 },
"roles": {
"type": "array",
"minItems": 1,
"items": { "type": "string", "minLength": 1 }
},
"expectedArtifact": {
"type": "object",
"additionalProperties": false,
"required": ["path", "schema"],
"properties": {
"path": {
"type": "string",
"pattern": "^(?!.*:)(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$"
},
"schema": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]*/[a-z][a-z0-9_-]*@[1-9][0-9]*$"
}
}
},
"gates": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"tasks": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "title", "role", "writeSet"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"title": { "type": "string", "minLength": 1 },
"role": { "type": "string", "minLength": 1 },
"writeSet": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^(?!/)(?!.*:)(?!.*[!{}()\\[\\]\\\\\\r\\n])(?!.*(?:^|/)\\.{1,2}(?:/|$)).+$"
}
},
"dependsOn": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,38 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "dev/spec@1",
"title": "Devflow Development Specification",
"type": "object",
"additionalProperties": false,
"required": ["summary", "requirements", "acceptanceCriteria", "risks"],
"properties": {
"summary": { "type": "string", "minLength": 1 },
"requirements": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description"],
"properties": {
"id": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" },
"description": { "type": "string", "minLength": 1 },
"priority": { "type": "string", "enum": ["low", "medium", "high"] }
}
}
},
"acceptanceCriteria": {
"type": "array",
"minItems": 1,
"items": { "type": "string", "minLength": 1 }
},
"risks": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"openQuestions": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
}
}
}