architecture-synthesislisted
Install: claude install-skill aiskillstore/marketplace
# Architecture Synthesis
Generates a reference architecture specification for a new framework.
## Process
1. **Define primitives** — Message, State, Result, Tool types
2. **Specify interfaces** — Protocols for LLM, Tool, Memory
3. **Design the loop** — Core execution algorithm
4. **Create diagrams** — Visual architecture representation
5. **Produce roadmap** — Implementation phases
## Prerequisites
Before synthesis, ensure you have:
- [ ] Comparative matrix with decisions per dimension
- [ ] Anti-pattern catalog with "Do Not Repeat" list
- [ ] Design requirements document
## Core Primitives Definition
### Message Type
```python
from typing import Literal
from pydantic import BaseModel
class Message(BaseModel):
"""Immutable message in the conversation."""
role: Literal["system", "user", "assistant", "tool"]
content: str
name: str | None = None # For tool messages
tool_call_id: str | None = None
class Config:
frozen = True # Immutable
```
### State Type
```python
from dataclasses import dataclass, field
from typing import Any
@dataclass(frozen=True)
class AgentState:
"""Immutable agent state - copy-on-write pattern."""
messages: tuple[Message, ...]
tool_results: tuple[ToolResult, ...] = ()
metadata: dict[str, Any] = field(default_factory=dict)
step_count: int = 0
def with_message(self, msg: Message) -> "AgentState":
"""Return new state with message added."""
return AgentState(