forked from jieyao-MilestoneHub/EchoDev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecision.schema.json
More file actions
119 lines (119 loc) · 3.64 KB
/
decision.schema.json
File metadata and controls
119 lines (119 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://echodev.dev/schema/decision.schema.json",
"title": "DecisionNode",
"description": "A single unit of design memory. One file per node under .echodev/decisions/<id>.json.",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"created_at",
"status",
"problem",
"decision",
"affected_files",
"affected_modules",
"relations",
"future_reminders",
"source"
],
"properties": {
"id": {
"type": "string",
"pattern": "^d-[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9-]+$",
"description": "Stable identifier: d-YYYY-MM-DD-<slug>"
},
"created_at": {
"type": "string",
"format": "date",
"description": "ISO-8601 date the decision was recorded."
},
"status": {
"type": "string",
"enum": ["active", "superseded", "expired"],
"description": "Lifecycle state. `superseded` means another node replaced it; `expired` means its preconditions no longer hold."
},
"problem": {
"type": "string",
"minLength": 1,
"description": "What question this decision answers."
},
"decision": {
"type": "string",
"minLength": 1,
"description": "The chosen answer."
},
"alternatives": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"constraints": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Preconditions under which this decision holds."
},
"failures": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Failure modes this decision is meant to prevent."
},
"expiry_conditions": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Conditions that, when true, should invalidate this decision."
},
"affected_files": {
"type": "array",
"items": { "type": "string" },
"description": "Glob patterns or paths this decision governs."
},
"affected_modules": {
"type": "array",
"items": { "type": "string" },
"description": "Logical modules this decision governs."
},
"relations": {
"type": "object",
"additionalProperties": false,
"required": ["inherits", "conflicts_with", "fills_gap_of", "shared_premise", "superseded_by"],
"properties": {
"inherits": { "type": "array", "items": { "type": "string" }, "default": [] },
"conflicts_with": { "type": "array", "items": { "type": "string" }, "default": [] },
"fills_gap_of": { "type": "array", "items": { "type": "string" }, "default": [] },
"shared_premise": { "type": "array", "items": { "type": "string" }, "default": [] },
"superseded_by": { "type": ["string", "null"], "default": null }
}
},
"future_reminders": {
"type": "object",
"additionalProperties": false,
"required": ["who_might_repeat", "revisit_when"],
"properties": {
"who_might_repeat": {
"type": "string",
"description": "A future reader most likely to re-encounter this problem."
},
"revisit_when": {
"type": "string",
"description": "A signal that this decision should be re-examined."
}
}
},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["type", "ref"],
"properties": {
"type": {
"type": "string",
"enum": ["commit", "pr", "issue", "manual"]
},
"ref": { "type": "string" }
}
}
}
}