SuperAPI AI Directory

quiz

General & other

View repository

Updated 10-16 08:10

About this skill

To prevent merging changes without a human understanding them,an explainer of the changes and an understanding-check quizare generated together as a single HTML file. The explainer part should be structured so it can be used as-is for sharing with stakeholders and building approval (pitch).

Arguments

$ARGUMENTS は <対象> [interactive] format.

  • <対象>: issue number / PR number / URL / empty. If empty, target the diff between the current branch and the base branch
  • interactive: if specified, after generating quiz.html, ask the questions one at a time via AskUserQuestion

Procedure

1. Determine the target and save location

/review Determine using the same rules as gh pr view <番号> : for a number, try tmp/prs/<PR番号>/, and if a PR exists, PR mode (save location tmp/issues/<issue番号>/)。URL は /pull/ か /issues/ ). If empty, determine based on whether the current branch has a PR.

2. Collect materials

  • diff: PR mode uses gh pr diff, local mode uses git diff <base>...HEAD(<base> は tmp/config.json の base_branch. If not present, detect the HEAD branch of git remote show origin and save)
  • Artifacts(use only those in the save destination directory): plan.md(spec/DoD) / report.md(implementation explainer) / implementation-notes.md(deviations from the plan) / review.md(review comments) — for all of these, read the html if there is no md / checklist.html(test results) / screenshots/(demo materials)
  • For files changed in the diff, read the relevant parts of the codebase as needed to grasp the context

3. Generate quiz.html

<保存先>/quiz.html に HTML Write it out with . Two parts:

First half: explainer (explainer / pitch) — Make it self-contained so that someone unfamiliar with the change can read it, understand the content, and make an approval decision.

  • Put the demo first: screenshots/ If present, embed the main screenshots at the beginning (show the moving thing first)
  • What the change is for (background/intent) / What was done (overall picture and intuitive explanation) / Correspondence with the spec (AC) / Deviations from the plan (Deviations) and their reasons / Main review comments and how they were addressed
  • Make the content such that it can be shared as-is on Slack / Discord etc. to gain buy-in

Second half: quiz — 5–10 questions on "what someone merging this change should be able to answer".

  • Question perspectives: reasons for implementation choices / handling of edge cases and error paths / ripple effects of the change (side effects) / points of deviation from the plan / key points of review comments
  • Answers and explanations should be collapsed with <details> Collapse with
  • Do not pad with trivial questions.Questions whose answers are necessary for the merge decisionNarrow down to

4. interactive mode

interactive When specified, present the generated quiz one question at a time as multiple-choice using AskUserQuestion. For each answer, return whether it is correct or incorrect along with an explanation, and at the end report the number of correct answers and the points that should be reviewed.

Notes

  • Even when there are no deliverables and only a diff, create explanations and quizzes from reading the diff and the codebase
  • interactive Except when specified, it completes without asking the user any questions (/dev may be executed as a subagent from)