architect
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Structural codebase index generator. Builds a compact JSON map of files, exports, imports, dependency graph, and roles. Queryable by keyword. Injected into fleet agents as context slices to reduce token usage on code navigation.
$ npx -y skills add SethGammon/Citadel --skill map --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/mapContext preview
The summary Claude sees to decide when to auto-load this skill.
Structural codebase index generator. Builds a compact JSON map of files, exports, imports, dependency graph, and roles. Queryable by keyword. Injected into fleet agents as context slices to reduce token usage on code navigation.
name: map license: MIT description: >- Structural codebase index generator. Builds a compact JSON map of files, exports, imports, dependency graph, and roles. Queryable by keyword. Injected into fleet agents as context slices to reduce token usage on code navigation. user-invocable: true auto-trigger: false trigger_keywords: - map - index codebase - codebase map - structural index - scan codebase - map stats - map query last-updated: 2026-03-29
Use `/map` when:
Do not use `/map` for:
| Command | Behavior | |---|---| | `/map` | Generate or refresh the index (skips if cache is fresh) | | `/map --force` | Rebuild the index even if cache is fresh | | `/map query <terms>` | Search the index for files matching keywords | | `/map stats` | Print summary statistics (files, lines, languages, roles) | | `/map slice <terms>` | Output a compact context slice for agent injection | | `/map stale` | Detect added, changed, or removed indexed source files |
Run the index generator:
node scripts/map-index.js --generate --root .
Add `--force` if the user requested a fresh rebuild or if the index is stale.
The generator: 1. Walks the project tree (respects `.gitignore`, skips `node_modules`, `dist`, etc.) 2. Extracts exports, imports, and symbols from each source file 3. Infers a role for each file (component, hook, store, route, test, config, etc.) 4. Builds a dependency graph from resolved import paths 5. Records per-file SHA-256 hashes plus a whole-index source signature 6. Extracts route-like paths and package verification scripts 7. Writes the index to `.planning/map/index.json`
**Supported languages:** TypeScript, JavaScript, Python, Go, Rust.
**Cache behavior:** The index is cached for 5 minutes. Subsequent runs within that window exit immediately unless `--force` is passed.
If `.planning/map/` does not exist, the generator creates it automatically.
node scripts/map-index.js --query "<terms>"
The query engine scores files by:
Results are sorted by score and capped at 20 files (configurable with `--max-files`). Output is budget-capped at 8000 characters to stay injection-safe.
node scripts/map-index.js --stats
Outputs: file count, line count, export count, dependency edge count, route count, package script count, verification command count, breakdown by language, and breakdown by role.
When another skill or orchestrator needs a map slice for agent injection:
1. Run `node scripts/map-index.js --slice "<scope terms>" --max-files 15` 2. Inject the generated compact block:
=== MAP SLICE: <terms> === Generated: <timestamp> Verification: npm run test | npm run typecheck <score> <role> <path> [<top exports>] (<lines>L) ... === END MAP SLICE ===
3. The calling skill injects this block into the agent's prompt alongside CLAUDE.md and rules-summary.md
**Token budget:** A 15-file slice is typically 800-1200 tokens. This replaces 2000-5000 tokens of exploratory Glob/Grep results that agents would otherwise spend finding relevant files.
Before injecting an existing map into a long-running campaign, run:
node scripts/map-index.js --stale
The command exits `0` when the map is current and `2` when indexed source files were added, changed, or removed. Refresh with:
node scripts/map-index.js --generate --force --root .
Fleet agents receive map slices automatically when `/map` index exists:
1. Before spawning each wave, Fleet checks if `.planning/map/index.json` exists 2. If it exists: Fleet runs a slice scoped to each agent's assigned domain 3. The generated slice is prepended to the agent's context alongside CLAUDE.md and rules-summary.md 4. If the index does not exist: Fleet proceeds without a map slice (no error)
**Context injection order:** 1. CLAUDE.md content 2. `.claude/agent-context/rules-summary.md` 3. **Map slice** (scoped to agent's domain/direction) 4. Campaign-specific direction and scope 5. Discovery briefs from previous waves
**Disclosure:** "Generating codebase map. Creates `.planning/map/index.json`." **Reversibility:** green — creates `.planning/map/index.json` only; undo by deleting `.planning/map/`. **Trust gates:**
An open-source operating layer for Claude Code and OpenAI Codex. Citadel routes requests, preserves repository state between sessions, coordinates parallel work, applies repository safeguards, and records evidence and handoffs around the coding agent you
Repo: SethGammon/Citadel
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Autonomous multi-session campaign agent. Decomposes large work into phases, delegates to sub-agents, reviews output, and maintains campaign state across…
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed…
Intake-to-delivery pipeline. Processes pending items from .planning/intake/: briefs new ideas, executes approved work through research → plan → build → verify.…
Deep cost exploration and transparency. Shows real token usage, session costs, campaign spend, burn rates, and model breakdown. Reads Claude Code's native…
End-to-end app creation from a single description. Five tiers: blank project, guided, templated, fully generated, or feature addition to existing codebase.…