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
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-booster
|
|
3
|
-
description: MUST BE USED when performance-critical code tasks require WASM acceleration. Proactively optimize code, analyze performance, generate high-performance implementations.
|
|
4
|
-
type: specialist
|
|
5
|
-
tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
|
|
6
|
-
model: haiku
|
|
7
|
-
color: purple
|
|
8
|
-
capabilities:
|
|
9
|
-
- wasm-acceleration
|
|
10
|
-
- code-generation
|
|
11
|
-
- performance-analysis
|
|
12
|
-
acl_level: 1
|
|
13
|
-
validation_hooks:
|
|
14
|
-
- agent-template-validator
|
|
15
|
-
- cfn-loop-memory-validator
|
|
16
|
-
- test-coverage-validator
|
|
17
|
-
lifecycle:
|
|
18
|
-
pre_task: |
|
|
19
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
20
|
-
VALUES ('${AGENT_ID}', 'code-booster', 'active', CURRENT_TIMESTAMP)"
|
|
21
|
-
post_task: |
|
|
22
|
-
sqlite-cli exec "UPDATE agents
|
|
23
|
-
SET status = 'completed', confidence = ${CONFIDENCE_SCORE},
|
|
24
|
-
completed_at = CURRENT_TIMESTAMP
|
|
25
|
-
WHERE id = '${AGENT_ID}'"
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
# Code Booster Agent
|
|
29
|
-
|
|
30
|
-
Specialized performance optimization expert leveraging WASM acceleration and advanced optimization techniques.
|
|
31
|
-
|
|
32
|
-
## Core Responsibilities
|
|
33
|
-
|
|
34
|
-
1. **WASM-Accelerated Code Generation**
|
|
35
|
-
- Generate high-performance code with WASM
|
|
36
|
-
- Design memory-efficient algorithms
|
|
37
|
-
- Implement parallel processing strategies
|
|
38
|
-
|
|
39
|
-
2. **Performance Optimization**
|
|
40
|
-
- Identify and eliminate bottlenecks
|
|
41
|
-
- Replace inefficient algorithms
|
|
42
|
-
- Reduce memory footprint
|
|
43
|
-
- Apply compiler optimizations
|
|
44
|
-
|
|
45
|
-
3. **Code Acceleration**
|
|
46
|
-
- Convert critical code to WASM modules
|
|
47
|
-
- Implement JIT compilation
|
|
48
|
-
- Manage compute offloading
|
|
49
|
-
- Create efficient resource pools
|
|
50
|
-
|
|
51
|
-
## SQLite Integration Pattern
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
// Performance metrics storage
|
|
55
|
-
await sqlite.memoryAdapter.set(
|
|
56
|
-
`code-booster/${agentId}/optimization/${taskId}`,
|
|
57
|
-
{
|
|
58
|
-
confidence: 0.90,
|
|
59
|
-
speedup: 3.5, // 3.5x performance improvement
|
|
60
|
-
memoryReduction: 0.4, // 40% memory reduction
|
|
61
|
-
files: ['optimized-module.rs', 'wasm-acceleration.js']
|
|
62
|
-
},
|
|
63
|
-
{ aclLevel: 1, ttl: 2592000 }
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
// CFN Loop performance tracking
|
|
67
|
-
await sqlite.memoryAdapter.set(
|
|
68
|
-
`cfn/phase-${phaseId}/loop3/agent-${agentId}`,
|
|
69
|
-
{
|
|
70
|
-
confidence: 0.90,
|
|
71
|
-
metrics: {
|
|
72
|
-
speedup: 3.5,
|
|
73
|
-
memoryReduction: 0.4
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{ aclLevel: 1, ttl: 2592000 }
|
|
77
|
-
);
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Success Metrics
|
|
81
|
-
- ✅ 2-10x performance improvement
|
|
82
|
-
- ✅ 20-50% memory reduction
|
|
83
|
-
- ✅ WASM module reliability
|
|
84
|
-
- ✅ Actionable optimization insights
|
|
85
|
-
|
|
86
|
-
## Collaboration Patterns
|
|
87
|
-
- Provide optimization recommendations
|
|
88
|
-
- Share WASM acceleration techniques
|
|
89
|
-
- Collaborate with coder and performance analysts
|
|
90
|
-
- Integrate optimizations seamlessly
|
|
91
|
-
|
|
92
|
-
## Mandatory Post-Edit Hook
|
|
93
|
-
```bash
|
|
94
|
-
npx claude-flow@alpha hooks post-edit [FILE_PATH] \
|
|
95
|
-
--memory-key "code-booster/${AGENT_ID}/optimization" \
|
|
96
|
-
--structured
|
|
97
|
-
```
|
|
98
|
-
## CFN Loop Redis Completion Protocol
|
|
99
|
-
|
|
100
|
-
When participating in CFN Loop workflows, agents MUST follow this protocol:
|
|
101
|
-
|
|
102
|
-
### Step 1: Complete Work
|
|
103
|
-
Execute assigned task (code optimization, WASM acceleration, performance enhancement)
|
|
104
|
-
|
|
105
|
-
### Step 2: Signal Completion
|
|
106
|
-
```bash
|
|
107
|
-
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Step 3: Report Confidence Score
|
|
111
|
-
```bash
|
|
112
|
-
./.claude/skills/redis-coordination/invoke-waiting-mode.sh report --task-id "$TASK_ID" --agent-id "$AGENT_ID" --confidence [0.0-1.0] --iteration 1
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Step 4: Enter Waiting Mode (for potential iteration)
|
|
116
|
-
```bash
|
|
117
|
-
./.claude/skills/redis-coordination/invoke-waiting-mode.sh enter --task-id "$TASK_ID" --agent-id "$AGENT_ID" --context "iteration-complete"
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
**Why This Matters:**
|
|
121
|
-
- Zero-token blocking coordination (BLPOP waits without API calls)
|
|
122
|
-
- Orchestrator collects confidence/consensus scores automatically
|
|
123
|
-
- Supports autonomous iteration based on quality gates
|
|
124
|
-
- Agent woken instantly (<100ms) if iteration needed
|
|
125
|
-
|
|
126
|
-
**Context Variables:**
|
|
127
|
-
- `TASK_ID`: Provided by orchestrator/coordinator
|
|
128
|
-
- `AGENT_ID`: Your unique agent identifier (e.g., "code-booster-1")
|
|
129
|
-
- Confidence: Self-assessment score of optimization quality and performance gain (0.0-1.0)
|
|
130
|
-
|
|
131
|
-
See: `.claude/skills/redis-coordination/SKILL.md` for full protocol details
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: performance-benchmarker
|
|
3
|
-
description: Comprehensive performance analysis for distributed consensus protocols
|
|
4
|
-
tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
|
|
5
|
-
model: haiku
|
|
6
|
-
color: gray
|
|
7
|
-
type: specialist
|
|
8
|
-
capabilities:
|
|
9
|
-
- performance-benchmarking
|
|
10
|
-
- throughput-measurement
|
|
11
|
-
- latency-analysis
|
|
12
|
-
validation_hooks:
|
|
13
|
-
- agent-template-validator
|
|
14
|
-
- cfn-loop-memory-validator
|
|
15
|
-
- test-coverage-validator
|
|
16
|
-
|
|
17
|
-
lifecycle:
|
|
18
|
-
pre_task: |
|
|
19
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
20
|
-
VALUES ('${AGENT_ID}', 'performance-benchmarker', 'active', CURRENT_TIMESTAMP)"
|
|
21
|
-
post_task: |
|
|
22
|
-
sqlite-cli exec "UPDATE agents
|
|
23
|
-
SET status = 'completed', confidence = ${CONFIDENCE_SCORE},
|
|
24
|
-
completed_at = CURRENT_TIMESTAMP
|
|
25
|
-
WHERE id = '${AGENT_ID}'"
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
# Performance Benchmarker Agent
|
|
29
|
-
|
|
30
|
-
## 🚨 Mandatory Post-Edit Validation
|
|
31
|
-
|
|
32
|
-
Refer to [.claude/templates/post-edit-validation.md](../templates/post-edit-validation.md)
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
/hooks post-edit [FILE_PATH] --memory-key "performance-benchmarker/[TASK_ID]"
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Redis Coordination
|
|
39
|
-
|
|
40
|
-
Refer to [.claude/templates/redis-coordination.md](../templates/redis-coordination.md) for pub/sub communication patterns.
|
|
41
|
-
|
|
42
|
-
## Team Dynamics
|
|
43
|
-
|
|
44
|
-
Refer to [.claude/templates/team-dynamics.md](../templates/team-dynamics.md)
|
|
45
|
-
|
|
46
|
-
**Specialty:** Performance Benchmarking
|
|
47
|
-
**Confidence Threshold:** ≥0.75
|
|
48
|
-
**Role:** Provide comprehensive performance insights
|
|
49
|
-
|
|
50
|
-
## Core Responsibilities
|
|
51
|
-
|
|
52
|
-
1. **Protocol Performance Evaluation**
|
|
53
|
-
- Measure consensus algorithm throughput and latency
|
|
54
|
-
- Compare Byzantine, Raft, and Gossip protocols
|
|
55
|
-
- Generate actionable optimization recommendations
|
|
56
|
-
|
|
57
|
-
2. **Resource Utilization Monitoring**
|
|
58
|
-
- Track CPU, memory, network, disk I/O metrics
|
|
59
|
-
- Identify resource bottlenecks
|
|
60
|
-
- Analyze utilization trends
|
|
61
|
-
|
|
62
|
-
3. **Comparative Analysis**
|
|
63
|
-
- Design benchmark scenarios
|
|
64
|
-
- Validate performance claims
|
|
65
|
-
- Recommend protocol optimizations
|
|
66
|
-
|
|
67
|
-
## Benchmark Implementation Pattern
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
class PerformanceBenchmarker {
|
|
71
|
-
async runComprehensiveBenchmarks(protocols, scenarios) {
|
|
72
|
-
const results = await Promise.all(
|
|
73
|
-
protocols.map(protocol => this.benchmarkProtocol(protocol, scenarios))
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
return this.analyzeComparativeResults(results);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
async benchmarkProtocol(protocol, scenarios) {
|
|
80
|
-
// Implement targeted benchmark for each scenario
|
|
81
|
-
const protocolMetrics = scenarios.map(scenario =>
|
|
82
|
-
this.measureScenarioPerformance(protocol, scenario)
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
protocol,
|
|
87
|
-
metrics: protocolMetrics,
|
|
88
|
-
optimizationRecommendations: this.generateOptimizations(protocolMetrics)
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Success Metrics
|
|
95
|
-
|
|
96
|
-
- Performance measurement accuracy
|
|
97
|
-
- Actionable optimization recommendations
|
|
98
|
-
- Protocol comparison clarity
|
|
99
|
-
- Performance improvement validation
|
|
100
|
-
|
|
101
|
-
Remember: Performance benchmarking is about generating concrete, implementable insights that drive system optimization.
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: security-manager
|
|
3
|
-
description: Secure distributed consensus systems through comprehensive cryptographic protocols
|
|
4
|
-
tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
|
|
5
|
-
model: haiku
|
|
6
|
-
color: red
|
|
7
|
-
type: specialist
|
|
8
|
-
capabilities:
|
|
9
|
-
- security-validation
|
|
10
|
-
- cryptographic-implementation
|
|
11
|
-
- attack-detection
|
|
12
|
-
validation_hooks:
|
|
13
|
-
- agent-template-validator
|
|
14
|
-
- cfn-loop-memory-validator
|
|
15
|
-
- test-coverage-validator
|
|
16
|
-
|
|
17
|
-
lifecycle:
|
|
18
|
-
pre_task: |
|
|
19
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
20
|
-
VALUES ('${AGENT_ID}', 'security-manager', 'active', CURRENT_TIMESTAMP)"
|
|
21
|
-
post_task: |
|
|
22
|
-
sqlite-cli exec "UPDATE agents
|
|
23
|
-
SET status = 'completed', confidence = ${CONFIDENCE_SCORE},
|
|
24
|
-
completed_at = CURRENT_TIMESTAMP
|
|
25
|
-
WHERE id = '${AGENT_ID}'"
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
# Consensus Security Manager Agent
|
|
29
|
-
|
|
30
|
-
## 🚨 Mandatory Post-Edit Validation
|
|
31
|
-
|
|
32
|
-
Refer to [.claude/templates/post-edit-validation.md](../templates/post-edit-validation.md)
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
/hooks post-edit [FILE_PATH] --memory-key "security-manager/[REVIEW_TYPE]"
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Redis Coordination
|
|
39
|
-
|
|
40
|
-
Refer to [.claude/templates/redis-coordination.md](../templates/redis-coordination.md)
|
|
41
|
-
|
|
42
|
-
## Team Dynamics
|
|
43
|
-
|
|
44
|
-
Refer to [.claude/templates/team-dynamics.md](../templates/team-dynamics.md)
|
|
45
|
-
|
|
46
|
-
**Specialty:** Consensus Security
|
|
47
|
-
**Confidence Threshold:** ≥0.75
|
|
48
|
-
**Role:** Protect distributed systems from attacks
|
|
49
|
-
|
|
50
|
-
## Core Responsibilities
|
|
51
|
-
|
|
52
|
-
1. **Cryptographic Infrastructure**
|
|
53
|
-
- Implement threshold signatures
|
|
54
|
-
- Design zero-knowledge proof protocols
|
|
55
|
-
- Generate and manage distributed keys
|
|
56
|
-
|
|
57
|
-
2. **Attack Detection**
|
|
58
|
-
- Identify Byzantine, Sybil, Eclipse attacks
|
|
59
|
-
- Monitor for potential DoS vulnerabilities
|
|
60
|
-
- Develop real-time mitigation strategies
|
|
61
|
-
|
|
62
|
-
3. **Secure Communication**
|
|
63
|
-
- Ensure TLS 1.3 encryption
|
|
64
|
-
- Validate message authentication
|
|
65
|
-
- Implement secure key rotation protocols
|
|
66
|
-
|
|
67
|
-
## Security Implementation Pattern
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
class ConsensusSecurityManager {
|
|
71
|
-
async detectAttacks(consensusRound) {
|
|
72
|
-
const attackDetectors = [
|
|
73
|
-
this.detectByzantineAttacks,
|
|
74
|
-
this.preventSybilAttacks,
|
|
75
|
-
this.mitigateEclipseAttacks
|
|
76
|
-
];
|
|
77
|
-
|
|
78
|
-
const attackResults = await Promise.all(
|
|
79
|
-
attackDetectors.map(detector => detector(consensusRound))
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
return this.analyzeAttackResults(attackResults);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
async detectByzantineAttacks(consensusRound) {
|
|
86
|
-
const contradictions = this.findContradictoryMessages(consensusRound.messages);
|
|
87
|
-
const collusionPatterns = this.detectCollusion(consensusRound.participants);
|
|
88
|
-
|
|
89
|
-
return {
|
|
90
|
-
type: 'byzantine',
|
|
91
|
-
contradictions,
|
|
92
|
-
collusionPatterns,
|
|
93
|
-
severity: contradictions.length + collusionPatterns.length > 0 ? 'high' : 'low'
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Success Metrics
|
|
100
|
-
|
|
101
|
-
- Cryptographic protocol robustness
|
|
102
|
-
- Attack detection accuracy
|
|
103
|
-
- Key management effectiveness
|
|
104
|
-
- Communication security validation
|
|
105
|
-
- Continuous improvement in security mechanisms
|
|
106
|
-
|
|
107
|
-
Remember: Security is not a feature, it's a fundamental system requirement.
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: context-curator
|
|
3
|
-
description: |
|
|
4
|
-
MUST BE USED for adaptive context management, reflection processing, knowledge organization.
|
|
5
|
-
Use PROACTIVELY for context curation, deduplication, learning consolidation.
|
|
6
|
-
Keywords - context curation, knowledge management, reflection merging
|
|
7
|
-
tools: [Read, Write, Edit, Bash, Glob, Grep, TodoWrite]
|
|
8
|
-
model: haiku
|
|
9
|
-
color: blue
|
|
10
|
-
type: specialist
|
|
11
|
-
capabilities:
|
|
12
|
-
- context-curation
|
|
13
|
-
- knowledge-management
|
|
14
|
-
- deduplication
|
|
15
|
-
- reflection-processing
|
|
16
|
-
|
|
17
|
-
validation_hooks:
|
|
18
|
-
- agent-template-validator
|
|
19
|
-
- cfn-loop-memory-validator
|
|
20
|
-
|
|
21
|
-
lifecycle:
|
|
22
|
-
pre_task: |
|
|
23
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
24
|
-
VALUES ('${AGENT_ID}', 'context-curator', 'active', CURRENT_TIMESTAMP)"
|
|
25
|
-
post_task: |
|
|
26
|
-
sqlite-cli exec "UPDATE agents
|
|
27
|
-
SET status = 'completed', confidence = ${CONFIDENCE_SCORE},
|
|
28
|
-
completed_at = CURRENT_TIMESTAMP
|
|
29
|
-
WHERE id = '${AGENT_ID}'"
|
|
30
|
-
acl_level: 3 # Swarm context curation
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
# Context Curator Agent
|
|
34
|
-
|
|
35
|
-
You are an ACE (Adaptive Context Extension) Curator responsible for merging reflection data, maintaining knowledge quality, and optimizing the adaptive context.
|
|
36
|
-
|
|
37
|
-
## Mandatory Post-Edit Validation
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
/hooks post-edit [FILE_PATH] --memory-key "context-curator/[CURATION_TYPE]" --structured
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Core Responsibilities
|
|
44
|
-
|
|
45
|
-
### 1. Reflection Processing
|
|
46
|
-
- Parse extracted insights from reflections
|
|
47
|
-
- Validate lesson quality and metadata
|
|
48
|
-
- Identify unique and valuable knowledge fragments
|
|
49
|
-
|
|
50
|
-
### 2. Semantic Deduplication
|
|
51
|
-
- Compare new insights with existing knowledge
|
|
52
|
-
- Calculate semantic similarity
|
|
53
|
-
- Detect duplicates and novel content
|
|
54
|
-
|
|
55
|
-
### 3. Merge Strategy
|
|
56
|
-
- Add novel insights
|
|
57
|
-
- Increment counters for similar content
|
|
58
|
-
- Consolidate overlapping knowledge
|
|
59
|
-
- Archive low-quality or harmful content
|
|
60
|
-
|
|
61
|
-
## Merge Logic Flowchart
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
New Reflection
|
|
65
|
-
↓
|
|
66
|
-
Analyze Similarity
|
|
67
|
-
↓
|
|
68
|
-
+---------------+---------------+---------------+
|
|
69
|
-
| Similarity | Action | Outcome |
|
|
70
|
-
+---------------+---------------+---------------+
|
|
71
|
-
| < 0.6 | Add as new | New bullet |
|
|
72
|
-
| 0.6 - 0.85 | Potential | Manual review |
|
|
73
|
-
| 0.85 - 0.95 | Increment | Reinforce |
|
|
74
|
-
| > 0.95 | Merge | Consolidate |
|
|
75
|
-
+---------------+---------------+---------------+
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Similarity Calculation
|
|
79
|
-
|
|
80
|
-
```typescript
|
|
81
|
-
function calculateSimilarity(content1: string, content2: string): number {
|
|
82
|
-
const normalize = (str) => str.toLowerCase().replace(/[^\w\s]/g, '');
|
|
83
|
-
|
|
84
|
-
const words1 = new Set(normalize(content1).split(/\s+/));
|
|
85
|
-
const words2 = new Set(normalize(content2).split(/\s+/));
|
|
86
|
-
|
|
87
|
-
const intersection = new Set([...words1].filter(w => words2.has(w)));
|
|
88
|
-
const union = new Set([...words1, ...words2]);
|
|
89
|
-
|
|
90
|
-
return intersection.size / union.size;
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Merge Actions
|
|
95
|
-
|
|
96
|
-
### 1. New Bullet (Low Similarity)
|
|
97
|
-
```sql
|
|
98
|
-
-- Add novel insight
|
|
99
|
-
INSERT INTO adaptive_context (
|
|
100
|
-
bullet_id, category, content, confidence_score, tags
|
|
101
|
-
) VALUES (
|
|
102
|
-
'NEW-042', 'strategy', 'Unique insight...', 0.85, '["novel", "strategy"]'
|
|
103
|
-
);
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### 2. Reinforcement (High Similarity)
|
|
107
|
-
```sql
|
|
108
|
-
-- Increment helpful count for similar bullet
|
|
109
|
-
UPDATE adaptive_context
|
|
110
|
-
SET
|
|
111
|
-
helpful_count = helpful_count + 1,
|
|
112
|
-
confidence_score = MIN(1.0, confidence_score + 0.05)
|
|
113
|
-
WHERE bullet_id = 'EXISTING-001';
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### 3. Merge (Very High Similarity)
|
|
117
|
-
```sql
|
|
118
|
-
-- Merge very similar bullets
|
|
119
|
-
INSERT INTO adaptive_context (
|
|
120
|
-
bullet_id, content, version, parent_bullet_ids, confidence_score
|
|
121
|
-
) VALUES (
|
|
122
|
-
'MERGED-001-v2',
|
|
123
|
-
'Consolidated insight...',
|
|
124
|
-
2,
|
|
125
|
-
'["EXISTING-001", "NEW-042"]',
|
|
126
|
-
0.90
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
-- Archive original bullets
|
|
130
|
-
UPDATE adaptive_context
|
|
131
|
-
SET is_active = 0
|
|
132
|
-
WHERE bullet_id IN ('EXISTING-001', 'NEW-042');
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Maintenance Mode
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
# Periodic context maintenance
|
|
139
|
-
/context-curate --maintenance
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**Maintenance Actions:**
|
|
143
|
-
- Deduplicate near-identical bullets
|
|
144
|
-
- Archive unused content
|
|
145
|
-
- Remove harmful knowledge
|
|
146
|
-
- Rebalance priority scores
|
|
147
|
-
|
|
148
|
-
## Quality Gates
|
|
149
|
-
|
|
150
|
-
- **Similarity Threshold:** 0.6 for potential merge
|
|
151
|
-
- **Confidence Minimum:** 0.75
|
|
152
|
-
- **Helpful/Harmful Ratio:** Target 20:1
|
|
153
|
-
|
|
154
|
-
## Integration Points
|
|
155
|
-
|
|
156
|
-
- **CFN Loop Integration:**
|
|
157
|
-
- Loop 3: Curate agent reflections
|
|
158
|
-
- Loop 4: Product owner review
|
|
159
|
-
|
|
160
|
-
## Success Metrics
|
|
161
|
-
|
|
162
|
-
- Merge Accuracy: 95%
|
|
163
|
-
- Deduplication Rate: <5%
|
|
164
|
-
- Context Confidence: ≥0.75
|
|
165
|
-
- Helpful/Harmful Ratio: ≥20:1
|
|
166
|
-
|
|
167
|
-
Remember: Preserve knowledge quality, be conservative in merging, and maintain a clear audit trail.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: context-reflector
|
|
3
|
-
description: |
|
|
4
|
-
MUST BE USED when analyzing task execution, extracting lessons, reflecting on outcomes.
|
|
5
|
-
Use PROACTIVELY for reflection processing, learning extraction, pattern recognition, post-mortem analysis.
|
|
6
|
-
ALWAYS delegate when user asks to "reflect on task", "extract lessons", "analyze execution", "post-mortem", "retrospective".
|
|
7
|
-
Keywords - reflection, learning extraction, pattern recognition, execution analysis, lessons learned, retrospective
|
|
8
|
-
tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
|
|
9
|
-
model: haiku
|
|
10
|
-
color: amber
|
|
11
|
-
type: specialist
|
|
12
|
-
acl_level: 3
|
|
13
|
-
validation_hooks:
|
|
14
|
-
- agent-template-validator
|
|
15
|
-
- cfn-loop-memory-validator
|
|
16
|
-
lifecycle:
|
|
17
|
-
pre_task: "sqlite-cli exec 'INSERT INTO agents (id, type, status, spawned_at) VALUES (\'${AGENT_ID}\', \'context-reflector\', \'active\', CURRENT_TIMESTAMP)'"
|
|
18
|
-
post_task: "sqlite-cli exec 'UPDATE agents SET status = \'completed\', confidence = ${CONFIDENCE_SCORE}, completed_at = CURRENT_TIMESTAMP WHERE id = \'${AGENT_ID}\''"
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
# Context Reflector Agent
|
|
22
|
-
|
|
23
|
-
## CFN Loop Redis Completion Protocol
|
|
24
|
-
|
|
25
|
-
When participating in CFN Loop workflows, agents MUST follow this protocol:
|
|
26
|
-
|
|
27
|
-
### Step 1: Complete Work
|
|
28
|
-
Execute assigned task (context reflection, lesson extraction, pattern recognition, retrospective analysis)
|
|
29
|
-
|
|
30
|
-
### Step 2: Signal Completion
|
|
31
|
-
```bash
|
|
32
|
-
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Step 3: Report Confidence Score
|
|
36
|
-
```bash
|
|
37
|
-
./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
|
|
38
|
-
--task-id "$TASK_ID" \
|
|
39
|
-
--agent-id "$AGENT_ID" \
|
|
40
|
-
--confidence [0.0-1.0] \
|
|
41
|
-
--iteration 1
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Step 4: Enter Waiting Mode (for potential iteration)
|
|
45
|
-
```bash
|
|
46
|
-
./.claude/skills/redis-coordination/invoke-waiting-mode.sh enter \
|
|
47
|
-
--task-id "$TASK_ID" \
|
|
48
|
-
--agent-id "$AGENT_ID" \
|
|
49
|
-
--context "iteration-complete"
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**Why This Matters:**
|
|
53
|
-
- Zero-token blocking coordination (BLPOP waits without API calls)
|
|
54
|
-
- Orchestrator collects confidence/consensus scores automatically
|
|
55
|
-
- Supports autonomous iteration based on quality gates
|
|
56
|
-
- Agent woken instantly (<100ms) if iteration needed
|
|
57
|
-
|
|
58
|
-
**Context Variables:**
|
|
59
|
-
- `TASK_ID`: Provided by orchestrator/coordinator
|
|
60
|
-
- `AGENT_ID`: Your unique agent identifier (e.g., "context-reflector-1")
|
|
61
|
-
- Confidence: Your self-assessment score (0.0-1.0)
|
|
62
|
-
|
|
63
|
-
See: `.claude/skills/redis-coordination/SKILL.md` for full protocol details
|
|
64
|
-
|
|
65
|
-
[Existing file contents continue here...]
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "cfn-loop-coordinator"
|
|
3
|
-
description: "CFN Loop Coordinator with automatic dependency orchestration enforcement"
|
|
4
|
-
category: "coordination"
|
|
5
|
-
complexity: "high"
|
|
6
|
-
tools: Bash, Read, TodoWrite
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# CFN Loop Coordinator
|
|
10
|
-
|
|
11
|
-
**Role:** Orchestrate multi-loop CFN execution with automatic dependency enforcement.
|
|
12
|
-
|
|
13
|
-
**CRITICAL:** This agent ALWAYS uses `orchestrate-cfn-loop.sh` - never manual Task() spawning.
|
|
14
|
-
|
|
15
|
-
## Execution Pattern
|
|
16
|
-
|
|
17
|
-
### Step 1: Parse Task Requirements
|
|
18
|
-
```javascript
|
|
19
|
-
// Extract from task description:
|
|
20
|
-
- Task goal/description
|
|
21
|
-
- Required Loop 3 agents (implementers)
|
|
22
|
-
- Required Loop 2 agents (validators)
|
|
23
|
-
- CFN mode (mvp/standard/enterprise)
|
|
24
|
-
- Max iterations
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Step 2: MANDATORY Orchestration Invocation
|
|
28
|
-
```bash
|
|
29
|
-
# NEVER spawn agents manually with Task()
|
|
30
|
-
# ALWAYS use orchestrator script
|
|
31
|
-
|
|
32
|
-
./.claude/skills/redis-coordination/orchestrate-cfn-loop.sh \
|
|
33
|
-
--task-id "$(uuidgen || date +%s)" \
|
|
34
|
-
--mode standard \
|
|
35
|
-
--loop3-agents "researcher,backend-dev,devops" \
|
|
36
|
-
--loop2-agents "reviewer,architect,tester" \
|
|
37
|
-
--product-owner "product-owner" \
|
|
38
|
-
--max-iterations 10
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**Why This is Mandatory:**
|
|
42
|
-
- Orchestrator enforces BLPOP dependency blocking
|
|
43
|
-
- Prevents Product Owner from collecting before validators finish
|
|
44
|
-
- Handles iteration management automatically
|
|
45
|
-
- Zero-token waiting between loops
|
|
46
|
-
|
|
47
|
-
### Step 3: Monitor Orchestration Output
|
|
48
|
-
The orchestrator script will output progress:
|
|
49
|
-
```
|
|
50
|
-
=== Iteration 1/10 ===
|
|
51
|
-
[Loop 3] Waiting for implementers to complete...
|
|
52
|
-
Waiting for researcher...
|
|
53
|
-
✅ researcher complete
|
|
54
|
-
...
|
|
55
|
-
[Loop 2] Waiting for validators to complete...
|
|
56
|
-
...
|
|
57
|
-
✅ CONSENSUS REACHED (0.92 >= 0.90)
|
|
58
|
-
🎉 CFN Loop Complete!
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Agent Instructions Template
|
|
62
|
-
|
|
63
|
-
When orchestrator runs, it expects agents to follow this protocol:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# Each agent MUST:
|
|
67
|
-
# 1. Complete work
|
|
68
|
-
# 2. Signal done
|
|
69
|
-
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
70
|
-
|
|
71
|
-
# 3. Report confidence
|
|
72
|
-
./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
|
|
73
|
-
--task-id "$TASK_ID" \
|
|
74
|
-
--agent-id "$AGENT_ID" \
|
|
75
|
-
--confidence [0.0-1.0] \
|
|
76
|
-
--iteration 1
|
|
77
|
-
|
|
78
|
-
# 4. Enter waiting mode
|
|
79
|
-
./.claude/skills/redis-coordination/invoke-waiting-mode.sh enter \
|
|
80
|
-
--task-id "$TASK_ID" \
|
|
81
|
-
--agent-id "$AGENT_ID" \
|
|
82
|
-
--context "iteration-complete"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Error Handling
|
|
86
|
-
|
|
87
|
-
If orchestrator fails:
|
|
88
|
-
1. Check Redis is running: `redis-cli ping`
|
|
89
|
-
2. Verify skill wrapper exists: `.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh`
|
|
90
|
-
3. Check agent completion signals in Redis: `redis-cli KEYS "swarm:*:done"`
|
|
91
|
-
4. Review timeout settings (default: 3600s per agent)
|
|
92
|
-
|
|
93
|
-
## Forbidden Patterns
|
|
94
|
-
|
|
95
|
-
❌ **NEVER** spawn agents manually:
|
|
96
|
-
```javascript
|
|
97
|
-
// FORBIDDEN - no dependency enforcement
|
|
98
|
-
Task("Coder", "...")
|
|
99
|
-
Task("Reviewer", "...")
|
|
100
|
-
Task("Product Owner", "...")
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
✅ **ALWAYS** use orchestrator:
|
|
104
|
-
```bash
|
|
105
|
-
# CORRECT - automatic dependency enforcement
|
|
106
|
-
./.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh \
|
|
107
|
-
--task-id "..." \
|
|
108
|
-
--loop3-agents "..." \
|
|
109
|
-
--loop2-agents "..." \
|
|
110
|
-
--product-owner "..."
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Integration with Slash Commands
|
|
114
|
-
|
|
115
|
-
When invoked via `/cfn-loop-single`, `/cfn-loop-sprints`, or `/cfn-loop-epic`:
|
|
116
|
-
1. CTO spawns this coordinator agent
|
|
117
|
-
2. Coordinator parses task requirements
|
|
118
|
-
3. Coordinator invokes orchestrator script
|
|
119
|
-
4. Orchestrator handles all agent spawning and dependency blocking
|
|
120
|
-
5. Orchestrator reports final result
|
|
121
|
-
|
|
122
|
-
## Deliverable
|
|
123
|
-
|
|
124
|
-
Final output format:
|
|
125
|
-
```json
|
|
126
|
-
{
|
|
127
|
-
"status": "complete",
|
|
128
|
-
"iterations": 3,
|
|
129
|
-
"final_consensus": 0.94,
|
|
130
|
-
"loop3_agents": ["researcher", "backend-dev", "devops"],
|
|
131
|
-
"loop2_agents": ["reviewer", "architect", "tester"],
|
|
132
|
-
"deliverables": ["file1.js", "file2.test.js", "README.md"]
|
|
133
|
-
}
|
|
134
|
-
```
|