1.1 KiB
1.1 KiB
TradeScript AGENTS
Architecture overview
- Core language: Python-based DSL with a canonical IR (PortfolioObject, ObjectiveGraph, ConstraintGraph, PlanDelta)
- Parser: Lightweight DSL parser to populate the IR
- Rewrite engine: Verifiable rewrites that attach per-step proofs (hash-based attestations)
- Backends: Python simulator as MVP; placeholder for C++/CUDA backtester and live broker adapters
- Graph-of-Contracts (GoC) marketplace: adapter registry and conformance scaffolding
Tech stack
- Language: Python 3.11+
- Data: dataclasses for IR, JSON for serialization, SHA-256 for proofs
- Testing: pytest (via test.sh)
- Packaging: pyproject.toml with setuptools build
How to run tests
- ./test.sh
Code organization rules
- Minimal changes first: small, correct patches with clear intent
- Tests drive design: write unit tests that exercise the parser, IR, and backends
- Do not push to remote without explicit user instruction
Conventions
- All public modules reside under src/idea117_tradescript_a_verifiable
- The AGENTS.md is designed to guide future AI agents inheriting this repo