This repository is a finance research/paper engine. Evidence and safety gates remain authoritative; this file governs how code, docs, and run artifacts are completed.
Before mutation, run:
.venv/bin/python scripts/trader_run_completion_gate.py preflight --repo .A dirty checkout, detached head, unfinished Git operation, missing remote, or local/remote divergence is a blocker. Never absorb, discard, stash, reset, or hide pre-existing residue to start another wake.
A changed-repository wake is RUN COMPLETE only when all are true:
- Scoped implementation/artifacts are complete or the claim is explicitly falsified/narrowed.
- Claim-relevant behavioral, boundary, negative-control, regression, and full-suite verification is green.
- The wake report records exact evidence, failures, outcome, durable lessons, unresolved risks, and exactly one NEXT seed or
DIMINISHING_RETURNS. The v3 BUILD handoff also records machine-readable useful deltas, critic dispositions, closed families, data dependencies, and a stable loop signature incompounding.json; role-ready prose is never evidence by itself. - Learning is promoted deliberately: repo docs/reports for project truth/history; Trader skills for reusable procedures/pitfalls; compact profile memory only for stable stance/preferences. Superseded guidance is rewritten, not stacked.
- Intended paths are reviewed for secrets/private positions and committed coherently. Raw session logs, auth,
.env, caches, provider dumps, and live position files stay untracked. - The run branch is pushed normally, integrated into
main,mainis pushed, the run commit is an ancestor of remotemain, and the canonical checkout is clean. - The deterministic postflight gate passes and atomically writes its receipt under
.cache/platform/completion/.
Wrapper BUILD wakes use postflight --stamp <stamp> and retain the full MoA artifact contract. Manual/direct-main infrastructure wakes use postflight --report <tracked-wake-report> with the pre-mutation base and integrated run commit. Both paths prove clean synchronized main, remote ancestry, and an advanced HEAD; both emit mode: postflight and completion: true. Preflight emits completion: false and is forbidden from writing a completion receipt.
Executor/challenger output is a partial phase, never completion. On failure preserve the run branch and artifacts, report RUN INCOMPLETE with exact residue, and resume the contract-v2 BUILD stamp with scripts/trader_build_lab_moa.sh --stamp <stamp> --resume (or --finalizer-only after a successful critique).
No force push, destructive cleanup, secret resolution, gateway restart, public release/PR, broker login, broker paper/live order, agentic arm, or shadow/live promotion is authorized by this completion contract. Local research, simulation, and paper-ledger artifacts remain allowed under existing Trader doctrine.