refactor(clarity-assist): extract skills from commands
Extract shared knowledge from clarify.md and quick-clarify.md into reusable skill files: - 4d-methodology.md: Core 4-phase clarification process - nd-accommodations.md: Neurodivergent-friendly question patterns - clarification-techniques.md: Anti-patterns and question templates - escalation-patterns.md: Mode switching guidelines Commands slimmed from 149/96 lines to 44/49 lines respectively. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,148 +2,44 @@
|
||||
|
||||
## Visual Output
|
||||
|
||||
When executing this command, display the plugin header:
|
||||
Display header: `PR-REVIEW - Findings`
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────────────────────────┐
|
||||
│ 🔍 PR-REVIEW · Findings │
|
||||
└──────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
## Skills to Load
|
||||
|
||||
Then proceed with the findings display.
|
||||
|
||||
## Purpose
|
||||
|
||||
List and filter findings from a previous PR review by category, severity, or confidence level.
|
||||
- skills/mcp-tools-reference.md
|
||||
- skills/review-patterns/confidence-scoring.md
|
||||
- skills/output-formats.md
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/pr-findings <pr-number> [filters]
|
||||
/pr-findings <pr-number> [--category <cat>] [--severity <sev>] [--confidence <min>] [--file <pattern>] [--compact] [--json]
|
||||
```
|
||||
|
||||
### Filters
|
||||
|
||||
```
|
||||
--category <cat> Filter by category (security, performance, maintainability, tests)
|
||||
--severity <sev> Filter by severity (critical, major, minor, suggestion)
|
||||
--confidence <min> Minimum confidence score (0.0-1.0)
|
||||
--file <pattern> Filter by file path pattern
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
# Show only security findings
|
||||
/pr-findings 123 --category security
|
||||
|
||||
# Show critical and major issues only
|
||||
/pr-findings 123 --severity critical,major
|
||||
|
||||
# Show high-confidence findings only
|
||||
/pr-findings 123 --confidence 0.8
|
||||
|
||||
# Show findings in specific files
|
||||
/pr-findings 123 --file src/api/*
|
||||
```
|
||||
|
||||
## Behavior
|
||||
## Workflow
|
||||
|
||||
### Without Previous Review
|
||||
|
||||
If no review exists for this PR:
|
||||
|
||||
```
|
||||
No review found for PR #123.
|
||||
|
||||
Would you like to:
|
||||
1. Run full /pr-review now
|
||||
2. Run quick /pr-summary
|
||||
3. Cancel
|
||||
```
|
||||
Prompt: "No review found. Run /pr-review, /pr-summary, or cancel?"
|
||||
|
||||
### With Previous Review
|
||||
|
||||
Display filtered findings:
|
||||
|
||||
```
|
||||
═══════════════════════════════════════════════════
|
||||
PR #123 Findings (filtered: security)
|
||||
═══════════════════════════════════════════════════
|
||||
|
||||
Showing 3 of 8 total findings
|
||||
|
||||
───────────────────────────────────────────────────
|
||||
|
||||
[SEC-001] SQL Injection Vulnerability
|
||||
Confidence: 0.95 (HIGH) | Severity: Critical
|
||||
File: src/api/users.ts:45
|
||||
|
||||
The query uses string interpolation without parameterization.
|
||||
|
||||
Fix: Use parameterized queries.
|
||||
|
||||
───────────────────────────────────────────────────
|
||||
|
||||
[SEC-002] Missing Input Validation
|
||||
Confidence: 0.88 (MEDIUM) | Severity: Major
|
||||
File: src/api/auth.ts:23
|
||||
|
||||
User input is passed directly to database without validation.
|
||||
|
||||
Fix: Add input validation middleware.
|
||||
|
||||
───────────────────────────────────────────────────
|
||||
|
||||
[SEC-003] Sensitive Data in Logs
|
||||
Confidence: 0.72 (MEDIUM) | Severity: Minor
|
||||
File: src/utils/logger.ts:15
|
||||
|
||||
Password field may be logged in debug mode.
|
||||
|
||||
Fix: Sanitize sensitive fields before logging.
|
||||
|
||||
═══════════════════════════════════════════════════
|
||||
```
|
||||
1. Load findings from previous review
|
||||
2. Apply filters (category, severity, confidence, file)
|
||||
3. Display using format from `skills/output-formats.md`
|
||||
|
||||
## Output Formats
|
||||
|
||||
### Default (Detailed)
|
||||
Reference `skills/output-formats.md`:
|
||||
- **Detailed** (default) - Full finding
|
||||
- **Compact** (`--compact`) - Single line
|
||||
- **JSON** (`--json`) - Structured data
|
||||
|
||||
Full finding details with descriptions and fixes.
|
||||
|
||||
### Compact (--compact)
|
||||
## Examples
|
||||
|
||||
```bash
|
||||
/pr-findings 123 --category security
|
||||
/pr-findings 123 --severity critical,major
|
||||
/pr-findings 123 --confidence 0.8
|
||||
/pr-findings 123 --file src/api/*
|
||||
```
|
||||
SEC-001 | Critical | 0.95 | src/api/users.ts:45 | SQL Injection
|
||||
SEC-002 | Major | 0.88 | src/api/auth.ts:23 | Missing Validation
|
||||
SEC-003 | Minor | 0.72 | src/utils/logger.ts | Sensitive Logs
|
||||
```
|
||||
|
||||
### JSON (--json)
|
||||
|
||||
```json
|
||||
{
|
||||
"pr": 123,
|
||||
"findings": [
|
||||
{
|
||||
"id": "SEC-001",
|
||||
"category": "security",
|
||||
"severity": "critical",
|
||||
"confidence": 0.95,
|
||||
"file": "src/api/users.ts",
|
||||
"line": 45,
|
||||
"title": "SQL Injection Vulnerability",
|
||||
"description": "...",
|
||||
"fix": "..."
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Use Cases
|
||||
|
||||
- Focus on specific issue types
|
||||
- Track resolution of findings
|
||||
- Export findings for tracking
|
||||
- Quick reference during fixes
|
||||
|
||||
Reference in New Issue
Block a user