Codex adapter note
This skill is generated from
so Claude Code and Codex users share one canonical workflow.
- Treat as the user's request in the current Codex thread.
- When the source mentions Claude-only surfaces such as Task, Agent, WebSearch, Bash, Read, or Write, use the closest Codex capability available in this session: subagents when available, web search when needed, shell commands for local tools, and normal file edits for workspace files.
- Use shared project tools from in this repository. Prefer running commands from the repository root with paths like
python3 tools/financial_rigor.py ...
; if the current thread starts outside the repo, locate the actual checkout path first instead of assuming a fixed home-directory path.
- Before starting research, run the command to confirm today's date; treat it as the baseline for "latest" data and state the data cutoff date in the report header. Never assume the current date from training data.
- Preserve the research quality rules from : cross-check financial data, use exact arithmetic tools for valuation/math, and clearly label uncertainty and source gaps.
Investment Thesis Drift Detection: Distinguish Between Fact Changes and Wording Changes
Perform investment thesis drift detection on $ARGUMENTS.
Supported Input Formats:
Company Name Old Report Path New Report Path
— Specify two research reports or thesis snapshots for comparison
Company Name reports/{Company Name}-thesis-old-date.md reports/{Company Name}-thesis-new-date.md
— Compare two dated thesis snapshots
- — Automatically find
reports/{Company Name}-thesis.md
and historical snapshots in the same directory; if no baseline exists, proceed to missing baseline handling
"When the facts change, I change my mind. What do you do?" — John Maynard Keynes
"Stock price fluctuations are not thesis drift; only fact changes are." — AI Berkshire
Design Philosophy
The hardest part of long-term holding is not reading the news every day, but distinguishing three things:
- Fact Changes: Verifiable changes in revenue, profit margins, competitive landscape, management behavior, and capital allocation
- Price Changes: Changes in market sentiment or valuation multiples, but the business itself remains unchanged
- Wording Changes: Two reports express differently, but the underlying evidence and judgments remain unchanged
The goal of investment thesis drift detection is: Only acknowledge thesis changes when evidence changes. Do not create drift just because the report is rewritten, nor misjudge fundamentals because of stock price fluctuations.
This Skill relies on structured dimensions output by
: core assumption list, red line list, valuation anchor, tracking record table. If these structures are not available, first complete the baseline before performing drift detection.
Execution Process
Step 1: Determine Operation Mode
- If two report paths are provided → Enter Specified Report Comparison mode
- If only the company name is provided → Find
reports/{Company Name}-thesis.md
and historical snapshots, enter Automatic Snapshot Comparison mode
- If only one report is found or no historical baseline exists → Enter Missing Baseline Handling mode
- If the two reports are not for the same company → Stop and ask the user to confirm, do not make cross-company drift judgments
Mode A: Specified Report Comparison
A1: Read and Validate Two Reports
Read the old and new reports, extract:
- Report date, company name, stock symbol
- Core thesis (5 sentences)
- Core assumption list
- Red line list
- Valuation anchor
- Tracking record table
- Management quality judgment
- Competitive moat judgment
- Current recommended action (Buy / Hold / Watch / Reduce / Exit)
If the report lacks key structures, mark "Structure Missing" first, but still try to extract evidence from the text as much as possible; mark dimensions that cannot be extracted as "Cannot Judge", do not fabricate conclusions.
A2: Evidence Normalization
Organize the factual evidence from the two reports into the same table:
| Dimension | Old Report Evidence | New Report Evidence | Data Source | Verifiable |
|---|
| Valuation Anchor | | | | |
| Core Assumptions | | | | |
| Red Lines | | | | |
| Management Quality | | | | |
| Competitive Moat | | | | |
Only compare evidence, not writing style. If the old and new reports are just synonymous rewrites, order changes, or tone changes, but the factual data and judgment thresholds have not changed, judge as Unchanged.
A3: Numerical and Valuation Verification
All numerical changes must be accurately calculated using
, LLM mental calculation is prohibited:
bash
python3 tools/financial_rigor.py verify-valuation \
--price {Current Price} \
--eps {EPS} \
--bvps {Book Value Per Share} \
--fcf-per-share {Free Cash Flow Per Share}
To calculate market capitalization, percentage changes, target price differences, or scenario valuations, use:
bash
python3 tools/financial_rigor.py verify-market-cap --price {Price} --shares {Shares Outstanding} --reported {Reported Market Cap} --currency {Currency}
python3 tools/financial_rigor.py cross-validate --field {Field} --values '{JSON}' --unit {Unit}
python3 tools/financial_rigor.py three-scenario --price {Price} --eps {EPS} --shares {Shares Outstanding (100M)} --growth {Optimistic} {Neutral} {Pessimistic} --pe {Optimistic PE} {Neutral PE} {Pessimistic PE}
python3 tools/financial_rigor.py calc --expr '{Precise Formula}'
Key financial data must be cross-validated with at least two independent sources. Numbers with insufficient sources, inconsistent calibers, or unreviewable must be marked as "Low Confidence / To Be Verified".
A4: Drift Judgment by Dimension
Use the following fixed dimensions, do not add or remove temporarily:
| Dimension | Judgment Focus | Improved | Unchanged | Weakened |
|---|
| Valuation Anchor | Intrinsic value, PE/PB/FCF Yield, margin of safety, target price range | Margin of safety expands or intrinsic value is revised upward and verified by tools | Valuation range and margin of safety have no substantial changes | Margin of safety narrows, intrinsic value is revised downward, or valuation assumptions fail |
| Core Assumption List | Revenue growth rate, profit margin, cash flow, verifiable assumptions such as users/orders/capacity | More assumptions are strengthened by new evidence | Assumption status is basically consistent with evidence | Assumptions are marginally weakened, damaged, or broken |
| Red Line List | Integrity, regulation, business decline, competitive breakthrough, abnormal management actions | Original red line risks are eliminated or significantly reduced | Not triggered and risk level remains unchanged | Red line is triggered or trigger probability increases |
| Management Quality | Integrity, capital allocation, share repurchases and dividends, execution, shareholder friendliness | New behaviors increase trust | Behaviors continue old judgments | Behaviors damage trust or capital allocation deteriorates |
| Competitive Moat | Market share, pricing power, network effects, cost advantages, substitution threats | Moat widens or competitive advantages are verified | Competitive landscape has no substantial changes | Moat is weakened or competitors break through |
Each dimension can only give three types of conclusions: Improved / Unchanged / Weakened.
A5: Evidence-Driven Rules
Each non-Unchanged conclusion must cite specific new evidence that caused the change:
- Financial statement items: e.g., revenue growth rate, gross profit margin, operating cash flow, repurchase amount, net cash
- Regulatory disclosures: e.g., 10-K/20-F, annual report, interim report, HKEX announcement, SEC filing
- News events: e.g., management changes, regulatory penalties, major customer loss, competitor breakthroughs
- Price and valuation: Must explain whether this is "valuation change" or "fundamental change", cannot confuse the two
If no evidence can be found to explain the change, must judge as Unchanged or Cannot Judge, cannot infer drift from wording differences.
A6: Output Drift Report
Report Structure
I. Comparison Objects and Time Span
II. Overall Conclusion: Is the Thesis Drifting?
III. Dimension Drift Table
IV. Evidence Difference Details
V. Valuation and Numerical Verification
VI. Recommended Action Migration
VII. Uncertain Items and Required Supplementary Sources
VIII. Key Focus for Next Tracking
Dimension Drift Table
| Dimension | Old Judgment | New Judgment | Drift Direction | Trigger Evidence | Confidence |
|---|
| Valuation Anchor | | | Improved / Unchanged / Weakened | | High/Medium/Low |
| Core Assumption List | | | Improved / Unchanged / Weakened | | High/Medium/Low |
| Red Line List | | | Improved / Unchanged / Weakened | | High/Medium/Low |
| Management Quality | | | Improved / Unchanged / Weakened | | High/Medium/Low |
| Competitive Moat | | | Improved / Unchanged / Weakened | | High/Medium/Low |
For Unchanged rows, write in Trigger Evidence, do not fabricate evidence for filling the table.
Overall Conclusion Must Answer
- Is the thesis drifting? No Drift / Positive Drift / Negative Drift / Insufficient Evidence to Judge
- Where does the drift come from? Valuation / Fundamentals / Management / Competitive Landscape / Red Line Event
- Is it a fact change or a price change? Clearly explain separately
- How to migrate recommended actions? e.g., Watch → Buy, Buy → Hold, Hold → Reduce, Reduce → Exit
- What evidence is needed next? Next financial report / Regulatory disclosure / Management explanation / Competitor data
Mode B: Automatic Snapshot Comparison
B1: Find Snapshots
reports/{Company Name}-thesis.md
reports/{Company Name}-thesis-*.md
- Reports containing "thesis", "论文", or "追踪" in the directory
Select the earliest file with a complete structure as the old report, and the latest file as the new report. If the user specifies a date, follow the user's specification.
B2: Prevent Incorrect Pairing
Before comparison, must confirm:
- Company name or stock symbol is consistent
- Report dates are different
- Both reports contain extractable thesis structures or research conclusions
If it cannot be confirmed that they are for the same company, stop and ask the user to provide a clear path.
B3: Execute Mode A
After finding two valid snapshots, fully execute Mode A.
Mode C: Missing Baseline Handling
If only one report is found or no old snapshots are found:
- Clearly state: Missing comparable historical baseline, cannot perform drift detection
- Do not fabricate an old thesis based on memory or market impressions
- Guide the user to first establish a structured baseline using
/thesis-tracker {Company Name} Establish Thesis
- If the current report is complete enough, suggest saving it as
reports/{Company Name}-thesis.md
as the baseline for future drift detection
Output format:
Cannot perform thesis drift detection: Missing historical baseline.
Found:
- Current Report: {Path / Not Found}
- Historical Baseline: Not Found
Recommendations:
1. First run /thesis-tracker {Company Name} Establish Thesis
2. After the next financial report or major event, run /thesis-drift {Company Name} Old Report New Report
Key Principles
- Evidence takes precedence over wording — Synonymous rewrites are not drift; only changes in factual evidence are drift
- Fundamentals take precedence over stock price — Stock price fluctuations only affect valuation anchors, do not automatically change business quality
- Numerical values must be verified — All percentages, valuation multiples, and target price differences must use
- Mark uncertainty when uncertain — Do not force a judgment when sources are missing, calibers are inconsistent, or unreviewable
- Red lines are handled separately — Red line triggering takes priority over cheap valuation, cannot be covered by low PE
- Output must be reproducible — Each Improved / Weakened conclusion must be traceable to specific evidence