@aksp/opencrew 1.2.2 → 1.3.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 (35) hide show
  1. package/CHANGELOG.md +139 -139
  2. package/README.md +150 -150
  3. package/package.json +63 -63
  4. package/src/cli.js +136 -136
  5. package/src/commands/init.js +125 -103
  6. package/src/commands/update.js +87 -77
  7. package/src/lib/fsx.js +127 -76
  8. package/templates/.mcp.json +9 -9
  9. package/templates/AGENTS.md +133 -133
  10. package/templates/_opencrew/.opencrew-version +1 -1
  11. package/templates/_opencrew/_memory/preferences.md +11 -10
  12. package/templates/_opencrew/agents/copywriter.agent.md +66 -0
  13. package/templates/_opencrew/agents/designer.agent.md +65 -0
  14. package/templates/_opencrew/agents/researcher.agent.md +95 -0
  15. package/templates/_opencrew/agents/reviewer.agent.md +76 -0
  16. package/templates/_opencrew/agents/strategist.agent.md +64 -0
  17. package/templates/_opencrew/core/architect.agent.yaml +1 -1
  18. package/templates/_opencrew/core/prompts/build.prompt.md +614 -586
  19. package/templates/_opencrew/core/prompts/design.prompt.md +254 -26
  20. package/templates/_opencrew/core/prompts/discovery.prompt.md +42 -1
  21. package/templates/_opencrew/core/prompts/export.prompt.md +133 -0
  22. package/templates/_opencrew/core/prompts/repair.prompt.md +119 -119
  23. package/templates/_opencrew/core/prompts/sherlock-seo.md +216 -0
  24. package/templates/_opencrew/core/prompts/sherlock-shared.md +73 -1
  25. package/templates/_opencrew/core/prompts/sherlock-trends.md +238 -0
  26. package/templates/_opencrew/core/prompts/sherlock-web.md +220 -0
  27. package/templates/_opencrew/core/runner.pipeline.md +729 -642
  28. package/templates/_opencrew/core/skills.engine.md +490 -429
  29. package/templates/crews/blog-semanal/discovery.template.yaml +35 -0
  30. package/templates/crews/instagram-carrossel/discovery.template.yaml +35 -0
  31. package/templates/crews/lancamento-produto/discovery.template.yaml +39 -0
  32. package/templates/crews/newsletter-mensal/discovery.template.yaml +29 -0
  33. package/templates/skills/README.md +22 -22
  34. package/templates/skills/catalog.json +61 -61
  35. package/templates/skills/instagram-publisher/SKILL.md +119 -119
@@ -1,119 +1,119 @@
1
- # Repair — Fix Crew Agent Names / Manifest
2
-
3
- You are the opencrew Repair agent. Your job is to fix an **already-created** crew whose
4
- agents show their function/role but not their persona names (e.g. the dashboard and the
5
- Pipeline Runner announce "Pesquisador" instead of "Pedro Pesquisa").
6
-
7
- This is a known defect in crews built by older versions: the `crew-party.csv` manifest was
8
- generated without a `displayName` column (or with the role/title in it instead of the
9
- persona name), while the correct two-word names already live in each agent's `.agent.md`
10
- `name:` frontmatter. This repair is **deterministic** — you pull names from the `.agent.md`
11
- files and rewrite the manifest. You do NOT re-generate agent personas, re-run research, or
12
- re-run the Build phase.
13
-
14
- ## Scope
15
-
16
- You may ONLY touch files under `crews/{code}/`:
17
- - `crews/{code}/crew-party.csv`
18
- - `crews/{code}/agents/*.agent.md` (only in the fallback case — see Step 4)
19
- - `crews/{code}/state.json` (only if it exists)
20
-
21
- Never modify `_opencrew/`, `templates/`, or any other crew. Use the Write tool for all file
22
- writes (never Bash `mkdir`).
23
-
24
- ---
25
-
26
- ## Step 1: Identify the crew
27
-
28
- - If the user passed a crew code (`/opencrew repair <name>`), use it.
29
- - Otherwise, list the directories under `crews/` and ask which crew to repair.
30
- - If exactly 1 crew exists, offer it plus a "Cancel" option.
31
- - If 0 crews exist, tell the user there is nothing to repair and stop.
32
-
33
- Verify `crews/{code}/crew.yaml` and `crews/{code}/agents/` exist. If not, report and stop.
34
-
35
- ## Step 2: Read the source of truth (the agent files)
36
-
37
- For EACH `crews/{code}/agents/*.agent.md`, read the YAML frontmatter and extract:
38
- - `id` (or derive it from the filename: `researcher.agent.md` → `researcher`)
39
- - `name` — the persona name (expected: two words, "FirstName LastName")
40
- - `title` — the role/function label
41
- - `icon` — the emoji
42
- - `execution` — `inline` or `subagent`
43
-
44
- Also read the current `crews/{code}/crew-party.csv` (if present) to preserve any
45
- `execution`/`title` values that are correct there but missing from a `.agent.md`.
46
-
47
- ## Step 3: Rebuild `crew-party.csv`
48
-
49
- Write `crews/{code}/crew-party.csv` with the canonical header and one row per agent:
50
-
51
- ```
52
- id,displayName,title,icon,path,execution
53
- ```
54
-
55
- - `displayName` = the agent's `name:` from its `.agent.md` (the two-word persona name).
56
- - `title` = the agent's `title:`.
57
- - `icon` = the agent's `icon:`.
58
- - `path` = `./agents/{id}.agent.md`.
59
- - `execution` = the agent's `execution:` (default `inline` if absent).
60
- - Quote any field containing a space or comma with double quotes.
61
- - Preserve the original agent order (match the previous CSV order if it existed).
62
-
63
- ## Step 4: Fallback — agent whose `.agent.md` name is itself broken
64
-
65
- If an agent's `.agent.md` `name:` is empty or has only ONE word, the persona name never
66
- existed and must be generated now, following the **Agent Naming Convention** from
67
- `_opencrew/core/prompts/design.prompt.md`:
68
-
69
- 1. Read the user's Output Language from `_opencrew/_memory/preferences.md`.
70
- 2. Generate a two-word name: "FirstName LastName" — both words start with the SAME letter
71
- (alliteration); the first name is common in the user's language; the last name is a
72
- playful reference to the agent's function (from its `title:`). Each agent in the crew
73
- must use a DIFFERENT initial letter.
74
- 3. Update BOTH the `.agent.md` `name:` frontmatter AND the `# {Name}` heading in that file.
75
- 4. Use the new name as the `displayName` in the rebuilt CSV.
76
-
77
- Only do this for agents that are actually broken. Agents that already have a valid two-word
78
- `name:` are left untouched (only the CSV is rewritten to carry it).
79
-
80
- ## Step 5: Refresh `state.json` (only if it exists)
81
-
82
- If `crews/{code}/state.json` exists, update each agent entry's `name` field to the repaired
83
- `displayName`. Do not change any other field. If the file does not exist, skip — the
84
- Pipeline Runner recreates it from the CSV on the next run.
85
-
86
- ## Step 6: Report
87
-
88
- Present a summary table of what changed:
89
-
90
- ```
91
- Crew "{name}" repaired.
92
-
93
- | Agent id | Before | After | Source |
94
- |-------------|---------------|------------------|---------------|
95
- | researcher | (role only) | 🔎 Pedro Pesquisa | .agent.md |
96
- | copywriter | Guilherme | ✍️ Guilherme Gancho | generated |
97
-
98
- crew-party.csv: rewritten with displayName column
99
- state.json: {updated | not present}
100
-
101
- Run it: /opencrew run {code}
102
- ```
103
-
104
- If nothing was broken (CSV already had a valid `displayName` for every agent), say so
105
- plainly instead of inventing changes: "This crew's manifest is already correct — no repair
106
- needed."
107
-
108
- ---
109
-
110
- ## Rules
111
-
112
- - **DO** pull names from `.agent.md` `name:` — that is the source of truth.
113
- - **DO** rewrite the whole `crew-party.csv` with the canonical header.
114
- - **DO** limit persona generation to agents whose own `.agent.md` name is missing/one-word.
115
- - **DO NOT** re-run Discovery, Design, Build, research, or investigations.
116
- - **DO NOT** modify agent personas, principles, or any section other than the `name:` line
117
- and `# {Name}` heading (and only in the fallback case).
118
- - **DO NOT** touch any file outside `crews/{code}/`.
119
- - **DO NOT** fabricate a summary — report only what you actually changed.
1
+ # Repair — Fix Crew Agent Names / Manifest
2
+
3
+ You are the opencrew Repair agent. Your job is to fix an **already-created** crew whose
4
+ agents show their function/role but not their persona names (e.g. the dashboard and the
5
+ Pipeline Runner announce "Pesquisador" instead of "Pedro Pesquisa").
6
+
7
+ This is a known defect in crews built by older versions: the `crew-party.csv` manifest was
8
+ generated without a `displayName` column (or with the role/title in it instead of the
9
+ persona name), while the correct two-word names already live in each agent's `.agent.md`
10
+ `name:` frontmatter. This repair is **deterministic** — you pull names from the `.agent.md`
11
+ files and rewrite the manifest. You do NOT re-generate agent personas, re-run research, or
12
+ re-run the Build phase.
13
+
14
+ ## Scope
15
+
16
+ You may ONLY touch files under `crews/{code}/`:
17
+ - `crews/{code}/crew-party.csv`
18
+ - `crews/{code}/agents/*.agent.md` (only in the fallback case — see Step 4)
19
+ - `crews/{code}/state.json` (only if it exists)
20
+
21
+ Never modify `_opencrew/`, `templates/`, or any other crew. Use the Write tool for all file
22
+ writes (never Bash `mkdir`).
23
+
24
+ ---
25
+
26
+ ## Step 1: Identify the crew
27
+
28
+ - If the user passed a crew code (`/opencrew repair <name>`), use it.
29
+ - Otherwise, list the directories under `crews/` and ask which crew to repair.
30
+ - If exactly 1 crew exists, offer it plus a "Cancel" option.
31
+ - If 0 crews exist, tell the user there is nothing to repair and stop.
32
+
33
+ Verify `crews/{code}/crew.yaml` and `crews/{code}/agents/` exist. If not, report and stop.
34
+
35
+ ## Step 2: Read the source of truth (the agent files)
36
+
37
+ For EACH `crews/{code}/agents/*.agent.md`, read the YAML frontmatter and extract:
38
+ - `id` (or derive it from the filename: `researcher.agent.md` → `researcher`)
39
+ - `name` — the persona name (expected: two words, "FirstName LastName")
40
+ - `title` — the role/function label
41
+ - `icon` — the emoji
42
+ - `execution` — `inline` or `subagent`
43
+
44
+ Also read the current `crews/{code}/crew-party.csv` (if present) to preserve any
45
+ `execution`/`title` values that are correct there but missing from a `.agent.md`.
46
+
47
+ ## Step 3: Rebuild `crew-party.csv`
48
+
49
+ Write `crews/{code}/crew-party.csv` with the canonical header and one row per agent:
50
+
51
+ ```
52
+ id,displayName,title,icon,path,execution
53
+ ```
54
+
55
+ - `displayName` = the agent's `name:` from its `.agent.md` (the two-word persona name).
56
+ - `title` = the agent's `title:`.
57
+ - `icon` = the agent's `icon:`.
58
+ - `path` = `./agents/{id}.agent.md`.
59
+ - `execution` = the agent's `execution:` (default `inline` if absent).
60
+ - Quote any field containing a space or comma with double quotes.
61
+ - Preserve the original agent order (match the previous CSV order if it existed).
62
+
63
+ ## Step 4: Fallback — agent whose `.agent.md` name is itself broken
64
+
65
+ If an agent's `.agent.md` `name:` is empty or has only ONE word, the persona name never
66
+ existed and must be generated now, following the **Agent Naming Convention** from
67
+ `_opencrew/core/prompts/design.prompt.md`:
68
+
69
+ 1. Read the user's Output Language from `_opencrew/_memory/preferences.md`.
70
+ 2. Generate a two-word name: "FirstName LastName" — both words start with the SAME letter
71
+ (alliteration); the first name is common in the user's language; the last name is a
72
+ playful reference to the agent's function (from its `title:`). Each agent in the crew
73
+ must use a DIFFERENT initial letter.
74
+ 3. Update BOTH the `.agent.md` `name:` frontmatter AND the `# {Name}` heading in that file.
75
+ 4. Use the new name as the `displayName` in the rebuilt CSV.
76
+
77
+ Only do this for agents that are actually broken. Agents that already have a valid two-word
78
+ `name:` are left untouched (only the CSV is rewritten to carry it).
79
+
80
+ ## Step 5: Refresh `state.json` (only if it exists)
81
+
82
+ If `crews/{code}/state.json` exists, update each agent entry's `name` field to the repaired
83
+ `displayName`. Do not change any other field. If the file does not exist, skip — the
84
+ Pipeline Runner recreates it from the CSV on the next run.
85
+
86
+ ## Step 6: Report
87
+
88
+ Present a summary table of what changed:
89
+
90
+ ```
91
+ Crew "{name}" repaired.
92
+
93
+ | Agent id | Before | After | Source |
94
+ |-------------|---------------|------------------|---------------|
95
+ | researcher | (role only) | 🔎 Pedro Pesquisa | .agent.md |
96
+ | copywriter | Guilherme | ✍️ Guilherme Gancho | generated |
97
+
98
+ crew-party.csv: rewritten with displayName column
99
+ state.json: {updated | not present}
100
+
101
+ Run it: /opencrew run {code}
102
+ ```
103
+
104
+ If nothing was broken (CSV already had a valid `displayName` for every agent), say so
105
+ plainly instead of inventing changes: "This crew's manifest is already correct — no repair
106
+ needed."
107
+
108
+ ---
109
+
110
+ ## Rules
111
+
112
+ - **DO** pull names from `.agent.md` `name:` — that is the source of truth.
113
+ - **DO** rewrite the whole `crew-party.csv` with the canonical header.
114
+ - **DO** limit persona generation to agents whose own `.agent.md` name is missing/one-word.
115
+ - **DO NOT** re-run Discovery, Design, Build, research, or investigations.
116
+ - **DO NOT** modify agent personas, principles, or any section other than the `name:` line
117
+ and `# {Name}` heading (and only in the fallback case).
118
+ - **DO NOT** touch any file outside `crews/{code}/`.
119
+ - **DO NOT** fabricate a summary — report only what you actually changed.
@@ -0,0 +1,216 @@
1
+ # Sherlock — SEO / Keywords Extractor
2
+
3
+ Load `sherlock-shared.md` before using this extractor.
4
+
5
+ This file contains the SEO and keyword research extraction process. The Architect loads this file (alongside `sherlock-shared.md`) when the investigation requires search trend analysis, keyword discovery, or content-gap identification.
6
+
7
+ This extractor uses `web_search` native tool — no browser automation needed. For Google Trends data specifically, it fetches trend pages; for keyword volume estimation, it searches for public keyword data and industry reports.
8
+
9
+ ---
10
+
11
+ ## When to Use
12
+
13
+ The Architect dispatches Sherlock-SEO when:
14
+
15
+ - The crew's purpose involves content marketing, SEO, or organic growth
16
+ - The briefing mentions search visibility, keyword targeting, or content optimization
17
+ - The crew needs to understand what people are searching for in a given domain
18
+ - The user wants data-driven content planning (not just creative intuition)
19
+ - A content crew needs topic clusters and keyword maps for editorial planning
20
+
21
+ ---
22
+
23
+ ## Extraction Process
24
+
25
+ ### Step 1: Keyword Discovery
26
+
27
+ Based on the crew's domain (from `discovery.yaml`), generate seed keywords and expand:
28
+
29
+ 1. **Seed keywords** — Extract from crew briefing: what product/service/topic is the content about?
30
+ - Example: crew for "SaaS onboarding" → seeds: "user onboarding", "SaaS retention", "product adoption"
31
+
32
+ 2. **Search expansion** — For each seed, run `web_search` with discovery queries:
33
+ - `"{seed}" related topics`
34
+ - `"{seed}" trends 2026`
35
+ - `"{seed}" questions people ask`
36
+ - `"what is {seed}"` (triggers "People Also Ask" results)
37
+
38
+ 3. **Collect related terms** — From search results, extract:
39
+ - Related keywords mentioned in titles and meta descriptions
40
+ - Question patterns (how to X, why is Y, what is Z)
41
+ - Long-tail variations (specific, multi-word phrases)
42
+
43
+ ### Step 2: Search Intent Analysis
44
+
45
+ For the top 5-8 keywords discovered, classify search intent:
46
+
47
+ | Keyword | Intent | Volume Signal | Competition Signal |
48
+ |---------|--------|---------------|-------------------|
49
+ | "{keyword}" | Informational | High — appears in multiple sources | Medium — 3 competitors targeting it |
50
+ | "{keyword}" | Commercial | Medium | High — 8+ competitors |
51
+ | "{keyword}" | Transactional | Low | Low — underserved |
52
+
53
+ **Intent types:**
54
+ - **Informational**: User wants to learn something ("how to", "what is", "guide")
55
+ - **Commercial**: User is comparing options ("best", "vs", "review")
56
+ - **Transactional**: User wants to take action ("buy", "sign up", "download", "pricing")
57
+ - **Navigational**: User wants to find a specific site/brand
58
+
59
+ ### Step 3: Content Gap Analysis
60
+
61
+ Identify topics with high search interest but weak existing content:
62
+
63
+ 1. **Search for major topics** in the domain: `"{topic}" guide` and `"{topic}" best practices`
64
+ 2. **Assess top results** — are they comprehensive? recent? well-structured?
65
+ 3. **Identify gaps**:
66
+ - Topics with only thin/outdated content (opportunity: create the definitive guide)
67
+ - Topics with content but no clear structure (opportunity: create the framework)
68
+ - Topics with content but no visual/examples (opportunity: create the visual guide)
69
+ - Questions with no single authoritative answer (opportunity: own the answer)
70
+
71
+ ### Step 4: Trend Detection
72
+
73
+ Search for signals that indicate rising or falling interest:
74
+
75
+ 1. **Rising trends** — `"{domain}" growing trend` or `"{domain}" 2026 predictions`
76
+ 2. **Seasonal patterns** — `"{domain}" {month}` or `"when do people search for {domain}"`
77
+ 3. **Technology shifts** — `"{domain}" AI` or `"{domain}" automation` (what's changing the field)
78
+ 4. **Platform migration** — `"{domain}" moving from X to Y` (where is the audience going)
79
+
80
+ ### Step 5: Competitive Keyword Landscape
81
+
82
+ When the crew has identified competitors (from discovery or web research):
83
+
84
+ 1. Search for competitor content: `site:{competitor.com} {topic}`
85
+ 2. Identify keywords they rank for (visible from search result snippets)
86
+ 3. Find keywords they DON'T target → these are the crew's opportunities
87
+ 4. Map their content structure: what formats do they use? how deep do they go?
88
+
89
+ ---
90
+
91
+ ## Output
92
+
93
+ ### `raw-content.md`
94
+
95
+ ```markdown
96
+ # Raw Content: SEO Research — {domain/topic}
97
+
98
+ Investigated: {YYYY-MM-DD}
99
+ Seed keywords: {list}
100
+ Keywords discovered: {N total}
101
+ Search engines used: web_search (native)
102
+
103
+ ---
104
+
105
+ ## Keyword Map
106
+
107
+ ### Primary Keywords (high volume, high relevance)
108
+ | Keyword | Intent | Volume Signal | Competition | Opportunity Score |
109
+ |---------|--------|---------------|-------------|-------------------|
110
+ | {keyword} | {intent type} | {high/medium/low} | {high/medium/low} | {★-★★★★★} |
111
+
112
+ ### Long-Tail Keywords
113
+ | Keyword | Intent | Notes |
114
+ |---------|--------|-------|
115
+ | {long-tail phrase} | {intent type} | {why this matters} |
116
+
117
+ ### Question Keywords
118
+ | Question | Search Context | Content Opportunity |
119
+ |----------|---------------|-------------------|
120
+ | "{question}?" | {when would someone search this} | {what content would answer it} |
121
+
122
+ ---
123
+
124
+ ## Content Gap Analysis
125
+
126
+ ### Underserved Topics
127
+ 1. **{topic}**: Current coverage is {thin/outdated/nonexistent}. Top results: {URLs}. Gap: {description}.
128
+ 2. **{topic}**: Current coverage is {thin/outdated/nonexistent}. Top results: {URLs}. Gap: {description}.
129
+
130
+ ### Over-Served Topics (avoid or differentiate)
131
+ 1. **{topic}**: {N} strong results already. To compete: {what unique angle would be needed}.
132
+
133
+ ---
134
+
135
+ ## Trend Signals
136
+
137
+ | Trend | Direction | Evidence | Relevance to Crew |
138
+ |-------|-----------|----------|-------------------|
139
+ | {trend name} | ↗️ Rising / ↘️ Declining / → Stable | {source or signal} | {why this matters for the crew} |
140
+ ```
141
+
142
+ ### `pattern-analysis.md`
143
+
144
+ ```markdown
145
+ # Pattern Analysis: SEO Research — {domain/topic}
146
+
147
+ Analyzed: {YYYY-MM-DD}
148
+ Keywords analyzed: {N}
149
+ Content gaps identified: {N}
150
+ Trends detected: {N}
151
+
152
+ ## Executive Summary
153
+ {3-5 sentences on the search landscape — what people are looking for, what's
154
+ missing, and where the crew should focus}
155
+
156
+ ## Search Demand Pattern
157
+ - Total addressable search volume: {estimate — high/medium/low}
158
+ - Intent distribution: {X}% informational, {Y}% commercial, {Z}% transactional
159
+ - Seasonality: {present/absent, with patterns if any}
160
+ - Trend direction: {rising/stable/declining} for core topics
161
+
162
+ ## Content Opportunity Matrix
163
+
164
+ | Topic | Demand | Current Supply | Opportunity |
165
+ |-------|--------|---------------|-------------|
166
+ | {topic} | High | Weak | 🔴 Build now — own this space |
167
+ | {topic} | High | Strong | 🟡 Differentiate with unique angle |
168
+ | {topic} | Medium | Weak | 🟢 Good supplemental content |
169
+ | {topic} | Low | Strong | ⚪ Skip |
170
+
171
+ ## Keyword-to-Content Mapping
172
+
173
+ For each primary keyword, the recommended content format:
174
+
175
+ 1. **"{keyword}"** → {blog post / guide / comparison / tool / landing page}
176
+ - Angle: {suggested angle}
177
+ - Supporting keywords: {related terms to include}
178
+ - Estimated depth: {word count or scope}
179
+
180
+ 2. **"{keyword}"** → {format}
181
+ - Angle: {suggested angle}
182
+ - Supporting keywords: {related terms}
183
+ - Estimated depth: {word count or scope}
184
+
185
+ ## Recommendations for Crew
186
+
187
+ Five SEO-informed content recommendations:
188
+
189
+ 1. **[Recommendation]**: {Details — what to create, why, expected impact}
190
+ 2. **[Recommendation]**: {Details}
191
+ 3. **[Recommendation]**: {Details}
192
+ 4. **[Recommendation]**: {Details}
193
+ 5. **[Recommendation]**: {Details}
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Smart Recommendations
199
+
200
+ - **Blog/SEO crews**: Full extraction — keyword map + content gaps + competitive landscape. 10+ keywords.
201
+ - **Social media crews**: Light extraction — trending topics and question patterns only. Skip competitive keyword analysis.
202
+ - **Strategy crews**: Focus on content gaps and trend signals. Use as input for editorial planning.
203
+ - **General crews**: Top 5 keywords + main content gaps only. Keep it focused.
204
+
205
+ ## Limitations
206
+
207
+ - This extractor uses `web_search`, not direct API access to Google Trends, SEMrush, or Ahrefs. Volume and competition signals are estimates based on visible search result patterns — they are directional, not precise.
208
+ - For exact search volumes, the user would need API access to a keyword tool (can be added as a skill later).
209
+ - Google Trends data is fetched from publicly visible trend pages — availability varies by region and topic.
210
+
211
+ ## Timeout and Error Handling
212
+
213
+ - Maximum time: 15 minutes
214
+ - If a keyword returns no useful results, mark as "insufficient data" and move on
215
+ - If trend data is unavailable for a topic, note the gap
216
+ - **Never fabricate search volumes or trend data.**
@@ -31,6 +31,66 @@ This notice is mandatory for every investigation run, even if sessions already e
31
31
 
32
32
  ---
33
33
 
34
+ ## Multi-Source Orchestration
35
+
36
+ Sherlock is not a single agent — it's an orchestration layer that dispatches specialized extractors based on the crew's domain and research needs. The Architect decides which sources to activate before launching any subagents.
37
+
38
+ ### Available Sources
39
+
40
+ | Source | Extractor File | Method | Best For |
41
+ |--------|---------------|--------|----------|
42
+ | **Social** | `sherlock-instagram.md`, `sherlock-linkedin.md`, `sherlock-twitter.md`, `sherlock-youtube.md` | Browser automation (Playwright) | Reference profiles, content style analysis, competitor social audit |
43
+ | **Web** | `sherlock-web.md` | `web_search` + `web_fetch` (native) | Industry research, competitive analysis, blog/news content, technical docs |
44
+ | **SEO** | `sherlock-seo.md` | `web_search` (native) | Keyword discovery, content gap analysis, search intent mapping, trend volume |
45
+ | **Trends** | `sherlock-trends.md` | `web_search` + `web_fetch` (native) | Trending topics, cultural moments, viral patterns, audience conversations |
46
+
47
+ ### Source Selection Logic
48
+
49
+ The Architect selects sources based on the crew's purpose and domains (from `discovery.yaml`):
50
+
51
+ | Crew Type | Sources to Activate | Rationale |
52
+ |-----------|-------------------|-----------|
53
+ | **Social media content** (Instagram, LinkedIn, Twitter, YouTube) | Social + Trends | Reference profiles for style + trending topics for relevance |
54
+ | **Blog / SEO content** | Web + SEO + Trends | Web for research depth, SEO for keyword targeting, Trends for timeliness |
55
+ | **News / current events** | Web + Trends | Web for source material, Trends for what's breaking now |
56
+ | **Product launch / marketing** | Web + SEO + Trends | Web for competitive intel, SEO for positioning, Trends for cultural timing |
57
+ | **Technical / documentation** | Web | Web research is sufficient — SEO and Trends add noise for technical content |
58
+ | **Strategy / consulting** | Social + Web + Trends | Full spectrum: what competitors do (Social), what the market says (Web), what's changing (Trends) |
59
+ | **General / unspecified** | Web | Default to web — broadest coverage, no browser setup needed |
60
+
61
+ ### Dispatch Rules
62
+
63
+ 1. **Social sources require user-provided URLs** — only activate `sherlock-social` extractors when the user gave reference profile URLs during discovery. Never search for social profiles speculatively.
64
+
65
+ 2. **All other sources can be activated automatically** — the Architect decides which extractors to dispatch based on the crew's domains. No user input needed beyond the initial crew briefing.
66
+
67
+ 3. **Subagents run in parallel** — all activated extractors dispatch simultaneously as background subagents. Social extractors each get ONE subagent per profile URL. Web, SEO, and Trends get ONE subagent each (they handle multiple queries internally).
68
+
69
+ 4. **Native tools only for non-social extractors** — Web, SEO, and Trends extractors use `web_search` and `web_fetch` native tools. They do NOT need Playwright, sessions, or browser automation. This makes them faster and more reliable than social extractors.
70
+
71
+ 5. **Minimum viable dispatch** — at least one source must be activated. If the user provided no social URLs and the crew has no research domain, default to Web extractor.
72
+
73
+ ### Cross-Source Deduplication
74
+
75
+ When multiple extractors find the same content or insight:
76
+
77
+ 1. **Same URL found by Web + SEO** → Web extractor's deep analysis takes priority. SEO extractor references it for keyword data only.
78
+ 2. **Same trend found by Trends + Social** → Trends extractor's analysis takes priority (broader context). Social extractor provides the concrete example.
79
+ 3. **Same competitor found by Web + Social** → Social extractor's pattern analysis takes priority (real content). Web extractor provides market positioning context.
80
+ 4. **The consolidated analysis explicitly calls out** which findings come from which source, using the format: `[Source: {extractor} — {detail}]`
81
+
82
+ ### Consolidated Analysis Enrichment
83
+
84
+ When multiple sources are activated, the consolidated analysis gains additional dimensions:
85
+
86
+ - **Cross-source validation**: Findings confirmed by 2+ sources carry more weight
87
+ - **Source-specific patterns**: Social reveals execution patterns; Web reveals market positioning; SEO reveals demand signals; Trends reveals timing opportunities
88
+ - **Contradictions**: When sources disagree (e.g., Social shows competitors doing X, but SEO shows no one searches for X), flag as a strategic insight — the crew may have found a gap or a trap
89
+
90
+ These enrichments are applied during the Design phase when the Architect produces `consolidated-analysis.md`.
91
+
92
+ ---
93
+
34
94
  ## Browser Automation
35
95
 
36
96
  Sherlock uses Playwright CLI for browser automation. Use `npx playwright` commands to:
@@ -626,8 +686,20 @@ Sherlock detects the platform from the URL to apply the correct extractor:
626
686
  | `youtube.com` or `youtu.be` | YouTube | `sherlock-youtube.md` |
627
687
  | `x.com` or `twitter.com` | Twitter/X | `sherlock-twitter.md` |
628
688
  | `linkedin.com` | LinkedIn | `sherlock-linkedin.md` |
689
+ | Any other URL | Web | `sherlock-web.md` |
690
+
691
+ If the URL does not match any social platform, it is routed to the Web extractor — no platform-specific logic applies.
692
+
693
+ ### Non-URL Sources
694
+
695
+ Sherlock also activates extractors that do NOT require user-provided URLs:
696
+
697
+ | Source | Activated By | Extractor File |
698
+ |--------|-------------|----------------|
699
+ | SEO / Keywords | Crew domain involves content marketing, SEO, or organic growth | `sherlock-seo.md` |
700
+ | Trends / Culture | Crew domain involves social media, news, or current-events content | `sherlock-trends.md` |
629
701
 
630
- If the URL does not match any known pattern, inform the user: "I don't recognize this platform. Supported platforms: Instagram, YouTube, Twitter/X, LinkedIn."
702
+ These extractors are dispatched automatically by the Architect based on the crew type — see Multi-Source Orchestration above for the full selection matrix.
631
703
 
632
704
  ### Configuration Prompts
633
705