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,317 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# CFN Utilities Test Suite
|
|
3
|
+
# Tests all utility functions in lib/
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
source "$SCRIPT_DIR/execute.sh"
|
|
9
|
+
|
|
10
|
+
# Test counters
|
|
11
|
+
TESTS_RUN=0
|
|
12
|
+
TESTS_PASSED=0
|
|
13
|
+
TESTS_FAILED=0
|
|
14
|
+
|
|
15
|
+
# Test result helpers
|
|
16
|
+
pass() {
|
|
17
|
+
echo "PASS: $1"
|
|
18
|
+
TESTS_PASSED=$((TESTS_PASSED + 1))
|
|
19
|
+
TESTS_RUN=$((TESTS_RUN + 1))
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
fail() {
|
|
23
|
+
echo "FAIL: $1"
|
|
24
|
+
TESTS_FAILED=$((TESTS_FAILED + 1))
|
|
25
|
+
TESTS_RUN=$((TESTS_RUN + 1))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
assert_equals() {
|
|
29
|
+
local expected="$1"
|
|
30
|
+
local actual="$2"
|
|
31
|
+
local test_name="$3"
|
|
32
|
+
|
|
33
|
+
if [ "$expected" = "$actual" ]; then
|
|
34
|
+
pass "$test_name"
|
|
35
|
+
else
|
|
36
|
+
fail "$test_name (expected: '$expected', got: '$actual')"
|
|
37
|
+
fi
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
assert_contains() {
|
|
41
|
+
local haystack="$1"
|
|
42
|
+
local needle="$2"
|
|
43
|
+
local test_name="$3"
|
|
44
|
+
|
|
45
|
+
if [[ "$haystack" == *"$needle"* ]]; then
|
|
46
|
+
pass "$test_name"
|
|
47
|
+
else
|
|
48
|
+
fail "$test_name (string '$needle' not found in output)"
|
|
49
|
+
fi
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
assert_success() {
|
|
53
|
+
local test_name="$1"
|
|
54
|
+
pass "$test_name"
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
assert_failure() {
|
|
58
|
+
local test_name="$1"
|
|
59
|
+
fail "$test_name"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
# Cleanup temporary test files
|
|
63
|
+
cleanup() {
|
|
64
|
+
rm -f /tmp/cfn-test-*
|
|
65
|
+
}
|
|
66
|
+
trap cleanup EXIT
|
|
67
|
+
|
|
68
|
+
echo "=== CFN Utilities Test Suite ==="
|
|
69
|
+
echo ""
|
|
70
|
+
|
|
71
|
+
# ===== LOGGING TESTS =====
|
|
72
|
+
echo "--- Testing Logging Functions ---"
|
|
73
|
+
|
|
74
|
+
# Test: log_json outputs valid JSON
|
|
75
|
+
output=$(log_json "info" "test message" '{"key":"value"}' 2>&1)
|
|
76
|
+
if echo "$output" | grep -q '"timestamp"' && echo "$output" | grep -q '"level":"info"' && echo "$output" | grep -q '"message":"test message"'; then
|
|
77
|
+
pass "log_json outputs valid JSON structure"
|
|
78
|
+
else
|
|
79
|
+
fail "log_json output invalid: $output"
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
# Test: log_info outputs to stderr
|
|
83
|
+
output=$(log_info "info test" '{}' 2>&1 >/dev/null)
|
|
84
|
+
if echo "$output" | grep -q '"level":"info"'; then
|
|
85
|
+
pass "log_info outputs to stderr"
|
|
86
|
+
else
|
|
87
|
+
fail "log_info output incorrect"
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
# Test: log_error includes error level
|
|
91
|
+
output=$(log_error "error test" '{"code":"E001"}' 2>&1)
|
|
92
|
+
if echo "$output" | grep -q '"level":"error"' && echo "$output" | grep -q 'E001'; then
|
|
93
|
+
pass "log_error includes error level and context"
|
|
94
|
+
else
|
|
95
|
+
fail "log_error output incorrect"
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# Test: log_debug respects LOG_LEVEL
|
|
99
|
+
LOG_LEVEL=info
|
|
100
|
+
output=$(log_debug "debug test" '{}' 2>&1)
|
|
101
|
+
if [ -z "$output" ]; then
|
|
102
|
+
pass "log_debug respects LOG_LEVEL=info (no output)"
|
|
103
|
+
else
|
|
104
|
+
fail "log_debug should not output when LOG_LEVEL=info"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
LOG_LEVEL=debug
|
|
108
|
+
output=$(log_debug "debug test" '{}' 2>&1)
|
|
109
|
+
if echo "$output" | grep -q '"level":"debug"'; then
|
|
110
|
+
pass "log_debug outputs when LOG_LEVEL=debug"
|
|
111
|
+
else
|
|
112
|
+
fail "log_debug should output when LOG_LEVEL=debug"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# Test: generate_correlation_id produces output
|
|
116
|
+
corr_id=$(generate_correlation_id)
|
|
117
|
+
if [ -n "$corr_id" ]; then
|
|
118
|
+
pass "generate_correlation_id produces non-empty ID"
|
|
119
|
+
else
|
|
120
|
+
fail "generate_correlation_id produced empty ID"
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
# ===== ERROR HANDLING TESTS =====
|
|
124
|
+
echo ""
|
|
125
|
+
echo "--- Testing Error Handling Functions ---"
|
|
126
|
+
|
|
127
|
+
# Test: error_handle returns error code
|
|
128
|
+
if error_handle "test error" '{}' 2>/dev/null; then
|
|
129
|
+
fail "error_handle should return non-zero exit code"
|
|
130
|
+
else
|
|
131
|
+
pass "error_handle returns non-zero exit code"
|
|
132
|
+
fi
|
|
133
|
+
|
|
134
|
+
# Test: is_error_code detects specific codes
|
|
135
|
+
EXITCODE=7
|
|
136
|
+
if is_error_code $EXITCODE 7; then
|
|
137
|
+
pass "is_error_code detects correct exit code"
|
|
138
|
+
else
|
|
139
|
+
fail "is_error_code should detect exit code 7"
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
# Test: get_error_context returns JSON structure
|
|
143
|
+
test_exit_42() { return 42; }
|
|
144
|
+
test_exit_42 || true
|
|
145
|
+
context=$(get_error_context)
|
|
146
|
+
if echo "$context" | grep -q '"exit_code"' && echo "$context" | grep -q '"line"'; then
|
|
147
|
+
pass "get_error_context returns JSON structure"
|
|
148
|
+
else
|
|
149
|
+
fail "get_error_context output invalid: $context"
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
# ===== RETRY TESTS =====
|
|
153
|
+
echo ""
|
|
154
|
+
echo "--- Testing Retry Functions ---"
|
|
155
|
+
|
|
156
|
+
# Test: retry_with_backoff succeeds on first try
|
|
157
|
+
counter=0
|
|
158
|
+
test_command() {
|
|
159
|
+
counter=$((counter + 1))
|
|
160
|
+
return 0
|
|
161
|
+
}
|
|
162
|
+
if retry_with_backoff 3 1 test_command 2>/dev/null; then
|
|
163
|
+
pass "retry_with_backoff succeeds immediately"
|
|
164
|
+
else
|
|
165
|
+
fail "retry_with_backoff should succeed"
|
|
166
|
+
fi
|
|
167
|
+
|
|
168
|
+
# Test: retry_with_backoff retries on failure
|
|
169
|
+
attempt_count=0
|
|
170
|
+
failing_command() {
|
|
171
|
+
attempt_count=$((attempt_count + 1))
|
|
172
|
+
[ $attempt_count -ge 3 ]
|
|
173
|
+
}
|
|
174
|
+
if retry_with_backoff 5 1 failing_command 2>/dev/null; then
|
|
175
|
+
assert_equals "3" "$attempt_count" "retry_with_backoff retries correct number of times"
|
|
176
|
+
else
|
|
177
|
+
fail "retry_with_backoff should eventually succeed"
|
|
178
|
+
fi
|
|
179
|
+
|
|
180
|
+
# Test: retry_with_backoff gives up after max attempts
|
|
181
|
+
always_fail() {
|
|
182
|
+
return 1
|
|
183
|
+
}
|
|
184
|
+
if retry_with_backoff 2 1 always_fail 2>/dev/null; then
|
|
185
|
+
fail "retry_with_backoff should fail after max attempts"
|
|
186
|
+
else
|
|
187
|
+
pass "retry_with_backoff gives up after max attempts"
|
|
188
|
+
fi
|
|
189
|
+
|
|
190
|
+
# Test: retry_fixed uses fixed delay
|
|
191
|
+
fixed_count=0
|
|
192
|
+
fixed_test() {
|
|
193
|
+
fixed_count=$((fixed_count + 1))
|
|
194
|
+
[ $fixed_count -ge 2 ]
|
|
195
|
+
}
|
|
196
|
+
if retry_fixed 3 1 fixed_test 2>/dev/null; then
|
|
197
|
+
pass "retry_fixed works with fixed delay"
|
|
198
|
+
else
|
|
199
|
+
fail "retry_fixed should succeed"
|
|
200
|
+
fi
|
|
201
|
+
|
|
202
|
+
# ===== FILE OPERATIONS TESTS =====
|
|
203
|
+
echo ""
|
|
204
|
+
echo "--- Testing File Operations ---"
|
|
205
|
+
|
|
206
|
+
# Test: atomic_write creates file
|
|
207
|
+
test_file="/tmp/cfn-test-atomic-$$"
|
|
208
|
+
if atomic_write "$test_file" "test content" 2>/dev/null; then
|
|
209
|
+
if [ -f "$test_file" ] && [ "$(cat "$test_file")" = "test content" ]; then
|
|
210
|
+
pass "atomic_write creates file with correct content"
|
|
211
|
+
else
|
|
212
|
+
fail "atomic_write file content incorrect"
|
|
213
|
+
fi
|
|
214
|
+
else
|
|
215
|
+
fail "atomic_write failed"
|
|
216
|
+
fi
|
|
217
|
+
|
|
218
|
+
# Test: atomic_write is actually atomic (no .tmp files left)
|
|
219
|
+
test_file2="/tmp/cfn-test-atomic2-$$"
|
|
220
|
+
atomic_write "$test_file2" "content" 2>/dev/null
|
|
221
|
+
if ! ls /tmp/cfn-test-atomic2-$$.tmp* 2>/dev/null; then
|
|
222
|
+
pass "atomic_write cleans up temporary files"
|
|
223
|
+
else
|
|
224
|
+
fail "atomic_write left temporary files"
|
|
225
|
+
fi
|
|
226
|
+
|
|
227
|
+
# Test: acquire_lock creates lock file
|
|
228
|
+
lock_file="/tmp/cfn-test-lock-$$"
|
|
229
|
+
if acquire_lock "$lock_file" 5 2>/dev/null; then
|
|
230
|
+
if [ -f "$lock_file" ] && [ "$(cat "$lock_file")" = "$$" ]; then
|
|
231
|
+
pass "acquire_lock creates lock file with PID"
|
|
232
|
+
release_lock "$lock_file" 2>/dev/null
|
|
233
|
+
else
|
|
234
|
+
fail "acquire_lock file content incorrect"
|
|
235
|
+
release_lock "$lock_file" 2>/dev/null
|
|
236
|
+
fi
|
|
237
|
+
else
|
|
238
|
+
fail "acquire_lock failed"
|
|
239
|
+
fi
|
|
240
|
+
|
|
241
|
+
# Test: acquire_lock blocks concurrent access
|
|
242
|
+
lock_file2="/tmp/cfn-test-lock2-$$"
|
|
243
|
+
acquire_lock "$lock_file2" 30 2>/dev/null
|
|
244
|
+
if acquire_lock "$lock_file2" 1 2>/dev/null; then
|
|
245
|
+
fail "acquire_lock should block when lock is held"
|
|
246
|
+
release_lock "$lock_file2" 2>/dev/null
|
|
247
|
+
else
|
|
248
|
+
pass "acquire_lock blocks concurrent access"
|
|
249
|
+
release_lock "$lock_file2" 2>/dev/null
|
|
250
|
+
fi
|
|
251
|
+
|
|
252
|
+
# Test: release_lock removes lock file
|
|
253
|
+
lock_file3="/tmp/cfn-test-lock3-$$"
|
|
254
|
+
acquire_lock "$lock_file3" 5 2>/dev/null
|
|
255
|
+
if release_lock "$lock_file3" 2>/dev/null; then
|
|
256
|
+
if [ ! -f "$lock_file3" ]; then
|
|
257
|
+
pass "release_lock removes lock file"
|
|
258
|
+
else
|
|
259
|
+
fail "release_lock did not remove lock file"
|
|
260
|
+
fi
|
|
261
|
+
else
|
|
262
|
+
fail "release_lock failed"
|
|
263
|
+
fi
|
|
264
|
+
|
|
265
|
+
# Test: with_lock executes command with lock
|
|
266
|
+
lock_file4="/tmp/cfn-test-lock4-$$"
|
|
267
|
+
output_file="/tmp/cfn-test-output-$$"
|
|
268
|
+
if with_lock "$lock_file4" 5 bash -c "echo 'locked' > $output_file" 2>/dev/null; then
|
|
269
|
+
if [ -f "$output_file" ] && [ "$(cat "$output_file")" = "locked" ]; then
|
|
270
|
+
pass "with_lock executes command successfully"
|
|
271
|
+
else
|
|
272
|
+
fail "with_lock command did not execute correctly"
|
|
273
|
+
fi
|
|
274
|
+
else
|
|
275
|
+
fail "with_lock failed"
|
|
276
|
+
fi
|
|
277
|
+
|
|
278
|
+
# Test: with_lock releases lock after execution
|
|
279
|
+
if [ -f "$lock_file4" ]; then
|
|
280
|
+
fail "with_lock did not release lock after execution"
|
|
281
|
+
else
|
|
282
|
+
pass "with_lock releases lock after execution"
|
|
283
|
+
fi
|
|
284
|
+
|
|
285
|
+
# Test: is_locked detects active locks
|
|
286
|
+
lock_file5="/tmp/cfn-test-lock5-$$"
|
|
287
|
+
acquire_lock "$lock_file5" 5 2>/dev/null
|
|
288
|
+
if is_locked "$lock_file5"; then
|
|
289
|
+
pass "is_locked detects active lock"
|
|
290
|
+
else
|
|
291
|
+
fail "is_locked should detect active lock"
|
|
292
|
+
fi
|
|
293
|
+
release_lock "$lock_file5" 2>/dev/null
|
|
294
|
+
|
|
295
|
+
# Test: is_locked returns false when no lock
|
|
296
|
+
lock_file6="/tmp/cfn-test-lock6-$$"
|
|
297
|
+
if is_locked "$lock_file6"; then
|
|
298
|
+
fail "is_locked should return false when no lock exists"
|
|
299
|
+
else
|
|
300
|
+
pass "is_locked returns false when no lock exists"
|
|
301
|
+
fi
|
|
302
|
+
|
|
303
|
+
# ===== SUMMARY =====
|
|
304
|
+
echo ""
|
|
305
|
+
echo "==================================="
|
|
306
|
+
echo "Tests run: $TESTS_RUN"
|
|
307
|
+
echo "Passed: $TESTS_PASSED"
|
|
308
|
+
echo "Failed: $TESTS_FAILED"
|
|
309
|
+
echo "==================================="
|
|
310
|
+
|
|
311
|
+
if [ $TESTS_FAILED -eq 0 ]; then
|
|
312
|
+
echo "All tests passed!"
|
|
313
|
+
exit 0
|
|
314
|
+
else
|
|
315
|
+
echo "Some tests failed!"
|
|
316
|
+
exit 1
|
|
317
|
+
fi
|
|
@@ -1,203 +1,96 @@
|
|
|
1
|
-
# Docker Build Skill
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
--tag my-project:latest
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Example 3: Force Rebuild
|
|
101
|
-
```bash
|
|
102
|
-
# Rebuild everything from scratch
|
|
103
|
-
./.claude/skills/docker-build/build.sh --no-cache
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Integration Points
|
|
107
|
-
|
|
108
|
-
### Used By
|
|
109
|
-
- B10 TypeScript fix tests
|
|
110
|
-
- Docker agent testing
|
|
111
|
-
- CFN Loop container execution
|
|
112
|
-
- Development workflows
|
|
113
|
-
|
|
114
|
-
### Depends On
|
|
115
|
-
- `scripts/docker/build-from-linux.sh` (core build logic)
|
|
116
|
-
- `scripts/docker/linux-build.config` (configuration)
|
|
117
|
-
- Linux native filesystem at `/tmp/cfn-build`
|
|
118
|
-
|
|
119
|
-
## Error Handling
|
|
120
|
-
|
|
121
|
-
### Common Issues
|
|
122
|
-
|
|
123
|
-
**Issue**: Rsync fails
|
|
124
|
-
- **Cause**: Permission issues or disk space
|
|
125
|
-
- **Solution**: Check `/tmp` permissions and disk space
|
|
126
|
-
|
|
127
|
-
**Issue**: Docker build fails
|
|
128
|
-
- **Cause**: Syntax errors in Dockerfile or missing files
|
|
129
|
-
- **Solution**: Check Dockerfile and .dockerignore patterns
|
|
130
|
-
|
|
131
|
-
**Issue**: Image not tagged correctly
|
|
132
|
-
- **Cause**: Build failed but not caught
|
|
133
|
-
- **Solution**: Check build logs for errors
|
|
134
|
-
|
|
135
|
-
## Performance Monitoring
|
|
136
|
-
|
|
137
|
-
### Metrics Tracked
|
|
138
|
-
- Sync time (should be <1s)
|
|
139
|
-
- Build time (should be <30s)
|
|
140
|
-
- Total time
|
|
141
|
-
- Image size
|
|
142
|
-
|
|
143
|
-
### Expected Performance
|
|
144
|
-
```
|
|
145
|
-
Sync time: 0.1s
|
|
146
|
-
Build time: 15-20s
|
|
147
|
-
Total time: <25s
|
|
148
|
-
Image size: ~443MB
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Maintenance
|
|
152
|
-
|
|
153
|
-
### When to Update
|
|
154
|
-
- Agent definitions change
|
|
155
|
-
- Source code changes
|
|
156
|
-
- Dependencies update
|
|
157
|
-
- Dockerfile modifications
|
|
158
|
-
|
|
159
|
-
### Cleanup
|
|
160
|
-
```bash
|
|
161
|
-
# Remove old build directory
|
|
162
|
-
rm -rf /tmp/cfn-build
|
|
163
|
-
|
|
164
|
-
# Remove old images
|
|
165
|
-
docker image prune -f
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Success Criteria
|
|
169
|
-
- ✅ Build completes in <30s
|
|
170
|
-
- ✅ Image tagged correctly
|
|
171
|
-
- ✅ Image size reasonable (<500MB)
|
|
172
|
-
- ✅ No build errors or warnings
|
|
173
|
-
|
|
174
|
-
## Skill Invocation from Main Chat
|
|
175
|
-
|
|
176
|
-
### Quick Commands
|
|
177
|
-
```bash
|
|
178
|
-
# Rebuild Docker image after agent changes
|
|
179
|
-
Skill: docker-build
|
|
180
|
-
|
|
181
|
-
# Rebuild with no cache
|
|
182
|
-
Skill: docker-build --no-cache
|
|
183
|
-
|
|
184
|
-
# Custom build
|
|
185
|
-
Skill: docker-build --tag my-image:v1
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### When to Use This Skill
|
|
189
|
-
- After modifying agent templates (`.claude/agents/`)
|
|
190
|
-
- After changing source code
|
|
191
|
-
- After updating dependencies
|
|
192
|
-
- Before running Docker-based tests
|
|
193
|
-
- When WSL2 build is too slow
|
|
194
|
-
|
|
195
|
-
## Related Skills
|
|
196
|
-
- `cfn-loop-orchestration`: Uses Docker images for agent execution
|
|
197
|
-
- `cfn-coordination`: Coordinates Docker container agents
|
|
198
|
-
|
|
199
|
-
## Notes
|
|
200
|
-
- **WSL2 Performance**: Direct Docker builds from Windows mounts are 96% slower
|
|
201
|
-
- **Linux Native**: Building from `/tmp/cfn-build` is near-instant
|
|
202
|
-
- **Automatic Sync**: Script handles sync automatically
|
|
203
|
-
- **Safe**: Original Windows files never modified
|
|
1
|
+
# Docker Build Skill - WSL2 Optimized
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Purpose:** Build Docker images with 96% faster build times on WSL2 environments
|
|
5
|
+
**Location:** `.claude/skills/docker-build/`
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This skill provides WSL2-optimized Docker image building by syncing build context to Linux native storage (`/tmp/cfn-build`) before building, avoiding severe I/O performance penalties from Windows mounts.
|
|
10
|
+
|
|
11
|
+
**Performance Impact:**
|
|
12
|
+
- Windows mount: 755 seconds build time
|
|
13
|
+
- Linux native: 20 seconds build time
|
|
14
|
+
- **96% faster builds**
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Build any Docker image (automatic detection)
|
|
20
|
+
./.claude/skills/docker-build/build.sh \
|
|
21
|
+
--dockerfile docker/Dockerfile.agent \
|
|
22
|
+
--tag cfn-agent:latest
|
|
23
|
+
|
|
24
|
+
# Build with custom context
|
|
25
|
+
./.claude/skills/docker-build/build.sh \
|
|
26
|
+
--dockerfile docker/Dockerfile.orchestrator \
|
|
27
|
+
--tag cfn-orchestrator:latest \
|
|
28
|
+
--context ./custom-context
|
|
29
|
+
|
|
30
|
+
# Specify platform
|
|
31
|
+
./.claude/skills/docker-build/build.sh \
|
|
32
|
+
--dockerfile docker/Dockerfile.coordinator \
|
|
33
|
+
--tag cfn-coordinator:latest \
|
|
34
|
+
--platform linux/amd64
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Parameters
|
|
38
|
+
|
|
39
|
+
| Parameter | Required | Description | Default |
|
|
40
|
+
|-----------|----------|-------------|---------|
|
|
41
|
+
| `--dockerfile` | Yes | Path to Dockerfile | - |
|
|
42
|
+
| `--tag` | Yes | Image tag to build | - |
|
|
43
|
+
| `--context` | No | Build context directory | Project root |
|
|
44
|
+
| `--platform` | No | Target platform | Current platform |
|
|
45
|
+
|
|
46
|
+
## How It Works
|
|
47
|
+
|
|
48
|
+
1. **Sync Phase:** Copies build context from Windows mount to `/tmp/cfn-build/`
|
|
49
|
+
2. **Build Phase:** Runs `docker build` from Linux native storage
|
|
50
|
+
3. **Cleanup Phase:** Returns built image to host, removes temp directory
|
|
51
|
+
|
|
52
|
+
## WSL2 Performance Context
|
|
53
|
+
|
|
54
|
+
WSL2 has severe I/O performance issues when Docker accesses Windows mounts:
|
|
55
|
+
- File enumeration: 0.1s (Linux) vs 755s (Windows)
|
|
56
|
+
- Context transfer becomes the bottleneck
|
|
57
|
+
- Every file operation crosses mount boundary
|
|
58
|
+
|
|
59
|
+
This skill eliminates the bottleneck by working entirely in Linux filesystem.
|
|
60
|
+
|
|
61
|
+
## Requirements
|
|
62
|
+
|
|
63
|
+
- WSL2 environment
|
|
64
|
+
- Docker installed and running
|
|
65
|
+
- `/tmp/` writable (standard Linux configuration)
|
|
66
|
+
- Sufficient disk space in `/tmp/` for build context
|
|
67
|
+
|
|
68
|
+
## Error Handling
|
|
69
|
+
|
|
70
|
+
- Validates Dockerfile exists
|
|
71
|
+
- Validates tag is provided
|
|
72
|
+
- Creates temp directory with cleanup trap
|
|
73
|
+
- Preserves error codes from docker build
|
|
74
|
+
- Automatic cleanup on success/failure
|
|
75
|
+
|
|
76
|
+
## Integration with CFN Docker Infrastructure
|
|
77
|
+
|
|
78
|
+
All CFN Docker images should use this skill:
|
|
79
|
+
```bash
|
|
80
|
+
# cfn-agent
|
|
81
|
+
./.claude/skills/docker-build/build.sh --dockerfile docker/Dockerfile.agent --tag cfn-agent:latest
|
|
82
|
+
|
|
83
|
+
# cfn-orchestrator
|
|
84
|
+
./.claude/skills/docker-build/build.sh --dockerfile docker/Dockerfile.orchestrator --tag cfn-orchestrator:latest
|
|
85
|
+
|
|
86
|
+
# cfn-coordinator
|
|
87
|
+
./.claude/skills/docker-build/build.sh --dockerfile docker/Dockerfile.coordinator --tag cfn-coordinator:latest
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## See Also
|
|
91
|
+
|
|
92
|
+
- `docker/Dockerfile.agent` - Base agent image
|
|
93
|
+
- `docker/Dockerfile.orchestrator` - Orchestration image
|
|
94
|
+
- `docker/Dockerfile.coordinator` - Coordination image
|
|
95
|
+
- `CLAUDE.md` lines 60-90 - Docker build requirements
|
|
96
|
+
- `docs/CFN_DOCKER_INFRASTRUCTURE_REQUIREMENTS_SPEC.md` - Full infrastructure spec
|