specweave 0.32.2 → 0.32.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +39 -0
- package/bin/specweave.js +34 -0
- package/dist/plugins/specweave-ado/lib/ado-duplicate-detector.d.ts +100 -0
- package/dist/plugins/specweave-ado/lib/ado-duplicate-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-duplicate-detector.js +291 -0
- package/dist/plugins/specweave-ado/lib/ado-duplicate-detector.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-duplicate-detector.d.ts +103 -0
- package/dist/plugins/specweave-jira/lib/jira-duplicate-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-duplicate-detector.js +310 -0
- package/dist/plugins/specweave-jira/lib/jira-duplicate-detector.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-permission-gate.d.ts +126 -0
- package/dist/plugins/specweave-jira/lib/jira-permission-gate.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-permission-gate.js +207 -0
- package/dist/plugins/specweave-jira/lib/jira-permission-gate.js.map +1 -0
- package/dist/src/adapters/codex/README.md +1 -1
- package/dist/src/adapters/codex/adapter.js +1 -1
- package/dist/src/cli/commands/archive.d.ts +2 -0
- package/dist/src/cli/commands/archive.d.ts.map +1 -1
- package/dist/src/cli/commands/archive.js +33 -0
- package/dist/src/cli/commands/archive.js.map +1 -1
- package/dist/src/cli/commands/context.d.ts +92 -0
- package/dist/src/cli/commands/context.d.ts.map +1 -0
- package/dist/src/cli/commands/context.js +205 -0
- package/dist/src/cli/commands/context.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +111 -69
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/init/external-import.d.ts +3 -0
- package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/external-import.js +17 -4
- package/dist/src/cli/helpers/init/external-import.js.map +1 -1
- package/dist/src/cli/helpers/init/index.d.ts +1 -0
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/index.js +2 -0
- package/dist/src/cli/helpers/init/index.js.map +1 -1
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts +70 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js +214 -4
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js.map +1 -1
- package/dist/src/cli/helpers/init/living-docs-preflight.d.ts +4 -0
- package/dist/src/cli/helpers/init/living-docs-preflight.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/living-docs-preflight.js +34 -3
- package/dist/src/cli/helpers/init/living-docs-preflight.js.map +1 -1
- package/dist/src/cli/helpers/init/testing-config.d.ts +3 -0
- package/dist/src/cli/helpers/init/testing-config.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/testing-config.js +9 -2
- package/dist/src/cli/helpers/init/testing-config.js.map +1 -1
- package/dist/src/cli/helpers/init/translation-config.d.ts +3 -0
- package/dist/src/cli/helpers/init/translation-config.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/translation-config.js +21 -4
- package/dist/src/cli/helpers/init/translation-config.js.map +1 -1
- package/dist/src/cli/helpers/init/wizard-navigation.d.ts +45 -0
- package/dist/src/cli/helpers/init/wizard-navigation.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/wizard-navigation.js +97 -0
- package/dist/src/cli/helpers/init/wizard-navigation.js.map +1 -0
- package/dist/src/core/increment/increment-archiver.d.ts +25 -4
- package/dist/src/core/increment/increment-archiver.d.ts.map +1 -1
- package/dist/src/core/increment/increment-archiver.js +64 -20
- package/dist/src/core/increment/increment-archiver.js.map +1 -1
- package/dist/src/core/increment/increment-utils.d.ts +65 -0
- package/dist/src/core/increment/increment-utils.d.ts.map +1 -1
- package/dist/src/core/increment/increment-utils.js +114 -0
- package/dist/src/core/increment/increment-utils.js.map +1 -1
- package/dist/src/core/living-docs/feature-archiver.d.ts +4 -0
- package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -1
- package/dist/src/core/living-docs/feature-archiver.js +32 -10
- package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
- package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -1
- package/dist/src/core/living-docs/feature-id-manager.js +7 -3
- package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
- package/dist/src/core/living-docs/governance/ecosystem-detector.d.ts +38 -0
- package/dist/src/core/living-docs/governance/ecosystem-detector.d.ts.map +1 -0
- package/dist/src/core/living-docs/governance/ecosystem-detector.js +325 -0
- package/dist/src/core/living-docs/governance/ecosystem-detector.js.map +1 -0
- package/dist/src/core/living-docs/governance/frontend-standards-parser.d.ts +74 -0
- package/dist/src/core/living-docs/governance/frontend-standards-parser.d.ts.map +1 -0
- package/dist/src/core/living-docs/governance/frontend-standards-parser.js +366 -0
- package/dist/src/core/living-docs/governance/frontend-standards-parser.js.map +1 -0
- package/dist/src/core/living-docs/governance/go-standards-parser.d.ts +64 -0
- package/dist/src/core/living-docs/governance/go-standards-parser.d.ts.map +1 -0
- package/dist/src/core/living-docs/governance/go-standards-parser.js +229 -0
- package/dist/src/core/living-docs/governance/go-standards-parser.js.map +1 -0
- package/dist/src/core/living-docs/governance/index.d.ts +50 -0
- package/dist/src/core/living-docs/governance/index.d.ts.map +1 -0
- package/dist/src/core/living-docs/governance/index.js +56 -0
- package/dist/src/core/living-docs/governance/index.js.map +1 -0
- package/dist/src/core/living-docs/governance/java-standards-parser.d.ts +89 -0
- package/dist/src/core/living-docs/governance/java-standards-parser.d.ts.map +1 -0
- package/dist/src/core/living-docs/governance/java-standards-parser.js +356 -0
- package/dist/src/core/living-docs/governance/java-standards-parser.js.map +1 -0
- package/dist/src/core/living-docs/governance/python-standards-parser.d.ts +83 -0
- package/dist/src/core/living-docs/governance/python-standards-parser.d.ts.map +1 -0
- package/dist/src/core/living-docs/governance/python-standards-parser.js +347 -0
- package/dist/src/core/living-docs/governance/python-standards-parser.js.map +1 -0
- package/dist/src/core/living-docs/governance/standards-generator.d.ts +38 -0
- package/dist/src/core/living-docs/governance/standards-generator.d.ts.map +1 -0
- package/dist/src/core/living-docs/governance/standards-generator.js +476 -0
- package/dist/src/core/living-docs/governance/standards-generator.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/architecture-generator.d.ts.map +1 -1
- package/dist/src/core/living-docs/intelligent-analyzer/architecture-generator.js +54 -2
- package/dist/src/core/living-docs/intelligent-analyzer/architecture-generator.js.map +1 -1
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.d.ts +5 -1
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.d.ts.map +1 -1
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.js +358 -30
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.js.map +1 -1
- package/dist/src/core/living-docs/intelligent-analyzer/types.d.ts +44 -0
- package/dist/src/core/living-docs/intelligent-analyzer/types.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.d.ts +6 -3
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +17 -8
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/living-docs/module-analyzer.d.ts +22 -0
- package/dist/src/core/living-docs/module-analyzer.d.ts.map +1 -1
- package/dist/src/core/living-docs/module-analyzer.js +123 -19
- package/dist/src/core/living-docs/module-analyzer.js.map +1 -1
- package/dist/src/core/llm/provider-factory.js +2 -2
- package/dist/src/core/llm/provider-factory.js.map +1 -1
- package/dist/src/core/llm/providers/anthropic-provider.js +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.js +8 -4
- package/dist/src/core/llm/providers/bedrock-provider.js.map +1 -1
- package/dist/src/importers/jira-importer.d.ts +14 -0
- package/dist/src/importers/jira-importer.d.ts.map +1 -1
- package/dist/src/importers/jira-importer.js +75 -0
- package/dist/src/importers/jira-importer.js.map +1 -1
- package/dist/src/integrations/jira/jira-token-provider.d.ts +93 -0
- package/dist/src/integrations/jira/jira-token-provider.d.ts.map +1 -0
- package/dist/src/integrations/jira/jira-token-provider.js +160 -0
- package/dist/src/integrations/jira/jira-token-provider.js.map +1 -0
- package/dist/src/sync/ado-reconciler.d.ts +92 -0
- package/dist/src/sync/ado-reconciler.d.ts.map +1 -0
- package/dist/src/sync/ado-reconciler.js +335 -0
- package/dist/src/sync/ado-reconciler.js.map +1 -0
- package/dist/src/sync/jira-reconciler.d.ts +106 -0
- package/dist/src/sync/jira-reconciler.d.ts.map +1 -0
- package/dist/src/sync/jira-reconciler.js +405 -0
- package/dist/src/sync/jira-reconciler.js.map +1 -0
- package/dist/src/types/model-selection.d.ts +6 -4
- package/dist/src/types/model-selection.d.ts.map +1 -1
- package/dist/src/types/model-selection.js +3 -1
- package/dist/src/types/model-selection.js.map +1 -1
- package/dist/src/utils/external-tool-drift-detector.d.ts +1 -1
- package/dist/src/utils/external-tool-drift-detector.d.ts.map +1 -1
- package/dist/src/utils/external-tool-drift-detector.js +5 -4
- package/dist/src/utils/external-tool-drift-detector.js.map +1 -1
- package/dist/src/utils/feature-id-derivation.d.ts +8 -3
- package/dist/src/utils/feature-id-derivation.d.ts.map +1 -1
- package/dist/src/utils/feature-id-derivation.js +14 -6
- package/dist/src/utils/feature-id-derivation.js.map +1 -1
- package/dist/src/utils/model-selection.d.ts +3 -4
- package/dist/src/utils/model-selection.d.ts.map +1 -1
- package/dist/src/utils/model-selection.js +3 -4
- package/dist/src/utils/model-selection.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/agents/code-standards-detective/AGENT.md +48 -0
- package/plugins/specweave/commands/specweave-costs.md +4 -4
- package/plugins/specweave/commands/specweave-do.md +9 -9
- package/plugins/specweave/commands/specweave-done.md +13 -0
- package/plugins/specweave/commands/specweave-validate.md +27 -1
- package/plugins/specweave/hooks/hooks.json +10 -0
- package/plugins/specweave/hooks/spec-project-validator.sh +80 -25
- package/plugins/specweave/hooks/v2/guards/increment-duplicate-guard.sh +135 -0
- package/plugins/specweave/scripts/read-costs.sh +3 -3
- package/plugins/specweave/skills/code-standards-analyzer/SKILL.md +58 -6
- package/plugins/specweave/skills/increment-planner/SKILL.md +56 -25
- package/plugins/specweave/skills/increment-planner/templates/spec-multi-project.md +4 -2
- package/plugins/specweave/skills/increment-planner/templates/spec-single-project.md +2 -1
- package/plugins/specweave/skills/increment-planner/templates/tasks-multi-project.md +1 -1
- package/plugins/specweave/skills/increment-planner/templates/tasks-single-project.md +1 -1
- package/plugins/specweave-ado/commands/cleanup-duplicates.md +212 -0
- package/plugins/specweave-ado/commands/reconcile.md +120 -0
- package/plugins/specweave-ado/lib/ado-duplicate-detector.js +279 -0
- package/plugins/specweave-ado/lib/ado-duplicate-detector.ts +407 -0
- package/plugins/specweave-github/agents/github-manager/AGENT.md +2 -2
- package/plugins/specweave-infrastructure/skills/hetzner-provisioner/README.md +1 -1
- package/plugins/specweave-jira/agents/jira-manager/AGENT.md +1 -1
- package/plugins/specweave-jira/agents/jira-multi-project-mapper/AGENT.md +530 -0
- package/plugins/specweave-jira/agents/jira-sync-judge/AGENT.md +438 -0
- package/plugins/specweave-jira/commands/cleanup-duplicates.md +219 -0
- package/plugins/specweave-jira/commands/close.md +297 -0
- package/plugins/specweave-jira/commands/create.md +198 -0
- package/plugins/specweave-jira/commands/reconcile.md +123 -0
- package/plugins/specweave-jira/commands/status.md +215 -0
- package/plugins/specweave-jira/lib/jira-duplicate-detector.js +296 -0
- package/plugins/specweave-jira/lib/jira-duplicate-detector.ts +434 -0
- package/plugins/specweave-jira/lib/jira-permission-gate.js +160 -0
- package/plugins/specweave-jira/lib/jira-permission-gate.ts +276 -0
- package/plugins/specweave-jira/lib/jira-profile-resolver.js +222 -0
- package/plugins/specweave-jira/lib/jira-profile-resolver.ts +427 -0
- package/plugins/specweave-jira/reference/jira-specweave-mapping.md +16 -11
- package/plugins/specweave-release/commands/specweave-release-npm.md +140 -14
|
@@ -279,7 +279,7 @@ COMPARISON:
|
|
|
279
279
|
| **Skills** | Native | Via AGENTS.md |
|
|
280
280
|
| **Agents** | Native | Via AGENTS.md |
|
|
281
281
|
| **Access** | CLI only | CLI + Web + IDE + GitHub + iOS |
|
|
282
|
-
| **Model** |
|
|
282
|
+
| **Model** | Opus 4.5 | GPT-5-Codex |
|
|
283
283
|
| **Task Isolation** | No | Yes (isolated environments) |
|
|
284
284
|
|
|
285
285
|
LIMITATIONS:
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Archives increments to .specweave/increments/_archive/ and automatically
|
|
5
5
|
* archives corresponding features in:
|
|
6
6
|
* - .specweave/docs/internal/specs/{project}/_archive/
|
|
7
|
+
*
|
|
8
|
+
* v0.33.0: Added --external flag for archiving external living docs (FS-XXXE)
|
|
7
9
|
*/
|
|
8
10
|
export declare function archiveCommand(incrementIds: string[], options: any): Promise<void>;
|
|
9
11
|
//# sourceMappingURL=archive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/archive.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/archive.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,wBAAsB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CA6GxF"}
|
|
@@ -4,11 +4,44 @@
|
|
|
4
4
|
* Archives increments to .specweave/increments/_archive/ and automatically
|
|
5
5
|
* archives corresponding features in:
|
|
6
6
|
* - .specweave/docs/internal/specs/{project}/_archive/
|
|
7
|
+
*
|
|
8
|
+
* v0.33.0: Added --external flag for archiving external living docs (FS-XXXE)
|
|
7
9
|
*/
|
|
8
10
|
import chalk from 'chalk';
|
|
9
11
|
import { IncrementArchiver } from '../../core/increment/increment-archiver.js';
|
|
12
|
+
import { FeatureArchiver } from '../../core/living-docs/feature-archiver.js';
|
|
10
13
|
export async function archiveCommand(incrementIds, options) {
|
|
11
14
|
try {
|
|
15
|
+
// ================================================================
|
|
16
|
+
// EXTERNAL MODE: Archive external living docs (FS-XXXE features)
|
|
17
|
+
// ================================================================
|
|
18
|
+
if (options.external) {
|
|
19
|
+
console.log(chalk.blue('📦 External living docs archive mode\n'));
|
|
20
|
+
const featureArchiver = new FeatureArchiver(process.cwd());
|
|
21
|
+
// Filter feature IDs (FS-*E pattern only)
|
|
22
|
+
const featureIds = incrementIds.filter(id => /^FS-\d+E$/.test(id));
|
|
23
|
+
const externalOptions = {
|
|
24
|
+
featureIds: featureIds.length > 0 ? featureIds : undefined,
|
|
25
|
+
olderThanDays: options.olderThan ? parseInt(options.olderThan) : undefined,
|
|
26
|
+
keepLast: options.keepLast ? parseInt(options.keepLast) : undefined,
|
|
27
|
+
dryRun: options.dryRun,
|
|
28
|
+
updateLinks: true
|
|
29
|
+
};
|
|
30
|
+
const result = await featureArchiver.archiveExternalFeatures(externalOptions);
|
|
31
|
+
console.log(chalk.green(`\n✅ External archive complete:`));
|
|
32
|
+
console.log(` Archived: ${result.archivedFeatures.length} features`);
|
|
33
|
+
if (result.archivedFeatures.length > 0) {
|
|
34
|
+
result.archivedFeatures.forEach(f => console.log(` - ${f}`));
|
|
35
|
+
}
|
|
36
|
+
if (result.errors.length > 0) {
|
|
37
|
+
console.log(chalk.red(` Errors: ${result.errors.length}`));
|
|
38
|
+
result.errors.forEach(e => console.log(` - ${e}`));
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// ================================================================
|
|
43
|
+
// INCREMENT MODE: Archive completed increments (default)
|
|
44
|
+
// ================================================================
|
|
12
45
|
console.log(chalk.blue('📦 Archiving increments...\n'));
|
|
13
46
|
const archiver = new IncrementArchiver(process.cwd());
|
|
14
47
|
// Parse options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/cli/commands/archive.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/cli/commands/archive.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAE7E,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,YAAsB,EAAE,OAAY;IACvE,IAAI,CAAC;QACH,mEAAmE;QACnE,iEAAiE;QACjE,mEAAmE;QACnE,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC,CAAC;YAElE,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YAE3D,0CAA0C;YAC1C,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAC1C,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CACrB,CAAC;YAEF,MAAM,eAAe,GAAG;gBACtB,UAAU,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;gBAC1D,aAAa,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;gBAC1E,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CA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CAAC,GAAG,CAAC,0BAA0B,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAErE,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC5D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC,CAAC;QAC5E,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,KAAc,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,iCAAiC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACzE,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;YACtB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACjC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Context Command
|
|
3
|
+
*
|
|
4
|
+
* Provides project/board context for increment planning.
|
|
5
|
+
* Used by Claude Code agents to get valid project/board values
|
|
6
|
+
* before generating spec.md files.
|
|
7
|
+
*
|
|
8
|
+
* @module cli/commands/context
|
|
9
|
+
*/
|
|
10
|
+
import { StructureLevelConfig, ProjectInfo, BoardInfo } from '../../utils/structure-level-detector.js';
|
|
11
|
+
/**
|
|
12
|
+
* Output format for projects subcommand
|
|
13
|
+
*/
|
|
14
|
+
interface ProjectsOutput {
|
|
15
|
+
/** Structure level (1 or 2) */
|
|
16
|
+
level: 1 | 2;
|
|
17
|
+
/** Available projects */
|
|
18
|
+
projects: ProjectInfo[];
|
|
19
|
+
/** Available boards organized by project (only for 2-level) */
|
|
20
|
+
boardsByProject?: Record<string, BoardInfo[]>;
|
|
21
|
+
/** Detection reason for debugging */
|
|
22
|
+
detectionReason: string;
|
|
23
|
+
/** Source of configuration */
|
|
24
|
+
source: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Output format for boards subcommand
|
|
28
|
+
*/
|
|
29
|
+
interface BoardsOutput {
|
|
30
|
+
/** Project ID that boards belong to */
|
|
31
|
+
project: string;
|
|
32
|
+
/** Available boards for the project */
|
|
33
|
+
boards: BoardInfo[];
|
|
34
|
+
/** Warning if 1-level structure (no boards) */
|
|
35
|
+
warning?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Output format for select subcommand
|
|
39
|
+
*/
|
|
40
|
+
interface SelectOutput {
|
|
41
|
+
/** Selected project and board */
|
|
42
|
+
selected: {
|
|
43
|
+
project: string;
|
|
44
|
+
board?: string;
|
|
45
|
+
};
|
|
46
|
+
/** Whether selection was automatic (single option) */
|
|
47
|
+
autoSelected: boolean;
|
|
48
|
+
/** Structure level */
|
|
49
|
+
level: 1 | 2;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get all available projects and structure level
|
|
53
|
+
* Used by Claude before generating spec.md
|
|
54
|
+
*
|
|
55
|
+
* @param projectRoot - Path to project root
|
|
56
|
+
* @returns JSON-serializable projects context
|
|
57
|
+
*/
|
|
58
|
+
export declare function getProjectsContext(projectRoot?: string): ProjectsOutput;
|
|
59
|
+
/**
|
|
60
|
+
* Get boards for a specific project
|
|
61
|
+
*
|
|
62
|
+
* @param projectId - Project ID to get boards for
|
|
63
|
+
* @param projectRoot - Path to project root
|
|
64
|
+
* @returns JSON-serializable boards context
|
|
65
|
+
*/
|
|
66
|
+
export declare function getBoardsContext(projectId: string, projectRoot?: string): BoardsOutput;
|
|
67
|
+
/**
|
|
68
|
+
* Auto-select or prompt for project/board selection
|
|
69
|
+
*
|
|
70
|
+
* @param config - Structure level config
|
|
71
|
+
* @returns Selection result with auto-select flag
|
|
72
|
+
*/
|
|
73
|
+
export declare function autoSelectProjectBoard(config: StructureLevelConfig): SelectOutput;
|
|
74
|
+
/**
|
|
75
|
+
* CLI handler for 'specweave context projects' command
|
|
76
|
+
*/
|
|
77
|
+
export declare function contextProjectsCommand(): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* CLI handler for 'specweave context boards' command
|
|
80
|
+
*
|
|
81
|
+
* @param options - Command options with project ID
|
|
82
|
+
*/
|
|
83
|
+
export declare function contextBoardsCommand(options: {
|
|
84
|
+
project?: string;
|
|
85
|
+
}): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* CLI handler for 'specweave context select' command
|
|
88
|
+
* Returns auto-selected values or prompts interactively
|
|
89
|
+
*/
|
|
90
|
+
export declare function contextSelectCommand(): Promise<void>;
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,oBAAoB,EACpB,WAAW,EACX,SAAS,EACV,MAAM,yCAAyC,CAAC;AAEjD;;GAEG;AACH,UAAU,cAAc;IACtB,+BAA+B;IAC/B,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IACb,yBAAyB;IACzB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,+DAA+D;I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*
|
|
4
|
+
* Provides project/board context for increment planning.
|
|
5
|
+
* Used by Claude Code agents to get valid project/board values
|
|
6
|
+
* before generating spec.md files.
|
|
7
|
+
*
|
|
8
|
+
* @module cli/commands/context
|
|
9
|
+
*/
|
|
10
|
+
import { detectStructureLevel } from '../../utils/structure-level-detector.js';
|
|
11
|
+
/**
|
|
12
|
+
* Get all available projects and structure level
|
|
13
|
+
* Used by Claude before generating spec.md
|
|
14
|
+
*
|
|
15
|
+
* @param projectRoot - Path to project root
|
|
16
|
+
* @returns JSON-serializable projects context
|
|
17
|
+
*/
|
|
18
|
+
export function getProjectsContext(projectRoot = process.cwd()) {
|
|
19
|
+
const config = detectStructureLevel(projectRoot);
|
|
20
|
+
const output = {
|
|
21
|
+
level: config.level,
|
|
22
|
+
projects: config.projects,
|
|
23
|
+
detectionReason: config.detectionReason,
|
|
24
|
+
source: config.source
|
|
25
|
+
};
|
|
26
|
+
// Include boards only for 2-level structures
|
|
27
|
+
if (config.level === 2 && config.boardsByProject) {
|
|
28
|
+
output.boardsByProject = config.boardsByProject;
|
|
29
|
+
}
|
|
30
|
+
return output;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get boards for a specific project
|
|
34
|
+
*
|
|
35
|
+
* @param projectId - Project ID to get boards for
|
|
36
|
+
* @param projectRoot - Path to project root
|
|
37
|
+
* @returns JSON-serializable boards context
|
|
38
|
+
*/
|
|
39
|
+
export function getBoardsContext(projectId, projectRoot = process.cwd()) {
|
|
40
|
+
const config = detectStructureLevel(projectRoot);
|
|
41
|
+
// 1-level structure has no boards
|
|
42
|
+
if (config.level === 1) {
|
|
43
|
+
return {
|
|
44
|
+
project: projectId,
|
|
45
|
+
boards: [],
|
|
46
|
+
warning: '1-level structure detected - boards are not applicable'
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// Normalize project ID for lookup
|
|
50
|
+
const normalizedId = projectId.toLowerCase().replace(/\s+/g, '-');
|
|
51
|
+
// Find boards for the project
|
|
52
|
+
const boards = config.boardsByProject?.[normalizedId] || [];
|
|
53
|
+
// Try original ID if normalized doesn't match
|
|
54
|
+
if (boards.length === 0 && config.boardsByProject?.[projectId]) {
|
|
55
|
+
return {
|
|
56
|
+
project: projectId,
|
|
57
|
+
boards: config.boardsByProject[projectId]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
project: projectId,
|
|
62
|
+
boards
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Auto-select or prompt for project/board selection
|
|
67
|
+
*
|
|
68
|
+
* @param config - Structure level config
|
|
69
|
+
* @returns Selection result with auto-select flag
|
|
70
|
+
*/
|
|
71
|
+
export function autoSelectProjectBoard(config) {
|
|
72
|
+
// Single project in 1-level = auto-select
|
|
73
|
+
if (config.level === 1 && config.projects.length === 1) {
|
|
74
|
+
return {
|
|
75
|
+
selected: {
|
|
76
|
+
project: config.projects[0].id
|
|
77
|
+
},
|
|
78
|
+
autoSelected: true,
|
|
79
|
+
level: 1
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// Single project + single board in 2-level = auto-select
|
|
83
|
+
if (config.level === 2 && config.projects.length === 1 && config.boardsByProject) {
|
|
84
|
+
const projectId = config.projects[0].id;
|
|
85
|
+
const boards = config.boardsByProject[projectId] || [];
|
|
86
|
+
if (boards.length === 1) {
|
|
87
|
+
return {
|
|
88
|
+
selected: {
|
|
89
|
+
project: projectId,
|
|
90
|
+
board: boards[0].id
|
|
91
|
+
},
|
|
92
|
+
autoSelected: true,
|
|
93
|
+
level: 2
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Multiple options - cannot auto-select
|
|
98
|
+
// Return first project as default (caller should prompt user)
|
|
99
|
+
if (config.level === 2 && config.projects.length > 0 && config.boardsByProject) {
|
|
100
|
+
const projectId = config.projects[0].id;
|
|
101
|
+
const boards = config.boardsByProject[projectId] || [];
|
|
102
|
+
return {
|
|
103
|
+
selected: {
|
|
104
|
+
project: projectId,
|
|
105
|
+
board: boards.length > 0 ? boards[0].id : undefined
|
|
106
|
+
},
|
|
107
|
+
autoSelected: false,
|
|
108
|
+
level: 2
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
selected: {
|
|
113
|
+
project: config.projects.length > 0 ? config.projects[0].id : 'default'
|
|
114
|
+
},
|
|
115
|
+
autoSelected: false,
|
|
116
|
+
level: config.level
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* CLI handler for 'specweave context projects' command
|
|
121
|
+
*/
|
|
122
|
+
export async function contextProjectsCommand() {
|
|
123
|
+
const output = getProjectsContext(process.cwd());
|
|
124
|
+
console.log(JSON.stringify(output, null, 2));
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* CLI handler for 'specweave context boards' command
|
|
128
|
+
*
|
|
129
|
+
* @param options - Command options with project ID
|
|
130
|
+
*/
|
|
131
|
+
export async function contextBoardsCommand(options) {
|
|
132
|
+
if (!options.project) {
|
|
133
|
+
// If no project specified, show all boards for all projects
|
|
134
|
+
const config = detectStructureLevel(process.cwd());
|
|
135
|
+
if (config.level === 1) {
|
|
136
|
+
console.log(JSON.stringify({
|
|
137
|
+
warning: '1-level structure detected - boards are not applicable',
|
|
138
|
+
boards: []
|
|
139
|
+
}, null, 2));
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
console.log(JSON.stringify({
|
|
143
|
+
boardsByProject: config.boardsByProject || {}
|
|
144
|
+
}, null, 2));
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const output = getBoardsContext(options.project, process.cwd());
|
|
148
|
+
console.log(JSON.stringify(output, null, 2));
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* CLI handler for 'specweave context select' command
|
|
152
|
+
* Returns auto-selected values or prompts interactively
|
|
153
|
+
*/
|
|
154
|
+
export async function contextSelectCommand() {
|
|
155
|
+
const config = detectStructureLevel(process.cwd());
|
|
156
|
+
const output = autoSelectProjectBoard(config);
|
|
157
|
+
// If auto-selected, just output
|
|
158
|
+
if (output.autoSelected) {
|
|
159
|
+
console.log(JSON.stringify(output, null, 2));
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
// Multiple options - need to prompt interactively
|
|
163
|
+
// Use @inquirer/prompts for interactive selection
|
|
164
|
+
try {
|
|
165
|
+
const { select } = await import('@inquirer/prompts');
|
|
166
|
+
// Prompt for project
|
|
167
|
+
const projectChoices = config.projects.map(p => ({
|
|
168
|
+
name: p.name || p.id,
|
|
169
|
+
value: p.id
|
|
170
|
+
}));
|
|
171
|
+
const selectedProject = await select({
|
|
172
|
+
message: 'Select project:',
|
|
173
|
+
choices: projectChoices
|
|
174
|
+
});
|
|
175
|
+
let selectedBoard;
|
|
176
|
+
// Prompt for board if 2-level
|
|
177
|
+
if (config.level === 2 && config.boardsByProject) {
|
|
178
|
+
const boards = config.boardsByProject[selectedProject] || [];
|
|
179
|
+
if (boards.length > 0) {
|
|
180
|
+
const boardChoices = boards.map(b => ({
|
|
181
|
+
name: b.name || b.id,
|
|
182
|
+
value: b.id
|
|
183
|
+
}));
|
|
184
|
+
selectedBoard = await select({
|
|
185
|
+
message: 'Select board:',
|
|
186
|
+
choices: boardChoices
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const result = {
|
|
191
|
+
selected: {
|
|
192
|
+
project: selectedProject,
|
|
193
|
+
board: selectedBoard
|
|
194
|
+
},
|
|
195
|
+
autoSelected: false,
|
|
196
|
+
level: config.level
|
|
197
|
+
};
|
|
198
|
+
console.log(JSON.stringify(result, null, 2));
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
// Fallback if prompts fail (non-interactive mode)
|
|
202
|
+
console.log(JSON.stringify(output, null, 2));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
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/C,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAoBH,OAAO,EACL,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAoBH,OAAO,EACL,KAAK,WAAW,EAyBjB,MAAM,0BAA0B,CAAC;AAWlC,YAAY,EAAE,WAAW,EAAE,CAAC;AAgJ5B;;GAEG;AACH,wBAAsB,WAAW,CAC/B,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAyef"}
|
|
@@ -24,7 +24,7 @@ import { getLocaleManager } from '../../core/i18n/locale-manager.js';
|
|
|
24
24
|
import { StatusLineUpdater } from '../../core/status-line/status-line-updater.js';
|
|
25
25
|
import { readEnvFile, parseEnvFile } from '../../utils/env-file.js';
|
|
26
26
|
// Import helpers
|
|
27
|
-
import { findSourceDir, findPackageRoot, detectNestedSpecweave, detectGitHubRemote, promptSmartReinit, installAllPlugins, setupRepositoryHosting, promptTestingConfig, updateConfigWithTesting, promptLanguageSelection, getDefaultLanguageSelection, promptTranslationConfig, updateConfigWithTranslation, getDefaultTranslationConfig, promptAndRunExternalImport, createDirectoryStructure, copyTemplates, createConfigFile, showNextSteps, generateInitialIncrement, } from '../helpers/init/index.js';
|
|
27
|
+
import { findSourceDir, findPackageRoot, detectNestedSpecweave, detectGitHubRemote, promptSmartReinit, installAllPlugins, setupRepositoryHosting, promptTestingConfig, updateConfigWithTesting, promptLanguageSelection, getDefaultLanguageSelection, promptTranslationConfig, updateConfigWithTranslation, getDefaultTranslationConfig, promptAndRunExternalImport, createDirectoryStructure, copyTemplates, createConfigFile, showNextSteps, generateInitialIncrement, WIZARD_BACK, logGoingBack, } from '../helpers/init/index.js';
|
|
28
28
|
import { triggerAdoRepoCloning } from '../helpers/init/ado-repo-cloning.js';
|
|
29
29
|
import { collectLivingDocsInputs, displayJobScheduled, } from '../helpers/init/living-docs-preflight.js';
|
|
30
30
|
import { launchLivingDocsJob } from '../../core/background/job-launcher.js';
|
|
@@ -429,84 +429,126 @@ export async function initCommand(projectName, options = {}) {
|
|
|
429
429
|
await setupIssueTrackerWrapper(targetDir, language, isFrameworkRepo, repoResult.hosting, isCI, repoResult.adoProjectSelection);
|
|
430
430
|
// Multi-project folders
|
|
431
431
|
await createMultiProjectFolders(targetDir);
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
//
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
432
|
+
let wizardStep = continueExisting ? 'living-docs' : 'external-import';
|
|
433
|
+
while (wizardStep !== 'done') {
|
|
434
|
+
// STEP: External Import
|
|
435
|
+
if (wizardStep === 'external-import') {
|
|
436
|
+
try {
|
|
437
|
+
const importResult = await promptAndRunExternalImport(targetDir, isCI, language);
|
|
438
|
+
// Handle "go back" signal
|
|
439
|
+
if ('goBack' in importResult && importResult.goBack === WIZARD_BACK) {
|
|
440
|
+
// Can't go back from first step - stay here
|
|
441
|
+
logGoingBack(language);
|
|
442
|
+
continue;
|
|
443
|
+
}
|
|
444
|
+
// Handle both sync and async import results
|
|
445
|
+
if ('isBackground' in importResult && importResult.isBackground) {
|
|
446
|
+
// Background import started - job will complete asynchronously
|
|
447
|
+
console.log(chalk.cyan('\n🚀 Import running in background'));
|
|
448
|
+
console.log(chalk.gray(` Check progress: /specweave:jobs`));
|
|
449
|
+
// Track job ID for living docs dependencies
|
|
450
|
+
if ('jobId' in importResult && importResult.jobId) {
|
|
451
|
+
pendingJobIds.push(importResult.jobId);
|
|
452
|
+
}
|
|
453
|
+
// Skip default increment - user is importing real work items
|
|
454
|
+
skipInitialIncrement = true;
|
|
455
|
+
}
|
|
456
|
+
else if ('totalCount' in importResult && importResult.totalCount > 0) {
|
|
457
|
+
// Sync import completed
|
|
458
|
+
console.log(chalk.green('\n✅ Imported ' + importResult.totalCount + ' items from ' + importResult.platforms.join(', ')));
|
|
459
|
+
// Skip default increment - user has imported real work items
|
|
460
|
+
skipInitialIncrement = true;
|
|
444
461
|
}
|
|
445
|
-
// Skip default increment - user is importing real work items
|
|
446
|
-
skipInitialIncrement = true;
|
|
447
462
|
}
|
|
448
|
-
|
|
449
|
-
//
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
463
|
+
catch (importError) {
|
|
464
|
+
// Show actual error (was swallowed before) - helps debugging
|
|
465
|
+
const errorMsg = importError instanceof Error ? importError.message : String(importError);
|
|
466
|
+
console.log(chalk.yellow(`\n⚠️ External tool import failed: ${errorMsg}`));
|
|
467
|
+
console.log(chalk.gray(' → You can run /specweave-github:sync later to retry'));
|
|
453
468
|
}
|
|
469
|
+
wizardStep = 'living-docs';
|
|
470
|
+
continue;
|
|
454
471
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
472
|
+
// STEP: Living Docs
|
|
473
|
+
if (wizardStep === 'living-docs') {
|
|
474
|
+
// Living Docs Builder - ALWAYS ask (both brownfield and greenfield)
|
|
475
|
+
if (!options.noLivingDocs) {
|
|
476
|
+
try {
|
|
477
|
+
const preflightResult = await collectLivingDocsInputs({
|
|
478
|
+
projectPath: targetDir,
|
|
479
|
+
language,
|
|
480
|
+
isCi: isCI,
|
|
481
|
+
skipLivingDocs: options.noLivingDocs,
|
|
482
|
+
pendingJobIds, // Pass pending job IDs to treat as "will be brownfield"
|
|
483
|
+
});
|
|
484
|
+
// Handle "go back" signal
|
|
485
|
+
if (preflightResult?.goBack === WIZARD_BACK) {
|
|
486
|
+
logGoingBack(language);
|
|
487
|
+
wizardStep = continueExisting ? 'living-docs' : 'external-import';
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
490
|
+
// Only launch background job for brownfield projects that want it
|
|
491
|
+
if (preflightResult?.shouldLaunch && preflightResult.isBrownfield) {
|
|
492
|
+
// Use collected job IDs as dependencies - living docs will wait for them
|
|
493
|
+
const launchResult = await launchLivingDocsJob({
|
|
494
|
+
projectPath: targetDir,
|
|
495
|
+
userInputs: preflightResult.userInputs,
|
|
496
|
+
dependsOn: pendingJobIds, // Living docs waits for clone/import to complete
|
|
497
|
+
});
|
|
498
|
+
displayJobScheduled(launchResult.job.id, preflightResult.estimatedDuration, language);
|
|
499
|
+
}
|
|
500
|
+
// Greenfield projects: living docs structure already set up, no background job needed
|
|
501
|
+
// The collectLivingDocsInputs function displays the success message
|
|
502
|
+
}
|
|
503
|
+
catch (livingDocsError) {
|
|
504
|
+
const errorMsg = livingDocsError instanceof Error ? livingDocsError.message : String(livingDocsError);
|
|
505
|
+
console.log(chalk.yellow(`\n⚠️ Living Docs setup failed: ${errorMsg}`));
|
|
506
|
+
console.log(chalk.gray(' → You can run /specweave:jobs later to check status'));
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
wizardStep = 'testing';
|
|
510
|
+
continue;
|
|
460
511
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
// Only launch background job for brownfield projects that want it
|
|
473
|
-
if (preflightResult?.shouldLaunch && preflightResult.isBrownfield) {
|
|
474
|
-
// Use collected job IDs as dependencies - living docs will wait for them
|
|
475
|
-
const launchResult = await launchLivingDocsJob({
|
|
476
|
-
projectPath: targetDir,
|
|
477
|
-
userInputs: preflightResult.userInputs,
|
|
478
|
-
dependsOn: pendingJobIds, // Living docs waits for clone/import to complete
|
|
479
|
-
});
|
|
480
|
-
displayJobScheduled(launchResult.job.id, preflightResult.estimatedDuration, language);
|
|
512
|
+
// STEP: Testing Configuration
|
|
513
|
+
if (wizardStep === 'testing') {
|
|
514
|
+
if (!isCI && !continueExisting) {
|
|
515
|
+
const testingResult = await promptTestingConfig(language);
|
|
516
|
+
// Handle "go back" signal
|
|
517
|
+
if (testingResult.goBack === WIZARD_BACK) {
|
|
518
|
+
logGoingBack(language);
|
|
519
|
+
wizardStep = 'living-docs';
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
522
|
+
updateConfigWithTesting(targetDir, testingResult.testMode, testingResult.coverageTarget, language);
|
|
481
523
|
}
|
|
482
|
-
|
|
483
|
-
|
|
524
|
+
wizardStep = 'translation';
|
|
525
|
+
continue;
|
|
484
526
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
527
|
+
// STEP: Translation Configuration
|
|
528
|
+
if (wizardStep === 'translation') {
|
|
529
|
+
// Translation configuration (CRITICAL: Must ask user - cost implications!)
|
|
530
|
+
// Language already selected in step 1, now ask about auto-translation scope
|
|
531
|
+
if (!isCI && !continueExisting && language !== 'en') {
|
|
532
|
+
// Only ask about translation if non-English language selected
|
|
533
|
+
const translationResult = await promptTranslationConfig(languageResult);
|
|
534
|
+
// Handle "go back" signal
|
|
535
|
+
if ('goBack' in translationResult && translationResult.goBack === WIZARD_BACK) {
|
|
536
|
+
logGoingBack(language);
|
|
537
|
+
wizardStep = 'testing';
|
|
538
|
+
continue;
|
|
539
|
+
}
|
|
540
|
+
updateConfigWithTranslation(targetDir, translationResult);
|
|
541
|
+
}
|
|
542
|
+
else {
|
|
543
|
+
// English or CI mode: Use defaults (no auto-translation needed)
|
|
544
|
+
const defaultTranslation = getDefaultTranslationConfig(language);
|
|
545
|
+
defaultTranslation.keepEnglishOriginals = languageResult.keepEnglishOriginals;
|
|
546
|
+
updateConfigWithTranslation(targetDir, defaultTranslation);
|
|
547
|
+
}
|
|
548
|
+
wizardStep = 'done';
|
|
489
549
|
}
|
|
490
550
|
}
|
|
491
551
|
}
|
|
492
|
-
// Testing configuration
|
|
493
|
-
if (!isCI && !continueExisting) {
|
|
494
|
-
const testingResult = await promptTestingConfig(language);
|
|
495
|
-
updateConfigWithTesting(targetDir, testingResult.testMode, testingResult.coverageTarget, language);
|
|
496
|
-
}
|
|
497
|
-
// Translation configuration (CRITICAL: Must ask user - cost implications!)
|
|
498
|
-
// Language already selected in step 1, now ask about auto-translation scope
|
|
499
|
-
if (!isCI && !continueExisting && language !== 'en') {
|
|
500
|
-
// Only ask about translation if non-English language selected
|
|
501
|
-
const translationResult = await promptTranslationConfig(languageResult);
|
|
502
|
-
updateConfigWithTranslation(targetDir, translationResult);
|
|
503
|
-
}
|
|
504
|
-
else {
|
|
505
|
-
// English or CI mode: Use defaults (no auto-translation needed)
|
|
506
|
-
const defaultTranslation = getDefaultTranslationConfig(language);
|
|
507
|
-
defaultTranslation.keepEnglishOriginals = languageResult.keepEnglishOriginals;
|
|
508
|
-
updateConfigWithTranslation(targetDir, defaultTranslation);
|
|
509
|
-
}
|
|
510
552
|
// Initial increment - skip for brownfield projects importing external work items
|
|
511
553
|
const incrementsDir = path.join(targetDir, '.specweave', 'increments');
|
|
512
554
|
const existingIncrements = fs.existsSync(incrementsDir)
|