Arness Swift
Implement small features and enhancements through a lightweight, pattern-aware workflow: quick architectural assessment, inline plan, direct execution, verification, and review -- all in a single session. Every swift implementation produces a plan (SWIFT_<name>.md) and a report (SWIFT_REPORT.json), giving the same auditability as the full pipeline without the overhead.
This skill follows the arn-code-bug-spec dual-path architecture: assess complexity, route simple tasks to direct execution, escalate moderate tasks to task-tracked execution, and redirect complex tasks to the full pipeline.
This is an execution skill. It runs in normal conversation (NOT plan mode).
Step 0: Ensure Configuration
Read ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/step-0-fast-path.md and follow its instructions. This guarantees a user profile exists and ## Arness is configured with Arness Code fields before proceeding.
Pipeline Position
arn-code-swift (this skill)
========================
For changes touching 1-8 files
with no new architectural patterns
Entry: User describes a small change
|
v
Full: init --> [ feature-spec | bug-spec | SWIFT ] --> plan --> ...
|
+-------------------+-------------------+
| | |
SIMPLE MODERATE COMPLEX
(1-3 files) (4-8 files) (9+ files)
| | |
Plan --> Plan --> Redirect to
Execute TaskCreate --> /arn-code-feature-spec
in session Execute
| |
Review Review
| |
Ship Ship
Workflow
Step 1: Capture and Load Context
-
Accept the user's description. This can be anything from a sentence ("add rate limiting to /api/users") to detailed requirements. If the user already provided the description in their trigger message, use that directly without asking again.
-
Confirm understanding with a brief restatement (1-2 sentences).
-
Read the project's CLAUDE.md and extract the
## Arnesssection to find:- Code patterns path
- Plans directory
- Specs directory
- Template path
- Template version and Template updates preference (if present)
-
Load pattern documentation from the code patterns directory:
code-patterns.md(required)testing-patterns.md(required)architecture.md(required)ui-patterns.md(if it exists)security-patterns.md(if it exists)
-
If pattern documentation files are missing (no
code-patterns.md,testing-patterns.md, orarchitecture.mdin 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-analyzeragent (existing codebase) orarn-code-pattern-architect(greenfield) to generate fresh analysis. Write the results to the Code patterns directory.
Hold this context for use throughout the workflow.
Step 2: Quick Architectural Assessment
2a. Pre-check specialist relevance
Before invoking any agents, read ${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/specialist-pre-check.md and apply the pre-check logic using the pattern documentation loaded in Step 1 and the user's feature description. This produces two boolean flags:
ui_involved: true if ANY of: (1)ui-patterns.mdexists AND contains a## Sketch Strategysection, (2) the feature description contains UI terms (component, page, form, button, layout, dashboard, UI, UX, screen, view, modal, dialog, command, terminal, output, widget, window, panel, console, display, prompt, menu, toolbar, status bar, progress, table, tree -- case-insensitive), (3)architecture.mdcontains a frontend, CLI, TUI, desktop, or mobile framework in its Technology Stack sectionsecurity_relevant: true if BOTH: (1)security-patterns.mdexists, AND (2) the feature description contains security terms (auth, login, password, token, payment, upload, API key, PII, encrypt, permission, session, cookie, CORS, CSRF, rate limit, secret, credential -- case-insensitive)
2b. Parallel agent dispatch
Dispatch the following agents in parallel based on the pre-check results:
- Always:
arn-code-architect - If
ui_involved: alsoarn-code-ux-specialist(requiresui-patterns.mdto exist) - If
security_relevant: alsoarn-code-security-specialist(requiressecurity-patterns.mdto exist)
All dispatched agents run in parallel (independent analyses, no cross-agent dependencies).
For arn-code-architect, provide:
User expertise context:
--- 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 ---
When presenting technology recommendations, apply the advisory pattern: present the technically optimal recommendation first, then present any preference-aligned alternative with honest pros/cons. Let the user decide.
Feature idea: The user's description from Step 1.
Codebase context: The full content of the pattern documentation loaded in Step 1 (code-patterns.md, testing-patterns.md, architecture.md, and ui-patterns.md if present).
Specific question: "Quick scope assessment for this change: (1) Which files need modification and why? (2) Which codebase patterns apply? (3) Are there architectural risks or concerns? (4) Estimated scope: simple (1-3 files), moderate (4-8 files), or complex (9+ files)? (5) Does this change need UI work? (6) Are there security implications?"
For arn-code-ux-specialist (when dispatched), provide: The same feature description and ui-patterns.md. Specific question: "Quick UI assessment: which components are affected? Any accessibility considerations?"
For arn-code-security-specialist (when dispatched), provide: A brief security assessment request with the feature description and security-patterns.md.
2c. False-negative follow-up
After all parallel agents complete, check the architect's assessment for signals that a missed specialist should have been included:
- If
ui_involvedwas false AND the architect's output mentions UI concerns, component design, user interaction, or interface layout: dispatcharn-code-ux-specialistsequentially with the architect's assessment as additional context. - If
security_relevantwas false AND the architect's output mentions security concerns, authentication, authorization, data protection, or vulnerability: dispatcharn-code-security-specialistsequentially with the architect's assessment as additional context.
The follow-up dispatch is silent -- no user notification or status message. The user sees the combined assessment from all agents (parallel + sequential) as a single result.
2d. Present combined assessment
Present the combined assessment to the user, highlighting:
- Scope estimate (files to change, with paths)
- Applicable patterns from code-patterns.md
- Risks or concerns (if any)
- UI and security notes (i