mcpField
P
prepare-for-review

prepare-for-review

github.com/opengovsgDevelopment136 installsUpdated 6w ago
Repository

About prepare-for-review

An author-side skill that assembles review rationale from breadcrumbs, ADRs, and specs into a proposed PR body and inline comments. It previews the result and push plan, then opens the PR only after explicit approval.

Key features

  1. 01Collects rationale from project records
  2. 02Builds PR body from a template
  3. 03Prepares breadcrumb-based inline comments
  4. 04Handles frontend screenshots
  5. 05Requires approval before pushing and opening a PR

Use cases

  1. 01Prepare rationale for reviewers
  2. 02Draft inline comments from decision breadcrumbs
  3. 03Review a PR package before publishing

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/opengovsg/formsg-ai --skill prepare-for-review

After installing, type/prepare-for-reviewin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

SCREENSHOTS.md
TEMPLATE.md
agents/
openai.yaml

Details

From the project README

Prepare for Review

Author-side companion to review. Moves rationale from where it was captured (breadcrumbs, ADRs, the spec) into where reviewers look (PR body, inline comments). Does not generate rationale — empty sources produce omitted sections.

Requires docs/agents/ticket-tracker.md and docs/agents/decisions-breadcrumb.md. Run /setup-formsg-ai-skills if missing.

Workflow

  1. Pin the fixed point — use user-supplied ref, else main. Capture git diff <fixed-point>...HEAD and git log <fixed-point>..HEAD --oneline.

  2. Collect rationale sources

    • Breadcrumbs: .scratch/<feature>/decisions.md (optional)
    • ADRs: docs/adr/ files touching paths in the diff
    • Spec/ticket: from commit message refs via docs/agents/ticket-tracker.md, else .scratch/<feature>/SPEC.md. Ask user if absent.
  3. Assemble PR body — follow TEMPLATE.md. Omit any sub-section whose source is empty.

  4. Screenshots (frontend only) — if diff touches frontend files, follow SCREENSHOTS.md.

  5. Build inline comments — one comment per kind: inline breadcrumb: { file, line, body }. Surface malformed entries (missing file/line) to user.

  6. Preview — show assembled body, inline comment list, and push plan. Wait for explicit approval.

  7. Open PR — after approval:

    • git push -u origin <branch> if no upstream, else git push
    • gh pr create --title "<title>" --body-file <tmp>
    • Post each inline comment via gh api repos/{owner}/{repo}/pulls/{n}/comments
    • Print PR URL

Comments

Markdown supported