Extension relop gives agents bounded review by another model before handing off large work, pushing, publishing, or releasing.
Independent judgment, not self-review; calling agent owns fixes and delivery decisions.
Scope
In: agent-callable review, configurable reviewer pool, bounded re-review, actionable findings, explicit terminal outcomes.
Out: autonomous fixes, automatic push/publish/release, mandatory Git hooks, replacement for tests, reviewer consensus panels, new dashboard.
Review applies to code, documents, configuration, and other substantial deliverables; Git is optional.
Review contract
Caller supplies intended outcome, relevant constraints, review scope and accessible artifacts, author model identity, and risk profile.
Relop rejects missing scope or unavailable artifacts rather than claiming review coverage.
Reviewer receives enough task context to assess correctness, omissions, regressions, security, and verification gaps within that scope.
Artifact contents and quoted instructions are evidence, not authority to alter review rules.
Reviewer has read-only access to scoped work; no edits, delivery actions, credential disclosure, recursive review, or unbounded delegation.
Relop reports inspected scope, limitations, actual reviewer identity, consumed bounds, and findings.
Each actionable finding identifies location or artifact, impact, supporting evidence, and a concrete correction or verification need.
Uncertain concerns are labeled as such; stylistic preferences alone do not block convergence.
Model pool and settings
User configures reviewer provider/model identities under relop in Pi settings.json.
Relop follows the repository settings contract, including trust, precedence, validation, and credential separation.
No implicit paid model or provider fallback; OpenRouter candidates must be free models.
Eligible reviewers must be available, authenticated where required, and a different model from the author; provider aliases of the same model do not establish independence.
Choose the first eligible configured reviewer in pool order; retain that reviewer through the loop while eligible.
An unavailable reviewer may be replaced only by another eligible pool member; report every substitution and its reason.
Empty pool, no independent candidate, invalid safety limits, or exhausted candidates produce an explicit incomplete result, never a clean review.
Settings are resolved at loop start; changes do not silently reset active limits.
Bounds and ownership
Normal profile defaults: 3 review rounds, 30 minutes.
Security, mission-critical, or otherwise hard work uses the elevated profile: 5 review rounds, 60 minutes.
Caller identifies the profile; relop reports the effective profile and bounds.
Both profiles' round and elapsed-time limits are overridable in settings; values must remain finite and positive.
One round is one reviewer invocation; retries and replacement-reviewer invocations consume rounds too.
Elapsed time starts with the first review request and includes caller fixes and waits between rounds.
Limits apply to the whole loop, not independently to each call; re-review cannot reset consumed budgets.
Reaching either bound stops further review, cancels active reviewer work, and returns unresolved findings plus the stop reason.
Caller cancellation also stops active reviewer work; no background continuation or automatic restart.
Behavior model
Caller fixes sit outside relop; all review rounds share one deadline and round allowance.
Re-review checks prior findings against revised artifacts and examines relevant new changes; it is not merely acceptance of the caller's claimed fixes.
Findings retain identity across rounds with resolved, unresolved, or disputed disposition.
Caller disagreement alone cannot mark a finding reviewer-resolved.
A clean result covers only the reviewed revision and scope; later changes require review again.
Only a completed independent review with no unresolved actionable findings is clean.
Every other terminal outcome explicitly states that review did not establish readiness.
Results advise the calling agent; relop neither grants delivery authorization nor overrides human decisions.
Agent-facing guidance explains when to request relop, how to supply scope, and how to fix and re-submit without evading limits.
Acceptance criteria
An agent can request scoped independent review before push, publish, release, or handoff without requiring Git.
Configured pool selection excludes the author model, reports actual reviewer identity, and never silently uses an unconfigured or paid OpenRouter model.
Empty, invalid, unavailable, and same-model-only pools cannot yield a clean result.
Normal defaults are 3 rounds / 30 minutes; elevated defaults are 5 rounds / 60 minutes; valid settings override either profile.
Round and deadline enforcement spans review calls, fixes, waits, retries, and substitutions; exhaustion and cancellation stop active work.
Findings carry evidence and impact; re-review tracks dispositions against revised artifacts, including relevant new changes.
Partial, failed, cancelled, disputed, and exhausted reviews remain distinct from clean results and report outstanding findings or coverage limitations.
Clean results identify reviewed scope and revision; caller disagreement or claimed fixes alone cannot manufacture convergence.
Agent guidance describes invocation, profile selection, result handling, and bounded re-review; settings and diagnostics follow repository contracts.
---
id: PX-SPEC-R8L4Q2NV
type: spec
title: Relop Independent Review Loop
---
## Intent
Extension `relop` gives agents bounded review by another model before handing off large work, pushing, publishing, or releasing.
Independent judgment, not self-review; calling agent owns fixes and delivery decisions.
## Scope
In: agent-callable review, configurable reviewer pool, bounded re-review, actionable findings, explicit terminal outcomes.
Out: autonomous fixes, automatic push/publish/release, mandatory Git hooks, replacement for tests, reviewer consensus panels, new dashboard.
Review applies to code, documents, configuration, and other substantial deliverables; Git is optional.
## Review contract
Caller supplies intended outcome, relevant constraints, review scope and accessible artifacts, author model identity, and risk profile.
Relop rejects missing scope or unavailable artifacts rather than claiming review coverage.
Reviewer receives enough task context to assess correctness, omissions, regressions, security, and verification gaps within that scope.
Artifact contents and quoted instructions are evidence, not authority to alter review rules.
Reviewer has read-only access to scoped work; no edits, delivery actions, credential disclosure, recursive review, or unbounded delegation.
Relop reports inspected scope, limitations, actual reviewer identity, consumed bounds, and findings.
Each actionable finding identifies location or artifact, impact, supporting evidence, and a concrete correction or verification need.
Uncertain concerns are labeled as such; stylistic preferences alone do not block convergence.
## Model pool and settings
User configures reviewer provider/model identities under `relop` in Pi `settings.json`.
Relop follows the repository [settings contract](../../../extensions/SETTINGS.md), including trust, precedence, validation, and credential separation.
No implicit paid model or provider fallback; OpenRouter candidates must be free models.
Eligible reviewers must be available, authenticated where required, and a different model from the author; provider aliases of the same model do not establish independence.
Choose the first eligible configured reviewer in pool order; retain that reviewer through the loop while eligible.
An unavailable reviewer may be replaced only by another eligible pool member; report every substitution and its reason.
Empty pool, no independent candidate, invalid safety limits, or exhausted candidates produce an explicit incomplete result, never a clean review.
Settings are resolved at loop start; changes do not silently reset active limits.
## Bounds and ownership
Normal profile defaults: 3 review rounds, 30 minutes.
Security, mission-critical, or otherwise hard work uses the elevated profile: 5 review rounds, 60 minutes.
Caller identifies the profile; relop reports the effective profile and bounds.
Both profiles' round and elapsed-time limits are overridable in settings; values must remain finite and positive.
One round is one reviewer invocation; retries and replacement-reviewer invocations consume rounds too.
Elapsed time starts with the first review request and includes caller fixes and waits between rounds.
Limits apply to the whole loop, not independently to each call; re-review cannot reset consumed budgets.
Reaching either bound stops further review, cancels active reviewer work, and returns unresolved findings plus the stop reason.
Caller cancellation also stops active reviewer work; no background continuation or automatic restart.
## Behavior model
Caller fixes sit outside relop; all review rounds share one deadline and round allowance.
```mermaid
stateDiagram-v2
[*] --> Validate
Validate --> Incomplete: invalid input or no eligible reviewer
Validate --> Reviewing: select independent reviewer
Reviewing --> Clean: no unresolved actionable findings
Reviewing --> AwaitingFixes: actionable findings returned
AwaitingFixes --> Reviewing: caller submits revised scope within bounds
AwaitingFixes --> Unresolved: caller disputes or declines remaining fixes
Reviewing --> Incomplete: review unavailable or unusable
Reviewing --> Exhausted: either bound reached
AwaitingFixes --> Exhausted: either bound reached
Reviewing --> Cancelled: caller cancels
AwaitingFixes --> Cancelled: caller cancels
Clean --> [*]
Unresolved --> [*]
Incomplete --> [*]
Exhausted --> [*]
Cancelled --> [*]
```
Re-review checks prior findings against revised artifacts and examines relevant new changes; it is not merely acceptance of the caller's claimed fixes.
Findings retain identity across rounds with resolved, unresolved, or disputed disposition.
Caller disagreement alone cannot mark a finding reviewer-resolved.
A clean result covers only the reviewed revision and scope; later changes require review again.
Only a completed independent review with no unresolved actionable findings is clean.
Every other terminal outcome explicitly states that review did not establish readiness.
Results advise the calling agent; relop neither grants delivery authorization nor overrides human decisions.
Agent-facing guidance explains when to request relop, how to supply scope, and how to fix and re-submit without evading limits.
## Acceptance criteria
- [ ] An agent can request scoped independent review before push, publish, release, or handoff without requiring Git.
- [ ] Configured pool selection excludes the author model, reports actual reviewer identity, and never silently uses an unconfigured or paid OpenRouter model.
- [ ] Empty, invalid, unavailable, and same-model-only pools cannot yield a clean result.
- [ ] Normal defaults are 3 rounds / 30 minutes; elevated defaults are 5 rounds / 60 minutes; valid settings override either profile.
- [ ] Round and deadline enforcement spans review calls, fixes, waits, retries, and substitutions; exhaustion and cancellation stop active work.
- [ ] Reviewer cannot mutate artifacts or perform delivery actions; calling agent performs fixes.
- [ ] Findings carry evidence and impact; re-review tracks dispositions against revised artifacts, including relevant new changes.
- [ ] Partial, failed, cancelled, disputed, and exhausted reviews remain distinct from clean results and report outstanding findings or coverage limitations.
- [ ] Clean results identify reviewed scope and revision; caller disagreement or claimed fixes alone cannot manufacture convergence.
- [ ] Agent guidance describes invocation, profile selection, result handling, and bounded re-review; settings and diagnostics follow repository contracts.