SKILL.md
SKILL.mdBrowse 11 files
721 tokens
3,067 bytes
Token encoding: o200k_base
Snapshot fac8604
1---2name: review-fetch-phase3description: Fetches canonical PR review state and renders derived state artifacts. Use when the user wants the state acquisition phase only (fetch, render, summarize) for a review-framework PR.4argument-hint: "[pr-url] [output-dir]"5---6 7# Review Fetch Phase8 9Run only the state acquisition phase of the review-framework loop:10 11fetch canonical review state JSON (v2), validate it, and render all derived artifacts via scripts.12 13Run commands from this skill directory. All script paths below are relative to it.14 15## Inputs16 17- Required:18 - PR URL (for example: `https://github.com/OWNER/REPO/pull/123`)19- Optional:20 - output directory21 22If output directory is omitted, derive:23 24`wip/reviews/<owner>_<repo>_pr-<number>/`25 26## Behavior27 281. Validate and parse PR URL, then compute deterministic paths:29 - `<output-dir>/review-state.json`30 - `<output-dir>/review-state.md`31 - `<output-dir>/summary.txt`32 - `<output-dir>/review-targets.json`332. Ensure `<output-dir>` exists.343. Enforce artifact safety before generation (the artifacts must stay untracked). In a git checkout the guard asks git directly; in a Jujutsu workspace with no git directory it accepts a directory under the workspace root's ignored `wip/` tree:35 36```bash37node ./scripts/guard-review-artifacts-ignored.mjs --dir <output-dir>38```39 404. Run fetch script to produce canonical JSON:41 42```bash43node ./scripts/fetch-review-state.mjs --pr <PR_URL> --out-json <output-dir>/review-state.json44```45 465. Validate canonical JSON before deriving additional files:47 48```bash49node ./scripts/validate-review-state.mjs --in <output-dir>/review-state.json50```51 526. Render markdown from canonical JSON:53 54```bash55node ./scripts/render-review-state.mjs --in <output-dir>/review-state.json --out <output-dir>/review-state.md56```57 587. Generate text summary from canonical JSON:59 60```bash61node ./scripts/summarize-review-state.mjs --in <output-dir>/review-state.json --format text --out <output-dir>/summary.txt62```63 648. Extract deterministic triage targets for downstream bootstrap:65 66```bash67node ./scripts/extract-review-targets.mjs --in <output-dir>/review-state.json --out <output-dir>/review-targets.json68```69 70Target extraction includes:71- unresolved review threads72- pull-request reviews with body text73- issue comments with body text74 75## Schema contract76 77- `review-state.json` is canonical and must be schema version `2`.78- No backward compatibility is provided for v1 artifacts.79- Derived artifacts (`review-state.md`, `summary.txt`, `review-targets.json`) are regenerable from canonical JSON.80- Review artifacts are generated files and must remain untracked in git.81 82## Error handling83 84- Treat fetch failures as operational errors.85- If `gh api` fails with TLS/cert errors in sandbox (`x509` / `OSStatus -26276`), fail fast and instruct rerun outside sandbox.86- Never disable TLS verification.87 88## Output to user89 90Return artifact paths:91 92- `review-state.json`93- `review-state.md`94- `summary.txt`95- `review-targets.json`96 97Suggest next step:98 99- `/review-triage-phase <PR_URL> [output-dir]`100 Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.