원클릭으로
feature
Start a new feature in an isolated git worktree with proportional verification
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Start a new feature in an isolated git worktree with proportional verification
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Start a new feature in an isolated git worktree with proportional verification
Diagnose and fix a bug in an isolated git worktree with reproduce-first, test-first methodology
Create a pull request with cleanup, fmt, and test gates
Safely restructure code in an isolated git worktree with test-preserved, incremental transformations
Start a new feature in an isolated git worktree with proportional verification
Diagnose and fix a bug in an isolated git worktree with reproduce-first, test-first methodology
| name | feature |
| description | Start a new feature in an isolated git worktree with proportional verification |
| when_to_use | when the user says "start a feature", "new feature", invokes "/agent-dashboard:feature", or describes work that needs an isolated branch + worktree + planned implementation loop. NOT for hotfixes, single-file edits, pure exploration, or non-code changes (use /agent-dashboard:chore, /agent-dashboard:fix, /agent-dashboard:investigate instead). |
| version | 1.0.0 |
| disable-model-invocation | true |
| effort | max |
<codex_skill_must>
permission_mode='plan'; if not plan, stop and ask the user to run /plan.mkdir -p and git worktree add -b feat/<name> ... main as separate exec_command calls.<proposed_plan>...</proposed_plan>.<proposed_plan>, stop until plan-review approval; ordinary chat approval is not implementation approval..feature-plan-path before implementation.exec_command, request_user_input, spawn_agent, wait_agent, update_plan, apply_patch; every spawn_agent needs wait_agent.
</codex_skill_must>Start a new feature in an isolated git worktree.
Feature description: $ARGUMENTS
Follow these phases in order. Each phase has a gate — do not proceed until the gate is satisfied.
Before every action, identify the current phase and check its gate. If a gate is not satisfied, stop instead of falling back. If you violate phase order, halt and report the violated gate.
If the feature touches browser UI, Playwright, dev-server ports, screenshots, or interactive Browser/Chrome inspection, apply ../_shared/ui-automation.md at planning, environment setup, verification, delegation, and cleanup points.
For Verification profiles, apply ../_shared/verification-profiles.md. Active AGENTS.md/core rules may add doctrine, but this shared glossary is the standalone agent-dashboard fallback.
Follow ../_shared/worktree-setup.md with branch prefix feat.
Gate: Working directory is the new worktree on the correct branch, based on latest main. If .env* files existed in the source repo, they are all present in the worktree.
Start two tracks in parallel:
Plan-first guarantee. Phase 2 is planning only. No dependency installs, no
sentinel writes, no environment setup runs until the plan is approved. The
only writes allowed in this phase are read-only research (Codex explorer)
and the <proposed_plan> submission itself. Environment setup kicks off in
the post-approval actions below.
Background — Environment setup: Launch a background agent (run_in_background: true) to set up the dev environment per ../_shared/env-setup.md.
Phase order: Plan Mode first, then research, then interview, then submit. Plan Mode is the entry gate to Phase 2 — nothing else in this phase happens outside it. Each step has a HARD-GATE you cannot rationalize past.
Enter Codex Plan Mode via /plan before continuing. Dashboard-created Codex feature sessions should auto-enter Plan Mode before the skill prompt is submitted. If permission_mode is not plan, stop immediately and ask the user to run /plan; do not research, interview, draft, call spawn_agent, call update_plan, edit files, write tests, run setup, or create sentinels.
No spawn_agent, request_user_input, or plan drafting until permission_mode='plan'.
Research with spawn_agent explorer. Use a Codex explorer subagent for non-trivial codebase or library lookups. Always pair spawn_agent with a wait_agent to retrieve the explorer's findings — never spawn-and-forget. Do not delegate planning — composing the plan is your job. Synthesize what you found inline as your own assistant text so it lands in the visible plan artifact (not in a tool result the user can't approve).
explorer for research is fine; never dispatch another role to compose the plan. Every spawn_agent must be followed by wait_agent.
Foreground — Planning:
request_user_input. Identify every gating decision the implementation depends on — URLs, IDs, scope boundaries, copy text, what to delete vs keep, version pins, credentials. Ask them as a single request_user_input call with multi-choice options, not as freeform numbered text. If request_user_input is unavailable during Phase 2, stop and ask the user to run /plan.Phase order: research first, interview second, plan mode third, submit fourth. Plan mode is the last gate before approval, not a pre-research speed-bump. Each step has a HARD-GATE you cannot rationalize past.
Research with Explore. Use the built-in Explore subagent for any non-trivial codebase question or library lookup. Do not call Agent with subagent_type=Plan — composing the plan is your job, not a delegated subagent's. Synthesize what you found inline as your own assistant text.
Do not wait for environment setup to finish.
Interview the user via AskUserQuestion. Identify every gating decision the implementation depends on — URLs, IDs, scope boundaries, copy text, what to delete vs keep, version pins, credentials. Ask them as a single AskUserQuestion call with multi-choice options, not as freeform numbered text in your assistant message.
Load via ToolSearch if AskUserQuestion isn't in scope: ToolSearch("select:AskUserQuestion").
Schema: 1–4 questions per call, each with a header (≤12 chars), 2–4 mutually exclusive options, multiSelect: false unless the choices genuinely combine. Recommended option goes first with (Recommended) suffix. The user always gets an "Other" escape hatch automatically.
Schema: 1–3 questions per call, each with a header (≤12 chars), 2–3 mutually exclusive options. Recommended option goes first with (Recommended) suffix. The client adds an "Other" escape hatch automatically.
Worked example:
<!-- claude-only -->
AskUserQuestion({
<!-- /claude-only -->
<!-- codex-only -->
request_user_input({
<!-- /codex-only -->
questions: [{
<!-- codex-only -->
id: "focus_path",
<!-- /codex-only -->
question: "Where should focus.json live?",
header: "Focus path",
<!-- claude-only -->
multiSelect: false,
<!-- /claude-only -->
options: [
{label: "~/.agent-dashboard/focus.json (Recommended)", description: "Co-located with agents/ state dir already watched."},
{label: "$XDG_RUNTIME_DIR/agent-dashboard/focus.json", description: "Tmpfs-backed, cleared on reboot."},
],
}]
})
The plan you submit in step 4 must be implementable as written. No "Decisions needed", "Phase 0", "TBD", "?", or "to be confirmed" sections in the body. If a user answer changes scope, return to this step and re-interview.
The plan you submit in step 4 must be implementable as written. No "Decisions needed", "Phase 0", "TBD", "?", or "to be confirmed" sections. If a user answer changes scope, re-interview before submitting.
If you find yourself typing "1." "2." "3." questions in assistant text — STOP. Use request_user_input.
EnterPlanMode, then draft the plan inline. Now that research is done and decisions are resolved, call EnterPlanMode (load via ToolSearch if not in scope). This flips the parent's permission_mode='plan' and restricts you to read-only tools while you write the plan as your own assistant text.Caveat: update_plan is a progress checklist tool, not a planning-mode substitute. Use it after approval to track implementation progress; do not use it to bypass Plan Mode.
Caveat: on approval (step 4), CC drops to its default permission_mode, not back to bypassPermissions. Subsequent edits in Phase 3 will re-prompt unless the user re-enables bypass. Accepted trade-off — visible planning is worth the one-time mode reset.
Phase format for multi-phase plans. If the plan has 3+ distinct work units, structure it with a ## Phases checklist and matching ### Phase X: headings. Step 4 reads this format to offer the dispatch probe; /agent-dashboard:implement parses it to drive the dispatch loop. Plans without it can't be dispatched.
Phase format for multi-phase plans. If the plan has 3+ distinct work units, structure it with a ## Phases checklist and matching ### Phase X: headings. The post-approval probe reads this format to offer dispatch; /agent-dashboard:implement parses it to drive the dispatch loop. Plans without it can't be dispatched.
## Phases
- [ ] **Phase A: <short name>** — files: <globs>, deps: -
- [ ] **Phase B: <short name>** — files: <globs>, deps: A
- [ ] **Phase C: <short name>** — files: <globs>, deps: B
### Phase A: <short name>
<10–50 lines: what files, Verification profile (Surgical/Targeted/Full) + proof command, what invariants, what to leave alone.>
### Phase B: <short name>
<...>
Rules:
## Phases block is the dispatch index. Phase names MUST match between checklist and ### Phase X: headings (case-sensitive)./agent-dashboard:implement does not default to whole-repo tests for isolated work.deps: defaults to "depends on previous phase". Use - for "no dependencies".- [ ] = pending. - [x] = done. /agent-dashboard:implement flips these as it dispatches.Submit via ExitPlanMode. Wait for user approval. Pass the full plan markdown to the plan file (per CC's plan-mode workflow) and call ExitPlanMode. This renders the plan in CC's native plan-review UI for accept/reject.
ExitPlanMode is the only acceptable submission. Pasting the plan as assistant text is a violation, even if you also call ExitPlanMode afterwards. The user reviews and approves through the plan-review UI — nowhere else.
<proposed_plan> is the only acceptable submission. Pasting the plan as ordinary assistant text is a violation, even if you also update a checklist afterwards. The user reviews and approves through the plan-review UI — nowhere else.
No exceptions:
Post-approval actions (immediately after the user accepts the plan, before Phase 3):
~/.claude/plans/<slug>.md). Record that path so /agent-dashboard:implement can find it:/agent-dashboard:implement can find it: ```bash
echo "<absolute-plan-path>" > .feature-plan-path
```
- [ ] / - [x] lines under ## Phases. If there's no ## Phases block or the count is < 3, skip step 3 below and start Phase 3 inline.Kick off environment setup as a background exec_command (always). The setup task runs in parallel with the dispatch probe and any pre-Phase-3 work so its install time is amortised. It must follow ../_shared/env-setup.md.
Count the phases. Read the plan; count - [ ] / - [x] lines under ## Phases. If there's no ## Phases block or the count is < 3, skip step 4 below and start Phase 3 inline.
AskUserQuestion exactly once:
"Plan has {N} phases. Continue inline here, or hand off to /agent-dashboard:implement for context isolation?"request_user_input exactly once when available; otherwise ask one concise direct question and wait for the user's answer. Never choose the recommended option yourself.
"Plan has {N} phases. Continue inline here, or hand off to /agent-dashboard:implement for context isolation?" - Header: `"Dispatch"`
- Options (recommended first):
- `"Continue inline (Recommended for ≤4 phases)"` — Stay in this session; run each phase with its selected Verification profile and proof command.
- `"Hand off to /agent-dashboard:implement"` — Exit /agent-dashboard:feature. The user invokes `/agent-dashboard:implement` in a fresh session; each phase dispatches to its own subagent.
**If `Continue inline`:** start Phase 3. The `## Phases` structure becomes documentation — inline implementation ignores the index.
**If `Hand off to /agent-dashboard:implement`:** print the message below and exit cleanly. Do not start Phase 3.
```
Plan saved to <plan-path>.
Worktree ready at <worktree-path>.
To continue, run:
/agent-dashboard:implement
(Recommended: open a fresh terminal session for max context isolation.)
```
Gate: Plan approved with no open decisions. .feature-plan-path written. Either Phase 3 begins (inline) or the skill exited with the handoff message (dispatch).
Pre-gate: Check for .env-setup-done in the worktree root.
node_modules/ exists, pip list succeeds, go env GOPATH works) and data symlinks resolve correctly..env-setup-failed exists: surface the error and halt.Effort note: When launched via the agent-dashboard's New Agent flow, this skill spawns with --effort high on the CLI, which Claude Code pins at the session level. The dynamic dispatcher in agent-state-fast.js bumps effort to max automatically while permission_mode='plan' (EnterPlanMode active) and drops back to high on exit — so planning runs at max effort without paying that cost during implementation. When invoked as a slash command inside an existing claude session, you can run /effort max before entering plan mode and /effort high (or lower) before implementation.
Effort note: When launched via the agent-dashboard's New Agent flow, this skill starts at implementation effort. Codex Plan Mode is the high-reasoning planning surface; once the approved plan is accepted, use update_plan for progress tracking and keep implementation effort proportional to the work.
Delegation gate: Invoke /codex:setup to check Codex CLI availability. If the output contains "ready": true, delegate only if the user explicitly requested Codex delegation OR the plan touches 10+ files / ~3,000+ lines of implementation. Below that threshold, the orchestration overhead (skill loading, prompt construction, subagent context, result parsing, review) costs more tokens than Claude implementing directly. If delegating, invoke /codex-delegate with the approved plan (Phase 2) as implementation context, then skip to the phase gate. Otherwise, proceed below.
Delegation gate: Use Codex spawn_agent only if the user explicitly requested subagents OR the plan touches 10+ files / ~3,000+ lines of implementation. Below that threshold, the orchestration overhead (skill loading, prompt construction, subagent context, result parsing, review) costs more tokens than implementing directly. If delegating, use /agent-dashboard:implement with the approved plan (Phase 2) as implementation context, then skip to the phase gate. Otherwise, proceed below.
Build the feature using the active AGENTS.md/core proportional verification doctrine when present, and ../_shared/verification-profiles.md as the standalone fallback. This skill selects the profile, records the proof command, and runs that command.
Loop:
Verification profile: <Surgical|Targeted|Full> and Proof command: <command or none> before editing. Escalate the profile if the diff grows.For UI verification, prefer headless Playwright with worktree-local resources. Use interactive Browser/Chrome inspection only when the shared policy says it is warranted.
Gate: Environment ready. The selected verification profile passes. Implementation matches the approved plan, and unnecessary new tests were not added.
Review all changes for correctness, security, and convention adherence. Apply all project rules and conventions that are in your context.
Gate: No critical or high-severity issues remain.
feat: conventional commit message./agent-dashboard:pr. That skill owns conditional cleanup/formatting, final test gating when available, push, and gh pr create. Do not call gh pr create directly — a pr-skill-gate hook will block it.Gate: Clean commit history with conventional commit messages. PR opened via /agent-dashboard:pr.
Triggered when the user indicates the feature has been merged upstream.
.env-setup-done / .env-setup-failed / .feature-plan-path sentinel filesIf you catch yourself saying or thinking any of these, pause and re-read the relevant phase. (Hooks block the common paths for commits on main and direct gh pr create, so those get no self-check bullets here.)
Explore; plan inline. The dashboard can't surface delegated plans.EnterPlanMode, plan mode resets bypassPermissions" → Phase 2 step 3 violation. The reset to default permission_mode is the accepted cost.ExitPlanMode" → Phase 2 step 4 violation. ExitPlanMode is the only acceptable submission..feature-plan-path later, after I start Phase 3" → write it now. /agent-dashboard:implement and resume can't find the plan without it.