Skip to content
Development
Command

/living-docs

Launch or resume Living Docs Builder independently. Generates comprehensive enterprise documentation from codebase analysis with AI-powered insights. LSP-enhanced by default for accurate API extraction.

From plugin
specweave
15673 skills20 agents73 commands
Install
> /plugin marketplace add anton-abyzov/specweave
> /plugin install sw@specweave

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/living-docs

Context preview

What this command does when you run it.

Launch or resume Living Docs Builder independently. Generates comprehensive enterprise documentation from codebase analysis with AI-powered insights. LSP-enhanced by default for accurate API extraction.

Command definition

living-docs.md
description: Launch or resume Living Docs Builder independently. Generates comprehensive enterprise documentation from codebase analysis with AI-powered insights. LSP-enhanced by default for accurate API extraction.
argument-hint: [--resume jobId] [--depth level] [--full-scan]

Living Docs Builder (Standalone)

**Usage**: `sw:living-docs [options]`

---

Purpose

Launch the Living Docs Builder independently of `specweave init`. This is essential for:

  • **Resuming after crash** - Claude Code crashed after init, need to restart living docs
  • **On-demand analysis** - Re-analyze codebase after major changes
  • **Large brownfield projects** - Run targeted analysis on specific modules
  • **CI/CD integration** - Automate documentation generation
  • **Enterprise knowledge base** - Generate comprehensive "wikipedia-style" documentation of your entire organization

---

LSP-Enhanced Analysis (DEFAULT)

**LSP is ENABLED BY DEFAULT** for all living docs operations. This dramatically improves documentation accuracy:

| Without LSP (--no-lsp) | With LSP (DEFAULT) | |------------------------|-------------------| | Grep-based symbol search (~45s) | Semantic symbol resolution (~50ms) | | Text-based import parsing | Accurate dependency graphs | | Limited type inference | Full type hierarchy | | May miss indirect references | Complete reference tracking |

**LSP runs automatically** - just ensure language servers are installed:

# Full scan (LSP enabled by default)
sw:living-docs --full-scan

# Install language servers for your stack:
npm install -g typescript-language-server typescript  # TypeScript/JS
pip install python-lsp-server                          # Python
go install golang.org/x/tools/gopls@latest            # Go
rustup component add rust-analyzer                     # Rust

# Disable LSP only if needed (not recommended):
sw:living-docs --full-scan --no-lsp

**LSP provides** (automatically):

  • **Accurate API surface extraction** - All exports, types, signatures with full type info
  • **Semantic dependency graphs** - Based on actual symbol resolution, not text patterns
  • **Dead code detection** - Identifies unreferenced symbols across codebase
  • **Type hierarchy maps** - Interface implementations, class inheritance
  • **Cross-module relationships** - Precise "used by" and "depends on" mappings

---

Command Options

| Option | Description | |--------|-------------| | (none) | Interactive mode - prompts for configuration | | `--resume <jobId>` | Resume orphaned/paused living-docs job | | `--depth <level>` | Analysis depth: `quick`, `standard`, `deep-native`, `deep-interactive` | | `--priority <modules>` | Priority modules (comma-separated): `auth,payments,api` | | `--sources <folders>` | Additional doc folders (comma-separated): `docs/,wiki/` | | `--depends-on <jobIds>` | Wait for jobs before starting (comma-separated) | | `--foreground` | Run in current session instead of background | | `--force` | Force run even for greenfield projects | | `--full-scan` | **Force full enterprise scan** - All 8 phases including enterprise KB, delivery/ops docs, diagrams | | `--no-lsp` | **Disable LSP analysis** - Falls back to grep-based symbol search (not recommended, use only if language servers unavailable) |

---

Quick Start

Launch New Analysis (Interactive)

sw:living-docs

# Prompts for:
# 1. Analysis depth (quick/standard/deep-native/deep-interactive)
# 2. Priority modules to focus on
# 3. Additional documentation sources
# 4. Confirmation to launch

Resume After Crash

# Check for orphaned jobs first
sw:jobs

# If you see an orphaned living-docs-builder job:
sw:living-docs --resume abc12345

# Or let it auto-detect:
sw:living-docs
# → "Found orphaned job abc12345. Resume? [Y/n]"

Quick Analysis (Non-Interactive)

# Quick scan - basic structure + imports + tech detection + inconsistencies
sw:living-docs --depth quick

# Standard analysis - modules + dependencies + relationships + diagrams
sw:living-docs --depth standard --priority auth,payments

# AI-powered deep analysis (FREE with MAX subscription)
sw:living-docs --depth deep-native --priority core,api

# FULL ENTERPRISE SCAN - All 8 phases (A through H)
# Generates complete knowledge base: company history, team structure, delivery docs, diagrams
sw:living-docs --full-scan

---

Analysis Depths

| Depth | Scope | What It Does | Cost | |-------|-------|--------------|------| | `quick` | Core analysis | Structure scan + tech detection + imports map + inconsistency detection + basic diagrams | Free | | `standard` | Full module analysis | Module deep-dive + exports + dependencies + relationships + team detection + Mermaid diagrams | Free | | `deep-native` | Intelligent analysis | AI-powered understanding: purpose extraction, pattern recognition, organization synthesis | FREE (MAX) | | `deep-interactive` | Enterprise knowledge | AI analysis in current session with full enterprise KB generation (checkpoint/resume) | FREE (MAX) |

Quick Depth Features (Expanded)

Quick mode now includes:

  • File structure discovery across all repos
  • Technology stack detection (frameworks, languages, tools)
  • Import/export dependency mapping
  • **Basic inconsistency detection** (duplicates, naming issues)
  • **Basic Mermaid diagrams** (module structure, imports)
  • External specification loading (GitHub/JIRA/ADO imports)

Standard Depth Features (Expanded)

Standard mode adds:

  • Deep module analysis with exports/APIs
  • Cross-module dependency graphs
  • **Team structure inference** from code ownership
  • **Relationship mapping** (feature-to-code, team-to-features)
  • **Full Mermaid diagram suite** (org charts, dependencies, timelines)
  • Basic architecture detection (patterns, ADR candidates)
  • Spec-code gap detection

Full Scan Mode (--full-scan) - Enterprise Knowledge Base

**What it does**: Forces a comprehensive deep analysis through **ALL 8 PHASES (A-H)**, generating a complete enterprise k

Read more
Ships withspecweave

Spec-first AI development: describe a feature → AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.

Get the whole plugin