kramme-cc-workflow/skills/kramme:code:incremental/SKILL.md
(experimental) Deliver changes in small, verified slices with scope discipline, incremental verification between slices, and feature-flag guardrails for incomplete work. Use when implementing any change that spans more than one file or commit. Enforces one-thing-at-a-time, rollback-friendly commits, and explicit separation of in-scope work from noticed-but-untouched observations. Includes a refactor mode (opt-in via --refactor or after kramme:code:refactor-opportunities) that adds an interview-driven Decision Document and a Fowler-style tiny-commits plan where every intermediate state leaves the codebase working.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:code:incrementalInstall 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.
This skill edits files and commits each verified slice, so it runs only after explicit user invocation.
Deliver changes in small, verified slices with scope discipline, incremental verification between slices, and feature-flag guardrails for incomplete work. This is the procedural expression of the rule "don't add features beyond what the task requires": turn implementation into a loop of small, verified, rollback-friendly increments where out-of-scope observations are logged but never silently fixed.
kramme:siw:generate-phases or any planning step — each phase executes as a sequence of increments through this loop.Do not use for: single-file one-line fixes, doc-only edits, dependency-version bumps, or any change whose entire diff fits in a single coherent commit. The loop's overhead outweighs the discipline at that size.
Before writing any code, emit a SIMPLICITY CHECK marker stating the simplest version of the change that could satisfy the requirement. Only expand beyond that simplest version if a concrete requirement forces it.
SIMPLICITY CHECK: <one-line summary of the minimum viable change>
If the simplest version is not what you end up building, write a second line explaining what forced the expansion. If there is no forcing requirement, do the simplest version.
When you notice something outside the scope of the current slice — a typo in an adjacent function, a missing null check three lines above, an import that could be cleaner — emit a NOTICED BUT NOT TOUCHING marker and move on. Do not silently fix, refactor, or modernize adjacent code, even if the fix is trivial.
NOTICED BUT NOT TOUCHING: <what you saw>
Why skipping: <out-of-scope / unrelated / deferred>
The canonical "do NOT" list (clean up adjacent code, refactor untouched imports, modernize syntax in files you only read, build abstractions before the third use case, etc.) and the rationale for each item live in references/scope-discipline.md. Read it before the first slice if scope creep is a known failure mode on this change.
One logical change per slice. If a slice is doing two things, split it. A slice can touch multiple files as long as they serve the same single logical change.
Signs you are doing two things:
After every slice, the project builds, typechecks, and existing tests pass. Never commit a broken intermediate state — not even "temporarily." If a slice would break the build, it is too large; split it further, or gate the incomplete half behind a flag (Rule 3).
If the project uses feature flags, guard incomplete or in-progress work behind a flag so it can ship dark. This lets you land partial work through the normal release process without exposing it to users.
If the project has no flag infrastructure, do not introduce flag machinery just for this skill. Instead, keep slices small enough that each slice is independently releasable on its own. Prefer "smaller slices" over "introduce flags."
New flags, parameters, options, and config fields default to the old behavior. New code paths are opt-in, not opt-out. A user who upgrades and changes nothing should see no behavior change.
Each commit stands alone and can be reverted without breaking the build or leaving the codebase in a broken state. No "part 1 of 3" commits where part 1 alone is broken.
Rule of thumb: if git revert on any single commit would break main, the commit is not rollback-friendly.
Each increment is one pass through this five-step loop:
references/slice-strategies.md for when to use each and concrete examples.kramme:verify:run to execute the project's verification battery. If that skill is unavailable, or the project has no configured verification battery, invoke the project's build/typecheck/test commands directly (read them from package.json, Makefile, or equivalent) and log the missing battery as a NOTICED BUT NOT TOUCHING for a follow-up slice. Do not skip verification.kramme:git:commit-message.Emit a SIMPLICITY CHECK marker at the start of step 2, and a NOTICED BUT NOT TOUCHING marker any time during the loop when you see something out-of-scope.
Before marking a slice done, confirm every box:
If any box is unchecked, the slice is not done. Fix the gap or split the slice.
When this skill runs against refactor work — explicit --refactor flag, invocation directly after kramme:code:refactor-opportunities, or any user ask phrased as "refactor X" — produce a different output shape on top of the same rules: an interview-driven Decision Document plus an ordered tiny-commits plan.
When this mode applies — opt-in. Trigger on --refactor, on a refactor candidate handed off from kramme:code:refactor-opportunities, or on the user phrase "refactor X" / "consolidate Y" / "extract Z". Feature work does not need this mode.
How it works — the increment loop runs a 7-step interview before the first slice (problem statement → verify in code → alternatives considered → scope hammer → test coverage check → tiny-commits plan → file Decision Document), then executes the slices through the standard cycle. Each commit must leave the codebase in a working state — Fowler's bar — and revertible with git revert without breaking main. Decision Document goes to siw/REFACTOR_DECISIONS.md if SIW is active, otherwise inline as a markdown block in the body (not the subject line) of the first commit, which carries rationale for the whole stack — reviewers should expect to scan the first commit's body, not its title. The full interview, template, and per-commit checklist live in references/refactor-mode.md.
Relationship to the rules — refactor mode does not relax any rule. Rule 0 (Simplicity), 0.5 (Scope Discipline), 1 (One thing), 2 (Compilable), 4 (Safe defaults), and 5 (Rollback-friendly) all apply per slice. Rule 3 (Feature flags) is usually inapplicable during a refactor since behavior is unchanged; if the refactor temporarily forks behavior, flag it as for any other in-progress feature.
Sibling skills. kramme:code:refactor-pass is the simplification-loop sibling — use it when the goal is to shrink or clarify recently changed code without restructuring. Use refactor mode here when the goal is structural change (depth, seams, locality) with a documented rationale that should outlive the diff.
kramme:siw:generate-phases — each generated phase becomes a sequence of slices through this loop. Any planning skill that produces a phased plan can feed into this one.kramme:verify:run for the project's verification battery.kramme:git:commit-message for commit composition.kramme:code:refactor-pass follows the same slice discipline — refactors are a different flavor of increment but obey the same rules.These are the lies you will tell yourself to justify scope creep. Each one has a correct response:
NOTICED BUT NOT TOUCHING. Log it for a future slice.If you notice any of these, stop and re-slice:
main in a green state.Before declaring the whole feature done, self-check:
git bisect or by checking out a few commits.)NOTICED BUT NOT TOUCHING log for every out-of-scope observation?If any answer is no, finish the gap before declaring done.
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.