interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

branch main Branches Tags History

aien-architecture-mv / docs / crumbs / continuation-crumb.schema.json

117 lines · 7147 bytes Raw Blame History
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://raw.githubusercontent.com/aien-dev/aien-architecture/main/docs/crumbs/continuation-crumb.schema.json",
4 "title": "ContinuationCrumbV1",
5 "description": "Compact, referential record of where a development session stopped and how another agent resumes (RFC-0002 section 5). Not a transcript. Not an oracle: revalidation is mandatory on resume.",
6 "type": "object",
7 "required": ["acr_version", "identity", "repository", "mission", "state", "evidence", "execution", "coordination", "operator", "resume", "revalidation"],
8 "properties": {
9 "acr_version": { "const": 1 },
10 "identity": {
11 "type": "object",
12 "required": ["id", "created_at", "created_by", "reason"],
13 "properties": {
14 "id": { "type": "string", "pattern": "^cc-[0-9]{4}-[a-z0-9][a-z0-9-]*$" },
15 "created_at": { "type": "string", "format": "date-time" },
16 "sealed_at": { "type": ["string", "null"], "format": "date-time" },
17 "created_by": { "type": "string", "description": "Stable agent/session id, never a PID alone." },
18 "reason": { "type": "string", "enum": ["context-pressure", "milestone", "handoff-to-peer", "end-of-session", "failing-repeatedly", "other"] },
19 "supersedes": { "type": ["string", "null"] },
20 "sha256": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" }
21 }
22 },
23 "repository": {
24 "type": "array", "minItems": 1,
25 "items": {
26 "type": "object", "required": ["remote", "branch", "head"],
27 "properties": {
28 "name": { "type": "string" }, "remote": { "type": "string" }, "worktree": { "type": "string" },
29 "branch": { "type": "string" }, "head": { "type": "string", "pattern": "^[0-9a-f]{7,40}$" },
30 "base": { "type": ["string", "null"], "pattern": "^[0-9a-f]{7,40}$" }, "dirty_files": { "type": "integer", "minimum": 0 }
31 }
32 }
33 },
34 "mission": {
35 "type": "object", "required": ["objective", "milestone", "definition_of_done"],
36 "properties": {
37 "objective": { "type": "string", "minLength": 1 }, "milestone": { "type": "string", "minLength": 1 },
38 "definition_of_done": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "Verbatim. The outgoing session may not soften it while compressing." },
39 "priority": { "type": "string" }
40 }
41 },
42 "state": {
43 "type": "array", "minItems": 1,
44 "items": {
45 "type": "object", "required": ["tag", "claim"],
46 "properties": {
47 "tag": { "enum": ["PROVEN", "PARTIAL", "BLOCKED", "ASSUMED", "OPEN"] },
48 "claim": { "type": "string", "minLength": 1 },
49 "evidence": { "type": "array", "items": { "$ref": "#/$defs/ref" } },
50 "blocker": { "type": "string", "description": "Required when tag is BLOCKED: the exact dependency at implementation level." },
51 "note": { "type": "string" }
52 },
53 "allOf": [
54 { "if": { "properties": { "tag": { "const": "PROVEN" } } }, "then": { "required": ["evidence"], "properties": { "evidence": { "minItems": 1 } } } },
55 { "if": { "properties": { "tag": { "const": "BLOCKED" } } }, "then": { "required": ["blocker"], "properties": { "blocker": { "minLength": 1 } } } }
56 ]
57 }
58 },
59 "evidence": {
60 "type": "object",
61 "properties": {
62 "commits": { "type": "array", "items": { "$ref": "#/$defs/ref" } },
63 "prs": { "type": "array", "items": { "$ref": "#/$defs/ref" } },
64 "tests": { "type": "array", "items": { "type": "object", "required": ["name", "command", "result"], "properties": { "name": { "type": "string" }, "command": { "type": "string" }, "result": { "type": "string", "description": "PASS / FAIL / NOT_RUN plus commit" }, "where": { "type": "string" } } } },
65 "receipts": { "type": "array", "items": { "$ref": "#/$defs/ref" } },
66 "golden_values": { "type": "array", "items": { "type": "object", "required": ["name", "value"], "properties": { "name": { "type": "string" }, "value": {}, "source": { "type": "string" } } }, "description": "Exact values a correct result must reproduce; a mismatch is a FAIL regardless of anything else." }
67 }
68 },
69 "execution": {
70 "type": "object", "required": ["current", "next"],
71 "properties": {
72 "completed": { "type": "array", "items": { "type": "string" } },
73 "current": { "type": "string" },
74 "next": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["id", "task"], "properties": { "id": { "type": "string" }, "task": { "type": "string" }, "depends_on": { "type": "array", "items": { "type": "string" } }, "gate": { "type": "string" } } } },
75 "backlog": { "type": "array", "items": { "type": "string" } }
76 }
77 },
78 "coordination": {
79 "type": "object",
80 "properties": {
81 "scope": { "type": "array", "items": { "type": "string" }, "description": "Repository-relative directories whose .crumb describes the code involved; sniff/explain surface this record for them." },
82 "owned": { "type": "array", "items": { "type": "string" } },
83 "other_owned": { "type": "array", "items": { "type": "object", "required": ["who", "paths"], "properties": { "who": { "type": "string" }, "paths": { "type": "array", "items": { "type": "string" } }, "note": { "type": "string" } } } },
84 "active_workers": { "type": "array", "items": { "type": "string" } },
85 "do_not_touch": { "type": "array", "items": { "type": "string" } }
86 }
87 },
88 "operator": {
89 "type": "object",
90 "properties": {
91 "approval_required": { "type": "array", "items": { "type": "string" } },
92 "hardware_rules": { "type": "array", "items": { "type": "string" } },
93 "destructive_rules": { "type": "array", "items": { "type": "string" } },
94 "standing_preferences": { "type": "array", "items": { "type": "string" } }
95 }
96 },
97 "resume": {
98 "type": "object", "required": ["validate_first", "first_action", "bootstrap"],
99 "properties": {
100 "validate_first": { "type": "array", "minItems": 1, "items": { "type": "string" } },
101 "first_action": { "type": "string", "minLength": 1 },
102 "bootstrap": { "type": "string", "minLength": 1, "maxLength": 700 }
103 }
104 },
105 "revalidation": {
106 "type": "object", "required": ["status"],
107 "properties": {
108 "status": { "enum": ["UNVERIFIED", "NEEDS_REVIEW", "VERIFIED"] },
109 "checked_at": { "type": ["string", "null"] }, "checked_by": { "type": ["string", "null"] },
110 "findings": { "type": "array", "items": { "type": "object", "required": ["field", "result"], "properties": { "field": { "type": "string" }, "result": { "enum": ["CONFIRMED", "STALE", "SUPERSEDED", "UNKNOWN"] }, "note": { "type": "string" } } } }
111 }
112 }
113 },
114 "$defs": {
115 "ref": { "type": "string", "description": "A reference the next agent follows, not a copy: commit:<sha>, pr:<repo>#<n>, receipt:<path>, test:<name>, crumb:<dir>/.crumb, or a short free-form pointer.", "minLength": 3 }
116 }
117}