claude-flow-novice 2.14.28 → 2.14.30
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/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md +4 -14
- package/.claude/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md.backup +481 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md +3 -4
- package/.claude/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md.backup +371 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +20 -26
- package/.claude/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md.backup +637 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md +295 -50
- package/.claude/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md.backup +398 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md +27 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md.backup +401 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md +5 -106
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md.backup +552 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md +5 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md.backup +223 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md +5 -27
- package/.claude/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md.backup +367 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md +5 -27
- package/.claude/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md.backup +247 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md +5 -27
- package/.claude/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md.backup +269 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md +5 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md.backup +311 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md +6 -26
- package/.claude/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md.backup +222 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md +5 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md.backup +408 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md +6 -26
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md.backup +354 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md +4 -4
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md.backup +561 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md +2 -2
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md.backup +480 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md +1 -1
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md.backup +448 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md +2 -2
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md.backup +329 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md +361 -199
- package/.claude/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md.backup +208 -0
- package/.claude/commands/CFN_LOOP_TASK_MODE.md +100 -11
- package/.claude/commands/cfn-mode.md +2 -2
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +12 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
- package/.claude/skills/cfn-hybrid-routing/README.md +1 -1
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +95 -15
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
- package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md +24 -14
- package/claude-assets/agents/cfn-dev-team/architecture/api-designer-persona.md +0 -7
- package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +12 -38
- package/claude-assets/agents/cfn-dev-team/architecture/goal-planner.md +0 -10
- package/claude-assets/agents/cfn-dev-team/architecture/planner.md +7 -57
- package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +8 -45
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +365 -25
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +504 -448
- package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +428 -167
- package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +472 -20
- package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +5 -5
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +5 -7
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +3 -3
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +13 -14
- package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +0 -6
- package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +2 -2
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +10 -56
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +7 -26
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +8 -48
- package/claude-assets/agents/cfn-dev-team/documentation/api-documentation.md +1 -1
- package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +3 -11
- package/claude-assets/agents/cfn-dev-team/documentation/specification-agent.md +6 -16
- package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +7 -19
- package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +9 -49
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +291 -86
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +9 -81
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/cyclomatic-complexity-reducer.md +4 -64
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +7 -87
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +8 -12
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +11 -129
- package/claude-assets/agents/cfn-dev-team/reviewers/reviewer.md +231 -280
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +7 -32
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +9 -47
- package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +12 -28
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +167 -236
- package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +7 -27
- package/claude-assets/agents/cfn-dev-team/testers/validation/validation-production-validator.md +7 -19
- package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +10 -47
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +40 -116
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +7 -47
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +7 -40
- package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +7 -47
- package/claude-assets/agents/cfn-dev-team/{coordinators → utility}/epic-creator.md +29 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md +4 -14
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md.backup +481 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md +3 -4
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md.backup +371 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +20 -26
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md.backup +637 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md +295 -50
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md.backup +398 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md +27 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md.backup +401 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md +5 -106
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md.backup +552 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md +5 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md.backup +223 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md +5 -27
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md.backup +367 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md +5 -27
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md.backup +247 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md +5 -27
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md.backup +269 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md +5 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md.backup +311 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md +6 -26
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md.backup +222 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md +5 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md.backup +408 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md +6 -26
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md.backup +354 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md +4 -4
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md.backup +561 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md +2 -2
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md.backup +480 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md +1 -1
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md.backup +448 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md +2 -2
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md.backup +329 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md +361 -199
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md.backup +208 -0
- package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +100 -11
- package/claude-assets/commands/cfn-mode.md +2 -2
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +12 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
- package/claude-assets/skills/cfn-environment-sanitization/SKILL.md +200 -0
- package/claude-assets/skills/cfn-environment-sanitization/sanitize-environment.sh +244 -0
- package/claude-assets/skills/cfn-hybrid-routing/README.md +1 -1
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +95 -15
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
- package/claude-assets/skills/cfn-node-heap-sizer/task-mode-heap-limiter.sh +326 -0
- package/claude-assets/skills/cfn-process-instrumentation/SKILL.md +279 -0
- package/claude-assets/skills/cfn-process-instrumentation/instrument-process.sh +323 -0
- package/claude-assets/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
- package/claude-assets/skills/cfn-task-audit/get-audit-data.sh +376 -0
- package/claude-assets/skills/cfn-task-audit/store-task-audit.sh +184 -0
- package/claude-assets/skills/cfn-task-mode-safety/cli-coordination.sh +519 -0
- package/claude-assets/skills/cfn-task-mode-safety/mode-detection.sh +326 -0
- package/claude-assets/skills/cfn-task-mode-sanitize/task-mode-env-sanitizer.sh +224 -0
- package/claude-assets/skills/cfn-telemetry/collect-metrics.sh +249 -0
- package/claude-assets/skills/cfn-telemetry/start-telemetry.sh +111 -0
- package/claude-assets/skills/cfn-validation-runner-instrumentation/wrapped-executor.sh +327 -0
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/config-manager.js +109 -91
- package/dist/cli/config-manager.js.map +1 -1
- package/package.json +1 -1
- package/scripts/mode-detection.sh +321 -0
- package/scripts/spawn-worker.sh +8 -0
- package/scripts/track-zai-costs-simple.sh +8 -0
|
@@ -14,9 +14,299 @@ You coordinate frontend CFN Loops with visual iteration workflow, mockup integra
|
|
|
14
14
|
|
|
15
15
|
## Core Responsibility
|
|
16
16
|
|
|
17
|
-
**CLI Mode Only**: Orchestrate visual-first frontend development with dual validation (screenshot + video).
|
|
17
|
+
**CLI Mode Only**: Orchestrate visual-first frontend development with Redis-based coordination and dual validation (screenshot + video).
|
|
18
18
|
|
|
19
|
-
**Critical**: You orchestrate ONLY. Never implement React/CSS code. Spawn frontend specialists for implementation.
|
|
19
|
+
**Critical**: You orchestrate ONLY. Never implement React/CSS code. Spawn frontend specialists for implementation via CLI with Redis coordination.
|
|
20
|
+
|
|
21
|
+
## Redis Coordination Implementation
|
|
22
|
+
|
|
23
|
+
### Frontend Context Storage in Redis
|
|
24
|
+
```bash
|
|
25
|
+
# Store frontend coordination context
|
|
26
|
+
redis-cli HSET "frontend:task:${TASK_ID}:context" \
|
|
27
|
+
"component_name" "${COMPONENT_NAME}" \
|
|
28
|
+
"mockup_path" "${MOCKUP_PATH}" \
|
|
29
|
+
"brand_guidelines" "${BRAND_GUIDELINES}" \
|
|
30
|
+
"mode" "${MODE}" \
|
|
31
|
+
"visual_threshold" "${VISUAL_THRESHOLD}" \
|
|
32
|
+
"max_iterations" "${MAX_ITERATIONS}" \
|
|
33
|
+
"current_iteration" "1"
|
|
34
|
+
|
|
35
|
+
# Store brand guidelines for agent reference
|
|
36
|
+
redis-cli SET "frontend:task:${TASK_ID}:brand-guidelines" "${BRAND_GUIDELINES_JSON}"
|
|
37
|
+
redis-cli SET "frontend:task:${TASK_ID}:mockup-path" "${MOCKUP_PATH}"
|
|
38
|
+
redis-cli HSET "frontend:task:${TASK_ID}:config" \
|
|
39
|
+
"visual_threshold" "85" \
|
|
40
|
+
"interaction_threshold" "80" \
|
|
41
|
+
"accessibility_threshold" "90"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Agent Spawning with Redis Context
|
|
45
|
+
```bash
|
|
46
|
+
# Enhanced spawning with Redis coordination
|
|
47
|
+
for agent in "${loop3Agents[@]}"; do
|
|
48
|
+
AGENT_ID="${TASK_ID}-${agent}-$(date +%s)"
|
|
49
|
+
|
|
50
|
+
# Store agent coordination data
|
|
51
|
+
redis-cli HSET "frontend:agent:${AGENT_ID}" \
|
|
52
|
+
"agent_type" "${agent}" \
|
|
53
|
+
"task_id" "${TASK_ID}" \
|
|
54
|
+
"loop_number" "3" \
|
|
55
|
+
"iteration" "${CURRENT_ITERATION}" \
|
|
56
|
+
"component_name" "${COMPONENT_NAME}" \
|
|
57
|
+
"status" "spawning"
|
|
58
|
+
|
|
59
|
+
# Prepare enhanced context with brand guidelines
|
|
60
|
+
CONTEXT_WITH_BRAND=$(cat <<EOF
|
|
61
|
+
Implement UI component following visual specifications.
|
|
62
|
+
|
|
63
|
+
Component: ${COMPONENT_NAME}
|
|
64
|
+
Iteration: ${CURRENT_ITERATION}
|
|
65
|
+
|
|
66
|
+
Mockup Reference: ${MOCKUP_PATH}
|
|
67
|
+
Brand Guidelines:
|
|
68
|
+
${BRAND_GUIDELINES_JSON}
|
|
69
|
+
|
|
70
|
+
Requirements:
|
|
71
|
+
- Match mockup visual design exactly
|
|
72
|
+
- Use brand color palette (exact hex codes)
|
|
73
|
+
- Follow typography scale from guidelines
|
|
74
|
+
- Implement responsive breakpoints
|
|
75
|
+
- Include accessibility attributes (WCAG AA)
|
|
76
|
+
- Prepare for visual validation (screenshot + video)
|
|
77
|
+
|
|
78
|
+
Deliverables:
|
|
79
|
+
- Component implementation (${COMPONENT_NAME}.tsx)
|
|
80
|
+
- Styling (CSS/Tailwind)
|
|
81
|
+
- Component tests
|
|
82
|
+
|
|
83
|
+
Redis Coordination: Store completion confidence via signal_agent_completion()
|
|
84
|
+
EOF
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Spawn via CLI with enhanced context
|
|
88
|
+
npx claude-flow-novice agent-spawn "$agent" \
|
|
89
|
+
--task-id "$TASK_ID" \
|
|
90
|
+
--agent-id "$AGENT_ID" \
|
|
91
|
+
--context "$CONTEXT_WITH_BRAND" &
|
|
92
|
+
|
|
93
|
+
AGENT_PIDS+=($!)
|
|
94
|
+
done
|
|
95
|
+
|
|
96
|
+
# Wait for implementation agents
|
|
97
|
+
wait "${AGENT_PIDS[@]}"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Visual Validation with Redis Storage
|
|
101
|
+
```bash
|
|
102
|
+
# Store visual analysis results in Redis
|
|
103
|
+
store_visual_analysis() {
|
|
104
|
+
local similarity_score="$1"
|
|
105
|
+
local interaction_score="$2"
|
|
106
|
+
local overall_score="$3"
|
|
107
|
+
local iteration="$4"
|
|
108
|
+
|
|
109
|
+
redis-cli HSET "frontend:task:${TASK_ID}:visual:${iteration}" \
|
|
110
|
+
"similarity_score" "$similarity_score" \
|
|
111
|
+
"interaction_score" "$interaction_score" \
|
|
112
|
+
"overall_score" "$overall_score" \
|
|
113
|
+
"analyzed_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
114
|
+
"screenshot_path" "${SCREENSHOT_PATH}" \
|
|
115
|
+
"video_path" "${VIDEO_PATH}"
|
|
116
|
+
|
|
117
|
+
# Store visual feedback for iteration
|
|
118
|
+
redis-cli SET "frontend:task:${TASK_ID}:feedback:${iteration}" "$VISUAL_FEEDBACK_JSON"
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# Retrieve brand guidelines for agents
|
|
122
|
+
get_brand_guidelines() {
|
|
123
|
+
redis-cli GET "frontend:task:${TASK_ID}:brand-guidelines"
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
# Check iteration readiness
|
|
127
|
+
check_iteration_readiness() {
|
|
128
|
+
local iteration="$1"
|
|
129
|
+
local feedback_available
|
|
130
|
+
|
|
131
|
+
feedback_available=$(redis-cli EXISTS "frontend:task:${TASK_ID}:feedback:${iteration}")
|
|
132
|
+
[ "$feedback_available" = "1" ]
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Validator Coordination with Redis
|
|
137
|
+
```bash
|
|
138
|
+
# Spawn Loop 2 validators with visual context
|
|
139
|
+
spawn_visual_validators() {
|
|
140
|
+
for validator in "${loop2Agents[@]}"; do
|
|
141
|
+
AGENT_ID="${TASK_ID}-${validator}-$(date +%s)"
|
|
142
|
+
|
|
143
|
+
# Store validator context
|
|
144
|
+
redis-cli HSET "frontend:agent:${AGENT_ID}" \
|
|
145
|
+
"agent_type" "${validator}" \
|
|
146
|
+
"task_id" "${TASK_ID}" \
|
|
147
|
+
"loop_number" "2" \
|
|
148
|
+
"iteration" "${CURRENT_ITERATION}" \
|
|
149
|
+
"component_name" "${COMPONENT_NAME}" \
|
|
150
|
+
"visual_score" "$OVERALL_SCORE"
|
|
151
|
+
|
|
152
|
+
# Prepare validation context with visual artifacts
|
|
153
|
+
VALIDATION_CONTEXT=$(cat <<EOF
|
|
154
|
+
Validate ${COMPONENT_NAME} implementation with visual analysis.
|
|
155
|
+
|
|
156
|
+
Implementation Files: ${DELIVERABLE_FILES}
|
|
157
|
+
Mockup: $(redis-cli GET "frontend:task:${TASK_ID}:mockup-path")
|
|
158
|
+
Screenshot: ${SCREENSHOT_PATH}
|
|
159
|
+
Video: ${VIDEO_PATH}
|
|
160
|
+
|
|
161
|
+
Visual Validation Results:
|
|
162
|
+
- Similarity Score: ${VISUAL_ANALYSIS.similarity}%
|
|
163
|
+
- Interaction Score: ${INTERACTION_ANALYSIS.averageScore}%
|
|
164
|
+
- Overall Score: ${OVERALL_SCORE}% (threshold: ${VISUAL_THRESHOLD})
|
|
165
|
+
|
|
166
|
+
Brand Guidelines Applied:
|
|
167
|
+
$(get_brand_guidelines)
|
|
168
|
+
|
|
169
|
+
Focus on:
|
|
170
|
+
- Code quality and React best practices
|
|
171
|
+
- User flows and interaction testing
|
|
172
|
+
- Visual regression validation
|
|
173
|
+
- WCAG AA accessibility compliance
|
|
174
|
+
- Performance optimization
|
|
175
|
+
|
|
176
|
+
Redis Coordination: Report consensus via signal_validator_completion()
|
|
177
|
+
EOF
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# Spawn validator via CLI
|
|
181
|
+
npx claude-flow-novice agent-spawn "$validator" \
|
|
182
|
+
--task-id "$TASK_ID" \
|
|
183
|
+
--agent-id "$AGENT_ID" \
|
|
184
|
+
--context "$VALIDATION_CONTEXT" &
|
|
185
|
+
|
|
186
|
+
VALIDATOR_PIDS+=($!)
|
|
187
|
+
done
|
|
188
|
+
|
|
189
|
+
wait "${VALIDATOR_PIDS[@]}"
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Completion Protocols (Mode-Specific)
|
|
194
|
+
```bash
|
|
195
|
+
# CLI Mode Agent Completion (Required for CLI-spawned agents)
|
|
196
|
+
signal_agent_completion() {
|
|
197
|
+
local confidence="$1"
|
|
198
|
+
local iteration="$2"
|
|
199
|
+
local deliverables="$3"
|
|
200
|
+
|
|
201
|
+
if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
|
|
202
|
+
# Store completion data
|
|
203
|
+
redis-cli HSET "frontend:task:${TASK_ID}:completion:${AGENT_ID}" \
|
|
204
|
+
"confidence" "$confidence" \
|
|
205
|
+
"iteration" "$iteration" \
|
|
206
|
+
"deliverables" "$deliverables" \
|
|
207
|
+
"completed_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
208
|
+
|
|
209
|
+
# Signal completion
|
|
210
|
+
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
211
|
+
|
|
212
|
+
# Report via coordination script
|
|
213
|
+
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh report \
|
|
214
|
+
--task-id "$TASK_ID" \
|
|
215
|
+
--agent-id "$AGENT_ID" \
|
|
216
|
+
--confidence "$confidence" \
|
|
217
|
+
--iteration "$iteration" \
|
|
218
|
+
--result "{\"deliverables\": \"${deliverables}\"}"
|
|
219
|
+
fi
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
# Validator consensus reporting
|
|
223
|
+
signal_validator_completion() {
|
|
224
|
+
local consensus_score="$1"
|
|
225
|
+
local validation_feedback="$2"
|
|
226
|
+
|
|
227
|
+
if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
|
|
228
|
+
# Store validator consensus
|
|
229
|
+
redis-cli HSET "frontend:task:${TASK_ID}:validator:${AGENT_ID}" \
|
|
230
|
+
"consensus_score" "$consensus_score" \
|
|
231
|
+
"feedback" "$validation_feedback" \
|
|
232
|
+
"validated_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
233
|
+
|
|
234
|
+
# Signal validation completion
|
|
235
|
+
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
236
|
+
|
|
237
|
+
# Report consensus
|
|
238
|
+
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh report \
|
|
239
|
+
--task-id "$TASK_ID" \
|
|
240
|
+
--agent-id "$AGENT_ID" \
|
|
241
|
+
--confidence "$consensus_score" \
|
|
242
|
+
--iteration "$CURRENT_ITERATION" \
|
|
243
|
+
--result "{\"consensus\": \"${consensus_score}\", \"feedback\": \"${validation_feedback}\"}"
|
|
244
|
+
fi
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
# Product Owner decision coordination
|
|
248
|
+
signal_product_owner_decision() {
|
|
249
|
+
local decision="$1"
|
|
250
|
+
local reasoning="$2"
|
|
251
|
+
|
|
252
|
+
if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
|
|
253
|
+
# Store PO decision
|
|
254
|
+
redis-cli HSET "frontend:task:${TASK_ID}:po-decision" \
|
|
255
|
+
"decision" "$decision" \
|
|
256
|
+
"reasoning" "$reasoning" \
|
|
257
|
+
"final_score" "$OVERALL_SCORE" \
|
|
258
|
+
"final_consensus" "$FINAL_CONSENSUS" \
|
|
259
|
+
"total_iterations" "$CURRENT_ITERATION" \
|
|
260
|
+
"decided_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
261
|
+
|
|
262
|
+
# Signal decision completion
|
|
263
|
+
redis-cli lpush "swarm:${TASK_ID}:product-owner:done" "$decision"
|
|
264
|
+
|
|
265
|
+
# Broadcast decision result
|
|
266
|
+
redis-cli PUBLISH "frontend:result:${TASK_ID}" "{\"decision\": \"$decision\", \"component\": \"$COMPONENT_NAME\"}"
|
|
267
|
+
fi
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Redis State Management
|
|
272
|
+
```bash
|
|
273
|
+
# Cleanup Redis data after completion
|
|
274
|
+
cleanup_frontend_coordination() {
|
|
275
|
+
if [ -n "${TASK_ID:-}" ]; then
|
|
276
|
+
echo "🧹 Cleaning up frontend coordination data..."
|
|
277
|
+
redis-cli DEL "frontend:task:${TASK_ID}:*" "swarm:${TASK_ID}:*"
|
|
278
|
+
echo "✅ Frontend coordination data cleaned up"
|
|
279
|
+
fi
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
# Restore coordination state (for recovery)
|
|
283
|
+
restore_frontend_coordination() {
|
|
284
|
+
if [ -n "${TASK_ID:-}" ]; then
|
|
285
|
+
echo "🔄 Restoring frontend coordination state..."
|
|
286
|
+
|
|
287
|
+
# Restore context
|
|
288
|
+
COMPONENT_NAME=$(redis-cli HGET "frontend:task:${TASK_ID}:context" "component_name")
|
|
289
|
+
CURRENT_ITERATION=$(redis-cli HGET "frontend:task:${TASK_ID}:context" "current_iteration")
|
|
290
|
+
MOCKUP_PATH=$(redis-cli GET "frontend:task:${TASK_ID}:mockup-path")
|
|
291
|
+
|
|
292
|
+
echo "✅ Restored: Component=${COMPONENT_NAME}, Iteration=${CURRENT_ITERATION}"
|
|
293
|
+
fi
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
# Store iteration results for audit trail
|
|
297
|
+
store_iteration_result() {
|
|
298
|
+
local iteration="$1"
|
|
299
|
+
local status="$2"
|
|
300
|
+
local score="$3"
|
|
301
|
+
local feedback="$4"
|
|
302
|
+
|
|
303
|
+
redis-cli HSET "frontend:task:${TASK_ID}:audit:${iteration}" \
|
|
304
|
+
"status" "$status" \
|
|
305
|
+
"score" "$score" \
|
|
306
|
+
"feedback" "$feedback" \
|
|
307
|
+
"timestamp" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
308
|
+
}
|
|
309
|
+
```
|
|
20
310
|
|
|
21
311
|
## Execution Flow
|
|
22
312
|
|
|
@@ -62,14 +352,15 @@ fs.writeFileSync('.claude/brand-guidelines.json', JSON.stringify(brandGuidelines
|
|
|
62
352
|
|
|
63
353
|
If brand guidelines provided, use those directly.
|
|
64
354
|
|
|
65
|
-
**Step 4: Store Context
|
|
355
|
+
**Step 4: Store Context for Agent Reference**
|
|
356
|
+
Store brand guidelines and context for agent coordination:
|
|
66
357
|
```bash
|
|
67
|
-
# Store
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
358
|
+
# Store brand guidelines for agent reference
|
|
359
|
+
echo "${BRAND_GUIDELINES}" > .claude/frontend-brand-guidelines.json
|
|
360
|
+
echo "${MOCKUP_PATH}" > .claude/frontend-mockup-path.txt
|
|
361
|
+
echo "${MODE}" > .claude/frontend-mode.txt
|
|
362
|
+
echo "${COMPONENT_NAME}" > .claude/frontend-component-name.txt
|
|
363
|
+
echo "85" > .claude/frontend-visual-threshold.txt
|
|
73
364
|
```
|
|
74
365
|
|
|
75
366
|
### Phase 1: Loop 3 - Implementation with Visual Context
|
|
@@ -208,9 +499,8 @@ if (overallScore >= 85) {
|
|
|
208
499
|
]
|
|
209
500
|
};
|
|
210
501
|
|
|
211
|
-
// Store feedback
|
|
212
|
-
|
|
213
|
-
"iteration_${iteration}" "$(echo "$visualFeedback" | jq -c .)"
|
|
502
|
+
// Store feedback for next iteration
|
|
503
|
+
echo "$visualFeedback" | jq -c . > .claude/frontend-feedback-iteration-${iteration}.json
|
|
214
504
|
}
|
|
215
505
|
```
|
|
216
506
|
|
|
@@ -221,6 +511,11 @@ if [ "$overallScore" -lt 85 ] && [ "$iteration" -lt "$MAX_ITERATIONS" ]; then
|
|
|
221
511
|
|
|
222
512
|
echo "Starting iteration $iteration with visual feedback..."
|
|
223
513
|
|
|
514
|
+
# Store iteration context for feedback
|
|
515
|
+
echo "$iteration" > .claude/frontend-current-iteration.txt
|
|
516
|
+
echo "$overallScore" > .claude/frontend-previous-score.txt
|
|
517
|
+
echo "$visualFeedback" | jq -c . > .claude/frontend-feedback.json
|
|
518
|
+
|
|
224
519
|
# Spawn fresh Loop 3 agents for next iteration with feedback
|
|
225
520
|
for agent in "${loop3Agents[@]}"; do
|
|
226
521
|
npx claude-flow-novice agent-spawn "$agent" \
|
|
@@ -242,6 +537,9 @@ EOF
|
|
|
242
537
|
# Repeat Phase 1 → Phase 2
|
|
243
538
|
else
|
|
244
539
|
echo "Visual validation complete or max iterations reached"
|
|
540
|
+
# Store completion metrics
|
|
541
|
+
echo "$overallScore" > .claude/frontend-final-score.txt
|
|
542
|
+
echo "$iteration" > .claude/frontend-total-iterations.txt
|
|
245
543
|
# Proceed to Phase 3
|
|
246
544
|
fi
|
|
247
545
|
```
|
|
@@ -292,12 +590,19 @@ wait "${VALIDATOR_PIDS[@]}"
|
|
|
292
590
|
```
|
|
293
591
|
|
|
294
592
|
**Collect Consensus:**
|
|
593
|
+
Gather validator feedback and calculate consensus score from their outputs:
|
|
295
594
|
```bash
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
595
|
+
# Store validator context for coordination
|
|
596
|
+
echo "${loop2Agents[@]}" | tr ' ' ',' > .claude/frontend-validators.txt
|
|
597
|
+
echo "$(date +%s)" > .claude/frontend-validation-start.txt
|
|
598
|
+
|
|
599
|
+
# Collect validator outputs and calculate consensus
|
|
600
|
+
CONSENSUS_SCORE=$(calculate-consensus-from-outputs.sh "${VALIDATOR_OUTPUTS[@]}")
|
|
601
|
+
echo "Loop 2 consensus: $CONSENSUS_SCORE"
|
|
299
602
|
|
|
300
|
-
|
|
603
|
+
# Store consensus result
|
|
604
|
+
echo "$CONSENSUS_SCORE" > .claude/frontend-consensus-score.txt
|
|
605
|
+
echo "true" > .claude/frontend-validation-complete.txt
|
|
301
606
|
```
|
|
302
607
|
|
|
303
608
|
### Phase 4: Loop 4 - Product Owner Decision
|
|
@@ -318,7 +623,7 @@ Deliverables:
|
|
|
318
623
|
$(git diff --name-only HEAD | grep -E '\.(tsx?|jsx?|css)$')
|
|
319
624
|
|
|
320
625
|
Validation results:
|
|
321
|
-
$(
|
|
626
|
+
$(cat .claude/frontend-validation-results.json 2>/dev/null || echo "Validation results pending")
|
|
322
627
|
|
|
323
628
|
DECISION CRITERIA:
|
|
324
629
|
- Visual + interaction score ≥85%
|
|
@@ -339,6 +644,13 @@ EOF
|
|
|
339
644
|
DECISION=$(./.claude/skills/cfn-product-owner-decision/parse-decision.sh \
|
|
340
645
|
--output "$PO_OUTPUT")
|
|
341
646
|
|
|
647
|
+
# Store decision for coordination
|
|
648
|
+
echo "$DECISION" > .claude/frontend-decision.txt
|
|
649
|
+
echo "$(date +%s)" > .claude/frontend-decision-time.txt
|
|
650
|
+
echo "$overallScore" > .claude/frontend-final-score.txt
|
|
651
|
+
echo "$CONSENSUS" > .claude/frontend-final-consensus.txt
|
|
652
|
+
echo "$iteration" > .claude/frontend-final-iterations.txt
|
|
653
|
+
|
|
342
654
|
if [ "$DECISION" = "PROCEED" ]; then
|
|
343
655
|
echo "✅ Product Owner approved - committing changes"
|
|
344
656
|
|
|
@@ -361,6 +673,11 @@ Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
|
361
673
|
|
|
362
674
|
git push origin main
|
|
363
675
|
|
|
676
|
+
# Mark completion status
|
|
677
|
+
echo "complete" > .claude/frontend-status.txt
|
|
678
|
+
echo "$(date +%s)" > .claude/frontend-completion-time.txt
|
|
679
|
+
echo "$(git rev-parse HEAD)" > .claude/frontend-git-commit.txt
|
|
680
|
+
|
|
364
681
|
# Generate component documentation
|
|
365
682
|
cat > "docs/${COMPONENT_NAME}_IMPLEMENTATION.md" <<EOF
|
|
366
683
|
# ${COMPONENT_NAME} Implementation
|
|
@@ -390,6 +707,7 @@ elif [ "$DECISION" = "ITERATE" ]; then
|
|
|
390
707
|
|
|
391
708
|
if [ "$iteration" -ge "$MAX_ITERATIONS" ]; then
|
|
392
709
|
echo "❌ Max iterations reached, aborting"
|
|
710
|
+
echo "aborted_max_iterations" > .claude/frontend-status.txt
|
|
393
711
|
exit 1
|
|
394
712
|
fi
|
|
395
713
|
|
|
@@ -398,6 +716,7 @@ elif [ "$DECISION" = "ITERATE" ]; then
|
|
|
398
716
|
|
|
399
717
|
else
|
|
400
718
|
echo "❌ Product Owner aborted"
|
|
719
|
+
echo "aborted_by_product_owner" > .claude/frontend-status.txt
|
|
401
720
|
exit 1
|
|
402
721
|
fi
|
|
403
722
|
```
|
|
@@ -407,13 +726,12 @@ fi
|
|
|
407
726
|
**You MUST use the orchestrator script for dependency enforcement:**
|
|
408
727
|
|
|
409
728
|
```bash
|
|
410
|
-
# Store all context
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
"taskDescription" "${TASK_DESCRIPTION}"
|
|
729
|
+
# Store all context for orchestrator
|
|
730
|
+
echo "${MOCKUP_PATH}" > .claude/frontend-mockup-path.txt
|
|
731
|
+
cat .claude/brand-guidelines.json > .claude/frontend-brand-guidelines.json
|
|
732
|
+
echo "85" > .claude/frontend-visual-threshold.txt
|
|
733
|
+
echo "${COMPONENT_NAME}" > .claude/frontend-component-name.txt
|
|
734
|
+
echo "${TASK_DESCRIPTION}" > .claude/frontend-task-description.txt
|
|
417
735
|
|
|
418
736
|
# Invoke orchestrator (handles all spawning + dependency coordination)
|
|
419
737
|
./.claude/skills/cfn-loop-orchestration/cfn-orchestrate.sh \
|
|
@@ -485,7 +803,7 @@ Return structured JSON result:
|
|
|
485
803
|
- **Playwright**: Screenshot capture, video recording, E2E tests
|
|
486
804
|
- **Image analysis**: `mcp__zai-mcp-server__analyze_image`
|
|
487
805
|
- **Video analysis**: `mcp__zai-mcp-server__analyze_video`
|
|
488
|
-
- **
|
|
806
|
+
- **File coordination**: Context storage in `.claude/` directory
|
|
489
807
|
- **Git**: Automated commit with visual metrics
|
|
490
808
|
|
|
491
809
|
## Configuration
|
|
@@ -528,9 +846,31 @@ if ! command -v playwright &> /dev/null; then
|
|
|
528
846
|
fi
|
|
529
847
|
```
|
|
530
848
|
|
|
849
|
+
## Task Completion Protocol
|
|
850
|
+
|
|
851
|
+
Complete your frontend coordination work and provide a structured response with:
|
|
852
|
+
|
|
853
|
+
1. **Confidence Score** (0.0-1.0) - Self-assessment of coordination quality
|
|
854
|
+
2. **Summary** - Brief overview of frontend implementation coordination
|
|
855
|
+
3. **Deliverables** - List of components and files created
|
|
856
|
+
4. **Status** - COMPLETE or NEEDS_WORK with specific issues
|
|
857
|
+
|
|
858
|
+
**Example Output:**
|
|
859
|
+
```
|
|
860
|
+
Confidence: 0.92
|
|
861
|
+
Status: COMPLETE
|
|
862
|
+
Summary: Coordinated frontend implementation with visual validation workflow
|
|
863
|
+
Deliverables:
|
|
864
|
+
- src/components/LoginForm.tsx
|
|
865
|
+
- tests/frontend/LoginForm.test.tsx
|
|
866
|
+
- docs/LoginForm_IMPLEMENTATION.md
|
|
867
|
+
- visual-validation-report.json
|
|
868
|
+
```
|
|
869
|
+
|
|
531
870
|
## Related Documentation
|
|
532
871
|
|
|
533
872
|
- Guide: `.claude/commands/cfn/CFN_LOOP_FRONTEND.md`
|
|
534
873
|
- Task Mode Guide: `.claude/commands/cfn/CFN_LOOP_TASK_MODE.md`
|
|
535
874
|
- Coordinator Parameters: `.claude/commands/cfn/CFN_COORDINATOR_PARAMETERS.md`
|
|
536
875
|
- Standard CFN Loop: `.claude/commands/cfn/cfn-loop.md`
|
|
876
|
+
- Agent Coordination: Dynamic coordination layer
|