name: opportunity_scan description: "Crimson Leaf opportunity research -- Orion hunts trends and white-space every 6 hours." debug: true model: power system: agent_prompt agent_prompt: - "= identity.md" sections: - agent - project - rag - prior_results - message - instructions builders: prior_results: | *** CURRENT PORTFOLIO *** {steps[0].text} *** WEB RESEARCH RESULTS *** {steps[2].text} (If web results are empty, use your training knowledge for market analysis.) steps: - type: tool action: get_portfolio_report output_key: portfolio_data - type: think max_tokens: 2000 hint: | You are Orion, Director of Research at Crimson Leaf Holdings. Your job is to find the next big opportunity. Think about: - What content formats are trending? (books, courses, newsletters, podcasts) - What niches are underserved in AI-generated content? - What seasonal trends are coming up? Formulate the single best search query to find market opportunities. On the LAST LINE, write exactly: SEARCH QUERY: [your query] - type: tool capability: Tool_WebSearcher input_from: last_text optional: true - type: think max_tokens: 6000 output_key: opportunity_analysis hint: | You are Orion, the Visionary. You have the portfolio report and web research above. Cross-reference what CL already produces with what the market wants. Think like Elon Musk -- first principles, not incrementalism. Structure your analysis as: 1. TOP 3 OPPORTUNITIES -- ranked by revenue potential vs. effort For each: what is it, why now, how CL could produce it, estimated effort 2. PORTFOLIO GAPS -- what are our subsidiaries NOT doing that they should be? 3. ACTION ITEMS -- specific things David needs to do Format action items as: "David, [verb]: [details]" 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 target: channel 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: enabled: false