swarm analyze
Produces a detailed analysis of your repository covering tech stack, architecture, patterns, conventions, and a guide for implementing new features.
swarm analyzeProcess
Section titled “Process”- Architect exploration (primary model) — An architect agent explores the repository structure and produces a structured analysis.
- Senior engineer review (primary model) — Independently verifies accuracy and completeness (up to 3 iterations).
- Cross-model verification — The same loop with the review model, catching model-specific blind spots.
Large Repository Support
Section titled “Large Repository Support”Repos with 500+ files automatically use chunked parallel analysis:
- Scout (fast model) — Scans structure and README for high-level overview.
- Partition — Groups directories into ~300-file chunks respecting natural boundaries.
- Parallel chunk analysis (primary model) — Multiple agents analyze chunks in parallel.
- Synthesis — Merges chunk analyses into a unified document.
- Review — Senior engineer reviews the synthesis.
Configure thresholds via environment variables:
ANALYZE_CHUNK_THRESHOLD— File count to trigger chunked mode (default: 500)ANALYZE_CHUNK_MAX_FILES— Max files per chunk (default: 300)
Central Cache
Section titled “Central Cache”Analysis results are cached centrally at ~/.config/copilot-swarm/analysis/<repo-key>/. Cache is keyed by git remote origin and validated via tree hash — same content = cache hit regardless of commit history.
Output
Section titled “Output”.swarm/analysis/ repo-analysis.md # Final analysis document chunks/ # Individual chunk analyses (chunked mode only)