claude-flow-novice 2.9.0 → 2.10.0
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/agents/agent-loader.js +165 -146
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/agent-executor.js +1 -1
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/cli/config-manager.js +109 -91
- package/dist/cli/config-manager.js.map +1 -1
- package/package.json +43 -7
- package/readme/README.md +15 -4
- package/scripts/init-project.js +84 -29
- 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,741 @@
|
|
|
1
|
+
# CFN Loop Frontend - Visual Iteration Workflow
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0 | **Date:** 2025-10-28 | **Status:** Production Ready
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Specialized CFN Loop for frontend development with visual feedback loops, design-first approach, and brand consistency enforcement.
|
|
10
|
+
|
|
11
|
+
**Key Difference:** Coordinator orchestrates visual iteration - does NOT implement UI code.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Problem with Standard CFN Loop for Frontend
|
|
16
|
+
|
|
17
|
+
**Anti-Pattern:**
|
|
18
|
+
```
|
|
19
|
+
/cfn-loop "Build login UI"
|
|
20
|
+
↓
|
|
21
|
+
Coordinator tries to implement React components
|
|
22
|
+
↓
|
|
23
|
+
Context explodes with component code
|
|
24
|
+
↓
|
|
25
|
+
No visual feedback - just code
|
|
26
|
+
↓
|
|
27
|
+
Validators can't assess UI quality without running code
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Result:** Poor UI/UX, inconsistent design, context bloat, no visual validation
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Frontend CFN Loop Architecture
|
|
35
|
+
|
|
36
|
+
### Phase 0: Planning (Design-First)
|
|
37
|
+
|
|
38
|
+
**Step 1: Mockup Creation (Optional but Recommended)**
|
|
39
|
+
|
|
40
|
+
Use visual design tools to create mockup:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Option 1: Use nano banana or similar tool
|
|
44
|
+
# Create mockup externally and provide path/URL
|
|
45
|
+
|
|
46
|
+
# Option 2: Generate from description
|
|
47
|
+
# Provide detailed UI description for coordinator to create mockup
|
|
48
|
+
|
|
49
|
+
MOCKUP_PATH="/path/to/mockup.png"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Step 2: Brand Guidelines**
|
|
53
|
+
|
|
54
|
+
Either extract from mockup or define upfront:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"brandGuidelines": {
|
|
59
|
+
"colors": {
|
|
60
|
+
"primary": "#3B82F6",
|
|
61
|
+
"secondary": "#8B5CF6",
|
|
62
|
+
"accent": "#F59E0B",
|
|
63
|
+
"background": "#FFFFFF",
|
|
64
|
+
"text": "#1F2937",
|
|
65
|
+
"error": "#EF4444",
|
|
66
|
+
"success": "#10B981"
|
|
67
|
+
},
|
|
68
|
+
"typography": {
|
|
69
|
+
"fontFamily": "Inter, sans-serif",
|
|
70
|
+
"headingScale": "1.25rem, 1.5rem, 2rem, 2.5rem",
|
|
71
|
+
"bodySize": "1rem",
|
|
72
|
+
"lineHeight": "1.5"
|
|
73
|
+
},
|
|
74
|
+
"spacing": {
|
|
75
|
+
"unit": "8px",
|
|
76
|
+
"scale": "0.5, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32"
|
|
77
|
+
},
|
|
78
|
+
"borderRadius": {
|
|
79
|
+
"small": "4px",
|
|
80
|
+
"medium": "8px",
|
|
81
|
+
"large": "16px",
|
|
82
|
+
"full": "9999px"
|
|
83
|
+
},
|
|
84
|
+
"shadows": {
|
|
85
|
+
"small": "0 1px 3px rgba(0,0,0,0.1)",
|
|
86
|
+
"medium": "0 4px 6px rgba(0,0,0,0.1)",
|
|
87
|
+
"large": "0 10px 15px rgba(0,0,0,0.1)"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Step 3: Extract Design Tokens from Mockup**
|
|
94
|
+
|
|
95
|
+
If mockup provided, use image analysis:
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
const mockupAnalysis = mcp__zai-mcp-server__analyze_image({
|
|
99
|
+
image_source: mockupPath,
|
|
100
|
+
prompt: `Extract design tokens from this UI mockup:
|
|
101
|
+
- Color palette (primary, secondary, accent, backgrounds)
|
|
102
|
+
- Typography (font families, sizes, weights)
|
|
103
|
+
- Spacing system (margins, padding, gaps)
|
|
104
|
+
- Border radius values
|
|
105
|
+
- Shadow styles
|
|
106
|
+
- Component patterns (buttons, cards, inputs)
|
|
107
|
+
|
|
108
|
+
Return as structured JSON for brand guidelines.`
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Phase 1: Loop 3 - Implementation
|
|
113
|
+
|
|
114
|
+
**Agents (Frontend Specialists):**
|
|
115
|
+
- `react-frontend-engineer` - Component implementation
|
|
116
|
+
- `accessibility-advocate-persona` - WCAG compliance from start
|
|
117
|
+
- `mobile-dev` (if responsive/mobile app)
|
|
118
|
+
|
|
119
|
+
**Critical:** Coordinator provides brand guidelines + mockup to each agent
|
|
120
|
+
|
|
121
|
+
```javascript
|
|
122
|
+
Task("react-frontend-engineer", `
|
|
123
|
+
Implement login UI following mockup and brand guidelines.
|
|
124
|
+
|
|
125
|
+
Mockup: ${mockupPath}
|
|
126
|
+
Brand Guidelines: ${JSON.stringify(brandGuidelines)}
|
|
127
|
+
|
|
128
|
+
Requirements:
|
|
129
|
+
- Match mockup visual design exactly
|
|
130
|
+
- Use brand color palette
|
|
131
|
+
- Follow typography scale
|
|
132
|
+
- Implement responsive breakpoints
|
|
133
|
+
- Include accessibility attributes
|
|
134
|
+
|
|
135
|
+
Deliverables:
|
|
136
|
+
- Login.tsx component
|
|
137
|
+
- CSS/Tailwind styling
|
|
138
|
+
- Component tests
|
|
139
|
+
`);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Output:** Each agent implements and reports confidence
|
|
143
|
+
|
|
144
|
+
### Phase 2: Visual Validation Loop
|
|
145
|
+
|
|
146
|
+
**Critical Step:** Capture screenshots AND videos, compare to mockup
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# After implementation, capture screenshot + video
|
|
150
|
+
playwright test screenshot-capture.spec.ts
|
|
151
|
+
playwright test interaction-capture.spec.ts
|
|
152
|
+
|
|
153
|
+
SCREENSHOT_PATH="tests/screenshots/login-iteration-1.png"
|
|
154
|
+
VIDEO_PATH="test-results/interaction-capture/video.webm"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Image Comparison Analysis (Static):**
|
|
158
|
+
|
|
159
|
+
```javascript
|
|
160
|
+
const visualAnalysis = mcp__zai-mcp-server__analyze_image({
|
|
161
|
+
image_source: screenshotPath,
|
|
162
|
+
prompt: `Compare this implementation to the mockup at ${mockupPath}.
|
|
163
|
+
|
|
164
|
+
Analyze:
|
|
165
|
+
1. Visual fidelity (colors, spacing, typography)
|
|
166
|
+
2. Layout accuracy (component positioning, alignment)
|
|
167
|
+
3. Responsive behavior (if applicable)
|
|
168
|
+
4. Accessibility (contrast ratios, focus states)
|
|
169
|
+
|
|
170
|
+
Rate similarity: 0-100%
|
|
171
|
+
Identify specific discrepancies.
|
|
172
|
+
Suggest improvements.`
|
|
173
|
+
});
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Video Interaction Analysis (Dynamic):**
|
|
177
|
+
|
|
178
|
+
```javascript
|
|
179
|
+
const interactionAnalysis = mcp__zai-mcp-server__analyze_video({
|
|
180
|
+
video_source: videoPath,
|
|
181
|
+
prompt: `Analyze login interaction flow quality:
|
|
182
|
+
|
|
183
|
+
Evaluate:
|
|
184
|
+
1. Loading states (spinner appears, smooth transitions)
|
|
185
|
+
2. Animation timing (300ms transitions, no jank)
|
|
186
|
+
3. Error handling (validation messages, error states clear)
|
|
187
|
+
4. Focus management (tab order correct, visible focus)
|
|
188
|
+
5. Form interactions (typing smooth, button responds)
|
|
189
|
+
|
|
190
|
+
Rate each aspect 0-100.
|
|
191
|
+
Identify UX issues or interaction bugs.`
|
|
192
|
+
});
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Combined Validation:**
|
|
196
|
+
|
|
197
|
+
```javascript
|
|
198
|
+
const overallScore = (visualAnalysis.similarity + interactionAnalysis.averageScore) / 2;
|
|
199
|
+
|
|
200
|
+
if (overallScore < 85) {
|
|
201
|
+
// Combine feedback from both analyses
|
|
202
|
+
visualFeedback = {
|
|
203
|
+
staticIssues: visualAnalysis.discrepancies,
|
|
204
|
+
interactionIssues: interactionAnalysis.issues,
|
|
205
|
+
overallScore
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Phase 3: Loop 2 - Functional Validation
|
|
211
|
+
|
|
212
|
+
**Validators (Frontend-Specific):**
|
|
213
|
+
- `reviewer` - Code quality, React best practices
|
|
214
|
+
- `interaction-tester` - User flows, interactions, edge cases
|
|
215
|
+
- `accessibility-advocate-persona` - WCAG AA compliance validation
|
|
216
|
+
- `playwright-tester` - E2E tests, visual regression
|
|
217
|
+
|
|
218
|
+
**Validator Tasks:**
|
|
219
|
+
|
|
220
|
+
```javascript
|
|
221
|
+
// Interaction tester validates user flows
|
|
222
|
+
Task("interaction-tester", `
|
|
223
|
+
Test login UI functionality:
|
|
224
|
+
- Form validation (empty fields, invalid email)
|
|
225
|
+
- Submit flow (success/error states)
|
|
226
|
+
- Loading states
|
|
227
|
+
- Error message display
|
|
228
|
+
- Focus management
|
|
229
|
+
- Keyboard navigation
|
|
230
|
+
|
|
231
|
+
Mockup: ${mockupPath}
|
|
232
|
+
Screenshot: ${screenshotPath}
|
|
233
|
+
`);
|
|
234
|
+
|
|
235
|
+
// Playwright tester validates visual consistency
|
|
236
|
+
Task("playwright-tester", `
|
|
237
|
+
Run visual regression tests:
|
|
238
|
+
- Compare screenshot to baseline (mockup)
|
|
239
|
+
- Test responsive breakpoints (mobile, tablet, desktop)
|
|
240
|
+
- Test interactive states (hover, focus, active, disabled)
|
|
241
|
+
- Generate diff report if visual changes detected
|
|
242
|
+
`);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Phase 4: Loop 4 - Product Owner Decision
|
|
246
|
+
|
|
247
|
+
Product Owner evaluates:
|
|
248
|
+
1. Visual fidelity vs mockup (≥85% similarity required)
|
|
249
|
+
2. Interaction quality from video analysis (≥85% required)
|
|
250
|
+
3. Overall score: (visual + interaction) / 2 ≥ 85%
|
|
251
|
+
4. Functional validation consensus (≥0.90)
|
|
252
|
+
5. Accessibility compliance (WCAG AA)
|
|
253
|
+
6. Brand guidelines adherence
|
|
254
|
+
|
|
255
|
+
**Decision Logic:**
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
overall_score = (visual_similarity + interaction_quality) / 2
|
|
259
|
+
|
|
260
|
+
IF overall_score >= 85% AND consensus >= 0.90 AND wcag_compliant:
|
|
261
|
+
PROCEED → git commit + generate component docs
|
|
262
|
+
ELSE IF iteration < max_iterations:
|
|
263
|
+
ITERATE → provide combined feedback (static + interaction issues)
|
|
264
|
+
ELSE:
|
|
265
|
+
ABORT → escalate to human review
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Slash Command Usage
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Task Mode (recommended for frontend - full visibility)
|
|
274
|
+
/cfn-loop-frontend "Build login UI" \
|
|
275
|
+
--mockup=/path/to/login-mockup.png \
|
|
276
|
+
--brand-guidelines=/path/to/brand.json \
|
|
277
|
+
--spawn-mode=task \
|
|
278
|
+
--mode=standard
|
|
279
|
+
|
|
280
|
+
# CLI Mode (production)
|
|
281
|
+
/cfn-loop-frontend "Build dashboard" \
|
|
282
|
+
--mockup=/path/to/dashboard.png \
|
|
283
|
+
--mode=enterprise
|
|
284
|
+
|
|
285
|
+
# Note: Playwright video recording enabled by default
|
|
286
|
+
# - Screenshots: tests/screenshots/*.png (static validation)
|
|
287
|
+
# - Videos: test-results/**/video.webm (interaction validation)
|
|
288
|
+
# - Combined score threshold: ≥85% required for PROCEED
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Agent Specialization
|
|
294
|
+
|
|
295
|
+
### Loop 3 (Implementation)
|
|
296
|
+
|
|
297
|
+
| Task Type | Agents | Count |
|
|
298
|
+
|-----------|--------|-------|
|
|
299
|
+
| Web UI | react-frontend-engineer, accessibility-advocate-persona | 2 |
|
|
300
|
+
| Mobile UI | mobile-dev, accessibility-advocate-persona | 2 |
|
|
301
|
+
| Responsive Web | react-frontend-engineer, mobile-dev, accessibility-advocate | 3 |
|
|
302
|
+
|
|
303
|
+
### Loop 2 (Validation)
|
|
304
|
+
|
|
305
|
+
| Complexity | Validators | Count |
|
|
306
|
+
|------------|-----------|-------|
|
|
307
|
+
| Simple (single page) | reviewer, interaction-tester, playwright-tester | 3 |
|
|
308
|
+
| Standard (multi-page flow) | +accessibility-advocate-persona | 4 |
|
|
309
|
+
| Complex (dashboard/SPA) | +perf-benchmarker | 5 |
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Visual Iteration Workflow
|
|
314
|
+
|
|
315
|
+
### Iteration Loop
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
1. Agent implements UI → screenshot + video
|
|
319
|
+
↓
|
|
320
|
+
2a. Image analysis compares to mockup → visual similarity score
|
|
321
|
+
2b. Video analysis evaluates interactions → interaction quality score
|
|
322
|
+
↓
|
|
323
|
+
3. Calculate overall_score = (visual + interaction) / 2
|
|
324
|
+
↓
|
|
325
|
+
4. IF overall_score >= 85%:
|
|
326
|
+
PASS → proceed to functional validation
|
|
327
|
+
ELSE:
|
|
328
|
+
ITERATE → provide combined feedback (static + interaction issues)
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Visual Feedback Format
|
|
332
|
+
|
|
333
|
+
```json
|
|
334
|
+
{
|
|
335
|
+
"iteration": 2,
|
|
336
|
+
"overallScore": 72,
|
|
337
|
+
"visualSimilarity": 75,
|
|
338
|
+
"interactionQuality": 69,
|
|
339
|
+
"staticDiscrepancies": [
|
|
340
|
+
{
|
|
341
|
+
"area": "Login button",
|
|
342
|
+
"issue": "Background color #4A90E2 should be #3B82F6 (brand primary)",
|
|
343
|
+
"severity": "high",
|
|
344
|
+
"fix": "Update button bg-blue-500 to match brand guidelines"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"area": "Spacing",
|
|
348
|
+
"issue": "Input fields have 12px margin, mockup shows 16px",
|
|
349
|
+
"severity": "medium",
|
|
350
|
+
"fix": "Change my-3 to my-4 (16px in 8px scale)"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"area": "Typography",
|
|
354
|
+
"issue": "Heading font-size 18px, mockup shows 24px",
|
|
355
|
+
"severity": "high",
|
|
356
|
+
"fix": "Update text-lg to text-2xl"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"interactionIssues": [
|
|
360
|
+
{
|
|
361
|
+
"area": "Loading state",
|
|
362
|
+
"issue": "No spinner shown during form submission",
|
|
363
|
+
"severity": "high",
|
|
364
|
+
"fix": "Add loading state: setIsLoading(true) on submit, show <Spinner />"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"area": "Error handling",
|
|
368
|
+
"issue": "Validation errors not visible on failed submit",
|
|
369
|
+
"severity": "high",
|
|
370
|
+
"fix": "Display error messages below input fields with text-red-600"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"area": "Animation timing",
|
|
374
|
+
"issue": "Button transition too slow (500ms), should be 300ms",
|
|
375
|
+
"severity": "medium",
|
|
376
|
+
"fix": "Change transition-all duration-500 to duration-300"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"area": "Focus management",
|
|
380
|
+
"issue": "Focus not returned to first input on error",
|
|
381
|
+
"severity": "medium",
|
|
382
|
+
"fix": "Add emailInputRef.current.focus() in error handler"
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
"recommendations": [
|
|
386
|
+
"Use brand guideline variables consistently",
|
|
387
|
+
"Double-check spacing scale against design system",
|
|
388
|
+
"Verify color hex codes match brand palette exactly",
|
|
389
|
+
"Add loading states for all async operations",
|
|
390
|
+
"Ensure all form validation errors are visible to users"
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Brand Guidelines Management
|
|
398
|
+
|
|
399
|
+
### Extract from Mockup
|
|
400
|
+
|
|
401
|
+
```javascript
|
|
402
|
+
// Coordinator extracts brand guidelines from mockup
|
|
403
|
+
const brandGuidelines = mcp__zai-mcp-server__analyze_image({
|
|
404
|
+
image_source: mockupPath,
|
|
405
|
+
prompt: `Analyze this UI mockup and extract brand guidelines.
|
|
406
|
+
|
|
407
|
+
Extract:
|
|
408
|
+
1. Color palette (identify primary, secondary, accent, neutral colors)
|
|
409
|
+
2. Typography (font families, sizes, weights, line heights)
|
|
410
|
+
3. Spacing system (identify repeated spacing values)
|
|
411
|
+
4. Border radius patterns
|
|
412
|
+
5. Shadow styles
|
|
413
|
+
6. Button styles (height, padding, font size)
|
|
414
|
+
7. Input field styles
|
|
415
|
+
8. Card/container styles
|
|
416
|
+
|
|
417
|
+
Return structured JSON for design system.`
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
// Store in project
|
|
421
|
+
Write('.claude/brand-guidelines.json', JSON.stringify(brandGuidelines, null, 2));
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### Define from Scratch
|
|
425
|
+
|
|
426
|
+
If no mockup, coordinator guides brand guideline creation:
|
|
427
|
+
|
|
428
|
+
```javascript
|
|
429
|
+
// Coordinator prompts for brand direction
|
|
430
|
+
const brandDirection = `
|
|
431
|
+
Project: ${projectName}
|
|
432
|
+
Industry: ${industry}
|
|
433
|
+
Target Audience: ${audience}
|
|
434
|
+
Tone: ${tone} (e.g., professional, playful, minimal)
|
|
435
|
+
`;
|
|
436
|
+
|
|
437
|
+
// Generate initial brand guidelines
|
|
438
|
+
const guidelines = generateBrandGuidelines(brandDirection);
|
|
439
|
+
|
|
440
|
+
// Review with user before implementation
|
|
441
|
+
console.log('Proposed Brand Guidelines:', guidelines);
|
|
442
|
+
// User approves or adjusts
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Coordinator Role (Critical)
|
|
448
|
+
|
|
449
|
+
**What Coordinator DOES:**
|
|
450
|
+
- Extracts brand guidelines from mockup
|
|
451
|
+
- Spawns frontend agents with mockup + guidelines
|
|
452
|
+
- Captures screenshots after implementation
|
|
453
|
+
- Analyzes visual similarity via image comparison
|
|
454
|
+
- Provides structured visual feedback for iterations
|
|
455
|
+
- Spawns validators with visual artifacts
|
|
456
|
+
- Orchestrates iteration loop
|
|
457
|
+
|
|
458
|
+
**What Coordinator DOES NOT DO:**
|
|
459
|
+
- ❌ Write React component code
|
|
460
|
+
- ❌ Implement CSS/styling
|
|
461
|
+
- ❌ Debug frontend issues
|
|
462
|
+
- ❌ Run webpack/vite builds
|
|
463
|
+
- ❌ ANY implementation work
|
|
464
|
+
|
|
465
|
+
**Why:** Context management. Coordinator focuses on orchestration, not implementation.
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
## Tools Integration
|
|
470
|
+
|
|
471
|
+
### Image Analysis (Visual Validation)
|
|
472
|
+
|
|
473
|
+
```javascript
|
|
474
|
+
// Built-in MCP tool for image analysis
|
|
475
|
+
mcp__zai-mcp-server__analyze_image({
|
|
476
|
+
image_source: screenshotPath,
|
|
477
|
+
prompt: "Compare to mockup, identify discrepancies"
|
|
478
|
+
});
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### Video Analysis (Interaction Validation)
|
|
482
|
+
|
|
483
|
+
```javascript
|
|
484
|
+
// Built-in MCP tool for video analysis
|
|
485
|
+
mcp__zai-mcp-server__analyze_video({
|
|
486
|
+
video_source: 'tests/videos/login-flow.webm',
|
|
487
|
+
prompt: `Analyze this login interaction flow:
|
|
488
|
+
|
|
489
|
+
Evaluate:
|
|
490
|
+
1. Loading states (spinner visibility, smooth transitions)
|
|
491
|
+
2. Animation timing and smoothness
|
|
492
|
+
3. Error handling (validation messages, error states)
|
|
493
|
+
4. Focus management (tab order, focus indicators)
|
|
494
|
+
5. Form interactions (typing, clicking, submitting)
|
|
495
|
+
|
|
496
|
+
Rate each aspect 0-100.
|
|
497
|
+
Identify interaction issues or UX problems.`
|
|
498
|
+
});
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Screenshot Capture (Playwright)
|
|
502
|
+
|
|
503
|
+
```typescript
|
|
504
|
+
// tests/screenshot-capture.spec.ts
|
|
505
|
+
import { test } from '@playwright/test';
|
|
506
|
+
|
|
507
|
+
test('capture UI screenshot', async ({ page }) => {
|
|
508
|
+
await page.goto('http://localhost:3000/login');
|
|
509
|
+
await page.screenshot({
|
|
510
|
+
path: 'tests/screenshots/login-iteration-1.png',
|
|
511
|
+
fullPage: true
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Video Recording (Playwright)
|
|
517
|
+
|
|
518
|
+
```typescript
|
|
519
|
+
// playwright.config.ts
|
|
520
|
+
import { defineConfig } from '@playwright/test';
|
|
521
|
+
|
|
522
|
+
export default defineConfig({
|
|
523
|
+
use: {
|
|
524
|
+
video: 'on', // Always record videos
|
|
525
|
+
// OR: video: 'retain-on-failure' for failed tests only
|
|
526
|
+
},
|
|
527
|
+
// Videos saved to: test-results/<test-name>/video.webm
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
// tests/interaction-capture.spec.ts
|
|
531
|
+
test('capture login interaction flow', async ({ page }) => {
|
|
532
|
+
await page.goto('http://localhost:3000/login');
|
|
533
|
+
|
|
534
|
+
// Interact with form
|
|
535
|
+
await page.fill('input[name="email"]', 'test@example.com');
|
|
536
|
+
await page.fill('input[name="password"]', 'password123');
|
|
537
|
+
await page.click('button[type="submit"]');
|
|
538
|
+
|
|
539
|
+
// Wait for navigation/response
|
|
540
|
+
await page.waitForURL('**/dashboard');
|
|
541
|
+
|
|
542
|
+
// Video automatically saved to test-results/
|
|
543
|
+
});
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Visual Regression Testing
|
|
547
|
+
|
|
548
|
+
```javascript
|
|
549
|
+
// Use playwright-expect with toMatchSnapshot
|
|
550
|
+
await expect(page).toHaveScreenshot('login-baseline.png', {
|
|
551
|
+
threshold: 0.15, // 85% similarity threshold
|
|
552
|
+
maxDiffPixels: 100
|
|
553
|
+
});
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
## Example: Complete Frontend CFN Loop
|
|
559
|
+
|
|
560
|
+
### Task Mode Execution
|
|
561
|
+
|
|
562
|
+
```javascript
|
|
563
|
+
// Step 1: Main Chat reads guide
|
|
564
|
+
const guideContent = await Read('.claude/commands/cfn/CFN_LOOP_FRONTEND.md');
|
|
565
|
+
|
|
566
|
+
// Step 2: Extract brand guidelines from mockup
|
|
567
|
+
const brandGuidelines = mcp__zai-mcp-server__analyze_image({
|
|
568
|
+
image_source: '/mockups/login.png',
|
|
569
|
+
prompt: 'Extract complete brand guidelines (colors, typography, spacing, etc.)'
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
Write('.claude/brand-guidelines.json', JSON.stringify(brandGuidelines));
|
|
573
|
+
|
|
574
|
+
// Step 3: Spawn Loop 3 agents (implementation)
|
|
575
|
+
let iteration = 1;
|
|
576
|
+
|
|
577
|
+
do {
|
|
578
|
+
const loop3Results = await Promise.all([
|
|
579
|
+
Task("react-frontend-engineer", `
|
|
580
|
+
Implement login UI.
|
|
581
|
+
Mockup: /mockups/login.png
|
|
582
|
+
Brand Guidelines: ${brandGuidelines}
|
|
583
|
+
Iteration: ${iteration}
|
|
584
|
+
${iteration > 1 ? `Visual Feedback: ${visualFeedback}` : ''}
|
|
585
|
+
`),
|
|
586
|
+
Task("accessibility-advocate-persona", `
|
|
587
|
+
Ensure WCAG AA compliance from implementation start.
|
|
588
|
+
Review: form labels, focus states, contrast ratios.
|
|
589
|
+
`)
|
|
590
|
+
]);
|
|
591
|
+
|
|
592
|
+
// Step 4: Capture screenshot + video
|
|
593
|
+
Bash('npx playwright test screenshot-capture.spec.ts');
|
|
594
|
+
Bash('npx playwright test interaction-capture.spec.ts');
|
|
595
|
+
|
|
596
|
+
const screenshotPath = `tests/screenshots/login-iteration-${iteration}.png`;
|
|
597
|
+
const videoPath = `test-results/interaction-capture/video.webm`;
|
|
598
|
+
|
|
599
|
+
// Step 5a: Visual validation (static)
|
|
600
|
+
const visualAnalysis = mcp__zai-mcp-server__analyze_image({
|
|
601
|
+
image_source: screenshotPath,
|
|
602
|
+
prompt: `Compare to mockup /mockups/login.png.
|
|
603
|
+
Rate similarity 0-100, identify discrepancies.`
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
// Step 5b: Interaction validation (dynamic)
|
|
607
|
+
const interactionAnalysis = mcp__zai-mcp-server__analyze_video({
|
|
608
|
+
video_source: videoPath,
|
|
609
|
+
prompt: `Analyze login interaction flow:
|
|
610
|
+
- Loading states (spinner, transitions)
|
|
611
|
+
- Error handling (validation messages)
|
|
612
|
+
- Focus management (tab order, focus indicators)
|
|
613
|
+
- Animation timing
|
|
614
|
+
Rate each aspect 0-100, identify UX issues.`
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
// Step 5c: Combined score
|
|
618
|
+
const overallScore = (visualAnalysis.similarity + interactionAnalysis.averageScore) / 2;
|
|
619
|
+
|
|
620
|
+
if (overallScore >= 85) break;
|
|
621
|
+
|
|
622
|
+
visualFeedback = {
|
|
623
|
+
staticIssues: visualAnalysis.discrepancies,
|
|
624
|
+
interactionIssues: interactionAnalysis.issues,
|
|
625
|
+
overallScore
|
|
626
|
+
};
|
|
627
|
+
iteration++;
|
|
628
|
+
} while (iteration <= 5);
|
|
629
|
+
|
|
630
|
+
// Step 6: Spawn Loop 2 validators
|
|
631
|
+
const loop2Results = await Promise.all([
|
|
632
|
+
Task("reviewer", "Review code quality, React best practices"),
|
|
633
|
+
Task("interaction-tester", "Test user flows, form validation, error states"),
|
|
634
|
+
Task("playwright-tester", "Run visual regression tests"),
|
|
635
|
+
Task("accessibility-advocate-persona", "Validate WCAG AA compliance")
|
|
636
|
+
]);
|
|
637
|
+
|
|
638
|
+
const consensus = average(loop2Results.map(r => r.confidence));
|
|
639
|
+
|
|
640
|
+
// Step 7: Product Owner decision
|
|
641
|
+
if (consensus >= 0.90 && overallScore >= 85) {
|
|
642
|
+
Bash("git add . && git commit -m 'feat(ui): login component' && git push");
|
|
643
|
+
Write('docs/LOGIN_COMPONENT.md', generateComponentDocs());
|
|
644
|
+
console.log(`✅ Login UI complete
|
|
645
|
+
- Visual fidelity: ${visualAnalysis.similarity}%
|
|
646
|
+
- Interaction quality: ${interactionAnalysis.averageScore}%
|
|
647
|
+
- Overall score: ${overallScore}%`);
|
|
648
|
+
}
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
---
|
|
652
|
+
|
|
653
|
+
## Best Practices
|
|
654
|
+
|
|
655
|
+
### 1. Mockup-First Development
|
|
656
|
+
Always start with visual mockup when possible. Reduces iteration cycles.
|
|
657
|
+
|
|
658
|
+
### 2. Brand Guidelines as Single Source of Truth
|
|
659
|
+
Store in `.claude/brand-guidelines.json` and reference in every implementation task.
|
|
660
|
+
|
|
661
|
+
### 3. Capture Every Iteration (Screenshot + Video)
|
|
662
|
+
Maintain visual history:
|
|
663
|
+
- Screenshots: `login-iteration-1.png`, `login-iteration-2.png`
|
|
664
|
+
- Videos: `test-results/interaction-capture-iteration-1/video.webm`
|
|
665
|
+
|
|
666
|
+
### 4. Dual Validation (Static + Dynamic)
|
|
667
|
+
- Screenshot: Visual fidelity (colors, spacing, typography)
|
|
668
|
+
- Video: Interaction quality (loading states, animations, error handling)
|
|
669
|
+
- Combined score ≥85% required
|
|
670
|
+
|
|
671
|
+
### 5. Strict Quality Threshold
|
|
672
|
+
≥85% overall score required. Lower threshold = poor user experience.
|
|
673
|
+
|
|
674
|
+
### 6. Accessibility from Start
|
|
675
|
+
Include `accessibility-advocate-persona` in Loop 3, not just validation.
|
|
676
|
+
|
|
677
|
+
### 7. Coordinator Orchestrates Only
|
|
678
|
+
If coordinator starts writing React code → STOP. Respawn agents.
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
## Troubleshooting
|
|
683
|
+
|
|
684
|
+
### Issue: Low Visual Similarity (<70%)
|
|
685
|
+
|
|
686
|
+
**Solution:** Provide more explicit brand guidelines and annotated mockup.
|
|
687
|
+
|
|
688
|
+
```javascript
|
|
689
|
+
const enhancedMockup = mcp__zai-mcp-server__analyze_image({
|
|
690
|
+
image_source: mockupPath,
|
|
691
|
+
prompt: `Annotate this mockup with detailed specifications:
|
|
692
|
+
- Exact hex codes for each color
|
|
693
|
+
- Font sizes in px/rem
|
|
694
|
+
- Spacing values in px
|
|
695
|
+
- Component dimensions
|
|
696
|
+
- Border radius values
|
|
697
|
+
Return annotated description for implementation.`
|
|
698
|
+
});
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
### Issue: Coordinator Implementing Code
|
|
702
|
+
|
|
703
|
+
**Solution:** Update coordinator instructions, remove implementation tools.
|
|
704
|
+
|
|
705
|
+
```javascript
|
|
706
|
+
// WRONG
|
|
707
|
+
Task("coordinator", "Implement login component");
|
|
708
|
+
|
|
709
|
+
// RIGHT
|
|
710
|
+
Task("coordinator", "Coordinate login component implementation:
|
|
711
|
+
1. Extract brand guidelines
|
|
712
|
+
2. Spawn react-frontend-engineer
|
|
713
|
+
3. Capture screenshot
|
|
714
|
+
4. Analyze similarity
|
|
715
|
+
5. Iterate if needed");
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### Issue: No Visual Feedback on Iteration
|
|
719
|
+
|
|
720
|
+
**Solution:** Ensure image analysis provides actionable feedback.
|
|
721
|
+
|
|
722
|
+
```javascript
|
|
723
|
+
prompt: `Compare and provide ACTIONABLE feedback:
|
|
724
|
+
- Specific CSS changes needed
|
|
725
|
+
- Exact color hex codes to use
|
|
726
|
+
- Component props to adjust
|
|
727
|
+
- Layout changes required
|
|
728
|
+
Not generic advice - specific fixes only.`
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
---
|
|
732
|
+
|
|
733
|
+
## Related Documentation
|
|
734
|
+
|
|
735
|
+
- **Task Mode Guide**: `.claude/commands/cfn/CFN_LOOP_TASK_MODE.md`
|
|
736
|
+
- **Standard CFN Loop**: `.claude/commands/cfn/cfn-loop.md`
|
|
737
|
+
- **Coordinator Parameters**: `.claude/commands/cfn/CFN_COORDINATOR_PARAMETERS.md`
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
741
|
+
**Version:** 1.0.0 (2025-10-28) - Frontend CFN Loop with visual iteration, mockup integration, brand guidelines, image analysis
|