kramme-cc-workflow/skills/kramme:debug:triage-to-issue/SKILL.md
(experimental) Triage a bug end-to-end: orchestrate root-cause investigation, design a TDD fix plan with RED-GREEN cycles, and file a refactor-durable Linear or local SIW issue in one mostly-hands-off pass. Use when a bug needs to become an implementation-ready ticket without manually chaining kramme:debug:investigate, kramme:test:tdd, and kramme:linear:issue-define. Composes kramme:debug:investigate and kramme:linear:issue-define via skill invocation (or by reading the sub-skill's SKILL.md when blocked); captures kramme:test:tdd conventions inline in v1. Not for the full interactive investigation with confidence gates (use kramme:debug:investigate alone), not for conversational multi-bug QA-intake sessions (use kramme:qa:intake), not for implementing the fix (use kramme:linear:issue-implement or kramme:siw:issue-implement after this skill files the ticket).
npx skillsauth add abildtoft/kramme-cc-workflow kramme:debug:triage-to-issueInstall 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.
One command, one ticket. Take a bug description, run a root-cause investigation, design a TDD fix plan, and file a refactor-durable issue an autonomous (AUTO-mode) agent can pick up and implement. The composed result is what manually chaining kramme:debug:investigate → kramme:test:tdd → kramme:linear:issue-define would produce, but in one orchestrated pass.
kramme:debug:investigate directly.kramme:qa:intake (conversational multi-bug intake).kramme:debug:investigate then kramme:test:tdd (Prove-It); skip the ticket overhead.kramme:linear:issue-define directly.$ARGUMENTS. Strip any trailing --yes or --auto flag — both bypass the approval gate.header: Bug Description
question: What's the problem you're seeing?
options:
- (freeform) Describe the bug, paste an error message, or provide a Linear/SIW issue ref
Emit PLAN: triage to issue — investigate, design TDD plan, draft, gate, file.
Probe in order:
mcp__linear__create_issue MCP tool availability.siw/OPEN_ISSUES_OVERVIEW.md in the repo root.Decision table:
| Linear MCP | SIW present | Action | | --- | --- | --- | | Yes | Yes | Ask the user once which sink (Linear / SIW / Markdown at repo root). | | Yes | No | Use Linear, no question. | | No | Yes | Use SIW, no question. | | No | No | Use a markdown file at the project root, no question. |
The runtime question (when it fires):
header: Issue Sink
question: Both Linear and SIW are available. Where should the issue land?
options:
- Linear — create via mcp__linear__create_issue and return the URL
- SIW — write to siw/issues/ and update OPEN_ISSUES_OVERVIEW.md + LOG.md
- Markdown — write a standalone file at the repo root and surface the path
If Linear is the selected sink, resolve required Linear metadata before continuing:
LINEAR_TEAM.LINEAR_TEAM.Linear Team question. This required metadata question still fires when --yes or --auto was passed; those flags skip only the approval gate, not required create inputs.POTENTIAL CONCERNS.Invoke kramme:debug:investigate via the Skill tool with the captured bug description as $ARGUMENTS. If Skill invocation is unavailable or blocked (the sub-skill is not model-invocable on this platform), locate and Read the sub-skill's SKILL.md from the installed skills directory and follow its steps inline.
Report-only contract. Triage instructs investigate to stop after root-cause identification and never apply a fix. Do not pass --auto to investigate — its AUTO mode implements fixes at High confidence, which would violate this skill's "No fix was applied" invariant.
Answer investigate's intermediate gates with these defaults (always under --yes/--auto; interactively, you may surface them to the user instead):
Capture from the returned log:
[ROOT CAUSE] line — the mechanism description.Root Cause Analysis block — What / Where / Why / When introduced.Evidence block.High / Medium / Low).[REPRODUCE] line and whether reproduction succeeded.If the investigation could not reproduce the bug, mark this in the draft body as UNVERIFIED: bug could not be reproduced from the report; implementer must verify the failure scenario before merging.
Invoke kramme:test:tdd via the Skill tool, framed as a planning-only call: ask it to produce the Prove-It cycle structure for the bug just analyzed, but do not write or run tests in this session — the goal is the plan that will live in the issue body. If Skill invocation is unavailable or blocked, locate and Read the sub-skill's SKILL.md from the installed skills directory and follow its Prove-It conventions inline.
Capture:
If the sub-skill output contains implementation details (private function names, internal class names), strip them in Phase 6.
Caveat (v1 honesty).
kramme:test:tddis written as instructions for a TDD session, not a pure planner. In v1, treat its output as guidance for the cycle list above; if the sub-skill insists on driving an interactive cycle, abort the sub-skill call and produce the cycle list inline using the Prove-It conventions fromkramme:test:tdd(RED-GREEN, behavior through public interface, Prove-It regression test). A future--liteflag will skip this handoff entirely.
Compose 3–6 acceptance criteria as checkboxes. Each criterion is a behavior statement, not an implementation step. Examples:
[ ] Expired tokens are rejected at the auth boundary with a 401 response.[ ] The Prove-It regression test passes after the fix and would have failed before.[ ] No existing test in the auth-middleware suite regresses.If reproduction was UNVERIFIED, add: [ ] Fix is verified by reproducing the original failure scenario before merging.
Take the merged context from Phases 3–5 and rewrite it for the issue body. The body must remain useful after a major refactor.
Forbidden in the body:
src/, any directory + filename).:\d+ patterns..ts, .js, .py, .go, .rs, .sh, .bats, .md, .json, .yml).Allowed:
/api/login endpoint", "the validateToken exported function").See
references/durability-examples.mdfor good-vs-bad rewrites of common patterns.
Redact secrets before publishing externally. Bug descriptions, error messages, stack traces, and repro logs routinely carry bearer tokens, API keys, connection strings, passwords, and personal data. Scan the body and replace any such value with [REDACTED] before filing to Linear or any shared sink — the durability grep below catches paths, not secrets.
This is the canonical durability grep, reused by the pre-create (Phase 8.5) and post-create (Phase 10) checks. The draft is not on disk until Phase 9, so pipe the body string into rg:
printf '%s' "$BODY" | rg ':\d+|([[:alnum:]_.-]+/)+[[:alnum:]_.-]+\.[[:alnum:]]{1,8}|[[:alnum:]_-]+\.(ts|tsx|js|jsx|mjs|cjs|py|go|rs|java|kt|rb|php|swift|cs|cpp|c|h|hpp|sh|bash|zsh|fish|bats|md|mdx|json|ya?ml)\b'
Classify each match before treating it as a problem:
Next.js, Node.js, Vue.js, Nuxt.js); public package names (@company/auth).Read assets/issue-body-template.md and populate it. The structure is:
Fix [observable behavior] in [public surface] (action verb + behavior + surface). No file paths.Show the drafted body to the user.
Skip if the user passed --yes or --auto. Otherwise:
header: Approval
question: Create this issue?
options:
- Create — file as-is at the chosen sink
- Edit — let me revise specific sections
- Cancel — abort without creating anything
If the user picks Edit, ask which section, take their changes, re-render the draft, and re-ask.
Run the durability grep from Phase 6 against the final drafted body (pipe the body string into rg) before writing anything to Linear, SIW, or markdown. Classify matches using the allowed / RED FLAG rules from Phase 6.
If the grep finds prose matches:
RED FLAG.If the user passed --yes or --auto and the grep finds prose matches, halt and require explicit approval before creation. Do not let the bypass flag file a leaky issue.
Branch on the sink chosen in Phase 2.
Linear: before creating, search the team for an open issue with the same title. If one exists, surface it and ask before filing a duplicate; under --yes / --auto, skip creation and report the existing issue instead of duplicating. Otherwise call mcp__linear__create_issue with title, description (the drafted body), required team: LINEAR_TEAM, and any auto-detectable labels/project. Return the issue URL.
SIW: write three files in lockstep:
siw/issues/ISSUE-{prefix}-{NNN}-{slug}.md — full issue body. Use the prefix and number scheme already in use in the repo's siw/issues/ directory (typically G for general or P{N} for phased; pad to 3 digits). Pick the next unused number for the prefix so a re-run never overwrites an existing issue file. Slug is a kebab-case fragment of the title.siw/OPEN_ISSUES_OVERVIEW.md — append a row to the index table with status OPEN.siw/LOG.md — add an entry under the current progress / decision-log section noting the new issue and the date.All three updates must succeed atomically. If any write fails, surface the error and offer the user a chance to roll back the partial create.
The issue-file prefix/number scheme and the OVERVIEW/LOG update protocol above are owned by the
kramme:siwskills; this inline copy must stay in sync with them.
Markdown fallback: write BUG-{slug}-{YYYY-MM-DD}.md to the project root with the full body. If that file already exists (same-day re-run), append a numeric suffix (-2, -3, …) rather than overwriting. Surface the absolute path.
Repeat the durability grep from Phase 6 against the created body. For the SIW or markdown sink, grep the written file; for the Linear sink there is no local file, so grep the body string you submitted. Classify matches using the Phase 6 rules — matches in prose are a RED FLAG; surface them and prompt the user to edit. Do not silently rewrite.
Emit a final block:
CHANGES MADE
- Created issue at {sink}: {URL or path}
- Body length: {chars}; durability grep: {clean | <count> matches in code blocks only}
THINGS I DIDN'T TOUCH
- The fix itself — implementation belongs to kramme:linear:issue-implement / kramme:siw:issue-implement.
- Any related issues or follow-ups noticed during investigation (logged below).
POTENTIAL CONCERNS
- {confidence rating from Phase 3 if Medium or Low}
- {entries from investigate's epilogue (NOTICED BUT NOT TOUCHING / POTENTIAL CONCERNS sections), if present}
Adopt the kramme plugin-wide vocabulary verbatim, one per line, uppercase, no decoration:
STACK DETECTED — language / framework / test runner identified during investigation.UNVERIFIED — assumption flagged in the issue body or in this skill's reasoning that has not been confirmed.NOTICED BUT NOT TOUCHING — out-of-scope observation surfaced in the final summary, not in the issue body.CONFUSION — clarification needed before proceeding.MISSING REQUIREMENT — decision/input needed from the user.PLAN — announce next phases before acting.CHANGES MADE / THINGS I DIDN'T TOUCH / POTENTIAL CONCERNS — end-of-turn triplet.RED FLAG — used in Phase 10 when the durability grep finds matches in prose.Reuse from kramme:debug:investigate:
[REPRODUCE], [ISOLATE], [ROOT CAUSE], [VERIFY] — these markers may appear in the captured investigate output. Keep them in working notes but do not include :\d+ content from these markers in the issue body.Watch for these — they signal the durability rule is about to break.
| Excuse | Reality | | --- | --- | | "The file path is the clearest way to point at the bug." | Paths rot. The reader six months from now needs the behavior the bug breaks, not yesterday's filename. | | "Line numbers are pinned to a commit, so they're stable." | They're stable until the next refactor. The issue is supposed to outlive that. | | "The internal helper name is the actual root cause." | If the bug is "this private helper is wrong," the fix is also rename-stable: describe the contract the helper represents. | | "If I strip everything internal, the issue is too vague." | Then the investigation isn't done. The contract-level statement should exist; if it doesn't, return to Phase 3. | | "I'll just include the file path in a code block — that's allowed." | Code blocks are for repro commands. A bare path is still a path; readers parse it the same way. |
:\d+ pattern outside a fenced code block.Low confidence and no clarifying question was asked.--yes but the durability grep returned matches in prose — bypass the gate would file a leaky issue. Halt and require explicit approval.kramme:debug:investigate — source of the investigation phase (Steps 1–6 + Step 8 reporting). The orchestrator stops it at the propose-fix gate via the "Report only" option.kramme:test:tdd — source of the Prove-It cycle conventions and RED-GREEN structure used in Phase 4. v1 captures the patterns; the sub-skill itself may not be invocable as a pure planner (see Phase 4 caveat).kramme:linear:issue-define — source of issue-creation conventions (title format, template selection, metadata). v1 issues the create call directly via mcp__linear__create_issue for predictable interception, but the body shape mirrors the Simple Bug Template and Comprehensive Template from issue-define's assets. Both skills enforce the same durability constraint: issue-define via its **Affected area:** field (module / behavior / contract, not paths or line numbers), this skill via the durability grep.kramme:linear:issue-implement / kramme:siw:issue-implement — downstream consumers. The ticket body produced here is designed to be picked up by these flows without re-investigation.$ARGUMENTS had a description).[ROOT CAUSE] line and a confidence rating.--yes was passed).CHANGES MADE block.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