AGENTS
Scope
These instructions apply to all work inside NewTradingSystem.
Core Rule
The code, the docs, and the migration status must tell the same story.
If code changes but the docs still describe the old behavior, the work is incomplete.
Documentation Freshness Contract
When a change affects architecture, runtime behavior, strategy behavior, broker support, operator workflow, or current project status, update the matching documentation in the same change:
README.mdfor entrypoints, commands, and top-level capabilitiesdocs/current-state.mdfor what is real today versus not implemented yetdocs/legacy-inventory.mdfor the concrete extraction and discard mapdocs/legacy-extraction-portal.htmlfor the human-friendly published architecture and migration viewdocs/documentation-freshness-contract.mdfor the documentation process itself if the process changestasks/master-roadmap.mdfor status and backlog movement- any relevant plan under
docs/plans/
Do not claim a feature is shipped if these documents still describe the previous state.
Legacy Extraction Rules
Every imported asset from the legacy trading repo must be classified before implementation:
extract: preserve the behavior with minimal translationredesign: keep the idea but rebuild it against the new platform boundariesreference-only: keep it as historical input, not runtime codediscard: do not port it
Do not copy legacy workflows, data dumps, ad hoc scripts, or file-based state blindly.
Runtime State
- Keep
.env*,var/, generated dashboard data, and any local runtime state out of git. - Keep paper-only as the default unless an explicit task says otherwise.
- Do not let strategies talk directly to broker APIs.
Verification Rule
Before closing a task, verify the thing that changed:
- code changes: run tests and the relevant runtime command
- docs changes: check links, structure, and rendered HTML when applicable
- migration status changes: confirm they match the codebase truth