From 105eaaf065905a755c2e8eaa45d39930ea603ea7 Mon Sep 17 00:00:00 2001 From: Happyarch Date: Mon, 22 Jun 2026 22:18:15 -0400 Subject: [PATCH] Adding max amount of jobs various worker types can take before they need terminated to prevent context pollution. --- .agents/roles/dispatch.md | 3 +++ .agents/roles/integration.md | 18 +++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.agents/roles/dispatch.md b/.agents/roles/dispatch.md index c9d9e462..d6626ed8 100644 --- a/.agents/roles/dispatch.md +++ b/.agents/roles/dispatch.md @@ -79,5 +79,8 @@ Each ticket must include: - Never assign two workers to the same output file simultaneously. - Only dispatch `simple`-category jobs. On hardware I/O, call `work_queue fail`. - Maximum 5 Code Workers active at once. +- **Subagent Lifespans (Context Limits):** + - A `Code_Worker` subagent must be terminated and replaced after translating a maximum of **3 functions**. + - An `Integration_Agent` must be terminated and replaced after placing a maximum of **10 functions**. - Workers use `agy skill` on demand — do not bulk-paste all docs into tickets. - After a worker returns, verify assembly before calling `work_queue complete`. diff --git a/.agents/roles/integration.md b/.agents/roles/integration.md index bc579e0b..4e17053a 100644 --- a/.agents/roles/integration.md +++ b/.agents/roles/integration.md @@ -3,8 +3,8 @@ **Model**: `gemini-3.5-flash` | **Settings**: `effort: high` Place translated functions into the correct `dos_port/src/` files so the build -can see them. Add `%include` lines to aggregators, add Makefile rules where -needed. That is the full scope of this role. +can see them. Add `%include` lines to aggregators where needed. That is the +full scope of this role. --- @@ -53,11 +53,14 @@ The `engine/` prefix is **never** dropped. `engine/math/` is **never** renamed t 3. Derive destination: `dos_port/src/` + pret source path (path-map rule above). 4. Copy file to destination. Scratch remains until session end (gitignored). 5. Add `%include` in the appropriate aggregator file. -6. If new compilation unit, add `$(OBJ)/name.o` to Makefile and append to `OBJS`. -7. `nasm -f coff -o /dev/null ` — must pass. -8. `make -C dos_port` — must pass clean with no new warnings. -9. `dos_port/tools/work_queue place --id --output dos_port/src/` -10. Hand diff to `Docs_Commit_Agent`. +6. `nasm -f coff -o /dev/null ` — must pass. +7. Verify build integrity by running the following sequence: + - `make -C dos_port clean` + - `make -C dos_port SKIP_TITLE=1` + - `make -C dos_port clean` + - `make -C dos_port` +8. `dos_port/tools/work_queue place --id --output dos_port/src/` +9. Hand diff to `Docs_Commit_Agent`. --- @@ -68,4 +71,5 @@ The `engine/` prefix is **never** dropped. `engine/math/` is **never** renamed t add calls to newly-placed code. Wiring is Claude Code only. - Do not touch `translated`-status files until `place` is called. - Do not modify wired files beyond adding `%include` to an aggregator. +- **DO NOT TOUCH THE MAKEFILE.** Under no circumstances should the agent edit `Makefile`. It may only run `make` commands to verify the build. - **DO NOT WRITE PYTHON SCRIPTS TO EDIT FILES.** You have tools for this.