From principled-quality
Surface the proposals, plans, and ADRs relevant to a pull request's changed files. Maps files to modules, finds specification documents, and presents a concise summary of the review context.
How this skill is triggered — by the user, by Claude, or both
Slash command
/principled-quality:review-contextThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Surface the specification context a reviewer needs for a pull request. Lists changed files, maps them to modules, and identifies relevant proposals, plans, and ADRs.
Surface the specification context a reviewer needs for a pull request. Lists changed files, maps them to modules, and identifies relevant proposals, plans, and ADRs.
/review-context <pr-number>
| Argument | Required | Description |
|---|---|---|
<pr-number> | Yes | The GitHub PR number to analyze for context. |
gh CLI must be installed and authenticatedVerify prerequisites. Check that gh is available and authenticated:
bash scripts/check-gh-cli.sh
Get changed files. List all files changed in the PR:
gh pr diff <pr-number> --name-only
Map files to modules. For each changed file, identify its module:
bash scripts/map-files-to-modules.sh --files <comma-separated-files>
This walks up from each file to the nearest CLAUDE.md and extracts the module type.
Find relevant specifications. For each unique module identified:
docs/proposals/ (and module-level docs/proposals/ if it exists) for RFCs that reference the module or its components.docs/plans/ for active plans that reference the module. Check PR description for explicit plan references (e.g., Plan-NNN).docs/decisions/ for ADRs relevant to the module scope. Read each ADR's title and decision summary.Check PR description for references. Parse the PR title and body for explicit principled document references:
RFC-NNN or Proposal-NNN patternsPlan-NNN or Plan-NNN (task X.Y) patternsADR-NNN patternsdocs/proposals/*.md, docs/plans/*.md, docs/decisions/*.mdPresent the context summary. Output a structured summary:
Review Context for PR #42: "Add widget error handling"
Modules touched:
- src/widgets/ (lib) — 5 files changed
- src/core/ (core) — 1 file changed
Linked specifications (from PR description):
- Plan-005 (task 2.1): Widget error handling
- RFC-003: Principled Quality Plugin
Relevant ADRs:
- ADR-003: Module type declaration via CLAUDE.md
- ADR-005: Pre-commit framework for git hooks
Related proposals:
- RFC-001: Widget system design (accepted)
Related plans:
- Plan-005: Widget improvements (active)
Tasks touching these modules: 2.1, 2.3, 3.1
Files by module:
src/widgets/:
- src/widgets/error-handler.ts (new)
- src/widgets/widget.tsx (modified)
- src/widgets/widget.test.ts (new)
...
src/core/:
- src/core/types.ts (modified)
If no specifications are found for a module, note it:
- src/utils/ (lib) — No linked specifications found
scripts/check-gh-cli.sh --- Verify gh CLI availability and auth status (copy from principled-github canonical)scripts/map-files-to-modules.sh --- Map file paths to modules via CLAUDE.md discoverynpx claudepluginhub alexnodeland/principled --plugin principled-qualityReviews GitHub pull requests using parallel subagents for CLAUDE.md compliance, bugs, git history context, past feedback, and code comment adherence.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.