From arn-code
This skill should be used when the user says "feature spec teams", "arness code feature spec teams", "team feature spec", "debate this feature", "collaborative feature spec", "spec with agent teams", "multi-agent feature spec", "feature spec debate", or wants to develop a feature idea through structured debate between multiple specialist agents (architects, UX experts, and security specialists) before writing the specification. Uses Claude Code's experimental Agent Teams feature. Requires Agent Teams to be enabled. For standard single-agent feature spec, use arn-code-feature-spec instead.
npx claudepluginhub appsvortex/arness --plugin arn-codeThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Develop a feature idea through structured debate between specialist teammates — architects and UX experts — before synthesizing a specification. Uses Claude Code's experimental Agent Teams feature for direct inter-agent communication. Each teammate proposes, critiques, and revises independently, producing a richer spec than a single-agent approach.
Pipeline position:
arn-code-feature-spec-teams (team: propose -> critique -> revise -> resolve) -> /arn-code-plan
This is an alternative to arn-code-feature-spec (single-agent). Use this when:
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. For standard single-agent feature spec, use arn-code-feature-spec instead.
Limitations compared to arn-code-feature-spec:
arn-code-feature-spec for features that need to be broken into sub-features.Run via Bash: echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
If the variable is NOT set to "1": Inform the user: "This skill requires Claude Code's experimental Agent Teams feature."
Provide setup instructions:
~/.claude/settings.json under "env":
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 claude
Suggest the alternative: "You can use /arn-code-feature-spec instead, which uses a single architect agent and doesn't require Agent Teams."
If enabled: proceed to Step 1b.
This step activates only when greenfield artifacts exist. Projects without greenfield skip this step silently.
Check the trigger message for an F-NNN pattern (regex: F-\d{3}). Accept natural invocations like "feature spec teams F-002" or "team spec: Device Pairing".
If detected, or if conversation context includes feature file content (look for markers: ## Description, ## Journey Steps, ## Acceptance Criteria):
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-code-feature-spec/references/greenfield-loading.mdfor the full loading sequence.
Execute the loading sequence to load:
[vision-dir]/style-brief.md — toolkit configuration, color tokens, typography)If the style-brief has an "Animation and Motion" section, extract it as animation context. This will be passed to both the architect and UX specialist teammates.
Hold all loaded context for use in Step 4 (teammate spawn prompts).
If no F-NNN pattern detected and no feature file markers found: proceed to Step 2 as normal (standard flow).
If the user provided the feature idea in the trigger message, use it directly. Otherwise, ask.
Read the project's CLAUDE.md and extract the ## Arness section to find:
Read the stored pattern documentation:
<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 the arn-code-codebase-analyzer agentto generate fresh analysis. Write the results to the Code patterns directory.
If greenfield context was loaded in Step 1b, also extract from ## Arness:
Use three-axis detection to determine the right team:
Axis 1 — Project frontend state:
ui-patterns.md exists in the code patterns directoryarchitecture.md for frontend framework entries (React, Vue, Svelte, Angular, Next.js, Nuxt, SvelteKit, etc.)Axis 2 — Feature scope:
Axis 3 — Security sensitivity:
security-patterns.md exists in the code patterns directoryTeam composition matrix:
| Project state | Feature scope | Security | Team | Notes |
|---|---|---|---|---|
| Any | Backend only | No security | 2 architects | Pure architecture debate |
| Any | Backend only | Security sensitive | 2 architects + 1 security specialist | Security joins for auth/data features |
| Has frontend | Involves UI | No security | 1 architect + 1 UX specialist | UX references existing patterns |
| Has frontend | Involves UI | Security sensitive | 1 architect + 1 UX specialist + 1 security specialist | Full-stack with security |
| No frontend | Involves UI | No security | 1 architect + 1 UX specialist | UX in greenfield mode |
| No frontend | Involves UI | Security sensitive | 1 architect + 1 UX specialist + 1 security specialist | Greenfield UI with security |
| Has frontend | Complex full-stack | No security | 2 architects + 1 UX specialist | Three-way debate |
| Has frontend | Complex full-stack | Security sensitive | 2 architects + 1 UX specialist + 1 security specialist | Four-way debate (cost warning) |
Present the proposed team to the user with token estimates:
Ask (using AskUserQuestion):
"Based on the feature, I'll create a team of [composition]. A typical arn-code-feature-spec session uses 20k-50k tokens; expect [40k-100k / 60k-250k] tokens for this team debate. Proceed?"
Options:
/arn-code-feature-spec (lower cost)If the user declines, suggest /arn-code-feature-spec as the lower-cost alternative.
If the feature is backend-only AND simple (no ambiguity, single obvious approach), suggest /arn-code-feature-spec instead — team debate adds cost without proportional value for straightforward features.
Read the debate protocol at ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-feature-spec-teams/references/debate-protocol.md. The general debate rules (round structure, convergence criteria, escalation) are defined there. Do not duplicate them in individual spawn prompts — only include role-specific instructions.
Create the team based on the composition chosen in Step 3. Spawn prompts for each teammate include:
For architect teammate(s):
--- BEGIN USER EXPERTISE ---
[Read from ~/.arness/user-profile.yaml or .claude/arness-profile.local.md (project override takes precedence)]
Role: [role]
Experience: [development_experience]
Technology preferences: [technology_preferences]
Expertise-aware: [expertise_aware]
--- END USER EXPERTISE ---
--- BEGIN PROJECT PREFERENCES ---
[Read from .arness/preferences.yaml if it exists, otherwise omit this section]
--- END PROJECT PREFERENCES ---
For UX specialist teammate (when UI is involved):
For security specialist teammate (when security sensitive):
security-patterns.md exists: "Existing security patterns mode — ground analysis in documented security patterns. Reference existing auth, validation, and data protection implementations."security-patterns.md: "Greenfield security mode — recommend security measures based on the architecture. Cover OWASP Top 10 applicable risks. Mark all references as 'Recommended'."Facilitate the structured debate following the round-by-round protocol. Read ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-feature-spec-teams/references/debate-protocol.md for the complete debate structure, convergence criteria, and escalation rules.
Present a summary to the user after each round: what was proposed, what was challenged, what was resolved.
Scope boundary awareness (if greenfield context loaded in Step 1b): When a teammate proposes including functionality that may overlap with a sibling feature, check the scope boundary context before allowing the debate to expand into that territory. If the proposed functionality is already covered by another feature in the Feature Tracker, note it as out of scope: "That's handled by F-NNN: [Name] — keeping it out of this spec's scope." Only escalate genuine gaps to the user.
After the debate converges, if ALL of these conditions are met:
ui-patterns.md exists in the code patterns directory with a ## Sketch Strategy sectionThen offer a visual preview before synthesizing the final spec:
Ask (using AskUserQuestion):
"The team has converged on a design. Would you like to see a visual preview before I write the final spec?"
Options:
If Yes, sketch it: Invoke Skill: arn-code:arn-code-sketch with the converged feature context (description, architect proposals, UX specialist output, resolved decisions). After the sketch session completes, capture any sketch context (manifest with componentMapping and composition fields) for inclusion in the spec's Sketch Reference section. Then proceed to Step 6.
If No, finalize the spec: Proceed to Step 6.
If sketch conditions are NOT met (no UI involvement or no Sketch Strategy), skip this step entirely.
On-demand sketch during debate: If the user asks to see a preview at any point during the debate rounds ("show me what this looks like", "can I see a preview"), and the conditions above are met, invoke Skill: arn-code:arn-code-sketch immediately. After the sketch completes, resume the debate where it left off.
When debate converges (or user resolves remaining disagreements):
Read the feature spec template at ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-feature-spec/references/feature-spec-template.md
Populate the template with:
Problem Statement: Refined feature description incorporating all debate outcomes
Requirements: Functional and non-functional requirements surfaced during debate
Architectural Assessment: Merged from architect proposals + UX specialist input
Scope & Boundaries: What is in scope and what is not
Feasibility & Risks: Risks identified by each teammate
Decisions Log: All decisions, including how disagreements were resolved
Open Items: Remaining questions
Behavioral Specification (if greenfield context loaded): Populate from loaded UC documents and feature file — same sections as arn-code-feature-spec: Feature Backlog Entry (F-NNN metadata, priority, dependencies), Use Case References table, Main Success Scenarios (summarized from UCs), Key Extensions, Business Rules & Constraints, Acceptance Criteria
Design Tokens (if style-brief loaded): Populate from style-brief with token category table (Primary colors, Typography, Spacing) and toolkit reference path. Mark as "Validated in static showcase v[N]".
Scope & Boundaries (enhanced if scope boundary context loaded): Include cross-references to sibling features and any gaps identified during the debate. Format: "Out of scope — handled by F-NNN: [Name]" for known sibling coverage.
Sketch Reference (if sketch was created in Step 5b): Populate from the held manifest data — sketch directory, manifest path, status, paradigm, Component Mapping table (from componentMapping), Composition Summary (from composition). Omit this section entirely if no sketch was created.
Motion Design (if animation context loaded): Populate from debate findings on animation. Include per-element timing, triggers, and reduced-motion fallbacks from the UX specialist's recommendations as validated through the debate.
Add an optional "Debate Summary" section capturing:
For features introducing frontend to a backend project, add an optional "Proposed UI Stack" section (from the UX specialist's greenfield recommendations)
Derive a spec name from the feature (e.g., FEATURE_analytics-dashboard, FEATURE_real-time-notifications). Suggest it to the user for confirmation.
Save to <specs-dir>/FEATURE_<name>.md. If the specs directory does not exist, create it: mkdir -p <specs-dir>/
Present summary: spec location, key decisions, debate outcomes, open items
Inform the user of next steps:
"Feature specification saved to <specs-dir>/FEATURE_<name>.md.
To create an implementation plan, run /arn-code-plan FEATURE_<name>.
The skill will load this spec and your project's codebase patterns, invoke the planner agent to generate a plan, and let you review and refine it before saving."
/arn-code-feature-spec as alternative## Arness config missing in CLAUDE.md -- suggest running /arn-planning to get started/arn-code-feature-spec/arn-code-feature-spec instead (team debate adds cost without value for simple backend features)