design
Technical design and architecture for implementation
What this skill does
# Design Mode
**Recommended model tier:** smart (opus) - this skill requires complex reasoning
Output a technical design specification that downstream SDLC stages can consume.
## Purpose
Create a structured design document that defines:
1. **What** to build (interfaces, types, components)
2. **How** it fits together (data flow, interactions)
3. **Why** key decisions were made (rationale)
4. **Success criteria** (acceptance criteria for TEST stage)
## Workflow
### Step 1: Understand the Request
Read the request and identify:
- Core functionality required
- Constraints (tech stack, patterns, performance)
- Integration points with existing code
### Step 2: Explore the Codebase
Use search tools to understand existing patterns:
- Use `Grep` for similar patterns, interfaces, types
- Use `Glob` for relevant files
- Use `mcp__plugin_aide_aide__decision_list` to review all decisions
- Use `mcp__plugin_aide_aide__decision_get` with the relevant topic to check specific decisions
### Step 3: Define Interfaces
Define the public API/interfaces first:
```typescript
// Example TypeScript interface
interface UserService {
createUser(data: CreateUserInput): Promise<User>;
getUser(id: string): Promise<User | null>;
updateUser(id: string, data: UpdateUserInput): Promise<User>;
}
interface CreateUserInput {
email: string;
name: string;
}
```
```go
// Example Go interface
type UserService interface {
CreateUser(ctx context.Context, input CreateUserInput) (*User, error)
GetUser(ctx context.Context, id string) (*User, error)
UpdateUser(ctx context.Context, id string, input UpdateUserInput) (*User, error)
}
```
### Step 4: Document Data Flow
Describe how components interact:
```
Request → Controller → Service → Repository → Database
↓
Validator
↓
Error Handler → Response
```
### Step 5: Record Key Decisions
Store architectural decisions for future reference:
```bash
./.aide/bin/aide decision set "<feature>-storage" "PostgreSQL with JSONB for metadata" \
--rationale="Need flexible schema for user preferences"
./.aide/bin/aide decision set "<feature>-auth" "JWT with refresh tokens" \
--rationale="Stateless auth, mobile client support"
```
**Binary location:** The aide binary is at `.aide/bin/aide`. If it's on your `$PATH`, you can use `aide` directly.
### Step 6: Define Acceptance Criteria
List specific, testable criteria for the TEST stage:
```markdown
## Acceptance Criteria
- [ ] User can be created with email and name
- [ ] Duplicate emails are rejected with 409 status
- [ ] Created user has UUID identifier
- [ ] User can be retrieved by ID
- [ ] Non-existent user returns null (not error)
- [ ] User email can be updated
- [ ] User name can be updated
```
## Required Output Format
```markdown
# Design: [Feature Name]
## Overview
[1-2 sentence summary of what this feature does]
## Interfaces
### [Interface/Type Name]
\`\`\`typescript
// Interface definition with comments
\`\`\`
## Data Flow
[Diagram or description of component interactions]
## Key Decisions
| Decision | Choice | Rationale |
| -------- | ---------- | --------- |
| Storage | PostgreSQL | [why] |
| Auth | JWT | [why] |
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
## Files to Create/Modify
- `path/to/file.ts` - [purpose]
- `path/to/test.ts` - [test scope]
## Dependencies
- [External packages needed]
- [Internal modules to import]
## Out of Scope
- [Explicitly excluded items]
```
## Failure Handling
### Unclear Requirements
1. List specific ambiguities
2. State assumptions you're making
3. Record assumptions: `./.aide/bin/aide memory add --category=decision --tags=project:<name>,session:${AIDE_SESSION_ID},source:inferred "Assumed X because Y"`
4. Proceed with reasonable defaults
### Conflicting Patterns Found
1. Document the conflicting patterns
2. Choose one and record the decision:
```bash
./.aide/bin/aide decision set "<topic>" "<choice>" --rationale="<why this over alternatives>"
```
### Too Large / Too Vague
1. Break into smaller, focused designs
2. Design the core/MVP first
3. Note future phases in "Out of Scope"
## Verification Checklist
Before completing design:
- [ ] Interfaces are defined with types
- [ ] Data flow is documented
- [ ] Key decisions are recorded in aide
- [ ] Acceptance criteria are testable
- [ ] Files to modify are listed
- [ ] Dependencies are identified
## Memory Hygiene
When storing memories from this skill (assumptions, decisions, discoveries), always:
1. **Include `source:` tag** — Use `source:inferred` for assumptions, `source:discovered` for findings during exploration
2. **Include scope tags** — Add `project:<name>,session:<id>` (get project name from git remote or directory; session ID from `$AIDE_SESSION_ID` or `$CLAUDE_SESSION_ID`)
3. **Verify codebase claims** before storing — If a memory references a file, function, or path, confirm it exists first. See the `memorise` skill for the full verification workflow.
4. **Never use `scope:global`** unless storing a user preference
## Completion
When design is complete:
1. Output the full design document
2. Confirm: "Design complete. Ready for TEST stage."
The design document feeds directly into the TEST stage, where acceptance criteria become test cases.
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.