# architecture

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.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/sparc/architecture.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/architecture

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/architecture.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/architecture.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/architecture.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/sparc/architecture.md

## When to use it
- 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
- Use the `architecture` subagent to break the pseudocode in `pseudo_complete` into components and define their interfaces
- Have `architecture` pick 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

## Similar
- [V3 DDD Architecture](https://affpapa.org/en/nevibecode/skills/v3-ddd-architecture.md) — skill · 1100 installs
- [design-code-architecture](https://affpapa.org/en/nevibecode/skills/design-code-architecture.md) — skill · 2700 installs
- [architecture-optimization](https://affpapa.org/en/nevibecode/skills/architecture-optimization.md) — skill · 1700 installs
- [architecture-designer](https://affpapa.org/en/nevibecode/skills/architecture-designer.md) — skill · 8500 installs
- [sparc-methodology](https://affpapa.org/en/nevibecode/skills/sparc-methodology.md) — skill · 1200 installs
- [agent-architecture](https://affpapa.org/en/nevibecode/skills/agent-architecture.md) — skill · 42 installs

## Other versions with the same name
- [architecture · ruvnet](https://affpapa.org/en/nevibecode/agents/ruvnet-architecture.md) — ★ 850 repo stars

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
