@structured-vibe-coding/core 0.19.0 → 0.21.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/software/routing.yaml +0 -24
- package/defaults/templates/qa-testing.md +11 -0
- package/defaults/templates/signoff.md +7 -0
- package/defaults/workflows/team-software.yaml +188 -48
- package/dist/{agents-PSIOQEYH.js → agents-U5RVEZTX.js} +3 -3
- package/dist/{change-context-EZJMSGSP.js → change-context-CZT3U7MZ.js} +1 -1
- package/dist/{chunk-26YG6A4M.js → chunk-5GLH6ZWU.js} +2 -2
- package/dist/{chunk-TGRV6WGS.js → chunk-AERAWOAK.js} +23 -2
- package/dist/{chunk-H55RFAEI.js → chunk-ICRQOQWE.js} +1 -1
- package/dist/{chunk-HG7TPW5V.js → chunk-TNWFMRIA.js} +46 -2
- package/dist/{chunk-2FJBFYVJ.js → chunk-Z2ULYVHO.js} +7 -7
- package/dist/{gather-7TSVKQO2.js → gather-A3Q4WSPH.js} +1 -1
- package/dist/{greenfield-QFA5WVHE.js → greenfield-QTMU2MH6.js} +3 -3
- package/dist/index.d.ts +56 -1
- package/dist/index.js +1011 -276
- package/package.json +1 -1
|
@@ -1,28 +1,4 @@
|
|
|
1
1
|
rules:
|
|
2
|
-
- id: requirements
|
|
3
|
-
stage: requirements
|
|
4
|
-
role: product-manager
|
|
5
|
-
- id: architecture
|
|
6
|
-
stage: architecture
|
|
7
|
-
role: architect
|
|
8
|
-
- id: stories
|
|
9
|
-
stage: stories
|
|
10
|
-
role: product-owner
|
|
11
|
-
- id: plan
|
|
12
|
-
stage: plan
|
|
13
|
-
role: dev-lead
|
|
14
|
-
- id: tasks
|
|
15
|
-
stage: tasks
|
|
16
|
-
role: dev-lead
|
|
17
|
-
- id: implement
|
|
18
|
-
stage: implement
|
|
19
|
-
role: developer
|
|
20
|
-
- id: pr-review
|
|
21
|
-
stage: pr_review
|
|
22
|
-
role: architect
|
|
23
|
-
- id: acceptance
|
|
24
|
-
stage: acceptance
|
|
25
|
-
role: product-owner
|
|
26
2
|
- id: lead
|
|
27
3
|
skill: name the next owner
|
|
28
4
|
role: dev-lead
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
name: team-software
|
|
2
2
|
description: >
|
|
3
|
-
Software team — requirements,
|
|
4
|
-
|
|
3
|
+
Software team sign-off — requirements, clarifications, high-level design,
|
|
4
|
+
low-level design, plan, test plan, development, pull-request review,
|
|
5
|
+
QA testing, QA sign-off, product-owner review, and product-owner sign-off
|
|
5
6
|
version: 1
|
|
6
7
|
recommendation:
|
|
7
8
|
priority: 10
|
|
@@ -14,7 +15,7 @@ stages:
|
|
|
14
15
|
kind: standard
|
|
15
16
|
skippable: false
|
|
16
17
|
owner: product-manager
|
|
17
|
-
collaborates: [architect]
|
|
18
|
+
collaborates: [architect, research-assistant]
|
|
18
19
|
artifacts:
|
|
19
20
|
- id: requirements
|
|
20
21
|
path: requirements.md
|
|
@@ -25,46 +26,83 @@ stages:
|
|
|
25
26
|
mode: human_approval
|
|
26
27
|
approvers: [human]
|
|
27
28
|
checklist:
|
|
28
|
-
- "The person
|
|
29
|
+
- "The person signed the reading"
|
|
29
30
|
agent_context:
|
|
30
31
|
instructions: |
|
|
31
32
|
Write the short reading in requirements.md. Do not accept the spec.
|
|
32
|
-
The person signs this
|
|
33
|
+
The person signs this stage.
|
|
33
34
|
|
|
34
|
-
- id:
|
|
35
|
-
title:
|
|
36
|
-
summary:
|
|
35
|
+
- id: clarifications
|
|
36
|
+
title: Clarifications
|
|
37
|
+
summary: Questions the reading still needs answered
|
|
38
|
+
kind: standard
|
|
39
|
+
skippable: false
|
|
40
|
+
owner: product-manager
|
|
41
|
+
collaborates: [research-assistant]
|
|
42
|
+
artifacts:
|
|
43
|
+
- id: clarifications
|
|
44
|
+
path: clarifications.md
|
|
45
|
+
template: clarify.md
|
|
46
|
+
required: true
|
|
47
|
+
gate:
|
|
48
|
+
type: hard
|
|
49
|
+
mode: human_approval
|
|
50
|
+
approvers: [human]
|
|
51
|
+
checklist:
|
|
52
|
+
- "The person signed the clarifications"
|
|
53
|
+
agent_context:
|
|
54
|
+
instructions: |
|
|
55
|
+
Write the open questions and the answers the person gave.
|
|
56
|
+
A role does not sign this stage.
|
|
57
|
+
|
|
58
|
+
- id: hld
|
|
59
|
+
title: High-level design
|
|
60
|
+
summary: Modules and the seams between them
|
|
37
61
|
kind: standard
|
|
38
62
|
skippable: false
|
|
39
63
|
owner: architect
|
|
40
64
|
collaborates: [product-manager]
|
|
41
65
|
artifacts:
|
|
42
|
-
- id:
|
|
43
|
-
path:
|
|
44
|
-
template:
|
|
66
|
+
- id: hld
|
|
67
|
+
path: hld.md
|
|
68
|
+
template: hl-design.md
|
|
45
69
|
required: true
|
|
46
70
|
gate:
|
|
47
|
-
type:
|
|
48
|
-
|
|
71
|
+
type: hard
|
|
72
|
+
mode: human_approval
|
|
73
|
+
approvers: [human]
|
|
74
|
+
checklist:
|
|
75
|
+
- "The person signed the high-level design"
|
|
76
|
+
agent_context:
|
|
77
|
+
instructions: |
|
|
78
|
+
Name the modules. Do not accept the spec.
|
|
79
|
+
The person signs this stage.
|
|
49
80
|
|
|
50
|
-
- id:
|
|
51
|
-
title:
|
|
52
|
-
summary:
|
|
81
|
+
- id: lld
|
|
82
|
+
title: Low-level design
|
|
83
|
+
summary: How one module does the change
|
|
53
84
|
kind: standard
|
|
54
85
|
skippable: false
|
|
55
|
-
owner:
|
|
56
|
-
collaborates: [
|
|
86
|
+
owner: architect
|
|
87
|
+
collaborates: [developer]
|
|
57
88
|
artifacts:
|
|
58
|
-
- id:
|
|
59
|
-
path:
|
|
60
|
-
template:
|
|
89
|
+
- id: lld
|
|
90
|
+
path: lld.md
|
|
91
|
+
template: lld.md
|
|
61
92
|
required: true
|
|
62
93
|
gate:
|
|
63
|
-
type:
|
|
64
|
-
|
|
94
|
+
type: hard
|
|
95
|
+
mode: human_approval
|
|
96
|
+
approvers: [human]
|
|
97
|
+
checklist:
|
|
98
|
+
- "The person signed the low-level design"
|
|
99
|
+
agent_context:
|
|
100
|
+
instructions: |
|
|
101
|
+
Name the functions and the data for this change.
|
|
102
|
+
A role does not sign this stage.
|
|
65
103
|
|
|
66
104
|
- id: plan
|
|
67
|
-
title: Plan
|
|
105
|
+
title: Plan approval
|
|
68
106
|
summary: How the work is split
|
|
69
107
|
kind: standard
|
|
70
108
|
skippable: false
|
|
@@ -75,39 +113,64 @@ stages:
|
|
|
75
113
|
path: plan.md
|
|
76
114
|
template: plan.md
|
|
77
115
|
required: true
|
|
116
|
+
- id: task
|
|
117
|
+
path: tasks/T-001.md
|
|
118
|
+
template: task.md
|
|
119
|
+
required: true
|
|
78
120
|
gate:
|
|
79
|
-
type:
|
|
80
|
-
|
|
121
|
+
type: hard
|
|
122
|
+
mode: human_approval
|
|
123
|
+
approvers: [human]
|
|
124
|
+
checklist:
|
|
125
|
+
- "The person signed the plan"
|
|
126
|
+
agent_context:
|
|
127
|
+
instructions: |
|
|
128
|
+
Write the order of work and the first task file.
|
|
129
|
+
A role does not sign this stage.
|
|
81
130
|
|
|
82
|
-
- id:
|
|
83
|
-
title:
|
|
84
|
-
summary:
|
|
131
|
+
- id: test_plan
|
|
132
|
+
title: Test plan
|
|
133
|
+
summary: What QA will try before the change is called done
|
|
85
134
|
kind: standard
|
|
86
135
|
skippable: false
|
|
87
|
-
owner:
|
|
136
|
+
owner: qa
|
|
88
137
|
collaborates: [developer]
|
|
89
138
|
artifacts:
|
|
90
|
-
- id:
|
|
91
|
-
path:
|
|
92
|
-
template:
|
|
139
|
+
- id: test-plan
|
|
140
|
+
path: test-plan.md
|
|
141
|
+
template: local-test-plan.md
|
|
93
142
|
required: true
|
|
94
143
|
gate:
|
|
95
|
-
type:
|
|
144
|
+
type: hard
|
|
145
|
+
mode: human_approval
|
|
146
|
+
approvers: [human]
|
|
147
|
+
checklist:
|
|
148
|
+
- "The person signed the test plan"
|
|
149
|
+
agent_context:
|
|
150
|
+
instructions: |
|
|
151
|
+
Write what to try. Do not record a result.
|
|
152
|
+
The person signs this stage.
|
|
96
153
|
|
|
97
154
|
- id: implement
|
|
98
|
-
title:
|
|
155
|
+
title: Development
|
|
99
156
|
summary: One item for each task file
|
|
100
157
|
kind: standard
|
|
101
158
|
skippable: false
|
|
102
159
|
owner: developer
|
|
160
|
+
collaborates: [dev-lead]
|
|
103
161
|
items_from: tasks/T-*.md
|
|
104
162
|
artifacts: []
|
|
105
163
|
gate:
|
|
106
|
-
type:
|
|
164
|
+
type: hard
|
|
165
|
+
mode: human_approval
|
|
166
|
+
approvers: [human]
|
|
167
|
+
checklist:
|
|
168
|
+
- "The person signed the development"
|
|
107
169
|
agent_context:
|
|
108
170
|
instructions: |
|
|
109
171
|
When this stage starts, items.yaml has one row per tasks/T-*.md file.
|
|
110
172
|
Build those tasks. Do not accept a spec.
|
|
173
|
+
The person signs this stage.
|
|
111
174
|
|
|
112
175
|
- id: pr_review
|
|
113
176
|
title: Pull request review
|
|
@@ -122,31 +185,108 @@ stages:
|
|
|
122
185
|
template: review.md
|
|
123
186
|
required: true
|
|
124
187
|
gate:
|
|
125
|
-
type:
|
|
126
|
-
|
|
188
|
+
type: hard
|
|
189
|
+
mode: human_approval
|
|
190
|
+
approvers: [human]
|
|
191
|
+
checklist:
|
|
192
|
+
- "The person signed the pull-request review"
|
|
193
|
+
agent_context:
|
|
194
|
+
instructions: |
|
|
195
|
+
Write the review. Do not merge.
|
|
196
|
+
The person signs this stage.
|
|
197
|
+
|
|
198
|
+
- id: qa_testing
|
|
199
|
+
title: QA testing
|
|
200
|
+
summary: What QA tried on this commit
|
|
201
|
+
kind: standard
|
|
202
|
+
skippable: false
|
|
203
|
+
owner: qa
|
|
204
|
+
collaborates: [developer]
|
|
205
|
+
artifacts:
|
|
206
|
+
- id: qa-testing
|
|
207
|
+
path: qa-testing.md
|
|
208
|
+
template: qa-testing.md
|
|
209
|
+
required: true
|
|
210
|
+
gate:
|
|
211
|
+
type: hard
|
|
212
|
+
mode: human_approval
|
|
213
|
+
approvers: [human]
|
|
214
|
+
checklist:
|
|
215
|
+
- "The person signed the QA testing note"
|
|
216
|
+
agent_context:
|
|
217
|
+
instructions: |
|
|
218
|
+
Write what was tried. Do not record a pass, and do not sign.
|
|
219
|
+
The person signs this stage.
|
|
220
|
+
|
|
221
|
+
- id: qa_signoff
|
|
222
|
+
title: QA sign-off
|
|
223
|
+
summary: The person's QA words for this commit
|
|
224
|
+
kind: standard
|
|
225
|
+
skippable: false
|
|
226
|
+
owner: qa
|
|
227
|
+
collaborates: [product-owner]
|
|
228
|
+
artifacts:
|
|
229
|
+
- id: qa-signoff
|
|
230
|
+
path: qa-signoff.md
|
|
231
|
+
template: signoff.md
|
|
232
|
+
required: true
|
|
233
|
+
gate:
|
|
234
|
+
type: hard
|
|
235
|
+
mode: human_approval
|
|
236
|
+
approvers: [human]
|
|
237
|
+
checklist:
|
|
238
|
+
- "The person signed QA for this commit"
|
|
239
|
+
agent_context:
|
|
240
|
+
instructions: |
|
|
241
|
+
Prepare what the person is asked to sign.
|
|
242
|
+
A role cannot sign. The sign-off stores the person's words and the git SHA.
|
|
243
|
+
|
|
244
|
+
- id: po_review
|
|
245
|
+
title: Product-owner review
|
|
246
|
+
summary: Whether the change matches the reading
|
|
247
|
+
kind: standard
|
|
248
|
+
skippable: false
|
|
249
|
+
owner: product-owner
|
|
250
|
+
collaborates: [product-manager]
|
|
251
|
+
artifacts:
|
|
252
|
+
- id: po-review
|
|
253
|
+
path: po-review.md
|
|
254
|
+
template: review.md
|
|
255
|
+
required: true
|
|
256
|
+
gate:
|
|
257
|
+
type: hard
|
|
258
|
+
mode: human_approval
|
|
259
|
+
approvers: [human]
|
|
260
|
+
checklist:
|
|
261
|
+
- "The person signed the product-owner review"
|
|
262
|
+
agent_context:
|
|
263
|
+
instructions: |
|
|
264
|
+
Write whether the change matches the reading. Do not accept it.
|
|
265
|
+
The person signs this stage.
|
|
127
266
|
|
|
128
|
-
- id:
|
|
129
|
-
title:
|
|
130
|
-
summary: The person
|
|
267
|
+
- id: po_signoff
|
|
268
|
+
title: Product-owner sign-off
|
|
269
|
+
summary: The person's final words for this commit
|
|
131
270
|
kind: standard
|
|
132
271
|
skippable: false
|
|
133
272
|
owner: product-owner
|
|
134
|
-
collaborates: [
|
|
273
|
+
collaborates: [qa]
|
|
135
274
|
artifacts:
|
|
136
|
-
- id:
|
|
137
|
-
path:
|
|
138
|
-
template:
|
|
275
|
+
- id: po-signoff
|
|
276
|
+
path: po-signoff.md
|
|
277
|
+
template: signoff.md
|
|
139
278
|
required: true
|
|
140
279
|
gate:
|
|
141
280
|
type: hard
|
|
142
281
|
mode: human_approval
|
|
143
282
|
approvers: [human]
|
|
144
283
|
checklist:
|
|
145
|
-
- "The person
|
|
284
|
+
- "The person signed off for this commit"
|
|
146
285
|
agent_context:
|
|
147
286
|
instructions: |
|
|
148
|
-
|
|
149
|
-
The person
|
|
287
|
+
Prepare what the person is asked to sign.
|
|
288
|
+
A role cannot sign. The sign-off stores the person's words and the git SHA.
|
|
289
|
+
Merge stays a person action after this sign-off.
|
|
150
290
|
|
|
151
291
|
on_complete:
|
|
152
292
|
archive: false
|
|
@@ -26,9 +26,9 @@ import {
|
|
|
26
26
|
renderProtocolMd,
|
|
27
27
|
renderThinAgent,
|
|
28
28
|
writeAgentHandoff
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-5GLH6ZWU.js";
|
|
30
|
+
import "./chunk-AERAWOAK.js";
|
|
31
|
+
import "./chunk-TNWFMRIA.js";
|
|
32
32
|
import "./chunk-MHODNFIL.js";
|
|
33
33
|
import "./chunk-O5SP6X5R.js";
|
|
34
34
|
export {
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
loadConfig,
|
|
7
7
|
readRole,
|
|
8
8
|
readTeamConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AERAWOAK.js";
|
|
10
10
|
import {
|
|
11
11
|
buildContext,
|
|
12
12
|
defaultMemoryDir,
|
|
13
13
|
getActiveChangeId
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TNWFMRIA.js";
|
|
15
15
|
import {
|
|
16
16
|
SddError
|
|
17
17
|
} from "./chunk-MHODNFIL.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getStage,
|
|
5
5
|
isStageSkipped,
|
|
6
6
|
shouldAutoSkip
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TNWFMRIA.js";
|
|
8
8
|
import {
|
|
9
9
|
SddError
|
|
10
10
|
} from "./chunk-MHODNFIL.js";
|
|
@@ -110,6 +110,7 @@ async function getHeadSha(projectRoot, runGit = runGitHead) {
|
|
|
110
110
|
// src/role/types.ts
|
|
111
111
|
function emptyRoleLists() {
|
|
112
112
|
return {
|
|
113
|
+
stages: [],
|
|
113
114
|
owns: [],
|
|
114
115
|
inputs: [],
|
|
115
116
|
outputs: [],
|
|
@@ -2621,6 +2622,9 @@ function canonicalRoleName(input) {
|
|
|
2621
2622
|
function roleFilePath(root, name) {
|
|
2622
2623
|
return join7(root, ".sdd", "roles", `${name}.md`);
|
|
2623
2624
|
}
|
|
2625
|
+
function roleContextDir(root, name) {
|
|
2626
|
+
return join7(root, ".sdd", "role-context", name);
|
|
2627
|
+
}
|
|
2624
2628
|
function conversationDir(root, name) {
|
|
2625
2629
|
return join7(root, ".sdd", "role-runs", "conversation", name);
|
|
2626
2630
|
}
|
|
@@ -2641,6 +2645,7 @@ function asText(value) {
|
|
|
2641
2645
|
return typeof value === "string" ? value.trim() : "";
|
|
2642
2646
|
}
|
|
2643
2647
|
var LIST_FIELDS = [
|
|
2648
|
+
["stages", "stages"],
|
|
2644
2649
|
["owns", "owns"],
|
|
2645
2650
|
["inputs", "inputs"],
|
|
2646
2651
|
["outputs", "outputs"],
|
|
@@ -2720,6 +2725,18 @@ ${front}
|
|
|
2720
2725
|
${description}
|
|
2721
2726
|
`;
|
|
2722
2727
|
}
|
|
2728
|
+
async function rolesListingStage(root, stageId) {
|
|
2729
|
+
const dir = join7(root, ".sdd", "roles");
|
|
2730
|
+
if (!await pathExists(dir)) return [];
|
|
2731
|
+
const names = [];
|
|
2732
|
+
for (const file of (await listFiles(dir)).filter((item) => item.endsWith(".md")).sort()) {
|
|
2733
|
+
const name = file.slice(0, -".md".length);
|
|
2734
|
+
const role = await readRole(root, name);
|
|
2735
|
+
if (!role) return { error: `Role file is invalid: ${name}.` };
|
|
2736
|
+
if (role.stages.includes(stageId)) names.push(role.name);
|
|
2737
|
+
}
|
|
2738
|
+
return names;
|
|
2739
|
+
}
|
|
2723
2740
|
async function readRole(root, name) {
|
|
2724
2741
|
const canonical = canonicalRoleName(name);
|
|
2725
2742
|
if (!canonical) return null;
|
|
@@ -2766,6 +2783,7 @@ async function editRole(root, nameInput, patch) {
|
|
|
2766
2783
|
if (patch.job !== void 0) role.job = patch.job.trim();
|
|
2767
2784
|
if (patch.description !== void 0) role.description = patch.description.trim();
|
|
2768
2785
|
if (patch.askFirst !== void 0) role.askFirst = patch.askFirst;
|
|
2786
|
+
if (patch.stages !== void 0) role.stages = patch.stages;
|
|
2769
2787
|
await writeRole(root, role);
|
|
2770
2788
|
return ok();
|
|
2771
2789
|
}
|
|
@@ -2828,6 +2846,7 @@ async function deleteRole(root, nameInput) {
|
|
|
2828
2846
|
if (!await pathExists(path)) return fail(ROLE_TEXT.notFound);
|
|
2829
2847
|
await removePath(path);
|
|
2830
2848
|
await removePath(conversationDir(root, name));
|
|
2849
|
+
await removePath(roleContextDir(root, name));
|
|
2831
2850
|
await removeBotBrain(root, name);
|
|
2832
2851
|
await removePath(memoryDir(root, name));
|
|
2833
2852
|
await removeAllowKey(root, name);
|
|
@@ -3303,7 +3322,7 @@ async function buildAgentPrompt(ctx, config, projectRoot, budget, runtime) {
|
|
|
3303
3322
|
}
|
|
3304
3323
|
try {
|
|
3305
3324
|
const { loadMcpConfig } = await import("./sources-3TXUPU6V.js");
|
|
3306
|
-
const { gatherMcpContextForChange, formatMcpContextForHandoff } = await import("./gather-
|
|
3325
|
+
const { gatherMcpContextForChange, formatMcpContextForHandoff } = await import("./gather-A3Q4WSPH.js");
|
|
3307
3326
|
const mcpCfg = await loadMcpConfig(projectRoot);
|
|
3308
3327
|
if (mcpCfg.auto_fetch_on_handoff && mcpCfg.sources.length) {
|
|
3309
3328
|
const fetched = await gatherMcpContextForChange(projectRoot, ctx);
|
|
@@ -3406,10 +3425,12 @@ export {
|
|
|
3406
3425
|
checkModels,
|
|
3407
3426
|
canonicalRoleName,
|
|
3408
3427
|
roleFilePath,
|
|
3428
|
+
roleContextDir,
|
|
3409
3429
|
conversationDir,
|
|
3410
3430
|
memoryDir,
|
|
3411
3431
|
allowFilePath,
|
|
3412
3432
|
parseRoleDocument,
|
|
3433
|
+
rolesListingStage,
|
|
3413
3434
|
readRole,
|
|
3414
3435
|
createRole,
|
|
3415
3436
|
editRole,
|
|
@@ -181,11 +181,55 @@ var ChangeMetaSchema = z.object({
|
|
|
181
181
|
|
|
182
182
|
// src/slug.ts
|
|
183
183
|
var SLUG_MAX = 60;
|
|
184
|
+
function isSpace(ch) {
|
|
185
|
+
if (ch.length !== 1) return false;
|
|
186
|
+
const code = ch.charCodeAt(0);
|
|
187
|
+
return code === 9 || code === 10 || code === 11 || code === 12 || code === 13 || code === 32 || code === 160 || code === 5760 || code >= 8192 && code <= 8202 || code === 8232 || code === 8233 || code === 8239 || code === 8287 || code === 12288 || code === 65279;
|
|
188
|
+
}
|
|
189
|
+
function isDigit(ch) {
|
|
190
|
+
return ch.length === 1 && ch >= "0" && ch <= "9";
|
|
191
|
+
}
|
|
192
|
+
function isSlugChar(ch) {
|
|
193
|
+
return ch.length === 1 && (ch >= "a" && ch <= "z" || ch >= "0" && ch <= "9");
|
|
194
|
+
}
|
|
184
195
|
function trailingIssueRef(input) {
|
|
185
|
-
|
|
196
|
+
let i = input.length - 1;
|
|
197
|
+
while (i >= 0 && isSpace(input[i] ?? "")) i -= 1;
|
|
198
|
+
if (i >= 0 && input[i] === ")") {
|
|
199
|
+
i -= 1;
|
|
200
|
+
while (i >= 0 && isSpace(input[i] ?? "")) i -= 1;
|
|
201
|
+
}
|
|
202
|
+
const digits = [];
|
|
203
|
+
while (i >= 0 && isDigit(input[i] ?? "")) {
|
|
204
|
+
digits.push(input[i] ?? "");
|
|
205
|
+
i -= 1;
|
|
206
|
+
}
|
|
207
|
+
if (digits.length === 0) return void 0;
|
|
208
|
+
while (i >= 0 && isSpace(input[i] ?? "")) i -= 1;
|
|
209
|
+
if (input[i] !== "#") return void 0;
|
|
210
|
+
digits.reverse();
|
|
211
|
+
return digits.join("");
|
|
212
|
+
}
|
|
213
|
+
function collapse(input) {
|
|
214
|
+
let out = "";
|
|
215
|
+
let dash = false;
|
|
216
|
+
for (const ch of input) {
|
|
217
|
+
if (ch === "'" || ch === '"') continue;
|
|
218
|
+
if (isSlugChar(ch)) {
|
|
219
|
+
out += ch;
|
|
220
|
+
dash = false;
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (!dash && out.length > 0) {
|
|
224
|
+
out += "-";
|
|
225
|
+
dash = true;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (out.endsWith("-")) return out.slice(0, -1);
|
|
229
|
+
return out;
|
|
186
230
|
}
|
|
187
231
|
function slugify(input) {
|
|
188
|
-
const normalized = input.toLowerCase().trim()
|
|
232
|
+
const normalized = collapse(input.toLowerCase().trim());
|
|
189
233
|
if (normalized.length <= SLUG_MAX) return normalized;
|
|
190
234
|
const issue = trailingIssueRef(input);
|
|
191
235
|
const tokens = normalized.split("-").filter(Boolean);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
gitUserName,
|
|
5
5
|
loadConfig,
|
|
6
6
|
readTeamConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AERAWOAK.js";
|
|
8
8
|
import {
|
|
9
9
|
ChangeMetaSchema,
|
|
10
10
|
activeStages,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
setActiveChange,
|
|
23
23
|
shouldAutoSkip,
|
|
24
24
|
uniqueChangeDirName
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TNWFMRIA.js";
|
|
26
26
|
import {
|
|
27
27
|
archiveDir,
|
|
28
28
|
changeMetaPath,
|
|
@@ -970,7 +970,7 @@ async function createChange(input) {
|
|
|
970
970
|
await materializeStageArtifacts(projectRoot, config, id, workflow, meta, firstStage);
|
|
971
971
|
await setActiveChange(projectRoot, config, id);
|
|
972
972
|
try {
|
|
973
|
-
const { refreshActiveAgentContext } = await import("./agents-
|
|
973
|
+
const { refreshActiveAgentContext } = await import("./agents-U5RVEZTX.js");
|
|
974
974
|
await refreshActiveAgentContext(projectRoot);
|
|
975
975
|
} catch {
|
|
976
976
|
}
|
|
@@ -1072,7 +1072,7 @@ async function advanceStage(projectRoot, config, changeId, opts) {
|
|
|
1072
1072
|
stage2
|
|
1073
1073
|
);
|
|
1074
1074
|
try {
|
|
1075
|
-
const { refreshActiveAgentContext } = await import("./agents-
|
|
1075
|
+
const { refreshActiveAgentContext } = await import("./agents-U5RVEZTX.js");
|
|
1076
1076
|
await refreshActiveAgentContext(projectRoot);
|
|
1077
1077
|
} catch {
|
|
1078
1078
|
}
|
|
@@ -1129,7 +1129,7 @@ async function advanceStage(projectRoot, config, changeId, opts) {
|
|
|
1129
1129
|
stage
|
|
1130
1130
|
);
|
|
1131
1131
|
try {
|
|
1132
|
-
const { refreshActiveAgentContext } = await import("./agents-
|
|
1132
|
+
const { refreshActiveAgentContext } = await import("./agents-U5RVEZTX.js");
|
|
1133
1133
|
await refreshActiveAgentContext(projectRoot);
|
|
1134
1134
|
} catch {
|
|
1135
1135
|
}
|
|
@@ -1262,7 +1262,7 @@ async function completeChange(projectRoot, config, changeId) {
|
|
|
1262
1262
|
let promoted;
|
|
1263
1263
|
if (ctx.meta.workflow === "greenfield" || ctx.meta.flags?.greenfield === true) {
|
|
1264
1264
|
try {
|
|
1265
|
-
const { promoteGreenfieldToMemory: promoteGreenfieldToMemory2 } = await import("./greenfield-
|
|
1265
|
+
const { promoteGreenfieldToMemory: promoteGreenfieldToMemory2 } = await import("./greenfield-QTMU2MH6.js");
|
|
1266
1266
|
promoted = await promoteGreenfieldToMemory2(projectRoot, config, changeId);
|
|
1267
1267
|
} catch {
|
|
1268
1268
|
}
|
|
@@ -1391,7 +1391,7 @@ function parseFeaturesBacklog(markdown, sourcePath) {
|
|
|
1391
1391
|
async function findFeaturesBacklogPath(projectRoot, config) {
|
|
1392
1392
|
const mem = join6(memoryDir(projectRoot, config), "features.md");
|
|
1393
1393
|
if (await pathExists(mem)) return mem;
|
|
1394
|
-
const { getActiveChangeId: getActiveChangeId2 } = await import("./change-context-
|
|
1394
|
+
const { getActiveChangeId: getActiveChangeId2 } = await import("./change-context-CZT3U7MZ.js");
|
|
1395
1395
|
const active = await getActiveChangeId2(projectRoot, config);
|
|
1396
1396
|
if (active) {
|
|
1397
1397
|
const p = join6(changePath(projectRoot, config, active), "features.md");
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
startFeatureFromBacklog,
|
|
7
7
|
startGreenfield,
|
|
8
8
|
updateFeatureStatus
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-Z2ULYVHO.js";
|
|
10
|
+
import "./chunk-AERAWOAK.js";
|
|
11
|
+
import "./chunk-TNWFMRIA.js";
|
|
12
12
|
import "./chunk-MHODNFIL.js";
|
|
13
13
|
import "./chunk-O5SP6X5R.js";
|
|
14
14
|
export {
|