specweave 0.21.1 → 0.21.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 +232 -5
- package/dist/plugins/specweave-github/lib/IssueStateManager.d.ts +98 -0
- package/dist/plugins/specweave-github/lib/IssueStateManager.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/IssueStateManager.js +146 -0
- package/dist/plugins/specweave-github/lib/IssueStateManager.js.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +6 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
- package/dist/src/cli/commands/check-hooks.d.ts +11 -0
- package/dist/src/cli/commands/check-hooks.d.ts.map +1 -0
- package/dist/src/cli/commands/check-hooks.js +144 -0
- package/dist/src/cli/commands/check-hooks.js.map +1 -0
- package/dist/src/cli/commands/cicd-monitor.js +3 -3
- package/dist/src/cli/commands/cicd-monitor.js.map +1 -1
- package/dist/src/cli/commands/import-docs.js +2 -2
- package/dist/src/cli/commands/import-docs.js.map +1 -1
- package/dist/src/cli/commands/init-multiproject.js +4 -4
- package/dist/src/cli/commands/init-multiproject.js.map +1 -1
- package/dist/src/cli/commands/migrate-to-multiproject.js +3 -3
- package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
- package/dist/src/cli/commands/plan/agent-invoker.d.ts +79 -0
- package/dist/src/cli/commands/plan/agent-invoker.d.ts.map +1 -0
- package/dist/src/cli/commands/plan/agent-invoker.js +383 -0
- package/dist/src/cli/commands/plan/agent-invoker.js.map +1 -0
- package/dist/src/cli/commands/plan/increment-detector.d.ts +27 -0
- package/dist/src/cli/commands/plan/increment-detector.d.ts.map +1 -0
- package/dist/src/cli/commands/plan/increment-detector.js +159 -0
- package/dist/src/cli/commands/plan/increment-detector.js.map +1 -0
- package/dist/src/cli/commands/plan/plan-orchestrator.d.ts +45 -0
- package/dist/src/cli/commands/plan/plan-orchestrator.d.ts.map +1 -0
- package/dist/src/cli/commands/plan/plan-orchestrator.js +229 -0
- package/dist/src/cli/commands/plan/plan-orchestrator.js.map +1 -0
- package/dist/src/cli/commands/plan/plan-validator.d.ts +36 -0
- package/dist/src/cli/commands/plan/plan-validator.d.ts.map +1 -0
- package/dist/src/cli/commands/plan/plan-validator.js +174 -0
- package/dist/src/cli/commands/plan/plan-validator.js.map +1 -0
- package/dist/src/cli/commands/plan/types.d.ts +170 -0
- package/dist/src/cli/commands/plan/types.d.ts.map +1 -0
- package/dist/src/cli/commands/plan/types.js +42 -0
- package/dist/src/cli/commands/plan/types.js.map +1 -0
- package/dist/src/cli/commands/plan-command.d.ts +16 -0
- package/dist/src/cli/commands/plan-command.d.ts.map +1 -0
- package/dist/src/cli/commands/plan-command.js +127 -0
- package/dist/src/cli/commands/plan-command.js.map +1 -0
- package/dist/src/cli/commands/switch-project.js +3 -3
- package/dist/src/cli/commands/switch-project.js.map +1 -1
- package/dist/src/cli/commands/validate-parent-repo.js +1 -1
- package/dist/src/cli/commands/validate-parent-repo.js.map +1 -1
- package/dist/src/config/ConfigManager.d.ts +69 -0
- package/dist/src/config/ConfigManager.d.ts.map +1 -0
- package/dist/src/config/ConfigManager.js +130 -0
- package/dist/src/config/ConfigManager.js.map +1 -0
- package/dist/src/config/types.d.ts +1357 -0
- package/dist/src/config/types.d.ts.map +1 -0
- package/dist/src/config/types.js +67 -0
- package/dist/src/config/types.js.map +1 -0
- package/dist/src/core/brownfield/importer.d.ts +1 -1
- package/dist/src/core/brownfield/importer.d.ts.map +1 -1
- package/dist/src/core/brownfield/importer.js +3 -3
- package/dist/src/core/brownfield/importer.js.map +1 -1
- package/dist/src/core/cicd/config-loader.d.ts +1 -1
- package/dist/src/core/cicd/config-loader.d.ts.map +1 -1
- package/dist/src/core/cicd/index.d.ts +6 -6
- package/dist/src/core/cicd/index.d.ts.map +1 -1
- package/dist/src/core/cicd/index.js +6 -6
- package/dist/src/core/cicd/index.js.map +1 -1
- package/dist/src/core/cicd/monitor-service.d.ts +3 -3
- package/dist/src/core/cicd/monitor-service.d.ts.map +1 -1
- package/dist/src/core/cicd/monitor-service.js +3 -3
- package/dist/src/core/cicd/monitor-service.js.map +1 -1
- package/dist/src/core/cicd/notifier.d.ts +1 -1
- package/dist/src/core/cicd/notifier.d.ts.map +1 -1
- package/dist/src/core/cicd/state-manager.d.ts +1 -1
- package/dist/src/core/cicd/state-manager.d.ts.map +1 -1
- package/dist/src/core/cicd/state-manager.js +1 -1
- package/dist/src/core/cicd/state-manager.js.map +1 -1
- package/dist/src/core/cicd/workflow-monitor.d.ts +1 -1
- package/dist/src/core/cicd/workflow-monitor.d.ts.map +1 -1
- package/dist/src/core/cicd/workflow-monitor.js +1 -1
- package/dist/src/core/cicd/workflow-monitor.js.map +1 -1
- package/dist/src/core/cost-tracker.d.ts +2 -2
- package/dist/src/core/cost-tracker.d.ts.map +1 -1
- package/dist/src/core/cost-tracker.js +1 -1
- package/dist/src/core/cost-tracker.js.map +1 -1
- package/dist/src/core/hooks/HealthReporter.d.ts +55 -0
- package/dist/src/core/hooks/HealthReporter.d.ts.map +1 -0
- package/dist/src/core/hooks/HealthReporter.js +268 -0
- package/dist/src/core/hooks/HealthReporter.js.map +1 -0
- package/dist/src/core/hooks/HookAutoFixer.d.ts +41 -0
- package/dist/src/core/hooks/HookAutoFixer.d.ts.map +1 -0
- package/dist/src/core/hooks/HookAutoFixer.js +222 -0
- package/dist/src/core/hooks/HookAutoFixer.js.map +1 -0
- package/dist/src/core/hooks/HookExecutor.d.ts +57 -0
- package/dist/src/core/hooks/HookExecutor.d.ts.map +1 -0
- package/dist/src/core/hooks/HookExecutor.js +287 -0
- package/dist/src/core/hooks/HookExecutor.js.map +1 -0
- package/dist/src/core/hooks/HookHealthChecker.d.ts +51 -0
- package/dist/src/core/hooks/HookHealthChecker.d.ts.map +1 -0
- package/dist/src/core/hooks/HookHealthChecker.js +212 -0
- package/dist/src/core/hooks/HookHealthChecker.js.map +1 -0
- package/dist/src/core/hooks/HookScanner.d.ts +65 -0
- package/dist/src/core/hooks/HookScanner.d.ts.map +1 -0
- package/dist/src/core/hooks/HookScanner.js +214 -0
- package/dist/src/core/hooks/HookScanner.js.map +1 -0
- package/dist/src/core/hooks/types.d.ts +281 -0
- package/dist/src/core/hooks/types.d.ts.map +1 -0
- package/dist/src/core/hooks/types.js +10 -0
- package/dist/src/core/hooks/types.js.map +1 -0
- package/dist/src/core/iac/index.d.ts +10 -0
- package/dist/src/core/iac/index.d.ts.map +1 -0
- package/dist/src/core/iac/index.js +11 -0
- package/dist/src/core/iac/index.js.map +1 -0
- package/dist/src/core/iac/template-engine.d.ts +77 -0
- package/dist/src/core/iac/template-engine.d.ts.map +1 -0
- package/dist/src/core/iac/template-engine.js +182 -0
- package/dist/src/core/iac/template-engine.js.map +1 -0
- package/dist/src/core/increment/ac-status-manager.d.ts +115 -0
- package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -0
- package/dist/src/core/increment/ac-status-manager.js +343 -0
- package/dist/src/core/increment/ac-status-manager.js.map +1 -0
- package/dist/src/core/increment/auto-transition-manager.d.ts +60 -0
- package/dist/src/core/increment/auto-transition-manager.d.ts.map +1 -0
- package/dist/src/core/increment/auto-transition-manager.js +192 -0
- package/dist/src/core/increment/auto-transition-manager.js.map +1 -0
- package/dist/src/core/increment/limits.d.ts +1 -1
- package/dist/src/core/increment/limits.d.ts.map +1 -1
- package/dist/src/core/increment/limits.js +2 -2
- package/dist/src/core/increment/limits.js.map +1 -1
- package/dist/src/core/increment/spec-sync-manager.d.ts +177 -0
- package/dist/src/core/increment/spec-sync-manager.d.ts.map +1 -0
- package/dist/src/core/increment/spec-sync-manager.js +496 -0
- package/dist/src/core/increment/spec-sync-manager.js.map +1 -0
- package/dist/src/core/increment/status-auto-transition.d.ts +46 -0
- package/dist/src/core/increment/status-auto-transition.d.ts.map +1 -0
- package/dist/src/core/increment/status-auto-transition.js +178 -0
- package/dist/src/core/increment/status-auto-transition.js.map +1 -0
- package/dist/src/core/increment/task-state-manager.d.ts +75 -0
- package/dist/src/core/increment/task-state-manager.d.ts.map +1 -0
- package/dist/src/core/increment/task-state-manager.js +117 -0
- package/dist/src/core/increment/task-state-manager.js.map +1 -0
- package/dist/src/core/living-docs/CodeValidator.d.ts +68 -0
- package/dist/src/core/living-docs/CodeValidator.d.ts.map +1 -0
- package/dist/src/core/living-docs/CodeValidator.js +160 -0
- package/dist/src/core/living-docs/CodeValidator.js.map +1 -0
- package/dist/src/core/living-docs/CompletionPropagator.d.ts +84 -0
- package/dist/src/core/living-docs/CompletionPropagator.d.ts.map +1 -0
- package/dist/src/core/living-docs/CompletionPropagator.js +205 -0
- package/dist/src/core/living-docs/CompletionPropagator.js.map +1 -0
- package/dist/src/core/living-docs/ProjectDetector.d.ts +29 -0
- package/dist/src/core/living-docs/ProjectDetector.d.ts.map +1 -0
- package/dist/src/core/living-docs/ProjectDetector.js +94 -0
- package/dist/src/core/living-docs/ProjectDetector.js.map +1 -0
- package/dist/src/core/living-docs/SpecDistributor.d.ts +55 -0
- package/dist/src/core/living-docs/SpecDistributor.d.ts.map +1 -0
- package/dist/src/core/living-docs/SpecDistributor.js +216 -0
- package/dist/src/core/living-docs/SpecDistributor.js.map +1 -0
- package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts +116 -0
- package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts.map +1 -0
- package/dist/src/core/living-docs/ThreeLayerSyncManager.js +356 -0
- package/dist/src/core/living-docs/ThreeLayerSyncManager.js.map +1 -0
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js +2 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
- package/dist/src/core/living-docs/index.d.ts +1 -1
- package/dist/src/core/living-docs/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/index.js +5 -1
- package/dist/src/core/living-docs/index.js.map +1 -1
- package/dist/src/core/living-docs/types.d.ts +70 -300
- package/dist/src/core/living-docs/types.d.ts.map +1 -1
- package/dist/src/core/living-docs/types.js +2 -10
- package/dist/src/core/living-docs/types.js.map +1 -1
- package/dist/src/core/project-manager.d.ts +1 -1
- package/dist/src/core/project-manager.d.ts.map +1 -1
- package/dist/src/core/project-manager.js +2 -2
- package/dist/src/core/project-manager.js.map +1 -1
- package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
- package/dist/src/core/qa/quality-gate-decider.d.ts.map +1 -1
- package/dist/src/core/qa/risk-calculator.d.ts +1 -1
- package/dist/src/core/qa/risk-calculator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/setup-summary.d.ts +1 -1
- package/dist/src/core/repo-structure/setup-summary.d.ts.map +1 -1
- package/dist/src/core/rfc-generator-v2.d.ts +1 -1
- package/dist/src/core/rfc-generator-v2.d.ts.map +1 -1
- package/dist/src/core/rfc-generator-v2.js +1 -1
- package/dist/src/core/rfc-generator-v2.js.map +1 -1
- package/dist/src/core/serverless/context-detector.d.ts +12 -0
- package/dist/src/core/serverless/context-detector.d.ts.map +1 -0
- package/dist/src/core/serverless/context-detector.js +213 -0
- package/dist/src/core/serverless/context-detector.js.map +1 -0
- package/dist/src/core/serverless/cost-comparison.d.ts +73 -0
- package/dist/src/core/serverless/cost-comparison.d.ts.map +1 -0
- package/dist/src/core/serverless/cost-comparison.js +198 -0
- package/dist/src/core/serverless/cost-comparison.js.map +1 -0
- package/dist/src/core/serverless/cost-estimator.d.ts +69 -0
- package/dist/src/core/serverless/cost-estimator.d.ts.map +1 -0
- package/dist/src/core/serverless/cost-estimator.js +127 -0
- package/dist/src/core/serverless/cost-estimator.js.map +1 -0
- package/dist/src/core/serverless/cost-optimizer.d.ts +57 -0
- package/dist/src/core/serverless/cost-optimizer.d.ts.map +1 -0
- package/dist/src/core/serverless/cost-optimizer.js +221 -0
- package/dist/src/core/serverless/cost-optimizer.js.map +1 -0
- package/dist/src/core/serverless/index.d.ts +20 -0
- package/dist/src/core/serverless/index.d.ts.map +1 -0
- package/dist/src/core/serverless/index.js +26 -0
- package/dist/src/core/serverless/index.js.map +1 -0
- package/dist/src/core/serverless/learning-path-recommender.d.ts +152 -0
- package/dist/src/core/serverless/learning-path-recommender.d.ts.map +1 -0
- package/dist/src/core/serverless/learning-path-recommender.js +389 -0
- package/dist/src/core/serverless/learning-path-recommender.js.map +1 -0
- package/dist/src/core/serverless/platform-data-loader.d.ts +22 -0
- package/dist/src/core/serverless/platform-data-loader.d.ts.map +1 -0
- package/dist/src/core/serverless/platform-data-loader.js +49 -0
- package/dist/src/core/serverless/platform-data-loader.js.map +1 -0
- package/dist/src/core/serverless/platform-selector.d.ts +20 -0
- package/dist/src/core/serverless/platform-selector.d.ts.map +1 -0
- package/dist/src/core/serverless/platform-selector.js +279 -0
- package/dist/src/core/serverless/platform-selector.js.map +1 -0
- package/dist/src/core/serverless/recommendation-formatter.d.ts +24 -0
- package/dist/src/core/serverless/recommendation-formatter.d.ts.map +1 -0
- package/dist/src/core/serverless/recommendation-formatter.js +70 -0
- package/dist/src/core/serverless/recommendation-formatter.js.map +1 -0
- package/dist/src/core/serverless/suitability-analyzer.d.ts +22 -0
- package/dist/src/core/serverless/suitability-analyzer.d.ts.map +1 -0
- package/dist/src/core/serverless/suitability-analyzer.js +262 -0
- package/dist/src/core/serverless/suitability-analyzer.js.map +1 -0
- package/dist/src/core/serverless/types.d.ts +96 -0
- package/dist/src/core/serverless/types.d.ts.map +1 -0
- package/dist/src/core/serverless/types.js +5 -0
- package/dist/src/core/serverless/types.js.map +1 -0
- package/dist/src/core/sync/bidirectional-engine.d.ts +1 -1
- package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
- package/dist/src/core/sync/enhanced-content-builder.d.ts +1 -1
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
- package/dist/src/core/sync/profile-manager.d.ts +1 -1
- package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
- package/dist/src/core/sync/profile-selector.d.ts +1 -1
- package/dist/src/core/sync/profile-selector.d.ts.map +1 -1
- package/dist/src/core/sync/profile-selector.js +1 -1
- package/dist/src/core/sync/profile-selector.js.map +1 -1
- package/dist/src/core/sync/project-context.d.ts +1 -1
- package/dist/src/core/sync/project-context.d.ts.map +1 -1
- package/dist/src/core/sync/rate-limiter.d.ts +1 -1
- package/dist/src/core/sync/rate-limiter.d.ts.map +1 -1
- package/dist/src/core/sync/status-sync-engine.d.ts +2 -2
- package/dist/src/core/sync/status-sync-engine.d.ts.map +1 -1
- package/dist/src/core/sync/status-sync-engine.js +2 -2
- package/dist/src/core/sync/status-sync-engine.js.map +1 -1
- package/dist/src/core/sync/time-range-selector.d.ts +1 -1
- package/dist/src/core/sync/time-range-selector.d.ts.map +1 -1
- package/dist/src/core/sync/time-range-selector.js +1 -1
- package/dist/src/core/sync/time-range-selector.js.map +1 -1
- package/dist/src/core/types/increment-metadata.d.ts +27 -0
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/increment-metadata.js +45 -1
- package/dist/src/core/types/increment-metadata.js.map +1 -1
- package/dist/src/core/types/sync-profile.d.ts +2 -0
- package/dist/src/core/types/sync-profile.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.js.map +1 -1
- package/dist/src/core/validation/increment-structure-validator.d.ts +47 -0
- package/dist/src/core/validation/increment-structure-validator.d.ts.map +1 -0
- package/dist/src/core/validation/increment-structure-validator.js +187 -0
- package/dist/src/core/validation/increment-structure-validator.js.map +1 -0
- package/dist/src/core/validation/three-file-validator.d.ts +82 -0
- package/dist/src/core/validation/three-file-validator.d.ts.map +1 -0
- package/dist/src/core/validation/three-file-validator.js +320 -0
- package/dist/src/core/validation/three-file-validator.js.map +1 -0
- package/dist/src/core/workflow/phase-detector.d.ts +103 -0
- package/dist/src/core/workflow/phase-detector.d.ts.map +1 -0
- package/dist/src/core/workflow/phase-detector.js +704 -0
- package/dist/src/core/workflow/phase-detector.js.map +1 -0
- package/dist/src/core/workflow/types.d.ts +153 -0
- package/dist/src/core/workflow/types.d.ts.map +1 -0
- package/dist/src/core/workflow/types.js +47 -0
- package/dist/src/core/workflow/types.js.map +1 -0
- package/dist/src/init/InitFlow.d.ts +37 -0
- package/dist/src/init/InitFlow.d.ts.map +1 -0
- package/dist/src/init/InitFlow.js +209 -0
- package/dist/src/init/InitFlow.js.map +1 -0
- package/dist/src/init/architecture/ArchitectureDecisionEngine.d.ts +107 -0
- package/dist/src/init/architecture/ArchitectureDecisionEngine.d.ts.map +1 -0
- package/dist/src/init/architecture/ArchitectureDecisionEngine.js +405 -0
- package/dist/src/init/architecture/ArchitectureDecisionEngine.js.map +1 -0
- package/dist/src/init/architecture/CloudCreditsDatabase.d.ts +11 -0
- package/dist/src/init/architecture/CloudCreditsDatabase.d.ts.map +1 -0
- package/dist/src/init/architecture/CloudCreditsDatabase.js +92 -0
- package/dist/src/init/architecture/CloudCreditsDatabase.js.map +1 -0
- package/dist/src/init/architecture/types.d.ts +251 -0
- package/dist/src/init/architecture/types.d.ts.map +1 -0
- package/dist/src/init/architecture/types.js +54 -0
- package/dist/src/init/architecture/types.js.map +1 -0
- package/dist/src/init/compliance/ComplianceDetector.d.ts +17 -0
- package/dist/src/init/compliance/ComplianceDetector.d.ts.map +1 -0
- package/dist/src/init/compliance/ComplianceDetector.js +64 -0
- package/dist/src/init/compliance/ComplianceDetector.js.map +1 -0
- package/dist/src/init/compliance/standards-database.d.ts +48 -0
- package/dist/src/init/compliance/standards-database.d.ts.map +1 -0
- package/dist/src/init/compliance/standards-database.js +506 -0
- package/dist/src/init/compliance/standards-database.js.map +1 -0
- package/dist/src/init/compliance/types.d.ts +91 -0
- package/dist/src/init/compliance/types.d.ts.map +1 -0
- package/dist/src/init/compliance/types.js +43 -0
- package/dist/src/init/compliance/types.js.map +1 -0
- package/dist/src/init/repo/GitHubAPIClient.d.ts +51 -0
- package/dist/src/init/repo/GitHubAPIClient.d.ts.map +1 -0
- package/dist/src/init/repo/GitHubAPIClient.js +144 -0
- package/dist/src/init/repo/GitHubAPIClient.js.map +1 -0
- package/dist/src/init/repo/RepositorySelector.d.ts +45 -0
- package/dist/src/init/repo/RepositorySelector.d.ts.map +1 -0
- package/dist/src/init/repo/RepositorySelector.js +106 -0
- package/dist/src/init/repo/RepositorySelector.js.map +1 -0
- package/dist/src/init/repo/types.d.ts +95 -0
- package/dist/src/init/repo/types.d.ts.map +1 -0
- package/dist/src/init/repo/types.js +25 -0
- package/dist/src/init/repo/types.js.map +1 -0
- package/dist/src/init/research/CompetitorAnalyzer.d.ts +79 -0
- package/dist/src/init/research/CompetitorAnalyzer.d.ts.map +1 -0
- package/dist/src/init/research/CompetitorAnalyzer.js +265 -0
- package/dist/src/init/research/CompetitorAnalyzer.js.map +1 -0
- package/dist/src/init/research/MarketDetector.d.ts +62 -0
- package/dist/src/init/research/MarketDetector.d.ts.map +1 -0
- package/dist/src/init/research/MarketDetector.js +247 -0
- package/dist/src/init/research/MarketDetector.js.map +1 -0
- package/dist/src/init/research/OpportunityScorer.d.ts +58 -0
- package/dist/src/init/research/OpportunityScorer.d.ts.map +1 -0
- package/dist/src/init/research/OpportunityScorer.js +194 -0
- package/dist/src/init/research/OpportunityScorer.js.map +1 -0
- package/dist/src/init/research/QuestionGenerator.d.ts +68 -0
- package/dist/src/init/research/QuestionGenerator.d.ts.map +1 -0
- package/dist/src/init/research/QuestionGenerator.js +244 -0
- package/dist/src/init/research/QuestionGenerator.js.map +1 -0
- package/dist/src/init/research/ReportGenerator.d.ts +36 -0
- package/dist/src/init/research/ReportGenerator.d.ts.map +1 -0
- package/dist/src/init/research/ReportGenerator.js +125 -0
- package/dist/src/init/research/ReportGenerator.js.map +1 -0
- package/dist/src/init/research/VisionAnalyzer.d.ts +129 -0
- package/dist/src/init/research/VisionAnalyzer.d.ts.map +1 -0
- package/dist/src/init/research/VisionAnalyzer.js +212 -0
- package/dist/src/init/research/VisionAnalyzer.js.map +1 -0
- package/dist/src/init/research/keyword-extractor.d.ts +78 -0
- package/dist/src/init/research/keyword-extractor.d.ts.map +1 -0
- package/dist/src/init/research/keyword-extractor.js +230 -0
- package/dist/src/init/research/keyword-extractor.js.map +1 -0
- package/dist/src/init/research/src/config/ConfigManager.d.ts +14 -0
- package/dist/src/init/research/src/config/ConfigManager.d.ts.map +1 -0
- package/dist/src/init/research/src/config/ConfigManager.js +45 -0
- package/dist/src/init/research/src/config/ConfigManager.js.map +1 -0
- package/dist/src/init/research/src/config/types.d.ts +102 -0
- package/dist/src/init/research/src/config/types.d.ts.map +1 -0
- package/dist/src/init/research/src/config/types.js +24 -0
- package/dist/src/init/research/src/config/types.js.map +1 -0
- package/dist/src/init/research/types.d.ts +183 -0
- package/dist/src/init/research/types.d.ts.map +1 -0
- package/dist/src/init/research/types.js +65 -0
- package/dist/src/init/research/types.js.map +1 -0
- package/dist/src/init/team/ServerlessSavingsCalculator.d.ts +136 -0
- package/dist/src/init/team/ServerlessSavingsCalculator.d.ts.map +1 -0
- package/dist/src/init/team/ServerlessSavingsCalculator.js +360 -0
- package/dist/src/init/team/ServerlessSavingsCalculator.js.map +1 -0
- package/dist/src/init/team/TeamRecommender.d.ts +122 -0
- package/dist/src/init/team/TeamRecommender.d.ts.map +1 -0
- package/dist/src/init/team/TeamRecommender.js +405 -0
- package/dist/src/init/team/TeamRecommender.js.map +1 -0
- package/dist/src/init/team/types.d.ts +95 -0
- package/dist/src/init/team/types.d.ts.map +1 -0
- package/dist/src/init/team/types.js +23 -0
- package/dist/src/init/team/types.js.map +1 -0
- package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
- package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
- package/dist/src/types/cost-tracking.d.ts +1 -1
- package/dist/src/types/cost-tracking.d.ts.map +1 -1
- package/dist/src/utils/cost-reporter.d.ts +2 -2
- package/dist/src/utils/cost-reporter.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.d.ts +1 -1
- package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.js +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.js +4 -4
- package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
- package/dist/src/utils/docs-preview/index.d.ts +6 -6
- package/dist/src/utils/docs-preview/index.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/index.js +6 -6
- package/dist/src/utils/docs-preview/index.js.map +1 -1
- package/dist/src/utils/docs-preview/package-installer.d.ts +1 -1
- package/dist/src/utils/docs-preview/package-installer.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/package-installer.js +1 -1
- package/dist/src/utils/docs-preview/package-installer.js.map +1 -1
- package/dist/src/utils/docs-preview/server-manager.d.ts +1 -1
- package/dist/src/utils/docs-preview/server-manager.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/server-manager.js +1 -1
- package/dist/src/utils/docs-preview/server-manager.js.map +1 -1
- package/dist/src/utils/docs-preview/sidebar-builder.d.ts +1 -1
- package/dist/src/utils/docs-preview/sidebar-builder.d.ts.map +1 -1
- package/dist/src/utils/generate-skills-index.d.ts +1 -1
- package/dist/src/utils/generate-skills-index.js +1 -1
- package/dist/src/utils/project-detection.js +1 -1
- package/dist/src/utils/project-detection.js.map +1 -1
- package/package.json +9 -3
- package/plugins/specweave/agents/architect/AGENT.md +605 -0
- package/plugins/specweave/agents/infrastructure/AGENT.md +760 -0
- package/plugins/specweave/agents/pm/AGENT.md +14 -13
- package/plugins/specweave/commands/specweave-check-hooks.md +186 -0
- package/plugins/specweave/commands/specweave-plan.md +151 -0
- package/plugins/specweave/commands/specweave-sync-acs.md +342 -0
- package/plugins/specweave/commands/specweave-validate.md +60 -11
- package/plugins/specweave/hooks/lib/update-status-line.sh +8 -4
- package/plugins/specweave/hooks/post-increment-change.sh +4 -0
- package/plugins/specweave/hooks/post-increment-completion.sh +7 -1
- package/plugins/specweave/hooks/post-increment-planning.sh +4 -0
- package/plugins/specweave/hooks/post-increment-status-change.sh +4 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh +78 -0
- package/plugins/specweave/iac-templates/aws-lambda/README.md.hbs +280 -0
- package/plugins/specweave/iac-templates/aws-lambda/defaults.json +118 -0
- package/plugins/specweave/iac-templates/aws-lambda/environments/dev.defaults.json +46 -0
- package/plugins/specweave/iac-templates/aws-lambda/environments/prod.defaults.json +67 -0
- package/plugins/specweave/iac-templates/aws-lambda/environments/staging.defaults.json +47 -0
- package/plugins/specweave/iac-templates/aws-lambda/main.tf.hbs +241 -0
- package/plugins/specweave/iac-templates/aws-lambda/outputs.tf.hbs +61 -0
- package/plugins/specweave/iac-templates/aws-lambda/provider.tf.hbs +15 -0
- package/plugins/specweave/iac-templates/aws-lambda/variables.tf.hbs +88 -0
- package/plugins/specweave/iac-templates/azure-functions/README.md.hbs +315 -0
- package/plugins/specweave/iac-templates/azure-functions/defaults.json +65 -0
- package/plugins/specweave/iac-templates/azure-functions/environments/dev.defaults.json +30 -0
- package/plugins/specweave/iac-templates/azure-functions/environments/prod.defaults.json +34 -0
- package/plugins/specweave/iac-templates/azure-functions/environments/staging.defaults.json +31 -0
- package/plugins/specweave/iac-templates/azure-functions/iam.tf.hbs +34 -0
- package/plugins/specweave/iac-templates/azure-functions/main.tf.hbs +247 -0
- package/plugins/specweave/iac-templates/azure-functions/outputs.tf.hbs +72 -0
- package/plugins/specweave/iac-templates/azure-functions/provider.tf.hbs +14 -0
- package/plugins/specweave/iac-templates/azure-functions/variables.tf.hbs +64 -0
- package/plugins/specweave/iac-templates/firebase/README.md.hbs +487 -0
- package/plugins/specweave/iac-templates/firebase/defaults.json +55 -0
- package/plugins/specweave/iac-templates/firebase/environments/dev.defaults.json +44 -0
- package/plugins/specweave/iac-templates/firebase/environments/prod.defaults.json +52 -0
- package/plugins/specweave/iac-templates/firebase/environments/staging.defaults.json +43 -0
- package/plugins/specweave/iac-templates/firebase/iam.tf.hbs +75 -0
- package/plugins/specweave/iac-templates/firebase/main.tf.hbs +297 -0
- package/plugins/specweave/iac-templates/firebase/outputs.tf.hbs +67 -0
- package/plugins/specweave/iac-templates/firebase/provider.tf.hbs +26 -0
- package/plugins/specweave/iac-templates/firebase/variables.tf.hbs +68 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/README.md.hbs +330 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/defaults.json +69 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/dev.defaults.json +33 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/prod.defaults.json +40 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/staging.defaults.json +33 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/iam.tf.hbs +54 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/main.tf.hbs +211 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/outputs.tf.hbs +44 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/provider.tf.hbs +14 -0
- package/plugins/specweave/iac-templates/gcp-cloud-functions/variables.tf.hbs +82 -0
- package/plugins/specweave/iac-templates/supabase/README.md.hbs +534 -0
- package/plugins/specweave/iac-templates/supabase/defaults.json +69 -0
- package/plugins/specweave/iac-templates/supabase/environments/dev.defaults.json +55 -0
- package/plugins/specweave/iac-templates/supabase/environments/prod.defaults.json +75 -0
- package/plugins/specweave/iac-templates/supabase/environments/staging.defaults.json +54 -0
- package/plugins/specweave/iac-templates/supabase/iam.tf.hbs +146 -0
- package/plugins/specweave/iac-templates/supabase/main.tf.hbs +310 -0
- package/plugins/specweave/iac-templates/supabase/outputs.tf.hbs +74 -0
- package/plugins/specweave/iac-templates/supabase/provider.tf.hbs +19 -0
- package/plugins/specweave/iac-templates/supabase/variables.tf.hbs +78 -0
- package/plugins/specweave/knowledge-base/serverless/FRESHNESS.md +69 -0
- package/plugins/specweave/knowledge-base/serverless/learning-paths.json +865 -0
- package/plugins/specweave/knowledge-base/serverless/platforms/aws-lambda.json +41 -0
- package/plugins/specweave/knowledge-base/serverless/platforms/azure-functions.json +41 -0
- package/plugins/specweave/knowledge-base/serverless/platforms/firebase.json +46 -0
- package/plugins/specweave/knowledge-base/serverless/platforms/gcp-cloud-functions.json +41 -0
- package/plugins/specweave/knowledge-base/serverless/platforms/supabase.json +41 -0
- package/plugins/specweave/knowledge-base/serverless/schema.json +155 -0
- package/plugins/specweave/lib/hooks/auto-transition.js +50 -0
- package/plugins/specweave/lib/hooks/auto-transition.ts +84 -0
- package/plugins/specweave/lib/hooks/invoke-translator-skill.js +1 -1
- package/plugins/specweave/lib/hooks/invoke-translator-skill.ts +1 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.js +4 -31
- package/plugins/specweave/lib/hooks/{sync-living-docs.ts → sync-living-docs.ts.DISABLED} +9 -48
- package/plugins/specweave/lib/hooks/translate-file.js +1 -1
- package/plugins/specweave/lib/hooks/translate-file.ts +1 -1
- package/plugins/specweave/lib/hooks/update-ac-status.js +24 -75
- package/plugins/specweave/lib/hooks/update-ac-status.ts +46 -135
- package/plugins/specweave/lib/hooks/update-tasks-md.js +115 -3
- package/plugins/specweave/lib/hooks/update-tasks-md.ts +182 -10
- package/plugins/specweave/lib/utils/validate-dev-setup.sh +133 -0
- package/plugins/specweave/skills/increment-planner/SKILL.md +25 -15
- package/plugins/specweave/skills/serverless-recommender/SKILL.md +368 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/iam.tf.hbs +137 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/main.tf.hbs +216 -0
- package/plugins/specweave-github/lib/IssueStateManager.js +117 -0
- package/plugins/specweave-github/lib/IssueStateManager.ts +231 -0
- package/plugins/specweave-github/lib/user-story-issue-builder.js +7 -0
- package/plugins/specweave-github/lib/user-story-issue-builder.ts +11 -0
- package/plugins/specweave-ui/.mcp.json +0 -10
- package/plugins/specweave-ui/README.md +26 -26
- package/plugins/specweave-ui/skills/browser-automation/SKILL.md +31 -18
- package/src/templates/tasks.md.template +51 -33
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +0 -108
- package/dist/locales/en/cli.json +0 -287
- package/dist/locales/en/errors.json +0 -7
- package/dist/locales/en/templates.json +0 -6
- package/dist/locales/es/.gitkeep +0 -0
- package/dist/locales/es/cli.json +0 -41
- package/dist/locales/fr/.gitkeep +0 -0
- package/dist/locales/fr/cli.json +0 -108
- package/dist/locales/ja/.gitkeep +0 -0
- package/dist/locales/ja/cli.json +0 -108
- package/dist/locales/ko/.gitkeep +0 -0
- package/dist/locales/ko/cli.json +0 -108
- package/dist/locales/pt/.gitkeep +0 -0
- package/dist/locales/pt/cli.json +0 -108
- package/dist/locales/ru/.gitkeep +0 -0
- package/dist/locales/ru/cli.json +0 -269
- package/dist/locales/zh/.gitkeep +0 -0
- package/dist/locales/zh/cli.json +0 -108
- package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +0 -89
- package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js +0 -226
- package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +0 -60
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js +0 -201
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +0 -42
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js +0 -123
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +0 -45
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js +0 -132
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts +0 -33
- package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-parser.js +0 -419
- package/dist/plugins/specweave/lib/hooks/reflection-parser.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +0 -56
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js +0 -239
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts +0 -64
- package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/reflection-storage.js +0 -305
- package/dist/plugins/specweave/lib/hooks/reflection-storage.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts +0 -43
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.js +0 -203
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +0 -32
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +0 -405
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/translate-file.d.ts +0 -59
- package/dist/plugins/specweave/lib/hooks/translate-file.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/translate-file.js +0 -350
- package/dist/plugins/specweave/lib/hooks/translate-file.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts +0 -13
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.js +0 -175
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts +0 -164
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.js +0 -73
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +0 -21
- package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/update-ac-status.js +0 -162
- package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +0 -1
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts +0 -29
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +0 -1
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.js +0 -203
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.js.map +0 -1
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +0 -25
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -191
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +0 -1
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts +0 -57
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts.map +0 -1
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +0 -248
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js.map +0 -1
- package/dist/plugins/specweave-kafka/lib/cli/types.d.ts +0 -82
- package/dist/plugins/specweave-kafka/lib/cli/types.d.ts.map +0 -1
- package/dist/plugins/specweave-kafka/lib/cli/types.js +0 -13
- package/dist/plugins/specweave-kafka/lib/cli/types.js.map +0 -1
- package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts +0 -49
- package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts.map +0 -1
- package/dist/plugins/specweave-kafka/lib/mcp/detector.js +0 -316
- package/dist/plugins/specweave-kafka/lib/mcp/detector.js.map +0 -1
- package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts +0 -70
- package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts.map +0 -1
- package/dist/plugins/specweave-kafka/lib/mcp/types.js +0 -23
- package/dist/plugins/specweave-kafka/lib/mcp/types.js.map +0 -1
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts +0 -85
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts.map +0 -1
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.js +0 -281
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.js.map +0 -1
- package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts +0 -75
- package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts.map +0 -1
- package/dist/plugins/specweave-kafka/lib/utils/sizing.js +0 -238
- package/dist/plugins/specweave-kafka/lib/utils/sizing.js.map +0 -1
- package/dist/spec-parser.js +0 -629
- package/dist/src/core/living-docs/spec-distributor.d.ts +0 -180
- package/dist/src/core/living-docs/spec-distributor.d.ts.map +0 -1
- package/dist/src/core/living-docs/spec-distributor.js +0 -1840
- package/dist/src/core/living-docs/spec-distributor.js.map +0 -1
- package/dist/src/core/sync/spec-content-sync.d.ts +0 -88
- package/dist/src/core/sync/spec-content-sync.d.ts.map +0 -1
- package/dist/src/core/sync/spec-content-sync.js +0 -5
- package/dist/src/core/sync/spec-content-sync.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
package/dist/spec-parser.js
DELETED
|
@@ -1,629 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SpecWeave Spec Parser Utilities
|
|
3
|
-
*
|
|
4
|
-
* Parses increment and living docs specifications to extract structured data.
|
|
5
|
-
*
|
|
6
|
-
* Key responsibilities:
|
|
7
|
-
* - Extract user stories from markdown
|
|
8
|
-
* - Parse increment specs (temporary, implementation-focused)
|
|
9
|
-
* - Parse living docs specs (permanent, epic-level)
|
|
10
|
-
* - Generate links to related documentation (avoid duplication)
|
|
11
|
-
* - Merge user stories intelligently
|
|
12
|
-
*
|
|
13
|
-
* @author SpecWeave Team
|
|
14
|
-
* @version 2.0.0
|
|
15
|
-
*/
|
|
16
|
-
import fs from 'fs-extra';
|
|
17
|
-
import path from 'path';
|
|
18
|
-
// ============================================================================
|
|
19
|
-
// PARSING FUNCTIONS
|
|
20
|
-
// ============================================================================
|
|
21
|
-
/**
|
|
22
|
-
* Parse increment spec.md into structured data
|
|
23
|
-
*
|
|
24
|
-
* Extracts user stories, acceptance criteria, and metadata.
|
|
25
|
-
* Discards architecture details (those belong in architecture/ folder).
|
|
26
|
-
*/
|
|
27
|
-
export async function parseIncrementSpec(filePath) {
|
|
28
|
-
const content = await fs.readFile(filePath, 'utf-8');
|
|
29
|
-
// Extract metadata from frontmatter
|
|
30
|
-
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
31
|
-
let metadata = {};
|
|
32
|
-
if (frontmatterMatch) {
|
|
33
|
-
const frontmatter = frontmatterMatch[1];
|
|
34
|
-
const lines = frontmatter.split('\n');
|
|
35
|
-
for (const line of lines) {
|
|
36
|
-
const [key, ...valueParts] = line.split(':');
|
|
37
|
-
if (key && valueParts.length > 0) {
|
|
38
|
-
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
39
|
-
metadata[key.trim()] = value;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
// Extract title (from frontmatter or first heading)
|
|
44
|
-
let title = metadata.title || '';
|
|
45
|
-
if (!title) {
|
|
46
|
-
const titleMatch = content.match(/^#\s+(.+)$/m);
|
|
47
|
-
if (titleMatch) {
|
|
48
|
-
title = titleMatch[1];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Extract overview (first paragraph after title)
|
|
52
|
-
const overviewMatch = content.match(/##\s+Overview\s*\n+([\s\S]*?)(?=\n##|\n---|\Z)/i);
|
|
53
|
-
const overview = overviewMatch ? overviewMatch[1].trim() : '';
|
|
54
|
-
// Extract user stories
|
|
55
|
-
const userStories = extractUserStories(content);
|
|
56
|
-
// Extract "Implements" reference
|
|
57
|
-
const implementsMatch = content.match(/\*\*Implements\*\*:\s*(?:\[)?SPEC-(\d+)/i);
|
|
58
|
-
const implementsSpec = implementsMatch ? `SPEC-${implementsMatch[1]}` : undefined;
|
|
59
|
-
// Extract out of scope
|
|
60
|
-
const outOfScopeMatch = content.match(/##\s+Out of Scope[\s\S]*?\n([\s\S]*?)(?=\n##|\Z)/i);
|
|
61
|
-
const outOfScope = [];
|
|
62
|
-
if (outOfScopeMatch) {
|
|
63
|
-
const outOfScopeText = outOfScopeMatch[1];
|
|
64
|
-
const storyMatches = outOfScopeText.matchAll(/US-(\d+)/g);
|
|
65
|
-
for (const match of storyMatches) {
|
|
66
|
-
outOfScope.push(`US-${match[1]}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
id: metadata.increment || path.basename(path.dirname(filePath)),
|
|
71
|
-
title: title.replace(/^Increment \d+:\s*/, ''),
|
|
72
|
-
overview,
|
|
73
|
-
implementsSpec,
|
|
74
|
-
userStories,
|
|
75
|
-
outOfScope,
|
|
76
|
-
priority: metadata.priority,
|
|
77
|
-
status: metadata.status,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Parse living docs spec.md into structured data
|
|
82
|
-
*/
|
|
83
|
-
export async function parseLivingDocsSpec(filePath) {
|
|
84
|
-
const content = await fs.readFile(filePath, 'utf-8');
|
|
85
|
-
// Extract metadata from frontmatter
|
|
86
|
-
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
87
|
-
let metadata = {};
|
|
88
|
-
if (frontmatterMatch) {
|
|
89
|
-
const frontmatter = frontmatterMatch[1];
|
|
90
|
-
const lines = frontmatter.split('\n');
|
|
91
|
-
for (const line of lines) {
|
|
92
|
-
const [key, ...valueParts] = line.split(':');
|
|
93
|
-
if (key && valueParts.length > 0) {
|
|
94
|
-
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
95
|
-
metadata[key.trim()] = value;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
// Extract title
|
|
100
|
-
let title = metadata.title || '';
|
|
101
|
-
if (!title) {
|
|
102
|
-
const titleMatch = content.match(/^#\s+SPEC-\d+:\s*(.+)$/m);
|
|
103
|
-
if (titleMatch) {
|
|
104
|
-
title = titleMatch[1];
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// Extract spec ID
|
|
108
|
-
const specIdMatch = content.match(/^#\s+(SPEC-\d+)/m) || content.match(/id:\s*(SPEC-\d+)/i);
|
|
109
|
-
const id = specIdMatch ? specIdMatch[1] : metadata.id || '';
|
|
110
|
-
// Extract feature area
|
|
111
|
-
const featureAreaMatch = content.match(/\*\*Feature Area\*\*:\s*(.+)/);
|
|
112
|
-
const featureArea = featureAreaMatch ? featureAreaMatch[1].trim() : '';
|
|
113
|
-
// Extract overview
|
|
114
|
-
const overviewMatch = content.match(/##\s+Overview\s*\n+([\s\S]*?)(?=\n##|\n---|\Z)/i);
|
|
115
|
-
const overview = overviewMatch ? overviewMatch[1].trim() : '';
|
|
116
|
-
// Extract user stories
|
|
117
|
-
const userStories = extractUserStories(content);
|
|
118
|
-
// Extract implementation history
|
|
119
|
-
const implementationHistory = extractImplementationHistory(content);
|
|
120
|
-
// Extract related docs (links only)
|
|
121
|
-
const relatedDocs = extractRelatedDocs(content);
|
|
122
|
-
// Extract external links
|
|
123
|
-
const externalLinks = extractExternalLinks(content);
|
|
124
|
-
return {
|
|
125
|
-
id,
|
|
126
|
-
title,
|
|
127
|
-
featureArea,
|
|
128
|
-
overview,
|
|
129
|
-
userStories,
|
|
130
|
-
implementationHistory,
|
|
131
|
-
relatedDocs,
|
|
132
|
-
externalLinks,
|
|
133
|
-
priority: metadata.priority,
|
|
134
|
-
status: metadata.status,
|
|
135
|
-
created: metadata.created,
|
|
136
|
-
lastUpdated: metadata.last_updated || new Date().toISOString().split('T')[0],
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Extract user stories from markdown content
|
|
141
|
-
*
|
|
142
|
-
* Supports formats:
|
|
143
|
-
* - **US-001**: Description
|
|
144
|
-
* - ### US-001: Title
|
|
145
|
-
* - **US1**: Description (legacy)
|
|
146
|
-
*/
|
|
147
|
-
export function extractUserStories(markdown) {
|
|
148
|
-
const stories = [];
|
|
149
|
-
// Find all user story sections
|
|
150
|
-
// Pattern 1: ### US-001: Title (most common in living docs)
|
|
151
|
-
// Pattern 2: **US-001**: Description (common in increment specs)
|
|
152
|
-
const storyPattern = /(?:###\s+US-(\d+):\s*(.+)|\\*\\*US-(\d+)\\*\\*:\s*As a\s+(.+?)(?=\n\n|\n\\*\\*|\\Z))/gs;
|
|
153
|
-
let match;
|
|
154
|
-
while ((match = storyPattern.exec(markdown)) !== null) {
|
|
155
|
-
const storyId = match[1] || match[3];
|
|
156
|
-
const storyTitle = match[2] || '';
|
|
157
|
-
const storyDescription = match[4] || '';
|
|
158
|
-
if (!storyId)
|
|
159
|
-
continue;
|
|
160
|
-
const id = `US-${storyId.padStart(3, '0')}`;
|
|
161
|
-
// Find the full story content
|
|
162
|
-
const storyStartIndex = match.index;
|
|
163
|
-
const nextStoryMatch = markdown.slice(storyStartIndex + match[0].length).match(/(?:###\s+US-\d+|\\*\\*US-\d+\\*\\*)/);
|
|
164
|
-
const storyEndIndex = nextStoryMatch
|
|
165
|
-
? storyStartIndex + match[0].length + nextStoryMatch.index
|
|
166
|
-
: markdown.length;
|
|
167
|
-
const storyContent = markdown.slice(storyStartIndex, storyEndIndex);
|
|
168
|
-
// Extract acceptance criteria
|
|
169
|
-
const acceptanceCriteria = extractAcceptanceCriteria(storyContent, id);
|
|
170
|
-
// Extract epic (if present)
|
|
171
|
-
const epicMatch = markdown.slice(0, storyStartIndex).match(/###\s+(Epic\s+\d+:[^\n]+)/g);
|
|
172
|
-
const epic = epicMatch ? epicMatch[epicMatch.length - 1].replace(/^###\s+/, '') : undefined;
|
|
173
|
-
// Extract priority
|
|
174
|
-
const priorityMatch = storyContent.match(/Priority:\s*(P[0-3])/i);
|
|
175
|
-
const priority = priorityMatch ? priorityMatch[1] : undefined;
|
|
176
|
-
// Determine status (check if all ACs are completed)
|
|
177
|
-
const allCompleted = acceptanceCriteria.length > 0 && acceptanceCriteria.every(ac => ac.completed);
|
|
178
|
-
const anyInProgress = acceptanceCriteria.some(ac => !ac.completed);
|
|
179
|
-
const status = allCompleted ? 'complete' : anyInProgress ? 'in-progress' : 'pending';
|
|
180
|
-
// Extract implementation reference
|
|
181
|
-
const implementedInMatch = storyContent.match(/\\*\\*Implementation\\*\\*:\s*Increment\s+(\d{4}-[a-z0-9-]+)/i);
|
|
182
|
-
const implementedIn = implementedInMatch ? implementedInMatch[1] : undefined;
|
|
183
|
-
stories.push({
|
|
184
|
-
id,
|
|
185
|
-
title: storyTitle.trim() || storyDescription.split('\n')[0].trim(),
|
|
186
|
-
description: storyContent.trim(),
|
|
187
|
-
acceptanceCriteria,
|
|
188
|
-
epic,
|
|
189
|
-
priority,
|
|
190
|
-
status,
|
|
191
|
-
implementedIn,
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
return stories;
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Extract acceptance criteria from user story content
|
|
198
|
-
*/
|
|
199
|
-
function extractAcceptanceCriteria(storyContent, storyId) {
|
|
200
|
-
const criteria = [];
|
|
201
|
-
// Pattern: - [ ] **AC-US1-01**: Description (P1, Testable: Yes)
|
|
202
|
-
// Pattern: - [x] **AC-US1-01**: Description
|
|
203
|
-
const acPattern = /- \[([ xX])\]\s+\*\*AC-([^:]+)\*\*:\s*(.+?)(?:\((.+?)\))?$/gm;
|
|
204
|
-
let match;
|
|
205
|
-
while ((match = acPattern.exec(storyContent)) !== null) {
|
|
206
|
-
const completed = match[1].toLowerCase() === 'x';
|
|
207
|
-
const acId = `AC-${match[2]}`;
|
|
208
|
-
const description = match[3].trim();
|
|
209
|
-
const metadata = match[4] || '';
|
|
210
|
-
// Extract priority and testable flag from metadata
|
|
211
|
-
const priorityMatch = metadata.match(/P[0-3]/);
|
|
212
|
-
const priority = priorityMatch ? priorityMatch[0] : undefined;
|
|
213
|
-
const testableMatch = metadata.match(/Testable:\s*(Yes|No)/i);
|
|
214
|
-
const testable = testableMatch ? testableMatch[1].toLowerCase() === 'yes' : true;
|
|
215
|
-
criteria.push({
|
|
216
|
-
id: acId,
|
|
217
|
-
description,
|
|
218
|
-
priority,
|
|
219
|
-
testable,
|
|
220
|
-
completed,
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
return criteria;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Extract implementation history from living docs
|
|
227
|
-
*/
|
|
228
|
-
function extractImplementationHistory(markdown) {
|
|
229
|
-
const history = [];
|
|
230
|
-
// Find implementation history table
|
|
231
|
-
const tableMatch = markdown.match(/##\s+(?:Increments|Implementation History)[\s\S]*?\n\|[\s\S]*?\n([\s\S]*?)(?=\n##|\Z)/i);
|
|
232
|
-
if (!tableMatch)
|
|
233
|
-
return history;
|
|
234
|
-
const tableContent = tableMatch[1];
|
|
235
|
-
// Parse table rows
|
|
236
|
-
const rows = tableContent.split('\n').filter(line => line.trim().startsWith('|'));
|
|
237
|
-
for (const row of rows) {
|
|
238
|
-
if (row.includes('Increment') || row.includes('---'))
|
|
239
|
-
continue; // Skip header
|
|
240
|
-
const cells = row.split('|').map(c => c.trim()).filter(c => c);
|
|
241
|
-
if (cells.length < 2)
|
|
242
|
-
continue;
|
|
243
|
-
const incrementMatch = cells[0].match(/(\d{4}-[a-z0-9-]+)/);
|
|
244
|
-
if (!incrementMatch)
|
|
245
|
-
continue;
|
|
246
|
-
const increment = incrementMatch[1];
|
|
247
|
-
// Extract stories from second column
|
|
248
|
-
const storiesText = cells[1] || '';
|
|
249
|
-
const storyMatches = Array.from(storiesText.matchAll(/US-(\d+)/g));
|
|
250
|
-
const stories = storyMatches.map(m => `US-${m[1]}`);
|
|
251
|
-
// Extract status
|
|
252
|
-
const statusMatch = cells[2]?.match(/(Complete|In Progress|Planned)/i);
|
|
253
|
-
const status = statusMatch
|
|
254
|
-
? statusMatch[1].toLowerCase().replace(' ', '-')
|
|
255
|
-
: 'planned';
|
|
256
|
-
// Extract date
|
|
257
|
-
const dateMatch = cells[3]?.match(/\d{4}-\d{2}-\d{2}/);
|
|
258
|
-
const date = dateMatch ? dateMatch[0] : undefined;
|
|
259
|
-
history.push({
|
|
260
|
-
increment,
|
|
261
|
-
stories,
|
|
262
|
-
status,
|
|
263
|
-
date,
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
return history;
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Extract related documentation links
|
|
270
|
-
*/
|
|
271
|
-
function extractRelatedDocs(markdown) {
|
|
272
|
-
const relatedDocs = {
|
|
273
|
-
architecture: [],
|
|
274
|
-
adrs: [],
|
|
275
|
-
strategy: [],
|
|
276
|
-
operations: [],
|
|
277
|
-
delivery: [],
|
|
278
|
-
};
|
|
279
|
-
// Find related documentation section
|
|
280
|
-
const relatedMatch = markdown.match(/##\s+(?:Architecture & Design|Related Documentation)[\s\S]*?\n([\s\S]*?)(?=\n##|\Z)/i);
|
|
281
|
-
if (!relatedMatch)
|
|
282
|
-
return relatedDocs;
|
|
283
|
-
const content = relatedMatch[1];
|
|
284
|
-
// Extract links
|
|
285
|
-
const linkPattern = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
286
|
-
let match;
|
|
287
|
-
while ((match = linkPattern.exec(content)) !== null) {
|
|
288
|
-
const linkText = match[1];
|
|
289
|
-
const linkPath = match[2];
|
|
290
|
-
if (linkPath.includes('/architecture/') && !linkPath.includes('/adr/')) {
|
|
291
|
-
relatedDocs.architecture.push(linkPath);
|
|
292
|
-
}
|
|
293
|
-
else if (linkPath.includes('/adr/')) {
|
|
294
|
-
relatedDocs.adrs.push(linkPath);
|
|
295
|
-
}
|
|
296
|
-
else if (linkPath.includes('/strategy/')) {
|
|
297
|
-
relatedDocs.strategy.push(linkPath);
|
|
298
|
-
}
|
|
299
|
-
else if (linkPath.includes('/operations/')) {
|
|
300
|
-
relatedDocs.operations.push(linkPath);
|
|
301
|
-
}
|
|
302
|
-
else if (linkPath.includes('/delivery/')) {
|
|
303
|
-
relatedDocs.delivery.push(linkPath);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
return relatedDocs;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Extract external tool links
|
|
310
|
-
*/
|
|
311
|
-
function extractExternalLinks(markdown) {
|
|
312
|
-
const externalLinks = {};
|
|
313
|
-
// Find external tools section
|
|
314
|
-
const externalMatch = markdown.match(/##\s+External Tool Links[\s\S]*?\n([\s\S]*?)(?=\n##|\Z)/i);
|
|
315
|
-
if (!externalMatch)
|
|
316
|
-
return externalLinks;
|
|
317
|
-
const content = externalMatch[1];
|
|
318
|
-
// Extract GitHub link
|
|
319
|
-
const githubMatch = content.match(/\*\*GitHub\*\*:\s*\[([^\]]+)\]\(([^)]+)\)/);
|
|
320
|
-
if (githubMatch) {
|
|
321
|
-
externalLinks.github = githubMatch[2];
|
|
322
|
-
}
|
|
323
|
-
// Extract Jira link
|
|
324
|
-
const jiraMatch = content.match(/\*\*Jira\*\*:\s*\[([^\]]+)\]\(([^)]+)\)/);
|
|
325
|
-
if (jiraMatch) {
|
|
326
|
-
externalLinks.jira = jiraMatch[2];
|
|
327
|
-
}
|
|
328
|
-
// Extract Azure DevOps link
|
|
329
|
-
const adoMatch = content.match(/\*\*Azure DevOps\*\*:\s*\[([^\]]+)\]\(([^)]+)\)/);
|
|
330
|
-
if (adoMatch) {
|
|
331
|
-
externalLinks.ado = adoMatch[2];
|
|
332
|
-
}
|
|
333
|
-
return externalLinks;
|
|
334
|
-
}
|
|
335
|
-
// ============================================================================
|
|
336
|
-
// LINK GENERATION
|
|
337
|
-
// ============================================================================
|
|
338
|
-
/**
|
|
339
|
-
* Generate links to related documentation (avoid duplication)
|
|
340
|
-
*
|
|
341
|
-
* Analyzes increment spec to find architecture references and generates
|
|
342
|
-
* proper links instead of duplicating content.
|
|
343
|
-
*/
|
|
344
|
-
export function generateRelatedDocsLinks(spec, projectRoot = process.cwd()) {
|
|
345
|
-
const relatedDocs = {
|
|
346
|
-
architecture: [],
|
|
347
|
-
adrs: [],
|
|
348
|
-
strategy: [],
|
|
349
|
-
operations: [],
|
|
350
|
-
delivery: [],
|
|
351
|
-
};
|
|
352
|
-
// Check for architecture folder
|
|
353
|
-
const architectureDir = path.join(projectRoot, '.specweave', 'docs', 'internal', 'architecture');
|
|
354
|
-
if (fs.existsSync(architectureDir)) {
|
|
355
|
-
// Find HLD files
|
|
356
|
-
const hldPattern = `hld-*.md`;
|
|
357
|
-
const hldFiles = fs.readdirSync(architectureDir).filter(f => f.startsWith('hld-') && f.endsWith('.md'));
|
|
358
|
-
for (const file of hldFiles) {
|
|
359
|
-
relatedDocs.architecture.push(`../../architecture/${file}`);
|
|
360
|
-
}
|
|
361
|
-
// Find ADR files
|
|
362
|
-
const adrDir = path.join(architectureDir, 'adr');
|
|
363
|
-
if (fs.existsSync(adrDir)) {
|
|
364
|
-
const adrFiles = fs.readdirSync(adrDir).filter(f => f.endsWith('.md'));
|
|
365
|
-
for (const file of adrFiles) {
|
|
366
|
-
relatedDocs.adrs.push(`../../architecture/adr/${file}`);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
// Check for strategy folder
|
|
371
|
-
const strategyDir = path.join(projectRoot, '.specweave', 'docs', 'internal', 'strategy');
|
|
372
|
-
if (fs.existsSync(strategyDir)) {
|
|
373
|
-
const strategyFiles = fs.readdirSync(strategyDir).filter(f => f.endsWith('.md'));
|
|
374
|
-
for (const file of strategyFiles) {
|
|
375
|
-
relatedDocs.strategy.push(`../../strategy/${file}`);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
// Check for operations folder
|
|
379
|
-
const operationsDir = path.join(projectRoot, '.specweave', 'docs', 'internal', 'operations');
|
|
380
|
-
if (fs.existsSync(operationsDir)) {
|
|
381
|
-
const operationsFiles = fs.readdirSync(operationsDir).filter(f => f.endsWith('.md'));
|
|
382
|
-
for (const file of operationsFiles) {
|
|
383
|
-
relatedDocs.operations.push(`../../operations/${file}`);
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
// Check for delivery folder
|
|
387
|
-
const deliveryDir = path.join(projectRoot, '.specweave', 'docs', 'internal', 'delivery');
|
|
388
|
-
if (fs.existsSync(deliveryDir)) {
|
|
389
|
-
const deliveryFiles = fs.readdirSync(deliveryDir).filter(f => f.endsWith('.md'));
|
|
390
|
-
for (const file of deliveryFiles) {
|
|
391
|
-
relatedDocs.delivery.push(`../../delivery/${file}`);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
return relatedDocs;
|
|
395
|
-
}
|
|
396
|
-
// ============================================================================
|
|
397
|
-
// UTILITY FUNCTIONS
|
|
398
|
-
// ============================================================================
|
|
399
|
-
/**
|
|
400
|
-
* Extract spec ID from increment ID
|
|
401
|
-
*
|
|
402
|
-
* Examples:
|
|
403
|
-
* - 0001-core-framework → SPEC-001
|
|
404
|
-
* - 0002-core-enhancements → SPEC-002 (if part of same spec)
|
|
405
|
-
* - 0005-cross-platform-cli → SPEC-001 (if part of core spec)
|
|
406
|
-
*/
|
|
407
|
-
export function extractSpecId(incrementId) {
|
|
408
|
-
// Extract numeric prefix
|
|
409
|
-
const numMatch = incrementId.match(/^(\d+)/);
|
|
410
|
-
const num = numMatch ? parseInt(numMatch[1], 10) : 1;
|
|
411
|
-
// For now, use same numbering (can be customized later)
|
|
412
|
-
return `SPEC-${num.toString().padStart(3, '0')}`;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* Merge user stories from increment into living docs
|
|
416
|
-
*
|
|
417
|
-
* Adds new stories, updates existing stories with completion status.
|
|
418
|
-
*/
|
|
419
|
-
export function mergeUserStories(existingStories, newStories, incrementId) {
|
|
420
|
-
const merged = [...existingStories];
|
|
421
|
-
for (const newStory of newStories) {
|
|
422
|
-
const existingIndex = merged.findIndex(s => s.id === newStory.id);
|
|
423
|
-
if (existingIndex >= 0) {
|
|
424
|
-
// Update existing story
|
|
425
|
-
merged[existingIndex] = {
|
|
426
|
-
...merged[existingIndex],
|
|
427
|
-
...newStory,
|
|
428
|
-
implementedIn: incrementId,
|
|
429
|
-
status: newStory.status,
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
else {
|
|
433
|
-
// Add new story
|
|
434
|
-
merged.push({
|
|
435
|
-
...newStory,
|
|
436
|
-
implementedIn: incrementId,
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
// Sort by ID
|
|
441
|
-
merged.sort((a, b) => a.id.localeCompare(b.id));
|
|
442
|
-
return merged;
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* Write living docs spec to file
|
|
446
|
-
*/
|
|
447
|
-
export async function writeLivingDocsSpec(filePath, spec) {
|
|
448
|
-
const content = formatLivingDocsSpec(spec);
|
|
449
|
-
await fs.ensureDir(path.dirname(filePath));
|
|
450
|
-
await fs.writeFile(filePath, content, 'utf-8');
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* Format living docs spec as markdown
|
|
454
|
-
*/
|
|
455
|
-
function formatLivingDocsSpec(spec) {
|
|
456
|
-
const lines = [];
|
|
457
|
-
// Frontmatter
|
|
458
|
-
lines.push('---');
|
|
459
|
-
lines.push(`id: ${spec.id}`);
|
|
460
|
-
lines.push(`title: "${spec.title}"`);
|
|
461
|
-
if (spec.status)
|
|
462
|
-
lines.push(`status: ${spec.status}`);
|
|
463
|
-
if (spec.priority)
|
|
464
|
-
lines.push(`priority: ${spec.priority}`);
|
|
465
|
-
if (spec.created)
|
|
466
|
-
lines.push(`created: ${spec.created}`);
|
|
467
|
-
lines.push(`last_updated: ${spec.lastUpdated || new Date().toISOString().split('T')[0]}`);
|
|
468
|
-
lines.push('---');
|
|
469
|
-
lines.push('');
|
|
470
|
-
// Title
|
|
471
|
-
lines.push(`# ${spec.id}: ${spec.title}`);
|
|
472
|
-
lines.push('');
|
|
473
|
-
lines.push(`**Feature Area**: ${spec.featureArea}`);
|
|
474
|
-
if (spec.status)
|
|
475
|
-
lines.push(`**Status**: ${spec.status}`);
|
|
476
|
-
if (spec.priority)
|
|
477
|
-
lines.push(`**Priority**: ${spec.priority}`);
|
|
478
|
-
lines.push('');
|
|
479
|
-
lines.push('---');
|
|
480
|
-
lines.push('');
|
|
481
|
-
// Overview
|
|
482
|
-
lines.push('## Overview');
|
|
483
|
-
lines.push('');
|
|
484
|
-
lines.push(spec.overview);
|
|
485
|
-
lines.push('');
|
|
486
|
-
lines.push('---');
|
|
487
|
-
lines.push('');
|
|
488
|
-
// Implementation History
|
|
489
|
-
if (spec.implementationHistory.length > 0) {
|
|
490
|
-
lines.push('## Implementation History');
|
|
491
|
-
lines.push('');
|
|
492
|
-
lines.push('| Increment | Stories | Status | Completion |');
|
|
493
|
-
lines.push('|-----------|---------|--------|------------|');
|
|
494
|
-
for (const entry of spec.implementationHistory) {
|
|
495
|
-
const statusEmoji = entry.status === 'complete' ? '✅' : entry.status === 'in-progress' ? '⏳' : '📋';
|
|
496
|
-
const storiesText = entry.stories.join(', ');
|
|
497
|
-
const dateText = entry.date || '-';
|
|
498
|
-
lines.push(`| ${entry.increment} | ${storiesText} | ${statusEmoji} ${entry.status} | ${dateText} |`);
|
|
499
|
-
}
|
|
500
|
-
const totalStories = spec.userStories.length;
|
|
501
|
-
const completeStories = spec.userStories.filter(s => s.status === 'complete').length;
|
|
502
|
-
const percentage = totalStories > 0 ? Math.round((completeStories / totalStories) * 100) : 0;
|
|
503
|
-
lines.push('');
|
|
504
|
-
lines.push(`**Overall Progress**: ${completeStories}/${totalStories} user stories complete (${percentage}%)`);
|
|
505
|
-
lines.push('');
|
|
506
|
-
lines.push('---');
|
|
507
|
-
lines.push('');
|
|
508
|
-
}
|
|
509
|
-
// User Stories & Acceptance Criteria
|
|
510
|
-
lines.push('## User Stories & Acceptance Criteria');
|
|
511
|
-
lines.push('');
|
|
512
|
-
// Group by epic
|
|
513
|
-
const epicGroups = new Map();
|
|
514
|
-
for (const story of spec.userStories) {
|
|
515
|
-
const epicName = story.epic || 'General';
|
|
516
|
-
if (!epicGroups.has(epicName)) {
|
|
517
|
-
epicGroups.set(epicName, []);
|
|
518
|
-
}
|
|
519
|
-
epicGroups.get(epicName).push(story);
|
|
520
|
-
}
|
|
521
|
-
for (const [epicName, stories] of epicGroups) {
|
|
522
|
-
if (epicName !== 'General') {
|
|
523
|
-
lines.push(`### ${epicName}`);
|
|
524
|
-
lines.push('');
|
|
525
|
-
}
|
|
526
|
-
for (const story of stories) {
|
|
527
|
-
const statusEmoji = story.status === 'complete' ? '✅' : story.status === 'in-progress' ? '⏳' : '📋';
|
|
528
|
-
lines.push(`**${story.id}**: ${story.title} ${statusEmoji}`);
|
|
529
|
-
lines.push('');
|
|
530
|
-
if (story.acceptanceCriteria.length > 0) {
|
|
531
|
-
lines.push('**Acceptance Criteria**:');
|
|
532
|
-
for (const ac of story.acceptanceCriteria) {
|
|
533
|
-
const checkbox = ac.completed ? '[x]' : '[ ]';
|
|
534
|
-
const priorityText = ac.priority ? ` (${ac.priority})` : '';
|
|
535
|
-
lines.push(`- ${checkbox} **${ac.id}**: ${ac.description}${priorityText}`);
|
|
536
|
-
}
|
|
537
|
-
lines.push('');
|
|
538
|
-
}
|
|
539
|
-
if (story.implementedIn) {
|
|
540
|
-
lines.push(`**Implementation**: Increment ${story.implementedIn}`);
|
|
541
|
-
lines.push('');
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
lines.push('---');
|
|
546
|
-
lines.push('');
|
|
547
|
-
// Architecture & Design (LINKS ONLY)
|
|
548
|
-
lines.push('## Architecture & Design');
|
|
549
|
-
lines.push('');
|
|
550
|
-
if (spec.relatedDocs.architecture.length > 0) {
|
|
551
|
-
lines.push('**High-Level Design**:');
|
|
552
|
-
for (const link of spec.relatedDocs.architecture) {
|
|
553
|
-
const fileName = path.basename(link, '.md');
|
|
554
|
-
const title = fileName.replace(/^hld-/, '').replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
555
|
-
lines.push(`- [${title}](${link})`);
|
|
556
|
-
}
|
|
557
|
-
lines.push('');
|
|
558
|
-
}
|
|
559
|
-
if (spec.relatedDocs.adrs.length > 0) {
|
|
560
|
-
lines.push('**Architecture Decisions**:');
|
|
561
|
-
for (const link of spec.relatedDocs.adrs) {
|
|
562
|
-
const fileName = path.basename(link, '.md');
|
|
563
|
-
// Extract ADR title from filename (e.g., "0001-plugin-system" -> "ADR-001: Plugin System")
|
|
564
|
-
const numMatch = fileName.match(/^(\d+)/);
|
|
565
|
-
const num = numMatch ? numMatch[1] : '001';
|
|
566
|
-
const title = fileName.replace(/^\d+-/, '').replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
567
|
-
lines.push(`- [ADR-${num}: ${title}](${link})`);
|
|
568
|
-
}
|
|
569
|
-
lines.push('');
|
|
570
|
-
}
|
|
571
|
-
lines.push('---');
|
|
572
|
-
lines.push('');
|
|
573
|
-
// External Tool Links
|
|
574
|
-
if (spec.externalLinks.github || spec.externalLinks.jira || spec.externalLinks.ado) {
|
|
575
|
-
lines.push('## External Tool Links');
|
|
576
|
-
lines.push('');
|
|
577
|
-
if (spec.externalLinks.github) {
|
|
578
|
-
lines.push(`**GitHub**: [Project Board](${spec.externalLinks.github})`);
|
|
579
|
-
}
|
|
580
|
-
if (spec.externalLinks.jira) {
|
|
581
|
-
lines.push(`**Jira**: [Epic](${spec.externalLinks.jira})`);
|
|
582
|
-
}
|
|
583
|
-
if (spec.externalLinks.ado) {
|
|
584
|
-
lines.push(`**Azure DevOps**: [Feature](${spec.externalLinks.ado})`);
|
|
585
|
-
}
|
|
586
|
-
lines.push('');
|
|
587
|
-
lines.push('---');
|
|
588
|
-
lines.push('');
|
|
589
|
-
}
|
|
590
|
-
// Related Documentation (other folders)
|
|
591
|
-
if (spec.relatedDocs.strategy.length > 0 || spec.relatedDocs.operations.length > 0 || spec.relatedDocs.delivery.length > 0) {
|
|
592
|
-
lines.push('## Related Documentation');
|
|
593
|
-
lines.push('');
|
|
594
|
-
if (spec.relatedDocs.strategy.length > 0) {
|
|
595
|
-
lines.push('**Strategy**:');
|
|
596
|
-
for (const link of spec.relatedDocs.strategy) {
|
|
597
|
-
const fileName = path.basename(link, '.md');
|
|
598
|
-
const title = fileName.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
599
|
-
lines.push(`- [${title}](${link})`);
|
|
600
|
-
}
|
|
601
|
-
lines.push('');
|
|
602
|
-
}
|
|
603
|
-
if (spec.relatedDocs.operations.length > 0) {
|
|
604
|
-
lines.push('**Operations**:');
|
|
605
|
-
for (const link of spec.relatedDocs.operations) {
|
|
606
|
-
const fileName = path.basename(link, '.md');
|
|
607
|
-
const title = fileName.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
608
|
-
lines.push(`- [${title}](${link})`);
|
|
609
|
-
}
|
|
610
|
-
lines.push('');
|
|
611
|
-
}
|
|
612
|
-
if (spec.relatedDocs.delivery.length > 0) {
|
|
613
|
-
lines.push('**Delivery**:');
|
|
614
|
-
for (const link of spec.relatedDocs.delivery) {
|
|
615
|
-
const fileName = path.basename(link, '.md');
|
|
616
|
-
const title = fileName.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
617
|
-
lines.push(`- [${title}](${link})`);
|
|
618
|
-
}
|
|
619
|
-
lines.push('');
|
|
620
|
-
}
|
|
621
|
-
lines.push('---');
|
|
622
|
-
lines.push('');
|
|
623
|
-
}
|
|
624
|
-
// Footer
|
|
625
|
-
lines.push(`**Last Updated**: ${spec.lastUpdated || new Date().toISOString().split('T')[0]}`);
|
|
626
|
-
lines.push(`**Owner**: SpecWeave Core Team`);
|
|
627
|
-
lines.push('');
|
|
628
|
-
return lines.join('\n');
|
|
629
|
-
}
|