Skip to content

Document reliable Codex review-fix loops#46

Merged
khaliqgant merged 4 commits into
mainfrom
codex/review-fix-signoff-loop-skill
May 16, 2026
Merged

Document reliable Codex review-fix loops#46
khaliqgant merged 4 commits into
mainfrom
codex/review-fix-signoff-loop-skill

Conversation

@kjgbot
Copy link
Copy Markdown
Contributor

@kjgbot kjgbot commented May 16, 2026

Summary

  • document Codex auth probing for review/fix loop preflight
  • recommend non-interactive Codex workers plus artifact verification for bounded fixer steps
  • document clearing START_FROM/PREVIOUS_RUN_ID after resumed loop iterations

Testing

  • not run; documentation-only skill update

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fe8a2a54-8b1a-4162-83f4-b3ae3350c0fa

📥 Commits

Reviewing files that changed from the base of the PR and between bcf3165 and 14af347.

📒 Files selected for processing (3)
  • README.md
  • prpm.json
  • skills/writing-agent-relay-workflows/SKILL.md
✅ Files skipped from review due to trivial changes (2)
  • README.md
  • prpm.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/writing-agent-relay-workflows/SKILL.md

📝 Walkthrough

Walkthrough

Adds a new review-fix-signoff-loop skill document, registers and bumps package versions in prpm.json and README.md, and updates writing-agent-relay-workflows/SKILL.md with Codex preset and preflight-check guidance.

Changes

Review-Fix-Signoff Loop Skill Introduction

Layer / File(s) Summary
Review-fix-signoff loop workflow specification
skills/review-fix-signoff-loop/SKILL.md
New 168-line skill documentation describes a deterministic review→fix→validation→dual-signoff workflow pattern with strict verdict contract, fresh-context iteration mechanics, Codex worker fixer verification, PR signoff comment mechanics, blocked-state handling, and common failure modes.
Skill package registration and README updates
prpm.json, README.md
prpm.json updates: bumps writing-agent-relay-workflows to 1.6.12 and adds review-fix-signoff-loop v1.0.1; README.md updates the Published Skills table to reflect writing-agent-relay-workflows v1.6.12 and review-fix-signoff-loop v1.0.1.
Workflow documentation updates for Codex patterns
skills/writing-agent-relay-workflows/SKILL.md
Adds guidance recommending non-interactive Codex presets (worker/reviewer/analyst) for bounded one-artifact steps, common-mistakes entries on interactive PTY/verification and Codex login preflight probes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • AgentWorkforce/skills#45: Adds the same review-fix-signoff-loop skill and related registration/README updates.
  • AgentWorkforce/skills#27: Modifies skills/writing-agent-relay-workflows/SKILL.md with overlapping workflow documentation changes.
  • AgentWorkforce/skills#29: Updates writing-agent-relay-workflows documentation and bumps its package version in prpm.json.

Poem

🐰 I hop through checks with careful cheer,
Two verdicts asked, both crystal clear.
Fix, validate, then sign again,
Fresh contexts closing every pen.
A rabbit nods — the loop's complete.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: documenting Codex review-fix loops including auth probing, non-interactive worker recommendations, and iteration handling.
Description check ✅ Passed The description is directly related to the changeset, covering the three main documentation updates: Codex auth probing, non-interactive workers with verification, and START_FROM/PREVIOUS_RUN_ID clearing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/review-fix-signoff-loop-skill

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (4)
skills/review-fix-signoff-loop/SKILL.md (4)

75-103: ⚡ Quick win

Align the example code with the implementation guidance.

The example at line 82 calls clearStartFromAfterResumedIteration() but this function is never defined. The actual implementation is described later at lines 102-103 as deleting process.env.START_FROM and process.env.PREVIOUS_RUN_ID.

Consider either:

  1. Implementing the function in the example, or
  2. Replacing the function call with the actual deletion code
🔧 Suggested fix - Option 2 (inline the logic)
 for (let iteration = 1; ; iteration += 1) {
   await runIteration(iteration, runStamp); // new workflow name, channel, and agent names
-  clearStartFromAfterResumedIteration();
+  // Clear START_FROM after resumed iteration to prevent skipping review/validation in next iteration
+  delete process.env.START_FROM;
+  delete process.env.PREVIOUS_RUN_ID;
   if (hasDualSignoff(iteration)) {
     writeAndPostSignoffReport(iteration);
     break;
   }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/review-fix-signoff-loop/SKILL.md` around lines 75 - 103, The example
references a non-existent helper clearStartFromAfterResumedIteration(); fix by
either implementing that helper or inlining the described cleanup: after a
resumed iteration remove process.env.START_FROM and process.env.PREVIOUS_RUN_ID
(or equivalent env keys) before continuing the outer loop; if you add the
helper, name it clearStartFromAfterResumedIteration and have it delete those two
env vars and be invoked in the example loop where currently called so the
example matches the implementation guidance.

18-18: 💤 Low value

Clarify the model placeholder in the Codex preflight example.

The preflight probe command uses -m <supported-model> as a placeholder, but doesn't specify which model to actually use. Consider providing a concrete example using a model constant (e.g., CodexModels.GPT_5_4) or explaining that any valid model will work for the probe.

📝 Suggested clarification
-   - Probe the CLIs used by later agent steps. For Codex, `codex login status` is not enough; run a tiny `codex exec --ephemeral --json --sandbox read-only -m <supported-model>` prompt and fail early with a clear re-login instruction if it cannot return the expected token.
+   - Probe the CLIs used by later agent steps. For Codex, `codex login status` is not enough; run a tiny `codex exec --ephemeral --json --sandbox read-only -m gpt-5.4` prompt (or any supported model) and fail early with a clear re-login instruction if it cannot return the expected token.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/review-fix-signoff-loop/SKILL.md` at line 18, Update the preflight
probe text to replace the ambiguous placeholder "-m <supported-model>" with a
concrete example and note that any valid model works; specifically mention using
a known constant like "CodexModels.GPT_5_4" (or show the concrete model name) in
the example `codex exec --ephemeral --json --sandbox read-only -m ...` command
and add a short parenthetical that other valid model names can be used for the
probe so readers know both a recommended default and that substitution is
allowed.

151-160: ⚡ Quick win

Consider clarifying how BLOCKED_NO_COMMIT.md should be detected.

The section explains what to write in BLOCKED_NO_COMMIT.md when blocked, but doesn't explain how the workflow should detect and react to this file. Consider adding guidance on checking for this artifact before commit/push steps.

For example:

// Before commit step:
.step('check-not-blocked', {
  type: 'deterministic',
  command: `test ! -f .workflow-artifacts/<workflow>/iteration-N/BLOCKED_NO_COMMIT.md || (echo "Workflow is blocked"; exit 1)`,
  failOnError: true,
})
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/review-fix-signoff-loop/SKILL.md` around lines 151 - 160, Add a
deterministic pre-commit check that detects the presence of
.workflow-artifacts/<workflow>/iteration-N/BLOCKED_NO_COMMIT.md and aborts the
run if found: implement a step (e.g., step named "check-not-blocked") that runs
a filesystem check for BLOCKED_NO_COMMIT.md and fails/throws before any
commit/push/post-success actions; reference the step symbol
step('check-not-blocked') and ensure it runs prior to commit/push/post-success
steps so the workflow will not continue when a BLOCKED_NO_COMMIT.md artifact
exists.

49-66: ⚡ Quick win

Consider adding a complete verdict example.

The Verdict Contract section defines the field structure but doesn't show what a complete verdict looks like in practice. Adding example outputs for both COMPREHENSIVELY_SATISFIED and FINDINGS verdicts would help implementers understand the exact format.

For example:

Example satisfied verdict:
VERDICT: COMPREHENSIVELY_SATISFIED
why_passed: All spec requirements implemented and validated
end_to_end_wiring_verified: yes, confirmed via integration tests
deterministic_evidence: test-output.log, validation-report.md
remaining_risks: none

Example findings verdict:
VERDICT: FINDINGS
finding_id: auth-error-handling-001
severity: high
file: src/auth/provider.ts
issue: Missing null check on token refresh
fix_required: Add guard clause before token.refresh() call
test_required: Add unit test for null token case
evidence: Line 45 in src/auth/provider.ts
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/review-fix-signoff-loop/SKILL.md` around lines 49 - 66, Add two
concrete example verdicts to the "Verdict Contract" section to show exact output
formats for both success and findings cases: include a full
COMPREHENSIVELY_SATISFIED example with VERDICT, why_passed,
end_to_end_wiring_verified, deterministic_evidence, remaining_risks fields and a
FINDINGS example with VERDICT, finding_id, severity, file, issue, fix_required,
test_required, evidence fields; place these examples immediately after the
existing contract block in SKILL.md and ensure they strictly follow the text
contract field names and casing so deterministic gates (the VERDICT token and
field keys) can parse them reliably.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@skills/review-fix-signoff-loop/SKILL.md`:
- Around line 75-103: The example references a non-existent helper
clearStartFromAfterResumedIteration(); fix by either implementing that helper or
inlining the described cleanup: after a resumed iteration remove
process.env.START_FROM and process.env.PREVIOUS_RUN_ID (or equivalent env keys)
before continuing the outer loop; if you add the helper, name it
clearStartFromAfterResumedIteration and have it delete those two env vars and be
invoked in the example loop where currently called so the example matches the
implementation guidance.
- Line 18: Update the preflight probe text to replace the ambiguous placeholder
"-m <supported-model>" with a concrete example and note that any valid model
works; specifically mention using a known constant like "CodexModels.GPT_5_4"
(or show the concrete model name) in the example `codex exec --ephemeral --json
--sandbox read-only -m ...` command and add a short parenthetical that other
valid model names can be used for the probe so readers know both a recommended
default and that substitution is allowed.
- Around line 151-160: Add a deterministic pre-commit check that detects the
presence of .workflow-artifacts/<workflow>/iteration-N/BLOCKED_NO_COMMIT.md and
aborts the run if found: implement a step (e.g., step named "check-not-blocked")
that runs a filesystem check for BLOCKED_NO_COMMIT.md and fails/throws before
any commit/push/post-success actions; reference the step symbol
step('check-not-blocked') and ensure it runs prior to commit/push/post-success
steps so the workflow will not continue when a BLOCKED_NO_COMMIT.md artifact
exists.
- Around line 49-66: Add two concrete example verdicts to the "Verdict Contract"
section to show exact output formats for both success and findings cases:
include a full COMPREHENSIVELY_SATISFIED example with VERDICT, why_passed,
end_to_end_wiring_verified, deterministic_evidence, remaining_risks fields and a
FINDINGS example with VERDICT, finding_id, severity, file, issue, fix_required,
test_required, evidence fields; place these examples immediately after the
existing contract block in SKILL.md and ensure they strictly follow the text
contract field names and casing so deterministic gates (the VERDICT token and
field keys) can parse them reliably.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 167f4e19-e1cb-444a-8542-dda87532b9d8

📥 Commits

Reviewing files that changed from the base of the PR and between da933ed and ed5a013.

📒 Files selected for processing (4)
  • README.md
  • prpm.json
  • skills/review-fix-signoff-loop/SKILL.md
  • skills/writing-agent-relay-workflows/SKILL.md

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
prpm.json (1)

134-134: ⚡ Quick win

Consider bumping the collection version.

The agent-relay-starter collection remains at version 1.0.3 despite adding a new package. Standard practice is to increment the collection version (at minimum a patch bump to 1.0.4) when modifying its package list, even for optional packages. This helps consumers track collection changes.

📦 Proposed version bump
-      "version": "1.0.3",
+      "version": "1.0.4",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prpm.json` at line 134, The collection version in prpm.json (the "version"
field) was not updated after adding a package to the agent-relay-starter
collection; update the "version" value from "1.0.3" to a new patch (e.g.,
"1.0.4") so consumers can detect the change—edit the "version" property in
prpm.json for the agent-relay-starter collection and commit the bump.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@prpm.json`:
- Line 112: Update the ambiguous "Ricky" reference inside the prpm.json
"description" field: either replace "Ricky workflows" with a clear, documented
term such as "Agent Relay" or "iterative review/fix/validation workflow" and
update the description string accordingly, or add a short doc entry that defines
what "Ricky workflows" are and reference that doc from the description; modify
the "description" value to use the clarified term and, if you choose docs, add a
link/identifier to the new documentation so other developers can find the
definition.

---

Nitpick comments:
In `@prpm.json`:
- Line 134: The collection version in prpm.json (the "version" field) was not
updated after adding a package to the agent-relay-starter collection; update the
"version" value from "1.0.3" to a new patch (e.g., "1.0.4") so consumers can
detect the change—edit the "version" property in prpm.json for the
agent-relay-starter collection and commit the bump.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f5c83e6-c3d4-4ee6-b7e5-a464d7ab90ad

📥 Commits

Reviewing files that changed from the base of the PR and between ed5a013 and bcf3165.

📒 Files selected for processing (1)
  • prpm.json

Comment thread prpm.json
…off-loop-skill

# Conflicts:
#	README.md
#	prpm.json
#	skills/review-fix-signoff-loop/SKILL.md
#	skills/writing-agent-relay-workflows/SKILL.md
@khaliqgant khaliqgant merged commit 15e2bd3 into main May 16, 2026
2 checks passed
@khaliqgant khaliqgant deleted the codex/review-fix-signoff-loop-skill branch May 16, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants