@v587d/capital-generation 2.7.4 → 2.7.6
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/CHANGELOG.md +65 -0
- package/README.md +15 -5
- package/THIRD_PARTY_NOTICES.md +16 -14
- package/capital-config/client.js +2 -2
- package/capital-config/package.json +1 -1
- package/capital-watchlist/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +1 -1
- package/selected-skills/InvestSkill/UPSTREAM.md +2 -2
- package/selected-skills/catalog.js +105 -10
- package/selected-skills/claude-for-financial-services-cn/UPSTREAM.md +49 -37
- package/selected-skills/claude-for-financial-services-cn/vertical-plugins/china-finance/skills/china-catalyst-calendar/SKILL.md +1 -1
- package/selected-skills/claude-for-financial-services-cn/vertical-plugins/china-finance/skills/china-comps-analysis/SKILL.md +1 -1
- package/selected-skills/claude-for-financial-services-cn/vertical-plugins/china-finance/skills/china-idea-generation/SKILL.md +24 -20
- package/selected-skills/claude-for-financial-services-cn/vertical-plugins/china-finance/skills/china-initiating-coverage/SKILL.md +1 -1
- package/selected-skills/claude-for-financial-services-cn/vertical-plugins/china-finance/skills/china-morning-note/SKILL.md +27 -41
- package/selected-skills/claude-for-financial-services-cn/vertical-plugins/china-finance/skills/china-sector-overview/SKILL.md +1 -1
- package/selected-skills/claude-for-financial-services-cn/vertical-plugins/china-finance/skills/china-thesis-tracker/SKILL.md +22 -18
- package/selected-skills/trading-skills/UPSTREAM.md +30 -16
- package/selected-skills/trading-skills/skills/catalyst-map/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/evidence-gap-check/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/execution-plan-check/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/journal-pattern-analyzer/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/portfolio-concentration/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/position-management/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/position-sizing/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/position-sizing/references/calculation-helpers.md +3 -1
- package/selected-skills/trading-skills/skills/thesis-validation/SKILL.md +1 -1
- package/selected-skills/trading-skills/skills/watchlist-review/SKILL.md +1 -1
|
@@ -31,18 +31,21 @@
|
|
|
31
31
|
两者都不进 catalog、也不进发布包(见 Packaging),按"不进 catalog 的正文一律不动"原样保留。
|
|
32
32
|
2. **删除上游的 `.gitignore`。** 被排除的 ignore 规则会在本仓继续生效,并把"按 commit 重导"的快照
|
|
33
33
|
与所钉 commit 弄成两种样子(InvestSkill 那一轮就是三个文件被静默挡掉)。vendored 快照不把 ignore 规则带进宿主仓库。
|
|
34
|
-
3. **取数与执行面口径改写**:
|
|
35
|
-
共
|
|
34
|
+
3. **取数与执行面口径改写**:10 份 `SKILL.md` + 3 份 `references/calculation-helpers.md`,
|
|
35
|
+
共 20 处句子级改动(+46 / −20 行)。分析结论、判定档位词汇(`must-watch` / `fragile` / `too concentrated` 一类)、
|
|
36
36
|
输入清单、输出顺序与 `references/` 的框架、阈值文档一字未改。
|
|
37
37
|
本颗**没有** `web search` 与记忆回填那一族(`web search` 零命中;每颗都写"缺什么就点名缺、别编",
|
|
38
38
|
`example-mode` 指使用者自带的示例数据并要求标注,不是逃生口),换的是另外三种形态:
|
|
39
|
-
- **谁去取数(
|
|
39
|
+
- **谁去取数(7 处)**:`catalyst-map`、`watchlist-review`、`evidence-gap-check`、`thesis-validation`、
|
|
40
40
|
`execution-plan-check`、`portfolio-concentration` 各有一句 `Do not fetch live data unless the user
|
|
41
41
|
explicitly asks to pair this skill with …`。前半句的意图(别自己去堆一堆数据)保留,
|
|
42
|
-
后半句改成"确实缺一个日期或一个字段时,把标的、字段、as-of
|
|
42
|
+
后半句改成"确实缺一个日期或一个字段时,把标的、字段、as-of 日期写成交给宿主取数通道——
|
|
43
43
|
角色分流的宿主里就是负责检索与行情的角色——用回来的东西继续,剩下的照旧标为未知"。
|
|
44
44
|
顺带这三句原本点名的 `earnings-preview` / `macro-event-analysis` 不在可选清单里(见下面的收录判断)。
|
|
45
|
-
|
|
45
|
+
本轮收录 `position-management` 时同一句按同一改法处理:这颗原本靠这句守住"不自己堆数据、
|
|
46
|
+
要不要拉一份行情是使用者点的事",闸门只认 `fetch live` 与 `pair this skill` 两个词形,
|
|
47
|
+
所以改完必须自己核对语义还在——现在它写的是"这份复查不出网,缺什么由主 Agent 决定要不要委派去取"。
|
|
48
|
+
- **没有 shell 就算不了(2 + 4 处)**:`journal-pattern-analyzer:49` 与 `risk-reward-sanity-check:52` 的
|
|
46
49
|
`For agents that support code execution, use [references/calculation-helpers.md] …` 改成
|
|
47
50
|
"本插件的分析角色没有 shell,也不跑 helper 脚本:统计量交给宿主数据侧(角色分流的宿主里委派做统计与质量校验的角色),
|
|
48
51
|
三笔以内可以在答复里手算并把算式写出来,缺输入的条目留空不补默认值";
|
|
@@ -50,29 +53,40 @@
|
|
|
50
53
|
改写成"这些量是什么、怎么取"(公式按上游 `_lib/calculations.py` 的实现核对:
|
|
51
54
|
`risk_reward_ratio` = |target−entry| / |entry−stop| 每单位、`expectancy` = 胜率×均盈 − 败率×均亏,
|
|
52
55
|
`kelly_fraction` 只是参照值,不作为交给使用者的仓位)。
|
|
56
|
+
本轮收录 `position-sizing` 时同一族又落两处:它的 `SKILL.md:52` 与 `references/calculation-helpers.md:3`
|
|
57
|
+
原本也是那句"能跑代码的宿主去用共享模块"——这颗自己不带取数,所以要改的只有这一处形状:
|
|
58
|
+
按 `references/methodology.md` 的基础算式(`position size = allowed trade risk / per-unit realized risk`)
|
|
59
|
+
在答复里把式子写出来,波动率一类统计量交给 `data_junior`。
|
|
53
60
|
- **点名的下一步 skill 未必存在(7 处)**:`catalyst-map`、`watchlist-review`、`evidence-gap-check`、
|
|
54
61
|
`thesis-validation`、`journal-pattern-analyzer`、`execution-plan-check`、`portfolio-concentration` 的
|
|
55
62
|
`Next Skill` 清单原句保留,各加同一句前置条件与退路(InvestSkill 那轮的改法):
|
|
56
|
-
点名的 skill
|
|
57
|
-
|
|
63
|
+
点名的 skill 只有使用者显式开启才存在于会话里,本插件明确不提供的那一类(替使用者下单与改单)永远不存在,
|
|
64
|
+
只能说成选项、不能替使用者跑。这句原本写的是"(下单、给仓位)两类"——本轮起仓位测算已收录,
|
|
65
|
+
留着就成了假话,七处与第六颗同一句一起改成执行面口径。
|
|
58
66
|
**没有新增 `Retrieval:` 出处档**:上游根本没有这个枚举(§8.6 第 3 条不适用),
|
|
59
67
|
不为了套前几颗的改法新造上游没有的模板字段。
|
|
60
68
|
|
|
61
|
-
- 收录判断(19 颗里
|
|
69
|
+
- 收录判断(19 颗里 11 颗进 catalog,8 颗留在快照里当可审查材料,其中 `etoro` 连发布包都不进):
|
|
62
70
|
- **进**:`catalyst-map`、`watchlist-review`、`evidence-gap-check`、`thesis-validation`、
|
|
63
71
|
`risk-reward-sanity-check`、`execution-plan-check`、`portfolio-concentration`、
|
|
64
|
-
`journal-pattern-analyzer`、`post-trade-review`。
|
|
72
|
+
`journal-pattern-analyzer`、`post-trade-review`,本轮再加 `position-sizing` 与 `position-management`。
|
|
65
73
|
`post-trade-review` 一字未动就过闸门(全文无取数、无脚本、无出图,只在 `references/review-rubric.md`
|
|
66
74
|
里举了一条"高冲击数据日把仓位减 25%"的过程规则例子 → `riskNote` 写明属于过程推演)。
|
|
75
|
+
新收那两颗的输出形状:`position-sizing` 索取 account equity / risk budget / entry / stop,给
|
|
76
|
+
`Position Recommendation`(股数、合约数、占账户风险的百分比);`position-management` 复查在手持仓,
|
|
77
|
+
给 `hold, trim, tighten risk, close, or wait` 与 `Best Next Action`。两颗都不取数、不碰凭据、不产文件,
|
|
78
|
+
所以要动的只有上面那处"能跑代码的宿主"退路句与那一句护栏,判定逻辑一字未改。
|
|
79
|
+
- **本轮判据纠正的记录**:这两颗当初按"给仓位数字与持仓加减动作"整颗不收,写的理由是
|
|
80
|
+
「评级、买卖动作和仓位决策属于明确冲突,不能直接集成」——那是把 §8.6 第 7 条读成了内容禁令。
|
|
81
|
+
本插件不收的从来是**执行面**:没有券商接口,不替使用者下单或改单(第 4 条;`etoro` 至今按这条不收,
|
|
82
|
+
也不进发布包)。仓位数字与加减建议在正文里属于方法推演,收录之后由 catalog 的 `riskNote` 承担口径,
|
|
83
|
+
正文的"不据它执行"那句也跟着写在 `Next Skill` 前置条件里。同一条误读在第六颗挡掉三颗
|
|
84
|
+
(见 `selected-skills/claude-for-financial-services-cn/UPSTREAM.md`),两处一起纠正。
|
|
67
85
|
- **不进 · 执行面**:`etoro`。它是券商公开 API 的操作手册:`SKILL.md:18` "**Keys (request from the user on install)**"
|
|
68
86
|
与逐步生成密钥的说明、`x-api-key` / `x-user-key` 请求头、`curl -X POST …/trading/execution/…market-open-orders/by-amount`
|
|
69
87
|
带 `"IsBuy": true, "Leverage": 1`、"Use **non-demo execution endpoints** for real trading"、按 `positionId` 平仓,
|
|
70
88
|
末尾还指到一个 MCP server。§8.6 第 4 条(执行面)与第 7 条(真实下单)双重排除;本插件不接券商、不下单、
|
|
71
89
|
凭据只进 credentials 域(§5)。这颗连发布包都不进(`.npmignore`),全量仍住在 git 里。
|
|
72
|
-
- **不进 · 仓位与买卖动作**:`position-sizing`(索取 account equity,输出 `Position Recommendation`:
|
|
73
|
-
股数/合约数/账户风险百分比)、`position-management`(`hold, trim, tighten risk, close, or wait` + `Best Next Action`)。
|
|
74
|
-
与 `docs/reference/external-skill-scan-2026-10.md` 观察名单里既写的同一口径:
|
|
75
|
-
「评级、买卖动作和仓位决策属于明确冲突,不能直接集成」。
|
|
76
90
|
- **不进 · 接管会话路由**:`pre-trade-check`、`earnings-trade-prep`、`portfolio-risk-review`、`post-trade-debrief`
|
|
77
91
|
四颗 workflow。上游自己的 "Workflow routing" 段按结果分流到 11–12 颗子 skill 并给出
|
|
78
92
|
`ready` / `reject` / `hold through with conditions` 一类决断,与本插件的角色路由冲突
|
|
@@ -85,9 +99,9 @@
|
|
|
85
99
|
另外 `earnings-preview` 与 catalog 里已收录的 InvestSkill 同名那颗**撞车**——provider 的启用集合只按 `name` 认,
|
|
86
100
|
`test/persona.test.mjs` 钉住 name 全局唯一,收进来必然出问题。
|
|
87
101
|
- `test/selected-skills-provider.test.mjs` 用「skills 根目录 − 排除清单」派生本颗的可选清单,
|
|
88
|
-
`test/persona.test.mjs` 另把 `etoro` / `
|
|
102
|
+
`test/persona.test.mjs` 另把 `etoro` / `pre-trade-check` 明确断为不进 catalog(执行面与会话路由那一类)。
|
|
89
103
|
- 复核方法:`git clone` 所钉 commit 后,把上游 `skills/<domain>/<name>` 与快照 `skills/<name>` 逐颗 `diff -r`——
|
|
90
|
-
差异只应包含以上三类(
|
|
104
|
+
差异只应包含以上三类(13 份文件、20 处句子级改动;其余 9 颗与 `_lib/`、`LICENSE` 逐字节相同)。
|
|
91
105
|
`test/selected-skills-content.test.mjs` 扫正文**结果**、本文件记**理由**,两边任一漂回去都会红。
|
|
92
106
|
- Packaging: 这颗带 `.npmignore`,挡的是非运行内容:`docs/`(上游文档站与 18 份 walkthrough)、
|
|
93
107
|
`scripts/`(上游的 catalog 生成与仓库校验 python)、`.github/`、`catalog.json`(上游自己的索引,与本仓
|
|
@@ -104,7 +118,7 @@
|
|
|
104
118
|
- Runtime status: `watchlist` / 默认关闭的显式实验。只有使用者在「插件」→ Capital Generation →「精选 Skills」
|
|
105
119
|
里逐格打开,它们才对**之后新建**的 Capital 根 Agent 可见;子 Agent 不继承,上游脚本从不执行。
|
|
106
120
|
能力标签带来的新词是 `trade-discipline`(交易纪律 / Trade discipline),市场口径继续用 `us-stock`;
|
|
107
|
-
`riskNote`
|
|
121
|
+
`riskNote` 里逐条写明各颗不做什么(不预测表现;本插件没有券商接口,不据这些结论下单或改单)。
|
|
108
122
|
- Review status: 2026-11-06 复查上游、许可证与维护状态。内容按美股与境外交易习惯写(SPY/QQQ/ES 期货、
|
|
109
123
|
美股时段与盘前盘后、FINRA/Fidelity/Schwab 口径的集中度阈值、EURUSD 与 CFD/杠杆工具),
|
|
110
124
|
**不声称适用 A 股**,也不得直接当作 A 股规则;它提供的是过程纪律而不是信号或收益承诺,
|
|
@@ -104,7 +104,7 @@ Always include:
|
|
|
104
104
|
- what requires deeper prep now versus background monitoring
|
|
105
105
|
- whether the next step is `earnings-preview`, `macro-event-analysis`, `market-regime-analysis`, `thesis-validation`, or no further action yet
|
|
106
106
|
|
|
107
|
-
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and
|
|
107
|
+
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and what this plugin deliberately does not offer — placing or amending an order on the user's behalf — is not reachable at all. Say what you would check next and let the user decide.
|
|
108
108
|
|
|
109
109
|
## Best practices
|
|
110
110
|
|
|
@@ -105,7 +105,7 @@ Always include:
|
|
|
105
105
|
- the single highest-value next research step
|
|
106
106
|
- whether the user should move next to `thesis-validation`, `earnings-preview`, `macro-event-analysis`, `market-regime-analysis`, `watchlist-review`, or stay in research mode
|
|
107
107
|
|
|
108
|
-
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and
|
|
108
|
+
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and what this plugin deliberately does not offer — placing or amending an order on the user's behalf — is not reachable at all. Say what you would check next and let the user decide.
|
|
109
109
|
|
|
110
110
|
## Best practices
|
|
111
111
|
|
|
@@ -106,7 +106,7 @@ Always include:
|
|
|
106
106
|
- whether the plan should proceed, be resized, be restructured, or wait
|
|
107
107
|
- whether the user should move next to `portfolio-concentration`, `position-sizing`, or back to `risk-reward-sanity-check`
|
|
108
108
|
|
|
109
|
-
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and
|
|
109
|
+
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and what this plugin deliberately does not offer — placing or amending an order on the user's behalf — is not reachable at all. Say what you would check next and let the user decide.
|
|
110
110
|
|
|
111
111
|
## Best practices
|
|
112
112
|
|
|
@@ -105,7 +105,7 @@ Always include:
|
|
|
105
105
|
- one or two process changes to test next
|
|
106
106
|
- whether the next step is `post-trade-review`, a revised rule in the journal, or no additional skill yet
|
|
107
107
|
|
|
108
|
-
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and
|
|
108
|
+
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and what this plugin deliberately does not offer — placing or amending an order on the user's behalf — is not reachable at all. Say what you would check next and let the user decide.
|
|
109
109
|
|
|
110
110
|
## Best practices
|
|
111
111
|
|
|
@@ -104,7 +104,7 @@ Always include:
|
|
|
104
104
|
- any special risk from employer stock, narrow products, or illiquid holdings
|
|
105
105
|
- whether the user should move next to `position-sizing`, reduce exposure first, or review a fuller portfolio snapshot
|
|
106
106
|
|
|
107
|
-
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and
|
|
107
|
+
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and what this plugin deliberately does not offer — placing or amending an order on the user's behalf — is not reachable at all. Say what you would check next and let the user decide.
|
|
108
108
|
|
|
109
109
|
## Best practices
|
|
110
110
|
|
|
@@ -48,7 +48,7 @@ Use the user's materials first.
|
|
|
48
48
|
|
|
49
49
|
If the original plan is missing, say that clearly and manage the position provisionally rather than inventing a clean prior plan.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Nothing here goes and gets market material on its own: work from what the user handed over. When the review genuinely needs a current quote or a fresh event, that is the main agent's call to delegate through the host's single retrieval entry (naming the ticker, the fields and the as-of date); whether a market-context or event-risk companion is worth pulling in is the same routing call, not this skill's.
|
|
52
52
|
|
|
53
53
|
## Analysis process
|
|
54
54
|
|
|
@@ -49,7 +49,7 @@ If any key input is missing, state what is missing and stop rather than invent i
|
|
|
49
49
|
|
|
50
50
|
Use [references/methodology.md](references/methodology.md) for sizing conventions and caveats. Use [assets/trade-plan-template.md](assets/trade-plan-template.md) when the user wants a reusable planning format.
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Use [references/calculation-helpers.md](references/calculation-helpers.md) for the quantities behind fixed-fractional sizing, volatility-adjusted sizing, Kelly fraction context, and futures contract math. This host has no shell: work each one from the base formula in [references/methodology.md](references/methodology.md) and show the arithmetic in the reply, handing volatility-type statistics to the data side (delegate `data_junior`).
|
|
53
53
|
|
|
54
54
|
## Output structure
|
|
55
55
|
|
package/selected-skills/trading-skills/skills/position-sizing/references/calculation-helpers.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Calculation Helpers
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
这里没有能跑代码的宿主:本插件的分析角色不带 shell,也不复用上游那份共享计算模块(它不进发布包)。
|
|
4
|
+
下面每个名字对应一个可以手算的量——按 [methodology.md](methodology.md) 的基础算式在答复里把式子写出来算,
|
|
5
|
+
需要波动率一类的统计量时交给宿主数据侧(本插件里是委派 `data_junior`),不在这份附属文件里自己算历史序列。
|
|
4
6
|
|
|
5
7
|
Relevant functions for this skill:
|
|
6
8
|
|
|
@@ -108,7 +108,7 @@ Always include:
|
|
|
108
108
|
- the most important dependency or catalyst
|
|
109
109
|
- whether the idea should move next to `market-regime-analysis`, `risk-reward-sanity-check`, `position-sizing`, or more research
|
|
110
110
|
|
|
111
|
-
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and
|
|
111
|
+
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and what this plugin deliberately does not offer — placing or amending an order on the user's behalf — is not reachable at all. Say what you would check next and let the user decide.
|
|
112
112
|
|
|
113
113
|
## Best practices
|
|
114
114
|
|
|
@@ -104,7 +104,7 @@ Always include:
|
|
|
104
104
|
- what additional prep each top name needs
|
|
105
105
|
- whether the next step is `earnings-preview`, `macro-event-analysis`, `market-regime-analysis`, `thesis-validation`, or no further action yet
|
|
106
106
|
|
|
107
|
-
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and
|
|
107
|
+
A skill named above is an option for the user, not a step this role can take: only the skills the user switched on exist in this session, and what this plugin deliberately does not offer — placing or amending an order on the user's behalf — is not reachable at all. Say what you would check next and let the user decide.
|
|
108
108
|
|
|
109
109
|
## Best practices
|
|
110
110
|
|