diff --git a/.opencode/agents/implementation-pool-supervisor.md b/.opencode/agents/implementation-pool-supervisor.md index ffb0b4073..2b70a6935 100644 --- a/.opencode/agents/implementation-pool-supervisor.md +++ b/.opencode/agents/implementation-pool-supervisor.md @@ -107,6 +107,7 @@ Launch workers via the `async-agent-manager` subagent. For each worker: - The PR number or issue number - Repository info, credentials, and git identity - The CONTRIBUTING.md rules from your briefing (commit standards, testing, PR requirements) + - The **PR Compliance Checklist** (see PR Compliance Checklist section below) — workers must complete all items before creating a PR - For PR fix workers: instruct the worker to use the `ci-log-fetcher` subagent to retrieve CI failure logs ### Worker Attempt Comments @@ -122,6 +123,104 @@ These comments are how you track escalation state across worker sessions. Every cycle, search for your workers using `async-agent-manager` by tag pattern (`[AUTO-IMP-ISSUE-*]` and `[AUTO-IMP-PR-*]`). Count active workers, verify they're progressing (by reviewing their session messages via `async-agent-manager`), and note any that have completed or errored. Workers completing is normal — they finished their task. Restart any errors workers via `async-agent-manager`. +## PR Compliance Checklist + +Every worker prompt you dispatch **must** include the following mandatory checklist verbatim under a section titled **"PR Compliance Checklist (MANDATORY)"**. Workers must complete **all** items before creating a PR and include the completed checklist in their PR description. + +``` +MANDATORY — Complete ALL items before creating a PR: +[ ] 1. CHANGELOG.md — add entry under [Unreleased] section +[ ] 2. CONTRIBUTORS.md — add or update contribution entry +[ ] 3. Commit footer — include `ISSUES CLOSED: #` in the commit message +[ ] 4. CI passes — all quality gates and tests green before requesting review +[ ] 5. BDD/Behave tests — added or updated for the changed behaviour +[ ] 6. Epic reference — PR description references the parent Epic issue number +[ ] 7. Labels — applied via forgejo-label-manager: State/In Review, Priority/, MoSCoW/, Type/ +[ ] 8. Milestone — PR assigned to the earliest open milestone matching the issue +``` + +### CHANGELOG.md Update + +Workers must add an entry under the `[Unreleased]` section in `CHANGELOG.md`. Example: + +```markdown +## [Unreleased] + +### Added +- **My Feature** (#1234): Brief description of what was added and why. +``` + +Or for a fix: + +```markdown +## [Unreleased] + +### Fixed +- **My Bug Fix** (#1234): Brief description of what was fixed and the root cause. +``` + +### CONTRIBUTORS.md Update + +Workers must add or update their entry in `CONTRIBUTORS.md`. Example: + +```markdown +# Contributors + +* HAL 9000 + +# Details + +* HAL 9000 has contributed (#). +``` + +If HAL 9000 already appears in the list, add a new bullet under `# Details` describing this specific contribution. + +### Commit Footer + +Every commit that closes an issue must include the `ISSUES CLOSED` footer line. Example commit message: + +``` +feat(module): add new capability for X + +Implements the Y feature by doing Z. This resolves the problem described +in issue #1234 where users could not perform the action. + +ISSUES CLOSED: #1234 +``` + +The footer must be on its own line, separated from the body by a blank line, and must use the exact format `ISSUES CLOSED: #`. + +### Compliance Verification Pseudocode + +Before creating a PR, verify each checklist item: + +```python +# 1. CHANGELOG.md — check [Unreleased] section has new entry +assert "[Unreleased]" in changelog and new_entry in changelog + +# 2. CONTRIBUTORS.md — check HAL 9000 entry exists with this contribution +assert "HAL 9000" in contributors and issue_reference in contributors + +# 3. Commit footer — check last commit message contains ISSUES CLOSED footer +assert f"ISSUES CLOSED: #{issue_number}" in git_log_last_commit + +# 4. CI passes — run all quality gates locally before pushing +# nox -e lint && nox -e typecheck && nox -e unit_tests +# nox -e integration_tests && nox -e e2e_tests && nox -e coverage_report + +# 5. BDD/Behave tests — check feature file exists or was updated +assert behave_feature_file_exists_or_updated + +# 6. Epic reference — check PR description mentions parent Epic +assert f"Epic" in pr_description or epic_issue_number in pr_description + +# 7. Labels — applied via forgejo-label-manager (not directly) +# forgejo-label-manager: apply State/In Review, Priority/, MoSCoW/, Type/ + +# 8. Milestone — PR assigned to earliest open milestone +assert pr.milestone == earliest_open_milestone +``` + ## Progressive Escalation Workers start at the cheapest model tier and escalate to more expensive tiers only when the same problem persists across attempts. There are four tiers: diff --git a/CHANGELOG.md b/CHANGELOG.md index 252508d0f..fa52628be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -325,6 +325,18 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `PlanError` if checkpoint metadata cannot be persisted. Writable sandboxable resources and write-capable tools now default to `checkpointable=True`, and new Behave scenarios cover DI wiring, rollback, and capability defaults. (#1253) + +### Changed + +- **Implementation Pool Supervisor PR Compliance Checklist** (#9824): Added a mandatory + 8-item PR Compliance Checklist to `implementation-pool-supervisor.md` that supervisors + must pass verbatim to every worker prompt. Checklist covers: CHANGELOG.md update, + CONTRIBUTORS.md update, commit footer (`ISSUES CLOSED: #N`), CI verification, BDD tests, + Epic reference, label application via `forgejo-label-manager`, and milestone assignment. + Populated the four subsections (`### CHANGELOG.md Update`, `### CONTRIBUTORS.md Update`, + `### Commit Footer`, `### Compliance Verification Pseudocode`) with concrete examples + to guide workers. + --- ## [3.8.0] — 2026-04-05 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 637dd5b31..3d70feeed 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -20,3 +20,4 @@ Below are some of the specific details of various contributions. * This project was made possible thanks to considerable donation of time, money, and resources by CleverThis, Inc. * HAL 9000 has contributed automated bug fixes, CLI output formatting improvements, and ongoing maintenance as part of the CleverAgents automation system. * HAL 9000 has contributed the file edit encoding parameter fix (PR #8258 / issue #7559). +* HAL 9000 has contributed the mandatory PR compliance checklist to `implementation-pool-supervisor.md` (#9824): added an 8-item checklist with concrete examples for CHANGELOG.md, CONTRIBUTORS.md, commit footer, and compliance verification pseudocode to eliminate systemic PR merge blockers.