diff --git a/docs/workpad/plans/2026-10-16-18-gremlins-phase3-contract.md b/docs/workpad/plans/2026-10-16-18-gremlins-phase3-contract.md index 8410f98..38e10a4 100644 --- a/docs/workpad/plans/2026-10-16-18-gremlins-phase3-contract.md +++ b/docs/workpad/plans/2026-10-16-18-gremlins-phase3-contract.md @@ -648,7 +648,7 @@ Release gating keeps 0.3.0 unreleased until Linux and macOS lift their gates, so ### A8. Three more routed text items (§2.6, §7.1, §7.7) -- (a) `preamble.md` no longer points at `plugins/spire/skills/implementation/references/run-log.md` (it does not resolve in other projects). Block 3.1 **inlines the handoff-note format** in `preamble.md`: the seven fields `Model`, `Start / end` (from `date`), `Done`, `Deviations from plan`, `Flagged for review`, `Left for later`, `Expected broken`, `Commits`, as a short bullet template. +- (a) `preamble.md` no longer points at `plugins/spire/skills/implementation/references/run-log.md` (it does not resolve in other projects). Block 3.1 **inlines the handoff-note format** in `preamble.md`: the fields `Model`, `Start / end` (from `date`), `Done`, `Deviations from plan`, `Flagged for review`, `Left for later`, `Expected broken`, `Commits`, as a short bullet template. - (b) SKILL §6/§7: `stalled` together with `clock_jump` is a host suspend, not a hung gremlin; `wait` again before acting. - (c) SKILL §6: an action per failure reason. `model_refused` → the model id is not admitted (`availableModels`), the user must change settings. `usage_limit` → plan usage hit; stop launching, flag it, hand back. `overloaded`, `api_error` → transient; `continue` once later, else flag. `prompt_too_long` → the base is too large; re-train or rebase smaller. `is_error`, `exit_code`, `no_result` → read `raw/.err` and the note, `continue` once, else flag. `detach_failed`, `launch_error`, `supervisor_error` → helper or host problem; flag it, do not retry blindly. - Add these three rows to the §7.7 checklist. diff --git a/docs/workpad/reports/2026-10-16-08-headless-forks-trunk-notes.md b/docs/workpad/reports/2026-10-16-08-headless-forks-trunk-notes.md index c8c1aa6..36f2562 100644 --- a/docs/workpad/reports/2026-10-16-08-headless-forks-trunk-notes.md +++ b/docs/workpad/reports/2026-10-16-08-headless-forks-trunk-notes.md @@ -41,3 +41,13 @@ Written by the Athanor (`claude-opus-5-5[1m]`) at Phase 0, 2026-10-16. For fresh - Phase 3 changes only text (`forks/SKILL.md`, `agents/athanor.md`, `implementation/SKILL.md`, `references/*`, README) and the two manifests. The run log's "Successor boot" section lists every review item routed to the Phase 3 text; treat that list as part of the brief. - The real JSON and exit codes to write the text against: run `where`, and ` --help` (prints one JSON object). The contract digests describe result fields, reasons and flags as built. - Live smoke references for numbers and shapes: `…\headless-forks-p0\smoke1\` (Phase 1) and `…\smoke2\` (Phase 2: rebase, pings, `usage` md). + +## Phase 3 (added 2026-10-16 18:45 +0200, Phase 3 Athanor `claude-opus-5-5[1m]`) + +- The brief for every Phase 3 block is the digest `docs/workpad/plans/2026-10-16-18-gremlins-phase3-contract.md`, **including its closing "Amendment after pre-build check" section, which wins over the sections above it**. The check that produced it: `docs/workpad/reports/2026-10-16-19-gremlins-phase3-digest-check.md`. +- The skill is renamed in block 3.1: `plugins/spire/skills/forks/` → `plugins/spire/skills/gremlins/` (`gremlins.py`, `tests/test_gremlins.py`). From 3.1 on, the gates are G-unit `uv run plugins/spire/skills/gremlins/tests/test_gremlins.py [Class …]` and G-where `uv run plugins/spire/skills/gremlins/gremlins.py where`. A single class runs as `uv run …/test_gremlins.py ClassName` or `ClassName.test_name`. +- Words: the trained session is the **base**; a headless worker spawned from it is a **gremlin**; the command is `spawn` (job kind `spawn`, `method: "fork"`); env marker `SPIRE_GREMLIN_CHILD`; state dir `-gremlins/`. +- Code map of `forks.py` before the rename (line numbers at `7351c40`): constants `:40-180`; paths and cygpath `:270-345`; atomic files and `RegistryLock` `:380-570`; ledger `:593-623`; processes (ctypes, ctime, liveness, table, tree, kill) `:626-895`; `_run`/`git` `:898-918`; scrub `:920-991`; binary/uv/python `:994-1077`; C8 `:1080-1127`; stream, usage, cache, warmth `:1130-1372`; job files, templates, `spawn_supervisor` `:1374-1460`; `_conclude`/`_rebase_succeeded`/`finalize_job` `:1463-1670`; orchestrator stamp, `reap_lost`, `kill_job` `:1684-1786`; argparse `:1794-1990`; `where`/`init` `:1998-2235`; launches `:2238-2927`; ping/tick `:2930-3112`; `Supervisor` `:3115-3338`; `wait`/`list`/`kill`/`expire` `:3341-3496`; `usage` `:3499-3728`; dispatch `:3731-3787`. +- Test classes: `PathTests ScrubTests LockTests AtomicTests PidTests ProcessTreeTests InitTests CliTests SubprocessTests RuleTests WarmthTests TickTests UsageTests LaunchTests` (the last uses the real CIM detach and the stream stub; slow). Full suite about 150 s; run it only in block 3.8. +- Test cadence (user): py_compile plus the touched test classes between blocks; the full suite once at phase end. No live `claude` calls in Phase 3. +- File rule (user): Read, Write and Edit for files; never `cat`/`sed`/heredocs to read or change files.