The standard playbook.
Either pick an existing sub-issue under an epic (#78–#81) or create one using the Feature Request template. Link the parent epic.
Do not start coding without an issue. Agents that work without a tracked issue make changes that slip through review.
git fetch origin main
git switch -c feature/<short-name> origin/main
Always branch from origin/main. Never branch from another PR's branch or a
worktree-agent-* branch. Branching from a feature branch silently includes that
branch's commits in your PR and can cause ghost merges. On 2026-04-25 (incident
PR with dep-bump commits. The CI job base_branch_lint in ci-pr.yml will block
your PR if contamination is detected.
Name feature flags FLAG_<SCREAMING_SNAKE> and add them to backend_v2/api/feature_flags.yaml with a default of false. Don't skip the flag for "small" features — a flag is your rollback path.
backend_v2/tests/. Copy the shape of test_smoke_api.py for route tests.frontend/trademaster_ui/src/**/__tests__/ next to the code../scripts/agent-tools/run_smoke.sh # full smoke sweep
python -m pytest backend_v2/tests -q # backend unit + integration
npm --prefix frontend/trademaster_ui test -- --watchAll=false # frontend
Playwright-driven UI verification is preferred when the feature has a visible component. Don't claim a feature works without actually loading it in a browser (headless or headed).
Before opening a PR, think about each of these and note them in the PR template:
If any "yes," expect the security-* CI jobs to scrutinize your PR. Bandit + pip-audit + npm audit + gitleaks run on every push.
Fill in the template completely. The sections aren't optional:
CI runs:
- backend-tests — pytest
- frontend-tests — jest
- security-deps — pip-audit + npm audit
- security-sast — bandit
- security-secrets — gitleaks
HIGH/CRITICAL findings block merge. If the finding is a false positive, document the suppression in the PR and link the rule that generated it. Do not blindly add suppressions.
false unless we're ready to releaseAfter merge, the flag stays false until a follow-up flip. That follow-up is its own PR with a "flip FLAG_X to true" title, so the release has an audit trail.
docs/agents/onboarding.md so the next agent benefits