opencode-config/docs/decisions/040-pr-91-agents-md-consolidation.md
Sergey 0983327605
docs(agents): merge 3 pipeline sections into 1 and fix gh pr comment scope wording (#91)
* docs(agents): merge 3 pipeline sections into 1 and fix gh pr comment scope wording

* docs(handoff): add handoff + ADR for AGENTS.md consolidation

* docs(handoff): set PR number 91

---------

Co-authored-by: opencode-agent <agent@opencode.local>
2026-07-26 23:12:04 +03:00

21 lines
No EOL
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ADR-040: AGENTS.md pipeline sections consolidation + gh pr comment scope wording fix (PR #91)
## Статус
Accepted (2026-07-26)
## Контекст
3 секции в AGENTS.md описывали pipeline с разных сторон: `## Orchestrator Model (главное)` (главный чат = только план, subagent error retry), `## Development Workflow` (run-pipeline + pipeline-status orchestration), `## Pipeline` (pipeline-status / merge-pr / run-pipeline skill). Дублирование между Orchestrator Model и Pipeline секциями по `pipeline-status` и `merge-pr`.
C2 contradiction: AGENTS.md:49-51 описывал `gh pr comment*` scope как "reviewer/docs-reviewer" (per-agent override), но в `opencode.json:204` `gh pr comment*` находится в global allow-list (применимо ко всем агентам). `agent` блок в opencode.json не поддерживает per-agent `permission.bash` override.
## Решение
1. Слить 3 секции в 1 `## Pipeline`: orchestrator концепция (главный чат = только план, через subagents), pipeline-фазы (ISSUE → IMPLEMENT → DOCS → CI → REVIEW → MERGE → MEMORY), subagent error retry policy (1 retry → STOP + report), ссылки на `pipeline-status` / `merge-pr` / `/run-pipeline` — всё в одной секции (~6 строк вместо ~15).
2. Fix C2 wording: neutral description соответствует global allow-list — убрано "reviewer/docs-reviewer", "Промпт уже запрещает" → "Промпт запрещает", убрано "противоречие minimal".
## Альтернативы
- **Оставить 3 секции** — отклонено: дублирование pipeline-описания в Orchestrator Model и Pipeline секциях (оба упоминают `pipeline-status`, `merge-pr`, `run-pipeline`)
- **Scoped per-agent permission override для `gh pr comment*`** — отклонено: `agent` блок в opencode.json не имеет per-agent `permission.bash` field, override невозможен без изменения opencode schema