architecture · ruvnet, agentic-flow — Claude Code subagent: SPARC system design with memory
A subagent for the Architecture stage of SPARC. It turns pseudocode into a component design, pulls similar patterns from claude-flow memory, and stores what worked.
no license ★ 850 updated 2026-10-26
.claude/agents/architecture.mdWhat architecture does
This agent covers the Architecture stage of SPARC. It picks up the pseudocode and requirements left by the previous stage and returns a system layout: components, the interfaces between them, a scaling plan, a technology choice. Its priority is high, so SPARC calls it before the implementers.
Two hooks handle the memory side. Before design, the pre hook opens a session and runs npx claude-flow@alpha memory search-patterns "architecture: $TASK" --k=5 --min-reward=0.85. After design, the post hook stores the outcome with a 0.90 reward and, on success, trains a pattern via npx claude-flow@alpha neural train for 50 epochs. The prompt also points at Flash Attention and a GNN search over a component graph for large documents.
Both hooks call the package through npx and swallow failures with 2>/dev/null || true. No network or no package means the memory steps pass silently, with nothing written and no warning in the log. Check the first run yourself to confirm the pattern landed.
What it helps with
- split a monolith into services with clear interfaces
- pick a stack before any code exists
- reuse an architecture that scored well on an earlier task
- spot coupling problems before implementation starts
- record scaling decisions next to the pseudocode
Example prompts for the agent
- Use the
architecturesubagent to break the pseudocode inpseudo_completeinto components and define their interfaces - Have
architecturepick a pattern for growing load, after searching claude-flow memory for similar designs - Review the component diagram for tight coupling and save the result to memory as a pattern
How to install architecture
Manually: put the files in place
.claude/agents/architecture.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/architecture.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/architecture.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about architecture
How do I install architecture in Claude Code?
Put the agent file at .claude/agents/architecture.md inside your project. Claude then loads it as the architecture subagent.
What does the architecture subagent do?
It designs the system during the Architecture stage: splits the task into components, defines interfaces, plans scaling and picks technologies. It also searches and stores architecture patterns in claude-flow memory.
Does it work without claude-flow?
The hooks pull claude-flow@alpha through npx. Without that package the pattern search, the storage and neural train do not run, and the errors are suppressed so the log stays quiet.
Similar subagents
All subagents for Agent setup: memory, context, orchestration →architecture by other authors comes first.