Command reference / 命令参考
This file has two halves. The inventory below is generated by
ops/ci/generate_tool_reference.pyfrom theclawockdistribution’s two command registries (clawock.cli.PACKAGED_UTILITIESand the root[project.scripts]) and the classification inconfig/information-layers.json, so a command that is added, renamed or removed changes it without anyone editing this page. Everything after it is hand-written, and covers what a registry cannot hold: flag tables, SEC’s rate limit, which key each provider needs, and how the cron harness fits together.上半部分是生成的完整清单(新增/删除命令自动反映,禁止手改);下半部分是手写细节, 从根目录
TOOLS.md外移(TOOLS.md受 openclaw 16K bootstrap 注入上限约束), TOOLS.md 只留精简索引 + 路由。
Installed commands / 已安装命令
86 commands are installed by the single clawock distribution: 11 lifecycle subcommands built in src/clawock/cli.py, 63 packaged clawock <utility> subcommands and 12 standalone scripts. clawock --help offers the first two groups (74 subcommands). 47 of the registry commands collect or compute information and appear under the layer they feed; the remaining 28 publish, gate, record or schedule, and are listed with the reason they are not collection.
本节由生成器从 clawock.cli.build_parser()、两份 registry 与 config/information-layers.json 推导,不手写;新增或删除一条命令,这张表自己会变。
Lifecycle subcommands / 生命周期子命令
Workspace, run and harness lifecycle commands; details are in the hand-written sections below.
| Command | What it does |
|---|---|
clawock init |
create a standalone clawock workspace |
clawock run |
certify and publish one external decision-workflow run |
clawock doctor |
audit portfolio and registry prerequisites |
clawock calendar |
check whether an HK or US market session is open |
clawock profile |
validate and describe a declarative runtime profile |
clawock report |
assemble and validate a market report from a context file |
clawock brief |
run brief harness in-process |
clawock intraday |
run intraday harness in-process |
clawock tool |
call a context tool through the registry |
clawock context |
audit, assemble, compare or verify the agent context contract |
clawock workflow |
discover or install portable decision-workflow skills |
Layer 1 · Market / 行情
Sources: Tencent · Yahoo · Eastmoney · Polygon · Nasdaq
| Command | Module | What it collects or computes |
|---|---|---|
clawock analyze-hk |
clawock.market_data.hk_analysis |
HK holdings: Tencent + Eastmoney dual-source reconciliation, stooq/yfinance fallback (the yfinance hop needs clawock[market]) |
clawock analyze-us |
clawock.market_data.us_analysis |
US holdings: price refresh plus RSI/MA and news-derived signals |
clawock us-quotes |
clawock.market_data.us_quotes |
multi-provider US quote fetcher, seven-route fallback (the yfinance hop needs clawock[market]) |
clawock fetch-peers |
clawock.market_data.peer_quotes |
current price and 5-day P&L for peer tickers |
clawock daily-bars |
clawock.market_data.bars |
canonical unadjusted daily OHLC store the ledger settles against |
clawock benchmark |
clawock.market_data.benchmarks |
SPY / HSI / HSTECH daily-close history for the equity-curve overlay |
clawock-gold-fetch |
clawock.market_data.gold.fetch |
daily NAV for the 000217 gold DCA position from the Eastmoney fund API |
clawock discover-stocks |
clawock.market_data.stock_discovery |
free Nasdaq US-listed snapshot, sector-diverse research candidates outside held exposures; time unverified, no trade authority |
Layer 2 · Fundamentals & filings / 基本面/申报
Sources: SEC EDGAR · Eastmoney datacenter · HKEX
| Command | Module | What it collects or computes |
|---|---|---|
clawock filings |
clawock.market_data.filings |
10-K/10-Q/8-K, XBRL concepts, Form 4, 13F-HR |
clawock fundamentals |
clawock.market_data.fundamentals |
Eastmoney datacenter fundamentals for US and HK names |
clawock earnings |
clawock.decision.earnings |
primary-source earnings review and earnings-quality math |
Layer 3 · Capital flow / 资金面
Sources: Eastmoney push2his
| Command | Module | What it collects or computes |
|---|---|---|
clawock fundflow |
clawock.market_data.fund_flows |
daily fund-flow series for US and HK names |
Layer 4 · News & catalysts (bilingual) / 消息面与催化剂(双语)
Sources: Eastmoney · Finnhub · Google News · Yahoo · 10jqka · exchange filings
| Command | Module | What it collects or computes |
|---|---|---|
clawock em-news |
clawock.market_data.eastmoney_news |
Chinese-language Eastmoney news for active HK holdings |
clawock catalysts |
clawock.market_data.calendar |
next 14 days of earnings, FOMC and macro events |
clawock mover-evidence |
clawock.market_data.mover_evidence |
filing-first catalyst probe, fired only for names that already moved |
clawock live-sources |
clawock.evidence.live_sources |
live free news and disclosures (HKEXnews, EDGAR full-text, Google News, Yahoo RSS, 同花顺 7x24, 东财 7x24) for any harness, budgeted and timed |
clawock news-evidence |
clawock.evidence.news_evidence_graph |
deduplicates news and filings into an expiring evidence graph with confirmation gates |
clawock-news-digest |
clawock.automation.news_digest |
US 21:00 digest; Finnhub with a Google News RSS fallback per ticker |
Layer 5 · Macro & sentiment / 宏观/情绪
Sources: Yahoo · Reddit · CNN · social feeds
| Command | Module | What it collects or computes |
|---|---|---|
clawock macro |
clawock.market_data.macro |
VIX, 10Y, DXY, Fear & Greed, Federal Reserve releases |
clawock sentiment |
clawock.market_data.sentiment |
Reddit search RSS and Google News scan per active holding |
clawock-influencer-scan |
clawock.automation.influencer |
market-moving statements from high-impact figures, read from primary feeds |
Layer 6 · Quant & risk / 量化与风险
Sources: deterministic math over price history
| Command | Module | What it collects or computes |
|---|---|---|
clawock quant |
clawock.decision.signals |
standard factor layer over held names, zero LLM opinion |
clawock quant-review |
clawock.decision.signal_review |
measures each factor’s own hit rate before it may be quoted |
clawock cross-factor |
clawock.market_data.factors |
point-in-time, sector-neutral cross-sectional ranking over a curated universe |
clawock peer-residual |
clawock.market_data.peer_residuals |
curated-peer residual alpha, leadership and diffusion |
clawock t0 |
clawock.decision.setups |
T+0 setup grading — card quality, not a buy signal |
clawock t0-review |
clawock.decision.setup_review |
edge self-check that decides whether the grading may be used |
clawock portfolio-risk |
clawock.portfolio.risk |
beta, volatility, drawdown and concentration per book |
clawock regime |
clawock.decision.regime |
the leverage dial: 200-day trend × volatility |
clawock watch-list |
clawock.decision.watch_list |
non-held AI watch names price scan — opportunities only, never an add |
Layer 7 · Book & FX integrity / 账本/汇率校验
Sources: Frankfurter · the reconciliation ledger · local invariants
| Command | Module | What it collects or computes |
|---|---|---|
clawock fx |
clawock.portfolio.fx |
USDHKD with three-route fallback; HK and US totals may not be summed without it |
clawock integrity |
clawock.portfolio.integrity |
the data-health gate that turns past numeric bugs into an automatic door |
clawock reconcile |
clawock.portfolio.reconcile |
recompute every derived money field, then run the integrity gate |
clawock aggregates |
clawock.portfolio.aggregates |
rebuild each derived portfolio field from ledger leaves |
clawock cash |
clawock.portfolio.cash |
derive each book’s cash from its reconciliation ledger |
clawock realized |
clawock.portfolio.realized |
single source of truth for realized P&L, summed from trades |
Layer 8 · Backtest & calibration / 回测/自省
Sources: local snapshots + canonical bars
| Command | Module | What it collects or computes |
|---|---|---|
clawock evaluate-hstech-regime |
clawock.evaluation.hstech_regime |
the regime de-risking thesis, tested on real HSTECH data |
clawock evaluate-us-leverage |
clawock.evaluation.us_leverage |
the regime indicators on the US 2x sleeve; the 生产三档 row replays production’s ok/watch/cut dial; needs clawock[evaluation] |
clawock evaluate-combined-regime |
clawock.evaluation.combined_regime |
the whole book at current USD weights; needs clawock[evaluation] |
clawock validate-regime-dial |
clawock.evaluation.regime_validation |
out-of-sample and circular-shift null for the dial’s timing |
clawock validate-regime-hmm |
clawock.evaluation.regime_hmm |
posterior regimes with a duration, scored on the dial’s own circular-shift null |
clawock shadow |
clawock.decision.shadow |
replays triggered calls against buy-and-hold to measure simulated timing alpha, gross and net of the pre-registered cost model |
clawock decision-audit |
clawock.decision.audit |
absolute and broad-market-relative direction scores with exact-window coverage |
clawock audit-resettle |
clawock.decision.settlement |
dry-run bar-based re-settle that reports every verdict it would change |
clawock evaluate-add-alpha |
clawock.evaluation.add_alpha_walkforward |
point-in-time diagnostic replay of price-relative and information interaction adds |
clawock evaluate-methods |
clawock.decision.method_evaluation |
method payoff and probability reports; frozen prospective three-arm shadow trials |
clawock evaluate-add-shapes |
clawock.evaluation.add_shapes |
descriptive pass over the bar store: what each add-side entry shape has been worth against the unconditional baseline; not walk-forward |
Not information collection / 不属于信息收集
These are installed commands too. They are listed here so the catalog is the whole installation rather than the interesting part of it.
| Command | Module | Why it is not collection |
|---|---|---|
clawock cron-trigger |
clawock.automation.cron_trigger |
fires a host-triggered OpenClaw cron job; it collects nothing and decides nothing |
clawock dashboard-build |
clawock.publish.dashboard |
publishes the dashboard projection from data the layers already produced |
clawock decision-map |
clawock.publish.decision_map |
joins decisions to signal histories the layers already collected and publishes the projection; it acquires nothing and decides nothing |
clawock dashboard-outputs |
clawock.publish.outputs |
publication ownership and semantic diffs for generated write sets |
clawock validate-sidecar |
clawock.publish.artifacts |
behavioral validation of a publication artifact; gif and screenshots decode images and need the imaging extra (pip install ‘clawock[imaging]’) |
clawock evidence |
clawock.evidence.build_evidence |
renders the public evidence page from artifacts; it collects nothing |
clawock run-card |
clawock.evidence.run_card |
records that a backtest ran and against what — provenance, not a measurement |
clawock claim-provenance |
clawock.evidence.claim_provenance |
gate: a quoted backtest number must still be in the card it cites |
clawock signal-panel |
clawock.evaluation.signal_panel |
measures registered signal histories that other layers already collected, and never feeds a decision — evaluation, not collection |
clawock strategy-lab |
clawock.strategy_lab.lab |
mounts the strategy plugins in config/strategy-plugins.json and walks a declared parameter grid forward over adjusted daily bars; it prints a proposal that never carries live permission and records each verdict in its own ledger — evaluation, not collection |
clawock scorecard-provenance |
clawock.evidence.scorecard_verify |
names the ledger slice and code a published scorecard number came from — provenance, not a measurement |
clawock provenance |
clawock.provenance |
gate: a published research figure needs two independent sources |
clawock mark-followed |
clawock.decision.execution |
writes execution ground truth into the decision ledger |
clawock record |
clawock.decision.record |
appends a conversation verdict to the decision-mind ledger — it records a decision that was already made, and collects nothing |
clawock risk |
clawock.decision.risk |
durable governance ledger for breaches — a record of decisions, not an input to one |
clawock thesis |
clawock.decision.theses |
registry the model writes and reads back; its content is authored, not fetched |
clawock entry-gate |
clawock.decision.entry |
pre-investment gate applied to a candidate, after the information exists |
clawock plan-context |
clawock.decision.plans |
relays what the 08:03 brief already decided to the crons that run after it |
clawock research |
clawock.evidence.research_surface |
the brief does read it, but as a work queue — reviews due, overdue promises, ungated positions — not as a measurement of the market or the book |
clawock-gold-update |
clawock.market_data.gold.update |
operator command that amends the gold DCA baseline; it carries human input into the book rather than measuring it |
clawock-weekly-review |
clawock.automation.weekly_review |
assembles a weekly review artifact out of records the layers already produced |
clawock-workflow-outcomes |
clawock.automation.workflow_outcomes |
durable per-slot outcome state for the harness; operational, not market or book |
clawock-cron-heartbeat |
clawock.automation.cron_heartbeat |
publishes the intraday heartbeat ledger — liveness, not evidence |
clawock-brief-fallback |
clawock.automation.brief_fallback |
off-host delivery path for the brief when the runtime cannot produce it |
clawock-intraday-delta |
clawock.harness.intraday_delta |
pre-model trigger state: it decides whether a run happens, and the scheduler is its only reader |
clawock-brief-watchdog |
clawock.harness.brief_watchdog |
delivery watchdog for the 08:03 brief: it checks that a run produced and sent something |
clawock-report-watchdog |
clawock.harness.report_watchdog |
delivery watchdog for the session reports, on the same footing |
clawock-intraday-watchdog |
clawock.harness.intraday_watchdog |
delivery watchdog for the intraday slots, on the same footing |
手写细节 / Hand-written detail
核心(当前在用)
clawock us-quotes:美股多 provider 抓取(7 路 fallback),自动写回 portfolio.json;prev_close 由 Polygon/prev独立获取(带日期戳)clawock analyze-us:美股完整分析 = 刷价格 + RSI-14/MA20/50 + Finnhub 新闻 + 信号clawock filings:SEC EDGAR 对接 — 10-K/10-Q/8-K filings、XBRL 财务概念、Form 4 insider、13F-HR;无需 API key;Mode 3 fundamental 深挖时用。完整用法(2026-06-10 自 TOOLS.md 移入控 16K):
| 数据 | 用法 |
|---|---|
| 最近 filings (10-K/10-Q/8-K) | clawock filings RKLB (--filings 10-K,10-Q 指定表型) |
| XBRL 关键财务概念(营收/净利/现金/EPS 等关键概念) | --financials |
| Insider Form 4 / 13F-HR | --form4 / --13f |
| 机器可读 | 任一模式加 --json |
注意:速率限制 10 req/sec(脚本默认 8/sec)超量 403;SEC_USER_AGENT 可放 .api_keys;ticker→CIK 本地缓存 7 天;非美股票返回 “CIK not found”
clawock fx:公开包内的 USDHKD 汇率 provider(Frankfurter → exchangerate.host → Yahoo HKD=X 三路 fallback);4h 工作区缓存;--convert AMOUNT FROM TO直接换算。HK + US 算 book total 必须先调它clawock analyze-hk:港股完整分析 = Tencent + Eastmoney HK 双源对账 → stooq → yfinance 兜底 + 恒指/恒科 + Finnhub 新闻 + 信号;c/pc 偏差 > 1% 写入_divergenceclawock analyze-hk+clawock analyze-us:刷新并查看两本持仓;不再保留根级 wrapper
Cron harness 脚本(preflight + postflight 三明治)
所有 stock cron 都用同一套”preflight (确定性) → LLM (创造性) → postflight (校验)”模式。
确定性活强制脚本化执行;LLM 只做合成;postflight 自验证 + commit。
生产入口是安装后的 clawock CLI;生命周期实现由根 wheel 直接持有,
CLAWOCK_PROFILE 只选择声明式配置和资源,不加载第二个 Python distribution。
旧的 scripts/harness/ 回滚别名已在 installed-command 切换验证后删除。
Daily deep brief(08:03 HKT cron)
clawock brief preflight:刷 US/HK 价 + FX + portfolio snapshot + HHI 算法 + SEC EDGAR (仅is_leveraged_etf=false) + retrospective vs 上次 plan.json。输出memory/.tmp/brief-context-{date}.jsonclawock brief render:从brief-context-{date}.json+brief-judgment-{date}.json+{date}-plan.json渲染memory/{date}-pre-open.md与memory/.tmp/brief-card-{date}.txt。模型只写 judgment 里的判断文字,标题/表格/排序/数字格式全在代码里(--date YYYY-MM-DD选择产物日期,默认 HKT 当天;--dry-run打到 stdout 不写盘;--page-url URL自定义卡片页脚链接,默认该日发布页)。postflight 会自己跑一次,日常不用手动调clawock brief postflight:校验 plan schema + judgment overlay,用校验后的 plan 渲染报告与微信卡,再校验产物(段标记 / HHI / FX / HKD+USD bug pattern);pass/warn 自动 commit
Mode 6 briefing(HK 开/午/午后/收盘 + US 开/收盘 — 6 个 cron 共享)
clawock report preflight --market {hk|us} --phase {open|mid|pm|close}:跑 analyze_*.py + 抽信号 (WATCH/STOP/TRIM 计数) + 异动 (≥3% 涨跌) + 指数方向;写memory/.tmp/report-context-{market}-{phase}-{date}.json({date}= 跑批当天)并清掉该 market+phase 其它日期的残留;stdout 与文件是同一份 JSON(含context_id,末行context_path:),靠peer_scan在源头裁剪保持小体积。raw_wechat_block不再经模型手 —— postflight 自己拼进消息clawock report postflight --market {hk|us} --phase {phase} --context-id ID --text-file PATH:拼title + raw_wechat_block + 模型散文,校验三段标记 / 异动票必须被提及 / 长度 / 敷衍词;--context-id不匹配或散文文件 >30min 未更新则拒发。fail-closed:pass/warn 发全文 + scoped commit/push,fail 只发数据块(绝不发被拒散文)且不 commit,休市/缺 context 不发。失败过的 slot 之后可被合格报告补发一次。主发 WeChat + 镜像 Telegram。clawock-report-watchdog --market {hk|us} --phase {phase} --job-name "{cron名}":系统 crontab 的 LLM-free 投递兜底。覆盖 HK 4 班 + US 开/收 2 班;读取 postflight delivery marker,两路分开判:Telegram 未确认时补投 Telegram;本 slot marker 明确记录微信失败(sent_ok=false)时补发微信一次,再失败就 Telegram 告警。marker 缺失/过期/对不上 slot 时不重发 WeChat。
Mode 7 intraday(HK + US 盘中盯盘 — 3 个 cron job 共享同一套脚本;季节化 slot 数和精确时间只看生成调度表,隔夜最后一档始终是 02:33 HKT)
clawock intraday preflight --market {hk|us} [--judgment-packet]:跑 analyze_*.py + 异动检测 +should_alert决策;落盘完整的memory/.tmp/intraday-context-{market}-latest.json。--judgment-packet使 stdout 输出判断核心包与index.references;peer_scan/t0/雷达/信号明细/上次状态/information_full 等参考层留在完整 context,按需用clawock tool intraday_reference --arg market=hk --arg context_id=ID --arg entry=NAME [--arg ticker=TICKER]读取,不能把核心包当作全量参考层。clawock intraday postflight --market {hk|us} --context-id {preflight 的 context_id} --text-file memory/.tmp/intraday-prose-{hk|us}.md(先写文件再调用,禁 heredoc/<<<;空输入/超 20 分钟的旧文件判status: input_error并拒投):模型只写▎我的看法散文,assemble_message()在发送时把raw_wechat_block拼在前面 —— 数据块不再经模型往返,也就不会被重排版打坏。--context-id不匹配 = 散文与数据不同代,拒绝拼装只发数据块。校验 ▎我的看法 / should_alert 异动票提及只针对模型写的那段(长度算拼装后的整条);context 可用(status: ok)的每个 slot(含散文被拒、no_change的 slot)都把portfolio.json、当天memory/snapshots/<date>.json与logs/dashboard_build_status.json一起 commit + push 到 master(preflight 每档都刷新报价、改写账本,所以实际每档都有提交;#2325/#2355);dashboard 产物只走 data plane,dashboard-build --skip-if-unchanged在输入未变时跳过重建;无论有无 dashboard diff 都更新本地 slot heartbeat,交 single publisher 发布。--context-id必填:legacy 整报告输入形态(模型交整篇、事后 verbatim 校验数据块)已在 #1279 删除,省略即 argparse 报错退出 2。
共通设计点:
raw_wechat_block:Mode 6 报告(report_postflight)由 harness 自己拼进消息,LLM 只写散文、不碰数据块;intraday(intraday_postflight)同样由 harness 拼装,LLM 只写散文(模型 verbatim 拷贝数据块的 legacy 形态已在 #1279 删除)- preflight 输出
anomalies字段,LLM 必须在报告里至少提一个 anomaly 票(report 按模型散文校验,数据块里的票代码不算数) wechat_prefix(pass=空串,warn=黄 banner,fail=红 banner):report_postflight 与 intraday_postflight 都自己拼进消息发出,不再回给 LLM 拼- 所有 context.json 都放
memory/.tmp/(gitignore 排除)
辅助
- Scrapling:自适应爬虫框架,绕过反爬(Cloudflare 等),支持 JS 渲染。
pip3 install scrapling --break-system-packages。详见skills/scrapling/SKILL.md clawock dashboard-build:package-owned dashboard projection,聚合portfolio.json+ snapshots + v2 plans +memory/decisions.jsonl+ risk/peer/context sidecars →assets/data/dashboard.json;guardrail 卡直接复用 package lifecycle 计算,不经过 profile Python hook。决策字段decision_metrics/decision_delta/recent_decisions在dashboard.json,Reflect 的episode_backtest在assets/data/decision_audit.json(进页签才取,不占 200KB);只计被判定触发的 episode,date-cluster CI,并公示判不了的条数(coverage_active)。⚠️decision_money_impact已于 2026-07-15 停止发布:它把从没执行过的 call 也算进去,不是任何真实交易序列的累计金额。三类 postflight 都自动刷新;size cap 200KB。clawock portfolio-risk:包内计算 β/Vol/Max DD/Sharpe/margin_at_risk →assets/data/risk.json。每日 brief preflight 自动跑。Yahoo v8 429 限速 → 改用 Tencent gtimg primary + Polygon/AlphaVantage fallback。alert 类型:high_beta(>GUARDRAIL_CAPS['us_beta_max'],现 6.0) / high_vol(>50%) / deep_dd(<-10%) / high_leverage(>2.0) / negative_sharpe(<0)clawock regime(src/clawock/decision/regime.py):杠杆刻度盘 →assets/data/lev_regime.json。HSTECH 200日线趋势 + 20d 波动 → HK 杠杆ETF腿上限乘子(green×1 / amber×0.5 / red×0);US 逐名(2x单股ETF 各自 200日线,趋势off+vol>70% 才强砍)。2026-07 新增regime_history:逐日 regime(hk←HSTECH 全历史含200DMA+近10日动量;us←benchmark.json SPY 序列,仅动量因样本<200),供 build_dashboard 把vs_baseline按 regime 分桶。brief preflight 自动跑;tencent 空 fetch 保留旧文件。clawock mark-followed:v2 execution ground-truth 工具。--list列出已触发但执行未知的 decision;clawock mark-followed DECISION_ID [--no]写execution.status。Brier 衡量建议置信度,执行率单独展示。clawock audit-resettle:重跑 bar-based settlement 并完整报告状态迁移;默认 dry-run,只有--write才写memory/decisions.jsonl。clawock integrity [portfolio.json]:运行资金守恒、持仓派生值、报价完整性闸,ERROR 返回 2,WARN 不阻断。clawock validate-sidecar <name>:校验 workflow 生成的 macro/sentiment/news/dashboard/coverage 等发布产物。clawock catalysts:未来 14d catalysts →assets/data/catalysts.json(US holding/底层发行人财报 Finnhub + 2026 FOMC 硬编码 + 经济日历 NFP/CPI 规则)。brief_preflight 自动跑,整份进context.catalysts。简报里前瞻事件的日期只能引用其中的earnings/fomc/macro_events/scheduled_events,不得推测;scheduled_events缺失按未知处理并在▎待补提示(规则正文在skills/daily-deep-brief/SKILL.md)。clawock-influencer-scan:高影响力人物市场异动 →assets/data/influencer_feed.json。8 个源:Trump 原帖(trumpstruth.org/feed RSS, 全文) · Musk(Google News RSS 代理, X 无可靠免费 RSS) · Cathie Wood/ARK 日度调仓(arkfunds.io JSON,一手:ticker/方向/股数/占 ETF 比重) · Serenity(Substack 公开帖) · 人物报道代理(段永平/洪灏 zh-HK、Burry/Pelosi en-US)。名册+每源候选预算见influencer.py的_sources()(没有 per-source cap 的话,话多的源会把 LLM 那批整个吃掉)。关键词预筛 → 单次 vendor LLM(thinking_disabled结构化抽取;MiniMax-M3.1 不接受关 thinking,实际发 adaptive +output_config.effort=low,预算见LLM_MAX_TOKENS/LLM_TIMEOUT,#2202)提相关性/stance/ticker/板块 → 代码交叉匹配持仓分三档:held_hits/new_ideas/sector_hits。merge-not-overwrite: 源抓取失败才保留旧条目(被 LLM 筛掉≠失败;Serenity 空是常态不参与保留)。LLM 只使用MINIMAX_API_KEY;过滤失败时不发布未评分条目,只保留上一轮仍在窗口内的已评分条目(retained_from_previous,llm_filter_status=failed_kept_previous)。dashboard「影响力雷达」卡 + brief▎名人异动/政策风向段消费。- GHA LLM client:由
clawock.automation持有,供 GitHub Actions 直调(绕过 OpenClaw gateway)。MiniMax-M3.1-Flash-Preview (Anthropic Messages),唯一 provider;2026-09-13 起不再有 OpenCode 回退;不是 OpenClaw 或人工调用入口。 clawock-{brief-fallback,weekly-review,news-digest}:3 个 GitHub Actions installed commands,共用上述 package-owned client。ops/publish/safe_push.sh:共享 git push 防 conflict 死循环工具。3 次 retry + 每次 rebase 失败 →git rebase --abort+ exit 2(不死循环 push)。所有写文件的 GH Action workflow 用bash ops/publish/safe_push.sh替代原本的 push loop;adapter 的_harness_common.push_with_rebase_retry直接委托本脚本(2026-06-10 统一,自动获得 rebase.autoStash + 冲突标记硬闸),全体 committer 单一 push 路径。clawock reconcile:手工成交后的唯一收口。先把成交写进对应holdings[].trades[](action/date/shares/price,卖出另记realized_pnl),同步 broker 真值叶子(shares/cost_basis;新仓建 holding、平仓保留历史行并置shares=0;存取款写cash_adjustments[]),再运行本命令重算 aggregates / cash / realized P&L 并执行完整性闸。它只派生和校验,不会替你猜成交。
参数速查 / Utility arguments
下列参数以各命令的 --help 为准;[...] 表示可选,未加方括号的参数必填。
子命令也可用 clawock COMMAND SUBCOMMAND --help 查看。这里只记录调用与参数,不运行采集或账本写入。
live-sources
clawock live-sources
clawock live-sources [--market {hk,us,both}] [--sources SOURCES] [--fresh-since {session_open,last_close}] [--window-minutes WINDOW_MINUTES] [--budget-s BUDGET_S] [--timeout-s TIMEOUT_S] [--per-ticker PER_TICKER] [--json]
| 参数 | 用途 |
|---|---|
--market {hk,us,both} |
采集市场,默认 both。 |
--sources SOURCES |
comma-separated subset of hkexnews,sec_fulltext,google_news,yahoo_rss,ths_724,em_724 (default: all) |
--fresh-since {session_open,last_close} |
资讯新鲜度口径,默认 session_open;last_close 以上次收盘为起点。 |
--window-minutes WINDOW_MINUTES |
采集时间窗口(分钟),默认 1440。 |
--budget-s BUDGET_S |
整批采集预算(秒)。 |
--timeout-s TIMEOUT_S |
单次请求超时(秒)。 |
--per-ticker PER_TICKER |
每票摘要最多保留条数,默认 4。 |
--json |
accepted for symmetry; output is JSON |
mover-evidence
clawock mover-evidence
clawock mover-evidence --market {us,hk} --tickers TICKERS [--window-minutes WINDOW_MINUTES]
| 参数 | 用途 |
|---|---|
--market {us,hk} |
必填市场。 |
--tickers TICKERS |
comma-separated movers |
--window-minutes WINDOW_MINUTES |
资讯窗口(分钟)。 |
news-evidence
clawock news-evidence
clawock news-evidence [--no-sec] [--policy POLICY]
| 参数 | 用途 |
|---|---|
--no-sec |
skip live SEC metadata refresh |
--policy POLICY |
资讯证据政策 JSON 路径。 |
cross-factor
clawock cross-factor
clawock cross-factor [--no-fundamentals] [--config CONFIG] [--backfill-history-ranks]
| 参数 | 用途 |
|---|---|
--no-fundamentals |
use a valid cache only; do not refresh SEC facts |
--config CONFIG |
因子配置 JSON 路径。 |
--backfill-history-ranks |
reconstruct sector-neutral constituent ranks for registered snapshots that predate their persistence (#1133), print the fidelity check, and exit without touching the live snapshot |
peer-residual
clawock peer-residual
clawock peer-residual [--rules RULES]
| 参数 | 用途 |
|---|---|
--rules RULES |
同业残差规则 JSON 路径。 |
t0
clawock t0
--intraday:等同 T0_INTRADAY=1,开盘时补 VWAP/ORB;默认不抓分钟数据。
validate-regime-dial
clawock validate-regime-dial
clawock validate-regime-dial [--folds FOLDS] [--permutations PERMUTATIONS] [--groups GROUPS] [--no-card]
| 参数 | 用途 |
|---|---|
--folds FOLDS |
walk-forward 折数,默认 4。 |
--permutations PERMUTATIONS |
置换检验次数,默认 2000。 |
--groups GROUPS |
CSCV groups; every symmetric half-split is scored |
--no-card |
skip writing a run card (for ad-hoc exploration) |
validate-regime-hmm
clawock validate-regime-hmm
clawock validate-regime-hmm [--states STATES] [--warmup WARMUP] [--step STEP] [--permutations PERMUTATIONS] [--restarts RESTARTS] [--floor FLOOR] [--json] [--no-card]
| 参数 | 用途 |
|---|---|
--states STATES |
fix the state count; default selects it by BIC |
--warmup WARMUP |
sessions before the first walk-forward label |
--step STEP |
sessions between refits |
--permutations PERMUTATIONS |
置换检验次数。 |
--restarts RESTARTS |
EM restarts per fit; fewer is faster and more likely to report a local optimum as the model |
--floor FLOOR |
exposure at full risk-off probability; the production dial reaches 0.0, so –floor 0 equalises the range |
--json |
emit the full result instead of the report |
--no-card |
skip writing a run card (for ad-hoc exploration) |
evaluate-add-shapes
clawock evaluate-add-shapes
clawock evaluate-add-shapes [--json] [--no-card] [--campaigns] [--source {store,tencent}] [--split SPLIT]
| 参数 | 用途 |
|---|---|
--json |
emit the summary as JSON |
--no-card |
skip the run card |
--campaigns |
run the campaign simulation (right / left / combined, IS vs OOS) |
--source {store,tencent} |
bars: memory/bars (default) or a longer Tencent fetch (MA200 needs ~200 sessions before the left side can fire) |
--split SPLIT |
first out-of-sample signal date |
dashboard-build
clawock dashboard-build
clawock dashboard-build [--previous PATH | --no-previous] [--out-dir DIR] [--skip-if-unchanged]
| 参数 | 用途 |
|---|---|
--previous PATH |
dashboard payload to restore card values from when their source context is absent from this checkout. Opt-in: a build that is going to be published from a checkout without the memory/.tmp sidecars passes the published dashboard.json here |
--no-previous |
build from the workspace alone; no output may come from a previously published file. This is the default — pass it to state the guarantee explicitly |
--out-dir DIR |
write the five outputs of this generation into DIR instead of the published location. Beats the BUILD_DASHBOARD_OUT / DECISION_AUDIT_OUT / SHADOW_PORTFOLIO_OUT redirects |
--skip-if-unchanged |
hash the projection inputs first and skip the whole build when they match the last build’s fingerprint (stored under .cache/dashboard-input.json). The 20-minute publisher uses this so an unchanged desk does not reparse ~12MB of JSON every tick (#846). |
decision-map
clawock decision-map
clawock decision-map [--out OUT] [--stdout]
| 参数 | 用途 |
|---|---|
--out OUT |
输出 JSON 路径,默认 assets/data/decision_map.json。 |
--stdout |
只打印 JSON,不写输出文件。 |
dashboard-outputs
clawock dashboard-outputs
clawock dashboard-outputs [--root ROOT] [--keep-clock-only] [--baseline-dir BASELINE_DIR]
| 参数 | 用途 |
|---|---|
--root ROOT |
待比较的工作区根目录。 |
--keep-clock-only |
do not restore outputs changed only by build clocks |
--baseline-dir BASELINE_DIR |
compare against a directory holding the last published generation instead of this repository’s HEAD (the outputs are no longer tracked, #314) |
run-card
clawock run-card
clawock run-card [--list] [--run-id RUN_ID] [--diff RUN_ID RUN_ID] [--verify RUN_ID]
| 参数 | 用途 |
|---|---|
--list |
list stored run cards |
--run-id RUN_ID |
print one card |
--diff RUN_ID RUN_ID |
say which recorded input differs between two cards |
--verify RUN_ID |
compare a card against the environment running now |
claim-provenance
clawock claim-provenance
clawock claim-provenance [--check]
| 参数 | 用途 |
|---|---|
--check |
exit non-zero on problems |
signal-panel
clawock signal-panel
clawock signal-panel [--horizon {t1,t5,t20}] [--json] [--panel] [--no-card]
| 参数 | 用途 |
|---|---|
--horizon {t1,t5,t20} |
horizon for the printed table (default t5) |
--json |
print the full result |
--panel |
print the panel rows instead of the scorecard |
--no-card |
跳过 run card 写入。 |
scorecard-provenance
clawock scorecard-provenance
clawock scorecard-provenance [--check] [--recompute] [--metrics METRICS] [--ledger LEDGER] [--ref REF] [--json]
| 参数 | 用途 |
|---|---|
--check |
recompute the digests and compare with the published block |
--recompute |
also re-derive the headline counts at the recorded cutoff |
--metrics METRICS |
published payload to read (default assets/data/dashboard.json) |
--ledger LEDGER |
ledger to verify against (default memory/decisions.jsonl) |
--ref REF |
read the ledger from this git ref instead of the working copy |
--json |
print JSON, not text |
provenance
clawock provenance
clawock provenance {calc,market-cap,verify-manifest} ...
| 参数 | 用途 |
|---|---|
{calc,market-cap,verify-manifest} |
选择精确计算、市值核验或 manifest 核验;调用形式见下方各子命令。 |
record
clawock record
clawock record [--ledger LEDGER] [--source {claude,cli,codex,conversation,openclaw}] --subject SUBJECT [--market MARKET] [--currency CURRENCY] --action {abstain,add,buy,hold,reject,sell,trim,watch} --confidence CONFIDENCE [--driven-by {fundamental,mixed,sentiment,technical}] --bull BULL --bear BEAR [--bull-evidence BULL_EVIDENCE] [--bear-evidence BEAR_EVIDENCE] [--thesis THESIS] --invalidation INVALIDATION [--emotion {averaging_down,calm,euphoria,fear,fomo,mixed,revenge}] [--note NOTE]
| 参数 | 用途 |
|---|---|
--ledger LEDGER |
decisions.jsonl path (default: the workspace ledger) |
--source {claude,cli,codex,conversation,openclaw} |
which harness produced this verdict (conversation=DSH) |
--subject SUBJECT |
ticker, e.g. 00100 |
--market MARKET |
market, e.g. HK or US |
--currency CURRENCY |
quote currency |
--action {abstain,add,buy,hold,reject,sell,trim,watch} |
必填裁决动作。 |
--confidence CONFIDENCE |
必填置信度,0–1。 |
--driven-by {fundamental,mixed,sentiment,technical} |
判断驱动因素,默认 mixed。 |
--bull BULL |
supporting case summary |
--bear BEAR |
opposing case summary (mandatory) |
--bull-evidence BULL_EVIDENCE |
支持证据引用,可重复。 |
--bear-evidence BEAR_EVIDENCE |
反对证据引用,可重复。 |
--thesis THESIS |
关联 thesis。 |
--invalidation INVALIDATION |
observable falsification condition; repeatable |
--emotion {averaging_down,calm,euphoria,fear,fomo,mixed,revenge} |
裁决时的情绪,默认 calm。 |
--note NOTE |
附注。 |
必填:--subject、--action、--confidence(0–1)、--bull、--bear、--invalidation。
--invalidation、--bull-evidence、--bear-evidence 可重复;默认 market/currency 为 HK/HKD,美股须显式指定 US/USD。
这是向裁决账本追加已做出的判断,不会下单或采集证据。示例:
clawock record --subject AAPL --market US --currency USD --action watch \
--confidence 0.7 --bull "现金流稳定" --bear "估值偏高" \
--invalidation "下一季营收同比转负"
risk
clawock risk
clawock risk [--ledger LEDGER] {list,ack,override,confirm} ...
| 参数 | 用途 |
|---|---|
{list,ack,override,confirm} |
列出、确认已知晓、限时覆盖或证据确认;见下方子命令。 |
--ledger LEDGER |
风险账本路径;放在子命令之前。 |
thesis
clawock thesis
clawock thesis {validate,drift} ...
| 参数 | 用途 |
|---|---|
{validate,drift} |
校验 thesis JSON 或比较前后证据漂移。 |
entry-gate
clawock entry-gate
clawock entry-gate {validate,assess} ...
| 参数 | 用途 |
|---|---|
{validate,assess} |
校验研究 gate JSON 或评估是否满足入场研究条件。 |
plan-context
clawock plan-context
clawock plan-context [--leg {HK,US}] [--date DATE]
| 参数 | 用途 |
|---|---|
--leg {HK,US} |
只取指定市场的未结束裁决。 |
--date DATE |
查询日期(YYYY-MM-DD),默认当天。 |
research
clawock research
clawock research [--check]
| 参数 | 用途 |
|---|---|
--check |
integrity only: exit 1 when an artifact is invalid |
provenance calc
clawock provenance calc
clawock provenance calc --expr EXPR
| 参数 | 用途 |
|---|---|
--expr EXPR |
必填算术表达式。 |
provenance market-cap
clawock provenance market-cap
clawock provenance market-cap --price PRICE --shares SHARES --reported REPORTED --currency CURRENCY [--tolerance-pct TOLERANCE_PCT]
| 参数 | 用途 |
|---|---|
--price PRICE |
必填股价。 |
--shares SHARES |
必填股数。 |
--reported REPORTED |
必填待核验市值。 |
--currency CURRENCY |
必填报价币种。 |
--tolerance-pct TOLERANCE_PCT |
容许差异百分比,默认 1。 |
provenance verify-manifest
clawock provenance verify-manifest
clawock provenance verify-manifest path
| 参数 | 用途 |
|---|---|
path |
必填 manifest JSON 文件路径。 |
risk list
clawock risk list
clawock risk list
risk ack
clawock risk ack
clawock risk ack --note NOTE breach_id
| 参数 | 用途 |
|---|---|
breach_id |
必填风险事件 ID。 |
--note NOTE |
必填知晓说明。 |
risk override
clawock risk override
clawock risk override --reason REASON --ttl-hours TTL_HOURS breach_id
| 参数 | 用途 |
|---|---|
breach_id |
必填风险事件 ID。 |
--reason REASON |
必填覆盖理由。 |
--ttl-hours TTL_HOURS |
必填覆盖有效时长(小时)。 |
risk confirm
clawock risk confirm
clawock risk confirm --evidence EVIDENCE breach_id
| 参数 | 用途 |
|---|---|
breach_id |
必填风险事件 ID。 |
--evidence EVIDENCE |
必填确认依据。 |
thesis validate
clawock thesis validate
clawock thesis validate path
| 参数 | 用途 |
|---|---|
path |
必填 thesis JSON 文件路径。 |
thesis drift
clawock thesis drift
clawock thesis drift old new
| 参数 | 用途 |
|---|---|
old |
必填旧 thesis JSON 路径。 |
new |
必填新 thesis JSON 路径。 |
entry-gate validate
clawock entry-gate validate
clawock entry-gate validate path
| 参数 | 用途 |
|---|---|
path |
必填 entry gate JSON 路径。 |
entry-gate assess
clawock entry-gate assess
clawock entry-gate assess path
| 参数 | 用途 |
|---|---|
path |
必填 entry gate JSON 路径。 |
Cron map
精确的 11-job schedule、EDT/EST 表达式、Mode/harness 和 11 条 watchdog 映射由
config/cron-schedules.json 单源维护,生成的人读表见
docs/operations/cron-schedules.md。
ops/host/sync_us_cron_dst.py --apply 每日自动对齐美股 live cron + system watchdog;
clawock-cron-heartbeat 维护 Mode 7 slot ledger,由现有 single publisher 发布。
所有 harness preflight/postflight 的实现都在 src/clawock/harness/,统一从安装后的
clawock CLI 调用。Mode 6 / brief / Mode 7 的 postflight
都会重建 dashboard(输入未变时 --skip-if-unchanged 跳过);Mode 7 每个 context 可用的 slot
都把 portfolio.json 连同当天快照与 build status 提交并推送,每个受监控 slot 的
heartbeat 都会发布并由 cron health 对账。
cron payload 是真实执行面,会为隔离 session 自包含关键步骤;SKILL.md 是详细规范。完整 prompt
模板在 config/cron-payloads/,job 变量、model/fallback/thinking/tools/schedule 则由
config/cron-schedules.json 单源声明;改格式时必须同时 diff payload 与对应 Mode,尤其
Step 2.5 sidecar。schedule、payload、watchdog 或生成文档漂移都会被
ops/system_check.py / CI 拦截。
改 cron 配置的安全步骤(默认只检查,显式 apply;不覆盖投递目标/account/failure alert):
python3 ops/host/sync_cron_payloads.py --json
python3 ops/host/sync_cron_payloads.py --apply --json
同步器按精确 job 名/ID 规划最小 patch,发现重复/缺失/额外 job 或目标 job 正在运行时不写,
逐 job 失败即停,apply 后重新读取验证。升级大版本后仍应先 openclaw cron list --all 数 job 个数
(应为 11,其中 10 个启用;不带 --all 只列启用的 10 个),少了跑 openclaw doctor --fix。
Cron 运行历史(自动 + 手动跨 job 聚合)
openclaw cron runs 必须带 --id,且单 job 视角。跨 job + 自动调度 + 手动 trigger 一起看用:
bash ops/host/check_crons.sh # 最近 20 次(auto + manual 混排,HKT 倒序)
bash ops/host/check_crons.sh 50 # 最近 50 次
bash ops/host/check_crons.sh --status error # 只看失败
bash ops/host/check_crons.sh --kind cron # 只看自动调度
bash ops/host/check_crons.sh --job 港股 # 按 job 名子串过滤
bash ops/host/check_crons.sh --full # 摘要不截断
bash ops/host/check_crons.sh --json # JSON 输出(喂给后续 pipeline)
运行历史同样优先经 OpenClaw CLI 读取;旧 cron/runs/*.jsonl 只作为迁移前 fallback。
脚本本体 ops/host/cron_runs.py。
已废弃
旧脚本源码已删除,不作为参考依赖;provider、header、fallback 与解析逻辑只认 installed package 当前实现。
- 完全删掉 (2026-05-16 大扫除):
monday_signal.py(含硬编码 key)、api_retry_wrapper.py、baidu_search_wrapper.py、deep_analysis.py、final_analysis.py、find_opportunities.py、hk_ai_monitor.py、multi_agent_stock_analysis.py、price_alert_monitor.py、TradingAgents/整目录- 完全删掉:
scripts/legacy/与scripts/data/;dated memory 中的旧文件名只属历史记录。