feat(sprint83a): competitive_analysis template + dispatch tails + market_intelligence rewrite

- Add templates/competitive_analysis.yml: Sloane's 2x WebSearch competitor matrix pipeline
- Rewrite templates/market_intelligence.yml: 2x WebSearch, 6-section document, dispatch removed duplicate block
- Add dispatch tail to templates/opportunity_scan.yml: 2x market_intelligence enqueue_strategy
- Add dispatch tail to templates/marketing_review.yml: competitive_analysis enqueue_strategy
- Add competitive_analysis to agents/sloane/agent.yml supported_templates

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Baity
2026-04-29 12:13:31 -04:00
parent 4294018d58
commit c946ddffc7
5 changed files with 370 additions and 175 deletions

View File

@@ -33,3 +33,4 @@ supported_templates:
- boardroom - boardroom
- marketing_review - marketing_review
- strategic_review - strategic_review
- competitive_analysis

View File

@@ -0,0 +1,148 @@
name: competitive_analysis
description: "Sloane researches a specific competitor, niche, or channel gap with web search and produces a competitor matrix document with CL positioning recommendation."
debug: true
model: power
system: agent_prompt
agent_prompt:
- "= identity.md"
sections:
- agent
- project
- rag
- message
- instructions
steps:
- type: think
max_tokens: 200
output_key: search_query_1
hint: |
The competitor or market segment to research is described in the task message above.
Formulate ONE precise web search query to find:
- Direct competitors in this niche: product names, companies, pricing
- Amazon, app store, or marketplace listings for this product type
Output ONLY the search query. Nothing else.
- type: tool
capability: Tool_WebSearcher
input_from: search_query_1
mode: research
max_results: 6
fetch_pages: 3
optional: true
output_key: competitor_data_1
- type: think
max_tokens: 200
output_key: search_query_2
hint: |
Your first search found competitor products and pricing.
Now formulate ONE focused query to find:
- How competitors position and market themselves (channels, messaging, audience)
- Customer reviews, complaints, or unmet needs in this niche
Output ONLY the search query. Nothing else.
- type: tool
capability: Tool_WebSearcher
input_from: search_query_2
mode: research
max_results: 5
fetch_pages: 2
optional: true
output_key: competitor_data_2
- type: think
max_tokens: 6000
output_key: competitor_matrix
hint: |
You are Sloane, Director of Marketing & Brand Strategy at Crimson Leaf Holdings.
Produce a competitor matrix document for the niche described in the task message.
=== COMPETITOR DATA (products / pricing) ===
{competitor_data_1}
=== END COMPETITOR DATA ===
=== AUDIENCE / POSITIONING DATA ===
{competitor_data_2}
=== END AUDIENCE DATA ===
Cite every data point with [Title](URL) inline.
If research is empty, note it and use structural analysis -- do NOT invent facts.
Structure the document exactly as follows:
# Competitive Analysis: [niche/topic from task message]
---
## 1. Competitor Matrix
| Competitor | Product | Price | Audience | Strengths | Weaknesses |
|------------|---------|-------|----------|-----------|------------|
[Fill in 3-5 rows from research. Use real names and real prices where found.]
## 2. Market Gaps
- [What none of the above competitors do well]
- [Underserved audience segments]
- [Channels or formats competitors ignore]
## 3. CL Differentiation Opportunity
- Entry point: [specific niche CL could own]
- Unique angle: [what would make CL's offering distinct]
- Required capabilities: [what CL needs to execute this]
## 4. Recommended Positioning
- Target customer: [specific description]
- Core message: [one sentence value proposition]
- Primary channel: [where to reach this audience]
- Secondary channel: [backup channel]
## 5. Distribution Channels Competitors Use
[List channels found in research: social platforms, newsletters, communities, etc.]
## 6. Recommendation
PURSUE / MONITOR / PASS
Rationale: [2-3 sentences backed by data from the analysis above]
---
## Sources
[List all cited URLs with titles]
- type: document
source_step: competitor_matrix
dest_path: "deliverables/competitive-analysis/competitive-analysis-{task.id}.md"
commit_msg: "research: competitive analysis task={task.id}"
- type: close
rag_update: true
- type: reply
target: channel
channel_name: "crimson_leaf:live-feed"
hint: |
Write a 2-3 line summary of the competitive analysis just completed.
Include: what niche was analyzed, the recommendation (PURSUE/MONITOR/PASS),
and the single most important gap found.
Keep it tight and action-oriented.
adjudication:
enabled: true
pass_threshold: 70
deliverable_type: analysis
criteria:
specificity:
weight: 40
description: "Named competitors with real product/price data from web search -- not vague category descriptions"
gap_clarity:
weight: 35
description: "Market gaps clearly identified with evidence from research -- white space is specific and actionable"
actionability:
weight: 25
description: "CL positioning recommendation is concrete and feasible given current capabilities"

View File

@@ -1,6 +1,7 @@
name: market_intelligence name: market_intelligence
description: "Orion scans the macroeconomic landscape, identifies profitable niches and internal capability gaps, and produces a structured opportunity brief for the board. Uses web research for evidence grounding." description: "Orion researches a specific market opportunity with web search and produces a structured analysis document committed to Gitea. Spawned by opportunity_scan."
debug: true debug: true
model: power
system: agent_prompt system: agent_prompt
agent_prompt: agent_prompt:
@@ -10,210 +11,137 @@ sections:
- agent - agent
- project - project
- rag - rag
- roster
- deliverables
- message - message
- instructions - instructions
steps: steps:
- type: think - type: think
max_tokens: 400 max_tokens: 200
output_key: search_query output_key: search_query_1
hint: | hint: |
You are Orion, Director of Market Intelligence at Crimson Leaf LLC. The market opportunity to research is described in the task message above.
Your task is to identify profitable market opportunities for Crimson Leaf. Formulate ONE precise web search query to find:
Before deep analysis, you need real-world market data. - Market size and growth rate for this niche
- Who the key players are and what they offer
Formulate ONE precise web search query that will return the most useful
current data about market opportunities in AI-generated content, digital
publishing, or autonomous business systems.
Focus on: market size, growth rates, underserved niches, or competitive gaps.
Output ONLY the search query. Nothing else. Output ONLY the search query. Nothing else.
- type: tool - type: tool
capability: Tool_WebSearcher capability: Tool_WebSearcher
input_from: last_text input_from: search_query_1
mode: research mode: research
max_results: 6 max_results: 6
fetch_pages: 3 fetch_pages: 3
optional: true optional: true
output_key: market_data output_key: market_data_1
- type: think - type: think
max_tokens: 200
output_key: search_query_2
hint: | hint: |
You are {agent.name}, Director of Market Intelligence at Crimson Leaf LLC. Your first search covered market size and key players.
Now formulate ONE focused query to find:
- Successful products in this niche, what they charge, who buys them
- Consumer pain points or unmet needs documented online
Your job is to find what nobody else has found yet. Not trends -- vectors. Output ONLY the search query. Nothing else.
Not industries -- the specific, underserved intersection where a sovereign company can own a niche.
=== WEB RESEARCH DATA === - type: tool
{market_data} capability: Tool_WebSearcher
=== END RESEARCH DATA === input_from: search_query_2
mode: research
max_results: 5
fetch_pages: 2
optional: true
output_key: market_data_2
Use the research data above as evidence. Cite specific findings with [Title](URL) - type: think
inline wherever you reference external data. If the research is empty or unhelpful, max_tokens: 6000
note that and rely on structural analysis. output_key: market_analysis_body
Analyze the opportunity space across four lenses:
1. MACROECONOMIC SIGNAL
What large-scale forces (technology shifts, regulatory changes, platform consolidation,
demographic movement) are creating gaps in the B2B service landscape?
Cite data from the research where available.
2. PORTFOLIO DEFICIT SCAN
What capabilities does the current Crimson Leaf portfolio lack?
What requests are being delegated externally that could be internalized?
What value is leaving the portfolio that a new Tenant could capture?
3. NICHE VALIDATION
For each identified opportunity:
- Is the niche narrow enough to be owned by one sovereign Tenant?
- Is there a clearly defined customer or internal requester?
- Is there a measurable value thesis (revenue, cost reduction, strategic leverage)?
- Can this be solved by extending an existing Tenant, or does it require a new company?
- Could a deterministic tool solve this instead of a sovereign company?
4. COMPETITIVE LANDSCAPE
Who currently occupies this niche externally? (Cite sources if available.)
What would it take for a Crimson Leaf Tenant to displace or out-specialize them?
Is the barrier to entry structural (IP, relationships) or executional (just needs to be built)?
Rank opportunities by: niche_clarity x value_thesis_strength x portfolio_fit.
Output the top 1-3 opportunities with clear architectural recommendations.
- type: package
packet_type: MarketIntelligenceReport
hint: | hint: |
Serialize the intelligence findings into a structured brief. You are Orion, Director of Research at Crimson Leaf Holdings.
Only what was established above -- no new reasoning. Produce a structured market analysis document for the opportunity in the task message.
schema:
actions: === PRIMARY RESEARCH (market size / players) ===
- type: quick {market_data_1}
scan_summary: "string -- one paragraph overview of the opportunity landscape" === END PRIMARY RESEARCH ===
opportunities:
- niche: "string -- precise description of the market gap" === SECONDARY RESEARCH (products / gaps / pricing) ===
target_customer: "string -- who specifically needs this" {market_data_2}
value_thesis: "string -- measurable value created" === END SECONDARY RESEARCH ===
portfolio_fit: "string -- how this complements the existing Tenant ecosystem"
recommendation: "string -- NEW_COMPANY | EXTEND_EXISTING | TOOL_REQUEST | MONITOR" Cite every data point with [Title](URL) inline.
recommended_tenant_slug: "string -- suggested slug if NEW_COMPANY, or existing tenant if EXTEND_EXISTING" If research is empty, note it and use structural analysis -- do NOT invent statistics.
priority: "string -- HIGH | MEDIUM | LOW"
rationale: "string -- constitutional justification for the recommendation" Structure the document exactly as follows:
sources: ["string -- [Title](URL) citation used as evidence for this opportunity"]
strategic_gaps: ["string -- capability gaps in the current portfolio worth monitoring"] # Market Analysis: [opportunity name from task message]
next_action: "string -- specific recommended next step for the board"
---
## 1. Market Overview
- Total Addressable Market: [size, growth rate, source]
- Key drivers: [2-3 forces growing this market]
- Key risks: [2-3 risks or headwinds]
## 2. Target Audience
- Primary buyer: [specific demographic or job role]
- Buyer behavior: [how they discover and purchase in this niche]
- Pain points: [what they cannot get today]
## 3. Competitive Landscape
[Top 3-5 players: name | product | price | audience | strengths | weaknesses]
- White space: [what none of them do well that CL could own]
## 4. Crimson Leaf Positioning
- Recommended entry point: [specific niche within the broader market]
- Differentiation: [how CL would be distinct from existing players]
- Time-to-market: [realistic estimate given current CL capabilities]
## 5. Revenue Potential
- Conservative (12-month): [number with assumptions]
- Base case (12-month): [number with assumptions]
- Optimistic (12-month): [number with assumptions]
## 6. Recommendation
PROCEED / INVESTIGATE FURTHER / PASS
Rationale: [2-3 sentences backing the recommendation with data from above]
---
## Sources
[List all cited URLs with titles]
- type: document
source_step: market_analysis_body
dest_path: "deliverables/market-analysis/market-analysis-{task.id}.md"
commit_msg: "research: market analysis task={task.id}"
- type: close - type: close
rag_update: true rag_update: true
adjudication: - type: reply
enabled: true target: channel
pass_threshold: 85 channel_name: "crimson_leaf:live-feed"
deliverable_type: coordination
criteria:
niche_precision:
weight: 35
description: "Opportunities are narrow, specific, and genuinely differentiated -- not broad industry categories"
constitutional_discipline:
weight: 25
description: "Recommendations distinguish correctly between new company vs extend existing vs tool -- no shortcuts"
evidence_quality:
weight: 25
description: "Findings are grounded in research data and structural analysis with citations, not trend-following or narrative flair"
portfolio_coherence:
weight: 15
description: "Opportunities strengthen the portfolio without creating overlap or recursive dependency"
agent_prompt:
- "= identity.md"
sections:
- agent
- project
- rag
- roster
- deliverables
- message
- instructions
steps:
- type: think
hint: | hint: |
You are {agent.name}, Director of Market Intelligence at Crimson Leaf LLC. Write a 2-3 line summary of the market analysis just completed.
Include: topic researched, recommendation (PROCEED/INVESTIGATE FURTHER/PASS),
Your job is to find what nobody else has found yet. Not trends -- vectors. and one key data point with citation.
Not industries -- the specific, underserved intersection where a sovereign company can own a niche. Example: "Market analysis complete: [topic] -- PROCEED. [Key finding with [Title](URL)]."
Analyze the opportunity space across four lenses:
1. MACROECONOMIC SIGNAL
What large-scale forces (technology shifts, regulatory changes, platform consolidation,
demographic movement) are creating gaps in the B2B service landscape?
Identify the underlying structural cause, not just the surface symptom.
2. PORTFOLIO DEFICIT SCAN
What capabilities does the current Crimson Leaf portfolio lack?
What requests are being delegated externally that could be internalized?
What value is leaving the portfolio that a new Tenant could capture?
3. NICHE VALIDATION
For each identified opportunity:
- Is the niche narrow enough to be owned by one sovereign Tenant?
- Is there a clearly defined customer or internal requester?
- Is there a measurable value thesis (revenue, cost reduction, strategic leverage)?
- Can this be solved by extending an existing Tenant, or does it require a new company?
- Could a deterministic tool solve this instead of a sovereign company?
4. COMPETITIVE LANDSCAPE
Who currently occupies this niche externally?
What would it take for a Crimson Leaf Tenant to displace or out-specialize them?
Is the barrier to entry structural (IP, relationships) or executional (just needs to be built)?
Rank opportunities by: niche_clarity ? value_thesis_strength ? portfolio_fit.
Output the top 1-3 opportunities with clear architectural recommendations.
- type: package
packet_type: MarketIntelligenceReport
hint: |
Serialize the intelligence findings into a structured brief.
Only what was established above -- no new reasoning.
schema:
actions:
- type: quick
scan_summary: "string -- one paragraph overview of the opportunity landscape"
opportunities:
- niche: "string -- precise description of the market gap"
target_customer: "string -- who specifically needs this"
value_thesis: "string -- measurable value created"
portfolio_fit: "string -- how this complements the existing Tenant ecosystem"
recommendation: "string -- NEW_COMPANY | EXTEND_EXISTING | TOOL_REQUEST | MONITOR"
recommended_tenant_slug: "string -- suggested slug if NEW_COMPANY, or existing tenant if EXTEND_EXISTING"
priority: "string -- HIGH | MEDIUM | LOW"
rationale: "string -- constitutional justification for the recommendation"
strategic_gaps: ["string -- capability gaps in the current portfolio worth monitoring"]
next_action: "string -- specific recommended next step for the board"
- type: close
rag_update: true
adjudication: adjudication:
enabled: true enabled: true
pass_threshold: 85 pass_threshold: 70
deliverable_type: coordination deliverable_type: analysis
criteria: criteria:
niche_precision: depth:
weight: 40
description: "All 6 sections covered with specific data points -- no empty sections"
accuracy:
weight: 35 weight: 35
description: "Opportunities are narrow, specific, and genuinely differentiated -- not broad industry categories" description: "Claims backed by research citations or clearly labeled as estimates -- no invented statistics"
constitutional_discipline: actionability:
weight: 25 weight: 25
description: "Recommendations distinguish correctly between new company vs extend existing vs tool -- no shortcuts" description: "Recommendation (PROCEED/INVESTIGATE FURTHER/PASS) is specific and grounded in the analysis"
evidence_quality:
weight: 25
description: "Findings are grounded in structural analysis, not trend-following or narrative flair"
portfolio_coherence:
weight: 15
description: "Opportunities strengthen the portfolio without creating overlap or recursive dependency"

View File

@@ -50,6 +50,7 @@ steps:
- type: think - type: think
max_tokens: 6000 max_tokens: 6000
output_key: marketing_analysis
hint: | hint: |
You are Sloane, the Dealmaker. You have portfolio data and competitor research above. You are Sloane, the Dealmaker. You have portfolio data and competitor research above.
@@ -69,9 +70,48 @@ steps:
Be direct. Be brash. If marketing is dead, say "marketing is dead" and tell David Be direct. Be brash. If marketing is dead, say "marketing is dead" and tell David
exactly what to do about it. No euphemisms. exactly what to do about it. No euphemisms.
- type: think
max_tokens: 500
output_key: competitor_gap_content
hint: |
From the marketing analysis above, identify the SINGLE most actionable competitor
gap -- one specific named competitor, channel, or product category that CL does
not currently have research data on and should investigate deeply.
Write a complete competitive_analysis task brief for it. The brief will be sent
to Sloane for deep research. Include:
- Competitor name or niche to investigate
- Why this gap matters to CL right now
- What data to find (pricing, audience, channels, weaknesses)
- What CL's counter-positioning might look like
Gate: Only output a brief if you identified a SPECIFIC named competitor or gap.
If the analysis found nothing specific worth deep research, output exactly: none
Output ONLY the brief text or the word none. No preamble.
- type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "crimson_leaf"
project_slug: "incubation"
task_type: "competitive_analysis"
content: "{competitor_gap_content}"
- type: reply - type: reply
target: channel target: channel
channel_name: "crimson_leaf:general" channel_name: "crimson_leaf:general"
hint: |
Write Sloane's marketing review summary for David.
If competitor_gap_content is not "none", open with:
"Marketing review complete. Commissioned 1 competitive analysis: [topic]."
Otherwise open with: "Marketing review complete."
Then deliver the most important 2-3 action items from the analysis.
Format: "David, [verb]: [details]"
Be direct and specific. No fluff.
adjudication: adjudication:
enabled: false enabled: false

View File

@@ -51,6 +51,7 @@ steps:
- type: think - type: think
max_tokens: 6000 max_tokens: 6000
output_key: opportunity_analysis
hint: | hint: |
You are Orion, the Visionary. You have the portfolio report and web research above. You are Orion, the Visionary. You have the portfolio report and web research above.
@@ -66,9 +67,86 @@ steps:
Format action items as: "David, [verb]: [details]" Format action items as: "David, [verb]: [details]"
Be bold. Don't hedge. If an opportunity is real, say so with conviction. Be bold. Don't hedge. If an opportunity is real, say so with conviction.
- type: think
max_tokens: 600
output_key: opportunity_1_content
hint: |
From the opportunity analysis above, extract the SINGLE TOP opportunity.
Write a complete market_intelligence task brief for it. This brief will be
sent as the task message to Orion for deep research.
The brief must include:
- What the opportunity is (1-2 sentences)
- Why now (1 sentence on timing/signal)
- What market data to find (2-3 specific questions to answer)
- What CL's potential entry angle might be (1 sentence)
If the analysis found NO compelling new opportunity (all were already covered
in the portfolio or too vague), output exactly: none
Output ONLY the brief text or the word none. No preamble.
- type: think
max_tokens: 600
output_key: opportunity_2_content
hint: |
From the opportunity analysis above, extract the SECOND-BEST opportunity
(not the same as opportunity 1).
Write a complete market_intelligence task brief for it using the same format:
- What the opportunity is
- Why now
- What market data to find
- CL's potential entry angle
If there is no distinct second opportunity worth researching, output exactly: none
Output ONLY the brief text or the word none. No preamble.
- type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "crimson_leaf"
project_slug: "incubation"
task_type: "market_intelligence"
content: "{opportunity_1_content}"
- type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "crimson_leaf"
project_slug: "incubation"
task_type: "market_intelligence"
content: "{opportunity_2_content}"
- type: think
max_tokens: 100
output_key: dispatch_summary
hint: |
Count how many research tasks were commissioned this cycle.
Look at opportunity_1_content and opportunity_2_content above.
If both are not "none": output "Commissioned 2 research tasks."
If only opportunity_1_content is not "none": output "Commissioned 1 research task."
If both are "none": output "No research tasks commissioned -- no new opportunities found."
Output ONLY that sentence.
- type: reply - type: reply
target: channel target: channel
channel_name: "crimson_leaf:live-feed" channel_name: "crimson_leaf:live-feed"
hint: |
Write a 3-5 line opportunity scan summary for Orion's report.
Start with: "Opportunity scan complete. {dispatch_summary}"
Then summarize:
- The top opportunity found (or "no new opportunities" if none)
- One key market signal with a citation if available
- One portfolio gap identified
Be concise and action-oriented.
adjudication: adjudication:
enabled: false enabled: false