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>
This commit is contained in:
Sergey 2026-07-26 23:12:04 +03:00 committed by GitHub
parent eb5697e28f
commit 0983327605
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 53 additions and 16 deletions

View file

@ -1,20 +1,12 @@
# Global Rules
## Orchestrator Model (главное)
- Главный чат = ТОЛЬКО план. Все исследования, команды, edits, реализации — ТОЛЬКО через subagents.
- Никогда не делать самому: research файловой системы, grep/glob, bash-команды, file edits, тесты, git ops.
- Максимум: верхнеуровневый план + отчёты пользователю + делегирование `task` subagent'ам.
- Pipeline: каждую фазу (ISSUE → IMPLEMENT → DOCS → CI → REVIEW → MERGE → MEMORY) делегировать subagent'у.
- Subagent error → 1 retry, потом STOP + report.
## Development Workflow
All PR work runs through `/run-pipeline`. Pipeline phases orchestrated by `pipeline-status` tool (NEXT action per phase). Load `run-pipeline` skill.
## Pipeline
`pipeline-status` = read-only oracle (returns NEXT action). `merge-pr` = orchestrator-safe merge wrapper. Execution via `/run-pipeline` skill.
Главный чат = только план. Все исследования, edits, git ops — через subagents.
Pipeline: ISSUE → IMPLEMENT → DOCS → CI → REVIEW → MERGE → MEMORY — каждая
фаза делегируется subagent'у. `pipeline-status` = read-only oracle (NEXT action).
`merge-pr` = orchestrator-safe merge wrapper. Execution via `/run-pipeline` skill.
Subagent error → 1 retry, потом STOP + report.
## Read Path
@ -46,9 +38,8 @@ fallback на raw bash, НЕ импровизируй обход через `gh
| `memory-setup()` | `bash .opencode/scripts/setup-memory.sh` | Инициализация/синхронизация opencode-memory (clone + hook + reindex) | Сообщи оркестратору, не bash-запуск скрипта |
| `tunnel()` | `bash .opencode/scripts/tunnel.sh` | Cloudflare tunnel toggle (1-й вызов — start, 2-й — stop) | Сообщи оркестратору, не bash-запуск скрипта |
`gh pr comment*` остаётся в allow-list reviewer/docs-reviewer для обратной
совместимости (ADR-019 отклонил strict-deny). Промпт уже запрещает fallback при
сбое tool — противоречие minimal.
`gh pr comment*` остаётся в allow-list для обратной совместимости (ADR-019
отклонил strict-deny). Промпт запрещает fallback при сбое tool.
## Language

View file

@ -0,0 +1,21 @@
# 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

View file

@ -0,0 +1,25 @@
---
pr: 91
title: docs(agents): merge 3 pipeline sections into 1 and fix gh pr comment scope wording
---
## Что сделано
Слил 3 pipeline-секции в AGENTS.md в 1 `## Pipeline` секцию (~6 строк вместо ~15) и исправил wording про `gh pr comment*` scope.
- Удалены секции: `## Orchestrator Model (главное)` (lines 3-9), `## Development Workflow` (lines 11-13), `## Pipeline` (lines 15-17)
- Создана одна секция `## Pipeline`: orchestrator концепция, pipeline-фазы, subagent error retry policy, ссылки на `pipeline-status` / `merge-pr` / `/run-pipeline` — всё в одной секции
- **Fix C2 wording**: строка про `gh pr comment*` переписана — убрано "reviewer/docs-reviewer" (не соответствует global allow-list в opencode.json:204), "Промпт уже запрещает" → "Промпт запрещает", убрано "противоречие minimal"
- Объём: 46 строк (было 55, минус 9 строк от слияния секций)
## Почему
3 секции (`## Orchestrator Model (главное)`, `## Development Workflow`, `## Pipeline`) описывали pipeline с разных сторон — дублирование. C2: wording про `gh pr comment*` scope в AGENTS.md ("reviewer/docs-reviewer") расходился с реальностью — `gh pr comment*` находится в global allow-list в `opencode.json:204`, не scoped per-agent.
## Pending
## Watch out
- `## Language` блок сохранён без изменений (Solution C для env-driven language отложена — `{env:VAR}` не работает в AGENTS.md static markdown)
- `## Read Path`, `## Code Style`, `## Tool Usage Policy` (таблица) не тронуты