Feat/ai berkshire skills#407
Conversation
… committee preset) Ports the ai-berkshire value-investing methodology into first-class Vibe-Trading tools / skills / swarm preset, rewritten for the BaseTool + SKILL.md + swarm model (no Claude Code slash-commands or TeamCreate). Tools (auto-discovered BaseTool subclasses, pure stdlib): - financial_rigor: exact-decimal verification — verify_market_cap, verify_valuation, cross_validate, benford, calc, three_scenario. The calc evaluator walks an AST in the Decimal domain (0.1 + 0.2 == 0.3 exactly), so there is no eval and no IEEE-754 drift. - report_audit: markdown data-point extraction -> random sample -> PASS/FAIL verdict gate. A single-source failure now correctly FAILs the report (the source logic silently WARNed instead). Skills (markdown methodology): - bottleneck-hunter: supply-chain bottleneck arbitrage — decompose a super-trend to Layer 2/3 choke points with mandatory valuation gates. - thesis-tracker: post-buy discipline — 5-sentence thesis, falsifiable assumptions, red lines, 1-10 health score. - management-deep-dive: management integrity / ability / capital-allocation / governance with Duan Yongping's 3-question verdict. - private-company-research: 6-lens pre-IPO framework (business / financial / competitive / risk / tech / alternative-data) with confidence labeling and signal-consistency cross-validation. Swarm preset: - value_investing_committee: four adversarial master perspectives (Buffett / Munger / Duan Yongping / Li Lu) plus a chair synthesizing consensus and contradictions into a verdict. 63 new tests; EXPECTED_PRESET_COUNT bumped 29 -> 30. Inspired by https://github.com/xbtlin/ai-berkshire. Co-Authored-By: Claude <noreply@anthropic.com>
loop.py dedups non-repeatable tools by name (a tool already in _called_ok is refused on a second call). Both tools are read-only and idempotent but were left at the default repeatable=False, so calling financial_rigor twice in one session (e.g. verify_valuation then three_scenario) hit a 'cached result, cannot re-invoke' refusal. Set repeatable=True on both. Co-Authored-By: Claude <noreply@anthropic.com>
LLMs routinely pass '15%' as 15 instead of 0.15, which made
three_scenario_valuation compound at 1500% and return absurd target prices
(23.5 x 16^3 = 96256 instead of 35.74). The math was correct for the input
given, but the tool silently accepted an unreasonable growth rate.
Now |growth| > 1 is treated as a percent and divided by 100, with a
growth_normalized_from_percent flag and note in the result. Description
also clarified ('0.15 for 15%').
Co-Authored-By: Claude <noreply@anthropic.com>
The preset YAML was on disk and loadable (inspect_preset valid=True), but
run_swarm refused preset_name='value_investing_committee' as 'Unknown preset'
because _PRESET_NAMES is derived from _PRESET_KEYWORDS, which the new preset
was not added to. The LLM then fuzzy-matched to the similarly-named built-in
investment_committee and ran the wrong team.
Register value_investing_committee in _PRESET_KEYWORDS (value-investing /
Buffett / Munger / Duan Yongping / Li Lu keywords) and add its
{company}/{market} variables to _build_variables.
Co-Authored-By: Claude <noreply@anthropic.com>
|
…heck (P3) P3 of the ai-berkshire fusion — small, broad-impact methodology additions: - data-routing: add a 'Data Verification Discipline' section — cross-check material figures across >=2 sources, flag >1% deviations as caliber mismatches, use financial_rigor's cross_validate for exact comparison, mark unverified numbers. Pairs with the cross_validate tool added in P1. - research-discipline (new skill, analysis): a 60-second self-bias checklist run at the start of any research task — leader-bias, English-bias, narrative-bias, confirmation-bias, recency-bias, with concrete corrections. Covers the reasoning layer (vs cross_validate=numbers, report_audit=output). No code changes, no new deps. Existing data-routing tests still pass (4/4). Co-Authored-By: Claude <noreply@anthropic.com>
An 8-part publication-grade deep-dive on a single company (~120k words): cognitive reset / moat / profit engine / hidden assets / era variable / financials / management / valuation+redlines. The core IP is the strict fact-check checklist (5 pseudo-precision traps + 7 revision checks) and the cross-article consistency scan. Adapted from ai-berkshire's deep-company-series.md. Cross-article scan reuses report_audit (extract numbers across 8 articles) + financial_rigor cross_validate (flag >1% deviations) — closes the loop with P1's tools. Co-Authored-By: Claude <noreply@anthropic.com>
Adds a 'Value Investing' category to WelcomeScreen with 4 one-click examples surfacing the ai-berkshire toolkit: - Value Investing Committee (run_swarm value_investing_committee, Tencent) - Supply-Chain Bottleneck Hunter (bottleneck-hunter, AI infra) - Investment Thesis Tracker (thesis-tracker, Moutai) - Exact Valuation Check (financial_rigor PE/PB/ROE + three-scenario) i18n: en + zh-CN (title + desc + prompt). dist is gitignored — CI builds it. Co-Authored-By: Claude <noreply@anthropic.com>
|
感谢您的细致评审!针对您提到的三点,我的回复如下:
已迁移:financial_rigor.py 和 report_audit.py(两个纯标准库工具),以及本次 PR 中的 6 个技能(skills)和 1 个预设(preset)。
|
…eview
Responding to upstream review feedback:
1. All skill bodies converted to English (matching bundled skills like
akshare). Some Chinese wording was ambiguous in an international project.
2. Added macro constraints (demographic clock / consumption trend /
generational shift) per reviewer's point that a consumer-name pick
should weigh long-term macro headwinds:
- thesis-tracker: new red line on macro-trend reversal for
consumer/property/education names.
- value_investing_committee Li Lu agent: mandatory demographic-clock +
consumption-trend + generational-shift section for consumer-dependent
names; a consumer name cannot score high 10-year certainty without
addressing demographics.
No structural changes; counts unchanged (85 skills, 70 tools, 30 presets).
Co-Authored-By: Claude <noreply@anthropic.com>
2 & 3 —— 已在 commit 7a55def 处理。 |
Summary
Why
Changes
Test Plan
pytest --ignore=agent/tests/e2e_backtest --tb=short -q)Checklist
src/agent/,src/session/,src/providers/) without prior discussion