alphacouncil-agent 0.9.2 → 1.0.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 (493) hide show
  1. package/.claude/commands/alpha.md +22 -3
  2. package/.claude-plugin/marketplace.json +3 -3
  3. package/.claude-plugin/plugin.json +2 -2
  4. package/.codex-plugin/plugin.json +4 -4
  5. package/.grok/commands/alpha.md +22 -3
  6. package/.opencode/command/alpha.md +22 -3
  7. package/AGENTS.md +42 -4
  8. package/CHANGELOG.md +164 -0
  9. package/CLAUDE.md +59 -7
  10. package/README.ja.md +25 -11
  11. package/README.md +44 -12
  12. package/README.zh-CN.md +37 -12
  13. package/commands/alpha.md +22 -3
  14. package/data/authored/core-seats.mjs +808 -0
  15. package/data/authored/growth-seats.mjs +581 -0
  16. package/data/authored/index.mjs +114 -0
  17. package/data/authored/quant-seats.mjs +564 -0
  18. package/data/authored/value-seats.mjs +663 -0
  19. package/data/build-profile.v1.json +2 -1
  20. package/data/council-evaluation-protocol.v1.json +7 -4
  21. package/data/master-selector-method-locales.v1.mjs +296 -0
  22. package/data/persona-v3-ai-assisted-solo-profile.v1.json +2 -2
  23. package/data/persona-v3-build-specs.v1.mjs +60 -3
  24. package/docs/INSTALL.md +43 -6
  25. package/docs/personas.md +2 -1
  26. package/docs/plans/v1.0-roadmap.md +487 -0
  27. package/docs/releases/v0.9.3.md +86 -0
  28. package/docs/releases/v0.9.4.md +79 -0
  29. package/docs/releases/v0.9.5.md +96 -0
  30. package/docs/releases/v1.0.0.md +164 -0
  31. package/docs/report-contract.md +75 -2
  32. package/knowledge/ai-assisted-solo/experiments/runs/a.json +13 -13
  33. package/knowledge/ai-assisted-solo/experiments/runs/b.json +2 -2
  34. package/knowledge/ai-assisted-solo/experiments/runs/c.json +2 -2
  35. package/knowledge/ai-assisted-solo/experiments/runs/d13.json +126 -126
  36. package/knowledge/ai-assisted-solo/experiments/runs/d26.json +274 -254
  37. package/knowledge/ai-assisted-solo/experiments/runs/e-d13.json +129 -129
  38. package/knowledge/ai-assisted-solo/experiments/runs/e-d26.json +277 -257
  39. package/knowledge/ai-assisted-solo/experiments/runs/h_ai_reference.json +278 -258
  40. package/knowledge/ai-assisted-solo/experiments/simulation-input.json +7278 -556
  41. package/knowledge/ai-assisted-solo/experiments/simulation-manifest.json +22 -22
  42. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_ackman/reviews/{change_value_bridge.ai-review.json → market_capitalisation.ai-review.json} +46 -46
  43. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_ackman/reviews/{power_map.ai-review.json → owner_earnings_yield.ai-review.json} +46 -46
  44. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_aschenbrenner/reviews/{compute_power_bridge.ai-review.json → market_capitalisation.ai-review.json} +46 -46
  45. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_aschenbrenner/reviews/{timeline_reverse_valuation.ai-review.json → price_implied_cash_yield.ai-review.json} +46 -46
  46. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_asness/reviews/{crowding_cost_stress.ai-review.json → nominal_earnings_yield_gap.ai-review.json} +49 -49
  47. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_asness/reviews/{factor_decomposer.ai-review.json → real_earnings_yield_gap.ai-review.json} +49 -49
  48. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_bogle/reviews/expected_return_over_long_bond.ai-review.json +277 -0
  49. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_bogle/reviews/fundamental_expected_return.ai-review.json +277 -0
  50. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_buffett/reviews/{incremental_returns.ai-review.json → market_capitalisation.ai-review.json} +46 -46
  51. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_buffett/reviews/{owner_earnings_rebuilder.ai-review.json → owner_earnings_yield.ai-review.json} +46 -46
  52. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_burry/reviews/{mispricing_carry.ai-review.json → net_current_asset_surplus_per_share.ai-review.json} +49 -49
  53. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_burry/reviews/{capital_structure_reader.ai-review.json → net_current_asset_value_per_share.ai-review.json} +46 -46
  54. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_cathie_wood/reviews/{cost_adoption_curve.ai-review.json → current_cash_yield.ai-review.json} +46 -46
  55. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_cathie_wood/reviews/{capture_valuation_bridge.ai-review.json → market_capitalisation.ai-review.json} +46 -46
  56. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_dalio/reviews/{debt_driver_stress.ai-review.json → policy_real_rate.ai-review.json} +49 -49
  57. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_dalio/reviews/{regime_classifier.ai-review.json → real_curve_slope.ai-review.json} +49 -49
  58. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_damodaran/reviews/{reverse_valuation.ai-review.json → implied_equity_risk_premium.ai-review.json} +49 -49
  59. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_damodaran/reviews/{story_dcf.ai-review.json → premium_versus_long_run_average.ai-review.json} +49 -49
  60. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_druckenmiller/reviews/{liquidity_revision_map.ai-review.json → liquidity_curve_impulse.ai-review.json} +49 -49
  61. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_druckenmiller/reviews/{inflection_payoff.ai-review.json → policy_real_rate.ai-review.json} +49 -49
  62. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_duan_yongping/reviews/{opportunity_cost.ai-review.json → five_year_opportunity_cost.ai-review.json} +46 -46
  63. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_duan_yongping/reviews/{user_value_evidence.ai-review.json → margin_retention.ai-review.json} +46 -46
  64. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_fisher/reviews/{research_productivity.ai-review.json → margin_retention.ai-review.json} +46 -46
  65. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_fisher/reviews/{scuttlebutt_graph.ai-review.json → reinvestment_spread.ai-review.json} +49 -49
  66. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_forensic_short/reviews/{borrow_catalyst.ai-review.json → cash_conversion_gap.ai-review.json} +49 -49
  67. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_forensic_short/reviews/{accounting_rebuilder.ai-review.json → cash_cover_of_leverage.ai-review.json} +46 -46
  68. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_graham/reviews/{asset_floor.ai-review.json → defensive_hurdle_base.ai-review.json} +46 -46
  69. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_graham/reviews/{normalized_earnings.ai-review.json → half_normalised_earnings_yield.ai-review.json} +46 -46
  70. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_jhunjhunwala/reviews/{penetration_liquidity.ai-review.json → cash_quality_gap.ai-review.json} +49 -49
  71. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_jhunjhunwala/reviews/{promoter_governance.ai-review.json → real_structural_growth.ai-review.json} +49 -49
  72. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_klarman/reviews/{recovery_waterfall.ai-review.json → downside_asset_coverage.ai-review.json} +46 -46
  73. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_klarman/reviews/{cash_catalyst_compare.ai-review.json → market_capitalisation.ai-review.json} +46 -46
  74. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_li_lu/reviews/{promise_integrity_ledger.ai-review.json → cash_backed_decade_return.ai-review.json} +46 -46
  75. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_li_lu/reviews/{ten_year_return_bridge.ai-review.json → decade_return_over_long_bond.ai-review.json} +49 -49
  76. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_lynch/reviews/{story_numbers_check.ai-review.json → growth_justified_capitalisation.ai-review.json} +46 -46
  77. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_lynch/reviews/{category_classifier.ai-review.json → market_capitalisation.ai-review.json} +46 -46
  78. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_marks/reviews/{cycle_temperature.ai-review.json → credit_cycle_position.ai-review.json} +49 -49
  79. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_marks/reviews/{implied_expectations.ai-review.json → equity_over_corporate_debt.ai-review.json} +49 -49
  80. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_munger/reviews/{failure_path_graph.ai-review.json → debt_service_cushion.ai-review.json} +49 -49
  81. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_munger/reviews/{incentive_map.ai-review.json → reported_earnings_cash_gap.ai-review.json} +49 -49
  82. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_natenberg/reviews/{surface_builder.ai-review.json → normalised_skew.ai-review.json} +46 -46
  83. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_natenberg/reviews/{greeks_payoff.ai-review.json → round_trip_cost.ai-review.json} +46 -46
  84. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_pabrai/reviews/{downside_floor.ai-review.json → downside_floor_coverage.ai-review.json} +46 -46
  85. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_pabrai/reviews/{discrete_payoff.ai-review.json → market_capitalisation.ai-review.json} +46 -46
  86. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_simons/reviews/{oos_cost_test.ai-review.json → absolute_session_move.ai-review.json} +42 -42
  87. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_simons/reviews/{leakage_audit.ai-review.json → session_move_over_implied.ai-review.json} +46 -46
  88. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_sinclair/reviews/{realized_vol_forecast.ai-review.json → round_trip_cost.ai-review.json} +46 -46
  89. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_sinclair/reviews/{net_edge_sizer.ai-review.json → volatility_per_unit_of_width.ai-review.json} +46 -46
  90. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_soros/reviews/{reversal_monitor.ai-review.json → credit_cycle_position.ai-review.json} +49 -49
  91. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_soros/reviews/{reflexivity_graph.ai-review.json → financing_burden.ai-review.json} +46 -46
  92. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_taleb/reviews/{tail_friction.ai-review.json → debt_service_cushion.ai-review.json} +49 -49
  93. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_taleb/reviews/{payoff_ruin.ai-review.json → normalised_skew.ai-review.json} +46 -46
  94. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_thorp/reviews/{edge_recalculator.ai-review.json → edge_per_unit_of_volatility.ai-review.json} +46 -46
  95. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_thorp/reviews/{fractional_kelly.ai-review.json → net_edge.ai-review.json} +49 -49
  96. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/review-manifest.json +288 -270
  97. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-semantic-adjudications/index.json +2 -2
  98. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-semantic-extractions/index.json +2 -2
  99. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-semantic-skeptic-reviews/index.json +2 -2
  100. package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-source-prereviews/index.json +6 -2
  101. package/knowledge/solo-test/masters/master_ackman/decision_policy.json +122 -11
  102. package/knowledge/solo-test/masters/master_ackman/doctrine.jsonl +2 -2
  103. package/knowledge/solo-test/masters/master_ackman/manifest.json +27 -10
  104. package/knowledge/solo-test/masters/master_ackman/provisional-index.json +3 -3
  105. package/knowledge/solo-test/masters/master_ackman/sources.jsonl +1 -1
  106. package/knowledge/solo-test/masters/master_ackman/tools.json +56 -30
  107. package/knowledge/solo-test/masters/master_aschenbrenner/decision_policy.json +101 -10
  108. package/knowledge/solo-test/masters/master_aschenbrenner/doctrine.jsonl +2 -2
  109. package/knowledge/solo-test/masters/master_aschenbrenner/manifest.json +26 -8
  110. package/knowledge/solo-test/masters/master_aschenbrenner/provisional-index.json +3 -3
  111. package/knowledge/solo-test/masters/master_aschenbrenner/sources.jsonl +1 -1
  112. package/knowledge/solo-test/masters/master_aschenbrenner/tools.json +56 -30
  113. package/knowledge/solo-test/masters/master_asness/decision_policy.json +89 -10
  114. package/knowledge/solo-test/masters/master_asness/doctrine.jsonl +2 -2
  115. package/knowledge/solo-test/masters/master_asness/manifest.json +25 -8
  116. package/knowledge/solo-test/masters/master_asness/provisional-index.json +3 -3
  117. package/knowledge/solo-test/masters/master_asness/sources.jsonl +1 -1
  118. package/knowledge/solo-test/masters/master_asness/tools.json +56 -30
  119. package/knowledge/solo-test/masters/master_bogle/counterfactuals.jsonl +0 -0
  120. package/knowledge/solo-test/masters/master_bogle/decision_cases.jsonl +0 -0
  121. package/knowledge/solo-test/masters/master_bogle/decision_policy.json +170 -0
  122. package/knowledge/solo-test/masters/master_bogle/doctrine.jsonl +14 -0
  123. package/knowledge/solo-test/masters/master_bogle/evaluation/calibration_cases.jsonl +0 -0
  124. package/knowledge/solo-test/masters/master_bogle/evaluation/experiments.json +5 -0
  125. package/knowledge/solo-test/masters/master_bogle/evaluation/golden_cases.jsonl +0 -0
  126. package/knowledge/solo-test/masters/master_bogle/evaluation/pairwise_cases.jsonl +0 -0
  127. package/knowledge/solo-test/masters/master_bogle/failures.jsonl +0 -0
  128. package/knowledge/solo-test/masters/master_bogle/manifest.json +141 -0
  129. package/knowledge/solo-test/masters/master_bogle/memory_policy.json +5 -0
  130. package/knowledge/solo-test/masters/master_bogle/provisional-index.json +41 -0
  131. package/knowledge/solo-test/masters/master_bogle/research_policy.json +11 -0
  132. package/knowledge/solo-test/masters/master_bogle/sources.jsonl +1 -0
  133. package/knowledge/solo-test/masters/master_bogle/tools.json +120 -0
  134. package/knowledge/solo-test/masters/master_bogle/voice.en.md +7 -0
  135. package/knowledge/solo-test/masters/master_bogle/voice.zh.md +7 -0
  136. package/knowledge/solo-test/masters/master_buffett/decision_policy.json +102 -11
  137. package/knowledge/solo-test/masters/master_buffett/doctrine.jsonl +2 -2
  138. package/knowledge/solo-test/masters/master_buffett/manifest.json +24 -8
  139. package/knowledge/solo-test/masters/master_buffett/provisional-index.json +3 -3
  140. package/knowledge/solo-test/masters/master_buffett/sources.jsonl +1 -1
  141. package/knowledge/solo-test/masters/master_buffett/tools.json +55 -29
  142. package/knowledge/solo-test/masters/master_burry/decision_policy.json +102 -12
  143. package/knowledge/solo-test/masters/master_burry/doctrine.jsonl +2 -2
  144. package/knowledge/solo-test/masters/master_burry/manifest.json +26 -10
  145. package/knowledge/solo-test/masters/master_burry/provisional-index.json +3 -3
  146. package/knowledge/solo-test/masters/master_burry/sources.jsonl +1 -1
  147. package/knowledge/solo-test/masters/master_burry/tools.json +56 -30
  148. package/knowledge/solo-test/masters/master_cathie_wood/decision_policy.json +74 -12
  149. package/knowledge/solo-test/masters/master_cathie_wood/doctrine.jsonl +2 -2
  150. package/knowledge/solo-test/masters/master_cathie_wood/manifest.json +26 -10
  151. package/knowledge/solo-test/masters/master_cathie_wood/provisional-index.json +3 -3
  152. package/knowledge/solo-test/masters/master_cathie_wood/sources.jsonl +1 -1
  153. package/knowledge/solo-test/masters/master_cathie_wood/tools.json +56 -30
  154. package/knowledge/solo-test/masters/master_dalio/decision_policy.json +123 -16
  155. package/knowledge/solo-test/masters/master_dalio/doctrine.jsonl +2 -2
  156. package/knowledge/solo-test/masters/master_dalio/manifest.json +24 -8
  157. package/knowledge/solo-test/masters/master_dalio/provisional-index.json +3 -3
  158. package/knowledge/solo-test/masters/master_dalio/sources.jsonl +1 -1
  159. package/knowledge/solo-test/masters/master_dalio/tools.json +56 -30
  160. package/knowledge/solo-test/masters/master_damodaran/decision_policy.json +58 -10
  161. package/knowledge/solo-test/masters/master_damodaran/doctrine.jsonl +2 -2
  162. package/knowledge/solo-test/masters/master_damodaran/manifest.json +23 -8
  163. package/knowledge/solo-test/masters/master_damodaran/provisional-index.json +3 -3
  164. package/knowledge/solo-test/masters/master_damodaran/sources.jsonl +1 -1
  165. package/knowledge/solo-test/masters/master_damodaran/tools.json +54 -28
  166. package/knowledge/solo-test/masters/master_druckenmiller/decision_policy.json +89 -10
  167. package/knowledge/solo-test/masters/master_druckenmiller/doctrine.jsonl +2 -2
  168. package/knowledge/solo-test/masters/master_druckenmiller/manifest.json +25 -8
  169. package/knowledge/solo-test/masters/master_druckenmiller/provisional-index.json +3 -3
  170. package/knowledge/solo-test/masters/master_druckenmiller/sources.jsonl +1 -1
  171. package/knowledge/solo-test/masters/master_druckenmiller/tools.json +55 -29
  172. package/knowledge/solo-test/masters/master_duan_yongping/decision_policy.json +138 -13
  173. package/knowledge/solo-test/masters/master_duan_yongping/doctrine.jsonl +2 -2
  174. package/knowledge/solo-test/masters/master_duan_yongping/manifest.json +31 -11
  175. package/knowledge/solo-test/masters/master_duan_yongping/provisional-index.json +3 -3
  176. package/knowledge/solo-test/masters/master_duan_yongping/sources.jsonl +1 -1
  177. package/knowledge/solo-test/masters/master_duan_yongping/tools.json +82 -30
  178. package/knowledge/solo-test/masters/master_fisher/decision_policy.json +102 -11
  179. package/knowledge/solo-test/masters/master_fisher/doctrine.jsonl +2 -2
  180. package/knowledge/solo-test/masters/master_fisher/manifest.json +27 -10
  181. package/knowledge/solo-test/masters/master_fisher/provisional-index.json +3 -3
  182. package/knowledge/solo-test/masters/master_fisher/sources.jsonl +1 -1
  183. package/knowledge/solo-test/masters/master_fisher/tools.json +58 -32
  184. package/knowledge/solo-test/masters/master_forensic_short/decision_policy.json +93 -14
  185. package/knowledge/solo-test/masters/master_forensic_short/doctrine.jsonl +2 -2
  186. package/knowledge/solo-test/masters/master_forensic_short/manifest.json +20 -8
  187. package/knowledge/solo-test/masters/master_forensic_short/provisional-index.json +3 -3
  188. package/knowledge/solo-test/masters/master_forensic_short/sources.jsonl +1 -1
  189. package/knowledge/solo-test/masters/master_forensic_short/tools.json +53 -27
  190. package/knowledge/solo-test/masters/master_graham/decision_policy.json +103 -12
  191. package/knowledge/solo-test/masters/master_graham/doctrine.jsonl +2 -2
  192. package/knowledge/solo-test/masters/master_graham/manifest.json +26 -8
  193. package/knowledge/solo-test/masters/master_graham/provisional-index.json +3 -3
  194. package/knowledge/solo-test/masters/master_graham/sources.jsonl +1 -1
  195. package/knowledge/solo-test/masters/master_graham/tools.json +67 -28
  196. package/knowledge/solo-test/masters/master_jhunjhunwala/decision_policy.json +77 -12
  197. package/knowledge/solo-test/masters/master_jhunjhunwala/doctrine.jsonl +2 -2
  198. package/knowledge/solo-test/masters/master_jhunjhunwala/manifest.json +25 -10
  199. package/knowledge/solo-test/masters/master_jhunjhunwala/provisional-index.json +3 -3
  200. package/knowledge/solo-test/masters/master_jhunjhunwala/sources.jsonl +1 -1
  201. package/knowledge/solo-test/masters/master_jhunjhunwala/tools.json +54 -28
  202. package/knowledge/solo-test/masters/master_klarman/decision_policy.json +105 -14
  203. package/knowledge/solo-test/masters/master_klarman/doctrine.jsonl +2 -2
  204. package/knowledge/solo-test/masters/master_klarman/manifest.json +22 -6
  205. package/knowledge/solo-test/masters/master_klarman/provisional-index.json +3 -3
  206. package/knowledge/solo-test/masters/master_klarman/sources.jsonl +1 -1
  207. package/knowledge/solo-test/masters/master_klarman/tools.json +55 -29
  208. package/knowledge/solo-test/masters/master_li_lu/decision_policy.json +101 -10
  209. package/knowledge/solo-test/masters/master_li_lu/doctrine.jsonl +2 -2
  210. package/knowledge/solo-test/masters/master_li_lu/manifest.json +27 -10
  211. package/knowledge/solo-test/masters/master_li_lu/provisional-index.json +3 -3
  212. package/knowledge/solo-test/masters/master_li_lu/sources.jsonl +1 -1
  213. package/knowledge/solo-test/masters/master_li_lu/tools.json +58 -32
  214. package/knowledge/solo-test/masters/master_lynch/decision_policy.json +127 -16
  215. package/knowledge/solo-test/masters/master_lynch/doctrine.jsonl +2 -2
  216. package/knowledge/solo-test/masters/master_lynch/manifest.json +28 -10
  217. package/knowledge/solo-test/masters/master_lynch/provisional-index.json +3 -3
  218. package/knowledge/solo-test/masters/master_lynch/sources.jsonl +1 -1
  219. package/knowledge/solo-test/masters/master_lynch/tools.json +67 -28
  220. package/knowledge/solo-test/masters/master_marks/decision_policy.json +71 -9
  221. package/knowledge/solo-test/masters/master_marks/doctrine.jsonl +2 -2
  222. package/knowledge/solo-test/masters/master_marks/manifest.json +25 -10
  223. package/knowledge/solo-test/masters/master_marks/provisional-index.json +3 -3
  224. package/knowledge/solo-test/masters/master_marks/sources.jsonl +1 -1
  225. package/knowledge/solo-test/masters/master_marks/tools.json +54 -28
  226. package/knowledge/solo-test/masters/master_munger/decision_policy.json +141 -16
  227. package/knowledge/solo-test/masters/master_munger/doctrine.jsonl +2 -2
  228. package/knowledge/solo-test/masters/master_munger/manifest.json +24 -10
  229. package/knowledge/solo-test/masters/master_munger/provisional-index.json +3 -3
  230. package/knowledge/solo-test/masters/master_munger/sources.jsonl +1 -1
  231. package/knowledge/solo-test/masters/master_munger/tools.json +52 -26
  232. package/knowledge/solo-test/masters/master_natenberg/decision_policy.json +59 -11
  233. package/knowledge/solo-test/masters/master_natenberg/doctrine.jsonl +2 -2
  234. package/knowledge/solo-test/masters/master_natenberg/manifest.json +23 -10
  235. package/knowledge/solo-test/masters/master_natenberg/provisional-index.json +3 -3
  236. package/knowledge/solo-test/masters/master_natenberg/sources.jsonl +1 -1
  237. package/knowledge/solo-test/masters/master_natenberg/tools.json +50 -24
  238. package/knowledge/solo-test/masters/master_pabrai/decision_policy.json +125 -14
  239. package/knowledge/solo-test/masters/master_pabrai/doctrine.jsonl +2 -2
  240. package/knowledge/solo-test/masters/master_pabrai/manifest.json +22 -6
  241. package/knowledge/solo-test/masters/master_pabrai/provisional-index.json +3 -3
  242. package/knowledge/solo-test/masters/master_pabrai/sources.jsonl +1 -1
  243. package/knowledge/solo-test/masters/master_pabrai/tools.json +55 -29
  244. package/knowledge/solo-test/masters/master_simons/decision_policy.json +59 -11
  245. package/knowledge/solo-test/masters/master_simons/doctrine.jsonl +2 -2
  246. package/knowledge/solo-test/masters/master_simons/manifest.json +22 -8
  247. package/knowledge/solo-test/masters/master_simons/provisional-index.json +3 -3
  248. package/knowledge/solo-test/masters/master_simons/sources.jsonl +1 -1
  249. package/knowledge/solo-test/masters/master_simons/tools.json +43 -30
  250. package/knowledge/solo-test/masters/master_sinclair/decision_policy.json +59 -11
  251. package/knowledge/solo-test/masters/master_sinclair/doctrine.jsonl +2 -2
  252. package/knowledge/solo-test/masters/master_sinclair/manifest.json +22 -10
  253. package/knowledge/solo-test/masters/master_sinclair/provisional-index.json +3 -3
  254. package/knowledge/solo-test/masters/master_sinclair/sources.jsonl +1 -1
  255. package/knowledge/solo-test/masters/master_sinclair/tools.json +54 -28
  256. package/knowledge/solo-test/masters/master_soros/decision_policy.json +98 -10
  257. package/knowledge/solo-test/masters/master_soros/doctrine.jsonl +2 -2
  258. package/knowledge/solo-test/masters/master_soros/manifest.json +24 -11
  259. package/knowledge/solo-test/masters/master_soros/provisional-index.json +3 -3
  260. package/knowledge/solo-test/masters/master_soros/sources.jsonl +1 -1
  261. package/knowledge/solo-test/masters/master_soros/tools.json +54 -28
  262. package/knowledge/solo-test/masters/master_taleb/decision_policy.json +124 -13
  263. package/knowledge/solo-test/masters/master_taleb/doctrine.jsonl +2 -2
  264. package/knowledge/solo-test/masters/master_taleb/manifest.json +23 -9
  265. package/knowledge/solo-test/masters/master_taleb/provisional-index.json +3 -3
  266. package/knowledge/solo-test/masters/master_taleb/sources.jsonl +1 -1
  267. package/knowledge/solo-test/masters/master_taleb/tools.json +50 -24
  268. package/knowledge/solo-test/masters/master_thorp/decision_policy.json +61 -13
  269. package/knowledge/solo-test/masters/master_thorp/doctrine.jsonl +2 -2
  270. package/knowledge/solo-test/masters/master_thorp/manifest.json +25 -10
  271. package/knowledge/solo-test/masters/master_thorp/provisional-index.json +3 -3
  272. package/knowledge/solo-test/masters/master_thorp/sources.jsonl +1 -1
  273. package/knowledge/solo-test/masters/master_thorp/tools.json +56 -30
  274. package/knowledge/solo-test/persona-v3-solo-test-formulas/compilation-manifest.json +290 -264
  275. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/components/tools.json +58 -32
  276. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
  277. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/owner_earnings_yield.derived-proxy-evidence.json +76 -0
  278. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/components/tools.json +58 -32
  279. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
  280. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/price_implied_cash_yield.derived-proxy-evidence.json +76 -0
  281. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/components/tools.json +58 -32
  282. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/nominal_earnings_yield_gap.derived-proxy-evidence.json +76 -0
  283. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/real_earnings_yield_gap.derived-proxy-evidence.json +76 -0
  284. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_bogle/components/tools.json +120 -0
  285. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_bogle/provisional-derivations/expected_return_over_long_bond.derived-proxy-evidence.json +77 -0
  286. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_bogle/provisional-derivations/fundamental_expected_return.derived-proxy-evidence.json +76 -0
  287. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/components/tools.json +57 -31
  288. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
  289. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/owner_earnings_yield.derived-proxy-evidence.json +76 -0
  290. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/components/tools.json +58 -32
  291. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/provisional-derivations/net_current_asset_surplus_per_share.derived-proxy-evidence.json +77 -0
  292. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/provisional-derivations/net_current_asset_value_per_share.derived-proxy-evidence.json +76 -0
  293. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/components/tools.json +58 -32
  294. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/current_cash_yield.derived-proxy-evidence.json +76 -0
  295. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
  296. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/components/tools.json +58 -32
  297. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/policy_real_rate.derived-proxy-evidence.json +76 -0
  298. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/real_curve_slope.derived-proxy-evidence.json +76 -0
  299. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_damodaran/components/tools.json +56 -30
  300. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_damodaran/provisional-derivations/implied_equity_risk_premium.derived-proxy-evidence.json +76 -0
  301. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_damodaran/provisional-derivations/{reverse_valuation.derived-proxy-evidence.json → premium_versus_long_run_average.derived-proxy-evidence.json} +29 -16
  302. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/components/tools.json +57 -31
  303. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/liquidity_curve_impulse.derived-proxy-evidence.json +76 -0
  304. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/policy_real_rate.derived-proxy-evidence.json +76 -0
  305. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/components/tools.json +84 -32
  306. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/five_year_opportunity_cost.derived-proxy-evidence.json +102 -0
  307. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/margin_retention.derived-proxy-evidence.json +76 -0
  308. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/components/tools.json +60 -34
  309. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/margin_retention.derived-proxy-evidence.json +76 -0
  310. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/reinvestment_spread.derived-proxy-evidence.json +76 -0
  311. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_forensic_short/components/tools.json +55 -29
  312. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_forensic_short/provisional-derivations/{accounting_rebuilder.derived-proxy-evidence.json → cash_conversion_gap.derived-proxy-evidence.json} +28 -15
  313. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_forensic_short/provisional-derivations/cash_cover_of_leverage.derived-proxy-evidence.json +76 -0
  314. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/components/tools.json +69 -30
  315. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/defensive_hurdle_base.derived-proxy-evidence.json +89 -0
  316. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/half_normalised_earnings_yield.derived-proxy-evidence.json +76 -0
  317. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/components/tools.json +56 -30
  318. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/cash_quality_gap.derived-proxy-evidence.json +76 -0
  319. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/real_structural_growth.derived-proxy-evidence.json +76 -0
  320. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/components/tools.json +57 -31
  321. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/downside_asset_coverage.derived-proxy-evidence.json +76 -0
  322. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
  323. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/components/tools.json +60 -34
  324. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/provisional-derivations/cash_backed_decade_return.derived-proxy-evidence.json +76 -0
  325. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/provisional-derivations/decade_return_over_long_bond.derived-proxy-evidence.json +76 -0
  326. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/components/tools.json +69 -30
  327. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/growth_justified_capitalisation.derived-proxy-evidence.json +89 -0
  328. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
  329. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/components/tools.json +56 -30
  330. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/credit_cycle_position.derived-proxy-evidence.json +76 -0
  331. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/equity_over_corporate_debt.derived-proxy-evidence.json +76 -0
  332. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/components/tools.json +54 -28
  333. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/debt_service_cushion.derived-proxy-evidence.json +76 -0
  334. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/reported_earnings_cash_gap.derived-proxy-evidence.json +76 -0
  335. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_natenberg/components/tools.json +52 -26
  336. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_natenberg/provisional-derivations/{surface_builder.derived-proxy-evidence.json → normalised_skew.derived-proxy-evidence.json} +27 -14
  337. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_natenberg/provisional-derivations/round_trip_cost.derived-proxy-evidence.json +76 -0
  338. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/components/tools.json +57 -31
  339. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/downside_floor_coverage.derived-proxy-evidence.json +76 -0
  340. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
  341. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/components/tools.json +45 -32
  342. package/knowledge/solo-test/persona-v3-solo-test-formulas/{master_natenberg/provisional-derivations/greeks_payoff.derived-proxy-evidence.json → master_simons/provisional-derivations/absolute_session_move.derived-proxy-evidence.json} +17 -17
  343. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/provisional-derivations/session_move_over_implied.derived-proxy-evidence.json +77 -0
  344. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/components/tools.json +56 -30
  345. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/round_trip_cost.derived-proxy-evidence.json +76 -0
  346. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/volatility_per_unit_of_width.derived-proxy-evidence.json +76 -0
  347. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/components/tools.json +56 -30
  348. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/credit_cycle_position.derived-proxy-evidence.json +76 -0
  349. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/financing_burden.derived-proxy-evidence.json +76 -0
  350. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_taleb/components/tools.json +52 -26
  351. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_taleb/provisional-derivations/debt_service_cushion.derived-proxy-evidence.json +76 -0
  352. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_taleb/provisional-derivations/{tail_friction.derived-proxy-evidence.json → normalised_skew.derived-proxy-evidence.json} +27 -14
  353. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/components/tools.json +58 -32
  354. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/edge_per_unit_of_volatility.derived-proxy-evidence.json +77 -0
  355. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/net_edge.derived-proxy-evidence.json +76 -0
  356. package/mcp/lib/breadth.mjs +122 -0
  357. package/mcp/lib/codex.mjs +3 -3
  358. package/mcp/lib/constants.mjs +76 -25
  359. package/mcp/lib/council-options.mjs +95 -40
  360. package/mcp/lib/council-selection.mjs +95 -9
  361. package/mcp/lib/damodaran.mjs +119 -0
  362. package/mcp/lib/fred.mjs +246 -0
  363. package/mcp/lib/fund-holdings-parsers.mjs +297 -0
  364. package/mcp/lib/fundamentals.mjs +801 -0
  365. package/mcp/lib/funds.mjs +750 -0
  366. package/mcp/lib/gates.mjs +149 -15
  367. package/mcp/lib/grounding.mjs +188 -36
  368. package/mcp/lib/index-aggregate.mjs +718 -0
  369. package/mcp/lib/insider-ownership.mjs +149 -0
  370. package/mcp/lib/instrument-facts.mjs +557 -0
  371. package/mcp/lib/instruments.mjs +191 -0
  372. package/mcp/lib/lang.mjs +109 -2
  373. package/mcp/lib/markdown.mjs +620 -138
  374. package/mcp/lib/master-catalog.mjs +32 -3
  375. package/mcp/lib/orchestrator.mjs +1121 -290
  376. package/mcp/lib/packets.mjs +227 -21
  377. package/mcp/lib/personas/engine.mjs +44 -31
  378. package/mcp/lib/personas-v3/compiler.mjs +2 -0
  379. package/mcp/lib/personas-v3/deterministic-executor.mjs +13 -2
  380. package/mcp/lib/personas-v3/ga-external-evidence.mjs +3 -2
  381. package/mcp/lib/personas-v3/ga-gate.mjs +2 -1
  382. package/mcp/lib/personas-v3/ga-package-evidence.mjs +5 -4
  383. package/mcp/lib/personas-v3/grounding-adapter.mjs +309 -2
  384. package/mcp/lib/personas-v3/loader.mjs +10 -7
  385. package/mcp/lib/personas-v3/production-root.mjs +5 -4
  386. package/mcp/lib/personas-v3/release-formula-evidence.mjs +14 -7
  387. package/mcp/lib/personas-v3/release-source-evidence.mjs +2 -1
  388. package/mcp/lib/personas-v3/releases.mjs +5 -4
  389. package/mcp/lib/personas-v3/runtime-release-integrity.mjs +6 -5
  390. package/mcp/lib/personas-v3/semantic-source-adjudication.mjs +2 -1
  391. package/mcp/lib/personas-v3/semantic-source-extraction.mjs +2 -1
  392. package/mcp/lib/personas-v3/semantic-source-skeptic-review.mjs +2 -1
  393. package/mcp/lib/personas-v3/source-acquisition.mjs +10 -3
  394. package/mcp/lib/personas-v3/source-review-operations.mjs +3 -2
  395. package/mcp/lib/personas-v3/staging.mjs +22 -3
  396. package/mcp/lib/prompts.mjs +119 -2
  397. package/mcp/lib/quotes.mjs +5 -0
  398. package/mcp/lib/rpc.mjs +101 -42
  399. package/mcp/lib/run-store.mjs +28 -3
  400. package/mcp/lib/sec.mjs +32 -0
  401. package/mcp/lib/tables.mjs +11 -0
  402. package/mcp/lib/voice.mjs +122 -0
  403. package/mcp/lib/xbrl-aggregates.mjs +153 -0
  404. package/mcp/lib/xbrl-series.mjs +339 -0
  405. package/mcp/lib/xlsx.mjs +155 -0
  406. package/package.json +5 -5
  407. package/personas/masters/masters-value/bogle.md +145 -0
  408. package/schemas/council-evaluation-protocol-v1.schema.json +2 -2
  409. package/schemas/persona-v3-ai-assisted-solo-profile-v1.schema.json +2 -2
  410. package/schemas/persona-v3-ai-machine-simulation-v1.schema.json +1 -1
  411. package/schemas/persona-v3-build-spec-v1.schema.json +3 -3
  412. package/schemas/persona-v3-release-formula-review-evidence-v1.schema.json +3 -3
  413. package/schemas/persona-v3-release-manifest-v1.schema.json +6 -6
  414. package/schemas/persona-v3-release-source-review-evidence-v1.schema.json +3 -3
  415. package/schemas/persona-v3-tool-graph-v1.schema.json +1 -1
  416. package/schemas/persona-v3.schema.json +37 -2
  417. package/schemas/source-review-batch-v1.schema.json +9 -9
  418. package/scripts/assemble-persona-v3-release.mjs +3 -2
  419. package/scripts/build-persona-v3-solo-test-packs.mjs +6 -8
  420. package/scripts/check-persona-v3-ga.mjs +1 -1
  421. package/scripts/check-persona-v3-production-candidates.mjs +1 -1
  422. package/scripts/compile-persona-v3-formulas.mjs +19 -18
  423. package/scripts/doctor.mjs +11 -9
  424. package/scripts/export-persona-source-review-batch.mjs +1 -1
  425. package/scripts/generate-persona-v3-drafts.mjs +2 -2
  426. package/scripts/lib/build-profile.mjs +24 -0
  427. package/scripts/lib/council-evaluation-protocol.mjs +7 -6
  428. package/scripts/lib/host-capabilities.mjs +2 -1
  429. package/scripts/lib/packaged-host-parity.mjs +63 -8
  430. package/scripts/lib/persona-v3-ai-assisted-solo-status.mjs +6 -4
  431. package/scripts/lib/persona-v3-ai-formula-review.mjs +6 -5
  432. package/scripts/lib/persona-v3-ai-machine-simulations.mjs +32 -4
  433. package/scripts/lib/persona-v3-build-specs.mjs +3 -2
  434. package/scripts/lib/persona-v3-draft-packs.mjs +2 -2
  435. package/scripts/lib/persona-v3-formula-pipeline.mjs +11 -10
  436. package/scripts/lib/persona-v3-production-candidates.mjs +10 -9
  437. package/scripts/lib/persona-v3-solo-formula-pipeline.mjs +182 -16
  438. package/scripts/lib/persona-v3-solo-test-packs.mjs +143 -16
  439. package/scripts/package-smoke.mjs +32 -12
  440. package/scripts/report-persona-corpus-gaps.mjs +4 -1
  441. package/scripts/review-persona-v3-solo-formulas.mjs +12 -8
  442. package/scripts/run-tests.mjs +23 -2
  443. package/scripts/scaffold-persona-v3-staging.mjs +1 -1
  444. package/skills/agent-skills-governance/SKILL.md +8 -2
  445. package/skills/alphacouncil-agent/SKILL.md +60 -9
  446. package/skills/public-equity-investing/SKILL.md +17 -0
  447. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/change_value_bridge.derived-proxy-evidence.json +0 -64
  448. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/power_map.derived-proxy-evidence.json +0 -64
  449. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/compute_power_bridge.derived-proxy-evidence.json +0 -64
  450. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/timeline_reverse_valuation.derived-proxy-evidence.json +0 -64
  451. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/crowding_cost_stress.derived-proxy-evidence.json +0 -64
  452. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/factor_decomposer.derived-proxy-evidence.json +0 -64
  453. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/incremental_returns.derived-proxy-evidence.json +0 -64
  454. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/owner_earnings_rebuilder.derived-proxy-evidence.json +0 -64
  455. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/provisional-derivations/capital_structure_reader.derived-proxy-evidence.json +0 -64
  456. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/provisional-derivations/mispricing_carry.derived-proxy-evidence.json +0 -64
  457. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/capture_valuation_bridge.derived-proxy-evidence.json +0 -64
  458. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/cost_adoption_curve.derived-proxy-evidence.json +0 -64
  459. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/debt_driver_stress.derived-proxy-evidence.json +0 -64
  460. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/regime_classifier.derived-proxy-evidence.json +0 -64
  461. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_damodaran/provisional-derivations/story_dcf.derived-proxy-evidence.json +0 -64
  462. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/inflection_payoff.derived-proxy-evidence.json +0 -64
  463. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/liquidity_revision_map.derived-proxy-evidence.json +0 -64
  464. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/opportunity_cost.derived-proxy-evidence.json +0 -64
  465. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/user_value_evidence.derived-proxy-evidence.json +0 -64
  466. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/research_productivity.derived-proxy-evidence.json +0 -64
  467. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/scuttlebutt_graph.derived-proxy-evidence.json +0 -64
  468. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_forensic_short/provisional-derivations/borrow_catalyst.derived-proxy-evidence.json +0 -64
  469. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/asset_floor.derived-proxy-evidence.json +0 -64
  470. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/normalized_earnings.derived-proxy-evidence.json +0 -64
  471. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/penetration_liquidity.derived-proxy-evidence.json +0 -64
  472. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/promoter_governance.derived-proxy-evidence.json +0 -64
  473. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/cash_catalyst_compare.derived-proxy-evidence.json +0 -64
  474. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/recovery_waterfall.derived-proxy-evidence.json +0 -64
  475. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/provisional-derivations/promise_integrity_ledger.derived-proxy-evidence.json +0 -64
  476. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/provisional-derivations/ten_year_return_bridge.derived-proxy-evidence.json +0 -64
  477. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/category_classifier.derived-proxy-evidence.json +0 -64
  478. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/story_numbers_check.derived-proxy-evidence.json +0 -64
  479. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/cycle_temperature.derived-proxy-evidence.json +0 -64
  480. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/implied_expectations.derived-proxy-evidence.json +0 -64
  481. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/failure_path_graph.derived-proxy-evidence.json +0 -64
  482. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/incentive_map.derived-proxy-evidence.json +0 -64
  483. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/discrete_payoff.derived-proxy-evidence.json +0 -64
  484. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/downside_floor.derived-proxy-evidence.json +0 -64
  485. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/provisional-derivations/leakage_audit.derived-proxy-evidence.json +0 -64
  486. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/provisional-derivations/oos_cost_test.derived-proxy-evidence.json +0 -64
  487. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/net_edge_sizer.derived-proxy-evidence.json +0 -64
  488. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/realized_vol_forecast.derived-proxy-evidence.json +0 -64
  489. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/reflexivity_graph.derived-proxy-evidence.json +0 -64
  490. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/reversal_monitor.derived-proxy-evidence.json +0 -64
  491. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_taleb/provisional-derivations/payoff_ruin.derived-proxy-evidence.json +0 -64
  492. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/edge_recalculator.derived-proxy-evidence.json +0 -64
  493. package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/fractional_kelly.derived-proxy-evidence.json +0 -64
@@ -25,7 +25,6 @@ import { canonicalJson, canonicalValue, sha256 } from "./canonical.mjs";
25
25
  import { canDefineMethodRule, validateSourceAnchor } from "./source-anchor.mjs";
26
26
  import { defaultKnowledgeDir } from "./admission.mjs";
27
27
 
28
- export const CANONICAL_MASTER_COUNT = 26;
29
28
  export const CANONICAL_MASTER_IDS = Object.freeze([
30
29
  "master_aschenbrenner",
31
30
  "master_buffett",
@@ -53,8 +52,12 @@ export const CANONICAL_MASTER_IDS = Object.freeze([
53
52
  "master_taleb",
54
53
  "master_natenberg",
55
54
  "master_sinclair",
55
+ "master_bogle",
56
56
  ]);
57
57
 
58
+ /** Derived, never written twice: the roster above is the only place a seat is added. */
59
+ export const CANONICAL_MASTER_COUNT = CANONICAL_MASTER_IDS.length;
60
+
58
61
  export const STAGING_COMPONENTS = Object.freeze([
59
62
  "sources",
60
63
  "doctrine",
@@ -316,6 +319,22 @@ function writeNew(file, content, created, existing) {
316
319
  created.push(file);
317
320
  }
318
321
 
322
+ /**
323
+ * The seat index is derived from the canonical roster, not authored, so refusing to overwrite
324
+ * it -- which is the right rule for every other file here -- would leave a seat addition
325
+ * permanently unrepresentable without a manual delete.
326
+ */
327
+ function writeDerived(file, content, created, existing) {
328
+ mkdirSync(dirname(file), { recursive: true });
329
+ const present = existsSync(file);
330
+ if (present && readFileSync(file, "utf8") === content) {
331
+ existing.push(file);
332
+ return;
333
+ }
334
+ writeFileSync(file, content, "utf8");
335
+ (present ? existing : created).push(file);
336
+ }
337
+
319
338
  function prettyJson(value) {
320
339
  return `${JSON.stringify(value, null, 2)}\n`;
321
340
  }
@@ -329,7 +348,7 @@ export function scaffoldPersonaV3Staging({
329
348
  const blueprints = canonicalMasterBlueprints({ personaDir });
330
349
  const created = [];
331
350
  const existing = [];
332
- writeNew(join(stagingRoot, INDEX_FILE), prettyJson(createStagingIndex(blueprints)), created, existing);
351
+ writeDerived(join(stagingRoot, INDEX_FILE), prettyJson(createStagingIndex(blueprints)), created, existing);
333
352
  writeNew(join(stagingRoot, TEMPLATE_DIR, "source-adjudication-record.template.json"), prettyJson(sourceRecordTemplate()), created, existing);
334
353
  writeNew(join(stagingRoot, TEMPLATE_DIR, "human-review-checklist.md"), reviewChecklist(), created, existing);
335
354
  for (const blueprint of blueprints) {
@@ -520,7 +539,7 @@ export function inspectPersonaV3Staging({
520
539
  else {
521
540
  const actualIndex = parseJson(indexFile, INDEX_FILE);
522
541
  const expectedIndex = createStagingIndex(blueprints);
523
- if (canonicalJson(actualIndex) !== canonicalJson(expectedIndex)) globalErrors.push(`${INDEX_FILE} does not match the canonical 26-seat registry`);
542
+ if (canonicalJson(actualIndex) !== canonicalJson(expectedIndex)) globalErrors.push(`${INDEX_FILE} does not match the canonical seat registry`);
524
543
  }
525
544
 
526
545
  const expectedIds = new Set(CANONICAL_MASTER_IDS);
@@ -1,11 +1,13 @@
1
1
  import { join } from "node:path";
2
- import { isChineseLanguage, resolveLanguage } from "./lang.mjs";
2
+ import { isChineseLanguage, localized, resolveLanguage } from "./lang.mjs";
3
3
  import { runPath } from "./run-store.mjs";
4
4
  import { compactDebateContext, compactEvidence, compactMasterOpinions, compactQuickEvidence } from "./packets.mjs";
5
5
  import { outputModeInstruction } from "./output-modes.mjs";
6
6
  import { resolveSeatWeights, weightTableMarkdown } from "./weights.mjs";
7
7
  import { groundingBlock } from "./grounding.mjs";
8
+ import { isFundOrIndex } from "./instruments.mjs";
8
9
  import { personaPrompt, personaTitle, registry, selectRoster } from "./personas/registry.mjs";
10
+ import { intentsForStance } from "./voice.mjs";
9
11
 
10
12
  /**
11
13
  * Prompt text lives in personas/, not here.
@@ -22,6 +24,73 @@ function render(template, values) {
22
24
  (Object.prototype.hasOwnProperty.call(values, key) ? String(values[key] ?? "") : match));
23
25
  }
24
26
 
27
+ function fundOrIndexTaskInstruction(task, instrument, language) {
28
+ if (!isFundOrIndex(instrument)) return "";
29
+ const type = instrument.asset_type || "fund_or_index";
30
+ const details = {
31
+ market_data: {
32
+ en: "Establish the tracked index or calculation methodology, holdings/constituent as-of date, weights, top-ten and sector concentration, fee or index rules, AUM where applicable, liquidity/spread, premium-discount or tracking difference, and dated flows. Separate missing fields.",
33
+ zh: "查清跟踪指数或计算方法、持仓/成分时点、权重、前十大和行业集中度、费率或指数规则、适用时的规模、流动性/点差、溢折价或跟踪差及带日期资金流;逐项列出缺失数据。",
34
+ ja: "連動指数または算出方法、保有銘柄・構成銘柄の基準日とウェイト、上位10銘柄・業種集中度、経費率または指数ルール、該当する純資産、流動性・スプレッド、乖離・トラッキング差、日付付き資金フローを確認し、欠落項目を分けて示す。",
35
+ ko: "추종 지수 또는 산출 방법, 보유·구성 종목 기준일과 비중, 상위 10개·섹터 집중도, 보수 또는 지수 규칙, 해당 시 AUM, 유동성·스프레드, 괴리율·추적 차이, 날짜가 있는 자금 흐름을 확인하고 누락 항목을 분리해 기록한다.",
36
+ },
37
+ earnings_deep_dive: {
38
+ en: "Perform holdings-level earnings look-through. State the covered portfolio weight and one-date aggregation method; keep issuer results separate. Never report fund/index revenue, EPS, cash flow, or an earnings call as though the instrument were an operating company.",
39
+ zh: "做持仓层盈利穿透,披露覆盖的组合权重与同日聚合方法,并分开记录各发行人结果。不得编造基金/指数自身营收、EPS、现金流或把成分公司电话会写成基金电话会。",
40
+ ja: "保有銘柄レベルの利益ルックスルーを行い、カバーしたポートフォリオウェイトと同一基準日の集計方法を示し、発行体ごとの結果を分離する。ファンド・指数固有の売上高、EPS、CF、決算説明会を作らない。",
41
+ ko: "보유 종목 수준 이익 룩스루를 수행하고 커버한 포트폴리오 비중과 동일 기준일 집계 방법을 밝히며 발행사 결과를 분리한다. 펀드·지수 자체 매출, EPS, 현금흐름 또는 실적 발표 콜을 만들지 않는다.",
42
+ },
43
+ forward_expectations: {
44
+ en: "Use weighted constituent or provider-published aggregate expectations with one date and a coverage percentage. Analyse top-constituent, sector, factor and macro expectation changes; never label a few issuer estimates as the fund's own guidance.",
45
+ zh: "只使用同一时点、披露覆盖权重的加权成分预期或指数提供方聚合预期;分析头部成分、行业、因子与宏观预期变化,不得把少数公司预测称为基金自身指引。",
46
+ ja: "同一基準日とカバーウェイトを示す加重構成銘柄予想または提供者公表の集計予想を使い、上位銘柄・業種・ファクター・マクロ予想の変化を分析する。一部発行体予想をファンド固有ガイダンスと呼ばない。",
47
+ ko: "동일 기준일과 커버 비중을 밝힌 가중 구성 종목 전망 또는 제공자 공개 집계 전망을 사용하고 상위 종목·섹터·팩터·거시 전망 변화를 분석한다. 일부 발행사 전망을 펀드 자체 가이던스로 부르지 않는다.",
48
+ },
49
+ quant_factor: {
50
+ en: "Measure total and relative return, breadth, factor/sector exposure, volatility, correlation, drawdown, tracking behaviour, liquidity and flows where available. Distinguish the tradable fund from the cash index and from any derivative proxy.",
51
+ zh: "衡量总收益与相对收益、市场广度、因子/行业暴露、波动、相关性、回撤、跟踪表现、流动性及可得的资金流;分开可交易基金、现金指数与衍生品代理。",
52
+ ja: "トータル・相対リターン、ブレッドス、ファクター・業種エクスポージャー、ボラティリティ、相関、ドローダウン、トラッキング、流動性、利用可能な資金フローを測り、上場ファンド、現物指数、デリバティブ代理を分ける。",
53
+ ko: "총수익·상대수익, 시장 폭, 팩터·섹터 노출, 변동성, 상관, 낙폭, 추적 성과, 유동성 및 가능한 자금 흐름을 측정하고 거래 펀드, 현물 지수, 파생상품 대용물을 구분한다.",
54
+ },
55
+ valuation_long_short: {
56
+ en: "Use same-date aggregate P/E, P/B, cash-flow yield or other portfolio metrics only with the provider/methodology and covered weight. Compare concentration and factor exposures. Never add a handful of constituent financial statements into portfolio financials.",
57
+ zh: "聚合 P/E、P/B、现金流收益率等组合指标必须同日、说明数据提供方/方法及覆盖权重,并比较集中度与因子暴露;不得把少数成分财报相加成组合财报。",
58
+ ja: "集計P/E、P/B、CF利回り等は同一基準日、提供者・方法、カバーウェイトを示し、集中度とファクターを比較する。一部構成銘柄の財務諸表を足してポートフォリオ財務にしない。",
59
+ ko: "집계 P/E, P/B, 현금흐름 수익률 등은 동일 기준일, 제공자·방법, 커버 비중을 밝히고 집중도와 팩터 노출을 비교한다. 일부 구성 종목 재무제표를 더해 포트폴리오 재무로 만들지 않는다.",
60
+ },
61
+ news_industry_management: {
62
+ en: "Cover sponsor and index-provider changes, methodology/rebalance notices, regulation and market-structure news, plus material dated news from top holdings and dominant sectors. Do not invent fund management guidance.",
63
+ zh: "覆盖基金管理人/指数提供方变化、方法与再平衡公告、监管和市场结构新闻,以及头部持仓和主导行业的重大带日期新闻;不得编造基金经营层指引。",
64
+ ja: "運用会社・指数提供者の変更、方法・リバランス通知、規制・市場構造ニュース、上位保有銘柄と主要業種の重要な日付付きニュースを扱い、ファンド経営ガイダンスを作らない。",
65
+ ko: "운용사·지수 제공자 변경, 방법론·리밸런싱 공지, 규제·시장 구조 뉴스와 상위 보유 종목·주요 섹터의 중요한 날짜가 있는 뉴스를 다루며 펀드 경영진 가이던스를 만들지 않는다.",
66
+ },
67
+ insider_sec: {
68
+ en: "Review applicable fund/index filings, prospectus and methodology changes, holdings reports, lending/derivative disclosures and sponsor conflicts. Constituent Form 4 filings are issuer activity, not fund insider trading.",
69
+ zh: "检查适用的基金/指数申报、招募说明书和方法变更、持仓报告、证券出借/衍生品披露及管理人冲突;成分股 Form 4 属于发行人活动,不是基金内部人交易。",
70
+ ja: "適用するファンド・指数届出、目論見書・方法変更、保有報告、貸株・デリバティブ開示、運用会社の利益相反を確認する。構成銘柄のForm 4は発行体の活動であり、ファンドの内部者取引ではない。",
71
+ ko: "적용 가능한 펀드·지수 신고, 투자설명서·방법론 변경, 보유 보고, 대차·파생상품 공시, 운용사 이해상충을 검토한다. 구성 종목 Form 4는 발행사 활동이지 펀드 내부자 거래가 아니다.",
72
+ },
73
+ ib_event_analysis: {
74
+ en: "Treat reconstitution, rebalances, methodology/provider changes, fee or sponsor changes, closures/mergers/splits and capital-market plumbing as instrument events. Constituent M&A matters only through explicit weight, replacement and flow effects.",
75
+ zh: "把指数重构/再平衡、方法或提供方变化、费率或管理人变化、清盘/合并/拆分及资本市场机制视为资产事件;成分股并购只通过明确的权重、替换与资金流影响纳入。",
76
+ ja: "入替・リバランス、方法・提供者変更、経費率・運用会社変更、償還・合併・分割、資本市場の仕組みを銘柄イベントとして扱う。構成銘柄M&Aは明示したウェイト、置換、フロー効果だけで反映する。",
77
+ ko: "지수 재구성·리밸런싱, 방법론·제공자 변경, 보수·운용사 변경, 청산·합병·분할 및 자본시장 구조를 종목 이벤트로 다룬다. 구성 종목 M&A는 명시한 비중·교체·자금 흐름 효과로만 반영한다.",
78
+ },
79
+ }[task];
80
+ const generic = {
81
+ en: "Use the fund/index research contract and record unavailable fields explicitly.",
82
+ zh: "使用基金/指数研究合同,并逐项记录不可得数据。",
83
+ ja: "ファンド・指数調査契約を使い、取得できない項目を明記する。",
84
+ ko: "펀드·지수 조사 계약을 사용하고 확보하지 못한 항목을 명시한다.",
85
+ };
86
+ return localized(language, {
87
+ en: `## ${type} task override\n${(details || generic).en}`,
88
+ zh: `## ${type} 专用任务改写\n${(details || generic).zh}`,
89
+ ja: `## ${type} 専用タスク\n${(details || generic).ja}`,
90
+ ko: `## ${type} 전용 작업\n${(details || generic).ko}`,
91
+ });
92
+ }
93
+
25
94
  export function taskPrompt(task, symbol, asOfDate, userPrompt = "", language = "auto", grounding = null) {
26
95
  const resolvedLanguage = resolveLanguage({ language, prompt: userPrompt });
27
96
  const chinese = isChineseLanguage(resolvedLanguage);
@@ -41,8 +110,9 @@ export function taskPrompt(task, symbol, asOfDate, userPrompt = "", language = "
41
110
 
42
111
  // Grounding goes AFTER the role brief: the analyst must know its job before it is told
43
112
  // which facts are already settled, or it reads them as the whole assignment.
113
+ const instrumentOverride = fundOrIndexTaskInstruction(task, grounding?.instrument, resolvedLanguage);
44
114
  const grounded = groundingBlock(grounding, resolvedLanguage);
45
- return [`${base}\n\n${chinese ? "任务:" : "Task: "}${task}\n${body}`, grounded].filter(Boolean).join("\n\n");
115
+ return [`${base}\n\n${chinese ? "任务:" : "Task: "}${task}\n${body}`, instrumentOverride, grounded].filter(Boolean).join("\n\n");
46
116
  }
47
117
 
48
118
  export function debatePrompt(role, run, context = {}) {
@@ -83,6 +153,11 @@ export function debatePrompt(role, run, context = {}) {
83
153
  ? "这是快速委员会的唯一多空陈述轮。只给最有信息量的 4–6 条论点,使用已提供来源 ID,明确回应方法席分歧;不要生成第二/第三轮问题,也不要写长报告。"
84
154
  : "This is the quick council's only bull/bear statement round. Give only the 4-6 highest-information arguments, use supplied source IDs, and engage with method-seat disagreements. Do not create round-2/3 questions or a long report.")
85
155
  : "";
156
+ const instrumentReportInstruction = role === "portfolio_manager" && isFundOrIndex(run?.grounding?.instrument)
157
+ ? (chinese
158
+ ? "这是ETF、基金或大盘指数研究。报告必须新增真实 Markdown 标题 `## 基金与指数结构`,明确资产类型、跟踪方法、持仓/成分权重时点、集中度、费用或指数规则、流动性/溢折价/跟踪差/资金流(适用时)、聚合盈利与估值口径,以及每项未取得的数据。不得写基金或指数自身营收/EPS,也不得把少数成分股相加成组合财报。"
159
+ : "This is ETF, fund or broad-index research. Add a real Markdown heading `## Fund and Index Structure` covering asset type, tracking methodology, dated holdings/constituent weights, concentration, fee or index rules, liquidity/premium-discount/tracking difference/flows when applicable, aggregate earnings and valuation methodology, and every unavailable item. Do not invent fund/index revenue or EPS and never add a few constituents into portfolio financials.")
160
+ : "";
86
161
 
87
162
  return [
88
163
  // The original spread the preamble's lines as separate array elements, so they are
@@ -90,6 +165,7 @@ export function debatePrompt(role, run, context = {}) {
90
165
  ...base.split("\n"),
91
166
  roleText,
92
167
  quickInstruction,
168
+ instrumentReportInstruction,
93
169
  roundTwoInstruction,
94
170
  roundThreeInstruction,
95
171
  context.round ? `Debate round: ${context.round}` : "",
@@ -156,6 +232,47 @@ export function masterPrompt(masterId, run) {
156
232
  ].filter(Boolean).join("\n\n");
157
233
  }
158
234
 
235
+ /**
236
+ * One isolated worker per selected physical v3 method, after its structured decision is
237
+ * frozen. The worker may explain and challenge the evidence, but it cannot vote again.
238
+ */
239
+ export function masterVoicePrompt(masterId, run, frozenOpinion) {
240
+ const reg = registry();
241
+ const persona = reg.get(masterId);
242
+ if (!persona || persona.kind !== "master") throw new Error(`unknown master persona: ${masterId}`);
243
+ const language = run.language || "English";
244
+ const values = { symbol: run.symbol, as_of: run.as_of, language };
245
+ const evidence = JSON.stringify(run.council_mode === "quick" ? compactQuickEvidence(run) : compactEvidence(run));
246
+ return [
247
+ `You are the dedicated, isolated method-seat explanation worker for ${personaTitle(persona, language)} (${masterId}) in the ${run.symbol} council.`,
248
+ `Write every reader-facing field in ${language}. Keep stable IDs, tickers and source IDs unchanged.`,
249
+ "This is a project-derived provisional method lens, not the named person's current statement, endorsement, or quotation.",
250
+ "The structured method decision below is already frozen. You MUST NOT change, soften, strengthen or reinterpret its stance. Explain why that frozen result follows, identify the highest-information facts or missing facts, state any disagreement with analyst interpretation, and say what evidence would change the method result. Do not browse or add facts.",
251
+ `Frozen method result JSON: ${JSON.stringify({
252
+ master: masterId,
253
+ stance: frozenOpinion?.stance,
254
+ verdict: frozenOpinion?.verdict,
255
+ summary: frozenOpinion?.summary,
256
+ disqualifiers_triggered: frozenOpinion?.disqualifiers_triggered || [],
257
+ what_would_change_my_mind: frozenOpinion?.what_would_change_my_mind || [],
258
+ source_ids: frozenOpinion?.source_ids || [],
259
+ deterministic_core_hash: frozenOpinion?.deterministic_core_hash || null,
260
+ frozen_decision_hash: frozenOpinion?.frozen_decision_hash || null,
261
+ })}`,
262
+ `Method instructions (for explanation only):\n${render(personaPrompt(persona, language), values)}`,
263
+ [
264
+ "Write the five `voice` fields in the first person, as the METHOD speaks -- \"I look for X, here the number is Y, so I would Z\".",
265
+ "First person is the voice of the method, never a claim about what the living person currently thinks: write \"this standard asks for...\", never \"he now believes...\".",
266
+ "Every figure you cite must already appear in the evidence or the frozen result, with its source ID. Cite the number, not an adjective about the number.",
267
+ "`what_changes_my_mind` must name a threshold or an observation that would flip the reading, not a wish for more research.",
268
+ "If the frozen stance is out_of_scope, say plainly and in the method's own voice which input it needs and why its absence is not a bearish view.",
269
+ ].join(" "),
270
+ `\`position_intent\` MUST be one of: ${intentsForStance(frozenOpinion?.stance).join(" | ")}. Those are the only intents the frozen stance admits; anything else is rejected without changing run state.`,
271
+ "Return ONLY one valid JSON object, no Markdown fence. Schema: {\"master\":\"stable id\",\"acknowledged_stance\":\"constructive|cautious|opposed|out_of_scope\",\"position_intent\":\"one of the allowed intents above\",\"voice\":{\"what_i_see\":\"string\",\"how_my_method_reads_it\":\"string\",\"would_i_act\":\"string\",\"what_changes_my_mind\":\"string\",\"where_i_disagree\":\"string\"},\"key_findings\":[\"string\"],\"disagreements\":[\"string\"],\"what_would_change_my_mind\":[\"string\"],\"source_ids\":[\"task:S1\"],\"confidence\":\"high|medium|low\"}.",
272
+ `Bounded shared evidence JSON: ${evidence}`,
273
+ ].join("\n\n");
274
+ }
275
+
159
276
  /** The master ids a run has selected, from an explicit list or a roster name. */
160
277
  export function selectedMasters(run) {
161
278
  const reg = registry();
@@ -45,6 +45,10 @@ export function parseYahooChart(json, requested) {
45
45
  change_pct: changePct != null ? Number(changePct.toFixed(2)) : null,
46
46
  currency: meta.currency || null,
47
47
  exchange: meta.exchangeName || null,
48
+ instrument_type: meta.instrumentType || null,
49
+ short_name: meta.shortName || null,
50
+ long_name: meta.longName || null,
51
+ exchange_timezone: meta.exchangeTimezoneName || null,
48
52
  market_state: meta.marketState || null,
49
53
  quote_time: meta.regularMarketTime ? new Date(meta.regularMarketTime * 1000).toISOString() : null,
50
54
  source: "yahoo",
@@ -62,6 +66,7 @@ export function parseStooqCsv(csv, requested) {
62
66
  query: requested, symbol: cols[0] || requested, price: close,
63
67
  previous_close: null, change: null, change_pct: null,
64
68
  currency: null, exchange: "stooq", market_state: null,
69
+ instrument_type: null, short_name: null, long_name: null, exchange_timezone: null,
65
70
  quote_time: (cols[1] && cols[2]) ? `${cols[1]}T${cols[2]}` : null,
66
71
  source: "stooq", note: "delayed / EOD fallback, not real-time",
67
72
  };
package/mcp/lib/rpc.mjs CHANGED
@@ -4,7 +4,7 @@ import readline from "node:readline";
4
4
  import { COUNCIL_MODES, LIMITS, MASTER_STANCES, OUTPUT_MODES, QUICK_TASKS, SERVER_NAME, VERSION } from "./constants.mjs";
5
5
  import { RpcCode, methodNotFound, invalidParams, toRpcError } from "./errors.mjs";
6
6
  import { readJson, readJsonl, writeJson } from "./fsutil.mjs";
7
- import { resolveLanguage } from "./lang.mjs";
7
+ import { localized, resolveLanguage } from "./lang.mjs";
8
8
  import { sweepStaleOutputs } from "./codex.mjs";
9
9
  import { completenessStatus, sourceManifest } from "./gates.mjs";
10
10
  import { artifactPaths, existingDebate, runId, runPath, safeSymbol, saveRun } from "./run-store.mjs";
@@ -76,7 +76,14 @@ export function recordAck(run, extra = {}) {
76
76
  };
77
77
  }
78
78
 
79
- function renderSelectionCatalog(data, zh) {
79
+ function renderSelectionCatalog(data) {
80
+ const copy = (messages) => localized(data.language, messages);
81
+ const labels = copy({
82
+ en: { identity: "Identity", method: "Method", bestFor: "Best for", maturity: "Maturity", pack: "Pack format", preselected: "preselected" },
83
+ zh: { identity: "身份", method: "方法", bestFor: "适合", maturity: "成熟度", pack: "物理格式", preselected: "已预选" },
84
+ ja: { identity: "人物像", method: "手法", bestFor: "適した対象", maturity: "成熟度", pack: "パック形式", preselected: "事前選択済み" },
85
+ ko: { identity: "정체성", method: "방법", bestFor: "적합 대상", maturity: "성숙도", pack: "팩 형식", preselected: "사전 선택" },
86
+ });
80
87
  const preselected = new Set(data.preselected_master_ids || []);
81
88
  // Some MCP hosts expose only text content even when the server also returns
82
89
  // structuredContent. Keep the selection handshake usable on those hosts by
@@ -91,31 +98,45 @@ function renderSelectionCatalog(data, zh) {
91
98
  council_mode: data.council_mode,
92
99
  })}`;
93
100
  const cards = data.masters.map((master) => [
94
- `${master.index}. ${master.title} [${master.id}]${preselected.has(master.id) ? (zh ? " [已预选]" : " [preselected]") : ""}`,
95
- `${zh ? "身份" : "Identity"}: ${master.identity}`,
96
- `${zh ? "方法" : "Method"}: ${master.method}`,
97
- `${zh ? "适合" : "Best for"}: ${master.best_for}`,
98
- `${zh ? "成熟度" : "Maturity"}: ${master.maturity}`,
99
- `${zh ? "物理格式" : "Pack format"}: ${master.pack_format} (${master.admission_level})`,
101
+ `${master.index}. ${master.title} [${master.id}]${preselected.has(master.id) ? ` [${labels.preselected}]` : ""}`,
102
+ `${labels.identity}: ${master.identity}`,
103
+ `${labels.method}: ${master.method}`,
104
+ `${labels.bestFor}: ${master.best_for}`,
105
+ `${labels.maturity}: ${master.maturity_label} (${master.maturity})`,
106
+ `${labels.pack}: ${master.pack_format} (${master.admission_level})`,
100
107
  ].join("\n ")).join("\n\n");
101
108
  const quick = data.council_mode === "quick";
102
- const instructions = zh
103
- ? quick
104
- ? `Quick 模式请选择 1 ${data.maximum} 位大师。回复编号、范围或稳定 ID,例如:1 / 1,3,8 / 1-4 / master_buffett;不支持 all 全选。`
105
- : `请选择 1 至 ${data.maximum} 位大师。回复编号、范围、稳定 ID,或 all 全选,例如:1 / 1,3,8 / 1-5 / master_buffett / all。`
106
- : quick
107
- ? `Quick mode: choose 1 to ${data.maximum} masters. Submit numbers, ranges, or stable IDs, for example: 1 / 1,3,8 / 1-4 / master_buffett. Selecting all is not supported.`
108
- : `Choose 1 to ${data.maximum} masters. Submit numbers, ranges, stable IDs, or all, for example: 1 / 1,3,8 / 1-5 / master_buffett / all.`;
109
+ const instructions = quick
110
+ ? copy({
111
+ en: `Quick mode: choose 1 to ${data.maximum} masters. Submit numbers, ranges, or stable IDs, for example: 1 / 1,3,8 / 1-4 / master_buffett. Selecting all is not supported.`,
112
+ zh: `Quick 模式请选择 1 至 ${data.maximum} 位大师。回复编号、范围或稳定 ID,例如:1 / 1,3,8 / 1-4 / master_buffett;不支持 all 全选。`,
113
+ ja: `Quick モードでは1席から${data.maximum}席を選んでください。番号、範囲、stable ID(例:1 / 1,3,8 / 1-4 / master_buffett)を送信してください。all は使用できません。`,
114
+ ko: `Quick 모드에서는 1개에서 ${data.maximum} 마스터 좌석을 선택하십시오. 번호, 범위 또는 stable ID(예: 1 / 1,3,8 / 1-4 / master_buffett)를 제출하십시오. all 지원하지 않습니다.`,
115
+ })
116
+ : copy({
117
+ en: `Choose 1 to ${data.maximum} masters. Submit numbers, ranges, stable IDs, or all, for example: 1 / 1,3,8 / 1-5 / master_buffett / all.`,
118
+ zh: `请选择 1 至 ${data.maximum} 位大师。回复编号、范围、稳定 ID,或 all 全选,例如:1 / 1,3,8 / 1-5 / master_buffett / all。`,
119
+ ja: `1席から${data.maximum}席のマスターを選んでください。番号、範囲、stable ID、または all(例:1 / 1,3,8 / 1-5 / master_buffett / all)を送信してください。`,
120
+ ko: `1개에서 ${data.maximum}개 마스터 좌석을 선택하십시오. 번호, 범위, stable ID 또는 all(예: 1 / 1,3,8 / 1-5 / master_buffett / all)을 제출하십시오.`,
121
+ });
109
122
  return [
110
- zh
111
- ? `大师选择(目录共 ${data.masters.length} 席;最多选择 ${data.maximum} 席)`
112
- : `Master selection (${data.masters.length} in catalog; choose up to ${data.maximum})`,
123
+ copy({
124
+ en: `Master selection (${data.masters.length} in catalog; choose up to ${data.maximum})`,
125
+ zh: `大师选择(目录共 ${data.masters.length} 席;最多选择 ${data.maximum} 席)`,
126
+ ja: `マスター選択(全${data.masters.length}席、最大${data.maximum}席まで)`,
127
+ ko: `마스터 선택(전체 ${data.masters.length}개 좌석, 최대 ${data.maximum}개 선택)`,
128
+ }),
113
129
  fallbackContext,
114
130
  "",
115
131
  cards,
116
132
  "",
117
133
  instructions,
118
- zh ? "提交选择后才会开始研究。" : "Research starts only after this selection is submitted.",
134
+ copy({
135
+ en: "Research starts only after this selection is submitted.",
136
+ zh: "提交选择后才会开始研究。",
137
+ ja: "選択を送信するまで調査は開始されません。",
138
+ ko: "선택을 제출하기 전에는 조사를 시작하지 않습니다.",
139
+ }),
119
140
  ].join("\n");
120
141
  }
121
142
 
@@ -176,6 +197,12 @@ function startValidation(args, entryTool) {
176
197
  maximum_ms: LIMITS.QUICK_HARD_MAX_MS,
177
198
  });
178
199
  }
200
+ if (mode === "full" && args.total_timeout_ms > LIMITS.FULL_HARD_MAX_MS) {
201
+ throw invalidParams(`Full council total_timeout_ms cannot exceed ${LIMITS.FULL_HARD_MAX_MS}.`, {
202
+ reason: "FULL_TOTAL_TIMEOUT_EXCEEDS_MAX",
203
+ maximum_ms: LIMITS.FULL_HARD_MAX_MS,
204
+ });
205
+ }
179
206
  if (mode === "quick" && args.synthesis === false) {
180
207
  throw invalidParams("Quick council requires its one-round bull/bear and portfolio-manager synthesis.", {
181
208
  reason: "QUICK_SYNTHESIS_REQUIRED",
@@ -230,7 +257,9 @@ function selectedRunArgs(args = {}, entryTool) {
230
257
  selection_receipt: args.selection_receipt,
231
258
  symbol,
232
259
  run_id: id,
233
- language: args.language || "English",
260
+ // Preserve omission so consumeCouncilSelection can infer the same locale
261
+ // from the prompt that begin_council_selection bound into the receipt.
262
+ language: args.language,
234
263
  prompt: typeof args.prompt === "string" ? args.prompt : "",
235
264
  council_mode: args.council_mode || "full",
236
265
  });
@@ -373,9 +402,8 @@ export function tools() {
373
402
  synthesis_timeout_ms: { type: "number", default: LIMITS.CODEX_TIMEOUT_MS },
374
403
  total_timeout_ms: {
375
404
  type: "number",
376
- default: LIMITS.QUICK_TOTAL_MS,
377
- maximum: LIMITS.QUICK_HARD_MAX_MS,
378
- description: "Hard end-to-end wall-clock budget for council_mode=quick, including grounding wait, retries and synthesis. It may be lowered but never raised above ten minutes. Full mode has no implicit global deadline.",
405
+ maximum: LIMITS.FULL_HARD_MAX_MS,
406
+ description: "Hard queue-to-persistence wall-clock budget. quick defaults to and cannot exceed ten minutes; full defaults to and cannot exceed thirty minutes. Callers may lower the applicable ceiling, never raise it.",
379
407
  },
380
408
  output_mode: { type: "string", enum: OUTPUT_MODES, default: "public_equity", description: "Final synthesis target shape." },
381
409
  selection_receipt: { type: "string", description: "One-run receipt returned by confirm_master_selection. Required for every council run and consumed exactly once." },
@@ -418,7 +446,7 @@ export function tools() {
418
446
  { required: ["selection"], not: { anyOf: [{ required: ["selected_master_ids"] }, { required: ["select_all"] }] } },
419
447
  ],
420
448
  }, { readOnlyHint: false, destructiveHint: false, openWorldHint: false }),
421
- tool("plan_visible_run", "Create the visible-host-thread AlphaCouncil run after a confirmed master selection. Requires a one-time selection_receipt. Does NOT execute. You MUST then run every planned evidence agent and every selected master, record bull_researcher and bear_researcher, and only then record the portfolio_manager decision.", {
449
+ tool("plan_visible_run", "Create the visible-host-thread AlphaCouncil run after a confirmed master selection. Requires a one-time selection_receipt. Does NOT execute. Run every returned evidence_agent, then every returned master_agent. Physical v3 master agents explain a frozen deterministic stance and may not change it. Record all required bull/bear rounds before the portfolio_manager decision; PM rejects any returned master_agent that was not recorded.", {
422
450
  type: "object",
423
451
  properties: {
424
452
  symbol: common.symbol,
@@ -435,7 +463,7 @@ export function tools() {
435
463
  },
436
464
  required: ["symbol", "selection_receipt"],
437
465
  }),
438
- tool("record_visible_packet", "MANDATORY sequential step (not optional): record one completed visible evidence agent packet into a planned visible run. Every planned evidence task MUST be recorded before the portfolio_manager decision; a run missing any planned packet will be marked incomplete.", {
466
+ tool("record_visible_packet", "MANDATORY sequential step (not optional): record one completed visible evidence agent packet into a planned visible run. Every reader-facing field must use the run language or the packet is rejected without changing run state. Every planned evidence task MUST be recorded before debate completion and portfolio_manager.", {
439
467
  type: "object",
440
468
  properties: {
441
469
  run_id: { type: "string" },
@@ -446,23 +474,34 @@ export function tools() {
446
474
  },
447
475
  required: ["run_id", "task", "packet"],
448
476
  }),
449
- tool("record_visible_decision", "Record one completed visible bull_researcher / bear_researcher / portfolio_manager packet. Record bull_researcher and bear_researcher before portfolio_manager. For role=portfolio_manager, ALL planned evidence packets AND both debate researchers (bull_researcher and bear_researcher) MUST already be recorded; otherwise the run is marked status=incomplete (NOT complete) and final_report.md gets a visible INCOMPLETE banner. This is the LAST step.", {
477
+ tool("record_visible_decision", "Record exactly one visible decision step. Full visible bull_researcher and bear_researcher calls MUST supply round=1, then round=2, then round=3; both sides of the prior round are required before advancing. Round 2 asks exactly three questions; Round 3 preserves its own questions and answers the opponent's questions with exact bindings. Packets are persisted by role+round: an identical replay is idempotent and conflicting content is rejected. portfolio_manager accepts no round and is rejected until all evidence, selected masters, both three-round sides, and the exact Q&A gate are complete. Every reader-facing field must use the run language.", {
450
478
  type: "object",
451
479
  properties: {
452
480
  run_id: { type: "string" },
453
481
  role: { type: "string", enum: debateIds },
482
+ round: { type: "integer", minimum: 1, maximum: 3, description: "Required for bull_researcher and bear_researcher. Full visible runs require 1, 2, and 3 in order. Omit for portfolio_manager." },
454
483
  packet: { type: "object" },
455
484
  thread_id: { type: "string" },
456
485
  thread_title: { type: "string" },
457
486
  },
458
487
  required: ["run_id", "role", "packet"],
488
+ allOf: [
489
+ {
490
+ if: { properties: { role: { enum: ["bull_researcher", "bear_researcher"] } }, required: ["role"] },
491
+ then: { required: ["round"] },
492
+ },
493
+ {
494
+ if: { properties: { role: { const: "portfolio_manager" } }, required: ["role"] },
495
+ then: { not: { required: ["round"] } },
496
+ },
497
+ ],
459
498
  }),
460
499
  tool("collect_evidence", "Launch Codex subagents and save shared JSON evidence packets. Use dry_run=true only for planning/self-tests.", {
461
500
  type: "object",
462
501
  properties: common,
463
502
  required: ["symbol", "selection_receipt"],
464
503
  }),
465
- tool("analyze_symbol", "Collect evidence and write a manager-style decision summary. Set council_mode=quick for the bounded news-inclusive quick_v1 path; the default remains the full council.", {
504
+ tool("analyze_symbol", "Research an operating company, ETF, mutual fund or market index and write a manager-style decision summary. The instrument is classified before evidence routing: funds use holdings look-through, indices use aggregate methodology, and Company Facts screens apply only to operating companies. Set council_mode=quick for the bounded news-inclusive quick_v1 path; the default remains the full council.", {
466
505
  type: "object",
467
506
  properties: {
468
507
  ...common,
@@ -504,15 +543,27 @@ export function tools() {
504
543
  type: "object",
505
544
  properties: { language: common.language },
506
545
  }, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }),
507
- tool("record_master_opinion", "Record one completed selected master-seat opinion into a planned visible run. Masters run AFTER every evidence packet is recorded and BEFORE the bull/bear debate, so the debate has their disagreements to argue with. A master may return stance=out_of_scope, which is a recorded conclusion rather than an abstention. Every selected seat must either report or be settled deterministically before the run can be complete.", {
546
+ tool("record_master_opinion", "Record one returned visible method-seat worker after evidence and before debate. For physical v3 seats, submit the method-voice schema from plan_visible_run: master, acknowledged_stance, statement, key_findings, disagreements, what_would_change_my_mind, source_ids and confidence. acknowledged_stance must equal the frozen stance; the worker cannot vote again. Legacy packets may use stance/verdict/summary. Reader-facing fields in the wrong run language are rejected without changing state. Every returned selected seat must be recorded before PM.", {
508
547
  type: "object",
509
548
  properties: {
510
549
  run_id: { type: "string" },
511
550
  master: { type: "string", enum: masterIds },
512
551
  packet: {
513
552
  type: "object",
514
- description: `The master_opinion packet. stance MUST be one of ${MASTER_STANCES.join(" | ")} -- anything else is recorded as out_of_scope and carries zero weight, so a seat whose stance does not survive normalization silently stops voting. Common synonyms (long/bullish, neutral/hold, short/bearish/avoid, n/a/abstain) are mapped for you.`,
515
- properties: { stance: { type: "string", enum: MASTER_STANCES } },
553
+ description: `Current physical v3 seats use acknowledged_stance + statement; acknowledged_stance MUST be one of ${MASTER_STANCES.join(" | ")} and match the frozen stance returned by plan_visible_run. The legacy stance/verdict/summary shape remains accepted only for a legacy seat.`,
554
+ properties: {
555
+ master: { type: "string", enum: masterIds },
556
+ acknowledged_stance: { type: "string", enum: MASTER_STANCES },
557
+ statement: { type: "string", minLength: 1 },
558
+ key_findings: { type: "array", items: { type: "string" } },
559
+ disagreements: { type: "array", items: { type: "string" } },
560
+ what_would_change_my_mind: { type: "array", items: { type: "string" } },
561
+ source_ids: { type: "array", items: { type: "string" } },
562
+ confidence: { type: "string", enum: ["high", "medium", "low"] },
563
+ stance: { type: "string", enum: MASTER_STANCES },
564
+ verdict: { type: "string" },
565
+ summary: { type: "string" },
566
+ },
516
567
  },
517
568
  thread_id: { type: "string" },
518
569
  },
@@ -612,7 +663,7 @@ export function tools() {
612
663
  properties: { symbols: { type: "array", items: { type: "string" } } },
613
664
  required: ["symbols"],
614
665
  }, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }),
615
- tool("compose_research_brief", "Assemble the hard facts BEFORE the analysts search: quote, SEC filer profile, the mechanical screen with every computed metric, macro readings, and the industry chain map. Returns both the structured data and a prompt block that tells an analyst these numbers are already established and that its search exists to explain, extend and challenge them -- with the rule that a searched number never silently overwrites a filed one. Pass the returned `grounding` object to plan_visible_run so every analyst prompt carries it.", {
666
+ tool("compose_research_brief", "Classify the instrument and assemble hard facts BEFORE analysts search. Operating companies may receive SEC Company Facts or local-market financials; ETFs and funds receive a holdings look-through contract; indices receive an aggregate-index contract. The result also carries quote, applicable filer profile, options/macro/industry context, explicit not-applicable routes, typed facts, and a prompt block. A searched number never silently overwrites a filed one. Pass the returned `grounding` object to plan_visible_run so every analyst prompt carries it.", {
616
667
  type: "object",
617
668
  properties: {
618
669
  symbol: common.symbol,
@@ -640,7 +691,7 @@ export function tools() {
640
691
  type: "object",
641
692
  properties: {},
642
693
  }, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }),
643
- tool("screen_ticker", "Run the mechanical elimination screen against a company's own SEC filings. No language model is involved: seven hard rules (10y ROE, 5y cumulative FCF, interest cover, gross margin, OCF/NI, net margin, dilution) with three exemptions, and every rejection names the metric, the measured value and the threshold. Rules whose inputs are missing from the filings are reported as skipped, never as passes. Surviving is not a recommendation -- it means the name is worth research time. US filers only; other markets need their own regulator feed.", {
694
+ tool("screen_ticker", "Run the mechanical elimination screen against an operating company's own SEC filings. It is not applicable to ETFs, funds or indices; use compose_research_brief so those instruments are classified and routed correctly. No language model is involved: seven hard rules (10y ROE, 5y cumulative FCF, interest cover, gross margin, OCF/NI, net margin, dilution) with three exemptions, and every rejection names the metric, value and threshold. Missing rules are skipped, never passes. Surviving is not a recommendation. US operating-company filers only.", {
644
695
  type: "object",
645
696
  properties: {
646
697
  cik: { type: "string", description: "SEC CIK. Use list_us_universe to resolve a ticker." },
@@ -692,8 +743,7 @@ export async function handleToolCall(id, params) {
692
743
  const args = params?.arguments || {};
693
744
  if (name === "begin_council_selection") {
694
745
  const data = beginCouncilSelection(args);
695
- const zh = /中文|chinese|zh/i.test(String(data.language || ""));
696
- sendResult(id, jsonContent(renderSelectionCatalog(data, zh), data));
746
+ sendResult(id, jsonContent(renderSelectionCatalog(data), data));
697
747
  return;
698
748
  }
699
749
  if (name === "confirm_master_selection") {
@@ -705,10 +755,13 @@ export async function handleToolCall(id, params) {
705
755
  intent_hash: data.intent_hash,
706
756
  council_mode: data.council_mode,
707
757
  })}`;
708
- sendResult(id, jsonContent(
709
- `${fallbackContext}\nConfirmed ${data.selected_count} master seat(s) for ${data.symbol}. Use the one-time selection_receipt to start this run.`,
710
- data,
711
- ));
758
+ const confirmation = localized(data.language, {
759
+ en: `Confirmed ${data.selected_count} master seat(s) for ${data.symbol}. Use the one-time selection_receipt to start this run.`,
760
+ zh: `已为 ${data.symbol} 确认 ${data.selected_count} 个大师席位。请使用一次性 selection_receipt 启动本轮运行。`,
761
+ ja: `${data.symbol} について ${data.selected_count} 席のマスターを確定しました。今回の実行を開始するには1回限りの selection_receipt を使用してください。`,
762
+ ko: `${data.symbol}에 대해 마스터 ${data.selected_count}개 좌석을 확정했습니다. 이번 실행을 시작하려면 일회용 selection_receipt를 사용하십시오.`,
763
+ });
764
+ sendResult(id, jsonContent(`${fallbackContext}\n${confirmation}`, data));
712
765
  return;
713
766
  }
714
767
  if (name === "plan_visible_run") {
@@ -720,7 +773,7 @@ export async function handleToolCall(id, params) {
720
773
  // no macro, and nothing in the output says so. Same reasoning as the preflight below:
721
774
  // the host that skips the optional step is exactly the host whose seats fail quietly.
722
775
  if (!run.grounding) {
723
- run.grounding = await gatherGrounding({ symbol: run.symbol, asOf: run.as_of })
776
+ run.grounding = await gatherGrounding({ symbol: run.symbol, asOf: run.as_of, language: run.language })
724
777
  .catch((error) => ({ error: String(error?.message || error), facts_unavailable: true }));
725
778
  saveRun(run);
726
779
  }
@@ -766,13 +819,18 @@ export async function handleToolCall(id, params) {
766
819
  if (name === "record_visible_decision") {
767
820
  const result = recordVisibleDecision(args);
768
821
  sendResult(id, jsonContent(
769
- `Recorded visible decision ${args.role} for ${result.run.symbol}: ${result.run.run_id}`,
822
+ `Recorded visible decision ${args.role}${args.round ? ` round ${args.round}` : ""} for ${result.run.symbol}: ${result.run.run_id}`,
770
823
  // decision and opinion are small and are what a caller reads back; only the full
771
824
  // run object is dropped.
772
825
  recordAck(result.run, {
773
826
  decision: result.decision,
827
+ idempotent_replay: result.idempotent_replay === true,
774
828
  report_quality: result.report_quality?.status,
775
829
  missing_report_items: result.report_quality?.missing || [],
830
+ ...(args.role === "portfolio_manager" ? {
831
+ handoff_contract: "inline_user_response_v1",
832
+ user_response_markdown: result.user_response_markdown || "",
833
+ } : {}),
776
834
  }),
777
835
  ));
778
836
  return;
@@ -844,10 +902,11 @@ export async function handleToolCall(id, params) {
844
902
  if (name === "compose_research_brief") {
845
903
  const grounding = await gatherGrounding({
846
904
  symbol: args.symbol, cik: args.cik, industry: args.industry,
847
- macro: args.macro !== false, asOf: args.as_of,
905
+ macro: args.macro !== false, asOf: args.as_of, language: resolveLanguage(args),
848
906
  });
849
907
  const block = groundingBlock(grounding, resolveLanguage(args));
850
908
  const facts = [
909
+ grounding.instrument ? `instrument (${grounding.instrument.asset_type}/${grounding.instrument.research_model})` : null,
851
910
  grounding.quote ? "quote" : null,
852
911
  grounding.filer ? "filer profile" : null,
853
912
  grounding.screen ? `screen (${grounding.screen.rules_computed}/${grounding.screen.rules_total} rules)` : null,
@@ -856,7 +915,7 @@ export async function handleToolCall(id, params) {
856
915
  ].filter(Boolean);
857
916
  sendResult(id, jsonContent(
858
917
  groundingDashboard(grounding, resolveLanguage(args)),
859
- { grounding, prompt_block: block, dashboard: groundingDashboard(grounding, resolveLanguage(args)) },
918
+ { grounding, prompt_block: block, facts_available: facts, dashboard: groundingDashboard(grounding, resolveLanguage(args)) },
860
919
  ));
861
920
  return;
862
921
  }