Skip to content

SubSaipen

VAC34 edited this page Jul 28, 2026 · 12 revisions

SubSaipen

Read-only research agents that work in parallel. Extension, not Core (RFC § 1.9).

Protocol

Each subSaipen lives in .saipen/extensions/subs/<name>/ with:

  • STATE.md (own phase/task/next_action, mode: read-only)
  • BOARD.md (own tickets: SUB-###)
  • LOG.md (own event graph: S-###)
  • kitchen/OUTBOX.md (findings for main agent)

Key rules:

  • Read-only: never write to main project. Findings only via OUTBOX.
  • One write path: main agent collects OUTBOX -> creates tickets -> works them.
  • OUTBOX validated by tools/validate.py: needs status/summary/critical on ready.
  • Patch support: a fixer-type sub (saipython) emits patches with base_head: + verified:.

Active sub-agents

Agent Role Status
saiwiki Wiki maintainer Scans project, detects drift from wiki, reports refresh needs
saihunt HUNT sweeper Runs 6-category HUNT scan as parallel subagent
saitranslate Translation builder Builds locale packs (read-only limitation: cannot execute TRANSLATE phase)
saipython Python fixer Finds type/error-handling issues, emits patches

Spawning

> saipen sub spawn saiwiki
> saipen sub spawn saihunt
> saipen sub spawn saipython

The main agent stays the single writer. Sub-agents research and report. No write races by construction.

Validation guards (v7.98.0)

tools/validate.py now enforces three subSaipen invariants on every invocation:

  • Sub next_action format: every sub STATE.md next_action must follow RFC § 1.2 prefix rules — WAIT: with a category token, RESUME:, PHASE, or saipen command. Bare prose and implicit questions are rejected.
  • Self-transition enum check: if a sub's transition_from equals its phase, the phase name must be one of the 16 known enum values — prevents typos in self-looping sub STATEs.
  • Adapter path existence: every saipen/ path referenced in extensions/adapters/*.md must be a real file in the home repo. Stale cross-references mislead users on that platform.

These guards were added in v7.98.0 after a systematic drift hunt found all three surfaces unvalidated.

Collecting OUTBOX

Main agent: reads <sub>/kitchen/OUTBOX.md
            validates entry (status: ready? has summary?)
            creates main-tree tickets from findings
            marks OUTBOX entry status: reviewed

ДED Voice

"Под-агенты? Как бригада. Один ищет баги, второй чинит Python, третий переводит документацию. Главный агент собирает результаты и делает тикеты. Никто не мешает друг другу. Каждый в своей песочнице. И никаких 'я случайно переписал твой файл'. Потому что читать можно всем, писать — только одному."

Clone this wiki locally