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
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-seo-specialist
|
|
3
|
+
description: SEO-ONLY AGENT - MUST BE USED for technical SEO tasks exclusively. NO general coding or development work. Focuses on search engine optimization: audits, crawl errors, Core Web Vitals, schema markup, sitemaps, robots.txt. Use PROACTIVELY for site performance optimization (SEO-related), structured data validation, crawl budget optimization. Keywords - technical SEO audit, crawl errors, Core Web Vitals, schema markup, XML sitemap, robots.txt, page speed SEO, site architecture SEO
|
|
4
|
+
tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
|
|
5
|
+
model: haiku
|
|
6
|
+
type: specialist
|
|
7
|
+
acl_level: 1
|
|
8
|
+
capabilities: [technical-seo, performance-optimization, schema-markup, crawl-management, site-architecture]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Technical SEO Specialist
|
|
12
|
+
|
|
13
|
+
You are a **technical SEO expert** focused exclusively on search engine optimization. Your role is to improve website visibility and ranking through technical optimization, NOT general web development or coding. You specialize in site infrastructure for SEO, performance optimization for search rankings, and crawlability for search engines.
|
|
14
|
+
|
|
15
|
+
## Core Responsibilities
|
|
16
|
+
|
|
17
|
+
1. **Site Audits**
|
|
18
|
+
- Crawl site using Screaming Frog data
|
|
19
|
+
- Identify broken links, redirect chains, 404 errors
|
|
20
|
+
- Analyze page load times and Core Web Vitals
|
|
21
|
+
- Check mobile usability and responsive design
|
|
22
|
+
|
|
23
|
+
2. **Performance Optimization**
|
|
24
|
+
- Optimize images (compression, lazy loading, WebP conversion)
|
|
25
|
+
- Implement caching strategies
|
|
26
|
+
- Minimize JavaScript/CSS bloat
|
|
27
|
+
- Improve Largest Contentful Paint (LCP), First Input Delay (FID), Cumulative Layout Shift (CLS)
|
|
28
|
+
|
|
29
|
+
3. **Schema Markup Implementation**
|
|
30
|
+
- Generate JSON-LD structured data
|
|
31
|
+
- Validate schema using Google Rich Results Test
|
|
32
|
+
- Implement VideoObject, HowTo, Dataset, FAQ schemas
|
|
33
|
+
- Ensure schema aligns with Schema.org specifications
|
|
34
|
+
|
|
35
|
+
4. **Crawl Management**
|
|
36
|
+
- Configure robots.txt for optimal crawl budget
|
|
37
|
+
- Generate and validate XML sitemaps
|
|
38
|
+
- Implement canonical tags to prevent duplicate content
|
|
39
|
+
- Fix crawl errors reported in Google Search Console
|
|
40
|
+
|
|
41
|
+
5. **Site Architecture**
|
|
42
|
+
- Optimize URL structure (clean, descriptive URLs)
|
|
43
|
+
- Implement breadcrumb navigation
|
|
44
|
+
- Ensure logical internal linking hierarchy
|
|
45
|
+
- Validate hreflang tags for international SEO
|
|
46
|
+
|
|
47
|
+
## Trigger Keywords
|
|
48
|
+
- technical audit
|
|
49
|
+
- crawl errors
|
|
50
|
+
- Core Web Vitals
|
|
51
|
+
- schema markup
|
|
52
|
+
- sitemap generation
|
|
53
|
+
- robots.txt
|
|
54
|
+
- page speed optimization
|
|
55
|
+
- 404 errors
|
|
56
|
+
- redirect chains
|
|
57
|
+
- canonical tags
|
|
58
|
+
- site architecture
|
|
59
|
+
|
|
60
|
+
## Specialization Areas
|
|
61
|
+
|
|
62
|
+
### Screaming Frog Analysis
|
|
63
|
+
- Parse Screaming Frog CSV exports
|
|
64
|
+
- Identify critical technical issues (5xx errors, orphaned pages, thin content)
|
|
65
|
+
- Generate prioritized fix lists based on impact
|
|
66
|
+
|
|
67
|
+
### PageSpeed Insights Integration
|
|
68
|
+
- Query PageSpeed Insights API for performance metrics
|
|
69
|
+
- Analyze field data (CrUX) vs lab data (Lighthouse)
|
|
70
|
+
- Generate actionable recommendations with confidence scores
|
|
71
|
+
|
|
72
|
+
### Google Search Console Integration
|
|
73
|
+
- Parse GSC API responses for crawl errors
|
|
74
|
+
- Monitor index coverage issues
|
|
75
|
+
- Track Core Web Vitals trends
|
|
76
|
+
|
|
77
|
+
### n8n Workflow Automation
|
|
78
|
+
- Trigger automated audits via n8n webhooks
|
|
79
|
+
- Schedule weekly performance checks
|
|
80
|
+
- Alert on critical issues (sudden traffic drops, crawl errors)
|
|
81
|
+
|
|
82
|
+
## Integration Points
|
|
83
|
+
|
|
84
|
+
**APIs:**
|
|
85
|
+
- PageSpeed Insights API (Core Web Vitals, performance scores)
|
|
86
|
+
- Google Search Console API (crawl errors, index coverage)
|
|
87
|
+
- Schema.org validation API
|
|
88
|
+
|
|
89
|
+
**Services:**
|
|
90
|
+
- n8n workflows (automated audit triggers)
|
|
91
|
+
- PostgreSQL (store audit history)
|
|
92
|
+
- Performance metrics caching
|
|
93
|
+
|
|
94
|
+
**External Tools:**
|
|
95
|
+
- Screaming Frog (crawl data exports)
|
|
96
|
+
- Google Rich Results Test (schema validation)
|
|
97
|
+
- WebPageTest (advanced performance analysis)
|
|
98
|
+
|
|
99
|
+
## Workflow
|
|
100
|
+
|
|
101
|
+
1. **Audit Initiation** (TodoWrite)
|
|
102
|
+
- Define audit scope (full site vs specific sections)
|
|
103
|
+
- Identify critical pages (high traffic, conversion paths)
|
|
104
|
+
|
|
105
|
+
2. **Data Collection** (Bash, Grep)
|
|
106
|
+
- Parse Screaming Frog exports
|
|
107
|
+
- Query PageSpeed Insights API
|
|
108
|
+
- Fetch GSC crawl error reports
|
|
109
|
+
|
|
110
|
+
3. **Issue Analysis** (Read, Grep, Glob)
|
|
111
|
+
- Categorize issues by severity (critical, high, medium, low)
|
|
112
|
+
- Identify patterns (e.g., all blog posts missing schema)
|
|
113
|
+
|
|
114
|
+
4. **Implementation** (Write, Edit)
|
|
115
|
+
- Fix robots.txt blocking issues
|
|
116
|
+
- Generate XML sitemaps
|
|
117
|
+
- Implement schema markup
|
|
118
|
+
- Optimize images and scripts
|
|
119
|
+
|
|
120
|
+
5. **Validation** (Bash)
|
|
121
|
+
- Re-run PageSpeed Insights
|
|
122
|
+
- Validate schema using Google Rich Results Test
|
|
123
|
+
- Verify sitemap accessibility
|
|
124
|
+
|
|
125
|
+
## Success Criteria
|
|
126
|
+
|
|
127
|
+
- Core Web Vitals pass thresholds (LCP <2.5s, FID <100ms, CLS <0.1)
|
|
128
|
+
- Zero critical crawl errors (5xx, orphaned pages)
|
|
129
|
+
- All priority pages have valid schema markup
|
|
130
|
+
- Page speed score improvement ≥20 points
|
|
131
|
+
- Sitemap coverage ≥95% of indexable pages
|
|
132
|
+
- Confidence score ≥0.85
|
|
133
|
+
|
|
134
|
+
## Output Format
|
|
135
|
+
|
|
136
|
+
**Technical Audit Report:**
|
|
137
|
+
```markdown
|
|
138
|
+
# Technical SEO Audit - [Site/Section Name]
|
|
139
|
+
|
|
140
|
+
## Executive Summary
|
|
141
|
+
- Overall Health Score: [0-100]
|
|
142
|
+
- Critical Issues: [count]
|
|
143
|
+
- High Priority Issues: [count]
|
|
144
|
+
- Confidence Score: [0.0-1.0]
|
|
145
|
+
|
|
146
|
+
## Core Web Vitals
|
|
147
|
+
| Metric | Current | Target | Status |
|
|
148
|
+
|--------|---------|--------|--------|
|
|
149
|
+
| LCP | 2.8s | <2.5s | ⚠️ Needs Work |
|
|
150
|
+
| FID | 45ms | <100ms | ✅ Pass |
|
|
151
|
+
| CLS | 0.15 | <0.1 | ⚠️ Needs Work |
|
|
152
|
+
|
|
153
|
+
## Critical Issues (Fix Immediately)
|
|
154
|
+
1. [Issue description]
|
|
155
|
+
- Impact: [traffic/rankings/user experience]
|
|
156
|
+
- Location: [URL or file path]
|
|
157
|
+
- Fix: [specific action]
|
|
158
|
+
- Priority: CRITICAL
|
|
159
|
+
|
|
160
|
+
## High Priority Issues
|
|
161
|
+
1. [Issue description]
|
|
162
|
+
- Impact: [impact assessment]
|
|
163
|
+
- Fix: [specific action]
|
|
164
|
+
- Priority: HIGH
|
|
165
|
+
|
|
166
|
+
## Schema Markup Status
|
|
167
|
+
- Pages with schema: [count / total]
|
|
168
|
+
- Schema types implemented: [VideoObject, HowTo, etc.]
|
|
169
|
+
- Validation errors: [count]
|
|
170
|
+
|
|
171
|
+
## Recommendations
|
|
172
|
+
1. [Recommendation with implementation steps]
|
|
173
|
+
2. [Recommendation with implementation steps]
|
|
174
|
+
|
|
175
|
+
## Next Steps
|
|
176
|
+
- [Action item 1]
|
|
177
|
+
- [Action item 2]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Example Prompts
|
|
181
|
+
|
|
182
|
+
1. "Conduct technical SEO audit for OurStories homepage and identify top 5 critical issues"
|
|
183
|
+
2. "Optimize Core Web Vitals for /stories/* pages - target LCP <2.5s"
|
|
184
|
+
3. "Generate XML sitemap for all published stories and memory pages"
|
|
185
|
+
4. "Implement VideoObject schema markup for story video pages"
|
|
186
|
+
5. "Fix robots.txt to allow crawling of /api/stories endpoint"
|
|
187
|
+
6. "Analyze Screaming Frog export and prioritize technical fixes"
|
|
188
|
+
|
|
189
|
+
## Constraints
|
|
190
|
+
|
|
191
|
+
- **SEO-ONLY ROLE** - NO general web development, backend coding, or feature implementation
|
|
192
|
+
- Focus ONLY on technical infrastructure for SEO and search engine crawlability
|
|
193
|
+
- Delegate content optimization to content-seo-strategist
|
|
194
|
+
- Delegate programmatic page generation to programmatic-seo-engineer
|
|
195
|
+
- Delegate schema design (complex multi-type) to schema-markup-engineer
|
|
196
|
+
- Delegate general coding tasks to backend-developer or frontend-engineer
|
|
197
|
+
- Maximum audit scope: 10,000 pages per run (use sampling for larger sites)
|
|
198
|
+
- Always provide confidence score with technical SEO recommendations
|
|
199
|
+
|
|
200
|
+
## CFN Loop Completion Protocol
|
|
201
|
+
|
|
202
|
+
When participating in CFN Loop workflows, complete your work and report confidence score. Coordination will be handled automatically by the orchestrator.
|
|
203
|
+
|
|
204
|
+
**Confidence Scoring Criteria:**
|
|
205
|
+
- 0.90+: All Core Web Vitals pass, zero critical errors, schema validated
|
|
206
|
+
- 0.75-0.89: Minor performance issues remain, schema implementation incomplete
|
|
207
|
+
- 0.60-0.74: Significant technical debt identified, complex fixes required
|
|
208
|
+
- <0.60: Critical infrastructure issues blocking indexing or user experience
|
|
@@ -6,17 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
Task Mode: Main Chat coordinates directly and spawns agents via Task() tool with full context injection and visibility. NO coordinator agent is used.
|
|
10
|
-
|
|
11
|
-
| Aspect | Task Mode | CLI Mode |
|
|
12
|
-
|--------|-----------|----------|
|
|
13
|
-
| **Spawning** | Main Chat directly via Task() | Coordinator via npx CLI |
|
|
14
|
-
| **Visibility** | Full transparency in Main Chat | Background, Redis logs |
|
|
15
|
-
| **Provider** | All Anthropic | CLI uses Z.ai routing |
|
|
16
|
-
| **Cost** | ~$0.150/iteration | ~$0.054/iteration (64% savings) |
|
|
17
|
-
| **Use Case** | Debugging, prototyping, learning | Production, cost optimization |
|
|
18
|
-
| **ACE Reflection** | Optional via `--ace-reflect` flag | Always enabled |
|
|
19
|
-
|
|
20
9
|
### ACE Reflection Flag
|
|
21
10
|
|
|
22
11
|
```bash
|
|
@@ -35,6 +24,106 @@ Task Mode: Main Chat coordinates directly and spawns agents via Task() tool with
|
|
|
35
24
|
|
|
36
25
|
---
|
|
37
26
|
|
|
27
|
+
## ANTI-023 Memory Leak Protection (v2.14.28)
|
|
28
|
+
|
|
29
|
+
**Critical Fix**: Prevents Task Mode agents from executing CLI coordination scripts that cause memory leaks.
|
|
30
|
+
|
|
31
|
+
### Defense System
|
|
32
|
+
|
|
33
|
+
#### Layer 1: Agent Documentation
|
|
34
|
+
**Task Mode agents use mode-specific completion protocols:**
|
|
35
|
+
```markdown
|
|
36
|
+
## ⚠️ CRITICAL: Mode-Specific Completion Protocol
|
|
37
|
+
|
|
38
|
+
**Task Mode (95%):** Spawned via `Task("agent", "...")` in Main Chat
|
|
39
|
+
- Return structured JSON output directly
|
|
40
|
+
- ❌ DO NOT: Use Redis commands, bash scripts, CLI tools
|
|
41
|
+
- ✅ Main Chat receives output automatically
|
|
42
|
+
|
|
43
|
+
**CLI Mode (5%):** Spawned via `npx claude-flow-novice agent-spawn`
|
|
44
|
+
- Use Redis signals and completion scripts
|
|
45
|
+
- ✅ CLI coordination allowed
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
### Memory Impact Resolution
|
|
51
|
+
- **Before Fix**: Up to 23GB memory consumption per hanging agent
|
|
52
|
+
- **After Fix**: <100MB normal usage with complete audit trails
|
|
53
|
+
- **Detection Logic**: Environment variable presence indicates spawn mode
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Audit Trail Architecture (New v2.14.28)
|
|
58
|
+
|
|
59
|
+
### Dual-Mode Storage System
|
|
60
|
+
|
|
61
|
+
**Design Principle**: Both Task Mode and CLI Mode create complete audit trails for compliance and debugging.
|
|
62
|
+
|
|
63
|
+
#### Task Mode Storage (Main Chat Managed)
|
|
64
|
+
```bash
|
|
65
|
+
# After Task Mode agent completion, Main Chat stores audit data
|
|
66
|
+
./.claude/skills/cfn-task-audit/store-task-audit.sh \
|
|
67
|
+
--task-id "$TASK_ID" \
|
|
68
|
+
--agent-type "$AGENT_TYPE" \
|
|
69
|
+
--output "$AGENT_OUTPUT" \
|
|
70
|
+
--mode "Task"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Storage Locations:**
|
|
74
|
+
- **Redis**: Fast access (`swarm:${TASK_ID}:${AGENT_TYPE}:audit`)
|
|
75
|
+
- **SQLite**: Permanent audit trail (`agent_audit` table)
|
|
76
|
+
- **Files**: Structured logs (`.claude/logs/task-audit/`)
|
|
77
|
+
|
|
78
|
+
#### CLI Mode Storage (Agent Managed)
|
|
79
|
+
```bash
|
|
80
|
+
# CLI agents continue using existing Redis coordination
|
|
81
|
+
redis-cli HSET "swarm:${TASK_ID}:${AGENT_ID}:result" \
|
|
82
|
+
"decision" "$DECISION" \
|
|
83
|
+
"mode" "CLI"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Combined Audit Retrieval
|
|
87
|
+
```bash
|
|
88
|
+
# Retrieve complete audit trail from both modes
|
|
89
|
+
get-audit-data.sh --task-id "$TASK_ID" --mode "combined"
|
|
90
|
+
|
|
91
|
+
# Returns unified decision data:
|
|
92
|
+
{
|
|
93
|
+
"task_mode_data": [...],
|
|
94
|
+
"cli_mode_data": [...],
|
|
95
|
+
"complete_audit_trail": true,
|
|
96
|
+
"execution_summary": {...}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Audit Data Structure
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"task_id": "task-123",
|
|
104
|
+
"agent_type": "reviewer",
|
|
105
|
+
"decision": "PROCEED",
|
|
106
|
+
"reasoning": "Code meets quality standards",
|
|
107
|
+
"confidence": 0.92,
|
|
108
|
+
"mode": "Task|CLI",
|
|
109
|
+
"deliverables": ["file.ts", "test.ts"],
|
|
110
|
+
"timestamp": "2025-11-06T15:30:00Z",
|
|
111
|
+
"metadata": {
|
|
112
|
+
"stored_via": "store-task-audit.sh",
|
|
113
|
+
"version": "1.0.0"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Benefits
|
|
119
|
+
- **✅ Complete Coverage**: Both execution modes fully audited
|
|
120
|
+
- **✅ Memory Safe**: ANTI-023 protection maintained
|
|
121
|
+
- **✅ Compliance Ready**: Full audit trail for enterprise requirements
|
|
122
|
+
- **✅ Debugging Support**: Replay capability for complex issues
|
|
123
|
+
- **✅ Performance**: Fast Redis access + persistent SQLite storage
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
38
127
|
## Agent Specialization
|
|
39
128
|
|
|
40
129
|
### Loop 3 (Implementation)
|
|
@@ -15,6 +15,6 @@ Check `.cfn-mode.json` or run `/cfn-mode status`
|
|
|
15
15
|
|
|
16
16
|
**Mode Details:**
|
|
17
17
|
- **CLI Mode**: Coordinator → orchestrator → CLI agents (Z.ai routing)
|
|
18
|
-
- **Task Mode**: Coordinator → JSON → Main Chat spawns Task() agents (Anthropic)
|
|
18
|
+
- **Task Mode**: main chat is Coordinator → JSON → Main Chat spawns Task() agents (Anthropic)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Only CLI mode use Redis context storage for swarm recovery.
|
|
@@ -5,6 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
set -euo pipefail
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
# ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Environment Sanitization
|
|
10
|
+
# Load and apply environment sanitization to prevent memory leaks
|
|
11
|
+
# shellcheck source=../cfn-environment-sanitization/sanitize-environment.sh
|
|
12
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
13
|
+
if [[ -f "$SCRIPT_DIR/../cfn-environment-sanitization/sanitize-environment.sh" ]]; then
|
|
14
|
+
source "$SCRIPT_DIR/../cfn-environment-sanitization/sanitize-environment.sh" --strict
|
|
15
|
+
echo "✅ Agent spawning environment sanitized" >&2
|
|
16
|
+
else
|
|
17
|
+
echo "⚠️ Environment sanitization not available - proceeding without protection" >&2
|
|
18
|
+
fi
|
|
19
|
+
|
|
8
20
|
# ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
|
|
9
21
|
# Task Mode agents spawn via Task() tool and should NOT use agent spawning CLI
|
|
10
22
|
if [[ -z "${1:-}" || -z "${TASK_ID:-}" ]]; then
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Agent Spawning CLI Wrapper
|
|
4
|
+
# Enables agents to spawn other agents or stop existing agents via simple CLI interface
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
|
|
9
|
+
# Task Mode agents spawn via Task() tool and should NOT use agent spawning CLI
|
|
10
|
+
if [[ -z "${1:-}" || -z "${TASK_ID:-}" ]]; then
|
|
11
|
+
echo "❌ TASK MODE DETECTED - Agent spawning CLI forbidden" >&2
|
|
12
|
+
echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
|
|
13
|
+
echo "💡 Task Mode agent spawning should be handled directly by Main Chat" >&2
|
|
14
|
+
echo "🔧 Agent spawned via Task() tool - use Task() tool for spawning instead" >&2
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# ============================================================================
|
|
19
|
+
# LOGGING FUNCTIONS
|
|
20
|
+
# ============================================================================
|
|
21
|
+
log_error() {
|
|
22
|
+
echo "[ERROR] $*" >&2
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
log_warning() {
|
|
26
|
+
echo "[WARNING] $*" >&2
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
log_info() {
|
|
30
|
+
echo "[INFO] $*"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# ============================================================================
|
|
34
|
+
# DEPENDENCY CHECKS
|
|
35
|
+
# ============================================================================
|
|
36
|
+
|
|
37
|
+
check_dependencies() {
|
|
38
|
+
local missing_deps=()
|
|
39
|
+
|
|
40
|
+
# Check bash version
|
|
41
|
+
if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then
|
|
42
|
+
missing_deps+=("bash>=4.0")
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Check required command-line tools
|
|
46
|
+
local required_tools=("npx" "node" "grep" "sed")
|
|
47
|
+
for tool in "${required_tools[@]}"; do
|
|
48
|
+
if ! command -v "$tool" &> /dev/null; then
|
|
49
|
+
missing_deps+=("$tool")
|
|
50
|
+
fi
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
# Check required Node.js modules
|
|
54
|
+
local node_modules=(
|
|
55
|
+
"redis"
|
|
56
|
+
"dotenv"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
for module in "${node_modules[@]}"; do
|
|
60
|
+
if [[ ! -d "node_modules/$module" ]]; then
|
|
61
|
+
missing_deps+=("$module")
|
|
62
|
+
fi
|
|
63
|
+
done
|
|
64
|
+
|
|
65
|
+
# Specific Claude Flow dependencies
|
|
66
|
+
local claude_deps=(
|
|
67
|
+
"Task tool"
|
|
68
|
+
"session-manager.js"
|
|
69
|
+
"redis-coordination scripts"
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Use current directory as PROJECT_ROOT if not set
|
|
73
|
+
PROJECT_ROOT="${PROJECT_ROOT:-$(pwd)}"
|
|
74
|
+
|
|
75
|
+
for dep in "${claude_deps[@]}"; do
|
|
76
|
+
if [[ ! -d "$PROJECT_ROOT/.claude" ]]; then
|
|
77
|
+
missing_deps+=("$dep")
|
|
78
|
+
fi
|
|
79
|
+
done
|
|
80
|
+
|
|
81
|
+
# Report missing dependencies
|
|
82
|
+
if [[ ${#missing_deps[@]} -gt 0 ]]; then
|
|
83
|
+
log_error "Missing Dependencies:"
|
|
84
|
+
for dep in "${missing_deps[@]}"; do
|
|
85
|
+
echo " - $dep"
|
|
86
|
+
done
|
|
87
|
+
|
|
88
|
+
log_warning "Recommended Installation:"
|
|
89
|
+
echo " 1. Install Node.js and npm (latest LTS version)"
|
|
90
|
+
echo " 2. Run: npm install redis dotenv"
|
|
91
|
+
echo " 3. Clone Claude Flow Novice repository"
|
|
92
|
+
|
|
93
|
+
exit 1
|
|
94
|
+
fi
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
# ============================================================================
|
|
98
|
+
# AGENT SPAWNING FUNCTIONS
|
|
99
|
+
# ============================================================================
|
|
100
|
+
|
|
101
|
+
# Spawn agents via CLI
|
|
102
|
+
spawn_agents() {
|
|
103
|
+
local task="$1"
|
|
104
|
+
local agents="$2"
|
|
105
|
+
local agent_id="${3:-main}"
|
|
106
|
+
local provider="${4:-zai}"
|
|
107
|
+
local redis_channel="${5:-}"
|
|
108
|
+
|
|
109
|
+
log_info "Spawning agents: $agents"
|
|
110
|
+
log_info "Task: $task"
|
|
111
|
+
|
|
112
|
+
# Build spawn command
|
|
113
|
+
local spawn_cmd="npx claude-flow-spawn \"$task\" --agents=$agents --provider=$provider"
|
|
114
|
+
|
|
115
|
+
# Add optional Redis channel
|
|
116
|
+
if [[ -n "$redis_channel" ]]; then
|
|
117
|
+
spawn_cmd="$spawn_cmd --redis-channel=$redis_channel"
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
# Execute spawn
|
|
121
|
+
eval "$spawn_cmd"
|
|
122
|
+
local exit_code=$?
|
|
123
|
+
|
|
124
|
+
if [[ $exit_code -eq 0 ]]; then
|
|
125
|
+
log_info "Agents spawned successfully"
|
|
126
|
+
else
|
|
127
|
+
log_error "Failed to spawn agents (exit code: $exit_code)"
|
|
128
|
+
exit $exit_code
|
|
129
|
+
fi
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
# Stop agent by task ID
|
|
133
|
+
stop_agent() {
|
|
134
|
+
local task_id="$1"
|
|
135
|
+
|
|
136
|
+
log_info "Stopping agent: $task_id"
|
|
137
|
+
npx claude-flow-spawn --stop="$task_id"
|
|
138
|
+
|
|
139
|
+
if [[ $? -eq 0 ]]; then
|
|
140
|
+
log_info "Agent stopped successfully"
|
|
141
|
+
else
|
|
142
|
+
log_error "Failed to stop agent"
|
|
143
|
+
exit 1
|
|
144
|
+
fi
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
# Stop all agents
|
|
148
|
+
stop_all_agents() {
|
|
149
|
+
log_info "Stopping all agents"
|
|
150
|
+
npx claude-flow-spawn --stop-all
|
|
151
|
+
|
|
152
|
+
if [[ $? -eq 0 ]]; then
|
|
153
|
+
log_info "All agents stopped"
|
|
154
|
+
else
|
|
155
|
+
log_error "Failed to stop all agents"
|
|
156
|
+
exit 1
|
|
157
|
+
fi
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
# Configuration handler function
|
|
161
|
+
handle_config() {
|
|
162
|
+
local action="$1"
|
|
163
|
+
local key="${2:-}"
|
|
164
|
+
local value="${3:-}"
|
|
165
|
+
|
|
166
|
+
case "$action" in
|
|
167
|
+
list)
|
|
168
|
+
# Placeholder: List configuration (modify as needed)
|
|
169
|
+
echo "redis_host=localhost"
|
|
170
|
+
echo "redis_port=6379"
|
|
171
|
+
;;
|
|
172
|
+
get)
|
|
173
|
+
# Placeholder: Return config value (modify as needed)
|
|
174
|
+
case "$key" in
|
|
175
|
+
redis_host)
|
|
176
|
+
echo "localhost"
|
|
177
|
+
;;
|
|
178
|
+
*)
|
|
179
|
+
log_error "Unknown config key: $key"
|
|
180
|
+
exit 1
|
|
181
|
+
;;
|
|
182
|
+
esac
|
|
183
|
+
;;
|
|
184
|
+
set)
|
|
185
|
+
# Placeholder: Set config value (modify as needed)
|
|
186
|
+
log_info "Setting $key to $value"
|
|
187
|
+
;;
|
|
188
|
+
*)
|
|
189
|
+
log_error "Invalid config action: $action"
|
|
190
|
+
exit 1
|
|
191
|
+
;;
|
|
192
|
+
esac
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
# Main function to include dependency check and argument parsing
|
|
196
|
+
main() {
|
|
197
|
+
check_dependencies # Dependency check before processing
|
|
198
|
+
|
|
199
|
+
# Parse arguments
|
|
200
|
+
case "${1:-}" in
|
|
201
|
+
--check-dependencies)
|
|
202
|
+
log_info "Dependencies checked successfully"
|
|
203
|
+
;;
|
|
204
|
+
--config)
|
|
205
|
+
shift
|
|
206
|
+
handle_config "$@"
|
|
207
|
+
;;
|
|
208
|
+
--task)
|
|
209
|
+
shift
|
|
210
|
+
local task="$1"
|
|
211
|
+
shift
|
|
212
|
+
local agents=""
|
|
213
|
+
local agent_id="main"
|
|
214
|
+
local provider="zai"
|
|
215
|
+
local redis_channel=""
|
|
216
|
+
|
|
217
|
+
# Parse remaining arguments
|
|
218
|
+
while [[ $# -gt 0 ]]; do
|
|
219
|
+
case "$1" in
|
|
220
|
+
--agents)
|
|
221
|
+
agents="$2"
|
|
222
|
+
shift 2
|
|
223
|
+
;;
|
|
224
|
+
--agent-id)
|
|
225
|
+
agent_id="$2"
|
|
226
|
+
shift 2
|
|
227
|
+
;;
|
|
228
|
+
--provider)
|
|
229
|
+
provider="$2"
|
|
230
|
+
shift 2
|
|
231
|
+
;;
|
|
232
|
+
--redis-channel)
|
|
233
|
+
redis_channel="$2"
|
|
234
|
+
shift 2
|
|
235
|
+
;;
|
|
236
|
+
*)
|
|
237
|
+
log_error "Unknown argument: $1"
|
|
238
|
+
exit 1
|
|
239
|
+
;;
|
|
240
|
+
esac
|
|
241
|
+
done
|
|
242
|
+
|
|
243
|
+
# Validate required arguments
|
|
244
|
+
if [[ -z "$task" ]] || [[ -z "$agents" ]]; then
|
|
245
|
+
log_error "Missing required arguments: --task and --agents"
|
|
246
|
+
exit 1
|
|
247
|
+
fi
|
|
248
|
+
|
|
249
|
+
# Spawn agents
|
|
250
|
+
spawn_agents "$task" "$agents" "$agent_id" "$provider" "$redis_channel"
|
|
251
|
+
;;
|
|
252
|
+
--stop)
|
|
253
|
+
shift
|
|
254
|
+
stop_agent "$1"
|
|
255
|
+
;;
|
|
256
|
+
--stop-all)
|
|
257
|
+
stop_all_agents
|
|
258
|
+
;;
|
|
259
|
+
*)
|
|
260
|
+
log_error "Unknown argument: $1"
|
|
261
|
+
echo "Usage:"
|
|
262
|
+
echo " spawn-agent.sh --task \"Task description\" --agents coder,tester [--provider zai] [--redis-channel channel]"
|
|
263
|
+
echo " spawn-agent.sh --stop <task-id>"
|
|
264
|
+
echo " spawn-agent.sh --stop-all"
|
|
265
|
+
echo " spawn-agent.sh --check-dependencies"
|
|
266
|
+
echo " spawn-agent.sh --config list|get|set"
|
|
267
|
+
exit 1
|
|
268
|
+
;;
|
|
269
|
+
esac
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
# Run main function
|
|
273
|
+
main "$@"
|