claude-flow-novice 2.5.2 → 2.8.1
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/adaptive-context/cfn-v3-reflection.json +21 -0
- package/.claude/agents/AGENT_LIFECYCLE.md +495 -0
- package/.claude/agents/CLAUDE.md +1002 -1233
- package/.claude/agents/accessibility-advocate.md +457 -0
- package/.claude/agents/agent-principles/README.md +226 -226
- package/.claude/agents/agent-principles/agent-type-guidelines.md +10 -0
- package/.claude/agents/agent-principles/format-selection.md +10 -0
- package/.claude/agents/agent-principles/phase4-template-optimization.md +502 -494
- package/.claude/agents/agent-principles/prompt-engineering.md +8 -0
- package/.claude/agents/agent-principles/quality-metrics.md +8 -0
- package/.claude/agents/analysis/code-analyzer.md +7 -17
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +2 -104
- package/.claude/agents/analysis/perf-analyzer.md +2 -196
- package/.claude/agents/context/context-curator.md +78 -84
- package/.claude/agents/context/context-reflector.md +27 -81
- package/.claude/agents/coordinators/README.md +42 -0
- package/.claude/agents/coordinators/cfn-v3-coordinator.md +440 -0
- package/.claude/agents/{product-owner-team → coordinators}/cto-agent.md +154 -187
- package/.claude/agents/coordinators/multi-sprint-coordinator.md +50 -0
- package/.claude/agents/{product-owner-team → coordinators}/product-owner-agent.md +6 -39
- package/.claude/agents/{cfn-loop → coordinators}/product-owner.md +72 -17
- package/.claude/agents/core-agents/reviewer.md +114 -135
- package/.claude/agents/custom/agent-builder.md +637 -0
- package/.claude/agents/developers/README.md +69 -0
- package/.claude/agents/developers/backend-dev.md +77 -0
- package/.claude/agents/{core-agents → developers}/coder.md +131 -26
- package/.claude/agents/developers/react-frontend-engineer.md +121 -0
- package/.claude/agents/{frontend → developers}/state-architect.md +1 -0
- package/.claude/agents/{frontend → developers}/ui-designer.md +1 -0
- package/.claude/agents/development/backend/dev-backend-api.md +0 -29
- package/.claude/agents/development/npm-package-specialist.md +355 -347
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +8 -0
- package/.claude/agents/documentation/api-docs.md +8 -0
- package/.claude/agents/github/github-commit-agent.md +125 -117
- package/.claude/agents/goal/goal-planner.md +8 -0
- package/.claude/agents/infrastructure/README.md +100 -0
- package/.claude/agents/{specialized → infrastructure}/devops-engineer.md +131 -150
- package/.claude/agents/planners/README.md +94 -0
- package/.claude/agents/{core-agents → planners}/analyst.md +1 -22
- package/.claude/agents/{planning-team → planners}/api-designer-persona.md +8 -0
- package/.claude/agents/{core-agents → planners}/architect.md +7 -20
- package/.claude/agents/{core-agents → planners}/planner.md +0 -21
- package/.claude/agents/{planning-team → planners}/security-architect-persona.md +8 -28
- package/.claude/agents/{planning-team → planners}/system-architect-persona.md +6 -38
- package/.claude/agents/{architecture → planners}/system-architect.md +12 -17
- package/.claude/agents/product-owner-team/accessibility-advocate-persona.md +132 -161
- package/.claude/agents/product-owner-team/power-user-persona.md +149 -182
- package/.claude/agents/retrospective-analyst.md +84 -0
- package/.claude/agents/reviewers/README.md +58 -0
- package/.claude/agents/{analysis → reviewers}/code-quality-validator.md +8 -17
- package/.claude/agents/reviewers/reviewer.md +181 -0
- package/.claude/agents/sparc/architecture.md +6 -25
- package/.claude/agents/sparc/pseudocode.md +6 -0
- package/.claude/agents/sparc/refinement.md +6 -0
- package/.claude/agents/sparc/specification.md +1 -0
- package/.claude/agents/specialists/README.md +60 -0
- package/.claude/agents/{core-agents → specialists}/base-template-generator.md +8 -21
- package/.claude/agents/{specialized → specialists}/cli-agent-optimizer.md +1 -1
- package/.claude/agents/{specialized → specialists}/code-booster.md +1 -0
- package/.claude/agents/{consensus → specialists}/consensus-builder.md +1 -17
- package/.claude/agents/{specialized/mobile → specialists}/mobile-dev.md +0 -20
- package/.claude/agents/{core-agents → specialists}/performance-benchmarker.md +134 -148
- package/.claude/agents/{specialized → specialists}/rust-developer.md +1 -20
- package/.claude/agents/{specialized → specialists}/rust-enterprise-developer.md +1 -20
- package/.claude/agents/{specialized → specialists}/rust-mvp-developer.md +1 -20
- package/.claude/agents/{core-agents → specialists}/security-manager.md +68 -88
- package/.claude/agents/{security → specialists}/security-specialist-existing.md +6 -57
- package/.claude/agents/{security → specialists}/security-specialist.md +6 -30
- package/.claude/agents/{specialized/mobile → specialists}/spec-mobile-react-native.md +2 -21
- package/.claude/agents/testers/README.md +94 -0
- package/.claude/agents/{testing → testers}/e2e/playwright-agent.md +1 -20
- package/.claude/agents/{testing → testers}/interaction-tester.md +1 -20
- package/.claude/agents/{testing → testers}/playwright-tester.md +1 -1
- package/.claude/agents/testers/tester.md +139 -0
- package/.claude/agents/testers/unit/tdd-london-swarm.md +49 -0
- package/.claude/agents/testers/validation/production-validator.md +33 -0
- package/.claude/agents-ignore/cfn-loop-coordinator.md +157 -0
- package/.claude/agents-ignore/cfn-loop-coordinator.md.backup +156 -0
- package/.claude/agents-ignore/coordinator.md.backup +182 -0
- package/.claude/agents-ignore/cost-savings-cfn-loop-coordinator.md +760 -0
- package/.claude/agents-ignore/cost-savings-coordinator.md +173 -0
- package/.claude/artifacts/ace-reflections/REFLECT-001-summary.json +39 -0
- package/.claude/artifacts/ace-reflections/sprint-7_$(date -u +/"%Y%m%d_%H%M%S/").json" +47 -0
- package/.claude/artifacts/reflection-merge-logs/cli-agent-spawning-v2.5.2-merge-report.md +61 -0
- package/.claude/commands/CFN_COORDINATOR_PARAMETERS.md +10 -10
- package/.claude/commands/cfn-loop-epic.md +43 -19
- package/.claude/commands/cfn-loop-single.md +3 -3
- package/.claude/commands/cfn-loop-sprints.md +1 -1
- package/.claude/commands/cfn-loop.md +45 -32
- package/.claude/commands/cfn-mode.md +20 -0
- package/.claude/commands/custom-routing-activate.md +37 -123
- package/.claude/commands/custom-routing-deactivate.md +27 -124
- package/.claude/commands/switch-api.md +41 -16
- package/.claude/commands/write-plan.md +104 -0
- package/.claude/data/cfn-loop.db +0 -0
- package/.claude/data/cfn_loop_logs.db +0 -0
- package/.claude/hooks/BACKUP_USAGE.md +243 -0
- package/.claude/hooks/post-edit-cfn-retrospective.sh +79 -0
- package/.claude/hooks/post-edit.sh +21 -0
- package/.claude/hooks/pre-edit-backup.sh +71 -0
- package/.claude/hooks/restore-from-backup.sh +37 -0
- package/.claude/prompts/cfn-loop-context.md +115 -0
- package/.claude/prompts/loop-specific/loop2.md +50 -0
- package/.claude/prompts/loop-specific/loop3.md +43 -0
- package/.claude/prompts/loop-specific/loop4.md +54 -0
- package/.claude/root-claude-distribute/CLAUDE.md +76 -2
- package/.claude/skills/ace-system/sprint-7-lessons.json +46 -0
- package/.claude/skills/ace-system/store-reflection.sh +33 -136
- package/.claude/skills/agent-discovery/SKILL.md +40 -0
- package/.claude/skills/agent-discovery/agents-registry-clean.json +0 -0
- package/.claude/skills/agent-discovery/agents-registry-fixed.json +19 -0
- package/.claude/skills/agent-discovery/agents-registry.json +718 -0
- package/.claude/skills/agent-discovery/discover-agents.py +175 -0
- package/.claude/skills/agent-discovery/discover-agents.sh +87 -0
- package/.claude/skills/agent-discovery/invoke-registry.sh +11 -0
- package/.claude/skills/agent-discovery/temp_script.py +0 -0
- package/.claude/skills/agent-execution/execute-agent.sh +126 -0
- package/.claude/skills/agent-output-processing/SKILL.md +359 -0
- package/.claude/skills/agent-selector/SKILL.md +90 -0
- package/.claude/skills/agent-selector/select-agents.sh +96 -0
- package/.claude/skills/agent-spawning/agent-selection-guide.md +1 -1
- package/.claude/skills/agent-swap/SKILL.md +36 -0
- package/.claude/skills/agent-swap/recommend-swap.sh +60 -0
- package/.claude/skills/api-validation/test-endpoints.sh +54 -0
- package/.claude/skills/automatic-memory-persistence/SKILL.md +73 -0
- package/.claude/skills/automatic-memory-persistence/persist-agent-output.sh +49 -0
- package/.claude/skills/automatic-memory-persistence/query-agent-history.sh +35 -0
- package/.claude/skills/automatic-memory-persistence/test-memory-persistence.sh +235 -0
- package/.claude/skills/cfn-loop-orchestration/README.md +41 -0
- package/.claude/skills/cfn-loop-orchestration/SKILL.md +299 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +228 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/consensus.sh +84 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +71 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +90 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +87 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +51 -0
- package/.claude/skills/cfn-loop-orchestration/inject-loop-context.sh +41 -0
- package/.claude/skills/cfn-loop-orchestration/monitor-execution.sh +156 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +840 -0
- package/.claude/skills/cfn-loop-orchestration/security_utils.sh +99 -0
- package/.claude/skills/cfn-loop-orchestration/test-cfn-orchestration.sh +281 -0
- package/.claude/skills/cfn-loop-orchestration/test-edge-cases.sh +188 -0
- package/.claude/skills/cfn-loop-validation/SKILL.md +307 -217
- package/.claude/skills/complexity-estimator/SKILL.md +96 -0
- package/.claude/skills/complexity-estimator/estimate-complexity.sh +144 -0
- package/.claude/skills/context-pruner/SKILL.md +75 -0
- package/.claude/skills/context-pruner/prune-context.sh +73 -0
- package/.claude/skills/defense-in-depth/SKILL.md +133 -0
- package/.claude/skills/dependency-extractor/SKILL.md +35 -0
- package/.claude/skills/dependency-extractor/extract-dependencies.sh +66 -0
- package/.claude/skills/epic-decomposer/SKILL.md +44 -0
- package/.claude/skills/epic-decomposer/decompose-epic.sh +104 -0
- package/.claude/skills/improvement-recommender/SKILL.md +33 -0
- package/.claude/skills/improvement-recommender/recommend-improvements.sh +92 -0
- package/.claude/skills/intervention-detector/SKILL.md +39 -0
- package/.claude/skills/intervention-detector/detect-intervention.sh +111 -0
- package/.claude/skills/intervention-orchestrator/SKILL.md +43 -0
- package/.claude/skills/intervention-orchestrator/execute-intervention.sh +59 -0
- package/.claude/skills/loop2-output-processing/SKILL.md +163 -0
- package/.claude/skills/loop2-output-processing/execute-and-extract.sh +77 -0
- package/.claude/skills/loop2-output-processing/execute-and-extract.sh.backup +36 -0
- package/.claude/skills/loop2-output-processing/parse-feedback.sh +147 -0
- package/.claude/skills/loop2-output-processing/process-validator-output.sh +275 -0
- package/.claude/skills/loop2-output-processing/test-bug27-fix.sh +200 -0
- package/.claude/skills/loop2-output-processing/test-loop2-processing.sh +113 -0
- package/.claude/skills/loop3-output-processing/AGENT_COMPLETION_PROTOCOL.md +206 -0
- package/.claude/skills/loop3-output-processing/SKILL.md +421 -0
- package/.claude/skills/loop3-output-processing/calculate-confidence.sh +28 -0
- package/.claude/skills/loop3-output-processing/execute-and-extract.sh +85 -0
- package/.claude/skills/loop3-output-processing/parse-confidence.sh +31 -0
- package/.claude/skills/loop3-output-processing/test-agent-timeout.sh +327 -0
- package/.claude/skills/loop3-output-processing/test-loop3-processing.sh +155 -0
- package/.claude/skills/loop3-output-processing/verify-deliverables.sh +42 -0
- package/.claude/skills/pattern-extraction/SKILL.md +30 -0
- package/.claude/skills/pattern-extraction/extract-patterns.sh +80 -0
- package/.claude/skills/playbook/SKILL.md +113 -0
- package/.claude/skills/playbook/init-playbook.sh +54 -0
- package/.claude/skills/playbook/playbook.db +0 -0
- package/.claude/skills/playbook/query-playbook.sh +79 -0
- package/.claude/skills/playbook/update-playbook.sh +69 -0
- package/.claude/skills/playbook-auto-update/SKILL.md +29 -0
- package/.claude/skills/playbook-auto-update/auto-update-playbook.sh +86 -0
- package/.claude/skills/product-owner-decision/SKILL.md +332 -0
- package/.claude/skills/product-owner-decision/execute-decision.sh +176 -0
- package/.claude/skills/product-owner-decision/parse-decision.sh +66 -0
- package/.claude/skills/product-owner-decision/validate-deliverables.sh +82 -0
- package/.claude/skills/redis-coordination/AGENT_LOGGING.md +280 -0
- package/.claude/skills/redis-coordination/LOGGING.md +260 -0
- package/.claude/skills/redis-coordination/README.md +30 -29
- package/.claude/skills/redis-coordination/SKILL.md +685 -83
- package/.claude/skills/redis-coordination/agent-log.sh +124 -0
- package/.claude/skills/redis-coordination/analyze-task-complexity.sh +277 -0
- package/.claude/skills/redis-coordination/cfn-loop-exec.sh +468 -0
- package/.claude/skills/redis-coordination/collect-confidence-scores.sh +179 -0
- package/.claude/skills/redis-coordination/collect-results.sh +75 -0
- package/.claude/skills/redis-coordination/data/cfn-loop.db +0 -0
- package/.claude/skills/redis-coordination/demos/test-iteration-feedback.sh +320 -0
- package/.claude/skills/redis-coordination/{test-orchestrator.sh → demos/test-orchestrator.sh} +25 -0
- package/.claude/skills/redis-coordination/execute-product-owner-decision.sh +258 -0
- package/.claude/skills/redis-coordination/get-agent-timeout.sh +176 -176
- package/.claude/skills/redis-coordination/init-swarm.sh +6 -1
- package/.claude/skills/redis-coordination/invoke-waiting-mode.sh +106 -183
- package/.claude/skills/redis-coordination/invoke-waiting-mode.sh.backup-p7 +423 -0
- package/.claude/skills/redis-coordination/log-event.sh +109 -0
- package/.claude/skills/redis-coordination/monitor-cfn-violations.sh +391 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop-v3.sh +141 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh +31 -933
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup +38 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-1761167675 +1672 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-p5 +1604 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase1 +1550 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase2 +1621 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase3 +1621 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.bak +0 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.broken +1627 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.corrupted +80 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.deprecated +1864 -0
- package/.claude/skills/redis-coordination/query-logs.sh +103 -0
- package/.claude/skills/redis-coordination/retrieve-context.sh +58 -0
- package/.claude/skills/redis-coordination/select-specialist-agent.sh +371 -0
- package/.claude/skills/redis-coordination/semantic-match-tfidf.py +252 -0
- package/.claude/skills/redis-coordination/send-heartbeat.sh +164 -72
- package/.claude/skills/redis-coordination/signal.sh +38 -0
- package/.claude/skills/redis-coordination/store-context.sh +86 -0
- package/.claude/skills/redis-coordination/store-epic-context.sh +123 -0
- package/.claude/skills/redis-coordination/test-context-injection.sh +354 -0
- package/.claude/skills/redis-coordination/test-timeout-enforcement.sh +513 -0
- package/.claude/skills/redis-coordination/tests/convert-line-endings.sh +15 -0
- package/.claude/skills/redis-coordination/tests/dlq-functionality-test.sh +101 -101
- package/.claude/skills/redis-coordination/tests/edge-cases-test.sh +98 -98
- package/.claude/skills/redis-coordination/tests/integration-test.sh +169 -169
- package/.claude/skills/redis-coordination/tests/retry-mechanism-test.sh +81 -81
- package/.claude/skills/redis-coordination/tests/run-test-suite.sh +91 -91
- package/.claude/skills/redis-coordination/tests/run-tests.sh +4 -0
- package/.claude/skills/redis-coordination/tests/test-primitives.sh +166 -0
- package/.claude/skills/redis-coordination/tests/test-utils.sh +53 -121
- package/.claude/skills/redis-coordination/tests/test_coordination_primitives.sh.deprecated +20 -0
- package/.claude/skills/redis-coordination/tests/test_utils.sh +49 -0
- package/.claude/skills/redis-coordination/v2_modularization/core_orchestration.sh +76 -0
- package/.claude/skills/redis-coordination/validate-parameters.sh +492 -0
- package/.claude/skills/retrospective-report/SKILL.md +31 -0
- package/.claude/skills/retrospective-report/generate-report.sh +101 -0
- package/.claude/skills/run-all-skill-tests.sh +124 -0
- package/.claude/skills/scope-simplifier/SKILL.md +37 -0
- package/.claude/skills/scope-simplifier/simplify-scope.sh +68 -0
- package/.claude/skills/simplified-agent-lifecycle/COST_ANALYSIS.md +49 -0
- package/.claude/skills/simplified-agent-lifecycle/DESIGN.md +98 -0
- package/.claude/skills/simplified-agent-lifecycle/MIGRATION_PLAN.md +74 -0
- package/.claude/skills/skill-builder/SKILL.md +910 -0
- package/.claude/skills/specialist-injection/SKILL.md +41 -0
- package/.claude/skills/specialist-injection/recommend-specialist.sh +57 -0
- package/.claude/skills/sprint-execution/SKILL.md +27 -0
- package/.claude/skills/sprint-execution/execute-sprint-task.sh +59 -0
- package/.claude/skills/sprint-execution/execute-sprint.sh +65 -0
- package/.claude/skills/sprint-planner/SKILL.md +37 -0
- package/.claude/skills/sprint-planner/plan-sprint.sh +85 -0
- package/.claude/skills/standardized-error-handling/SKILL.md +56 -0
- package/.claude/skills/standardized-error-handling/capture-agent-error.sh +87 -0
- package/.claude/skills/standardized-error-handling/test-error-handling.sh +166 -0
- package/.claude/skills/task-classifier/SKILL.md +94 -0
- package/.claude/skills/task-classifier/classify-task.sh +115 -0
- package/.claude/skills/validation-templates/SKILL.md +47 -0
- package/.claude/skills/validation-templates/content.json +38 -0
- package/.claude/skills/validation-templates/data.json +38 -0
- package/.claude/skills/validation-templates/design.json +38 -0
- package/.claude/skills/validation-templates/infrastructure.json +38 -0
- package/.claude/skills/validation-templates/research.json +38 -0
- package/.claude/skills/validation-templates/software.json +38 -0
- package/.claude/skills/webapp-testing/README.md +142 -0
- package/.claude/skills/webapp-testing/SCREENSHOT_NAMING_CONVENTION.md +547 -0
- package/.claude/skills/webapp-testing/SKILL.md +877 -0
- package/.claude/skills/webapp-testing/capture-screenshot.sh +238 -0
- package/.claude/skills/webapp-testing/cfn-loop-integration.sh +265 -0
- package/.claude/skills/webapp-testing/compare-screenshots.sh +199 -0
- package/.claude/skills/webapp-testing/init-storage.sh +150 -0
- package/.claude/skills/webapp-testing/set-baseline.sh +196 -0
- package/.claude/skills/webapp-testing/test-webapp-testing.sh +233 -0
- package/.claude/spawn-pattern-examples.md +3 -3
- package/CLAUDE.md +364 -16
- package/README.md +598 -251
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/agent-command.js +153 -0
- package/dist/cli/agent-command.js.map +1 -0
- package/dist/cli/agent-definition-parser.js +183 -0
- package/dist/cli/agent-definition-parser.js.map +1 -0
- package/dist/cli/agent-executor.js +310 -0
- package/dist/cli/agent-executor.js.map +1 -0
- package/dist/cli/agent-prompt-builder.js +268 -0
- package/dist/cli/agent-prompt-builder.js.map +1 -0
- package/dist/cli/agent-spawn.js +56 -2
- package/dist/cli/agent-spawn.js.map +1 -1
- package/dist/cli/anthropic-client.js +421 -0
- package/dist/cli/anthropic-client.js.map +1 -0
- package/dist/cli/cfn-context.js +150 -0
- package/dist/cli/cfn-context.js.map +1 -1
- package/dist/cli/cfn-fork.js +159 -0
- package/dist/cli/cfn-fork.js.map +1 -0
- package/dist/cli/cli-agent-context.js +358 -0
- package/dist/cli/cli-agent-context.js.map +1 -0
- package/dist/cli/config-manager.js +109 -91
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/cli/conversation-fork.js +201 -0
- package/dist/cli/conversation-fork.js.map +1 -0
- package/dist/cli/index.js +119 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/iteration-history.js +188 -0
- package/dist/cli/iteration-history.js.map +1 -0
- package/dist/cli/tool-definitions.js +263 -0
- package/dist/cli/tool-definitions.js.map +1 -0
- package/dist/cli/tool-executor.js +247 -0
- package/dist/cli/tool-executor.js.map +1 -0
- package/dist/hello.js +8 -0
- package/dist/hello.js.map +1 -0
- package/package.json +16 -6
- package/scripts/README.md +68 -0
- package/scripts/cfn-intervention-example.sh +21 -0
- package/scripts/migrate-test-infrastructure.sh +40 -0
- package/scripts/switch-api.sh +233 -0
- package/scripts/validate-test-migration.sh +49 -0
- package/scripts/verify-no-secrets.sh +55 -0
- package/.claude/agents/architecture/system-architect.md.backup +0 -603
- package/.claude/agents/code-booster.md +0 -131
- package/.claude/agents/consensus/performance-benchmarker.md +0 -101
- package/.claude/agents/consensus/security-manager.md +0 -107
- package/.claude/agents/context-curator.md +0 -167
- package/.claude/agents/context-reflector.md +0 -65
- package/.claude/agents/core-agents/cfn-loop-coordinator.md +0 -134
- package/.claude/agents/core-agents/code-quality-validator.md +0 -149
- package/.claude/agents/core-agents/context-curator.md +0 -452
- package/.claude/agents/core-agents/context-reflector.md +0 -273
- package/.claude/agents/core-agents/cost-savings-cfn-loop-coordinator.md +0 -190
- package/.claude/agents/core-agents/tester.md +0 -170
- package/.claude/agents/development/backend-dev.md +0 -165
- package/.claude/agents/devops/devops-engineer.md +0 -148
- package/.claude/agents/frontend/interaction-tester.md +0 -139
- package/.claude/agents/frontend/react-frontend-engineer.md +0 -9
- package/.claude/agents/personas/accessibility-advocate-persona.md +0 -107
- package/.claude/agents/testing/production-validator.md +0 -179
- package/.claude/agents/testing/tdd-london-swarm.md +0 -209
- package/.claude/agents/testing/unit/tdd-london-swarm.md +0 -43
- package/.claude/agents/testing/validation/production-validator.md +0 -43
- package/dist/coordination/fleet-manager.test.js +0 -141
- package/dist/coordination/fleet-manager.test.js.map +0 -1
- package/dist/middleware/transparency-middleware.test.js +0 -184
- package/dist/middleware/transparency-middleware.test.js.map +0 -1
- /package/.claude/agents/{core-agents → developers}/researcher.md +0 -0
- /package/.claude/agents/{consensus → specialists}/crdt-synchronizer.md +0 -0
- /package/.claude/agents/{consensus → specialists}/quorum-manager.md +0 -0
- /package/.claude/agents/{consensus → specialists}/raft-manager.md +0 -0
- /package/.claude/{agents/core-agents → agents-ignore}/coordinator.md +0 -0
- /package/.claude/{agents/core-agents/cost-savings-coordinator.md → agents-ignore/cost-savings-coordinator.md.backup} +0 -0
- /package/.claude/skills/redis-coordination/{phase4-wake-queue-test-report.md → demos/phase4-wake-queue-test-report.md} +0 -0
- /package/.claude/skills/redis-coordination/{test-bzpopmin-fix.sh → demos/test-bzpopmin-fix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-cancel-swarm.sh → demos/test-cancel-swarm.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-dlq.sh → demos/test-dlq.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-priority-wake-phase4-unix.sh → demos/test-priority-wake-phase4-unix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-priority-wake-phase4.sh → demos/test-priority-wake-phase4.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-priority-wake.sh → demos/test-priority-wake.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quick-fix.sh → demos/test-quick-fix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-absolute.sh → demos/test-quorum-absolute.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-fallback.sh → demos/test-quorum-fallback.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-percentage.sh → demos/test-quorum-percentage.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-with-retry.sh → demos/test-quorum-with-retry.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum.sh → demos/test-quorum.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-shutdown-handling.sh → demos/test-shutdown-handling.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-shutdown.sh → demos/test-shutdown.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-utils-unix.sh → demos/test-utils-unix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-utils.sh → demos/test-utils.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-waiting-mode.sh → demos/test-waiting-mode.sh} +0 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
##############################################################################
|
|
3
|
+
# Enhanced Test Agent Completion Protocol with Timeout
|
|
4
|
+
# Comprehensive tests for process monitoring and completion detection
|
|
5
|
+
##############################################################################
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# Explicit PATH to ensure all commands are found
|
|
9
|
+
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
|
|
10
|
+
|
|
11
|
+
# Fail if any required command is missing
|
|
12
|
+
command -v redis-cli >/dev/null 2>&1 || { echo "❌ redis-cli not found. Please install Redis."; exit 1; }
|
|
13
|
+
|
|
14
|
+
# Environment-independent script directory with fallback
|
|
15
|
+
SCRIPT_DIR="${1:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
|
|
16
|
+
REDIS_COORDINATION_DIR="${SCRIPT_DIR}/../redis-coordination"
|
|
17
|
+
|
|
18
|
+
# Safer unique task ID generation
|
|
19
|
+
TASK_ID="test-timeout-$(date +%Y%m%d%H%M%S)-$$-${RANDOM}"
|
|
20
|
+
export TASK_ID
|
|
21
|
+
|
|
22
|
+
# Test configuration with defaults
|
|
23
|
+
TEST_PASSED=0
|
|
24
|
+
TEST_FAILED=0
|
|
25
|
+
TOTAL_TESTS=4
|
|
26
|
+
TIMEOUT_DURATION="${2:-60}" # Optional timeout override
|
|
27
|
+
|
|
28
|
+
# Logging functions with timestamp
|
|
29
|
+
log_info() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] [INFO] $*" >&2; }
|
|
30
|
+
log_error() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] [ERROR] $*" >&2; }
|
|
31
|
+
log_test() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] [TEST] $*" >&2; }
|
|
32
|
+
|
|
33
|
+
# Redis connection with more robust validation
|
|
34
|
+
validate_redis_connection() {
|
|
35
|
+
log_info "Validating Redis connection..."
|
|
36
|
+
if ! timeout 5 redis-cli ping >/dev/null 2>&1; then
|
|
37
|
+
log_error "Redis server not responding. Ensure Redis is running."
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
log_info "Redis connection validated successfully."
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# Mock implementation of process monitoring
|
|
44
|
+
mock_monitor_agent_process() {
|
|
45
|
+
local AGENT_ID="$1"
|
|
46
|
+
local AGENT_PID="$2"
|
|
47
|
+
local TASK_ID="$3"
|
|
48
|
+
local DONE_KEY="$4"
|
|
49
|
+
local TIMEOUT="${5:-60}" # Default 60s timeout
|
|
50
|
+
|
|
51
|
+
log_info "Mocking process monitor for Agent $AGENT_ID (PID: $AGENT_PID)"
|
|
52
|
+
|
|
53
|
+
(
|
|
54
|
+
sleep "$TIMEOUT"
|
|
55
|
+
if kill -0 "$AGENT_PID" 2>/dev/null; then
|
|
56
|
+
log_error "Agent $AGENT_ID exceeded timeout. Killing process."
|
|
57
|
+
kill -9 "$AGENT_PID" 2>/dev/null
|
|
58
|
+
redis-cli LPUSH "$DONE_KEY" "auto-completed-timeout" >/dev/null
|
|
59
|
+
fi
|
|
60
|
+
) &
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Mock heartbeat mechanism
|
|
64
|
+
mock_send_heartbeat() {
|
|
65
|
+
local TASK_ID="$1"
|
|
66
|
+
local AGENT_ID="$2"
|
|
67
|
+
local INTERVAL="${3:-5}"
|
|
68
|
+
|
|
69
|
+
log_info "Starting mock heartbeat for Task $TASK_ID, Agent $AGENT_ID"
|
|
70
|
+
|
|
71
|
+
# Simulate periodic heartbeat
|
|
72
|
+
while true; do
|
|
73
|
+
log_info "Sending heartbeat for $AGENT_ID"
|
|
74
|
+
redis-cli SETEX "swarm:${TASK_ID}:${AGENT_ID}:heartbeat" "$((INTERVAL * 2))" "active" >/dev/null 2>&1
|
|
75
|
+
sleep "$INTERVAL"
|
|
76
|
+
done
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# Create mock agent scripts
|
|
80
|
+
create_mock_agent() {
|
|
81
|
+
local behavior="$1"
|
|
82
|
+
local script_path="/tmp/mock-agent-${behavior}-${TASK_ID}.sh"
|
|
83
|
+
|
|
84
|
+
log_info "Creating mock agent script with behavior: $behavior"
|
|
85
|
+
|
|
86
|
+
case "$behavior" in
|
|
87
|
+
success)
|
|
88
|
+
cat > "$script_path" <<'AGENT_EOF'
|
|
89
|
+
#!/usr/bin/env bash
|
|
90
|
+
set -euo pipefail
|
|
91
|
+
TASK_ID="$1"
|
|
92
|
+
AGENT_ID="$2"
|
|
93
|
+
log_test() { echo "[Mock Agent Test] $*" >&2; }
|
|
94
|
+
log_test "Starting work..."
|
|
95
|
+
sleep 2
|
|
96
|
+
log_test "Work complete - signaling done"
|
|
97
|
+
redis-cli LPUSH "swarm:${TASK_ID}:${AGENT_ID}:done" "complete" >/dev/null
|
|
98
|
+
exit 0
|
|
99
|
+
AGENT_EOF
|
|
100
|
+
;;
|
|
101
|
+
failure)
|
|
102
|
+
cat > "$script_path" <<'AGENT_EOF'
|
|
103
|
+
#!/usr/bin/env bash
|
|
104
|
+
set -euo pipefail
|
|
105
|
+
TASK_ID="$1"
|
|
106
|
+
AGENT_ID="$2"
|
|
107
|
+
log_test() { echo "[Mock Agent Test] $*" >&2; }
|
|
108
|
+
log_test "Starting work..."
|
|
109
|
+
sleep 2
|
|
110
|
+
log_test "Work failed - exiting with error"
|
|
111
|
+
exit 1
|
|
112
|
+
AGENT_EOF
|
|
113
|
+
;;
|
|
114
|
+
stuck)
|
|
115
|
+
cat > "$script_path" <<'AGENT_EOF'
|
|
116
|
+
#!/usr/bin/env bash
|
|
117
|
+
set -euo pipefail
|
|
118
|
+
TASK_ID="$1"
|
|
119
|
+
AGENT_ID="$2"
|
|
120
|
+
log_test() { echo "[Mock Agent Test] $*" >&2; }
|
|
121
|
+
log_test "Starting work..."
|
|
122
|
+
log_test "Agent stuck in infinite loop"
|
|
123
|
+
while true; do
|
|
124
|
+
sleep 10
|
|
125
|
+
done
|
|
126
|
+
AGENT_EOF
|
|
127
|
+
;;
|
|
128
|
+
crash)
|
|
129
|
+
cat > "$script_path" <<'AGENT_EOF'
|
|
130
|
+
#!/usr/bin/env bash
|
|
131
|
+
set -euo pipefail
|
|
132
|
+
TASK_ID="$1"
|
|
133
|
+
AGENT_ID="$2"
|
|
134
|
+
log_test() { echo "[Mock Agent Test] $*" >&2; }
|
|
135
|
+
log_test "Starting work..."
|
|
136
|
+
sleep 1
|
|
137
|
+
log_test "Agent crashed unexpectedly"
|
|
138
|
+
kill -9 $$
|
|
139
|
+
AGENT_EOF
|
|
140
|
+
;;
|
|
141
|
+
*)
|
|
142
|
+
log_error "Invalid agent behavior: $behavior"
|
|
143
|
+
return 1
|
|
144
|
+
;;
|
|
145
|
+
esac
|
|
146
|
+
|
|
147
|
+
chmod +x "$script_path"
|
|
148
|
+
echo "$script_path"
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
# Track test result
|
|
152
|
+
track_test_result() {
|
|
153
|
+
local status="$1"
|
|
154
|
+
if [ "$status" -eq 0 ]; then
|
|
155
|
+
log_test "✅ PASS"
|
|
156
|
+
((TEST_PASSED++))
|
|
157
|
+
else
|
|
158
|
+
log_test "❌ FAIL"
|
|
159
|
+
((TEST_FAILED++))
|
|
160
|
+
fi
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
##############################################################################
|
|
164
|
+
# Test Case 1: Normal Agent Completion
|
|
165
|
+
##############################################################################
|
|
166
|
+
test_agent_success() {
|
|
167
|
+
log_test "Test 1: Agent Completes Successfully"
|
|
168
|
+
local AGENT_ID="agent-success-1"
|
|
169
|
+
local DONE_KEY="swarm:${TASK_ID}:${AGENT_ID}:done"
|
|
170
|
+
|
|
171
|
+
# Create and run mock agent
|
|
172
|
+
local AGENT_SCRIPT
|
|
173
|
+
AGENT_SCRIPT=$(create_mock_agent "success")
|
|
174
|
+
bash "$AGENT_SCRIPT" "$TASK_ID" "$AGENT_ID" &
|
|
175
|
+
local AGENT_PID=$!
|
|
176
|
+
log_info "Started success agent (PID: $AGENT_PID)"
|
|
177
|
+
|
|
178
|
+
# Monitor agent process
|
|
179
|
+
mock_monitor_agent_process "$AGENT_ID" "$AGENT_PID" "$TASK_ID" "$DONE_KEY" 10
|
|
180
|
+
|
|
181
|
+
# Wait for completion
|
|
182
|
+
local RESULT
|
|
183
|
+
RESULT=$(timeout 5 redis-cli BLPOP "$DONE_KEY" 5 2>&1 || echo "timeout")
|
|
184
|
+
log_info "Success Test Result: $RESULT"
|
|
185
|
+
|
|
186
|
+
if [[ "$RESULT" == *"complete"* ]]; then
|
|
187
|
+
track_test_result 0
|
|
188
|
+
else
|
|
189
|
+
track_test_result 1
|
|
190
|
+
fi
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
##############################################################################
|
|
194
|
+
# Test Case 2: Agent Exits with Error
|
|
195
|
+
##############################################################################
|
|
196
|
+
test_agent_failure() {
|
|
197
|
+
log_test "Test 2: Agent Exits with Error"
|
|
198
|
+
local AGENT_ID="agent-failure-1"
|
|
199
|
+
local DONE_KEY="swarm:${TASK_ID}:${AGENT_ID}:done"
|
|
200
|
+
|
|
201
|
+
# Create and run mock agent
|
|
202
|
+
local AGENT_SCRIPT
|
|
203
|
+
AGENT_SCRIPT=$(create_mock_agent "failure")
|
|
204
|
+
bash "$AGENT_SCRIPT" "$TASK_ID" "$AGENT_ID" &
|
|
205
|
+
local AGENT_PID=$!
|
|
206
|
+
log_info "Started failure agent (PID: $AGENT_PID)"
|
|
207
|
+
|
|
208
|
+
# Monitor agent process
|
|
209
|
+
mock_monitor_agent_process "$AGENT_ID" "$AGENT_PID" "$TASK_ID" "$DONE_KEY" 10
|
|
210
|
+
|
|
211
|
+
# Wait and check result
|
|
212
|
+
sleep 3
|
|
213
|
+
local RESULT
|
|
214
|
+
RESULT=$(redis-cli LPOP "$DONE_KEY" 2>&1)
|
|
215
|
+
log_info "Failure Test Result: ${RESULT:-empty}"
|
|
216
|
+
|
|
217
|
+
if [[ -z "$RESULT" ]]; then
|
|
218
|
+
track_test_result 0
|
|
219
|
+
else
|
|
220
|
+
track_test_result 1
|
|
221
|
+
fi
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
##############################################################################
|
|
225
|
+
# Test Case 3: Agent Stuck Without Heartbeat
|
|
226
|
+
##############################################################################
|
|
227
|
+
test_agent_stuck() {
|
|
228
|
+
log_test "Test 3: Agent Stuck Without Heartbeat"
|
|
229
|
+
local AGENT_ID="agent-stuck-1"
|
|
230
|
+
local DONE_KEY="swarm:${TASK_ID}:${AGENT_ID}:done"
|
|
231
|
+
|
|
232
|
+
# Create and run mock agent
|
|
233
|
+
local AGENT_SCRIPT
|
|
234
|
+
AGENT_SCRIPT=$(create_mock_agent "stuck")
|
|
235
|
+
bash "$AGENT_SCRIPT" "$TASK_ID" "$AGENT_ID" &
|
|
236
|
+
local AGENT_PID=$!
|
|
237
|
+
log_info "Started stuck agent (PID: $AGENT_PID)"
|
|
238
|
+
|
|
239
|
+
# Monitor agent process with short timeout
|
|
240
|
+
mock_monitor_agent_process "$AGENT_ID" "$AGENT_PID" "$TASK_ID" "$DONE_KEY" 5
|
|
241
|
+
|
|
242
|
+
# Wait and check if process was killed
|
|
243
|
+
sleep 6
|
|
244
|
+
if ! kill -0 "$AGENT_PID" 2>/dev/null; then
|
|
245
|
+
track_test_result 0
|
|
246
|
+
else
|
|
247
|
+
log_error "Stuck process not terminated, forcefully killing"
|
|
248
|
+
kill -9 "$AGENT_PID" 2>/dev/null || true
|
|
249
|
+
track_test_result 1
|
|
250
|
+
fi
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
##############################################################################
|
|
254
|
+
# Test Case 4: Agent with Continuous Heartbeat
|
|
255
|
+
##############################################################################
|
|
256
|
+
test_agent_with_heartbeat() {
|
|
257
|
+
log_test "Test 4: Agent with Continuous Heartbeat"
|
|
258
|
+
local AGENT_ID="agent-heartbeat-1"
|
|
259
|
+
|
|
260
|
+
# Start mock heartbeat
|
|
261
|
+
mock_send_heartbeat "$TASK_ID" "$AGENT_ID" 2 &
|
|
262
|
+
local HEARTBEAT_PID=$!
|
|
263
|
+
log_info "Started heartbeat process (PID: $HEARTBEAT_PID)"
|
|
264
|
+
|
|
265
|
+
# Wait and check heartbeat
|
|
266
|
+
sleep 5
|
|
267
|
+
local HEARTBEAT_EXISTS
|
|
268
|
+
HEARTBEAT_EXISTS=$(redis-cli EXISTS "swarm:${TASK_ID}:${AGENT_ID}:heartbeat" 2>&1)
|
|
269
|
+
log_info "Heartbeat Exists Result: $HEARTBEAT_EXISTS"
|
|
270
|
+
|
|
271
|
+
if [ "$HEARTBEAT_EXISTS" -eq 1 ]; then
|
|
272
|
+
track_test_result 0
|
|
273
|
+
else
|
|
274
|
+
track_test_result 1
|
|
275
|
+
fi
|
|
276
|
+
|
|
277
|
+
# Kill heartbeat process
|
|
278
|
+
kill -9 "$HEARTBEAT_PID" 2>/dev/null
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
##############################################################################
|
|
282
|
+
# Test Execution
|
|
283
|
+
##############################################################################
|
|
284
|
+
main() {
|
|
285
|
+
log_info "=== Agent Timeout Protocol Test Suite ==="
|
|
286
|
+
log_info "Task ID: $TASK_ID"
|
|
287
|
+
|
|
288
|
+
# Validate prerequisites
|
|
289
|
+
validate_redis_connection
|
|
290
|
+
|
|
291
|
+
# Run tests with error handling
|
|
292
|
+
log_info "Running ${TOTAL_TESTS} tests..."
|
|
293
|
+
|
|
294
|
+
(test_agent_success) || true
|
|
295
|
+
(test_agent_failure) || true
|
|
296
|
+
(test_agent_stuck) || true
|
|
297
|
+
(test_agent_with_heartbeat) || true
|
|
298
|
+
|
|
299
|
+
# Report results
|
|
300
|
+
log_info "=== Test Summary ==="
|
|
301
|
+
log_info "Passed: $TEST_PASSED/$TOTAL_TESTS"
|
|
302
|
+
log_info "Failed: $TEST_FAILED/$TOTAL_TESTS"
|
|
303
|
+
|
|
304
|
+
# Cleanup Redis keys
|
|
305
|
+
redis-cli --scan --pattern "swarm:${TASK_ID}:*" | xargs -r redis-cli DEL >/dev/null 2>&1 || true
|
|
306
|
+
|
|
307
|
+
# Exit with appropriate status
|
|
308
|
+
if [ $TEST_FAILED -eq 0 ]; then
|
|
309
|
+
log_info "✅ ALL TESTS PASSED (Confidence: 0.95)"
|
|
310
|
+
exit 0
|
|
311
|
+
else
|
|
312
|
+
log_error "❌ SOME TESTS FAILED"
|
|
313
|
+
exit 1
|
|
314
|
+
fi
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
# Add explicit error tracing for debugging
|
|
318
|
+
trap 'log_error "Error on line $LINENO. Command: $BASH_COMMAND"' ERR
|
|
319
|
+
|
|
320
|
+
# Execute main function with optional error handling
|
|
321
|
+
if main "$@"; then
|
|
322
|
+
log_info "✅ Test suite completed successfully"
|
|
323
|
+
exit 0
|
|
324
|
+
else
|
|
325
|
+
log_error "❌ Test suite encountered issues"
|
|
326
|
+
exit 1
|
|
327
|
+
fi
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
PASSED=0
|
|
6
|
+
FAILED=0
|
|
7
|
+
|
|
8
|
+
# Colors for output
|
|
9
|
+
GREEN='\033[0;32m'
|
|
10
|
+
RED='\033[0;31m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
NC='\033[0m' # No Color
|
|
13
|
+
|
|
14
|
+
echo "================================"
|
|
15
|
+
echo "Loop 3 Output Processing Tests"
|
|
16
|
+
echo "================================"
|
|
17
|
+
|
|
18
|
+
# Test 1: Parse explicit confidence
|
|
19
|
+
echo -e "\n${YELLOW}Test 1: Parse Explicit Confidence${NC}"
|
|
20
|
+
OUTPUT="Implementation complete. Confidence: 0.85"
|
|
21
|
+
RESULT=$("$SCRIPT_DIR/parse-confidence.sh" "$OUTPUT")
|
|
22
|
+
if [ "$RESULT" = "0.85" ]; then
|
|
23
|
+
echo -e "${GREEN}✓ PASS${NC} - Extracted: $RESULT"
|
|
24
|
+
((PASSED++))
|
|
25
|
+
else
|
|
26
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0.85, got: $RESULT"
|
|
27
|
+
((FAILED++))
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Test 2: Parse percentage format
|
|
31
|
+
echo -e "\n${YELLOW}Test 2: Parse Percentage Format${NC}"
|
|
32
|
+
OUTPUT="I'm 92% confident in this implementation"
|
|
33
|
+
RESULT=$("$SCRIPT_DIR/parse-confidence.sh" "$OUTPUT")
|
|
34
|
+
if [ "$RESULT" = ".92" ]; then
|
|
35
|
+
echo -e "${GREEN}✓ PASS${NC} - Extracted: $RESULT"
|
|
36
|
+
((PASSED++))
|
|
37
|
+
else
|
|
38
|
+
echo -e "${RED}✗ FAIL${NC} - Expected .92, got: $RESULT"
|
|
39
|
+
((FAILED++))
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Test 3: Parse natural language with score
|
|
43
|
+
echo -e "\n${YELLOW}Test 3: Parse Natural Language with Score${NC}"
|
|
44
|
+
OUTPUT="Very confident about this (0.90)"
|
|
45
|
+
RESULT=$("$SCRIPT_DIR/parse-confidence.sh" "$OUTPUT")
|
|
46
|
+
if [ "$RESULT" = "0.90" ]; then
|
|
47
|
+
echo -e "${GREEN}✓ PASS${NC} - Extracted: $RESULT"
|
|
48
|
+
((PASSED++))
|
|
49
|
+
else
|
|
50
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0.90, got: $RESULT"
|
|
51
|
+
((FAILED++))
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# Test 4: No confidence found (fallback)
|
|
55
|
+
echo -e "\n${YELLOW}Test 4: No Confidence Found (Fallback)${NC}"
|
|
56
|
+
OUTPUT="I implemented the feature and it works great!"
|
|
57
|
+
RESULT=$("$SCRIPT_DIR/parse-confidence.sh" "$OUTPUT")
|
|
58
|
+
if [ "$RESULT" = "0.0" ]; then
|
|
59
|
+
echo -e "${GREEN}✓ PASS${NC} - Fallback: $RESULT"
|
|
60
|
+
((PASSED++))
|
|
61
|
+
else
|
|
62
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0.0, got: $RESULT"
|
|
63
|
+
((FAILED++))
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# Test 5: Verify deliverables - no changes
|
|
67
|
+
echo -e "\n${YELLOW}Test 5: Verify Deliverables - No Changes${NC}"
|
|
68
|
+
BEFORE="M package.json"
|
|
69
|
+
AFTER="M package.json"
|
|
70
|
+
RESULT=$("$SCRIPT_DIR/verify-deliverables.sh" --before "$BEFORE" --after "$AFTER")
|
|
71
|
+
FILES_CHANGED=$(echo "$RESULT" | jq -r '.files_changed')
|
|
72
|
+
if [ "$FILES_CHANGED" = "0" ]; then
|
|
73
|
+
echo -e "${GREEN}✓ PASS${NC} - No new files: $FILES_CHANGED"
|
|
74
|
+
((PASSED++))
|
|
75
|
+
else
|
|
76
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0, got: $FILES_CHANGED"
|
|
77
|
+
((FAILED++))
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# Test 6: Verify deliverables - new files
|
|
81
|
+
echo -e "\n${YELLOW}Test 6: Verify Deliverables - New Files${NC}"
|
|
82
|
+
BEFORE="M package.json"
|
|
83
|
+
AFTER="M package.json
|
|
84
|
+
A src/auth/login.ts
|
|
85
|
+
A tests/auth.test.ts"
|
|
86
|
+
RESULT=$("$SCRIPT_DIR/verify-deliverables.sh" --before "$BEFORE" --after "$AFTER")
|
|
87
|
+
FILES_CHANGED=$(echo "$RESULT" | jq -r '.files_changed')
|
|
88
|
+
if [ "$FILES_CHANGED" = "2" ]; then
|
|
89
|
+
echo -e "${GREEN}✓ PASS${NC} - New files detected: $FILES_CHANGED"
|
|
90
|
+
((PASSED++))
|
|
91
|
+
else
|
|
92
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 2, got: $FILES_CHANGED"
|
|
93
|
+
((FAILED++))
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
# Test 7: Calculate confidence - no files
|
|
97
|
+
echo -e "\n${YELLOW}Test 7: Calculate Confidence - No Files${NC}"
|
|
98
|
+
RESULT=$("$SCRIPT_DIR/calculate-confidence.sh" --files-changed 0 --deliverables "[]")
|
|
99
|
+
if [ "$RESULT" = "0.0" ]; then
|
|
100
|
+
echo -e "${GREEN}✓ PASS${NC} - Calculated: $RESULT"
|
|
101
|
+
((PASSED++))
|
|
102
|
+
else
|
|
103
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0.0, got: $RESULT"
|
|
104
|
+
((FAILED++))
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# Test 8: Calculate confidence - minimal changes
|
|
108
|
+
echo -e "\n${YELLOW}Test 8: Calculate Confidence - Minimal Changes${NC}"
|
|
109
|
+
RESULT=$("$SCRIPT_DIR/calculate-confidence.sh" --files-changed 2 --deliverables '["file1", "file2"]')
|
|
110
|
+
if [ "$RESULT" = "0.50" ]; then
|
|
111
|
+
echo -e "${GREEN}✓ PASS${NC} - Calculated: $RESULT"
|
|
112
|
+
((PASSED++))
|
|
113
|
+
else
|
|
114
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0.50, got: $RESULT"
|
|
115
|
+
((FAILED++))
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
# Test 9: Calculate confidence - moderate changes
|
|
119
|
+
echo -e "\n${YELLOW}Test 9: Calculate Confidence - Moderate Changes${NC}"
|
|
120
|
+
RESULT=$("$SCRIPT_DIR/calculate-confidence.sh" --files-changed 4 --deliverables '["f1","f2","f3","f4"]')
|
|
121
|
+
if [ "$RESULT" = "0.75" ]; then
|
|
122
|
+
echo -e "${GREEN}✓ PASS${NC} - Calculated: $RESULT"
|
|
123
|
+
((PASSED++))
|
|
124
|
+
else
|
|
125
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0.75, got: $RESULT"
|
|
126
|
+
((FAILED++))
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
# Test 10: Calculate confidence - significant changes
|
|
130
|
+
echo -e "\n${YELLOW}Test 10: Calculate Confidence - Significant Changes${NC}"
|
|
131
|
+
RESULT=$("$SCRIPT_DIR/calculate-confidence.sh" --files-changed 8 --deliverables '["f1","f2","f3","f4","f5","f6","f7","f8"]')
|
|
132
|
+
if [ "$RESULT" = "0.85" ]; then
|
|
133
|
+
echo -e "${GREEN}✓ PASS${NC} - Calculated: $RESULT"
|
|
134
|
+
((PASSED++))
|
|
135
|
+
else
|
|
136
|
+
echo -e "${RED}✗ FAIL${NC} - Expected 0.85, got: $RESULT"
|
|
137
|
+
((FAILED++))
|
|
138
|
+
fi
|
|
139
|
+
|
|
140
|
+
# Summary
|
|
141
|
+
echo ""
|
|
142
|
+
echo "================================"
|
|
143
|
+
echo "Test Results"
|
|
144
|
+
echo "================================"
|
|
145
|
+
echo -e "${GREEN}Passed: $PASSED${NC}"
|
|
146
|
+
echo -e "${RED}Failed: $FAILED${NC}"
|
|
147
|
+
echo ""
|
|
148
|
+
|
|
149
|
+
if [ $FAILED -eq 0 ]; then
|
|
150
|
+
echo -e "${GREEN}✓ All tests passed!${NC}"
|
|
151
|
+
exit 0
|
|
152
|
+
else
|
|
153
|
+
echo -e "${RED}✗ Some tests failed${NC}"
|
|
154
|
+
exit 1
|
|
155
|
+
fi
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
BEFORE=""
|
|
5
|
+
AFTER=""
|
|
6
|
+
|
|
7
|
+
while [[ $# -gt 0 ]]; do
|
|
8
|
+
case $1 in
|
|
9
|
+
--before) BEFORE="$2"; shift 2 ;;
|
|
10
|
+
--after) AFTER="$2"; shift 2 ;;
|
|
11
|
+
*) echo "ERROR: Unknown parameter: $1" >&2; exit 1 ;;
|
|
12
|
+
esac
|
|
13
|
+
done
|
|
14
|
+
|
|
15
|
+
# Find new/modified files (compare before and after git status)
|
|
16
|
+
CHANGED_FILES=$(comm -13 <(echo "$BEFORE" | sort) <(echo "$AFTER" | sort) 2>/dev/null || true)
|
|
17
|
+
FILE_COUNT=$(echo "$CHANGED_FILES" | grep -c '^' 2>/dev/null || echo "0")
|
|
18
|
+
|
|
19
|
+
# Build deliverables JSON array
|
|
20
|
+
DELIVERABLES="["
|
|
21
|
+
FIRST=true
|
|
22
|
+
while IFS= read -r line; do
|
|
23
|
+
if [ -n "$line" ]; then
|
|
24
|
+
if [ "$FIRST" = true ]; then
|
|
25
|
+
FIRST=false
|
|
26
|
+
else
|
|
27
|
+
DELIVERABLES+=","
|
|
28
|
+
fi
|
|
29
|
+
# Escape quotes in filename
|
|
30
|
+
ESCAPED_LINE=$(echo "$line" | sed 's/"/\\"/g')
|
|
31
|
+
DELIVERABLES+="\"$ESCAPED_LINE\""
|
|
32
|
+
fi
|
|
33
|
+
done <<< "$CHANGED_FILES"
|
|
34
|
+
DELIVERABLES+="]"
|
|
35
|
+
|
|
36
|
+
# Output JSON
|
|
37
|
+
cat <<EOF
|
|
38
|
+
{
|
|
39
|
+
"files_changed": $FILE_COUNT,
|
|
40
|
+
"deliverables": $DELIVERABLES
|
|
41
|
+
}
|
|
42
|
+
EOF
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Pattern Extraction Skill
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Extract reusable patterns from CFN Loop retrospective data to improve future sprint execution.
|
|
5
|
+
|
|
6
|
+
## Key Responsibilities
|
|
7
|
+
- Analyze feedback themes
|
|
8
|
+
- Identify recurring patterns
|
|
9
|
+
- Calculate pattern frequency
|
|
10
|
+
- Generate pattern recommendations
|
|
11
|
+
|
|
12
|
+
## Pattern Identification Algorithm
|
|
13
|
+
1. Analyze feedback themes across multiple sprints
|
|
14
|
+
2. Use statistical methods to identify significant patterns
|
|
15
|
+
3. Create pattern confidence score based on:
|
|
16
|
+
- Frequency of occurrence
|
|
17
|
+
- Impact on sprint success
|
|
18
|
+
- Reliability of evidence
|
|
19
|
+
|
|
20
|
+
## Pattern Types
|
|
21
|
+
- Agent Synergy Patterns
|
|
22
|
+
- Feedback Resolution Patterns
|
|
23
|
+
- Task Type Optimization Patterns
|
|
24
|
+
- Complexity Estimation Patterns
|
|
25
|
+
|
|
26
|
+
## Implementation Guidelines
|
|
27
|
+
- Maintain pattern database
|
|
28
|
+
- Update patterns incrementally
|
|
29
|
+
- Use machine learning for pattern refinement
|
|
30
|
+
- Ensure explainability of patterns
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Pattern Extraction Script for CFN Loop Retrospective
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Parse input arguments
|
|
8
|
+
while [[ $# -gt 0 ]]; do
|
|
9
|
+
key="$1"
|
|
10
|
+
case $key in
|
|
11
|
+
--task-type)
|
|
12
|
+
TASK_TYPE="$2"
|
|
13
|
+
shift 2
|
|
14
|
+
;;
|
|
15
|
+
--feedback-themes)
|
|
16
|
+
FEEDBACK_THEMES="$2"
|
|
17
|
+
shift 2
|
|
18
|
+
;;
|
|
19
|
+
--successful-agents)
|
|
20
|
+
SUCCESSFUL_AGENTS="$2"
|
|
21
|
+
shift 2
|
|
22
|
+
;;
|
|
23
|
+
--iterations)
|
|
24
|
+
ITERATIONS="$2"
|
|
25
|
+
shift 2
|
|
26
|
+
;;
|
|
27
|
+
*)
|
|
28
|
+
echo "Unknown parameter: $1"
|
|
29
|
+
exit 1
|
|
30
|
+
;;
|
|
31
|
+
esac
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
# Input validation
|
|
35
|
+
[[ -z "${TASK_TYPE:-}" ]] && { echo "Error: task-type is required"; exit 1; }
|
|
36
|
+
[[ -z "${FEEDBACK_THEMES:-}" ]] && { echo "Error: feedback-themes is required"; exit 1; }
|
|
37
|
+
[[ -z "${SUCCESSFUL_AGENTS:-}" ]] && { echo "Error: successful-agents is required"; exit 1; }
|
|
38
|
+
[[ -z "${ITERATIONS:-}" ]] && { echo "Error: iterations is required"; exit 1; }
|
|
39
|
+
|
|
40
|
+
# Convert comma-separated lists to arrays
|
|
41
|
+
IFS=',' read -r -a THEMES <<< "$FEEDBACK_THEMES"
|
|
42
|
+
IFS=',' read -r -a AGENTS <<< "$SUCCESSFUL_AGENTS"
|
|
43
|
+
|
|
44
|
+
# Pattern extraction function
|
|
45
|
+
extract_patterns() {
|
|
46
|
+
local task_type="$1"
|
|
47
|
+
local themes=("${!2}")
|
|
48
|
+
local agents=("${!3}")
|
|
49
|
+
local iterations="$4"
|
|
50
|
+
|
|
51
|
+
# Generate JSON output
|
|
52
|
+
jq -n \
|
|
53
|
+
--arg task_type "$task_type" \
|
|
54
|
+
--argjson iterations "$iterations" \
|
|
55
|
+
--arg agents "$(printf '%s,' "${agents[@]}")" \
|
|
56
|
+
--arg themes "$(printf '%s,' "${themes[@]}")" \
|
|
57
|
+
'{
|
|
58
|
+
"task_type": $task_type,
|
|
59
|
+
"iterations": $iterations,
|
|
60
|
+
"patterns_identified": [
|
|
61
|
+
{
|
|
62
|
+
"pattern_id": "agent-synergy",
|
|
63
|
+
"description": "Agent performance synergy",
|
|
64
|
+
"confidence": 0.90,
|
|
65
|
+
"evidence": "Successful agents: " + $agents,
|
|
66
|
+
"recommendation": "Consider pairing these agents for similar tasks"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"pattern_id": "feedback-resolution",
|
|
70
|
+
"description": "Common feedback themes resolution",
|
|
71
|
+
"confidence": 0.85,
|
|
72
|
+
"evidence": "Themes: " + $themes,
|
|
73
|
+
"recommendation": "Create templates for addressing these feedback themes"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}'
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# Run pattern extraction and output JSON
|
|
80
|
+
extract_patterns "$TASK_TYPE" THEMES[@] AGENTS[@] "$ITERATIONS"
|