specweave 0.21.2 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +429 -10
- package/README.md +33 -3
- package/dist/plugins/specweave-github/lib/CodeValidator.d.ts +101 -0
- package/dist/plugins/specweave-github/lib/CodeValidator.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/CodeValidator.js +219 -0
- package/dist/plugins/specweave-github/lib/CodeValidator.js.map +1 -0
- 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/ThreeLayerSyncManager.d.ts +182 -0
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +603 -0
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +1 -0
- package/dist/plugins/specweave-github/lib/types.d.ts +34 -0
- package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -1
- 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/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +60 -5
- package/dist/src/cli/commands/init.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 +206 -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 +60 -0
- package/dist/src/core/living-docs/SpecDistributor.d.ts.map +1 -0
- package/dist/src/core/living-docs/SpecDistributor.js +228 -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/project-detector.d.ts.map +1 -1
- package/dist/src/core/living-docs/project-detector.js +38 -0
- package/dist/src/core/living-docs/project-detector.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/config.d.ts +23 -0
- package/dist/src/core/types/config.d.ts.map +1 -1
- package/dist/src/core/types/config.js +10 -0
- package/dist/src/core/types/config.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/ArchitecturePresenter.d.ts +47 -0
- package/dist/src/init/ArchitecturePresenter.d.ts.map +1 -0
- package/dist/src/init/ArchitecturePresenter.js +180 -0
- package/dist/src/init/ArchitecturePresenter.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 +238 -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/CostEstimator.d.ts +52 -0
- package/dist/src/init/architecture/CostEstimator.d.ts.map +1 -0
- package/dist/src/init/architecture/CostEstimator.js +107 -0
- package/dist/src/init/architecture/CostEstimator.js.map +1 -0
- package/dist/src/init/architecture/InfrastructureMapper.d.ts +41 -0
- package/dist/src/init/architecture/InfrastructureMapper.d.ts.map +1 -0
- package/dist/src/init/architecture/InfrastructureMapper.js +140 -0
- package/dist/src/init/architecture/InfrastructureMapper.js.map +1 -0
- package/dist/src/init/architecture/ProjectGenerator.d.ts +44 -0
- package/dist/src/init/architecture/ProjectGenerator.d.ts.map +1 -0
- package/dist/src/init/architecture/ProjectGenerator.js +216 -0
- package/dist/src/init/architecture/ProjectGenerator.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 +17 -10
- 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-ado/lib/enhanced-ado-sync.js +170 -0
- package/plugins/specweave-github/lib/CodeValidator.js +195 -0
- package/plugins/specweave-github/lib/CodeValidator.ts +284 -0
- package/plugins/specweave-github/lib/IssueStateManager.js +117 -0
- package/plugins/specweave-github/lib/IssueStateManager.ts +231 -0
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +545 -0
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +809 -0
- package/plugins/specweave-github/lib/types.ts +38 -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-release/hooks/.specweave/logs/dora-tracking.log +1200 -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/AGENTS.md.template +22 -1
- package/src/templates/tasks.md.template +51 -33
- 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/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
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Three File Structure Validator
|
|
3
|
+
*
|
|
4
|
+
* Validates that spec.md, plan.md, and tasks.md follow
|
|
5
|
+
* the canonical structure defined in ADR-0047.
|
|
6
|
+
*
|
|
7
|
+
* Part of increment 0039: Ultra-Smart Next Command
|
|
8
|
+
* Addresses architectural violation: ACs in tasks.md
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Validation severity levels
|
|
12
|
+
*/
|
|
13
|
+
export declare enum ValidationSeverity {
|
|
14
|
+
ERROR = "ERROR",// Breaks architecture, must fix
|
|
15
|
+
WARNING = "WARNING",// Suboptimal but acceptable
|
|
16
|
+
INFO = "INFO"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Validation error codes
|
|
20
|
+
*/
|
|
21
|
+
export declare enum ValidationErrorCode {
|
|
22
|
+
TASKS_CONTAINS_AC = "TASKS_CONTAINS_AC",
|
|
23
|
+
TASKS_MISSING_IMPLEMENTATION = "TASKS_MISSING_IMPLEMENTATION",
|
|
24
|
+
TASKS_MISSING_TEST_PLAN = "TASKS_MISSING_TEST_PLAN",
|
|
25
|
+
TASKS_MISSING_AC_IDS = "TASKS_MISSING_AC_IDS",
|
|
26
|
+
TASKS_CONTAINS_USER_STORY = "TASKS_CONTAINS_USER_STORY",
|
|
27
|
+
SPEC_CONTAINS_TASK_IDS = "SPEC_CONTAINS_TASK_IDS",
|
|
28
|
+
SPEC_CONTAINS_TECHNICAL_DETAILS = "SPEC_CONTAINS_TECHNICAL_DETAILS",
|
|
29
|
+
SPEC_MISSING_AC = "SPEC_MISSING_AC",
|
|
30
|
+
PLAN_CONTAINS_AC = "PLAN_CONTAINS_AC",
|
|
31
|
+
PLAN_CONTAINS_TASK_CHECKBOXES = "PLAN_CONTAINS_TASK_CHECKBOXES",
|
|
32
|
+
FILE_NOT_FOUND = "FILE_NOT_FOUND"
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Validation issue
|
|
36
|
+
*/
|
|
37
|
+
export interface ValidationIssue {
|
|
38
|
+
code: ValidationErrorCode;
|
|
39
|
+
severity: ValidationSeverity;
|
|
40
|
+
file: 'spec.md' | 'plan.md' | 'tasks.md';
|
|
41
|
+
line?: number;
|
|
42
|
+
message: string;
|
|
43
|
+
fix?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Validation result
|
|
47
|
+
*/
|
|
48
|
+
export interface ThreeFileValidationResult {
|
|
49
|
+
valid: boolean;
|
|
50
|
+
issues: ValidationIssue[];
|
|
51
|
+
summary: {
|
|
52
|
+
errors: number;
|
|
53
|
+
warnings: number;
|
|
54
|
+
infos: number;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Three File Structure Validator
|
|
59
|
+
*/
|
|
60
|
+
export declare class ThreeFileValidator {
|
|
61
|
+
/**
|
|
62
|
+
* Validate an increment's three core files
|
|
63
|
+
*/
|
|
64
|
+
validateIncrement(incrementDir: string): ThreeFileValidationResult;
|
|
65
|
+
/**
|
|
66
|
+
* Validate spec.md structure
|
|
67
|
+
*/
|
|
68
|
+
private validateSpecFile;
|
|
69
|
+
/**
|
|
70
|
+
* Validate plan.md structure
|
|
71
|
+
*/
|
|
72
|
+
private validatePlanFile;
|
|
73
|
+
/**
|
|
74
|
+
* Validate tasks.md structure (MOST IMPORTANT)
|
|
75
|
+
*/
|
|
76
|
+
private validateTasksFile;
|
|
77
|
+
/**
|
|
78
|
+
* Generate a formatted report of validation issues
|
|
79
|
+
*/
|
|
80
|
+
formatValidationReport(result: ThreeFileValidationResult): string;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=three-file-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three-file-validator.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/three-file-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;GAEG;AACH,oBAAY,kBAAkB;IAC5B,KAAK,UAAU,CAAI,gCAAgC;IACnD,OAAO,YAAY,CAAE,4BAA4B;IACjD,IAAI,SAAS;CACd;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAE7B,iBAAiB,sBAAsB;IACvC,4BAA4B,iCAAiC;IAC7D,uBAAuB,4BAA4B;IACnD,oBAAoB,yBAAyB;IAC7C,yBAAyB,8BAA8B;IAGvD,sBAAsB,2BAA2B;IACjD,+BAA+B,oCAAoC;IACnE,eAAe,oBAAoB;IAGnC,gBAAgB,qBAAqB;IACrC,6BAA6B,kCAAkC;IAG/D,cAAc,mBAAmB;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;GAEG;AACH,qBAAa,kBAAkB;IAC7B;;OAEG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,yBAAyB;IAoBlE;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAwExB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAgDxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoGzB;;OAEG;IACH,sBAAsB,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM;CA4DlE"}
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Three File Structure Validator
|
|
3
|
+
*
|
|
4
|
+
* Validates that spec.md, plan.md, and tasks.md follow
|
|
5
|
+
* the canonical structure defined in ADR-0047.
|
|
6
|
+
*
|
|
7
|
+
* Part of increment 0039: Ultra-Smart Next Command
|
|
8
|
+
* Addresses architectural violation: ACs in tasks.md
|
|
9
|
+
*/
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
/**
|
|
13
|
+
* Validation severity levels
|
|
14
|
+
*/
|
|
15
|
+
export var ValidationSeverity;
|
|
16
|
+
(function (ValidationSeverity) {
|
|
17
|
+
ValidationSeverity["ERROR"] = "ERROR";
|
|
18
|
+
ValidationSeverity["WARNING"] = "WARNING";
|
|
19
|
+
ValidationSeverity["INFO"] = "INFO"; // Suggestion for improvement
|
|
20
|
+
})(ValidationSeverity || (ValidationSeverity = {}));
|
|
21
|
+
/**
|
|
22
|
+
* Validation error codes
|
|
23
|
+
*/
|
|
24
|
+
export var ValidationErrorCode;
|
|
25
|
+
(function (ValidationErrorCode) {
|
|
26
|
+
// tasks.md violations
|
|
27
|
+
ValidationErrorCode["TASKS_CONTAINS_AC"] = "TASKS_CONTAINS_AC";
|
|
28
|
+
ValidationErrorCode["TASKS_MISSING_IMPLEMENTATION"] = "TASKS_MISSING_IMPLEMENTATION";
|
|
29
|
+
ValidationErrorCode["TASKS_MISSING_TEST_PLAN"] = "TASKS_MISSING_TEST_PLAN";
|
|
30
|
+
ValidationErrorCode["TASKS_MISSING_AC_IDS"] = "TASKS_MISSING_AC_IDS";
|
|
31
|
+
ValidationErrorCode["TASKS_CONTAINS_USER_STORY"] = "TASKS_CONTAINS_USER_STORY";
|
|
32
|
+
// spec.md violations
|
|
33
|
+
ValidationErrorCode["SPEC_CONTAINS_TASK_IDS"] = "SPEC_CONTAINS_TASK_IDS";
|
|
34
|
+
ValidationErrorCode["SPEC_CONTAINS_TECHNICAL_DETAILS"] = "SPEC_CONTAINS_TECHNICAL_DETAILS";
|
|
35
|
+
ValidationErrorCode["SPEC_MISSING_AC"] = "SPEC_MISSING_AC";
|
|
36
|
+
// plan.md violations
|
|
37
|
+
ValidationErrorCode["PLAN_CONTAINS_AC"] = "PLAN_CONTAINS_AC";
|
|
38
|
+
ValidationErrorCode["PLAN_CONTAINS_TASK_CHECKBOXES"] = "PLAN_CONTAINS_TASK_CHECKBOXES";
|
|
39
|
+
// General violations
|
|
40
|
+
ValidationErrorCode["FILE_NOT_FOUND"] = "FILE_NOT_FOUND";
|
|
41
|
+
})(ValidationErrorCode || (ValidationErrorCode = {}));
|
|
42
|
+
/**
|
|
43
|
+
* Three File Structure Validator
|
|
44
|
+
*/
|
|
45
|
+
export class ThreeFileValidator {
|
|
46
|
+
/**
|
|
47
|
+
* Validate an increment's three core files
|
|
48
|
+
*/
|
|
49
|
+
validateIncrement(incrementDir) {
|
|
50
|
+
const issues = [];
|
|
51
|
+
// Validate each file
|
|
52
|
+
issues.push(...this.validateSpecFile(incrementDir));
|
|
53
|
+
issues.push(...this.validatePlanFile(incrementDir));
|
|
54
|
+
issues.push(...this.validateTasksFile(incrementDir));
|
|
55
|
+
// Calculate summary
|
|
56
|
+
const errors = issues.filter(i => i.severity === ValidationSeverity.ERROR).length;
|
|
57
|
+
const warnings = issues.filter(i => i.severity === ValidationSeverity.WARNING).length;
|
|
58
|
+
const infos = issues.filter(i => i.severity === ValidationSeverity.INFO).length;
|
|
59
|
+
return {
|
|
60
|
+
valid: errors === 0,
|
|
61
|
+
issues,
|
|
62
|
+
summary: { errors, warnings, infos }
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Validate spec.md structure
|
|
67
|
+
*/
|
|
68
|
+
validateSpecFile(incrementDir) {
|
|
69
|
+
const issues = [];
|
|
70
|
+
const specPath = path.join(incrementDir, 'spec.md');
|
|
71
|
+
if (!fs.existsSync(specPath)) {
|
|
72
|
+
issues.push({
|
|
73
|
+
code: ValidationErrorCode.FILE_NOT_FOUND,
|
|
74
|
+
severity: ValidationSeverity.ERROR,
|
|
75
|
+
file: 'spec.md',
|
|
76
|
+
message: 'spec.md not found in increment directory',
|
|
77
|
+
fix: 'Create spec.md with business requirements and acceptance criteria'
|
|
78
|
+
});
|
|
79
|
+
return issues;
|
|
80
|
+
}
|
|
81
|
+
const content = fs.readFileSync(specPath, 'utf-8');
|
|
82
|
+
const lines = content.split('\n');
|
|
83
|
+
// Rule 1: spec.md should NOT contain task IDs (T-001, T-002, etc.)
|
|
84
|
+
lines.forEach((line, index) => {
|
|
85
|
+
if (/T-\d{3}/.test(line)) {
|
|
86
|
+
issues.push({
|
|
87
|
+
code: ValidationErrorCode.SPEC_CONTAINS_TASK_IDS,
|
|
88
|
+
severity: ValidationSeverity.ERROR,
|
|
89
|
+
file: 'spec.md',
|
|
90
|
+
line: index + 1,
|
|
91
|
+
message: `spec.md contains task ID (${line.match(/T-\d{3}/)?.[0]}). Task IDs belong in tasks.md only.`,
|
|
92
|
+
fix: 'Remove task references from spec.md. Link tasks to ACs instead.'
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
// Rule 2: spec.md should NOT contain technical class names
|
|
97
|
+
const technicalPatterns = [
|
|
98
|
+
/class\s+\w+/,
|
|
99
|
+
/interface\s+\w+/,
|
|
100
|
+
/function\s+\w+\(/,
|
|
101
|
+
/\.ts\b/,
|
|
102
|
+
/\.tsx\b/,
|
|
103
|
+
/\.js\b/
|
|
104
|
+
];
|
|
105
|
+
lines.forEach((line, index) => {
|
|
106
|
+
for (const pattern of technicalPatterns) {
|
|
107
|
+
if (pattern.test(line) && !line.includes('```')) { // Ignore code blocks
|
|
108
|
+
issues.push({
|
|
109
|
+
code: ValidationErrorCode.SPEC_CONTAINS_TECHNICAL_DETAILS,
|
|
110
|
+
severity: ValidationSeverity.WARNING,
|
|
111
|
+
file: 'spec.md',
|
|
112
|
+
line: index + 1,
|
|
113
|
+
message: 'spec.md contains technical implementation details. Keep business-focused.',
|
|
114
|
+
fix: 'Move technical details to plan.md'
|
|
115
|
+
});
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
// Rule 3: spec.md should contain Acceptance Criteria section
|
|
121
|
+
if (!content.includes('## Acceptance Criteria') && !content.includes('### Acceptance Criteria')) {
|
|
122
|
+
issues.push({
|
|
123
|
+
code: ValidationErrorCode.SPEC_MISSING_AC,
|
|
124
|
+
severity: ValidationSeverity.WARNING,
|
|
125
|
+
file: 'spec.md',
|
|
126
|
+
message: 'spec.md missing "Acceptance Criteria" section',
|
|
127
|
+
fix: 'Add "## Acceptance Criteria" section with AC-XXX-YY criteria'
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return issues;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Validate plan.md structure
|
|
134
|
+
*/
|
|
135
|
+
validatePlanFile(incrementDir) {
|
|
136
|
+
const issues = [];
|
|
137
|
+
const planPath = path.join(incrementDir, 'plan.md');
|
|
138
|
+
if (!fs.existsSync(planPath)) {
|
|
139
|
+
// plan.md is optional for simple increments
|
|
140
|
+
return issues;
|
|
141
|
+
}
|
|
142
|
+
const content = fs.readFileSync(planPath, 'utf-8');
|
|
143
|
+
const lines = content.split('\n');
|
|
144
|
+
// Rule 1: plan.md should NOT contain "Acceptance Criteria" sections
|
|
145
|
+
if (content.includes('## Acceptance Criteria') || content.includes('### Acceptance Criteria') || content.includes('**Acceptance Criteria**')) {
|
|
146
|
+
const lineIndex = lines.findIndex(l => l.includes('## Acceptance Criteria') ||
|
|
147
|
+
l.includes('### Acceptance Criteria') ||
|
|
148
|
+
l.includes('**Acceptance Criteria**'));
|
|
149
|
+
issues.push({
|
|
150
|
+
code: ValidationErrorCode.PLAN_CONTAINS_AC,
|
|
151
|
+
severity: ValidationSeverity.ERROR,
|
|
152
|
+
file: 'plan.md',
|
|
153
|
+
line: lineIndex + 1,
|
|
154
|
+
message: 'plan.md contains "Acceptance Criteria" section. ACs belong in spec.md only.',
|
|
155
|
+
fix: 'Remove ACs from plan.md. Define them in spec.md instead.'
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// Rule 2: plan.md should NOT contain task checkboxes
|
|
159
|
+
const taskCheckboxPattern = /^- \[ \]/;
|
|
160
|
+
lines.forEach((line, index) => {
|
|
161
|
+
if (taskCheckboxPattern.test(line.trim())) {
|
|
162
|
+
issues.push({
|
|
163
|
+
code: ValidationErrorCode.PLAN_CONTAINS_TASK_CHECKBOXES,
|
|
164
|
+
severity: ValidationSeverity.WARNING,
|
|
165
|
+
file: 'plan.md',
|
|
166
|
+
line: index + 1,
|
|
167
|
+
message: 'plan.md contains task checkboxes. Checkable tasks belong in tasks.md.',
|
|
168
|
+
fix: 'Move task checkboxes to tasks.md. Keep plan.md at architecture level.'
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
return issues;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Validate tasks.md structure (MOST IMPORTANT)
|
|
176
|
+
*/
|
|
177
|
+
validateTasksFile(incrementDir) {
|
|
178
|
+
const issues = [];
|
|
179
|
+
const tasksPath = path.join(incrementDir, 'tasks.md');
|
|
180
|
+
if (!fs.existsSync(tasksPath)) {
|
|
181
|
+
// tasks.md is required for all increments
|
|
182
|
+
issues.push({
|
|
183
|
+
code: ValidationErrorCode.FILE_NOT_FOUND,
|
|
184
|
+
severity: ValidationSeverity.ERROR,
|
|
185
|
+
file: 'tasks.md',
|
|
186
|
+
message: 'tasks.md not found in increment directory',
|
|
187
|
+
fix: 'Create tasks.md with task breakdown and embedded tests'
|
|
188
|
+
});
|
|
189
|
+
return issues;
|
|
190
|
+
}
|
|
191
|
+
const content = fs.readFileSync(tasksPath, 'utf-8');
|
|
192
|
+
const lines = content.split('\n');
|
|
193
|
+
// Rule 1: tasks.md should NOT contain "Acceptance Criteria" sections
|
|
194
|
+
// This is the CRITICAL violation we're fixing!
|
|
195
|
+
if (content.includes('**Acceptance Criteria**:')) {
|
|
196
|
+
const lineIndex = lines.findIndex(l => l.includes('**Acceptance Criteria**:'));
|
|
197
|
+
issues.push({
|
|
198
|
+
code: ValidationErrorCode.TASKS_CONTAINS_AC,
|
|
199
|
+
severity: ValidationSeverity.ERROR,
|
|
200
|
+
file: 'tasks.md',
|
|
201
|
+
line: lineIndex + 1,
|
|
202
|
+
message: '🚨 CRITICAL: tasks.md contains "**Acceptance Criteria**:" section. ACs belong in spec.md ONLY!',
|
|
203
|
+
fix: 'Replace "**Acceptance Criteria**:" with "**Implementation**:" and add AC-ID references: "**AC-IDs**: AC-US7-01"'
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
// Rule 2: Each task should have "Implementation" section
|
|
207
|
+
const taskHeaders = lines
|
|
208
|
+
.map((line, index) => ({ line, index }))
|
|
209
|
+
.filter(({ line }) => /^###\s+T-\d{3}/.test(line));
|
|
210
|
+
taskHeaders.forEach(({ line: taskLine, index: taskIndex }) => {
|
|
211
|
+
// Find next task or end of file
|
|
212
|
+
const nextTaskIndex = taskHeaders.find(h => h.index > taskIndex)?.index ?? lines.length;
|
|
213
|
+
// Extract task content
|
|
214
|
+
const taskContent = lines.slice(taskIndex, nextTaskIndex).join('\n');
|
|
215
|
+
// Check for Implementation section
|
|
216
|
+
if (!taskContent.includes('**Implementation**:')) {
|
|
217
|
+
issues.push({
|
|
218
|
+
code: ValidationErrorCode.TASKS_MISSING_IMPLEMENTATION,
|
|
219
|
+
severity: ValidationSeverity.WARNING,
|
|
220
|
+
file: 'tasks.md',
|
|
221
|
+
line: taskIndex + 1,
|
|
222
|
+
message: `Task ${taskLine.match(/T-\d{3}/)?.[0]} missing "**Implementation**:" section`,
|
|
223
|
+
fix: 'Add "**Implementation**:" section with checkable technical steps'
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
// Check for Test Plan
|
|
227
|
+
if (!taskContent.includes('**Test Plan**') && !taskContent.includes('**Tests**')) {
|
|
228
|
+
issues.push({
|
|
229
|
+
code: ValidationErrorCode.TASKS_MISSING_TEST_PLAN,
|
|
230
|
+
severity: ValidationSeverity.WARNING,
|
|
231
|
+
file: 'tasks.md',
|
|
232
|
+
line: taskIndex + 1,
|
|
233
|
+
message: `Task ${taskLine.match(/T-\d{3}/)?.[0]} missing embedded test plan (BDD format)`,
|
|
234
|
+
fix: 'Add "**Test Plan** (BDD):" with Given-When-Then scenarios'
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
// Check for AC-IDs references
|
|
238
|
+
if (!taskContent.includes('**AC-IDs**:') && !taskContent.includes('**AC**:')) {
|
|
239
|
+
issues.push({
|
|
240
|
+
code: ValidationErrorCode.TASKS_MISSING_AC_IDS,
|
|
241
|
+
severity: ValidationSeverity.INFO,
|
|
242
|
+
file: 'tasks.md',
|
|
243
|
+
line: taskIndex + 1,
|
|
244
|
+
message: `Task ${taskLine.match(/T-\d{3}/)?.[0]} should reference which ACs it satisfies`,
|
|
245
|
+
fix: 'Add "**AC-IDs**: AC-US7-01, AC-US7-02" to link task to business requirements'
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
// Rule 3: tasks.md should NOT contain "As a user" language
|
|
250
|
+
lines.forEach((line, index) => {
|
|
251
|
+
if (line.includes('As a ') && line.includes(' I want ')) {
|
|
252
|
+
issues.push({
|
|
253
|
+
code: ValidationErrorCode.TASKS_CONTAINS_USER_STORY,
|
|
254
|
+
severity: ValidationSeverity.WARNING,
|
|
255
|
+
file: 'tasks.md',
|
|
256
|
+
line: index + 1,
|
|
257
|
+
message: 'tasks.md contains user story language ("As a user..."). User stories belong in spec.md.',
|
|
258
|
+
fix: 'Move user story to spec.md. Keep tasks.md technical.'
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
return issues;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Generate a formatted report of validation issues
|
|
266
|
+
*/
|
|
267
|
+
formatValidationReport(result) {
|
|
268
|
+
if (result.valid && result.issues.length === 0) {
|
|
269
|
+
return '✅ All files pass validation! Perfect structure.';
|
|
270
|
+
}
|
|
271
|
+
const lines = [];
|
|
272
|
+
lines.push('# Three File Structure Validation Report\n');
|
|
273
|
+
lines.push(`**Status**: ${result.valid ? '✅ PASS' : '❌ FAIL'}`);
|
|
274
|
+
lines.push(`**Errors**: ${result.summary.errors}`);
|
|
275
|
+
lines.push(`**Warnings**: ${result.summary.warnings}`);
|
|
276
|
+
lines.push(`**Infos**: ${result.summary.infos}\n`);
|
|
277
|
+
if (result.issues.length > 0) {
|
|
278
|
+
lines.push('## Issues Found\n');
|
|
279
|
+
// Group by severity
|
|
280
|
+
const errors = result.issues.filter(i => i.severity === ValidationSeverity.ERROR);
|
|
281
|
+
const warnings = result.issues.filter(i => i.severity === ValidationSeverity.WARNING);
|
|
282
|
+
const infos = result.issues.filter(i => i.severity === ValidationSeverity.INFO);
|
|
283
|
+
if (errors.length > 0) {
|
|
284
|
+
lines.push('### ❌ Errors (Must Fix)\n');
|
|
285
|
+
errors.forEach(issue => {
|
|
286
|
+
lines.push(`**${issue.file}:${issue.line ?? '?'}** - ${issue.code}`);
|
|
287
|
+
lines.push(`- **Message**: ${issue.message}`);
|
|
288
|
+
if (issue.fix) {
|
|
289
|
+
lines.push(`- **Fix**: ${issue.fix}`);
|
|
290
|
+
}
|
|
291
|
+
lines.push('');
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
if (warnings.length > 0) {
|
|
295
|
+
lines.push('### ⚠️ Warnings (Should Fix)\n');
|
|
296
|
+
warnings.forEach(issue => {
|
|
297
|
+
lines.push(`**${issue.file}:${issue.line ?? '?'}** - ${issue.code}`);
|
|
298
|
+
lines.push(`- **Message**: ${issue.message}`);
|
|
299
|
+
if (issue.fix) {
|
|
300
|
+
lines.push(`- **Fix**: ${issue.fix}`);
|
|
301
|
+
}
|
|
302
|
+
lines.push('');
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
if (infos.length > 0) {
|
|
306
|
+
lines.push('### ℹ️ Info (Nice to Have)\n');
|
|
307
|
+
infos.forEach(issue => {
|
|
308
|
+
lines.push(`**${issue.file}:${issue.line ?? '?'}** - ${issue.code}`);
|
|
309
|
+
lines.push(`- **Message**: ${issue.message}`);
|
|
310
|
+
if (issue.fix) {
|
|
311
|
+
lines.push(`- **Fix**: ${issue.fix}`);
|
|
312
|
+
}
|
|
313
|
+
lines.push('');
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return lines.join('\n');
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
//# sourceMappingURL=three-file-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three-file-validator.js","sourceRoot":"","sources":["../../../../src/core/validation/three-file-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,mCAAa,CAAA,CAAM,6BAA6B;AAClD,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,mBAmBX;AAnBD,WAAY,mBAAmB;IAC7B,sBAAsB;IACtB,8DAAuC,CAAA;IACvC,oFAA6D,CAAA;IAC7D,0EAAmD,CAAA;IACnD,oEAA6C,CAAA;IAC7C,8EAAuD,CAAA;IAEvD,qBAAqB;IACrB,wEAAiD,CAAA;IACjD,0FAAmE,CAAA;IACnE,0DAAmC,CAAA;IAEnC,qBAAqB;IACrB,4DAAqC,CAAA;IACrC,sFAA+D,CAAA;IAE/D,qBAAqB;IACrB,wDAAiC,CAAA;AACnC,CAAC,EAnBW,mBAAmB,KAAnB,mBAAmB,QAmB9B;AA2BD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACH,iBAAiB,CAAC,YAAoB;QACpC,MAAM,MAAM,GAAsB,EAAE,CAAC;QAErC,qBAAqB;QACrB,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;QAErD,oBAAoB;QACpB,MAAM,MAAM,GAAG,MA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determine
|
|
5
|
+
* the current phase of the SpecWeave development workflow.
|
|
6
|
+
*
|
|
7
|
+
* Detection Algorithm:
|
|
8
|
+
* - Keyword Analysis (40% weight): Match keywords in user prompt
|
|
9
|
+
* - Command Analysis (30% weight): Analyze recent command history
|
|
10
|
+
* - Context Analysis (20% weight): Check file states and increment status
|
|
11
|
+
* - Hint Analysis (10% weight): Detect explicit user hints
|
|
12
|
+
*
|
|
13
|
+
* Part of increment 0039: Ultra-Smart Next Command (US-001)
|
|
14
|
+
*/
|
|
15
|
+
import { PhaseDetectionResult, DetectionContext, PhaseDetectorConfig } from './types.js';
|
|
16
|
+
/**
|
|
17
|
+
* PhaseDetector - Detect current workflow phase
|
|
18
|
+
*/
|
|
19
|
+
export declare class PhaseDetector {
|
|
20
|
+
private config;
|
|
21
|
+
private fileStateCache;
|
|
22
|
+
private readonly DEFAULT_CACHE_TTL;
|
|
23
|
+
private detectionCount;
|
|
24
|
+
private cacheHits;
|
|
25
|
+
private cacheMisses;
|
|
26
|
+
private totalDetectionTime;
|
|
27
|
+
constructor(config?: PhaseDetectorConfig);
|
|
28
|
+
/**
|
|
29
|
+
* Get performance statistics
|
|
30
|
+
*/
|
|
31
|
+
getPerformanceStats(): {
|
|
32
|
+
detectionCount: number;
|
|
33
|
+
cacheHits: number;
|
|
34
|
+
cacheMisses: number;
|
|
35
|
+
cacheHitRate: number;
|
|
36
|
+
averageDetectionTime: number;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Reset performance statistics
|
|
40
|
+
*/
|
|
41
|
+
resetPerformanceStats(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Clear the file state cache
|
|
44
|
+
*/
|
|
45
|
+
clearCache(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Get cached file states if available and not expired
|
|
48
|
+
*/
|
|
49
|
+
private getCachedFileStates;
|
|
50
|
+
/**
|
|
51
|
+
* Cache file states for future use
|
|
52
|
+
*/
|
|
53
|
+
private cacheFileStates;
|
|
54
|
+
/**
|
|
55
|
+
* Detect the current workflow phase from context
|
|
56
|
+
*/
|
|
57
|
+
detect(context: DetectionContext): Promise<PhaseDetectionResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Analyze keywords in user prompt
|
|
60
|
+
*/
|
|
61
|
+
private analyzeKeywords;
|
|
62
|
+
/**
|
|
63
|
+
* Analyze recent command history
|
|
64
|
+
*/
|
|
65
|
+
private analyzeCommands;
|
|
66
|
+
/**
|
|
67
|
+
* Analyze explicit user hint
|
|
68
|
+
*/
|
|
69
|
+
private analyzeHint;
|
|
70
|
+
/**
|
|
71
|
+
* Analyze context (file states and increment status)
|
|
72
|
+
*/
|
|
73
|
+
private analyzeContext;
|
|
74
|
+
/**
|
|
75
|
+
* Get file states for key increment files (with caching)
|
|
76
|
+
*/
|
|
77
|
+
private getFileStates;
|
|
78
|
+
/**
|
|
79
|
+
* Analyze file states to determine likely phase
|
|
80
|
+
*/
|
|
81
|
+
private analyzeFileStates;
|
|
82
|
+
/**
|
|
83
|
+
* Analyze increment status to determine likely phase
|
|
84
|
+
*/
|
|
85
|
+
private analyzeIncrementStatus;
|
|
86
|
+
/**
|
|
87
|
+
* Calculate aggregated phase scores from evidence
|
|
88
|
+
*/
|
|
89
|
+
private calculatePhaseScores;
|
|
90
|
+
/**
|
|
91
|
+
* Group evidence by the phase it suggests
|
|
92
|
+
*/
|
|
93
|
+
private groupEvidenceByPhase;
|
|
94
|
+
/**
|
|
95
|
+
* Infer workflow phase from evidence source
|
|
96
|
+
*/
|
|
97
|
+
private inferPhaseFromSource;
|
|
98
|
+
/**
|
|
99
|
+
* Generate command suggestion based on detected phase
|
|
100
|
+
*/
|
|
101
|
+
private generateSuggestion;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=phase-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase-detector.d.ts","sourceRoot":"","sources":["../../../../src/core/workflow/phase-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;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