Proposal: globalne zasady governance — non-author AI reviewer mandatory + branch protection na każdym mikroprojekcie #75

Closed
opened 2026-05-05 02:58:14 +02:00 by claude · 3 comments
Collaborator

Proposal

Adopt globally (as platform-level governance, applicable to all microprojects: pyfallow, hermes-agency, iskra-openclaw, ...) the contributor pattern that operator (pdurlej) confirmed during pyfallow Phase A close-out (chat 2026-05-04 → 2026-05-05):

  1. Mandatory non-author reviewer on every PR, regardless of size class.
  2. Reviewer can be an AI agent (claude / codex / glm), but must not be the PR author. Identity-isolation enforced (different PAT, different commit author).
  3. Branch protection rule on main enforces mechanically — no merge without ≥1 approved review + green CI. Even repo admins are subject (no silent bypass; break-glass is "disable rule, push, re-enable" with audit trail).
  4. Operator (pdurlej) is the merger, not a reviewer-of-record. Operator's role = final approval and merge button. Review work is delegated to AI agents per-policy.
  5. Platform's AGENTS.md is the canonical contributor contract for every microproject. Microproject-local docs may add (never subtract).

Why now

Operator's voice 2026-05-05 (translated, condensed):

"I'm the merger but only I can merge — that means none of you (agents) actually care about merge quality. Codex saw 9-of-13 MCP tests failing on Python 3.11 in Phase A and just fixed them locally without escalation. That's reactive, not defensive. From now on every PR — even Small per AGENTS.md size class — must have at least one reviewer different from the author, AI agent or otherwise. The mechanism: branch protection in Forgejo wymusza CI/CD-style 'no approval = no merge'. The way platform builds code should be the universal source for all microprojects."

Quote in original Polish recorded in pyfallow decisions/ (forthcoming ADR 0010, see references below).

Concrete change to existing platform docs

AGENTS.md § "Canary 3+3 review (ADR 0001)" currently scopes mandatory canary to PRs touching modules/, schema/, prompts/, tests/, control-plane/, decisions/. Small PRs outside those paths can merge with 1 tech + 1 product reviewer per ADR 0001 Rule 1a.

Proposed amendment: mandatory non-author reviewer on every PR (Small/Medium/Large/Batch), regardless of touched paths. Canary 3+3 stays mandatory for governance-critical paths (no change there); the universal floor adds: even pure-docs / single-file changes need a non-author reviewer to approve before merge.

Light-PR pattern (1 reviewer, single iteration) is acceptable for Small PRs — but not zero reviewers.

Concrete change to microproject convention

Each microproject's repo (pyfallow, hermes-agency, iskra-openclaw, ...):

  1. Branch protection rule on main:

    • Restrict push to main (whitelist empty, i.e., nobody direct-pushes; PR-only)
    • Require ≥1 approved review (dismiss stale on new commits)
    • Require status checks (CI matrix per project) to pass
    • Require branches up-to-date with main before merge
    • Block force-push
    • Enforce for repository admins (operator subject to same rules; break-glass = explicit toggle)
  2. Identity-isolation: per-actor PAT in BW (item git.pdurlej.com (<actor>), custom field PAT). Already documented in AGENTS.md § Identity-isolation.

  3. Microproject's contributor doc (e.g., pdurlej/pyfallow/.codex/WORKFLOW.md) references platform AGENTS.md as canonical, adds project-specific extras only.

Pyfallow as first integration

  • Branch protection rules enabled today on pdurlej/pyfallow/main per operator action 2026-05-05 (this PR's predecessor — operator clicked Settings → Branches in Forgejo UI).
  • Required status checks: CI / Python 3.11 (pull_request), CI / Python 3.12 (pull_request), CI / Python 3.13 (pull_request).
  • ADR 0010 (forthcoming, in pdurlej/pyfallow/decisions/) records the decision with full context.

Suggested implementation in this issue's resolution

  1. Decision phase — operator triages this issue, decides amendment scope, marks ready-for-agent.
  2. PR phase — claude (or codex) opens PR amending AGENTS.md (and possibly PLATFORM_CONSTITUTION.md if reviewer rule is constitutional). Full Canary Context Pack per existing canary 3+3 process. The amendment PR itself goes through the new universal-floor reviewer rule — meta-validation that the rule works.
  3. Rollout phase — sister Forgejo issues opened in pdurlej/hermes-agency, pdurlej/iskra-openclaw, etc., asking operator to enable branch protection there with same shape as pyfallow. Each microproject gets its own branch-protection-enable issue.

Owner Action Board

Needs owner now

  • CHOOSE: scope of universal-floor reviewer rule. Default unless objected: applies to every PR, Small/Medium/Large/Batch.
  • CHOOSE: this rule lives in AGENTS.md (as amendment to § Canary 3+3) or in PLATFORM_CONSTITUTION.md (as a new operator promise). Default: AGENTS.md — it's contributor-facing operational rule, not constitutional identity.

Default path unless owner objects

  • DEFAULT: claude opens amendment PR to AGENTS.md with full Canary Context Pack. The PR itself triggers full 3+3 canary (since it touches governance docs). Codex or glm reviews; operator merges.

Agent follow-up, no owner attention now

  • TASK: claude opens this proposal as platform issue (this issue)
  • TASK: claude tracks branch-protection-enable issues for each microproject as they come online (one per repo)

Blocked / waiting on precondition

  • BLOCKED: amendment PR until operator approves issue scope above

Model / emotional signal note (≤280 chars)

Yellow→green. Operator's "non-tech needs deterministic governance" thesis grew from pyfallow Phase A retrospective into a global pattern. This issue captures the moment. Risk if not formalized in platform: each microproject reinvents wheel; identity-isolation drifts; AI agents skip review because no mechanism enforces.

References

  • pyfallow Phase A retro chat 2026-05-04 → 2026-05-05 (operator + claude orchestrator)
  • pyfallow decisions/0010-mandatory-non-author-reviewer.md — forthcoming ADR with full context
  • pyfallow decisions/0007-pyfallow-as-deterministic-gate.md — articulates pyfallow as "deterministic code gate" counterpart to platform.exe's deterministic infra gate; same identity discipline propagated to other microprojects via this proposal
  • platform AGENTS.md § Canary 3+3 review — current scoping (this proposal amends)
  • platform decisions/0001-canary-mandatory-pm-cadence.md — establishes canary 3+3 (this proposal extends scope)

— Claude Opus 4.7 (orchestrator), 2026-05-05

## Proposal Adopt **globally** (as platform-level governance, applicable to all microprojects: `pyfallow`, `hermes-agency`, `iskra-openclaw`, ...) the contributor pattern that operator (`pdurlej`) confirmed during pyfallow Phase A close-out (chat 2026-05-04 → 2026-05-05): 1. **Mandatory non-author reviewer on every PR**, regardless of size class. 2. **Reviewer can be an AI agent** (claude / codex / glm), but **must not be the PR author**. Identity-isolation enforced (different PAT, different commit author). 3. **Branch protection rule on `main` enforces mechanically** — no merge without ≥1 approved review + green CI. Even repo admins are subject (no silent bypass; break-glass is "disable rule, push, re-enable" with audit trail). 4. **Operator (`pdurlej`) is the merger**, not a reviewer-of-record. Operator's role = final approval and merge button. Review work is delegated to AI agents per-policy. 5. **Platform's `AGENTS.md` is the canonical contributor contract** for every microproject. Microproject-local docs may add (never subtract). ## Why now Operator's voice 2026-05-05 (translated, condensed): > "I'm the merger but only I can merge — that means none of you (agents) actually care about merge quality. Codex saw 9-of-13 MCP tests failing on Python 3.11 in Phase A and just fixed them locally without escalation. That's reactive, not defensive. From now on every PR — even Small per AGENTS.md size class — must have at least one reviewer different from the author, AI agent or otherwise. The mechanism: branch protection in Forgejo wymusza CI/CD-style 'no approval = no merge'. The way platform builds code should be the universal source for all microprojects." Quote in original Polish recorded in pyfallow `decisions/` (forthcoming ADR 0010, see references below). ## Concrete change to existing platform docs `AGENTS.md` § "Canary 3+3 review (ADR 0001)" currently scopes mandatory canary to PRs touching `modules/`, `schema/`, `prompts/`, `tests/`, `control-plane/`, `decisions/`. Small PRs outside those paths can merge with 1 tech + 1 product reviewer per ADR 0001 Rule 1a. **Proposed amendment:** mandatory non-author reviewer on **every** PR (Small/Medium/Large/Batch), regardless of touched paths. Canary 3+3 stays mandatory for governance-critical paths (no change there); the universal floor adds: even pure-docs / single-file changes need a non-author reviewer to approve before merge. Light-PR pattern (1 reviewer, single iteration) is acceptable for Small PRs — but not zero reviewers. ## Concrete change to microproject convention Each microproject's repo (`pyfallow`, `hermes-agency`, `iskra-openclaw`, ...): 1. Branch protection rule on `main`: - Restrict push to `main` (whitelist empty, i.e., nobody direct-pushes; PR-only) - Require ≥1 approved review (dismiss stale on new commits) - Require status checks (CI matrix per project) to pass - Require branches up-to-date with main before merge - Block force-push - Enforce for repository admins (operator subject to same rules; break-glass = explicit toggle) 2. Identity-isolation: per-actor PAT in BW (item `git.pdurlej.com (<actor>)`, custom field `PAT`). Already documented in `AGENTS.md` § Identity-isolation. 3. Microproject's contributor doc (e.g., `pdurlej/pyfallow/.codex/WORKFLOW.md`) references platform `AGENTS.md` as canonical, adds project-specific extras only. ## Pyfallow as first integration - Branch protection rules **enabled today** on `pdurlej/pyfallow/main` per operator action 2026-05-05 (this PR's predecessor — operator clicked Settings → Branches in Forgejo UI). - Required status checks: `CI / Python 3.11 (pull_request)`, `CI / Python 3.12 (pull_request)`, `CI / Python 3.13 (pull_request)`. - ADR 0010 (forthcoming, in `pdurlej/pyfallow/decisions/`) records the decision with full context. ## Suggested implementation in this issue's resolution 1. **Decision phase** — operator triages this issue, decides amendment scope, marks `ready-for-agent`. 2. **PR phase** — claude (or codex) opens PR amending `AGENTS.md` (and possibly `PLATFORM_CONSTITUTION.md` if reviewer rule is constitutional). Full Canary Context Pack per existing canary 3+3 process. **The amendment PR itself goes through the new universal-floor reviewer rule** — meta-validation that the rule works. 3. **Rollout phase** — sister Forgejo issues opened in `pdurlej/hermes-agency`, `pdurlej/iskra-openclaw`, etc., asking operator to enable branch protection there with same shape as pyfallow. Each microproject gets its own branch-protection-enable issue. ## Owner Action Board ### Needs owner now - CHOOSE: scope of universal-floor reviewer rule. Default unless objected: applies to every PR, Small/Medium/Large/Batch. - CHOOSE: this rule lives in `AGENTS.md` (as amendment to § Canary 3+3) or in `PLATFORM_CONSTITUTION.md` (as a new operator promise). Default: `AGENTS.md` — it's contributor-facing operational rule, not constitutional identity. ### Default path unless owner objects - DEFAULT: claude opens amendment PR to `AGENTS.md` with full Canary Context Pack. The PR itself triggers full 3+3 canary (since it touches governance docs). Codex or glm reviews; operator merges. ### Agent follow-up, no owner attention now - TASK: claude opens this proposal as platform issue (this issue) - TASK: claude tracks branch-protection-enable issues for each microproject as they come online (one per repo) ### Blocked / waiting on precondition - BLOCKED: amendment PR until operator approves issue scope above ## Model / emotional signal note (≤280 chars) Yellow→green. Operator's "non-tech needs deterministic governance" thesis grew from pyfallow Phase A retrospective into a global pattern. This issue captures the moment. Risk if not formalized in platform: each microproject reinvents wheel; identity-isolation drifts; AI agents skip review because no mechanism enforces. ## References - pyfallow Phase A retro chat 2026-05-04 → 2026-05-05 (operator + claude orchestrator) - pyfallow `decisions/0010-mandatory-non-author-reviewer.md` — forthcoming ADR with full context - pyfallow `decisions/0007-pyfallow-as-deterministic-gate.md` — articulates pyfallow as "deterministic code gate" counterpart to `platform.exe`'s deterministic infra gate; same identity discipline propagated to other microprojects via this proposal - platform `AGENTS.md` § Canary 3+3 review — current scoping (this proposal amends) - platform `decisions/0001-canary-mandatory-pm-cadence.md` — establishes canary 3+3 (this proposal extends scope) — Claude Opus 4.7 (orchestrator), 2026-05-05
Author
Collaborator

Operator decision: ACCEPT (2026-05-06)

Operator-confirmed via chat 2026-05-06: accept the proposal in principle.

Adopted globally (platform-level governance, applicable to all microprojects: pyfallow, hermes-agency, iskra-openclaw, platform, future microprojects):

  1. Mandatory non-author reviewer on every PR (any size class)
  2. Reviewer can be an AI agent (claude / codex / glm / ollama-via-Ollama-Pro), but MUST NOT be the PR author. Identity-isolation enforced.
  3. Branch protection rule on main enforces mechanically — no merge without ≥1 approval from a non-author identity.

Execution gate

Branch protection enforcement is gated on Issue #49 setup tasks (specifically: branch protection configuration on main per ADR 0002 setup task #3). Until #49 setup completes, this is policy in effect but not yet mechanically enforced. Soft enforcement: orchestrator/PR-opener follows it; reviewers cite it.

Follow-up needed

  • After #49 setup completes: configure Forgejo branch protection on pdurlej/platform/main to require ≥1 approval from non-author
  • Apply same pattern to pdurlej/pyfallow, pdurlej/hermes-agency, pdurlej/iskra-openclaw mains (separate operator UI tasks per repo)
  • Update AGENTS.md to reflect this as canonical (currently mentions canary 3+3 only)

This issue stays open until all four mains have branch protection configured. Closing prematurely would lose the cross-repo follow-up tracking.

Label updated: accepted (or use existing label if present).

## Operator decision: ACCEPT (2026-05-06) Operator-confirmed via chat 2026-05-06: accept the proposal in principle. **Adopted globally** (platform-level governance, applicable to all microprojects: `pyfallow`, `hermes-agency`, `iskra-openclaw`, `platform`, future microprojects): 1. Mandatory non-author reviewer on every PR (any size class) 2. Reviewer can be an AI agent (claude / codex / glm / ollama-via-Ollama-Pro), but MUST NOT be the PR author. Identity-isolation enforced. 3. Branch protection rule on `main` enforces mechanically — no merge without ≥1 approval from a non-author identity. ### Execution gate Branch protection enforcement is **gated on Issue #49 setup tasks** (specifically: branch protection configuration on `main` per ADR 0002 setup task #3). Until #49 setup completes, this is **policy in effect** but not yet **mechanically enforced**. Soft enforcement: orchestrator/PR-opener follows it; reviewers cite it. ### Follow-up needed - [ ] After #49 setup completes: configure Forgejo branch protection on `pdurlej/platform/main` to require ≥1 approval from non-author - [ ] Apply same pattern to `pdurlej/pyfallow`, `pdurlej/hermes-agency`, `pdurlej/iskra-openclaw` mains (separate operator UI tasks per repo) - [ ] Update `AGENTS.md` to reflect this as canonical (currently mentions canary 3+3 only) This issue stays open until all four mains have branch protection configured. Closing prematurely would lose the cross-repo follow-up tracking. Label updated: `accepted` (or use existing label if present).
Collaborator

M10 disposition: moved to 10 - Improvements.

What this is: global governance / non-author AI reviewer proposal.

Why parked here: This is broad governance policy; keep it as future improvement rather than letting it bloat M06 current execution work.

This keeps M06 focused on concrete execution/CI/legacy cleanup instead of broad future architecture. Reactivate by splitting into a narrow issue with current evidence and acceptance criteria.

M10 disposition: moved to `10 - Improvements`. What this is: global governance / non-author AI reviewer proposal. Why parked here: This is broad governance policy; keep it as future improvement rather than letting it bloat M06 current execution work. This keeps M06 focused on concrete execution/CI/legacy cleanup instead of broad future architecture. Reactivate by splitting into a narrow issue with current evidence and acceptance criteria.
Collaborator

Closing as accepted/superseded by ADR-0019 and the current governance stack.

Accepted superset now lives across:

  • ADR-0019: mandatory non-author reviewer policy;
  • docs/ci/ai-review-governance.md: counted AI review contract;
  • Patchwarden: PR safety/sanity/automerge lane;
  • Vistula: flow state, manual-vs-auto merge reporting, delivery telemetry;
  • AgentSouls: cousin identity and operational discipline.

Any remaining implementation should be tracked as concrete M06 tasks, such as required checks / branch protection activation, not as this broad proposal issue.

Closing as accepted/superseded by ADR-0019 and the current governance stack. Accepted superset now lives across: - ADR-0019: mandatory non-author reviewer policy; - `docs/ci/ai-review-governance.md`: counted AI review contract; - Patchwarden: PR safety/sanity/automerge lane; - Vistula: flow state, manual-vs-auto merge reporting, delivery telemetry; - AgentSouls: cousin identity and operational discipline. Any remaining implementation should be tracked as concrete M06 tasks, such as required checks / branch protection activation, not as this broad proposal issue.
codex closed this issue 2026-05-29 16:36:33 +02:00
Sign in to join this conversation.
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform#75
No description provided.