@digi4care/omo-slim-decision-layer 0.2.2 → 0.2.3
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.
- package/README.md +2 -4
- package/package.json +2 -2
- package/dist/src/config.d.ts +0 -6
- package/dist/src/hooks/interview-inject.d.ts +0 -2
- package/dist/src/index.d.ts +0 -6
- package/dist/src/model/record.d.ts +0 -320
- package/dist/src/prompts/decision-discipline.d.ts +0 -1
- package/dist/src/register/register.d.ts +0 -144
- package/dist/src/schema/generate.d.ts +0 -1
- package/dist/src/tools/index.d.ts +0 -4
- package/dist/src/tools/paths.d.ts +0 -16
package/README.md
CHANGED
|
@@ -54,10 +54,8 @@ Add the plugin to your OpenCode config:
|
|
|
54
54
|
OpenCode installs the plugin automatically from npm on the next start. To pin
|
|
55
55
|
a version, replace `@latest` with a specific version (e.g. `@0.2.1`).
|
|
56
56
|
|
|
57
|
-
**Local development
|
|
58
|
-
|
|
59
|
-
that exist on npm; for a local or private build, reference the built file
|
|
60
|
-
directly instead:
|
|
57
|
+
**Local development.** For a local or private build, reference the built file
|
|
58
|
+
directly instead of a package name:
|
|
61
59
|
|
|
62
60
|
```jsonc
|
|
63
61
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digi4care/omo-slim-decision-layer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Git-native decision register for OpenCode: typed records (REQ/CONSTRAINT/ASSUMPTION/DEC), owner ratification and traceability, as a companion plugin for oh-my-opencode-slim",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"README.md"
|
|
46
46
|
],
|
|
47
47
|
"scripts": {
|
|
48
|
-
"build": "bun build src/index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly",
|
|
48
|
+
"build": "rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly",
|
|
49
49
|
"test": "bun test",
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
|
51
51
|
"lint": "biome lint .",
|
package/dist/src/config.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const ConfigSchema: z.ZodObject<{
|
|
3
|
-
registerPath: z.ZodDefault<z.ZodString>;
|
|
4
|
-
}, z.core.$strip>;
|
|
5
|
-
export type DecisionLayerConfig = z.infer<typeof ConfigSchema>;
|
|
6
|
-
export declare function loadConfig(worktree: string): DecisionLayerConfig;
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const RecordTypes: readonly ['REQ', 'CONSTRAINT', 'ASSUMPTION', 'DEC'];
|
|
3
|
-
export type RecordType = (typeof RecordTypes)[number];
|
|
4
|
-
export declare const RecordStatuses: readonly ['proposed', 'accepted', 'rejected', 'superseded'];
|
|
5
|
-
export type RecordStatus = (typeof RecordStatuses)[number];
|
|
6
|
-
export declare const LinkRelations: readonly ['refines', 'depends_on', 'constrains', 'relates_to'];
|
|
7
|
-
export type LinkRelation = (typeof LinkRelations)[number];
|
|
8
|
-
export declare function recordIdPattern(type: RecordType): RegExp;
|
|
9
|
-
export declare const RecordId: z.ZodString;
|
|
10
|
-
export type RecordId = z.infer<typeof RecordId>;
|
|
11
|
-
export declare const LinkSchema: z.ZodObject<{
|
|
12
|
-
type: z.ZodEnum<{
|
|
13
|
-
constrains: "constrains";
|
|
14
|
-
depends_on: "depends_on";
|
|
15
|
-
refines: "refines";
|
|
16
|
-
relates_to: "relates_to";
|
|
17
|
-
}>;
|
|
18
|
-
target: z.ZodString;
|
|
19
|
-
rationale: z.ZodString;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
export type Link = z.infer<typeof LinkSchema>;
|
|
22
|
-
export declare const ReqRecordSchema: z.ZodObject<{
|
|
23
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
24
|
-
title: z.ZodString;
|
|
25
|
-
status: z.ZodEnum<{
|
|
26
|
-
accepted: "accepted";
|
|
27
|
-
proposed: "proposed";
|
|
28
|
-
rejected: "rejected";
|
|
29
|
-
superseded: "superseded";
|
|
30
|
-
}>;
|
|
31
|
-
owner: z.ZodString;
|
|
32
|
-
change_authority: z.ZodString;
|
|
33
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
34
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
35
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
36
|
-
type: z.ZodEnum<{
|
|
37
|
-
constrains: "constrains";
|
|
38
|
-
depends_on: "depends_on";
|
|
39
|
-
refines: "refines";
|
|
40
|
-
relates_to: "relates_to";
|
|
41
|
-
}>;
|
|
42
|
-
target: z.ZodString;
|
|
43
|
-
rationale: z.ZodString;
|
|
44
|
-
}, z.core.$strip>>>;
|
|
45
|
-
type: z.ZodLiteral<"REQ">;
|
|
46
|
-
id: z.ZodString;
|
|
47
|
-
}, z.core.$strip>;
|
|
48
|
-
export declare const ConstraintRecordSchema: z.ZodObject<{
|
|
49
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
50
|
-
title: z.ZodString;
|
|
51
|
-
status: z.ZodEnum<{
|
|
52
|
-
accepted: "accepted";
|
|
53
|
-
proposed: "proposed";
|
|
54
|
-
rejected: "rejected";
|
|
55
|
-
superseded: "superseded";
|
|
56
|
-
}>;
|
|
57
|
-
owner: z.ZodString;
|
|
58
|
-
change_authority: z.ZodString;
|
|
59
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
60
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
61
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
62
|
-
type: z.ZodEnum<{
|
|
63
|
-
constrains: "constrains";
|
|
64
|
-
depends_on: "depends_on";
|
|
65
|
-
refines: "refines";
|
|
66
|
-
relates_to: "relates_to";
|
|
67
|
-
}>;
|
|
68
|
-
target: z.ZodString;
|
|
69
|
-
rationale: z.ZodString;
|
|
70
|
-
}, z.core.$strip>>>;
|
|
71
|
-
type: z.ZodLiteral<"CONSTRAINT">;
|
|
72
|
-
id: z.ZodString;
|
|
73
|
-
}, z.core.$strip>;
|
|
74
|
-
export declare const AssumptionRecordSchema: z.ZodObject<{
|
|
75
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
76
|
-
title: z.ZodString;
|
|
77
|
-
status: z.ZodEnum<{
|
|
78
|
-
accepted: "accepted";
|
|
79
|
-
proposed: "proposed";
|
|
80
|
-
rejected: "rejected";
|
|
81
|
-
superseded: "superseded";
|
|
82
|
-
}>;
|
|
83
|
-
owner: z.ZodString;
|
|
84
|
-
change_authority: z.ZodString;
|
|
85
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
86
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
87
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
88
|
-
type: z.ZodEnum<{
|
|
89
|
-
constrains: "constrains";
|
|
90
|
-
depends_on: "depends_on";
|
|
91
|
-
refines: "refines";
|
|
92
|
-
relates_to: "relates_to";
|
|
93
|
-
}>;
|
|
94
|
-
target: z.ZodString;
|
|
95
|
-
rationale: z.ZodString;
|
|
96
|
-
}, z.core.$strip>>>;
|
|
97
|
-
type: z.ZodLiteral<"ASSUMPTION">;
|
|
98
|
-
id: z.ZodString;
|
|
99
|
-
needed_to_close: z.ZodString;
|
|
100
|
-
}, z.core.$strip>;
|
|
101
|
-
export declare const DecRecordSchema: z.ZodObject<{
|
|
102
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
103
|
-
title: z.ZodString;
|
|
104
|
-
status: z.ZodEnum<{
|
|
105
|
-
accepted: "accepted";
|
|
106
|
-
proposed: "proposed";
|
|
107
|
-
rejected: "rejected";
|
|
108
|
-
superseded: "superseded";
|
|
109
|
-
}>;
|
|
110
|
-
owner: z.ZodString;
|
|
111
|
-
change_authority: z.ZodString;
|
|
112
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
113
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
114
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
115
|
-
type: z.ZodEnum<{
|
|
116
|
-
constrains: "constrains";
|
|
117
|
-
depends_on: "depends_on";
|
|
118
|
-
refines: "refines";
|
|
119
|
-
relates_to: "relates_to";
|
|
120
|
-
}>;
|
|
121
|
-
target: z.ZodString;
|
|
122
|
-
rationale: z.ZodString;
|
|
123
|
-
}, z.core.$strip>>>;
|
|
124
|
-
type: z.ZodLiteral<"DEC">;
|
|
125
|
-
id: z.ZodString;
|
|
126
|
-
decision: z.ZodString;
|
|
127
|
-
alternatives_rejected: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
128
|
-
alternative: z.ZodString;
|
|
129
|
-
rejected_because: z.ZodString;
|
|
130
|
-
}, z.core.$strip>>>;
|
|
131
|
-
consequences: z.ZodString;
|
|
132
|
-
}, z.core.$strip>;
|
|
133
|
-
export declare const RecordSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
134
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
135
|
-
title: z.ZodString;
|
|
136
|
-
status: z.ZodEnum<{
|
|
137
|
-
accepted: "accepted";
|
|
138
|
-
proposed: "proposed";
|
|
139
|
-
rejected: "rejected";
|
|
140
|
-
superseded: "superseded";
|
|
141
|
-
}>;
|
|
142
|
-
owner: z.ZodString;
|
|
143
|
-
change_authority: z.ZodString;
|
|
144
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
145
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
146
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
147
|
-
type: z.ZodEnum<{
|
|
148
|
-
constrains: "constrains";
|
|
149
|
-
depends_on: "depends_on";
|
|
150
|
-
refines: "refines";
|
|
151
|
-
relates_to: "relates_to";
|
|
152
|
-
}>;
|
|
153
|
-
target: z.ZodString;
|
|
154
|
-
rationale: z.ZodString;
|
|
155
|
-
}, z.core.$strip>>>;
|
|
156
|
-
type: z.ZodLiteral<"REQ">;
|
|
157
|
-
id: z.ZodString;
|
|
158
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
160
|
-
title: z.ZodString;
|
|
161
|
-
status: z.ZodEnum<{
|
|
162
|
-
accepted: "accepted";
|
|
163
|
-
proposed: "proposed";
|
|
164
|
-
rejected: "rejected";
|
|
165
|
-
superseded: "superseded";
|
|
166
|
-
}>;
|
|
167
|
-
owner: z.ZodString;
|
|
168
|
-
change_authority: z.ZodString;
|
|
169
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
170
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
171
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
172
|
-
type: z.ZodEnum<{
|
|
173
|
-
constrains: "constrains";
|
|
174
|
-
depends_on: "depends_on";
|
|
175
|
-
refines: "refines";
|
|
176
|
-
relates_to: "relates_to";
|
|
177
|
-
}>;
|
|
178
|
-
target: z.ZodString;
|
|
179
|
-
rationale: z.ZodString;
|
|
180
|
-
}, z.core.$strip>>>;
|
|
181
|
-
type: z.ZodLiteral<"CONSTRAINT">;
|
|
182
|
-
id: z.ZodString;
|
|
183
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
185
|
-
title: z.ZodString;
|
|
186
|
-
status: z.ZodEnum<{
|
|
187
|
-
accepted: "accepted";
|
|
188
|
-
proposed: "proposed";
|
|
189
|
-
rejected: "rejected";
|
|
190
|
-
superseded: "superseded";
|
|
191
|
-
}>;
|
|
192
|
-
owner: z.ZodString;
|
|
193
|
-
change_authority: z.ZodString;
|
|
194
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
195
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
196
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
197
|
-
type: z.ZodEnum<{
|
|
198
|
-
constrains: "constrains";
|
|
199
|
-
depends_on: "depends_on";
|
|
200
|
-
refines: "refines";
|
|
201
|
-
relates_to: "relates_to";
|
|
202
|
-
}>;
|
|
203
|
-
target: z.ZodString;
|
|
204
|
-
rationale: z.ZodString;
|
|
205
|
-
}, z.core.$strip>>>;
|
|
206
|
-
type: z.ZodLiteral<"ASSUMPTION">;
|
|
207
|
-
id: z.ZodString;
|
|
208
|
-
needed_to_close: z.ZodString;
|
|
209
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
210
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
211
|
-
title: z.ZodString;
|
|
212
|
-
status: z.ZodEnum<{
|
|
213
|
-
accepted: "accepted";
|
|
214
|
-
proposed: "proposed";
|
|
215
|
-
rejected: "rejected";
|
|
216
|
-
superseded: "superseded";
|
|
217
|
-
}>;
|
|
218
|
-
owner: z.ZodString;
|
|
219
|
-
change_authority: z.ZodString;
|
|
220
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
221
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
222
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
223
|
-
type: z.ZodEnum<{
|
|
224
|
-
constrains: "constrains";
|
|
225
|
-
depends_on: "depends_on";
|
|
226
|
-
refines: "refines";
|
|
227
|
-
relates_to: "relates_to";
|
|
228
|
-
}>;
|
|
229
|
-
target: z.ZodString;
|
|
230
|
-
rationale: z.ZodString;
|
|
231
|
-
}, z.core.$strip>>>;
|
|
232
|
-
type: z.ZodLiteral<"DEC">;
|
|
233
|
-
id: z.ZodString;
|
|
234
|
-
decision: z.ZodString;
|
|
235
|
-
alternatives_rejected: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
236
|
-
alternative: z.ZodString;
|
|
237
|
-
rejected_because: z.ZodString;
|
|
238
|
-
}, z.core.$strip>>>;
|
|
239
|
-
consequences: z.ZodString;
|
|
240
|
-
}, z.core.$strip>], "type">;
|
|
241
|
-
export type ReqRecord = z.infer<typeof ReqRecordSchema>;
|
|
242
|
-
export type ConstraintRecord = z.infer<typeof ConstraintRecordSchema>;
|
|
243
|
-
export type AssumptionRecord = z.infer<typeof AssumptionRecordSchema>;
|
|
244
|
-
export type DecRecord = z.infer<typeof DecRecordSchema>;
|
|
245
|
-
export type DecisionRecord = z.infer<typeof RecordSchema>;
|
|
246
|
-
export declare const AddRecordInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
247
|
-
title: z.ZodString;
|
|
248
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
249
|
-
change_authority: z.ZodOptional<z.ZodString>;
|
|
250
|
-
supersedes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
|
-
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
252
|
-
type: z.ZodEnum<{
|
|
253
|
-
constrains: "constrains";
|
|
254
|
-
depends_on: "depends_on";
|
|
255
|
-
refines: "refines";
|
|
256
|
-
relates_to: "relates_to";
|
|
257
|
-
}>;
|
|
258
|
-
target: z.ZodString;
|
|
259
|
-
rationale: z.ZodString;
|
|
260
|
-
}, z.core.$strip>>>;
|
|
261
|
-
type: z.ZodLiteral<"REQ">;
|
|
262
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
263
|
-
title: z.ZodString;
|
|
264
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
265
|
-
change_authority: z.ZodOptional<z.ZodString>;
|
|
266
|
-
supersedes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
|
-
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
268
|
-
type: z.ZodEnum<{
|
|
269
|
-
constrains: "constrains";
|
|
270
|
-
depends_on: "depends_on";
|
|
271
|
-
refines: "refines";
|
|
272
|
-
relates_to: "relates_to";
|
|
273
|
-
}>;
|
|
274
|
-
target: z.ZodString;
|
|
275
|
-
rationale: z.ZodString;
|
|
276
|
-
}, z.core.$strip>>>;
|
|
277
|
-
type: z.ZodLiteral<"CONSTRAINT">;
|
|
278
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
-
title: z.ZodString;
|
|
280
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
281
|
-
change_authority: z.ZodOptional<z.ZodString>;
|
|
282
|
-
supersedes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
283
|
-
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
284
|
-
type: z.ZodEnum<{
|
|
285
|
-
constrains: "constrains";
|
|
286
|
-
depends_on: "depends_on";
|
|
287
|
-
refines: "refines";
|
|
288
|
-
relates_to: "relates_to";
|
|
289
|
-
}>;
|
|
290
|
-
target: z.ZodString;
|
|
291
|
-
rationale: z.ZodString;
|
|
292
|
-
}, z.core.$strip>>>;
|
|
293
|
-
type: z.ZodLiteral<"ASSUMPTION">;
|
|
294
|
-
needed_to_close: z.ZodString;
|
|
295
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
296
|
-
title: z.ZodString;
|
|
297
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
298
|
-
change_authority: z.ZodOptional<z.ZodString>;
|
|
299
|
-
supersedes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
300
|
-
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
301
|
-
type: z.ZodEnum<{
|
|
302
|
-
constrains: "constrains";
|
|
303
|
-
depends_on: "depends_on";
|
|
304
|
-
refines: "refines";
|
|
305
|
-
relates_to: "relates_to";
|
|
306
|
-
}>;
|
|
307
|
-
target: z.ZodString;
|
|
308
|
-
rationale: z.ZodString;
|
|
309
|
-
}, z.core.$strip>>>;
|
|
310
|
-
type: z.ZodLiteral<"DEC">;
|
|
311
|
-
decision: z.ZodString;
|
|
312
|
-
alternatives_rejected: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
313
|
-
alternative: z.ZodString;
|
|
314
|
-
rejected_because: z.ZodString;
|
|
315
|
-
}, z.core.$strip>>>;
|
|
316
|
-
consequences: z.ZodString;
|
|
317
|
-
}, z.core.$strip>], "type">;
|
|
318
|
-
export type AddRecordInput = z.infer<typeof AddRecordInputSchema>;
|
|
319
|
-
export declare function sortRecords(records: DecisionRecord[]): DecisionRecord[];
|
|
320
|
-
export declare function recordType(id: string): RecordType | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DECISION_DISCIPLINE_PROMPT = "At the end of this interview, the outcome is not yet a decision. Record it in the decision register.\n\nRecord in `.decisions/register.yaml` (following `schema/register.schema.json`):\n- the problem as a requirement record;\n- what is fixed and non-negotiable as a constraint record;\n- every assumption you could not verify as an assumption record, with `needed_to_close`;\n- the decision itself as a decision record, with rejected alternatives and consequences.\n\n`.decisions/register.yaml` is the single source of truth. You call `decision-add` yourself to add records; do not write a second set of files next to the register. Always run `decision-validate` after writing. Only ratify (`decision-ratify`) when the user explicitly asks you to.";
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type AddRecordInput, type DecisionRecord } from '../model/record.js';
|
|
3
|
-
export interface Workspace {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
owner: string;
|
|
7
|
-
change_authority: string;
|
|
8
|
-
}
|
|
9
|
-
export interface Register {
|
|
10
|
-
schema_version: '1.0';
|
|
11
|
-
workspace: Workspace;
|
|
12
|
-
records: DecisionRecord[];
|
|
13
|
-
}
|
|
14
|
-
export declare const WorkspaceSchema: z.ZodObject<{
|
|
15
|
-
id: z.ZodString;
|
|
16
|
-
title: z.ZodString;
|
|
17
|
-
owner: z.ZodString;
|
|
18
|
-
change_authority: z.ZodString;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
export declare const RegisterSchema: z.ZodObject<{
|
|
21
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
22
|
-
workspace: z.ZodObject<{
|
|
23
|
-
id: z.ZodString;
|
|
24
|
-
title: z.ZodString;
|
|
25
|
-
owner: z.ZodString;
|
|
26
|
-
change_authority: z.ZodString;
|
|
27
|
-
}, z.core.$strip>;
|
|
28
|
-
records: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
29
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
30
|
-
title: z.ZodString;
|
|
31
|
-
status: z.ZodEnum<{
|
|
32
|
-
accepted: "accepted";
|
|
33
|
-
proposed: "proposed";
|
|
34
|
-
rejected: "rejected";
|
|
35
|
-
superseded: "superseded";
|
|
36
|
-
}>;
|
|
37
|
-
owner: z.ZodString;
|
|
38
|
-
change_authority: z.ZodString;
|
|
39
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
40
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
41
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
42
|
-
type: z.ZodEnum<{
|
|
43
|
-
constrains: "constrains";
|
|
44
|
-
depends_on: "depends_on";
|
|
45
|
-
refines: "refines";
|
|
46
|
-
relates_to: "relates_to";
|
|
47
|
-
}>;
|
|
48
|
-
target: z.ZodString;
|
|
49
|
-
rationale: z.ZodString;
|
|
50
|
-
}, z.core.$strip>>>;
|
|
51
|
-
type: z.ZodLiteral<"REQ">;
|
|
52
|
-
id: z.ZodString;
|
|
53
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
55
|
-
title: z.ZodString;
|
|
56
|
-
status: z.ZodEnum<{
|
|
57
|
-
accepted: "accepted";
|
|
58
|
-
proposed: "proposed";
|
|
59
|
-
rejected: "rejected";
|
|
60
|
-
superseded: "superseded";
|
|
61
|
-
}>;
|
|
62
|
-
owner: z.ZodString;
|
|
63
|
-
change_authority: z.ZodString;
|
|
64
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
65
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
66
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
67
|
-
type: z.ZodEnum<{
|
|
68
|
-
constrains: "constrains";
|
|
69
|
-
depends_on: "depends_on";
|
|
70
|
-
refines: "refines";
|
|
71
|
-
relates_to: "relates_to";
|
|
72
|
-
}>;
|
|
73
|
-
target: z.ZodString;
|
|
74
|
-
rationale: z.ZodString;
|
|
75
|
-
}, z.core.$strip>>>;
|
|
76
|
-
type: z.ZodLiteral<"CONSTRAINT">;
|
|
77
|
-
id: z.ZodString;
|
|
78
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
80
|
-
title: z.ZodString;
|
|
81
|
-
status: z.ZodEnum<{
|
|
82
|
-
accepted: "accepted";
|
|
83
|
-
proposed: "proposed";
|
|
84
|
-
rejected: "rejected";
|
|
85
|
-
superseded: "superseded";
|
|
86
|
-
}>;
|
|
87
|
-
owner: z.ZodString;
|
|
88
|
-
change_authority: z.ZodString;
|
|
89
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
90
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
91
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
92
|
-
type: z.ZodEnum<{
|
|
93
|
-
constrains: "constrains";
|
|
94
|
-
depends_on: "depends_on";
|
|
95
|
-
refines: "refines";
|
|
96
|
-
relates_to: "relates_to";
|
|
97
|
-
}>;
|
|
98
|
-
target: z.ZodString;
|
|
99
|
-
rationale: z.ZodString;
|
|
100
|
-
}, z.core.$strip>>>;
|
|
101
|
-
type: z.ZodLiteral<"ASSUMPTION">;
|
|
102
|
-
id: z.ZodString;
|
|
103
|
-
needed_to_close: z.ZodString;
|
|
104
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
-
schema_version: z.ZodLiteral<"1.0">;
|
|
106
|
-
title: z.ZodString;
|
|
107
|
-
status: z.ZodEnum<{
|
|
108
|
-
accepted: "accepted";
|
|
109
|
-
proposed: "proposed";
|
|
110
|
-
rejected: "rejected";
|
|
111
|
-
superseded: "superseded";
|
|
112
|
-
}>;
|
|
113
|
-
owner: z.ZodString;
|
|
114
|
-
change_authority: z.ZodString;
|
|
115
|
-
supersedes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
116
|
-
status_reason: z.ZodOptional<z.ZodString>;
|
|
117
|
-
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
118
|
-
type: z.ZodEnum<{
|
|
119
|
-
constrains: "constrains";
|
|
120
|
-
depends_on: "depends_on";
|
|
121
|
-
refines: "refines";
|
|
122
|
-
relates_to: "relates_to";
|
|
123
|
-
}>;
|
|
124
|
-
target: z.ZodString;
|
|
125
|
-
rationale: z.ZodString;
|
|
126
|
-
}, z.core.$strip>>>;
|
|
127
|
-
type: z.ZodLiteral<"DEC">;
|
|
128
|
-
id: z.ZodString;
|
|
129
|
-
decision: z.ZodString;
|
|
130
|
-
alternatives_rejected: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
131
|
-
alternative: z.ZodString;
|
|
132
|
-
rejected_because: z.ZodString;
|
|
133
|
-
}, z.core.$strip>>>;
|
|
134
|
-
consequences: z.ZodString;
|
|
135
|
-
}, z.core.$strip>], "type">>;
|
|
136
|
-
}, z.core.$strip>;
|
|
137
|
-
export declare function readRegister(filePath: string): Register;
|
|
138
|
-
export declare function validateRegisterFile(filePath: string): void;
|
|
139
|
-
export declare function writeRegister(filePath: string, register: Register): void;
|
|
140
|
-
export declare function initRegister(filePath: string, workspace: Workspace): void;
|
|
141
|
-
export declare function addRecord(filePath: string, input: AddRecordInput): DecisionRecord;
|
|
142
|
-
export declare function ratifyRecord(filePath: string, id: string): DecisionRecord;
|
|
143
|
-
export declare function rejectRecord(filePath: string, id: string, reason?: string): DecisionRecord;
|
|
144
|
-
export declare function supersedeRecord(filePath: string, oldId: string, newRecordInput: AddRecordInput, reason?: string): DecisionRecord;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface ProjectRootContext {
|
|
2
|
-
worktree?: string;
|
|
3
|
-
directory?: string;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Resolve the project root for all decision tools.
|
|
7
|
-
*
|
|
8
|
-
* Prefers `ctx.worktree` when it is a non-empty string, is not "/" (after
|
|
9
|
-
* resolution) and actually exists on disk; otherwise falls back to
|
|
10
|
-
* `ctx.directory`. Throws when no usable root exists so no tool ever reads or
|
|
11
|
-
* writes the register at "/" or at an empty path (SEC-001).
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolveProjectRoot(ctx: ProjectRootContext): string;
|
|
14
|
-
export declare function withinWorktree(root: string, target: string): boolean;
|
|
15
|
-
export declare function resolveRegisterPath(root: string): string;
|
|
16
|
-
export declare function resolveToolPath(root: string, filePath: string): string;
|