This commit is contained in:
2026-02-19 19:16:15 -08:00
parent 18b39dfe8e
commit 282ce93bb6
2 changed files with 67 additions and 22 deletions

View File

@@ -29,6 +29,8 @@ Work style: telegraph; noun-phrases ok; drop grammar; min tokens.
- Blog repo: `~/projects/sudacode-blog` - Blog repo: `~/projects/sudacode-blog`
- Obsidian Vault: `~/S/obsidian/Vault` (e.g. `mac-studio.md`, `mac-vm.md`) - Obsidian Vault: `~/S/obsidian/Vault` (e.g. `mac-studio.md`, `mac-vm.md`)
<CRITICAL_INSTRUCTION>
## Subagent Coordination Protocol (`docs/subagents/`) ## Subagent Coordination Protocol (`docs/subagents/`)
Purpose: multi-agent coordination across runs; single-agent continuity during long runs. Purpose: multi-agent coordination across runs; single-agent continuity during long runs.
@@ -37,7 +39,7 @@ Layout:
- `docs/subagents/INDEX.md` (active agents table) - `docs/subagents/INDEX.md` (active agents table)
- `docs/subagents/collaboration.md` (shared notes) - `docs/subagents/collaboration.md` (shared notes)
- `docs/subagents/agents/<agent_id>.md` (one file per agent) - `docs/subagents/agents/<agent_id>.md` (one file per session/instance)
- `docs/subagents/archive/<yyyy-mm>/` (archived histories) - `docs/subagents/archive/<yyyy-mm>/` (archived histories)
Required behavior (all agents): Required behavior (all agents):
@@ -46,38 +48,68 @@ Required behavior (all agents):
- `docs/subagents/INDEX.md` - `docs/subagents/INDEX.md`
- `docs/subagents/collaboration.md` - `docs/subagents/collaboration.md`
- your own file: `docs/subagents/agents/<agent_id>.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. - optional/contextual: other agent files relevant to your task/handoff.
3. Maintain `alias` (short human-readable label) + `mission` (one-line focus). 2. Session identity:
4. Before coding: - one runtime instance = one agent file (Codex/OpenCode/Claude Code session each gets separate file).
- never reuse another active session file.
- if multiple terminals/sessions open at once, expect multiple files.
3. Agent ID rules:
- if `AGENT_ID` present: use it.
- default (no env): `agent_id = <runtime>-<task_slug>-<utc_compact>-<rand4>`.
- `<runtime>`: `codex|opencode|claude-code`.
- `<task_slug>`: short slug from current task/user ask.
- `<utc_compact>` example: `20260219T154455Z`.
- `<rand4>`: 4-char base36 suffix.
- collision rule: if file exists, regenerate suffix until unique.
4. Alias + mission:
- if `AGENT_ALIAS` present: use it; else default `<runtime>-<task_slug>`.
- mission: one line; specific task focus.
5. Before coding:
- record intent, planned files, assumptions in your own file. - record intent, planned files, assumptions in your own file.
5. During run: 6. During run:
- update on phase changes (plan -> edit -> test -> handoff), - update on phase changes (plan -> edit -> test -> handoff),
- heartbeat at least every `HEARTBEAT_MINUTES` (default 20), - heartbeat at least every `HEARTBEAT_MINUTES` (default 5),
- update your own row in `INDEX.md` (`status`, `last_update_utc`), - update your own row in `INDEX.md` (`status`, `last_update_utc`),
- append cross-agent notes in `collaboration.md` when needed. - append cross-agent notes in `collaboration.md` when needed.
6. Write limits: 7. Access limits:
- MAY read other agent files for context/handoff.
- MAY edit own file. - MAY edit own file.
- MAY append to `collaboration.md`. - MAY append to `collaboration.md`.
- MAY edit only own row in `INDEX.md`. - MAY edit only own row in `INDEX.md`.
- MUST NOT edit other agent files. - MUST NOT edit other agent files.
7. At run end: 8. Self-cleanup loop (required):
- at each heartbeat, verify own file accuracy:
- status current,
- planned/touched files current,
- assumptions still valid,
- stale notes collapsed into short summary.
- remove/trim outdated items in own file; keep handoff-ready.
- evict completed task details older than `72h` from own file.
- archive evicted content to `docs/subagents/archive/<yyyy-mm>/agents-<agent_id>-<yyyy-mm-dd>.md` (append + timestamped bullets).
9. Collaboration hygiene (required):
- keep `collaboration.md` structured by dated sections (`## YYYY-MM-DD`).
- append-only for normal work.
- periodic cleanup pass (at least daily by any active agent):
- dedupe repeated notes,
- mark resolved items,
- move resolved items older than `7d` and stale bulk context to `docs/subagents/archive/<yyyy-mm>/collaboration-<yyyy-mm-dd>.md`,
- leave short index/summary in `collaboration.md`.
10. At run end:
- record files touched, key decisions, assumptions, blockers, next step for handoff. - record files touched, key decisions, assumptions, blockers, next step for handoff.
8. Conflict handling: 11. Conflict handling:
- if another agent touched your target files, add conflict note in `collaboration.md` before continuing. - if another agent touched your target files, add conflict note in `collaboration.md` before continuing.
9. Brevity: 12. Parallel bookkeeping:
- do `subagents/*` coordination + backlog ticket association in parallel when independent.
- do not block one on the other unless dependency exists.
- before coding: both present (active agent record + linked backlog ticket when `Backlog.md` is configured).
13. Brevity:
- terse bullets; factual; no long prose. - terse bullets; factual; no long prose.
Suggested env vars: Suggested env vars (optional):
- `AGENT_ID` (required) - `AGENT_ID` (optional override)
- `AGENT_ALIAS` (required) - `AGENT_ALIAS` (optional override)
- `HEARTBEAT_MINUTES` (optional, default 20) - `HEARTBEAT_MINUTES` (optional, default 5)
Suggested env vars:
- `AGENT_ID` (required)
- `AGENT_ALIAS` (required)
- `HEARTBEAT_MINUTES` (optional, default 20)
## Docs ## Docs

View File

@@ -1,4 +1,4 @@
model = "gpt-5.3-codex-spark" model = "gpt-5.3-codex"
model_reasoning_effort = "medium" model_reasoning_effort = "medium"
personality = "pragmatic" personality = "pragmatic"
tool_output_token_limit = 25000 tool_output_token_limit = 25000
@@ -10,7 +10,7 @@ model_auto_compact_token_limit = 233000
ghost_commit = false ghost_commit = false
unified_exec = true unified_exec = true
apply_patch_freeform = true apply_patch_freeform = true
web_search_request = true web_request = true
skills = true skills = true
shell_snapshot = true shell_snapshot = true
@@ -44,6 +44,19 @@ trust_level = "trusted"
[projects."/home/kyasuda/gitlab/accts-loader"] [projects."/home/kyasuda/gitlab/accts-loader"]
trust_level = "trusted" trust_level = "trusted"
[projects."/Users/sudacode/github/SubMiner"]
trust_level = "trusted"
[projects."/Users/sudacode/projects/japanese/SubMiner"]
trust_level = "trusted"
[projects."/Users/sudacode/.codex"]
trust_level = "trusted"
[mcp_servers.backlog] [mcp_servers.backlog]
command = "backlog" command = "backlog"
args = ["mcp", "start"] args = ["mcp", "start"]
[mcp_servers.playwright]
args = ["@playwright/mcp@latest"]
command = "npx"