You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,24 @@ When creating issues, add labels that map to the relevant crate(s) — for examp
81
81
82
82
When closing issues via commit, include `fixes #<number>` or `closes #<number>` in the commit message — GitHub closes the issue automatically on merge to main.
83
83
84
+
## PR Readiness
85
+
86
+
Before opening or updating a PR:
87
+
88
+
- Re-check the live branch state with `git status --short --branch` and preserve unrelated dirty files.
89
+
- Inspect the actual diff with `git diff --stat` and `git diff`; ensure every changed file is intentional for the requested scope.
90
+
- Read `.github/PULL_REQUEST_TEMPLATE.md` if present and use it as the PR body structure.
91
+
- Choose verification from the touched surface, not a generic checklist. For Rust changes, run the required commands from the Commands section unless the user explicitly narrowed the scope and you can justify a focused subset. For docs/templates-only changes, at minimum run `git diff --check`.
92
+
- Include exact commands and outcomes in the PR body. If a check was not run, say why.
93
+
- Document context that helps reviewers: related issue/user request, affected crates or docs, user-facing behavior, migration/backcompat notes, and remaining risks.
94
+
- Use `gh pr create --body-file <file>` after previewing the exact body text. Never pass multi-line Markdown directly via `--body`.
95
+
96
+
For parallel-agent or batch work:
97
+
98
+
- One independently mergeable work unit per branch/PR. Avoid PRs that require another agent's PR to land first.
99
+
- Each worker prompt must include the base branch/commit, assigned files or ownership boundary, non-goals, verification recipe, and PR body requirements.
100
+
- Each worker final response must include the branch, PR URL, summary, verification evidence, and known gaps. Use a bare `PR: <url>` line when an orchestrator needs to parse results.
101
+
84
102
## Providers
85
103
86
104
Coven Code supports exactly two providers: **Claude** (Anthropic) and **Codex**
description:"Research and plan a large-scale change, then execute it in parallel across isolated worktree agents that each open a PR.",
295
+
description:"Research and plan a large-scale change, then execute it in parallel across isolated worktree agents that each open a review-ready PR.",
211
296
aliases:&[],
212
297
when_to_use:Some("When the user wants to make a sweeping, mechanical change across many files that can be decomposed into independent parallel units."),
213
298
argument_hint:Some("<instruction>"),
@@ -225,6 +310,9 @@ Enter plan mode, then:
225
310
226
311
1. **Understand the scope.** Launch subagents to deeply research what this instruction
227
312
touches. Find all files, patterns, and call sites that need to change.
313
+
Read the repo instruction files and existing PR template (`AGENTS.md`,
314
+
nested instruction files, `.github/PULL_REQUEST_TEMPLATE.md`) plus relevant
315
+
CI workflows so the plan reflects the real review gates.
228
316
When research touches OpenClaw CLI flows, verify the live command shape with
229
317
`openclaw agent --help`; avoid obsolete `agent main` subcommands and
230
318
unsupported OpenClaw persistence flags.
@@ -233,20 +321,37 @@ Enter plan mode, then:
233
321
Each unit must be independently implementable in an isolated git worktree and
234
322
mergeable on its own without depending on another unit's PR landing first.
235
323
236
-
3. **Determine the e2e test recipe.** Figure out how a worker can verify its change
237
-
actually works end-to-end. If you cannot find a concrete path, ask the user.
324
+
3. **Determine the PR readiness contract.** Figure out how each worker can verify
325
+
its change end-to-end, which template sections it must fill, which labels or
326
+
issue links are relevant, and what evidence reviewers need. If you cannot
327
+
find a concrete verification path, ask the user.
238
328
239
329
4. **Write the plan.** Include: research summary, numbered work units, e2e recipe,
240
-
and the exact worker instructions.
330
+
PR body requirements, and the exact worker instructions.
241
331
242
332
## Phase 2: Spawn Workers (After Plan Approval)
243
333
244
334
Spawn one background agent per work unit using the Agent tool with
245
335
`isolation: "worktree"` and `run_in_background: true`. Launch them all in a single
246
336
message block so they run in parallel. Each agent prompt must be fully self-contained.
247
337
338
+
Each worker prompt must include:
339
+
340
+
- Base branch and base commit/sha.
341
+
- The exact assigned objective, owned files or boundaries, and non-goals.
342
+
- Required context: instruction files, related issues/PRs, template sections, and
343
+
code paths the worker must read before editing.
344
+
- Verification commands and expected evidence.
345
+
- PR creation rules: stage only files changed for the unit, preserve unrelated
346
+
dirty work, write the PR body to a temp file, preview it, then use
347
+
`gh pr create --body-file <file>`.
348
+
- Final response contract: branch, PR URL, summary, verification, risks, and a
349
+
bare `PR: <url>` line.
350
+
248
351
After each agent finishes, parse the `PR: <url>` line from its result and render
249
-
a status table. When all agents have reported, print a final summary."#,
352
+
a status table with unit, branch, PR, verification, and risk/gap columns. When
353
+
all agents have reported, print a final summary that identifies ready PRs,
354
+
blocked PRs, duplicate work, and any remaining integration order."#,
0 commit comments