clawock
已验证 · 实测可装 KCNyu
功能简介
AI争论,代码定论,损失留在页面。可移植投资决策工作流插件,经真实港美股组合验证
尚无短证据报告
这里还没有可核对的逐级实测记录。Star 数、目录 test 字段、web-only 标记,以及插件是否需要外部账号或服务,都不会在这里被写成通过或失败。目录徽章仍按 catalog 原样显示。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
AI argues. Code settles. The losses stay on the page.
Live dashboard · Daily briefs · Evidence · 简体中文
“The market doesn't care how confident the model was.”
| 148 | 1013 | 166 | 47 | 5 | 0 |
|---|---|---|---|---|---|
| days live on a real HK + US account | decisions on the public ledger | episodes settled by code | data modules across 8 layers | agent harnesses, one contract | scores the model wrote for itself |
Real positions, real P&L, losses included. Numbers and charts refresh weekly; the live dashboard updates through the trading day.
What you get
clawock gives the AI agent you already use a continuing investment workflow for a HK + US stock book: collect information → argue both sides → settle in code → feed the result into the next decision. You still place the orders.
RSI means Recursive Self-Improvement: each decision leaves evidence and an outcome for the next one to build on. No promise of returns. The active calls have yet to show an edge; what you get is an accumulating record you can check.
Everything that computes is a plugin mounted by one configuration row. A strategy can search its own parameters and only ever produce a proposal. Want to run it first? Try it in five minutes.
Everything that computes is a plugin; what a result may do is not
Take one real call. The desk holds 400 shares of Goldwind (02208, Hong Kong) at an average cost of 14.084. This is everything that happened to that name on the morning of 2026-10-08.
- A row computed its numbers. The
factorsrow read Goldwind's daily bars and produced one line about it: trend off, price 31.8% under its 200-day average. A row does this and nothing more. It turns inputs into a reading. - The model argued both sides over that reading. Bull: it is the only one of its peers with a confirmation price you could act on, and the book has almost nothing that is not Hong Kong tech or AI. Bear: trend off, 31.8% under the average, in a book with four risk limits already tripped; that is adding the weakest position on the weakest evidence. The judge: watch, and write the trigger down before the price gets there.
- The plan was specific enough to be wrong. Watch. Act only if it trades above 8.97 within five sessions. The idea is dead at 8.923. Confidence 0.34.
- Code settled it. Not the model, and not the row. The reference was 8.645, the first price it could have traded at after the plan was published. By the close of the next session it was 4.22% lower. Outcome:
loss. - The loss went back in. It is decision
dec-6d9e8bdc8817on the public ledger, and the track record the next brief reads counts it.
What you can swap is step 1. Replace the factors row with your own and Goldwind's line is computed another way: a different average, a different window, a different data source. Steps 4 and 5 do not move, because they are not rows. No row can mark its own call, pick a kinder reference price, turn that loss into something else or keep it off the ledger. Two strategies can be compared on one record for that reason: the code that judged this call is the code that would judge theirs.
Each row sits in one socket, and what goes into your harness stays small: one skill, one CLI and a JSON contract. Your agent keeps its model, its conversation and its tools.
A row has to say what it measures. A row whose readings reach a decision is not mounted until it has declared its inputs, the unit and window of every output, and what it holds when it cannot measure. None may hand back yesterday's reading as today's.
| Row | Measures | When it cannot measure |
|---|---|---|
factors |
trend, momentum, RSI, volatility and the exit line per name, from daily bars. Goldwind's "31.8% under" came from here | the field is empty; with fewer than 30 daily bars there is no line at all |
bar-signals |
how costly a name is to trade and how much it is likely to move, per session | empty, never zero: "could not be estimated" is not "cheap to trade" |
sentiment |
Reddit mentions over seven days, and statements by named public figures | the block is left out, and says whether the scan is missing, too old or unreadable |
morning-scans |
the macro snapshot and Chinese-language news, and the one read of every scheduled scan file | the same: left out, with the reason |
strategy-scores |
where each name ranks under each research strategy's current setting; reference only | says it is unavailable and why |
A broken row fails alone. If one row does not load, the runs that needed it stop and name it. The others carry on.
Your own row. A row points at an installed Python module, so it can be yours: one apply(ctx, config) function, a declaration of what it reads, one line of configuration. That gets it a socket. It gets it no say over steps 4 and 5.
The whole system is hot-pluggable, the way dsh is. Twenty rows in one file: thirteen the brief, the report and the intraday check compute with, and seven the strategy lab mounts for research. Pull one out while the rest run and only the rows that said they need it stop and wait; push it back and they start by themselves. Change a row's setting and that row restarts under the new one. It is the design dsh plugins are built on, restated in Python.
clawock strategy-lab list # every row, what it provides and what it is waiting for
clawock strategy-lab sources # each row's inputs, units, windows and missing-data rule
Strategy plugins: kernel, rows, declarations, events and boundaries · writing a plugin outside this repository.
Any harness, one decision contract that accumulates evidence
Use the same investment-decision skill and artifact contract in Claude Code / Codex / OpenClaw / DeepSeek Harness / any runtime that can read and write files and call a CLI. Your agent keeps its model, conversation, memory, research tools, credentials and permissions. clawock certifies inputs, validates outputs, evaluates outcomes and records improvement; it does not launch another model.
“Smarter with use” has a record you can inspect: evidence links to decisions, decisions link to execution and outcomes, history enters the next context, earlier samples calibrate confidence, and changes to evidence requirements leave review and rollback records. To switch harnesses, keep the workspace artifacts and reconnect them to context; continuity lives in those files. A new workspace needs its own capability setup to gain the author's live data feeds, schedules and history.
Portable invocation and feedback protocol · Workflow improvement boundaries.
Information in: sources before opinions
Before you open the morning brief, Python has collected quotes through fallback routes such as Tencent / Nasdaq, SEC / HKEX filings, Eastmoney capital flow, bilingual news, macro and sentiment, then reconciled your book, FX and risk. Old news is labelled separately from live information. A failed source says “not fetched,” never “no news.” Hong Kong has the base coverage, but its research breadth is behind US.
You get an evidence pack. On the live desk, preflight writes the core needed for this judgment and reference layers the agent can load on demand. The agent can trace the batch without reconstructing it from chat. In your own harness, run prepare produces request.json, pinning per-file and whole-context SHA-256 hashes, the workflow version and the whole-pack certificate.
Certification pins what was used. Citations carry the source and publication or observation time; hashes check content and generation, not whether a news story is true. Source access credentials and model API keys remain with your runtime, outside the public repository. The portable skill also lets your agent use its own research tools to add traceable evidence; scheduled desk jobs read the Python-assembled files.
The live desk’s full information and delivery flow
Information layers and source catalog · Certification protocol.
Decision out: both sides read the same evidence
Ask “Can I add to this position today?” The agent writes the supporting case, the opposing evidence that could overturn it, then an action, trigger, confidence and thesis invalidation conditions. On the live desk, analysts, bull/bear researchers, risk voices and a judge run that debate. The portable workflow takes the same evidence and opposing-case requirements into your current agent.
You get a plan and a receipt. The desk leaves a daily brief and plan.json; intraday cards compare fresh quotes with the morning's triggers. A portable run produces decision.json. Python checks citations, opposing evidence, invalidation and order / FX arithmetic before returning a generation-pinned publication receipt. Without an opposing case it refuses publication. Conversation verdicts on the live desk enter the ledger through clawock record --source <harness>. You decide which orders to place.

Example output, not a settled call.
The live desk’s full bull / bear debate
The desk debate is adapted from TradingAgents; the judge names the strategy frame behind each call.
After the close: results feed the next decision
The close is not the end of the conversation. You use mark-followed to mark followed / not-followed execution evidence. Code checks triggers and outcomes on canonical bars using each market's calendar, groups repeated calls on the same thesis into one episode, and keeps the ungradeable cases visible.
The next decision starts from this record. The next live brief reads decision metrics, past reviews and confidence calibration. Calibration uses earlier dates only, shrinking or abstaining when evidence is thin. A failed call stays linked to its original evidence, so the agent can revisit yesterday's reasoning instead of starting the story over.
A different harness can continue the feedback. Portable runs turn source-linked outcome.json into evaluation.json (a directional evaluation, not realized P&L). An evaluation or rejection receipt can anchor a bounded proposal, applied after a named review accepts it, with a rollback record. Today those parameters govern evidence counts and the confidence cap without a primary source; they cannot silently change strategy, trading rules or the skill. This is a reviewable improvement path, not an automatic increase in returns.
Every call is settled mechanically and published: wins, losses, and the cases
that can't be graded. Nothing is hand-tuned after the fact.

Cumulative episode win rate against a 50% directional-hit line: how often the direction was right, not what it earned. Refreshed weekly by GitHub Actions; live figures are on the Holdings tab.
Read it with these limits in mind:
- A diagnostic, not proof of return. Keeping the model away from its own score stops the desk grading itself. It does not make the market data or the metric definitions correct, and a direction hit rate is not money earned.
- The active calls have yet to show an edge. A factor whose bootstrap interval straddles 50% stays out of decisions, and the leverage dial's timing cannot be distinguished from chance. Both results are published in Reflect.
- The shadow portfolio is simulated, not live. Its gross figure carries no commission and no spread; a net figure with a pre-registered cost haircut is published beside it, and market impact is not modelled.
- The account result is human plus model. The owner decides which calls to follow, and every call carries its followed / not-followed / unknown status.
You can recompute it: clawock scorecard-provenance --check rebuilds each
published headline from memory/decisions.jsonl, and clawock audit-resettle
re-settles the whole ledger.
How the grading handles the hard cases ·
what we tested, and what failed.
Method proposals now retain frozen inputs and versioned forecasts; method evaluation separates payoff from hit rate and supports prospective comparisons without automatic promotion.
From an open proposal to evidence about the method
A strategy can search its own parameters; adopting them is a reviewed edit
Stay with Goldwind. One of the numbers the desk computes for it is RSI, and the row that computes it has a setting: look back 14 sessions, and read a low value as a rebound coming. Is that the right setting? Every morning after the brief, the strategy lab asks, on all 28 names it has prices for, Goldwind among them.
- It tries only what was declared. The row lists its settings in advance: six look-back lengths, two ways of reading the number. Twelve in all, and all twelve are counted, so a lucky one cannot be passed off as the only one tried.
- A gate judges the best of them. It needs enough days it was not tuned on, a ranking that beats chance and beats the current setting by a margin that is not noise, a low chance of having been fitted to the past, and prices adjusted for splits and dividends. A configuration line can make this gate stricter. It cannot make it looser than the floor in the code.
- Second opinions may object. Other thresholds judge the same run, for example after trading costs. They can block. They cannot pass what the gate refused.
- The verdict is written down. Every run goes to a ledger, and the ledger is checked against these rules each time it is read.
- Then it has to keep working. A setting that passes is registered, and from then on it is scored only on days that had not happened when it was picked.
On 2026-10-12 the answer for RSI was: a 28-session look-back, read as "strength continues", would have ranked these names better. The gate passed it and it was registered. The same search on the 16 names whose prices the provider confirmed as adjusted, Goldwind one of them, was refused. The result leans on the other 12, where all the lab has is one provider's record showing no split or dividend, and no second source to check it against. Every run now carries that second search, so a passing setting says for itself whether it survives it.
What did this change for Goldwind? Nothing. The next brief still showed its RSI under 14 sessions, read as a rebound, because that is what the row says. Changing the row is an edit a person reviews. The most the lab can do is propose that edit, and only after the new setting has held up on at least 60 later sessions and passes the check it currently fails. So far it has been scored on none, and nothing has been proposed.
clawock strategy-lab evolution rsi # each run, what changed, each registration and how it has done since
clawock strategy-lab row-edits # edits the lab has proposed, for review
clawock strategy-lab verify # the ledger against the lab's limits
What a search may conclude, second opinions and the lab's limits.
What the model is not allowed to do
The model writes opinions. The arithmetic that could corrupt the record runs in
Python and is unit-tested. Concentration reviews, configured risk boundaries, breach handling, and evidence requirements are panel 04 of the overview at the top.
All twelve rules, and what the code does for each.
Harness views and background work
The DeepSeek Harness desk views and background queue
Delegate a task, leave the chat, come back to a result. clawock-dsh brings
an investment-decision skill, a Decision Mind tab and a provider panel into the
dsh web GUI. On a host with clawock's agent-dispatch runner, that panel also
puts your Claude Code, Codex and OpenCode background team within reach: you ask
in chat for a repository change with its delivery contract, the runner keeps the
task alive, and the plugin lets you see and steer it.
- See what is happening. Subscription use and reset times, provider balances, each agent's real queue, model, elapsed time and API-price cost estimate share one panel.
- Change course while it runs. Move waiting work up, change the next attempt's model where allowed, adjust deadlines and retry budgets, cancel a task or retry an unfinished session.
- Keep the result in reach. A completed task with a failed send stays visible; a missing message does not erase the work.
The author’s host runs its own maintenance through the same queue (panel 09 of the overview): a patrol round audits what the desk published, a filing gate opens an issue only for a finding it could prove, a background agent takes the fix through a PR and required CI, and an issue closed as noise lowers that kind of finding next time.
The full-size queue capture — the real plugin on a live host

Queue capabilities and setup ·
runner and ops contract.
A task's history — append instructions and the progress timeline

Ask “Can I add to 0700.HK?” and the investment skill takes the agent through
evidence, a bull/bear debate and a bounded decision. Decision Mind then lets
you open a real fill and follow plan → execution → T+1 → P&L. Missing plans
and ungraded fills say so, USD and HKD stay separate, and you place the orders.

python -m pip install clawock
dsh plugin --profile web add clawock-dsh
mkdir -p ~/.dsh/skills
cp -r ~/.dsh/profiles/web/node_modules/clawock-dsh/skills/investment-decision ~/.dsh/skills/
Restart the web profile to load it. Queue controls also need the host runner;
without it the panel still shows provider allowances and balances.
npm package ·
installation and queue setup.
Under the hood
How the same loop runs on the author’s real stock book:
The author's desk sends the pre-open plan at 08:03 HKT and runs this unattended on OpenClaw. Each job isclawock … preflight, then the model writes, then clawock … postflight:

Rendered from the host's real openclaw cron list --json by site/tools/shoot_openclaw_cron.js; job ids, delivery targets and prompts are left out. The full timetable is the generated schedule.
How the desk works covers the information layers, run context, settlement rules and code gates.
Try it in five minutes
Pick the agent you already use; each logo opens that harness's runnable example.
From an empty directory to a published decision:
pip install clawock
clawock workflow install investment-decision --workspace ./my-book
clawock init ./my-book --workflow investment-decision
cd my-book && mkdir -p .clawock/work
clawock run prepare > .clawock/work/request.json
# your agent reads the request and writes decision.json
clawock run publish --request .clawock/work/request.json --artifact decision.json=decision.json
You need Python ≥ 3.11 and an agent that can read a file and writedecision.json; the model call stays in your runtime. CI runs
this same block
on every pull request against the wheel alone. No model at hand?bash examples/cli/minimal-run/run.sh smokes the whole lifecycle without one,
with no credentials and no broker, or open a Codespace:
Drop the opposing evidence from decision.json and publish refuses it (exit code 1):
{
"status": "rejected",
"validation_issues": [
{"code": "insufficient_opposing_evidence", "message": "requires at least 1 opposing evidence item(s)"},
{"code": "unsupported_bear_case", "message": "bear_case must cite opposing evidence"},
...
]
}
Here is the whole run inside Claude Code, from theexamples/claude-code instruction:

Explore
- Live dashboard — positions, risk, and the code-graded scorecard.
- Daily briefs — the published morning reads.
- Decision Map — a dated signal snapshot beside each decision (reading guide).
- Examples by harness — one decision run, five harnesses, plus the npm dsh plugin.
- How the desk works — the information layers, what each run reads, decision gates, grading rules and the twelve code-enforced rules.
- Influencer radar — eight public sources scanned twice a trading day and linked to holdings; misses are published as misses.
- Command reference · glossary · all project docs · contributing
Research surfaces
| Question | Entry point | Reuse scope |
|---|---|---|
| Analyze a US company | us-stock-analysis |
Reusable with the clawock workspace |
| Analyze a Hong Kong company | hk-stock-analysis |
Reusable with the clawock workspace |
| Review the current portfolio | portfolio-risk-review / portfolio-swarm-review |
Specific to the configured portfolio |
| Stress-test a supply-chain thesis | serenity-skill |
Reusable as a manual research framework |
| Review a reported quarter | earnings-review |
Reusable; artifacts live in memory/earnings/ |
| Decide whether a new name is worth researching | entry-gate |
Reusable; artifacts live in memory/entry-gates/ |
They expect clawock's scripts, data contracts and memory files; they are not standalone one-command products.
Built with Claude Code, the openclaw cron daemon, a static Jekyll + GitHub Pages frontend, and Python. Market, news, macro, and sentiment come from documented public sources; see third-party data and service terms before reusing any fetched content.
Scope, disclaimer, and license
This repository holds real trading positions. It is a personal record and portable workspace — not investment advice, a recommendation, or a copy-trading system. The desk analyzes and proposes; it does not place orders for you. No individual outcome is hand-picked — settlement rules and methodology changes are versioned in code — the active calls have yet to show an edge, and every number may be stale by the time you read it.
Original code is under the MIT License. Adapted third-party code keeps its own license and attribution in NOTICE and THIRD_PARTY_LICENSES/. Third-party market data, news, social posts, filings, trademarks, and API access are not relicensed by MIT — see Third-party data and services.
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 clawock」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:KCNyu/clawock Headless(CLI)profile:
dsh plugin --profile headless add github:KCNyu/clawock 实测报告
尚无短证据报告
这里还没有可核对的逐级实测记录。Star 数、目录 test 字段、web-only 标记,以及插件是否需要外部账号或服务,都不会在这里被写成通过或失败。目录徽章仍按 catalog 原样显示。
使用场景
让 agent 处理数据——解析、转换或分析——用真实数据集工作,而不只是文字。
适合谁
任务涉及表格、文件或数字、需要处理或分析的人。
二次开发建议
数据源和转换工具是缝——加格式、聚合或可视化输出。
