kramme-cc-workflow/skills/kramme:docs:feature-spec/SKILL.md
Author a lightweight PRD-style feature spec before implementation. Produces a single reviewable markdown artifact covering objective, scope, boundaries, assumptions, non-goals, and testing strategy. Use when starting a feature that needs written alignment before coding but does NOT warrant the full siw/ tracked workflow. Pass --synthesize, --auto, or say "draft straight from context" to skip the assumptions block when the current conversation already grounds enough of the spec. For tracked initiatives (phased issues, LOG, audit) use kramme:siw:init instead.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:docs:feature-specInstall 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.
Author a one-page PRD-style spec before implementation. Emit an assumptions block first, draft the spec, then gate implementation on explicit user approval.
Arguments: "$ARGUMENTS"
Parse $ARGUMENTS for a --synthesize or --auto flag (anywhere in the string). Strip it from the remaining text before deriving the slug or feature name. Treat either flag as activating Synthesize mode (see below). The trigger phrase "draft straight from context" (or close paraphrase) in the user's most recent turn activates Synthesize mode equivalently — no flag needed.
Use when the user is about to start a feature and needs written alignment — scope, boundaries, success criteria — before any code is written, and the work is small enough that SIW's tracked artifacts would be overkill.
Route elsewhere if:
/kramme:siw:init for the full tracked workflow (siw/ dir, LOG.md, OPEN_ISSUES_OVERVIEW.md, issues/)./kramme:docs:update-agents-md./kramme:discovery:interview, then run this skill on the resulting plan.This skill ONLY authors a single feature spec file.
siw/, no LOG.md, no issue files). Does not decompose the spec into phases. Does not start implementation. Does not edit AGENTS.md or CLAUDE.md.Use this shared vocabulary when describing the output:
product-only: objective or user/problem context exists, but scope, success criteria, or boundaries are still missing.requirements-only: the six spec areas are populated, but unresolved open questions or thin technical context prevent phase or issue planning.planning-ready: the approved spec has concrete scope, boundaries, testing strategy, testable success criteria, and relevant technical context/dependencies or planning detail, with no blocking open questions.implementation-ready: an issue or task is scoped for execution with dependencies, affected areas, and verification. This skill never produces implementation-ready artifacts.This skill's normal output is requirements-only while drafting and planning-ready only after explicit approval and the verification checks pass.
Phase 0: Strategy Grounding (optional)
↓
Phase 1: Assumptions
↓
[User corrects or confirms]
↓
Phase 2: Draft spec file
↓
Phase 3: Approval gate
↓
[User approves] → Spec complete, skill ends
[User revises] → Loop to Phase 2 (do not restart Phase 1)
Before drafting assumptions, check for repo-root STRATEGY.md.
last_updated frontmatter is older than 90 days, mark relevant strategy facts as STALE: when presenting assumptions.CONFUSION: with the concrete conflict and ask whether the feature is intended to change strategy or should be scoped differently.STRATEGY.md exists, proceed silently for narrow features. For broad product-direction work, emit MISSING PRODUCT CONTEXT: and suggest /kramme:product:strategy as an optional precursor without blocking this skill.Before drafting anything, state what you are assuming about the feature. Emit this block verbatim, filling each bullet:
ASSUMPTIONS I'M MAKING:
- <assumption about scope>
- <assumption about users>
- <assumption about stack or constraints>
- <assumption about what's out of scope>
- <assumption about strategy fit; omit this bullet for narrow features when no repo-level strategy context exists>
Correct me before I draft the spec.
Then stop and wait for the user's response. Do not proceed to Phase 2 until the user has either corrected or confirmed.
CONFUSION: block naming the ambiguity and ask for clarification.MISSING REQUIREMENT: block naming what is missing. Do not invent.Synthesize mode is opt-in. Activation:
--synthesize or --auto, ORWhen activated, evaluate the preconditions before skipping Phase 1.
Synthesis is permitted only when both of the following hold:
The six areas:
A spec area is "grounded" when the conversation contains explicit user statements, decisions, or shared context that lets you fill the area without inventing facts. Grounding is not the same as "I can guess plausibly." If you would prefix the content UNVERIFIED:, the area is not grounded.
Skip Phase 1 entirely. Emit this marker before drafting:
SYNTHESIZE: drafting from current context, areas grounded: <N> of 6
Then proceed to Phase 2. Phase 3 approval gate stays — synthesis only removes the assumptions round-trip, not the explicit approval.
Fall back to Phase 1 with this warning marker:
SYNTHESIZE: insufficient grounding (<N> of 6 areas), falling back to assumptions block
Then run Phase 1 normally. Do NOT silently invent the missing areas.
If the user pushes to synthesize anyway after a precondition-failure fallback, emit a MISSING REQUIREMENT: block naming the ungrounded areas and ask the user to either (a) supply enough context to ground them now, or (b) accept the assumptions-block round-trip. Do not draft.
Derive a slug from the feature name (lowercase, hyphenated, ~3–5 words). When no feature name was supplied — common in Synthesize mode — derive both the name and slug from the dominant feature discussed in the current conversation; if that is still ambiguous, emit CONFUSION: and ask for a name before writing.
Write the spec to <slug>-spec.md in the repo root. This skill assumes a repository context: the repo root anchors both the default location and the path-safety check below. If no repository root resolves, fall back to the current working directory and state which directory was used.
If the user passed an explicit path as the argument, honor it only when it still fits this skill's boundaries:
AGENTS.md, CLAUDE.md, and any path under siw/.CONFUSION: and ask for a different destination before writing.Before writing, check whether the destination file already exists. If it does, do not overwrite it blindly — emit CONFUSION: naming the existing path and ask the user to choose: overwrite it, revise it in place, or write to a different slug. This guard runs before the Phase 3 approval gate, so an existing spec is never clobbered without an explicit user choice.
Copy the six-area structure from assets/feature-spec-template.md and fill each area. The areas are:
Replace every angle-bracket template placeholder with concrete content and delete the author note comment block before treating the draft as reviewable.
When STRATEGY.md exists, weave its relevant facts into the existing six areas rather than adding a seventh section:
UNVERIFIED:.STALE:.MISSING PRODUCT CONTEXT:.POTENTIAL CONCERNS:.After writing the file, emit a PLAN: block summarizing the spec shape — area headings, key decisions in each area, and the file path — so the user can review structure before reading prose.
PLAN: Drafted <slug>-spec.md with:
- Objective: <one-line summary>
- Scope: <in>, Non-goals: <out>
- Boundaries: <count> Always, <count> Ask First, <count> Never Do rules
- Testing: <tiers covered>
- Open Questions: <count> (<count> flagged POTENTIAL CONCERNS)
- Success Criteria: <count> testable statements
Review the file, then approve or request revisions.
Implementation does not start until the spec is explicitly approved.
This is a single checkpoint — the entire spec is reviewed and approved (or revised) in one go. If the user asks to start coding before approving, refuse and point back to this gate.
On revision:
PLAN: block if structure changed.On approval:
planning-ready when all six areas are concrete, relevant technical context/dependencies or planning detail are present, and no blocking open questions remain; otherwise name the remaining product-only or requirements-only gap./kramme:siw:init <spec-file> when the spec should be promoted to local tracking. After SIW is initialized, the next step is /kramme:siw:generate-phases for phased work or /kramme:siw:issue-define for one coherent issue. For a single-sitting change, point straight to implementation only when the approved spec plus current context is already implementation-ready.| Marker | Used when |
| --- | --- |
| ASSUMPTIONS I'M MAKING: | Phase 1, before drafting (skipped only in Synthesize mode when preconditions are met). |
| SYNTHESIZE: | When --synthesize, --auto, or the trigger phrase activates synthesis — emitted before drafting (success) or before fallback to Phase 1 (insufficient grounding). |
| CONFUSION: | Phase 1 or 2, when user input is ambiguous — including when the resolved destination is reserved, unclear, or already exists. |
| MISSING REQUIREMENT: | Phase 2, when a required area cannot be filled. |
| UNVERIFIED: | Phase 2, inline on any inferred claim inside the spec. |
| POTENTIAL CONCERNS: | Phase 2, inside Open Questions for risks worth flagging. |
| PLAN: | Phase 3, summary block before the approval gate. |
These markers are deliberate. Keep them verbatim — tooling and downstream skills may parse them.
| Excuse | Reality |
| --- | --- |
| "This feature is small enough to just start coding." | Then the spec takes ten minutes. Skip the skill and write code, but don't invoke this skill and then bypass the gate. |
| "I'll write the spec after, once I see the shape." | That's reverse-engineering, not speccing. If the code already exists, document it separately rather than retrofitting a spec to match. |
| "The assumptions block is noise, the user knows what they want." | The block costs one turn and catches misalignment before you've drafted six areas of the wrong spec. |
| "One ambiguous area is fine, we'll figure it out in code." | No. Emit MISSING REQUIREMENT: and stop. Ambiguous specs produce ambiguous code. |
| "The user said yes in a previous turn, that's approval." | Approval is explicit and scoped to the current spec version. Re-confirm after each revision. |
| "I should always synthesize — the user prefers fewer questions." | Synthesis is only safe when the Synthesize-mode preconditions hold. Below that threshold, synthesis produces a confidently-wrong spec, which costs more cycles than the assumptions round-trip would have. |
--synthesize/--auto/trigger phrase AND preconditions met).UNVERIFIED:.siw/, LOG.md, or issue files. That's out of scope — use /kramme:siw:init instead./kramme:siw:init <spec-file> after approval, then /kramme:siw:generate-phases; do not inline phases here.Before claiming the spec is complete:
<!-- ... --> blocks remain).UNVERIFIED:.POTENTIAL CONCERNS:.AGENTS.md, CLAUDE.md, and siw/.If any check fails, stay in Phase 2 or Phase 3; do not hand off downstream.
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.