SuperAPI AI Directory

prepare-for-review

Coding & development

View repository

Updated 10-16 03:11

About this skill

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.

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

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

  3. 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