Skip to content

"Vibe-Trading: Your Personal Trading Agent"

docs: remove dead docs/live-trading/SPEC.md references from source comments

Haozhe Wub5efee66ab20
diff --git a/agent/api_server.py b/agent/api_server.py
index e3cb6be0b..d97f93a5d 100644
--- a/agent/api_server.py
+++ b/agent/api_server.py
@@ -2277,7 +2277,7 @@ async def retry_swarm_run(run_id: str, http_request: Request):
# ============================================================================
#
# These are the privileged SURFACE actions of the live-trading channel
-# (docs/live-trading/SPEC.md, Consent §1/§3/§4). None is an agent tool:
+# (live-trading SPEC, Consent §1/§3/§4). None is an agent tool:
# - POST /mandate/commit -> the single mandate writer (commit_mandate)
# - POST /live/halt -> trip the kill switch (P5 trip_halt)
# - POST /live/resume -> clear the kill switch (P5 clear_halt)
diff --git a/agent/src/live/__init__.py b/agent/src/live/__init__.py
index fc84975e3..120b01e81 100644
--- a/agent/src/live/__init__.py
+++ b/agent/src/live/__init__.py
@@ -6,5 +6,5 @@ agentic account, with an out-of-band kill switch and a full audit trail.
All live-channel state lives under ``~/.vibe-trading/live/`` (see
:mod:`src.live.paths`). The mandate is read-only at the agent loop — there is
-no write path reachable from a tool (see ``docs/live-trading/SPEC.md`` §3).
+no write path reachable from a tool (see the live-trading SPEC §3).
"""
diff --git a/agent/src/live/classification.py b/agent/src/live/classification.py
index 5498112ba..903285590 100644
--- a/agent/src/live/classification.py
+++ b/agent/src/live/classification.py
@@ -5,7 +5,7 @@ runtime from a server we do not control and are invite-gated, so classification
must be driven by discovery data plus a maintainer-curated map, never a blind
hardcoded name match that silently lets an unrecognized tool through. Every
discovered tool resolves to exactly one of three classes via a strict
-precedence ladder (see ``docs/live-trading/SPEC.md`` §7.2):
+precedence ladder (see the live-trading SPEC §7.2):
Tier 1 — MCP tool ``annotations`` (advisory, server-asserted):
* ``readOnlyHint is True`` → READ
diff --git a/agent/src/live/mandate/__init__.py b/agent/src/live/mandate/__init__.py
index 200d93347..6d6cf99b4 100644
--- a/agent/src/live/mandate/__init__.py
+++ b/agent/src/live/mandate/__init__.py
@@ -5,5 +5,5 @@ The mandate is the user-defined safety boundary: quantitative hard caps
(:class:`~src.live.mandate.model.UniverseConstraint`) plus consent provenance
(:class:`~src.live.mandate.model.ConsentMeta`). It is loaded read-only at boot
by :func:`src.live.mandate.store.load_mandate`; there is no agent-reachable
-write path (see ``docs/live-trading/SPEC.md`` §3 trust invariant).
+write path (see the live-trading SPEC §3 trust invariant).
"""
diff --git a/agent/src/live/mandate/commit.py b/agent/src/live/mandate/commit.py
index 838eb7127..a31c6dec8 100644
--- a/agent/src/live/mandate/commit.py
+++ b/agent/src/live/mandate/commit.py
@@ -7,7 +7,7 @@ is a plain function the API surface (``POST /mandate/commit``) calls when a user
picks a profile. The agent loop has no reference to :func:`commit_mandate`, so
even a compromised/hallucinating model cannot self-authorize a mandate — the
only code path that writes one requires the surface-originated ``consent_ack``
-the model never produces (see ``docs/live-trading/SPEC.md`` §3 trust invariant,
+the model never produces (see the live-trading SPEC §3 trust invariant,
Consent §1, Mandate §2). This is the 命门 invariant: a structural guarantee,
not a prompt-level one.
diff --git a/agent/src/live/mandate/model.py b/agent/src/live/mandate/model.py
index fc0a4dce1..f9eed80a8 100644
--- a/agent/src/live/mandate/model.py
+++ b/agent/src/live/mandate/model.py
@@ -3,7 +3,7 @@
Frozen dataclasses (no Pydantic): the mandate is read once at boot and never
mutated, so plain frozen dataclasses give the strongest immutability guarantee
with zero validation surface the agent could exploit. See
-``docs/live-trading/SPEC.md`` Mandate §1.
+the live-trading SPEC, Mandate §1.
"""
from __future__ import annotations
diff --git a/agent/src/live/mandate/store.py b/agent/src/live/mandate/store.py
index 9c354e5be..cc0fb05c5 100644
--- a/agent/src/live/mandate/store.py
+++ b/agent/src/live/mandate/store.py
@@ -8,7 +8,7 @@ separate parcel), which is not reachable from ``loop.py`` / ``worker.py`` /
any ``BaseTool.execute()``. This mirrors the #142 swarm-config trust template:
the protected file is resolved at boot from a fixed user-side path, never from
caller input, agent tool args, or session ``variables`` (see
-``docs/live-trading/SPEC.md`` §3 trust invariant, Mandate §2).
+the live-trading SPEC §3 trust invariant, Mandate §2).
Loading is fail-closed: a missing file, malformed JSON, or a structurally
invalid record yields ``None`` so the enforcement gate (P5) denies all orders
diff --git a/agent/src/live/paths.py b/agent/src/live/paths.py
index d0ccac189..f2c780b82 100644
--- a/agent/src/live/paths.py
+++ b/agent/src/live/paths.py
@@ -4,7 +4,7 @@ All live-channel state is rooted at ``<runtime_root>/live`` (where
``runtime_root`` defaults to ``~/.vibe-trading``, the same root the swarm
config and persistent memory resolve, via :func:`src.config.paths.get_runtime_root`).
-Layout (see ``docs/live-trading/SPEC.md`` §2)::
+Layout (see the live-trading SPEC §2)::
<runtime_root>/live/robinhood/oauth/ # OAuth token cache (0700/0600)
<runtime_root>/live/robinhood/mandate.json # committed mandate (0600)
diff --git a/agent/src/live/runtime/runner.py b/agent/src/live/runtime/runner.py
index c558178aa..b7611c45b 100644
--- a/agent/src/live/runtime/runner.py
+++ b/agent/src/live/runtime/runner.py
@@ -30,7 +30,7 @@ Trust + safety invariants honored here:
Every external dependency — scheduler, triggers, reconcile, the agent caller and
the clock — is injectable, so the runner is unit-testable with no live agent or
-broker. See ``docs/live-trading/SPEC.md`` §7.5.
+broker. See the live-trading SPEC §7.5.
"""
from __future__ import annotations
diff --git a/agent/src/tools/propose_mandate_tool.py b/agent/src/tools/propose_mandate_tool.py
index f21574caa..fcccb5f75 100644
--- a/agent/src/tools/propose_mandate_tool.py
+++ b/agent/src/tools/propose_mandate_tool.py
@@ -12,7 +12,7 @@ never a mandate. Persisting a proposal grants zero trading authority — only th
surface-side :func:`src.live.mandate.commit.commit_mandate` (unreachable from the
agent loop) writes a mandate, and only after re-validating the selected profile
still fits the ceilings the user saw. This is the structural "agent proposes,
-user disposes" guarantee (``docs/live-trading/SPEC.md`` §3, Consent §1).
+user disposes" guarantee (live-trading SPEC §3, Consent §1).
"""
from __future__ import annotations
diff --git a/agent/tests/test_consent_commit.py b/agent/tests/test_consent_commit.py
index fdebdcdd7..de81f157c 100644
--- a/agent/tests/test_consent_commit.py
+++ b/agent/tests/test_consent_commit.py
@@ -1,6 +1,6 @@
"""Consent backend: propose -> select -> commit state machine + invariants.
-Covers (docs/live-trading/SPEC.md Consent §1/§3, Mandate §2):
+Covers (live-trading SPEC, Consent §1/§3, Mandate §2):
* PROPOSE -> SELECT -> COMMIT happy path, then the mandate loads back.
* commit-is-the-only-write: an AST + registry scan proves no agent tool / tool