Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
日本語の概要は準備中です。原文の説明を表示しています。
Design component architecture and module structure using established architectural patterns for clean, maintainable, and scalable systems.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
The architecture-planner skill provides comprehensive guidance for designing component architecture and module structure in feature implementations. This skill helps the Architecture Designer agent plan clean, layered architectures following established patterns such as Layered Architecture, Hexagonal Architecture (Ports and Adapters), and Clean Architecture principles.
This skill emphasizes:
The architecture-planner skill is essential for creating implementations that are easy to test, maintain, and extend over time.
This skill auto-activates when the agent describes:
What it provides:
Guidance:
Example:
# Good: Clear, focused components
components = [
{
"name": "FeatureProcessor",
"responsibility": "Process feature requests according to business rules",
"file": "src/core/processor.py"
},
{
"name": "DataValidator",
"responsibility": "Validate input data against schemas",
"file": "src/core/validator.py"
},
{
"name": "ResultFormatter",
"responsibility": "Format processing results for output",
"file": "src/core/formatter.py"
}
]
# Bad: Too broad, multiple responsibilities
components = [
{
"name": "FeatureHandler",
"responsibility": "Process, validate, format, store, and log features",
"file": "src/feature_handler.py" # Too many responsibilities!
}
]
What it provides:
Layer Definitions:
Presentation Layer (Interfaces):
Business Layer (Core):
Data Layer (Implementations):
Example:
# Layered Architecture Structure
architecture = {
"presentation_layer": {
"location": "src/interfaces/",
"components": [
"src/interfaces/cli/commands.py",
"src/interfaces/api/routes.py",
"src/interfaces/api/schemas.py"
],
"dependencies": ["business_layer"]
},
"business_layer": {
"location": "src/core/",
"components": [
"src/core/processor.py",
"src/core/validator.py",
"src/core/models.py",
"src/core/services.py"
],
"dependencies": ["data_layer (via interfaces)"]
},
"data_layer": {
"location": "src/adapters/",
"components": [
"src/adapters/database.py",
"src/adapters/external_api.py",
"src/adapters/file_storage.py"
],
"dependencies": ["external systems"]
}
}
What it provides:
Benefits:
Example:
# Good: Dependency Injection
from abc import ABC, abstractmethod
from typing import Protocol
# Define interface (abstraction)
class IDataRepository(Protocol):
async def save(self, data: dict) -> bool:
...
async def retrieve(self, id: str) -> dict:
...
# Business logic depends on interface
class FeatureProcessor:
def __init__(self, repository: IDataRepository):
"""Inject repository dependency via constructor."""
self.repository = repository
async def process(self, feature_data: dict) -> dict:
# Process data
result = self._apply_business_rules(feature_data)
# Save using injected repository
await self.repository.save(result)
return result
# Implementation can be swapped
class PostgresRepository:
async def save(self, data: dict) -> bool:
# PostgreSQL implementation
pass
async def retrieve(self, id: str) -> dict:
# PostgreSQL implementation
pass
class MongoRepository:
async def save(self, data: dict) -> bool:
# MongoDB implementation
pass
async def retrieve(self, id: str) -> dict:
# MongoDB implementation
pass
# Usage: Inject different implementations
processor_postgres = FeatureProcessor(PostgresRepository())
processor_mongo = FeatureProcessor(MongoRepository())
# Testing: Inject mock
class MockRepository:
async def save(self, data: dict) -> bool:
return True
async def retrieve(self, id: str) -> dict:
return {"id": id, "status": "test"}
processor_test = FeatureProcessor(MockRepository())
What it provides:
Standard Structure:
src/
├── interfaces/ # Presentation layer
│ ├── cli/
│ │ └── commands.py
│ └── api/
│ ├── routes.py
│ └── schemas.py
├── core/ # Business layer
│ ├── models.py # Domain models
│ ├── services.py # Business services
│ ├── processor.py # Core processing logic
│ └── validator.py # Validation logic
├── adapters/ # Data layer
│ ├── database.py # Database adapter
│ ├── external_api.py # External API client
│ └── cache.py # Cache adapter
├── config/ # Configuration
│ └── settings.py
└── utils/ # Shared utilities
└── helpers.py
tests/
├── unit/ # Unit tests (mirror src structure)
│ ├── core/
│ └── adapters/
└── integration/ # Integration tests
└── api/
What it provides:
Example:
# Extension point using Strategy Pattern
from abc import ABC, abstractmethod
from typing import Dict
class ProcessingStrategy(ABC):
"""Base class for processing strategies (extension point)."""
@abstractmethod
async def process(self, data: dict) -> dict:
"""Process data using specific strategy."""
pass
class FastProcessingStrategy(ProcessingStrategy):
"""Fast processing with lower accuracy."""
async def process(self, data: dict) -> dict:
# Fast implementation
return {"result": "fast"}
class AccurateProcessingStrategy(ProcessingStrategy):
"""Slower processing with higher accuracy."""
async def process(self, data: dict) -> dict:
# Accurate implementation
return {"result": "accurate"}
# Plugin registration
class ProcessorFactory:
_strategies: Dict[str, ProcessingStrategy] = {}
@classmethod
def register_strategy(cls, name: str, strategy: ProcessingStrategy):
"""Register new processing strategy (plugin)."""
cls._strategies[name] = strategy
@classmethod
def get_strategy(cls, name: str) -> ProcessingStrategy:
"""Retrieve registered strategy."""
return cls._strategies.get(name)
# Register built-in strategies
ProcessorFactory.register_strategy("fast", FastProcessingStrategy())
ProcessorFactory.register_strategy("accurate", AccurateProcessingStrategy())
# Users can register custom strategies
class CustomStrategy(ProcessingStrategy):
async def process(self, data: dict) -> dict:
return {"result": "custom"}
ProcessorFactory.register_strategy("custom", CustomStrategy())
What it provides:
Pattern Selection Guide:
Analyze requirements → Extract core features → Define boundaries
Identify interfaces (CLI, API) → Core logic → Data access
For each layer → List components → Define responsibilities
Map dependencies → Apply dependency injection → Define interfaces
Identify needs → Choose patterns → Document rationale
Identify future needs → Design plugin mechanisms → Document APIs
Create diagrams → Document decisions → Provide examples
Check SOLID principles → Verify testability → Review maintainability
Follow SOLID Principles
Keep Components Small and Focused
Use Dependency Injection
Design for Testability
Document Architectural Decisions
Plan for Extension
Comprehensive guide to architectural patterns including:
Detailed component design guidelines including:
"Design component architecture for a feature that processes user uploads, validates content, stores files, and sends notifications."
architecture = {
"layers": {
"interfaces": [
"src/interfaces/api/upload_routes.py - REST API endpoints",
"src/interfaces/api/schemas.py - Request/response schemas"
],
"core": [
"src/core/upload_processor.py - Main processing orchestration",
"src/core/content_validator.py - Content validation logic",
"src/core/notification_service.py - Notification business logic",
"src/core/models.py - Domain models"
],
"adapters": [
"src/adapters/file_storage.py - File storage adapter (S3/local)",
"src/adapters/notification_client.py - Notification service client"
]
},
"components": [
{
"name": "UploadProcessor",
"file": "src/core/upload_processor.py",
"responsibility": "Orchestrate upload processing workflow",
"dependencies": ["ContentValidator", "IFileStorage", "INotificationClient"],
"interface": None,
"pattern": "Service layer with dependency injection"
},
{
"name": "ContentValidator",
"file": "src/core/content_validator.py",
"responsibility": "Validate uploaded content (size, type, malware scan)",
"dependencies": [],
"interface": None,
"pattern": "Pure function (stateless validation)"
},
{
"name": "IFileStorage",
"file": "src/adapters/file_storage.py",
"responsibility": "Abstract file storage operations",
"dependencies": [],
"interface": "Protocol/ABC",
"pattern": "Repository pattern for file storage"
}
],
"patterns_applied": [
"Dependency Injection: All services receive dependencies via constructor",
"Repository Pattern: File storage abstraction through IFileStorage",
"Strategy Pattern: Pluggable validators for different content types",
"Adapter Pattern: External notification service wrapped in adapter"
],
"extension_points": [
"IFileStorage can support S3, Azure Blob, local filesystem",
"ContentValidator can add new validation strategies",
"INotificationClient can support email, SMS, push notifications"
]
}
Version: 2.0.0 Auto-Activation: Yes Phase: 2 - Design & Planning Created: 2025-10-29
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze feature requirements, dependencies, and security considerations. Use when starting feature implementation from GitHub issues to understand scope, technical feasibility, and risks.
日本語の概要は準備中です。原文の説明を表示しています。
Run SQL queries against psql, BigQuery, or MySQL from the terminal, including natural-language-to-SQL and schema exploration. Use when analyzing data, inspecting DB state, or debugging tables. Trigger on "query the database", "SQL", "show me data from", "explore table".
日本語の概要は準備中です。原文の説明を表示しています。
Design REST APIs or function contracts with clear request/response specifications, error handling patterns, authentication strategies, and comprehensive documentation.
日本語の概要は準備中です。原文の説明を表示しています。
Generate comprehensive API endpoint tests for REST and GraphQL APIs. Creates tests for all HTTP methods, status codes, authentication, and validation.
日本語の概要は準備中です。原文の説明を表示しています。
Generate CHANGELOG entries following conventional commits format with semantic versioning. Use when finalizing features to maintain proper change history.
日本語の概要は準備中です。原文の説明を表示しています。