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.
- package/.claude/commands/alpha.md +22 -3
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +4 -4
- package/.grok/commands/alpha.md +22 -3
- package/.opencode/command/alpha.md +22 -3
- package/AGENTS.md +42 -4
- package/CHANGELOG.md +164 -0
- package/CLAUDE.md +59 -7
- package/README.ja.md +25 -11
- package/README.md +44 -12
- package/README.zh-CN.md +37 -12
- package/commands/alpha.md +22 -3
- package/data/authored/core-seats.mjs +808 -0
- package/data/authored/growth-seats.mjs +581 -0
- package/data/authored/index.mjs +114 -0
- package/data/authored/quant-seats.mjs +564 -0
- package/data/authored/value-seats.mjs +663 -0
- package/data/build-profile.v1.json +2 -1
- package/data/council-evaluation-protocol.v1.json +7 -4
- package/data/master-selector-method-locales.v1.mjs +296 -0
- package/data/persona-v3-ai-assisted-solo-profile.v1.json +2 -2
- package/data/persona-v3-build-specs.v1.mjs +60 -3
- package/docs/INSTALL.md +43 -6
- package/docs/personas.md +2 -1
- package/docs/plans/v1.0-roadmap.md +487 -0
- package/docs/releases/v0.9.3.md +86 -0
- package/docs/releases/v0.9.4.md +79 -0
- package/docs/releases/v0.9.5.md +96 -0
- package/docs/releases/v1.0.0.md +164 -0
- package/docs/report-contract.md +75 -2
- package/knowledge/ai-assisted-solo/experiments/runs/a.json +13 -13
- package/knowledge/ai-assisted-solo/experiments/runs/b.json +2 -2
- package/knowledge/ai-assisted-solo/experiments/runs/c.json +2 -2
- package/knowledge/ai-assisted-solo/experiments/runs/d13.json +126 -126
- package/knowledge/ai-assisted-solo/experiments/runs/d26.json +274 -254
- package/knowledge/ai-assisted-solo/experiments/runs/e-d13.json +129 -129
- package/knowledge/ai-assisted-solo/experiments/runs/e-d26.json +277 -257
- package/knowledge/ai-assisted-solo/experiments/runs/h_ai_reference.json +278 -258
- package/knowledge/ai-assisted-solo/experiments/simulation-input.json +7278 -556
- package/knowledge/ai-assisted-solo/experiments/simulation-manifest.json +22 -22
- 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
- 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
- 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
- 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
- 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
- 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
- package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_bogle/reviews/expected_return_over_long_bond.ai-review.json +277 -0
- package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/master_bogle/reviews/fundamental_expected_return.ai-review.json +277 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-formula-reviews/review-manifest.json +288 -270
- package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-semantic-adjudications/index.json +2 -2
- package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-semantic-extractions/index.json +2 -2
- package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-semantic-skeptic-reviews/index.json +2 -2
- package/knowledge/ai-assisted-solo/reviews/persona-v3-ai-source-prereviews/index.json +6 -2
- package/knowledge/solo-test/masters/master_ackman/decision_policy.json +122 -11
- package/knowledge/solo-test/masters/master_ackman/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_ackman/manifest.json +27 -10
- package/knowledge/solo-test/masters/master_ackman/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_ackman/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_ackman/tools.json +56 -30
- package/knowledge/solo-test/masters/master_aschenbrenner/decision_policy.json +101 -10
- package/knowledge/solo-test/masters/master_aschenbrenner/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_aschenbrenner/manifest.json +26 -8
- package/knowledge/solo-test/masters/master_aschenbrenner/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_aschenbrenner/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_aschenbrenner/tools.json +56 -30
- package/knowledge/solo-test/masters/master_asness/decision_policy.json +89 -10
- package/knowledge/solo-test/masters/master_asness/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_asness/manifest.json +25 -8
- package/knowledge/solo-test/masters/master_asness/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_asness/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_asness/tools.json +56 -30
- package/knowledge/solo-test/masters/master_bogle/counterfactuals.jsonl +0 -0
- package/knowledge/solo-test/masters/master_bogle/decision_cases.jsonl +0 -0
- package/knowledge/solo-test/masters/master_bogle/decision_policy.json +170 -0
- package/knowledge/solo-test/masters/master_bogle/doctrine.jsonl +14 -0
- package/knowledge/solo-test/masters/master_bogle/evaluation/calibration_cases.jsonl +0 -0
- package/knowledge/solo-test/masters/master_bogle/evaluation/experiments.json +5 -0
- package/knowledge/solo-test/masters/master_bogle/evaluation/golden_cases.jsonl +0 -0
- package/knowledge/solo-test/masters/master_bogle/evaluation/pairwise_cases.jsonl +0 -0
- package/knowledge/solo-test/masters/master_bogle/failures.jsonl +0 -0
- package/knowledge/solo-test/masters/master_bogle/manifest.json +141 -0
- package/knowledge/solo-test/masters/master_bogle/memory_policy.json +5 -0
- package/knowledge/solo-test/masters/master_bogle/provisional-index.json +41 -0
- package/knowledge/solo-test/masters/master_bogle/research_policy.json +11 -0
- package/knowledge/solo-test/masters/master_bogle/sources.jsonl +1 -0
- package/knowledge/solo-test/masters/master_bogle/tools.json +120 -0
- package/knowledge/solo-test/masters/master_bogle/voice.en.md +7 -0
- package/knowledge/solo-test/masters/master_bogle/voice.zh.md +7 -0
- package/knowledge/solo-test/masters/master_buffett/decision_policy.json +102 -11
- package/knowledge/solo-test/masters/master_buffett/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_buffett/manifest.json +24 -8
- package/knowledge/solo-test/masters/master_buffett/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_buffett/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_buffett/tools.json +55 -29
- package/knowledge/solo-test/masters/master_burry/decision_policy.json +102 -12
- package/knowledge/solo-test/masters/master_burry/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_burry/manifest.json +26 -10
- package/knowledge/solo-test/masters/master_burry/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_burry/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_burry/tools.json +56 -30
- package/knowledge/solo-test/masters/master_cathie_wood/decision_policy.json +74 -12
- package/knowledge/solo-test/masters/master_cathie_wood/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_cathie_wood/manifest.json +26 -10
- package/knowledge/solo-test/masters/master_cathie_wood/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_cathie_wood/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_cathie_wood/tools.json +56 -30
- package/knowledge/solo-test/masters/master_dalio/decision_policy.json +123 -16
- package/knowledge/solo-test/masters/master_dalio/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_dalio/manifest.json +24 -8
- package/knowledge/solo-test/masters/master_dalio/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_dalio/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_dalio/tools.json +56 -30
- package/knowledge/solo-test/masters/master_damodaran/decision_policy.json +58 -10
- package/knowledge/solo-test/masters/master_damodaran/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_damodaran/manifest.json +23 -8
- package/knowledge/solo-test/masters/master_damodaran/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_damodaran/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_damodaran/tools.json +54 -28
- package/knowledge/solo-test/masters/master_druckenmiller/decision_policy.json +89 -10
- package/knowledge/solo-test/masters/master_druckenmiller/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_druckenmiller/manifest.json +25 -8
- package/knowledge/solo-test/masters/master_druckenmiller/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_druckenmiller/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_druckenmiller/tools.json +55 -29
- package/knowledge/solo-test/masters/master_duan_yongping/decision_policy.json +138 -13
- package/knowledge/solo-test/masters/master_duan_yongping/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_duan_yongping/manifest.json +31 -11
- package/knowledge/solo-test/masters/master_duan_yongping/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_duan_yongping/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_duan_yongping/tools.json +82 -30
- package/knowledge/solo-test/masters/master_fisher/decision_policy.json +102 -11
- package/knowledge/solo-test/masters/master_fisher/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_fisher/manifest.json +27 -10
- package/knowledge/solo-test/masters/master_fisher/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_fisher/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_fisher/tools.json +58 -32
- package/knowledge/solo-test/masters/master_forensic_short/decision_policy.json +93 -14
- package/knowledge/solo-test/masters/master_forensic_short/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_forensic_short/manifest.json +20 -8
- package/knowledge/solo-test/masters/master_forensic_short/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_forensic_short/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_forensic_short/tools.json +53 -27
- package/knowledge/solo-test/masters/master_graham/decision_policy.json +103 -12
- package/knowledge/solo-test/masters/master_graham/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_graham/manifest.json +26 -8
- package/knowledge/solo-test/masters/master_graham/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_graham/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_graham/tools.json +67 -28
- package/knowledge/solo-test/masters/master_jhunjhunwala/decision_policy.json +77 -12
- package/knowledge/solo-test/masters/master_jhunjhunwala/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_jhunjhunwala/manifest.json +25 -10
- package/knowledge/solo-test/masters/master_jhunjhunwala/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_jhunjhunwala/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_jhunjhunwala/tools.json +54 -28
- package/knowledge/solo-test/masters/master_klarman/decision_policy.json +105 -14
- package/knowledge/solo-test/masters/master_klarman/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_klarman/manifest.json +22 -6
- package/knowledge/solo-test/masters/master_klarman/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_klarman/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_klarman/tools.json +55 -29
- package/knowledge/solo-test/masters/master_li_lu/decision_policy.json +101 -10
- package/knowledge/solo-test/masters/master_li_lu/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_li_lu/manifest.json +27 -10
- package/knowledge/solo-test/masters/master_li_lu/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_li_lu/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_li_lu/tools.json +58 -32
- package/knowledge/solo-test/masters/master_lynch/decision_policy.json +127 -16
- package/knowledge/solo-test/masters/master_lynch/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_lynch/manifest.json +28 -10
- package/knowledge/solo-test/masters/master_lynch/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_lynch/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_lynch/tools.json +67 -28
- package/knowledge/solo-test/masters/master_marks/decision_policy.json +71 -9
- package/knowledge/solo-test/masters/master_marks/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_marks/manifest.json +25 -10
- package/knowledge/solo-test/masters/master_marks/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_marks/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_marks/tools.json +54 -28
- package/knowledge/solo-test/masters/master_munger/decision_policy.json +141 -16
- package/knowledge/solo-test/masters/master_munger/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_munger/manifest.json +24 -10
- package/knowledge/solo-test/masters/master_munger/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_munger/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_munger/tools.json +52 -26
- package/knowledge/solo-test/masters/master_natenberg/decision_policy.json +59 -11
- package/knowledge/solo-test/masters/master_natenberg/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_natenberg/manifest.json +23 -10
- package/knowledge/solo-test/masters/master_natenberg/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_natenberg/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_natenberg/tools.json +50 -24
- package/knowledge/solo-test/masters/master_pabrai/decision_policy.json +125 -14
- package/knowledge/solo-test/masters/master_pabrai/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_pabrai/manifest.json +22 -6
- package/knowledge/solo-test/masters/master_pabrai/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_pabrai/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_pabrai/tools.json +55 -29
- package/knowledge/solo-test/masters/master_simons/decision_policy.json +59 -11
- package/knowledge/solo-test/masters/master_simons/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_simons/manifest.json +22 -8
- package/knowledge/solo-test/masters/master_simons/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_simons/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_simons/tools.json +43 -30
- package/knowledge/solo-test/masters/master_sinclair/decision_policy.json +59 -11
- package/knowledge/solo-test/masters/master_sinclair/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_sinclair/manifest.json +22 -10
- package/knowledge/solo-test/masters/master_sinclair/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_sinclair/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_sinclair/tools.json +54 -28
- package/knowledge/solo-test/masters/master_soros/decision_policy.json +98 -10
- package/knowledge/solo-test/masters/master_soros/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_soros/manifest.json +24 -11
- package/knowledge/solo-test/masters/master_soros/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_soros/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_soros/tools.json +54 -28
- package/knowledge/solo-test/masters/master_taleb/decision_policy.json +124 -13
- package/knowledge/solo-test/masters/master_taleb/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_taleb/manifest.json +23 -9
- package/knowledge/solo-test/masters/master_taleb/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_taleb/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_taleb/tools.json +50 -24
- package/knowledge/solo-test/masters/master_thorp/decision_policy.json +61 -13
- package/knowledge/solo-test/masters/master_thorp/doctrine.jsonl +2 -2
- package/knowledge/solo-test/masters/master_thorp/manifest.json +25 -10
- package/knowledge/solo-test/masters/master_thorp/provisional-index.json +3 -3
- package/knowledge/solo-test/masters/master_thorp/sources.jsonl +1 -1
- package/knowledge/solo-test/masters/master_thorp/tools.json +56 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/compilation-manifest.json +290 -264
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/components/tools.json +58 -32
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/owner_earnings_yield.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/components/tools.json +58 -32
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/price_implied_cash_yield.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/components/tools.json +58 -32
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/nominal_earnings_yield_gap.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/real_earnings_yield_gap.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_bogle/components/tools.json +120 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_bogle/provisional-derivations/expected_return_over_long_bond.derived-proxy-evidence.json +77 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_bogle/provisional-derivations/fundamental_expected_return.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/components/tools.json +57 -31
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/owner_earnings_yield.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/components/tools.json +58 -32
- 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
- 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
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/components/tools.json +58 -32
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/current_cash_yield.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/components/tools.json +58 -32
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/policy_real_rate.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/real_curve_slope.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_damodaran/components/tools.json +56 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_damodaran/provisional-derivations/implied_equity_risk_premium.derived-proxy-evidence.json +76 -0
- 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
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/components/tools.json +57 -31
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/liquidity_curve_impulse.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/policy_real_rate.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/components/tools.json +84 -32
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/five_year_opportunity_cost.derived-proxy-evidence.json +102 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/margin_retention.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/components/tools.json +60 -34
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/margin_retention.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/reinvestment_spread.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_forensic_short/components/tools.json +55 -29
- 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
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_forensic_short/provisional-derivations/cash_cover_of_leverage.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/components/tools.json +69 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/defensive_hurdle_base.derived-proxy-evidence.json +89 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/half_normalised_earnings_yield.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/components/tools.json +56 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/cash_quality_gap.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/real_structural_growth.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/components/tools.json +57 -31
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/downside_asset_coverage.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/components/tools.json +60 -34
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/provisional-derivations/cash_backed_decade_return.derived-proxy-evidence.json +76 -0
- 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
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/components/tools.json +69 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/growth_justified_capitalisation.derived-proxy-evidence.json +89 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/components/tools.json +56 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/credit_cycle_position.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/equity_over_corporate_debt.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/components/tools.json +54 -28
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/debt_service_cushion.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/reported_earnings_cash_gap.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_natenberg/components/tools.json +52 -26
- 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
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_natenberg/provisional-derivations/round_trip_cost.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/components/tools.json +57 -31
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/downside_floor_coverage.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/market_capitalisation.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/components/tools.json +45 -32
- 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
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/provisional-derivations/session_move_over_implied.derived-proxy-evidence.json +77 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/components/tools.json +56 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/round_trip_cost.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/volatility_per_unit_of_width.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/components/tools.json +56 -30
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/credit_cycle_position.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/financing_burden.derived-proxy-evidence.json +76 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_taleb/components/tools.json +52 -26
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_taleb/provisional-derivations/debt_service_cushion.derived-proxy-evidence.json +76 -0
- 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
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/components/tools.json +58 -32
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/edge_per_unit_of_volatility.derived-proxy-evidence.json +77 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/net_edge.derived-proxy-evidence.json +76 -0
- package/mcp/lib/breadth.mjs +122 -0
- package/mcp/lib/codex.mjs +3 -3
- package/mcp/lib/constants.mjs +76 -25
- package/mcp/lib/council-options.mjs +95 -40
- package/mcp/lib/council-selection.mjs +95 -9
- package/mcp/lib/damodaran.mjs +119 -0
- package/mcp/lib/fred.mjs +246 -0
- package/mcp/lib/fund-holdings-parsers.mjs +297 -0
- package/mcp/lib/fundamentals.mjs +801 -0
- package/mcp/lib/funds.mjs +750 -0
- package/mcp/lib/gates.mjs +149 -15
- package/mcp/lib/grounding.mjs +188 -36
- package/mcp/lib/index-aggregate.mjs +718 -0
- package/mcp/lib/insider-ownership.mjs +149 -0
- package/mcp/lib/instrument-facts.mjs +557 -0
- package/mcp/lib/instruments.mjs +191 -0
- package/mcp/lib/lang.mjs +109 -2
- package/mcp/lib/markdown.mjs +620 -138
- package/mcp/lib/master-catalog.mjs +32 -3
- package/mcp/lib/orchestrator.mjs +1121 -290
- package/mcp/lib/packets.mjs +227 -21
- package/mcp/lib/personas/engine.mjs +44 -31
- package/mcp/lib/personas-v3/compiler.mjs +2 -0
- package/mcp/lib/personas-v3/deterministic-executor.mjs +13 -2
- package/mcp/lib/personas-v3/ga-external-evidence.mjs +3 -2
- package/mcp/lib/personas-v3/ga-gate.mjs +2 -1
- package/mcp/lib/personas-v3/ga-package-evidence.mjs +5 -4
- package/mcp/lib/personas-v3/grounding-adapter.mjs +309 -2
- package/mcp/lib/personas-v3/loader.mjs +10 -7
- package/mcp/lib/personas-v3/production-root.mjs +5 -4
- package/mcp/lib/personas-v3/release-formula-evidence.mjs +14 -7
- package/mcp/lib/personas-v3/release-source-evidence.mjs +2 -1
- package/mcp/lib/personas-v3/releases.mjs +5 -4
- package/mcp/lib/personas-v3/runtime-release-integrity.mjs +6 -5
- package/mcp/lib/personas-v3/semantic-source-adjudication.mjs +2 -1
- package/mcp/lib/personas-v3/semantic-source-extraction.mjs +2 -1
- package/mcp/lib/personas-v3/semantic-source-skeptic-review.mjs +2 -1
- package/mcp/lib/personas-v3/source-acquisition.mjs +10 -3
- package/mcp/lib/personas-v3/source-review-operations.mjs +3 -2
- package/mcp/lib/personas-v3/staging.mjs +22 -3
- package/mcp/lib/prompts.mjs +119 -2
- package/mcp/lib/quotes.mjs +5 -0
- package/mcp/lib/rpc.mjs +101 -42
- package/mcp/lib/run-store.mjs +28 -3
- package/mcp/lib/sec.mjs +32 -0
- package/mcp/lib/tables.mjs +11 -0
- package/mcp/lib/voice.mjs +122 -0
- package/mcp/lib/xbrl-aggregates.mjs +153 -0
- package/mcp/lib/xbrl-series.mjs +339 -0
- package/mcp/lib/xlsx.mjs +155 -0
- package/package.json +5 -5
- package/personas/masters/masters-value/bogle.md +145 -0
- package/schemas/council-evaluation-protocol-v1.schema.json +2 -2
- package/schemas/persona-v3-ai-assisted-solo-profile-v1.schema.json +2 -2
- package/schemas/persona-v3-ai-machine-simulation-v1.schema.json +1 -1
- package/schemas/persona-v3-build-spec-v1.schema.json +3 -3
- package/schemas/persona-v3-release-formula-review-evidence-v1.schema.json +3 -3
- package/schemas/persona-v3-release-manifest-v1.schema.json +6 -6
- package/schemas/persona-v3-release-source-review-evidence-v1.schema.json +3 -3
- package/schemas/persona-v3-tool-graph-v1.schema.json +1 -1
- package/schemas/persona-v3.schema.json +37 -2
- package/schemas/source-review-batch-v1.schema.json +9 -9
- package/scripts/assemble-persona-v3-release.mjs +3 -2
- package/scripts/build-persona-v3-solo-test-packs.mjs +6 -8
- package/scripts/check-persona-v3-ga.mjs +1 -1
- package/scripts/check-persona-v3-production-candidates.mjs +1 -1
- package/scripts/compile-persona-v3-formulas.mjs +19 -18
- package/scripts/doctor.mjs +11 -9
- package/scripts/export-persona-source-review-batch.mjs +1 -1
- package/scripts/generate-persona-v3-drafts.mjs +2 -2
- package/scripts/lib/build-profile.mjs +24 -0
- package/scripts/lib/council-evaluation-protocol.mjs +7 -6
- package/scripts/lib/host-capabilities.mjs +2 -1
- package/scripts/lib/packaged-host-parity.mjs +63 -8
- package/scripts/lib/persona-v3-ai-assisted-solo-status.mjs +6 -4
- package/scripts/lib/persona-v3-ai-formula-review.mjs +6 -5
- package/scripts/lib/persona-v3-ai-machine-simulations.mjs +32 -4
- package/scripts/lib/persona-v3-build-specs.mjs +3 -2
- package/scripts/lib/persona-v3-draft-packs.mjs +2 -2
- package/scripts/lib/persona-v3-formula-pipeline.mjs +11 -10
- package/scripts/lib/persona-v3-production-candidates.mjs +10 -9
- package/scripts/lib/persona-v3-solo-formula-pipeline.mjs +182 -16
- package/scripts/lib/persona-v3-solo-test-packs.mjs +143 -16
- package/scripts/package-smoke.mjs +32 -12
- package/scripts/report-persona-corpus-gaps.mjs +4 -1
- package/scripts/review-persona-v3-solo-formulas.mjs +12 -8
- package/scripts/run-tests.mjs +23 -2
- package/scripts/scaffold-persona-v3-staging.mjs +1 -1
- package/skills/agent-skills-governance/SKILL.md +8 -2
- package/skills/alphacouncil-agent/SKILL.md +60 -9
- package/skills/public-equity-investing/SKILL.md +17 -0
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/change_value_bridge.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_ackman/provisional-derivations/power_map.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/compute_power_bridge.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_aschenbrenner/provisional-derivations/timeline_reverse_valuation.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/crowding_cost_stress.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_asness/provisional-derivations/factor_decomposer.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/incremental_returns.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_buffett/provisional-derivations/owner_earnings_rebuilder.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/provisional-derivations/capital_structure_reader.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_burry/provisional-derivations/mispricing_carry.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/capture_valuation_bridge.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_cathie_wood/provisional-derivations/cost_adoption_curve.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/debt_driver_stress.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_dalio/provisional-derivations/regime_classifier.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_damodaran/provisional-derivations/story_dcf.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/inflection_payoff.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_druckenmiller/provisional-derivations/liquidity_revision_map.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/opportunity_cost.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_duan_yongping/provisional-derivations/user_value_evidence.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/research_productivity.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_fisher/provisional-derivations/scuttlebutt_graph.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_forensic_short/provisional-derivations/borrow_catalyst.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/asset_floor.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_graham/provisional-derivations/normalized_earnings.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/penetration_liquidity.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_jhunjhunwala/provisional-derivations/promoter_governance.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/cash_catalyst_compare.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_klarman/provisional-derivations/recovery_waterfall.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/provisional-derivations/promise_integrity_ledger.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_li_lu/provisional-derivations/ten_year_return_bridge.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/category_classifier.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_lynch/provisional-derivations/story_numbers_check.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/cycle_temperature.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_marks/provisional-derivations/implied_expectations.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/failure_path_graph.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_munger/provisional-derivations/incentive_map.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/discrete_payoff.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_pabrai/provisional-derivations/downside_floor.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/provisional-derivations/leakage_audit.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_simons/provisional-derivations/oos_cost_test.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/net_edge_sizer.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_sinclair/provisional-derivations/realized_vol_forecast.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/reflexivity_graph.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_soros/provisional-derivations/reversal_monitor.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_taleb/provisional-derivations/payoff_ruin.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/edge_recalculator.derived-proxy-evidence.json +0 -64
- package/knowledge/solo-test/persona-v3-solo-test-formulas/master_thorp/provisional-derivations/fractional_kelly.derived-proxy-evidence.json +0 -64
package/mcp/lib/gates.mjs
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { DEBATE_ROLES, LIMITS, PLACEHOLDER_BODIES, QUICK_REPORT_SECTIONS, REPORT_SECTIONS } from "./constants.mjs";
|
|
1
|
+
import { DEBATE_ROLES, LIMITS, PLACEHOLDER_BODIES, QUICK_REPORT_SECTIONS, RECORDED_BENCH_MARKER_PREFIX, REPORT_SECTIONS } from "./constants.mjs";
|
|
2
|
+
import { isFundOrIndex } from "./instruments.mjs";
|
|
2
3
|
import { denseLength, headingIncludesAlias, normalizeHeading, parseHeadings } from "./headings.mjs";
|
|
3
|
-
import { isChineseLanguage } from "./lang.mjs";
|
|
4
|
+
import { isChineseLanguage, languageKey, readerLanguageStatus } from "./lang.mjs";
|
|
4
5
|
|
|
5
6
|
export function withDisclaimer(markdown, language) {
|
|
6
7
|
const text = typeof markdown === "string" ? markdown : "";
|
|
7
|
-
if (/##\s*(Disclaimer
|
|
8
|
-
const note =
|
|
9
|
-
|
|
10
|
-
: "\n\n---\n\n## Disclaimer\n\nThis report is AI-generated for **educational and research purposes only**. It is **not investment advice**, not a recommendation to buy or sell any security, and not a solicitation. AI analysis can be incomplete, outdated, or wrong. Do your own research and consult a licensed professional before any investment decision. The authors accept no liability for any loss."
|
|
8
|
+
if (/##\s*(Disclaimer|免责声明|免責事項|면책)/iu.test(text)) return text;
|
|
9
|
+
const note = {
|
|
10
|
+
zh: "\n\n---\n\n## 免责声明\n\n本报告由 AI 自动生成,**仅供教育与研究**,**不构成投资建议**,也不构成任何证券买卖推荐或要约。AI 分析可能不完整、过时或错误。投资决策前请自行核实并咨询持牌专业人士。作者不对任何损失承担责任。",
|
|
11
|
+
en: "\n\n---\n\n## Disclaimer\n\nThis report is AI-generated for **educational and research purposes only**. It is **not investment advice**, not a recommendation to buy or sell any security, and not a solicitation. AI analysis can be incomplete, outdated, or wrong. Do your own research and consult a licensed professional before any investment decision. The authors accept no liability for any loss.",
|
|
12
|
+
ja: "\n\n---\n\n## 免責事項\n\n本レポートは AI が生成した**教育・調査目的のみ**の資料で、**投資助言ではありません**。証券の売買推奨や勧誘でもありません。AI の分析は不完全、古い、または誤っている可能性があります。投資判断の前にご自身で確認し、資格を有する専門家へ相談してください。作成者は損失について責任を負いません。",
|
|
13
|
+
ko: "\n\n---\n\n## 면책 조항\n\n이 보고서는 AI가 생성한 **교육 및 연구 목적의 자료**이며 **투자 조언이 아닙니다**. 증권 매매 권유나 청약도 아닙니다. AI 분석은 불완전하거나 오래되었거나 틀릴 수 있습니다. 투자 결정 전에 직접 확인하고 자격을 갖춘 전문가와 상의하십시오. 작성자는 손실에 대해 책임을 지지 않습니다.",
|
|
14
|
+
}[languageKey(language)];
|
|
11
15
|
return `${text}${note}`;
|
|
12
16
|
}
|
|
13
17
|
|
|
@@ -18,9 +22,12 @@ export function withVerificationBanner(markdown, gate, language) {
|
|
|
18
22
|
const lines = pairs.length
|
|
19
23
|
? pairs.map((item) => `- ${item.task}: ${item.source_id}`).join("\n")
|
|
20
24
|
: "- (unspecified)";
|
|
21
|
-
const banner =
|
|
22
|
-
|
|
23
|
-
: `\n\n---\n\n## Source Verification Gate
|
|
25
|
+
const banner = {
|
|
26
|
+
zh: `\n\n---\n\n## 来源核验\n\n**状态:needs_verification。** 以下重大论断引用了证据包中不存在的来源 ID;本轮尚未通过来源核验:\n\n${lines}\n`,
|
|
27
|
+
en: `\n\n---\n\n## Source Verification Gate\n\n**Status: needs_verification.** The following material claims cite source IDs that are not present in any evidence packet; this run has NOT passed source verification:\n\n${lines}\n`,
|
|
28
|
+
ja: `\n\n---\n\n## 出典検証ゲート\n\n**状態:needs_verification。** 次の重要な主張は証拠パケットに存在しない出典 ID を参照しています。この実行は出典検証を通過していません:\n\n${lines}\n`,
|
|
29
|
+
ko: `\n\n---\n\n## 출처 검증 게이트\n\n**상태: needs_verification.** 다음 중요 주장은 증거 패킷에 없는 출처 ID를 참조합니다. 이 실행은 출처 검증을 통과하지 못했습니다:\n\n${lines}\n`,
|
|
30
|
+
}[languageKey(language)];
|
|
24
31
|
return `${text}${banner}`;
|
|
25
32
|
}
|
|
26
33
|
|
|
@@ -80,6 +87,27 @@ export function agentState(run, role) {
|
|
|
80
87
|
return run.agent_status?.[role] || { role, status: "pending" };
|
|
81
88
|
}
|
|
82
89
|
|
|
90
|
+
/**
|
|
91
|
+
* One definition of "this seat still owes the run something", used by every caller.
|
|
92
|
+
*
|
|
93
|
+
* The status snapshot and the completeness gate used to read a missing `master_status` entry
|
|
94
|
+
* as "fine" while the debate and PM gates read the same absence as "missing". A run recovered
|
|
95
|
+
* through the idempotent plan path could therefore report `complete` with no pending seats
|
|
96
|
+
* and still be hard-rejected at `record_visible_decision` naming exactly those seats -- an
|
|
97
|
+
* unrecoverable state behind a status display that said nothing was wrong.
|
|
98
|
+
*
|
|
99
|
+
* The shared reading resolves it toward unblocking: a seat that is genuinely waiting always
|
|
100
|
+
* has a `waiting` entry, because every write path that records an opinion also writes the
|
|
101
|
+
* status. A missing entry therefore only occurs on a run persisted before that invariant
|
|
102
|
+
* existed, and treating that as a hard block would strand the run with no way forward.
|
|
103
|
+
*/
|
|
104
|
+
export function masterSeatIncomplete(run, id) {
|
|
105
|
+
const recorded = (run?.master_opinions || []).some((opinion) => opinion?.master === id);
|
|
106
|
+
if (!recorded) return true;
|
|
107
|
+
const state = run?.master_status?.[id];
|
|
108
|
+
return Boolean(state) && state.status !== "completed";
|
|
109
|
+
}
|
|
110
|
+
|
|
83
111
|
export function completenessStatus(run) {
|
|
84
112
|
const tasks = Array.isArray(run.tasks) ? run.tasks : [];
|
|
85
113
|
const quick = run.council_mode === "quick";
|
|
@@ -109,8 +137,7 @@ export function completenessStatus(run) {
|
|
|
109
137
|
// read as a finished committee -- and a bench nobody consulted is worse than no bench,
|
|
110
138
|
// because the reader believes the verdict survived twenty-one lenses.
|
|
111
139
|
const selected = Array.isArray(run.masters) ? run.masters : [];
|
|
112
|
-
const
|
|
113
|
-
const missing_masters = selected.filter((id) => !recorded.has(id));
|
|
140
|
+
const missing_masters = selected.filter((id) => masterSeatIncomplete(run, id));
|
|
114
141
|
const complete = missing_evidence.length === 0 && missing_debate.length === 0 && missing_masters.length === 0;
|
|
115
142
|
return {
|
|
116
143
|
completeness: complete ? "complete" : "incomplete",
|
|
@@ -139,9 +166,12 @@ export function withCompletenessBanner(markdown, completeness, language) {
|
|
|
139
166
|
// Naming the skipped seats matters more than the flag: "incomplete" without a list
|
|
140
167
|
// invites the reader to assume it was something minor.
|
|
141
168
|
const msLine = ms.length ? ms.map((id) => `- ${id}`).join("\n") : "";
|
|
142
|
-
const banner =
|
|
143
|
-
|
|
144
|
-
: `> [!WARNING]\n## Incomplete Council Run
|
|
169
|
+
const banner = {
|
|
170
|
+
zh: `> [!WARNING]\n## 委员会流程未完成\n\n**状态:incomplete。** 本轮没有完成全部委员会流程,结论不可靠。\n\n未完成的证据席:\n${evLine}\n\n未完成的辩论席:\n${dbLine}\n${msLine ? `\n未给出意见的方法席:\n${msLine}\n` : ""}`,
|
|
171
|
+
en: `> [!WARNING]\n## Incomplete Council Run\n\n**Status: incomplete.** This run did NOT execute the full council workflow; the conclusion is unreliable.\n\nMissing evidence roles:\n${evLine}\n\nMissing debate roles:\n${dbLine}\n${msLine ? `\nMethod seats that gave no opinion:\n${msLine}\n` : ""}`,
|
|
172
|
+
ja: `> [!WARNING]\n## 委員会プロセス未完了\n\n**状態:incomplete。** 委員会の全工程を完了していないため、結論は信頼できません。\n\n未完了の証拠席:\n${evLine}\n\n未完了の討論席:\n${dbLine}\n${msLine ? `\n意見を記録できなかったメソッド席:\n${msLine}\n` : ""}`,
|
|
173
|
+
ko: `> [!WARNING]\n## 위원회 실행 미완료\n\n**상태: incomplete.** 전체 위원회 절차가 완료되지 않아 결론을 신뢰할 수 없습니다.\n\n미완료 증거 좌석:\n${evLine}\n\n미완료 토론 좌석:\n${dbLine}\n${msLine ? `\n의견을 기록하지 못한 방법론 좌석:\n${msLine}\n` : ""}`,
|
|
174
|
+
}[languageKey(language)];
|
|
145
175
|
return `${banner}\n\n---\n\n${text}`;
|
|
146
176
|
}
|
|
147
177
|
|
|
@@ -182,6 +212,54 @@ const isPlaceholder = (body) => {
|
|
|
182
212
|
return PLACEHOLDER_BODIES.includes(compact);
|
|
183
213
|
};
|
|
184
214
|
|
|
215
|
+
const LANGUAGE_CORE_SECTIONS = new Set([
|
|
216
|
+
"conclusion", "analyst_work_log", "debate_record", "master_bench", "market_expectations",
|
|
217
|
+
"earnings_call", "news", "valuation", "price_levels", "risks", "position", "data_gaps",
|
|
218
|
+
"invalidation",
|
|
219
|
+
]);
|
|
220
|
+
|
|
221
|
+
function readerLanguageAudit(assigned, language) {
|
|
222
|
+
const requested = languageKey(language);
|
|
223
|
+
const mismatched = [];
|
|
224
|
+
let targetCharacters = 0;
|
|
225
|
+
let observedCharacters = 0;
|
|
226
|
+
const bodies = [];
|
|
227
|
+
for (const id of LANGUAGE_CORE_SECTIONS) {
|
|
228
|
+
const heading = assigned.get(id);
|
|
229
|
+
const body = heading?.body || "";
|
|
230
|
+
if (!body.trim()) continue;
|
|
231
|
+
bodies.push(body);
|
|
232
|
+
const section = readerLanguageStatus(body, language, { minimumTargetCharacters: 2, minimumRatio: 0.05 });
|
|
233
|
+
targetCharacters += section.target_characters;
|
|
234
|
+
observedCharacters += section.reader_characters;
|
|
235
|
+
// Pure Han fragments are inconclusive across Chinese/Japanese. Let the whole
|
|
236
|
+
// report establish the locale, but reject sections with positive other-language
|
|
237
|
+
// evidence so one translated heading cannot hide a foreign-language body.
|
|
238
|
+
if (![requested, "shared_han", "undetermined"].includes(section.observed_locale)) mismatched.push(id);
|
|
239
|
+
|
|
240
|
+
const titleProbe = readerLanguageStatus(heading?.title || "", language, { minimumTargetCharacters: 1, minimumRatio: 0 });
|
|
241
|
+
const { scripts = {} } = titleProbe;
|
|
242
|
+
let titleLocale = "undetermined";
|
|
243
|
+
if ((scripts.hangul || 0) > 0) titleLocale = "ko";
|
|
244
|
+
else if ((scripts.kana || 0) > 0 || (titleProbe.japanese_markers || 0) > 0) titleLocale = "ja";
|
|
245
|
+
else if ((titleProbe.chinese_markers || 0) > 0) titleLocale = "zh";
|
|
246
|
+
else if ((scripts.latin || 0) > 0 && (scripts.han || 0) === 0) titleLocale = "en";
|
|
247
|
+
else if ((scripts.han || 0) > 0) titleLocale = "shared_han";
|
|
248
|
+
const sharedHanAllowed = titleLocale === "shared_han" && ["zh", "ja"].includes(requested);
|
|
249
|
+
if (![requested, "undetermined"].includes(titleLocale) && !sharedHanAllowed) mismatched.push(`heading:${id}`);
|
|
250
|
+
}
|
|
251
|
+
const whole = readerLanguageStatus(bodies.join("\n"), language, { minimumTargetCharacters: 12, minimumRatio: 0.08 });
|
|
252
|
+
const languageStatus = mismatched.length || whole.status !== "passed" ? "failed" : "passed";
|
|
253
|
+
return {
|
|
254
|
+
requested_locale: requested,
|
|
255
|
+
observed_locale: whole.observed_locale,
|
|
256
|
+
language_status: languageStatus,
|
|
257
|
+
target_script_characters: whole.target_characters || targetCharacters,
|
|
258
|
+
reader_characters_checked: observedCharacters,
|
|
259
|
+
mismatched_sections: mismatched,
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
185
263
|
export function validateFinalReport(markdown, run) {
|
|
186
264
|
const text = String(markdown || "");
|
|
187
265
|
const headings = parseHeadings(text);
|
|
@@ -192,8 +270,10 @@ export function validateFinalReport(markdown, run) {
|
|
|
192
270
|
const contractSections = quick ? QUICK_REPORT_SECTIONS : REPORT_SECTIONS;
|
|
193
271
|
|
|
194
272
|
const benchRan = ((run?.masters || []).length > 0) || ((run?.master_opinions || []).length > 0);
|
|
273
|
+
const fundOrIndex = isFundOrIndex(run?.grounding?.instrument);
|
|
195
274
|
for (const section of contractSections) {
|
|
196
275
|
if (section.when_masters && !benchRan) continue;
|
|
276
|
+
if (section.when_fund_or_index && !fundOrIndex) continue;
|
|
197
277
|
const heading = assigned.get(section.id);
|
|
198
278
|
if (!heading) {
|
|
199
279
|
missing.push(`missing section: ${section.id}`);
|
|
@@ -224,6 +304,36 @@ export function validateFinalReport(markdown, run) {
|
|
|
224
304
|
}
|
|
225
305
|
}
|
|
226
306
|
|
|
307
|
+
// A bench heading is not evidence that every selected method is readable. The previous
|
|
308
|
+
// gate passed a report containing only a generic bench paragraph even when twenty-five
|
|
309
|
+
// selected seats had no statement at all. Require both the frozen record and its exact
|
|
310
|
+
// stable ID in the system-owned publication section.
|
|
311
|
+
const selectedMethodSeats = [...new Set(
|
|
312
|
+
(run?.masters?.length ? run.masters : (run?.master_opinions || []).map((opinion) => opinion.master))
|
|
313
|
+
.filter((id) => typeof id === "string" && id.length),
|
|
314
|
+
)];
|
|
315
|
+
const opinionsByMaster = new Map((run?.master_opinions || []).map((opinion) => [opinion.master, opinion]));
|
|
316
|
+
// Anchor, not heading assignment. A relabelled PM commentary section can legally contain a
|
|
317
|
+
// localized bench alias, and it would then win the "richest body" assignment and fail every
|
|
318
|
+
// seat here against PM prose. The marker only ever appears in the system-generated bench,
|
|
319
|
+
// which assembly appends last, so everything from it onwards is system-owned output.
|
|
320
|
+
const benchMarkerAt = text.indexOf(`<!-- ${RECORDED_BENCH_MARKER_PREFIX}`);
|
|
321
|
+
const benchBody = benchMarkerAt >= 0 ? text.slice(benchMarkerAt) : (assigned.get("master_bench")?.body || "");
|
|
322
|
+
const readableMethodStatements = [];
|
|
323
|
+
const renderedMethodStatements = [];
|
|
324
|
+
for (const id of selectedMethodSeats) {
|
|
325
|
+
const opinion = opinionsByMaster.get(id);
|
|
326
|
+
if (!opinion) {
|
|
327
|
+
missing.push(`missing recorded method-seat opinion: ${id}`);
|
|
328
|
+
} else if (denseLength(opinion.voice_statement) < 20) {
|
|
329
|
+
missing.push(`missing readable method-seat statement: ${id}`);
|
|
330
|
+
} else {
|
|
331
|
+
readableMethodStatements.push(id);
|
|
332
|
+
}
|
|
333
|
+
if (!benchBody.includes(id)) missing.push(`method-seat statement not rendered in Master Bench: ${id}`);
|
|
334
|
+
else renderedMethodStatements.push(id);
|
|
335
|
+
}
|
|
336
|
+
|
|
227
337
|
const sourceCount = (run.packets || []).reduce((sum, packet) => sum + (packet.sources?.length || 0), 0);
|
|
228
338
|
if (sourceCount > 0 && !/[a-z_]+:s\d+/i.test(text)) missing.push("missing scoped source IDs such as market_data:S1");
|
|
229
339
|
const minLength = run.dry_run
|
|
@@ -231,6 +341,10 @@ export function validateFinalReport(markdown, run) {
|
|
|
231
341
|
: quick ? LIMITS.REPORT_MIN_CHARS_QUICK : LIMITS.REPORT_MIN_CHARS;
|
|
232
342
|
if (denseLength(text) < minLength) missing.push(`report too short: minimum ${minLength} non-space characters`);
|
|
233
343
|
const execution = completenessStatus(run || {});
|
|
344
|
+
const languageAudit = readerLanguageAudit(assigned, run?.language);
|
|
345
|
+
if (languageAudit.language_status !== "passed") {
|
|
346
|
+
missing.push(`report reader language mismatch: requested=${languageAudit.requested_locale}; sections=${languageAudit.mismatched_sections.join(",") || "insufficient target-language text"}`);
|
|
347
|
+
}
|
|
234
348
|
if (quick) {
|
|
235
349
|
const markerCount = (text.match(/alphacouncil:quick-scope:v1:begin/gu) || []).length;
|
|
236
350
|
if (markerCount !== 1) missing.push("missing system-owned quick_v1 scope marker");
|
|
@@ -263,10 +377,30 @@ export function validateFinalReport(markdown, run) {
|
|
|
263
377
|
evidence_coverage: execution.evidence_coverage,
|
|
264
378
|
degraded_evidence: execution.degraded_evidence,
|
|
265
379
|
degraded_debate: execution.degraded_debate,
|
|
380
|
+
requested_locale: languageAudit.requested_locale,
|
|
381
|
+
observed_locale: languageAudit.observed_locale,
|
|
382
|
+
language_status: languageAudit.language_status,
|
|
383
|
+
language_mismatched_sections: languageAudit.mismatched_sections,
|
|
384
|
+
target_script_characters: languageAudit.target_script_characters,
|
|
385
|
+
reader_characters_checked: languageAudit.reader_characters_checked,
|
|
386
|
+
method_statement_coverage: {
|
|
387
|
+
selected_count: selectedMethodSeats.length,
|
|
388
|
+
readable_count: readableMethodStatements.length,
|
|
389
|
+
rendered_count: renderedMethodStatements.length,
|
|
390
|
+
readable_master_ids: readableMethodStatements,
|
|
391
|
+
rendered_master_ids: renderedMethodStatements,
|
|
392
|
+
status: readableMethodStatements.length === selectedMethodSeats.length
|
|
393
|
+
&& renderedMethodStatements.length === selectedMethodSeats.length
|
|
394
|
+
? "passed"
|
|
395
|
+
: "failed",
|
|
396
|
+
},
|
|
266
397
|
status: missing.length ? "needs_revision" : "passed",
|
|
267
398
|
missing,
|
|
268
399
|
sections,
|
|
269
400
|
checked_at: new Date().toISOString(),
|
|
270
|
-
required_sections: contractSections
|
|
401
|
+
required_sections: contractSections
|
|
402
|
+
.filter((section) => (!section.when_masters || benchRan)
|
|
403
|
+
&& (!section.when_fund_or_index || fundOrIndex))
|
|
404
|
+
.map((section) => section.id),
|
|
271
405
|
};
|
|
272
406
|
}
|
package/mcp/lib/grounding.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { fetchQuote } from "./quotes.mjs";
|
|
2
2
|
import { invalidParams } from "./errors.mjs";
|
|
3
3
|
import { getMacroSnapshot } from "./macro.mjs";
|
|
4
|
+
import { fetchMacroSeries } from "./fred.mjs";
|
|
5
|
+
import { fetchFundamentals } from "./fundamentals.mjs";
|
|
6
|
+
import { fetchInsiderOwnership } from "./insider-ownership.mjs";
|
|
7
|
+
import { gatherInstrumentFacts, LOOK_THROUGH_FACT_IDS } from "./instrument-facts.mjs";
|
|
4
8
|
import { fetchOptionsChain } from "./options.mjs";
|
|
5
9
|
import { screenTicker } from "./screen.mjs";
|
|
6
10
|
import { resolveIndustry, industryCoverage } from "./industry.mjs";
|
|
@@ -8,6 +12,9 @@ import { fetchSubmissions, fetchUniverse } from "./sec.mjs";
|
|
|
8
12
|
import { fetchMarketFinancials, coverageFor, marketFor } from "./markets.mjs";
|
|
9
13
|
import { inclusiveCutoffTime } from "./personas-v3/source-anchor.mjs";
|
|
10
14
|
import { adaptGroundingToTypedFacts } from "./personas-v3/grounding-adapter.mjs";
|
|
15
|
+
import { classifyInstrument, instrumentResearchChecklist, isFundOrIndex } from "./instruments.mjs";
|
|
16
|
+
// Aliased: this module already has a private `localized(label, chinese)` for metric labels.
|
|
17
|
+
import { localized as localizedText } from "./lang.mjs";
|
|
11
18
|
|
|
12
19
|
const DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/u;
|
|
13
20
|
|
|
@@ -78,6 +85,7 @@ export async function gatherGrounding({
|
|
|
78
85
|
options = true,
|
|
79
86
|
asOf = null,
|
|
80
87
|
now = new Date(),
|
|
88
|
+
language = "English",
|
|
81
89
|
signal,
|
|
82
90
|
} = {}) {
|
|
83
91
|
const snapshotPolicy = liveSnapshotPolicy(asOf, { now });
|
|
@@ -87,53 +95,131 @@ export async function gatherGrounding({
|
|
|
87
95
|
gathered_at: gatheredAt,
|
|
88
96
|
point_in_time_policy: snapshotPolicy,
|
|
89
97
|
unavailable: [],
|
|
98
|
+
not_applicable: [],
|
|
90
99
|
};
|
|
91
|
-
// Without this, a caller that has a ticker but not a CIK gets no filer profile and no
|
|
92
|
-
// mechanical screen -- the filings half of "established facts" disappears and nothing
|
|
93
|
-
// in the output says it was skipped.
|
|
94
|
-
// The current ticker universe is itself time-varying. A historical run may use an explicit
|
|
95
|
-
// CIK with SEC's filed-at filter, but it must not resolve that CIK from today's universe.
|
|
96
|
-
if (!cik && symbol && marketFor(symbol)?.id === "US" && snapshotPolicy.allowed) {
|
|
97
|
-
cik = await fetchUniverse({ signal })
|
|
98
|
-
.then((rows) => rows.find((r) => String(r.ticker).toUpperCase() === String(symbol).toUpperCase())?.cik)
|
|
99
|
-
.catch(() => undefined);
|
|
100
|
-
} else if (!cik && symbol && marketFor(symbol)?.id === "US") {
|
|
101
|
-
out.unavailable.push("SEC ticker mapping: historical cutoff requires an explicit point-in-time CIK; today's ticker universe was not fetched");
|
|
102
|
-
}
|
|
103
100
|
const jobs = [];
|
|
101
|
+
let quoteJob = null;
|
|
104
102
|
|
|
105
103
|
if (symbol && snapshotPolicy.allowed) {
|
|
106
|
-
|
|
104
|
+
quoteJob = safely("quote", () => fetchQuote(symbol, { signal })).then((r) => {
|
|
107
105
|
if (r.ok && !r.value?.error) out.quote = r.value;
|
|
108
106
|
else out.unavailable.push(r.ok ? `quote: ${r.value.error}` : r.error);
|
|
109
|
-
})
|
|
107
|
+
});
|
|
108
|
+
jobs.push(quoteJob);
|
|
110
109
|
} else if (symbol) {
|
|
111
110
|
out.unavailable.push("quote: historical cutoff requires an archived point-in-time price; current snapshot was not fetched");
|
|
112
111
|
}
|
|
113
112
|
|
|
113
|
+
if (macro && snapshotPolicy.allowed) {
|
|
114
|
+
jobs.push(safely("macro", () => getMacroSnapshot({ blocks: ["rates", "dollar_liquidity", "commodities"], signal })).then((r) => {
|
|
115
|
+
if (!r.ok) { out.unavailable.push(r.error); return; }
|
|
116
|
+
out.macro = {
|
|
117
|
+
derived: r.value.derived.filter((d) => d.available).map((d) => ({ id: d.id, label: d.label, value: d.value })),
|
|
118
|
+
unavailable: r.value.unavailable,
|
|
119
|
+
};
|
|
120
|
+
}));
|
|
121
|
+
// Dated official series, fetched alongside the market block rather than instead of it.
|
|
122
|
+
// The block prices the present; these carry the history a regime or an impulse needs, and
|
|
123
|
+
// each observation publishes its own date, so they are the only macro input that can
|
|
124
|
+
// reach the typed-fact pack with real lineage.
|
|
125
|
+
jobs.push(safely("macro series", () => fetchMacroSeries({ asOf, signal })).then((r) => {
|
|
126
|
+
if (!r.ok) { out.unavailable.push(r.error); return; }
|
|
127
|
+
out.macro_series = r.value;
|
|
128
|
+
out.unavailable.push(...r.value.unavailable);
|
|
129
|
+
}));
|
|
130
|
+
} else if (macro) {
|
|
131
|
+
out.unavailable.push("macro: historical cutoff requires archived observations; current market snapshots were not fetched");
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Classification is a routing decision, so wait for the already-started quote metadata
|
|
135
|
+
// before choosing SEC/company versus fund/index paths. Macro continues in parallel.
|
|
136
|
+
if (quoteJob) await quoteJob;
|
|
137
|
+
out.instrument = classifyInstrument({ symbol, quote: out.quote });
|
|
138
|
+
|
|
139
|
+
// Without this, a caller that has a ticker but not a CIK gets no filer profile and no
|
|
140
|
+
// mechanical screen -- the filings half of "established facts" disappears and nothing
|
|
141
|
+
// in the output says it was skipped. Fund registrants still get their submissions profile,
|
|
142
|
+
// but never an operating-company Company Facts screen.
|
|
143
|
+
const symbolMarket = marketFor(symbol);
|
|
144
|
+
const secRegistrantCandidate = symbolMarket?.id === "US"
|
|
145
|
+
&& !["index", "future", "fx", "crypto"].includes(out.instrument.asset_type);
|
|
146
|
+
if (!cik && symbol && secRegistrantCandidate && snapshotPolicy.allowed) {
|
|
147
|
+
const mapping = await safely("SEC ticker mapping", () => fetchUniverse({ signal }));
|
|
148
|
+
if (mapping.ok) {
|
|
149
|
+
const match = mapping.value.find((row) => String(row.ticker).toUpperCase() === String(symbol).toUpperCase());
|
|
150
|
+
cik = match?.cik;
|
|
151
|
+
if (match) {
|
|
152
|
+
out.sec_ticker_match = { cik: match.cik, ticker: match.ticker, title: match.title };
|
|
153
|
+
out.instrument = classifyInstrument({ symbol, quote: out.quote, filer: { title: match.title } });
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
out.unavailable.push(mapping.error);
|
|
157
|
+
}
|
|
158
|
+
} else if (!cik && symbol && secRegistrantCandidate) {
|
|
159
|
+
out.unavailable.push("SEC ticker mapping: historical cutoff requires an explicit point-in-time CIK; today's ticker universe was not fetched");
|
|
160
|
+
}
|
|
161
|
+
|
|
114
162
|
// Persona methods must receive the same shape the options calculator actually returns.
|
|
115
163
|
// Do not manufacture realised volatility, a friction-adjusted edge, or event coverage:
|
|
116
164
|
// the delayed CBOE snapshot does not contain any of them. Its explicit `unavailable`
|
|
117
165
|
// entries remain attached to the grounding so downstream policies see gaps as gaps.
|
|
118
|
-
if (symbol && options &&
|
|
166
|
+
if (symbol && options && symbolMarket?.id === "US" && !out.instrument.index_like && snapshotPolicy.allowed) {
|
|
119
167
|
jobs.push(safely("options chain", () => fetchOptionsChain(symbol, { asOf, signal })).then((r) => {
|
|
120
168
|
if (r.ok && r.value?.available) out.options = r.value;
|
|
121
169
|
else out.unavailable.push(r.ok ? `options chain: ${r.value?.reason || "unavailable"}` : r.error);
|
|
122
170
|
}));
|
|
123
|
-
} else if (symbol && options &&
|
|
171
|
+
} else if (symbol && options && symbolMarket?.id === "US" && !out.instrument.index_like) {
|
|
124
172
|
out.unavailable.push("options chain: historical cutoff requires an archived chain; current CBOE snapshot was not fetched");
|
|
173
|
+
} else if (symbol && options && out.instrument.index_like) {
|
|
174
|
+
out.not_applicable.push(localizedText(language, {
|
|
175
|
+
en: "CBOE equity/ETF option-chain adapter: direct cash-index symbol is not supported; use the appropriate listed derivative or ETF proxy explicitly",
|
|
176
|
+
zh: "CBOE 股票/ETF 期权链适配器:不支持直接的现金指数代码;请显式使用对应的上市衍生品或 ETF 代理。",
|
|
177
|
+
ja: "CBOE の株式/ETF オプションチェーン・アダプタ:現物指数シンボルには非対応です。対応する上場デリバティブまたは ETF 代理を明示的に使用してください。",
|
|
178
|
+
ko: "CBOE 주식/ETF 옵션 체인 어댑터: 현물 지수 심볼은 지원하지 않습니다. 해당 상장 파생상품 또는 ETF 프록시를 명시적으로 사용하십시오.",
|
|
179
|
+
}));
|
|
125
180
|
}
|
|
126
181
|
|
|
127
182
|
if (cik) {
|
|
128
183
|
if (snapshotPolicy.allowed) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}));
|
|
184
|
+
// Resolve the registrant before deciding whether Company Facts applies. Scheduling
|
|
185
|
+
// both in parallel recreated the QQQ bug when quote metadata was unavailable: the
|
|
186
|
+
// screen started under an equity fallback before the fund name arrived.
|
|
187
|
+
const filer = await safely("filer profile", () => fetchSubmissions(cik, { signal }));
|
|
188
|
+
if (filer.ok) {
|
|
189
|
+
out.filer = filer.value;
|
|
190
|
+
out.instrument = classifyInstrument({ symbol, quote: out.quote, filer: out.filer });
|
|
191
|
+
} else out.unavailable.push(filer.error);
|
|
133
192
|
} else {
|
|
134
193
|
out.unavailable.push("filer profile: SEC submissions metadata is current, not point-in-time versioned; it was excluded from the historical information set");
|
|
135
194
|
}
|
|
136
|
-
|
|
195
|
+
// The mechanical screen answers "is this worth research time"; the derived fundamentals
|
|
196
|
+
// answer "what do the method seats need". Both read the same Company Facts document, so
|
|
197
|
+
// they share one classification gate and run together.
|
|
198
|
+
if (out.instrument.sec_companyfacts_applicable && snapshotPolicy.allowed) {
|
|
199
|
+
const fundamentalsJob = safely("fundamentals", () => fetchFundamentals({ cik, ticker: symbol, asOf, signal })).then((r) => {
|
|
200
|
+
if (!r.ok) { out.unavailable.push(r.error); return; }
|
|
201
|
+
out.fundamentals = r.value;
|
|
202
|
+
out.unavailable.push(...(r.value.unavailable || []).map((gap) => (
|
|
203
|
+
typeof gap === "string" ? gap : `fundamentals ${gap.metric}: ${gap.code}${gap.detail ? ` (${gap.detail})` : ""}`
|
|
204
|
+
)));
|
|
205
|
+
});
|
|
206
|
+
jobs.push(fundamentalsJob);
|
|
207
|
+
// Section 16 ownership is chained after the fundamentals rather than run beside them: it
|
|
208
|
+
// is a RATIO over shares outstanding, and taking that count from a second source would
|
|
209
|
+
// make the numerator and the denominator describe different registers.
|
|
210
|
+
jobs.push((async () => {
|
|
211
|
+
await fundamentalsJob;
|
|
212
|
+
const shares = out.fundamentals?.metrics?.["capital_allocation.share_count"]?.value;
|
|
213
|
+
if (!Number.isFinite(shares)) return;
|
|
214
|
+
const owned = await safely("insider ownership", () => fetchInsiderOwnership(cik, {
|
|
215
|
+
sharesOutstanding: shares, asOf, signal,
|
|
216
|
+
}));
|
|
217
|
+
if (!owned.ok) { out.unavailable.push(owned.error); return; }
|
|
218
|
+
out.insider_ownership = owned.value;
|
|
219
|
+
out.unavailable.push(...(owned.value.unavailable || []));
|
|
220
|
+
})());
|
|
221
|
+
}
|
|
222
|
+
if (out.instrument.sec_companyfacts_applicable) jobs.push(safely("screen", () => screenTicker({ cik, ticker: symbol, asOf, signal })).then((r) => {
|
|
137
223
|
if (!r.ok) { out.unavailable.push(r.error); return; }
|
|
138
224
|
const s = r.value;
|
|
139
225
|
const metricSourceIds = (metric) => (metric.source_records || []).map((source) => (
|
|
@@ -166,32 +252,60 @@ export async function gatherGrounding({
|
|
|
166
252
|
skipped: s.rules.filter((x) => x.skipped).map((x) => ({ rule: x.id, label: x.label })),
|
|
167
253
|
};
|
|
168
254
|
}));
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
};
|
|
255
|
+
else if (out.instrument.asset_type === "unknown") {
|
|
256
|
+
// Not the same thing as "not applicable": we could not classify the security at all,
|
|
257
|
+
// so withholding the screen is a gap the report must show, not a settled routing call.
|
|
258
|
+
out.unavailable.push(localizedText(language, {
|
|
259
|
+
en: "SEC Company Facts screen: instrument type unresolved (no exchange metadata and no registrant match), so the operating-company screen was withheld rather than assumed",
|
|
260
|
+
zh: "SEC Company Facts 筛选:证券类型未能判定(既无交易所元数据也无注册人匹配),因此不做经营公司假设,直接跳过该筛选。",
|
|
261
|
+
ja: "SEC Company Facts スクリーン:銘柄種別を判定できず(取引所メタデータも登録人一致もなし)、事業会社と仮定せずスクリーンを見送りました。",
|
|
262
|
+
ko: "SEC Company Facts 스크린: 증권 유형을 확정하지 못해(거래소 메타데이터·등록인 일치 모두 없음) 사업회사로 가정하지 않고 스크린을 보류했습니다.",
|
|
263
|
+
}));
|
|
264
|
+
} else out.not_applicable.push(localizedText(language, {
|
|
265
|
+
en: `operating-company SEC Company Facts screen: not applicable to ${out.instrument.asset_type}`,
|
|
266
|
+
zh: `经营公司 SEC Company Facts 筛选:不适用于 ${out.instrument.asset_type}。`,
|
|
267
|
+
ja: `事業会社向け SEC Company Facts スクリーン:${out.instrument.asset_type} には適用されません。`,
|
|
268
|
+
ko: `사업회사용 SEC Company Facts 스크린: ${out.instrument.asset_type}에는 적용되지 않습니다.`,
|
|
178
269
|
}));
|
|
179
|
-
} else if (macro) {
|
|
180
|
-
out.unavailable.push("macro: historical cutoff requires archived observations; current market snapshots were not fetched");
|
|
181
270
|
}
|
|
182
271
|
|
|
183
272
|
// Non-US symbols never reach the SEC path, so without this they arrived at the analyst
|
|
184
273
|
// with nothing but a price.
|
|
185
|
-
if (symbol &&
|
|
274
|
+
if (symbol && symbolMarket && symbolMarket.id !== "US" && !isFundOrIndex(out.instrument) && snapshotPolicy.allowed) {
|
|
186
275
|
jobs.push(safely("market financials", () => fetchMarketFinancials(symbol, { signal })).then((r) => {
|
|
187
276
|
if (!r.ok) { out.unavailable.push(r.error); return; }
|
|
188
277
|
out.market = r.value;
|
|
189
278
|
if (!r.value.financials) out.unavailable.push(`structured financials for ${symbol}: ${r.value.guidance}`);
|
|
190
279
|
}));
|
|
191
|
-
} else if (symbol &&
|
|
280
|
+
} else if (symbol && symbolMarket && symbolMarket.id !== "US" && !isFundOrIndex(out.instrument)) {
|
|
192
281
|
out.unavailable.push(`structured financials for ${symbol}: this adapter is not point-in-time versioned; current data was not fetched for a historical cutoff`);
|
|
193
282
|
}
|
|
194
283
|
|
|
284
|
+
// A fund or index has no issuer financials, so this is where its evidence comes from
|
|
285
|
+
// instead: published holdings, index-level valuation and the look-through aggregates that
|
|
286
|
+
// let an operating-company method run against a basket at all.
|
|
287
|
+
if (symbol && isFundOrIndex(out.instrument) && snapshotPolicy.allowed) {
|
|
288
|
+
jobs.push(safely("instrument aggregate", () => gatherInstrumentFacts({
|
|
289
|
+
symbol, instrument: out.instrument, asOf, signal,
|
|
290
|
+
// The operating-company facts a basket can supply at all: everything the method seats
|
|
291
|
+
// ask of a company, aggregated by weight across the constituents that publish it.
|
|
292
|
+
lookThroughFactIds: LOOK_THROUGH_FACT_IDS,
|
|
293
|
+
})).then((r) => {
|
|
294
|
+
if (!r.ok) { out.unavailable.push(r.error); return; }
|
|
295
|
+
out.instrument_aggregate = r.value;
|
|
296
|
+
out.unavailable.push(...(r.value.unavailable || []));
|
|
297
|
+
}));
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (symbol && isFundOrIndex(out.instrument)) {
|
|
301
|
+
out.not_applicable.push(localizedText(language, {
|
|
302
|
+
en: `operating-company structured financials: not applicable to ${out.instrument.asset_type}; use look-through or aggregate index evidence`,
|
|
303
|
+
zh: `经营公司结构化财报:不适用于 ${out.instrument.asset_type};请使用持仓穿透或指数聚合证据。`,
|
|
304
|
+
ja: `事業会社の構造化財務データ:${out.instrument.asset_type} には適用されません。ルックスルーまたは指数集計エビデンスを使用してください。`,
|
|
305
|
+
ko: `사업회사 구조화 재무데이터: ${out.instrument.asset_type}에는 적용되지 않습니다. 룩스루 또는 지수 집계 증거를 사용하십시오.`,
|
|
306
|
+
}));
|
|
307
|
+
}
|
|
308
|
+
|
|
195
309
|
if (industry && snapshotPolicy.allowed) {
|
|
196
310
|
const curated = resolveIndustry(industry);
|
|
197
311
|
out.industry = {
|
|
@@ -216,7 +330,31 @@ export async function gatherGrounding({
|
|
|
216
330
|
|
|
217
331
|
// Coverage across every symbol in play, so a report cannot quietly become US-only.
|
|
218
332
|
const inPlay = [symbol, ...(out.industry?.participants || []).map((p) => p.symbol)].filter(Boolean);
|
|
219
|
-
if (inPlay.length) out.coverage = coverageFor([...new Set(inPlay)]);
|
|
333
|
+
if (inPlay.length && !isFundOrIndex(out.instrument)) out.coverage = coverageFor([...new Set(inPlay)]);
|
|
334
|
+
else if (symbol && isFundOrIndex(out.instrument)) {
|
|
335
|
+
out.coverage = {
|
|
336
|
+
rows: [{
|
|
337
|
+
symbol,
|
|
338
|
+
market: symbolMarket?.id || "market",
|
|
339
|
+
structured_financials: localizedText(language, {
|
|
340
|
+
en: "not applicable", zh: "不适用", ja: "適用外", ko: "해당 없음",
|
|
341
|
+
}),
|
|
342
|
+
reason: localizedText(language, {
|
|
343
|
+
en: `${out.instrument.asset_type} requires holdings/index look-through rather than issuer financial statements`,
|
|
344
|
+
zh: `${out.instrument.asset_type} 需要持仓/指数穿透,而不是发行人财务报表。`,
|
|
345
|
+
ja: `${out.instrument.asset_type} は発行体の財務諸表ではなく、保有銘柄・指数のルックスルーが必要です。`,
|
|
346
|
+
ko: `${out.instrument.asset_type}는 발행인 재무제표가 아니라 보유종목·지수 룩스루가 필요합니다.`,
|
|
347
|
+
}),
|
|
348
|
+
}],
|
|
349
|
+
summary: { full: 0, summary_only: 0, none: 0, not_applicable: 1 },
|
|
350
|
+
note: localizedText(language, {
|
|
351
|
+
en: "Fund/index research uses dated holdings, methodology and aggregate or look-through evidence.",
|
|
352
|
+
zh: "基金/指数研究使用带日期的持仓、方法论,以及聚合或穿透证据。",
|
|
353
|
+
ja: "ファンド/指数のリサーチは、日付入りの保有銘柄・方法論・集計またはルックスルーのエビデンスを使用します。",
|
|
354
|
+
ko: "펀드/지수 리서치는 일자가 명시된 보유종목, 방법론, 집계 또는 룩스루 증거를 사용합니다.",
|
|
355
|
+
}),
|
|
356
|
+
};
|
|
357
|
+
}
|
|
220
358
|
const typed = adaptGroundingToTypedFacts(out, {
|
|
221
359
|
asOf: asOf || gatheredAt,
|
|
222
360
|
knowledgeAsOf: asOf || gatheredAt,
|
|
@@ -258,7 +396,7 @@ const localized = (label, chinese) => {
|
|
|
258
396
|
|
|
259
397
|
export function groundingBlock(grounding, language = "English") {
|
|
260
398
|
const chinese = /中文|chinese|zh/i.test(String(language));
|
|
261
|
-
if (!grounding || (!grounding.quote && !grounding.screen && !grounding.options && !grounding.macro && !grounding.industry)) return "";
|
|
399
|
+
if (!grounding || (!grounding.instrument && !grounding.quote && !grounding.screen && !grounding.options && !grounding.macro && !grounding.industry)) return "";
|
|
262
400
|
|
|
263
401
|
const lines = [];
|
|
264
402
|
const head = chinese
|
|
@@ -266,6 +404,13 @@ export function groundingBlock(grounding, language = "English") {
|
|
|
266
404
|
: "## Established facts (from filings and exchange data, not from your memory)";
|
|
267
405
|
lines.push(head);
|
|
268
406
|
|
|
407
|
+
if (grounding.instrument) {
|
|
408
|
+
const i = grounding.instrument;
|
|
409
|
+
lines.push(chinese
|
|
410
|
+
? `- 资产类型:${i.asset_type}|研究模型 ${i.research_model}|识别来源 ${i.classification_source}`
|
|
411
|
+
: `- Instrument: ${i.asset_type} | research model ${i.research_model} | classified by ${i.classification_source}`);
|
|
412
|
+
}
|
|
413
|
+
|
|
269
414
|
if (grounding.filer) {
|
|
270
415
|
lines.push(chinese
|
|
271
416
|
? `- 主体:${grounding.filer.name}|SIC ${grounding.filer.sic ?? "未知"}(${grounding.filer.sic_description ?? "-"})|交易所 ${grounding.filer.exchanges.join(", ") || "未知"}`
|
|
@@ -339,6 +484,13 @@ export function groundingBlock(grounding, language = "English") {
|
|
|
339
484
|
lines.push(chinese ? `- 取不到的数据(属于数据缺口,禁止用记忆补):${grounding.unavailable.join(";")}`
|
|
340
485
|
: `- Could not be retrieved -- these are data gaps and must NOT be filled from memory: ${grounding.unavailable.join("; ")}`);
|
|
341
486
|
}
|
|
487
|
+
if (grounding.not_applicable?.length) {
|
|
488
|
+
lines.push(chinese ? `- 明确不适用(不是数据抓取错误):${grounding.not_applicable.join(";")}`
|
|
489
|
+
: `- Explicitly not applicable (not a retrieval failure): ${grounding.not_applicable.join("; ")}`);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
const instrumentChecklist = instrumentResearchChecklist(grounding.instrument, language);
|
|
493
|
+
if (instrumentChecklist) lines.push("", instrumentChecklist);
|
|
342
494
|
|
|
343
495
|
lines.push("");
|
|
344
496
|
lines.push(chinese
|