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

@@ -1,6 +1,7 @@
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
model: power
system: agent_prompt
agent_prompt:
@@ -10,210 +11,137 @@ sections:
- agent
- project
- rag
- roster
- deliverables
- message
- instructions
steps:
- type: think
max_tokens: 400
output_key: search_query
max_tokens: 200
output_key: search_query_1
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.
Before deep analysis, you need real-world market data.
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.
Formulate ONE precise web search query to find:
- Market size and growth rate for this niche
- Who the key players are and what they offer
Output ONLY the search query. Nothing else.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
input_from: search_query_1
mode: research
max_results: 6
fetch_pages: 3
optional: true
output_key: market_data
output_key: market_data_1
- type: think
max_tokens: 200
output_key: search_query_2
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.
Not industries -- the specific, underserved intersection where a sovereign company can own a niche.
Output ONLY the search query. Nothing else.
=== WEB RESEARCH DATA ===
{market_data}
=== END RESEARCH DATA ===
- type: tool
capability: Tool_WebSearcher
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)
inline wherever you reference external data. If the research is empty or unhelpful,
note that and rely on structural analysis.
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
- type: think
max_tokens: 6000
output_key: market_analysis_body
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"
sources: ["string -- [Title](URL) citation used as evidence for this opportunity"]
strategic_gaps: ["string -- capability gaps in the current portfolio worth monitoring"]
next_action: "string -- specific recommended next step for the board"
You are Orion, Director of Research at Crimson Leaf Holdings.
Produce a structured market analysis document for the opportunity in the task message.
=== PRIMARY RESEARCH (market size / players) ===
{market_data_1}
=== END PRIMARY RESEARCH ===
=== SECONDARY RESEARCH (products / gaps / pricing) ===
{market_data_2}
=== END SECONDARY RESEARCH ===
Cite every data point with [Title](URL) inline.
If research is empty, note it and use structural analysis -- do NOT invent statistics.
Structure the document exactly as follows:
# Market Analysis: [opportunity name from task message]
---
## 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
rag_update: true
adjudication:
enabled: true
pass_threshold: 85
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
- type: reply
target: channel
channel_name: "crimson_leaf:live-feed"
hint: |
You are {agent.name}, Director of Market Intelligence at Crimson Leaf LLC.
Your job is to find what nobody else has found yet. Not trends -- vectors.
Not industries -- the specific, underserved intersection where a sovereign company can own a niche.
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
Write a 2-3 line summary of the market analysis just completed.
Include: topic researched, recommendation (PROCEED/INVESTIGATE FURTHER/PASS),
and one key data point with citation.
Example: "Market analysis complete: [topic] -- PROCEED. [Key finding with [Title](URL)]."
adjudication:
enabled: true
pass_threshold: 85
deliverable_type: coordination
pass_threshold: 70
deliverable_type: analysis
criteria:
niche_precision:
depth:
weight: 40
description: "All 6 sections covered with specific data points -- no empty sections"
accuracy:
weight: 35
description: "Opportunities are narrow, specific, and genuinely differentiated -- not broad industry categories"
constitutional_discipline:
description: "Claims backed by research citations or clearly labeled as estimates -- no invented statistics"
actionability:
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 structural analysis, not trend-following or narrative flair"
portfolio_coherence:
weight: 15
description: "Opportunities strengthen the portfolio without creating overlap or recursive dependency"
description: "Recommendation (PROCEED/INVESTIGATE FURTHER/PASS) is specific and grounded in the analysis"