一键导入
plan-execute
Plan Mode — Orchestrator oversees workflow design, execution, autonomous loop, and review. Activated when told "in plan mode."
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Plan Mode — Orchestrator oversees workflow design, execution, autonomous loop, and review. Activated when told "in plan mode."
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Natural language queries to the knowledge graph. Search past reports, screenings, trades, research, and market context.
Investment note management. Record, retrieve, and delete investment theses, concerns, and lessons.
Deep research on stocks, industries, markets, and business models. Integrates Grok API (X/Web search) and yfinance for multi-angle analysis reports.
Undervalued stock screening. EquityQuery-based screening without a predefined stock list. Searches for undervalued stocks across 60+ regions including Japan, US, ASEAN, Hong Kong, Korea, and Taiwan using P/E, P/B, dividend yield, ROE, and more.
Portfolio management. Display holdings, record trades, and analyze portfolio structure. Input data foundation for stress tests.
Detailed report for individual stocks and ETFs. Generates a financial analysis report from a ticker symbol. Individual stocks show valuation, undervaluation score, and shareholder return rate. ETFs show expense ratio, AUM, and fund size.
| name | plan-execute |
| description | Plan Mode — Orchestrator oversees workflow design, execution, autonomous loop, and review. Activated when told "in plan mode." |
| user_invocable | true |
The Orchestrator leads a 7-agent team to carry out workflow design → execution → autonomous loop → review.
Phrases such as "in plan mode," "plan it," "make a plan," "execute in plan mode," etc.
| Agent | Type | Role | Participation |
|---|---|---|---|
| Orchestrator | Parent + Facilitator | Plan formulation, execution instructions, result evaluation, autonomous loop judgment, review integration | Always |
| Context Analyst | Execution support | Pre-analyzes historical context of financial markets + macro environment as a unit (leverages LLM knowledge) | On investment decisions |
| Strategist | Plan | Workflow design. Designs options from 4 perspectives: Growth / Value / Macro / Contrarian | Always |
| Lesson Checker | Plan | Checks whether past lessons (constraints) are reflected in the workflow | Always |
| Devil's Advocate | Plan | Points out blind spots, biases, oversights, and contrarian perspectives | Always |
| Quantitative Reviewer | Review | Quantitative checks + Gate Keeper function (numerical consistency, tax costs, currency allocation, lot size, constraint satisfaction, confirmation that all steps were executed) | Always |
| Qualitative + Risk Reviewer | Review | Qualitative checks (thesis alignment, respecting conviction, catalysts) + risk (geopolitical, macro, market overheating, PF structure, stock-specific) | Always |
[1/6] Retrieving context...
[2/6] Designing workflow...
[3/6] Executing analysis...
[4/6] Evaluating results (autonomous loop)...
[5/6] Reviewing...
[6/6] Generating final report...
python3 scripts/get_context.py "<user input>" to retrieve graph contextpython3 scripts/extract_constraints.py "<user input>" to get lesson constraints (when an investment decision is possible)config/user_profile.yaml (use defaults if file does not exist)get_context.py for each stock likely to be an action target to retrieve past memos, theses, and lessons.| Category | Examples |
|---|---|
| Market cycle | "Fed rate hikes in 2022 caused growth stocks -30%"; "15 months after hike pause: +15%" |
| Theme history | "AI theme started in 2023, bubble concerns in 2024, re-evaluated on real demand in 2025" |
| Bubble patterns | "Dot-com bubble (2000) P/E >100 vs. current AI semiconductor P/E >100" |
| Geopolitical precedents | "2018 US-China trade war: AMZN -20%"; "2022 Russia-Ukraine: energy surge" |
| F&G history | "Average correction after F&G >80 sustained for 1 month: -8%, recovery 45 days" |
| Rate cycle | "Between rate hike pause and first cut, equities historically perform well" |
Launch Strategist + Lesson Checker + Devil's Advocate in parallel.
The Strategist designs the workflow from 4 perspectives (not separate agents — one agent with 4 perspectives):
The Orchestrator integrates results from the 3 agents and revises the workflow if Lesson Checker returns FAIL (up to 2 times).
Execute skills/scripts sequentially according to the plan.
The Orchestrator evaluates execution results and autonomously performs additional execution and plan revisions as needed.
| Evaluation Result | Action |
|---|---|
| No issues | Proceed to Phase 5 (Review) |
| Information gap detected | Run additional scripts pinpoint → return to Phase 4 |
| New fact revealed (earnings date, etc.) | Revise plan → return to Phase 3 |
| Action candidate detected | Auto-run what-if and generate numerical proposal → return to Phase 4 |
Example 1: Earnings date discovered Phase 3 runs health → Phase 4 reveals "NFLX earnings are today" → Orchestrator: "Remove NFLX take-profit from plan" → return to Phase 3 and re-execute with revised plan
Example 2: Unrealized gain concentration detected Phase 3 runs health → Phase 4 detects "AMZN unrealized gains 68% concentrated" → Orchestrator: auto-runs what-if --remove "AMZN:5" and "AMZN:7" → generates comparison table → proceed to Phase 5
Example 3: Theme gap detected Phase 3 runs health → Phase 4 detects "AI theme only, all other themes at 0%" → Orchestrator: adds theme-specific candidate screening → proceed to Phase 5
| Priority | Method | Time | Use Case |
|---|---|---|---|
| 1st | WebSearch | Seconds | Immediate confirmation of earnings results, news, breaking news |
| 2nd | yfinance | Seconds | Stock prices, financial data, earnings date retrieval |
| 3rd | run_research.py | 30-60s | Deep research via Grok API (only when detail is needed) |
Launch Quantitative Reviewer + Qualitative/Risk Reviewer in parallel.
| Check | Verdict |
|---|---|
| Were all Orchestrator steps executed? | PASS/FAIL |
| Is there an action proposal when an issue is detected? | PASS/FAIL |
| Does the proposal include share count, amount, and tax cost? | PASS/FAIL |
| Are lot sizes correct? (Japan: 100 shares, SGX: 100 shares, etc.) | PASS/FAIL |
| Does currency allocation stay within 60% limit? | PASS/FAIL |
| Are user_profile assumptions referenced? | PASS/FAIL |
| Numerical consistency (what-if fund balance, HHI changes, etc.)? | PASS/FAIL |
| Is tax cost calculation accurate (including purchase FX rate)? | PASS/FAIL |
Qualitative checks:
Risk checks:
All PASS → Orchestrator presents the final report in the following 8-section structure.
Each Phase passes the following required fields to the next Phase:
| Phase | Required Output |
|---|---|
| Phase 1 | context, constraints[], user_profile, upcoming_events[] |
| Phase 2 | workflow_steps[], lesson_check: PASS/FAIL, devils_advocate_concerns[] |
| Phase 3 | health_results, screening_candidates[], what_if_results[], market_data |
| Phase 4 | revised_plan?, additional_findings[], action_proposals[], autonomous_research[] |
| Phase 5 | quantitative: PASS/FAIL + reasons[], qualitative: PASS/FAIL + reasons[] |
| Phase 6 | Required 8-section report |
| Phase | Max Count | On Exceeding |
|---|---|---|
| Phase 2 Lesson Checker FAIL | 2 times | Continue with WARN |
| Phase 4 Autonomous Loop | 2 times | Proceed to Phase 5 |
| Phase 5 Review FAIL | 2 times | Output with WARN |
3rd FAIL is cut off: "⚠️ The following items are unresolved but results are presented"
| Detection | Auto-Proposal |
|---|---|
| Unrealized gains concentrated in 1 stock at >50% of PF unrealized gains | Specific partial take-profit plan (share count, sale proceeds, estimated tax cost) |
| RSI >70 + dead cross occurring simultaneously | Specific take-profit review plan (how many shares to sell, net after-tax proceeds) |
| Shareholder return rate declining for 3+ consecutive years | Specific sell plan (full sell or replacement candidate screening) |
| EXIT judgment in health check | Sell + screen 3 replacement candidates in same sector/theme |
| Theme gap | Present top 3 candidates by theme (with minimum investment amount) |
| F&G >80 + new buy-add proposal | Attach "market overheating" warning. Present comparison with cash-preservation strategy |
All action proposals must include the following together:
Candidate stock list must include:
Convene Context Analyst and run the full 3-agent parallel Plan Phase when any of the following apply:
extract_constraints.py returns action_type: swap_proposal / new_buy / sell / rebalance / adjustFor information queries only (snapshot, analyze, health, etc.), Context Analyst is not needed and Plan Phase can run in lightweight mode (Strategist only).
| Skill | Script | Purpose |
|---|---|---|
| screen-stocks | run_screen.py | Screening |
| stock-report | generate_report.py | Individual stock report |
| stock-portfolio | run_portfolio.py | PF management (snapshot/analyze/health/forecast/what-if/adjust/rebalance/simulate/review) |
| stress-test | run_stress_test.py | Stress test |
| market-research | run_research.py | Market / industry / stock research |
| watchlist | manage_watchlist.py | Watchlist |
| investment-note | manage_note.py | Investment memos |
| graph-query | run_graph_query.py | Knowledge graph search |
| — | market_dashboard.py | Market conditions dashboard |
| — | get_context.py | Graph context retrieval |
| — | extract_constraints.py | Lesson constraint extraction |
基于 SOC 职业分类