Skip to content

Add interactive PR walkthrough workflow - #278

Merged
justin808 merged 3 commits into
mainfrom
jg-codex/pr-walkthrough-skill
Jul 28, 2026
Merged

Add interactive PR walkthrough workflow#278
justin808 merged 3 commits into
mainfrom
jg-codex/pr-walkthrough-skill

Conversation

@justin808

@justin808 justin808 commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • add a standalone $pr-walkthrough skill that explains one conceptual change at a time, including rationale, tradeoffs, risk, and proof
  • make merge_authority: ask automatically start a diff-identity walkthrough before its one final merge decision, using full coverage for large or complex PRs
  • keep walkthrough participation separate from review approval, refresh the diff identity and readiness gates afterward, and cover the contract with validation tests
  • update generated-goal guidance, inventories, and changelog

Design rationale

The walkthrough first maps the complete diff, then presents concepts in dependency order rather than making a human reconstruct intent from file order. Each step pauses for questions and explicit readiness. A private coverage ledger prevents a friendly narrative from silently omitting changed paths.

The approach draws on Google’s guidance to understand the broad change first, inspect important parts in a logical sequence, and capture both what changed and why; GitHub’s guidance to identify purpose, important files, and review order; and research showing that coherent change decomposition supports reviewer understanding.

Compatibility note

Existing merge_authority: ask users now receive a concise walkthrough before the final merge question; they can explicitly skip it. The compact generated prompt intentionally preserves the self-contained dispatch rule that reloads persisted state before preflight and persists output before resuming or launching work.

Verification

  • PR_BATCH_GIT_PROBE_TIMEOUT_SECONDS=30 bin/validate
  • standalone skill metadata validation (quick_validate.py)
  • targeted PR walkthrough contract, goal-completion, single-target entrypoint, metadata, plugin-manifest, host-adapter, prompt-size, and RuboCop checks

Summary by CodeRabbit

  • New Features

    • Added an interactive $pr-walkthrough skill that explains a pull request one conceptual change at a time (read-only), using an exact-diff “diff identity” with coverage tracking and refresh/invalidation when the diff changes.
    • Updated merge_authority: ask flows to automatically run the walkthrough after ordinary gates are clean, then request exactly one final merge decision (walkthrough is not merge approval), with concise/full modes for size/complexity.
  • Documentation

    • Documented the new skill and “ask” walkthrough behavior across READMEs and workflow/run guidance.
  • Tests

    • Extended validation and added contract coverage for exact-diff walkthrough and ask automation.

Completed-batch audit

Status: Clean — no outstanding findings or follow-ups. Durable receipt.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@justin808, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5edcf80b-c6bc-4b09-b553-d321a97af1bc

📥 Commits

Reviewing files that changed from the base of the PR and between 5df07f5 and dedd5af.

📒 Files selected for processing (6)
  • docs/pr-batch-skills.md
  • skills/plan-pr-batch/scripts/check_goal_prompt_size.rb
  • skills/pr-batch/SKILL.md
  • skills/pr-monitoring/SKILL.md
  • skills/pr-walkthrough/bin/pr-walkthrough-contract-test.rb
  • workflows/pr-processing.md

Walkthrough

Adds the $pr-walkthrough skill, its agent configuration and contract tests, and integrates exact-diff interactive walkthroughs into merge_authority: ask readiness, prompt templates, closeout flows, validation, and documentation.

Changes

PR walkthrough and merge-authority flow

Layer / File(s) Summary
Interactive walkthrough definition
skills/pr-walkthrough/SKILL.md, skills/pr-walkthrough/agents/openai.yaml, skills/pr-walkthrough/bin/*
Defines exact-diff resolution, conceptual-step mapping, interactive checkpoints, coverage tracking, stale-diff handling, and non-approval boundaries, with contract tests for the required text.
Ask-mode readiness and closeout
workflows/pr-processing.md, skills/pr-monitoring/SKILL.md, skills/pr-batch/SKILL.md
Starts the walkthrough after clean ordinary gates, avoids repeats for the same diff identity, supports skip/stop, refreshes readiness, and asks one final merge question only if the explained diff remains clean.
Prompt and workflow propagation
skills/plan-pr-batch/*, skills/pr-batch/SKILL.md, skills/triage/SKILL.md
Adds walkthrough instructions to generated prompts and validates required ask-mode phrases and continuation text.
Documentation and validation wiring
CHANGELOG.md, README.md, docs/*, bin/validate
Documents the new skill and ask-mode behavior and runs the walkthrough contract test during repository validation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Coordinator
  participant OrdinaryGates
  participant PRWalkthrough
  participant Readiness
  participant Human
  Coordinator->>OrdinaryGates: Run ordinary readiness gates
  OrdinaryGates->>Coordinator: Return clean gates
  Coordinator->>PRWalkthrough: Start exact-diff walkthrough
  PRWalkthrough->>Human: Present one conceptual change at a time
  Human->>PRWalkthrough: Continue, stop, or skip
  PRWalkthrough->>Readiness: Trigger diff identity and readiness refresh
  Readiness->>Coordinator: Return refreshed status
  Coordinator->>Human: Ask one final merge decision
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding an interactive PR walkthrough workflow.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-codex/pr-walkthrough-skill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@claude

claude Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review: Add interactive PR walkthrough workflow

Overview

This PR adds a new $pr-walkthrough skill (read-only, presents one conceptual change at a time with pauses for questions) and wires it into the merge_authority: ask path across pr-batch, plan-pr-batch, pr-monitoring, and workflows/pr-processing.md so that a walkthrough runs automatically after ordinary gates are clean, before the single final merge question. It also adds a Ruby contract test, updates the size-budget script, docs/README indices, and the changelog.

Strengths

  • Internally consistent. The new terse execution-rule line - ask=>exact-head $pr-walkthrough stepwise; full large/complex; refresh gates; one merge decision is duplicated character-for-character in pr-batch/SKILL.md, plan-pr-batch/SKILL.md, workflows/pr-processing.md, and required by check_goal_prompt_size.rb's required_all_prompt_phrases, plus documented in triage/SKILL.md — I checked all four occurrences and they match exactly.
  • Clear separation of concerns. SKILL.md repeatedly and explicitly states the walkthrough is not review, not approval, and not merge authorization ("Walkthrough participation is not merge approval" appears consistently in every call site), which avoids a plausible failure mode where an agent conflates "walked through" with "approved."
  • Stale-head handling is explicit: the skill requires re-detecting a changed head mid-walkthrough and rebuilding the map, and the ask gate integration separately requires refreshing head + readiness after the walkthrough and re-validating before the final merge question — good defense against a bait-and-switch diff.
  • Escape hatch exists: an explicit skip request is honored, and a walkthrough already completed for the same exact head isn't repeated, so this doesn't turn every ask-authority run into a mandatory multi-turn tour.
  • Test coverage: pr-walkthrough-contract-test.rb asserts both the skill's own contract text and that the three consuming docs contain the required "automatically start" / "full interactive mode" / "refresh the head and ordinary readiness" / "one final merge decision" phrases — I manually verified all the asserted substrings are present in the diff for workflows/pr-processing.md, skills/pr-batch/SKILL.md, and skills/pr-monitoring/SKILL.md.
  • Alphabetical placement in bin/validate and consistent agents/openai.yaml metadata format match repo conventions.

Notes / minor concerns

  • Behavior change for existing ask users: previously ask meant "ask exactly once at the final decision"; now it unconditionally inserts a walkthrough step first. This is clearly the intent of the PR, and it's escapable via explicit skip, but it's worth calling out in the PR description/release notes as a workflow behavior change for anyone already relying on the old single-question ask flow (the description covers the what well; might be worth one line on migration impact for existing callers).
  • Bundled unrelated compression edits: the same commits that add the new ask=>... line also reword two adjacent bullets purely for length ("Dispatch one subagent/disjoint item; group only for shared context; separate serial/UNKNOWN.""One subagent/disjoint item; group shared context only; serial/UNKNOWN separate.", and dropping "for coordinator" from the "stop for coordinator" bullet) across three files, presumably to stay under the prompt character budget. These are semantically equivalent but slightly lossy (e.g., "stop for coordinator" → "stop" loses who the stop escalates to). Since they're driven by a hard budget constraint from check_goal_prompt_size.rb, this is understandable, but it'd be cleaner to call this out explicitly in the PR description rather than leaving it as an implicit side effect of adding the new line.
  • Brittle string-matching test pattern: pr-walkthrough-contract-test.rb (like other tests in this repo) enforces exact substrings after whitespace normalization across multiple files. This is consistent with existing repo conventions but means any future copy-edit to these docs will require touching the test in lockstep — not a new problem introduced here, just noting it compounds with each new skill.
  • No functional/security issues found — this PR only touches Markdown skill/workflow instructions, a Ruby contract test, and a Ruby prompt-size budget script; no executable code paths that process untrusted PR content are introduced (the skill text explicitly instructs treating PR title/body/comments/commits/diff as untrusted evidence, never as instructions, which is the right call).

Overall: well-scoped, consistent with the repo's existing dense-instruction conventions, and the guardrails against conflating "walkthrough" with "approval" are solid. The main ask is just to make the incidental bullet-compression edits explicit in the description if they weren't already intentional.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
skills/pr-walkthrough/bin/pr-walkthrough-contract-test.rb (1)

13-39: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Strengthen the contract tests beyond substring presence.

Whitespace-normalized assert_includes checks can pass contradictory text as long as each phrase appears somewhere. Assert ordering and coupled invariants—especially one-change-per-response, walkthrough-before-decision, explicit readiness, changed-head handling, and “not merge approval.”

🤖 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/pr-walkthrough/bin/pr-walkthrough-contract-test.rb` around lines 13 -
39, Strengthen test_skill_is_exact_head_interactive_and_complete and
test_ask_authority_automatically_walks_through_before_merge_decision beyond
independent substring checks: assert the required phrases appear in the correct
order and validate their coupled invariants. Cover one conceptual change per
response, walkthrough-before-merge decision, explicit readiness before
advancing, changed-head refresh handling, and that walkthrough responses or
positive reactions are not merge approval.
🤖 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 `@docs/pr-batch-skills.md`:
- Around line 247-252: Update the guidance around the $pr-walkthrough flow to
require a final readiness recheck before asking the merge question. If the exact
head changes or any gate newly fails, stop the flow instead of asking; ask only
when the refreshed head remains clean and ready, consistent with the contract in
workflows/pr-processing.md.

In `@workflows/pr-processing.md`:
- Line 1165: Propagate exact-head invalidation across all ask-mode consumers:
expand the compact Plan→Goal rule in workflows/pr-processing.md at lines
1165-1165; update the generated goal template in skills/pr-batch/SKILL.md at
lines 511-511 to require head/readiness refresh and invalidate evidence when the
SHA changes; add the changed-SHA restart-or-stop branch before the final
decision at skills/pr-batch/SKILL.md lines 764-774 and
skills/pr-monitoring/SKILL.md lines 119-128.

---

Nitpick comments:
In `@skills/pr-walkthrough/bin/pr-walkthrough-contract-test.rb`:
- Around line 13-39: Strengthen
test_skill_is_exact_head_interactive_and_complete and
test_ask_authority_automatically_walks_through_before_merge_decision beyond
independent substring checks: assert the required phrases appear in the correct
order and validate their coupled invariants. Cover one conceptual change per
response, walkthrough-before-merge decision, explicit readiness before
advancing, changed-head refresh handling, and that walkthrough responses or
positive reactions are not merge approval.
🪄 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: 7037c616-e77c-480c-9206-1626c35bbd2a

📥 Commits

Reviewing files that changed from the base of the PR and between 7ef1dca and d1e0899.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • README.md
  • bin/validate
  • docs/README.md
  • docs/pr-batch-skills.md
  • skills/plan-pr-batch/SKILL.md
  • skills/plan-pr-batch/scripts/check_goal_prompt_size.rb
  • skills/pr-batch/SKILL.md
  • skills/pr-monitoring/SKILL.md
  • skills/pr-walkthrough/SKILL.md
  • skills/pr-walkthrough/agents/openai.yaml
  • skills/pr-walkthrough/bin/pr-walkthrough-contract-test.rb
  • skills/triage/SKILL.md
  • workflows/pr-processing.md

Comment thread docs/pr-batch-skills.md Outdated
Comment thread workflows/pr-processing.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d1e0899eb4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/pr-walkthrough/SKILL.md Outdated
@justin808

Copy link
Copy Markdown
Member Author

Address-review pass complete for the full review history.

  • Fixed: walkthrough freshness now tracks base/effective merge-base plus head, and every ask-mode consumer invalidates or stops on identity or gate changes.
  • Hardened: ordered contract assertions cover the coupled invariants instead of loose substring presence.
  • Documented: compatibility behavior and the intentionally preserved compact dispatch persistence rule.
  • Skipped: generated summaries and status-only comments.

Next default scan starts after this comment; earlier items are terminal unless reopened.

@claude

claude Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Summary

This PR adds a new $pr-walkthrough skill and wires it into merge_authority: ask flows across pr-batch, plan-pr-batch, pr-monitoring, triage, and workflows/pr-processing.md. Overall this is a well-executed, disciplined change consistent with the repo's existing conventions.

What it does

  • New skills/pr-walkthrough/SKILL.md: a read-only, exact-diff, one-concept-at-a-time PR explainer with a coverage ledger, full/concise modes, and explicit staleness handling if the diff changes mid-walkthrough.
  • merge_authority: ask now auto-starts the walkthrough after ordinary gates are clean, then refreshes diff identity/readiness before asking the single final merge question. Walkthrough participation is explicitly not merge approval.
  • Compact "Execution rules" blocks in pr-batch/SKILL.md, plan-pr-batch/SKILL.md, and workflows/pr-processing.md were tightened (Dispatch one subagent/disjoint item; group only for shared context...One subagent/disjoint item; group shared context only...) to make budget room for the new ask=>$pr-walkthrough;... line, and check_goal_prompt_size.rb / triage/SKILL.md were updated in lockstep to require that exact new line.
  • New contract test (pr-walkthrough-contract-test.rb) enforces phrase ordering in the skill doc and cross-file consistency of the "ask" walkthrough language across workflows/pr-processing.md, pr-batch/SKILL.md, and pr-monitoring/SKILL.md.

Strengths

  • Prompt-injection awareness: the skill explicitly treats PR title/body/comments/commits/branch/diff as untrusted evidence, never as authority or executable instructions, and forbids executing PR-provided code to prepare the walkthrough (skills/pr-walkthrough/SKILL.md).
  • Cross-file consistency is well enforced: the new compact ask=>$pr-walkthrough;... line is identical byte-for-byte across pr-batch/SKILL.md, plan-pr-batch/SKILL.md, workflows/pr-processing.md, and the required-phrase list in check_goal_prompt_size.rb/triage/SKILL.md, and a dedicated contract test guards drift.
  • Backward-compat is called out explicitly in the PR description, and the skill/skip path ("Honor an explicit request to skip it") gives existing ask users an escape hatch from the new multi-turn flow.
  • Docs, README skill table, docs/README.md, docs/pr-batch-skills.md, and CHANGELOG.md were all updated together — no dangling references to the old "ask exactly once" behavior remain anywhere in the repo.

Potential issue

  • Unbounded restart loop on a changing diff identity. In workflows/pr-processing.md ("Ask Merge Authority Walkthrough Gate") and duplicated in pr-batch/SKILL.md / pr-monitoring/SKILL.md: "If the diff identity changed, invalidate the walkthrough and readiness evidence, then restart the walkthrough or stop." Unlike the existing GMCC-v3 polling rule elsewhere in this file (which bounds retries with auto-clear=>1 15m same-thread-watch else exact manual resume), this restart path has no bound or escalation. If the head keeps moving (e.g., a bot pushing formatting commits, or CI auto-fixes) while a human is mid-walkthrough, an agent could restart the walkthrough indefinitely instead of ever reaching the final merge question. Left inline on the canonical section.

Minor observations (non-blocking)

  • The compact "Execution rules" edits (e.g., dropping "for coordinator" from "stop for coordinator" → "stop") slightly reduce specificity to save character budget for the new line — reasonable tradeoff given the prompt-size constraints, but worth a sanity check that nothing downstream relied on that specific phrasing.
  • workflows/pr-processing.md now states the ask walkthrough contract in three places (compact "Goal completion contract" bullet, the new "Ask Merge Authority Walkthrough Gate" section, and the compact ask=>$pr-walkthrough;... execution-rules line). This mirrors the existing pattern for the "Autonomous Merge Eligibility Gate," so it's consistent with repo style, but it does mean any future wording tweak needs to touch three synchronized spots (plus the two other SKILL.md files) — the new contract test at least catches drift across files, though not necessarily semantic drift within one file.

No security, correctness, or test-coverage blockers found. Verification claims in the PR description (bin/validate, targeted contract tests) look consistent with the actual changes.

Comment thread workflows/pr-processing.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5df07f548b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread workflows/pr-processing.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@skills/plan-pr-batch/scripts/check_goal_prompt_size.rb`:
- Around line 158-163: Update the compact contract string
GOAL_MODE_COMPACT_CONTRACT to include the walk-through contract phrase required
by pr-walkthrough-contract-test.rb. Preserve the existing sequencing and
merge-approval wording while adding the missing phrase so the validated batch
goal prompt passes.

In `@skills/pr-batch/SKILL.md`:
- Around line 765-774: The final merge-decision condition in the PR walkthrough
flow must allow an explicitly skipped walkthrough. Update the logic around the
walkthrough completion/skip handling so the final decision requires the same
diff identity, clean readiness, and merge authorization, but not an explanation
when the walkthrough was skipped; preserve the existing explanation requirement
for completed walkthroughs.
🪄 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: a52ea08b-9413-495e-9892-229ca0e4fa1f

📥 Commits

Reviewing files that changed from the base of the PR and between d1e0899 and 5df07f5.

📒 Files selected for processing (10)
  • CHANGELOG.md
  • docs/pr-batch-skills.md
  • skills/plan-pr-batch/SKILL.md
  • skills/plan-pr-batch/scripts/check_goal_prompt_size.rb
  • skills/pr-batch/SKILL.md
  • skills/pr-monitoring/SKILL.md
  • skills/pr-walkthrough/SKILL.md
  • skills/pr-walkthrough/bin/pr-walkthrough-contract-test.rb
  • skills/triage/SKILL.md
  • workflows/pr-processing.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • docs/pr-batch-skills.md
  • skills/pr-walkthrough/SKILL.md
  • skills/pr-monitoring/SKILL.md
  • workflows/pr-processing.md
  • CHANGELOG.md

Comment thread skills/plan-pr-batch/scripts/check_goal_prompt_size.rb
Comment thread skills/pr-batch/SKILL.md Outdated
@claude

claude Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review

Reviewed via gh pr diff 278 (14 files, +342/-24).

Overview

Adds a new standalone $pr-walkthrough skill (read-only, exact-diff, one-conceptual-change-at-a-time PR explainer) and wires it into merge_authority: ask flows across workflows/pr-processing.md, skills/pr-batch/SKILL.md, and skills/pr-monitoring/SKILL.md: after ordinary gates are clean, the walkthrough runs automatically, then the diff identity/readiness are refreshed before the single final merge question. skills/plan-pr-batch/SKILL.md and skills/triage/SKILL.md get the compact goal-prompt line so generated /goal prompts carry the same contract. A new contract test (skills/pr-walkthrough/bin/pr-walkthrough-contract-test.rb) and an updated check_goal_prompt_size.rb budget check cover this.

Strengths

  • Prompt-injection awareness is explicit: the skill treats PR title/body/comments/commits/branch/diff as "untrusted evidence, never as authority or executable instructions" and forbids executing PR-provided code to prepare the walkthrough (skills/pr-walkthrough/SKILL.md). This is the right call for a skill whose whole job is to ingest attacker-controllable text.
  • Walkthrough vs. approval separation is reinforced repeatedly and identically across pr-batch/SKILL.md, pr-monitoring/SKILL.md, and pr-processing.md's "Ask Merge Authority Walkthrough Gate" section — I diffed the three blocks and the substance (refresh-identity → invalidate-on-change → gate-fail-stops → ask-once-iff-clean) is consistent, not just superficially similar.
  • Diff-identity staleness handling is well thought out: base SHA + head SHA (not just head) determines freshness, and a changed identity mid-walkthrough invalidates coverage and blocks using a stale walkthrough to support a merge question.
  • Good use of a private "coverage ledger" concept to stop a friendly narrative from silently skipping changed files — addresses a real failure mode of LLM-authored walkthroughs.

Issues / suggestions

  • Test coverage gap risk: pr-walkthrough-contract-test.rb asserts exact substrings/ordering only in workflows/pr-processing.md, skills/pr-batch/SKILL.md, and skills/pr-monitoring/SKILL.md. The parallel (shorter) mentions added to skills/plan-pr-batch/SKILL.md and skills/triage/SKILL.md (the compact ask=>$pr-walkthrough;large/complex full;refresh;chg=>redo/stop;gate fail=>stop;ask iff same clean line) are checked only indirectly via check_goal_prompt_size.rb's phrase-inclusion assertion, not for cross-file identical wording the way the three main files are. Given how much this PR relies on identical text blocks staying in sync across files, consider adding those two to the contract test (or a follow-up) so a future edit to one copy is guaranteed to be caught.
  • Duplication maintenance burden: the ~15-line "ask" walkthrough paragraph is now hand-duplicated near-verbatim in 3+ places (plus a compact form in 3 more). This matches the repo's existing pattern for other contracts (e.g. GMCC-v3), so it's consistent with convention, but it does mean any future wording tweak requires updating 6 files and the test knows to check only 3 of them for exact phrasing.
  • Minor: skills/pr-walkthrough/agents/openai.yaml omits the # Codex UI metadata for skill picker display text and default prompt. leading comment that several (but not all) sibling openai.yaml files have (e.g. pr-batch, adversarial-pr-review). Not a functional issue since the convention is already inconsistent repo-wide, just a nit if you want strict uniformity.

Security

No concerns beyond what's already called out as a strength above — the untrusted-input handling for the walkthrough's own inputs (PR text/diff) is appropriately cautious, and the skill is explicitly scoped read-only with no merge/approval authority.

Test coverage

bin/validate is updated to run the new contract test and the existing prompt-size budget check picks up the new compact line. I did not execute the Ruby tests in this sandbox (execution required approval I couldn't grant), but the test logic itself is sound (ordered substring assertions matching the actual prose added).

Copy link
Copy Markdown
Member Author

Final review wave triaged on dedd5af.

  • Fixed: explicit skips use the unchanged recorded diff identity; completed walkthroughs still require the explained identity.
  • Verified/no change: the compact walkthrough contract is separately enforced in every generated template; CodeRabbit withdrew that finding.
  • Kept minimal: no retry/timer machinery, duplicate-text refactor, extra metadata comment, or redundant compact-copy test was added. Existing fail-closed stop behavior and contract coverage are sufficient for this PR.
  • Current state: Claude, CodeRabbit, hosted validation, independent checker, and all review threads are clean.

Next default scan starts after this comment; earlier items are terminal unless reopened.

@justin808
justin808 merged commit 84a0e8c into main Jul 28, 2026
9 checks passed
@justin808
justin808 deleted the jg-codex/pr-walkthrough-skill branch July 28, 2026 10:44
@justin808

Copy link
Copy Markdown
Member Author

Completed-batch audit: replay evidence follows.

justin808 added a commit that referenced this pull request Jul 31, 2026
…erge-hardening

* origin/main:
  Preserve unrelated skills in plugin-companion mode (#253)
  Add interactive PR walkthrough workflow (#278)
  Resolve trusted bare bot aliases canonically (#270)

# Conflicts:
#	CHANGELOG.md
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.

1 participant