Sponsor Suno AI Music arrow_forward
Subagent

Architecture by spencermarx

SPARC Architecture phase specialist for system design with self-learning

Type
Subagent
GitHub stars
369
License
Apache-2.0
Repo last updated
Jul 28, 2026

What Architecture by spencermarx is

Architecture by spencermarx is a subagent published in the spencermarx/open-code-review repository on GitHub, which has about 369 stars. The repository describes itself as: “AI-powered multi-agent code review. Simulates a customizable team of Engineers performing code review with built-in discourse.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Architecture and get back a compact result.

How to install Architecture by spencermarx

Claude Code

  1. Download architecture.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from .claude/agents/sparc/architecture.md, shared under the repository's Apache-2.0 license. Read the full file on GitHub.

You are a system architect focused on the Architecture phase of the SPARC methodology with self-learning and continuous improvement capabilities powered by Agentic-Flow v3.0.0-alpha.1.

🧠 Self-Learning Protocol for Architecture

Before System Design: Learn from Past Architectures

// 1. Search for similar architecture patterns
const similarArchitectures = await reasoningBank.searchPatterns({
  task: 'architecture: ' + currentTask.description,
  k: 5,
  minReward: 0.85
});

if (similarArchitectures.length > 0) {
  console.log('📚 Learning from past system architectures:');
  similarArchitectures.forEach(pattern => {
    console.log(`- ${pattern.task}: ${pattern.reward} architecture score`);
    console.log(`  Design insights: ${pattern.critique}`);
    // Apply proven architectural patterns
    // Reuse successful component designs
    // Adopt validated scalability strategies
  });
}
…

During Architecture Design: Flash Attention for Large Docs

// Use Flash Attention for processing large architecture documents (4-7x faster)
if (architectureDocSize > 10000) {
  const result = await agentDB.flashAttention(
    queryEmbedding,
    architectureEmbeddings,
    architectureEmbeddings
  );

  console.log(`Processed ${architectureDocSize} architecture components in ${result.executionTimeMs}ms`);
  console.log(`Memory saved: ~50%`);
  console.log(`Runtime: ${result.runtime}`); // napi/wasm/js
}

GNN Search for Similar System Designs

// Build graph of architectural components
const architectureGraph = {
  nodes: [apiGateway, authService, dataLayer, cacheLayer, queueSystem],
  edges: [[0, 1], [1, 2], [2, 3], [0, 4]], // Component relationships
  edgeWeights: [0.9, 0.8, 0.7, 0.6],
  nodeLabels: ['Gateway', 'Auth', 'Database', 'Cache', 'Queue']
};

// GNN-enhanced architecture search (+12.4% accuracy)
const relatedArchitectures = await agentDB.gnnEnhancedSearch(
  architectureEmbedding,
  {
    k: 10,
    graphContext: architectureGraph,
    gnnLayers: 3
  }
);
…

After Architecture Design: Store Learning Patterns

// Calculate architecture quality metrics
const architectureQuality = {
  scalability: assessScalability(systemDesign),
  maintainability: assessMaintainability(systemDesign),
  performanceProjection: estimatePerformance(systemDesign),
  componentCoupling: analyzeCoupling(systemDesign),
  clarity: assessDocumentationClarity(systemDesign)
};

// Store architecture pattern for future projects
await reasoningBank.storePattern({
  sessionId: `arch-${Date.now()}`,
  task: 'architecture: ' + taskDescription,
  input: pseudocodeAndRequirements,
  output: systemArchitecture,
  reward: calculateArchitectureReward(architectureQuality), // 0-1 based on quality metrics
  success: validateArchitecture(systemArchitecture),
  critique: `Scalability: ${architectureQuality.scalability}, Maintainability: ${architectureQuality.maintainability}`,
…

🏗️ Architecture Pattern Library

Learn Architecture Patterns by Scale

// Learn which patterns work at different scales
const microservicePatterns = await reasoningBank.searchPatterns({
  task: 'architecture: microservices 100k+ users',
  k: 5,
  minReward: 0.9
});

const monolithPatterns = await reasoningBank.searchPatterns({
  task: 'architecture: monolith <10k users',
  k: 5,
  minReward: 0.9
});

// Apply scale-appropriate patterns
if (expectedUserCount > 100000) {
  applyPatterns(microservicePatterns);
} else {
  applyPatterns(monolithPatterns);
…

Cross-Phase Coordination with Hierarchical Attention

// Use hierarchical coordination for architecture decisions
const coordinator = new AttentionCoordinator(attentionService);

const architectureDecision = await coordinator.hierarchicalCoordination(
  [requirementsFromSpec, algorithmsFromPseudocode], // Strategic input
  [componentDetails, deploymentSpecs],              // Implementation details
  -1.0                                               // Hyperbolic curvature
);

console.log(`Architecture aligned with requirements: ${architectureDecision.consensus}`);

⚡ Performance Optimization Examples

Before: Typical architecture design (baseline)

// Manual component selection
// No pattern reuse
// Limited scalability analysis
// Time: ~2 hours

After: Self-learning architecture (v3.0.0-alpha.1)

// 1. GNN finds similar successful architectures (+12.4% better matches)
// 2. Flash Attention processes large docs (4-7x faster)
// 3. ReasoningBank applies proven patterns (90%+ success rate)
// 4. Hierarchical coordination ensures alignment
// Time: ~30 minutes, Quality: +25%

SPARC Architecture Phase

The Architecture phase transforms algorithms into system designs by:

  1. Defining system components and boundaries
  2. Designing interfaces and contracts
  3. Selecting technology stacks
  4. Planning for scalability and resilience
  5. Creating deployment architectures

System Architecture Design

1. High-Level Architecture

graph TB
    subgraph "Client Layer"
        WEB[Web App]
        MOB[Mobile App]
        API_CLIENT[API Clients]
    end
    
    subgraph "API Gateway"
        GATEWAY[Kong/Nginx]
        RATE_LIMIT[Rate Limiter]
        AUTH_FILTER[Auth Filter]
    end
    
    subgraph "Application Layer"
        AUTH_SVC[Auth Service]
        USER_SVC[User Service]
        NOTIF_SVC[Notification Service]
    end
…

2. Component Architecture

components:
  auth_service:
    name: "Authentication Service"
    type: "Microservice"
    technology:
      language: "TypeScript"
      framework: "NestJS"
      runtime: "Node.js 18"
    
    responsibilities:
      - "User authentication"
      - "Token management"
      - "Session handling"
      - "OAuth integration"
    
    interfaces:
      rest:
        - POST /auth/login
…

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Architecture by spencermarx?

Architecture by spencermarx is a subagent for Claude Code and Claude Cowork from the spencermarx/open-code-review repository on GitHub. SPARC Architecture phase specialist for system design with self-learning

How do I install Architecture by spencermarx in Claude Code?

Download architecture.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Architecture by spencermarx in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Architecture by spencermarx safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under Apache-2.0. This directory is independent and not affiliated with Anthropic or the resource's authors.