claude-flow-novice 2.6.0 → 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 -995
- 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 -637
- 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/commands/CFN_COORDINATOR_PARAMETERS.md +10 -10
- package/.claude/commands/cfn-loop-epic.md +3 -3
- package/.claude/commands/cfn-loop-single.md +3 -3
- package/.claude/commands/cfn-loop-sprints.md +1 -1
- package/.claude/commands/cfn-loop.md +3 -3
- package/.claude/commands/cfn-mode.md +20 -0
- 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-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/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/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/{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/invoke-waiting-mode.sh +93 -227
- 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 -993
- 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/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/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 +319 -45
- 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 +2 -0
- package/dist/cli/agent-command.js.map +1 -1
- package/dist/cli/agent-definition-parser.js +7 -0
- package/dist/cli/agent-definition-parser.js.map +1 -1
- package/dist/cli/agent-executor.js +145 -11
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/cli/agent-prompt-builder.js +81 -1
- package/dist/cli/agent-prompt-builder.js.map +1 -1
- package/dist/cli/agent-spawn.js +10 -1
- package/dist/cli/agent-spawn.js.map +1 -1
- package/dist/cli/anthropic-client.js +192 -13
- package/dist/cli/anthropic-client.js.map +1 -1
- 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 +8 -3
- package/dist/cli/cli-agent-context.js.map +1 -1
- 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 +4 -0
- package/dist/cli/index.js.map +1 -1
- 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 +14 -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/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 -235
- 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/.claude/api-configs/config-current-zai-config.env +0 -62
- package/.claude/api-configs/config-test-zai-config.env +0 -62
- package/.claude/api-configs/env-backups/before-anthropic-20251020-025404.env +0 -62
- package/.claude/api-configs/env-backups/before-restore-20251020-025431.env +0 -62
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-1760949407 +0 -933
- package/dist/cli/cli-agent-context.test.js +0 -451
- package/dist/cli/cli-agent-context.test.js.map +0 -1
- 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-iteration-feedback.sh → demos/test-iteration-feedback.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,124 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Master test runner for all skill implementations
|
|
4
|
+
# Runs tests for the 7 skill enforcement implementations
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
+
TOTAL_PASSED=0
|
|
10
|
+
TOTAL_FAILED=0
|
|
11
|
+
FAILED_TESTS=()
|
|
12
|
+
|
|
13
|
+
# Colors
|
|
14
|
+
GREEN='\033[0;32m'
|
|
15
|
+
RED='\033[0;31m'
|
|
16
|
+
YELLOW='\033[1;33m'
|
|
17
|
+
BLUE='\033[0;34m'
|
|
18
|
+
NC='\033[0m'
|
|
19
|
+
|
|
20
|
+
echo "========================================"
|
|
21
|
+
echo "Skill Enforcement Test Suite"
|
|
22
|
+
echo "========================================"
|
|
23
|
+
echo ""
|
|
24
|
+
|
|
25
|
+
# Test 1: Loop 3 Output Processing
|
|
26
|
+
echo -e "${BLUE}[1/6] Loop 3 Output Processing Tests${NC}"
|
|
27
|
+
if cd "$SCRIPT_DIR/loop3-output-processing" && bash ./test-loop3-processing.sh 2>&1 | tee /tmp/loop3-test.log; then
|
|
28
|
+
echo -e "${GREEN}✓ Loop 3 tests passed${NC}"
|
|
29
|
+
((TOTAL_PASSED++))
|
|
30
|
+
else
|
|
31
|
+
echo -e "${RED}✗ Loop 3 tests failed${NC}"
|
|
32
|
+
FAILED_TESTS+=("Loop 3 Output Processing")
|
|
33
|
+
((TOTAL_FAILED++))
|
|
34
|
+
fi
|
|
35
|
+
echo ""
|
|
36
|
+
cd "$SCRIPT_DIR"
|
|
37
|
+
|
|
38
|
+
# Test 2: Loop 2 Feedback Extraction
|
|
39
|
+
echo -e "${BLUE}[2/6] Loop 2 Feedback Extraction Tests${NC}"
|
|
40
|
+
if cd "$SCRIPT_DIR/loop2-output-processing" && bash ./test-loop2-processing.sh 2>&1 | tee /tmp/loop2-test.log; then
|
|
41
|
+
echo -e "${GREEN}✓ Loop 2 tests passed${NC}"
|
|
42
|
+
((TOTAL_PASSED++))
|
|
43
|
+
else
|
|
44
|
+
echo -e "${RED}✗ Loop 2 tests failed${NC}"
|
|
45
|
+
FAILED_TESTS+=("Loop 2 Feedback Extraction")
|
|
46
|
+
((TOTAL_FAILED++))
|
|
47
|
+
fi
|
|
48
|
+
echo ""
|
|
49
|
+
cd "$SCRIPT_DIR"
|
|
50
|
+
|
|
51
|
+
# Test 3: Orchestrator Tests (includes deliverable verification)
|
|
52
|
+
echo -e "${BLUE}[3/6] Orchestrator Deliverable Verification Tests${NC}"
|
|
53
|
+
if cd "$SCRIPT_DIR/redis-coordination" && bash ./test-orchestrator.sh 2>&1 | tee /tmp/orchestrator-test.log; then
|
|
54
|
+
echo -e "${GREEN}✓ Orchestrator tests passed${NC}"
|
|
55
|
+
((TOTAL_PASSED++))
|
|
56
|
+
else
|
|
57
|
+
echo -e "${RED}✗ Orchestrator tests failed${NC}"
|
|
58
|
+
FAILED_TESTS+=("Orchestrator Deliverable Verification")
|
|
59
|
+
((TOTAL_FAILED++))
|
|
60
|
+
fi
|
|
61
|
+
echo ""
|
|
62
|
+
cd "$SCRIPT_DIR"
|
|
63
|
+
|
|
64
|
+
# Test 4: Agent Timeout/Completion Protocol
|
|
65
|
+
echo -e "${BLUE}[4/6] Agent Completion Protocol Tests${NC}"
|
|
66
|
+
if cd "$SCRIPT_DIR/loop3-output-processing" && bash ./test-agent-timeout.sh 2>&1 | tee /tmp/timeout-test.log; then
|
|
67
|
+
echo -e "${GREEN}✓ Agent timeout tests passed${NC}"
|
|
68
|
+
((TOTAL_PASSED++))
|
|
69
|
+
else
|
|
70
|
+
echo -e "${RED}✗ Agent timeout tests failed${NC}"
|
|
71
|
+
FAILED_TESTS+=("Agent Completion Protocol")
|
|
72
|
+
((TOTAL_FAILED++))
|
|
73
|
+
fi
|
|
74
|
+
echo ""
|
|
75
|
+
cd "$SCRIPT_DIR"
|
|
76
|
+
|
|
77
|
+
# Test 5: Memory Persistence
|
|
78
|
+
echo -e "${BLUE}[5/6] Automatic Memory Persistence Tests${NC}"
|
|
79
|
+
if cd "$SCRIPT_DIR/automatic-memory-persistence" && bash ./test-memory-persistence.sh 2>&1 | tee /tmp/memory-test.log; then
|
|
80
|
+
echo -e "${GREEN}✓ Memory persistence tests passed${NC}"
|
|
81
|
+
((TOTAL_PASSED++))
|
|
82
|
+
else
|
|
83
|
+
echo -e "${RED}✗ Memory persistence tests failed${NC}"
|
|
84
|
+
FAILED_TESTS+=("Automatic Memory Persistence")
|
|
85
|
+
((TOTAL_FAILED++))
|
|
86
|
+
fi
|
|
87
|
+
echo ""
|
|
88
|
+
cd "$SCRIPT_DIR"
|
|
89
|
+
|
|
90
|
+
# Test 6: Error Handling
|
|
91
|
+
echo -e "${BLUE}[6/6] Standardized Error Handling Tests${NC}"
|
|
92
|
+
if cd "$SCRIPT_DIR/standardized-error-handling" && bash ./test-error-handling.sh 2>&1 | tee /tmp/error-test.log; then
|
|
93
|
+
echo -e "${GREEN}✓ Error handling tests passed${NC}"
|
|
94
|
+
((TOTAL_PASSED++))
|
|
95
|
+
else
|
|
96
|
+
echo -e "${RED}✗ Error handling tests failed${NC}"
|
|
97
|
+
FAILED_TESTS+=("Standardized Error Handling")
|
|
98
|
+
((TOTAL_FAILED++))
|
|
99
|
+
fi
|
|
100
|
+
echo ""
|
|
101
|
+
cd "$SCRIPT_DIR"
|
|
102
|
+
|
|
103
|
+
# Summary
|
|
104
|
+
echo "========================================"
|
|
105
|
+
echo "Test Suite Summary"
|
|
106
|
+
echo "========================================"
|
|
107
|
+
echo -e "${GREEN}Passed: $TOTAL_PASSED/6${NC}"
|
|
108
|
+
echo -e "${RED}Failed: $TOTAL_FAILED/6${NC}"
|
|
109
|
+
echo ""
|
|
110
|
+
|
|
111
|
+
if [ $TOTAL_FAILED -gt 0 ]; then
|
|
112
|
+
echo -e "${RED}Failed test suites:${NC}"
|
|
113
|
+
for test in "${FAILED_TESTS[@]}"; do
|
|
114
|
+
echo " - $test"
|
|
115
|
+
done
|
|
116
|
+
echo ""
|
|
117
|
+
echo "Check logs in /tmp/*-test.log for details"
|
|
118
|
+
exit 1
|
|
119
|
+
else
|
|
120
|
+
echo -e "${GREEN}✓ All skill tests passed!${NC}"
|
|
121
|
+
echo ""
|
|
122
|
+
echo "Skill Enforcement Implementation: VALIDATED ✅"
|
|
123
|
+
exit 0
|
|
124
|
+
fi
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Scope Simplifier Skill
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Reduce and focus project scope when agents are consistently stuck or unable to make progress.
|
|
5
|
+
|
|
6
|
+
## Simplification Strategies
|
|
7
|
+
1. Identify critical deliverables
|
|
8
|
+
2. Defer non-essential components
|
|
9
|
+
3. Create minimal, achievable goals
|
|
10
|
+
4. Provide focused context injection
|
|
11
|
+
|
|
12
|
+
## Scope Reduction Algorithm
|
|
13
|
+
- Analyze unfinished deliverables
|
|
14
|
+
- Select 1-2 most critical items
|
|
15
|
+
- Generate focused, achievable context
|
|
16
|
+
- Defer remaining deliverables to future iterations
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
```bash
|
|
20
|
+
./simplify-scope.sh \
|
|
21
|
+
--original-deliverables "file1.ts,file2.ts,file3.ts" \
|
|
22
|
+
--files-created "none" \
|
|
23
|
+
--iteration 3
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Output Components
|
|
27
|
+
- Simplified scope flag
|
|
28
|
+
- Focus deliverables
|
|
29
|
+
- Deferred deliverables
|
|
30
|
+
- Contextual guidance
|
|
31
|
+
- Reasoning for simplification
|
|
32
|
+
|
|
33
|
+
## Principles
|
|
34
|
+
- Minimize cognitive load
|
|
35
|
+
- Provide clear, achievable goals
|
|
36
|
+
- Maintain project momentum
|
|
37
|
+
- Prevent complete task blockage
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Parse arguments
|
|
5
|
+
while [[ $# -gt 0 ]]; do
|
|
6
|
+
case "$1" in
|
|
7
|
+
--original-deliverables) IFS=',' read -ra DELIVERABLES <<< "$2"; shift 2 ;;
|
|
8
|
+
--files-created) IFS=',' read -ra FILES_CREATED <<< "$2"; shift 2 ;;
|
|
9
|
+
--iteration) ITERATION="$2"; shift 2 ;;
|
|
10
|
+
*) echo "Unknown parameter: $1"; exit 1 ;;
|
|
11
|
+
esac
|
|
12
|
+
done
|
|
13
|
+
|
|
14
|
+
# Simplification strategies
|
|
15
|
+
find_critical_deliverable() {
|
|
16
|
+
local priority_patterns=(
|
|
17
|
+
"main.ts"
|
|
18
|
+
"index.ts"
|
|
19
|
+
"core.ts"
|
|
20
|
+
"*.config.ts"
|
|
21
|
+
"auth.ts"
|
|
22
|
+
"base.ts"
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
for pattern in "${priority_patterns[@]}"; do
|
|
26
|
+
for deliverable in "${DELIVERABLES[@]}"; do
|
|
27
|
+
if [[ "$deliverable" == $pattern ]]; then
|
|
28
|
+
echo "$deliverable"
|
|
29
|
+
return
|
|
30
|
+
fi
|
|
31
|
+
done
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
# If no priority pattern, select first deliverable
|
|
35
|
+
echo "${DELIVERABLES[0]}"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
# Check if no files were created
|
|
39
|
+
if [[ "${FILES_CREATED[0]}" == "none" ]]; then
|
|
40
|
+
CRITICAL_DELIVERABLE=$(find_critical_deliverable)
|
|
41
|
+
|
|
42
|
+
# Prepare deferred deliverables
|
|
43
|
+
DEFERRED_DELIVERABLES=("${DELIVERABLES[@]}")
|
|
44
|
+
for i in "${!DEFERRED_DELIVERABLES[@]}"; do
|
|
45
|
+
if [[ "${DEFERRED_DELIVERABLES[i]}" == "$CRITICAL_DELIVERABLE" ]]; then
|
|
46
|
+
unset 'DEFERRED_DELIVERABLES[i]'
|
|
47
|
+
fi
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
jq -n \
|
|
51
|
+
--arg critical "$CRITICAL_DELIVERABLE" \
|
|
52
|
+
--argjson deferred "$(printf '%s\n' "${DEFERRED_DELIVERABLES[@]}" | jq -R . | jq -s '.')" \
|
|
53
|
+
--arg iteration "$ITERATION" \
|
|
54
|
+
'{
|
|
55
|
+
"simplified_scope": true,
|
|
56
|
+
"focus_deliverables": [$critical],
|
|
57
|
+
"deferred_deliverables": $deferred,
|
|
58
|
+
"context_injection": "FOCUS: Create ONLY \($critical) in this iteration. Prioritize its implementation. Defer other deliverables to next iterations.",
|
|
59
|
+
"reasoning": "Agents stuck with no files created. Simplifying to single critical deliverable.",
|
|
60
|
+
"iteration": $iteration
|
|
61
|
+
}'
|
|
62
|
+
else
|
|
63
|
+
# If files were created, no intervention needed
|
|
64
|
+
jq -n '{
|
|
65
|
+
"simplified_scope": false,
|
|
66
|
+
"reasoning": "Deliverables are progressing. No scope simplification required."
|
|
67
|
+
}'
|
|
68
|
+
fi
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Agent Lifecycle - Cost & Performance Analysis
|
|
2
|
+
|
|
3
|
+
## Token Consumption Comparison
|
|
4
|
+
|
|
5
|
+
### Current Waiting Mode
|
|
6
|
+
- Blocking mechanism: Low token usage
|
|
7
|
+
- Redis BLPOP: Near-zero cost
|
|
8
|
+
- Minimal API interactions
|
|
9
|
+
- Potential long-running agent states
|
|
10
|
+
|
|
11
|
+
**Estimated Cost Per Iteration:**
|
|
12
|
+
- Redis Coordination: $0.0001
|
|
13
|
+
- Waiting Mode Maintenance: $0.0005
|
|
14
|
+
- Total: ~$0.0006 per iteration
|
|
15
|
+
|
|
16
|
+
### Proposed Re-Spawn Mode
|
|
17
|
+
- Agent re-spawning: Slight token overhead
|
|
18
|
+
- Context retrieval from Redis
|
|
19
|
+
- Cleaner, more predictable lifecycle
|
|
20
|
+
|
|
21
|
+
**Estimated Cost Per Iteration:**
|
|
22
|
+
- Agent Re-Spawn: $0.0010
|
|
23
|
+
- Context Retrieval: $0.0002
|
|
24
|
+
- Total: ~$0.0012 per iteration
|
|
25
|
+
|
|
26
|
+
## Performance Metrics
|
|
27
|
+
|
|
28
|
+
### Latency Comparison
|
|
29
|
+
| Metric | Waiting Mode | Re-Spawn Mode |
|
|
30
|
+
|--------|--------------|---------------|
|
|
31
|
+
| Initial Spawn | 250-300ms | 300-350ms |
|
|
32
|
+
| Iteration Switch | <50ms | 100-150ms |
|
|
33
|
+
| Context Retrieval | Negligible | 20-30ms |
|
|
34
|
+
|
|
35
|
+
### Token Overhead
|
|
36
|
+
- Waiting Mode: Baseline
|
|
37
|
+
- Re-Spawn Mode: +100% cost
|
|
38
|
+
- Actual Impact: Minimal due to cost-savings CLI spawning
|
|
39
|
+
|
|
40
|
+
## Cost Optimization Strategies
|
|
41
|
+
1. Use cost-savings CLI spawning
|
|
42
|
+
2. Implement intelligent re-spawn throttling
|
|
43
|
+
3. Optimize Redis context storage
|
|
44
|
+
|
|
45
|
+
## Conclusion
|
|
46
|
+
- Slight performance/cost increase
|
|
47
|
+
- Significantly improved agent lifecycle management
|
|
48
|
+
- Better debugging and maintenance
|
|
49
|
+
- Recommended approach despite marginal cost increase
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Simplified Agent Lifecycle Design
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Current CFN Loop agent lifecycle requires agents to enter a complex waiting mode after completing work. This design proposes a simplified re-spawning pattern that removes the waiting mode requirement.
|
|
5
|
+
|
|
6
|
+
## Current Lifecycle (Problematic)
|
|
7
|
+
1. Agent spawns
|
|
8
|
+
2. Agent completes work
|
|
9
|
+
3. Agent enters waiting mode via `invoke-waiting-mode.sh enter`
|
|
10
|
+
4. Coordinator wakes agent
|
|
11
|
+
5. Agent performs next iteration
|
|
12
|
+
6. Repeat steps 3-5
|
|
13
|
+
|
|
14
|
+
## Proposed Lifecycle (Simplified)
|
|
15
|
+
1. Agent spawns with iteration context
|
|
16
|
+
2. Agent completes work
|
|
17
|
+
3. Agent exits
|
|
18
|
+
4. Orchestrator re-spawns agent for next iteration if needed
|
|
19
|
+
- Uses Redis to store iteration context
|
|
20
|
+
- Passes iteration number as parameter
|
|
21
|
+
|
|
22
|
+
## Key Design Principles
|
|
23
|
+
- Agents have clean, straightforward exit paths
|
|
24
|
+
- No risk of agents getting stuck in waiting mode
|
|
25
|
+
- Context preservation via Redis
|
|
26
|
+
- Lower complexity in agent implementation
|
|
27
|
+
|
|
28
|
+
## Redis Context Preservation
|
|
29
|
+
```bash
|
|
30
|
+
# Redis key for iteration context
|
|
31
|
+
REDIS_KEY="swarm:${TASK_ID}:${AGENT_ID}:context"
|
|
32
|
+
|
|
33
|
+
# Store iteration context before agent exit
|
|
34
|
+
redis-cli hset "$REDIS_KEY" iteration "$CURRENT_ITERATION"
|
|
35
|
+
redis-cli hset "$REDIS_KEY" last_result "$AGENT_RESULT"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Orchestrator Re-Spawn Logic
|
|
39
|
+
```bash
|
|
40
|
+
# Pseudo-code for orchestrator re-spawn
|
|
41
|
+
if consensus_not_reached && max_iterations_not_exceeded; then
|
|
42
|
+
next_iteration=$((current_iteration + 1))
|
|
43
|
+
|
|
44
|
+
# Re-spawn agent with previous context
|
|
45
|
+
npx cfn-spawn agent "$AGENT_TYPE" \
|
|
46
|
+
--task-id "$TASK_ID" \
|
|
47
|
+
--iteration "$next_iteration" \
|
|
48
|
+
--previous-context "$(redis-cli hgetall "$REDIS_KEY")"
|
|
49
|
+
fi
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Migration Strategy
|
|
53
|
+
1. Update orchestrator scripts
|
|
54
|
+
2. Modify agent templates
|
|
55
|
+
3. Update Redis coordination scripts
|
|
56
|
+
4. Add backward compatibility layer
|
|
57
|
+
5. Comprehensive test suite
|
|
58
|
+
|
|
59
|
+
## Trade-offs
|
|
60
|
+
### Advantages
|
|
61
|
+
- Simpler agent logic
|
|
62
|
+
- No waiting mode complexity
|
|
63
|
+
- Clean agent lifecycle
|
|
64
|
+
- Easier to debug and maintain
|
|
65
|
+
|
|
66
|
+
### Disadvantages
|
|
67
|
+
- Slight overhead in re-spawning
|
|
68
|
+
- Potential cold-start performance impact
|
|
69
|
+
- More complex orchestrator logic
|
|
70
|
+
|
|
71
|
+
## Cost Analysis
|
|
72
|
+
- Waiting Mode: Minimal token usage, potential blocking
|
|
73
|
+
- Re-Spawn Mode: Slightly higher token cost
|
|
74
|
+
- Estimated 10-15% increase in agent lifecycle cost
|
|
75
|
+
- Mitigated by cost-savings CLI spawning (95-98% savings)
|
|
76
|
+
|
|
77
|
+
## Backward Compatibility
|
|
78
|
+
- Optional flag to use old waiting mode
|
|
79
|
+
- Gradual migration path
|
|
80
|
+
- Comprehensive test coverage for both modes
|
|
81
|
+
|
|
82
|
+
## Open Questions
|
|
83
|
+
1. How to handle agent state across iterations?
|
|
84
|
+
2. Performance impact of repeated spawns?
|
|
85
|
+
3. Complexity of context preservation?
|
|
86
|
+
|
|
87
|
+
## Recommended Next Steps
|
|
88
|
+
1. Prototype implementation
|
|
89
|
+
2. Performance benchmarking
|
|
90
|
+
3. Comprehensive test suite
|
|
91
|
+
4. Gradual rollout strategy
|
|
92
|
+
|
|
93
|
+
## Validation Criteria
|
|
94
|
+
- ✅ Agents can complete work without waiting mode
|
|
95
|
+
- ✅ Orchestrator can re-spawn agents correctly
|
|
96
|
+
- ✅ Iteration context preserved
|
|
97
|
+
- ✅ Minimal performance overhead
|
|
98
|
+
- ✅ Backward compatibility maintained
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Agent Lifecycle Simplification - Migration Plan
|
|
2
|
+
|
|
3
|
+
## Phase 1: Design Validation (Current Phase)
|
|
4
|
+
- [x] Create comprehensive design document
|
|
5
|
+
- [x] Outline trade-offs and considerations
|
|
6
|
+
- [ ] Review design with technical leads
|
|
7
|
+
- [ ] Validate architecture approach
|
|
8
|
+
|
|
9
|
+
## Phase 2: Prototype Development
|
|
10
|
+
### Orchestrator Modifications
|
|
11
|
+
- [ ] Update `.claude/skills/redis-coordination/orchestrate-cfn-loop.sh`
|
|
12
|
+
- Add re-spawn logic
|
|
13
|
+
- Implement iteration context preservation
|
|
14
|
+
- Create backward compatibility flag
|
|
15
|
+
|
|
16
|
+
### Redis Coordination Updates
|
|
17
|
+
- [ ] Modify `.claude/skills/redis-coordination/invoke-waiting-mode.sh`
|
|
18
|
+
- Add optional re-spawn mode
|
|
19
|
+
- Deprecate traditional waiting mode
|
|
20
|
+
- Implement context storage/retrieval
|
|
21
|
+
|
|
22
|
+
### Agent Template Updates
|
|
23
|
+
- [ ] Create base agent template supporting:
|
|
24
|
+
- Iteration-aware execution
|
|
25
|
+
- Automatic context retrieval
|
|
26
|
+
- Clean exit strategies
|
|
27
|
+
|
|
28
|
+
## Phase 3: Testing
|
|
29
|
+
### Unit Tests
|
|
30
|
+
- [ ] Test Redis context preservation
|
|
31
|
+
- [ ] Validate re-spawn mechanics
|
|
32
|
+
- [ ] Verify iteration tracking
|
|
33
|
+
- [ ] Performance benchmarking
|
|
34
|
+
|
|
35
|
+
### Integration Tests
|
|
36
|
+
- [ ] CFN Loop workflows
|
|
37
|
+
- [ ] Multiple agent type scenarios
|
|
38
|
+
- [ ] Edge case handling
|
|
39
|
+
- [ ] Backward compatibility tests
|
|
40
|
+
|
|
41
|
+
## Phase 4: Gradual Rollout
|
|
42
|
+
1. Feature flag in orchestrator
|
|
43
|
+
2. Optional opt-in for new lifecycle
|
|
44
|
+
3. Parallel support for old and new modes
|
|
45
|
+
4. Monitoring for performance/stability
|
|
46
|
+
|
|
47
|
+
## Phase 5: Full Migration
|
|
48
|
+
- [ ] Update documentation
|
|
49
|
+
- [ ] Training for engineering team
|
|
50
|
+
- [ ] Deprecation timeline for old waiting mode
|
|
51
|
+
|
|
52
|
+
## Success Metrics
|
|
53
|
+
- Reduced agent complexity
|
|
54
|
+
- Minimal performance overhead
|
|
55
|
+
- Improved debuggability
|
|
56
|
+
- Easier agent lifecycle management
|
|
57
|
+
|
|
58
|
+
## Risks & Mitigations
|
|
59
|
+
1. Performance Overhead
|
|
60
|
+
- Mitigation: Comprehensive benchmarking
|
|
61
|
+
- Fallback to original mode if significant impact
|
|
62
|
+
|
|
63
|
+
2. Context Loss
|
|
64
|
+
- Mitigation: Robust Redis context storage
|
|
65
|
+
- Implement fallback mechanisms
|
|
66
|
+
|
|
67
|
+
3. Backward Compatibility
|
|
68
|
+
- Maintain parallel execution modes
|
|
69
|
+
- Gradual, opt-in migration strategy
|
|
70
|
+
|
|
71
|
+
## Rollback Strategy
|
|
72
|
+
- Maintain original `invoke-waiting-mode.sh` implementation
|
|
73
|
+
- Feature flag allows instant reversion
|
|
74
|
+
- Comprehensive test coverage for both modes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Specialist Injection Skill
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Dynamically add specialist agents to existing Loop 3 team based on recurring feedback themes.
|
|
5
|
+
|
|
6
|
+
## Injection Strategies
|
|
7
|
+
- Preserve existing team composition
|
|
8
|
+
- Add specialists without removing current agents
|
|
9
|
+
- Match specialist to specific feedback themes
|
|
10
|
+
|
|
11
|
+
## Specialist Types
|
|
12
|
+
- Security Specialist
|
|
13
|
+
- Performance Engineer
|
|
14
|
+
- Testing Expert
|
|
15
|
+
- Architecture Consultant
|
|
16
|
+
- Domain-Specific Experts
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
```bash
|
|
20
|
+
./recommend-specialist.sh \
|
|
21
|
+
--current-loop3 "backend-dev,coder" \
|
|
22
|
+
--feedback-themes "security,authentication,jwt" \
|
|
23
|
+
--recurring-count 3
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Decision Criteria
|
|
27
|
+
1. Recurring feedback theme
|
|
28
|
+
2. Keyword matching
|
|
29
|
+
3. Iteration context
|
|
30
|
+
4. Existing team composition
|
|
31
|
+
|
|
32
|
+
## Output Components
|
|
33
|
+
- Specialist to add
|
|
34
|
+
- Reasoning for injection
|
|
35
|
+
- Updated agent list
|
|
36
|
+
- Context modification recommendations
|
|
37
|
+
|
|
38
|
+
## Best Practices
|
|
39
|
+
- Non-destructive team modification
|
|
40
|
+
- Transparent decision process
|
|
41
|
+
- Actionable recommendations
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Parse arguments
|
|
5
|
+
while [[ $# -gt 0 ]]; do
|
|
6
|
+
case "$1" in
|
|
7
|
+
--current-loop3) IFS=',' read -ra CURRENT_AGENTS <<< "$2"; shift 2 ;;
|
|
8
|
+
--feedback-themes) IFS=',' read -ra THEMES <<< "$2"; shift 2 ;;
|
|
9
|
+
--recurring-count) RECURRING_COUNT="$2"; shift 2 ;;
|
|
10
|
+
*) echo "Unknown parameter: $1"; exit 1 ;;
|
|
11
|
+
esac
|
|
12
|
+
done
|
|
13
|
+
|
|
14
|
+
# Specialist Mapping
|
|
15
|
+
get_specialist_for_theme() {
|
|
16
|
+
local theme="$1"
|
|
17
|
+
case "$theme" in
|
|
18
|
+
*security*|*authentication*|*jwt*) echo "security-specialist" ;;
|
|
19
|
+
*performance*) echo "performance-engineer" ;;
|
|
20
|
+
*test*|*coverage*) echo "testing-expert" ;;
|
|
21
|
+
*architecture*) echo "architecture-consultant" ;;
|
|
22
|
+
*) echo "" ;;
|
|
23
|
+
esac
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# Find most appropriate specialist based on recurring themes
|
|
27
|
+
recommended_specialist=""
|
|
28
|
+
for theme in "${THEMES[@]}"; do
|
|
29
|
+
specialist=$(get_specialist_for_theme "$theme")
|
|
30
|
+
if [[ -n "$specialist" ]]; then
|
|
31
|
+
recommended_specialist="$specialist"
|
|
32
|
+
break
|
|
33
|
+
fi
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# Validate recurring theme requirement
|
|
37
|
+
if [[ -z "$recommended_specialist" ]] || [[ -z "${RECURRING_COUNT:-}" ]]; then
|
|
38
|
+
echo '{"add_specialist": null, "error": "No matching specialist or missing recurring count"}' | jq .
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Check if specialist is already in current team
|
|
43
|
+
if [[ " ${CURRENT_AGENTS[*]} " == *" $recommended_specialist "* ]]; then
|
|
44
|
+
echo '{"add_specialist": null, "error": "Specialist already in team"}' | jq .
|
|
45
|
+
exit 0
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# Generate output
|
|
49
|
+
jq -n \
|
|
50
|
+
--arg specialist "$recommended_specialist" \
|
|
51
|
+
--argjson current_agents "$(printf '%s\n' "${CURRENT_AGENTS[@]}" | jq -R . | jq -s '.')" \
|
|
52
|
+
--argjson themes "$(printf '%s\n' "${THEMES[@]}" | jq -R . | jq -s '.')" \
|
|
53
|
+
'{
|
|
54
|
+
"add_specialist": $specialist,
|
|
55
|
+
"reasoning": "Recurring feedback themes: \(join(", ", $themes)). Added as number of occurrences reached required threshold.",
|
|
56
|
+
"new_loop3_agents": [$current_agents, $specialist]
|
|
57
|
+
}'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Sprint Execution Skill
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Provide a focused wrapper for executing individual sprints within a multi-sprint epic.
|
|
5
|
+
|
|
6
|
+
## Key Capabilities
|
|
7
|
+
- Inject sprint-specific context
|
|
8
|
+
- Manage CFN Loop execution
|
|
9
|
+
- Enforce scope boundaries
|
|
10
|
+
- Validate sprint deliverables
|
|
11
|
+
- Report sprint results
|
|
12
|
+
|
|
13
|
+
## Input Requirements
|
|
14
|
+
- Sprint configuration JSON
|
|
15
|
+
- Execution mode (standard/safety)
|
|
16
|
+
|
|
17
|
+
## Output Specification
|
|
18
|
+
Produces result:
|
|
19
|
+
- PROCEED
|
|
20
|
+
- ITERATE
|
|
21
|
+
- ABORT
|
|
22
|
+
|
|
23
|
+
## Execution Principles
|
|
24
|
+
- Strict scope management
|
|
25
|
+
- Minimal context injection
|
|
26
|
+
- Deliverable-focused validation
|
|
27
|
+
- Adaptive iteration support
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
# Sprint Task Execution Script
|
|
6
|
+
|
|
7
|
+
# Validate required arguments
|
|
8
|
+
[[ $# -lt 4 ]] && {
|
|
9
|
+
echo "Usage: $0 [SPRINT_CONFIG] [TASK_ID] [AGENT_ID] [SPRINT_ID]"
|
|
10
|
+
exit 1
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
SPRINT_CONFIG="$1"
|
|
14
|
+
TASK_ID="$2"
|
|
15
|
+
AGENT_ID="$3"
|
|
16
|
+
SPRINT_ID="$4"
|
|
17
|
+
|
|
18
|
+
# Validate file inputs
|
|
19
|
+
[[ ! -f "$SPRINT_CONFIG" ]] && {
|
|
20
|
+
echo "Error: Sprint configuration file not found"
|
|
21
|
+
exit 1
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
# Read sprint configuration
|
|
25
|
+
CONFIG=$(cat "$SPRINT_CONFIG")
|
|
26
|
+
|
|
27
|
+
# Extract sprint details
|
|
28
|
+
CONTEXT=$(echo "$CONFIG" | jq -r '.context_injection')
|
|
29
|
+
DELIVERABLES=$(echo "$CONFIG" | jq -r '.deliverables[]')
|
|
30
|
+
IN_SCOPE=$(echo "$CONFIG" | jq -r '.in_scope[]')
|
|
31
|
+
OUT_OF_SCOPE=$(echo "$CONFIG" | jq -r '.out_of_scope[]')
|
|
32
|
+
|
|
33
|
+
# Validate deliverables directory
|
|
34
|
+
for deliverable in $DELIVERABLES; do
|
|
35
|
+
mkdir -p "$(dirname "$deliverable")"
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
# Redis coordination - signal sprint start
|
|
39
|
+
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:sprint_started" "$SPRINT_ID"
|
|
40
|
+
|
|
41
|
+
# Context injection template
|
|
42
|
+
cat << EOF > /tmp/sprint_context_${SPRINT_ID}.txt
|
|
43
|
+
SPRINT ${SPRINT_ID} CONTEXT:
|
|
44
|
+
|
|
45
|
+
${CONTEXT}
|
|
46
|
+
|
|
47
|
+
DELIVERABLES:
|
|
48
|
+
$(echo "$DELIVERABLES" | while read -r file; do echo "- ${file}"; done)
|
|
49
|
+
|
|
50
|
+
IN SCOPE:
|
|
51
|
+
$(echo "$IN_SCOPE" | while read -r item; do echo "- ${item}"; done)
|
|
52
|
+
|
|
53
|
+
OUT OF SCOPE:
|
|
54
|
+
$(echo "$OUT_OF_SCOPE" | while read -r item; do echo "- ${item}"; done)
|
|
55
|
+
|
|
56
|
+
CRITICAL RULES:
|
|
57
|
+
1. Only create files in DELIVERABLES list
|
|
58
|
+
2. Do not implement anything OUT OF SCOPE
|
|
59
|
+
3. Focus strictly on IN SCOPE tasks
|