/arn-code:arn-code-plan [spec-name]from arn-code
Generates an implementation plan from an Arness specification using the arn-code-feature-planner agent. Presents the plan for review and iterates on feedback until approved, producing a PLAN_PREVIEW file.
Ships in arn-code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate an implementation plan from a Arness specification by invoking the arn-code-feature-planner agent. The plan is written to disk as a PLAN_PREVIEW file, presented to the user for review, and iteratively refined based on feedback until approved. The approved plan then feeds into /arn-code-save-plan for structuring into phases, tasks, and reports.
Pipeline position:
arn-code-init -> arn-code-feature-spec / arn-code-bug-spec -> **arn-code-plan** -> arn-code-save-plan -> arn-code-review-plan -> arn-code-taskify -> arn-code-execute-plan
If no ## Arness section exists in the project's CLAUDE.md, inform the user: "Arness is not configured for this project yet. Run /arn-planning to get started — it will set everything up automatically." Do not proceed without it.
Read the project's CLAUDE.md and extract the ## Arness section to find:
If ## Arness is not found, inform the user: "Arness is not configured for this project yet. Run /arn-planning to get started — it will set everything up automatically." Do not proceed.
The user may provide a spec name as an argument (e.g., "arness plan FEATURE_websocket-notifications" or "plan the spec websocket-notifications").
If an argument was provided:
<specs-dir>/<argument>.md (exact match)<specs-dir>/FEATURE_<argument>.md and <specs-dir>/BUGFIX_<argument>.md<specs-dir>/ that contain the argument text in their filenameIf no argument was provided:
.md files in <specs-dir>/<specs-dir>/. Run /arn-code-feature-spec or /arn-code-bug-spec to create one first."Read these files (skip any that don't exist):
<code-patterns-dir>/code-patterns.md<code-patterns-dir>/testing-patterns.md<code-patterns-dir>/architecture.md<code-patterns-dir>/ui-patterns.md (if it exists)<code-patterns-dir>/security-patterns.md (if it exists)If pattern documentation files are missing (no code-patterns.md, testing-patterns.md, or architecture.md in the Code patterns directory):
Inform the user: "This is the first time pattern documentation is being generated for this project. Analyzing your codebase to understand its patterns, conventions, and architecture. This is a one-time operation — future invocations will use the cached results."
Then invoke arn-code-codebase-analyzer (existing codebase) or arn-code-pattern-architect (greenfield) to generate fresh analysis. Write the results to the Code patterns directory.
Specs may have been written days or weeks before being planned. The codebase moves in the meantime — files get renamed, modules refactored, frameworks swapped. Before invoking the planner, verify the spec's concrete references still hold against HEAD.
Spawn the arn-code-drift-detector agent via the Agent tool, passing the model from .arness/agent-models/code.md as the model parameter (see ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/ensure-config.md "Dispatch convention" for fallback). Context:
Verify whether the following specification still aligns with the current codebase.
**Spec file:** <specs-dir>/<spec-filename>
**Source root:** <repo root>
Return a structured drift report with severity classified as none, minor, moderate, or major.
Capture the agent's drift report and branch on severity:
none — proceed silently to Step 4.
minor — display the report's Summary line to the user (one sentence). Carry the full drift report forward as an annotation to the planner agent's context (see Step 4 input block below). Proceed to Step 4.
moderate or major — display the full drift report. Then ask the user how to proceed using AskUserQuestion:
The spec has drifted from the current codebase. How would you like to proceed?
/arn-code-feature-spec (or /arn-code-bug-spec for a bug spec) with the drift report as input so the spec can be updated against current reality.Honor the user's choice. On (1), exit this skill and route to the spec skill. On (3), exit cleanly. On (2), continue to Step 4 with the drift report attached.
If the drift detector itself fails (e.g., spec file unreadable, git unavailable), inform the user and ask whether to proceed without a drift check. Do not block on a tool failure.
Derive the spec name from the spec filename (strip prefix and extension):
FEATURE_websocket-notifications.md → websocket-notificationsBUGFIX_checkout-500.md → checkout-500FEATURE_F-001.1_user-auth.md → F-001.1_user-authThe output file path is: <plans-dir>/PLAN_PREVIEW_<spec-name>.md
Check for existing PLAN_PREVIEW: If a PLAN_PREVIEW file already exists at that path, inform the user: "A plan preview already exists for this spec: <path>. Would you like to regenerate it from scratch, or review the existing plan?" If review → skip to Step 5. If regenerate → proceed.
Spawn the arn-code-feature-planner agent via the Agent tool, passing the model from .arness/agent-models/code.md as the model parameter (see ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/ensure-config.md "Dispatch convention" for fallback). Context:
You are generating an implementation plan for the following specification.
**Specification:** <spec-name>
**Spec file:** <specs-dir>/<spec-filename>
--- SPECIFICATION CONTENT ---
[full spec file content]
--- END SPECIFICATION ---
--- DRIFT REPORT ---
[full drift report from Step 3.5, if severity was minor/moderate/major and the user chose to proceed; omit this section entirely if severity was none]
--- END DRIFT REPORT ---
--- CODEBASE PATTERNS ---
[code-patterns.md content]
[testing-patterns.md content]
[architecture.md content]
[ui-patterns.md content, if it exists]
[security-patterns.md content, if it exists]
--- END CODEBASE PATTERNS ---
**Output file:** <plans-dir>/PLAN_PREVIEW_<spec-name>.md
Generate a structured implementation plan and write it to the output file.
Include `Spec: <specs-dir>/<spec-filename>` near the top for arn-code-save-plan linkage.
Record the agent ID returned by the Agent tool (needed for resume in Step 5b).
After the planner agent completes:
<plans-dir>/PLAN_PREVIEW_<spec-name>.md**Complexity:** and **Complexity rationale:** fields (added by the planner per ${CLAUDE_PLUGIN_ROOT}/agents/arn-code-feature-planner.md's Complexity Assessment section). If a phase is missing these fields (older plans), treat its complexity as unknown and skip the upgrade gate for it.Phase 3: Dispatch Site Edits — 7 deliverables — complexity: complex). Always show the rating, regardless of whether an upgrade gate fires.If the user approves (e.g., "looks good", "approved", "yes", "proceed"): → Go to Step 5a (Complex Phase Upgrade Gate) before Step 6.
If the user provides feedback (e.g., "split phase 2 into two phases", "add error handling for X", "remove the caching component"): → Go to Step 5b.
Before marking the plan approved, check whether the user should be offered an executor model upgrade for any complex phases.
Filter: Build the list of phases with **Complexity:** complex. If empty, skip this step entirely and go to Step 6.
Profile detection: Read the project's CLAUDE.md ## Arness block for Code agent model profile:. Branch:
all-opus: skip this step silently (every agent is already on Opus, nothing to upgrade). Display brief status line: Preference: complex phase upgrade silenced — profile is all-opus (no upgrade needed). Go to Step 6.balanced or custom: continue..arness/agent-models/code.md doesn't exist: treat as unknown and continue (run the gate — the user gets the choice).Two-tier preference lookup for pipeline.complex-phase-upgrade per ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/preferences-schema.md:
.arness/workflow.local.yaml — if file exists and key present, use that value (note source).~/.arness/workflow-preferences.yaml — if file exists and key present, use that value (note source).null (first encounter).Branch on the resolved value:
always: auto-mark every phase with complexity complex for modelOverride: "opus" in the in-memory plan structure (carried into save-plan). Display status line: Preference: upgrading N complex phases to Opus executor (stored in <source>). Go to Step 6.never: skip the gate silently. Go to Step 6.ask: show the gate below. Do NOT show the remember-this follow-up afterward.null (first encounter): show the gate below. After the user answers, show the remember-this follow-up.Gate (shown when value is ask, null, or invalid):
Build a phase list for the prompt:
N phases are rated complex:
- Phase 2: <title> — <complexityRationale>
- Phase 3: <title> — <complexityRationale>
- Phase 5: <title> — <complexityRationale>
Ask (using AskUserQuestion):
"N phases are rated complex. Upgrade ALL of them to Opus for execution? (Reviewer dispatches stay on configured tier.)"
Options:
modelOverride: "opus"If Yes: mark every complex phase in the in-memory plan structure for modelOverride: "opus". The override is persisted by arn-code-save-plan Step 5 into PROGRESS_TRACKER.json.
If No: no override applied.
Follow-up (only when preference was null): After the user answers the gate, ask:
Ask (using AskUserQuestion):
"Should Arness remember this choice for future sessions?"
Options:
always to preferences)never to preferences)If Yes (always): write always to ~/.arness/workflow-preferences.yaml under pipeline.complex-phase-upgrade. Create ~/.arness/ directory and file if they do not exist. If file exists, read first, add or update the key under pipeline:, write back preserving all existing keys.
If Yes (never): write never to ~/.arness/workflow-preferences.yaml under pipeline.complex-phase-upgrade (same write logic).
If No: write ask to ~/.arness/workflow-preferences.yaml under pipeline.complex-phase-upgrade (same write logic).
After Step 5a completes (gate applied or skipped), go to Step 6.
Try to resume the planner agent using the Agent tool's resume parameter with the stored agent ID:
The user has reviewed the current plan and has the following feedback:
[user's feedback verbatim]
The current plan is at: <plans-dir>/PLAN_PREVIEW_<spec-name>.md
Read the current plan, apply the user's feedback, and write the updated plan
to the same file. Summarize what you changed.
If resume fails (API error, agent ID no longer valid):
Fall back to spawning a fresh arn-code-feature-planner agent via the Agent tool, passing the model from .arness/agent-models/code.md as the model parameter (see ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/ensure-config.md "Dispatch convention" for fallback). Context:
You are revising an existing implementation plan based on user feedback.
**Current plan file:** <plans-dir>/PLAN_PREVIEW_<spec-name>.md
**Spec file:** <specs-dir>/<spec-filename>
**User feedback:**
[user's feedback verbatim]
Read the current plan from the plan file, apply the user's feedback, and write
the updated plan to the same file. Summarize what you changed.
After the agent completes, return to Step 5 (read updated plan, present summary, ask for approval).
Confirm with the user:
"Plan approved and saved to <plans-dir>/PLAN_PREVIEW_<spec-name>.md.
Next step: Run /arn-code-save-plan to convert this plan into a structured project with phased implementation and testing plans."
## Arness config missing in CLAUDE.md — suggest running /arn-planning to get started./arn-code-feature-spec or /arn-code-bug-spec first.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub appsvortex/arness --plugin arn-code37 skills in this plugin
/arn-assessingThis skill should be used when the user says "assessing", "arness assessing", "assess", "assess codebase", "technical review", "codebase assessment", "find improvements", "what should I improve", "tech debt review", "pattern compliance check", "codebase health check", "improvement plan", "review my codebase", "what needs fixing", "code quality check", "audit my code", "run an assessment", "arn-assessing", or wants a comprehensive technical assessment of the codebase against stored patterns followed by prioritized improvement execution. Chains to arn-implementing if improvements are identified./arn-code-assessThis skill should be used when the user says "arness code assess", "arn-code-assess", "tech debt audit", "assess the project", or wants a comprehensive technical assessment of the codebase against stored patterns followed by prioritized improvement execution through the full Arness pipeline./arn-code-batch-cve-fixThis skill should be used when the user says "fix CVEs", "patch vulnerabilities", "apply security patches", "batch CVE fix", "remediate CVEs", "arness CVE fix", "arn-code-batch-cve-fix", "fix all open CVE tickets", "cleanup resolved CVE proposals", or wants Arness to apply per-group dependency bumps for CVEs already triaged by arn-code-batch-cve-scan and open one human-reviewed PR per group against the configured Security branch. Interactive only./arn-code-batch-cve-scanThis skill should be used when the user says "scan for CVEs", "CVE scan", "check for vulnerabilities", "dependabot triage", "audit dependencies", "security scan", "arness CVE scan", "arn-code-batch-cve-scan", "run a scheduled CVE scan", "finalize a CVE proposal", or wants Arness to discover, triage, and ticket security advisories across project dependencies (GitHub Dependabot plus locally-detected scanners). Three modes: interactive, proposal (unattended, safe for Routines or claude -p), and finalize (review a proposal and file tickets on GitHub or Jira)./arn-code-batch-implementThis skill should be used when the user says "batch implement", "implement all", "batch execution", "implement all features", "parallel implement", "implement in parallel", "arness batch implement", "arn-code-batch-implement", "run batch implementation", "implement everything", "launch batch workers", or wants to spawn parallel worktree-isolated background agents to implement multiple pending features simultaneously. Each worker runs as a full independent session with all tools. This skill requires pending plans in .arness/plans/ — run arn-code-batch-planning first if none exist./arn-code-batch-mergeThis skill should be used when the user says "batch merge", "merge batch", "arness batch merge", "arn-code-batch-merge", "merge all PRs", "merge batch PRs", "merge the batch", "merge implemented features", "batch merge PRs", "merge open PRs", "merge all feature PRs", "combine batch PRs", "land the batch", "land all PRs", or wants to discover open batch implementation PRs, analyze them for conflicts, determine an optimal merge order, and execute merges with user-guided conflict resolution. This skill is typically invoked after arn-code-batch-implement completes and chains to arn-code-batch-simplify upon completion.Other plugins' skills for the same job