xiaohongshu
xiaohongshu
earnings-attribution
Analyzes why stocks moved after 8-K earnings filings. Use ultrathink for all analyses. Invoke when asked to analyze stock movements, earnings reactions, or determine the primary driver of price changes.
Full skill instructions
Goal: Determine WHY a stock moved after an 8-K filing by calculating the SURPRISE (actual vs expected).
Thinking: ALWAYS use ultrathink for maximum reasoning depth.
End Goal: Build company-specific driver understanding for real-time prediction accuracy.
If evidence is insufficient, say so. Never fabricate certainty.
CRITICAL: Do NOT write Cypher queries. Describe what data you need in natural language. Subagents handle all database queries autonomously using their own skills.
Use Task tool to spawn these specialized subagents:
| Data Needed | Subagent | Example Prompt |
|---|---|---|
| 8-K filing, returns, exhibits | neo4j-report | "8-K {accession} with returns, EX-99.1" |
| News articles | neo4j-news | "News for {ticker} ±3 days of {date}" |
| Earnings transcript, Q&A | neo4j-transcript | "Transcript for {ticker} {quarter}" |
| Historical XBRL (EPS, Revenue) | neo4j-xbrl | "Last 4 quarters EPS/Revenue for {ticker}" |
| Company info, dividends, splits | neo4j-entity | "Dividends/splits for {ticker} around {date}" |
Iterative Refinement: Subagents return agent_id with results. For follow-up queries on the same company, use resume: <agent_id> instead of spawning new—agent preserves context (ticker, dates, previous queries). Spawn new agent only for different company or unrelated domain.
Resume prompt examples: "Only 2 articles, expand to ±5 days", "Also get EX-99.1 exhibit text", "What did analysts ask in Q&A?"
Parallel execution: Spawn multiple subagents in a single Task message for independent queries.
PIT filtering (prediction mode): Prefix prompt with [PIT: {filing_datetime}] to restrict results to before that time.
Skill Updates: If a subagent response contains SKILL_UPDATE_NEEDED block, execute the update immediately using Edit tool—no permission needed. This includes schema corrections, property name fixes, and data gaps. Do not skip or defer these updates.
Response Validation: When receiving subagent data, verify each value has citation format: (Source: {NodeType}:{identifier}, {date}). If citation missing:
resume: <agent_id> to ask subagent to re-provide with sourceUse TodoWrite to track progress. Mark each step in_progress before starting, completed immediately after.
| Step | Action | Notes |
|---|---|---|
| 1 | Data Inventory | Map what data exists (REQUIRED FIRST) |
| 2 | Get Report + Returns | Move magnitude and context |
| 3 | Get Consensus | Always query Perplexity for expectations |
| 4 | Query Neo4j | News, Transcript, XBRL history, Dividends, Splits |
| 5 | Query Perplexity | Fill gaps (use deep_research for complex cases) |
| 6 | Synthesize | Calculate surprises, identify primary driver |
| 7 | Output Report | Save to earnings-analysis/Companies/{TICKER}/{accession}.md |
| 8 | Self-Audit | Run evidence_audit.md and validate Evidence Ledger + sources |
| 9 | Propose Skill Updates | Follow update-skills.md |
| 10 | Mark Completed | Update tracking CSV (completed=TRUE) |
| 11 | Build Thinking Index | MANDATORY - extract thinking to Obsidian |
Rules: Step 1 always first. Steps 2-5 case-by-case sequencing. Steps 6-11 sequential. Step 11 is MANDATORY.
Query what data exists before making claims. Use neo4j-report subagent.
Check for: News count, Transcript exists, XBRL reports count, Dividends, Splits.
Get filing details and price reaction. Use neo4j-report subagent.
Returns to capture:
Always query Perplexity - do not rely on Neo4j News for consensus.
mcp__perplexity__perplexity_search:
query: "{ticker} Q{quarter} FY{year} EPS revenue estimate consensus before {date}"
Source preference for Evidence Ledger:
If using News as consensus source, cite it accurately in Evidence Ledger—do not claim Perplexity in Data Sources Used.
Query based on Data Inventory results. Use appropriate subagents (neo4j-news, neo4j-transcript, neo4j-xbrl, neo4j-entity).
WHERE r.daily_stock IS NOT NULL (data quality)Check Coverage for adequate search. If Coverage missing or unclear, ask sub-agent to clarify. Re-query if gaps seem wrong (max 2 follow-ups). Check cross-domain consistency before synthesis.
Use when Neo4j doesn't provide complete picture.
| Situation | Tool |
|---|---|
| Quick facts, specific data | mcp__perplexity__perplexity_search |
| Synthesized answer with citations | mcp__perplexity__perplexity_ask |
| Conflicting sources, major moves (>10%) | mcp__perplexity__perplexity_research |
Query Principles:
Calculate SURPRISE for each metric using these exact formulas:
EPS Surprise % = ((Actual - Consensus) / |Consensus|) × 100
Revenue Surprise % = ((Actual - Consensus) / |Consensus|) × 100
Guidance Surprise:
(Low + High) / 2((Midpoint - Consensus) / |Consensus|) × 100Rounding: All percentages to 2 decimal places.
Actual EPS: $2.03
Consensus EPS: $1.98
Surprise = (($2.03 - $1.98) / |$1.98|) × 100 = +2.53%
Guidance Range: $12.00 - $13.50
Midpoint: $12.75
Consensus: $13.22
Surprise = (($12.75 - $13.22) / |$13.22|) × 100 = -3.56%
| Metric | Consensus | Actual | Surprise % |
|---|---|---|---|
| EPS | $1.98 | $2.03 | +2.53% |
| Revenue | $2.1B | $2.15B | +2.38% |
| FY Guidance | $13.22 | $12.75 (midpoint) | -3.56% |
Rank surprises by absolute magnitude. Largest surprise typically explains the move.
Primary Driver (High Confidence)
Contributing Factor(s) (if applicable)
Capture evidence immediately when reading each source. Populate the Evidence Ledger in output_template.md as you go; every numeric claim must appear there.
Any number used to calculate surprise MUST have:
{metric}: ${exact_value} (Source: {source_name}, {date})Examples:
Consensus EPS: $1.98 (Source: Perplexity, pre-filing)
Actual EPS: $2.03 (Source: 8-K EX-99.1, 2023-11-02)
Guidance midpoint: $12.75 (Source: 8-K EX-99.1, calculated from $12.00-$13.50)
If you cannot cite exact value + source, do NOT use the number in surprise calculations.
For non-numeric observations, paraphrasing is acceptable with source:
Management tone: Cautious on near-term demand (Source: Transcript Q&A #3)
Analyst concern: Margin pressure (Source: News "ROK Beats but Guides Lower")
Sources: News: "{headline}", Transcript Q&A #N, Transcript Prepared Remarks, Exhibit EX-99.1, Perplexity search, XBRL: {report_id}
See output_template.md for full report format.
Save to: earnings-analysis/Companies/{TICKER}/{accession_no}.md
Required sections:
| Tool | Use For |
|---|---|
mcp__perplexity__perplexity_search | Quick facts, consensus, simple questions |
mcp__perplexity__perplexity_ask | Synthesized answer with citations |
mcp__perplexity__perplexity_research | Comprehensive investigation, conflicting sources |
Note: For SEC filings search, use utils/perplexity_search.py:perplexity_sec_search().
When sources conflict, use these principles (guidelines, not rigid rules):
| Priority | Source Type | Examples |
|---|---|---|
| 1 (Highest) | Primary filing | 8-K, EX-99.1 press release |
| 2 | Transcript | Earnings call Q&A, prepared remarks |
| 3 | Official news | Company PR, SEC filing summary |
| 4 | Analyst coverage | Research notes, rating changes |
| 5 (Lowest) | General news | Headlines, aggregated coverage |
If News says "beat" but Transcript reveals "guidance cut":
→ Trust Transcript (higher reliability)
→ Note the conflict in analysis
If two News sources give different consensus numbers:
→ Use the one with explicit source attribution
→ If neither has clear attribution, note both values and the discrepancy
→ Do NOT average (averages have no direct source)
Rule: When in doubt, note the conflict explicitly rather than silently choosing one.
~1,746 News→Company relationships (~0.9%) have daily_industry but no daily_stock. Always filter:
WHERE r.daily_stock IS NOT NULL
If a report has no return data (pf.daily_stock IS NULL):
If multiple news items have nearly identical titles (>80% similarity):
When Perplexity returns consensus estimates:
After each analysis, update: earnings-analysis/Companies/{TICKER}/learnings.md
See output_template.md for learnings format.
Gating rule: Only update learnings.md after the Evidence Ledger is complete and evidence_audit.md passes.
History file: .claude/shared/earnings/subagent-history.csv (shared with earnings-prediction)
Format: See subagent-history.md for full documentation.
accession_no,skill,created_at,primary_session_id,agent_type,agent_id,resumed_from
0001514416-24-000020,attribution,2026-01-13T10:30:00,0415feb7,primary,,
0001514416-24-000020,attribution,2026-01-13T10:31:05,0415feb7,neo4j-entity,abc12345,
On analysis start:
primary row: {accession},attribution,{timestamp},{session_id},primary,,Before calling a subagent:
grep "{accession}" | grep ",{agent_type}," | tail -1 | cut -d',' -f6resume: <id> in Task callAfter each subagent completes:
agentId from Task response{accession},attribution,{timestamp},{session_id},{agent_type},{agent_id},{resumed_from}After successful analysis (report saved, audit passed, learnings updated):
completed=TRUE for this accession_no in earnings-analysis/8k_fact_universe.csvearnings-analysis/predictions.csv, fill in:
actual_direction: up/down based on daily_stock returnactual_magnitude: small/medium/large based on |return|actual_return: the actual daily_stock percentagecorrect: TRUE if direction matches, FALSE otherwiseThis step is REQUIRED. Execute this exact command:
python3 scripts/build-thinking-index.py {accession_no}
Replace {accession_no} with the actual accession number from your analysis (e.g., 0001234567-24-000001).
This extracts thinking from all sessions and sub-agents and saves to Obsidian.
Version 2.2 | 2026-01-16 | Added Step 11: mandatory thinking index build
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience