Carry a kanban feature from request to merge: write the spec, get the human''s one approval (kf approve), build tests-first — one task inline, a plan of several through the task loop — verify once with kf verify, review with independent reviewers, write the report with kf report, open the PR and watch CI. Use for a change to the product that is not a defect, or when kf status prints "Next: load the kf:feature skill".
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Feature?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/phuthuycoding-feature)
---
name: feature
description: 'Carry a kanban feature from request to merge: write the spec, get the human''s one approval (kf approve), build tests-first — one task inline, a plan of several through the task loop — verify once with kf verify, review with independent reviewers, write the report with kf report, open the PR and watch CI. Use for a change to the product that is not a defect, or when kf status prints "Next: load the kf:feature skill".'
---
# Feature — spec, approve, build, verify, review, merge
Plugin root: `${CLAUDE_PLUGIN_ROOT}` — this skill writes paths with this placeholder; resolve it to this path.
Argument: `<context> <name>` for a new item, `<name>` to resume one. The shared rules of `kf:flow` apply throughout: one approval, tests first, verify once, independent reviewers, LOW findings as notes, no trailers, the user's language.
**Resume:** `kf status --change <name>` — brainstorm or planning → step 1 or 2, backlog → wait for the human's start (`kf stage <name> implementation`), implementation → step 3, testing (an older item) → step 4, review → step 5.
---
## 1. Spec — brainstorm
```bash
kf list --json # the item may already exist: resume it, never run kf new twice
kf contexts --json # restricted: true → a declared name, spelled exactly
kf new <name> --context <ctx>
kf instruct spec-requirement --change <name>
```
When `restricted` is `false`, propose a context list to the human and write only the list they confirm to `.kf/config.json` as `"contexts"`; never add a context to get past a refusal.
**A rough idea goes to `kf:brainstorm` first** — the shape, users or scope not settled: it runs the divergence frameworks, writes this spec and takes the approval, then returns here at step 3. A clear change continues below.
Understand the request first: read the code it touches, ground every file, command, flag and field you will name against its definition, and ask the user only what the repository cannot answer (one short round). A question that needs outside knowledge (a library, an API version, a standard) goes to `Agent(kf:researcher)` with `${CLAUDE_PLUGIN_ROOT}/assets/shared/researcher-brief.md`, its report saved as `<item>/reviews/research-<slug>.md`.
Fill `phase-1-spec-requirement.md` — every placeholder, short and testable:
- `## Objective` — what changes for whom, in two or three lines.
- `## Scope` — `### In Scope` and `### Out of Scope`; an explicit "out" stops drift later.
- `## Acceptance Criteria` — `- [ ] AC-1 …`, each one independently checkable by a test or a person. Under `Level: full` at least one criterion reads as a UI action (what is clicked, typed, shown).
- `## Affected surfaces` — the user-facing surfaces touched (README, docs site, CLI help, changelog, packaging, API reference), one bare name per bullet, or `N/A`.
- `## Documentation Impact` — one line each: `docs/specs/<context>/<capability>.md` (a living doc to create or update; the context `README.md` is never listed), `consolidates: <context>/<feature>` (a legacy feature folded in), or `none — <reason>`.
- `## Estimate` — `- Agent minutes: <n>`, your own raw estimate of the whole item; never apply a factor.
- `## Test Strategy` — `- Level: unit | unit+integration | full`, the bare word. Let the change set it: logic is `unit`, a datastore or an API is `unit+integration`, a user interface or a critical flow is `full`; ask only when you cannot tell.
- `## Review Focus` (optional) — up to five inputs or failure modes no criterion pins, likeliest first. `## Open Questions` (optional) — only what the human must answer.
Self-review with fresh eyes: placeholders, vague criteria, contradictions, a scope too wide for one change. For a spec that changes a shared contract (a public CLI or API, a schema, persisted data), dispatch `Agent(kf:spec-reviewer)` once, `model: fable`, naming the item folder, a verbatim excerpt of the user's request and a report file `<item>/reviews/spec-review.md`; fix what it finds or carry its HIGH findings into the approval summary.
**A plan only for two or more tasks.** One task — the usual case — needs no plan. When the work splits into tasks a reviewer could judge apart, write `phase-2-implementation-plan.md` (`kf instruct implementation-plan --change <name>`): the `## Task Breakdown` table with every task's **Files** allowlist (paths, directories or globs) and `TASK-###` Dependencies, then one `Execution:` line per wave from `kf tasks <name> --graph` (`Execution: wave <w> inline` for a wave of one task, else `Execution: wave <w> parallel, <N> developers`). For a shared surface the plan changes (a route, a schema, a public export, a CLI contract), dispatch `Agent(kf:scout)` first and put each test file on its `Will break:` lines in the Files of exactly one task, the earliest.
## 2. Approval — the one human gate
```bash
kf validate --change <name>
```
Fix every error but `approval_required` and `requirement_unconfirmed` (both expected before the human answers; set the spec's `status: confirmed` only on the human's yes, then run `kf approve`). Present one tight summary: the objective, each acceptance criterion, the tasks (or "one task") with their Files, the estimate, the test level, and — when `.kf/config.json` does not set `worktree.enabled: true` — that the work runs in the main checkout. Ask **"approve?"** once.
- **approve** → set the spec's frontmatter `status: confirmed`, then `kf approve <name>`: approval recorded, the item moves through planning to implementation (worktree provisioned when enabled).
- **approve, backlog** (any reply that defers) → `status: confirmed`, `kf approve <name> --backlog`: it waits in backlog for the human's `kf stage <name> implementation`.
- **pushback** → edit the spec (and plan), present again.
Never infer a deferral and never ask a second question. A refused move (gate, worktree) names what to fix; fix it and re-run the same command. After approval the spec and plan are frozen: a scope change is `kf stage <name> planning`, an edit, and a fresh approval, on the human's direction.
## 3. Build — tests first
`kf status --change <name>` prints `Worktree:` (path and branch) and `Domain:` / the `127.0.0.1:<port>` fallback. When `worktree.domains` is `false` in `.kf/config.json`, use `http://127.0.0.1:<port>` (the JSON outputs still carry `domain`; do not use it then). All code work happens in that worktree, on its branch.
**One task (no plan): inline, by you.** No seats, no ledger.
1. Write the failing test for each acceptance criterion that changes executable behaviour; run it and see it fail for the right reason (the behaviour missing, not an import error).
2. Write the code; run the focused tests, the typecheck and the lint the project uses (read them from `package.json`, `AGENTS.md` or the CI config).
3. Commit on the item branch — subject and body only. Several commits are fine.
No ledger lines are needed in the item worktree: with a commit on its branch and a clean tree, `kf next <name>` prints `verify wave 1: kf verify <name> --stage` when stage commands are pinned, then `finished`. A repair after a FAIL needs no ledger line either: commit it and verify again. Without an item worktree (`worktree.enabled` off), `kf next` asks for the Conflict scan and One-task decides instead; record them in the ledger as it prints.
**Two or more tasks (a plan): the task loop.** Follow `${CLAUDE_PLUGIN_ROOT}/assets/skills/flow/references/task-loop.md`: `kf next <name>` prints the actions — `Agent(kf:test-writer)`, `Agent(kf:developer)` and `Agent(kf:code-reviewer)` per task, the controller's commits, task verifies, fix rounds, decides — and you carry out every one and run it again, recording each step with `kf record`. It ends with `finished`.
## 4. Verify once, then move to review
```bash
kf verify <name> --stage # in the background; exit 0 pass, 1 a command failed, 3 a wrong call
kf stage <name> review
```
The first run is the full `harness.verify.stage`; a re-run after a fix is a delta against that record (`delta from <sha7>: <n> changed files, <m> test files`), or a full run when it prints `full run: …` (a config or lockfile changed, a file was deleted or renamed, or the last full record is not an ancestor of HEAD); `--fresh` forces one. Exit 1 → fix it (one task: inline, then re-run; a plan: the task loop routes it). `kf stage` moves only on a passing record at HEAD (or HEAD's tree); with no `harness.verify.stage` pinned it moves on the human's waiver (`--waive "<reason>"`). Any later commit — the living-docs commit included — owes a new (delta) `kf verify <name> --stage`.
## 5. Review — independent seats, then the report
Follow `${CLAUDE_PLUGIN_ROOT}/assets/skills/flow/references/review.md` from § 1: facts, living docs, `select-tier` and `select-dimensions`, the pack (`review-package`), the `Agent(kf:code-reviewer)` seats in one message, `verify-findings.mjs`, the verdict, then for a PASS the push, `gh pr create`, `kf issues link <name> <url> --pr` and the CI watch, and `kf report <name>`, whose `## Verdict`, `## Reviewers` and `## Findings` you fill (its `## Evidence` is prefilled).
## 6. Merge and close
- **PASS** → hand the human the PR URL and its mergeability line, with the `gh pr merge` command when the PR is ready. The human merges, on GitHub or by running that command; `kf status --change <name>` (or `kf sync`) then closes the item to `done`. Ask nothing about closing; never merge yourself.
- **FAIL** (reviewers or red CI) → `kf stage <name> implementation`, repair (step 3, on the task that owns the failing file), step 4, step 5 with the new execution. The open PR updates on push.
- **REQUIREMENT_BUG** → stop and report what the review found; never rewrite the spec yourself.
When the work should be dropped for good, propose `kf cancel <name> --reason "<why>"`; the human decides.