architecture-review
Architecture design review skill for reviewer agents. Component boundaries, separation of concerns, modularity, and design pattern validation. Use during PLANNING phase to validate design decisions and VERIFICATION to ensure adherence.
What this skill does
# Architecture Review
Architecture and design pattern validation for ultrawork planning and verification phases.
## What This Skill Provides
Structured approach to evaluating:
- Component boundaries and separation of concerns
- Modularity and coupling
- Design patterns and architectural principles
- Scalability and maintainability
- API design and interfaces
## When to Use This Skill
**During PLANNING phase:**
- Reviewing planner's task decomposition
- Validating design documents
- Assessing technical approach
- Identifying architectural risks
**During VERIFICATION phase:**
- Ensuring implementation matches design
- Checking component boundaries
- Validating separation of concerns
- Reviewing integration points
## Core Principles
### 1. Separation of Concerns (SoC)
**Checklist:**
```
[ ] Business logic separated from presentation
[ ] Data access layer isolated
[ ] Authentication/authorization in dedicated modules
[ ] Configuration separate from code
[ ] API routes separate from business logic
[ ] Validation logic reusable across layers
[ ] Error handling centralized
[ ] Logging abstracted
```
**Red Flags:**
- Business logic in React components
- Database queries in route handlers
- Authentication mixed with business logic
- Configuration hardcoded in multiple files
**Examples:**
```javascript
// ❌ Bad: Mixed concerns
app.post('/api/users', async (req, res) => {
// Authentication + validation + business logic + DB access in one place
if (!req.headers.authorization) return res.status(401).json({ error: 'Unauthorized' });
if (!req.body.email) return res.status(400).json({ error: 'Email required' });
const user = await db.users.create(req.body);
res.json(user);
});
// ✅ Good: Separated concerns
app.post('/api/users',
authenticate, // Auth middleware
validateCreateUser, // Validation middleware
createUserHandler // Route handler delegates to service
);
async function createUserHandler(req, res) {
const user = await userService.createUser(req.body); // Business logic in service
res.json(user);
}
```
### 2. Component Boundaries
**Checklist:**
```
[ ] Components have clear, single responsibilities
[ ] Component interfaces are well-defined
[ ] Dependencies flow in one direction (no circular deps)
[ ] Components are independently testable
[ ] Public APIs are minimal (principle of least exposure)
[ ] Internal implementation details are hidden
[ ] Components can be replaced without breaking others
```
**Red Flags:**
- Circular dependencies (A imports B, B imports A)
- God objects (classes with 10+ responsibilities)
- Tight coupling (changes in A always require changes in B)
- Leaky abstractions (internal details exposed)
**Dependency Flow:**
```
Presentation → Business Logic → Data Access → Database
↓ ↓ ↓
UI Layer Service Layer Repository Layer
NEVER: Data Access → Presentation (wrong direction!)
```
### 3. Modularity and Coupling
**Checklist:**
```
[ ] Modules are cohesive (related functionality grouped)
[ ] Low coupling between modules
[ ] Shared code in libraries/utilities
[ ] Feature folders group related files
[ ] Module exports are explicit and minimal
[ ] Dependencies are injected (not hardcoded)
[ ] Configuration passed from outside
```
**Cohesion vs Coupling:**
| Good Modularity | Bad Modularity |
|-----------------|----------------|
| High cohesion (related code together) | Low cohesion (unrelated code mixed) |
| Low coupling (minimal dependencies) | High coupling (everything depends on everything) |
| Clear interfaces | Implicit contracts |
| Dependency injection | Hardcoded dependencies |
**Examples:**
```javascript
// ❌ Bad: High coupling, hardcoded dependencies
class UserService {
constructor() {
this.db = new PostgresDB(); // Hardcoded!
this.logger = console; // Hardcoded!
}
}
// ✅ Good: Low coupling, dependency injection
class UserService {
constructor(database, logger) {
this.db = database;
this.logger = logger;
}
}
// Usage: dependencies injected
const userService = new UserService(
new PostgresDB(config.db),
new Logger(config.logging)
);
```
### 4. Design Patterns
**Checklist:**
```
[ ] Patterns used appropriately (not overengineered)
[ ] Consistent patterns across codebase
[ ] Standard patterns preferred over custom solutions
[ ] Patterns documented in code
```
**Common Patterns:**
| Pattern | Use When | Example |
|---------|----------|---------|
| Repository | Data access abstraction | `userRepository.findById(id)` |
| Service | Business logic encapsulation | `orderService.placeOrder()` |
| Factory | Object creation complexity | `PaymentFactory.create(type)` |
| Strategy | Swappable algorithms | `ShippingStrategy.calculate()` |
| Middleware | Request/response processing | Express middleware |
| Observer | Event-driven updates | Event emitters, pub/sub |
**Red Flags:**
- Patterns used incorrectly
- Over-abstraction (patterns for simple problems)
- Mixing patterns inconsistently
- Custom patterns when standard ones exist
### 5. API Design
**Checklist:**
```
[ ] RESTful conventions followed (GET/POST/PUT/DELETE)
[ ] Consistent URL structure
[ ] Proper HTTP status codes
[ ] Versioning strategy defined
[ ] Request/response schemas documented
[ ] Error responses are consistent
[ ] Pagination for collections
[ ] Filtering and sorting supported where needed
```
**REST Conventions:**
| HTTP Method | Purpose | Idempotent? |
|-------------|---------|-------------|
| GET | Retrieve resource | Yes |
| POST | Create resource | No |
| PUT | Update/replace resource | Yes |
| PATCH | Partial update | No |
| DELETE | Remove resource | Yes |
**Examples:**
```javascript
// ❌ Bad: Inconsistent, non-RESTful
POST /getUser
POST /deleteUser
GET /updateUser?id=123&name=John
// ✅ Good: RESTful, consistent
GET /api/users/:id (retrieve)
POST /api/users (create)
PUT /api/users/:id (update)
DELETE /api/users/:id (delete)
```
### 6. Scalability Considerations
**Checklist:**
```
[ ] Stateless design (no server-side state)
[ ] Database queries optimized (indexes, joins)
[ ] Caching strategy defined
[ ] Async operations for I/O
[ ] Rate limiting implemented
[ ] Pagination on large datasets
[ ] Background jobs for heavy processing
[ ] CDN for static assets
```
**Red Flags:**
- Storing state in memory (server-side sessions)
- Synchronous blocking operations
- No caching for expensive operations
- Loading entire tables
- Missing indexes on query columns
## Layer Architecture Patterns
### 3-Tier Architecture
```
┌─────────────────────┐
│ Presentation Layer │ (UI, API routes)
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Business Layer │ (Services, logic)
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Data Layer │ (Repositories, DB)
└─────────────────────┘
```
**Rules:**
- Upper layers can call lower layers
- Lower layers CANNOT call upper layers
- Layers communicate via interfaces
### Feature-Based Structure
```
src/
├── features/
│ ├── auth/
│ │ ├── auth.service.ts
│ │ ├── auth.controller.ts
│ │ ├── auth.repository.ts
│ │ └── auth.test.ts
│ ├── users/
│ │ ├── user.service.ts
│ │ ├── user.controller.ts
│ │ └── user.repository.ts
├── shared/
│ ├── utils/
│ ├── middleware/
│ └── types/
```
**Benefits:**
- Related code together
- Easy to find files
- Scalable structure
- Clear ownership
## Review Process
### Step 1: High-Level Assessment
Answer:
- What is the overall architecture pattern?
- Are responsibilities clearly separated?
- Is the dependency flow correct?
- Can components be tested independently?
### Step 2: Component Analysis
For each component:
- What is its single responsibility?
- What are its dependencies?
- Is its interface minimal and clear?
- Is it properly abstracted?
### Step 3: Integration Review
Check:
- How do components communicate?
- Are interfaces well-defined?
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.