@digi4care/omo-slim-decision-layer 0.0.0-stage → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,381 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "schema_version": {
6
+ "type": "string",
7
+ "const": "1.0"
8
+ },
9
+ "workspace": {
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "minLength": 1
15
+ },
16
+ "title": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "owner": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "change_authority": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ }
28
+ },
29
+ "required": ["id", "title", "owner", "change_authority"],
30
+ "additionalProperties": false
31
+ },
32
+ "records": {
33
+ "type": "array",
34
+ "items": {
35
+ "oneOf": [
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "schema_version": {
40
+ "type": "string",
41
+ "const": "1.0"
42
+ },
43
+ "title": {
44
+ "type": "string",
45
+ "minLength": 1
46
+ },
47
+ "status": {
48
+ "type": "string",
49
+ "enum": ["proposed", "accepted", "rejected", "superseded"]
50
+ },
51
+ "owner": {
52
+ "type": "string",
53
+ "minLength": 1
54
+ },
55
+ "change_authority": {
56
+ "type": "string",
57
+ "minLength": 1
58
+ },
59
+ "supersedes": {
60
+ "default": [],
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "status_reason": {
67
+ "type": "string"
68
+ },
69
+ "links": {
70
+ "default": [],
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "properties": {
75
+ "type": {
76
+ "type": "string",
77
+ "enum": ["refines", "depends_on", "constrains", "relates_to"]
78
+ },
79
+ "target": {
80
+ "type": "string"
81
+ },
82
+ "rationale": {
83
+ "type": "string",
84
+ "minLength": 1
85
+ }
86
+ },
87
+ "required": ["type", "target", "rationale"],
88
+ "additionalProperties": false
89
+ }
90
+ },
91
+ "type": {
92
+ "type": "string",
93
+ "const": "REQ"
94
+ },
95
+ "id": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "required": [
100
+ "schema_version",
101
+ "title",
102
+ "status",
103
+ "owner",
104
+ "change_authority",
105
+ "supersedes",
106
+ "links",
107
+ "type",
108
+ "id"
109
+ ],
110
+ "additionalProperties": false
111
+ },
112
+ {
113
+ "type": "object",
114
+ "properties": {
115
+ "schema_version": {
116
+ "type": "string",
117
+ "const": "1.0"
118
+ },
119
+ "title": {
120
+ "type": "string",
121
+ "minLength": 1
122
+ },
123
+ "status": {
124
+ "type": "string",
125
+ "enum": ["proposed", "accepted", "rejected", "superseded"]
126
+ },
127
+ "owner": {
128
+ "type": "string",
129
+ "minLength": 1
130
+ },
131
+ "change_authority": {
132
+ "type": "string",
133
+ "minLength": 1
134
+ },
135
+ "supersedes": {
136
+ "default": [],
137
+ "type": "array",
138
+ "items": {
139
+ "type": "string"
140
+ }
141
+ },
142
+ "status_reason": {
143
+ "type": "string"
144
+ },
145
+ "links": {
146
+ "default": [],
147
+ "type": "array",
148
+ "items": {
149
+ "type": "object",
150
+ "properties": {
151
+ "type": {
152
+ "type": "string",
153
+ "enum": ["refines", "depends_on", "constrains", "relates_to"]
154
+ },
155
+ "target": {
156
+ "type": "string"
157
+ },
158
+ "rationale": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ }
162
+ },
163
+ "required": ["type", "target", "rationale"],
164
+ "additionalProperties": false
165
+ }
166
+ },
167
+ "type": {
168
+ "type": "string",
169
+ "const": "CONSTRAINT"
170
+ },
171
+ "id": {
172
+ "type": "string"
173
+ }
174
+ },
175
+ "required": [
176
+ "schema_version",
177
+ "title",
178
+ "status",
179
+ "owner",
180
+ "change_authority",
181
+ "supersedes",
182
+ "links",
183
+ "type",
184
+ "id"
185
+ ],
186
+ "additionalProperties": false
187
+ },
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "schema_version": {
192
+ "type": "string",
193
+ "const": "1.0"
194
+ },
195
+ "title": {
196
+ "type": "string",
197
+ "minLength": 1
198
+ },
199
+ "status": {
200
+ "type": "string",
201
+ "enum": ["proposed", "accepted", "rejected", "superseded"]
202
+ },
203
+ "owner": {
204
+ "type": "string",
205
+ "minLength": 1
206
+ },
207
+ "change_authority": {
208
+ "type": "string",
209
+ "minLength": 1
210
+ },
211
+ "supersedes": {
212
+ "default": [],
213
+ "type": "array",
214
+ "items": {
215
+ "type": "string"
216
+ }
217
+ },
218
+ "status_reason": {
219
+ "type": "string"
220
+ },
221
+ "links": {
222
+ "default": [],
223
+ "type": "array",
224
+ "items": {
225
+ "type": "object",
226
+ "properties": {
227
+ "type": {
228
+ "type": "string",
229
+ "enum": ["refines", "depends_on", "constrains", "relates_to"]
230
+ },
231
+ "target": {
232
+ "type": "string"
233
+ },
234
+ "rationale": {
235
+ "type": "string",
236
+ "minLength": 1
237
+ }
238
+ },
239
+ "required": ["type", "target", "rationale"],
240
+ "additionalProperties": false
241
+ }
242
+ },
243
+ "type": {
244
+ "type": "string",
245
+ "const": "ASSUMPTION"
246
+ },
247
+ "id": {
248
+ "type": "string"
249
+ },
250
+ "needed_to_close": {
251
+ "type": "string",
252
+ "minLength": 1
253
+ }
254
+ },
255
+ "required": [
256
+ "schema_version",
257
+ "title",
258
+ "status",
259
+ "owner",
260
+ "change_authority",
261
+ "supersedes",
262
+ "links",
263
+ "type",
264
+ "id",
265
+ "needed_to_close"
266
+ ],
267
+ "additionalProperties": false
268
+ },
269
+ {
270
+ "type": "object",
271
+ "properties": {
272
+ "schema_version": {
273
+ "type": "string",
274
+ "const": "1.0"
275
+ },
276
+ "title": {
277
+ "type": "string",
278
+ "minLength": 1
279
+ },
280
+ "status": {
281
+ "type": "string",
282
+ "enum": ["proposed", "accepted", "rejected", "superseded"]
283
+ },
284
+ "owner": {
285
+ "type": "string",
286
+ "minLength": 1
287
+ },
288
+ "change_authority": {
289
+ "type": "string",
290
+ "minLength": 1
291
+ },
292
+ "supersedes": {
293
+ "default": [],
294
+ "type": "array",
295
+ "items": {
296
+ "type": "string"
297
+ }
298
+ },
299
+ "status_reason": {
300
+ "type": "string"
301
+ },
302
+ "links": {
303
+ "default": [],
304
+ "type": "array",
305
+ "items": {
306
+ "type": "object",
307
+ "properties": {
308
+ "type": {
309
+ "type": "string",
310
+ "enum": ["refines", "depends_on", "constrains", "relates_to"]
311
+ },
312
+ "target": {
313
+ "type": "string"
314
+ },
315
+ "rationale": {
316
+ "type": "string",
317
+ "minLength": 1
318
+ }
319
+ },
320
+ "required": ["type", "target", "rationale"],
321
+ "additionalProperties": false
322
+ }
323
+ },
324
+ "type": {
325
+ "type": "string",
326
+ "const": "DEC"
327
+ },
328
+ "id": {
329
+ "type": "string"
330
+ },
331
+ "decision": {
332
+ "type": "string",
333
+ "minLength": 1
334
+ },
335
+ "alternatives_rejected": {
336
+ "default": [],
337
+ "type": "array",
338
+ "items": {
339
+ "type": "object",
340
+ "properties": {
341
+ "alternative": {
342
+ "type": "string",
343
+ "minLength": 1
344
+ },
345
+ "rejected_because": {
346
+ "type": "string",
347
+ "minLength": 1
348
+ }
349
+ },
350
+ "required": ["alternative", "rejected_because"],
351
+ "additionalProperties": false
352
+ }
353
+ },
354
+ "consequences": {
355
+ "type": "string",
356
+ "minLength": 1
357
+ }
358
+ },
359
+ "required": [
360
+ "schema_version",
361
+ "title",
362
+ "status",
363
+ "owner",
364
+ "change_authority",
365
+ "supersedes",
366
+ "links",
367
+ "type",
368
+ "id",
369
+ "decision",
370
+ "alternatives_rejected",
371
+ "consequences"
372
+ ],
373
+ "additionalProperties": false
374
+ }
375
+ ]
376
+ }
377
+ }
378
+ },
379
+ "required": ["schema_version", "workspace", "records"],
380
+ "additionalProperties": false
381
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: decision-layer
3
+ description: Discipline for the decision-layer plugin's decision register. Use when working in a repo that has .decisions/register.yaml — when recording requirements, constraints, assumptions or decisions, when referencing existing records, or when an interview produces a decision. Triggers - decision record, decision register, beslissing vastleggen, .decisions, design.yaml alternative, interview outcome.
4
+ ---
5
+
6
+ # decision-layer discipline
7
+
8
+ The register at `.decisions/register.yaml` is the single source of truth for
9
+ *why* a project is built the way it is: requirements (REQ), non-negotiables
10
+ (CONSTRAINT), unverified assumptions (ASSUMPTION) and decisions (DEC).
11
+
12
+ ## Rules
13
+
14
+ 1. **One write-source.** Records are written only through the `decision-*`
15
+ tools. Never edit `register.yaml` by hand. Never write a second set of
16
+ files next to the register. The markdown view under `.decisions/views/` is
17
+ generated and disposable — never edit it, never treat it as truth.
18
+ 2. **Validate after every change.** Run `decision-validate` after writing. A
19
+ register that does not validate is an open error, not a done task.
20
+ 3. **Never ratify yourself.** `decision-ratify` is only called when the user
21
+ explicitly asks for it. Ratification is an owner act; there is no
22
+ technical gate, the discipline is this rule.
23
+ 4. **Supersede, don't edit.** To change a decision, call `decision-supersede`
24
+ and create the new record. History stays append-only.
25
+ 5. **Assumptions are records.** Anything you cannot verify is an ASSUMPTION
26
+ record with `needed_to_close` — not a plausible sentence in prose.
27
+ 6. **Interviews end in records.** When an `/interview` closes, record the
28
+ outcome: the problem (REQ), what is fixed (CONSTRAINT), unverified
29
+ assumptions (ASSUMPTION), and the decision (DEC with alternatives and
30
+ consequences). Call `decision-add` yourself; the plugin only reminds you.
31
+ 7. **Work stays in beads.** Records never carry work status. Link to beads
32
+ issues by id, never duplicate lifecycle state.
33
+
34
+ ## Reference
35
+
36
+ Record shape and allowed values: `schema/register.schema.json`. Do not
37
+ enumerate record types or statuses from memory — read the schema.