← ClaudeAtlas

codex-spec-bootstraplisted

Analyze a codebase and generate durable spec files from existing patterns, architecture, and conventions. Use to initialize or refresh .codex/spec/ for a project. Also use when the lifecycle hook reminds you to run spec-bootstrap, when a project has empty or template-only specs, when the user says 'generate specs', 'initialize specs', 'bootstrap specs', or 'make the codebase context durable'.
yinanli1917-cloud/searching-apple-notes · ★ 1 · AI & Automation · score 74
Install: claude install-skill yinanli1917-cloud/searching-apple-notes
# Spec Bootstrap Scan the current project's codebase and generate `.codex/spec/project/` files that capture durable knowledge — architecture decisions, module contracts, conventions, performance constraints, and operational rules. ## Process ### 1. Discover Project Shape ```bash # File tree (depth 3) find . -maxdepth 3 -type f \( -name "*.swift" -o -name "*.py" -o -name "*.ts" -o -name "*.js" -o -name "*.rs" \) | head -80 # Existing documentation cat CLAUDE.md 2>/dev/null cat README.md 2>/dev/null cat AGENTS.md 2>/dev/null # Existing specs (don't duplicate) ls .codex/spec/project/ 2>/dev/null ls .codex/spec/guides/ 2>/dev/null # Package/module structure find . -maxdepth 2 -name "Package.swift" -o -name "package.json" -o -name "pyproject.toml" -o -name "Cargo.toml" 2>/dev/null # Git history for major patterns git log --oneline -30 git log --oneline --all --diff-filter=A -- "*.swift" "*.py" "*.ts" | head -20 ``` ### 2. Identify Spec-Worthy Knowledge Read key source files to find: - **Architecture boundaries** — what modules exist, what are their responsibilities, how do they communicate - **Data flow patterns** — how state moves through the app (e.g., MusicKit → ViewModel → View) - **Performance constraints** — any throttling, caching, batching, or real-time requirements - **Platform conventions** — API patterns, error handling, naming, file organization - **Integration contracts** — external services, APIs, system frameworks, their constraints - **Hard-won lessons**