📝 Gremlins Phase 3 trunk notes

This commit is contained in:
2026-10-16 18:44:28 +02:00
parent 242935f90c
commit f95f58c167
2 changed files with 11 additions and 1 deletions
@@ -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 `<command> --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 `<run log without .md>-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.