kramme-cc-workflow/skills/kramme:code:breakdown-findings/SKILL.md
Cluster validated findings into PR-sized themes and generate self-contained implementation plans. Use after review, audit, scan, or QA workflows that produce findings reports. Also accepts a pre-clustered handoff from a delegating skill (themes already grouped, mapped one-to-one to plans) plus an optional shared implementation-setup block rendered into every plan. Not for raw bug lists without severity or location structure, and not for triaging a single issue.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:code:breakdown-findingsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Cluster validated findings from reviews, audits, or scans into PR-sized themes. Generate a self-contained implementation plan for each theme and an index linking them all.
This skill generates PR plan files; for decision-ready analysis of audit findings without writing files, route to kramme:siw:breakdown-findings.
Accepted sources
Arguments: "$ARGUMENTS"
Parse $ARGUMENTS as shell-style arguments before Phase 0. If --auto is present, set AUTO_MODE=true and remove the flag from the remaining source text. --auto skips the clustering confirmation after a proposed plan is produced. It does not bypass prior-artifact protection, missing-source handling, multiple-source ambiguity, or conflict/open-question reporting.
Before doing anything else, list any existing PR_PLAN_*.md files (including PR_PLAN_INDEX.md) in the project root.
Prior PR plan artifacts found:
{list of files}
Re-running would risk silent overwrite of plans whose slugs match new themes, and would leave stale plans whose slugs do not match.
Options:
- cleanup — run `/kramme:workflow-artifacts:cleanup` to clear them, then re-run this skill
- resume — regenerate only the missing plans against the same source
Resolve the findings source from $ARGUMENTS:
references/auto-detect-sources.md (use the first one that exists). If multiple exist, list them and ask which one to use — process exactly one source per run./kramme:pr:code-review, /kramme:code:copy-review, /kramme:code:refactor-opportunities, /kramme:code:agent-readiness, /kramme:product:review, /kramme:qa, or /kramme:siw:spec-audit)."Parse the findings source into a normalized list. For each finding, extract:
Count findings and report to the user before proceeding:
Found N findings from {source}. Proceeding to cluster.
A delegating skill (for example a PR split planner) may hand over work that is already grouped into PR-sized themes rather than a raw findings list. Treat the source as a pre-clustered handoff when it opens with the marker line PRE-CLUSTERED HANDOFF (a delegating skill sets this), or — absent the marker — when it declares the themes directly, each with a name, a file list, and a dependency relationship (depends on / blocks / parallel with) instead of standalone findings to be grouped. The shared ## Implementation Setup block, if any, lives inside this same document.
When the source is a pre-clustered handoff:
## Implementation Setup block meant for every plan (e.g. worktree / reference-branch instructions). Hold it for Phase 3; do not alter its wording.All themes included. in the index's Excluded section, and in Phase 5 report theme counts (not "findings processed"/"findings excluded") and name the delegated handoff as the source.Found N pre-clustered themes from {source}. Proceeding to plan (no re-clustering).Pre-clustered handoff: if Phase 1 identified the source as a pre-clustered handoff, do not re-cluster — the themes are already the intended PR seams, and re-grouping would destroy the caller's analysis. Skip the clustering rules and clustering process below, including the file-count sizing grammar and the 9-file XL gate: the caller sized these seams deliberately (often by review time, not file count), so do not split or merge a theme. If a theme looks unusually large, note it as an open question in that plan rather than re-cutting it. Still build the dependency graph from the declared depends on / blocks / parallel with relationships and assign execution labels (clustering-process steps 3–5). Print the 1:1 mapping (the PLAN:-prefixed block) for visibility, but do not block on the Proceed? (yes / adjust) prompt — a pre-clustered handoff has already been confirmed by its caller and has no clustering left to adjust. (The Phase 0 artifact guard still applies.)
Otherwise, group findings into PR-sized themes. A theme is a set of findings that should be fixed together because they share one or more of:
Target size: each theme should map to a realistic single PR (roughly 1-8 findings, touching a bounded set of files). If a theme grows beyond what a single PR can cover, split it into a short series and note the dependency.
Apply this sizing grammar when sizing themes:
| Size | Scope | | ------ | ---------------------------------- | | XS | 1 file, single finding | | S | 1–2 files | | M | 3–5 files | | L | 6–8 files | | XL | 9+ files — split into a series |
Aim for S/M themes. Any theme that sizes XL MUST split before generating plans.
Avoid overlap: every finding belongs to exactly one theme. If a finding could fit multiple themes, assign it to the one where it shares the strongest implementation dependency.
Singleton themes are fine: if a finding does not cluster with others, it becomes its own single-finding theme.
Exclusions: if any finding should be excluded from all plans (e.g., duplicates, already resolved, not actionable), record it with a reason. These go into the index under "Excluded Findings" as one marker-prefixed line per finding. If nothing is excluded, write a plain sentence with no marker.
Conflicts: if two findings contradict each other (e.g., "add abstraction" vs. "remove abstraction" for the same code), flag the conflict as an open question in the relevant plan(s) and do not assume a resolution.
verb-noun in kebab-case (e.g., add-api-error-handling, consolidate-config-parsing, remove-dead-code).W##L where ## is a zero-padded wave number and L is an uppercase lane letter, such as W01A, W01B, W02A.W01A.{SLUG} from the theme name only, then prefix it with {EXECUTION_LABEL} only in the final filename. Example: execution label W01A plus theme slug define-error-types becomes PR_PLAN_W01A_DEFINE_ERROR_TYPES.md.Present the clustering to the user before generating files. Prefix the block with the PLAN: output marker so downstream tooling can parse the proposed clustering:
PLAN: Proposed themes
Wave W01 (parallel):
W01A add-api-error-handling (4 findings, size M) -- blocks W02A -- files: src/api/*.ts
W01B remove-dead-exports (2 findings, size S) -- independent -- files: src/lib/*.ts
Wave W02:
W02A consolidate-config-parsing (3 findings, size S) -- blocked by W01A -- files: src/config/*, src/utils/config.ts
0 excluded findings
Proceed? (yes / adjust)
Wait for user confirmation. If the user requests adjustments, re-cluster accordingly.
If AUTO_MODE=true, do not ask for confirmation. Print the same PLAN: block, add AUTO: proceeding with the proposed clustering, and continue directly to Phase 3. Still stop before Phase 3 if the plan contains an unresolved contradiction that would make the generated plan misleading rather than merely conservative.
For each confirmed theme:
assets/plan-template.md.PR_PLAN_{EXECUTION_LABEL}_{SLUG}.md in the project root. Use UPPER_SNAKE_CASE for the slug in the filename (e.g., PR_PLAN_W01A_DEFINE_ERROR_TYPES.md).{execution label} {theme name} ({parallel / blocked-by / blocks summary}).# PR Plan W01A: define-error-types (parallel in W01; independent)# PR Plan W01A: define-error-types (blocks W02A)# PR Plan W02A: adopt-typed-errors (blocked by W01A; blocks W03A)blocked by W01A, W01B.## Implementation Setup section in every plan — same wording in each, with any branch names or paths the caller already resolved left exactly as given. When no block was supplied, omit that section entirely.Populate every section in the template — no empty headings, no "N/A". The template's inline guidance covers what each section needs. A few non-obvious points that the template cannot enforce:
assets/index-template.md.PR_PLAN_INDEX.md in the project root with:
NOTICED BUT NOT TOUCHING: so downstream tooling can parse it reliably. If there are no exclusions, write All findings were included in plans. with no marker line.Report to the user using this end-of-turn template:
PR Plan Generation Complete
Source: {source file or description}
Findings processed: N
Plans generated: M
Findings excluded: X
PLANS GENERATED:
PR_PLAN_INDEX.md
PR_PLAN_{EXECUTION_LABEL}_{SLUG_1}.md -- {execution label} {theme name} ({n} findings, size {XS|S|M|L}; {parallel in W## / blocked by W##L / blocks W##L})
PR_PLAN_{EXECUTION_LABEL}_{SLUG_2}.md -- {execution label} {theme name} ({n} findings, size {XS|S|M|L}; {parallel in W## / blocked by W##L / blocks W##L})
...
THINGS I DIDN'T TOUCH:
• The source findings file (read-only for this skill)
• Findings listed under "Excluded" in the index
POTENTIAL CONCERNS:
• {Any conflicting-findings CONFUSION markers that remained unresolved}
• {Any inferred severities flagged UNVERIFIED}
• {If none, state: "None"}
Recommended first PR: PR_PLAN_{EXECUTION_LABEL}_{SLUG}.md -- {one-line rationale including what it unblocks}
fetchUser() in src/api/users.ts:45 that catches NetworkError and returns a typed error result" is.W01A/W01B for parallel first-wave plans, higher wave numbers for blocked follow-up plans, and explicit blocked by/blocks labels wherever a dependency exists./kramme:workflow-artifacts:cleanup.Use these markers as prefixes when surfacing specific kinds of information so output stays parseable across the plugin:
UNVERIFIED: — use in Phase 1 parsing when severity (or any other field) is inferred from context rather than stated in the source.CONFUSION: — use when two findings conflict and both positions are surfaced as open questions in the generated plan(s).MISSING REQUIREMENT: — use for any open question added to a plan that must be answered before implementation.NOTICED BUT NOT TOUCHING: — prefix each excluded-finding entry in the index.PLAN: — prefix the Phase 2 proposed-themes block.PLANS GENERATED / THINGS I DIDN'T TOUCH / POTENTIAL CONCERNS — end-of-turn triplet used in Phase 5 Summary.Use these markers verbatim where applicable. Do not invent alternate spellings or rename them — downstream tooling matches the exact strings.
Watch for these justifications that signal you are about to skip a hard gate:
The clustering and sizing flags below do not apply to a pre-clustered handoff (see the Phase 2 rule).
Stop and re-cluster if any of these appear:
W01A.Before reporting Phase 5, verify:
development
Runs kramme:pr:code-review as a closeout review loop for local or PR branch changes before commit, ship, or final response. Use when the user asks for autoreview, second-model review, or a final code-review pass after non-trivial edits. Not for UX, visual, accessibility, or product review.
development
Guides topic-level understanding verification for a PR, branch, feature, document, spec, design decision, bug fix, or other concrete subject. Use when the user asks to confirm, quiz, drill, teach-and-check, or verify that they understand a topic. Maintains a topic-specific checklist artifact and requires demonstrated understanding before marking the topic complete. Not for ordinary explanations without verification, end-of-session summaries, or code/test correctness checks.
testing
Design a CI/CD pipeline with quality gates, a <10-minute budget, feature-flag lifecycle, and an exit checklist. Use when adding a new CI pipeline, changing gate configuration, or planning a rollout for a new service. Complementary to kramme:pr:fix-ci (which fixes failures in an existing pipeline). Covers gate ordering, secrets storage, branch protection, rollback mechanism, and staged-rollout guardrails — not a rollout-execution runbook.
tools
--- name: kramme:visual:demo-reel description: Capture local demo evidence for observable product behavior: screenshots, before/after image sets, browser reels, terminal recordings, and short GIF/video proof. Use when shipping UI changes, CLI features, or any change where PR reviewers would benefit from visual or behavioral evidence. argument-hint: "[what to capture] [--url <url>|auto] [--tier static|before-after|browser-reel|terminal-recording]" disable-model-invocation: true user-invocable: tr