Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
efbf766
new skill from original docs
VladKochetov007 Mar 15, 2026
abf9227
updating the skill
VladKochetov007 Mar 15, 2026
a743a5e
submodule docs
VladKochetov007 Mar 15, 2026
40ac0c0
rust notes
VladKochetov007 Mar 15, 2026
1a7a294
not works properly
VladKochetov007 Mar 16, 2026
e0b9e4c
env ignore
VladKochetov007 Mar 16, 2026
f7de209
skill.md
VladKochetov007 Mar 16, 2026
e40594f
fix: address PR #40 review on nautilus-v2
VladKochetov007 Mar 16, 2026
d581265
feat: add state persistence, metrics, indicators, data pipeline to ba…
VladKochetov007 Mar 17, 2026
5fc99c6
fix: rename vpin_rust to my_trading_system in REBUILD.md
VladKochetov007 Mar 17, 2026
fdbef4a
update upstream + architecture must read
VladKochetov007 Mar 18, 2026
b6219f2
loading docs at install
VladKochetov007 Mar 18, 2026
10e28a6
install sh
VladKochetov007 Mar 18, 2026
ce542d6
original deevs link
VladKochetov007 Mar 18, 2026
18e1920
readme install guide
VladKochetov007 Mar 18, 2026
6cfda22
install repo only if needed
VladKochetov007 Mar 20, 2026
07bf2af
Merge branch 'main' into nautilus-v2
VladKochetov007 Mar 20, 2026
1eb03a5
doc installation first
VladKochetov007 Mar 21, 2026
9113f28
user level skills -> marketplace (definitely need changes)
VladKochetov007 Mar 21, 2026
29cfa4e
resolved merge main
VladKochetov007 Mar 21, 2026
4ac0eff
local plugin installation
VladKochetov007 Mar 21, 2026
ab0d143
no unnecessary scripts
VladKochetov007 Mar 21, 2026
4fcd0e7
fix: add unsubscribe in on_stop and complete Rust Strategy example
VladKochetov007 Mar 23, 2026
3982027
docs: add debugging playbook from live loader session lessons
VladKochetov007 Mar 24, 2026
d148b7d
docs: replace blanket "NEVER modify" with extension decision tree
VladKochetov007 Mar 25, 2026
89ea355
vibe shit. todo:mv+debug+remove
VladKochetov007 Apr 2, 2026
e7c6af4
chore: drop nautilus-verify test suite
VladKochetov007 Apr 7, 2026
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
6 changes: 6 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@
"description": "Hierarchical microstructure knowledge base for trading venues: exchange mechanics, order books, auctions, Reg NMS, Chinese futures (CTP), feed handlers, execution models",
"source": "./venue-expert",
"skills": ["./"]
},
{
"name": "nautilus-docs",
"description": "Official NautilusTrader documentation — concepts, API reference, integration guides, tutorials",
"source": "./nautilus-docs",
"skills": ["./"]
}
]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.claude/
.tmp/
.env
nautilus-docs/references/docs/
__pycache__/
60 changes: 34 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,29 @@ Deevs' plugin marketplace for Claude Code with workflow chains, terminal control

## Installation

Use the installer for all platforms (Claude Code, Codex, or both). Interactive by default:

```bash
/plugin marketplace add git@github.com:DeevsDeevs/agent-system.git
curl -fsSL https://raw.githubusercontent.com/DeevsDeevs/agent-system/main/scripts/install.sh \
| bash -s --
```

## Codex Setup

Codex loads repo-scoped skills from `.agents/skills`. This repo includes `.agents/skills` symlinks to each skill folder.
For backward compatibility, `.codex/skills` symlinks are also kept.
The installer clones the repo, fetches any external dependencies (e.g. NautilusTrader docs — only when the nautilus-docs skill is selected), and sets everything up.

Codex multi-agent role config for all personas is included in:
- `.codex/config.toml`
- `.codex/agents/*.toml`

Usage:
- Invoke a skill with `$skill-name` or `/skills`.
- For chain operations: `$chain-system link <name>`, `$chain-system load <name>`, `$chain-system list`.
- For persona workflows: `$dev-experts <persona>`, `$bug-hunters <role>`, `$alpha-squad <role>`, `$mft-research-experts <role>`.

If Codex was already running, restart it to reload the skills.

Global (user-scoped) install for any repo:
### Non-interactive

```bash
# Claude Code — all skills
curl -fsSL https://raw.githubusercontent.com/DeevsDeevs/agent-system/main/scripts/install.sh \
| bash -s -- --non-interactive --platform claude

# Codex — all skills
curl -fsSL https://raw.githubusercontent.com/DeevsDeevs/agent-system/main/scripts/install.sh \
| bash -s -- --non-interactive --platform codex

# Both platforms
curl -fsSL https://raw.githubusercontent.com/DeevsDeevs/agent-system/main/scripts/install.sh \
| bash -s -- --non-interactive --platform both
```

Install selected skills only:
Expand All @@ -38,20 +36,30 @@ curl -fsSL https://raw.githubusercontent.com/DeevsDeevs/agent-system/main/script
| bash -s -- --non-interactive --platform codex --skills dev-experts,bug-hunters
```

Installer (interactive by default):
### Flags

| Flag | Description |
|------|-------------|
| `--platform claude\|codex\|both` | Target platform |
| `--skills a,b,c` | Install only these skills (default: all, codex only) |
| `--repo-ref <tag\|branch\|commit>` | Checkout specific ref |
| `--repo <url>` | Custom repo URL |
| `--clone-dir <path>` | Where to clone (default: `~/src/agent-system`) |
| `--target <path>` | Codex skills dir (default: `~/.codex/skills`) |
| `--mode symlink\|copy` | Install mode (default: symlink) |
| `--non-interactive` | Skip prompts |
| `--uninstall` | Remove installed skills |

### Uninstall

```bash
curl -fsSL https://raw.githubusercontent.com/DeevsDeevs/agent-system/main/scripts/install.sh \\
| bash -s --
curl -fsSL https://raw.githubusercontent.com/DeevsDeevs/agent-system/main/scripts/install.sh \
| bash -s -- --uninstall --platform both
```

Installer flags: `--non-interactive`, `--platform claude|codex|both`, `--repo-ref <tag|branch|commit>`, `--uninstall`, `--skills a,b,c`.

Uninstall:
- Codex: run the installer with `--uninstall`.
- Claude Code: use `/plugin uninstall <plugin>@deevs-agent-system` inside Claude Code.
### Codex usage

Install a single skill by URL with `$skill-installer`.
Invoke a skill with `$skill-name` or `/skills`. If Codex was already running, restart it to reload skills.

## Plugins

Expand Down
286 changes: 286 additions & 0 deletions nautilus-docs/SKILL.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions nautilus-docs/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "NautilusDocs"
short_description: "NautilusTrader library expert knowledge"
default_prompt: "Use $nautilus-docs to design/implement or fix trading systems with NautilusTrader."
233 changes: 233 additions & 0 deletions nautilus-docs/references/REBUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
# Rebuilding the nautilus-docs Skill

Prompt and checklist for regenerating SKILL.md when NautilusTrader's API changes.

## When to Rebuild

- NautilusTrader version bump (check `nautilus_trader.__version__` or workspace `Cargo.toml`)
- New adapter added or removed
- Rust crate renamed, split, or merged
- Breaking API changes (trait signatures, config structs, builder patterns)
- New docs added to the official `docs/` folder

## Step 1: Update the Docs

Docs are fetched on install into `nautilus-docs/references/docs/` (gitignored). To refresh:

```bash
rm -rf nautilus-docs/references/docs
# Re-run install.sh or manually:
temp=$(mktemp -d)
git clone --filter=blob:none --sparse --depth 1 \
https://github.com/nautechsystems/nautilus_trader.git "$temp"
git -C "$temp" sparse-checkout set docs/
mv "$temp/docs" nautilus-docs/references/docs
rm -rf "$temp"
```

Check for:
- New files (new concepts, new adapters, new tutorials)
- Removed files (deprecated features)
- Changed files (API changes, renamed types)

## Step 2: Rebuild the Doc Navigator

For every new `.md` or `.py` file in `docs/`, add a row to the appropriate navigator table in SKILL.md (Concepts, Venue Integrations, Dev/Setup, or Tutorials).

For removed files, delete the row. For renamed files, update the path.

## Step 3: Rebuild the Rust Crate Map

The crate map is the most fragile part — it breaks on every workspace restructure.

**Source of truth**: The workspace `Cargo.toml` at the root of the nautilus_trader repo.

```bash
# After pulling the latest nautilus_trader git dep:
CHECKOUT=$(find ~/.cargo/git/checkouts/nautilus_trader-* -maxdepth 1 -type d | sort | tail -1)

# List all crate package names
find "$CHECKOUT/crates" -name "Cargo.toml" -maxdepth 3 -exec grep -H '^name' {} \;

# List all adapter crates
ls "$CHECKOUT/crates/adapters/"

# Check MSRV
grep 'rust-version' "$CHECKOUT/Cargo.toml"
```

For each crate, verify:
- Package name matches SKILL.md crate map
- Key re-exports haven't moved (especially `DataActor`, `Strategy`, `InstrumentId`)
- Feature flags still work as documented

**Critical re-exports to verify**:

```bash
# DataActor location
grep -r "pub use.*DataActor" "$CHECKOUT/crates/common/src/"

# Strategy location
grep -r "pub use.*Strategy" "$CHECKOUT/crates/trading/src/"

# InstrumentId location
grep -r "pub struct InstrumentId" "$CHECKOUT/crates/model/src/"

# LiveNode builder
grep -r "pub fn builder" "$CHECKOUT/crates/live/src/"

# BinanceDataClientConfig fields
grep -A 20 "pub struct BinanceDataClientConfig" "$CHECKOUT/crates/adapters/binance/src/config.rs"
```

## Step 4: Rebuild Anti-Hallucination Tables

This is the highest-value part of the skill. Each row prevents a specific mistake Claude makes repeatedly.

**How to maintain**:

1. **Test existing rows** — for each hallucination, verify the "Reality" column is still correct:
```python
# Python hallucinations — test in a venv with nautilus_trader installed
from nautilus_trader.common.actor import Actor # still correct?
from nautilus_trader.indicators import ExponentialMovingAverage # still correct?
```

2. **Discover new hallucinations** — ask Claude to write code for common tasks WITHOUT the skill, then diff against what actually compiles/runs. Common sources:
- New config struct fields that Claude will guess wrong
- Renamed enums or moved types
- Changed method signatures (added/removed args)
- New features that Claude will confuse with old patterns

3. **Remove stale rows** — if a hallucinated API now exists (e.g., a missing method was added), remove the row.

4. **Rust hallucinations** — rebuild by attempting to compile a standalone binary:
```bash
cd my_trading_system && cargo build 2>&1 | grep "error\[E"
```
Every compilation error that comes from a wrong import path, missing trait, or wrong struct field is a hallucination row candidate.

## Step 5: Verify Working Patterns

The DataActor pattern and LiveNode wiring in SKILL.md must compile. Test:

```bash
cd my_trading_system && cargo build --release 2>&1
```

If it fails, the Rust section needs updating. Common breakage:
- `DataActor` trait method signatures changed
- `LiveNode::builder()` API changed
- `BinanceDataClientConfig` fields renamed
- New required fields added to configs (no more `..Default::default()`)

---

## Fundamental Questions the Skill Must Always Answer

These are the enduring questions any trading infrastructure user will ask. The skill must provide correct answers for ALL of these regardless of API version. If a section doesn't cover one, it's a gap.

### Data Ingestion
- How do I subscribe to trades, quotes, order book, bars?
- What's the difference between INTERNAL and EXTERNAL bars?
- How do I handle custom data types?
- What happens when I subscribe to data that doesn't exist? (silent failure)
- How does the DataEngine buffer and dispatch data?

### Order Lifecycle
- How do I submit, modify, cancel orders?
- What order types are available? (Market, Limit, StopMarket, StopLimit, TrailingStop)
- How do bracket orders work?
- What happens when modify_order isn't supported by the venue?
- How do I track order state changes? (callbacks: on_order_accepted, on_order_filled, etc.)

### Position Management
- How do I query open positions?
- NETTING vs HEDGING — when to use which?
- How do I compute unrealized PnL?
- How does signed_qty work? (float, not Decimal)

### Instrument Discovery
- How do I load instruments? (load_ids is REQUIRED)
- What's the InstrumentId format? ("SYMBOL.VENUE")
- What instrument types exist?
- How do venue-specific instrument IDs map?

### Actor / Strategy Architecture
- When to use Actor vs Strategy?
- What's the component lifecycle FSM?
- How do I publish/subscribe signals between actors?
- How do timers and alerts work?
- What's the correct on_start() ordering? (cache instrument → register indicators → subscribe)

### Backtesting
- How do I set up a BacktestEngine?
- How do I load historical data? (wranglers, catalog)
- How does the FillModel work?
- What's the difference between BacktestEngine (low-level) and BacktestRunConfig (high-level)?

### Live Deployment
- How do I configure a TradingNode (Python) / LiveNode (Rust)?
- What are the adapter config patterns for each venue?
- How do I handle shutdown gracefully?
- What are the expected warnings/errors at startup and shutdown?

### Venue Connectivity
- Which adapters exist and what markets do they support?
- What data subscriptions does each adapter support?
- What execution features does each adapter support? (modify_order, etc.)
- How do API keys and authentication work per venue?

### Rust-Specific
- Which crates do I need for my use case?
- How do I implement DataActor / Strategy traits?
- How do I build a standalone binary outside the workspace?
- What are the correct import paths? (nautilus_model vs nautilus_core)
- How does LiveNode builder work?
- What feature flags do I need?

### Performance & Operations
- Why must callbacks return fast? (single-threaded event loop)
- How do I avoid blocking the event loop?
- How do I use the clock for scheduling?
- What logging/monitoring is available?
- How do I handle degraded/faulted states?

---

## Meta-Prompt for Full Rebuild

Use this prompt to have Claude regenerate the entire SKILL.md from scratch:

```
You are rebuilding the nautilus-docs skill for NautilusTrader.

The official docs are in docs/ (read the full directory tree).
The current SKILL.md is your starting point — keep the structure but update all content.

Steps:
1. Read every file in docs/concepts/, docs/integrations/, docs/developer_guide/, docs/tutorials/, docs/getting_started/
2. Build the Doc Navigator tables from the actual files present
3. Check the Rust workspace Cargo.toml for current crate names and versions
4. Verify all anti-hallucination table entries by checking actual source code:
- For Python: test imports in the installed nautilus_trader package
- For Rust: check actual struct/trait definitions in the crate source
5. Update the Rust crate map from workspace members
6. Update the DataActor pattern and LiveNode wiring from actual working examples
7. Test that the Rust example compiles: cd my_trading_system && cargo build
8. Verify word count is under 2,000

For anti-hallucination entries, try to write code for each of the "Fundamental Questions"
listed in REBUILD.md WITHOUT looking at the skill, then compare what you generated
against what actually works. Every mistake you made is a hallucination row.

The skill must be self-sufficient — a user should be able to write correct
NautilusTrader code (Python or Rust) using ONLY this skill, without deepwiki or
context7. If they can't, the skill has gaps.
```

## Versioning

After rebuild, update the `<!-- verified: vX.Y.Z -->` comment in SKILL.md hallucination tables.

Track what version the anti-hallucination table was last verified against. Stale tables are worse than no table — they give false confidence.
Loading