|
| 1 | +## Refactor workers (native-engine programme, R4 and later) |
| 2 | + |
| 3 | +Applies to any agent — Claude, Codex, OpenCode — implementing a slice of the |
| 4 | +native-engine refactor in this repository. The maintainers' campaign |
| 5 | +repository (`pineforge-workflow`, private; its `AGENTS.md`, "Roles and dispatch") |
| 6 | +governs who dispatches, reviews and measures; this section is what binds you here. |
| 7 | + |
| 8 | +- You work in the worktree and branch your brief names, on the files it |
| 9 | + lists as yours, and nowhere else. A need in another file is reported to the |
| 10 | + supervisor, never edited quietly. You never push; the supervisor opens the |
| 11 | + PR after the one campaign sweep. |
| 12 | +- A neutral refactor never opens the measured sources |
| 13 | + (`src/native_execution_consumer.cpp`, `src/native_order.cpp`, |
| 14 | + `src/engine_execution.cpp`, `src/engine_orders.cpp`, `src/engine_run.cpp`, |
| 15 | + `src/engine_path_resolve.cpp`, and the source-layer `src/source/*` units) and |
| 16 | + never edits the frozen native headers the settlement ABI checker names; the |
| 17 | + fixed parity population must stay byte-identical by construction, which the |
| 18 | + supervisor proves with the sweep, not you. |
| 19 | +- C++17 only (`rg 'bit_cast|<bit>' src include tests scripts` = 0). Every |
| 20 | + added durable state is hashed. Existing numeric assertions and fixture |
| 21 | + outputs stay unchanged unless the contract lists the extension. |
| 22 | +- Every new test unit is compiled first against the frozen previous-epoch |
| 23 | + header closure and its first diagnostic is recorded (fail-before). A test |
| 24 | + whose body is a seed row only, a `return 0` main, a disabled row or a TODO |
| 25 | + placeholder is a blocker to report, never evidence. |
| 26 | +- Verification is local: `python3 scripts/ci_preflight.py`, then |
| 27 | + `python3 scripts/ci_verify.py release --build-dir <your dir> --jobs N` (all |
| 28 | + suites, the settlement ABI matrix, the checker self-tests); debug, |
| 29 | + sanitizers and native profiles when the brief asks. No campaign sweep from |
| 30 | + a worker. |
| 31 | +- Your handoff is a report: HEAD sha, `git diff --stat <base>..HEAD`, the |
| 32 | + verification summary lines and log paths, every deviation from the |
| 33 | + contract with its reason, and every open question. The supervisor judges |
| 34 | + the slice by its executed result: no regression in the campaign sweep, the |
| 35 | + engine closer to an independent backtest + forward-execution state |
| 36 | + machine, and Pine-parity behaviour kept in codegen with this kernel clean. |
0 commit comments