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
|
@@ -1,88 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import * as path from "path";
|
|
2
|
+
import { ACStatusManager } from "../../../../dist/src/core/increment/ac-status-manager.js";
|
|
4
3
|
async function updateACStatus(incrementId) {
|
|
5
4
|
try {
|
|
6
5
|
const projectRoot = process.cwd();
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
await fs.access(incrementPath);
|
|
10
|
-
} catch {
|
|
11
|
-
console.error(`\u274C Increment ${incrementId} not found at ${incrementPath}`);
|
|
6
|
+
if (process.env.SKIP_AC_SYNC === "true") {
|
|
7
|
+
console.log("\u2139\uFE0F AC sync skipped (SKIP_AC_SYNC=true)");
|
|
12
8
|
return;
|
|
13
9
|
}
|
|
14
|
-
console.log(`\u{1F504}
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
console.log(`\u2713 Found ${completedACs.size} completed AC-IDs from tasks.md`);
|
|
21
|
-
const updatedCount = await updateSpecACCheckboxes(incrementPath, completedACs);
|
|
22
|
-
if (updatedCount > 0) {
|
|
23
|
-
console.log(`\u2705 Updated ${updatedCount} AC checkbox(es) in spec.md`);
|
|
24
|
-
} else {
|
|
25
|
-
console.log(`\u2139\uFE0F No AC checkboxes needed updating in spec.md`);
|
|
26
|
-
}
|
|
27
|
-
} catch (error) {
|
|
28
|
-
console.error("\u274C Error updating AC status:", error);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
async function extractCompletedACsFromTasks(incrementPath) {
|
|
32
|
-
const tasksPath = path.join(incrementPath, "tasks.md");
|
|
33
|
-
const completedACs = /* @__PURE__ */ new Set();
|
|
34
|
-
try {
|
|
35
|
-
const tasksContent = await fs.readFile(tasksPath, "utf-8");
|
|
36
|
-
const taskSections = tasksContent.split(/^(###+)\s+T-\d+:/gm);
|
|
37
|
-
for (let i = 1; i < taskSections.length; i += 2) {
|
|
38
|
-
const taskContent = taskSections[i + 1];
|
|
39
|
-
const statusMatch = taskContent.match(/\*\*Status\*\*:\s*\[x\]/i);
|
|
40
|
-
if (!statusMatch) continue;
|
|
41
|
-
const acMatch = taskContent.match(/\*\*AC\*\*:\s*([^\n]+)/);
|
|
42
|
-
if (!acMatch) continue;
|
|
43
|
-
const acField = acMatch[1];
|
|
44
|
-
const acIds = acField.split(",").map((id) => id.trim()).filter((id) => /^AC-[A-Z0-9]+-\d+$/.test(id));
|
|
45
|
-
acIds.forEach((acId) => completedACs.add(acId));
|
|
10
|
+
console.log(`\u{1F504} Syncing AC status for increment ${incrementId}...`);
|
|
11
|
+
const manager = new ACStatusManager(projectRoot);
|
|
12
|
+
const result = await manager.syncACStatus(incrementId);
|
|
13
|
+
if (result.warnings && result.warnings.length > 0) {
|
|
14
|
+
console.log("\n\u26A0\uFE0F Warnings:");
|
|
15
|
+
result.warnings.forEach((warning) => console.log(` ${warning}`));
|
|
46
16
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
console.log(`\u2139\uFE0F tasks.md not found, skipping AC update`);
|
|
51
|
-
} else {
|
|
52
|
-
console.error("Error reading tasks.md:", error);
|
|
17
|
+
if (result.conflicts && result.conflicts.length > 0) {
|
|
18
|
+
console.log("\n\u26A0\uFE0F Conflicts detected:");
|
|
19
|
+
result.conflicts.forEach((conflict) => console.log(` ${conflict}`));
|
|
53
20
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
let specContent = await fs.readFile(specPath, "utf-8");
|
|
61
|
-
let updatedCount = 0;
|
|
62
|
-
const acPattern = /^(\s*)-\s+\[([ x])\]\s+\*\*([A-Z]+-[A-Z0-9]+-\d+)\*\*:(.*)$/gm;
|
|
63
|
-
specContent = specContent.replace(acPattern, (match, indent, currentState, acId, description) => {
|
|
64
|
-
const shouldBeChecked = completedACs.has(acId);
|
|
65
|
-
const isCurrentlyChecked = currentState === "x";
|
|
66
|
-
if (shouldBeChecked && !isCurrentlyChecked) {
|
|
67
|
-
updatedCount++;
|
|
68
|
-
return `${indent}- [x] **${acId}**:${description}`;
|
|
69
|
-
} else if (!shouldBeChecked && isCurrentlyChecked) {
|
|
70
|
-
updatedCount++;
|
|
71
|
-
return `${indent}- [ ] **${acId}**:${description}`;
|
|
21
|
+
if (result.updated && result.updated.length > 0) {
|
|
22
|
+
console.log("\n\u2705 Updated AC checkboxes:");
|
|
23
|
+
result.updated.forEach((acId) => console.log(` ${acId} \u2192 [x]`));
|
|
24
|
+
if (result.changes && result.changes.length > 0) {
|
|
25
|
+
console.log("\n\u{1F4DD} Changes:");
|
|
26
|
+
result.changes.forEach((change) => console.log(` ${change}`));
|
|
72
27
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (updatedCount > 0) {
|
|
76
|
-
await fs.writeFile(specPath, specContent, "utf-8");
|
|
77
|
-
}
|
|
78
|
-
return updatedCount;
|
|
79
|
-
} catch (error) {
|
|
80
|
-
if (error.code === "ENOENT") {
|
|
81
|
-
console.log(`\u2139\uFE0F spec.md not found, skipping AC update`);
|
|
28
|
+
} else if (result.synced) {
|
|
29
|
+
console.log("\u2705 All ACs already in sync (no changes needed)");
|
|
82
30
|
} else {
|
|
83
|
-
console.
|
|
31
|
+
console.log("\u2139\uFE0F No AC updates needed");
|
|
84
32
|
}
|
|
85
|
-
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error("\u274C Error updating AC status:", error);
|
|
86
35
|
}
|
|
87
36
|
}
|
|
88
37
|
const isMainModule = import.meta.url === `file://${process.argv[1]}`;
|
|
@@ -90,7 +39,7 @@ if (isMainModule) {
|
|
|
90
39
|
const incrementId = process.argv[2];
|
|
91
40
|
if (!incrementId) {
|
|
92
41
|
console.error("Usage: node update-ac-status.js <increment-id>");
|
|
93
|
-
console.error("Example: node update-ac-status.js
|
|
42
|
+
console.error("Example: node update-ac-status.js 0039-ultra-smart-next-command");
|
|
94
43
|
process.exit(1);
|
|
95
44
|
}
|
|
96
45
|
updateACStatus(incrementId).then(() => {
|
|
@@ -1,171 +1,82 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* AC Status Update Hook
|
|
4
|
+
* AC Status Update Hook (ACStatusManager Integration)
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Uses ACStatusManager for sophisticated AC status synchronization:
|
|
7
|
+
* - Tracks completion percentage per AC (only updates at 100%)
|
|
8
|
+
* - Detects conflicts (AC checked but tasks incomplete)
|
|
9
|
+
* - Warns about orphaned ACs (no implementing tasks)
|
|
10
|
+
* - Provides detailed sync result with diff
|
|
11
|
+
* - Atomic file writes to prevent corruption
|
|
7
12
|
*
|
|
8
13
|
* Flow:
|
|
9
|
-
* 1.
|
|
10
|
-
* 2.
|
|
11
|
-
* 3.
|
|
12
|
-
* 4.
|
|
13
|
-
* 5.
|
|
14
|
+
* 1. Parse tasks.md → Map AC-IDs to completion status
|
|
15
|
+
* 2. Parse spec.md → Extract current AC definitions
|
|
16
|
+
* 3. Compare task completion vs spec checkboxes
|
|
17
|
+
* 4. Update spec.md only for 100% complete ACs
|
|
18
|
+
* 5. Log conflicts, warnings, and changes
|
|
14
19
|
*
|
|
15
20
|
* Called by: plugins/specweave/hooks/post-task-completion.sh
|
|
16
21
|
*
|
|
17
22
|
* Example:
|
|
18
|
-
* -
|
|
19
|
-
* - spec.md: - [ ]
|
|
23
|
+
* - Tasks: T-001 [x], T-002 [x] (both have AC-US1-01) → AC-US1-01 100% complete
|
|
24
|
+
* - spec.md: - [ ] AC-US1-01 → - [x] AC-US1-01 ✅
|
|
25
|
+
* - Tasks: T-003 [x], T-004 [ ] (both have AC-US1-02) → AC-US1-02 50% complete
|
|
26
|
+
* - spec.md: - [ ] AC-US1-02 → NO CHANGE (partial completion)
|
|
20
27
|
*/
|
|
21
28
|
|
|
22
|
-
import
|
|
23
|
-
import * as path from 'path';
|
|
24
|
-
|
|
25
|
-
interface ACStatus {
|
|
26
|
-
acId: string;
|
|
27
|
-
isComplete: boolean;
|
|
28
|
-
completedByTasks: string[];
|
|
29
|
-
}
|
|
29
|
+
import { ACStatusManager } from '../../../../dist/src/core/increment/ac-status-manager.js';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Main entry point
|
|
32
|
+
* Main entry point - uses ACStatusManager for sophisticated sync
|
|
33
33
|
*/
|
|
34
34
|
async function updateACStatus(incrementId: string): Promise<void> {
|
|
35
35
|
try {
|
|
36
36
|
const projectRoot = process.cwd();
|
|
37
|
-
const incrementPath = path.join(projectRoot, '.specweave/increments', incrementId);
|
|
38
|
-
|
|
39
|
-
// Verify increment exists
|
|
40
|
-
try {
|
|
41
|
-
await fs.access(incrementPath);
|
|
42
|
-
} catch {
|
|
43
|
-
console.error(`❌ Increment ${incrementId} not found at ${incrementPath}`);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
37
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const completedACs = await extractCompletedACsFromTasks(incrementPath);
|
|
51
|
-
|
|
52
|
-
if (completedACs.size === 0) {
|
|
53
|
-
console.log(`ℹ️ No completed tasks with AC-IDs found in tasks.md`);
|
|
38
|
+
// Check if --skip-ac-sync flag is set (allows disabling hook temporarily)
|
|
39
|
+
if (process.env.SKIP_AC_SYNC === 'true') {
|
|
40
|
+
console.log('ℹ️ AC sync skipped (SKIP_AC_SYNC=true)');
|
|
54
41
|
return;
|
|
55
42
|
}
|
|
56
43
|
|
|
57
|
-
console.log(
|
|
58
|
-
|
|
59
|
-
// Step 2: Update spec.md checkboxes
|
|
60
|
-
const updatedCount = await updateSpecACCheckboxes(incrementPath, completedACs);
|
|
61
|
-
|
|
62
|
-
if (updatedCount > 0) {
|
|
63
|
-
console.log(`✅ Updated ${updatedCount} AC checkbox(es) in spec.md`);
|
|
64
|
-
} else {
|
|
65
|
-
console.log(`ℹ️ No AC checkboxes needed updating in spec.md`);
|
|
66
|
-
}
|
|
67
|
-
} catch (error) {
|
|
68
|
-
console.error('❌ Error updating AC status:', error);
|
|
69
|
-
// Non-blocking: Don't throw, just log
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Extract AC-IDs from completed tasks in tasks.md
|
|
75
|
-
*/
|
|
76
|
-
async function extractCompletedACsFromTasks(incrementPath: string): Promise<Set<string>> {
|
|
77
|
-
const tasksPath = path.join(incrementPath, 'tasks.md');
|
|
78
|
-
const completedACs = new Set<string>();
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
const tasksContent = await fs.readFile(tasksPath, 'utf-8');
|
|
82
|
-
|
|
83
|
-
// Pattern: Match tasks with completed status and AC field
|
|
84
|
-
// Example:
|
|
85
|
-
// ### T-001: Task Title
|
|
86
|
-
// **Status**: [x] (100% - Completed)
|
|
87
|
-
// **AC**: AC-US1-01, AC-US1-02, AC-US1-03
|
|
88
|
-
|
|
89
|
-
// Split by task headings (## or ###)
|
|
90
|
-
const taskSections = tasksContent.split(/^(###+)\s+T-\d+:/gm);
|
|
91
|
-
|
|
92
|
-
for (let i = 1; i < taskSections.length; i += 2) {
|
|
93
|
-
const taskContent = taskSections[i + 1];
|
|
94
|
-
|
|
95
|
-
// Check if task is completed
|
|
96
|
-
const statusMatch = taskContent.match(/\*\*Status\*\*:\s*\[x\]/i);
|
|
97
|
-
if (!statusMatch) continue;
|
|
44
|
+
console.log(`🔄 Syncing AC status for increment ${incrementId}...`);
|
|
98
45
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (!acMatch) continue;
|
|
46
|
+
// Initialize ACStatusManager with project root
|
|
47
|
+
const manager = new ACStatusManager(projectRoot);
|
|
102
48
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
.split(',')
|
|
106
|
-
.map(id => id.trim())
|
|
107
|
-
.filter(id => /^AC-[A-Z0-9]+-\d+$/.test(id)); // Validate format
|
|
49
|
+
// Perform sophisticated sync
|
|
50
|
+
const result = await manager.syncACStatus(incrementId);
|
|
108
51
|
|
|
109
|
-
|
|
52
|
+
// Display results
|
|
53
|
+
if (result.warnings && result.warnings.length > 0) {
|
|
54
|
+
console.log('\n⚠️ Warnings:');
|
|
55
|
+
result.warnings.forEach((warning: string) => console.log(` ${warning}`));
|
|
110
56
|
}
|
|
111
57
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
console.log(`ℹ️ tasks.md not found, skipping AC update`);
|
|
116
|
-
} else {
|
|
117
|
-
console.error('Error reading tasks.md:', error);
|
|
58
|
+
if (result.conflicts && result.conflicts.length > 0) {
|
|
59
|
+
console.log('\n⚠️ Conflicts detected:');
|
|
60
|
+
result.conflicts.forEach((conflict: string) => console.log(` ${conflict}`));
|
|
118
61
|
}
|
|
119
|
-
return completedACs;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
62
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
async function updateSpecACCheckboxes(
|
|
127
|
-
incrementPath: string,
|
|
128
|
-
completedACs: Set<string>
|
|
129
|
-
): Promise<number> {
|
|
130
|
-
const specPath = path.join(incrementPath, 'spec.md');
|
|
63
|
+
if (result.updated && result.updated.length > 0) {
|
|
64
|
+
console.log('\n✅ Updated AC checkboxes:');
|
|
65
|
+
result.updated.forEach((acId: string) => console.log(` ${acId} → [x]`));
|
|
131
66
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
// Pattern: - [ ] **AC-US1-01**: Description
|
|
137
|
-
// Captures: indent, checkbox state, AC-ID, rest of line
|
|
138
|
-
const acPattern = /^(\s*)-\s+\[([ x])\]\s+\*\*([A-Z]+-[A-Z0-9]+-\d+)\*\*:(.*)$/gm;
|
|
139
|
-
|
|
140
|
-
specContent = specContent.replace(acPattern, (match, indent, currentState, acId, description) => {
|
|
141
|
-
const shouldBeChecked = completedACs.has(acId);
|
|
142
|
-
const isCurrentlyChecked = currentState === 'x';
|
|
143
|
-
|
|
144
|
-
if (shouldBeChecked && !isCurrentlyChecked) {
|
|
145
|
-
// Check off this AC
|
|
146
|
-
updatedCount++;
|
|
147
|
-
return `${indent}- [x] **${acId}**:${description}`;
|
|
148
|
-
} else if (!shouldBeChecked && isCurrentlyChecked) {
|
|
149
|
-
// Uncheck this AC (task was un-completed?)
|
|
150
|
-
updatedCount++;
|
|
151
|
-
return `${indent}- [ ] **${acId}**:${description}`;
|
|
67
|
+
if (result.changes && result.changes.length > 0) {
|
|
68
|
+
console.log('\n📝 Changes:');
|
|
69
|
+
result.changes.forEach((change: string) => console.log(` ${change}`));
|
|
152
70
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (updatedCount > 0) {
|
|
158
|
-
await fs.writeFile(specPath, specContent, 'utf-8');
|
|
71
|
+
} else if (result.synced) {
|
|
72
|
+
console.log('✅ All ACs already in sync (no changes needed)');
|
|
73
|
+
} else {
|
|
74
|
+
console.log('ℹ️ No AC updates needed');
|
|
159
75
|
}
|
|
160
76
|
|
|
161
|
-
return updatedCount;
|
|
162
77
|
} catch (error) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
} else {
|
|
166
|
-
console.error('Error updating spec.md:', error);
|
|
167
|
-
}
|
|
168
|
-
return 0;
|
|
78
|
+
console.error('❌ Error updating AC status:', error);
|
|
79
|
+
// Non-blocking: Don't throw, just log
|
|
169
80
|
}
|
|
170
81
|
}
|
|
171
82
|
|
|
@@ -177,7 +88,7 @@ if (isMainModule) {
|
|
|
177
88
|
|
|
178
89
|
if (!incrementId) {
|
|
179
90
|
console.error('Usage: node update-ac-status.js <increment-id>');
|
|
180
|
-
console.error('Example: node update-ac-status.js
|
|
91
|
+
console.error('Example: node update-ac-status.js 0039-ultra-smart-next-command');
|
|
181
92
|
process.exit(1);
|
|
182
93
|
}
|
|
183
94
|
|
|
@@ -78,8 +78,103 @@ function parseTaskStatus(lines) {
|
|
|
78
78
|
}
|
|
79
79
|
function detectCompletedTasks(lines) {
|
|
80
80
|
const completedTasks = [];
|
|
81
|
+
const warnings = [];
|
|
82
|
+
const taskPattern = /^###\s+(T-\d+[-A-Z]*):?\s+(.+)/;
|
|
83
|
+
for (let i = 0; i < lines.length; i++) {
|
|
84
|
+
const line = lines[i];
|
|
85
|
+
const taskMatch = line.match(taskPattern);
|
|
86
|
+
if (!taskMatch) continue;
|
|
87
|
+
const taskId = taskMatch[1];
|
|
88
|
+
const taskTitle = taskMatch[2];
|
|
89
|
+
const hasCompleteMarker = taskTitle.includes("\u2705 COMPLETE");
|
|
90
|
+
const taskEndIndex = findNextTaskStart(lines, i + 1);
|
|
91
|
+
const implementationSection = findImplementationSection(lines, i, taskEndIndex);
|
|
92
|
+
let allCheckboxesComplete = false;
|
|
93
|
+
if (implementationSection) {
|
|
94
|
+
allCheckboxesComplete = checkAllCheckboxesComplete(implementationSection);
|
|
95
|
+
}
|
|
96
|
+
if (hasCompleteMarker && implementationSection) {
|
|
97
|
+
if (allCheckboxesComplete) {
|
|
98
|
+
if (!completedTasks.includes(taskId)) {
|
|
99
|
+
completedTasks.push(taskId);
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
warnings.push(`${taskId}: Header has \u2705 COMPLETE but not all checkboxes checked`);
|
|
103
|
+
}
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (hasCompleteMarker && !implementationSection) {
|
|
107
|
+
if (!completedTasks.includes(taskId)) {
|
|
108
|
+
completedTasks.push(taskId);
|
|
109
|
+
}
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if (!hasCompleteMarker && implementationSection && allCheckboxesComplete) {
|
|
113
|
+
warnings.push(`${taskId}: All checkboxes checked but header missing \u2705 COMPLETE`);
|
|
114
|
+
if (!completedTasks.includes(taskId)) {
|
|
115
|
+
completedTasks.push(taskId);
|
|
116
|
+
}
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
for (let j = i + 1; j < Math.min(i + 10, taskEndIndex); j++) {
|
|
120
|
+
const statusLine = lines[j];
|
|
121
|
+
if (statusLine.includes("**Status**:") && statusLine.includes("[x] Completed")) {
|
|
122
|
+
if (!completedTasks.includes(taskId)) {
|
|
123
|
+
completedTasks.push(taskId);
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (warnings.length > 0) {
|
|
130
|
+
console.warn("\n\u26A0\uFE0F Task Consistency Warnings:");
|
|
131
|
+
warnings.forEach((w) => console.warn(` ${w}`));
|
|
132
|
+
console.warn("");
|
|
133
|
+
}
|
|
81
134
|
return completedTasks;
|
|
82
135
|
}
|
|
136
|
+
function findNextTaskStart(lines, startIndex) {
|
|
137
|
+
const taskPattern = /^###\s+T-\d+/;
|
|
138
|
+
for (let i = startIndex; i < lines.length; i++) {
|
|
139
|
+
if (taskPattern.test(lines[i])) {
|
|
140
|
+
return i;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return lines.length;
|
|
144
|
+
}
|
|
145
|
+
function findImplementationSection(lines, taskStartIndex, taskEndIndex) {
|
|
146
|
+
let inImplementation = false;
|
|
147
|
+
const implementationLines = [];
|
|
148
|
+
for (let i = taskStartIndex; i < taskEndIndex; i++) {
|
|
149
|
+
const line = lines[i];
|
|
150
|
+
if (line.includes("**Implementation**:")) {
|
|
151
|
+
inImplementation = true;
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
if (inImplementation) {
|
|
155
|
+
if (line.trim().startsWith("**") && !line.startsWith("- [")) {
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
if (line.trim().startsWith("---")) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
if (line.trim().startsWith("###")) {
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
implementationLines.push(line);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return implementationLines.length > 0 ? implementationLines : null;
|
|
168
|
+
}
|
|
169
|
+
function checkAllCheckboxesComplete(implementationLines) {
|
|
170
|
+
const checkboxes = implementationLines.filter((line) => line.includes("- ["));
|
|
171
|
+
if (checkboxes.length === 0) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
const allComplete = checkboxes.every((line) => line.includes("- [x]"));
|
|
175
|
+
const noneIncomplete = checkboxes.every((line) => !line.includes("- [ ]"));
|
|
176
|
+
return allComplete && noneIncomplete;
|
|
177
|
+
}
|
|
83
178
|
function markTaskComplete(content, taskId) {
|
|
84
179
|
let updated = content;
|
|
85
180
|
const statusPattern = new RegExp(
|
|
@@ -101,17 +196,34 @@ function countTotalTasks(lines) {
|
|
|
101
196
|
}
|
|
102
197
|
function countCompletedTasks(lines) {
|
|
103
198
|
let count = 0;
|
|
104
|
-
const taskPattern = /^###\s+(T-?\d+[-A-Z]*):?\s
|
|
199
|
+
const taskPattern = /^###\s+(T-?\d+[-A-Z]*):?\s+(.+)/;
|
|
105
200
|
for (let i = 0; i < lines.length; i++) {
|
|
106
201
|
const line = lines[i];
|
|
107
|
-
|
|
108
|
-
|
|
202
|
+
const taskMatch = line.match(taskPattern);
|
|
203
|
+
if (taskMatch) {
|
|
204
|
+
const taskTitle = taskMatch[2];
|
|
205
|
+
if (taskTitle.includes("\u2705 COMPLETE")) {
|
|
206
|
+
count++;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
let found = false;
|
|
210
|
+
for (let j = i + 1; j < Math.min(i + 10, lines.length); j++) {
|
|
109
211
|
const nextLine = lines[j];
|
|
110
212
|
if (nextLine.includes("**Status**:") && nextLine.includes("[x] Completed")) {
|
|
111
213
|
count++;
|
|
214
|
+
found = true;
|
|
112
215
|
break;
|
|
113
216
|
}
|
|
114
217
|
}
|
|
218
|
+
if (found) continue;
|
|
219
|
+
const taskEndIndex = findNextTaskStart(lines, i + 1);
|
|
220
|
+
const implementationSection = findImplementationSection(lines, i, taskEndIndex);
|
|
221
|
+
if (implementationSection) {
|
|
222
|
+
const allCheckboxesComplete = checkAllCheckboxesComplete(implementationSection);
|
|
223
|
+
if (allCheckboxesComplete) {
|
|
224
|
+
count++;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
115
227
|
}
|
|
116
228
|
}
|
|
117
229
|
return count;
|