Use when a codebase should gain new behaviour - a feature, capability, command, setting, flow or integration. Sizes the work, then a short plan or grill, spec and parallel slices, delegates the build, independently verifies, reviews on two axes and merges.
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 Vfeature?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vocsong-vfeature)
---
name: vfeature
description: Use when a codebase should gain new behaviour - a feature, capability, command, setting, flow or integration. Sizes the work, then a short plan or grill, spec and parallel slices, delegates the build, independently verifies, reviews on two axes and merges.
---
# vfeature — build a feature
Read `../vcore/SKILL.md` first and follow it (announce, size, overlay, gates, run record, report).
You are the lead: plan, brief, monitor, verify, review and merge. Every feature is built by a
builder in its own worktree. Never write the feature code yourself, even when the builder uses
the same model.
## 1. Size and builder choice
State `trivial`, `small` or `large` (see vcore) in the announce line. The user can force any size.
One slice of an already signed-off spec is `small`.
Resolve the builder before announcing. The bundled default is `same-as-lead`: use the lead
harness's subagent tool with worktree isolation where it has one, otherwise the same CLI, with
the lead's model and thinking either way. Override it with
`Builder: <harness> · <model> · <thinking>` in `notes/vfeature.md` at any overlay layer; the later
overlay layer wins (see vcore). The announce line names the builder and where the choice came from
(bundled default or the winning overlay path).
## 2. Small path
1. Write a short plan in the chat: what changes, the data shape or state model first (types,
states, transitions) when there is one, the assumptions you are making, and the test seams. No
gate unless an assumption is a real user decision.
2. [Dispatch a builder](#dispatch-builders) for the plan. The builder works test-first where a
meaningful seam exists.
3. When the builder reports done: `../vverify/SKILL.md` → `../vreview/SKILL.md` → `../vmerge/SKILL.md`.
The trivial path still delegates the build; use vcore's light gates for its proof and review.
## 3. Large path
1. **Grill** — `../vgrill/SKILL.md` until no open decisions remain. A fork a quick prototype can
settle gets a prototype from a builder, not a question.
2. **Spec** — `../vspec/SKILL.md` writes `docs/specs/<YYYY-MM-DD>-<slug>.md` (or the location
`standards.md` names), with slices from `../vslice/SKILL.md`.
3. **Gate: spec sign-off.** Show the settled decisions, the test seams and the slice graph; wait for
a yes. A contested design (two credible shapes) gets `../varchitect/DESIGN-IT-TWICE.md` first.
4. **Build in parallel.** [Dispatch a builder](#dispatch-builders) for each slice whose dependencies
have landed.
5. **Per slice**, when a builder reports done: `../vverify/SKILL.md` (independent re-run) →
`../vreview/SKILL.md` (fix loop and convergence rules there) → `../vmerge/SKILL.md`. Land in
dependency order; rebase the next ready slices on the new base.
6. Tick each slice in the spec's checklist as it lands; the last slice's tick gets its own small
follow-up if needed.
7. Assign the spec-wide integrated acceptance check and its owner to the final slice. Once all
slices land, run the check on the base branch and record its result.
## Dispatch builders
1. **Sweep and preflight.** At the start of the run, after writing its start record, run
`node <skills>/vcore/scripts/builders.mjs sweep --state <state> --run <run>` to clean up older
runs. Here `<skills>` is the absolute path to the installed skills directory and `<state>` is
`<main checkout>/.vocs-code/playbooks`. Then, from the existing checkout, probe the configured harness, model and thinking
with a one-line prompt that requests no tools or edits. **Gate: builder unavailable.** If it
can't start (CLI missing, signed out, model rejected), hold before creating any worktree or
starting any builder. Show the error line and ask: fix the configuration (recommended), or use
the lead-session default for this run? Never switch silently. If the owner chooses the default,
announce it and probe it too.
2. **Brief and launch.** Give the builder the plan or spec and slice, test seams, files it owns and
must not touch, shared notes for findings, and the glossary and any newly settled terms. Use
absolute paths and say "follow vverify §1–3 and stop; the lead runs §4–5" (light proof and
self-review only for trivial work) and "don't write `runs.jsonl`; the lead keeps the run record". Use the isolated subagent for `same-as-lead` where
available; otherwise create a worktree with
`git worktree add --no-track -b <branch> <path> <base>` and launch the selected CLI there (see
`../vverify/independent.md`). Use a fresh id and log path per attempt. At most 3 builders run at
once unless the overlay says otherwise. Builders commit only on their own branch and never push
or publish. Refuse any builder branch with an upstream the lead didn't create.
```text
node <skills>/vcore/scripts/builders.mjs start --state <state> --run <run> --id <id> --slice <slice> --worktree <abs-worktree> --branch <branch> --base <base-ref> --harness <harness> --model <model> --thinking <level> --estimate <minutes> --brief <abs-brief> --log <abs-log> -- <command...>
```
For Pi use `pi -p --mode json --model <model> --thinking <level>`; without `--mode json` Pi
writes nothing until it exits, so the log can't show progress. On Windows, for a CLI installed as an
npm `.cmd` shim, pass `node <absolute JS entry>` and the CLI flags instead of the shim. Keep
logs under `<state>/logs/`. Only register branches this run created (including repeat attempts
on the same branch). The launcher returns the absolute status path; see the JSON below.
3. **Monitor.** On Pi, call `builder_watch` with the state folder and run id after dispatch and
return to the conversation. Outside Vocs Code, copy `vfeature/pi/builder-wake.ts` into
`~/.pi/agent/extensions/` once and install `vcore` in Pi's global skills directory if it isn't
already there. The extension re-arms the watcher until all builders settle. To stop watching
without stopping builders, call `builder_unwatch` with the same state folder and run id.
On Claude, start `node <skills>/vcore/scripts/builders.mjs watch --state <state> --run <run>` in
the background and return to the conversation. It exits on a builder transition; use the exit
notification and re-arm it while builders are running or stalled but still alive.
At the start of every turn,
run `node <skills>/vcore/scripts/builders.mjs status --state <state> --run <run>` to re-read every
builder's state, elapsed time against estimate, branch and log; use the harness's status tools
for isolated subagents. When the owner asks for status, run `status` and show every builder's
state, elapsed time against estimate, branch and log. Report each new finish, failure or stall
once. On Claude, rely on native
background notifications or scheduled wakeups. On any other lead harness, tell the owner at dispatch:
"This harness can't wake me. Builders keep running; ask me for status and I'll check."
4. **Re-dispatch.** After `NOT VERIFIED`, a blocking review finding or a builder question, start
a fresh run with the same configured builder on the same branch and worktree. Resume a harness
subagent instead if it supports resuming. In either case, give it the original brief path and
the exact findings and failing commands with their output, or the question and its answer, as
applicable. Use a fresh builder id within the same playbook run so earlier attempts stay
visible. If the prior attempt is still alive, stop it with `builders.mjs stop --id <id>`
(also pass `--state <state> --run <run>`) before reusing its worktree. The lead still does not
edit the feature code.
5. **Cleanup.** After a slice lands, run `node <skills>/vcore/scripts/builders.mjs cleanup --state <state> --run <run> --slice <slice>`
(also called by vmerge §6). At the end of every run, whatever the outcome, run the same command
without `--slice`. Report what was kept and why. Use the harness's cleanup tools for native
subagents that didn't register a status file; don't remove unregistered worktrees with the script.
### Builder status JSON
The launcher writes `<state>/builders/<run>/<id>.json` and sets `VOCS_BUILDER_STATUS` to its
absolute path. The PID and start token identify the detached process-tree supervisor. `leadCwd`
is the launcher's absolute working directory, and `leadSession` is recorded only when the launcher's
`VOCS_CODE_SESSION_ID` is a valid session id. Older records may omit both fields.
```json
{"id":"b1","slice":"S1","harness":"pi","model":"model","thinking":"medium","worktree":"/abs/tree","branch":"builder/s1","base":"origin/develop","leadSession":"s_lead","leadCwd":"/abs/lead","pid":123,"processStartTime":"opaque OS token","processStartedAt":1796146496000,"startedAt":"ISO timestamp","estimateMinutes":8,"status":"running","log":"/abs/log","endedAt":null,"summary":"","logBytes":0,"logGrewAt":"ISO timestamp"}
```
Before exiting, the builder must read the latest JSON and atomically replace it, preserving all
other fields (including `leadSession` and `leadCwd` when present). Set `status` to `done` or
`failed`, `endedAt` to an ISO timestamp and `summary` to one line. The monitor marks a missing process `failed` if no final status was written; if descendants
outlived it, the summary says how many are still running, so stop or clean up that builder. It
marks a live builder `stalled` after 15 minutes with neither log growth nor a new descendant
process (`logGrewAt` records the last of either), or after more than twice its estimate. A stall
is not a stop. `stop` and cleanup take a fresh process snapshot and stop every live descendant,
deepest first. The watcher may add `watchReportedStatus`; preserve it as well. The default poll
interval is a quarter of the shortest pending estimate, clamped to 1–5 minutes. Each watch caps its
wait at twice the largest pending estimate at launch; a timeout does not mean all builders settled.
## Done means
- Every slice merged (or held per `merge.md`) with a verdict and a clean review.
- The spec checklist matches reality.
- The integrated acceptance check has a recorded **passing** result or an explicit rollout gate
naming what is pending and who owns it. Use the Spec's check or the one named in the Feature map.
On the small path with no spec-wide check, run the check if the Feature map names one for the area.
Otherwise record `"acceptance":"pending"` or `"gated"` with the reason.
- The run record keeps slice merge state separate from feature acceptance. Write
`"acceptance":"passed|failed|pending|gated"` on the end line (see `../vcore/SKILL.md`).