docs(spec): sixteenth pass adding FORGEJO_REVIEWER_PASSWORD and purging stale language

- Added FORGEJO_REVIEWER_PASSWORD to Section 6.17 env table and Appendix C
- Purged all remaining "self-approval"/"shared bot account" language from spec
- Updated Sections 8.3.2 and 8.3.3 for dual-account architecture
- Added v1.31.0 revision entry
This commit is contained in:
clever-agent
2026-04-10 20:31:25 +00:00
parent edd87d4847
commit 6baf921b52
@@ -1161,6 +1161,7 @@ When the Issue Finder queries open issues, it returns them in this priority orde
| `FORGEJO_USERNAME` | Primary bot identity | All agents (PR creation, issues, ownership detection) |
| `FORGEJO_REVIEWER_PAT` | Reviewer bot API token | PR Reviewer only |
| `FORGEJO_REVIEWER_USERNAME` | Reviewer bot identity | PR Reviewer only |
| `FORGEJO_REVIEWER_PASSWORD` | Reviewer bot web login | PR Reviewer's ci-log-fetcher calls |
**Separation of concerns:**
- The **primary account** creates PRs, manages issues, pushes code, applies labels, and merges PRs.
@@ -1222,7 +1223,7 @@ All pull requests require exactly **one approval** before merge. This is enforce
2. **Merge gate**: The PR Merge Pool Supervisor and `safe_merge_pr()` require at least one approval from any of the three tiers.
3. **Watchdog enforcement**: The System Watchdog audits branch protection and flags `required_approvals < 1` as a HIGH severity finding.
Self-approval is explicitly permitted. This is necessary because all automated agents share a single bot account.
The system uses dual bot accounts: PRs are created by `FORGEJO_USERNAME` and reviewed by `FORGEJO_REVIEWER_USERNAME`. Formal APPROVED reviews are the primary approval mechanism.
### 6.18 Merge Safety Protocol
@@ -1561,7 +1562,7 @@ All of the following must be true:
6. No blocking `REQUEST_CHANGES` reviews more recent than the latest approval signal (from any of the three tiers)
7. Linked issues in correct state (`State/In Review`)
Self-approval is explicitly allowed. See Section 6.17 for the rationale.
Both bot accounts are recognized as valid approvers. See Section 6.17 for the dual-account architecture.
#### 8.3.3 Approval Detection via 3-Tier System
@@ -3079,6 +3080,7 @@ The system is designed for crash recovery at every level:
| `FORGEJO_PAT` | Yes | 40 hex chars (`[a-f0-9]{40}`) | Forgejo personal access token for API authentication (primary bot account) |
| `FORGEJO_REVIEWER_PAT` | Yes | 40 hex chars (`[a-f0-9]{40}`) | Forgejo personal access token for the reviewer bot account (used by PR Reviewer only) |
| `FORGEJO_REVIEWER_USERNAME` | Yes | Alphanumeric | Forgejo username for the reviewer bot account (must be different from `FORGEJO_USERNAME` to allow formal PR approval) |
| `FORGEJO_REVIEWER_PASSWORD` | Yes | 8+ chars | Forgejo password for the reviewer bot account (web UI access for CI log scraping via ci-log-fetcher) |
| `GIT_USER_NAME` | Yes | Any string | Git commit author name (typically `CleverAgents Bot`) |
| `GIT_USER_EMAIL` | Yes | Email format | Git commit author email (typically `bot@cleveragents.ai`) |
| `FORGEJO_USERNAME` | Yes | Alphanumeric | Forgejo web login username for CI log scraping |
@@ -3545,6 +3547,7 @@ The Branch Setup agent creates or checks out branches with a strict rebase-only
| 2026-04-10 | 1.21.0 | Twenty-fourth pass (label deny and permission consistency audit): Expanded Section 6.19 from Automation-Tracking-Manager-specific to universal label application delegation rule documenting all 77 agents with deny + 2 intentional exceptions (forgejo-label-manager, issue-state-updater); **fixed 6 agent definition bugs**: pr-editor.md, pr-manager.md, pr-merge-pool-supervisor.md, async-agent-manager.md (all 4 missing `forgejo_add_issue_labels: deny` — could bypass label delegation), forgejo-signature-appender.md (missing deny AND broken YAML `permission: {}` creating disconnected forgejo block); verified 41 edit:deny agents match spec claim exactly, 3 webfetch:allow agents match spec claim exactly |
| 2026-04-10 | 1.22.0 | Twenty-fifth pass (directory layout, bash permissions, subsystem verification): Added Section 2.4 (Directory Layout) documenting `.opencode/` structure including agents/, shared/, config/, scripts/, deprecated stubs; **fixed 1 agent definition bug**: forgejo-signature-appender.md (missing `bash: "*": deny` and `edit: deny` — the only active agent without any bash restriction, could run arbitrary commands despite being a text-formatting-only agent); verified 3-Tier Approval Detection (Section 6.17) matches pr-merge-pool-supervisor implementation; verified Mandatory Merge Verification Protocol (Section 8.3.4) matches shared/merge_safety.md; confirmed zero remaining stale names, stale labels, or stale session prefixes across all agent files |
| 2026-04-10 | 1.23.0 | Twenty-sixth pass (deep automation tracking audit): Major rewrite of Section 5.2 (Status Issues) with one-at-a-time invariant, close-ALL-then-create protocol, and explicit "even from previous sessions" language; new Section 5.3.1 (Announcement Issue Lifecycle) with mandatory self-review every 3 cycles; new Section 5.3.2 (Tracking Issue Consumption Protocol) with per-agent triage table, read depth levels, and priority-based filtering; **fixed 4 agent definitions**: automation-tracking-manager.md (strengthened CREATE_TRACKING_ISSUE to specify close-ALL-then-create invariant), backlog-grooming-pool-supervisor.md (added READ_ANNOUNCEMENTS from watchdog/liaison/owner + REVIEW_OWN_ANNOUNCEMENTS every 3 cycles), pr-review-pool-supervisor.md (added READ_ANNOUNCEMENTS for critical watchdog/liaison + REVIEW_OWN_ANNOUNCEMENTS), agent-evolution-pool-supervisor.md (added READ_ANNOUNCEMENTS for critical watchdog + REVIEW_OWN_ANNOUNCEMENTS with 24h stale threshold); updated shared/tracking_discovery_guide.md with mandatory announcement review and consumption protocols |
| 2026-04-10 | 1.31.0 | Thirty-fourth pass (dual-account completeness audit): Added missing `FORGEJO_REVIEWER_PASSWORD` to spec Section 6.17 env table and Appendix C (needed by ci-log-fetcher when invoked by PR Reviewer); removed ALL stale "self-approval"/"shared bot account"/"same bot account" language from 6 agent definitions and 2 spec sections: implementation-worker.md (2 approval function docstrings), shared/merge_safety.md (approval function docstring + comment), pr-merge-pool-supervisor.md (2 stale self-approval references), pr-reviewer.md (stale self-approval fallback), project-bootstrapper.md (branch protection self-approval note), shared/credential_security.md (stale comment); updated spec Sections 8.3.2 and 8.3.3 to reference dual-account architecture |
| 2026-04-10 | 1.30.0 | Thirty-third pass (dual-account architecture): Rewrote Section 6.17 from "Shared Bot Account Problem" to "Dual-Account Architecture" — introduced `FORGEJO_REVIEWER_PAT` and `FORGEJO_REVIEWER_USERNAME` environment variables for a separate reviewer Forgejo account; formal APPROVED reviews are now the PRIMARY approval path (not a workaround); updated Section 6.17.2 from "Two-Step Review Protocol" to "Dual-Account Review Protocol" (formal review first, backup comment second); added environment variables to Appendix C table; **fixed 4 agent definitions**: pr-reviewer.md (rewrote review protocol to use reviewer credentials as primary), pr-review-pool-supervisor.md (passes reviewer credentials to dispatched pr-reviewer instances), pr-merge-pool-supervisor.md (updated approval detection to recognize reviewer account as primary approver), product-builder.md (passes reviewer credentials when launching review pool supervisor); updated shared/credential_security.md with dual credential scheme |
| 2026-04-10 | 1.29.0 | Thirty-second pass (subagent specialization, eliminate duplication): Added Section 6.0 (Subagent Specialization Principle — centralize, don't duplicate); moved interval calculation from 17 duplicated agent blocks into ATM `CREATE_TRACKING_ISSUE` via new `sleep_interval_default` parameter; added ATM operation #11 `CYCLE_ANNOUNCEMENT_REVIEW` combining read + review + close in one call; updated spec Section 5.3.4 to document ATM-centralized interval calculation; updated Section 5.4 operations table to 11 operations; updated shared/tracking_discovery_guide.md to reference ATM-handled interval; **removed 17 duplicated rolling average calculation blocks** from all supervisor agents and replaced with single `--sleep-interval-default` parameter |
| 2026-04-10 | 1.28.0 | Thirty-first pass (body template field enforcement): Added `**Estimated Cycle Interval**` field to the actual tracking body templates in all 14 agents that had inline body strings without it (agent-evolution, architecture-guard, architecture, documentation, pr-review, test-infra, timeline-update, uat-test, backlog-grooming ×2, human-liaison, system-watchdog, product-builder, implementation-pool); fixed 2 non-standard body formats (project-owner-pool-supervisor had non-standard `[HEALTH]` header → standardized to `# Project Owner Status`, bug-hunt-pool-supervisor had body starting at `## Summary` without header → added standard header); added tracking body requirement note to pr-merge-pool-supervisor; all 18 status-creating agents now have `Estimated Cycle Interval` in their actual body templates |