gsd-pi 2.16.0 → 2.17.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/dist/resources/extensions/gsd/auto-dashboard.ts +4 -0
- package/dist/resources/extensions/gsd/auto-dispatch.ts +9 -3
- package/dist/resources/extensions/gsd/auto-prompts.ts +71 -41
- package/dist/resources/extensions/gsd/auto-recovery.ts +7 -2
- package/dist/resources/extensions/gsd/auto.ts +54 -15
- package/dist/resources/extensions/gsd/commands.ts +20 -2
- package/dist/resources/extensions/gsd/complexity.ts +236 -0
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +1 -0
- package/dist/resources/extensions/gsd/files.ts +6 -2
- package/dist/resources/extensions/gsd/git-service.ts +19 -8
- package/dist/resources/extensions/gsd/gitignore.ts +41 -2
- package/dist/resources/extensions/gsd/guided-flow.ts +10 -6
- package/dist/resources/extensions/gsd/metrics.ts +44 -0
- package/dist/resources/extensions/gsd/native-git-bridge.ts +5 -0
- package/dist/resources/extensions/gsd/native-parser-bridge.ts +5 -0
- package/dist/resources/extensions/gsd/preferences.ts +122 -1
- package/dist/resources/extensions/gsd/routing-history.ts +290 -0
- package/dist/resources/extensions/gsd/tests/auto-recovery.test.ts +50 -0
- package/dist/resources/extensions/gsd/tests/budget-prediction.test.ts +220 -0
- package/dist/resources/extensions/gsd/tests/complexity-routing.test.ts +294 -0
- package/dist/resources/extensions/gsd/tests/context-compression.test.ts +180 -0
- package/dist/resources/extensions/gsd/tests/git-service.test.ts +132 -0
- package/dist/resources/extensions/gsd/tests/preferences-git.test.ts +28 -0
- package/dist/resources/extensions/gsd/tests/routing-history.test.ts +87 -0
- package/dist/resources/extensions/gsd/tests/stop-auto-remote.test.ts +130 -0
- package/dist/resources/extensions/gsd/tests/token-profile.test.ts +263 -0
- package/dist/resources/extensions/gsd/types.ts +28 -0
- package/dist/resources/extensions/gsd/worktree.ts +2 -2
- package/package.json +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +493 -13
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +422 -62
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.d.ts +12 -0
- package/packages/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.js +9 -22
- package/packages/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/google-shared.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/google-shared.test.js +125 -0
- package/packages/pi-ai/dist/providers/google-shared.test.js.map +1 -0
- package/packages/pi-ai/src/models.generated.ts +422 -62
- package/packages/pi-ai/src/providers/google-shared.test.ts +137 -0
- package/packages/pi-ai/src/providers/google-shared.ts +10 -19
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.d.ts +7 -7
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.js +209 -13
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js +67 -0
- package/packages/pi-coding-agent/dist/core/tools/edit-diff.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +10 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/src/core/tools/edit-diff.test.ts +85 -0
- package/packages/pi-coding-agent/src/core/tools/edit-diff.ts +245 -17
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +13 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +10 -0
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/src/resources/extensions/gsd/auto-dashboard.ts +4 -0
- package/src/resources/extensions/gsd/auto-dispatch.ts +9 -3
- package/src/resources/extensions/gsd/auto-prompts.ts +71 -41
- package/src/resources/extensions/gsd/auto-recovery.ts +7 -2
- package/src/resources/extensions/gsd/auto.ts +54 -15
- package/src/resources/extensions/gsd/commands.ts +20 -2
- package/src/resources/extensions/gsd/complexity.ts +236 -0
- package/src/resources/extensions/gsd/docs/preferences-reference.md +1 -0
- package/src/resources/extensions/gsd/files.ts +6 -2
- package/src/resources/extensions/gsd/git-service.ts +19 -8
- package/src/resources/extensions/gsd/gitignore.ts +41 -2
- package/src/resources/extensions/gsd/guided-flow.ts +10 -6
- package/src/resources/extensions/gsd/metrics.ts +44 -0
- package/src/resources/extensions/gsd/native-git-bridge.ts +5 -0
- package/src/resources/extensions/gsd/native-parser-bridge.ts +5 -0
- package/src/resources/extensions/gsd/preferences.ts +122 -1
- package/src/resources/extensions/gsd/routing-history.ts +290 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/budget-prediction.test.ts +220 -0
- package/src/resources/extensions/gsd/tests/complexity-routing.test.ts +294 -0
- package/src/resources/extensions/gsd/tests/context-compression.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/git-service.test.ts +132 -0
- package/src/resources/extensions/gsd/tests/preferences-git.test.ts +28 -0
- package/src/resources/extensions/gsd/tests/routing-history.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/stop-auto-remote.test.ts +130 -0
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +263 -0
- package/src/resources/extensions/gsd/types.ts +28 -0
- package/src/resources/extensions/gsd/worktree.ts +2 -2
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Profile — unit tests for M004/S01.
|
|
3
|
+
*
|
|
4
|
+
* Tests profile resolution, preference merging, phase skip defaults,
|
|
5
|
+
* subagent model routing, default-to-balanced behavior, and dispatch
|
|
6
|
+
* table guard clauses (source-level structural verification).
|
|
7
|
+
*
|
|
8
|
+
* Uses source-level checks (readFileSync + string matching) to avoid
|
|
9
|
+
* @gsd/pi-coding-agent import resolution issues in dev environments.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import test from "node:test";
|
|
13
|
+
import assert from "node:assert/strict";
|
|
14
|
+
import { readFileSync } from "node:fs";
|
|
15
|
+
import { join, dirname } from "node:path";
|
|
16
|
+
import { fileURLToPath } from "node:url";
|
|
17
|
+
|
|
18
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
|
|
20
|
+
// ─── Source files for structural checks ───────────────────────────────────
|
|
21
|
+
|
|
22
|
+
const dispatchSrc = readFileSync(join(__dirname, "..", "auto-dispatch.ts"), "utf-8");
|
|
23
|
+
const preferencesSrc = readFileSync(join(__dirname, "..", "preferences.ts"), "utf-8");
|
|
24
|
+
const typesSrc = readFileSync(join(__dirname, "..", "types.ts"), "utf-8");
|
|
25
|
+
|
|
26
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
27
|
+
// Type Definitions
|
|
28
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
29
|
+
|
|
30
|
+
test("types: TokenProfile type exported with budget/balanced/quality", () => {
|
|
31
|
+
assert.ok(typesSrc.includes("export type TokenProfile"), "TokenProfile should be exported");
|
|
32
|
+
assert.ok(typesSrc.includes("'budget'"), "should include budget");
|
|
33
|
+
assert.ok(typesSrc.includes("'balanced'"), "should include balanced");
|
|
34
|
+
assert.ok(typesSrc.includes("'quality'"), "should include quality");
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test("types: InlineLevel type exported with full/standard/minimal", () => {
|
|
38
|
+
assert.ok(typesSrc.includes("export type InlineLevel"), "InlineLevel should be exported");
|
|
39
|
+
assert.ok(typesSrc.includes("'full'"), "should include full");
|
|
40
|
+
assert.ok(typesSrc.includes("'standard'"), "should include standard");
|
|
41
|
+
assert.ok(typesSrc.includes("'minimal'"), "should include minimal");
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test("types: PhaseSkipPreferences interface exported", () => {
|
|
45
|
+
assert.ok(typesSrc.includes("export interface PhaseSkipPreferences"), "PhaseSkipPreferences should be exported");
|
|
46
|
+
assert.ok(typesSrc.includes("skip_research"), "should include skip_research");
|
|
47
|
+
assert.ok(typesSrc.includes("skip_reassess"), "should include skip_reassess");
|
|
48
|
+
assert.ok(typesSrc.includes("skip_slice_research"), "should include skip_slice_research");
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
52
|
+
// GSDPreferences Interface
|
|
53
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
54
|
+
|
|
55
|
+
test("preferences: GSDPreferences includes token_profile field", () => {
|
|
56
|
+
assert.ok(
|
|
57
|
+
preferencesSrc.includes("token_profile?: TokenProfile"),
|
|
58
|
+
"GSDPreferences should have token_profile field",
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("preferences: GSDPreferences includes phases field", () => {
|
|
63
|
+
assert.ok(
|
|
64
|
+
preferencesSrc.includes("phases?: PhaseSkipPreferences"),
|
|
65
|
+
"GSDPreferences should have phases field",
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("preferences: GSDModelConfig includes subagent field", () => {
|
|
70
|
+
// Check both v1 and v2 configs
|
|
71
|
+
const v1Match = preferencesSrc.match(/interface GSDModelConfig\s*\{[^}]*subagent/);
|
|
72
|
+
assert.ok(v1Match, "GSDModelConfig should have subagent field");
|
|
73
|
+
const v2Match = preferencesSrc.match(/interface GSDModelConfigV2\s*\{[^}]*subagent/);
|
|
74
|
+
assert.ok(v2Match, "GSDModelConfigV2 should have subagent field");
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test("preferences: KNOWN_PREFERENCE_KEYS includes token_profile and phases", () => {
|
|
78
|
+
assert.ok(preferencesSrc.includes('"token_profile"'), "KNOWN_PREFERENCE_KEYS should include token_profile");
|
|
79
|
+
assert.ok(preferencesSrc.includes('"phases"'), "KNOWN_PREFERENCE_KEYS should include phases");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
83
|
+
// Profile Resolution
|
|
84
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
85
|
+
|
|
86
|
+
test("profile: resolveProfileDefaults exists and handles all 3 tiers", () => {
|
|
87
|
+
assert.ok(
|
|
88
|
+
preferencesSrc.includes("export function resolveProfileDefaults"),
|
|
89
|
+
"resolveProfileDefaults should be exported",
|
|
90
|
+
);
|
|
91
|
+
assert.ok(
|
|
92
|
+
preferencesSrc.includes('case "budget"') &&
|
|
93
|
+
preferencesSrc.includes('case "balanced"') &&
|
|
94
|
+
preferencesSrc.includes('case "quality"'),
|
|
95
|
+
"resolveProfileDefaults should handle all 3 tiers",
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test("profile: budget profile sets phase skips to true", () => {
|
|
100
|
+
// Extract the budget case block
|
|
101
|
+
const budgetIdx = preferencesSrc.indexOf('case "budget":');
|
|
102
|
+
const balancedIdx = preferencesSrc.indexOf('case "balanced":');
|
|
103
|
+
const budgetBlock = preferencesSrc.slice(budgetIdx, balancedIdx);
|
|
104
|
+
assert.ok(budgetBlock.includes("skip_research: true"), "budget should skip research");
|
|
105
|
+
assert.ok(budgetBlock.includes("skip_reassess: true"), "budget should skip reassess");
|
|
106
|
+
assert.ok(budgetBlock.includes("skip_slice_research: true"), "budget should skip slice research");
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test("profile: balanced profile skips only slice research", () => {
|
|
110
|
+
const balancedIdx = preferencesSrc.indexOf('case "balanced":');
|
|
111
|
+
const qualityIdx = preferencesSrc.indexOf('case "quality":');
|
|
112
|
+
const balancedBlock = preferencesSrc.slice(balancedIdx, qualityIdx);
|
|
113
|
+
assert.ok(balancedBlock.includes("skip_slice_research: true"), "balanced should skip slice research");
|
|
114
|
+
assert.ok(!balancedBlock.includes("skip_research: true"), "balanced should NOT skip milestone research");
|
|
115
|
+
assert.ok(!balancedBlock.includes("skip_reassess: true"), "balanced should NOT skip reassess");
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test("profile: quality profile has empty phases (no skips)", () => {
|
|
119
|
+
const qualityIdx = preferencesSrc.indexOf('case "quality":');
|
|
120
|
+
const qualityEnd = preferencesSrc.indexOf("}", qualityIdx + 50);
|
|
121
|
+
// Look for the return block after case "quality":
|
|
122
|
+
const qualityReturn = preferencesSrc.slice(qualityIdx, qualityIdx + 200);
|
|
123
|
+
assert.ok(
|
|
124
|
+
qualityReturn.includes("phases: {}"),
|
|
125
|
+
"quality should have empty phases object (no skips)",
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
130
|
+
// Default Behavior (D046)
|
|
131
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
132
|
+
|
|
133
|
+
test("profile: resolveEffectiveProfile defaults to balanced (D046)", () => {
|
|
134
|
+
assert.ok(
|
|
135
|
+
preferencesSrc.includes("export function resolveEffectiveProfile"),
|
|
136
|
+
"resolveEffectiveProfile should be exported",
|
|
137
|
+
);
|
|
138
|
+
assert.ok(
|
|
139
|
+
preferencesSrc.includes('return "balanced"'),
|
|
140
|
+
"resolveEffectiveProfile should default to balanced",
|
|
141
|
+
);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
145
|
+
// Inline Level Mapping
|
|
146
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
147
|
+
|
|
148
|
+
test("profile: resolveInlineLevel maps profile to inline level", () => {
|
|
149
|
+
assert.ok(
|
|
150
|
+
preferencesSrc.includes("export function resolveInlineLevel"),
|
|
151
|
+
"resolveInlineLevel should be exported",
|
|
152
|
+
);
|
|
153
|
+
assert.ok(preferencesSrc.includes('case "budget": return "minimal"'), "budget → minimal");
|
|
154
|
+
assert.ok(preferencesSrc.includes('case "balanced": return "standard"'), "balanced → standard");
|
|
155
|
+
assert.ok(preferencesSrc.includes('case "quality": return "full"'), "quality → full");
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
159
|
+
// Validation
|
|
160
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
161
|
+
|
|
162
|
+
test("validate: validatePreferences handles token_profile", () => {
|
|
163
|
+
assert.ok(
|
|
164
|
+
preferencesSrc.includes("preferences.token_profile") &&
|
|
165
|
+
preferencesSrc.includes("budget, balanced, quality"),
|
|
166
|
+
"validatePreferences should validate token_profile enum values",
|
|
167
|
+
);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
test("validate: validatePreferences handles phases object", () => {
|
|
171
|
+
assert.ok(
|
|
172
|
+
preferencesSrc.includes("preferences.phases") &&
|
|
173
|
+
preferencesSrc.includes("skip_research") &&
|
|
174
|
+
preferencesSrc.includes("skip_reassess") &&
|
|
175
|
+
preferencesSrc.includes("skip_slice_research"),
|
|
176
|
+
"validatePreferences should validate phases fields",
|
|
177
|
+
);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
test("validate: phases warns on unknown keys", () => {
|
|
181
|
+
assert.ok(
|
|
182
|
+
preferencesSrc.includes("knownPhaseKeys") &&
|
|
183
|
+
preferencesSrc.includes("unknown phases key"),
|
|
184
|
+
"validatePreferences should warn on unknown phase keys",
|
|
185
|
+
);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
189
|
+
// Merge
|
|
190
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
191
|
+
|
|
192
|
+
test("merge: mergePreferences handles token_profile with nullish coalescing", () => {
|
|
193
|
+
assert.ok(
|
|
194
|
+
preferencesSrc.includes("token_profile: override.token_profile ?? base.token_profile"),
|
|
195
|
+
"mergePreferences should use nullish coalescing for token_profile",
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
test("merge: mergePreferences handles phases with spread", () => {
|
|
200
|
+
assert.ok(
|
|
201
|
+
preferencesSrc.includes("...(base.phases") && preferencesSrc.includes("...(override.phases"),
|
|
202
|
+
"mergePreferences should spread phases objects",
|
|
203
|
+
);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
207
|
+
// Subagent Model Routing
|
|
208
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
209
|
+
|
|
210
|
+
test("subagent: budget profile sets subagent model", () => {
|
|
211
|
+
const budgetIdx = preferencesSrc.indexOf('case "budget":');
|
|
212
|
+
const balancedIdx = preferencesSrc.indexOf('case "balanced":');
|
|
213
|
+
const budgetBlock = preferencesSrc.slice(budgetIdx, balancedIdx);
|
|
214
|
+
assert.ok(budgetBlock.includes("subagent:"), "budget profile should set subagent model");
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
test("subagent: resolveModelWithFallbacksForUnit handles subagent unit types", () => {
|
|
218
|
+
assert.ok(
|
|
219
|
+
preferencesSrc.includes('"subagent"') && preferencesSrc.includes('startsWith("subagent/")'),
|
|
220
|
+
"resolveModelWithFallbacksForUnit should handle subagent and subagent/* unit types",
|
|
221
|
+
);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
225
|
+
// Dispatch Table — Phase Skip Guards
|
|
226
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
227
|
+
|
|
228
|
+
test("dispatch: research-milestone rule has skip_research guard", () => {
|
|
229
|
+
// Find the research-milestone rule and check it has the guard
|
|
230
|
+
const ruleIdx = dispatchSrc.indexOf("research-milestone");
|
|
231
|
+
assert.ok(ruleIdx > -1, "should have research-milestone rule");
|
|
232
|
+
// The guard should appear near this rule
|
|
233
|
+
assert.ok(
|
|
234
|
+
dispatchSrc.includes("skip_research") && dispatchSrc.includes("research-milestone"),
|
|
235
|
+
"research-milestone dispatch rule should check phases.skip_research",
|
|
236
|
+
);
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
test("dispatch: research-slice rule has skip guards", () => {
|
|
240
|
+
const ruleIdx = dispatchSrc.indexOf("research-slice");
|
|
241
|
+
assert.ok(ruleIdx > -1, "should have research-slice rule");
|
|
242
|
+
const afterRule = dispatchSrc.slice(ruleIdx);
|
|
243
|
+
assert.ok(
|
|
244
|
+
afterRule.includes("skip_research") || afterRule.includes("skip_slice_research"),
|
|
245
|
+
"research-slice rule should check skip_research or skip_slice_research",
|
|
246
|
+
);
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
test("dispatch: reassess-roadmap rule has skip_reassess guard", () => {
|
|
250
|
+
assert.ok(
|
|
251
|
+
dispatchSrc.includes("skip_reassess") && dispatchSrc.includes("reassess-roadmap"),
|
|
252
|
+
"reassess-roadmap dispatch rule should check phases.skip_reassess",
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
test("dispatch: phase skip guards return null (not stop)", () => {
|
|
257
|
+
// Verify skip guards use return null pattern
|
|
258
|
+
const researchGuard = dispatchSrc.match(/skip_research\).*?return null/s);
|
|
259
|
+
assert.ok(researchGuard, "skip_research guard should return null (fall-through)");
|
|
260
|
+
|
|
261
|
+
const reassessGuard = dispatchSrc.match(/skip_reassess\).*?return null/s);
|
|
262
|
+
assert.ok(reassessGuard, "skip_reassess guard should return null (fall-through)");
|
|
263
|
+
});
|
|
@@ -238,6 +238,34 @@ export interface HookDispatchResult {
|
|
|
238
238
|
|
|
239
239
|
export type BudgetEnforcementMode = 'warn' | 'pause' | 'halt';
|
|
240
240
|
|
|
241
|
+
export type TokenProfile = 'budget' | 'balanced' | 'quality';
|
|
242
|
+
|
|
243
|
+
export type InlineLevel = 'full' | 'standard' | 'minimal';
|
|
244
|
+
|
|
245
|
+
export type ComplexityTier = 'light' | 'standard' | 'heavy';
|
|
246
|
+
|
|
247
|
+
export interface ClassificationResult {
|
|
248
|
+
tier: ComplexityTier;
|
|
249
|
+
reason: string;
|
|
250
|
+
downgraded: boolean;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface TaskMetadata {
|
|
254
|
+
fileCount?: number;
|
|
255
|
+
dependencyCount?: number;
|
|
256
|
+
isNewFile?: boolean;
|
|
257
|
+
tags?: string[];
|
|
258
|
+
estimatedLines?: number;
|
|
259
|
+
codeBlockCount?: number;
|
|
260
|
+
complexityKeywords?: string[];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface PhaseSkipPreferences {
|
|
264
|
+
skip_research?: boolean;
|
|
265
|
+
skip_reassess?: boolean;
|
|
266
|
+
skip_slice_research?: boolean;
|
|
267
|
+
}
|
|
268
|
+
|
|
241
269
|
export interface NotificationPreferences {
|
|
242
270
|
enabled?: boolean; // default true
|
|
243
271
|
on_complete?: boolean; // notify on each unit completion
|
|
@@ -54,10 +54,10 @@ export function setActiveMilestoneId(basePath: string, milestoneId: string | nul
|
|
|
54
54
|
* record when the user starts from a different branch (#300). Always a no-op
|
|
55
55
|
* if on a GSD slice branch.
|
|
56
56
|
*/
|
|
57
|
-
export function captureIntegrationBranch(basePath: string, milestoneId: string): void {
|
|
57
|
+
export function captureIntegrationBranch(basePath: string, milestoneId: string, options?: { commitDocs?: boolean }): void {
|
|
58
58
|
const svc = getService(basePath);
|
|
59
59
|
const current = svc.getCurrentBranch();
|
|
60
|
-
writeIntegrationBranch(basePath, milestoneId, current);
|
|
60
|
+
writeIntegrationBranch(basePath, milestoneId, current, options);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// ─── Pure Utility Functions (unchanged) ────────────────────────────────────
|