* refactor(pipeline): add subagent_type and template to NEXT actions
NEXT_ACTIONS now explicitly specifies subagent_type + template per phase (except MERGE which calls merge_pr tool). ISSUE/IMPLEMENT -> general/A, DOCS -> docs-reviewer/B, REVIEW -> reviewer/C, MEMORY -> memory-syncer/E. Existing tests updated to new format, 25 new tests added.
* refactor(docs): slim AGENTS.md and run-pipeline skill
AGENTS.md 71 -> 31 lines: remove Commits/Pull Requests sections (formats in tools), shorten Development Workflow/Pipeline to 1-2 lines. run-pipeline SKILL.md 164 -> 155 lines: remove Phase 0 Bootstrap (duplicated phases, now in pipeline-status NEXT_ACTIONS). Keep protocol, templates, restrictions.
* chore(skills): remove commit skill (format in tool validator)
commit/SKILL.md deleted (format validated by commit.ts tool, PR#38). References updated: configure-opencode SKILL.md (2 places), add-skill SKILL.md (1 place + tree structure). project-map README: remove commit/SKILL.md from tree, add configure-opencode.
* docs(handoff): add ADR-017 and handoff for orchestration switch
PR number in handoff frontmatter is <PR-NUMBER> placeholder, will be set after gh pr create.
* docs(handoff): set PR number
Set PR number 42 in handoff frontmatter, rename handoff/ADR files from pr-41 to pr-42 (pipeline-status matches pr-{pr_number}-*.md in diff).
* docs: update project map + handoff + ADR
---------
Co-authored-by: opencode-agent <agent@slaid098.dev>
4.2 KiB
ADR-017: pipeline-status sole orchestrator + slim docs
Статус
Accepted (2026-07-24)
Контекст
PR #38 (build) добавил 3 детерминированных tool'а (commit, create_pr, create_issue) с валидацией форматов. PR #40 (lock) заблокировал прямые bash-вызовы мутаций через global deny rules + role-based tool access. Но промпты и оркестрация всё ещё ссылались на старые паттерны: pipeline-status.py NEXT_ACTIONS описывал действие текстом без указания subagent_type/template, run-pipeline skill дублировал 7 фаз в Phase 0: Bootstrap, AGENTS.md дублировал правила форматов commits/PRs (уже в tools), commit skill дублировал правила коммитов (уже в commit.ts).
Нужно: сделать pipeline-status.py единственным source of truth для оркестрации (NEXT action явно указывает subagent_type + template), убрать дублирование в AGENTS.md/run-pipeline skill, удалить commit skill (формат в commit.ts).
Решение
-
pipeline-status.pyNEXT_ACTIONS — каждая фаза явно указываетsubagent_type+template(кроме MERGE —merge_prtool): ISSUE/IMPLEMENT →subagent_type=general, template=A; DOCS →subagent_type=docs-reviewer, template=B; REVIEW →subagent_type=reviewer, template=C; MERGE →call merge_pr tool with pr_number=N; MEMORY →subagent_type=memory-syncer, template=E.REVIEW_NEXT_REQUEST_CHANGES→dispatch subagent (subagent_type=general). ФорматNEXT:строки сохранён (pipeline-driver парсит без изменений). -
AGENTS.md slim (71 → 31 строк) — убраны
## Commitsи## Pull Requests(форматы в tools).## Development Workflowи## Pipelineсокращены до 1-2 строк (ссылки на/run-pipeline+pipeline_status/merge_prtools). Оставлены: Orchestrator Model, Read Path, Code Style, Language. -
run-pipeline SKILL.md slim (164 → 155 строк) — убран
Phase 0: Bootstrap(дублировал фазы). Оставлены: ПРОТОКОЛ, ЗАПРЕЩЕНО, Остановы, Prompt templates A-F, API Restrictions, Rules. -
commit skill удалён — формат зашит в
commit.tsвалидаторе (PR#38). Ссылки вconfigure-opencode/SKILL.mdиadd-skill/SKILL.mdобновлены наcommittool.
Альтернативы
- Оставить NEXT_ACTIONS описательным текстом — отклонено: run-pipeline skill должен парсить NEXT action и диспетчизировать subagent'ов. Без явного
subagent_type/templateskill должен был гадать или хардкодить маппинг фаза→subagent. Явное указание = single source of truth, deterministic. - Не сокращать AGENTS.md/run-pipeline — отклонено: дублирование правил форматов (AGENTS.md commits/PRs vs tools) и фаз (run-pipeline Phase 0 vs pipeline-status NEXT_ACTIONS) нарушает DRY и pure-orchestrator model. Tools уже валидируют форматы — текстовые правила в AGENTS.md не enforced.
- Оставить commit skill как pointer на tool — отклонено:
commit.tsуже содержит все правила валидации (regex, English, ≤72, staged check). Skill с текстом правил = дублирование. Если правила изменятся — нужно править 2 места. Удаление skill устраняет дублирование. - Добавить отдельный tool для dispatch subagent — отклонено: opencode уже имеет
tasksubagent dispatch mechanism. NEXT action строка достаточно для run-pipeline skill чтобы вызватьtaskс правильнымsubagent_typeи template. Новый tool = избыточность.