From radar-suite
Classifies code findings into three axes (bug, scatter, dead/smelly) with mandatory coaching and citation checks. Automatically invoked by radar-suite audit skills before emission.
How this skill is triggered — by the user, by Claude, or both
Slash command
/radar-suite:radar-suite-axis-classificationThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Every radar in the suite invokes this skill before emitting findings. This is the verification gate and the coaching engine. Findings that do not pass the gate are rejected.
Every radar in the suite invokes this skill before emitting findings. This is the verification gate and the coaching engine. Findings that do not pass the gate are rejected.
This skill inherits radar-suite-core.md for shared schema definitions (Issue Rating Table format, Handoff YAML schema) but does NOT run core's interactive protocols (Session Setup, Pre-Scan Startup, Known-Intentional Suppression, Pattern Reintroduction Detection). Those protocols apply within the audit skills that invoke this framework, not at this skill's level.
This skill is invoked programmatically by audit skills during finding emission; it never runs standalone. There is no /radar-suite-axis-classification slash command, no setup interview, no phases, no progress banner. A radar reads this skill's spec, follows the Invocation Protocol below to classify and coach its candidate findings, then writes them to its own handoff YAML with the required axis + coaching fields.
If you're reading this skill expecting a runnable command, you want a sibling radar instead (/data-model-radar, /ui-path-radar, /roundtrip-radar, /time-bomb-radar, /ui-enhancer-radar, /capstone-radar).
Three things, in order:
better_approach section that cites a real file:line pattern from the audited codebase (not generic advice).Any radar can invoke this skill. The skill itself does not scan code directly — it provides the framework, the checklist, and the schema gate that each radar uses before writing its handoff YAML.
Code does the wrong thing from the user's perspective. The behavior needs to change.
Examples:
Default audience: end_user
Severity: 4-tier scale (critical, high, medium, low)
Grade impact: Yes — counts toward fix-before-shipping grade
Code runs correctly but is structured in a way that makes the next developer's job harder. The fix is reorganization, not behavior change. No user-visible change after the fix.
Examples:
#if os(iOS) / #else forks for the same UI concern across multiple filesDefault audience: code_reader
Severity: Hygiene scale (urgent, rolling, backlog)
Grade impact: No — lives in the hygiene backlog, does not affect ship grade
Either unreachable (dead code) or reachable but not clearly justified (smelly). The fix is delete, document, or interrogate.
Two sub-labels:
Examples:
guard let on a value that is constructed two lines above and cannot be nilDefault audience: future_maintainer
Severity: Hygiene scale
Grade impact: No — lives in the hygiene backlog
A radar MUST run these checks before assigning an axis and emitting the finding. Each check that was run is logged in the finding's verification_log field. A finding without a verification_log is rejected by the schema gate.
Rule: Before emitting "this branch is a user-facing dead end," trace the branch back to a production call site.
How:
Log entry:
- check: reachability_trace
result: "reached from MyProductsView.swift:915 via galleryContent(items) — reachable"
# or:
result: "no production call site found; reclassified to axis_3_dead_code"
Rule: Before claiming a state / case / branch is unhandled, scan the ENTIRE file (not just the flagged region) for a handler.
How:
Log entry:
- check: whole_file_scan
result: "scanned 1169 lines; no other handlers for .empty case found — finding stands as axis_1"
# or:
result: "scanned 1169 lines; handler at LegacyWishesView.swift:847; reclassified to axis_2_scatter"
#if claim)Rule: Before classifying a #if os(iOS) (or any conditional compilation block) as iOS-only or platform-broken, READ both the #if and the #else branches. Do not drop the #else.
How:
#if block, read the full block including all #elseif and #else clauses#else branch handles the case and the radar missed it, the finding is a false positiveLog entry:
- check: branch_enumeration
result: "#if os(iOS) block at lines 102-118 has #else at 112-116 that handles the macOS case; finding retracted"
# or:
result: "#if os(iOS) block at lines 102-118 has no #else; iOS-only code confirmed"
Rule: The better_approach coaching field MUST cite an existing pattern in the SAME codebase being audited. Grep for the pattern shape before writing the recommendation. Generic advice ("consider using a protocol abstraction") without a citation is rejected.
How:
better_approach, identify the pattern shape (protocol abstraction, async bridge, typed navigation enum, etc.)better_approach bodycoaching-examples-generic.md AND note explicitly "no existing pattern found in this codebase"Log entry:
- check: pattern_citation_lookup
result: "found similar pattern at Sources/Protocols/CloudSyncManaging.swift:14 (protocol + @MainActor class)"
# or:
result: "no existing protocol abstraction pattern found in codebase; using generic template"
Rule: Before claiming a field / type / symbol is unused, enumerate the project's actual source roots. Do not hardcode Sources/ as the only root.
How:
project.pbxproj (Xcode project) or Package.swift (SPM) to get the actual source root listSources/Views/ AND Sources/Features/ AND Sources/Shared/), grep all of them before emitting an "unused" findingLog entry:
- check: source_root_introspection
source_roots: ["Sources/"]
result: "single source root confirmed; full-root grep ran"
Every finding MUST populate these fields. A finding missing any mandatory field is rejected by the schema gate.
findings:
- id: [unique-hash]
# Axis classification (REQUIRED)
axis: axis_1_bug | axis_2_scatter | axis_3_dead_code | axis_3_smelly
# Audience (REQUIRED — defaults by axis but may be overridden per finding)
# axis_1 default: end_user
# axis_2 default: code_reader
# axis_3 default: future_maintainer
before_after_experience:
audience: end_user | code_reader | future_maintainer
before: "Concrete description of the experience today from the named audience's POV"
after: "Concrete description after the fix, same audience"
# Coaching fields (ALL REQUIRED, including for axis_2 and axis_3)
current_approach: |
How the code is structured today. Specific file:line references.
Describe the shape, not just the location.
suggested_fix: |
The minimum change that addresses the immediate finding.
For axis_1: the bug fix. For axis_2: the reorganization. For axis_3: delete or document.
better_approach: |
How a senior reviewer would write this area of the codebase beyond the minimum fix.
MUST cite an existing pattern in the user's codebase by file:line.
Format: "Follow the pattern at [File.swift:NN] which [describes what the pattern does]."
A better_approach without a pattern_citation_lookup entry in verification_log is REJECTED.
better_approach_tradeoffs: |
Honest tradeoffs. When the better approach is overkill. When it is the right call.
At least one sentence of each: when to apply, when not to apply.
# Verification log (REQUIRED — at minimum, pattern_citation_lookup)
verification_log:
- check: reachability_trace | whole_file_scan | branch_enumeration | pattern_citation_lookup | source_root_introspection
result: "concrete outcome of the check"
# Existing fields (unchanged from radar-suite-core.md schema)
description: [plain language]
confidence: verified|probable|possible
urgency: critical|high|medium|low
status: open|fixed|deferred|accepted
file: [path]
line: [number]
file_last_modified: [ISO-8601]
group_hint: [category for batch operations]
pattern_fingerprint: [normalized anti-pattern name]
grep_pattern: [regex]
exclusion_pattern: [regex]
A finding is REJECTED (not emitted, returned to the radar for correction) if any of these apply:
axis field is missing or not one of the four valid schema values (axis_1_bug, axis_2_scatter, axis_3_dead_code, axis_3_smelly)before_after_experience is missing or any sub-field is emptycurrent_approach, suggested_fix, or better_approach is missing or emptybetter_approach does not contain a file:line citation (format: [A-Za-z0-9_/+.-]+\.(swift|py|rb|ts|js|kt|java|m|mm|h|hpp|cpp|cc|c|go|rs|cs|php|scala|sql|yaml|yml|toml|json):\d+ — matches common source-file extensions across the languages the radar-suite audits, primarily Swift but including Python/Ruby/Node/Kotlin/Java for time-bomb-radar's multi-language detection patterns)verification_log is missing or does not contain a pattern_citation_lookup entrybetter_approach_tradeoffs is missing or does not contain both a "when to apply" and a "when not to apply" sentenceWhen a finding is rejected: the radar must either (a) fix the finding by running the missing checks and populating the missing fields, or (b) downgrade the finding's confidence to possible and explicitly mark it as "coaching incomplete" in the handoff so it is visible as a low-confidence entry rather than dropped silently.
Grade impact: CRITICAL findings cap grade at C. HIGH findings cap at B+. (Same rules as radar-suite-core.md.)
Grade impact: NONE. Hygiene findings do not count toward the A-F grade. They live in a separate capstone section.
A radar may emit both axis_1 findings (severity: critical) and axis_2 findings (severity: rolling_hygiene) in the same handoff YAML. The capstone reader splits them by axis, not by severity value.
Every finding declares its audience. The audience is who experiences the before/after change.
| Axis | Default Audience | Override When |
|---|---|---|
| axis_1 | end_user | The "bug" is a developer ergonomic issue (e.g., crash on a debug-only code path) — override to code_reader |
| axis_2 | code_reader | The scatter is so bad it causes observable lag from bundle size or view recomputation — override to end_user |
| axis_3 | future_maintainer | The smelly code is a hygiene issue a code reviewer would catch in the next PR — override to code_reader |
Why explicit audience matters: axis_2 and axis_3 findings have no natural end_user experience. Forcing every finding to phrase before/after for the end user makes axis_2/3 findings hand-wavy. Naming the correct audience keeps the coaching grounded.
Writing the before/after per audience:
end_user — describe what the app does today vs after (from a user's perspective, not developer's)code_reader — describe what the code looks like today vs after (from a developer reading the file for the first time)future_maintainer — describe what a developer inheriting this code in 6 months would think / trip overBefore writing better_approach for any finding, the radar loads coaching examples in this order:
.radar-suite/project.yamlcoaching_examples: array — e.g., [stuffolio, generic] or [generic]skills/radar-suite-axis-classification/coaching-examples-<name>.mdcoaching_examples load order that has a matching example. Within a single file, all matching examples are equally valid — the radar may choose any of them. The Stuffolio overlay loaded first means Stuffolio-specific citations take priority when auditing Stuffolio; generic falls back when a pattern has no Stuffolio example.Example .radar-suite/project.yaml for Stuffolio:
coaching_examples:
- stuffolio
- generic
Example for a new project with no overlay:
coaching_examples:
- generic
No project.yaml means: load generic only.
Pattern match precedence: if the Stuffolio overlay has an example for "protocol abstraction" and the generic file also has one, the Stuffolio example is used. If Stuffolio does NOT have an example for "typed navigation destination enum" but generic does, the generic example is used.
Every radar must include a checks_performed block in its handoff YAML. This makes "no findings in this category" distinguishable from "this category was not scanned."
checks_performed:
source_roots_scanned: ["Sources/"]
files_scanned: 588
patterns_checked:
- reachability_trace
- whole_file_scan
- branch_enumeration
- pattern_citation_lookup
- source_root_introspection
patterns_not_run: [] # empty if all checks ran
reason_for_skipped_checks: null
If a check is deliberately skipped: document why.
patterns_not_run: ["branch_enumeration"]
reason_for_skipped_checks: "no #if conditional compilation blocks found in scope"
This skill does not run as a standalone orchestrator. Each radar invokes it via the following protocol:
pattern_citation_lookup..radar-suite/project.yaml from the target repo and load the example files.current_approach, suggested_fix, better_approach (with citation), better_approach_tradeoffs.checks_performed block summarizing what the radar actually scanned.axis_summary counting findings by axis:
axis_summary:
axis_1_bug: 12
axis_2_scatter: 7
axis_3_dead_code: 2
axis_3_smelly: 4
rejected_no_citation: 3 # findings emitted as "coaching incomplete" — visible in handoff at low confidence, NOT silently dropped (see Schema Gate Rules above)
rejected_no_citation count surfaces the gate's coaching failures so capstone knows N findings need follow-up coaching but were still emitted for visibility. These findings appear in the handoff with confidence: possible and a coaching_incomplete: true flag (or equivalent marker in the per-finding fields). They are NOT removed from the handoff — visibility beats silent drops.A radar grep flagged try! in Sources/Managers/BackupManager.swift:142. Here's what the radar does:
Step 1 — Classify. try! in production code throws a fatal runtime error on failure. From the end-user's perspective, this is a crash risk. Axis: axis_1_bug.
Step 2 — Run required checks.
pattern_citation_lookup (always required): Grep the codebase for the proper async-throws pattern. Find Sources/Managers/CSVManager.swift:89 which uses do { try ... } catch { Logger.error(...) } in the same shape (operation that can fail). Cite it.
reachability_trace (required for axis_1 dead-end claims, NOT required here — this is a crash, not a dead-end). Skip.
whole_file_scan (required for "missing handler" claims, NOT required here — this is a wrong-handler claim). Skip.
source_root_introspection (always required when claiming a citation is absent or present): Sources/ is the single source root for this project. Run the citation grep across the full root.
Step 3 — Load coaching examples. Read .radar-suite/project.yaml:
coaching_examples: [stuffolio, generic]
Load coaching-examples-stuffolio.md first, then coaching-examples-generic.md as fallback. Both files have "try!-in-production" examples; the Stuffolio one wins.
Step 4 — Write coaching.
current_approach: "BackupManager.swift:142 uses try! for try! context.save() inside the cleanup path. If save fails (disk full, schema mismatch, permission error), the app crashes via fatalError with no user feedback."suggested_fix: "Replace try! with do { try context.save() } catch { Logger.error(...); errorState = .saveFailed(error) }. Surface errorState in the UI via the existing error banner pattern."better_approach: "Follow the pattern at Sources/Managers/CSVManager.swift:89 which uses do/catch + Logger.error + state propagation for the same shape (operation that can fail with user-visible consequences). Extract a shared safeSave(_:) helper if 3+ managers have this pattern."better_approach_tradeoffs: "Apply when the operation has user-visible consequences and a recoverable failure mode (save, sync, export). Don't apply when the failure is genuinely unrecoverable (e.g., bundle resource missing) — in that case precondition or fatalError with a clear message is more honest than catching and ignoring."Step 5 — Validate against schema gate.
axis: axis_1_bug ✓before_after_experience.audience: end_user ✓ (defaults from axis_1)before_after_experience.before: "App crashes silently when BackupManager save fails — user loses the active backup with no error message" ✓before_after_experience.after: "App shows a 'Backup save failed' banner with retry button; user keeps the data and can recover" ✓current_approach, suggested_fix, better_approach, better_approach_tradeoffs all populated ✓better_approach contains file:line citation matching regex (Sources/Managers/CSVManager.swift:89 matches [A-Za-z0-9_/+.-]+\.swift:\d+) ✓verification_log contains pattern_citation_lookup entry ✓Schema gate passes. Emit.
Step 6 — Emit. Append to the radar's handoff YAML with full schema. The capstone reader will see this in the Fix Before Shipping section (axis_1) with the rating table.
This example is one finding through one path. A radar processing N candidates runs steps 1-6 per candidate; the axis_summary block at the end aggregates the totals.
radar-suite-core.md (or capstone-radar's 10-column variant which adds a Source column for cross-skill aggregation). Hygiene findings (axis_2 and axis_3) use a simpler format without the rating table — see capstone-radar's Hygiene Backlog section for details.Co-located with this skill (skills/radar-suite-axis-classification/):
coaching-examples-generic.md — Anonymized worked examples for all 3 axes. Ships with the skill. Default fallback when no project overlay exists.coaching-examples-stuffolio.md — Stuffolio-specific overlay with real file:line citations from the Stuffolio codebase. Loaded first when auditing Stuffolio (per .radar-suite/project.yaml declaration in the Stuffolio repo).In the audited project (created per-project):
.radar-suite/project.yaml — Declares which coaching example overlays to load and in what order. Optional; defaults to [generic] when absent. Schema:
coaching_examples:
- <project-name> # loads coaching-examples-<project-name>.md (must exist in this skill's directory)
- generic # always include as fallback (recommended)
See § Coaching Examples Loader above for the full load order and pattern-match precedence.Adding a new project overlay:
coaching-examples-<projectname>.md in this skill's directory (e.g., coaching-examples-mycompany.md).radar-suite/project.yaml listing coaching_examples: [<projectname>, generic]npx claudepluginhub terryc21/radar-suite --plugin radar-suiteAggregates findings from 5 companion skills and runs its own scans to produce unified A-F grading and ship/no-ship decisions. Triggers on 'can I ship' or '/capstone-radar'.
Triages static analysis findings from aide (secrets, complexity, clones, coupling) by reading code, assesses merit, and dismisses noise with findings_accept.
Use this skill when categorizing code review findings into severity levels. Apply when determining which emoji and label to use for PR comments, deciding if an issue should be flagged at all, or classifying findings as CRITICAL, IMPORTANT, DEBT, SUGGESTED, or QUESTION.