Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .claude/commands/invest-retro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# /invest-retro

Outcome-grounded retrospective — the learning loop. Reads trajectory records (thesis→action→outcome→lesson), scores decisions against realized outcomes, and distills lessons into per-agent `calibration_notes` in `engine/agents/catalog.json`.

## Usage

```
/invest-retro [--since YYYY-WW] [--thesis <slug>]
```

## Contract

Load `verticals/investment-intelligence/SKILL.md` and execute `verticals/investment-intelligence/engine/commands/retrospective.md` under it:

- R5 non-advisory clause opens the output.
- Every acted-on recommendation since the last retro must have a trajectory record (`engine/schemas/trajectory.schema.json`) — missing records are flagged as pipeline drift (SOUL test 4).
- Lessons update agent calibration notes; systemic lessons propose skill/command edits as diffs for human review (never silent self-modification).
- Cross-check the trade-gate audit JSONL: every executed order must trace to an approved intent. Discrepancy = escalate, do not rationalize.

**Built on SIP** — invest-retro wrapper · v0.1
20 changes: 20 additions & 0 deletions .claude/commands/invest-snapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# /invest-snapshot

Compose the cross-asset portfolio snapshot — ground truth before any decision. Reads (as available): Ghostfolio API (T0), DPI ledger state (`/wealth-dpi`), operator instance data (private, aggregate-only off-T0), Crypto IS House of Allocation outputs.

## Usage

```
/invest-snapshot [--aggregate] # --aggregate is forced automatically off-T0
```

## Contract

Load `verticals/investment-intelligence/SKILL.md` and execute `verticals/investment-intelligence/engine/commands/portfolio-snapshot.md` under it:

- R5 non-advisory clause opens the output.
- Output validates against `engine/schemas/portfolio-snapshot.schema.json`.
- **Data classification enforced:** real balances/positions are T0-only per `ROUTING.md`. On T1/T2 models, emit percentage weights and band-labels, never raw amounts.
- A snapshot is not a strategy session — no recommendations from this command.

**Built on SIP** — invest-snapshot wrapper · v0.1
21 changes: 21 additions & 0 deletions .claude/commands/invest-strategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# /invest-strategy

Run the Investment Intelligence weekly strategy session — the full pipeline (blind-parallel analysis → debate → risk gate → synthesis) producing a draft session document for human verdict. Namespaced `invest-*` to avoid collision with operator-instance commands.

## Usage

```
/invest-strategy [--week YYYY-WW] [--mode weekly|rebalance]
```

## Contract

Load `verticals/investment-intelligence/SKILL.md` (vertical-tier rules fire) and execute `verticals/investment-intelligence/engine/commands/weekly-strategy.md` under them:

- R5 non-advisory clause opens the output. Non-waivable.
- Pipeline order structural: analysis agents run blind-parallel per `engine/agents/catalog.json`; risk vetoes size, never direction; only the portfolio-manager emits TradeIntents.
- Any non-DCA TradeIntent terminates as a pending-approval object via the trade-gate MCP (`mcp/trade-gate/`) — never a fabricated fill.
- Real balances/positions are T0 data per `ROUTING.md`: on non-local models, work from aggregates.
- Session artifact validates against `engine/schemas/strategy-session.schema.json`; acted-on recommendations get trajectory records.

**Built on SIP** — invest-strategy wrapper · v0.1
20 changes: 20 additions & 0 deletions .claude/commands/invest-thesis-debate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# /invest-thesis-debate

Bull/bear adversarial debate on a single investment thesis (TradingAgents-pattern, provenance: `verticals/investment-intelligence/docs/absorption/tradingagents.md`). Pressure-test before any new position thesis enters the portfolio.

## Usage

```
/invest-thesis-debate <thesis-slug or free-text thesis>
```

## Contract

Load `verticals/investment-intelligence/SKILL.md` and execute `verticals/investment-intelligence/engine/commands/thesis-debate.md` under it:

- R5 non-advisory clause opens the output.
- Bull and bear cases argued from independently-formed analysis-layer stances (blind-parallel first, collide second).
- Verdict is a thesis-quality assessment (validated against `engine/schemas/thesis.schema.json`), never a buy/sell instruction.
- Optional persona overlays (value/contrarian/quality lenses per `AGENTS.md` § persona overlays) increase debate diversity; they never bypass the risk layer.

**Built on SIP** — invest-thesis-debate wrapper · v0.1
61 changes: 61 additions & 0 deletions .claude/commands/siswarm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# /siswarm — Investment-intelligence council (Sonnet + Opus swarm)

Run the 10-agent investment-intelligence council locally, with per-agent model
routing threaded from `verticals/investment-intelligence/engine/agents/catalog.json`.
This is the executable counterpart to the `/si`//`/so` CLI-lane routers: `/si`
decides *which* CLI to use; `/siswarm` actually *runs* a Sonnet+Opus council.

## Usage

```
starlight swarm run "<operator context>" # dry-run plan (default)
starlight swarm run "<operator context>" --live # execute via headless claude
starlight swarm run "<context>" --live --only technical # single-agent cheap demo
starlight swarm run "<context>" --live --concurrency 3 --timeout 240000
```

Dry-run prints the compiled plan (agent · layer · model · prompt size) and passes
**no model to any CLI**. `--live` executes.

## The three phases (from the catalog handoff protocol)

| Phase | Agents | Models | Prompt sees |
|---|---|---|---|
| 1 — analysis (blind-parallel) | macro-risk · crypto-dca · defi-yield · fundamentals · technical | Sonnet ×4, **Haiku** (technical) | operator context only — **no peer output** |
| 2 — risk | risk-manager · tax-optimizer · regulatory-risk | Sonnet ×3 | context + the full analysis digest |
| 3 — synthesis | portfolio-manager · chief-of-staff | **Opus** (PM), Sonnet | context + the full debate (analysis + risk) |

The `researcher` (cross-cutting) is excluded from v1 — it is a lookup helper, not
a debate seat. Risk agents run parallel *within* phase 2 (each only needs the
analysis output, not each other's) — an intentional refinement over the catalog's
`step_2_sequential`.

## How the model split works

The runner (`src/swarm.ts::defaultClaudeRunner`) spawns `claude -p <prompt> --model <id>`.
Each task's `model` is the agent's `recommended_model` from the catalog, so
analysis/risk run Sonnet-class, `technical` runs Haiku, and `portfolio-manager`
runs Opus. Override the binary with `STARLIGHT_CLAUDE_BIN`.

## Boundary (non-negotiable)

The council produces **analysis + a pending decision brief** — nothing else. Every
prompt carries the R5 non-advisory clause and the no-execution line
(`tools_denied` includes `execution-platforms` + `credential-stores`). **Trades
execute only through the local trade-gate MCP** (`verticals/investment-intelligence/mcp/trade-gate`)
**with a human approval token.** The swarm has no path to a broker.

## Audit

Each `--live` run appends a JSONL record (context, timestamps, per-phase agent
pass/fail) to `private/voice-operator/logs/swarm-council.jsonl` next to the
existing swarm audit log.

## Hosted twin

The same catalog drives the Vercel-hosted council on frankx.ai
(`/admin/swarm` + `app/api/swarm/run` via the Vercel AI Gateway) — that surface
also emits pending decisions only. See `docs/architecture/sis-swarm-hosted.md`
in the FrankX repo.

**Built on SIP** — /siswarm · investment-intelligence council · v0.1
16 changes: 16 additions & 0 deletions REGISTRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,22 @@ attestation: built_on_sip
- **requires:** none
- **license:** MIT

### trade-gate-mcp
- **sip_version:** 1.1.1
- **owner:** Frank Riemer / Starlight Holding BV
- **status:** active (v0.1 — paper broker only; live adapters NOT_WIRED by design)
- **repo:** `frankxai/Starlight-Intelligence-System` (`verticals/investment-intelligence/mcp/trade-gate/`)
- **endpoint:** stdio (local)
- **provides:**
- `propose_trade` — TradeIntent in → verdict: auto-approved (DCA whitelist, capped) | pending-approval | rejected
- `request_approval` — human issues a single-use approval token for a pending intent
- `list_pending` — pending-approval queue
- `execute_approved` — approved intent → broker adapter (paper default; live throws NOT_WIRED in-repo)
- `read_audit` — append-only JSONL audit trail
- **requires:** none (broker MCPs — Alpaca / IBKR / Coinbase — are operator-wired downstream, never bundled)
- **license:** MIT
- **note:** Fail-closed by doctrine and by test (`e2e.test.ts` red case: live execute without approval must throw). Every tool output carries the R5 non-advisory footer. Pattern lineage: `payment-intelligence-system/mcp`. Board record: `docs/boards/2026-07-02-investment-intelligence-vertical-spawn.md`.

## Claw Registry

SIS Claws are installable operational units built on this substrate. Each Claw declares its permission surface, skill requirements, and MCP dependencies in a `CLAW.md` contract.
Expand Down
16 changes: 15 additions & 1 deletion VERTICALS.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Domain sub-stacks are forkable reference verticals. Unlike the sovereign vertica
- **Class:** sovereign domain sub-stack (reference vertical) — third reference, validates the **Houses-as-sub-systems** decomposition primitive AND first composition-instance under Wealth IS composition layer (per `STACK.md` § Composition Layer, declared 2026-05-17).
- **Domain:** Cryptocurrency practiced as the architecture of sovereignty + protocol-mechanism literacy + cycle-position pattern recognition. Six Houses (On-Chain · Macro · DeFi · Sovereignty · Research · Allocation) decomposed as archetypal stances.
- **Owner:** open reference (forkable by sovereign crypto practitioners). Composes under Wealth IS as first reference instance of Composition Layer substrate primitive.
- **Status:** `v0.1 proof-of-pattern House of On-Chain scaffolded (5 commands + agent + skill + knowledge); 5 Houses gated on v0.1-proof-pass per Board R4 close-out`. Investment IS held until proof-pass.
- **Status:** `v0.2 full scaffold — all 6 Houses shipped` (R4 proof-of-pattern passed via House of On-Chain). Investment IS gate released — spawned 2026-07-02, see § Investment Intelligence below.
- **Primary repo:** `verticals/crypto-intelligence/` in `frankxai/Starlight-Intelligence-System` (v0.2+ extraction target: `github.com/frankxai/crypto-intelligence-system` per Board open-question (c) export-hook landed via vertical-local ATTESTATIONS.md + MCP-shape in SKILL.md).
- **Houses (v0.1):** `onchain` (scaffolded). **Houses (v0.2 gated):** `macro` · `defi` · `sov` · `res` · `alloc`.
- **Canon:** declines (canon-free per substrate register).
Expand All @@ -207,6 +207,20 @@ Domain sub-stacks are forkable reference verticals. Unlike the sovereign vertica
- **Board verdict:** REVISE close-out 2026-05-17 — `docs/boards/2026-05-17-crypto-investment-spawn.md` (5 items closed same-session per v7.5.1 recovery precedent).
- **Genius prerequisite gate:** CLOSED via `genius/profile-frankx.md` + `genius/freedom-path-frankx.md` (Path A in-repo corpus excavation, 2026-05-17).

### Investment Intelligence
- **Class:** sovereign domain sub-stack (reference vertical) — sibling of Crypto Intelligence under the Wealth IS ACL manifest (Wealth collapsed to ACL-only per 2026-06-16 falsifier default, recorded `docs/boards/2026-07-02-investment-intelligence-vertical-spawn.md`).
- **Domain:** Cross-asset capital allocation practiced as system, not impulse — research → debate → risk-gate → recommend → human-approve → execute (paper-first) → learn, across stocks/ETFs/crypto/DeFi + time/labor allocation via DPI framing.
- **Owner:** open reference (forkable by sovereign operators). Engine promoted (copied, not moved) from the private IIS operator instance — proven material, not fresh scaffold.
- **Status:** `v0.1 — engine promoted (11-agent catalog · 5 schemas · 4 commands · 3 adapters · 2 sanitized archetypes), trade-gate MCP shipped + tested; runtime tiers 1-2 gated on operator wiring per RUNBOOK.md`.
- **Primary repo:** `verticals/investment-intelligence/` in `frankxai/Starlight-Intelligence-System` (extraction target: `github.com/frankxai/investment-intelligence-system` per Board open-question (c) export-hook pattern — extraction is a copy, not a refactor).
- **Layers:** `analysis` (5 agents, blind-parallel) · `risk` (3 agents, veto-on-size-not-direction) · `synthesis` (portfolio-manager Opus + chief-of-staff) · cross-cutting `researcher`.
- **Canon:** declines (canon-free per substrate register); composes SIP + payment-intelligence-system doctrine (pattern-level).
- **Compounds:** trajectory ReasoningBank (thesis→action→outcome→lesson) + per-agent calibration + practitioners forking + attestation graph.
- **SIP commands:** `/invest-strategy` · `/invest-thesis-debate` · `/invest-snapshot` · `/invest-retro` (daily-5 completed by `/wealth-dpi`, R2 discipline declared at spawn).
- **MCP:** `mcp/trade-gate/` — fail-closed approve/execute (propose_trade · request_approval · list_pending · execute_approved · read_audit); paper-broker default, live adapters NOT_WIRED stubs, human token above DCA whitelist.
- **Non-waivable:** R5 non-advisory clause inline on every artifact; no broker credentials in repo; paper-first ladder; trajectory write-back.
- **Board verdict:** PROCEED — `docs/boards/2026-07-02-investment-intelligence-vertical-spawn.md`.

---

## Registry rules
Expand Down
Loading