CL research: add research mode templates + web research to proposals and market intel

- company_proposal.yml: add 2 research phases (market + revenue) before exec summary;
  all think steps now require [Title](URL) citations; add Sources section to document
- market_intelligence.yml: add web search step (research mode) before analysis think;
  package schema adds sources array; adjudication evidence_quality now checks for citations
- research_brief.yml: new standalone 4-query deep research template; searches market,
  competitors, trends, cases; assembles annotated brief with Source Index section;
  saves to deliverables/research/; adjudication checks citation_quality (40% weight)
This commit is contained in:
David Baity
2026-04-29 09:29:57 -04:00
parent caa980ea60
commit 5fd0d7da67
3 changed files with 637 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
name: company_proposal name: company_proposal
description: "Produce a complete, board-ready business plan for a proposed new Crimson Leaf subsidiary." description: "Produce a complete, board-ready business plan for a proposed new Crimson Leaf subsidiary. Includes web research with cited sources."
debug: true debug: true
model: power model: power
sections: sections:
@@ -16,6 +16,330 @@ steps:
output_key: prior_proposals output_key: prior_proposals
optional: true optional: true
- type: think
max_tokens: 800
output_key: research_queries
hint: |
You are preparing to write a business plan.
The brief from the strategic review is in the task message above.
Generate 3 precise web search queries to gather real market data for this plan.
Focus on:
1. Market size and growth rate for this type of business
2. Competitor landscape and pricing in this niche
3. Trends and demand signals supporting this opportunity
Output ONLY a numbered list of 3 search queries. No explanation. No commentary.
Example:
1. AI content publishing market size 2025
2. automated ebook publishing competitors pricing
3. self-publishing AI tools demand trends
- type: tool
capability: Tool_WebSearcher
input_from: last_text
mode: research
max_results: 6
fetch_pages: 3
optional: true
output_key: market_research_1
- type: think
max_tokens: 600
output_key: research_query_2
hint: |
Your previous research covered market size and competitors.
Now formulate ONE focused search query to find:
- Revenue models and monetization strategies in this exact niche
- Pricing benchmarks or average deal sizes
- Customer pain points or unmet needs documented online
Output ONLY the search query. Nothing else.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
mode: research
max_results: 5
fetch_pages: 2
optional: true
output_key: market_research_2
- type: think
max_tokens: 2000
output_key: exec_summary
hint: |
You are writing a professional business plan for a proposed subsidiary.
The brief from the strategic review is in the task message above.
IMPORTANT: Use the company name, slug, and purpose EXACTLY as stated in
the brief. Do NOT rename, rebrand, or creatively reinterpret the company.
The brief was written from the mission charter -- it is authoritative.
=== PRIOR PROPOSALS (read this before writing) ===
{prior_proposals}
=== END PRIOR PROPOSALS ===
The prior proposals above are your institutional memory. Study them.
Do NOT repeat a company that was already proposed.
=== MARKET RESEARCH (primary) ===
{market_research_1}
=== END RESEARCH ===
=== MARKET RESEARCH (revenue/monetization) ===
{market_research_2}
=== END RESEARCH ===
Write the EXECUTIVE SUMMARY section. Cite specific research findings inline
using [Title](URL) markdown format wherever you reference external data.
Include:
1. PROPOSED COMPANY
- Full name and slug (EXACTLY as given in the brief)
- One-sentence purpose statement
- Which existing gap it closes
2. PROBLEM STATEMENT
What is Crimson Leaf Holdings unable to do today without this company?
Be specific. Give examples of decisions we cannot make.
3. MARKET OPPORTUNITY
Use data from the research above. Cite every statistic.
What is the addressable market? What is the growth trajectory?
What do competitors charge? What are they missing?
4. PROPOSED SOLUTION
How does this company close the gap?
What would it do in the first 30 days? First 90 days?
5. STRATEGIC FIT
How does this company advance the primary mission (profitable AI publishing)?
How does it interact with existing subsidiaries?
Write in professional business plan style. No fluff. No filler.
Every factual claim should be backed by a citation from the research.
- type: think
max_tokens: 1500
output_key: cost_model
hint: |
Write the COST MODEL AND FINANCIAL PROJECTIONS section.
Reference any pricing or market data from the research to ground your projections.
Include:
1. SETUP COSTS
- Gitea repo creation (one-time, zero API cost, ~5 minutes of Copilot time)
- Initial template development (estimate tasks * cost per task)
- Initial agent configuration
2. RECURRING OPERATIONAL COSTS
- Estimated tasks per week at steady state
- Average cost per task (power model: ~$0.05-0.15 per task typical range)
- Weekly and monthly API cost projection
3. COST-BENEFIT ANALYSIS
- What is the cost of NOT having this company? (lost revenue, blind decisions, etc.)
- What is the break-even point?
- Cite any relevant market benchmarks from the research above.
4. BUDGET CONSTRAINT CHECK
- Current Genesis Fund status: UNKNOWN (this is itself evidence for CLO need)
- Does this proposal create a self-funding loop? How?
Use real numbers from research where available. Estimate clearly where not.
- type: think
max_tokens: 1200
output_key: risk_analysis
hint: |
Write the RISK ANALYSIS AND ALTERNATIVES CONSIDERED section.
Include:
1. RISKS OF PROCEEDING
- Could this company create scope creep or distraction?
- Could it duplicate work already handled by an existing subsidiary?
Rate each risk: Low / Medium / High
2. RISKS OF NOT PROCEEDING
- What keeps getting worse if we wait another 30 days?
- Are there compounding risks?
Rate each risk: Low / Medium / High
3. COMPETITIVE RISK
Reference the competitor research above. Which competitors are already in this space?
What is their moat? Can we out-specialize them? Cite with [Title](URL).
4. ALTERNATIVES CONSIDERED
For each alternative, explain why it was rejected:
A. Solve with a new template in an existing company
B. Solve with a one-time manual report
C. Expand an existing subsidiary's charter
D. Wait -- this is not urgent enough yet
5. RECOMMENDATION
Given the above, do you still recommend proceeding?
If yes, state the minimum viable version.
- type: think
max_tokens: 2000
output_key: company_spec
hint: |
Write the PROPOSED COMPANY SPECIFICATION section.
This is the technical blueprint David and Copilot will use to build the company.
Include:
1. COMPANY RECORD
- company_id: (leave as TBD -- David assigns)
- name: (full display name)
- slug: (lowercase, underscores, e.g. crimson_leaf_operations)
- parent_company: crimson_leaf
- mission: (one sentence)
- tagline: (marketing one-liner)
- type: (operations / research / production / marketing)
- status: active
2. PROPOSED AGENTS
For each agent:
- Role title and name
- Personality and focus in 2-3 sentences
- Primary responsibilities (bullet list)
- Model recommendation: power / standard / fast
- supported_templates list
3. PROPOSED TEMPLATES (MVP set)
For each template:
- Template name and purpose
- Key steps (2-5 sentences describing the pipeline)
- Trigger: scheduled / on-demand / spawned-by
- Estimated cost per run
4. SCHEDULE
- What scheduled tasks should run? At what frequency?
- What should run on demand vs on a schedule?
5. 90-DAY SUCCESS CRITERIA
List 3-5 measurable outcomes that would confirm this company is delivering value.
Each criterion must be verifiable without subjective judgment.
6. DEPENDENCIES
- What must exist before this company can operate?
- Any data feeds, integrations, or other companies required?
- type: think
max_tokens: 7000
output_key: full_proposal
hint: |
Assemble the complete business plan from all sections already written.
Format as a professional document David will read and approve or reject.
REQUIRED STRUCTURE:
# Proposal: [Company Full Name]
Submitted by: Edgar Chen, CEO, Crimson Leaf Holdings
Task ID: {task.id}
Status: AWAITING DAVID'S APPROVAL
---
## Executive Summary
{exec_summary}
---
## Market Research Sources
List all sources cited in this document as a reference section:
- [Title](URL) -- brief note on what data was drawn from this source
---
## Cost Model and Financial Projections
{cost_model}
---
## Risk Analysis and Alternatives Considered
{risk_analysis}
---
## Proposed Company Specification
{company_spec}
---
## Signature Block
Edgar Chen certifies this proposal meets the governance requirements of the
Crimson Leaf Holdings charter:
- No existing subsidiary duplicates this charter
- No existing template or tool can solve this gap
- No proposal for this company has been submitted in the last 30 days
- A full business plan with market research is provided
This proposal requires David Baity's explicit approval before any action is taken.
No company will be created until approval is received.
Output ONLY the document content. Start with the # Proposal heading.
- type: document
source_step: 9
dest_path: "deliverables/proposals/proposal-{task.id}.md"
commit_msg: "proposal: company_proposal task={task.id}"
- type: think
max_tokens: 3000
hint: |
You just wrote a company proposal. Update the proposal index.
Read the current index content:
{prior_proposals}
Append a new entry at the bottom of the "## Submitted Proposals" section.
Use this exact format:
### [Company Full Name] -- Task {task.id}
Date: 2026-04-29
Status: AWAITING DAVID'S APPROVAL
Summary: [2-3 sentences: what was proposed, what gap it fills, key differentiator
from any prior proposals]
Output the COMPLETE updated index file content from the very beginning.
Do not truncate. Do not skip sections. Include all prior entries plus the new one.
- type: document
source_step: index_update
dest_path: "deliverables/proposals/index.md"
commit_msg: "index: add proposal {task.id} to proposal index"
- type: reply
target: channel
channel_name: "crimson_leaf:general"
hint: |
Write a brief, professional message to David announcing that a company proposal
is ready for his review.
Include:
- Which company is being proposed (name and slug)
- The core gap it addresses (one sentence)
- Key market data found (one statistic with citation)
- Where to find the full proposal (Gitea: pae/crimson_leaf/deliverables/proposals/)
- A clear request for approval or feedback
Keep it to 4-6 lines. Professional tone. No fluff.
adjudication:
enabled: false
- type: tool
action: git_read_file
params:
path: "deliverables/proposals/index.md"
output_key: prior_proposals
optional: true
- type: think - type: think
max_tokens: 2000 max_tokens: 2000
output_key: exec_summary output_key: exec_summary

View File

@@ -1,8 +1,133 @@
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." 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."
debug: true debug: true
system: agent_prompt system: agent_prompt
agent_prompt:
- "= identity.md"
sections:
- agent
- project
- rag
- roster
- deliverables
- message
- instructions
steps:
- type: think
max_tokens: 400
output_key: search_query
hint: |
You are Orion, Director of Market Intelligence at Crimson Leaf LLC.
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.
Output ONLY the search query. Nothing else.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
mode: research
max_results: 6
fetch_pages: 3
optional: true
output_key: market_data
- type: think
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.
=== WEB RESEARCH DATA ===
{market_data}
=== END RESEARCH DATA ===
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
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"
- 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: agent_prompt:
- "= identity.md" - "= identity.md"

View File

@@ -0,0 +1,186 @@
name: research_brief
description: "Deep-research a business topic and produce an annotated brief with citations. Use before writing proposals, strategies, or market plans."
debug: true
model: power
sections:
- agent
- project
- rag
- message
- instructions
steps:
- type: think
max_tokens: 600
output_key: query_plan
hint: |
You are a professional business researcher. Your task is to produce a
fully cited research brief on the following topic:
TOPIC: {message}
Plan your research. Generate exactly 4 search queries that together will
cover the topic from multiple angles:
Query 1: Market size, growth rate, and TAM
Query 2: Key players, competitors, and pricing
Query 3: Customer pain points, demand drivers, and trends
Query 4: Case studies, success stories, or failure patterns
Output ONLY a numbered list of 4 queries. No commentary.
- type: think
max_tokens: 100
output_key: q1
hint: |
Extract only query 1 from the list above. Output ONLY the query text.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
mode: research
max_results: 6
fetch_pages: 3
optional: true
output_key: research_market
- type: think
max_tokens: 100
output_key: q2
hint: |
From the original query plan:
{query_plan}
Extract only query 2. Output ONLY the query text.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
mode: research
max_results: 5
fetch_pages: 2
optional: true
output_key: research_competitors
- type: think
max_tokens: 100
output_key: q3
hint: |
From the original query plan:
{query_plan}
Extract only query 3. Output ONLY the query text.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
mode: research
max_results: 5
fetch_pages: 2
optional: true
output_key: research_trends
- type: think
max_tokens: 100
output_key: q4
hint: |
From the original query plan:
{query_plan}
Extract only query 4. Output ONLY the query text.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
mode: research
max_results: 4
fetch_pages: 2
optional: true
output_key: research_cases
- type: think
max_tokens: 6000
output_key: research_document
hint: |
You are a professional business researcher. Write a comprehensive research brief.
Use ALL of the research gathered below as your primary source material.
Cite every factual claim using [Title](URL) inline markdown links.
Do NOT invent statistics. If the research is thin on a topic, say so honestly.
TOPIC: {message}
=== MARKET SIZE AND GROWTH RESEARCH ===
{research_market}
=== COMPETITOR AND PRICING RESEARCH ===
{research_competitors}
=== TRENDS AND DEMAND RESEARCH ===
{research_trends}
=== CASE STUDIES AND PATTERNS ===
{research_cases}
Write the research brief with this structure:
# Research Brief: [Topic Title]
Date: [today]
Prepared for: Crimson Leaf Holdings
## Executive Summary
2-3 paragraph overview of the most important findings.
What does this market look like? Is it a good opportunity?
## Market Size and Growth
Specific numbers, growth rates, projections. Cite every figure.
## Competitive Landscape
Who are the players? What do they charge? What is their moat?
Where are the gaps? Cite sources.
## Demand Drivers and Customer Pain Points
What is driving demand? What problems are unsolved?
Who is the customer and what do they want? Cite sources.
## Case Studies and Evidence
Real examples of success or failure in this space.
What can Crimson Leaf learn from these? Cite sources.
## Strategic Assessment for Crimson Leaf
Given everything above, is this a viable opportunity for CL?
What is the entry strategy? What risks must be managed?
What should happen next?
## Source Index
List all sources cited in this document:
- [Title](URL)
- type: document
source_step: 8
dest_path: "deliverables/research/research-{task.id}.md"
commit_msg: "research: brief for task={task.id}"
- type: reply
target: channel
channel_name: "crimson_leaf:live-feed"
hint: |
Briefly announce that a research brief has been completed and saved.
Include: topic, number of sources cited, path in Gitea.
Keep to 2-3 lines.
adjudication:
enabled: true
pass_threshold: 80
deliverable_type: research
criteria:
citation_quality:
weight: 40
description: "Every factual claim is backed by a real citation in [Title](URL) format -- no invented statistics"
coverage_depth:
weight: 30
description: "All four research angles covered (market, competitors, trends, cases) with substantive findings"
strategic_relevance:
weight: 20
description: "Strategic assessment is specific to Crimson Leaf and actionable"
honest_gaps:
weight: 10
description: "Research gaps are acknowledged honestly rather than papered over with vague language"