From 0983327605f5cf704fea95298dbae8ffbd9bad85 Mon Sep 17 00:00:00 2001 From: Sergey <93754860+slaid098@users.noreply.github.com> Date: Sun, 26 Jul 2026 23:12:04 +0300 Subject: [PATCH] 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 --- AGENTS.md | 23 ++++++----------- .../040-pr-91-agents-md-consolidation.md | 21 ++++++++++++++++ docs/handoff/pr-91-agents-md-consolidation.md | 25 +++++++++++++++++++ 3 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 docs/decisions/040-pr-91-agents-md-consolidation.md create mode 100644 docs/handoff/pr-91-agents-md-consolidation.md diff --git a/AGENTS.md b/AGENTS.md index ee83541..8205b39 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 diff --git a/docs/decisions/040-pr-91-agents-md-consolidation.md b/docs/decisions/040-pr-91-agents-md-consolidation.md new file mode 100644 index 0000000..2b924f6 --- /dev/null +++ b/docs/decisions/040-pr-91-agents-md-consolidation.md @@ -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 \ No newline at end of file diff --git a/docs/handoff/pr-91-agents-md-consolidation.md b/docs/handoff/pr-91-agents-md-consolidation.md new file mode 100644 index 0000000..f7930ec --- /dev/null +++ b/docs/handoff/pr-91-agents-md-consolidation.md @@ -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` (таблица) не тронуты \ No newline at end of file