# Architect

Given a PRD, produces an implementation architecture: file tree, component breakdown...

- Repository: https://github.com/SethGammon/Citadel (927 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SethGammon/Citadel --skill architect -g -a claude-code -y`
Codex: `npx skills add SethGammon/Citadel --skill architect -g -a codex -y`
Cursor: `npx skills add SethGammon/Citadel --skill architect -g -a cursor -y`
Gemini CLI: `npx skills add SethGammon/Citadel --skill architect -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add SethGammon/Citadel`

## Description

Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can execute directly. Multi-candidate evaluation for key decisions.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /architect, Implementation Architecture from PRD

## When to Use

**Don't use when:** you already have an architecture and want to implement it (use /marshal or /archon); you need a PRD first (use /prd before /architect).

- After /prd produces an approved PRD (greenfield or feature mode)
- When the user has a clear direction + existing codebase (no PRD needed)
- When /do routes a build request
- When the user has a spec and wants a build plan

## Inputs

One of:
1. A PRD file path (from /prd), preferred, contains structured requirements
2. A user-provided spec or description + an existing codebase, sufficient
3. Neither, suggest /prd first, but don't hard-gate. If the user has a clear
   direction ("add auth to my app"), that + the existing code IS the input.

## Mode Detection

**Greenfield mode**: PRD exists with `Mode: greenfield`, or no existing source files.
Produces a complete architecture from scratch.

**Feature mode**: PRD exists with `Mode: feature`, OR the user describes a feature
and the project has existing source files. The architecture describes changes to
existing code, not a standalone system.

In feature mode:
- Read the existing file tree FIRST, understand the current architecture before planning changes
- Read key files (package.json, tsconfig, main entry points, existing patterns)
- The File Tree section shows ONLY new and modified files, not the entire project
- Phases include a Phase 0: "Baseline" that records current typecheck/test state
- Every phase's end conditions include "no new typecheck errors" and "existing tests pass"
- The Risk Register includes "regression in existing functionality" as a default risk

## Protocol

### Step 1: READ

**If PRD exists**, read it. Extract:
- Core features (the numbered list)
- Technical decisions (stack choices)
- End conditions (what "done" looks like)
- Out of scope (what NOT to build)
- Integration points (feature mode)

The rest: https://github.com/SethGammon/Citadel/blob/HEAD/skills/architect/SKILL.md
