alphacouncil-agent 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/.claude/agents/alphacouncil-bear_researcher.md +39 -0
  2. package/.claude/agents/alphacouncil-bull_researcher.md +40 -0
  3. package/.claude/agents/alphacouncil-earnings_deep_dive.md +49 -0
  4. package/.claude/agents/alphacouncil-forward_expectations.md +48 -0
  5. package/.claude/agents/alphacouncil-ib_event_analysis.md +40 -0
  6. package/.claude/agents/alphacouncil-insider_sec.md +39 -0
  7. package/.claude/agents/alphacouncil-macro_regime.md +31 -0
  8. package/.claude/agents/alphacouncil-market_data.md +37 -0
  9. package/.claude/agents/alphacouncil-market_narrative.md +45 -0
  10. package/.claude/agents/alphacouncil-news_industry_management.md +49 -0
  11. package/.claude/agents/alphacouncil-portfolio_manager.md +22 -0
  12. package/.claude/agents/alphacouncil-quant_factor.md +38 -0
  13. package/.claude/agents/alphacouncil-social_pulse.md +49 -0
  14. package/.claude/agents/alphacouncil-valuation_long_short.md +45 -0
  15. package/.claude-plugin/marketplace.json +30 -0
  16. package/.claude-plugin/plugin.json +28 -0
  17. package/.codex-plugin/plugin.json +32 -0
  18. package/.grok/agents/alphacouncil-bear_researcher.md +41 -0
  19. package/.grok/agents/alphacouncil-bull_researcher.md +42 -0
  20. package/.grok/agents/alphacouncil-earnings_deep_dive.md +50 -0
  21. package/.grok/agents/alphacouncil-forward_expectations.md +49 -0
  22. package/.grok/agents/alphacouncil-ib_event_analysis.md +41 -0
  23. package/.grok/agents/alphacouncil-insider_sec.md +40 -0
  24. package/.grok/agents/alphacouncil-macro_regime.md +32 -0
  25. package/.grok/agents/alphacouncil-market_data.md +38 -0
  26. package/.grok/agents/alphacouncil-market_narrative.md +46 -0
  27. package/.grok/agents/alphacouncil-news_industry_management.md +50 -0
  28. package/.grok/agents/alphacouncil-portfolio_manager.md +24 -0
  29. package/.grok/agents/alphacouncil-quant_factor.md +39 -0
  30. package/.grok/agents/alphacouncil-social_pulse.md +50 -0
  31. package/.grok/agents/alphacouncil-valuation_long_short.md +46 -0
  32. package/.grok/config.toml +4 -0
  33. package/.mcp.json +11 -0
  34. package/.opencode/agent/alphacouncil-bear_researcher.md +45 -0
  35. package/.opencode/agent/alphacouncil-bull_researcher.md +46 -0
  36. package/.opencode/agent/alphacouncil-earnings_deep_dive.md +54 -0
  37. package/.opencode/agent/alphacouncil-forward_expectations.md +53 -0
  38. package/.opencode/agent/alphacouncil-ib_event_analysis.md +45 -0
  39. package/.opencode/agent/alphacouncil-insider_sec.md +44 -0
  40. package/.opencode/agent/alphacouncil-macro_regime.md +36 -0
  41. package/.opencode/agent/alphacouncil-market_data.md +42 -0
  42. package/.opencode/agent/alphacouncil-market_narrative.md +50 -0
  43. package/.opencode/agent/alphacouncil-news_industry_management.md +54 -0
  44. package/.opencode/agent/alphacouncil-portfolio_manager.md +28 -0
  45. package/.opencode/agent/alphacouncil-quant_factor.md +43 -0
  46. package/.opencode/agent/alphacouncil-social_pulse.md +54 -0
  47. package/.opencode/agent/alphacouncil-valuation_long_short.md +50 -0
  48. package/AGENTS.md +96 -0
  49. package/CHANGELOG.md +112 -0
  50. package/CLAUDE.md +144 -0
  51. package/LICENSE +21 -0
  52. package/README.ja.md +282 -0
  53. package/README.md +361 -0
  54. package/README.zh-CN.md +282 -0
  55. package/data/industry-map.json +74 -0
  56. package/docs/attribution.md +99 -0
  57. package/docs/personas.md +59 -0
  58. package/docs/report-contract.md +110 -0
  59. package/mcp/lib/codex.mjs +152 -0
  60. package/mcp/lib/constants.mjs +139 -0
  61. package/mcp/lib/council-options.mjs +111 -0
  62. package/mcp/lib/errors.mjs +46 -0
  63. package/mcp/lib/feeds.mjs +140 -0
  64. package/mcp/lib/fsutil.mjs +69 -0
  65. package/mcp/lib/gates.mjs +208 -0
  66. package/mcp/lib/grounding.mjs +252 -0
  67. package/mcp/lib/headings.mjs +65 -0
  68. package/mcp/lib/industry.mjs +208 -0
  69. package/mcp/lib/lang.mjs +24 -0
  70. package/mcp/lib/macro.mjs +167 -0
  71. package/mcp/lib/markdown.mjs +337 -0
  72. package/mcp/lib/markets-kr-jp.mjs +180 -0
  73. package/mcp/lib/markets.mjs +261 -0
  74. package/mcp/lib/narrative.mjs +235 -0
  75. package/mcp/lib/options.mjs +216 -0
  76. package/mcp/lib/orchestrator.mjs +541 -0
  77. package/mcp/lib/output-modes.mjs +144 -0
  78. package/mcp/lib/packets.mjs +256 -0
  79. package/mcp/lib/personas/frontmatter.mjs +80 -0
  80. package/mcp/lib/personas/registry.mjs +215 -0
  81. package/mcp/lib/preflight.mjs +174 -0
  82. package/mcp/lib/prompts.mjs +151 -0
  83. package/mcp/lib/quotes.mjs +108 -0
  84. package/mcp/lib/rpc.mjs +737 -0
  85. package/mcp/lib/run-store.mjs +140 -0
  86. package/mcp/lib/screen.mjs +283 -0
  87. package/mcp/lib/sec.mjs +131 -0
  88. package/mcp/lib/social.mjs +261 -0
  89. package/mcp/lib/tables.mjs +150 -0
  90. package/mcp/lib/text.mjs +27 -0
  91. package/mcp/lib/weights.mjs +150 -0
  92. package/mcp/server.mjs +92 -0
  93. package/opencode.json +20 -0
  94. package/package.json +61 -0
  95. package/personas/_shared/_debate_base.md +46 -0
  96. package/personas/_shared/_evidence_base.md +56 -0
  97. package/personas/_shared/_master_base.md +77 -0
  98. package/personas/analysts/earnings_deep_dive.md +118 -0
  99. package/personas/analysts/forward_expectations.md +115 -0
  100. package/personas/analysts/ib_event_analysis.md +100 -0
  101. package/personas/analysts/insider_sec.md +98 -0
  102. package/personas/analysts/macro_regime.md +66 -0
  103. package/personas/analysts/market_data.md +94 -0
  104. package/personas/analysts/market_narrative.md +94 -0
  105. package/personas/analysts/news_industry_management.md +117 -0
  106. package/personas/analysts/quant_factor.md +97 -0
  107. package/personas/analysts/social_pulse.md +102 -0
  108. package/personas/analysts/valuation_long_short.md +109 -0
  109. package/personas/debate/bear_researcher.md +96 -0
  110. package/personas/debate/bull_researcher.md +98 -0
  111. package/personas/debate/portfolio_manager.md +64 -0
  112. package/personas/masters/masters-adversarial/burry.md +137 -0
  113. package/personas/masters/masters-adversarial/dalio.md +139 -0
  114. package/personas/masters/masters-adversarial/druckenmiller.md +144 -0
  115. package/personas/masters/masters-adversarial/short_seller.md +145 -0
  116. package/personas/masters/masters-adversarial/soros.md +137 -0
  117. package/personas/masters/masters-modern/aschenbrenner.md +147 -0
  118. package/personas/masters/masters-options/natenberg.md +168 -0
  119. package/personas/masters/masters-options/sinclair.md +166 -0
  120. package/personas/masters/masters-options/taleb.md +163 -0
  121. package/personas/masters/masters-quant/asness.md +142 -0
  122. package/personas/masters/masters-quant/simons.md +143 -0
  123. package/personas/masters/masters-quant/thorp.md +143 -0
  124. package/personas/masters/masters-value/buffett.md +123 -0
  125. package/personas/masters/masters-value/duan_yongping.md +142 -0
  126. package/personas/masters/masters-value/li_lu.md +146 -0
  127. package/personas/masters/masters-value/munger.md +117 -0
  128. package/personas/masters/masters-value-classic/fisher.md +140 -0
  129. package/personas/masters/masters-value-classic/graham.md +137 -0
  130. package/personas/masters/masters-value-classic/klarman.md +138 -0
  131. package/personas/masters/masters-value-classic/lynch.md +133 -0
  132. package/personas/masters/masters-value-classic/marks.md +145 -0
  133. package/personas/verifiers/rederivation.md +97 -0
  134. package/personas/verifiers/refuter.md +99 -0
  135. package/personas/verifiers/source_fidelity.md +91 -0
  136. package/skills/agent-skills-governance/SKILL.md +42 -0
  137. package/skills/alphacouncil-agent/SKILL.md +259 -0
  138. package/skills/investment-banking/SKILL.md +70 -0
  139. package/skills/public-equity-investing/SKILL.md +74 -0
@@ -0,0 +1,259 @@
1
+ ---
2
+ name: alphacouncil-agent
3
+ description: Use AlphaCouncil Agent for listed-equity research workflows that need multiple Codex subagents, shared evidence packets, public-equity analysis, banking/event analysis, filings/news search, valuation, long/short pitch work, risk debate, or portfolio-manager style decisions.
4
+ ---
5
+
6
+ # AlphaCouncil Agent
7
+
8
+ Use this plugin when the user invokes `@alphacouncil-agent` or asks for a multi-agent public-equity research workflow.
9
+
10
+ ## Agent-Skills Governance
11
+
12
+ Also apply `../agent-skills-governance/SKILL.md` before planning, running, synthesizing, or reporting. That bundled skill provides the agent-skills-style anti-laziness gates for every installer of this plugin; it is not a separate local dependency.
13
+
14
+ ## Mandatory Council Contract (MUST READ FIRST)
15
+
16
+ You MUST run the full multi-agent council before giving any final answer. This is not optional and cannot be shortcut.
17
+
18
+ - You MUST run ALL 11 evidence roles (`market_data`, `earnings_deep_dive`, `forward_expectations`, `sell_side_revisions`, `earnings_call_transcript`, `quant_factor`, `valuation_long_short`, `news_industry_management`, `management_industry_voices`, `insider_sec`, `ib_event_analysis`), THEN `bull_researcher`, THEN `bear_researcher`, THEN `portfolio_manager` — in that order.
19
+ - You MUST NOT answer single-pass from your own model knowledge. You MUST NOT skip analysts, and you MUST NOT call `plan_visible_run` and then immediately record a `portfolio_manager` decision without first recording every planned evidence packet and both debate researchers.
20
+ - A run is "complete" ONLY when every planned evidence task is recorded/completed AND `bull_researcher` and `bear_researcher` and `portfolio_manager` are all recorded. Anything less is INCOMPLETE.
21
+ - The MCP server enforces this. If you record the `portfolio_manager` decision while any planned evidence packet or either debate researcher is missing, the server marks the run `status=incomplete` (NOT `complete`) and prepends a visible INCOMPLETE banner to `final_report.md`. Do not present an incomplete run as a finished investment decision.
22
+
23
+ ## Preflight Interaction
24
+
25
+ Do not ask startup option questions by default. For underspecified requests such as `@alphacouncil-agent 帮我看看 NOK`, infer:
26
+
27
+ - language: user's apparent language
28
+ - goal: entry/actionability judgment
29
+ - horizon: include short-term 1-4 weeks, medium-term 3-6 months, and long-term 12 months in the final report
30
+
31
+ Ask only when the user explicitly requests option selection before launch. Use the inferred language for visible main-thread preflight/progress updates, visible agent prompts, evidence packets, debate packets, and final synthesis unless the user explicitly requests another language. Always pass the original user request in `prompt`, and pass the inferred language as `language` to AlphaCouncil Agent MCP tools.
32
+
33
+ ## Stage 0 — Ask which council to run (every host)
34
+
35
+ **Before planning a run, call `list_council_options` and let the user choose.**
36
+
37
+ A council is anywhere from 7 to 44 seats. That range is the user's time and money, and
38
+ choosing silently is wrong in both directions: pick small and the bench they were promised
39
+ never runs, pick everything and a one-line question costs a full fan-out.
40
+
41
+ Present the three presets with their seat counts and relative cost, and say that they can
42
+ instead name individual analysts and a master roster. Then wait for the answer.
43
+
44
+ **Do not ask when they have already told you.** A user who named a roster, said "run
45
+ everything", said "just be quick", or is repeating a run with the same shape has answered;
46
+ asking again is an interruption, not diligence.
47
+
48
+ How to ask, per host:
49
+
50
+ - **Claude Code** — use `AskUserQuestion` with the presets as options.
51
+ - **Codex, OpenCode, Grok Build** — ask in chat as a short numbered list and wait for a reply.
52
+
53
+ Two things to say plainly when you ask:
54
+
55
+ - The estimates are relative magnitudes, not promises. "Roughly three times the seats" is
56
+ honest; "about 33 minutes" is not.
57
+ - If they choose everything, say once that it will be noticeably slower — then run it. They
58
+ are allowed to spend their own time; they are not required to guess what it costs.
59
+
60
+ ## Visible-First Workflow
61
+
62
+ Use visible Codex subagents whenever the user asks to see subagents, asks for a chat-style analyst team, says child agents must be visible, or invokes `@alphacouncil-agent` for an investment decision without explicitly requesting headless/background mode.
63
+
64
+ Default to the full workflow. Do not downgrade to a lite/smoke/visible-only summary unless the user explicitly asks for lite, smoke test, or debug output. Do not describe the final user-facing report as "visible version", "lite", "smoke", or "debug"; those are execution details, not investment-report content.
65
+
66
+ 1. If `multi_agent_v1.spawn_agent` is available, spawn separate visible agents for the full default analyst team:
67
+ <!-- generated:roster start -->
68
+ - `macro_regime`
69
+ - `market_data`
70
+ - `earnings_deep_dive`
71
+ - `forward_expectations`
72
+ - `quant_factor`
73
+ - `valuation_long_short`
74
+ - `news_industry_management`
75
+ - `market_narrative`
76
+ - `social_pulse`
77
+ - `insider_sec`
78
+ - `ib_event_analysis`
79
+ - `bull_researcher`
80
+ - `bear_researcher`
81
+ - `portfolio_manager`
82
+ <!-- generated:roster end -->
83
+ 2. Give each visible agent a narrow prompt and require JSON evidence or debate output. Tell each agent not to call `alphacouncil-agent` recursively.
84
+ 3. Use the selected or inferred language for visible agent prompts, evidence packets, debate packets, and final synthesis. Keep JSON field names in English.
85
+ 4. **Master bench — runs on every host, not only Claude Code.** After the evidence agents finish and before the debate, pass `masters_roster` or `masters` to `plan_visible_run` and run each selected lens. Each master reads the SAME established facts the analysts read plus the analyst packets, and returns one JSON opinion recorded with `record_master_opinion(run_id, master, packet)`.
86
+ - Default roster when the user does not choose: `masters-core`.
87
+ - A master whose method cannot judge this name returns `stance: "out_of_scope"`. That is a conclusion, not an abstention, and it carries zero weight rather than being coerced into a view.
88
+ - **The run is `incomplete` until every selected master has reported.** A bench nobody consulted is worse than no bench: the reader believes the verdict survived every lens when it survived none.
89
+ - Feed the masters' disagreements into the bull and bear prompts. Their disagreement is the point; a bench that agrees with the analysts has added nothing.
90
+ 5. **Verifiers — also every host.** Build a claim ledger from the merged packets, take only thesis-bearing claims, and run `source_fidelity`, `rederivation` and `refuter` against each. Record each with `record_verifier_verdict(run_id, verifier, seat, verdict, claim)`.
91
+ - Failed verification **down-weights the seat that made the claim** in the PM synthesis; a seat is never silently erased.
92
+ - `cannot_confirm` and `stands` are real results. Manufacturing a `weakened` verdict to look diligent lowers a seat's weight for no reason, and weight moves the final rating.
93
+ 6. Wait for the evidence agents, merge their outputs into a shared evidence set in the main thread, then run bull, bear, and portfolio-manager agents.
94
+ - Round 1: bull writes the long case; bear writes the short case.
95
+ - Round 2: pass bull's packet to bear for rebuttal, and bear's packet to bull for rebuttal.
96
+ - Round 3: each side asks three questions; the other side answers them.
97
+ - Final: portfolio_manager reads evidence plus all debate rounds and decides whether bull, bear, or balanced won.
98
+ 7. Return a concise but evidence-rich user handoff in the selected or inferred language: rating, debate winner, key earnings/financial results, forward expectations or event thresholds, important news/industry signals, valuation range, position guidance, top invalidation conditions, and saved file locations. Do not paste an overlong report into chat unless the user asks for the full body inline. The saved `final_report.md` must still be complete enough to read without opening artifacts: include each evidence analyst's summary, key data/news/filing/quant findings, the bull case, bear case, rebuttals/questions where available, portfolio-manager verdict, data gaps, and source table. Include links/paths to saved artifacts in the handoff.
99
+ - If the Data Analytics `datascienceWidgets` tools are available, also create a real dashboard/report artifact from the completed evidence and decision: call `validate_artifact` first, then `render_artifact`. Do not treat `output_mode=data_analytics` as only a prose style.
100
+ - If Documents, PDF, Spreadsheets, or Presentations are requested as output formats, use their plugin/skill workflow as a delivery layer after the investment decision is complete; do not move investment judgment into those format plugins.
101
+ 8. If the user specifically wants left-sidebar Codex chat threads, use `codex_app.list_projects` and `codex_app.create_thread` instead of MCP headless execution. Create one thread per major role and report the created thread IDs.
102
+ 9. Do not treat `plan_visible_run` as execution. It only creates the run envelope and prompts; visible agents/threads must actually be created and read before final synthesis.
103
+
104
+ ## Data Tools — call these instead of searching
105
+
106
+ Every tool below is keyless. **A number these can supply must never come from a search
107
+ result, from a summary, or from memory.** Search is for what the tools cannot reach:
108
+ explanation, guidance, competitor commentary, and anything not yet filed.
109
+
110
+ | Need | Call | Notes |
111
+ |---|---|---|
112
+ | Price | `get_quote` | Delayed ~15m. Say so wherever a level matters. |
113
+ | Filings-based quality screen | `screen_ticker` | Pass `ticker`; the CIK is resolved for you. A rule whose inputs are missing is `skipped`, **never a pass**. |
114
+ | Screen a list | `screen_candidates` | Capped at 40; a fetch failure is `unavailable`, not an elimination. |
115
+ | Full US filer list | `list_us_universe` | SEC `company_tickers.json`. |
116
+ | Non-US financials | `market_financials`, `market_coverage` | TWSE keyless; KR/JP need a free key; HK/CN are documents only. Check coverage **before** promising a number. |
117
+ | Macro context | `get_macro_snapshot` | 21 series, 5 derived. Observations, not a regime call. |
118
+ | Options positioning | `get_options_chain` | IV term structure, 25-delta skew, put/call ratios, open-interest concentration. |
119
+ | Dated news and filings | `get_news` | `symbol`, `query` and/or `cik`. Undated items are excluded, not shown as recent. |
120
+ | What the market is talking about | `get_market_narrative` | Themes ranked by coverage, each paired with the series that would corroborate it. |
121
+ | Retail and technical chatter | `get_social_pulse` | Reddit, Hacker News, Bluesky. |
122
+ | Confirm a quoted X post | `verify_x_post` | A decoded timestamp proves nothing; any invented id decodes to a plausible date. |
123
+ | Industry map | `industry_brief`, `industry_peers`, `industry_coverage` | Ask coverage first — it says whether the participant list is authoritative. |
124
+ | Facts + brief in one call | `compose_research_brief` | Grounding for a whole run. |
125
+
126
+ ### Limits you must carry into the report, not discover later
127
+
128
+ - **IV percentile is not computable.** The chain is a snapshot with no history. Any claim that
129
+ volatility is high or low versus its own past goes in `open_questions`.
130
+ - **X / Twitter has no free discovery channel.** Professional FinTwit is **not** covered and
131
+ Reddit is not a substitute. Say so rather than implying you looked at social media.
132
+ - **Non-US names have no options chain here** and often no structured financials. Report the
133
+ gap; never substitute a US peer's numbers.
134
+ - **A skipped screen rule is a gap.** Reporting `6/7 passed` without naming the seventh
135
+ misrepresents the screen.
136
+
137
+ ## Headless MCP Workflow
138
+
139
+ Use MCP only when the user explicitly accepts background/headless execution, wants saved files, or asks to inspect/re-run a previous saved run.
140
+
141
+ 1. Call `collect_evidence` when the request needs source gathering and file artifacts.
142
+ 2. Call `analyze_symbol` when the user wants a complete long/short or portfolio decision saved under `~/.alphacouncil-agent/runs/`.
143
+ 3. Call `read_run` to inspect a saved evidence run.
144
+ 4. Headless MCP defaults to real `codex exec` workers. Pass `dry_run=true` only for explicit planning/self-test requests, not for a user-requested stock analysis.
145
+ 5. Do not describe MCP `codex exec` workers as visible chat subagents. They are background workers with `status.json`, `events.jsonl`, and `all_agents.md`.
146
+
147
+ ## Claude Code Parallel Path
148
+
149
+ Use this path when running under Claude Code with the Task tool available. It reuses the exact same MCP run envelope and recording tools as the Visible-First and Headless workflows above; only the executor and the gating change. If the Task tool is NOT available, fall back to the Visible-First Workflow (or Headless MCP), and say so plainly per the fail-closed visibility rule.
150
+
151
+ Detect capability first: if you can emit `Task` subagent calls in one turn, prefer this path over the sequential fallback. Otherwise do not claim a parallel council ran.
152
+
153
+ ### Model policy (cost-aware)
154
+
155
+ Opus on every subagent is expensive. Default to a tiered policy, and let the user override at launch:
156
+
157
+ - **Evidence analysts (Stage 1) and verifiers (Stage 2b)** → a fast, cheaper model (**Sonnet 4.6**, or **Haiku** for pure fetch/extract). These are bounded source-gathering jobs.
158
+ - **Bull/bear debate (Stage 3) and `portfolio_manager` verdict (Stage 4)** → the strongest model (**Opus 4.8**), because these carry the reasoning.
159
+
160
+ Default is "evidence on Sonnet, debate/verdict on Opus 4.8". Ask once at launch only to offer overrides ("all Opus" for max depth, "all Sonnet" for max thrift); otherwise use the default tiering. Set the model per `Task` subagent (`model:` option). If the host cannot set per-subagent models, say so and proceed on the host default.
161
+
162
+ ### Language
163
+
164
+ Detect the user's language from their request and propagate it to EVERY subagent: each `Task` prompt, the evidence/debate/verdict content the subagents produce, and all workflow progress text shown in the main thread must be in that language (Chinese in -> Chinese throughout; Japanese in -> Japanese throughout). Keep JSON field names and role keys in English; translate values and prose. This matches the Preflight language rule.
165
+
166
+
167
+ ### Stage 0 — Plan (envelope only)
168
+ Call `plan_visible_run` with `symbol`, `prompt` (original user request), `as_of`, and inferred `language`. It returns `run_id`, the 11 evidence agent specs, the 3 debate agent specs, and artifact paths. This is planning only (SKILL step 7); do not treat it as execution.
169
+
170
+ ### Stage 1 — Evidence fan-out (one turn, isolated context)
171
+ In a SINGLE assistant turn, emit 11 `Task` (subagent_type: general-purpose) calls, one per evidence role: `market_data`, `earnings_deep_dive`, `forward_expectations`, `sell_side_revisions`, `earnings_call_transcript`, `quant_factor`, `valuation_long_short`, `news_industry_management`, `management_industry_voices`, `insider_sec`, `ib_event_analysis`. Each subagent:
172
+ - May use ONLY `WebSearch` + `WebFetch`. It must NOT call `@alphacouncil-agent`, `collect_evidence`, `analyze_symbol`, or `read_run` (leaf-worker rule, Boundaries).
173
+ - Runs a query ladder: a primary-locator search (use `allowed_domains` such as `sec.gov` and the company IR/exchange domain), a dated recency search, and one mandatory disconfirming search (e.g. `<ticker> guidance cut`, `downgrade`, `accounting concern`).
174
+ - WebFetches the actual primary doc where one exists (insider_sec -> EDGAR full-text + Form 4; earnings_deep_dive / earnings_call_transcript -> 8-K Ex-99.1 / IR transcript; ib_event_analysis -> 8-K / 424B / deal release; market_data -> exchange/quote page) and quotes exact figures with real dates.
175
+ - Returns exactly one JSON evidence packet matching the Agent Output Contract, with a real `url` and `published_at` on every source and every paywalled/missing/stale item routed into `open_questions`.
176
+
177
+ ### Stage 2 — Collect + barrier
178
+ As each Task returns, call `record_visible_packet(run_id, task, packet, thread_id=<subagent id>)`. The server upserts by `task`, rescopes sources to `<task>:S1`, rewrites `source_manifest.json` + `all_agents.md`, and flips the run phase toward `visible_debate`. HARD GATE: do not start debate until all 11 packets are recorded (assert each `task` is completed or explicitly degraded; poll `status.json` if needed). Proceeding with k<11 violates the barrier.
179
+
180
+ ### Stage 2b — Adversarial verify + repair (loop-until-dry, max 2 rounds)
181
+ Build a claim ledger from the merged packets (only non-low / thesis-bearing claims are "material"). For each material claim, fan out up to 3 verifier `Task` subagents in one turn, each with fresh context and seeing only the bare claim + ticker:
182
+ - source_fidelity: `WebFetch` the exact cited URL; return supported | partial | contradicted | source_unreachable | source_does_not_mention.
183
+ - rederivation: find the fact fresh from OTHER sources; return agree | disagree | cannot_confirm with a new source.
184
+ - refuter: search for disconfirming / newer evidence respecting `as_of` (newer truth that supersedes is a data gap, not a contradiction).
185
+ Compute per-claim survived-confidence: keep `high` only if source_fidelity != contradicted AND >=2/3 verifiers confirm; force DISPUTED on any contradiction; force UNVERIFIABLE if >=2 cannot_confirm/unreachable. Re-dispatch ONLY analysts with remaining `missing_claim_source_ids`, parse failures, or DISPUTED claims, with a stricter prompt; re-`record_visible_packet` (idempotent). Cap at 2 rounds; log residual gaps for the PM to report honestly. Verifiers also obey the leaf-worker rule.
186
+
187
+ ### Stage 3 — Debate pipeline (3 rounds, parallel per round)
188
+ Run the documented rounds, each as a parallel fan-out of `bull_researcher` + `bear_researcher` fed the verified evidence:
189
+ - Round 1: bull writes the long case; bear writes the short case (parallel).
190
+ - Round 2: cross-feed each side the other's round-1 packet for rebuttal (parallel; main thread reads `bull_researcher.json` / `bear_researcher.json` and pastes into the next prompts).
191
+ - Round 3: each side asks three questions; the other answers (parallel).
192
+ Persist each round via `record_visible_decision(run_id, role, packet)` so `all_agents.md` accumulates the full trace. DISPUTED/UNVERIFIABLE claims may appear in a thesis only with an explicit caveat.
193
+
194
+ ### Stage 4 — Verdict + synthesize
195
+ Run one `portfolio_manager` `Task` fed the verified evidence plus all three debate rounds. Record it via `record_visible_decision(run_id, 'portfolio_manager', packet)`, which writes `decision.json` + `final_report.md` and marks the run complete. Then return the complete report inline (SKILL step 5) in the user's language, including the Analyst Work Log, Bull/Bear Debate record, the verification ledger (per material claim: self-confidence, verifier tally, source-fidelity, survived-confidence), all mandated sections, data gaps, short/medium/long-term views, and the `<task>:<source_id>` source table. Link artifacts only in an appendix.
196
+
197
+ Honest limits: Task fan-out is best-effort, not a guaranteed workflow engine; enforce the barrier by polling artifacts, not by assuming. WebSearch/WebFetch is the only evidence channel (no financial API), so some numeric claims stay "narratively corroborated, not vendor-verified". This is the same auditable contract as the other paths — a stronger runner, not a different audit story.
198
+
199
+
200
+ ## Agent Output Contract
201
+
202
+ Evidence agents return:
203
+
204
+ ```json
205
+ {
206
+ "task": "market_data",
207
+ "symbol": "NOK",
208
+ "as_of": "YYYY-MM-DD",
209
+ "summary": "string",
210
+ "claims": [{"claim": "string", "evidence": "string", "confidence": "high|medium|low", "source_ids": ["S1"]}],
211
+ "metrics": {},
212
+ "sources": [{"id": "S1", "title": "string", "url": "string", "published_at": "YYYY-MM-DD or unknown", "retrieved_at": "YYYY-MM-DD"}],
213
+ "open_questions": ["string"],
214
+ "confidence": "high|medium|low"
215
+ }
216
+ ```
217
+
218
+ Debate agents return:
219
+
220
+ ```json
221
+ {
222
+ "role": "bull_researcher",
223
+ "symbol": "NOK",
224
+ "as_of": "YYYY-MM-DD",
225
+ "verdict": "string",
226
+ "rating": "Buy|Overweight|Hold|Underweight|Sell",
227
+ "winner": "bull|bear|balanced|unknown",
228
+ "summary": "string",
229
+ "long_thesis": ["string"],
230
+ "short_thesis": ["string"],
231
+ "valuation_range": "string",
232
+ "catalysts": ["string"],
233
+ "risks": ["string"],
234
+ "position": "string",
235
+ "invalidation": ["string"],
236
+ "source_ids": ["S1"],
237
+ "confidence": "high|medium|low",
238
+ "report_markdown": "string"
239
+ }
240
+ ```
241
+
242
+ ## Boundaries
243
+
244
+ - Public-equity-investing and investment-banking methodology is **bundled as local skills**
245
+ (`skills/public-equity-investing`, `skills/investment-banking`); use them as the research method on
246
+ BOTH editions. On Codex you may additionally use the curated remote `@public-equity-investing` /
247
+ `@investment-banking` workflows; on Claude Code (or when the remote workflows are unavailable) the
248
+ bundled local skills ARE the method, driven by `WebSearch` + `WebFetch`. Treat them as agent
249
+ playbooks run by subagents, not Python libraries.
250
+ - Keep non-public information out of scope unless the user provides the document directly.
251
+ - For exact index / index-futures (incl. night session) / FX / rates / vol / commodity / stock levels, call the **`get_quote`** MCP tool (keyless, ~15m delayed; accepts names like `KOSPI`/`纳指期货`/`VIX`/`美元指数` or raw tickers) and cite it. Web search is the interpretation layer and the fallback when `get_quote` errors — then record the gap in `open_questions`. `get_quote` is delayed market data, never a real-time feed.
252
+ - Every material claim should map back to an evidence packet with sources and confidence.
253
+ - Evidence sources are globally scoped as `<task>:<local_source_id>` and mirrored in `source_manifest.json`; never cite bare `S1/S2` after packets are merged.
254
+ - Final manager reports must include separate visible sections for market expectations / implied beat-miss thresholds, analyst rating or target-price revisions, earnings-call management signals, quant factor / technical risk view, news and management/industry voice signals, short interest / borrow / options where available, strategic transaction or banking-event terms where relevant, data gaps / unavailable data, and separate short-term 1-4 weeks / medium-term 3-6 months / long-term 12 months views. Do not hide these only in the source table. If a data source is unavailable, state that explicitly instead of omitting the section. If no key source is missing, include a data-gaps section saying no critical gaps were found.
255
+ - Final manager reports must also include an "Analyst Work Log" / "分析师工作记录" section summarizing every evidence agent packet, plus a "Bull/Bear Debate" / "多空辩论记录" section summarizing the long case, short case, rebuttal, unanswered questions, and who won. Do not replace these with a one-paragraph execution summary.
256
+ - Completed runs must write `final_report.md`, `user_response.md`, `artifact_index.md`, `report_quality.json`, one Markdown file per evidence analyst, and Markdown files for `bull_researcher`, `bear_researcher`, and `portfolio_manager`. If `report_quality.json` is not `passed`, report the run as `needs_revision`, not complete.
257
+ - The `management_industry_voices` agent only uses publicly verifiable commentary from executives, board members, official company channels, customers, suppliers, competitors, regulators, industry experts, and channel voices. It must separate direct quotes, paraphrases, and media interpretation, and must not imply non-public inside information.
258
+ - Fail closed on visibility: if visible agent/thread tools are unavailable, say that visible subagents are unavailable in this runtime and use MCP only with that limitation stated.
259
+ - Never let a subagent call `@alphacouncil-agent`, `collect_evidence`, `analyze_symbol`, or `read_run`; visible agents are leaf workers.
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: investment-banking
3
+ description: Local, edition-agnostic investment-banking / event-analysis methodology playbook for AlphaCouncil's ib_event_analysis role (and any M&A, ECM, debt, buyback, or strategic-transaction question). On Codex this replaces or supplements the curated remote @investment-banking workflow; on Claude Code it IS the workflow (driven by WebSearch + WebFetch). No financial-data API or vendor key required.
4
+ ---
5
+
6
+ # Investment Banking — Event Analysis (bundled playbook)
7
+
8
+ This skill lets AlphaCouncil analyze corporate transactions and banking events **without** depending on
9
+ Codex's curated remote `@investment-banking` plugin. Runnable method with gates, evidence via
10
+ `WebSearch` + `WebFetch`.
11
+
12
+ > Educational/research only. Not investment advice, not a solicitation. Report missing data honestly.
13
+
14
+ ## When to use
15
+
16
+ For the `ib_event_analysis` role, or whenever the request involves a deal/transaction: M&A, equity
17
+ issuance (ECM/secondary/ATM), debt issuance/refinancing, buyback/dividend, spin-off/divestiture, or a
18
+ strategic transaction (e.g. major supply/partnership terms). Return the standard evidence packet; keep
19
+ JSON field names in English, prose in the user's language.
20
+
21
+ ## Deal taxonomy → what to extract
22
+
23
+ - **M&A** — acquirer/target, consideration (cash/stock/mix), price + premium to unaffected, structure,
24
+ financing, expected synergies, accretion/dilution, conditions, regulatory/antitrust path, break fee,
25
+ expected close.
26
+ - **ECM** — offering size, type (primary/secondary/ATM/convertible), price/discount, dilution %, use of
27
+ proceeds, lockups, underwriters.
28
+ - **Debt** — size, tenor, coupon/spread, secured/unsecured, use of proceeds (refi vs growth), covenant
29
+ and maturity-wall impact, rating action.
30
+ - **Buyback / dividend** — authorization size vs market cap, pace, funding source, signal vs dilution
31
+ offset, capital-allocation tradeoff.
32
+ - **Spin-off / divestiture** — perimeter, rationale, stranded costs, pro-forma leverage, tax treatment.
33
+ - **Strategic transaction** — counterparty, scope, exclusivity, financial terms where disclosed, the
34
+ earnings/strategic impact.
35
+
36
+ ## Sourcing ladder (per claim, in order)
37
+
38
+ 1. **Primary filing/release first**: the 8-K and its exhibits, 424B / S-4 / proxy (DEFM14A), the deal
39
+ press release on the issuer IR domain, and the rating-agency release. Non-US → the local
40
+ exchange/regulator filing.
41
+ 2. Dated, scoped search (issuer IR + `sec.gov` + the named counterparty), then one disconfirming query
42
+ (`<deal> regulatory block` / `antitrust` / `financing risk` / `terminated`).
43
+ 3. **WebFetch the actual document**; quote exact terms (price, premium, size, coupon, close date) with
44
+ dates.
45
+ 4. Corroborate headline terms across the filing AND a second independent source; single-source → `medium`.
46
+ 5. Paywalled/unconfirmed/rumored → `open_questions`; clearly label rumor vs confirmed.
47
+
48
+ ## Analysis to produce
49
+
50
+ - **Terms table** — the hard numbers (price, premium, size, %, dates) each mapped to a `source_id`.
51
+ - **Impact** — accretion/dilution, pro-forma leverage/coverage, EPS and capital-structure effect.
52
+ - **Risk path** — regulatory/antitrust, financing, shareholder-vote, MAC/closing conditions, timeline.
53
+ - **Read-through** — what the deal implies for the thesis (catalyst or invalidation), feeding the
54
+ bull/bear debate and the portfolio-manager verdict.
55
+
56
+ ## Gates (must pass before the packet is "done")
57
+
58
+ 1. **Primary-document gate** — headline terms come from the filing/release, not a paraphrase; each has a
59
+ real `url` + `published_at`.
60
+ 2. **Confirmed-vs-rumor gate** — anything not in a filing/official release is labeled rumor and
61
+ confidence-capped.
62
+ 3. **Quantify gate** — premium, dilution %, leverage delta, and close date are stated as numbers or
63
+ explicitly listed as unavailable in `open_questions`.
64
+ 4. **Honesty gate** — no invented terms; unknowns are surfaced, not guessed.
65
+
66
+ ## Anti-rationalizations
67
+
68
+ - "The press summarized it" → fetch the actual 8-K/424B and quote exact terms.
69
+ - "Premium is roughly X" → compute it from the disclosed price vs the unaffected price, with both dates.
70
+ - "It'll obviously clear regulators" → state the actual approval path and the real risk, or mark unknown.
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: public-equity-investing
3
+ description: Local, edition-agnostic equity-research methodology playbook for AlphaCouncil analysts. Use as the research method for the evidence roles (market_data, earnings_deep_dive, forward_expectations, sell_side_revisions, earnings_call_transcript, quant_factor, valuation_long_short, news_industry_management, management_industry_voices, insider_sec). On Codex this replaces or supplements the curated remote @public-equity-investing workflow; on Claude Code it IS the workflow (driven by WebSearch + WebFetch). No financial-data API or vendor key required.
4
+ ---
5
+
6
+ # Public Equity Investing (bundled playbook)
7
+
8
+ This skill gives every AlphaCouncil analyst the same deep-research method **without** depending on
9
+ Codex's curated remote `@public-equity-investing` plugin. It is a runnable method with gates, not a
10
+ style guide. Evidence is gathered live via the agent's own web search (`WebSearch` + `WebFetch`).
11
+
12
+ > Educational/research only. Not investment advice. Report missing data; never fabricate figures.
13
+
14
+ ## When to use
15
+
16
+ Whenever an AlphaCouncil evidence analyst runs. Each analyst applies the **sourcing ladder** and its
17
+ **role focus** below, then returns the standard JSON evidence packet (see AlphaCouncil's Agent Output
18
+ Contract). Keep JSON field names in English; write prose in the user's language.
19
+
20
+ ## Sourcing ladder (per claim, in order)
21
+
22
+ 1. **Primary document first.** Prefer the issuer/regulator over aggregators:
23
+ - filings → SEC EDGAR full-text (`sec.gov`), 10-K/10-Q/8-K, 424B, Form 4; non-US → the local
24
+ regulator / exchange filing (HKEX, SEHK, EDINET, etc.).
25
+ - earnings → the 8-K Ex-99.1 press release and the IR deck / transcript on the company IR domain.
26
+ - price/quote → the exchange or a named quote page, with the exact as-of timestamp.
27
+ 2. **Dated, scoped search.** Run a primary-locator query (restrict to `sec.gov` + the company IR/exchange
28
+ domain), then a recency query (`<ticker> <topic> <year>`), then ONE mandatory disconfirming query
29
+ (`<ticker> guidance cut` / `downgrade` / `accounting concern` / `short thesis`).
30
+ 3. **WebFetch the actual page** and quote exact numbers with their real dates (signal date, source
31
+ publication date, retrieval date are distinct).
32
+ 4. **Corroborate** any market-moving number across at least two independent sources; if only one exists,
33
+ mark confidence `medium` and say so.
34
+ 5. **Anything paywalled / stale / unfetchable → `open_questions`.** Do not invent it.
35
+
36
+ ## Role focus
37
+
38
+ - `market_data` — price action, liquidity/volume, range vs 20/50/200-day, relative strength vs index/peers.
39
+ - `earnings_deep_dive` — last reported quarter: revenue/margins/segments, surprises vs consensus, guidance.
40
+ - `forward_expectations` — consensus estimates, implied beat/miss thresholds, what's priced in.
41
+ - `sell_side_revisions` — rating and target-price changes (who, when, from→to), dispersion of targets.
42
+ - `earnings_call_transcript` — management tone, commitments, hedges, repeated themes, Q&A pressure points.
43
+ - `quant_factor` — momentum, trend, volatility, volume/liquidity, relative strength, short interest,
44
+ borrow, options IV/skew/expected move when available.
45
+ - `valuation_long_short` — see Valuation frameworks below; produce a long thesis AND a short thesis.
46
+ - `news_industry_management` — recent catalysts, industry context, regulatory/competitive backdrop.
47
+ - `management_industry_voices` — publicly verifiable commentary only; separate direct quote vs paraphrase
48
+ vs media interpretation; never imply non-public information.
49
+ - `insider_sec` — Form 4 insider transactions, buybacks, dilution, debt, capital allocation.
50
+
51
+ ## Valuation frameworks (valuation_long_short)
52
+
53
+ Use at least two, and state assumptions explicitly:
54
+
55
+ - **Comparables** — peer EV/EBITDA, P/E, P/S, EV/Sales with the peer set named and dated.
56
+ - **DCF / reverse-DCF** — what growth + margin the current price already implies; is it achievable?
57
+ - **Scenario** — bear / base / bull price targets with the trigger for each.
58
+ - **Catalyst & invalidation** — name the events that confirm or break the thesis.
59
+
60
+ Output a `valuation_range` plus the long thesis and short thesis; map every number to a `source_id`.
61
+
62
+ ## Gates (must pass before a packet is "done")
63
+
64
+ 1. **Primary-source gate** — every material claim cites a real `url` with a `published_at`; no bare
65
+ aggregator paraphrase for a market-moving number.
66
+ 2. **Disconfirming gate** — you ran at least one query designed to break the thesis.
67
+ 3. **Recency gate** — figures carry real dates; stale data is flagged, not presented as current.
68
+ 4. **Honesty gate** — missing/unavailable data is listed in `open_questions`; confidence reflects it.
69
+
70
+ ## Anti-rationalizations
71
+
72
+ - "I already know this stock" → markets move; re-fetch dated primaries anyway.
73
+ - "One source is enough" → corroborate market-moving numbers or mark `medium`.
74
+ - "Close enough" → quote the exact figure and date, or route to `open_questions`.