/groundwork:build-unplanned [feature-description] [--on-unrelated-failure stop-and-ask|expand-and-fix|ignore-and-merge]from groundwork
Orchestrates ad-hoc feature development from a description using worktree isolation and TDD. Delegates to plan-task, implement-task, and validate subagents.
Ships in groundwork. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Thin orchestrator for ad-hoc feature development without existing task definitions. Delegates to plan-task (blurb mode), implement-task, and validate.
This skill orchestrates long multi-agent workflows. Every turn re-reads the full context window, so unnecessary turns are expensive.
Your current effort level is {{effort_level}}. Skip this step silently if effort is high, xhigh, or max (the scale is low < medium < high < xhigh < max, so xhigh and max are already above high) AND you are Sonnet or Opus. Otherwise ask via AskUserQuestion (header "Model check"; options "Continue anyway" / "Cancel — I'll switch first"):
"Do you want to switch? Feature development benefits from consistent multi-domain reasoning.
Recommended: Sonnet or Opus at high effort.
To switch: cancel, run
/effort high(and/model sonnetif on Haiku), then re-invoke this skill."
If the user selects "Cancel — I'll switch first": output the switching commands and stop. Do not proceed with the skill. Ask once per conversation: a skill invoked by another skill skips this step when the recommendation was already shown. In a non-interactive run (--noninteractive, GROUNDWORK_RUNNER_MODE=true, or GROUNDWORK_BATCH_MODE=true), skip the prompt and continue on the current model.
.groundwork.yml exist at the repo root?
{{project_name}} non-empty?
Skill(skill="groundwork:select-project") to select a project, then restart this skill.{{project_name}}, specs at {{specs_dir}}/.--project.
.groundwork.yml: the repo root or the selected project's path → fine, proceed; no project's path → proceed without warning (shared directory).--noninteractive, keep the selected project and continue; otherwise warn via AskUserQuestion:
"You're working from
<cwd>(inside [cwd-project]), but the selected Groundwork project is [selected-project] ([selected-project-path]/). What would you like to do?"
- "Switch to [cwd-project]"
- "Stay with [selected-project]" If the user switches, invoke
Skill(skill="groundwork:select-project").
AskUserQuestion to ask:
"What feature would you like to build? Describe it briefly."
plan-taskCall Skill(skill="groundwork:plan-task") with the blurb from Step 1 in the conversation context. Do NOT pass a task_id — this triggers blurb/feature mode in plan-task, which will:
understanding-feature-requests for requirement clarificationFEATURE-<slug> identifierParse the output:
RESULT: PLANNED | plan_file_path=<path> | identifier=<id> | branch_prefix=<prefix> → Save plan_file_path, identifier, branch_prefix. Proceed.RESULT: FAILURE | ... → Report the failure to the user and stop.Use AskUserQuestion:
"[identifier] — plan ready. Proceed to implementation?"
- Option 1: "Yes, begin implementation"
- Option 2: "Stop here — I'll review the plan first"
If "Stop here": Print the plan file path and stop:
Plan saved to: <plan_file_path>
To resume implementation later:
/groundwork:implement-task <plan_file_path>
implement-taskCall Skill(skill="groundwork:implement-task") with plan_file_path in the conversation context. Do NOT pass a task_id.
Parse the output:
RESULT: IMPLEMENTED | worktree_path=<path> | branch=<branch> | base_branch=<bb> → Save values. Proceed.RESULT: FAILURE | ... → Report failure to the user and stop.Use AskUserQuestion:
"Implementation complete for [identifier]. Validation runs the reviewer agents next and can compound context. Clear context before validation?"
- Option 1: "Continue to validation now"
- Option 2: "Stop here — I'll clear and resume manually"
If "Continue to validation now": Proceed to Step 4.
If "Stop here": Print resume instructions and STOP:
## Paused before validation
Implementation is committed in:
- **Worktree:** `<worktree_path>`
- **Branch:** `<branch>`
- **Base branch:** `<base_branch>`
To resume validation in a clean context:
1. Run `/clear` to clear Claude Code context
2. `cd <worktree_path>`
3. Run `/groundwork:validate`
When ready to merge (commit any uncommitted validation fixes inside the worktree first — the fixer never commits):
cd <project_root>
git checkout <base_branch>
git merge --no-ff <branch>
git worktree remove <worktree_path>
git branch -d <branch>
cd into the worktree path from Step 3Skill(skill="groundwork:validate"). When the invocation carried --on-unrelated-failure <mode> other than the default, include the flag in that call's arguments: --on-unrelated-failure <mode>After validate completes:
Validation PASSED-WITH-WAIVERS (...) (only possible with --on-unrelated-failure ignore-and-merge) → Proceed to Step 5, relaying the waived-gate lines into the Step 5 merge question; never present a waived gate as passedFrom the project root (NOT the worktree), handle merge:
Use AskUserQuestion to ask:
"Implementation and validation complete for [identifier]. Would you like me to merge this into [base-branch] now?"
- Option 1: "Yes, merge now"
- Option 2: "No, I'll merge manually later"
Wait for user response before proceeding.
If merging: Follow ${CLAUDE_PLUGIN_ROOT}/references/task-merge-sequence.md with the worktree path, branch, and base branch recorded in Step 3: commit the validation repairs on the feature branch first (the fixer never commits), merge from the project root with --no-ff, then remove the worktree and delete the branch. On a conflict, abort, keep the worktree, and report as below.
If not merging or conflicts occurred:
## Implementation Complete in Worktree
**Location:** `<worktree_path>`
**Branch:** `<branch>`
When ready to merge (commit any uncommitted validation fixes inside the worktree first — the fixer never commits):
```bash
cd <project_root>
git checkout <base_branch>
git merge --no-ff <branch>
git worktree remove <worktree_path>
git branch -d <branch>
To continue working:
cd <worktree_path>
## Step 6: Report
Output implementation summary:
```markdown
## Feature Complete: [identifier]
**What was done:**
- [summary]
**Validation:** Passed ([N] iteration(s))
**Worktree status:** [Merged to <branch> | Pending at `<worktree_path>`]
Output the final result line:
RESULT: SUCCESS | [one-line summary]
Branch and worktree names come from the shared worktree-identity helper (node ${CLAUDE_PLUGIN_ROOT}/lib/worktree-identity.js <identifier>), used verbatim. It names both planned tasks and ad-hoc features the same way: task/<identifier> in a single-project repo, task/<project>/<identifier> in a monorepo — so task/TASK-NNN for a planned task and task/FEATURE-<slug> for an ad-hoc feature.
This skill is designed for standalone use when:
For planned work with existing specs, use groundwork:work-on instead.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (etr/groundwork) — no native marketplace selected
npx claudepluginhub p/etr-groundwork44 skills in this plugin
/check-specs-alignmentVerify alignment between code and specs./create-tasksGenerate implementation tasks from architecture document./debugUse when investigating bugs, unexpected behavior, test failures, or any code that does not work as expected - enforces systematic root cause analysis before any fix/design-architectureUse when the user asks to design system architecture, make architectural decisions, or translate PRD into technical designOther plugins' skills for the same job