kramme-cc-workflow/skills/kramme:siw:issue-implement/SKILL.md
Start implementing a defined local issue with codebase exploration and planning. Use --team to implement multiple independent SIW issues in parallel.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:siw:issue-implementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Plan before coding: explore the codebase, agree on a technical approach, then implement against the chosen approach.
This skill consumes issue files produced by kramme:siw:issue-define. Each issue carries a status line of the form:
**Status:** {status} | **Priority:** {priority} | **Size:** {size} | **Phase:** {N or General} | **Parallelization:** {value} | **Mode:** {AUTO | HITL — <one-line reason>} | **Related:** {tasks if any}
The Mode field gates the HITL safety logic in Step 3.1 and Step 6.1. If Mode is absent, the skill treats the issue as HITL — mode missing; requires human triage and routes it through the HITL gate.
If $ARGUMENTS contains --team, remove that flag, read references/team-mode.md, and follow that workflow instead of the standard workflow below. Pass the remaining arguments through as the team-mode arguments. --auto is team-mode-only: it skips the plan confirmation and starts the proposed parallel implementation plan immediately (full semantics in references/team-mode.md); ignore it in the standard workflow.
When executing those phases, read and follow references/codebase-exploration.md, references/question-examples.md, references/execution-approaches.md, and references/spec-sync.md at the step where each reference is named.
Every status change (to "IN PROGRESS", "IN REVIEW", or "DONE") must update all three tracking files atomically. Skipping any file leaves the tracking state inconsistent.
Synced SIW issue-state contract (keep aligned across SIW issue creators): every SIW issue creation or tracker-visible issue update keeps the issue file, siw/OPEN_ISSUES_OVERVIEW.md, and siw/LOG.md synchronized as one issue-state change; partial write failures must be surfaced instead of accepted silently.
Required updates:
[ ] Issue file (siw/issues/ISSUE-{prefix}-{number}-*.md) — Set the **Status:** line to the new status. Preserve the rest of the status line (Size, Parallelization, Mode, Related, etc.) — do not delete adjacent metadata.
[ ] Overview (siw/OPEN_ISSUES_OVERVIEW.md) — Update the issue's row in the table to match the new status.
[ ] Log (siw/LOG.md) — Update the ## Current Progress section to reflect the change. The block must identify the active issue and preserve any more-specific Last Completed / Next Steps already written by the calling step:
## Current Progress
**Last Updated:** {date} **Quick Summary:** {one-line summary mentioning {prefix}-{number}}
### Project Status
- **Status:** {status} | **Current Issue:** {prefix}-{number} | ...
### Last Completed
- {most recent meaningful event}
### Next Steps
1. {next unfinished task from plan}
When re-running the procedure to repair a partial update, touch only stale fields; do not overwrite accurate Last Completed / Next Steps entries.
This procedure is referenced as "Run the Status Update Procedure" throughout this skill.
$ARGUMENTS contains the issue identifier provided by the user.
If $ARGUMENTS contains --team, use Team Mode and remove the flag before parsing issue identifiers.
Accepted formats:
ISSUE-G-001, ISSUE-P1-001, ISSUE-P2-001, etc.G-001, P1-001, P2-001, etc.ISSUE-001 or 001 (treated as G-001)Validation:
G, P1, P2, etc.) and numeric portionG if none provided (IDs like G-001)If no argument provided or invalid:
Error: Please provide an issue identifier.
Usage: /kramme:siw:issue-implement <prefix-number>
Examples:
/kramme:siw:issue-implement G-001 # General issue
/kramme:siw:issue-implement P1-001 # Phase 1 issue
/kramme:siw:issue-implement ISSUE-G-001
The issue can be specified as G-001, P1-001, ISSUE-G-001, etc.
Action: Abort.
Search for issue file in siw/issues/ directory:
ls siw/issues/ISSUE-{prefix}-{padded_number}-*.md 2> /dev/null
If found:
# ISSUE-{prefix}-{number}: header)Mode is missing, set it to HITL — mode missing; requires human triage for this run. Missing Mode is not safe for Autonomous Implementation.If not found:
Error: Issue {prefix}-{number} not found.
Please verify:
- The issue exists in the siw/issues/ directory
- You have the correct issue identifier (e.g., G-001, P1-001)
Available issues:
{list files in siw/issues/ directory}
To create a new issue, run /kramme:siw:issue-define
Action: Abort.
Check current git status (works on current branch by default):
git status --porcelain
git branch --show-current
If uncommitted changes exist:
Use AskUserQuestion:
header: "Uncommitted Changes Detected"
question: "You have uncommitted changes. How should I proceed?"
options:
- label: "Continue anyway"
description: "Work with current changes (recommended if changes are related)"
- label: "Stash changes"
description: "Save changes to stash, can be restored later"
- label: "Abort"
description: "Cancel and let me handle it manually"
Display current branch:
Working on branch: {branch_name}
Show the user what was found:
Issue: {prefix}-{number}
Title: {title}
Problem:
---
{problem section}
---
Status: {status}
Priority: {priority}
Mode: {AUTO | HITL — <one-line reason> | (not classified)}
Related: {related tasks}
Acceptance Criteria:
- {criterion 1}
- {criterion 2}
...
Technical Notes:
{if present, show summary}
If the issue's Mode is HITL, including the inferred HITL — mode missing; requires human triage fallback, surface this prominently. HITL means the issue requires human input for at least one of: architectural decision, design review, judgment call, manual testing, or external system access. Team mode excludes HITL issues from autonomous batches; this standard mode honors the same constraint at approach selection (Step 6) — recommend Guided Implementation and require explicit confirmation before Autonomous Implementation.
Explore the codebase before proposing a technical approach. Read references/codebase-exploration.md and follow its supporting-spec check, pattern search, optional exploration-agent prompt, key-file identification, and findings template.
Ask before assuming. Resolve ambiguities in scope, technical approach, and testing expectations before writing code.
Review the issue and exploration results to identify:
Use AskUserQuestion for each unresolved ambiguity. Read references/question-examples.md for prompt patterns when composing implementation-scope or technical-approach questions.
After gathering answers, read references/plan-template.md and create a comprehensive plan using that structure (Summary, Requirements → Technical Approach, Files to Modify/Create, Patterns to Follow, Implementation Steps, Testing Approach, Open Questions).
Present plan and get confirmation before proceeding.
Use AskUserQuestion:
header: "Implementation Approach"
question: "How would you like to proceed?"
options:
- label: "Guided Implementation"
description: "Step-by-step with verification at each stage. Best for complex work."
- label: "Context Setup Only"
description: "I'll create a todo list, but you guide implementation. Best when you know the approach."
- label: "Autonomous Implementation"
description: "I'll implement and verify, check in when done. Best for straightforward tasks. Not recommended for HITL issues."
If the issue's Mode is HITL and the user selected "Autonomous Implementation", issue the following confirmation question before continuing:
header: "HITL Issue Confirmation"
question: "This issue is marked HITL — {one-line reason from issue file}. Autonomous implementation is not recommended for HITL issues. Proceed anyway?"
options:
- label: "Proceed autonomously — human input handled outside this session"
description: "Confirm that the required architectural decision, review, judgment call, manual testing, or external access has already been resolved."
- label: "Switch to Guided Implementation"
description: "Get verification at each step instead. Recommended for HITL issues."
- label: "Abort and revisit later"
description: "Stop now; pick this issue back up after the human input is handled."
siw/LOG.md Decision Log: Decision: proceeded autonomously on HITL issue {prefix}-{number}; user confirmed prerequisites handled outside session.This gate fires when (a) the issue carries Mode: HITL or Mode was missing and inferred as HITL — mode missing; requires human triage, and (b) the user picked Autonomous. Only explicit Mode: AUTO skips this gate.
Run the workflow that matches the user's selection from Step 6:
Read and follow references/execution-approaches.md for the selected workflow's task list, status-update points, and presentation templates. All three workflows must run the Status Update Procedure (top of skill) when transitioning to "IN PROGRESS".
Confirm the Status Update Procedure ran during Step 7 and that all three tracking files now show "IN PROGRESS" per the checklist at the top of this skill. Re-run the procedure for any file that wasn't updated. Do not proceed to Step 9 until all three files reflect "IN PROGRESS".
Issue Implementation Started
Issue: {prefix}-{number} - {title}
Branch: {branch}
Approach: {selected approach}
{Approach-specific next steps}
If the companion skills /kramme:verify:run, /kramme:pr:create, and /kramme:pr:code-review are installed in this environment, append a "Quick Commands" block listing them. Omit the block (or any individual line) for skills that are not available.
Before marking implementation complete, ensure the specification reflects all decisions made during implementation.
Check siw/LOG.md for decisions recorded during implementation: new decisions not in the spec, changes to the originally planned approach, discovered constraints, and technical choices that affect future work.
For each decision, check whether it aligns with the spec, supporting specs, or contract specs. Identify decisions that contradict (spec needs updating), add new information (spec needs expanding), or clarify ambiguities (spec needs refinement).
If supporting or contract specs exist (siw/supporting-specs/, siw/contracts/), route decisions by topic:
*-data-model*.md*-api*.mdsiw/contracts/*.md*-ui*.md or *-frontend*.md*-user-stories*.mdIf misalignments are found, read references/spec-sync.md, present them using its template, and use AskUserQuestion to choose between updating all, reviewing each, or skipping.
For selected decisions, update the appropriate spec file.
For supporting and contract specs, update the actual spec content (entity definitions, endpoint contracts, component specs, diagrams) — do not just append to a "Design Decisions" section. Supporting and contract specs should always reflect current reality.
Use the main spec's ## Design Decisions section only for cross-cutting decisions, high-level architectural choices, or decisions that don't map to a specific spec section. For the worked POST → PUT example, per-area routing reminders, and the Design Decisions migration format, read references/spec-sync.md.
Read the confirmation template in references/spec-sync.md and use it to confirm the update to the user. If no updates were needed, report: "Spec Sync Check: All implementation decisions align with the specifications. No updates needed."
After verification passes and the implementation is complete, close out tracking for the issue.
Read and follow references/issue-closeout.md for the closeout procedure:
DONE with an existing ## Resolution) and short-circuit if so.## Resolution section without deleting the issue file.DONE or IN REVIEW.kramme:verify:run) before claiming completion.siw/LOG.md with progress and decisions as you go.tools
Requires Linear MCP. Implements one Linear issue end to end, selects applicable code-review, convention, and PR-refactor gates, runs them to bounded convergence, verifies, and optionally opens the PR and iterates on CI and review feedback until green. Use when the user wants a single Linear issue taken from implementation through a clean Pull Request. Not for implementation-only work, SIW-tracked issues, stacked PRs, existing PR updates, or post-merge rollout.
development
Reviews PR and local changes for convention drift and overcaution against documented rules and mined peer-file practice. Use for new patterns, dependencies, abstractions, or defensive complexity that departs from established practice; every finding cites evidence. Supports --inline. Not for general code quality (use kramme:pr:code-review) or spec review (use kramme:siw:spec-audit --team).
testing
Charts huge or foggy initiatives into a local `.context` decision map and resolves one typed frontier ticket per session until the work is ready for SIW or another execution workflow. Use when the route to a destination cannot fit in one agent session or parallel workspaces need coordinated planning state. Not for clear specs, ordinary issue decomposition, implementation, or Linear-native tracking.
development
Investigates a question against primary sources and saves one cited Markdown artifact. Use for reading legwork: official docs/API facts, source-code or spec checks, standards, and first-party service behavior before planning or implementation. Not for making product or architecture decisions, implementing code, broad web search, secondary blog summaries, or uncited answers.