bootstrap plugin
Read a codebase and generate a project-specific suite of domain-expert agents plus a critic gates config.
The bootstrap plugin analyzes a project and generates a custom suite of agents that know your codebase. It does not use static templates — agents write agents.
What it does
Given a project, bootstrap:
- Ingests docs (
CLAUDE.md,README,ARCHITECTURE.md, manifests) intodiscovery/project-context.md. - Detects languages by file count (
discovery/languages.json). - Identifies domains (api-backend, data-persistence, caching, auth, analytics, testing, and so on) (
discovery/domains.json). - Maps domains and languages to candidate agent roles (
synthesis/expert-agents.json), always includingtest-strategistandsecurity-privacy. - Decomposes complex agents into specialists and emits
critic-gates.json(synthesis/decomposed-agents.json). - Validates agent specs pre-generation (
synthesis/generation-validation.json). - Generates each agent with an LLM (colors assigned by domain) →
.claude/agents/<name>.md,.closedloop-ai/bootstrap-metadata.json. - Runs a 6-step validation per generated agent (
synthesis/agent-validation.json). - Writes the final
validation-report.jsonandbootstrap-report.md.
Command
claude /bootstrap:startOr the underlying slash command:
claude /bootstrap:agent-bootstrapFlags
--target-command <name>— target command name--depth quick|medium|deep— how deeply to explore--focus <area>— focus on a specific domain--output-dir <path>— override output directory--dry-run— plan without writing files--interactive— step through each phase--update— update agents when project-context hash changes--minimal/--enhance/--add-domain <domain>--strategy backup|skip|overwrite|interactive— conflict strategy (defaultbackup)
Supported domains
web-frontend, mobile-native, api-backend, data-persistence, caching, real-time-communication, authentication, authorization, analytics, testing, build-deployment, monitoring-observability.
Universal agents
Bootstrap assumes these already exist and does not regenerate them:
prd-analystfeature-locatorplan-writerplan-stagerplan-verifieragent-trainer
Colors by domain
database=blue, API=green, frontend/state=purple, mobile=cyan, security=red, testing=yellow, performance=orange, analytics/monitoring=pink.
Architecture agents
Agents whose names end with -architect, -expert, or -specialist get a two-phase relevance check: a 30-second relevance gate first, then focused analysis — so they do not burn tokens on out-of-scope work.
Output locations
| File | Purpose |
|---|---|
.claude/agents/<name>.md | Generated agent file. |
.closedloop-ai/bootstrap-metadata.json | SHA-256 hashes for --update detection. |
.closedloop-ai/settings/critic-gates.json | Critic wiring used by the code plugin. |
.closedloop-ai/bootstrap/<timestamp>/discovery/ | Raw discovery artifacts. |
.closedloop-ai/bootstrap/<timestamp>/synthesis/ | Synthesis artifacts. |
.closedloop-ai/bootstrap/<timestamp>/validation-report.json | Final validation report. |
.closedloop-ai/bootstrap/<timestamp>/bootstrap-report.md | Human-readable summary. |
Resilience
- Retryable with 1-second base, 8-second max exponential backoff plus jitter, 2 attempts per agent.
- Continues if at least 80% of agents generate successfully (
min_success_ratio).
When to run
Run bootstrap once per new repository, then again whenever project-context.md changes materially (detected via its SHA-256 hash in bootstrap-metadata.json). The --update flag limits regeneration to agents whose inputs have changed.