ui-architect
Design component architecture for legaltech UIs - layer separation, data flow, design system selection
Best use case
ui-architect is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Design component architecture for legaltech UIs - layer separation, data flow, design system selection
Teams using ui-architect should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ui-architect/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ui-architect Compares
| Feature / Agent | ui-architect | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Design component architecture for legaltech UIs - layer separation, data flow, design system selection
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# ui-architect
Design component architecture for 45Black legaltech products. This skill helps non-coders plan UI structure, separate product layers, and select appropriate design systems.
## When To Use
- Starting a new UI product or feature
- Restructuring existing UI architecture
- Deciding which design system variant to use
- Planning component hierarchy for apex products
- Separating concerns between product layers
- User mentions: "architect", "component structure", "layer design", "ui planning"
## Workflow
### 1. Gather Context
Ask the user about:
- **Product name** and purpose
- **Target users** (trustees/clients vs developers/admins)
- **Usage pattern** (occasional vs 8hr+ daily use)
- **Data sources** (which apex services: helix, governance, precedent, kestrel)
- **Key user journeys** (what tasks do users need to complete)
### 2. Select Design System
Based on user answers, recommend design system:
```
Is this CLIENT-FACING (trustees, advisers, external)?
├── YES → TRUSTEE EDITION v1.0
│ • Light-first, Paper White backgrounds
│ • Inter typography
│ • Governance Blue primary (#1A4F7A)
│ • Compliance status colours
│ • WCAG AAA target
│ • Print-ready
│
└── NO → Is this for 8+ hours DAILY USE?
├── YES → SAVILLE v5.0 CLARITY
│ • Matte OFF
│ • Hero weight 500
│ • Data-dense optimised
│
└── NO → SAVILLE v5.0 CORE
• Matte ON (15% dark, 8% light)
• Hero weight 300
• Developer/admin aesthetic
```
### 3. Define Product Layers
For apex ecosystem products, define these layers:
```
┌─────────────────────────────────────────────────────────────┐
│ PRESENTATION LAYER │
│ Components, Pages, Layouts (React/Next.js) │
│ Design System: [Selected System] │
├─────────────────────────────────────────────────────────────┤
│ INTERACTION LAYER │
│ State Management (Zustand), Form Handling (React Hook Form)│
│ User preferences, UI state, Session management │
├─────────────────────────────────────────────────────────────┤
│ DATA ACCESS LAYER │
│ React Query hooks, API clients, Data transformation │
│ Connects to: apex-helix | apex-governance | apex-precedent │
├─────────────────────────────────────────────────────────────┤
│ COMPLIANCE LAYER │
│ AI transparency markers, Audit logging, GDPR consent │
│ EU AI Act compliance, Hash-chained audit trails │
└─────────────────────────────────────────────────────────────┘
```
### 4. Map Component Hierarchy
Create a component tree document:
```markdown
## Component Hierarchy: [Product Name]
### Layout Components
- AppShell (header, sidebar, main content)
- PageLayout (breadcrumbs, title, actions)
- SplitPane (resizable document/panel views)
### Feature Components
- [Domain-specific components]
### Shared UI Components (from design system)
- Buttons, Cards, Badges, Tables, Forms
- Use shadcn/ui with design system tokens
### Data Components
- [Product].Provider (context for data)
- use[Product]Data (React Query hook)
```
### 5. Define Data Flow
Document how data moves between layers:
```
User Action → Interaction Layer → Data Layer → API Proxy → Backend Service
│
▼
UI Update ← Presentation ← State Update ← Query Invalidation ← Response
```
### 6. Output Architecture Document
Create `docs/UI_ARCHITECTURE.md` with:
1. **Design System Selection** - Which system and why
2. **Layer Diagram** - Visual representation
3. **Component Hierarchy** - Tree structure
4. **Data Flow** - Sequence diagrams for key journeys
5. **Compliance Requirements** - AI transparency, audit, GDPR
6. **Implementation Notes** - For developers
## Apex Product Layer Matrix
Reference for the apex constellation:
| Product | Data Source | Primary Users | Design System | Status |
|---------|-------------|---------------|---------------|--------|
| apex-lens | helix, precedent, kestrel | Prospects, trustees | Saville Clarity → migrate to Trustee? | Active |
| apex-governance | helix | Trustees, advisers | Trustee v1.0 | Active |
| apex-precedent | precedent DB | Legal researchers | Saville Clarity | Active |
| apex-tracker | helix | Scheme managers | Trustee v1.0 | Planned |
| apex-admin | helix (write) | Wills (admin) | Saville Core | Internal |
## Key Architectural Decisions
### API Proxy Pattern (Mandatory)
All backend requests go through Next.js API routes:
- `/api/helix/*` → apex-helix (port 3001)
- `/api/precedent/*` → apex-precedent (port 3002)
- `/api/kestrel/*` → apex-kestrel (port 3003)
### AI Transparency (EU AI Act Compliance)
All AI-generated content MUST include:
- "AI-Generated" badge
- "Generated with Claude | Always verify AI suggestions" footer
- Human approval step before any action
### State Management
- **Server state**: React Query (caching, invalidation)
- **Client state**: Zustand (UI preferences, local state)
- **Form state**: React Hook Form + Zod validation
## Example Output
```markdown
# UI Architecture: apex-lens v2.0
## Design System
**Trustee Edition v1.0** - Selected because:
- Primary users are pension trustees (external)
- Needs print-ready compliance reports
- Light-first suits office environments
## Component Layers
### Presentation (Trustee Edition)
├── LegislationViewer
│ ├── DocumentPane (Merriweather, cream background)
│ ├── ObligationPanel (cards with status badges)
│ └── NavigationTree (sidebar with sections)
├── SearchInterface
│ ├── SearchBar
│ ├── FacetedFilters
│ └── ResultsList
└── CollectionManager
├── FavouritesList
└── CollectionView
### Data Access
├── useLegislation(id) → /api/helix/acts/{id}
├── useObligations(sectionId) → /api/helix/obligations
└── useCaseLaw(query) → /api/precedent/search
### Compliance
├── AITransparencyBadge
├── AuditLogProvider
└── ConsentManager
```
## Model Preference
**opus** - Architecture decisions require deep reasoning about trade-offs
---
*Part of 45Black UI Expert Devstack*
*For non-coders: This skill helps you plan before building*Related Skills
acc-architecture-doc-template
Generates ARCHITECTURE.md files for PHP projects. Creates layer documentation, component descriptions, and architectural diagrams.
1k-architecture
OneKey monorepo architecture and code organization. Use when understanding project structure, package relationships, import rules, or component organization. Triggers on architecture, structure, packages, imports, hierarchy, dependencies, monorepo, organization.
microservices-architecture
Microservices architecture patterns and best practices. Use when designing distributed systems, breaking down monoliths, or implementing service communication.
event-sourcing-architect
Expert in event sourcing, CQRS, and event-driven architecture patterns. Masters event store design, projection building, saga orchestration, and eventual consistency patterns. Use PROACTIVELY for e...
architecture-patterns
Padrões de arquitetura de software - Decisões OBJETIVAS sobre design de sistemas
architecting
Architects new features through the full lifecycle. Use when designing, planning, implementing, or extending features. Triggers on 'new feature', 'design', 'plan', 'implement', 'architect', 'prd', 'spec'.
rails-architecture
Guides modern Rails 8 code architecture decisions and patterns. Use when deciding where to put code, choosing between patterns (service objects vs concerns vs query objects), designing feature architecture, refactoring for better organization, or when user mentions architecture, code organization, design patterns, or layered design.
mvvm-architecture
Expert MVVM decisions for iOS/tvOS: choosing between ViewModel patterns (state enum vs published properties vs Combine), service layer boundaries, dependency injection strategies, and testing approaches. Use when designing ViewModel architecture, debugging data flow issues, or deciding where business logic belongs. Trigger keywords: MVVM, ViewModel, ObservableObject, @StateObject, service layer, dependency injection, unit test, mock, architecture
MCP Architecture Expert
Design and implement Model Context Protocol servers for standardized AI-to-data integration with resources, tools, prompts, and security best practices
database-architect
Database design and optimization specialist. Schema design, query optimization, indexing strategies, data modeling, and migration planning for relational and NoSQL databases.
architecture-paradigm-pipeline
Consult this skill when designing data pipelines or transformation workflows. Use when data flows through fixed sequence of transformations, stages can be independently developed and tested, parallel processing of stages is beneficial. Do not use when selecting from multiple paradigms - use architecture-paradigms first. DO NOT use when: data flow is not sequential or predictable. DO NOT use when: complex branching/merging logic dominates.
architecture-advisor
Helps solo developers with AI agents choose optimal architecture (monolithic/microservices/hybrid)