بنقرة واحدة
review-scope
Canonical executable Pi scope resolver shared by PR-boundary review, /review, and /sdd clean.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Canonical executable Pi scope resolver shared by PR-boundary review, /review, and /sdd clean.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
SDD-mode PR-boundary review policy for Pi. The root launches visible reviewer lanes, publishes triage, ends the turn for acknowledgement, then fixes in a separate follow-up. Review is independent of CI.
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
Create a pull request with review, REQ backlinks, push, and CI handoff.
Verify a deployed UI in a browser for interaction, mobile layout, and visuals.
Workflow for /sdd clean — rescuing a rotted spec. Mode-aware behaviors (interactive/auto/unleashed), safety nets, what gets cleaned (incl. per-AC @impl AND @test anchor backfill at parity, gated by enforce_tdd), JUDGMENT auto-resolution rules. Invoked when /sdd clean runs. Requires the spec-driven-development skill for REQ format and Status semantics, and the spec-enforce skill family for the detection mechanics.
| name | review-scope |
| description | Canonical executable Pi scope resolver shared by PR-boundary review, /review, and /sdd clean. |
| version | 2.0.0 |
| disable-model-invocation | true |
Resolve one scope before any reviewer or enforcement pass starts. Return the scope, work set, and exact Git range in the first line of the report.
| Input | Resolved scope | Work set |
|---|---|---|
PR plan with review_range=<base>..<head> | diff | Changed hunks plus direct invalidations in the exact two-dot range |
| PR plan for full protected-base PR | diff | Changed hunks plus direct invalidations from merge base through PR head |
/review --diff | diff | Changed hunks plus direct invalidations in the command's PR-base diff |
/review --all | all | Whole requested repository |
/sdd clean --diff or --scope=diff | diff | Changed hunks plus direct invalidations in the command's diff |
/sdd clean --all or --scope=all | all | Whole SDD and documentation corpus |
The extension-level contract is { mode, workSet }, where workSet is changed-hunks-and-direct-invalidations for diff and whole-requested-tree for all.
For diff, validate the range and obtain the lane-owned file list and hunks in one call:
node ~/.pi/agent/skills/review-scope/scripts/build-review-packet.mjs \
--repo <absolute-root> --scope diff --range <base>..<head> --lane <code-reviewer|spec-reviewer|doc-updater>
For all, omit --range and pass --scope all. The packet contains:
files: lane-owned changed files (diff) or tracked lane files (all);patch: lane-owned changed hunks for diff, empty for all;changedInputs: cross-lane inputs as { path, hunks }, where each hunk carries exact old/new line ranges;Build and consume the packet in the same tool call. With ctx_execute, execute the seeded script inside the processing program and parse its stdout in memory. Without context-mode, the reviewer guard roots Bash in the caller-supplied repository before the command pipes the same CLI stdout into the equivalent Bash/Node processing program. Never persist the packet, return a packet path, or rebuild it in a later call. Both transports consume the same JSON contract and must emit identical scoped evidence.
A changed input path alone does not invalidate every anchor in that file. Resolve the anchored implementation symbol or named test block and pass its old/new line range to the packet module's exported changedInputIntersects(input, range) predicate; follow it only when that predicate returns true. Added or removed files use their non-zero side. Commands inspect the complete scoped packet internally and emit compact manifest failures and candidate snippets, not successful manifests or raw packet JSON.
scope=diff executionUse gather-then-reason evidence processing instead of alternating one read or search with one reasoning turn:
ctx_execute and Bash invoke the same seeded CLI and apply the same hunk-intersection rule; context-mode changes transport only. Every canonical policy is already embedded, so no policy retrieval call is needed.changedInputs[].hunks; do not emit raw packet JSON.ctx_batch_execute, ctx_search, query_scope=global, or marker-only commands to store and retrieve reviewer evidence. They duplicate prior output and can return incomplete search windows instead of the exact packet.Code review does not re-review SDD or documentation prose. Spec and documentation reviewers may use changedInputs only to verify anchors or owned contract impact.
scope=all executionWalk every packet file in the requested corpus and execute every applicable enforcement row. A zero-finding result means the entire declared tree was inspected. Process each packet file once, never re-read completed evidence, and use direct execution to emit compact counts and failures rather than full-file output.
Scope controls breadth only. It does not change severity, evidence, truth, or report-only restrictions. Never impose token, turn, tool, or concurrency limits as a substitute for scope.