This repository is an operating manual for AI-assisted development of the Trading Agent v1.0 project.
It uses three abstract roles:
- Brain Agent — reasoning, planning, repository edits, code fixes, PR control, review, and merge recommendation.
- Validation Runner — optional command execution and factual reporting when direct checks are unavailable.
- User — owner and final authority.
Policy must stay role-based and must not depend on specific product or runner names.
- User requests a phase, fix, or review.
- Brain Agent identifies source-of-truth evidence.
- Brain Agent prepares scoped changes.
- Brain Agent edits files and controls the PR when tools allow.
- Brain Agent runs available checks directly when tools allow.
- If command evidence is needed elsewhere, Brain Agent gives exact commands to the Validation Runner.
- Validation Runner returns factual command results.
- Brain Agent reviews diff, CI, logs, and evidence.
- If fixes are needed, Brain Agent owns fix commits in the same branch.
- Brain Agent gives approve / request changes / block and a merge recommendation.
- User makes the final decision.
The Brain Agent performs all available work itself when tools allow.
The Validation Runner is optional and command-only.
Before opening, updating, or approving Python PRs, account for:
- import sorting;
- unused imports;
- formatting drift;
- ruff compatibility;
- mypy impact;
- relevant pytest impact.
If CI fails on import sorting or another mechanical Python quality issue, Brain Agent owns the fix commit in the same branch and re-checks CI evidence before merge recommendation.
Package B adds manual-only surfaces for controlled self-improvement, regression witnesses, permission claims, review confidence scoring, skill quality review, and Validation Runner report format.
Package B does not add runtime machinery, dependencies, or background automation.