gru-ai 0.1.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.
Files changed (143) hide show
  1. package/.claude/skills/brainstorm/SKILL.md +340 -0
  2. package/.claude/skills/code-review-excellence/SKILL.md +198 -0
  3. package/.claude/skills/directive/SKILL.md +121 -0
  4. package/.claude/skills/directive/docs/pipeline/00-delegation-and-triage.md +181 -0
  5. package/.claude/skills/directive/docs/pipeline/01-checkpoint.md +34 -0
  6. package/.claude/skills/directive/docs/pipeline/02-read-directive.md +38 -0
  7. package/.claude/skills/directive/docs/pipeline/03-read-context.md +15 -0
  8. package/.claude/skills/directive/docs/pipeline/04-challenge.md +38 -0
  9. package/.claude/skills/directive/docs/pipeline/05-planning.md +64 -0
  10. package/.claude/skills/directive/docs/pipeline/06-technical-audit.md +88 -0
  11. package/.claude/skills/directive/docs/pipeline/07-plan-approval.md +145 -0
  12. package/.claude/skills/directive/docs/pipeline/07b-project-brainstorm.md +85 -0
  13. package/.claude/skills/directive/docs/pipeline/08-worktree-and-state.md +50 -0
  14. package/.claude/skills/directive/docs/pipeline/09-execute-projects.md +709 -0
  15. package/.claude/skills/directive/docs/pipeline/10-wrapup.md +242 -0
  16. package/.claude/skills/directive/docs/pipeline/11-completion-gate.md +75 -0
  17. package/.claude/skills/directive/docs/reference/rules/casting-rules.md +78 -0
  18. package/.claude/skills/directive/docs/reference/rules/failure-handling.md +20 -0
  19. package/.claude/skills/directive/docs/reference/rules/phase-definitions.md +42 -0
  20. package/.claude/skills/directive/docs/reference/rules/scope-and-dod.md +30 -0
  21. package/.claude/skills/directive/docs/reference/schemas/audit-output.md +44 -0
  22. package/.claude/skills/directive/docs/reference/schemas/brainstorm-output.md +52 -0
  23. package/.claude/skills/directive/docs/reference/schemas/challenger-output.md +13 -0
  24. package/.claude/skills/directive/docs/reference/schemas/checkpoint.md +18 -0
  25. package/.claude/skills/directive/docs/reference/schemas/current-json.md +5 -0
  26. package/.claude/skills/directive/docs/reference/schemas/directive-json.md +143 -0
  27. package/.claude/skills/directive/docs/reference/schemas/investigation-output.md +37 -0
  28. package/.claude/skills/directive/docs/reference/schemas/plan-schema.md +103 -0
  29. package/.claude/skills/directive/docs/reference/templates/architect-prompt.md +66 -0
  30. package/.claude/skills/directive/docs/reference/templates/auditor-prompt.md +53 -0
  31. package/.claude/skills/directive/docs/reference/templates/brainstorm-prompt.md +68 -0
  32. package/.claude/skills/directive/docs/reference/templates/challenger-prompt.md +35 -0
  33. package/.claude/skills/directive/docs/reference/templates/digest.md +134 -0
  34. package/.claude/skills/directive/docs/reference/templates/investigator-prompt.md +51 -0
  35. package/.claude/skills/directive/docs/reference/templates/planner-prompt.md +130 -0
  36. package/.claude/skills/frontend-design/SKILL.md +42 -0
  37. package/.claude/skills/gruai-agents/SKILL.md +161 -0
  38. package/.claude/skills/gruai-config/SKILL.md +61 -0
  39. package/.claude/skills/healthcheck/SKILL.md +216 -0
  40. package/.claude/skills/report/SKILL.md +380 -0
  41. package/.claude/skills/scout/SKILL.md +452 -0
  42. package/.claude/skills/seo-audit/SKILL.md +107 -0
  43. package/.claude/skills/walkthrough/SKILL.md +274 -0
  44. package/.claude/skills/webapp-testing/SKILL.md +96 -0
  45. package/LICENSE +21 -0
  46. package/README.md +206 -0
  47. package/cli/templates/CLAUDE.md.template +57 -0
  48. package/cli/templates/agent-roles/backend.md +47 -0
  49. package/cli/templates/agent-roles/cmo.md +52 -0
  50. package/cli/templates/agent-roles/content.md +48 -0
  51. package/cli/templates/agent-roles/coo.md +66 -0
  52. package/cli/templates/agent-roles/cpo.md +52 -0
  53. package/cli/templates/agent-roles/cto.md +63 -0
  54. package/cli/templates/agent-roles/data.md +46 -0
  55. package/cli/templates/agent-roles/design.md +46 -0
  56. package/cli/templates/agent-roles/frontend.md +47 -0
  57. package/cli/templates/agent-roles/fullstack.md +47 -0
  58. package/cli/templates/agent-roles/qa.md +46 -0
  59. package/cli/templates/backlog.json.template +3 -0
  60. package/cli/templates/directive.json.template +9 -0
  61. package/cli/templates/directive.md.template +23 -0
  62. package/cli/templates/goals-index.md +21 -0
  63. package/cli/templates/gruai.config.json.template +12 -0
  64. package/cli/templates/lessons.md +16 -0
  65. package/cli/templates/vision.md +35 -0
  66. package/cli/templates/welcome-directive/directive.json +9 -0
  67. package/cli/templates/welcome-directive/directive.md +53 -0
  68. package/dist/assets/GamePage-C5XQQOQH.js +49 -0
  69. package/dist/assets/README.md +17 -0
  70. package/dist/assets/characters/char_0.png +0 -0
  71. package/dist/assets/characters/char_1.png +0 -0
  72. package/dist/assets/characters/char_10.png +0 -0
  73. package/dist/assets/characters/char_11.png +0 -0
  74. package/dist/assets/characters/char_2.png +0 -0
  75. package/dist/assets/characters/char_3.png +0 -0
  76. package/dist/assets/characters/char_4.png +0 -0
  77. package/dist/assets/characters/char_5.png +0 -0
  78. package/dist/assets/characters/char_6.png +0 -0
  79. package/dist/assets/characters/char_7.png +0 -0
  80. package/dist/assets/characters/char_8.png +0 -0
  81. package/dist/assets/characters/char_9.png +0 -0
  82. package/dist/assets/index-CnTPDqpP.js +12 -0
  83. package/dist/assets/index-gR5q7ikB.css +1 -0
  84. package/dist/assets/office/furniture.png +0 -0
  85. package/dist/assets/office/room-builder.png +0 -0
  86. package/dist/index.html +16 -0
  87. package/dist-server/scripts/intelligence-trends.d.ts +100 -0
  88. package/dist-server/scripts/intelligence-trends.js +365 -0
  89. package/dist-server/server/actions/cleanup.d.ts +4 -0
  90. package/dist-server/server/actions/cleanup.js +30 -0
  91. package/dist-server/server/actions/send-input.d.ts +6 -0
  92. package/dist-server/server/actions/send-input.js +147 -0
  93. package/dist-server/server/actions/terminal.d.ts +4 -0
  94. package/dist-server/server/actions/terminal.js +427 -0
  95. package/dist-server/server/config.d.ts +9 -0
  96. package/dist-server/server/config.js +217 -0
  97. package/dist-server/server/db.d.ts +7 -0
  98. package/dist-server/server/db.js +79 -0
  99. package/dist-server/server/hooks/event-receiver.d.ts +11 -0
  100. package/dist-server/server/hooks/event-receiver.js +36 -0
  101. package/dist-server/server/index.d.ts +1 -0
  102. package/dist-server/server/index.js +552 -0
  103. package/dist-server/server/notifications/macos.d.ts +5 -0
  104. package/dist-server/server/notifications/macos.js +22 -0
  105. package/dist-server/server/notifications/notifier.d.ts +17 -0
  106. package/dist-server/server/notifications/notifier.js +110 -0
  107. package/dist-server/server/parsers/process-discovery.d.ts +39 -0
  108. package/dist-server/server/parsers/process-discovery.js +776 -0
  109. package/dist-server/server/parsers/session-scanner.d.ts +56 -0
  110. package/dist-server/server/parsers/session-scanner.js +390 -0
  111. package/dist-server/server/parsers/session-state.d.ts +68 -0
  112. package/dist-server/server/parsers/session-state.js +696 -0
  113. package/dist-server/server/parsers/session-state.test.d.ts +1 -0
  114. package/dist-server/server/parsers/session-state.test.js +950 -0
  115. package/dist-server/server/parsers/task-parser.d.ts +10 -0
  116. package/dist-server/server/parsers/task-parser.js +97 -0
  117. package/dist-server/server/parsers/team-parser.d.ts +3 -0
  118. package/dist-server/server/parsers/team-parser.js +67 -0
  119. package/dist-server/server/platform/__tests__/claude-code.test.d.ts +1 -0
  120. package/dist-server/server/platform/__tests__/claude-code.test.js +311 -0
  121. package/dist-server/server/platform/claude-code.d.ts +34 -0
  122. package/dist-server/server/platform/claude-code.js +94 -0
  123. package/dist-server/server/platform/index.d.ts +5 -0
  124. package/dist-server/server/platform/index.js +1 -0
  125. package/dist-server/server/platform/types.d.ts +190 -0
  126. package/dist-server/server/platform/types.js +9 -0
  127. package/dist-server/server/state/aggregator.d.ts +42 -0
  128. package/dist-server/server/state/aggregator.js +1080 -0
  129. package/dist-server/server/state/work-item-types.d.ts +555 -0
  130. package/dist-server/server/state/work-item-types.js +168 -0
  131. package/dist-server/server/types.d.ts +237 -0
  132. package/dist-server/server/types.js +1 -0
  133. package/dist-server/server/watchers/claude-watcher.d.ts +17 -0
  134. package/dist-server/server/watchers/claude-watcher.js +130 -0
  135. package/dist-server/server/watchers/context-watcher.d.ts +22 -0
  136. package/dist-server/server/watchers/context-watcher.js +125 -0
  137. package/dist-server/server/watchers/directive-watcher.d.ts +46 -0
  138. package/dist-server/server/watchers/directive-watcher.js +497 -0
  139. package/dist-server/server/watchers/session-watcher.d.ts +18 -0
  140. package/dist-server/server/watchers/session-watcher.js +126 -0
  141. package/dist-server/server/watchers/state-watcher.d.ts +36 -0
  142. package/dist-server/server/watchers/state-watcher.js +369 -0
  143. package/package.json +68 -0
@@ -0,0 +1,452 @@
1
+ ---
2
+ name: "scout"
3
+ description: "External intelligence gathering — C-suite agents research the outside world (competitors, trends, frameworks, user sentiment) and propose initiatives. The CEO reviews and approves proposals, which become directives. Run weekly to keep the company on autopilot."
4
+ ---
5
+
6
+ # Scout — External Intelligence Gathering
7
+
8
+ ## Role Resolution
9
+
10
+ Read `.claude/agent-registry.json` to map roles to agent names. Use each agent's `id` as the `subagent_type` when spawning. The CTO = technology scout, the CPO = product/user scout, the CMO = market/growth scout, the COO = process/ecosystem scout + consolidation.
11
+
12
+ ---
13
+
14
+ Run a scout: each C-suite member researches their external domain, brings back intelligence, and proposes initiatives. The COO consolidates, CEO reviews, approved proposals become directives.
15
+
16
+ **Key principle:** Agents look OUTWARD. They use WebSearch and WebFetch to research the world — competitors, market trends, frameworks, user sentiment. They do NOT scan the codebase. That's `/healthcheck`.
17
+
18
+ ## Step 1: Read Context
19
+
20
+ Read ALL of these before spawning agents:
21
+ - `.context/vision.md` — north star + guardrails (agents need to know what's relevant)
22
+ - `.context/preferences.md` — CEO standing orders
23
+ - `.context/directives/*/directive.json` — current directives and priorities (so agents focus research on what matters)
24
+ - `.context/backlog.json` — so agents don't propose what's already queued, AND so the COO can check trigger conditions during consolidation
25
+ - `.context/lessons/orchestration.md`
26
+ - Recent scout archive in `.context/intel/archive/` — so agents don't re-report known intelligence (just filenames + dates, not full content)
27
+ - `.context/reports/ (proposals tracked in reports)` — so agents know what's been proposed and approved/rejected before
28
+
29
+ ## Step 2: Spawn Scout Agents (Parallel)
30
+
31
+ Spawn all 4 C-suite agents **in parallel**. Each researches their external domain.
32
+
33
+ Each agent receives:
34
+ - Their full personality from `.claude/agents/{name}.md`
35
+ - `.context/vision.md` (full file — guardrails help agents assess relevance)
36
+ - `.context/preferences.md`
37
+ - `.context/directives/*/directive.json`
38
+ - Current backlogs summary (what's already planned)
39
+ - List of recent intelligence reports (filenames only — so they skip known topics)
40
+
41
+ **All agents**: `subagent_type: "general-purpose"`, `model: "opus"`
42
+
43
+ ### CTO — Technology Scout
44
+
45
+ ```
46
+ You are the CTO. You are running a standing intelligence scout of your technology domain.
47
+
48
+ Your job: research the OUTSIDE WORLD for technology developments relevant to our products and stack. Use WebSearch and WebFetch to find real, current information.
49
+
50
+ RESEARCH THESE AREAS:
51
+ 1. **Security advisories**: Search for recent CVEs and security advisories affecting our stack: Next.js, Prisma, SST, AWS Lambda, Elasticsearch, BullMQ, Node.js. Check npm advisory database for critical vulnerabilities.
52
+ 2. **Framework releases**: Search for new releases of Next.js, React, Prisma, SST. Check changelogs for breaking changes, new features we should adopt, or deprecations we need to plan for.
53
+ 3. **Tech trends in our space**: Search for how price comparison and e-commerce monitoring sites are built. What tech stacks are competitors using? Any new patterns for handling large datasets, real-time pricing, or scraping?
54
+ 4. **AI/Agent tooling**: Search for new Claude Code features, MCP server updates, AI SDK developments. What's new in the agent framework space that could improve our conductor system?
55
+ 5. **Performance patterns**: Search for performance optimization patterns for Next.js at scale, Elasticsearch query optimization, or cost reduction techniques for AWS.
56
+
57
+ SEARCH STRATEGY: Run 5-8 targeted WebSearch queries. For promising results, use WebFetch to read the actual content. Be specific in your searches — "Next.js 16 security advisory 2026" not "Next.js news."
58
+
59
+ DO NOT scan the codebase. DO NOT grep files. DO NOT run npm commands. You research the world, not our repo.
60
+
61
+ {JSON output instructions below}
62
+ ```
63
+
64
+ ### CPO — Product & User Scout
65
+
66
+ ```
67
+ You are the CPO. You are running a standing intelligence scout of your product domain.
68
+
69
+ Your job: research the OUTSIDE WORLD for product developments, competitor moves, and user sentiment relevant to our products (BuyWisely, SellWisely, PricesAPI).
70
+
71
+ RESEARCH THESE AREAS:
72
+ 1. **Competitor product updates**: Search for recent changes to competitor price comparison sites (StaticICE, GetPrice, PriceHipster, ShopBot) and competitor monitoring tools (Prisync, Competera, Intelligence Node, Price2Spy). New features? Pricing changes? Launches?
73
+ 2. **User sentiment**: Search Reddit, ProductHunt, G2, Capterra, and forums for discussions about price comparison tools, competitor price monitoring, and pricing APIs. What are users happy/unhappy about? What features do they want?
74
+ 3. **Market landscape**: Search for the state of the Australian e-commerce market. Any new players? Market shifts? Trends in how consumers compare prices?
75
+ 4. **Adjacent opportunities**: Search for emerging needs in the pricing data space — dynamic pricing tools, MAP monitoring, price intelligence for marketplaces. Are there underserved segments we could reach?
76
+ 5. **US market (expansion)**: Search for the US price comparison and competitor monitoring landscape. Who are the players? What gaps exist? How do they differ from the AU market?
77
+
78
+ SEARCH STRATEGY: Run 5-8 targeted WebSearch queries. Focus on recent results (last 30 days preferred). For user sentiment, search specific platforms: "site:reddit.com price comparison australia" or "site:g2.com competitor price monitoring review."
79
+
80
+ DO NOT scan the codebase. DO NOT grep files. You research users and markets, not our repo.
81
+
82
+ {JSON output instructions below}
83
+ ```
84
+
85
+ ### CMO — Market & Growth Scout
86
+
87
+ ```
88
+ You are the CMO. You are running a standing intelligence scout of your growth domain.
89
+
90
+ Your job: research the OUTSIDE WORLD for marketing trends, competitor strategies, and growth opportunities relevant to our products (BuyWisely, SellWisely, PricesAPI).
91
+
92
+ RESEARCH THESE AREAS:
93
+ 1. **Competitor SEO/content**: Search for what content competitors are publishing. Are they launching new landing pages, blog posts, or tools? What keywords are they targeting? Check competitor blogs and content hubs.
94
+ 2. **Keyword trends**: Search for trending topics in price comparison, competitor monitoring, and pricing APIs. Are search patterns shifting? Any emerging long-tail opportunities?
95
+ 3. **Distribution channels**: Search for where price comparison and B2B SaaS companies are getting traction — Product Hunt launches, community engagement, partnership channels, affiliate programs. What's working in 2026?
96
+ 4. **Content marketing patterns**: Search for successful content marketing strategies in SaaS and e-commerce tools space. What formats are working? (Comparison pages, free tools, calculators, data reports?)
97
+ 5. **AI/GEO positioning**: Search for how AI tools (ChatGPT, Perplexity, Google AI) are citing price comparison and monitoring tools. What content structure gets cited? How are competitors positioning for AI-driven search?
98
+
99
+ SEARCH STRATEGY: Run 5-8 targeted WebSearch queries. Mix competitive intelligence with trend research. For content analysis, use WebFetch to actually read competitor pages, not just search results.
100
+
101
+ DO NOT scan the codebase. DO NOT grep for meta tags. You research markets and channels, not our repo.
102
+
103
+ {JSON output instructions below}
104
+ ```
105
+
106
+ ### COO — Process & Ecosystem Scout
107
+
108
+ ```
109
+ You are the COO. You are running a standing intelligence scout of your operations and ecosystem domain.
110
+
111
+ Your job: research the OUTSIDE WORLD for developments in AI agent frameworks, developer productivity tools, and workflow patterns that could improve our conductor system and development process.
112
+
113
+ RESEARCH THESE AREAS:
114
+ 1. **Agent framework updates**: Search for recent releases and features in CrewAI, AutoGen/AG2, LangGraph, MetaGPT, ChatDev. What patterns are they adding? What's working at scale? What can we steal?
115
+ 2. **Claude Code / Anthropic updates**: Search for Claude Code changelog, new features, MCP protocol updates, and Anthropic developer announcements. Are there new capabilities we should adopt?
116
+ 3. **Developer productivity**: Search for emerging tools and patterns for AI-assisted development — code review automation, testing frameworks, deployment patterns. What's reducing cycle time for small teams?
117
+ 4. **Autonomous systems patterns**: Search for how other teams/companies are running autonomous AI operations. How do they handle approval loops, risk classification, self-improvement? Any case studies?
118
+ 5. **Solo founder / small team automation**: Search for tools and workflows that help solo founders or tiny teams operate at scale. What's new in automation, delegation, and autonomous systems?
119
+
120
+ SEARCH STRATEGY: Run 5-8 targeted WebSearch queries. Focus on recent developments (last 30-60 days). For framework comparisons, use WebFetch to read actual documentation or blog posts, not just search summaries.
121
+
122
+ DO NOT scan the codebase. DO NOT read context files for health checks. You research the ecosystem, not our repo.
123
+
124
+ {JSON output instructions below}
125
+ ```
126
+
127
+ ### JSON Output Format (same for all agents)
128
+
129
+ Append these instructions to each agent's prompt:
130
+
131
+ ```
132
+ CRITICAL OUTPUT FORMAT: Your response must contain ONLY valid JSON. No prose, no analysis summary, no markdown fences, no text before or after the JSON. The very first character of your response must be `{` and the very last must be `}`.
133
+
134
+ Your output must follow this schema:
135
+
136
+ {
137
+ "agent": "cto-id | cpo-id | cmo-id | coo-id",
138
+ "domain": "technology | product | growth | operations",
139
+ "scout_date": "YYYY-MM-DD",
140
+ "intelligence": [
141
+ {
142
+ "id": "intel-slug",
143
+ "type": "advisory | competitor_move | market_shift | opportunity | framework_update | user_signal",
144
+ "urgency": "act_now | this_week | this_month | fyi",
145
+ "title": "Short description",
146
+ "source": "URL or description of where you found this",
147
+ "detail": "What you found — be specific with facts, numbers, dates",
148
+ "relevance": "How this connects to our products and goals",
149
+ "products_affected": ["buywisely", "sellwisely", "pricesapi", "conductor"],
150
+ "recommended_action": "What the CEO or team should do about this"
151
+ }
152
+ ],
153
+ "proposed_initiatives": [
154
+ {
155
+ "title": "Human-readable initiative title",
156
+ "priority": "P0 | P1 | P2",
157
+ "risk": "low | medium | high",
158
+ "rationale": "Why this matters — linking to specific intelligence findings",
159
+ "scope": "2-4 sentence description of what needs to happen",
160
+ "estimated_complexity": "simple | moderate | complex",
161
+ "recommended_process": "fix | design-then-build | research-then-build | full-pipeline | research-only",
162
+ "related_intelligence": ["intel-slug-1", "intel-slug-2"],
163
+ "goal_alignment": "Which category this advances"
164
+ }
165
+ ],
166
+ "summary": "2-3 sentence overview of what's happening in this domain"
167
+ }
168
+
169
+ URGENCY GUIDE:
170
+ - act_now: Security vulnerability actively being exploited, critical breaking change, competitor just launched something that directly threatens our position
171
+ - this_week: Important development that needs a response soon — new release with breaking changes, competitor pricing change, emerging opportunity window
172
+ - this_month: Notable trend or development worth acting on but not urgent — framework improvements, market shifts, content opportunities
173
+ - fyi: Interesting observation, no action needed but worth noting for context
174
+
175
+ PROPOSAL RULES:
176
+ - Only propose initiatives for intelligence rated this_week or higher urgency
177
+ - Don't propose work that's already in a backlog (note it as "already planned" instead)
178
+ - Group related intelligence into a single initiative when they share the same response
179
+ - Risk classification: low (auto-execute), medium (CEO approves), high (CEO decides)
180
+ - When in doubt, classify risk UP
181
+ - Every proposal must link to specific intelligence findings that justify it
182
+ ```
183
+
184
+ **Parse each agent's response** as JSON (extract between first `{` and last `}`). If any fails to parse, log the error and continue with the others.
185
+
186
+ ## Step 3: COO Consolidation
187
+
188
+ After all scout agents return, spawn the COO again with a consolidation task.
189
+
190
+ **The COO receives:**
191
+ - Their personality file
192
+ - All 4 scout outputs (parsed JSON)
193
+ - Current goals index and backlogs
194
+ - These instructions:
195
+
196
+ ```
197
+ You are the COO. The team has completed their intelligence scout. Your job: consolidate, deduplicate, cross-reference, and prioritize.
198
+
199
+ CONSOLIDATION RULES:
200
+ 1. **Cross-reference**: If multiple agents found related intelligence (e.g., the CTO found a security advisory AND the CPO found competitors just patched it), link them together. Cross-domain insights are the most valuable.
201
+ 2. **Merge duplicate proposals**: If multiple agents propose similar initiatives, merge them. The scope should incorporate all perspectives.
202
+ 3. **Prioritize**: Rank all proposals. Break ties using: act_now urgency > revenue impact > competitive threat > strategic alignment.
203
+ 4. **Filter already-planned**: Remove proposals for work that's already in a backlog or directive. Note them in the summary.
204
+ 5. **Validate urgency**: If an agent rated something act_now but the evidence is weak, downgrade it. If something rated this_month has stronger implications, upgrade it.
205
+ 6. **Backlog promotion check**: Read `.context/backlog.json`. For each backlog item that has a **Trigger** condition, check if any intelligence finding satisfies that trigger. If yes, promote it — add it to `promotable_backlog_items` with the matching intelligence. This is how backlog items come alive instead of rotting.
206
+ 7. **Cross-scout pattern detection**: After consolidation, identify topics/entities that appear in findings from 2+ different agents. These cross-scout signals are the highest-confidence intelligence. Classify signal strength: **strong** (3+ agents OR 4+ total mentions), **moderate** (2 agents + 3+ mentions), **weak** (2 agents, few mentions). Strong signals with `act_now` or `this_week` urgency should be flagged for automatic promotion to inbox directives — they represent validated, multi-perspective intelligence that doesn't need CEO approval to queue. Include cross-scout signals in the `cross_scout_signals` field of your output.
207
+
208
+ CRITICAL OUTPUT FORMAT: Your response must contain ONLY valid JSON. The very first character must be `{` and the very last must be `}`.
209
+
210
+ {
211
+ "scout_date": "YYYY-MM-DD",
212
+ "domain_summaries": {
213
+ "technology": "CTO's summary",
214
+ "product": "CPO's summary",
215
+ "growth": "CMO's summary",
216
+ "operations": "COO's summary"
217
+ },
218
+ "consolidated_intelligence": [
219
+ {
220
+ "id": "intel-slug",
221
+ "urgency": "act_now | this_week | this_month | fyi",
222
+ "type": "advisory | competitor_move | market_shift | opportunity | framework_update | user_signal",
223
+ "title": "title",
224
+ "detail": "combined detail from all reporting agents",
225
+ "source": "URL or source",
226
+ "reported_by": ["cto-id", "cpo-id"],
227
+ "products_affected": ["buywisely"],
228
+ "cross_references": ["other-intel-slug if related"]
229
+ }
230
+ ],
231
+ "proposed_initiatives": [
232
+ {
233
+ "id": "initiative-slug",
234
+ "title": "Initiative title",
235
+ "priority": "P0 | P1 | P2",
236
+ "risk": "low | medium | high",
237
+ "rationale": "Why — combined reasoning from all agents who contributed",
238
+ "scope": "What needs to happen",
239
+ "estimated_complexity": "simple | moderate | complex",
240
+ "proposed_by": ["cto-id"],
241
+ "related_intelligence": ["intel-slug-1"],
242
+ "recommended_process": "fix | design-then-build | research-then-build | full-pipeline | research-only",
243
+ "goal_alignment": "Which goal area this advances"
244
+ }
245
+ ],
246
+ "promotable_backlog_items": [
247
+ {
248
+ "backlog_item": "Title from backlog",
249
+ "source_file": ".context/backlog.json",
250
+ "trigger_condition": "The trigger text from the backlog item",
251
+ "matching_intelligence": ["intel-slug-1"],
252
+ "why_triggered": "How the intelligence satisfies the trigger condition",
253
+ "recommended_priority": "P0 | P1 | P2"
254
+ }
255
+ ],
256
+ "cross_scout_signals": [
257
+ {
258
+ "topic": "topic-slug",
259
+ "agents": ["cto-id", "cpo-id"],
260
+ "agent_count": 2,
261
+ "total_mentions": 4,
262
+ "highest_urgency": "this_week",
263
+ "strength": "strong | moderate | weak",
264
+ "should_promote": true,
265
+ "related_intelligence": ["intel-slug-1", "intel-slug-2"],
266
+ "summary": "What this cross-scout pattern tells us"
267
+ }
268
+ ],
269
+ "already_planned_count": 2,
270
+ "new_intelligence_count": 10,
271
+ "overall_assessment": "2-3 sentence overview: what's the most important thing the CEO should know this week?"
272
+ }
273
+ ```
274
+
275
+ **Parse the COO's response** as JSON.
276
+
277
+ ## Step 4: Present to CEO
278
+
279
+ Present the consolidated intelligence to the CEO in a readable format:
280
+
281
+ ```
282
+ # Scout Report — {date}
283
+
284
+ ## TL;DR
285
+ {COO's overall_assessment — the one thing the CEO should know}
286
+
287
+ ## Domain Intelligence
288
+ - **Technology (CTO)**: {summary}
289
+ - **Product (CPO)**: {summary}
290
+ - **Growth (CMO)**: {summary}
291
+ - **Ecosystem (COO)**: {summary}
292
+
293
+ ## Action Required ({count} act_now + this_week items)
294
+
295
+ {List intelligence items with urgency act_now or this_week:}
296
+ - [{urgency}] **{title}** — {detail} (Source: {source})
297
+ Reported by: {agents} | Affects: {products}
298
+ Recommended action: {action}
299
+
300
+ ## Notable Intelligence ({count} this_month + fyi items)
301
+
302
+ {Briefly list this_month and fyi items — title + one-liner only}
303
+
304
+ ## Cross-Scout Signals ({count})
305
+
306
+ {Topics confirmed by 2+ agents — highest confidence intelligence:}
307
+ - **{topic}** [{strength}] — {summary}
308
+ Agents: {agents} | Mentions: {total_mentions} | Urgency: {highest_urgency}
309
+ {if should_promote: ">> Auto-queued for directive creation"}
310
+
311
+ ## Proposed Initiatives ({count})
312
+
313
+ {For each proposed initiative, numbered:}
314
+ 1. **{title}** ({priority}, {risk} risk, {complexity})
315
+ Proposed by: {agents}
316
+ Rationale: {why}
317
+ Scope: {what}
318
+ Goal alignment: {which goal}
319
+ Process: {recommended_process}
320
+
321
+ ## Promotable Backlog Items ({count})
322
+
323
+ {Items from backlog whose trigger conditions were met by this week's intelligence:}
324
+ 1. **{backlog_item}** (from {source_file})
325
+ Trigger: {trigger_condition}
326
+ Matched by: {matching intelligence titles}
327
+ Why now: {why_triggered}
328
+ Recommended priority: {priority}
329
+ ```
330
+
331
+ Then ask the CEO to approve using AskUserQuestion:
332
+ - "Approve all" — create directives for all proposed initiatives + promote all triggered backlog items
333
+ - "Approve selected" — CEO picks which proposals and backlog promotions to approve
334
+ - "Review only" — no action, just noting the intelligence
335
+
336
+ **For promotable backlog items**, approved items get converted into directive files in `directives/` (same as new proposals). The directive content should reference the original backlog item and the triggering intelligence.
337
+
338
+ ## Step 5: Save Intelligence + Create Directives
339
+
340
+ ### Save intelligence outputs
341
+
342
+ Write each agent's raw JSON output to `.context/intel/latest/{agent}.json`, overwriting any previous file.
343
+
344
+ If the `latest/` directory already has files, move them to `archive/{date}/` first.
345
+
346
+ Create directories if they don't exist: `mkdir -p .context/intel/latest .context/intel/archive`
347
+
348
+ ### Create directives from approved proposals
349
+
350
+ For each approved proposal, create a directive file in `.context/directives/`:
351
+
352
+ **Filename:** `{initiative-slug}.md` (kebab-case)
353
+
354
+ **Content:**
355
+ ```markdown
356
+ # Directive: {initiative title}
357
+
358
+ **Source**: Scout {date}, proposed by {agents}
359
+ **Priority**: {priority}
360
+ **Risk**: {risk}
361
+ **Recommended process**: {process}
362
+ **Goal alignment**: {goal area}
363
+
364
+ ## Objective
365
+
366
+ {rationale — why this matters, linking to intelligence findings}
367
+
368
+ ## Scope
369
+
370
+ {scope — what needs to happen}
371
+
372
+ ## Intelligence Context
373
+
374
+ {List the intelligence findings that support this initiative — title, source, detail}
375
+
376
+ ## Success Criteria
377
+
378
+ {derived from the initiative scope — what does "done" look like}
379
+ ```
380
+
381
+ Tell the CEO: "Created {N} directives in `.context/directives/`. Run `/directive {name}` to execute any of them."
382
+
383
+ ## Step 6: Log to Intelligence Log + Proposals Log
384
+
385
+ ### Intelligence log
386
+
387
+ Append to `.context/reports/ (intelligence tracked in reports)`:
388
+
389
+ ```
390
+ --- Scout {date} ---
391
+ Intelligence gathered: {count}
392
+ act_now: {count}
393
+ this_week: {count}
394
+ this_month: {count}
395
+ fyi: {count}
396
+ Initiatives proposed: {count}
397
+ Initiatives approved: {count}
398
+ ```
399
+
400
+ Intelligence is now tracked in reports only. Skip the log file.
401
+
402
+ ```
403
+ # Intelligence Log
404
+ # Appended automatically by /scout
405
+ ```
406
+
407
+ ### Proposals log
408
+
409
+ Append approved/rejected proposals to `.context/reports/ (proposals tracked in reports)` (same format as before):
410
+
411
+ ```
412
+ --- Scout {date} ---
413
+ {For each proposal:}
414
+ [APPROVED|REJECTED|DEFERRED] {initiative title}
415
+ Proposed by: {agents}
416
+ Priority: {priority}
417
+ Risk: {risk}
418
+ Source: External intelligence
419
+ CEO reason: {approval reason or rejection reason, if given}
420
+ ```
421
+
422
+ ## Failure Handling
423
+
424
+ | Situation | Action |
425
+ |-----------|--------|
426
+ | An agent's output doesn't parse as JSON | Log the error, continue with other agents. Include raw output in report. |
427
+ | WebSearch returns no results for an agent | Include their "no notable developments" summary. No proposals from that domain. |
428
+ | An agent finds only fyi-level intelligence | Include their summary. No proposals needed — this is fine. |
429
+ | COO consolidation fails | Present raw agent outputs to CEO without consolidation. |
430
+ | CEO rejects all proposals | Log rejections. Scout still recorded as completed. |
431
+ | No intelligence across all agents | Report "quiet week" — this is a valid outcome. |
432
+ | intel/latest/ directory doesn't exist | Create it with mkdir -p. |
433
+
434
+ ## Rules
435
+
436
+ ### NEVER
437
+ - Scan the codebase during scout (that's /healthcheck)
438
+ - Run npm commands, grep source files, or read code files
439
+ - Create directives without CEO approval
440
+ - Overwrite intel files without archiving first
441
+ - Run scout agents sequentially (always parallel)
442
+ - Make up intelligence — only report what WebSearch/WebFetch actually found
443
+
444
+ ### ALWAYS
445
+ - Read all context files before spawning agents (agents need to know what's relevant)
446
+ - Include personality files in named agent prompts
447
+ - Include vision + preferences in all agent prompts (for relevance filtering)
448
+ - Parse agent output defensively (extract JSON between first `{` and last `}`)
449
+ - Save raw intelligence to latest/ for /report to read
450
+ - Include all proposals (approved and rejected) in the scout report
451
+ - Show the CEO what was found before asking for decisions
452
+ - Include source URLs for all intelligence (verifiability matters)
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: seo-audit
3
+ description: >
4
+ Full website SEO audit with parallel subagent delegation. Crawls up to 500
5
+ pages, detects business type, delegates to 6 specialists, generates health
6
+ score. Use when user says "audit", "full SEO check", "analyze my site",
7
+ or "website health check".
8
+ ---
9
+
10
+ # Full Website SEO Audit
11
+
12
+ ## Process
13
+
14
+ 1. **Fetch homepage** — use `scripts/fetch_page.py` to retrieve HTML
15
+ 2. **Detect business type** — analyze homepage signals per seo orchestrator
16
+ 3. **Crawl site** — follow internal links up to 500 pages, respect robots.txt
17
+ 4. **Delegate to subagents** (if available, otherwise run inline sequentially):
18
+ - `seo-technical` — robots.txt, sitemaps, canonicals, Core Web Vitals, security headers
19
+ - `seo-content` — E-E-A-T, readability, thin content, AI citation readiness
20
+ - `seo-schema` — detection, validation, generation recommendations
21
+ - `seo-sitemap` — structure analysis, quality gates, missing pages
22
+ - `seo-performance` — LCP, INP, CLS measurements
23
+ - `seo-visual` — screenshots, mobile testing, above-fold analysis
24
+ 5. **Score** — aggregate into SEO Health Score (0-100)
25
+ 6. **Report** — generate prioritized action plan
26
+
27
+ ## Crawl Configuration
28
+
29
+ ```
30
+ Max pages: 500
31
+ Respect robots.txt: Yes
32
+ Follow redirects: Yes (max 3 hops)
33
+ Timeout per page: 30 seconds
34
+ Concurrent requests: 5
35
+ Delay between requests: 1 second
36
+ ```
37
+
38
+ ## Output Files
39
+
40
+ - `FULL-AUDIT-REPORT.md` — Comprehensive findings
41
+ - `ACTION-PLAN.md` — Prioritized recommendations (Critical → High → Medium → Low)
42
+ - `screenshots/` — Desktop + mobile captures (if Playwright available)
43
+
44
+ ## Scoring Weights
45
+
46
+ | Category | Weight |
47
+ |----------|--------|
48
+ | Technical SEO | 25% |
49
+ | Content Quality | 25% |
50
+ | On-Page SEO | 20% |
51
+ | Schema / Structured Data | 10% |
52
+ | Performance (CWV) | 10% |
53
+ | Images | 5% |
54
+ | AI Search Readiness | 5% |
55
+
56
+ ## Report Structure
57
+
58
+ ### Executive Summary
59
+ - Overall SEO Health Score (0-100)
60
+ - Business type detected
61
+ - Top 5 critical issues
62
+ - Top 5 quick wins
63
+
64
+ ### Technical SEO
65
+ - Crawlability issues
66
+ - Indexability problems
67
+ - Security concerns
68
+ - Core Web Vitals status
69
+
70
+ ### Content Quality
71
+ - E-E-A-T assessment
72
+ - Thin content pages
73
+ - Duplicate content issues
74
+ - Readability scores
75
+
76
+ ### On-Page SEO
77
+ - Title tag issues
78
+ - Meta description problems
79
+ - Heading structure
80
+ - Internal linking gaps
81
+
82
+ ### Schema & Structured Data
83
+ - Current implementation
84
+ - Validation errors
85
+ - Missing opportunities
86
+
87
+ ### Performance
88
+ - LCP, INP, CLS scores
89
+ - Resource optimization needs
90
+ - Third-party script impact
91
+
92
+ ### Images
93
+ - Missing alt text
94
+ - Oversized images
95
+ - Format recommendations
96
+
97
+ ### AI Search Readiness
98
+ - Citability score
99
+ - Structural improvements
100
+ - Authority signals
101
+
102
+ ## Priority Definitions
103
+
104
+ - **Critical**: Blocks indexing or causes penalties (fix immediately)
105
+ - **High**: Significantly impacts rankings (fix within 1 week)
106
+ - **Medium**: Optimization opportunity (fix within 1 month)
107
+ - **Low**: Nice to have (backlog)