{"slug":"investment-decision-3","title":"investment-decision","summary":"Run a clawock investment decision — read the prepared request, research with the host's own tools, write decision.json with evidence and an explicit bull/bear debate, and let Python validate and settle. Use when the user asks for an investment decision or a clawock run request is","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-23T09:00:39.843465Z","repo":{"url":"https://github.com/KCNyu/clawock","stars":15,"forks":0,"license":"MIT","updatedAt":"2026-09-25T07:36:11Z"},"bodyHtml":"<hr>\n<h2>name: investment-decision\ndescription: Run a clawock investment decision — read the prepared request, research with the host's own tools, write decision.json with evidence and an explicit bull/bear debate, and let Python validate and settle. Use when the user asks for an investment decision or a clawock run request is present.</h2>\n<h1>clawock investment-decision</h1>\n<p>You are the model side of a clawock decision run. DeepSeek Harness owns\nconversation, memory and tools; clawock owns the decision contract. Your job\nis one file in, one file out: read a request, research, write a decision, let\nPython validate it. The model can never grade itself.</p>\n<pre><code>prepare ──► request.json ──► you: research + write decision.json ──► publish ──► receipt\n(certified │                       (collect evidence,                │       (Python settles:\n context + │                        run the bull/bear debate,          │        evidence counts, debate\n gates)    │                        pick a bounded action)             │        links, money/FX to the cent)\n           └───────────────────────────────────────────────────────────┘\n</code></pre>\n<h2>Prerequisites</h2>\n<p><code>clawock</code> must be installed (Python ≥ 3.11):</p>\n<pre><code>python -m pip install clawock\n</code></pre>\n<p>If a workspace is not initialized yet, create it <strong>with the workflow pinned</strong> —\nthat flag is what turns <code>decision.json</code> into the enforced contract:</p>\n<pre><code>clawock init ./book --workflow investment-decision\nclawock workflow install investment-decision --workspace ./book\n</code></pre>\n<p>The second command copies the readable contract (including\n<code>references/decision-contract.md</code> and the JSON Schema) into\n<code>./book/.agents/skills/investment-decision/</code> — a standard Agent Skill\nlocation that DeepSeek Harness also discovers.</p>\n<h2>The loop</h2>\n<h3>1. Prepare</h3>\n<pre><code>clawock run prepare --workspace ./book\n</code></pre>\n<p>Read the emitted request file (the <code>request_file</code> path printed on stdout,\ne.g. <code>.clawock/work/&lt;run_id&gt;/request.json</code>). It contains:</p>\n<ul>\n<li><code>task</code> — the decision contract (evidence, opposing case, bounded action,\nreconciled amounts)</li>\n<li><code>context.documents</code> — the certified context, per-file sha256 fingerprints\n(anything you cite must come from here or from your own research, and must\nbe observed no later than <code>as_of</code>)</li>\n<li><code>workflow.parameters</code> — gates: <code>min_supporting_evidence</code>,\n<code>min_opposing_evidence</code>, <code>max_confidence_without_primary_source</code></li>\n</ul>\n<h3>2. Research, then debate, then decide</h3>\n<p>Research with the host's normal tools (web search, file reads, the live\ndashboard at <a href=\"https://kcnyu.github.io/clawock/\">https://kcnyu.github.io/clawock/</a> as <code>source_class: market</code>\nevidence). Collect <strong>both</strong> sides on purpose — the workflow has an opposing\nminimum, and <code>publish</code> refuses a decision whose bear case is a strawman:</p>\n<ol>\n<li>Gather supporting evidence (filings/financials → <code>primary</code>, reputable\nsecondary analysis → <code>secondary</code>, market data → <code>market</code>).</li>\n<li>Actively seek the strongest counterargument you can find or construct —\na genuine bear case, not a token objection. Record it as <code>opposing</code>\nevidence.</li>\n<li>State the thesis and its invalidation conditions <strong>before</strong> choosing an\naction.</li>\n<li>If the action proposes an order, compute both money identities from the\ncontext (quantity × unit price; × FX) — never invent prices, FX or sizes.</li>\n</ol>\n<p>Write <code>decision.json</code> at the workspace root — artifact paths are resolved\nagainst the workspace root, not the request directory:</p>\n<pre><code>{\n  \"schema_version\": 1,\n  \"workflow\": {\"id\": \"investment-decision\", \"version\": \"1.1.0\"},\n  \"decision_id\": \"example-2026-08-08\",\n  \"as_of\": \"2026-08-08T08:00:00+00:00\",\n  \"subject\": {\"ticker\": \"EXAMPLE\", \"market\": \"US\", \"currency\": \"USD\"},\n  \"evidence\": [\n    {\"id\": \"filing-growth\", \"stance\": \"supporting\",\n     \"summary\": \"The latest filed revenue figure grew year over year.\",\n     \"source\": \"issuer filing\", \"source_class\": \"primary\",\n     \"observed_at\": \"2026-08-08T07:30:00+00:00\"},\n    {\"id\": \"valuation-risk\", \"stance\": \"opposing\",\n     \"summary\": \"The current market multiple is above its stated range.\",\n     \"source\": \"market data snapshot\", \"source_class\": \"market\",\n     \"observed_at\": \"2026-08-08T07:45:00+00:00\"}\n  ],\n  \"debate\": {\n    \"bull_case\": {\"summary\": \"Filed growth supports continued monitoring.\",\n                  \"evidence_ids\": [\"filing-growth\"]},\n    \"bear_case\": {\"summary\": \"Valuation leaves insufficient margin of safety.\",\n                  \"evidence_ids\": [\"valuation-risk\"]}\n  },\n  \"thesis\": {\n    \"statement\": \"Momentum is constructive, but price does not compensate for valuation risk.\",\n    \"confidence\": 0.7,\n    \"invalidation_conditions\": [\"Filed growth reverses\"]\n  },\n  \"decision\": {\n    \"action\": \"watch\",\n    \"rationale\": \"The opposing valuation evidence blocks an entry.\",\n    \"evidence_ids\": [\"filing-growth\", \"valuation-risk\"],\n    \"order\": null\n  }\n}\n</code></pre>\n<p>Rules that are enforced by <code>clawock run publish</code>, not by this file:</p>\n<ol>\n<li><code>debate.bull_case</code> and <code>debate.bear_case</code> are both required and each cites\nevidence; the bear case must cite opposing-stance evidence — publish\nrefuses without it. Python checks that linkage, not sincerity: make the\nbear case a genuine counterargument, never a strawman — that honesty is\nyour contract.</li>\n<li>Every <code>evidence</code> row needs a <code>stance</code> (<code>supporting</code> | <code>opposing</code> |\n<code>context</code>), a <code>source_class</code> (<code>primary</code> | <code>secondary</code> | <code>market</code> |\n<code>agent</code>) and an <code>observed_at</code> no later than <code>as_of</code>.</li>\n<li>All <code>evidence_ids</code> references must exist (decision and both debate cases);\nconclusions in <code>thesis.statement</code> and <code>decision.rationale</code> should be\nbacked by cited evidence.</li>\n<li>If you propose an order, the currency amounts must reconcile to the cent;\nlet the numbers come out of the context, never invent them.</li>\n<li>Confidence above <code>max_confidence_without_primary_source</code> requires a cited\nprimary source.</li>\n</ol>\n<p>The sibling files next to this SKILL.md carry the full contract:\n<code>references/decision-contract.md</code> (with <code>assets/order.example.json</code>, an\norder-carrying decision whose two money identities reconcile). Introspect\nthe exact artifact shape any time: <code>clawock workflow schema investment-decision decision.json</code>.</p>\n<h3>3. Publish and report</h3>\n<pre><code>clawock run publish \\\n  --workspace ./book \\\n  --request ./book/.clawock/work/&lt;run_id&gt;/request.json \\\n  --artifact decision.json=./book/decision.json\n</code></pre>\n<p>Report the receipt's <code>status</code> and <code>run_id</code>, and if <code>status</code> is <code>published</code>,\nshow the user a compact decision card:</p>\n<pre><code>Subject      EXAMPLE (US/USD)          decision_id example-2026-08-08\nBull         Filed growth supports continued monitoring.        [1 citing]\nBear         Valuation leaves insufficient margin of safety.    [1 citing]\nThesis       Momentum constructive, price does not compensate for risk.\nConfidence   0.70  ·  Action watch  ·  Invalidation: filed growth reverses\nReceipt      published  ·  run_id &lt;run_id&gt;  ·  certificate pinned\n</code></pre>\n<p>Never edit the receipt, never re-grade the decision, never \"improve\" the\nartifact after publish — Python settles.</p>\n<h2>Before publish: self-check</h2>\n<p>Run this checklist before invoking <code>publish</code> — Python re-checks all of it\nanyway, but a clean first pass beats a rejected receipt:</p>\n<ul>\n<li>both <code>debate.bull_case</code> and <code>debate.bear_case</code> present, each citing\nexisting <code>evidence_ids</code>, the bear case citing <code>opposing</code> rows</li>\n<li>every cited <code>evidence_id</code> exists; no duplicates</li>\n<li>every evidence row has <code>stance</code>, <code>source</code>, <code>source_class</code>, and\n<code>observed_at</code> no later than <code>as_of</code></li>\n<li>one <code>primary</code> row is cited whenever <code>confidence</code> exceeds the cap</li>\n<li>an order (if any) satisfies <code>gross_amount_quote = quantity × unit_price</code>\nand <code>gross_amount_base = gross_amount_quote × fx_quote_to_base</code>, to the\ncent</li>\n</ul>\n<h2>If publish rejects</h2>\n<p>The receipt lists <code>validation_issues</code> with <code>code</code> + <code>message</code>. Repair only\nthe named issue and retry against the <strong>same</strong> prepared request; re-run\n<code>prepare</code> only if the context or workflow certificate changed.</p>\n<table>\n<thead>\n<tr>\n<th>typical <code>code</code></th>\n<th>meaning</th>\n<th>fix</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>unknown_fields</code> / <code>missing_fields</code></td>\n<td>a field name is wrong or extra</td>\n<td>align with the JSON example above; no <code>reasoning</code>, no <code>opposing_case</code></td>\n</tr>\n<tr>\n<td><code>insufficient_supporting_evidence</code> / <code>insufficient_opposing_evidence</code></td>\n<td>gate minimums not met</td>\n<td>add more evidence rows with that <code>stance</code></td>\n</tr>\n<tr>\n<td><code>unsupported_bear_case</code> / <code>unsupported_bull_case</code></td>\n<td>debate case cites the wrong stance</td>\n<td>point <code>bear_case</code> at <code>opposing</code> rows, <code>bull_case</code> at <code>supporting</code> rows</td>\n</tr>\n<tr>\n<td><code>missing_evidence_reference</code></td>\n<td><code>evidence_ids</code> names an unknown row</td>\n<td>only cite <code>id</code>s that exist in <code>evidence</code></td>\n</tr>\n<tr>\n<td><code>gross_amount_mismatch</code> / <code>fx_amount_mismatch</code></td>\n<td>order arithmetic wrong</td>\n<td>recompute <code>quantity × unit_price</code> and <code>× fx_quote_to_base</code> to the cent</td>\n</tr>\n<tr>\n<td><code>confidence_without_primary_source</code></td>\n<td>confidence above the cap, no primary cited</td>\n<td>add a <code>primary</code> row and cite it in <code>decision.evidence_ids</code></td>\n</tr>\n<tr>\n<td><code>future_evidence</code></td>\n<td><code>observed_at</code> after <code>as_of</code></td>\n<td>backdate or fix timestamps</td>\n</tr>\n</tbody>\n</table>\n<h2>Where things land</h2>\n<table>\n<thead>\n<tr>\n<th>path</th>\n<th>contents</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>&lt;workspace&gt;/decision.json</code></td>\n<td>your artifact (read by publish)</td>\n</tr>\n<tr>\n<td><code>&lt;workspace&gt;/.clawock/work/&lt;run_id&gt;/request.json</code></td>\n<td>the certified request</td>\n</tr>\n<tr>\n<td><code>&lt;workspace&gt;/.clawock/runs/&lt;run_id&gt;/</code></td>\n<td>receipt + manifest (the settlement record)</td>\n</tr>\n</tbody>\n</table>\n<h2>Learn from outcomes</h2>\n<p>After the stated horizon, record price/FX outcome evidence and run\n<code>clawock workflow evaluate investment-decision --decision ... --outcome ...</code>.\nThe result reconciles price and FX before assigning a basis-point score — it\nis evidence for the next decision, not portfolio P&amp;L.</p>\n<h2>Record conversation verdicts</h2>\n<p>A conversation verdict (加仓/减仓/建仓/清仓/观望) is a decision — write it\nto the shared decision-mind ledger, the same <code>memory/decisions.jsonl</code> the\ndaily OpenClaw brief writes to, so both sides can read it and the daily\nsettlement round-trips it:</p>\n<pre><code>clawock record \\\n  --subject 00100 --market HK --currency HKD \\\n  --action reject --confidence 0.65 --driven-by fundamental \\\n  --bull \"营收 +159% YoY,入通/海外霸榜催化\" \\\n  --bear \"净利率 -2368%,资不抵债,z+2.8σ 反转\" \\\n  --thesis \"高增长救不了资不抵债,先活下来\" \\\n  --invalidation \"站回 340\" --invalidation \"缩量企稳\" \\\n  --emotion averaging_down --note \"浮亏 -40% 的摊本冲动被压过,忍住没加\"\n</code></pre>\n<p><code>--source</code> defaults to <code>conversation</code> for DSH; other harnesses pass their\nown — OpenClaw <code>--source openclaw</code>, Claude Code <code>--source claude</code>, Codex\n<code>--source codex</code>. One ledger, one record command, every harness calls it;\nnobody edits <code>decisions.jsonl</code> directly.</p>\n<p>Rules: the bear case and at least one observable invalidation condition are\nmandatory (the command rejects weak records); be honest about emotion\npressure — <code>fomo</code>/<code>revenge</code>/<code>averaging_down</code> are the exact patterns this\nledger exists to surface. Full schema (in the repository, not in the npm\ntarball):\n<a href=\"https://github.com/KCNyu/clawock/blob/master/docs/decision-mind-ledger.md\">https://github.com/KCNyu/clawock/blob/master/docs/decision-mind-ledger.md</a></p>\n<h2>Learn more</h2>\n<p>Live proof on a real HK + US desk: <a href=\"https://kcnyu.github.io/clawock/\">https://kcnyu.github.io/clawock/</a>\nThe same contract from other harnesses (OpenClaw skill, Claude Code\ninstruction, Codex AGENTS.md, pure CLI):\n<a href=\"https://github.com/KCNyu/clawock/tree/master/examples/dsh/packages/clawock-dsh\">https://github.com/KCNyu/clawock/tree/master/examples/dsh/packages/clawock-dsh</a></p>\n","files":[{"path":"assets/decision.example.json","sizeBytes":1675,"isText":true},{"path":"assets/order.example.json","sizeBytes":2268,"isText":true},{"path":"assets/outcome.example.json","sizeBytes":478,"isText":true},{"path":"references/decision-contract.md","sizeBytes":4713,"isText":true},{"path":"references/decision.schema.json","sizeBytes":4652,"isText":true},{"path":"SKILL.md","sizeBytes":11328,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-25T07:40:03.978683Z","sha256":"B6BBA61FB3A4529B24151AC5891C06CA122A53A82555BF92A622288C6460957E","sizeBytes":10346},"review":null,"source":{"repositoryUrl":"https://github.com/KCNyu/clawock","path":"examples/dsh/packages/clawock-dsh/skills/investment-decision","license":"MIT","commit":"d504fce9bd4bf8b44a0239a21f94978319394c5e","subtreeSha":"F61D058B6580EED52F4024F9CAB78F9178C8B854490EAAA179CC28A698BE3CB0","lastSyncedAt":"2026-09-25T07:38:16.512244Z"},"reviewedAt":"2026-09-25T07:43:43.97916Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/KCNyu/clawock/tree/master/examples/dsh/packages/clawock-dsh/skills/investment-decision"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install kcnyu-clawock@llmmart"},{"target":"git","command":"git clone https://github.com/KCNyu/clawock.git"}]}