KCNyu/clawock

AI argues. Code settles. The losses stay on the page. A real HK + US brokerage account run by agents that must debate every call, settled by code the model never touches. Install the same decision workflow into your own agent: OpenClaw, Claude Code, Codex, or DeepSeek Harness.

Python

18

5,722 commits

updated Oct 7, 2026

See the code

See what people are saying

README

clawock

AI argues. Code settles. The losses stay on the page.

PyPI npm Tests Live Data Coverage License

Live dashboard  ·  Daily briefs  ·  Evidence  ·  简体中文

clawock — portable investment decision workflows for any external AI agent, proven on a live HK and US desk

“The market doesn't care how confident the model was.”

clawock dashboard cycling through its tabs

US book and Hong Kong book, side by side: each book's return, the basis that return is divided by, and its daily P&L curve in its own currency; the combined return sits underneath on a mixed basis

1429851594450
days live on a real HK + US accountdecisions on the public ledgerepisodes settled by codedata modules across 8 layersagent harnesses, one contractscores 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.

clawock on one page: eight source layers arrive through fallback routes; Python reconciles the book and certifies one context pack; Claude Code, Codex, OpenClaw, DeepSeek Harness or your own CLI argues a bull and a bear case over it; code holds six risk limits, records what happens when one breaks and enforces evidence requirements; the plan reaches you and you place the orders; code settles each call as a win, a loss or ungradeable; the record returns around two loops, one into the next judgment through history and earlier-date calibration, one into the evidence rules through a bounded proposal and a named review; on the author’s host patrol rounds, a filing gate, background agents and required CI maintain the desk’s own code, watched from DeepSeek Harness

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.

Want to run it first? Try it in five minutes.

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

clawock data flow — eight information layers feed ordered fetch-fallback routes; Python reconciles the book and builds risk; the brief, session reports and intraday check-ins each run a preflight that assembles only the blocks that run can use; the agent reads those files and never fetches; a Python postflight validates, then publishes to master, to the data-plane branch the dashboard polls, and to WeChat and Telegram, with an LLM-free crontab watchdog as the delivery backstop

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.

A clawock decision receipt: the subject, a bull case and a bear case each citing evidence, the thesis, the invalidation condition, confidence and action, and a published run id with a pinned certificate

Example output, not a settled call.

The live desk’s full bull / bear debate

clawock's multi-agent debate — one evidence pack feeds four analyst lenses; two researchers argue opposing bull and bear cases and record where they disagree; three risk voices and a judge name the strategy frame and resolve it into plan.json, which enters the next session's grading loop

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.

After the close: a call is recorded once by the model, checked against canonical daily bars on each market’s calendar, grouped into one episode per thesis and settled by code as a win, a loss or ungradeable, all published; on the live desk execution, settlement, history and calibration loop back into the next brief; in any other harness an observed outcome can anchor a bounded proposal that a named review accepts or rejects, applied with a rollback record

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

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.

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.

clawock product architecture — external runtimes own models, conversation, memory and tools while the package supplies portable workflows, certified context, deterministic reconciliation, evaluation and bounded improvement

Portable invocation and feedback protocol · Workflow improvement boundaries.

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. The six risk limits, what happens when one breaks, and the 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.

Your dsh background team: ask in chat to delegate repo work; agent-dispatch starts an independent systemd task for Claude Code, Codex or OpenCode; watch allowances and queue state in the real plugin screenshot, steer waiting work and budgets, then the agent follows the requested PR, required CI, squash-merge and host-refresh contract; the runner returns a final report through best-effort WeChat and Telegram sends, whose receipts stay separate from task outcome

  • 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


Full live-host provider panel: Claude and Codex quota windows above their queues, DeepSeek and MiniMax balances, OpenCode free pool, recently ended tasks with notification receipts, patrol rounds with readable filed counts, severity and issue links, and the ops version footer

Queue capabilities and setup · runner and ops contract.

A task's history — append instructions and the progress timeline


Complete live dsh task detail in a phone layout: a finished repository task, numbered append instruction with delivery status, and timestamped progress from dispatch and execution-lock waiting through attempts, instruction delivery, continuation and notification receipts

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.

Decision Mind inside the real dsh web GUI: fills grouped by day with paired plans and T+1 verdicts; an expanded trace follows the plan, actual execution and outcome

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:

KCNyu live-desk architecture — Python builds reconciled market context, OpenClaw agents debate the trade, clawock contracts gate the decision, and a public scorecard closes the loop

One clawock trading day, end to end — Python collects quotes through ordered fallback chains (HK Tencent + Eastmoney, then stooq, then yfinance; US Nasdaq first through a seven-route chain; USD/HKD Frankfurter, exchangerate.host, Yahoo), SEC and HKEX filings, Eastmoney capital flow, bilingual news, Reddit and influencer sentiment, and macro and catalyst calendars; it reconciles the book, computes portfolio risk, per-leg concentration, the leverage regime dial, quant factors, cross-sectional ranks and peer residuals behind a backtest gate, and holds risk caps, the entry gate, earnings quality, thesis drift and the news evidence graph as code gates; a preflight hands the agents one context pack, where four analyst lenses, a bull and a bear who must disagree, three risk voices and a judge write plan.json; a Python postflight validates it, books it in memory/decisions.jsonl, renders the brief card, sends WeChat and Telegram and publishes the dashboard; then code records what was executed with mark-followed, settles each episode on canonical bars, calibrates confidence, replays a shadow portfolio against buy-and-hold and publishes the scorecard, which the next brief reads; in dsh, Decision Mind shows real fills beside their plans and T+1 verdicts for a follow-up, while execution stays human

The author's desk sends the pre-open plan at 08:03 HKT and runs this unattended on OpenClaw. Each job is clawock … preflight, then the model writes, then clawock … postflight:

OpenClaw's live cron list on the desk host: nine clawock jobs (pre-open brief, HK and US session reports, intraday check-ins) with their cron expressions, the clawock preflight → postflight lifecycle each one runs, last status ok and run time

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 write decision.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:

Open in GitHub Codespaces

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 the examples/claude-code instruction:

Claude Code running the investment-decision workflow end to end: clawock init, clawock run prepare, Claude writing decision.json, clawock run publish returning status: published

Explore

Research surfaces

QuestionEntry pointReuse scope
Analyze a US companyus-stock-analysisReusable with the clawock workspace
Analyze a Hong Kong companyhk-stock-analysisReusable with the clawock workspace
Review the current portfolioportfolio-risk-review / portfolio-swarm-reviewSpecific to the configured portfolio
Stress-test a supply-chain thesisserenity-skillReusable as a manual research framework
Review a reported quarterearnings-reviewReusable; artifacts live in memory/earnings/
Decide whether a new name is worth researchingentry-gateReusable; 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.


Live dashboard  ·  Daily briefs  ·  简体中文

Built and maintained by Shengyu Li (kcn) and Rick · 2026

agentic-ai
agent-skills
ai-agents
algorithmic-trading
audit-trail
decision-support
deepseek-harness
dsh-plugin
fintech
harness
investment
investment-research
openclaw
portfolio-management
quantitative-finance
risk-management
self-hosted
stock-market
trading
trading-bot

KCNyu/clawock

AI argues. Code settles. The losses stay on the page. A real HK + US brokerage account run by agents that must debate every call, settled by code the model never touches. Install the same decision workflow into your own agent: OpenClaw, Claude Code, Codex, or DeepSeek Harness.

Python

18

5,722 commits

updated Oct 7, 2026

See the code

See what people are saying

README

clawock

AI argues. Code settles. The losses stay on the page.

PyPI npm Tests Live Data Coverage License

Live dashboard  ·  Daily briefs  ·  Evidence  ·  简体中文

clawock — portable investment decision workflows for any external AI agent, proven on a live HK and US desk

“The market doesn't care how confident the model was.”

clawock dashboard cycling through its tabs

US book and Hong Kong book, side by side: each book's return, the basis that return is divided by, and its daily P&L curve in its own currency; the combined return sits underneath on a mixed basis

1429851594450
days live on a real HK + US accountdecisions on the public ledgerepisodes settled by codedata modules across 8 layersagent harnesses, one contractscores 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.

clawock on one page: eight source layers arrive through fallback routes; Python reconciles the book and certifies one context pack; Claude Code, Codex, OpenClaw, DeepSeek Harness or your own CLI argues a bull and a bear case over it; code holds six risk limits, records what happens when one breaks and enforces evidence requirements; the plan reaches you and you place the orders; code settles each call as a win, a loss or ungradeable; the record returns around two loops, one into the next judgment through history and earlier-date calibration, one into the evidence rules through a bounded proposal and a named review; on the author’s host patrol rounds, a filing gate, background agents and required CI maintain the desk’s own code, watched from DeepSeek Harness

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.

Want to run it first? Try it in five minutes.

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

clawock data flow — eight information layers feed ordered fetch-fallback routes; Python reconciles the book and builds risk; the brief, session reports and intraday check-ins each run a preflight that assembles only the blocks that run can use; the agent reads those files and never fetches; a Python postflight validates, then publishes to master, to the data-plane branch the dashboard polls, and to WeChat and Telegram, with an LLM-free crontab watchdog as the delivery backstop

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.

A clawock decision receipt: the subject, a bull case and a bear case each citing evidence, the thesis, the invalidation condition, confidence and action, and a published run id with a pinned certificate

Example output, not a settled call.

The live desk’s full bull / bear debate

clawock's multi-agent debate — one evidence pack feeds four analyst lenses; two researchers argue opposing bull and bear cases and record where they disagree; three risk voices and a judge name the strategy frame and resolve it into plan.json, which enters the next session's grading loop

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.

After the close: a call is recorded once by the model, checked against canonical daily bars on each market’s calendar, grouped into one episode per thesis and settled by code as a win, a loss or ungradeable, all published; on the live desk execution, settlement, history and calibration loop back into the next brief; in any other harness an observed outcome can anchor a bounded proposal that a named review accepts or rejects, applied with a rollback record

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

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.

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.

clawock product architecture — external runtimes own models, conversation, memory and tools while the package supplies portable workflows, certified context, deterministic reconciliation, evaluation and bounded improvement

Portable invocation and feedback protocol · Workflow improvement boundaries.

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. The six risk limits, what happens when one breaks, and the 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.

Your dsh background team: ask in chat to delegate repo work; agent-dispatch starts an independent systemd task for Claude Code, Codex or OpenCode; watch allowances and queue state in the real plugin screenshot, steer waiting work and budgets, then the agent follows the requested PR, required CI, squash-merge and host-refresh contract; the runner returns a final report through best-effort WeChat and Telegram sends, whose receipts stay separate from task outcome

  • 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


Full live-host provider panel: Claude and Codex quota windows above their queues, DeepSeek and MiniMax balances, OpenCode free pool, recently ended tasks with notification receipts, patrol rounds with readable filed counts, severity and issue links, and the ops version footer

Queue capabilities and setup · runner and ops contract.

A task's history — append instructions and the progress timeline


Complete live dsh task detail in a phone layout: a finished repository task, numbered append instruction with delivery status, and timestamped progress from dispatch and execution-lock waiting through attempts, instruction delivery, continuation and notification receipts

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.

Decision Mind inside the real dsh web GUI: fills grouped by day with paired plans and T+1 verdicts; an expanded trace follows the plan, actual execution and outcome

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:

KCNyu live-desk architecture — Python builds reconciled market context, OpenClaw agents debate the trade, clawock contracts gate the decision, and a public scorecard closes the loop

One clawock trading day, end to end — Python collects quotes through ordered fallback chains (HK Tencent + Eastmoney, then stooq, then yfinance; US Nasdaq first through a seven-route chain; USD/HKD Frankfurter, exchangerate.host, Yahoo), SEC and HKEX filings, Eastmoney capital flow, bilingual news, Reddit and influencer sentiment, and macro and catalyst calendars; it reconciles the book, computes portfolio risk, per-leg concentration, the leverage regime dial, quant factors, cross-sectional ranks and peer residuals behind a backtest gate, and holds risk caps, the entry gate, earnings quality, thesis drift and the news evidence graph as code gates; a preflight hands the agents one context pack, where four analyst lenses, a bull and a bear who must disagree, three risk voices and a judge write plan.json; a Python postflight validates it, books it in memory/decisions.jsonl, renders the brief card, sends WeChat and Telegram and publishes the dashboard; then code records what was executed with mark-followed, settles each episode on canonical bars, calibrates confidence, replays a shadow portfolio against buy-and-hold and publishes the scorecard, which the next brief reads; in dsh, Decision Mind shows real fills beside their plans and T+1 verdicts for a follow-up, while execution stays human

The author's desk sends the pre-open plan at 08:03 HKT and runs this unattended on OpenClaw. Each job is clawock … preflight, then the model writes, then clawock … postflight:

OpenClaw's live cron list on the desk host: nine clawock jobs (pre-open brief, HK and US session reports, intraday check-ins) with their cron expressions, the clawock preflight → postflight lifecycle each one runs, last status ok and run time

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 write decision.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:

Open in GitHub Codespaces

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 the examples/claude-code instruction:

Claude Code running the investment-decision workflow end to end: clawock init, clawock run prepare, Claude writing decision.json, clawock run publish returning status: published

Explore

Research surfaces

QuestionEntry pointReuse scope
Analyze a US companyus-stock-analysisReusable with the clawock workspace
Analyze a Hong Kong companyhk-stock-analysisReusable with the clawock workspace
Review the current portfolioportfolio-risk-review / portfolio-swarm-reviewSpecific to the configured portfolio
Stress-test a supply-chain thesisserenity-skillReusable as a manual research framework
Review a reported quarterearnings-reviewReusable; artifacts live in memory/earnings/
Decide whether a new name is worth researchingentry-gateReusable; 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.


Live dashboard  ·  Daily briefs  ·  简体中文

Built and maintained by Shengyu Li (kcn) and Rick · 2026

agentic-ai
agent-skills
ai-agents
algorithmic-trading
audit-trail
decision-support
deepseek-harness
dsh-plugin
fintech
harness
investment
investment-research
openclaw
portfolio-management
quantitative-finance
risk-management
self-hosted
stock-market
trading
trading-bot