@structured-vibe-coding/core 0.18.0 → 0.19.0
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/defaults/teams/research/roles/researcher.md +29 -0
- package/defaults/teams/research/team.yaml +7 -0
- package/defaults/teams/software/roles/architect.md +31 -0
- package/defaults/teams/software/roles/dev-lead.md +32 -0
- package/defaults/teams/software/roles/developer.md +30 -0
- package/defaults/teams/software/roles/product-manager.md +32 -0
- package/defaults/teams/software/roles/product-owner.md +30 -0
- package/defaults/teams/software/roles/qa.md +35 -0
- package/defaults/teams/software/routing.yaml +28 -0
- package/defaults/teams/software/team.yaml +24 -0
- package/defaults/teams/solo/roles/developer.md +28 -0
- package/defaults/teams/solo/team.yaml +7 -0
- package/defaults/templates/plan.md +17 -0
- package/defaults/templates/review.md +11 -0
- package/defaults/templates/story.md +13 -0
- package/defaults/templates/task.md +11 -0
- package/defaults/workflows/team-software.yaml +153 -0
- package/dist/{agents-AKSUXQHN.js → agents-PSIOQEYH.js} +3 -3
- package/dist/{change-context-REE7UKU7.js → change-context-EZJMSGSP.js} +1 -1
- package/dist/{chunk-4PIRWYRA.js → chunk-26YG6A4M.js} +166 -81
- package/dist/{chunk-LHSR7JG2.js → chunk-2FJBFYVJ.js} +306 -31
- package/dist/{chunk-QGP43XCN.js → chunk-H55RFAEI.js} +1 -1
- package/dist/{chunk-QHV5KZKX.js → chunk-HG7TPW5V.js} +93 -8
- package/dist/{chunk-44LQ5BKZ.js → chunk-TGRV6WGS.js} +812 -4
- package/dist/{gather-ZNV2NAUN.js → gather-7TSVKQO2.js} +1 -1
- package/dist/{greenfield-I5S5OS2D.js → greenfield-QFA5WVHE.js} +3 -3
- package/dist/index.d.ts +804 -10
- package/dist/index.js +2765 -524
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -5,16 +5,20 @@ declare const GateSchema: z.ZodObject<{
|
|
|
5
5
|
type: z.ZodDefault<z.ZodEnum<["none", "soft", "hard"]>>;
|
|
6
6
|
mode: z.ZodDefault<z.ZodEnum<["none", "human_approval", "checklist"]>>;
|
|
7
7
|
checklist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
8
|
+
/** Role names, or human for a person listed on the team. */
|
|
9
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8
10
|
overridable: z.ZodDefault<z.ZodBoolean>;
|
|
9
11
|
}, "strip", z.ZodTypeAny, {
|
|
10
12
|
type: "none" | "soft" | "hard";
|
|
11
13
|
checklist: string[];
|
|
12
14
|
mode: "none" | "human_approval" | "checklist";
|
|
13
15
|
overridable: boolean;
|
|
16
|
+
approvers?: string[] | undefined;
|
|
14
17
|
}, {
|
|
15
18
|
type?: "none" | "soft" | "hard" | undefined;
|
|
16
19
|
checklist?: string[] | undefined;
|
|
17
20
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
21
|
+
approvers?: string[] | undefined;
|
|
18
22
|
overridable?: boolean | undefined;
|
|
19
23
|
}>;
|
|
20
24
|
declare const ArtifactDefSchema: z.ZodObject<{
|
|
@@ -58,6 +62,15 @@ declare const StageSchema: z.ZodObject<{
|
|
|
58
62
|
kind: z.ZodDefault<z.ZodEnum<["standard", "brainstorm", "clarify"]>>;
|
|
59
63
|
/** When true, stage is optional (skippable); agents may skip if not needed */
|
|
60
64
|
optional: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
+
/** Role that produces this stage. */
|
|
66
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
67
|
+
/** Roles who work with the owner on this stage. */
|
|
68
|
+
collaborates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
69
|
+
/**
|
|
70
|
+
* One item per matching file when the stage starts.
|
|
71
|
+
* A directory, a slash, and one star in the file name: tasks/T-*.md
|
|
72
|
+
*/
|
|
73
|
+
items_from: z.ZodOptional<z.ZodString>;
|
|
61
74
|
artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
62
75
|
id: z.ZodString;
|
|
63
76
|
path: z.ZodString;
|
|
@@ -78,16 +91,20 @@ declare const StageSchema: z.ZodObject<{
|
|
|
78
91
|
type: z.ZodDefault<z.ZodEnum<["none", "soft", "hard"]>>;
|
|
79
92
|
mode: z.ZodDefault<z.ZodEnum<["none", "human_approval", "checklist"]>>;
|
|
80
93
|
checklist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
94
|
+
/** Role names, or human for a person listed on the team. */
|
|
95
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
81
96
|
overridable: z.ZodDefault<z.ZodBoolean>;
|
|
82
97
|
}, "strip", z.ZodTypeAny, {
|
|
83
98
|
type: "none" | "soft" | "hard";
|
|
84
99
|
checklist: string[];
|
|
85
100
|
mode: "none" | "human_approval" | "checklist";
|
|
86
101
|
overridable: boolean;
|
|
102
|
+
approvers?: string[] | undefined;
|
|
87
103
|
}, {
|
|
88
104
|
type?: "none" | "soft" | "hard" | undefined;
|
|
89
105
|
checklist?: string[] | undefined;
|
|
90
106
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
107
|
+
approvers?: string[] | undefined;
|
|
91
108
|
overridable?: boolean | undefined;
|
|
92
109
|
}>>;
|
|
93
110
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -153,10 +170,14 @@ declare const StageSchema: z.ZodObject<{
|
|
|
153
170
|
checklist: string[];
|
|
154
171
|
mode: "none" | "human_approval" | "checklist";
|
|
155
172
|
overridable: boolean;
|
|
173
|
+
approvers?: string[] | undefined;
|
|
156
174
|
};
|
|
157
175
|
skippable: boolean;
|
|
158
176
|
title?: string | undefined;
|
|
159
177
|
summary?: string | undefined;
|
|
178
|
+
owner?: string | undefined;
|
|
179
|
+
collaborates?: string[] | undefined;
|
|
180
|
+
items_from?: string | undefined;
|
|
160
181
|
skip_when?: {
|
|
161
182
|
flags?: string[] | undefined;
|
|
162
183
|
} | undefined;
|
|
@@ -178,6 +199,9 @@ declare const StageSchema: z.ZodObject<{
|
|
|
178
199
|
summary?: string | undefined;
|
|
179
200
|
kind?: "standard" | "brainstorm" | "clarify" | undefined;
|
|
180
201
|
optional?: boolean | undefined;
|
|
202
|
+
owner?: string | undefined;
|
|
203
|
+
collaborates?: string[] | undefined;
|
|
204
|
+
items_from?: string | undefined;
|
|
181
205
|
artifacts?: {
|
|
182
206
|
path: string;
|
|
183
207
|
id: string;
|
|
@@ -188,6 +212,7 @@ declare const StageSchema: z.ZodObject<{
|
|
|
188
212
|
type?: "none" | "soft" | "hard" | undefined;
|
|
189
213
|
checklist?: string[] | undefined;
|
|
190
214
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
215
|
+
approvers?: string[] | undefined;
|
|
191
216
|
overridable?: boolean | undefined;
|
|
192
217
|
} | undefined;
|
|
193
218
|
skippable?: boolean | undefined;
|
|
@@ -223,6 +248,15 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
223
248
|
kind: z.ZodDefault<z.ZodEnum<["standard", "brainstorm", "clarify"]>>;
|
|
224
249
|
/** When true, stage is optional (skippable); agents may skip if not needed */
|
|
225
250
|
optional: z.ZodDefault<z.ZodBoolean>;
|
|
251
|
+
/** Role that produces this stage. */
|
|
252
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
253
|
+
/** Roles who work with the owner on this stage. */
|
|
254
|
+
collaborates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
255
|
+
/**
|
|
256
|
+
* One item per matching file when the stage starts.
|
|
257
|
+
* A directory, a slash, and one star in the file name: tasks/T-*.md
|
|
258
|
+
*/
|
|
259
|
+
items_from: z.ZodOptional<z.ZodString>;
|
|
226
260
|
artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
227
261
|
id: z.ZodString;
|
|
228
262
|
path: z.ZodString;
|
|
@@ -243,16 +277,20 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
243
277
|
type: z.ZodDefault<z.ZodEnum<["none", "soft", "hard"]>>;
|
|
244
278
|
mode: z.ZodDefault<z.ZodEnum<["none", "human_approval", "checklist"]>>;
|
|
245
279
|
checklist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
280
|
+
/** Role names, or human for a person listed on the team. */
|
|
281
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
246
282
|
overridable: z.ZodDefault<z.ZodBoolean>;
|
|
247
283
|
}, "strip", z.ZodTypeAny, {
|
|
248
284
|
type: "none" | "soft" | "hard";
|
|
249
285
|
checklist: string[];
|
|
250
286
|
mode: "none" | "human_approval" | "checklist";
|
|
251
287
|
overridable: boolean;
|
|
288
|
+
approvers?: string[] | undefined;
|
|
252
289
|
}, {
|
|
253
290
|
type?: "none" | "soft" | "hard" | undefined;
|
|
254
291
|
checklist?: string[] | undefined;
|
|
255
292
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
293
|
+
approvers?: string[] | undefined;
|
|
256
294
|
overridable?: boolean | undefined;
|
|
257
295
|
}>>;
|
|
258
296
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -318,10 +356,14 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
318
356
|
checklist: string[];
|
|
319
357
|
mode: "none" | "human_approval" | "checklist";
|
|
320
358
|
overridable: boolean;
|
|
359
|
+
approvers?: string[] | undefined;
|
|
321
360
|
};
|
|
322
361
|
skippable: boolean;
|
|
323
362
|
title?: string | undefined;
|
|
324
363
|
summary?: string | undefined;
|
|
364
|
+
owner?: string | undefined;
|
|
365
|
+
collaborates?: string[] | undefined;
|
|
366
|
+
items_from?: string | undefined;
|
|
325
367
|
skip_when?: {
|
|
326
368
|
flags?: string[] | undefined;
|
|
327
369
|
} | undefined;
|
|
@@ -343,6 +385,9 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
343
385
|
summary?: string | undefined;
|
|
344
386
|
kind?: "standard" | "brainstorm" | "clarify" | undefined;
|
|
345
387
|
optional?: boolean | undefined;
|
|
388
|
+
owner?: string | undefined;
|
|
389
|
+
collaborates?: string[] | undefined;
|
|
390
|
+
items_from?: string | undefined;
|
|
346
391
|
artifacts?: {
|
|
347
392
|
path: string;
|
|
348
393
|
id: string;
|
|
@@ -353,6 +398,7 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
353
398
|
type?: "none" | "soft" | "hard" | undefined;
|
|
354
399
|
checklist?: string[] | undefined;
|
|
355
400
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
401
|
+
approvers?: string[] | undefined;
|
|
356
402
|
overridable?: boolean | undefined;
|
|
357
403
|
} | undefined;
|
|
358
404
|
skippable?: boolean | undefined;
|
|
@@ -435,10 +481,14 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
435
481
|
checklist: string[];
|
|
436
482
|
mode: "none" | "human_approval" | "checklist";
|
|
437
483
|
overridable: boolean;
|
|
484
|
+
approvers?: string[] | undefined;
|
|
438
485
|
};
|
|
439
486
|
skippable: boolean;
|
|
440
487
|
title?: string | undefined;
|
|
441
488
|
summary?: string | undefined;
|
|
489
|
+
owner?: string | undefined;
|
|
490
|
+
collaborates?: string[] | undefined;
|
|
491
|
+
items_from?: string | undefined;
|
|
442
492
|
skip_when?: {
|
|
443
493
|
flags?: string[] | undefined;
|
|
444
494
|
} | undefined;
|
|
@@ -477,6 +527,9 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
477
527
|
summary?: string | undefined;
|
|
478
528
|
kind?: "standard" | "brainstorm" | "clarify" | undefined;
|
|
479
529
|
optional?: boolean | undefined;
|
|
530
|
+
owner?: string | undefined;
|
|
531
|
+
collaborates?: string[] | undefined;
|
|
532
|
+
items_from?: string | undefined;
|
|
480
533
|
artifacts?: {
|
|
481
534
|
path: string;
|
|
482
535
|
id: string;
|
|
@@ -487,6 +540,7 @@ declare const WorkflowSchema: z.ZodObject<{
|
|
|
487
540
|
type?: "none" | "soft" | "hard" | undefined;
|
|
488
541
|
checklist?: string[] | undefined;
|
|
489
542
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
543
|
+
approvers?: string[] | undefined;
|
|
490
544
|
overridable?: boolean | undefined;
|
|
491
545
|
} | undefined;
|
|
492
546
|
skippable?: boolean | undefined;
|
|
@@ -681,6 +735,15 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
681
735
|
kind: z.ZodDefault<z.ZodEnum<["standard", "brainstorm", "clarify"]>>;
|
|
682
736
|
/** When true, stage is optional (skippable); agents may skip if not needed */
|
|
683
737
|
optional: z.ZodDefault<z.ZodBoolean>;
|
|
738
|
+
/** Role that produces this stage. */
|
|
739
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
740
|
+
/** Roles who work with the owner on this stage. */
|
|
741
|
+
collaborates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
742
|
+
/**
|
|
743
|
+
* One item per matching file when the stage starts.
|
|
744
|
+
* A directory, a slash, and one star in the file name: tasks/T-*.md
|
|
745
|
+
*/
|
|
746
|
+
items_from: z.ZodOptional<z.ZodString>;
|
|
684
747
|
artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
685
748
|
id: z.ZodString;
|
|
686
749
|
path: z.ZodString;
|
|
@@ -701,16 +764,20 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
701
764
|
type: z.ZodDefault<z.ZodEnum<["none", "soft", "hard"]>>;
|
|
702
765
|
mode: z.ZodDefault<z.ZodEnum<["none", "human_approval", "checklist"]>>;
|
|
703
766
|
checklist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
767
|
+
/** Role names, or human for a person listed on the team. */
|
|
768
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
704
769
|
overridable: z.ZodDefault<z.ZodBoolean>;
|
|
705
770
|
}, "strip", z.ZodTypeAny, {
|
|
706
771
|
type: "none" | "soft" | "hard";
|
|
707
772
|
checklist: string[];
|
|
708
773
|
mode: "none" | "human_approval" | "checklist";
|
|
709
774
|
overridable: boolean;
|
|
775
|
+
approvers?: string[] | undefined;
|
|
710
776
|
}, {
|
|
711
777
|
type?: "none" | "soft" | "hard" | undefined;
|
|
712
778
|
checklist?: string[] | undefined;
|
|
713
779
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
780
|
+
approvers?: string[] | undefined;
|
|
714
781
|
overridable?: boolean | undefined;
|
|
715
782
|
}>>;
|
|
716
783
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -776,10 +843,14 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
776
843
|
checklist: string[];
|
|
777
844
|
mode: "none" | "human_approval" | "checklist";
|
|
778
845
|
overridable: boolean;
|
|
846
|
+
approvers?: string[] | undefined;
|
|
779
847
|
};
|
|
780
848
|
skippable: boolean;
|
|
781
849
|
title?: string | undefined;
|
|
782
850
|
summary?: string | undefined;
|
|
851
|
+
owner?: string | undefined;
|
|
852
|
+
collaborates?: string[] | undefined;
|
|
853
|
+
items_from?: string | undefined;
|
|
783
854
|
skip_when?: {
|
|
784
855
|
flags?: string[] | undefined;
|
|
785
856
|
} | undefined;
|
|
@@ -801,6 +872,9 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
801
872
|
summary?: string | undefined;
|
|
802
873
|
kind?: "standard" | "brainstorm" | "clarify" | undefined;
|
|
803
874
|
optional?: boolean | undefined;
|
|
875
|
+
owner?: string | undefined;
|
|
876
|
+
collaborates?: string[] | undefined;
|
|
877
|
+
items_from?: string | undefined;
|
|
804
878
|
artifacts?: {
|
|
805
879
|
path: string;
|
|
806
880
|
id: string;
|
|
@@ -811,6 +885,7 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
811
885
|
type?: "none" | "soft" | "hard" | undefined;
|
|
812
886
|
checklist?: string[] | undefined;
|
|
813
887
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
888
|
+
approvers?: string[] | undefined;
|
|
814
889
|
overridable?: boolean | undefined;
|
|
815
890
|
} | undefined;
|
|
816
891
|
skippable?: boolean | undefined;
|
|
@@ -848,10 +923,14 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
848
923
|
checklist: string[];
|
|
849
924
|
mode: "none" | "human_approval" | "checklist";
|
|
850
925
|
overridable: boolean;
|
|
926
|
+
approvers?: string[] | undefined;
|
|
851
927
|
};
|
|
852
928
|
skippable: boolean;
|
|
853
929
|
title?: string | undefined;
|
|
854
930
|
summary?: string | undefined;
|
|
931
|
+
owner?: string | undefined;
|
|
932
|
+
collaborates?: string[] | undefined;
|
|
933
|
+
items_from?: string | undefined;
|
|
855
934
|
skip_when?: {
|
|
856
935
|
flags?: string[] | undefined;
|
|
857
936
|
} | undefined;
|
|
@@ -877,6 +956,9 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
877
956
|
summary?: string | undefined;
|
|
878
957
|
kind?: "standard" | "brainstorm" | "clarify" | undefined;
|
|
879
958
|
optional?: boolean | undefined;
|
|
959
|
+
owner?: string | undefined;
|
|
960
|
+
collaborates?: string[] | undefined;
|
|
961
|
+
items_from?: string | undefined;
|
|
880
962
|
artifacts?: {
|
|
881
963
|
path: string;
|
|
882
964
|
id: string;
|
|
@@ -887,6 +969,7 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
887
969
|
type?: "none" | "soft" | "hard" | undefined;
|
|
888
970
|
checklist?: string[] | undefined;
|
|
889
971
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
972
|
+
approvers?: string[] | undefined;
|
|
890
973
|
overridable?: boolean | undefined;
|
|
891
974
|
} | undefined;
|
|
892
975
|
skippable?: boolean | undefined;
|
|
@@ -1011,10 +1094,14 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
1011
1094
|
checklist: string[];
|
|
1012
1095
|
mode: "none" | "human_approval" | "checklist";
|
|
1013
1096
|
overridable: boolean;
|
|
1097
|
+
approvers?: string[] | undefined;
|
|
1014
1098
|
};
|
|
1015
1099
|
skippable: boolean;
|
|
1016
1100
|
title?: string | undefined;
|
|
1017
1101
|
summary?: string | undefined;
|
|
1102
|
+
owner?: string | undefined;
|
|
1103
|
+
collaborates?: string[] | undefined;
|
|
1104
|
+
items_from?: string | undefined;
|
|
1018
1105
|
skip_when?: {
|
|
1019
1106
|
flags?: string[] | undefined;
|
|
1020
1107
|
} | undefined;
|
|
@@ -1086,6 +1173,9 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
1086
1173
|
summary?: string | undefined;
|
|
1087
1174
|
kind?: "standard" | "brainstorm" | "clarify" | undefined;
|
|
1088
1175
|
optional?: boolean | undefined;
|
|
1176
|
+
owner?: string | undefined;
|
|
1177
|
+
collaborates?: string[] | undefined;
|
|
1178
|
+
items_from?: string | undefined;
|
|
1089
1179
|
artifacts?: {
|
|
1090
1180
|
path: string;
|
|
1091
1181
|
id: string;
|
|
@@ -1096,6 +1186,7 @@ declare const ChangeMetaSchema: z.ZodObject<{
|
|
|
1096
1186
|
type?: "none" | "soft" | "hard" | undefined;
|
|
1097
1187
|
checklist?: string[] | undefined;
|
|
1098
1188
|
mode?: "none" | "human_approval" | "checklist" | undefined;
|
|
1189
|
+
approvers?: string[] | undefined;
|
|
1099
1190
|
overridable?: boolean | undefined;
|
|
1100
1191
|
} | undefined;
|
|
1101
1192
|
skippable?: boolean | undefined;
|
|
@@ -1240,6 +1331,37 @@ declare const TokenUsageMetricSchema: z.ZodObject<{
|
|
|
1240
1331
|
measured: true;
|
|
1241
1332
|
model?: string | null | undefined;
|
|
1242
1333
|
}>;
|
|
1334
|
+
declare const DecisionMetricSchema: z.ZodObject<{
|
|
1335
|
+
workType: z.ZodEnum<["route", "classify", "check", "draft", "design", "code", "review"]>;
|
|
1336
|
+
kind: z.ZodEnum<["reason", "decide"]>;
|
|
1337
|
+
provider: z.ZodEnum<["command", "ollama"]>;
|
|
1338
|
+
model: z.ZodNullable<z.ZodString>;
|
|
1339
|
+
startedAt: z.ZodString;
|
|
1340
|
+
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
1341
|
+
cacheReadTokens: z.ZodNullable<z.ZodNumber>;
|
|
1342
|
+
cacheWriteTokens: z.ZodNullable<z.ZodNumber>;
|
|
1343
|
+
outputTokens: z.ZodNullable<z.ZodNumber>;
|
|
1344
|
+
}, "strip", z.ZodTypeAny, {
|
|
1345
|
+
kind: "reason" | "decide";
|
|
1346
|
+
startedAt: string;
|
|
1347
|
+
provider: "command" | "ollama";
|
|
1348
|
+
model: string | null;
|
|
1349
|
+
inputTokens: number | null;
|
|
1350
|
+
cacheReadTokens: number | null;
|
|
1351
|
+
cacheWriteTokens: number | null;
|
|
1352
|
+
outputTokens: number | null;
|
|
1353
|
+
workType: "code" | "route" | "classify" | "check" | "draft" | "design" | "review";
|
|
1354
|
+
}, {
|
|
1355
|
+
kind: "reason" | "decide";
|
|
1356
|
+
startedAt: string;
|
|
1357
|
+
provider: "command" | "ollama";
|
|
1358
|
+
model: string | null;
|
|
1359
|
+
inputTokens: number | null;
|
|
1360
|
+
cacheReadTokens: number | null;
|
|
1361
|
+
cacheWriteTokens: number | null;
|
|
1362
|
+
outputTokens: number | null;
|
|
1363
|
+
workType: "code" | "route" | "classify" | "check" | "draft" | "design" | "review";
|
|
1364
|
+
}>;
|
|
1243
1365
|
declare const ChangeMetricsSchema: z.ZodObject<{
|
|
1244
1366
|
version: z.ZodLiteral<1>;
|
|
1245
1367
|
phases: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
@@ -1297,6 +1419,37 @@ declare const ChangeMetricsSchema: z.ZodObject<{
|
|
|
1297
1419
|
measured: true;
|
|
1298
1420
|
model?: string | null | undefined;
|
|
1299
1421
|
}>, "many">;
|
|
1422
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1423
|
+
workType: z.ZodEnum<["route", "classify", "check", "draft", "design", "code", "review"]>;
|
|
1424
|
+
kind: z.ZodEnum<["reason", "decide"]>;
|
|
1425
|
+
provider: z.ZodEnum<["command", "ollama"]>;
|
|
1426
|
+
model: z.ZodNullable<z.ZodString>;
|
|
1427
|
+
startedAt: z.ZodString;
|
|
1428
|
+
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
1429
|
+
cacheReadTokens: z.ZodNullable<z.ZodNumber>;
|
|
1430
|
+
cacheWriteTokens: z.ZodNullable<z.ZodNumber>;
|
|
1431
|
+
outputTokens: z.ZodNullable<z.ZodNumber>;
|
|
1432
|
+
}, "strip", z.ZodTypeAny, {
|
|
1433
|
+
kind: "reason" | "decide";
|
|
1434
|
+
startedAt: string;
|
|
1435
|
+
provider: "command" | "ollama";
|
|
1436
|
+
model: string | null;
|
|
1437
|
+
inputTokens: number | null;
|
|
1438
|
+
cacheReadTokens: number | null;
|
|
1439
|
+
cacheWriteTokens: number | null;
|
|
1440
|
+
outputTokens: number | null;
|
|
1441
|
+
workType: "code" | "route" | "classify" | "check" | "draft" | "design" | "review";
|
|
1442
|
+
}, {
|
|
1443
|
+
kind: "reason" | "decide";
|
|
1444
|
+
startedAt: string;
|
|
1445
|
+
provider: "command" | "ollama";
|
|
1446
|
+
model: string | null;
|
|
1447
|
+
inputTokens: number | null;
|
|
1448
|
+
cacheReadTokens: number | null;
|
|
1449
|
+
cacheWriteTokens: number | null;
|
|
1450
|
+
outputTokens: number | null;
|
|
1451
|
+
workType: "code" | "route" | "classify" | "check" | "draft" | "design" | "review";
|
|
1452
|
+
}>, "many">>;
|
|
1300
1453
|
}, "strip", z.ZodTypeAny, {
|
|
1301
1454
|
version: 1;
|
|
1302
1455
|
phases: {
|
|
@@ -1316,6 +1469,17 @@ declare const ChangeMetricsSchema: z.ZodObject<{
|
|
|
1316
1469
|
measured: true;
|
|
1317
1470
|
model?: string | null | undefined;
|
|
1318
1471
|
}[];
|
|
1472
|
+
decisions?: {
|
|
1473
|
+
kind: "reason" | "decide";
|
|
1474
|
+
startedAt: string;
|
|
1475
|
+
provider: "command" | "ollama";
|
|
1476
|
+
model: string | null;
|
|
1477
|
+
inputTokens: number | null;
|
|
1478
|
+
cacheReadTokens: number | null;
|
|
1479
|
+
cacheWriteTokens: number | null;
|
|
1480
|
+
outputTokens: number | null;
|
|
1481
|
+
workType: "code" | "route" | "classify" | "check" | "draft" | "design" | "review";
|
|
1482
|
+
}[] | undefined;
|
|
1319
1483
|
}, {
|
|
1320
1484
|
version: 1;
|
|
1321
1485
|
phases: {
|
|
@@ -1335,9 +1499,21 @@ declare const ChangeMetricsSchema: z.ZodObject<{
|
|
|
1335
1499
|
measured: true;
|
|
1336
1500
|
model?: string | null | undefined;
|
|
1337
1501
|
}[];
|
|
1502
|
+
decisions?: {
|
|
1503
|
+
kind: "reason" | "decide";
|
|
1504
|
+
startedAt: string;
|
|
1505
|
+
provider: "command" | "ollama";
|
|
1506
|
+
model: string | null;
|
|
1507
|
+
inputTokens: number | null;
|
|
1508
|
+
cacheReadTokens: number | null;
|
|
1509
|
+
cacheWriteTokens: number | null;
|
|
1510
|
+
outputTokens: number | null;
|
|
1511
|
+
workType: "code" | "route" | "classify" | "check" | "draft" | "design" | "review";
|
|
1512
|
+
}[] | undefined;
|
|
1338
1513
|
}>;
|
|
1339
1514
|
type PhaseMetric = z.infer<typeof PhaseMetricSchema>;
|
|
1340
1515
|
type TokenUsageMetric = z.infer<typeof TokenUsageMetricSchema>;
|
|
1516
|
+
type DecisionMetric = z.infer<typeof DecisionMetricSchema>;
|
|
1341
1517
|
type ChangeMetrics = z.infer<typeof ChangeMetricsSchema>;
|
|
1342
1518
|
interface MetricsImportResult {
|
|
1343
1519
|
imported: number;
|
|
@@ -1349,6 +1525,7 @@ interface MetricsImportResult {
|
|
|
1349
1525
|
}
|
|
1350
1526
|
declare function emptyChangeMetrics(): ChangeMetrics;
|
|
1351
1527
|
declare function readChangeMetrics(projectRoot: string, config: Config, changeId: string): Promise<ChangeMetrics>;
|
|
1528
|
+
declare function recordDecisionMetric(projectRoot: string, config: Config, changeId: string, draft: DecisionMetric): Promise<void>;
|
|
1352
1529
|
declare function startPhase(projectRoot: string, config: Config, changeId: string, phase: string, startedAt?: string): Promise<void>;
|
|
1353
1530
|
declare function transitionPhase(projectRoot: string, config: Config, changeId: string, fromPhase: string, toPhase: string | null, at?: string, fromStartedAt?: string): Promise<void>;
|
|
1354
1531
|
/**
|
|
@@ -1827,6 +2004,11 @@ declare function syncChangeHead(projectRoot: string, config: Config, changeId: s
|
|
|
1827
2004
|
}): Promise<SyncChangeResult>;
|
|
1828
2005
|
|
|
1829
2006
|
declare function listWorkflowNames(projectRoot: string): Promise<string[]>;
|
|
2007
|
+
/** Workflow packs shipped inside this CLI build. */
|
|
2008
|
+
declare function listBundledWorkflowNames(): Promise<string[]>;
|
|
2009
|
+
/** Bundled workflow names that this project has not copied into `.sdd/workflows/`. */
|
|
2010
|
+
declare function missingBundledWorkflows(projectRoot: string): Promise<string[]>;
|
|
2011
|
+
declare function workflowUnavailableMessage(name: string, available: string[], bundled: string[]): string;
|
|
1830
2012
|
declare function loadWorkflow(projectRoot: string, name: string): Promise<Workflow>;
|
|
1831
2013
|
/** Resolve effective stages for a change (workflow + per-change overrides). */
|
|
1832
2014
|
declare function resolveStages(workflow: Workflow, meta: ChangeMeta): Stage[];
|
|
@@ -1855,6 +2037,9 @@ declare function recommendWorkflow(projectRoot: string, title: string, config: C
|
|
|
1855
2037
|
alternatives: string[];
|
|
1856
2038
|
}>;
|
|
1857
2039
|
|
|
2040
|
+
/** cl100k counts for each workflow file, its artifact templates, and the active change. */
|
|
2041
|
+
declare function formatTokenInventory(projectRoot: string, config: Config): Promise<string>;
|
|
2042
|
+
|
|
1858
2043
|
interface ChangeContext {
|
|
1859
2044
|
id: string;
|
|
1860
2045
|
/** Absolute directory used for file reads and writes. */
|
|
@@ -1881,7 +2066,7 @@ declare function resolveChangeId(projectRoot: string, config: Config, changeId?:
|
|
|
1881
2066
|
*/
|
|
1882
2067
|
declare function incompletePriorStageErrors(ctx: ChangeContext): Promise<string[]>;
|
|
1883
2068
|
/** Artifact + gate + verify checks before leaving the current stage. */
|
|
1884
|
-
declare function canLeaveStage(ctx: ChangeContext, config: Config): Promise<{
|
|
2069
|
+
declare function canLeaveStage(ctx: ChangeContext, config: Config, projectRoot?: string): Promise<{
|
|
1885
2070
|
ok: boolean;
|
|
1886
2071
|
errors: string[];
|
|
1887
2072
|
warnings: string[];
|
|
@@ -2005,6 +2190,29 @@ declare function saveGeneratedManifest(path: string, manifest: GeneratedManifest
|
|
|
2005
2190
|
declare function reconcileGeneratedTree(projectRoot: string, sourceDir: string, destinationDir: string, destinationRelative: string, manifest: GeneratedManifest, force: boolean): Promise<ReconcileGeneratedResult>;
|
|
2006
2191
|
declare function describeKept(k: KeptFile): string;
|
|
2007
2192
|
|
|
2193
|
+
/** One product role, in the order the host agent must run. */
|
|
2194
|
+
interface ProductTeamMember {
|
|
2195
|
+
order: number;
|
|
2196
|
+
name: string;
|
|
2197
|
+
job: string;
|
|
2198
|
+
accepts: string;
|
|
2199
|
+
file: string;
|
|
2200
|
+
source: "repo" | "user";
|
|
2201
|
+
}
|
|
2202
|
+
/**
|
|
2203
|
+
* Directory whose `.sdd/` holds a user-default team.
|
|
2204
|
+
* `SDD_HOME` overrides the home directory so a test does not read a real `~/.sdd`.
|
|
2205
|
+
*/
|
|
2206
|
+
declare function productTeamHome(): string;
|
|
2207
|
+
/**
|
|
2208
|
+
* Product team for the host entrypoint.
|
|
2209
|
+
* A repo `team.yaml` sets the order. Role files in name order are the fallback.
|
|
2210
|
+
* A user-global team is used only when the repo has neither.
|
|
2211
|
+
*/
|
|
2212
|
+
declare function loadProductTeam(projectRoot: string): Promise<ProductTeamMember[]>;
|
|
2213
|
+
/** Markdown block for protocol, AGENTS.md, the host rule, and the handoff. */
|
|
2214
|
+
declare function renderProductTeamSection(members: ProductTeamMember[]): string;
|
|
2215
|
+
|
|
2008
2216
|
/**
|
|
2009
2217
|
* AI coding agents (not IDEs).
|
|
2010
2218
|
* Speckit-style: one integration at a time; public keys: `copilot` | `claude` | `grok` | `ollama` | `kilo`.
|
|
@@ -2158,7 +2366,7 @@ declare function installAgentIntegration(opts: InstallAgentOptions): Promise<Ins
|
|
|
2158
2366
|
*/
|
|
2159
2367
|
declare function installAgentIntegrations(opts: InstallAgentsOptions): Promise<InstallAgentsResult>;
|
|
2160
2368
|
/** Thin agent body shared across hosts (same text). Paths come from config. */
|
|
2161
|
-
declare function renderThinAgent(role: SddAgentRole, config?: Config): string;
|
|
2369
|
+
declare function renderThinAgent(role: SddAgentRole, config?: Config, team?: ProductTeamMember[]): string;
|
|
2162
2370
|
interface InstalledAgentSnapshot {
|
|
2163
2371
|
/** Public key: copilot | claude | grok | ollama | kilo */
|
|
2164
2372
|
ai: string;
|
|
@@ -2193,8 +2401,8 @@ declare function refreshActiveAgentContext(projectRoot: string): Promise<string
|
|
|
2193
2401
|
/** Default-path protocol text. Generated files use {@link renderProtocolMd}. */
|
|
2194
2402
|
declare const PROTOCOL_MD: string;
|
|
2195
2403
|
/** Single playbook — paths come from project config, not hard-coded defaults. */
|
|
2196
|
-
declare function renderProtocolMd(config: Pick<Config, "memory_path" | "changes_path"
|
|
2197
|
-
declare function renderAgentsMd(integ: AgentIntegration, config?: Config): string;
|
|
2404
|
+
declare function renderProtocolMd(config: Pick<Config, "memory_path" | "changes_path">, team?: ProductTeamMember[]): string;
|
|
2405
|
+
declare function renderAgentsMd(integ: AgentIntegration, config?: Config, team?: ProductTeamMember[]): string;
|
|
2198
2406
|
|
|
2199
2407
|
interface InitOptions {
|
|
2200
2408
|
projectRoot: string;
|
|
@@ -2277,6 +2485,7 @@ declare function uniqueChangeDirName(base: string, taken: Set<string>): string;
|
|
|
2277
2485
|
*/
|
|
2278
2486
|
declare function defaultsRoot(): string;
|
|
2279
2487
|
declare function defaultWorkflowsDir(): string;
|
|
2488
|
+
declare function defaultTeamsDir(): string;
|
|
2280
2489
|
declare function defaultTemplatesDir(): string;
|
|
2281
2490
|
declare function defaultMemoryDir(): string;
|
|
2282
2491
|
declare function defaultMcpYamlPath(): string;
|
|
@@ -2764,9 +2973,9 @@ declare const McpSourceSchema: z.ZodObject<{
|
|
|
2764
2973
|
};
|
|
2765
2974
|
priority: number;
|
|
2766
2975
|
enabled: boolean;
|
|
2976
|
+
command: string;
|
|
2767
2977
|
args: string[];
|
|
2768
2978
|
transport: "stdio";
|
|
2769
|
-
command: string;
|
|
2770
2979
|
env: Record<string, string>;
|
|
2771
2980
|
cwd?: string | undefined;
|
|
2772
2981
|
invoke?: {
|
|
@@ -2873,9 +3082,9 @@ declare const McpConfigSchema: z.ZodObject<{
|
|
|
2873
3082
|
};
|
|
2874
3083
|
priority: number;
|
|
2875
3084
|
enabled: boolean;
|
|
3085
|
+
command: string;
|
|
2876
3086
|
args: string[];
|
|
2877
3087
|
transport: "stdio";
|
|
2878
|
-
command: string;
|
|
2879
3088
|
env: Record<string, string>;
|
|
2880
3089
|
cwd?: string | undefined;
|
|
2881
3090
|
invoke?: {
|
|
@@ -2920,9 +3129,9 @@ declare const McpConfigSchema: z.ZodObject<{
|
|
|
2920
3129
|
};
|
|
2921
3130
|
priority: number;
|
|
2922
3131
|
enabled: boolean;
|
|
3132
|
+
command: string;
|
|
2923
3133
|
args: string[];
|
|
2924
3134
|
transport: "stdio";
|
|
2925
|
-
command: string;
|
|
2926
3135
|
env: Record<string, string>;
|
|
2927
3136
|
cwd?: string | undefined;
|
|
2928
3137
|
invoke?: {
|
|
@@ -3051,7 +3260,20 @@ declare function gatherMcpContextForChange(projectRoot: string, ctx: ChangeConte
|
|
|
3051
3260
|
declare function formatMcpContextForHandoff(results: McpFetchResult[]): string;
|
|
3052
3261
|
declare function listMatchingSourceIds(sources: McpSource[], match: McpMatchContext): string[];
|
|
3053
3262
|
|
|
3054
|
-
interface
|
|
3263
|
+
interface RoleLists {
|
|
3264
|
+
owns: string[];
|
|
3265
|
+
inputs: string[];
|
|
3266
|
+
outputs: string[];
|
|
3267
|
+
collaborates: string[];
|
|
3268
|
+
reviews: string[];
|
|
3269
|
+
approvers: string[];
|
|
3270
|
+
never: string[];
|
|
3271
|
+
askHumanWhen: string[];
|
|
3272
|
+
skills: string[];
|
|
3273
|
+
rules: string[];
|
|
3274
|
+
goals: string[];
|
|
3275
|
+
}
|
|
3276
|
+
interface RoleProfile extends RoleLists {
|
|
3055
3277
|
name: string;
|
|
3056
3278
|
label: string;
|
|
3057
3279
|
job: string;
|
|
@@ -3066,6 +3288,27 @@ interface RoleModel {
|
|
|
3066
3288
|
prompt: string;
|
|
3067
3289
|
}): Promise<string>;
|
|
3068
3290
|
}
|
|
3291
|
+
declare const WORK_TYPES: readonly ["route", "classify", "check", "draft", "design", "code", "review"];
|
|
3292
|
+
type WorkType = (typeof WORK_TYPES)[number];
|
|
3293
|
+
declare function isWorkType(value: string): value is WorkType;
|
|
3294
|
+
/** Route, classify, and check are cheap decisions. The other work types reason. */
|
|
3295
|
+
declare function workKind(workType: WorkType): "reason" | "decide";
|
|
3296
|
+
interface DecisionModel {
|
|
3297
|
+
decide<T extends string>(input: {
|
|
3298
|
+
state: string;
|
|
3299
|
+
question: string;
|
|
3300
|
+
options: readonly T[];
|
|
3301
|
+
}): Promise<{
|
|
3302
|
+
pick: T;
|
|
3303
|
+
probs: Record<T, number>;
|
|
3304
|
+
}>;
|
|
3305
|
+
}
|
|
3306
|
+
interface ModelChoice {
|
|
3307
|
+
id: string;
|
|
3308
|
+
kind: "reason" | "decide";
|
|
3309
|
+
provider: "rules" | "command" | "ollama";
|
|
3310
|
+
why: string;
|
|
3311
|
+
}
|
|
3069
3312
|
interface RoleCommandResult {
|
|
3070
3313
|
exitCode: number;
|
|
3071
3314
|
stdout: string;
|
|
@@ -3126,13 +3369,23 @@ interface AllowRoleInput {
|
|
|
3126
3369
|
declare function runRole(root: string, input: RunRoleInput): Promise<RoleCommandResult>;
|
|
3127
3370
|
declare function allowRole(root: string, input: AllowRoleInput): Promise<RoleCommandResult>;
|
|
3128
3371
|
|
|
3372
|
+
declare function recordSignoff(root: string, input: {
|
|
3373
|
+
note?: string;
|
|
3374
|
+
stage?: string;
|
|
3375
|
+
change?: string;
|
|
3376
|
+
}): Promise<RoleCommandResult>;
|
|
3377
|
+
declare function recordDecisionRequest(root: string, input: {
|
|
3378
|
+
note?: string;
|
|
3379
|
+
change?: string;
|
|
3380
|
+
}): Promise<RoleCommandResult>;
|
|
3381
|
+
|
|
3129
3382
|
declare function createRole(root: string, input: {
|
|
3130
3383
|
name: string;
|
|
3131
3384
|
label: string;
|
|
3132
3385
|
job: string;
|
|
3133
3386
|
description?: string;
|
|
3134
3387
|
askFirst?: boolean;
|
|
3135
|
-
}): Promise<RoleCommandResult>;
|
|
3388
|
+
} & Partial<RoleLists>): Promise<RoleCommandResult>;
|
|
3136
3389
|
declare function editRole(root: string, nameInput: string, patch: {
|
|
3137
3390
|
label?: string;
|
|
3138
3391
|
job?: string;
|
|
@@ -3148,6 +3401,547 @@ declare function showRoles(root: string, opts?: {
|
|
|
3148
3401
|
declare function duplicateRole(root: string, nameInput: string): Promise<RoleCommandResult>;
|
|
3149
3402
|
declare function deleteRole(root: string, nameInput: string): Promise<RoleCommandResult>;
|
|
3150
3403
|
|
|
3404
|
+
/** Project team file written to `.sdd/team.yaml`. */
|
|
3405
|
+
declare const TeamSchema: z.ZodEffects<z.ZodObject<{
|
|
3406
|
+
template: z.ZodOptional<z.ZodString>;
|
|
3407
|
+
branch: z.ZodString;
|
|
3408
|
+
rooms: z.ZodObject<{
|
|
3409
|
+
commit: z.ZodBoolean;
|
|
3410
|
+
}, "strict", z.ZodTypeAny, {
|
|
3411
|
+
commit: boolean;
|
|
3412
|
+
}, {
|
|
3413
|
+
commit: boolean;
|
|
3414
|
+
}>;
|
|
3415
|
+
bots: z.ZodArray<z.ZodObject<{
|
|
3416
|
+
name: z.ZodString;
|
|
3417
|
+
role: z.ZodString;
|
|
3418
|
+
wip: z.ZodNumber;
|
|
3419
|
+
}, "strict", z.ZodTypeAny, {
|
|
3420
|
+
name: string;
|
|
3421
|
+
role: string;
|
|
3422
|
+
wip: number;
|
|
3423
|
+
}, {
|
|
3424
|
+
name: string;
|
|
3425
|
+
role: string;
|
|
3426
|
+
wip: number;
|
|
3427
|
+
}>, "many">;
|
|
3428
|
+
humans: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3429
|
+
name: z.ZodString;
|
|
3430
|
+
}, "strict", z.ZodTypeAny, {
|
|
3431
|
+
name: string;
|
|
3432
|
+
}, {
|
|
3433
|
+
name: string;
|
|
3434
|
+
}>, "many">>;
|
|
3435
|
+
role_wip: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
3436
|
+
limits: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
3437
|
+
loop_max_steps: z.ZodOptional<z.ZodNumber>;
|
|
3438
|
+
room_rounds: z.ZodOptional<z.ZodNumber>;
|
|
3439
|
+
}, "strict", z.ZodTypeAny, {
|
|
3440
|
+
loop_max_steps?: number | undefined;
|
|
3441
|
+
room_rounds?: number | undefined;
|
|
3442
|
+
}, {
|
|
3443
|
+
loop_max_steps?: number | undefined;
|
|
3444
|
+
room_rounds?: number | undefined;
|
|
3445
|
+
}>, {
|
|
3446
|
+
loop_max_steps?: number | undefined;
|
|
3447
|
+
room_rounds?: number | undefined;
|
|
3448
|
+
}, {
|
|
3449
|
+
loop_max_steps?: number | undefined;
|
|
3450
|
+
room_rounds?: number | undefined;
|
|
3451
|
+
}>>;
|
|
3452
|
+
}, "strict", z.ZodTypeAny, {
|
|
3453
|
+
branch: string;
|
|
3454
|
+
bots: {
|
|
3455
|
+
name: string;
|
|
3456
|
+
role: string;
|
|
3457
|
+
wip: number;
|
|
3458
|
+
}[];
|
|
3459
|
+
rooms: {
|
|
3460
|
+
commit: boolean;
|
|
3461
|
+
};
|
|
3462
|
+
humans: {
|
|
3463
|
+
name: string;
|
|
3464
|
+
}[];
|
|
3465
|
+
template?: string | undefined;
|
|
3466
|
+
role_wip?: Record<string, number> | undefined;
|
|
3467
|
+
limits?: {
|
|
3468
|
+
loop_max_steps?: number | undefined;
|
|
3469
|
+
room_rounds?: number | undefined;
|
|
3470
|
+
} | undefined;
|
|
3471
|
+
}, {
|
|
3472
|
+
branch: string;
|
|
3473
|
+
bots: {
|
|
3474
|
+
name: string;
|
|
3475
|
+
role: string;
|
|
3476
|
+
wip: number;
|
|
3477
|
+
}[];
|
|
3478
|
+
rooms: {
|
|
3479
|
+
commit: boolean;
|
|
3480
|
+
};
|
|
3481
|
+
template?: string | undefined;
|
|
3482
|
+
humans?: {
|
|
3483
|
+
name: string;
|
|
3484
|
+
}[] | undefined;
|
|
3485
|
+
role_wip?: Record<string, number> | undefined;
|
|
3486
|
+
limits?: {
|
|
3487
|
+
loop_max_steps?: number | undefined;
|
|
3488
|
+
room_rounds?: number | undefined;
|
|
3489
|
+
} | undefined;
|
|
3490
|
+
}>, {
|
|
3491
|
+
branch: string;
|
|
3492
|
+
bots: {
|
|
3493
|
+
name: string;
|
|
3494
|
+
role: string;
|
|
3495
|
+
wip: number;
|
|
3496
|
+
}[];
|
|
3497
|
+
rooms: {
|
|
3498
|
+
commit: boolean;
|
|
3499
|
+
};
|
|
3500
|
+
humans: {
|
|
3501
|
+
name: string;
|
|
3502
|
+
}[];
|
|
3503
|
+
template?: string | undefined;
|
|
3504
|
+
role_wip?: Record<string, number> | undefined;
|
|
3505
|
+
limits?: {
|
|
3506
|
+
loop_max_steps?: number | undefined;
|
|
3507
|
+
room_rounds?: number | undefined;
|
|
3508
|
+
} | undefined;
|
|
3509
|
+
}, {
|
|
3510
|
+
branch: string;
|
|
3511
|
+
bots: {
|
|
3512
|
+
name: string;
|
|
3513
|
+
role: string;
|
|
3514
|
+
wip: number;
|
|
3515
|
+
}[];
|
|
3516
|
+
rooms: {
|
|
3517
|
+
commit: boolean;
|
|
3518
|
+
};
|
|
3519
|
+
template?: string | undefined;
|
|
3520
|
+
humans?: {
|
|
3521
|
+
name: string;
|
|
3522
|
+
}[] | undefined;
|
|
3523
|
+
role_wip?: Record<string, number> | undefined;
|
|
3524
|
+
limits?: {
|
|
3525
|
+
loop_max_steps?: number | undefined;
|
|
3526
|
+
room_rounds?: number | undefined;
|
|
3527
|
+
} | undefined;
|
|
3528
|
+
}>;
|
|
3529
|
+
type TeamConfig = z.infer<typeof TeamSchema>;
|
|
3530
|
+
|
|
3531
|
+
declare const ModelEntrySchema: z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
|
|
3532
|
+
kind: z.ZodLiteral<"decide">;
|
|
3533
|
+
provider: z.ZodLiteral<"rules">;
|
|
3534
|
+
}, "strict", z.ZodTypeAny, {
|
|
3535
|
+
kind: "decide";
|
|
3536
|
+
provider: "rules";
|
|
3537
|
+
}, {
|
|
3538
|
+
kind: "decide";
|
|
3539
|
+
provider: "rules";
|
|
3540
|
+
}>, z.ZodObject<{
|
|
3541
|
+
kind: z.ZodEnum<["decide", "reason"]>;
|
|
3542
|
+
provider: z.ZodLiteral<"command">;
|
|
3543
|
+
command_env: z.ZodString;
|
|
3544
|
+
min_confidence: z.ZodOptional<z.ZodNumber>;
|
|
3545
|
+
}, "strict", z.ZodTypeAny, {
|
|
3546
|
+
kind: "reason" | "decide";
|
|
3547
|
+
provider: "command";
|
|
3548
|
+
command_env: string;
|
|
3549
|
+
min_confidence?: number | undefined;
|
|
3550
|
+
}, {
|
|
3551
|
+
kind: "reason" | "decide";
|
|
3552
|
+
provider: "command";
|
|
3553
|
+
command_env: string;
|
|
3554
|
+
min_confidence?: number | undefined;
|
|
3555
|
+
}>, z.ZodObject<{
|
|
3556
|
+
kind: z.ZodLiteral<"decide">;
|
|
3557
|
+
provider: z.ZodLiteral<"ollama">;
|
|
3558
|
+
model: z.ZodString;
|
|
3559
|
+
base_url_env: z.ZodString;
|
|
3560
|
+
min_confidence: z.ZodOptional<z.ZodNumber>;
|
|
3561
|
+
}, "strict", z.ZodTypeAny, {
|
|
3562
|
+
kind: "decide";
|
|
3563
|
+
provider: "ollama";
|
|
3564
|
+
model: string;
|
|
3565
|
+
base_url_env: string;
|
|
3566
|
+
min_confidence?: number | undefined;
|
|
3567
|
+
}, {
|
|
3568
|
+
kind: "decide";
|
|
3569
|
+
provider: "ollama";
|
|
3570
|
+
model: string;
|
|
3571
|
+
base_url_env: string;
|
|
3572
|
+
min_confidence?: number | undefined;
|
|
3573
|
+
}>]>;
|
|
3574
|
+
type ModelEntry = z.infer<typeof ModelEntrySchema>;
|
|
3575
|
+
declare const ModelsConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
3576
|
+
version: z.ZodLiteral<1>;
|
|
3577
|
+
models: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
|
|
3578
|
+
kind: z.ZodLiteral<"decide">;
|
|
3579
|
+
provider: z.ZodLiteral<"rules">;
|
|
3580
|
+
}, "strict", z.ZodTypeAny, {
|
|
3581
|
+
kind: "decide";
|
|
3582
|
+
provider: "rules";
|
|
3583
|
+
}, {
|
|
3584
|
+
kind: "decide";
|
|
3585
|
+
provider: "rules";
|
|
3586
|
+
}>, z.ZodObject<{
|
|
3587
|
+
kind: z.ZodEnum<["decide", "reason"]>;
|
|
3588
|
+
provider: z.ZodLiteral<"command">;
|
|
3589
|
+
command_env: z.ZodString;
|
|
3590
|
+
min_confidence: z.ZodOptional<z.ZodNumber>;
|
|
3591
|
+
}, "strict", z.ZodTypeAny, {
|
|
3592
|
+
kind: "reason" | "decide";
|
|
3593
|
+
provider: "command";
|
|
3594
|
+
command_env: string;
|
|
3595
|
+
min_confidence?: number | undefined;
|
|
3596
|
+
}, {
|
|
3597
|
+
kind: "reason" | "decide";
|
|
3598
|
+
provider: "command";
|
|
3599
|
+
command_env: string;
|
|
3600
|
+
min_confidence?: number | undefined;
|
|
3601
|
+
}>, z.ZodObject<{
|
|
3602
|
+
kind: z.ZodLiteral<"decide">;
|
|
3603
|
+
provider: z.ZodLiteral<"ollama">;
|
|
3604
|
+
model: z.ZodString;
|
|
3605
|
+
base_url_env: z.ZodString;
|
|
3606
|
+
min_confidence: z.ZodOptional<z.ZodNumber>;
|
|
3607
|
+
}, "strict", z.ZodTypeAny, {
|
|
3608
|
+
kind: "decide";
|
|
3609
|
+
provider: "ollama";
|
|
3610
|
+
model: string;
|
|
3611
|
+
base_url_env: string;
|
|
3612
|
+
min_confidence?: number | undefined;
|
|
3613
|
+
}, {
|
|
3614
|
+
kind: "decide";
|
|
3615
|
+
provider: "ollama";
|
|
3616
|
+
model: string;
|
|
3617
|
+
base_url_env: string;
|
|
3618
|
+
min_confidence?: number | undefined;
|
|
3619
|
+
}>]>>;
|
|
3620
|
+
defaults: z.ZodObject<{
|
|
3621
|
+
by_work_type: z.ZodRecord<z.ZodEnum<["route", "classify", "check", "draft", "design", "code", "review"]>, z.ZodString>;
|
|
3622
|
+
fallback_reason: z.ZodString;
|
|
3623
|
+
fallback_decide: z.ZodString;
|
|
3624
|
+
}, "strict", z.ZodTypeAny, {
|
|
3625
|
+
by_work_type: Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>;
|
|
3626
|
+
fallback_reason: string;
|
|
3627
|
+
fallback_decide: string;
|
|
3628
|
+
}, {
|
|
3629
|
+
by_work_type: Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>;
|
|
3630
|
+
fallback_reason: string;
|
|
3631
|
+
fallback_decide: string;
|
|
3632
|
+
}>;
|
|
3633
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
3634
|
+
bots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<["route", "classify", "check", "draft", "design", "code", "review"]>, z.ZodString>>>;
|
|
3635
|
+
stages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<["route", "classify", "check", "draft", "design", "code", "review"]>, z.ZodString>>>;
|
|
3636
|
+
roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<["route", "classify", "check", "draft", "design", "code", "review"]>, z.ZodString>>>;
|
|
3637
|
+
}, "strict", z.ZodTypeAny, {
|
|
3638
|
+
stages?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3639
|
+
bots?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3640
|
+
roles?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3641
|
+
}, {
|
|
3642
|
+
stages?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3643
|
+
bots?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3644
|
+
roles?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3645
|
+
}>>;
|
|
3646
|
+
}, "strict", z.ZodTypeAny, {
|
|
3647
|
+
version: 1;
|
|
3648
|
+
models: Record<string, {
|
|
3649
|
+
kind: "decide";
|
|
3650
|
+
provider: "rules";
|
|
3651
|
+
} | {
|
|
3652
|
+
kind: "reason" | "decide";
|
|
3653
|
+
provider: "command";
|
|
3654
|
+
command_env: string;
|
|
3655
|
+
min_confidence?: number | undefined;
|
|
3656
|
+
} | {
|
|
3657
|
+
kind: "decide";
|
|
3658
|
+
provider: "ollama";
|
|
3659
|
+
model: string;
|
|
3660
|
+
base_url_env: string;
|
|
3661
|
+
min_confidence?: number | undefined;
|
|
3662
|
+
}>;
|
|
3663
|
+
defaults: {
|
|
3664
|
+
by_work_type: Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>;
|
|
3665
|
+
fallback_reason: string;
|
|
3666
|
+
fallback_decide: string;
|
|
3667
|
+
};
|
|
3668
|
+
overrides?: {
|
|
3669
|
+
stages?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3670
|
+
bots?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3671
|
+
roles?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3672
|
+
} | undefined;
|
|
3673
|
+
}, {
|
|
3674
|
+
version: 1;
|
|
3675
|
+
models: Record<string, {
|
|
3676
|
+
kind: "decide";
|
|
3677
|
+
provider: "rules";
|
|
3678
|
+
} | {
|
|
3679
|
+
kind: "reason" | "decide";
|
|
3680
|
+
provider: "command";
|
|
3681
|
+
command_env: string;
|
|
3682
|
+
min_confidence?: number | undefined;
|
|
3683
|
+
} | {
|
|
3684
|
+
kind: "decide";
|
|
3685
|
+
provider: "ollama";
|
|
3686
|
+
model: string;
|
|
3687
|
+
base_url_env: string;
|
|
3688
|
+
min_confidence?: number | undefined;
|
|
3689
|
+
}>;
|
|
3690
|
+
defaults: {
|
|
3691
|
+
by_work_type: Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>;
|
|
3692
|
+
fallback_reason: string;
|
|
3693
|
+
fallback_decide: string;
|
|
3694
|
+
};
|
|
3695
|
+
overrides?: {
|
|
3696
|
+
stages?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3697
|
+
bots?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3698
|
+
roles?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3699
|
+
} | undefined;
|
|
3700
|
+
}>, {
|
|
3701
|
+
version: 1;
|
|
3702
|
+
models: Record<string, {
|
|
3703
|
+
kind: "decide";
|
|
3704
|
+
provider: "rules";
|
|
3705
|
+
} | {
|
|
3706
|
+
kind: "reason" | "decide";
|
|
3707
|
+
provider: "command";
|
|
3708
|
+
command_env: string;
|
|
3709
|
+
min_confidence?: number | undefined;
|
|
3710
|
+
} | {
|
|
3711
|
+
kind: "decide";
|
|
3712
|
+
provider: "ollama";
|
|
3713
|
+
model: string;
|
|
3714
|
+
base_url_env: string;
|
|
3715
|
+
min_confidence?: number | undefined;
|
|
3716
|
+
}>;
|
|
3717
|
+
defaults: {
|
|
3718
|
+
by_work_type: Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>;
|
|
3719
|
+
fallback_reason: string;
|
|
3720
|
+
fallback_decide: string;
|
|
3721
|
+
};
|
|
3722
|
+
overrides?: {
|
|
3723
|
+
stages?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3724
|
+
bots?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3725
|
+
roles?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3726
|
+
} | undefined;
|
|
3727
|
+
}, {
|
|
3728
|
+
version: 1;
|
|
3729
|
+
models: Record<string, {
|
|
3730
|
+
kind: "decide";
|
|
3731
|
+
provider: "rules";
|
|
3732
|
+
} | {
|
|
3733
|
+
kind: "reason" | "decide";
|
|
3734
|
+
provider: "command";
|
|
3735
|
+
command_env: string;
|
|
3736
|
+
min_confidence?: number | undefined;
|
|
3737
|
+
} | {
|
|
3738
|
+
kind: "decide";
|
|
3739
|
+
provider: "ollama";
|
|
3740
|
+
model: string;
|
|
3741
|
+
base_url_env: string;
|
|
3742
|
+
min_confidence?: number | undefined;
|
|
3743
|
+
}>;
|
|
3744
|
+
defaults: {
|
|
3745
|
+
by_work_type: Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>;
|
|
3746
|
+
fallback_reason: string;
|
|
3747
|
+
fallback_decide: string;
|
|
3748
|
+
};
|
|
3749
|
+
overrides?: {
|
|
3750
|
+
stages?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3751
|
+
bots?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3752
|
+
roles?: Record<string, Partial<Record<"code" | "route" | "classify" | "check" | "draft" | "design" | "review", string>>> | undefined;
|
|
3753
|
+
} | undefined;
|
|
3754
|
+
}>;
|
|
3755
|
+
type ModelsConfig = z.infer<typeof ModelsConfigSchema>;
|
|
3756
|
+
declare function loadModels(root: string): Promise<{
|
|
3757
|
+
config: ModelsConfig;
|
|
3758
|
+
} | {
|
|
3759
|
+
error: string;
|
|
3760
|
+
} | null>;
|
|
3761
|
+
declare function checkModels(root: string): Promise<{
|
|
3762
|
+
ok: true;
|
|
3763
|
+
} | {
|
|
3764
|
+
ok: false;
|
|
3765
|
+
message: string;
|
|
3766
|
+
}>;
|
|
3767
|
+
|
|
3768
|
+
interface ModelContext {
|
|
3769
|
+
workType: WorkType;
|
|
3770
|
+
role?: string;
|
|
3771
|
+
bot?: string;
|
|
3772
|
+
stage?: string;
|
|
3773
|
+
}
|
|
3774
|
+
/** Pure precedence: bot, stage, role, work-type default, then the fallback for that kind. */
|
|
3775
|
+
declare function selectModel(config: ModelsConfig, ctx: ModelContext): ModelChoice;
|
|
3776
|
+
|
|
3777
|
+
interface DecideInput<T extends string> {
|
|
3778
|
+
models: ModelsConfig | null;
|
|
3779
|
+
ctx: ModelContext & {
|
|
3780
|
+
workType: WorkType;
|
|
3781
|
+
};
|
|
3782
|
+
state: string;
|
|
3783
|
+
question: string;
|
|
3784
|
+
options: readonly T[];
|
|
3785
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
3786
|
+
fetch?: typeof fetch;
|
|
3787
|
+
runCommand?: (command: string, stdin: string) => Promise<string>;
|
|
3788
|
+
now?: () => Date;
|
|
3789
|
+
metrics?: {
|
|
3790
|
+
projectRoot: string;
|
|
3791
|
+
config: Config;
|
|
3792
|
+
changeId: string;
|
|
3793
|
+
};
|
|
3794
|
+
}
|
|
3795
|
+
interface DecisionOutcome<T extends string> {
|
|
3796
|
+
pick: T | "human";
|
|
3797
|
+
source: "rules" | "decide" | "reason" | "human";
|
|
3798
|
+
choice: ModelChoice | null;
|
|
3799
|
+
confidence: number | null;
|
|
3800
|
+
}
|
|
3801
|
+
declare function decide<T extends string>(input: DecideInput<T>): Promise<DecisionOutcome<T>>;
|
|
3802
|
+
|
|
3803
|
+
declare function spawnModelCommand(command: string, stdin: string): Promise<string>;
|
|
3804
|
+
declare function modelFromEnv(env: Readonly<Record<string, string | undefined>>): RoleModel | undefined;
|
|
3805
|
+
|
|
3806
|
+
declare function formatModels(config: ModelsConfig): string;
|
|
3807
|
+
declare function explainModel(config: ModelsConfig, workType: WorkType, ctx: {
|
|
3808
|
+
role?: string;
|
|
3809
|
+
bot?: string;
|
|
3810
|
+
stage?: string;
|
|
3811
|
+
}): string;
|
|
3812
|
+
|
|
3813
|
+
interface RouteItem {
|
|
3814
|
+
id?: string;
|
|
3815
|
+
stage?: string;
|
|
3816
|
+
artifact?: string;
|
|
3817
|
+
skill?: string;
|
|
3818
|
+
bot?: string;
|
|
3819
|
+
}
|
|
3820
|
+
interface RouteDeps {
|
|
3821
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
3822
|
+
fetch?: typeof fetch;
|
|
3823
|
+
runCommand?: (command: string, stdin: string) => Promise<string>;
|
|
3824
|
+
now?: () => Date;
|
|
3825
|
+
}
|
|
3826
|
+
type RouteHit = {
|
|
3827
|
+
kind: "role";
|
|
3828
|
+
role: string;
|
|
3829
|
+
reason: string;
|
|
3830
|
+
rule: string;
|
|
3831
|
+
} | {
|
|
3832
|
+
kind: "ask";
|
|
3833
|
+
reason: string;
|
|
3834
|
+
};
|
|
3835
|
+
declare function routeRole(root: string, input: RouteItem, deps?: RouteDeps): Promise<RoleCommandResult>;
|
|
3836
|
+
declare function queueRole(root: string, bot?: string): Promise<RoleCommandResult>;
|
|
3837
|
+
declare function takeRole(root: string, input: RouteItem): Promise<RoleCommandResult>;
|
|
3838
|
+
|
|
3839
|
+
declare function gitUserName(root: string): string | null;
|
|
3840
|
+
declare function listTeamTemplates(): Promise<string[]>;
|
|
3841
|
+
declare function listRoleTemplates(): Promise<string[]>;
|
|
3842
|
+
declare function initTeam(root: string, template: string, gitUser: string | null): Promise<RoleCommandResult>;
|
|
3843
|
+
declare function readTeamConfig(root: string): Promise<{
|
|
3844
|
+
team: TeamConfig;
|
|
3845
|
+
} | {
|
|
3846
|
+
error: string;
|
|
3847
|
+
}>;
|
|
3848
|
+
declare function formatTeam(team: TeamConfig, gitUser: string | null): string;
|
|
3849
|
+
declare function resolveBot(team: TeamConfig, name: string): TeamConfig["bots"][number] | {
|
|
3850
|
+
error: string;
|
|
3851
|
+
};
|
|
3852
|
+
declare function showTeam(root: string, gitUser: string | null): Promise<RoleCommandResult>;
|
|
3853
|
+
declare function checkTeam(root: string): Promise<RoleCommandResult>;
|
|
3854
|
+
declare function createRoleFromTemplate(root: string, input: {
|
|
3855
|
+
name: string;
|
|
3856
|
+
template: string;
|
|
3857
|
+
label?: string;
|
|
3858
|
+
job?: string;
|
|
3859
|
+
description?: string;
|
|
3860
|
+
}): Promise<RoleCommandResult>;
|
|
3861
|
+
|
|
3862
|
+
interface Fact {
|
|
3863
|
+
key: string;
|
|
3864
|
+
value: string;
|
|
3865
|
+
ts: string;
|
|
3866
|
+
by: string;
|
|
3867
|
+
source: string;
|
|
3868
|
+
}
|
|
3869
|
+
declare function getFacts(root: string, query?: {
|
|
3870
|
+
keys?: string[];
|
|
3871
|
+
query?: string;
|
|
3872
|
+
}): Promise<Fact[]>;
|
|
3873
|
+
declare function setFact(root: string, input: {
|
|
3874
|
+
key?: string;
|
|
3875
|
+
value?: string;
|
|
3876
|
+
source?: string;
|
|
3877
|
+
}): Promise<RoleCommandResult>;
|
|
3878
|
+
declare function showFact(root: string, key?: string): Promise<RoleCommandResult>;
|
|
3879
|
+
declare function listFacts(root: string, query?: string): Promise<RoleCommandResult>;
|
|
3880
|
+
|
|
3881
|
+
interface Lesson {
|
|
3882
|
+
ts: string;
|
|
3883
|
+
by: string;
|
|
3884
|
+
text: string;
|
|
3885
|
+
source?: string;
|
|
3886
|
+
tags?: string[];
|
|
3887
|
+
}
|
|
3888
|
+
declare function showMemory(root: string, bot: string): Promise<RoleCommandResult>;
|
|
3889
|
+
declare function addLesson(root: string, bot: string, text: string): Promise<RoleCommandResult>;
|
|
3890
|
+
declare function migrateTeamMemory(root: string): Promise<RoleCommandResult>;
|
|
3891
|
+
|
|
3892
|
+
interface PackedFile {
|
|
3893
|
+
path: string;
|
|
3894
|
+
text: string;
|
|
3895
|
+
}
|
|
3896
|
+
interface WorkItem {
|
|
3897
|
+
text: string;
|
|
3898
|
+
}
|
|
3899
|
+
interface Brain {
|
|
3900
|
+
role: RoleProfile;
|
|
3901
|
+
bot: TeamConfig["bots"][number];
|
|
3902
|
+
memory: string;
|
|
3903
|
+
lessons: Lesson[];
|
|
3904
|
+
facts: Fact[];
|
|
3905
|
+
inputs: PackedFile[];
|
|
3906
|
+
prompt: string;
|
|
3907
|
+
warning: string;
|
|
3908
|
+
}
|
|
3909
|
+
declare function loadBrain(root: string, cfg: TeamConfig, bot: string, item: WorkItem, budgetTokens: number): Promise<Brain | {
|
|
3910
|
+
error: string;
|
|
3911
|
+
}>;
|
|
3912
|
+
|
|
3913
|
+
declare function runLoop(input: {
|
|
3914
|
+
root: string;
|
|
3915
|
+
cfg: TeamConfig;
|
|
3916
|
+
brain: Brain;
|
|
3917
|
+
model: RoleModel;
|
|
3918
|
+
file: string;
|
|
3919
|
+
roleName: string;
|
|
3920
|
+
logName: string;
|
|
3921
|
+
}): Promise<RoleCommandResult>;
|
|
3922
|
+
|
|
3923
|
+
declare function showRoom(root: string, input: {
|
|
3924
|
+
change?: string;
|
|
3925
|
+
stage?: string;
|
|
3926
|
+
}): Promise<RoleCommandResult>;
|
|
3927
|
+
declare function postRoom(root: string, input: {
|
|
3928
|
+
change?: string;
|
|
3929
|
+
stage?: string;
|
|
3930
|
+
from?: string;
|
|
3931
|
+
type?: string;
|
|
3932
|
+
text?: string;
|
|
3933
|
+
cite?: string;
|
|
3934
|
+
evidence?: string[];
|
|
3935
|
+
}): Promise<RoleCommandResult>;
|
|
3936
|
+
declare function reviewRoom(root: string, input: {
|
|
3937
|
+
change?: string;
|
|
3938
|
+
stage?: string;
|
|
3939
|
+
roles?: string[];
|
|
3940
|
+
model?: RoleModel;
|
|
3941
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
3942
|
+
runCommand?: (command: string, stdin: string) => Promise<string>;
|
|
3943
|
+
}): Promise<RoleCommandResult>;
|
|
3944
|
+
|
|
3151
3945
|
interface StoryNode {
|
|
3152
3946
|
changeId: string;
|
|
3153
3947
|
title: string;
|
|
@@ -3182,4 +3976,4 @@ declare function formatEpicGraph(nodes: StoryNode[]): {
|
|
|
3182
3976
|
/** Graph errors, then open dependencies. Null means the branch may be created. */
|
|
3183
3977
|
declare function branchBlock(nodes: StoryNode[], story: string): string | null;
|
|
3184
3978
|
|
|
3185
|
-
export { AGENT_INTEGRATIONS, AGENT_TARGET_OPTIONS, ALL_AGENT_TARGETS, type AdapterExtractResult, AdapterRegistry, type AdvanceResult, type AgentInstallPlan, AgentInstallPreflightError, type AgentIntegration, type AgentTarget, type AgentTargetOption, type AllowRoleInput, type ArtifactDef, ArtifactDefSchema, type BuildRefinePlanOptions, type CallMcpToolResult, type ChangeContext, type ChangeMeta, ChangeMetaSchema, type ChangeMetrics, ChangeMetricsSchema, type ChangePhaseOrder, type CodeContextCaps, type CodeContextGap, type CodeContextGapCode, type CodeContextRequest, type CodeContextResult, type CodeContextSummary, type CodeSlice, type Complexity, type Config, ConfigSchema, type CreateChangeInput, DEFAULT_CODE_CONTEXT_CAPS, DEFAULT_INIT_INTEGRATION, EMBEDDINGS_UNAVAILABLE, EMBEDDING_MODEL, type Embedder, type FastembedHooks, type FocusPlan, type Gate, GateSchema, type GatherMcpOptions, type GenerateCodeContextDeps, type GeneratedManifest, type GeneratedState, type GitHeadRunner, type GreenfieldFeature, type IndexStats, type InitOptions, type InitResult, type InstallAgentOptions, type InstallAgentResult, type InstallAgentsOptions, type InstallAgentsResult, type InstalledAgentSnapshot, type KeptFile, type KeptReason, type LanguageAdapter, type McpConfig, McpConfigSchema, type McpFetchResult, type McpInvoke, McpInvokeSchema, type McpMatchContext, type McpSource, McpSourceSchema, type McpWhen, McpWhenSchema, type MetricsImportResult, PROTOCOL_MD, type PhaseMetric, PhaseMetricSchema, type PhaseTiming, type PhaseTimingRow, type PlannedWrite, type PriceCard, type Prices, RRF_K, type RawHit, type ReconcileGeneratedResult, type RefineArtifactRef, type RefineMode, type RefinePlan, type RemoveAgentHostsResult, type RenderChangeReportInput, type RoleCommandResult, type RoleModel, type RoleProfile, type RunRoleInput, SDD_AGENT_ROLES, SDD_CORE_VERSION, SDD_DIR, SUMMARY_TOKEN_CAP, type SddAgentRole, type SddAgentRoleId, SddError, type SearchConfig, SearchConfigError, type SearchHit, type SearchProvider, type SearchQuery, type SearchResult, type SearchRuntime, type SearchScope, type Stage, StageSchema, type StartFeatureInput, type StartGreenfieldInput, type StartGreenfieldResult, type StoryDraft, type StoryNode, type SymbolInfo, type SymbolKind, type SyncChangeResult, type TokenCounts, type TokenUsageMetric, TokenUsageMetricSchema, VerifyCommandSchema, type VerifyResult, type VerifyStatus, type Workflow, WorkflowSchema, acceptNetwork, activePointerPath, activeStages, addMcpSource, advanceStage, agentHostPaths, agentKickoffMessage, allowRole, approveGate, archiveDir, assertAgentInstallable, assertSessionLogAllowed, branchBlock, budgetForStage, buildAgentPrompt, buildContext, buildRefinePlan, buildRetrievedInner, callMcpSourceTool, canLeaveStage, changeDirName, changeMetaPath, changePath, changesDir, changesPathRel, chunkCode, chunkMarkdown, classifyPath, clearActiveIf, clearRegisteredSearchProviders, compareChangesByFirstPhase, completeChange, configPath, contentHash, copyDir, copyDirSkipExisting, costFor, countTokens, createBuiltinProvider, createChange, createFastembedEmbedder, createRole, defaultConfig, defaultMcpConfig, defaultMcpYamlPath, defaultMemoryDir, defaultPricesYamlPath, defaultSearchYamlPath, defaultTemplatesDir, defaultWorkflowsDir, defaultsRoot, deleteRole, describeFsError, describeKept, displayArchivePath, displayChangePath, domainsDir, duplicateRole, editRole, embedSearchQuery, emptyChangeMetrics, ensureDir, ensureMcpConfig, errorMessage, executeSearch, explainMatch, extractiveSummary, fallbackAdapter, fallbackIncompleteStageId, fallbackWarning, fastembedImportCount, findFeaturesBacklogPath, firstActiveStageId, formatDuration, formatEpicGraph, formatJsonSummary, formatMcpContextForHandoff, formatStatus, ftsTokens, fuseByRank, fuseHits, gatherMcpContext, gatherMcpContextForChange, generateCodeContext, generatedState, getActiveChangeId, getHeadSha, getIntegration, getStage, guidancePaths, handoffRole, hideRole, importSessionMetrics, incompletePriorStageErrors, indexDbPath, inferComplexity, initProject, installAgentIntegration, installAgentIntegrations, integrationKeyFor, interpolate, interpolateArgs, isHardDenied, isIgnoredPath, isInitialized, isPrunedDir, isSddError, isSecretPath, isStageSkipped, isSubstantiveArtifactContent, keywordHits, listBacklogFeatures, listChanges, listDirs, listFiles, listMatchingSourceIds, listMcpSourceTools, listScopeHits, listWorkflowNames, loadChangeMeta, loadConfig, loadEpicStories, loadExcluder, loadGeneratedManifest, loadInstalledAgent, loadMcpConfig, loadPrices, loadSearchConfig, loadWorkflow, markGenerated, matchMcpSources, mcpConfigPath, mcpTimeoutMs, memoryDir, memoryPathRel, mergeCaps, mergeConfigDefaults, mergeRankedHits, nextStageId, nowIso, optionForTarget, packHits, parseAgentTargets, parseFeaturesBacklog, parseIntegration, parseStoryDraft, pathExists, phaseTiming, pinRole, planAgentIntegration, planNetwork, promoteGreenfieldToMemory, rankScope, readChangeMetrics, readHandoffCodePoints, readText, readYaml, rebuildNetwork, recommendWorkflow, reconcileGeneratedTree, refreshActiveAgentContext, refreshConfiguredGuidance, registerSearchProvider, removeMcpSource, removeOtherAgentHosts, removeOtherAgentHostsDetailed, removePath, renderAgentsMd, renderBlock, renderChangeReport, renderMemoryIndex, renderProtocolMd, renderSddReadme, renderThinAgent, repairRequiredIgnores, reportAllChanges, reportChange, resolveActiveDirectory, resolveChangeId, resolveEmbedder, resolveFocus, resolveSearchProvider, resolveStages, rrf, runLocalVerify, runNetwork, runRole, saveChangeMeta, saveConfig, saveGeneratedManifest, saveMcpConfig, scopeForPath, sddRoot, searchConfigPath, searchPreamble, setActiveChange, setRoleMessaging, shouldAutoSkip, showRoleGroup, showRoles, skipStage, slugify, startFeatureFromBacklog, startGreenfield, startPhase, storyIdTaken, switchWorkflow, syncChangeHead, templatesDir, toProcessEnv, todayIsoDate, tokenizeKeywords, transitionPhase, typescriptAdapter, uniqueChangeDirName, updateFeatureStatus, validBranchName, withMcpSource, workflowsDir, writeAgentHandoff, writeRefineBrief, writeText, writeTextIfMissing, writeYaml };
|
|
3979
|
+
export { AGENT_INTEGRATIONS, AGENT_TARGET_OPTIONS, ALL_AGENT_TARGETS, type AdapterExtractResult, AdapterRegistry, type AdvanceResult, type AgentInstallPlan, AgentInstallPreflightError, type AgentIntegration, type AgentTarget, type AgentTargetOption, type AllowRoleInput, type ArtifactDef, ArtifactDefSchema, type BuildRefinePlanOptions, type CallMcpToolResult, type ChangeContext, type ChangeMeta, ChangeMetaSchema, type ChangeMetrics, ChangeMetricsSchema, type ChangePhaseOrder, type CodeContextCaps, type CodeContextGap, type CodeContextGapCode, type CodeContextRequest, type CodeContextResult, type CodeContextSummary, type CodeSlice, type Complexity, type Config, ConfigSchema, type CreateChangeInput, DEFAULT_CODE_CONTEXT_CAPS, DEFAULT_INIT_INTEGRATION, type DecideInput, type DecisionMetric, DecisionMetricSchema, type DecisionModel, type DecisionOutcome, EMBEDDINGS_UNAVAILABLE, EMBEDDING_MODEL, type Embedder, type FastembedHooks, type FocusPlan, type Gate, GateSchema, type GatherMcpOptions, type GenerateCodeContextDeps, type GeneratedManifest, type GeneratedState, type GitHeadRunner, type GreenfieldFeature, type IndexStats, type InitOptions, type InitResult, type InstallAgentOptions, type InstallAgentResult, type InstallAgentsOptions, type InstallAgentsResult, type InstalledAgentSnapshot, type KeptFile, type KeptReason, type LanguageAdapter, type McpConfig, McpConfigSchema, type McpFetchResult, type McpInvoke, McpInvokeSchema, type McpMatchContext, type McpSource, McpSourceSchema, type McpWhen, McpWhenSchema, type MetricsImportResult, type ModelChoice, type ModelContext, type ModelEntry, type ModelsConfig, ModelsConfigSchema, PROTOCOL_MD, type PhaseMetric, PhaseMetricSchema, type PhaseTiming, type PhaseTimingRow, type PlannedWrite, type PriceCard, type Prices, type ProductTeamMember, RRF_K, type RawHit, type ReconcileGeneratedResult, type RefineArtifactRef, type RefineMode, type RefinePlan, type RemoveAgentHostsResult, type RenderChangeReportInput, type RoleCommandResult, type RoleLists, type RoleModel, type RoleProfile, type RouteDeps, type RouteHit, type RouteItem, type RunRoleInput, SDD_AGENT_ROLES, SDD_CORE_VERSION, SDD_DIR, SUMMARY_TOKEN_CAP, type SddAgentRole, type SddAgentRoleId, SddError, type SearchConfig, SearchConfigError, type SearchHit, type SearchProvider, type SearchQuery, type SearchResult, type SearchRuntime, type SearchScope, type Stage, StageSchema, type StartFeatureInput, type StartGreenfieldInput, type StartGreenfieldResult, type StoryDraft, type StoryNode, type SymbolInfo, type SymbolKind, type SyncChangeResult, type TeamConfig, TeamSchema, type TokenCounts, type TokenUsageMetric, TokenUsageMetricSchema, VerifyCommandSchema, type VerifyResult, type VerifyStatus, WORK_TYPES, type WorkType, type Workflow, WorkflowSchema, acceptNetwork, activePointerPath, activeStages, addLesson, addMcpSource, advanceStage, agentHostPaths, agentKickoffMessage, allowRole, approveGate, archiveDir, assertAgentInstallable, assertSessionLogAllowed, branchBlock, budgetForStage, buildAgentPrompt, buildContext, buildRefinePlan, buildRetrievedInner, callMcpSourceTool, canLeaveStage, changeDirName, changeMetaPath, changePath, changesDir, changesPathRel, checkModels, checkTeam, chunkCode, chunkMarkdown, classifyPath, clearActiveIf, clearRegisteredSearchProviders, compareChangesByFirstPhase, completeChange, configPath, contentHash, copyDir, copyDirSkipExisting, costFor, countTokens, createBuiltinProvider, createChange, createFastembedEmbedder, createRole, createRoleFromTemplate, decide, defaultConfig, defaultMcpConfig, defaultMcpYamlPath, defaultMemoryDir, defaultPricesYamlPath, defaultSearchYamlPath, defaultTeamsDir, defaultTemplatesDir, defaultWorkflowsDir, defaultsRoot, deleteRole, describeFsError, describeKept, displayArchivePath, displayChangePath, domainsDir, duplicateRole, editRole, embedSearchQuery, emptyChangeMetrics, ensureDir, ensureMcpConfig, errorMessage, executeSearch, explainMatch, explainModel, extractiveSummary, fallbackAdapter, fallbackIncompleteStageId, fallbackWarning, fastembedImportCount, findFeaturesBacklogPath, firstActiveStageId, formatDuration, formatEpicGraph, formatJsonSummary, formatMcpContextForHandoff, formatModels, formatStatus, formatTeam, formatTokenInventory, ftsTokens, fuseByRank, fuseHits, gatherMcpContext, gatherMcpContextForChange, generateCodeContext, generatedState, getActiveChangeId, getFacts, getHeadSha, getIntegration, getStage, gitUserName, guidancePaths, handoffRole, hideRole, importSessionMetrics, incompletePriorStageErrors, indexDbPath, inferComplexity, initProject, initTeam, installAgentIntegration, installAgentIntegrations, integrationKeyFor, interpolate, interpolateArgs, isHardDenied, isIgnoredPath, isInitialized, isPrunedDir, isSddError, isSecretPath, isStageSkipped, isSubstantiveArtifactContent, isWorkType, keywordHits, listBacklogFeatures, listBundledWorkflowNames, listChanges, listDirs, listFacts, listFiles, listMatchingSourceIds, listMcpSourceTools, listRoleTemplates, listScopeHits, listTeamTemplates, listWorkflowNames, loadBrain, loadChangeMeta, loadConfig, loadEpicStories, loadExcluder, loadGeneratedManifest, loadInstalledAgent, loadMcpConfig, loadModels, loadPrices, loadProductTeam, loadSearchConfig, loadWorkflow, markGenerated, matchMcpSources, mcpConfigPath, mcpTimeoutMs, memoryDir, memoryPathRel, mergeCaps, mergeConfigDefaults, mergeRankedHits, migrateTeamMemory, missingBundledWorkflows, modelFromEnv, nextStageId, nowIso, optionForTarget, packHits, parseAgentTargets, parseFeaturesBacklog, parseIntegration, parseStoryDraft, pathExists, phaseTiming, pinRole, planAgentIntegration, planNetwork, postRoom, productTeamHome, promoteGreenfieldToMemory, queueRole, rankScope, readChangeMetrics, readHandoffCodePoints, readTeamConfig, readText, readYaml, rebuildNetwork, recommendWorkflow, reconcileGeneratedTree, recordDecisionMetric, recordDecisionRequest, recordSignoff, refreshActiveAgentContext, refreshConfiguredGuidance, registerSearchProvider, removeMcpSource, removeOtherAgentHosts, removeOtherAgentHostsDetailed, removePath, renderAgentsMd, renderBlock, renderChangeReport, renderMemoryIndex, renderProductTeamSection, renderProtocolMd, renderSddReadme, renderThinAgent, repairRequiredIgnores, reportAllChanges, reportChange, resolveActiveDirectory, resolveBot, resolveChangeId, resolveEmbedder, resolveFocus, resolveSearchProvider, resolveStages, reviewRoom, routeRole, rrf, runLocalVerify, runLoop, runNetwork, runRole, saveChangeMeta, saveConfig, saveGeneratedManifest, saveMcpConfig, scopeForPath, sddRoot, searchConfigPath, searchPreamble, selectModel, setActiveChange, setFact, setRoleMessaging, shouldAutoSkip, showFact, showMemory, showRoleGroup, showRoles, showRoom, showTeam, skipStage, slugify, spawnModelCommand, startFeatureFromBacklog, startGreenfield, startPhase, storyIdTaken, switchWorkflow, syncChangeHead, takeRole, templatesDir, toProcessEnv, todayIsoDate, tokenizeKeywords, transitionPhase, typescriptAdapter, uniqueChangeDirName, updateFeatureStatus, validBranchName, withMcpSource, workKind, workflowUnavailableMessage, workflowsDir, writeAgentHandoff, writeRefineBrief, writeText, writeTextIfMissing, writeYaml };
|