refactor(main): modularize runtime and harden anilist setup flow

This commit is contained in:
2026-02-19 16:04:59 -08:00
parent 58f28b7b55
commit 162be118e1
73 changed files with 4413 additions and 1251 deletions

View File

@@ -27,46 +27,3 @@ You MUST read the overview resource to understand the complete workflow. The inf
</CRITICAL_INSTRUCTION>
<!-- BACKLOG.MD MCP GUIDELINES END -->
## Subagent Coordination Protocol (`docs/subagents/`)
Purpose: multi-agent coordination across runs; single-agent continuity during long runs.
Layout:
- `docs/subagents/INDEX.md` (active agents table)
- `docs/subagents/collaboration.md` (shared notes)
- `docs/subagents/agents/<agent_id>.md` (one file per agent)
- `docs/subagents/archive/<yyyy-mm>/` (archived histories)
Required behavior (all agents):
1. At run start, read in order:
- `docs/subagents/INDEX.md`
- `docs/subagents/collaboration.md`
- your own file: `docs/subagents/agents/<agent_id>.md`
2. Identify self by stable `agent_id` (runner/env-provided). If missing, create own file from template.
3. Maintain `alias` (short human-readable label) + `mission` (one-line focus).
4. Before coding:
- record intent, planned files, assumptions in your own file.
5. During run:
- update on phase changes (plan -> edit -> test -> handoff),
- heartbeat at least every `HEARTBEAT_MINUTES` (default 5),
- update your own row in `INDEX.md` (`status`, `last_update_utc`),
- append cross-agent notes in `collaboration.md` when needed.
6. Write limits:
- MAY edit own file.
- MAY append to `collaboration.md`.
- MAY edit only own row in `INDEX.md`.
- MUST NOT edit other agent files.
7. At run end:
- record files touched, key decisions, assumptions, blockers, next step for handoff.
8. Conflict handling:
- if another agent touched your target files, add conflict note in `collaboration.md` before continuing.
9. Brevity:
- terse bullets; factual; no long prose.
Suggested env vars:
- `AGENT_ID` (required)
- `AGENT_ALIAS` (required)
- `HEARTBEAT_MINUTES` (optional, default 20)