claude-flow-novice 2.15.2 → 2.15.4
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/cfn-extras/skills/advanced-features/cfn-agent-swap/recommend-swap.sh +59 -59
- package/.claude/cfn-extras/skills/analytics/cfn-improvement-recommender/recommend-improvements.sh +91 -91
- package/.claude/cfn-extras/skills/analytics/cfn-pattern-extraction/extract-patterns.sh +79 -79
- package/.claude/cfn-extras/skills/analytics/cfn-retrospective-report/generate-report.sh +100 -100
- package/.claude/cfn-extras/skills/analytics/cfn-telemetry/start-telemetry.sh +110 -110
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/add-bullet.sh +145 -145
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/log-merge.sh +67 -67
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/monitor-injection-performance.sh +137 -137
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/optimize-injection-pipeline.sh +168 -168
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/query-reflections.sh +35 -35
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/store-reflection.sh +45 -45
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/track-ab-test.sh +41 -41
- package/.claude/cfn-extras/skills/deprecated/cfn-ace-system/update-reflection.sh +41 -41
- package/.claude/cfn-extras/skills/deprecated/cfn-cli-setup/validate-cli-environment.sh +191 -191
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/create-campaign.sh +231 -231
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/get-campaign-performance.sh +190 -190
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/pause-campaign.sh +142 -142
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/set-budget.sh +181 -181
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/update-bid-strategy.sh +133 -133
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/get-conversation-history.sh +121 -121
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/qualify-lead.sh +156 -156
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/schedule-demo.sh +181 -181
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/send-message.sh +137 -137
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/transfer-to-human.sh +179 -179
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/create-campaign.sh +183 -183
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/get-delivery-status.sh +139 -139
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/opt-out.sh +150 -150
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/schedule-campaign.sh +187 -187
- package/.claude/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/send-sms.sh +181 -181
- package/.claude/cfn-extras/skills/ui-portal/cfn-web-portal/test-web-portal-skill.sh +50 -50
- package/.claude/cfn-extras/skills/ui-portal/cfn-web-portal/validate-deployment.sh +84 -84
- package/.claude/cfn-extras/skills/utility/cfn-environment-sanitization/sanitize-environment.sh +243 -243
- package/.claude/commands/cfn-loop-cli.md +16 -2
- package/.claude/commands/switch-api.md +31 -10
- package/.claude/hooks/cfn-BACKUP_USAGE.md +243 -243
- package/.claude/hooks/cfn-invoke-security-validation.sh +69 -69
- package/.claude/hooks/cfn-lint-sql-injection.sh +61 -0
- package/.claude/hooks/cfn-post-edit-cfn-retrospective.sh +109 -78
- package/.claude/hooks/cfn-post-edit.config.json +44 -44
- package/.claude/hooks/cfn-pre-edit-security-warning.sh +40 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +22 -24
- package/.claude/skills/cfn-docker-agent-spawning/SKILL.md +28 -4
- package/.claude/skills/cfn-docker-agent-spawning/spawn-agent.sh +3 -1
- package/.claude/skills/cfn-docker-loop-orchestration/orchestrate.sh +224 -20
- package/.claude/skills/cfn-hybrid-routing/check-dependencies.sh +51 -51
- package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +550 -46
- package/.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +277 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +184 -23
- package/.claude/skills/cfn-loop-orchestration/security_utils.sh +24 -0
- package/.claude/skills/cfn-loop-orchestration/test-iteration-context-injection.sh +366 -0
- package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +252 -252
- package/.claude/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +319 -0
- package/.claude/skills/cfn-redis-coordination/agent-log.sh +4 -0
- package/.claude/skills/cfn-redis-coordination/agent-log.sh.bak +124 -0
- package/.claude/skills/cfn-redis-coordination/agent-recovery.sh +74 -74
- package/.claude/skills/cfn-redis-coordination/collect-confidence-scores.sh +30 -0
- package/.claude/skills/cfn-redis-coordination/get-context.sh +145 -112
- package/.claude/skills/cfn-redis-coordination/get-success-criteria.sh +54 -0
- package/.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh +3 -0
- package/.claude/skills/cfn-redis-coordination/redis-cli-wrapper.sh +24 -3
- package/.claude/skills/cfn-redis-coordination/redis-functions.sh +33 -0
- package/.claude/skills/cfn-redis-coordination/report-completion.sh +24 -31
- package/.claude/skills/cfn-redis-coordination/store-context.sh +4 -0
- package/.claude/skills/cfn-redis-coordination/store-success-criteria.sh +85 -0
- package/.claude/skills/cfn-redis-coordination/update-all-scripts.sh +67 -0
- package/.claude/skills/cfn-sqlite-memory/ttl-cleanup.sh +17 -25
- package/.claude/skills/cfn-transparency-middleware/middleware-config.sh +28 -28
- package/.claude/skills/cfn-transparency-middleware/performance-benchmark.sh +78 -78
- package/.claude/skills/cfn-transparency-middleware/test-e2e.sh +15 -0
- package/.claude/skills/cfn-transparency-middleware/test-integration.sh +161 -161
- package/.claude/skills/cfn-transparency-middleware/test-transparency-skill.sh +367 -367
- package/.claude/skills/cfn-transparency-middleware/tests/input-validation.sh +107 -92
- package/.claude/skills/cfn-transparency-middleware/wrap-agent.sh +131 -131
- package/README.md +116 -475
- package/claude-assets/agents/cfn-dev-team/README.md +103 -0
- package/claude-assets/agents/cfn-dev-team/architecture/goal-planner.md +1 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +77 -15
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +355 -6
- package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +82 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +82 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +77 -15
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +99 -12
- package/claude-assets/agents/cfn-dev-team/dev-ops/github-commit-agent.md +1 -1
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +97 -0
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +20 -1
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +97 -0
- package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +110 -13
- package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +106 -15
- package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +115 -11
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +94 -7
- package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +87 -9
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +85 -7
- package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +160 -28
- package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +101 -19
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +108 -14
- package/claude-assets/agents/cfn-dev-team/reviewers/{reviewer.md → code-reviewer.md} +95 -8
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +107 -7
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +98 -7
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +95 -7
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +136 -9
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +108 -1
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +107 -13
- package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +737 -0
- package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +828 -0
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +106 -7
- package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +77 -0
- package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +684 -0
- package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +110 -1
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +94 -7
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +1 -3
- package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +87 -13
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +103 -7
- package/claude-assets/agents/cfn-dev-team/utility/researcher.md +1 -3
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +94 -7
- package/claude-assets/agents/docker-coordinators/cfn-docker-v3-coordinator.md +46 -0
- package/claude-assets/agents/project-only-agents/npm-package-specialist.md +1 -1
- package/claude-assets/cfn-extras/skills/advanced-features/cfn-agent-swap/recommend-swap.sh +59 -59
- package/claude-assets/cfn-extras/skills/analytics/cfn-improvement-recommender/recommend-improvements.sh +91 -91
- package/claude-assets/cfn-extras/skills/analytics/cfn-pattern-extraction/extract-patterns.sh +79 -79
- package/claude-assets/cfn-extras/skills/analytics/cfn-retrospective-report/generate-report.sh +100 -100
- package/claude-assets/cfn-extras/skills/analytics/cfn-telemetry/start-telemetry.sh +110 -110
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/add-bullet.sh +145 -145
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/log-merge.sh +67 -67
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/monitor-injection-performance.sh +137 -137
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/optimize-injection-pipeline.sh +168 -168
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/query-reflections.sh +35 -35
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/store-reflection.sh +45 -45
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/track-ab-test.sh +41 -41
- package/claude-assets/cfn-extras/skills/deprecated/cfn-ace-system/update-reflection.sh +41 -41
- package/claude-assets/cfn-extras/skills/deprecated/cfn-cli-setup/validate-cli-environment.sh +191 -191
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/create-campaign.sh +231 -231
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/get-campaign-performance.sh +190 -190
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/pause-campaign.sh +142 -142
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/set-budget.sh +181 -181
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-ad-campaigns/operations/update-bid-strategy.sh +133 -133
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/get-conversation-history.sh +121 -121
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/qualify-lead.sh +156 -156
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/schedule-demo.sh +181 -181
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/send-message.sh +137 -137
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-chatbot-conversations/operations/transfer-to-human.sh +179 -179
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/create-campaign.sh +183 -183
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/get-delivery-status.sh +139 -139
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/opt-out.sh +150 -150
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/schedule-campaign.sh +187 -187
- package/claude-assets/cfn-extras/skills/marketing/cfn-marketing-sms-campaigns/operations/send-sms.sh +181 -181
- package/claude-assets/cfn-extras/skills/ui-portal/cfn-web-portal/test-web-portal-skill.sh +50 -50
- package/claude-assets/cfn-extras/skills/ui-portal/cfn-web-portal/validate-deployment.sh +84 -84
- package/claude-assets/cfn-extras/skills/utility/cfn-environment-sanitization/sanitize-environment.sh +243 -243
- package/claude-assets/commands/cfn-loop-cli.md +16 -2
- package/claude-assets/commands/switch-api.md +31 -10
- package/claude-assets/hooks/cfn-BACKUP_USAGE.md +243 -243
- package/claude-assets/hooks/cfn-invoke-security-validation.sh +69 -69
- package/claude-assets/hooks/cfn-lint-sql-injection.sh +61 -0
- package/claude-assets/hooks/cfn-post-edit-cfn-retrospective.sh +109 -78
- package/claude-assets/hooks/cfn-post-edit.config.json +44 -44
- package/claude-assets/hooks/cfn-post-execution/memory-cleanup.sh +19 -19
- package/claude-assets/hooks/cfn-pre-edit-security-warning.sh +40 -0
- package/claude-assets/hooks/cfn-pre-execution/memory-check.sh +19 -19
- package/claude-assets/hooks/detect-hardcoded-credentials.sh +212 -0
- package/claude-assets/skills/SKILL_TEMPLATE.md +774 -0
- package/claude-assets/skills/agent-lifecycle/execute-lifecycle-hook.sh +543 -572
- package/claude-assets/skills/agent-lifecycle/simple-audit.sh +57 -30
- package/claude-assets/skills/agent-template-generator/SKILL.md +440 -0
- package/claude-assets/skills/agent-template-generator/generate-agent.sh +405 -0
- package/claude-assets/skills/agent-validation-linter/SKILL.md +589 -0
- package/claude-assets/skills/agent-validation-linter/lint-agents.sh +271 -0
- package/claude-assets/skills/bootstrap/bash-fundamentals.md +786 -0
- package/claude-assets/skills/bootstrap/database-connection.md +464 -0
- package/claude-assets/skills/bootstrap/error-handling.md +580 -0
- package/claude-assets/skills/bootstrap/file-operations.md +699 -0
- package/claude-assets/skills/bootstrap/skill-loader.md +616 -0
- package/claude-assets/skills/bootstrap/sqlite-params.sh +287 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +22 -24
- package/claude-assets/skills/cfn-automatic-memory-persistence/persist-agent-output.sh +48 -48
- package/claude-assets/skills/cfn-automatic-memory-persistence/query-agent-history.sh +34 -34
- package/claude-assets/skills/cfn-automatic-memory-persistence/test-memory-persistence.sh +17 -16
- package/claude-assets/skills/cfn-deliverable-validation/confidence-calculator.sh +261 -261
- package/claude-assets/skills/cfn-deployment/SKILL.md +293 -0
- package/claude-assets/skills/cfn-deployment/execute.sh +21 -0
- package/claude-assets/skills/cfn-docker-agent-spawning/SKILL.md +28 -4
- package/claude-assets/skills/cfn-docker-agent-spawning/spawn-agent.sh +3 -1
- package/claude-assets/skills/cfn-docker-loop-orchestration/orchestrate.sh +224 -20
- package/claude-assets/skills/cfn-environment-sanitization/sanitize-environment.sh +38 -0
- package/claude-assets/skills/cfn-error-batching-strategy/lib/core-functions.sh +47 -47
- package/claude-assets/skills/cfn-expert-update/update-expert.sh +345 -345
- package/claude-assets/skills/cfn-file-operations/SKILL.md +290 -0
- package/claude-assets/skills/cfn-file-operations/execute.sh +129 -0
- package/claude-assets/skills/cfn-file-operations/lib/atomic-write.sh +294 -0
- package/claude-assets/skills/cfn-file-operations/lib/lock.sh +361 -0
- package/claude-assets/skills/cfn-file-operations/test.sh +369 -0
- package/claude-assets/skills/cfn-hybrid-routing/check-dependencies.sh +51 -51
- package/claude-assets/skills/cfn-intervention-detector/detect-intervention.sh +110 -110
- package/claude-assets/skills/cfn-intervention-orchestrator/execute-intervention.sh +58 -58
- package/claude-assets/skills/cfn-log-operations/SKILL.md +308 -0
- package/claude-assets/skills/cfn-log-operations/execute.sh +420 -0
- package/claude-assets/skills/cfn-log-operations/lib/rotate.sh +406 -0
- package/claude-assets/skills/cfn-log-operations/lib/search.sh +448 -0
- package/claude-assets/skills/cfn-log-operations/test.sh +394 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/gate-check.sh +550 -46
- package/claude-assets/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +277 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +184 -23
- package/claude-assets/skills/cfn-loop-orchestration/security_utils.sh +24 -0
- package/claude-assets/skills/cfn-loop-orchestration/test-iteration-context-injection.sh +366 -0
- package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +252 -252
- package/claude-assets/skills/cfn-loop2-output-processing/process-validator-output.sh +275 -275
- package/claude-assets/skills/cfn-memory-management/check-memory.sh +159 -159
- package/claude-assets/skills/cfn-memory-management/cleanup-memory.sh +196 -196
- package/claude-assets/skills/cfn-node-heap-sizer/task-mode-heap-limiter.sh +325 -325
- package/claude-assets/skills/cfn-parameterized-queries/SKILL.md +339 -0
- package/claude-assets/skills/cfn-playbook/query-playbook.sh +19 -15
- package/claude-assets/skills/cfn-playbook/update-playbook.sh +25 -14
- package/claude-assets/skills/cfn-playbook-auto-update/auto-update-playbook.sh +85 -85
- package/claude-assets/skills/cfn-process-instrumentation/instrument-process.sh +44 -0
- package/claude-assets/skills/cfn-promotion/SKILL.md +305 -0
- package/claude-assets/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +319 -0
- package/claude-assets/skills/cfn-redis-coordination/agent-log.sh +4 -0
- package/claude-assets/skills/cfn-redis-coordination/agent-log.sh.bak +124 -0
- package/claude-assets/skills/cfn-redis-coordination/agent-recovery.sh +74 -74
- package/claude-assets/skills/cfn-redis-coordination/collect-confidence-scores.sh +30 -0
- package/claude-assets/skills/cfn-redis-coordination/get-context.sh +145 -112
- package/claude-assets/skills/cfn-redis-coordination/get-success-criteria.sh +54 -0
- package/claude-assets/skills/cfn-redis-coordination/invoke-waiting-mode.sh +3 -0
- package/claude-assets/skills/cfn-redis-coordination/redis-cli-wrapper.sh +24 -3
- package/claude-assets/skills/cfn-redis-coordination/redis-functions.sh +33 -0
- package/claude-assets/skills/cfn-redis-coordination/report-completion.sh +24 -31
- package/claude-assets/skills/cfn-redis-coordination/store-context.sh +4 -0
- package/claude-assets/skills/cfn-redis-coordination/store-success-criteria.sh +85 -0
- package/claude-assets/skills/cfn-redis-coordination/update-all-scripts.sh +67 -0
- package/claude-assets/skills/cfn-scope-simplifier/simplify-scope.sh +67 -67
- package/claude-assets/skills/cfn-skill-loader/SKILL.md +466 -0
- package/claude-assets/skills/cfn-skill-loader/execute.sh +344 -0
- package/claude-assets/skills/cfn-specialist-injection/recommend-specialist.sh +56 -56
- package/claude-assets/skills/cfn-sqlite-memory/ttl-cleanup.sh +17 -25
- package/claude-assets/skills/cfn-standardized-error-handling/capture-agent-error.sh +86 -86
- package/claude-assets/skills/cfn-standardized-error-handling/test-error-handling.sh +165 -165
- package/claude-assets/skills/cfn-task-audit/get-audit-data.sh +42 -21
- package/claude-assets/skills/cfn-task-audit/store-task-audit.sh +17 -10
- package/claude-assets/skills/cfn-task-config-init/initialize-config.sh +264 -264
- package/claude-assets/skills/cfn-task-decomposition/task-decomposer.sh +278 -278
- package/claude-assets/skills/cfn-test-runner/detect-regressions.sh +17 -14
- package/claude-assets/skills/cfn-test-runner/detect-regressions.sh.backup-1763392821 +55 -0
- package/claude-assets/skills/cfn-test-runner/store-benchmarks.sh +17 -19
- package/claude-assets/skills/cfn-transparency-middleware/middleware-config.sh +28 -28
- package/claude-assets/skills/cfn-transparency-middleware/performance-benchmark.sh +78 -78
- package/claude-assets/skills/cfn-transparency-middleware/test-e2e.sh +15 -0
- package/claude-assets/skills/cfn-transparency-middleware/test-integration.sh +161 -161
- package/claude-assets/skills/cfn-transparency-middleware/test-transparency-skill.sh +367 -367
- package/claude-assets/skills/cfn-transparency-middleware/tests/input-validation.sh +107 -92
- package/claude-assets/skills/cfn-transparency-middleware/wrap-agent.sh +131 -131
- package/claude-assets/skills/cfn-utilities/SKILL.md +237 -0
- package/claude-assets/skills/cfn-utilities/execute.sh +32 -0
- package/claude-assets/skills/cfn-utilities/lib/errors.sh +56 -0
- package/claude-assets/skills/cfn-utilities/lib/file-ops.sh +164 -0
- package/claude-assets/skills/cfn-utilities/lib/logging.sh +77 -0
- package/claude-assets/skills/cfn-utilities/lib/retry.sh +127 -0
- package/claude-assets/skills/cfn-utilities/test.sh +317 -0
- package/claude-assets/skills/docker-build/SKILL.md +96 -203
- package/claude-assets/skills/docker-build/build.sh +73 -73
- package/claude-assets/skills/integration/agent-handoff.sh +492 -0
- package/claude-assets/skills/integration/file-operations.sh +414 -0
- package/claude-assets/skills/json-validation/SKILL.md +431 -0
- package/claude-assets/skills/json-validation/test-validate-success-criteria.sh +421 -0
- package/claude-assets/skills/json-validation/validate-success-criteria.sh +197 -0
- package/claude-assets/skills/redis-coordination/validate-parameters.sh +34 -0
- package/claude-assets/skills/workflow-codification/APPROVAL_WORKFLOW.md +806 -0
- package/claude-assets/skills/workflow-codification/COST_TRACKING.md +637 -0
- package/claude-assets/skills/workflow-codification/DEPLOY_QUICK_REFERENCE.md +106 -0
- package/claude-assets/skills/workflow-codification/EDGE_CASE_TRACKING.md +404 -0
- package/claude-assets/skills/workflow-codification/PROPAGATE_UPDATE_QUICK_REFERENCE.md +366 -0
- package/claude-assets/skills/workflow-codification/README_PHASE4.md +457 -0
- package/claude-assets/skills/workflow-codification/SKILL.md +110 -0
- package/claude-assets/skills/workflow-codification/analyze-patterns.sh +899 -0
- package/claude-assets/skills/workflow-codification/approval-workflow.sh +514 -0
- package/claude-assets/skills/workflow-codification/deploy-approved-skill.sh +481 -0
- package/claude-assets/skills/workflow-codification/deploy-approved-skill.sh.backup-1763392820 +512 -0
- package/claude-assets/skills/workflow-codification/generate-skill-update.sh +525 -0
- package/claude-assets/skills/workflow-codification/lib/security-utils.sh +204 -0
- package/claude-assets/skills/workflow-codification/propagate-skill-update.sh +648 -0
- package/claude-assets/skills/workflow-codification/propagate-skill-update.sh.backup-1763392820 +664 -0
- package/claude-assets/skills/workflow-codification/review-skill.sh +643 -0
- package/claude-assets/skills/workflow-codification/templates/email-notification.txt +114 -0
- package/claude-assets/skills/workflow-codification/templates/slack-notification.md +85 -0
- package/claude-assets/skills/workflow-codification/test-integration.sh +296 -0
- package/claude-assets/skills/workflow-codification/test-metadata-update.sh +350 -0
- package/claude-assets/skills/workflow-codification/track-cost-savings.sh +486 -0
- package/claude-assets/skills/workflow-codification/track-cost-savings.sh.backup-1763392821 +445 -0
- package/claude-assets/skills/workflow-codification/track-edge-case.sh +290 -0
- package/claude-assets/skills/workflow-codification/workflow-codification.db +0 -0
- package/dist/ace/ace-curator.js +10 -2
- package/dist/ace/ace-curator.js.map +1 -1
- package/dist/ace/ace-generator.js +4 -0
- package/dist/ace/ace-generator.js.map +1 -1
- package/dist/ace/ace-reflector.js +1 -1
- package/dist/ace/ace-reflector.js.map +1 -1
- package/dist/ace/context-injection.js +24 -2
- package/dist/ace/context-injection.js.map +1 -1
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/agents/task-agent-integration.js +1 -1
- package/dist/agents/task-agent-integration.js.map +1 -1
- package/dist/api/health-endpoints.js +390 -0
- package/dist/api/health-endpoints.js.map +1 -0
- package/dist/cli/agent-executor.js +4 -1
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/cli/agent-prompt-builder.js +89 -1
- package/dist/cli/agent-prompt-builder.js.map +1 -1
- package/dist/cli/agent-spawn.js +130 -37
- package/dist/cli/agent-spawn.js.map +1 -1
- package/dist/cli/config-manager.js +91 -109
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/cli/skill-cache-validator.js +412 -0
- package/dist/cli/skill-cache-validator.js.map +1 -0
- package/dist/cli/skill-cli.js +991 -0
- package/dist/cli/skill-cli.js.map +1 -0
- package/dist/cli/skill-execution-logger.js +284 -0
- package/dist/cli/skill-execution-logger.js.map +1 -0
- package/dist/cli/skill-loader.js +457 -0
- package/dist/cli/skill-loader.js.map +1 -0
- package/dist/coordination/event-bus.js +2 -2
- package/dist/coordination/event-bus.js.map +1 -1
- package/dist/coordination/fleet-manager.js +1 -1
- package/dist/coordination/fleet-manager.js.map +1 -1
- package/dist/coordination/index.js +23 -9
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/types/fleet-manager.types.js.map +1 -1
- package/dist/db/migration-manager.js +483 -0
- package/dist/db/migration-manager.js.map +1 -0
- package/dist/db/skills-query.js +535 -0
- package/dist/db/skills-query.js.map +1 -0
- package/dist/integration/DatabaseHandoff.js +507 -0
- package/dist/integration/DatabaseHandoff.js.map +1 -0
- package/dist/integration/StandardAdapter.js +291 -0
- package/dist/integration/StandardAdapter.js.map +1 -0
- package/dist/jobs/edge-case-analyzer.js +367 -0
- package/dist/jobs/edge-case-analyzer.js.map +1 -0
- package/dist/jobs/promotion-sla-enforcer.js +288 -0
- package/dist/jobs/promotion-sla-enforcer.js.map +1 -0
- package/dist/lib/agent-output-parser.js +518 -0
- package/dist/lib/agent-output-parser.js.map +1 -0
- package/dist/lib/agent-output-validator.js +950 -0
- package/dist/lib/agent-output-validator.js.map +1 -0
- package/dist/lib/agent-workspace.js +281 -0
- package/dist/lib/agent-workspace.js.map +1 -0
- package/dist/lib/artifact-registry.js +443 -0
- package/dist/lib/artifact-registry.js.map +1 -0
- package/dist/lib/atomic-file-writer.js +377 -0
- package/dist/lib/atomic-file-writer.js.map +1 -0
- package/dist/lib/backup-manager.js +779 -0
- package/dist/lib/backup-manager.js.map +1 -0
- package/dist/lib/checkpoint-manager.js +837 -0
- package/dist/lib/checkpoint-manager.js.map +1 -0
- package/dist/lib/circuit-breaker.js +340 -0
- package/dist/lib/circuit-breaker.js.map +1 -0
- package/dist/lib/completion-signal-handler.js +243 -0
- package/dist/lib/completion-signal-handler.js.map +1 -0
- package/dist/lib/config-manager.js +312 -0
- package/dist/lib/config-manager.js.map +1 -0
- package/dist/lib/config-migrator.js +386 -0
- package/dist/lib/config-migrator.js.map +1 -0
- package/dist/lib/config-validator.js +687 -0
- package/dist/lib/config-validator.js.map +1 -0
- package/dist/lib/correlation-cache.js +311 -0
- package/dist/lib/correlation-cache.js.map +1 -0
- package/dist/lib/correlation.js +263 -0
- package/dist/lib/correlation.js.map +1 -0
- package/dist/lib/database-service/connection-pool-manager.js +520 -0
- package/dist/lib/database-service/connection-pool-manager.js.map +1 -0
- package/dist/lib/database-service/correlation.js +329 -0
- package/dist/lib/database-service/correlation.js.map +1 -0
- package/dist/lib/database-service/errors.js +120 -0
- package/dist/lib/database-service/errors.js.map +1 -0
- package/dist/lib/database-service/index.js +168 -0
- package/dist/lib/database-service/index.js.map +1 -0
- package/dist/lib/database-service/postgres-adapter.js +526 -0
- package/dist/lib/database-service/postgres-adapter.js.map +1 -0
- package/dist/lib/database-service/redis-adapter.js +360 -0
- package/dist/lib/database-service/redis-adapter.js.map +1 -0
- package/dist/lib/database-service/sqlite-adapter.js +544 -0
- package/dist/lib/database-service/sqlite-adapter.js.map +1 -0
- package/dist/lib/database-service/transaction-manager.js +773 -0
- package/dist/lib/database-service/transaction-manager.js.map +1 -0
- package/dist/lib/database-service/types.js +23 -0
- package/dist/lib/database-service/types.js.map +1 -0
- package/dist/lib/deadlock-resolver.js +292 -0
- package/dist/lib/deadlock-resolver.js.map +1 -0
- package/dist/lib/distributed-lock.js +451 -0
- package/dist/lib/distributed-lock.js.map +1 -0
- package/dist/lib/edge-case-deduplicator.js +227 -0
- package/dist/lib/edge-case-deduplicator.js.map +1 -0
- package/dist/lib/encryption-manager.js +322 -0
- package/dist/lib/encryption-manager.js.map +1 -0
- package/dist/lib/error-aggregator.js +234 -0
- package/dist/lib/error-aggregator.js.map +1 -0
- package/dist/lib/errors.js +287 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/file-lock-manager.js +578 -0
- package/dist/lib/file-lock-manager.js.map +1 -0
- package/dist/lib/file-operations.js +367 -0
- package/dist/lib/file-operations.js.map +1 -0
- package/dist/lib/idempotent-write.js +237 -0
- package/dist/lib/idempotent-write.js.map +1 -0
- package/dist/lib/integration-schema-validator.js +522 -0
- package/dist/lib/integration-schema-validator.js.map +1 -0
- package/dist/lib/lock-health-monitor.js +298 -0
- package/dist/lib/lock-health-monitor.js.map +1 -0
- package/dist/lib/log-shipper.js +422 -0
- package/dist/lib/log-shipper.js.map +1 -0
- package/dist/lib/logging.js +146 -0
- package/dist/lib/logging.js.map +1 -0
- package/dist/lib/message-deduplicator.js +439 -0
- package/dist/lib/message-deduplicator.js.map +1 -0
- package/dist/lib/multi-system-query.js +604 -0
- package/dist/lib/multi-system-query.js.map +1 -0
- package/dist/lib/orphan-detector.js +332 -0
- package/dist/lib/orphan-detector.js.map +1 -0
- package/dist/lib/password-generator.js +166 -0
- package/dist/lib/password-generator.js.map +1 -0
- package/dist/lib/path-validator.js +429 -0
- package/dist/lib/path-validator.js.map +1 -0
- package/dist/lib/query-translator.js +905 -0
- package/dist/lib/query-translator.js.map +1 -0
- package/dist/lib/queue-recovery.js +469 -0
- package/dist/lib/queue-recovery.js.map +1 -0
- package/dist/lib/redis-queue-manager.js +512 -0
- package/dist/lib/redis-queue-manager.js.map +1 -0
- package/dist/lib/reflection-archiver.js +272 -0
- package/dist/lib/reflection-archiver.js.map +1 -0
- package/dist/lib/retry-manager.js +453 -0
- package/dist/lib/retry-manager.js.map +1 -0
- package/dist/lib/retry.js +262 -0
- package/dist/lib/retry.js.map +1 -0
- package/dist/lib/schema-transform.js +695 -0
- package/dist/lib/schema-transform.js.map +1 -0
- package/dist/lib/schema-validator.js +491 -0
- package/dist/lib/schema-validator.js.map +1 -0
- package/dist/lib/skill-cache.js +297 -0
- package/dist/lib/skill-cache.js.map +1 -0
- package/dist/lib/skill-content-manager.js +337 -0
- package/dist/lib/skill-content-manager.js.map +1 -0
- package/dist/lib/skill-frontmatter-parser.js +237 -0
- package/dist/lib/skill-frontmatter-parser.js.map +1 -0
- package/dist/lib/skill-git-integration.js +275 -0
- package/dist/lib/skill-git-integration.js.map +1 -0
- package/dist/lib/skill-markdown-validator.js +396 -0
- package/dist/lib/skill-markdown-validator.js.map +1 -0
- package/dist/lib/skill-output-parser.js +312 -0
- package/dist/lib/skill-output-parser.js.map +1 -0
- package/dist/lib/unified-query-api.js +467 -0
- package/dist/lib/unified-query-api.js.map +1 -0
- package/dist/middleware/auth-middleware.js +350 -0
- package/dist/middleware/auth-middleware.js.map +1 -0
- package/dist/middleware/schema-validation.js +347 -0
- package/dist/middleware/schema-validation.js.map +1 -0
- package/dist/providers/anthropic-provider.js +1 -1
- package/dist/providers/anthropic-provider.js.map +1 -1
- package/dist/providers/provider-factory.js +2 -2
- package/dist/providers/provider-factory.js.map +1 -1
- package/dist/services/edge-case-analyzer.js +321 -0
- package/dist/services/edge-case-analyzer.js.map +1 -0
- package/dist/services/edge-case-deduplicator.js +266 -0
- package/dist/services/edge-case-deduplicator.js.map +1 -0
- package/dist/services/edge-case-detector.js +337 -0
- package/dist/services/edge-case-detector.js.map +1 -0
- package/dist/services/edge-case-tracker.js +547 -0
- package/dist/services/edge-case-tracker.js.map +1 -0
- package/dist/services/health-check-system.js +586 -0
- package/dist/services/health-check-system.js.map +1 -0
- package/dist/services/metrics-logger.js +412 -0
- package/dist/services/metrics-logger.js.map +1 -0
- package/dist/services/patch-generator.js +378 -0
- package/dist/services/patch-generator.js.map +1 -0
- package/dist/services/patch-validator.js +337 -0
- package/dist/services/patch-validator.js.map +1 -0
- package/dist/services/performance-monitor.js +811 -0
- package/dist/services/performance-monitor.js.map +1 -0
- package/dist/services/promotion-pipeline.js +918 -0
- package/dist/services/promotion-pipeline.js.map +1 -0
- package/dist/services/promotion-validator.js +394 -0
- package/dist/services/promotion-validator.js.map +1 -0
- package/dist/services/reflection-logger.js +388 -0
- package/dist/services/reflection-logger.js.map +1 -0
- package/dist/services/skill-deployment.js +472 -0
- package/dist/services/skill-deployment.js.map +1 -0
- package/dist/services/skill-loader.js +427 -0
- package/dist/services/skill-loader.js.map +1 -0
- package/dist/services/skill-promotion.js +372 -0
- package/dist/services/skill-promotion.js.map +1 -0
- package/dist/services/skill-validator.js +454 -0
- package/dist/services/skill-validator.js.map +1 -0
- package/dist/services/skill-versioning.js +244 -0
- package/dist/services/skill-versioning.js.map +1 -0
- package/dist/services/workspace-supervisor.js +597 -0
- package/dist/services/workspace-supervisor.js.map +1 -0
- package/dist/types/agent-output.js +44 -0
- package/dist/types/agent-output.js.map +1 -0
- package/dist/types/config.js +28 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/edge-case.js +45 -0
- package/dist/types/edge-case.js.map +1 -0
- package/package.json +201 -176
- package/readme/README.md +19 -4
- package/scripts/artifact-cleanup.sh +392 -0
- package/scripts/backup-cleanup.sh +627 -0
- package/scripts/cleanup-workspaces.sh +412 -0
- package/scripts/cleanup-yaml-configs.sh +141 -0
- package/scripts/deploy-approved-skills.sh +263 -0
- package/scripts/deploy-production.sh +355 -355
- package/scripts/docker-playwright-fix.sh +311 -311
- package/scripts/docker-rebuild-all-agents.sh +127 -127
- package/scripts/health-check.sh +447 -0
- package/scripts/log-aggregator.sh +554 -0
- package/scripts/log-monitor.sh +629 -0
- package/scripts/manage-agent-workspaces.sh +434 -0
- package/scripts/memory-leak-prevention.sh +305 -305
- package/scripts/migrate-artifacts.sh +563 -0
- package/scripts/migrate-schema.sh +533 -0
- package/scripts/migrate-yaml-to-json.sh +465 -0
- package/scripts/promote-staged-skills.sh +423 -0
- package/scripts/run-marketing-tests.sh +42 -42
- package/scripts/update_paths.sh +46 -46
- package/scripts/verify-no-secrets.sh +88 -35
- package/.claude/cfn-extras/agents/deprecated-coordinators/adaptive-coordinator.md.backup +0 -161
- package/.claude/cfn-extras/agents/deprecated-coordinators/blocking-coordinator-example.md.backup +0 -728
- package/.claude/cfn-extras/agents/deprecated-coordinators/mesh-coordinator.md.backup +0 -131
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh.backup +0 -273
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup +0 -949
- package/README.md.backup_before_replace +0 -781
- package/claude-assets/cfn-extras/agents/deprecated-coordinators/adaptive-coordinator.md.backup +0 -161
- package/claude-assets/cfn-extras/agents/deprecated-coordinators/blocking-coordinator-example.md.backup +0 -728
- package/claude-assets/cfn-extras/agents/deprecated-coordinators/mesh-coordinator.md.backup +0 -131
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh.backup +0 -273
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup +0 -949
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Promotion SLA Enforcer
|
|
3
|
+
*
|
|
4
|
+
* Background job to enforce 48-hour SLA for skill promotion.
|
|
5
|
+
* Checks for stale skills in staging and auto-promotes or notifies based on config.
|
|
6
|
+
* Part of Task 1.2: Staging → Production Promotion Workflow
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Detects skills >48h in staging
|
|
10
|
+
* - Auto-promotes stale skills (optional)
|
|
11
|
+
* - Sends notifications for SLA breaches
|
|
12
|
+
* - Cron-job compatible
|
|
13
|
+
* - Monitoring dashboard data
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // Run as cron job
|
|
18
|
+
* const enforcer = new PromotionSLAEnforcer(dbService, {
|
|
19
|
+
* autoPromote: true,
|
|
20
|
+
* notifyStale: true,
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* await enforcer.enforceSLA();
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```bash
|
|
28
|
+
* # Cron job (daily at 9am)
|
|
29
|
+
* 0 9 * * * cd /path/to/project && npx ts-node src/jobs/promotion-sla-enforcer.ts
|
|
30
|
+
* ```
|
|
31
|
+
*/ import { DatabaseService } from '../lib/database-service.js';
|
|
32
|
+
import { createLogger } from '../lib/logging.js';
|
|
33
|
+
import { SkillPromotionService } from '../services/skill-promotion.js';
|
|
34
|
+
const logger = createLogger('promotion-sla-enforcer');
|
|
35
|
+
/**
|
|
36
|
+
* Promotion SLA Enforcer
|
|
37
|
+
*/ export class PromotionSLAEnforcer {
|
|
38
|
+
dbService;
|
|
39
|
+
promotionService;
|
|
40
|
+
config;
|
|
41
|
+
constructor(dbService, config = {}){
|
|
42
|
+
this.dbService = dbService;
|
|
43
|
+
this.promotionService = new SkillPromotionService(dbService, {
|
|
44
|
+
slaThresholdHours: config.slaThresholdHours || 48
|
|
45
|
+
});
|
|
46
|
+
// Default configuration
|
|
47
|
+
this.config = {
|
|
48
|
+
autoPromote: config.autoPromote ?? false,
|
|
49
|
+
notifyStale: config.notifyStale ?? true,
|
|
50
|
+
slaThresholdHours: config.slaThresholdHours ?? 48,
|
|
51
|
+
dryRun: config.dryRun ?? false,
|
|
52
|
+
enableGitCommit: config.enableGitCommit ?? true,
|
|
53
|
+
enableAutoDeploy: config.enableAutoDeploy ?? false
|
|
54
|
+
};
|
|
55
|
+
logger.info('SLA Enforcer initialized', {
|
|
56
|
+
config: this.config
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Enforce SLA for skill promotions
|
|
61
|
+
*/ async enforceSLA() {
|
|
62
|
+
const startTime = Date.now();
|
|
63
|
+
logger.info('Starting SLA enforcement', {
|
|
64
|
+
slaThresholdHours: this.config.slaThresholdHours,
|
|
65
|
+
autoPromote: this.config.autoPromote,
|
|
66
|
+
dryRun: this.config.dryRun
|
|
67
|
+
});
|
|
68
|
+
try {
|
|
69
|
+
// 1. Find stale skills (>48 hours in staging)
|
|
70
|
+
const staleSkills = await this.promotionService.checkStaleness();
|
|
71
|
+
if (staleSkills.length === 0) {
|
|
72
|
+
logger.info('No stale skills found');
|
|
73
|
+
return {
|
|
74
|
+
staleSkillsFound: 0,
|
|
75
|
+
promoted: 0,
|
|
76
|
+
notified: 0,
|
|
77
|
+
enforcedAt: new Date(),
|
|
78
|
+
durationMs: Date.now() - startTime
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
logger.warn('Stale skills detected', {
|
|
82
|
+
count: staleSkills.length,
|
|
83
|
+
skills: staleSkills.map((s)=>({
|
|
84
|
+
name: s.name,
|
|
85
|
+
ageHours: s.ageHours,
|
|
86
|
+
slaBreachHours: s.slaBreachHours
|
|
87
|
+
}))
|
|
88
|
+
});
|
|
89
|
+
// 2. Process each stale skill
|
|
90
|
+
let promoted = 0;
|
|
91
|
+
let notified = 0;
|
|
92
|
+
const errors = [];
|
|
93
|
+
for (const skill of staleSkills){
|
|
94
|
+
try {
|
|
95
|
+
await this.processStaleSkill(skill);
|
|
96
|
+
// Track promotion count
|
|
97
|
+
if (this.config.autoPromote && !this.config.dryRun) {
|
|
98
|
+
promoted++;
|
|
99
|
+
}
|
|
100
|
+
// Track notification count
|
|
101
|
+
if (this.config.notifyStale) {
|
|
102
|
+
notified++;
|
|
103
|
+
}
|
|
104
|
+
} catch (error) {
|
|
105
|
+
logger.error('Failed to process stale skill', {
|
|
106
|
+
skillName: skill.name,
|
|
107
|
+
error
|
|
108
|
+
});
|
|
109
|
+
errors.push({
|
|
110
|
+
skillName: skill.name,
|
|
111
|
+
error: error instanceof Error ? error.message : String(error)
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// 3. Record enforcement in database
|
|
116
|
+
await this.recordEnforcement(staleSkills.length, promoted, notified);
|
|
117
|
+
const result = {
|
|
118
|
+
staleSkillsFound: staleSkills.length,
|
|
119
|
+
promoted,
|
|
120
|
+
notified,
|
|
121
|
+
errors: errors.length > 0 ? errors : undefined,
|
|
122
|
+
enforcedAt: new Date(),
|
|
123
|
+
durationMs: Date.now() - startTime
|
|
124
|
+
};
|
|
125
|
+
logger.info('SLA enforcement complete', result);
|
|
126
|
+
// 4. Generate summary report
|
|
127
|
+
this.printSummary(result);
|
|
128
|
+
return result;
|
|
129
|
+
} catch (error) {
|
|
130
|
+
logger.error('SLA enforcement failed', {
|
|
131
|
+
error
|
|
132
|
+
});
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Process a single stale skill
|
|
138
|
+
*/ async processStaleSkill(skill) {
|
|
139
|
+
logger.info('Processing stale skill', {
|
|
140
|
+
skillName: skill.name,
|
|
141
|
+
ageHours: skill.ageHours,
|
|
142
|
+
slaBreachHours: skill.slaBreachHours
|
|
143
|
+
});
|
|
144
|
+
// 1. Send notification if enabled
|
|
145
|
+
if (this.config.notifyStale) {
|
|
146
|
+
await this.notifyStaleSkill(skill);
|
|
147
|
+
}
|
|
148
|
+
// 2. Auto-promote if enabled
|
|
149
|
+
if (this.config.autoPromote) {
|
|
150
|
+
if (this.config.dryRun) {
|
|
151
|
+
logger.info('DRY RUN: Would auto-promote stale skill', {
|
|
152
|
+
skillName: skill.name
|
|
153
|
+
});
|
|
154
|
+
} else {
|
|
155
|
+
logger.info('Auto-promoting stale skill', {
|
|
156
|
+
skillName: skill.name
|
|
157
|
+
});
|
|
158
|
+
const result = await this.promotionService.promoteSkill(skill.stagingPath, {
|
|
159
|
+
autoDeploy: this.config.enableAutoDeploy,
|
|
160
|
+
gitCommit: this.config.enableGitCommit,
|
|
161
|
+
notify: false,
|
|
162
|
+
promotedBy: 'sla-enforcer'
|
|
163
|
+
});
|
|
164
|
+
if (!result.success) {
|
|
165
|
+
logger.error('Auto-promotion failed', {
|
|
166
|
+
skillName: skill.name,
|
|
167
|
+
error: result.error
|
|
168
|
+
});
|
|
169
|
+
throw new Error(result.error);
|
|
170
|
+
}
|
|
171
|
+
logger.info('Auto-promotion successful', {
|
|
172
|
+
skillName: skill.name,
|
|
173
|
+
productionPath: result.productionPath,
|
|
174
|
+
deploymentId: result.deploymentId
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Send notification for stale skill
|
|
181
|
+
*/ async notifyStaleSkill(skill) {
|
|
182
|
+
// Console notification
|
|
183
|
+
console.log(`
|
|
184
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
185
|
+
⚠️ SLA BREACH DETECTED
|
|
186
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
187
|
+
Skill: ${skill.name}
|
|
188
|
+
Age: ${skill.ageHours} hours
|
|
189
|
+
SLA Threshold: ${this.config.slaThresholdHours} hours
|
|
190
|
+
SLA Breach: ${skill.slaBreachHours} hours over threshold
|
|
191
|
+
Location: ${skill.stagingPath}
|
|
192
|
+
Auto-Promote: ${this.config.autoPromote ? 'YES' : 'NO'}
|
|
193
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
194
|
+
`);
|
|
195
|
+
// Future: Add webhook, email, Slack notifications
|
|
196
|
+
logger.info('Stale skill notification sent', {
|
|
197
|
+
skillName: skill.name
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Record enforcement in database
|
|
202
|
+
*/ async recordEnforcement(staleSkillsFound, promoted, notified) {
|
|
203
|
+
try {
|
|
204
|
+
const query = `
|
|
205
|
+
INSERT INTO sla_enforcements (enforced_at, stale_skills_found, promoted, notified)
|
|
206
|
+
VALUES (?, ?, ?, ?)
|
|
207
|
+
`;
|
|
208
|
+
const adapter = this.dbService.getAdapter('sqlite');
|
|
209
|
+
await adapter.query(query, [
|
|
210
|
+
new Date().toISOString(),
|
|
211
|
+
staleSkillsFound,
|
|
212
|
+
promoted,
|
|
213
|
+
notified
|
|
214
|
+
]);
|
|
215
|
+
logger.debug('Enforcement recorded in database', {
|
|
216
|
+
staleSkillsFound,
|
|
217
|
+
promoted,
|
|
218
|
+
notified
|
|
219
|
+
});
|
|
220
|
+
} catch (error) {
|
|
221
|
+
// Log error but don't fail enforcement
|
|
222
|
+
logger.error('Failed to record enforcement in database', {
|
|
223
|
+
error
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Print summary report
|
|
229
|
+
*/ printSummary(result) {
|
|
230
|
+
console.log(`
|
|
231
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
232
|
+
SLA ENFORCEMENT SUMMARY
|
|
233
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
234
|
+
Stale Skills Found: ${result.staleSkillsFound}
|
|
235
|
+
Auto-Promoted: ${result.promoted}
|
|
236
|
+
Notifications Sent: ${result.notified}
|
|
237
|
+
Errors: ${result.errors?.length || 0}
|
|
238
|
+
Duration: ${result.durationMs}ms
|
|
239
|
+
Enforced At: ${result.enforcedAt.toISOString()}
|
|
240
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
241
|
+
`);
|
|
242
|
+
if (result.errors && result.errors.length > 0) {
|
|
243
|
+
console.log('Errors:');
|
|
244
|
+
for (const error of result.errors){
|
|
245
|
+
console.log(` - ${error.skillName}: ${error.error}`);
|
|
246
|
+
}
|
|
247
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* CLI entry point for running as standalone job
|
|
253
|
+
*/ async function main() {
|
|
254
|
+
// Parse command line arguments
|
|
255
|
+
const args = process.argv.slice(2);
|
|
256
|
+
const config = {
|
|
257
|
+
autoPromote: args.includes('--auto-promote'),
|
|
258
|
+
notifyStale: !args.includes('--no-notify'),
|
|
259
|
+
dryRun: args.includes('--dry-run'),
|
|
260
|
+
enableGitCommit: !args.includes('--no-git-commit'),
|
|
261
|
+
enableAutoDeploy: args.includes('--auto-deploy')
|
|
262
|
+
};
|
|
263
|
+
// Initialize database service
|
|
264
|
+
const dbService = new DatabaseService({
|
|
265
|
+
type: 'sqlite',
|
|
266
|
+
path: process.env.CFN_DB_PATH || './data/cfn.db'
|
|
267
|
+
});
|
|
268
|
+
// Run SLA enforcer
|
|
269
|
+
const enforcer = new PromotionSLAEnforcer(dbService, config);
|
|
270
|
+
try {
|
|
271
|
+
const result = await enforcer.enforceSLA();
|
|
272
|
+
process.exit(result.errors && result.errors.length > 0 ? 1 : 0);
|
|
273
|
+
} catch (error) {
|
|
274
|
+
logger.error('SLA enforcer failed', {
|
|
275
|
+
error
|
|
276
|
+
});
|
|
277
|
+
process.exit(1);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// Run if executed directly
|
|
281
|
+
if (require.main === module) {
|
|
282
|
+
main().catch((error)=>{
|
|
283
|
+
console.error('Fatal error:', error);
|
|
284
|
+
process.exit(1);
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
//# sourceMappingURL=promotion-sla-enforcer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/jobs/promotion-sla-enforcer.ts"],"sourcesContent":["/**\r\n * Promotion SLA Enforcer\r\n *\r\n * Background job to enforce 48-hour SLA for skill promotion.\r\n * Checks for stale skills in staging and auto-promotes or notifies based on config.\r\n * Part of Task 1.2: Staging → Production Promotion Workflow\r\n *\r\n * Features:\r\n * - Detects skills >48h in staging\r\n * - Auto-promotes stale skills (optional)\r\n * - Sends notifications for SLA breaches\r\n * - Cron-job compatible\r\n * - Monitoring dashboard data\r\n *\r\n * @example\r\n * ```typescript\r\n * // Run as cron job\r\n * const enforcer = new PromotionSLAEnforcer(dbService, {\r\n * autoPromote: true,\r\n * notifyStale: true,\r\n * });\r\n *\r\n * await enforcer.enforceSLA();\r\n * ```\r\n *\r\n * @example\r\n * ```bash\r\n * # Cron job (daily at 9am)\r\n * 0 9 * * * cd /path/to/project && npx ts-node src/jobs/promotion-sla-enforcer.ts\r\n * ```\r\n */\r\n\r\nimport { DatabaseService } from '../lib/database-service.js';\r\nimport { createLogger } from '../lib/logging.js';\r\nimport { SkillPromotionService, StaleSkill } from '../services/skill-promotion.js';\r\n\r\nconst logger = createLogger('promotion-sla-enforcer');\r\n\r\n/**\r\n * SLA enforcer configuration\r\n */\r\nexport interface SLAEnforcerConfig {\r\n /** Automatically promote stale skills */\r\n autoPromote?: boolean;\r\n /** Send notifications for stale skills */\r\n notifyStale?: boolean;\r\n /** SLA threshold in hours (default: 48) */\r\n slaThresholdHours?: number;\r\n /** Dry run mode (don't actually promote) */\r\n dryRun?: boolean;\r\n /** Enable git commits for auto-promotions */\r\n enableGitCommit?: boolean;\r\n /** Enable auto-deployment for promotions */\r\n enableAutoDeploy?: boolean;\r\n}\r\n\r\n/**\r\n * SLA enforcement result\r\n */\r\nexport interface SLAEnforcementResult {\r\n /** Number of stale skills found */\r\n staleSkillsFound: number;\r\n /** Number of skills auto-promoted */\r\n promoted: number;\r\n /** Number of notifications sent */\r\n notified: number;\r\n /** Promotion errors (if any) */\r\n errors?: Array<{\r\n skillName: string;\r\n error: string;\r\n }>;\r\n /** Enforcement timestamp */\r\n enforcedAt: Date;\r\n /** Execution duration (ms) */\r\n durationMs: number;\r\n}\r\n\r\n/**\r\n * Promotion SLA Enforcer\r\n */\r\nexport class PromotionSLAEnforcer {\r\n private dbService: DatabaseService;\r\n private promotionService: SkillPromotionService;\r\n private config: Required<SLAEnforcerConfig>;\r\n\r\n constructor(dbService: DatabaseService, config: SLAEnforcerConfig = {}) {\r\n this.dbService = dbService;\r\n this.promotionService = new SkillPromotionService(dbService, {\r\n slaThresholdHours: config.slaThresholdHours || 48,\r\n });\r\n\r\n // Default configuration\r\n this.config = {\r\n autoPromote: config.autoPromote ?? false,\r\n notifyStale: config.notifyStale ?? true,\r\n slaThresholdHours: config.slaThresholdHours ?? 48,\r\n dryRun: config.dryRun ?? false,\r\n enableGitCommit: config.enableGitCommit ?? true,\r\n enableAutoDeploy: config.enableAutoDeploy ?? false,\r\n };\r\n\r\n logger.info('SLA Enforcer initialized', { config: this.config });\r\n }\r\n\r\n /**\r\n * Enforce SLA for skill promotions\r\n */\r\n async enforceSLA(): Promise<SLAEnforcementResult> {\r\n const startTime = Date.now();\r\n logger.info('Starting SLA enforcement', {\r\n slaThresholdHours: this.config.slaThresholdHours,\r\n autoPromote: this.config.autoPromote,\r\n dryRun: this.config.dryRun,\r\n });\r\n\r\n try {\r\n // 1. Find stale skills (>48 hours in staging)\r\n const staleSkills = await this.promotionService.checkStaleness();\r\n\r\n if (staleSkills.length === 0) {\r\n logger.info('No stale skills found');\r\n return {\r\n staleSkillsFound: 0,\r\n promoted: 0,\r\n notified: 0,\r\n enforcedAt: new Date(),\r\n durationMs: Date.now() - startTime,\r\n };\r\n }\r\n\r\n logger.warn('Stale skills detected', {\r\n count: staleSkills.length,\r\n skills: staleSkills.map((s) => ({\r\n name: s.name,\r\n ageHours: s.ageHours,\r\n slaBreachHours: s.slaBreachHours,\r\n })),\r\n });\r\n\r\n // 2. Process each stale skill\r\n let promoted = 0;\r\n let notified = 0;\r\n const errors: Array<{ skillName: string; error: string }> = [];\r\n\r\n for (const skill of staleSkills) {\r\n try {\r\n await this.processStaleSkill(skill);\r\n\r\n // Track promotion count\r\n if (this.config.autoPromote && !this.config.dryRun) {\r\n promoted++;\r\n }\r\n\r\n // Track notification count\r\n if (this.config.notifyStale) {\r\n notified++;\r\n }\r\n } catch (error) {\r\n logger.error('Failed to process stale skill', {\r\n skillName: skill.name,\r\n error,\r\n });\r\n\r\n errors.push({\r\n skillName: skill.name,\r\n error: error instanceof Error ? error.message : String(error),\r\n });\r\n }\r\n }\r\n\r\n // 3. Record enforcement in database\r\n await this.recordEnforcement(staleSkills.length, promoted, notified);\r\n\r\n const result: SLAEnforcementResult = {\r\n staleSkillsFound: staleSkills.length,\r\n promoted,\r\n notified,\r\n errors: errors.length > 0 ? errors : undefined,\r\n enforcedAt: new Date(),\r\n durationMs: Date.now() - startTime,\r\n };\r\n\r\n logger.info('SLA enforcement complete', result);\r\n\r\n // 4. Generate summary report\r\n this.printSummary(result);\r\n\r\n return result;\r\n } catch (error) {\r\n logger.error('SLA enforcement failed', { error });\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * Process a single stale skill\r\n */\r\n private async processStaleSkill(skill: StaleSkill): Promise<void> {\r\n logger.info('Processing stale skill', {\r\n skillName: skill.name,\r\n ageHours: skill.ageHours,\r\n slaBreachHours: skill.slaBreachHours,\r\n });\r\n\r\n // 1. Send notification if enabled\r\n if (this.config.notifyStale) {\r\n await this.notifyStaleSkill(skill);\r\n }\r\n\r\n // 2. Auto-promote if enabled\r\n if (this.config.autoPromote) {\r\n if (this.config.dryRun) {\r\n logger.info('DRY RUN: Would auto-promote stale skill', {\r\n skillName: skill.name,\r\n });\r\n } else {\r\n logger.info('Auto-promoting stale skill', { skillName: skill.name });\r\n\r\n const result = await this.promotionService.promoteSkill(skill.stagingPath, {\r\n autoDeploy: this.config.enableAutoDeploy,\r\n gitCommit: this.config.enableGitCommit,\r\n notify: false, // Already notified above\r\n promotedBy: 'sla-enforcer',\r\n });\r\n\r\n if (!result.success) {\r\n logger.error('Auto-promotion failed', {\r\n skillName: skill.name,\r\n error: result.error,\r\n });\r\n throw new Error(result.error);\r\n }\r\n\r\n logger.info('Auto-promotion successful', {\r\n skillName: skill.name,\r\n productionPath: result.productionPath,\r\n deploymentId: result.deploymentId,\r\n });\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Send notification for stale skill\r\n */\r\n private async notifyStaleSkill(skill: StaleSkill): Promise<void> {\r\n // Console notification\r\n console.log(`\r\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\r\n ⚠️ SLA BREACH DETECTED\r\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\r\n Skill: ${skill.name}\r\n Age: ${skill.ageHours} hours\r\n SLA Threshold: ${this.config.slaThresholdHours} hours\r\n SLA Breach: ${skill.slaBreachHours} hours over threshold\r\n Location: ${skill.stagingPath}\r\n Auto-Promote: ${this.config.autoPromote ? 'YES' : 'NO'}\r\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\r\n`);\r\n\r\n // Future: Add webhook, email, Slack notifications\r\n logger.info('Stale skill notification sent', { skillName: skill.name });\r\n }\r\n\r\n /**\r\n * Record enforcement in database\r\n */\r\n private async recordEnforcement(\r\n staleSkillsFound: number,\r\n promoted: number,\r\n notified: number\r\n ): Promise<void> {\r\n try {\r\n const query = `\r\n INSERT INTO sla_enforcements (enforced_at, stale_skills_found, promoted, notified)\r\n VALUES (?, ?, ?, ?)\r\n `;\r\n\r\n const adapter = this.dbService.getAdapter('sqlite');\r\n await adapter.query(query, [\r\n new Date().toISOString(),\r\n staleSkillsFound,\r\n promoted,\r\n notified,\r\n ]);\r\n\r\n logger.debug('Enforcement recorded in database', {\r\n staleSkillsFound,\r\n promoted,\r\n notified,\r\n });\r\n } catch (error) {\r\n // Log error but don't fail enforcement\r\n logger.error('Failed to record enforcement in database', { error });\r\n }\r\n }\r\n\r\n /**\r\n * Print summary report\r\n */\r\n private printSummary(result: SLAEnforcementResult): void {\r\n console.log(`\r\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\r\n SLA ENFORCEMENT SUMMARY\r\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\r\n Stale Skills Found: ${result.staleSkillsFound}\r\n Auto-Promoted: ${result.promoted}\r\n Notifications Sent: ${result.notified}\r\n Errors: ${result.errors?.length || 0}\r\n Duration: ${result.durationMs}ms\r\n Enforced At: ${result.enforcedAt.toISOString()}\r\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\r\n`);\r\n\r\n if (result.errors && result.errors.length > 0) {\r\n console.log('Errors:');\r\n for (const error of result.errors) {\r\n console.log(` - ${error.skillName}: ${error.error}`);\r\n }\r\n console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * CLI entry point for running as standalone job\r\n */\r\nasync function main() {\r\n // Parse command line arguments\r\n const args = process.argv.slice(2);\r\n const config: SLAEnforcerConfig = {\r\n autoPromote: args.includes('--auto-promote'),\r\n notifyStale: !args.includes('--no-notify'),\r\n dryRun: args.includes('--dry-run'),\r\n enableGitCommit: !args.includes('--no-git-commit'),\r\n enableAutoDeploy: args.includes('--auto-deploy'),\r\n };\r\n\r\n // Initialize database service\r\n const dbService = new DatabaseService({\r\n type: 'sqlite',\r\n path: process.env.CFN_DB_PATH || './data/cfn.db',\r\n });\r\n\r\n // Run SLA enforcer\r\n const enforcer = new PromotionSLAEnforcer(dbService, config);\r\n\r\n try {\r\n const result = await enforcer.enforceSLA();\r\n process.exit(result.errors && result.errors.length > 0 ? 1 : 0);\r\n } catch (error) {\r\n logger.error('SLA enforcer failed', { error });\r\n process.exit(1);\r\n }\r\n}\r\n\r\n// Run if executed directly\r\nif (require.main === module) {\r\n main().catch((error) => {\r\n console.error('Fatal error:', error);\r\n process.exit(1);\r\n });\r\n}\r\n"],"names":["DatabaseService","createLogger","SkillPromotionService","logger","PromotionSLAEnforcer","dbService","promotionService","config","slaThresholdHours","autoPromote","notifyStale","dryRun","enableGitCommit","enableAutoDeploy","info","enforceSLA","startTime","Date","now","staleSkills","checkStaleness","length","staleSkillsFound","promoted","notified","enforcedAt","durationMs","warn","count","skills","map","s","name","ageHours","slaBreachHours","errors","skill","processStaleSkill","error","skillName","push","Error","message","String","recordEnforcement","result","undefined","printSummary","notifyStaleSkill","promoteSkill","stagingPath","autoDeploy","gitCommit","notify","promotedBy","success","productionPath","deploymentId","console","log","query","adapter","getAdapter","toISOString","debug","main","args","process","argv","slice","includes","type","path","env","CFN_DB_PATH","enforcer","exit","require","module","catch"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BC,GAED,SAASA,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,qBAAqB,QAAoB,iCAAiC;AAEnF,MAAMC,SAASF,aAAa;AAyC5B;;CAEC,GACD,OAAO,MAAMG;IACHC,UAA2B;IAC3BC,iBAAwC;IACxCC,OAAoC;IAE5C,YAAYF,SAA0B,EAAEE,SAA4B,CAAC,CAAC,CAAE;QACtE,IAAI,CAACF,SAAS,GAAGA;QACjB,IAAI,CAACC,gBAAgB,GAAG,IAAIJ,sBAAsBG,WAAW;YAC3DG,mBAAmBD,OAAOC,iBAAiB,IAAI;QACjD;QAEA,wBAAwB;QACxB,IAAI,CAACD,MAAM,GAAG;YACZE,aAAaF,OAAOE,WAAW,IAAI;YACnCC,aAAaH,OAAOG,WAAW,IAAI;YACnCF,mBAAmBD,OAAOC,iBAAiB,IAAI;YAC/CG,QAAQJ,OAAOI,MAAM,IAAI;YACzBC,iBAAiBL,OAAOK,eAAe,IAAI;YAC3CC,kBAAkBN,OAAOM,gBAAgB,IAAI;QAC/C;QAEAV,OAAOW,IAAI,CAAC,4BAA4B;YAAEP,QAAQ,IAAI,CAACA,MAAM;QAAC;IAChE;IAEA;;GAEC,GACD,MAAMQ,aAA4C;QAChD,MAAMC,YAAYC,KAAKC,GAAG;QAC1Bf,OAAOW,IAAI,CAAC,4BAA4B;YACtCN,mBAAmB,IAAI,CAACD,MAAM,CAACC,iBAAiB;YAChDC,aAAa,IAAI,CAACF,MAAM,CAACE,WAAW;YACpCE,QAAQ,IAAI,CAACJ,MAAM,CAACI,MAAM;QAC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