@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
@@ -0,0 +1,238 @@
1
+ # Sherlock — Trends Extractor
2
+
3
+ Load `sherlock-shared.md` before using this extractor.
4
+
5
+ This file contains the trending topics and cultural signals extraction process. The Architect loads this file (alongside `sherlock-shared.md`) when the investigation requires understanding what's trending now — what people are talking about, what's going viral, and what cultural moments the crew can tap into.
6
+
7
+ This extractor uses `web_search` and `web_fetch` native tools — no browser automation needed.
8
+
9
+ ---
10
+
11
+ ## When to Use
12
+
13
+ The Architect dispatches Sherlock-Trends when:
14
+
15
+ - The crew creates content that needs to feel current and culturally relevant
16
+ - The briefing requires "what's trending" or "what's viral right now"
17
+ - The user wants content that rides cultural waves (newsjacking, trendjacking)
18
+ - A content crew needs angle ideas grounded in current conversations
19
+ - The crew's audience is on platforms where trend velocity matters (Twitter/X, TikTok, Instagram)
20
+
21
+ ---
22
+
23
+ ## Trend Sources
24
+
25
+ Sherlock-Trends searches across multiple trend surfaces:
26
+
27
+ | Source | Method | What It Captures |
28
+ |--------|--------|-----------------|
29
+ | Twitter/X trending | `web_search "trending twitter {date}"` or `"{domain} twitter discussion"` | Real-time conversation spikes |
30
+ | GitHub trending | `web_search "github trending {domain}"` or `web_fetch github.com/trending` | Developer/tech trending repos and topics |
31
+ | Product Hunt | `web_search "product hunt trending {domain}"` or `web_fetch producthunt.com` | New product launches, tech trends |
32
+ | Hacker News | `web_search "hacker news {domain}"` or `web_fetch news.ycombinator.com` | Tech community discussions |
33
+ | Reddit | `web_search "site:reddit.com {domain} trending"` | Community discussions by subreddit |
34
+ | Google Discover / News | `web_search "{domain} news today"` | News cycle peaks |
35
+ | YouTube trending | `web_search "{domain} viral video"` or `"{domain} trending youtube"` | Video content trends |
36
+ | Industry newsletters | `web_search "{domain} newsletter roundup 2026"` | Curated weekly trends |
37
+ | Conference talks | `web_search "{domain} conference 2026 talks"` | What experts are presenting now |
38
+
39
+ ---
40
+
41
+ ## Extraction Process
42
+
43
+ ### Step 1: Broad Trend Scan
44
+
45
+ Run parallel searches across 3-4 trend surfaces most relevant to the crew's domain:
46
+
47
+ 1. **News/current events**: `"{domain}" news {current month} 2026`
48
+ 2. **Social conversation**: `"{domain}" twitter discussion` or `"people talking about {domain}"`
49
+ 3. **Community pulse**: `"site:reddit.com {domain}"` or `"site:news.ycombinator.com {domain}"`
50
+ 4. **Product/tool trends**: `"new {domain} tools 2026"` or `"best {domain} software 2026"`
51
+
52
+ Collect the top 5-8 signals from each surface. A "signal" is:
53
+ - A topic mentioned by 3+ independent sources in the last 30 days
54
+ - A term or phrase appearing in multiple headlines
55
+ - A tool/product/method getting multiple mentions
56
+ - A debate or controversy with active discussion
57
+
58
+ ### Step 2: Signal Validation
59
+
60
+ Not every trending topic is worth acting on. Validate each signal:
61
+
62
+ 1. **Velocity**: Is interest accelerating or already fading?
63
+ - Search for the topic + date range: `"{topic}" after:2026-07-01`
64
+ - Check if mentions are increasing week-over-week
65
+
66
+ 2. **Relevance**: Does this trend connect to the crew's domain?
67
+ - Direct hit: trend IS about the domain → high priority
68
+ - Adjacent: trend touches the domain tangentially → creative angle needed
69
+ - Noise: trend is unrelated → skip
70
+
71
+ 3. **Longevity**: Is this a flash in the pan or a lasting shift?
72
+ - News cycle (24-48h): act fast or skip
73
+ - Seasonal (repeats annually): plan ahead
74
+ - Structural (permanent change): highest value — build strategy around it
75
+
76
+ 4. **Audience overlap**: Would the crew's target audience care about this?
77
+ - Direct: audience is actively discussing this → high priority
78
+ - Peripheral: audience might find it interesting → medium
79
+ - Irrelevant: audience doesn't care → skip
80
+
81
+ ### Step 3: Angle Generation
82
+
83
+ For validated trends, brainstorm content angles:
84
+
85
+ 1. **Newsjacking**: How can the crew add its perspective to a breaking story?
86
+ - "X just happened — here's what it means for {audience}"
87
+ - "The {domain} perspective on {trend}"
88
+
89
+ 2. **Educational**: How can the crew explain the trend to its audience?
90
+ - "What {trend} means for {audience} in 2026"
91
+ - "5 things {audience} needs to know about {trend}"
92
+
93
+ 3. **Contrarian**: What's the opposite take?
94
+ - "Why {trend} won't matter for {audience}"
95
+ - "The {trend} hype — what nobody is talking about"
96
+
97
+ 4. **Tactical**: How can the audience act on this trend?
98
+ - "How to use {trend} for {outcome}"
99
+ - "{Steps} to take advantage of {trend} today"
100
+
101
+ ### Step 4: Trend Timeline
102
+
103
+ Map the trend lifecycle to help the crew time its content:
104
+
105
+ ```
106
+ Trend: {trend name}
107
+ ├── Emerging (now-2 weeks ago): first mentions appearing
108
+ ├── Rising (now): accelerating discussion, media picking it up ← BEST TIME TO ACT
109
+ ├── Peak (1-2 weeks from now): maximum attention, saturated coverage
110
+ ├── Declining (3-4 weeks): interest fading, late movers
111
+ └── Evergreen (ongoing): settles into background knowledge
112
+ ```
113
+
114
+ For each trend, recommend TIMING: should the crew act now (news cycle), plan for next week (rising trend), or incorporate into long-term strategy (structural shift)?
115
+
116
+ ---
117
+
118
+ ## Output
119
+
120
+ ### `raw-content.md`
121
+
122
+ ```markdown
123
+ # Raw Content: Trend Research — {domain}
124
+
125
+ Investigated: {YYYY-MM-DD}
126
+ Trend surfaces scanned: {list — Twitter/X, Reddit, GitHub, Product Hunt, Hacker News, etc.}
127
+ Total signals detected: {N}
128
+ Validated trends: {N}
129
+
130
+ ---
131
+
132
+ ## Trend 1: "{Trend Name}"
133
+
134
+ **Source:** First detected on {platform/url}
135
+ **Velocity:** {accelerating / stable / declining}
136
+ **Relevance:** {direct hit / adjacent / noise}
137
+ **Longevity:** {news cycle / seasonal / structural}
138
+
139
+ ### Signal Evidence
140
+ - {Source 1}: "{headline or excerpt}" — {date}
141
+ - {Source 2}: "{headline or excerpt}" — {date}
142
+ - {Source 3}: "{headline or excerpt}" — {date}
143
+
144
+ ### Audience Connection
145
+ {Why the crew's audience would care about this — or why they wouldn't}
146
+
147
+ ### Suggested Angles
148
+ 1. **{Angle type}**: "{draft hook or headline}"
149
+ 2. **{Angle type}**: "{draft hook or headline}"
150
+ 3. **{Angle type}**: "{draft hook or headline}"
151
+
152
+ ---
153
+
154
+ ## Trend 2: "{Trend Name}"
155
+ ...
156
+ ```
157
+
158
+ ### `pattern-analysis.md`
159
+
160
+ ```markdown
161
+ # Pattern Analysis: Trend Research — {domain}
162
+
163
+ Analyzed: {YYYY-MM-DD}
164
+ Trends detected: {N}
165
+ Validated: {N} | Noise filtered: {N}
166
+ Trend lifecycle distribution: {N} emerging, {N} rising, {N} at peak, {N} declining
167
+
168
+ ## Executive Summary
169
+ {3-5 sentences on the cultural moment — what's happening in {domain} right now,
170
+ where attention is flowing, and what the crew should act on immediately vs.
171
+ incorporate long-term}
172
+
173
+ ## Trend Map
174
+
175
+ ### Act Now (rising, high relevance, <1 week window)
176
+ | Trend | Angle | Content Urgency | Expected Shelf Life |
177
+ |-------|-------|----------------|---------------------|
178
+ | {trend} | {suggested angle} | 🔴 Immediate (24-48h) | 1 week |
179
+
180
+ ### Plan This Week (rising, medium-high relevance)
181
+ | Trend | Angle | Content Urgency | Expected Shelf Life |
182
+ |-------|-------|----------------|---------------------|
183
+ | {trend} | {suggested angle} | 🟡 This week | 2-4 weeks |
184
+
185
+ ### Build Into Strategy (structural, evergreen relevance)
186
+ | Trend | Strategic Implication | Timeline |
187
+ |-------|---------------------|----------|
188
+ | {trend} | {how this changes the crew's long-term approach} | Ongoing |
189
+
190
+ ## Trending Vocabulary
191
+
192
+ Words and phrases gaining traction in {domain} discourse:
193
+
194
+ | Term | Meaning | Trend Direction | Adopt? |
195
+ |------|---------|----------------|--------|
196
+ | "{term}" | {definition in context} | ↗️ | Yes — audience expects it |
197
+ | "{term}" | {definition} | ↗️ | Cautiously — still niche |
198
+ | "{term}" | {definition} | ↘️ | No — already dated |
199
+
200
+ ## Cultural Moments to Watch
201
+
202
+ Upcoming events, dates, and cultural moments the crew can plan content around:
203
+
204
+ | Date | Event / Moment | Relevance | Content Opportunity |
205
+ |------|---------------|-----------|-------------------|
206
+ | {date} | {event} | {why it matters for this audience} | {content idea} |
207
+
208
+ ## Recommendations for Crew
209
+
210
+ 1. **Act now — {trend}**: {specific content recommendation with angle and format}
211
+ 2. **Plan ahead — {trend}**: {specific content recommendation}
212
+ 3. **Ignore — {trend}**: {why this trending topic is a trap for this audience}
213
+ 4. **Monitor — {trend}**: {keep watching but don't act yet}
214
+ 5. **Build strategy — {trend}**: {long-term structural recommendation}
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Smart Recommendations
220
+
221
+ - **News/current events crews**: Full extraction — all 9 trend surfaces. Act on breaking trends. Emphasis on velocity and timing.
222
+ - **Content marketing crews**: Focus on structural trends + upcoming cultural moments. Less emphasis on real-time news.
223
+ - **Social media crews**: Focus on Twitter/X trends + Reddit communities + viral content patterns. Emphasis on angle generation.
224
+ - **Product/tech crews**: Focus on GitHub trending + Product Hunt + Hacker News. Emphasis on tool/methodology shifts.
225
+ - **General crews**: Top 5 trends across 3 surfaces. Quick validation pass. Actionable angles only.
226
+
227
+ ## Limitations
228
+
229
+ - This extractor does not have API access to Twitter/X trending endpoints or TikTok's algorithm. Trend signals are from public search results and may lag real-time by hours.
230
+ - Virality prediction is inherently uncertain — this extractor provides directional signals, not guarantees.
231
+ - Regional trends may not surface in English-language searches. For geo-specific trends, add location qualifiers to search queries.
232
+
233
+ ## Timeout and Error Handling
234
+
235
+ - Maximum time: 15 minutes
236
+ - If a trend surface returns no useful signals, skip it — not every domain has active trending conversations
237
+ - If trend data is thin, reduce scope: report what IS findable, note what isn't
238
+ - **Never fabricate trends or engagement numbers. "Insufficient data" is a valid finding.**
@@ -0,0 +1,220 @@
1
+ # Sherlock — Web Extractor
2
+
3
+ Load `sherlock-shared.md` before using this extractor.
4
+
5
+ This file contains the web research extraction process. The Architect loads this file (alongside `sherlock-shared.md`) when the investigation requires researching public websites, blogs, news portals, or any non-social web source.
6
+
7
+ Unlike social extractors, this extractor does NOT use browser automation — it uses `web_search` and `web_fetch` native tools for content extraction.
8
+
9
+ ---
10
+
11
+ ## When to Use
12
+
13
+ The Architect dispatches Sherlock-Web when:
14
+
15
+ - The crew needs competitive analysis from public websites
16
+ - The briefing requires industry research from blogs and news portals
17
+ - The user wants to analyze a specific company's public-facing content strategy
18
+ - The crew domain involves market research, industry trends, or technical documentation
19
+ - Reference URLs point to non-social domains (`.com`, `.org`, `.blog`, `.dev`, etc.)
20
+
21
+ ---
22
+
23
+ ## Source Coverage
24
+
25
+ Sherlock-Web can extract content from:
26
+
27
+ | Source Type | Method | Output |
28
+ |---|---|---|
29
+ | Company websites | `web_fetch` homepage + key pages | Content strategy, messaging patterns, product positioning |
30
+ | Industry blogs | `web_search` + `web_fetch` top results | Topic trends, writing style, audience engagement signals |
31
+ | News portals | `web_search` + `web_fetch` articles | Headline patterns, editorial angle, sourcing habits |
32
+ | Documentation / technical sites | `web_fetch` specific pages | Structure patterns, depth of coverage, tone |
33
+ | Landing pages / funnels | `web_fetch` key URLs | Copy patterns, CTA strategies, value proposition framing |
34
+ | Forums / communities (Reddit, Stack Overflow, etc.) | `web_search site:domain` + `web_fetch` | Discussion patterns, pain points, language used by audience |
35
+
36
+ ---
37
+
38
+ ## Extraction Process
39
+
40
+ ### Step 1: Search Strategy
41
+
42
+ Based on the crew briefing and the domains identified in `discovery.yaml`, formulate search queries that target the specific knowledge needed.
43
+
44
+ **Query formulation rules:**
45
+ - Be specific — "SaaS onboarding best practices 2026" not "SaaS"
46
+ - Use domain filters when relevant: `site:company.com strategy`
47
+ - Search for examples: `"{domain}" examples` and `"best {content type}" examples`
48
+ - Search for anti-patterns: `"{domain}" mistakes` and `"{domain}" pitfalls`
49
+ - Search for frameworks: `"{domain}" framework` and `"{domain}" methodology`
50
+
51
+ Run all searches using `web_search`. Collect 3-5 high-signal results per query — skip results that are:
52
+ - Paywalled or login-gated (can't `web_fetch`)
53
+ - Obviously low-quality (thin content, spam)
54
+ - Duplicates of already-collected sources
55
+ - Older than 2 years unless specifically researching historical context
56
+
57
+ ### Step 2: Deep Extraction
58
+
59
+ For each selected result, use `web_fetch` to retrieve full content. Extract:
60
+
61
+ 1. **Key arguments / theses**: What is the main point? What claims are made?
62
+ 2. **Evidence cited**: What data, examples, or sources are referenced?
63
+ 3. **Structure pattern**: How is the content organized? (list, narrative, framework, comparison, etc.)
64
+ 4. **Language patterns**: Vocabulary choices, tone markers, sentence style
65
+ 5. **CTA / engagement hooks**: How does the content invite action or further reading?
66
+ 6. **Unique insights**: What does this source say that others don't?
67
+
68
+ ### Step 3: Competitive Analysis (when applicable)
69
+
70
+ When the crew needs competitive intelligence:
71
+
72
+ 1. Search for competitor names + content keywords: `"{competitor}" "{topic}"`
73
+ 2. Fetch their most visible content (blog posts, landing pages, case studies)
74
+ 3. Map their content strategy: what topics do they cover? what do they avoid? what's their publishing cadence?
75
+ 4. Identify gaps: topics competitors cover weakly or not at all → these become opportunities for the crew
76
+
77
+ ---
78
+
79
+ ## Output
80
+
81
+ Sherlock-Web produces the same two output files as social extractors:
82
+
83
+ ### `raw-content.md`
84
+
85
+ ```markdown
86
+ # Raw Content: Web Research — {topic/domain}
87
+
88
+ Investigated: {YYYY-MM-DD}
89
+ Total sources analyzed: {N}
90
+ Source types: {comma-separated: blogs, news, company sites, forums}
91
+
92
+ ---
93
+
94
+ ## Source 1: "{Title or Headline}"
95
+
96
+ **URL:** {url}
97
+ **Domain:** {domain.com}
98
+ **Type:** {blog post | news article | landing page | documentation | forum thread}
99
+ **Date:** {publication date or "unknown"}
100
+
101
+ ### Summary
102
+ A 2-3 sentence objective summary of the source content.
103
+
104
+ ### Key Arguments
105
+ - {Claim or finding 1}
106
+ - {Claim or finding 2}
107
+ - {Claim or finding 3}
108
+
109
+ ### Evidence Cited
110
+ - {Source or data point 1}
111
+ - {Source or data point 2}
112
+
113
+ ### Structure
114
+ {Description of content structure — e.g., "listicle with 7 items", "narrative case study", "framework with 4 pillars"}
115
+
116
+ ### Language & Tone
117
+ - Tone: {formal/casual/authoritative/conversational/etc.}
118
+ - Notable vocabulary: {words or phrases characteristic of this source}
119
+ - Sentence style: {short punchy / long elaborate / mixed}
120
+
121
+ ### Unique Insights
122
+ {What this specific source contributes to the research — something not found elsewhere}
123
+
124
+ ---
125
+
126
+ ## Source 2: "{Title or Headline}"
127
+ ...
128
+ ```
129
+
130
+ ### `pattern-analysis.md`
131
+
132
+ ```markdown
133
+ # Pattern Analysis: Web Research — {topic/domain}
134
+
135
+ Analyzed: {YYYY-MM-DD}
136
+ Sample size: {N} sources across {N} domains
137
+ Period covered: {earliest date} to {latest date}
138
+
139
+ ## Executive Summary
140
+ {3-5 sentences on the dominant patterns, contradictions, and insights found}
141
+
142
+ ## Content Patterns
143
+
144
+ ### Topic Clusters
145
+ | Topic | Sources Covering It | Consensus or Debate? |
146
+ |-------|-------------------|----------------------|
147
+ | {topic 1} | 7 of 10 | Strong consensus — all say X |
148
+ | {topic 2} | 4 of 10 | Debate — 2 say X, 2 say Y |
149
+
150
+ ### Structural Patterns
151
+ - Most common content format: {listicle / framework / narrative / how-to / opinion}
152
+ - Average depth: {superficial — 500 words / medium — 1500 words / deep — 3000+ words}
153
+ - Evidence quality: {data-rich with citations / anecdotal / mixed}
154
+
155
+ ### Argument Patterns
156
+ - Claims everyone agrees on (safe territory):
157
+ 1. {claim}
158
+ 2. {claim}
159
+ - Claims with disagreement (opportunity for unique angle):
160
+ 1. {claim} — Side A says X, Side B says Y
161
+ 2. {claim} — Side A says X, Side B says Y
162
+
163
+ ## Language Patterns
164
+
165
+ ### Vocabulary Across Sources
166
+ Words and phrases that appear across multiple high-quality sources:
167
+ - "{phrase}" — used in {N} sources, signals {what}
168
+ - "{phrase}" — used in {N} sources, signals {what}
169
+
170
+ ### Tone Distribution
171
+ - Authoritative/Expert: {N} of {total} sources
172
+ - Conversational/Accessible: {N} of {total} sources
173
+ - Data-Driven/Analytical: {N} of {total} sources
174
+
175
+ ## Gaps and Opportunities
176
+
177
+ Topics that are under-covered or absent from top sources:
178
+ 1. **{gap}**: Why it matters and how the crew could own this space
179
+ 2. **{gap}**: Why it matters and how the crew could own this space
180
+
181
+ ---
182
+
183
+ ## Source Quality Assessment
184
+
185
+ | Source | Depth | Evidence Quality | Originality | Overall |
186
+ |--------|-------|-----------------|-------------|---------|
187
+ | {source 1} | High | Data-rich | High | ★★★★★ |
188
+ | {source 2} | Medium | Anecdotal | Medium | ★★★ |
189
+ | {source 3} | Low | None | Low | ★ |
190
+
191
+ ---
192
+
193
+ ## Recommendations for Crew
194
+
195
+ Five actionable recommendations based on web research patterns:
196
+
197
+ 1. **[Recommendation]**: {Details with source references}
198
+ 2. **[Recommendation]**: {Details with source references}
199
+ 3. **[Recommendation]**: {Details with source references}
200
+ 4. **[Recommendation]**: {Details with source references}
201
+ 5. **[Recommendation]**: {Details with source references}
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Smart Recommendations
207
+
208
+ Sherlock-Web recommends extraction depth based on crew type:
209
+
210
+ - **Content creation crews**: Focus on topic clusters + language patterns. Extract hooks, CTAs, and structural patterns from top-performing content in the niche. 3-5 sources per query.
211
+ - **Strategy/analysis crews**: Deep extraction — 5-8 sources per query. Focus on competitive gaps, argument patterns, and evidence quality.
212
+ - **Technical/research crews**: Prioritize documentation sites and authoritative sources. Extract frameworks, methodologies, and technical vocabulary.
213
+ - **General crews**: Balanced — 3-5 sources, mix of breadth and depth.
214
+
215
+ ## Timeout and Error Handling
216
+
217
+ - Maximum time per web research session: 15 minutes. Web search + fetch is faster than browser automation.
218
+ - If `web_fetch` fails for a URL (paywall, 403, timeout), skip and note in raw-content.md: "[Skipped: URL inaccessible — {reason}]"
219
+ - If search returns no results, broaden the query once. If still empty, report the gap — don't fabricate.
220
+ - **Never fabricate data. Never declare success over empty results.**