claude-flow-novice 2.9.1 → 2.10.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/agents/cfn-dev-team/CLAUDE.md +1086 -0
- package/.claude/agents/cfn-dev-team/README.md +116 -0
- package/.claude/agents/cfn-dev-team/architecture/api-designer-persona.md +149 -0
- package/.claude/agents/cfn-dev-team/architecture/base-template-generator.md +196 -0
- package/.claude/agents/cfn-dev-team/architecture/goal-planner.md +183 -0
- package/.claude/agents/cfn-dev-team/architecture/planner.md +182 -0
- package/.claude/agents/cfn-dev-team/architecture/system-architect.md +162 -0
- package/.claude/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +540 -0
- package/.claude/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +20 -14
- package/.claude/agents/cfn-dev-team/coordinators/consensus-builder.md +167 -0
- package/.claude/agents/cfn-dev-team/dev-ops/devops-engineer.md +148 -0
- package/.claude/agents/cfn-dev-team/dev-ops/github-commit-agent.md +118 -0
- package/.claude/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +540 -0
- package/.claude/agents/cfn-dev-team/developers/backend-dev.md +20 -0
- package/.claude/agents/cfn-dev-team/developers/data/data-engineer.md +585 -0
- package/.claude/agents/cfn-dev-team/developers/database/database-architect.md +276 -0
- package/.claude/agents/cfn-dev-team/developers/dev-backend-api.md +147 -0
- package/.claude/agents/cfn-dev-team/developers/frontend/mobile-dev.md +218 -0
- package/.claude/agents/cfn-dev-team/developers/{react-frontend-engineer.md → frontend/react-frontend-engineer.md} +53 -5
- package/.claude/agents/cfn-dev-team/developers/frontend/spec-mobile-react-native.md +199 -0
- package/.claude/agents/cfn-dev-team/developers/graphql-specialist.md +615 -0
- package/.claude/agents/cfn-dev-team/developers/rust-developer.md +174 -0
- package/.claude/agents/cfn-dev-team/documentation/README-VALIDATION.md +243 -0
- package/.claude/agents/cfn-dev-team/documentation/agent-type-guidelines.md +465 -0
- package/.claude/agents/cfn-dev-team/documentation/api-docs.md +103 -0
- package/.claude/agents/cfn-dev-team/documentation/docs-api-openapi.md +98 -0
- package/.claude/agents/cfn-dev-team/documentation/pseudocode.md +159 -0
- package/.claude/agents/cfn-dev-team/documentation/specification.md +157 -0
- package/.claude/agents/cfn-dev-team/product-owners/accessibility-advocate-persona.md +109 -0
- package/.claude/agents/cfn-dev-team/{coordinators → product-owners}/cto-agent.md +8 -6
- package/.claude/agents/cfn-dev-team/product-owners/power-user-persona.md +190 -0
- package/.claude/agents/cfn-dev-team/{coordinators → product-owners}/product-owner.md +85 -59
- package/.claude/agents/cfn-dev-team/reviewers/quality/analyze-code-quality.md +141 -0
- package/.claude/agents/cfn-dev-team/reviewers/quality/code-analyzer.md +200 -0
- package/.claude/agents/cfn-dev-team/reviewers/quality/cyclomatic-complexity-reducer.md +321 -0
- package/.claude/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +238 -0
- package/.claude/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +101 -0
- package/.claude/agents/cfn-dev-team/reviewers/quality/quality-metrics.md +375 -0
- package/.claude/agents/cfn-dev-team/reviewers/quality/security-specialist.md +193 -0
- package/.claude/agents/cfn-dev-team/reviewers/reviewer.md +39 -0
- package/.claude/agents/cfn-dev-team/testers/interaction-tester.md +31 -0
- package/.claude/agents/cfn-dev-team/testers/load-testing-specialist.md +469 -0
- package/.claude/agents/cfn-dev-team/testers/playwright-tester.md +24 -0
- package/.claude/agents/cfn-dev-team/testers/tester.md +20 -0
- package/.claude/agents/cfn-dev-team/utility/agent-builder.md +151 -0
- package/.claude/agents/cfn-dev-team/utility/analyst.md +178 -0
- package/.claude/agents/cfn-dev-team/utility/claude-code-expert.md +1043 -0
- package/.claude/agents/cfn-dev-team/utility/code-booster.md +139 -0
- package/.claude/agents/cfn-dev-team/utility/context-curator.md +99 -0
- package/.claude/agents/cfn-dev-team/{developers → utility}/researcher.md +6 -4
- package/.claude/commands/cfn/CFN_LOOP_FRONTEND.md +741 -0
- package/.claude/commands/cfn/CFN_LOOP_TASK_MODE.md +353 -0
- package/.claude/commands/cfn/cfn-loop-frontend.md +555 -0
- package/.claude/commands/cfn/cfn-loop.md +168 -7
- package/{CFN-CLAUDE.md → .claude/root-claude-distribute/CFN-CLAUDE.md} +23 -3
- package/.claude/skills/cfn-ace-system/SKILL.md +364 -0
- package/.claude/skills/cfn-ace-system/add-bullet.sh +145 -0
- package/.claude/skills/cfn-ace-system/analyze-anti-pattern-effectiveness.sh +56 -0
- package/.claude/skills/cfn-ace-system/classify-task.sh +18 -0
- package/.claude/skills/cfn-ace-system/export-ace-metrics.sh +48 -0
- package/.claude/skills/cfn-ace-system/extract-tags.sh +385 -0
- package/.claude/skills/cfn-ace-system/format-negative-context.sh +180 -0
- package/.claude/skills/cfn-ace-system/init-indexes.sql +160 -0
- package/.claude/skills/cfn-ace-system/invoke-context-curate.sh +192 -0
- package/.claude/skills/cfn-ace-system/invoke-context-inject.sh +361 -0
- package/.claude/skills/cfn-ace-system/invoke-context-query.sh +139 -0
- package/.claude/skills/cfn-ace-system/invoke-context-reflect.sh +343 -0
- package/.claude/skills/cfn-ace-system/invoke-context-stats.sh +227 -0
- package/.claude/skills/cfn-ace-system/log-merge.sh +67 -0
- package/.claude/skills/cfn-ace-system/monitor-injection-performance.sh +138 -0
- package/.claude/skills/cfn-ace-system/optimize-injection-pipeline.sh +169 -0
- package/.claude/skills/cfn-ace-system/query-anti-patterns.sh +276 -0
- package/.claude/skills/cfn-ace-system/query-contexts.sh +150 -0
- package/.claude/skills/cfn-ace-system/query-reflections.sh +35 -0
- package/.claude/skills/cfn-ace-system/schema/001-create-context-reflections.sql +237 -0
- package/.claude/skills/cfn-ace-system/schema/README.md +723 -0
- package/.claude/skills/cfn-ace-system/schema/SCHEMA_DESIGN_SUMMARY.md +564 -0
- package/.claude/skills/cfn-ace-system/schema/populate-test-data-simple.sh +62 -0
- package/.claude/skills/cfn-ace-system/schema/populate-test-data.sh +247 -0
- package/.claude/skills/cfn-ace-system/schema/run-migration.sh +231 -0
- package/.claude/skills/cfn-ace-system/schema/validate-schema.sql +280 -0
- package/.claude/skills/cfn-ace-system/score-relevance-adapter.sh +138 -0
- package/.claude/skills/cfn-ace-system/score-relevance.sh +253 -0
- package/.claude/skills/cfn-ace-system/sprint-7-lessons.json +46 -0
- package/.claude/skills/cfn-ace-system/store-reflection.sh +46 -0
- package/.claude/skills/cfn-ace-system/test-ace-skill.sh +312 -0
- package/.claude/skills/cfn-ace-system/track-ab-test.sh +42 -0
- package/.claude/skills/cfn-ace-system/update-reflection.sh +41 -0
- package/.claude/skills/cfn-agent-discovery/SKILL.md +40 -0
- package/.claude/skills/cfn-agent-discovery/agents-registry-clean.json +0 -0
- package/.claude/skills/cfn-agent-discovery/agents-registry-fixed.json +19 -0
- package/.claude/skills/cfn-agent-discovery/agents-registry.json +718 -0
- package/.claude/skills/cfn-agent-discovery/discover-agents.py +184 -0
- package/.claude/skills/cfn-agent-discovery/discover-agents.sh +87 -0
- package/.claude/skills/cfn-agent-discovery/invoke-registry.sh +11 -0
- package/.claude/skills/cfn-agent-discovery/temp_script.py +0 -0
- package/.claude/skills/cfn-agent-execution/execute-agent.sh +126 -0
- package/.claude/skills/cfn-agent-output-processing/SKILL.md +359 -0
- package/.claude/skills/cfn-agent-selector/SKILL.md +90 -0
- package/.claude/skills/cfn-agent-selector/select-agents.sh +112 -0
- package/.claude/skills/cfn-agent-spawning/SKILL.md +135 -0
- package/.claude/skills/cfn-agent-spawning/agent-selection-guide.md +814 -0
- package/.claude/skills/cfn-agent-spawning/check-dependencies.sh +30 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +263 -0
- package/.claude/skills/cfn-agent-spawning/spawn-templates.sh +613 -0
- package/.claude/skills/cfn-analytics/description-refinement-guide.md +164 -0
- package/.claude/skills/cfn-analytics/log-skill-invocation.js +122 -0
- package/.claude/skills/cfn-analytics/run-production-criteria-tests.sh +126 -0
- package/.claude/skills/cfn-analytics/skill-analytics-dashboard.js +113 -0
- package/.claude/skills/cfn-analytics/skill-invocation-hook.sh +28 -0
- package/.claude/skills/cfn-analytics/skill-invocations.sql +58 -0
- package/.claude/skills/cfn-analytics/test-corpus.json +32 -0
- package/.claude/skills/cfn-analytics/test-data-generator.js +115 -0
- package/.claude/skills/cfn-analytics/test-manual-override-rate.js +285 -0
- package/.claude/skills/cfn-analytics/validate-skill-selection.js +188 -0
- package/.claude/skills/cfn-config-management/SKILL.md +34 -0
- package/.claude/skills/cfn-config-management/check-dependencies.sh +56 -0
- package/.claude/skills/cfn-config-management/config.json +32 -0
- package/.claude/skills/cfn-config-management/manage-config.sh +113 -0
- package/.claude/skills/cfn-event-bus/SKILL.md +412 -0
- package/.claude/skills/cfn-event-bus/config.json +111 -0
- package/.claude/skills/cfn-event-bus/eventbus-wrapper.cjs +69 -0
- package/.claude/skills/cfn-event-bus/invoke-event-publish.sh +147 -0
- package/.claude/skills/cfn-event-bus/invoke-event-subscribe.sh +171 -0
- package/.claude/skills/cfn-event-bus/invoke-lifecycle-track.sh +201 -0
- package/.claude/skills/cfn-event-bus/test-event-bus.sh +280 -0
- package/.claude/skills/cfn-fleet-manager/SKILL.md +412 -0
- package/.claude/skills/cfn-fleet-manager/config.json +60 -0
- package/.claude/skills/cfn-fleet-manager/invoke-fleet-allocate.sh +182 -0
- package/.claude/skills/cfn-fleet-manager/invoke-fleet-balance.sh +239 -0
- package/.claude/skills/cfn-fleet-manager/invoke-fleet-metrics.sh +193 -0
- package/.claude/skills/cfn-fleet-manager/invoke-fleet-register.sh +124 -0
- package/.claude/skills/cfn-fleet-manager/test-fleet-manager.sh +345 -0
- package/.claude/skills/cfn-hook-pipeline/SKILL.md +148 -0
- package/.claude/skills/cfn-hook-pipeline/auto-resolve.sh +66 -0
- package/.claude/skills/cfn-hook-pipeline/check-dependencies.sh +40 -0
- package/.claude/skills/cfn-hook-pipeline/feedback-resolver.sh +452 -0
- package/.claude/skills/cfn-hook-pipeline/post-edit-handler.sh +154 -0
- package/.claude/skills/cfn-hook-pipeline/security-scan.json +60 -0
- package/.claude/skills/cfn-hook-pipeline/security-scanner.sh +121 -0
- package/.claude/skills/cfn-hook-pipeline/test-root-warning-resolution.sh +148 -0
- package/.claude/skills/cfn-hybrid-routing/SKILL.md +46 -0
- package/.claude/skills/cfn-hybrid-routing/check-dependencies.sh +52 -0
- package/.claude/skills/cfn-hybrid-routing/config.json +26 -0
- package/.claude/skills/cfn-hybrid-routing/spawn-worker.sh +44 -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/context-injection.sh +142 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/context-lookup.sh +359 -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/spawn-agents.sh +271 -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 +884 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup +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 +353 -0
- package/.claude/skills/cfn-loop-validation/check-dependencies.sh +31 -0
- package/.claude/skills/cfn-loop-validation/config.json +161 -0
- package/.claude/skills/cfn-loop-validation/consensus-calculator.js +477 -0
- package/.claude/skills/cfn-loop-validation/evidence-chain.sql +163 -0
- package/.claude/skills/cfn-loop-validation/examples/README.md +453 -0
- package/.claude/skills/cfn-loop-validation/examples/coordinator-full-cfn-loop.sh +234 -0
- package/.claude/skills/cfn-loop-validation/examples/coordinator-loop2-consensus.sh +132 -0
- package/.claude/skills/cfn-loop-validation/examples/coordinator-loop3-gate.sh +115 -0
- package/.claude/skills/cfn-loop-validation/examples/coordinator-redis-integration.sh +186 -0
- package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +252 -0
- package/.claude/skills/cfn-loop-validation/validate-iteration.sh +134 -0
- package/.claude/skills/cfn-process-lifecycle/SKILL.md +39 -0
- package/.claude/skills/cfn-process-lifecycle/check-dependencies.sh +58 -0
- package/.claude/skills/cfn-process-lifecycle/config.json +39 -0
- package/.claude/skills/cfn-process-lifecycle/process-manager.sh +144 -0
- package/.claude/skills/cfn-product-owner-decision/SKILL.md +332 -0
- package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +176 -0
- package/.claude/skills/cfn-product-owner-decision/parse-decision.sh +66 -0
- package/.claude/skills/cfn-product-owner-decision/validate-deliverables.sh +82 -0
- package/.claude/skills/cfn-redis-coordination/AGENT_LOGGING.md +280 -0
- package/.claude/skills/cfn-redis-coordination/BZPOPMIN_FIX_SUMMARY.md +209 -0
- package/.claude/skills/cfn-redis-coordination/HEARTBEAT.md +57 -0
- package/.claude/skills/cfn-redis-coordination/HEARTBEAT_MONITORING.md +267 -0
- package/.claude/skills/cfn-redis-coordination/LOGGING.md +260 -0
- package/.claude/skills/cfn-redis-coordination/SECURITY_REVIEW.md +25 -0
- package/.claude/skills/cfn-redis-coordination/SHUTDOWN_HANDLING.md +164 -0
- package/.claude/skills/cfn-redis-coordination/SKILL.md +720 -0
- package/.claude/skills/cfn-redis-coordination/agent-log.sh +124 -0
- package/.claude/skills/cfn-redis-coordination/agent-recovery.sh +75 -0
- package/.claude/skills/cfn-redis-coordination/analyze-task-complexity.sh +277 -0
- package/.claude/skills/cfn-redis-coordination/cancel-swarm.sh +221 -0
- package/.claude/skills/cfn-redis-coordination/cfn-loop-exec.sh +468 -0
- package/.claude/skills/cfn-redis-coordination/cfn-loop-relaunch.sh +29 -0
- package/.claude/skills/cfn-redis-coordination/check-dependencies.sh +32 -0
- package/.claude/skills/cfn-redis-coordination/collect-confidence-scores.sh +179 -0
- package/.claude/skills/cfn-redis-coordination/collect-results.sh +75 -0
- package/.claude/skills/cfn-redis-coordination/complete-swarm.sh +75 -0
- package/.claude/skills/cfn-redis-coordination/config.json +61 -0
- package/.claude/skills/cfn-redis-coordination/data/cfn-loop.db +0 -0
- package/.claude/skills/cfn-redis-coordination/demos/phase4-wake-queue-test-report.md +82 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-bzpopmin-fix.sh +274 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +276 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-dlq.sh +129 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-iteration-feedback.sh +320 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-orchestrator.sh +249 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-priority-wake-phase4-unix.sh +148 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-priority-wake-phase4.sh +163 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-priority-wake.sh +138 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-quick-fix.sh +81 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-absolute.sh +45 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-fallback.sh +68 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-percentage.sh +56 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-with-retry.sh +81 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum.sh +57 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-shutdown-handling.sh +187 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-shutdown.sh +160 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-utils-unix.sh +97 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-utils.sh +97 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-waiting-mode.sh +59 -0
- package/.claude/skills/cfn-redis-coordination/examples/README.md +73 -0
- package/.claude/skills/cfn-redis-coordination/examples/grafana-dashboard.json +352 -0
- package/.claude/skills/cfn-redis-coordination/examples/hierarchical-pattern.sh +127 -0
- package/.claude/skills/cfn-redis-coordination/examples/mesh-pattern.sh +171 -0
- package/.claude/skills/cfn-redis-coordination/examples/timeout-handling.sh +227 -0
- package/.claude/skills/cfn-redis-coordination/examples/waiting-mode-pattern.sh +239 -0
- package/.claude/skills/cfn-redis-coordination/execute-product-owner-decision.sh +258 -0
- package/.claude/skills/cfn-redis-coordination/get-agent-timeout.sh +177 -0
- package/.claude/skills/cfn-redis-coordination/heartbeat-functions.sh +137 -0
- package/.claude/skills/cfn-redis-coordination/heartbeat-protocol.md +106 -0
- package/.claude/skills/cfn-redis-coordination/heartbeat.sh +126 -0
- package/.claude/skills/cfn-redis-coordination/init-swarm.sh +148 -0
- package/.claude/skills/cfn-redis-coordination/invoke-redis-pattern.sh +220 -0
- package/.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh +283 -0
- package/.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh.backup-p7 +423 -0
- package/.claude/skills/cfn-redis-coordination/list-active-swarms.sh +147 -0
- package/.claude/skills/cfn-redis-coordination/log-event.sh +109 -0
- package/.claude/skills/cfn-redis-coordination/metrics-export.sh +674 -0
- package/.claude/skills/cfn-redis-coordination/metrics-schema.json +66 -0
- package/.claude/skills/cfn-redis-coordination/metrics-storage.md +31 -0
- package/.claude/skills/cfn-redis-coordination/monitor-cfn-violations.sh +391 -0
- package/.claude/skills/cfn-redis-coordination/monitor-heartbeats.sh +101 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop-v3.sh +141 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh +31 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup +38 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-1761167675 +1672 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-p5 +1604 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase1 +1550 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase2 +1621 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase3 +1621 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.bak +0 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.broken +1627 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.corrupted +80 -0
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.deprecated +1864 -0
- package/.claude/skills/cfn-redis-coordination/priority-wake-mechanism.md +75 -0
- package/.claude/skills/cfn-redis-coordination/priority_wake.py +134 -0
- package/.claude/skills/cfn-redis-coordination/query-dlq.sh +162 -0
- package/.claude/skills/cfn-redis-coordination/query-logs.sh +103 -0
- package/.claude/skills/cfn-redis-coordination/redis-pattern.sh +619 -0
- package/.claude/skills/cfn-redis-coordination/retrieve-context.sh +58 -0
- package/.claude/skills/cfn-redis-coordination/select-specialist-agent.sh +371 -0
- package/.claude/skills/cfn-redis-coordination/semantic-match-tfidf.py +252 -0
- package/.claude/skills/cfn-redis-coordination/send-heartbeat.sh +165 -0
- package/.claude/skills/cfn-redis-coordination/signal.sh +38 -0
- package/.claude/skills/cfn-redis-coordination/store-context.sh +86 -0
- package/.claude/skills/cfn-redis-coordination/store-epic-context.sh +123 -0
- package/.claude/skills/cfn-redis-coordination/test-context-injection.sh +354 -0
- package/.claude/skills/cfn-redis-coordination/test-timeout-enforcement.sh +513 -0
- package/.claude/skills/cfn-redis-coordination/tests/convert-line-endings.sh +15 -0
- package/.claude/skills/cfn-redis-coordination/tests/dlq-functionality-test.sh +102 -0
- package/.claude/skills/cfn-redis-coordination/tests/edge-cases-test.sh +99 -0
- package/.claude/skills/cfn-redis-coordination/tests/integration-test.sh +170 -0
- package/.claude/skills/cfn-redis-coordination/tests/retry-mechanism-test.sh +82 -0
- package/.claude/skills/cfn-redis-coordination/tests/run-test-suite.sh +92 -0
- package/.claude/skills/cfn-redis-coordination/tests/run-tests.sh +4 -0
- package/.claude/skills/cfn-redis-coordination/tests/test-heartbeat-monitoring.sh +418 -0
- package/.claude/skills/cfn-redis-coordination/tests/test-heartbeat-simple.sh +124 -0
- package/.claude/skills/cfn-redis-coordination/tests/test-primitives.sh +166 -0
- package/.claude/skills/cfn-redis-coordination/tests/test-utils.sh +54 -0
- package/.claude/skills/cfn-redis-coordination/tests/test_coordination_primitives.sh.deprecated +20 -0
- package/.claude/skills/cfn-redis-coordination/tests/test_utils.sh +49 -0
- package/.claude/skills/cfn-redis-coordination/v2_modularization/core_orchestration.sh +76 -0
- package/.claude/skills/cfn-redis-coordination/validate-parameters.sh +492 -0
- package/.claude/skills/cfn-sqlite-memory/IMPLEMENTATION_REPORT.md +393 -0
- package/.claude/skills/cfn-sqlite-memory/QUICK_REFERENCE.md +204 -0
- package/.claude/skills/cfn-sqlite-memory/SKILL.md +415 -0
- package/.claude/skills/cfn-sqlite-memory/acl-queries.sql +452 -0
- package/.claude/skills/cfn-sqlite-memory/check-dependencies.sh +36 -0
- package/.claude/skills/cfn-sqlite-memory/config.json +45 -0
- package/.claude/skills/cfn-sqlite-memory/memory-cli.sh +88 -0
- package/.claude/skills/cfn-sqlite-memory/test-state-persistence.js +187 -0
- package/.claude/skills/cfn-sqlite-memory/ttl-cleanup.sh +274 -0
- package/.claude/skills/cfn-test-execution/SKILL.md +128 -0
- package/.claude/skills/cfn-test-execution/check-dependencies.sh +36 -0
- package/.claude/skills/cfn-test-execution/test-cache-reader.sh +134 -0
- package/.claude/skills/cfn-test-execution/test-concurrent-conflicts.sh +115 -0
- package/.claude/skills/cfn-test-execution/test-coordinator-pattern.sh +109 -0
- package/.claude/skills/cfn-transparency-middleware/Cargo.toml +18 -0
- package/.claude/skills/cfn-transparency-middleware/SECURITY.md +41 -0
- package/.claude/skills/cfn-transparency-middleware/SKILL.md +91 -0
- package/.claude/skills/cfn-transparency-middleware/TEST_RESULTS.md +174 -0
- package/.claude/skills/cfn-transparency-middleware/config.json +31 -0
- package/.claude/skills/cfn-transparency-middleware/examples/basic-usage.ts +39 -0
- package/.claude/skills/cfn-transparency-middleware/examples/batch-processing.ts +52 -0
- package/.claude/skills/cfn-transparency-middleware/examples/custom-filtering.ts +61 -0
- package/.claude/skills/cfn-transparency-middleware/invoke-transparency-filter.sh +98 -0
- package/.claude/skills/cfn-transparency-middleware/invoke-transparency-init.sh +224 -0
- package/.claude/skills/cfn-transparency-middleware/invoke-transparency-level.sh +333 -0
- package/.claude/skills/cfn-transparency-middleware/invoke-transparency-metrics.sh +345 -0
- package/.claude/skills/cfn-transparency-middleware/invoke-transparency-observe.sh +140 -0
- package/.claude/skills/cfn-transparency-middleware/invoke-transparency-stop.sh +235 -0
- package/.claude/skills/cfn-transparency-middleware/memory_query.rs +85 -0
- package/.claude/skills/cfn-transparency-middleware/memory_repository.rs +140 -0
- package/.claude/skills/cfn-transparency-middleware/memory_schema.rs +64 -0
- package/.claude/skills/cfn-transparency-middleware/middleware-config.sh +29 -0
- package/.claude/skills/cfn-transparency-middleware/performance-benchmark.sh +79 -0
- package/.claude/skills/cfn-transparency-middleware/test-e2e.sh +406 -0
- package/.claude/skills/cfn-transparency-middleware/test-integration.sh +162 -0
- package/.claude/skills/cfn-transparency-middleware/test-transparency-skill.sh +368 -0
- package/.claude/skills/cfn-transparency-middleware/test-transparency-skill.sh.unix +126 -0
- package/.claude/skills/cfn-transparency-middleware/tests/input-validation.sh +93 -0
- package/.claude/skills/cfn-transparency-middleware/wrap-agent.sh +132 -0
- package/.claude/skills/cfn-webapp-testing/SCREENSHOT_NAMING_CONVENTION.md +547 -0
- package/.claude/skills/cfn-webapp-testing/SKILL.md +877 -0
- package/.claude/skills/cfn-webapp-testing/capture-screenshot.sh +238 -0
- package/.claude/skills/cfn-webapp-testing/cfn-loop-integration.sh +265 -0
- package/.claude/skills/cfn-webapp-testing/compare-screenshots.sh +199 -0
- package/.claude/skills/cfn-webapp-testing/init-storage.sh +150 -0
- package/.claude/skills/cfn-webapp-testing/set-baseline.sh +196 -0
- package/.claude/skills/cfn-webapp-testing/test-webapp-testing.sh +233 -0
- package/README.md +51 -2
- package/dist/ace/ace-reflector.js +109 -10
- package/dist/ace/ace-reflector.js.map +1 -1
- package/dist/cli/agent-executor.js +1 -1
- package/dist/cli/agent-executor.js.map +1 -1
- package/package.json +43 -7
- package/readme/README.md +15 -4
- package/scripts/init-project.js +76 -6
- package/scripts/run-marketing-tests.sh +43 -0
- package/scripts/update_paths.sh +47 -0
- package/tools/install-lizard.sh +37 -0
- package/tools/simple-complexity.sh +44 -0
- package/.claude/agents/cfn-dev-team/developers/coder.md +0 -270
- package/.claude/agents/cfn-dev-team/developers/state-architect.md +0 -127
- package/.claude/agents/cfn-dev-team/reviewers/code-quality-validator.md +0 -128
- /package/.claude/agents/cfn-dev-team/developers/{ui-designer.md → frontend/ui-designer.md} +0 -0
- /package/.claude/agents/cfn-dev-team/{coordinators → product-owners}/product-owner-agent.md +0 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
# Product Owner Decision Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Status:** Production
|
|
5
|
+
**Purpose:** Strategic decision-making for CFN Loop progression with guaranteed execution
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Provides autonomous Product Owner decision execution with:
|
|
12
|
+
- **Guaranteed Redis coordination** (orchestrator-controlled)
|
|
13
|
+
- **Output parsing with fallback patterns**
|
|
14
|
+
- **Decision validation** (ensures PROCEED/ITERATE/ABORT detection)
|
|
15
|
+
- **Context injection** (consensus, iteration, success criteria)
|
|
16
|
+
|
|
17
|
+
**Key Principle:** Orchestrator controls Redis coordination, agents focus on decision analysis.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
### Skill Components
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
.claude/skills/product-owner-decision/
|
|
27
|
+
├── SKILL.md # This file
|
|
28
|
+
├── execute-decision.sh # Main decision execution wrapper
|
|
29
|
+
├── parse-decision.sh # Output parsing with fallback patterns
|
|
30
|
+
└── validate-deliverables.sh # Deliverable verification logic
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Decision Flow
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
1. Orchestrator → Spawn Product Owner with context
|
|
37
|
+
2. Skill → Capture agent output
|
|
38
|
+
3. Skill → Parse decision (PROCEED/ITERATE/ABORT)
|
|
39
|
+
4. Skill → Validate deliverables (for PROCEED)
|
|
40
|
+
5. Skill → Push decision to Redis
|
|
41
|
+
6. Skill → Signal completion
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
### From Orchestrator (orchestrate-cfn-loop.sh)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Replace Product Owner spawn+wait with skill execution
|
|
52
|
+
DECISION_RESULT=$(./.claude/skills/product-owner-decision/execute-decision.sh \
|
|
53
|
+
--task-id "$TASK_ID" \
|
|
54
|
+
--agent-id "$PO_UNIQUE_ID" \
|
|
55
|
+
--consensus "$LOOP2_CONSENSUS" \
|
|
56
|
+
--threshold "$CONSENSUS" \
|
|
57
|
+
--iteration "$ITERATION" \
|
|
58
|
+
--max-iterations "$MAX_ITERATIONS")
|
|
59
|
+
|
|
60
|
+
DECISION_TYPE=$(echo "$DECISION_RESULT" | jq -r '.decision')
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### From Slash Commands
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Automatic - orchestrator uses skill by default
|
|
67
|
+
/cfn-loop "Implement feature" --mode=standard
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Parameters
|
|
73
|
+
|
|
74
|
+
### execute-decision.sh
|
|
75
|
+
|
|
76
|
+
| Parameter | Required | Description | Example |
|
|
77
|
+
|-----------|----------|-------------|---------|
|
|
78
|
+
| `--task-id` | Yes | CFN Loop task identifier | `cfn-auth-system-123` |
|
|
79
|
+
| `--agent-id` | Yes | Product Owner agent ID | `product-owner-1` |
|
|
80
|
+
| `--consensus` | Yes | Loop 2 consensus score | `0.92` |
|
|
81
|
+
| `--threshold` | Yes | Consensus threshold | `0.90` |
|
|
82
|
+
| `--iteration` | Yes | Current iteration number | `2` |
|
|
83
|
+
| `--max-iterations` | Yes | Max iterations allowed | `10` |
|
|
84
|
+
| `--success-criteria` | No | JSON success criteria | `{"tests":"pass"}` |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Decision Logic (GOAP Framework)
|
|
89
|
+
|
|
90
|
+
### PROCEED
|
|
91
|
+
```bash
|
|
92
|
+
Consensus >= Threshold
|
|
93
|
+
AND Deliverables exist (for implementation tasks)
|
|
94
|
+
AND Iteration <= Max
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### ITERATE
|
|
98
|
+
```bash
|
|
99
|
+
Consensus < Threshold
|
|
100
|
+
AND Iteration < Max
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### ABORT
|
|
104
|
+
```bash
|
|
105
|
+
Iteration >= Max
|
|
106
|
+
OR Unrecoverable failure
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Output Parsing
|
|
112
|
+
|
|
113
|
+
### Pattern Matching (Robust)
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Primary: Labeled decision
|
|
117
|
+
grep -oiE "Decision:\s*(PROCEED|ITERATE|ABORT)"
|
|
118
|
+
|
|
119
|
+
# Fallback 1: Standalone keyword
|
|
120
|
+
grep -oE "(PROCEED|ITERATE|ABORT)"
|
|
121
|
+
|
|
122
|
+
# Fallback 2: Case-insensitive variations
|
|
123
|
+
grep -oiE "(proceed|iterate|abort)"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Validation
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
if [ -z "$DECISION_TYPE" ]; then
|
|
130
|
+
echo "❌ ERROR: Could not parse decision"
|
|
131
|
+
echo "Product Owner output: $PO_OUTPUT"
|
|
132
|
+
exit 1
|
|
133
|
+
fi
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Deliverable Verification
|
|
139
|
+
|
|
140
|
+
### For PROCEED Decisions
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Check git status for file changes
|
|
144
|
+
FILES_CHANGED=$(git status --short | grep -E "^(A|M|\?\?)" | wc -l)
|
|
145
|
+
|
|
146
|
+
if [ "$FILES_CHANGED" -eq 0 ]; then
|
|
147
|
+
# Override PROCEED → ITERATE
|
|
148
|
+
DECISION_TYPE="ITERATE"
|
|
149
|
+
REASONING="No deliverables created - consensus on plans only"
|
|
150
|
+
fi
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Redis Coordination
|
|
156
|
+
|
|
157
|
+
### Keys Used
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Decision storage
|
|
161
|
+
swarm:${TASK_ID}:${AGENT_ID}:decision
|
|
162
|
+
|
|
163
|
+
# Completion signal
|
|
164
|
+
swarm:${TASK_ID}:${AGENT_ID}:done
|
|
165
|
+
|
|
166
|
+
# Metrics
|
|
167
|
+
swarm:${TASK_ID}:metrics:product_owner_decisions
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Decision JSON Format
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"decision": "PROCEED|ITERATE|ABORT",
|
|
175
|
+
"reasoning": "Explanation of decision",
|
|
176
|
+
"confidence": 0.90,
|
|
177
|
+
"iteration": 2,
|
|
178
|
+
"consensus": 0.92,
|
|
179
|
+
"deliverables_verified": true
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Error Handling
|
|
186
|
+
|
|
187
|
+
### Agent Timeout
|
|
188
|
+
```bash
|
|
189
|
+
# Use agent-specific timeout
|
|
190
|
+
PO_TIMEOUT=$(get_agent_timeout "product-owner" "$TASK_ID")
|
|
191
|
+
timeout "$PO_TIMEOUT" npx claude-flow-novice agent product-owner ...
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Parse Failure
|
|
195
|
+
```bash
|
|
196
|
+
# Fallback to ABORT with error context
|
|
197
|
+
DECISION_TYPE="ABORT"
|
|
198
|
+
REASONING="Failed to parse Product Owner decision after $RETRY_COUNT attempts"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Deliverable Verification Failure
|
|
202
|
+
```bash
|
|
203
|
+
# Override PROCEED → ITERATE
|
|
204
|
+
DECISION_TYPE="ITERATE"
|
|
205
|
+
REASONING="Deliverable verification failed - no files created"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Testing
|
|
211
|
+
|
|
212
|
+
### Unit Tests
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Test decision parsing
|
|
216
|
+
./.claude/skills/product-owner-decision/test-parse-decision.sh
|
|
217
|
+
|
|
218
|
+
# Test deliverable verification
|
|
219
|
+
./.claude/skills/product-owner-decision/test-deliverable-verification.sh
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Integration Tests
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Test full CFN Loop with Product Owner decisions
|
|
226
|
+
./.claude/skills/redis-coordination/test-orchestrator.sh
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Advantages Over Template-Based Approach
|
|
232
|
+
|
|
233
|
+
| Aspect | Template-Based | Skill-Based |
|
|
234
|
+
|--------|----------------|-------------|
|
|
235
|
+
| **Execution Guarantee** | ❌ Agent decides | ✅ Script enforces |
|
|
236
|
+
| **Redis Coordination** | ❌ Agent must execute | ✅ Orchestrator controls |
|
|
237
|
+
| **Output Parsing** | ❌ None | ✅ Robust fallback patterns |
|
|
238
|
+
| **Deliverable Verification** | ❌ Manual | ✅ Automated |
|
|
239
|
+
| **Error Handling** | ❌ Agent-dependent | ✅ Skill-controlled |
|
|
240
|
+
| **Testability** | ❌ Hard to test | ✅ Unit + integration tests |
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Migration from Template-Based
|
|
245
|
+
|
|
246
|
+
### Before (BUG #11)
|
|
247
|
+
```markdown
|
|
248
|
+
## Decision Execution Protocol (CRITICAL)
|
|
249
|
+
**YOUR TASK:** Use the Bash tool to execute:
|
|
250
|
+
bash ./.claude/skills/redis-coordination/execute-product-owner-decision.sh
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Agent output: `bash execute-product-owner-decision.sh` (NOT executed)
|
|
254
|
+
|
|
255
|
+
### After (Skill-Based)
|
|
256
|
+
```bash
|
|
257
|
+
# Orchestrator uses skill directly
|
|
258
|
+
DECISION_RESULT=$(./.claude/skills/product-owner-decision/execute-decision.sh \
|
|
259
|
+
--task-id "$TASK_ID" ...)
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Skill executes, parses, validates, pushes to Redis → Guaranteed
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Agent Template Simplification
|
|
267
|
+
|
|
268
|
+
Product Owner template becomes pure decision analysis:
|
|
269
|
+
|
|
270
|
+
```markdown
|
|
271
|
+
## Decision Framework
|
|
272
|
+
|
|
273
|
+
Make strategic decision for CFN Loop progression:
|
|
274
|
+
|
|
275
|
+
- **PROCEED:** Quality threshold met, deliverables complete
|
|
276
|
+
- **ITERATE:** Improvements needed, iterations remaining
|
|
277
|
+
- **ABORT:** Max iterations reached or unrecoverable failure
|
|
278
|
+
|
|
279
|
+
Consider:
|
|
280
|
+
- Loop 2 consensus vs threshold
|
|
281
|
+
- Current iteration vs max iterations
|
|
282
|
+
- Deliverable completeness
|
|
283
|
+
- Success criteria satisfaction
|
|
284
|
+
|
|
285
|
+
Output format:
|
|
286
|
+
Decision: PROCEED|ITERATE|ABORT
|
|
287
|
+
Reasoning: [explanation]
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Agent focuses on **analysis**, skill handles **execution**.
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Metrics
|
|
295
|
+
|
|
296
|
+
### Decision Tracking
|
|
297
|
+
```bash
|
|
298
|
+
# Store all Product Owner decisions
|
|
299
|
+
redis-cli LPUSH "swarm:${TASK_ID}:metrics:product_owner_decisions" "$DECISION_JSON"
|
|
300
|
+
|
|
301
|
+
# Count decision types
|
|
302
|
+
redis-cli INCR "swarm:metrics:decisions:proceed"
|
|
303
|
+
redis-cli INCR "swarm:metrics:decisions:iterate"
|
|
304
|
+
redis-cli INCR "swarm:metrics:decisions:abort"
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Performance
|
|
308
|
+
```bash
|
|
309
|
+
# Decision latency (time from Loop 2 complete to decision)
|
|
310
|
+
DECISION_START=$(date +%s)
|
|
311
|
+
DECISION_RESULT=$(execute-decision.sh ...)
|
|
312
|
+
DECISION_END=$(date +%s)
|
|
313
|
+
LATENCY=$((DECISION_END - DECISION_START))
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Related Skills
|
|
319
|
+
|
|
320
|
+
- **Redis Coordination** (`.claude/skills/redis-coordination/SKILL.md`)
|
|
321
|
+
- **CFN Loop Validation** (`.claude/skills/cfn-loop-validation/SKILL.md`)
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Version History
|
|
326
|
+
|
|
327
|
+
### 1.0.0 (2025-10-20)
|
|
328
|
+
- Initial skill creation
|
|
329
|
+
- Solves BUG #11 (Product Owner execution failure)
|
|
330
|
+
- Orchestrator-controlled decision execution
|
|
331
|
+
- Robust output parsing with fallbacks
|
|
332
|
+
- Automated deliverable verification
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Product Owner Decision Skill - Main Execution Wrapper
|
|
3
|
+
# Guarantees decision execution via output parsing (solves BUG #11)
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
|
|
9
|
+
# Parse arguments
|
|
10
|
+
TASK_ID=""
|
|
11
|
+
AGENT_ID=""
|
|
12
|
+
CONSENSUS=""
|
|
13
|
+
THRESHOLD=""
|
|
14
|
+
ITERATION=""
|
|
15
|
+
MAX_ITERATIONS=""
|
|
16
|
+
SUCCESS_CRITERIA=""
|
|
17
|
+
EXPECTED_FILES=""
|
|
18
|
+
|
|
19
|
+
while [[ $# -gt 0 ]]; do
|
|
20
|
+
case $1 in
|
|
21
|
+
--task-id)
|
|
22
|
+
TASK_ID="$2"
|
|
23
|
+
shift 2
|
|
24
|
+
;;
|
|
25
|
+
--agent-id)
|
|
26
|
+
AGENT_ID="$2"
|
|
27
|
+
shift 2
|
|
28
|
+
;;
|
|
29
|
+
--consensus)
|
|
30
|
+
CONSENSUS="$2"
|
|
31
|
+
shift 2
|
|
32
|
+
;;
|
|
33
|
+
--threshold)
|
|
34
|
+
THRESHOLD="$2"
|
|
35
|
+
shift 2
|
|
36
|
+
;;
|
|
37
|
+
--iteration)
|
|
38
|
+
ITERATION="$2"
|
|
39
|
+
shift 2
|
|
40
|
+
;;
|
|
41
|
+
--max-iterations)
|
|
42
|
+
MAX_ITERATIONS="$2"
|
|
43
|
+
shift 2
|
|
44
|
+
;;
|
|
45
|
+
--success-criteria)
|
|
46
|
+
SUCCESS_CRITERIA="$2"
|
|
47
|
+
shift 2
|
|
48
|
+
;;
|
|
49
|
+
--expected-files)
|
|
50
|
+
EXPECTED_FILES="$2"
|
|
51
|
+
shift 2
|
|
52
|
+
;;
|
|
53
|
+
*)
|
|
54
|
+
echo "Unknown option: $1" >&2
|
|
55
|
+
exit 1
|
|
56
|
+
;;
|
|
57
|
+
esac
|
|
58
|
+
done
|
|
59
|
+
|
|
60
|
+
# Validate required parameters
|
|
61
|
+
if [ -z "$TASK_ID" ] || [ -z "$AGENT_ID" ] || [ -z "$CONSENSUS" ] || \
|
|
62
|
+
[ -z "$THRESHOLD" ] || [ -z "$ITERATION" ] || [ -z "$MAX_ITERATIONS" ]; then
|
|
63
|
+
echo "ERROR: Missing required parameters" >&2
|
|
64
|
+
echo "Usage: $0 --task-id TASK_ID --agent-id AGENT_ID --consensus CONSENSUS --threshold THRESHOLD --iteration ITERATION --max-iterations MAX_ITERATIONS [--success-criteria JSON]" >&2
|
|
65
|
+
exit 1
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
# Build Product Owner context
|
|
69
|
+
PO_CONTEXT="CFN Loop iteration $ITERATION complete.
|
|
70
|
+
|
|
71
|
+
Loop 2 Consensus: $CONSENSUS (threshold: $THRESHOLD)
|
|
72
|
+
Task ID: $TASK_ID
|
|
73
|
+
Agent ID: $AGENT_ID
|
|
74
|
+
Max Iterations: $MAX_ITERATIONS
|
|
75
|
+
|
|
76
|
+
Make your strategic decision: PROCEED, ITERATE, or ABORT
|
|
77
|
+
|
|
78
|
+
Decision Framework:
|
|
79
|
+
- PROCEED: Consensus >= $THRESHOLD AND deliverables verified
|
|
80
|
+
- ITERATE: Consensus < $THRESHOLD AND iteration < $MAX_ITERATIONS
|
|
81
|
+
- ABORT: Max iterations reached without consensus
|
|
82
|
+
|
|
83
|
+
Output your decision clearly with reasoning.
|
|
84
|
+
Format: Decision: [PROCEED|ITERATE|ABORT]"
|
|
85
|
+
|
|
86
|
+
# Inject CFN Loop context if injection script exists
|
|
87
|
+
INJECT_SCRIPT="$SCRIPT_DIR/.claude/skills/cfn-cfn-cfn-loop-orchestration/inject-loop-context.sh"
|
|
88
|
+
if [[ -x "$INJECT_SCRIPT" ]]; then
|
|
89
|
+
PO_CONTEXT=$("$INJECT_SCRIPT" "loop4" "$PO_CONTEXT" 2>/dev/null || echo "$PO_CONTEXT")
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
# Get agent timeout (if get_agent_timeout function available)
|
|
93
|
+
if command -v get_agent_timeout &>/dev/null; then
|
|
94
|
+
PO_TIMEOUT=$(get_agent_timeout "product-owner" "$TASK_ID")
|
|
95
|
+
else
|
|
96
|
+
PO_TIMEOUT=900 # Default 15 minutes
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# Spawn Product Owner and capture output
|
|
100
|
+
PO_OUTPUT=$(timeout "$PO_TIMEOUT" npx claude-flow-novice agent product-owner \
|
|
101
|
+
--task-id "$TASK_ID" \
|
|
102
|
+
--agent-id "$AGENT_ID" \
|
|
103
|
+
--context "$PO_CONTEXT" 2>&1 || true)
|
|
104
|
+
|
|
105
|
+
# Parse decision using skill parser
|
|
106
|
+
DECISION_TYPE=$("$SCRIPT_DIR/parse-decision.sh" --output "$PO_OUTPUT")
|
|
107
|
+
|
|
108
|
+
if [ -z "$DECISION_TYPE" ]; then
|
|
109
|
+
echo "❌ ERROR: Could not parse Product Owner decision" >&2
|
|
110
|
+
echo "Product Owner output:" >&2
|
|
111
|
+
echo "$PO_OUTPUT" >&2
|
|
112
|
+
|
|
113
|
+
# Fallback to ABORT on parse failure
|
|
114
|
+
DECISION_TYPE="ABORT"
|
|
115
|
+
REASONING="Failed to parse Product Owner decision from output"
|
|
116
|
+
CONFIDENCE=0.50
|
|
117
|
+
else
|
|
118
|
+
# Extract reasoning (context around decision)
|
|
119
|
+
REASONING=$(echo "$PO_OUTPUT" | grep -A5 -i "decision" | tail -5 | tr '\n' ' ' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
|
120
|
+
CONFIDENCE=0.90
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
# Validate deliverables for PROCEED decisions
|
|
124
|
+
if [ "$DECISION_TYPE" = "PROCEED" ]; then
|
|
125
|
+
DELIVERABLE_ARGS="--task-id $TASK_ID"
|
|
126
|
+
if [ -n "$EXPECTED_FILES" ]; then
|
|
127
|
+
DELIVERABLE_ARGS="$DELIVERABLE_ARGS --expected-files $EXPECTED_FILES"
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
DELIVERABLE_STATUS=$("$SCRIPT_DIR/validate-deliverables.sh" $DELIVERABLE_ARGS)
|
|
131
|
+
|
|
132
|
+
if [ "$DELIVERABLE_STATUS" = "FAILED" ]; then
|
|
133
|
+
# Retrieve missing files from Redis (if available)
|
|
134
|
+
MISSING_FILES_JSON=$(redis-cli get "swarm:${TASK_ID}:missing-files" 2>/dev/null || echo "[]")
|
|
135
|
+
MISSING_FILES_LIST=$(echo "$MISSING_FILES_JSON" | jq -r '.[]' | tr '\n' ', ' | sed 's/,$//')
|
|
136
|
+
|
|
137
|
+
# Override PROCEED → ITERATE
|
|
138
|
+
DECISION_TYPE="ITERATE"
|
|
139
|
+
if [ -n "$MISSING_FILES_LIST" ]; then
|
|
140
|
+
REASONING="Deliverable verification failed - missing files: $MISSING_FILES_LIST"
|
|
141
|
+
else
|
|
142
|
+
REASONING="Deliverable verification failed - no files created (consensus on plans only)"
|
|
143
|
+
fi
|
|
144
|
+
CONFIDENCE=0.75
|
|
145
|
+
fi
|
|
146
|
+
fi
|
|
147
|
+
|
|
148
|
+
# Build decision JSON
|
|
149
|
+
DECISION_JSON=$(jq -n \
|
|
150
|
+
--arg decision "$DECISION_TYPE" \
|
|
151
|
+
--arg reasoning "${REASONING:-Parsed from Product Owner output}" \
|
|
152
|
+
--arg confidence "$CONFIDENCE" \
|
|
153
|
+
--arg iteration "$ITERATION" \
|
|
154
|
+
--arg consensus "$CONSENSUS" \
|
|
155
|
+
'{
|
|
156
|
+
decision: $decision,
|
|
157
|
+
reasoning: $reasoning,
|
|
158
|
+
confidence: ($confidence | tonumber),
|
|
159
|
+
iteration: ($iteration | tonumber),
|
|
160
|
+
consensus: ($consensus | tonumber),
|
|
161
|
+
timestamp: (now | todate)
|
|
162
|
+
}')
|
|
163
|
+
|
|
164
|
+
# Push decision to Redis (orchestrator's responsibility, not agent's)
|
|
165
|
+
DECISION_KEY="swarm:${TASK_ID}:${AGENT_ID}:decision"
|
|
166
|
+
echo "$DECISION_JSON" | redis-cli -x LPUSH "$DECISION_KEY" >/dev/null
|
|
167
|
+
|
|
168
|
+
# Signal Product Owner completion
|
|
169
|
+
redis-cli LPUSH "swarm:${TASK_ID}:${AGENT_ID}:done" "complete" >/dev/null
|
|
170
|
+
|
|
171
|
+
# Store decision in metrics
|
|
172
|
+
redis-cli LPUSH "swarm:${TASK_ID}:metrics:product_owner_decisions" "$DECISION_JSON" >/dev/null
|
|
173
|
+
redis-cli INCR "swarm:metrics:decisions:$(echo "$DECISION_TYPE" | tr '[:upper:]' '[:lower:]')" >/dev/null
|
|
174
|
+
|
|
175
|
+
# Output decision JSON for orchestrator
|
|
176
|
+
echo "$DECISION_JSON"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Product Owner Decision Parser - Robust pattern matching with fallbacks
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
# Parse arguments
|
|
7
|
+
OUTPUT=""
|
|
8
|
+
|
|
9
|
+
while [[ $# -gt 0 ]]; do
|
|
10
|
+
case $1 in
|
|
11
|
+
--output)
|
|
12
|
+
OUTPUT="$2"
|
|
13
|
+
shift 2
|
|
14
|
+
;;
|
|
15
|
+
*)
|
|
16
|
+
echo "Unknown option: $1" >&2
|
|
17
|
+
exit 1
|
|
18
|
+
;;
|
|
19
|
+
esac
|
|
20
|
+
done
|
|
21
|
+
|
|
22
|
+
if [ -z "$OUTPUT" ]; then
|
|
23
|
+
echo "ERROR: --output required" >&2
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Pattern 1: Labeled decision (most explicit)
|
|
28
|
+
# Example: "Decision: PROCEED"
|
|
29
|
+
DECISION=$(echo "$OUTPUT" | grep -oiE "Decision:\s*(PROCEED|ITERATE|ABORT)" | \
|
|
30
|
+
grep -oE "(PROCEED|ITERATE|ABORT)" | head -1)
|
|
31
|
+
|
|
32
|
+
if [ -n "$DECISION" ]; then
|
|
33
|
+
echo "$DECISION"
|
|
34
|
+
exit 0
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# Pattern 2: Standalone keyword (first occurrence)
|
|
38
|
+
# Example: "I recommend we PROCEED with..."
|
|
39
|
+
DECISION=$(echo "$OUTPUT" | grep -oE "(PROCEED|ITERATE|ABORT)" | head -1)
|
|
40
|
+
|
|
41
|
+
if [ -n "$DECISION" ]; then
|
|
42
|
+
echo "$DECISION"
|
|
43
|
+
exit 0
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# Pattern 3: Case-insensitive fallback
|
|
47
|
+
# Example: "proceed with deployment"
|
|
48
|
+
DECISION=$(echo "$OUTPUT" | grep -oiE "(proceed|iterate|abort)" | head -1 | tr '[:lower:]' '[:upper:]')
|
|
49
|
+
|
|
50
|
+
if [ -n "$DECISION" ]; then
|
|
51
|
+
echo "$DECISION"
|
|
52
|
+
exit 0
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# Pattern 4: JSON format fallback
|
|
56
|
+
# Example: {"decision": "PROCEED"}
|
|
57
|
+
DECISION=$(echo "$OUTPUT" | jq -r '.decision // empty' 2>/dev/null | grep -oE "(PROCEED|ITERATE|ABORT)" | head -1)
|
|
58
|
+
|
|
59
|
+
if [ -n "$DECISION" ]; then
|
|
60
|
+
echo "$DECISION"
|
|
61
|
+
exit 0
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
# No decision found - return empty (caller handles fallback to ABORT)
|
|
65
|
+
echo ""
|
|
66
|
+
exit 0
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Deliverable Verification - Prevent "consensus on vapor"
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
# Parse arguments
|
|
7
|
+
TASK_ID=""
|
|
8
|
+
EXPECTED_FILES=""
|
|
9
|
+
|
|
10
|
+
while [[ $# -gt 0 ]]; do
|
|
11
|
+
case $1 in
|
|
12
|
+
--task-id)
|
|
13
|
+
TASK_ID="$2"
|
|
14
|
+
shift 2
|
|
15
|
+
;;
|
|
16
|
+
--expected-files)
|
|
17
|
+
EXPECTED_FILES="$2"
|
|
18
|
+
shift 2
|
|
19
|
+
;;
|
|
20
|
+
*)
|
|
21
|
+
echo "Unknown option: $1" >&2
|
|
22
|
+
exit 1
|
|
23
|
+
;;
|
|
24
|
+
esac
|
|
25
|
+
done
|
|
26
|
+
|
|
27
|
+
if [ -z "$TASK_ID" ]; then
|
|
28
|
+
echo "ERROR: --task-id required" >&2
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# Get task description from Redis
|
|
33
|
+
TASK_DESC=$(redis-cli GET "swarm:${TASK_ID}:task" 2>/dev/null || echo "")
|
|
34
|
+
|
|
35
|
+
# Check if task requires implementation (file creation)
|
|
36
|
+
REQUIRES_FILES=false
|
|
37
|
+
if echo "$TASK_DESC" | grep -qiE "create|build|implement|generate|file|component|module|test|write|add"; then
|
|
38
|
+
REQUIRES_FILES=true
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# If task doesn't require files, skip verification
|
|
42
|
+
if [ "$REQUIRES_FILES" = false ]; then
|
|
43
|
+
echo "PASSED"
|
|
44
|
+
exit 0
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# If expected files specified, verify actual existence
|
|
48
|
+
if [ -n "$EXPECTED_FILES" ]; then
|
|
49
|
+
MISSING_FILES=()
|
|
50
|
+
IFS=',' read -ra FILES <<< "$EXPECTED_FILES"
|
|
51
|
+
|
|
52
|
+
for file in "${FILES[@]}"; do
|
|
53
|
+
# Trim whitespace
|
|
54
|
+
file=$(echo "$file" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
|
55
|
+
|
|
56
|
+
if [ ! -f "$file" ]; then
|
|
57
|
+
MISSING_FILES+=("$file")
|
|
58
|
+
fi
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
if [ ${#MISSING_FILES[@]} -gt 0 ]; then
|
|
62
|
+
echo "FAILED"
|
|
63
|
+
# Store missing files in Redis for orchestrator feedback
|
|
64
|
+
MISSING_JSON=$(printf '%s\n' "${MISSING_FILES[@]}" | jq -R . | jq -s -c .)
|
|
65
|
+
redis-cli setex "swarm:${TASK_ID}:missing-files" 300 "$MISSING_JSON" >/dev/null
|
|
66
|
+
exit 0
|
|
67
|
+
else
|
|
68
|
+
echo "PASSED"
|
|
69
|
+
exit 0
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Fallback: Check for file changes in git (backward compatibility)
|
|
74
|
+
FILES_CREATED=$(git status --short 2>/dev/null | grep -E "^(A|M|\?\?)" | wc -l)
|
|
75
|
+
|
|
76
|
+
if [ "$FILES_CREATED" -eq 0 ]; then
|
|
77
|
+
echo "FAILED"
|
|
78
|
+
exit 0
|
|
79
|
+
else
|
|
80
|
+
echo "PASSED"
|
|
81
|
+
exit 0
|
|
82
|
+
fi
|