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,342 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specweave:sync-acs
|
|
3
|
+
description: Manually synchronize acceptance criteria (AC) checkbox status in spec.md based on task completion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sync Acceptance Criteria Status
|
|
7
|
+
|
|
8
|
+
**Purpose**: Manually trigger AC checkbox synchronization to ensure spec.md acceptance criteria accurately reflect task completion status.
|
|
9
|
+
|
|
10
|
+
**Use When**:
|
|
11
|
+
- AC checkboxes in spec.md are out of sync with completed tasks
|
|
12
|
+
- After manually completing tasks without running the hook
|
|
13
|
+
- To verify AC status before closing an increment
|
|
14
|
+
- To resolve conflicts between manual AC edits and task completion
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## How It Works
|
|
19
|
+
|
|
20
|
+
1. **Detect Active Increment**
|
|
21
|
+
- Find increment in-progress
|
|
22
|
+
- Check if spec.md and tasks.md exist
|
|
23
|
+
|
|
24
|
+
2. **Parse Task Completion**
|
|
25
|
+
- Extract all tasks from tasks.md
|
|
26
|
+
- Map AC-IDs to completion status
|
|
27
|
+
- Calculate percentage complete per AC (# complete tasks / # total tasks)
|
|
28
|
+
|
|
29
|
+
3. **Parse AC Definitions**
|
|
30
|
+
- Extract all ACs from spec.md
|
|
31
|
+
- Track current checkbox state ([ ] or [x])
|
|
32
|
+
- Map line numbers for atomic updates
|
|
33
|
+
|
|
34
|
+
4. **Intelligent Sync Logic**
|
|
35
|
+
- **100% Complete**: Update [ ] → [x]
|
|
36
|
+
- **< 100% Complete**: Keep [ ] (partial work)
|
|
37
|
+
- **Conflict Detection**: AC is [x] but tasks incomplete → WARN
|
|
38
|
+
- **Orphaned ACs**: AC has no implementing tasks → WARN
|
|
39
|
+
|
|
40
|
+
5. **Atomic File Update**
|
|
41
|
+
- Update spec.md only if changes needed
|
|
42
|
+
- Preserve manual overrides (conflicts)
|
|
43
|
+
- Log all changes to metadata.json
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Auto-detect and sync active increment
|
|
51
|
+
/specweave:sync-acs
|
|
52
|
+
|
|
53
|
+
# Sync specific increment
|
|
54
|
+
/specweave:sync-acs 0039
|
|
55
|
+
|
|
56
|
+
# Show what would change (dry run)
|
|
57
|
+
/specweave:sync-acs --dry-run
|
|
58
|
+
|
|
59
|
+
# Force sync (ignore conflicts)
|
|
60
|
+
/specweave:sync-acs --force
|
|
61
|
+
|
|
62
|
+
# Validate only (check for mismatches)
|
|
63
|
+
/specweave:sync-acs --validate
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Implementation
|
|
69
|
+
|
|
70
|
+
The command uses **ACStatusManager** for sophisticated synchronization:
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import { ACStatusManager } from '../../../../../src/core/increment/ac-status-manager';
|
|
74
|
+
|
|
75
|
+
const manager = new ACStatusManager(process.cwd());
|
|
76
|
+
const result = await manager.syncACStatus(incrementId);
|
|
77
|
+
|
|
78
|
+
// result.synced: true if sync was performed
|
|
79
|
+
// result.updated: string[] - AC-IDs updated to [x]
|
|
80
|
+
// result.conflicts: string[] - Conflicts detected
|
|
81
|
+
// result.warnings: string[] - Orphaned ACs, missing files
|
|
82
|
+
// result.changes: string[] - Human-readable diff
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Step 1: Find Active Increment
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Auto-detect active increment
|
|
89
|
+
ACTIVE_INCREMENT=$(ls -t .specweave/increments/ 2>/dev/null | grep -v "_backlog\|_archive" | head -1)
|
|
90
|
+
|
|
91
|
+
if [[ -z "$ACTIVE_INCREMENT" ]]; then
|
|
92
|
+
echo "❌ No active increment found"
|
|
93
|
+
exit 1
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
echo "🔄 Syncing AC status for $ACTIVE_INCREMENT..."
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Step 2: Call ACStatusManager
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Use the update-ac-status.js hook script (already integrated)
|
|
103
|
+
node plugins/specweave/lib/hooks/update-ac-status.js "$ACTIVE_INCREMENT"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Or invoke directly:
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
const result = await manager.syncACStatus(incrementId);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Step 3: Display Results
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Updated ACs
|
|
116
|
+
if [[ -n "${result.updated}" ]]; then
|
|
117
|
+
echo "✅ Updated AC checkboxes:"
|
|
118
|
+
for acId in "${result.updated[@]}"; do
|
|
119
|
+
echo " $acId → [x]"
|
|
120
|
+
done
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
# Conflicts
|
|
124
|
+
if [[ -n "${result.conflicts}" ]]; then
|
|
125
|
+
echo "⚠️ Conflicts detected:"
|
|
126
|
+
for conflict in "${result.conflicts[@]}"; do
|
|
127
|
+
echo " $conflict"
|
|
128
|
+
done
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
# Warnings
|
|
132
|
+
if [[ -n "${result.warnings}" ]]; then
|
|
133
|
+
echo "⚠️ Warnings:"
|
|
134
|
+
for warning in "${result.warnings[@]}"; do
|
|
135
|
+
echo " $warning"
|
|
136
|
+
done
|
|
137
|
+
fi
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Example Scenarios
|
|
143
|
+
|
|
144
|
+
### Scenario 1: Normal Sync (100% Complete AC)
|
|
145
|
+
|
|
146
|
+
**Before**:
|
|
147
|
+
```markdown
|
|
148
|
+
# spec.md
|
|
149
|
+
- [ ] AC-US1-01: User can login
|
|
150
|
+
- [ ] AC-US1-02: Session persists
|
|
151
|
+
|
|
152
|
+
# tasks.md
|
|
153
|
+
#### T-001: Implement login API
|
|
154
|
+
**AC**: AC-US1-01
|
|
155
|
+
**Status**: [x] (100% - Completed)
|
|
156
|
+
|
|
157
|
+
#### T-002: Add session storage
|
|
158
|
+
**AC**: AC-US1-01
|
|
159
|
+
**Status**: [x] (100% - Completed)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**After**:
|
|
163
|
+
```markdown
|
|
164
|
+
# spec.md
|
|
165
|
+
- [x] AC-US1-01: User can login ✓ UPDATED
|
|
166
|
+
- [ ] AC-US1-02: Session persists
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Output**:
|
|
170
|
+
```
|
|
171
|
+
🔄 Syncing AC status for increment 0039...
|
|
172
|
+
|
|
173
|
+
✅ Updated AC checkboxes:
|
|
174
|
+
AC-US1-01 → [x]
|
|
175
|
+
|
|
176
|
+
📝 Changes:
|
|
177
|
+
AC-US1-01: [ ] → [x] (2/2 tasks complete - 100%)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### Scenario 2: Partial Completion (No Update)
|
|
183
|
+
|
|
184
|
+
**Before**:
|
|
185
|
+
```markdown
|
|
186
|
+
# spec.md
|
|
187
|
+
- [ ] AC-US1-02: Session persists
|
|
188
|
+
|
|
189
|
+
# tasks.md
|
|
190
|
+
#### T-003: Add Redis session store
|
|
191
|
+
**AC**: AC-US1-02
|
|
192
|
+
**Status**: [x] (100% - Completed)
|
|
193
|
+
|
|
194
|
+
#### T-004: Test session expiry
|
|
195
|
+
**AC**: AC-US1-02
|
|
196
|
+
**Status**: [ ] (0% - Not started)
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**After**:
|
|
200
|
+
```markdown
|
|
201
|
+
# spec.md
|
|
202
|
+
- [ ] AC-US1-02: Session persists (NO CHANGE - 50% complete)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Output**:
|
|
206
|
+
```
|
|
207
|
+
🔄 Syncing AC status for increment 0039...
|
|
208
|
+
|
|
209
|
+
ℹ️ No AC updates needed
|
|
210
|
+
|
|
211
|
+
📊 Completion Status:
|
|
212
|
+
AC-US1-02: 1/2 tasks complete (50%) - threshold not met
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
### Scenario 3: Conflict Detection
|
|
218
|
+
|
|
219
|
+
**Before**:
|
|
220
|
+
```markdown
|
|
221
|
+
# spec.md
|
|
222
|
+
- [x] AC-US1-03: Data validated (manually checked)
|
|
223
|
+
|
|
224
|
+
# tasks.md
|
|
225
|
+
#### T-005: Add validation rules
|
|
226
|
+
**AC**: AC-US1-03
|
|
227
|
+
**Status**: [x] (100% - Completed)
|
|
228
|
+
|
|
229
|
+
#### T-006: Add error handling
|
|
230
|
+
**AC**: AC-US1-03
|
|
231
|
+
**Status**: [ ] (0% - Not started)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**After**:
|
|
235
|
+
```markdown
|
|
236
|
+
# spec.md
|
|
237
|
+
- [x] AC-US1-03: Data validated (PRESERVED - conflict detected)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Output**:
|
|
241
|
+
```
|
|
242
|
+
🔄 Syncing AC status for increment 0039...
|
|
243
|
+
|
|
244
|
+
⚠️ Conflicts detected:
|
|
245
|
+
AC-US1-03: Marked [x] but only 1/2 tasks complete (50%)
|
|
246
|
+
→ Manual override preserved (no change made)
|
|
247
|
+
|
|
248
|
+
💡 Tip: Review tasks for AC-US1-03 or uncheck manually if premature
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### Scenario 4: Orphaned AC Warning
|
|
254
|
+
|
|
255
|
+
**Before**:
|
|
256
|
+
```markdown
|
|
257
|
+
# spec.md
|
|
258
|
+
- [ ] AC-US1-04: Performance optimized
|
|
259
|
+
- [ ] AC-US1-05: Security hardened
|
|
260
|
+
|
|
261
|
+
# tasks.md
|
|
262
|
+
#### T-007: Implement caching
|
|
263
|
+
**AC**: AC-US1-04
|
|
264
|
+
**Status**: [x] (100% - Completed)
|
|
265
|
+
|
|
266
|
+
(No tasks reference AC-US1-05)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Output**:
|
|
270
|
+
```
|
|
271
|
+
🔄 Syncing AC status for increment 0039...
|
|
272
|
+
|
|
273
|
+
✅ Updated AC checkboxes:
|
|
274
|
+
AC-US1-04 → [x]
|
|
275
|
+
|
|
276
|
+
⚠️ Warnings:
|
|
277
|
+
AC-US1-05: No implementing tasks found (orphaned AC)
|
|
278
|
+
→ Add tasks or remove AC from spec.md
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Integration with Hooks
|
|
284
|
+
|
|
285
|
+
### Automatic Sync (Post-Task-Completion Hook)
|
|
286
|
+
|
|
287
|
+
The hook automatically calls `ACStatusManager.syncACStatus()` after every task completion:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
# plugins/specweave/hooks/post-task-completion.sh (lines 232-269)
|
|
291
|
+
if [ -n "$CURRENT_INCREMENT" ]; then
|
|
292
|
+
node plugins/specweave/lib/hooks/update-ac-status.js "$CURRENT_INCREMENT"
|
|
293
|
+
fi
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Disable automatic sync**:
|
|
297
|
+
```bash
|
|
298
|
+
export SKIP_AC_SYNC=true
|
|
299
|
+
# Now hooks won't sync ACs (useful for batch work)
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Integration with Other Commands
|
|
305
|
+
|
|
306
|
+
### /specweave:validate
|
|
307
|
+
```bash
|
|
308
|
+
# Validate ACs before closing increment
|
|
309
|
+
/specweave:sync-acs --validate
|
|
310
|
+
# Warns if ACs out of sync
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### /specweave:done
|
|
314
|
+
```bash
|
|
315
|
+
# Auto-sync ACs before closing
|
|
316
|
+
/specweave:sync-acs
|
|
317
|
+
# Then proceed with increment closure
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### /specweave:progress
|
|
321
|
+
```bash
|
|
322
|
+
# Show AC completion alongside task progress
|
|
323
|
+
/specweave:sync-acs --status
|
|
324
|
+
# Display: 8/10 ACs complete (80%)
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Success Criteria
|
|
330
|
+
|
|
331
|
+
- ✅ Syncs AC checkboxes based on task completion (100% threshold)
|
|
332
|
+
- ✅ Detects and preserves manual overrides (conflicts)
|
|
333
|
+
- ✅ Warns about orphaned ACs (no implementing tasks)
|
|
334
|
+
- ✅ Shows clear diff of changes before/after
|
|
335
|
+
- ✅ Atomic file writes (no corruption risk)
|
|
336
|
+
- ✅ Integrates with post-task-completion hook
|
|
337
|
+
- ✅ Supports dry-run mode
|
|
338
|
+
- ✅ Logs all changes to metadata.json
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
**This command ensures acceptance criteria accurately reflect implementation progress!**
|
|
@@ -57,25 +57,49 @@ Usage: /specweave:validate-increment <id> [--quality] [--export] [--fix] [--alwa
|
|
|
57
57
|
|
|
58
58
|
### Step 2: Run Rule-Based Validation (Always)
|
|
59
59
|
|
|
60
|
-
Run
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
Run 130+ validation rules across 6 categories:
|
|
61
|
+
|
|
62
|
+
**CRITICAL: Always run structure validation FIRST to prevent duplicate task files**
|
|
63
|
+
|
|
64
|
+
1. **Structure Rules (5 checks)** - v0.18.4:
|
|
65
|
+
- Only ONE tasks.md file exists (no tasks-detailed.md, tasks-final.md)
|
|
66
|
+
- Only allowed root files present (spec.md, plan.md, tasks.md, metadata.json, README.md)
|
|
67
|
+
- Unknown files moved to subdirectories (reports/, scripts/, logs/)
|
|
68
|
+
- No root-level pollution (analysis.md, summary.md moved to reports/)
|
|
69
|
+
- Metadata.json structure valid
|
|
70
|
+
|
|
71
|
+
2. **Three-File Canonical Structure (10 checks)** - ADR-0047 (v0.21.3):
|
|
72
|
+
- **tasks.md validations (CRITICAL)**:
|
|
73
|
+
- ❌ Does NOT contain "**Acceptance Criteria**:" sections
|
|
74
|
+
- ✅ MUST have "**Implementation**:" sections for each task
|
|
75
|
+
- ✅ MUST have "**Test Plan (BDD)**" sections
|
|
76
|
+
- ✅ MUST have **AC-IDs** references linking to spec.md
|
|
77
|
+
- ❌ Does NOT contain "As a user..." user story language
|
|
78
|
+
- **spec.md validations**:
|
|
79
|
+
- ❌ Does NOT contain task IDs (T-001, T-002, etc.)
|
|
80
|
+
- ❌ Does NOT contain technical class/file names
|
|
81
|
+
- ✅ MUST have "## Acceptance Criteria" section
|
|
82
|
+
- **plan.md validations**:
|
|
83
|
+
- ❌ Does NOT contain "Acceptance Criteria" sections
|
|
84
|
+
- ❌ Does NOT contain task checkboxes
|
|
85
|
+
|
|
86
|
+
3. **Consistency Rules (47 checks)**:
|
|
63
87
|
- User stories in spec.md → sections in plan.md
|
|
64
88
|
- Components in plan.md → tasks in tasks.md
|
|
65
89
|
- Test cases (TC-0001) in spec.md → tests.md coverage
|
|
66
90
|
- Cross-document consistency (IDs, priorities, dependencies)
|
|
67
91
|
|
|
68
|
-
|
|
92
|
+
4. **Completeness Rules (23 checks)**:
|
|
69
93
|
- spec.md: Frontmatter, problem statement, user stories, acceptance criteria
|
|
70
94
|
- plan.md: Architecture, components, data model, API contracts, security
|
|
71
95
|
- tasks.md: Task IDs, descriptions, priorities, estimates
|
|
72
96
|
|
|
73
|
-
|
|
97
|
+
5. **Quality Rules (31 checks)**:
|
|
74
98
|
- spec.md: Technology-agnostic, testable acceptance criteria
|
|
75
99
|
- plan.md: Technical details, ADRs exist, security addressed
|
|
76
100
|
- tasks.md: Actionable, reasonable estimates (<1 day)
|
|
77
101
|
|
|
78
|
-
|
|
102
|
+
6. **Traceability Rules (19 checks)**:
|
|
79
103
|
- TC-0001 format, sequential numbering
|
|
80
104
|
- ADR references exist
|
|
81
105
|
- Diagram references valid
|
|
@@ -86,7 +110,9 @@ Run 120 validation rules across 4 categories:
|
|
|
86
110
|
VALIDATION RESULTS: Increment 0001-authentication
|
|
87
111
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
88
112
|
|
|
89
|
-
✅ Rule-Based Validation: PASSED (
|
|
113
|
+
✅ Rule-Based Validation: PASSED (135/135 checks)
|
|
114
|
+
✓ Structure (5/5)
|
|
115
|
+
✓ Three-File Canonical (10/10) [ADR-0047]
|
|
90
116
|
✓ Consistency (47/47)
|
|
91
117
|
✓ Completeness (23/23)
|
|
92
118
|
✓ Quality (31/31)
|
|
@@ -103,12 +129,30 @@ Files validated:
|
|
|
103
129
|
|
|
104
130
|
**If errors found**:
|
|
105
131
|
```
|
|
106
|
-
❌ Rule-Based Validation: FAILED (
|
|
132
|
+
❌ Rule-Based Validation: FAILED (122/135 checks)
|
|
133
|
+
❌ Structure (3/5) - 2 CRITICAL ERRORS
|
|
134
|
+
❌ Three-File Canonical (7/10) - 3 CRITICAL ERRORS [ADR-0047]
|
|
107
135
|
✓ Consistency (45/47) - 2 errors
|
|
108
136
|
✓ Completeness (23/23)
|
|
109
137
|
⚠️ Quality (28/31) - 3 warnings
|
|
110
138
|
✓ Traceability (19/19)
|
|
111
139
|
|
|
140
|
+
CRITICAL STRUCTURE ERRORS (MUST FIX FIRST):
|
|
141
|
+
❌ Duplicate task files detected: tasks.md, tasks-detailed.md
|
|
142
|
+
→ Only ONE tasks.md allowed per increment
|
|
143
|
+
→ Move tasks-detailed.md to reports/tasks-detailed.md
|
|
144
|
+
❌ Unknown root-level file: analysis.md
|
|
145
|
+
→ Move to reports/ directory
|
|
146
|
+
|
|
147
|
+
CRITICAL THREE-FILE VIOLATIONS (ADR-0047):
|
|
148
|
+
🚨 tasks.md:45 - Contains "**Acceptance Criteria**:" section
|
|
149
|
+
→ ACs belong in spec.md ONLY
|
|
150
|
+
→ Replace with "**Implementation**:" and add AC-ID references
|
|
151
|
+
🚨 tasks.md:78 - Task T-003 missing "**Implementation**:" section
|
|
152
|
+
→ Add checkable implementation steps
|
|
153
|
+
🚨 spec.md:102 - Contains task ID reference "T-001"
|
|
154
|
+
→ Tasks belong in tasks.md, use AC-IDs to link instead
|
|
155
|
+
|
|
112
156
|
ERRORS (2):
|
|
113
157
|
🔴 spec.md:45 - Missing acceptance criteria for US-003
|
|
114
158
|
🔴 Inconsistency: spec.md mentions "real-time updates" but plan.md doesn't address it
|
|
@@ -119,9 +163,14 @@ WARNINGS (3):
|
|
|
119
163
|
🟡 ADR-0005 referenced but doesn't exist (plan.md:89)
|
|
120
164
|
|
|
121
165
|
Action required:
|
|
122
|
-
1.
|
|
123
|
-
2.
|
|
124
|
-
|
|
166
|
+
1. ❗ FIX STRUCTURE ERRORS FIRST (single source of truth violation)
|
|
167
|
+
2. 🚨 FIX THREE-FILE VIOLATIONS (ADR-0047 compliance):
|
|
168
|
+
- Run refactoring script: .specweave/increments/XXXX/scripts/refactor-tasks-ac-to-implementation.sh
|
|
169
|
+
- Or manually replace "**Acceptance Criteria**:" with "**Implementation**:"
|
|
170
|
+
- Add "**AC-IDs**: AC-US-XX-YY" references to link tasks to spec.md
|
|
171
|
+
3. Fix missing acceptance criteria for US-003
|
|
172
|
+
4. Address "real-time updates" in plan.md or remove from spec.md
|
|
173
|
+
5. Consider breaking down T012 into smaller tasks
|
|
125
174
|
|
|
126
175
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
127
176
|
```
|
|
@@ -89,16 +89,20 @@ if [[ -f "$TASKS_FILE" ]]; then
|
|
|
89
89
|
TOTAL_TASKS=$(grep -cE '^##+ T-' "$TASKS_FILE" 2>/dev/null || echo 0)
|
|
90
90
|
TOTAL_TASKS=$(echo "$TOTAL_TASKS" | tr -d '\n\r ' || echo 0)
|
|
91
91
|
|
|
92
|
-
# Count completed tasks (
|
|
93
|
-
# Format 1: [x] at line start
|
|
92
|
+
# Count completed tasks (multiple formats)
|
|
93
|
+
# Format 1: [x] at line start (legacy)
|
|
94
94
|
COMPLETED_STANDARD=$(grep -c '^\[x\]' "$TASKS_FILE" 2>/dev/null || echo 0)
|
|
95
95
|
COMPLETED_STANDARD=$(echo "$COMPLETED_STANDARD" | tr -d '\n\r ' || echo 0)
|
|
96
96
|
|
|
97
|
-
# Format 2: **Status**: [x] inline
|
|
97
|
+
# Format 2: **Status**: [x] inline (legacy)
|
|
98
98
|
COMPLETED_INLINE=$(grep -c '\*\*Status\*\*: \[x\]' "$TASKS_FILE" 2>/dev/null || echo 0)
|
|
99
99
|
COMPLETED_INLINE=$(echo "$COMPLETED_INLINE" | tr -d '\n\r ' || echo 0)
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
# Format 3: **Completed**: <date> (current format)
|
|
102
|
+
COMPLETED_DATE=$(grep -c '\*\*Completed\*\*:' "$TASKS_FILE" 2>/dev/null || echo 0)
|
|
103
|
+
COMPLETED_DATE=$(echo "$COMPLETED_DATE" | tr -d '\n\r ' || echo 0)
|
|
104
|
+
|
|
105
|
+
COMPLETED_TASKS=$((COMPLETED_STANDARD + COMPLETED_INLINE + COMPLETED_DATE))
|
|
102
106
|
|
|
103
107
|
# Calculate percentage
|
|
104
108
|
if [[ $TOTAL_TASKS -gt 0 ]]; then
|
|
@@ -90,5 +90,9 @@ node dist/plugins/specweave-github/lib/github-sync-increment-changes.js "$INCREM
|
|
|
90
90
|
|
|
91
91
|
echo "[$(date)] ✅ Post-increment-change hook complete" >> "$DEBUG_LOG" 2>/dev/null || true
|
|
92
92
|
|
|
93
|
+
# Update status line cache (increment changed)
|
|
94
|
+
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
95
|
+
bash "$HOOK_DIR/lib/update-status-line.sh" 2>/dev/null || true
|
|
96
|
+
|
|
93
97
|
# Return success (non-blocking)
|
|
94
98
|
exit 0
|
|
@@ -37,7 +37,9 @@ fi
|
|
|
37
37
|
ISSUE_NUMBER=$(jq -r '.github.issue // empty' "$METADATA_FILE" 2>/dev/null)
|
|
38
38
|
|
|
39
39
|
if [ -z "$ISSUE_NUMBER" ] || [ "$ISSUE_NUMBER" = "null" ]; then
|
|
40
|
-
# No GitHub issue linked - skip
|
|
40
|
+
# No GitHub issue linked - skip GitHub closure but still update status line
|
|
41
|
+
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
42
|
+
bash "$HOOK_DIR/lib/update-status-line.sh" 2>/dev/null || true
|
|
41
43
|
exit 0
|
|
42
44
|
fi
|
|
43
45
|
|
|
@@ -80,4 +82,8 @@ gh issue close "$ISSUE_NUMBER" --comment "$COMPLETION_COMMENT" 2>/dev/null || {
|
|
|
80
82
|
|
|
81
83
|
echo "✅ GitHub issue #$ISSUE_NUMBER closed successfully"
|
|
82
84
|
|
|
85
|
+
# Update status line cache (increment no longer open)
|
|
86
|
+
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
87
|
+
bash "$HOOK_DIR/lib/update-status-line.sh" 2>/dev/null || true
|
|
88
|
+
|
|
83
89
|
exit 0
|
|
@@ -896,5 +896,9 @@ EOF
|
|
|
896
896
|
# Run main function
|
|
897
897
|
main
|
|
898
898
|
|
|
899
|
+
# Update status line cache (new increment created)
|
|
900
|
+
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
901
|
+
bash "$HOOK_DIR/lib/update-status-line.sh" 2>/dev/null || true
|
|
902
|
+
|
|
899
903
|
# Always return success (non-blocking hook)
|
|
900
904
|
exit 0
|
|
@@ -139,5 +139,9 @@ echo "$COMMENT" | gh issue comment "$GITHUB_ISSUE" --body-file - 2>&1 | tee -a "
|
|
|
139
139
|
|
|
140
140
|
echo "[$(date)] ✅ Status change synced to GitHub" >> "$DEBUG_LOG" 2>/dev/null || true
|
|
141
141
|
|
|
142
|
+
# Update status line cache (status changed - may affect which increment is "current")
|
|
143
|
+
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
144
|
+
bash "$HOOK_DIR/lib/update-status-line.sh" 2>/dev/null || true
|
|
145
|
+
|
|
142
146
|
# Return success (non-blocking)
|
|
143
147
|
exit 0
|
|
@@ -197,6 +197,84 @@ if echo "$PROMPT" | grep -qE "/(specweave:)?(done|validate|progress|do)"; then
|
|
|
197
197
|
fi
|
|
198
198
|
fi
|
|
199
199
|
|
|
200
|
+
# ==============================================================================
|
|
201
|
+
# SPEC SYNC CHECK: Detect spec.md changes and warn about sync needed
|
|
202
|
+
# ==============================================================================
|
|
203
|
+
|
|
204
|
+
# Check if spec.md was modified after plan.md (requires sync)
|
|
205
|
+
if [[ -d ".specweave/increments" ]]; then
|
|
206
|
+
# Find active increment
|
|
207
|
+
ACTIVE_INCREMENT_FOR_SYNC=$(find .specweave/increments -mindepth 1 -maxdepth 1 -type d | while read increment_dir; do
|
|
208
|
+
metadata="$increment_dir/metadata.json"
|
|
209
|
+
if [[ -f "$metadata" ]]; then
|
|
210
|
+
status=$(node -e "
|
|
211
|
+
try {
|
|
212
|
+
const data = JSON.parse(require('fs').readFileSync('$metadata', 'utf-8'));
|
|
213
|
+
if (data.status === 'active') {
|
|
214
|
+
console.log('$(basename "$increment_dir")');
|
|
215
|
+
}
|
|
216
|
+
} catch (e) {}
|
|
217
|
+
" 2>/dev/null)
|
|
218
|
+
|
|
219
|
+
if [[ -n "$status" ]]; then
|
|
220
|
+
echo "$status"
|
|
221
|
+
break
|
|
222
|
+
fi
|
|
223
|
+
fi
|
|
224
|
+
done)
|
|
225
|
+
|
|
226
|
+
if [[ -n "$ACTIVE_INCREMENT_FOR_SYNC" ]]; then
|
|
227
|
+
# Check if SpecSyncManager detects changes
|
|
228
|
+
if command -v node >/dev/null 2>&1 && [[ -f "dist/src/core/increment/spec-sync-manager.js" ]]; then
|
|
229
|
+
SYNC_CHECK=$(node -e "
|
|
230
|
+
try {
|
|
231
|
+
const { SpecSyncManager } = require('./dist/src/core/increment/spec-sync-manager.js');
|
|
232
|
+
const manager = new SpecSyncManager(process.cwd());
|
|
233
|
+
const detection = manager.detectSpecChange('$ACTIVE_INCREMENT_FOR_SYNC');
|
|
234
|
+
|
|
235
|
+
if (detection.specChanged) {
|
|
236
|
+
const message = manager.formatSyncMessage(detection);
|
|
237
|
+
console.log(JSON.stringify({ needsSync: true, message }));
|
|
238
|
+
} else {
|
|
239
|
+
console.log(JSON.stringify({ needsSync: false }));
|
|
240
|
+
}
|
|
241
|
+
} catch (e) {
|
|
242
|
+
console.log(JSON.stringify({ needsSync: false, error: e.message }));
|
|
243
|
+
}
|
|
244
|
+
" 2>/dev/null || echo '{"needsSync":false}')
|
|
245
|
+
|
|
246
|
+
NEEDS_SYNC=$(echo "$SYNC_CHECK" | node -e "
|
|
247
|
+
try {
|
|
248
|
+
const data = JSON.parse(require('fs').readFileSync(0, 'utf-8'));
|
|
249
|
+
console.log(data.needsSync || false);
|
|
250
|
+
} catch (e) {
|
|
251
|
+
console.log(false);
|
|
252
|
+
}
|
|
253
|
+
")
|
|
254
|
+
|
|
255
|
+
if [[ "$NEEDS_SYNC" == "true" ]]; then
|
|
256
|
+
SYNC_MESSAGE=$(echo "$SYNC_CHECK" | node -e "
|
|
257
|
+
try {
|
|
258
|
+
const data = JSON.parse(require('fs').readFileSync(0, 'utf-8'));
|
|
259
|
+
console.log(data.message || '');
|
|
260
|
+
} catch (e) {
|
|
261
|
+
console.log('');
|
|
262
|
+
}
|
|
263
|
+
")
|
|
264
|
+
|
|
265
|
+
# Show sync warning (don't block, just warn)
|
|
266
|
+
cat <<EOF
|
|
267
|
+
{
|
|
268
|
+
"decision": "approve",
|
|
269
|
+
"systemMessage": "$SYNC_MESSAGE"
|
|
270
|
+
}
|
|
271
|
+
EOF
|
|
272
|
+
exit 0
|
|
273
|
+
fi
|
|
274
|
+
fi
|
|
275
|
+
fi
|
|
276
|
+
fi
|
|
277
|
+
|
|
200
278
|
# ==============================================================================
|
|
201
279
|
# CONTEXT INJECTION: Add current increment status
|
|
202
280
|
# ==============================================================================
|