Generate or update CLAUDE.md from project context and blueprint artifacts
Generates or updates CLAUDE.md from project context and blueprint artifacts.
/plugin marketplace add laurigates/claude-plugins/plugin install blueprint-plugin@lgates-claude-pluginsGenerate or update the project's CLAUDE.md file based on blueprint artifacts, PRDs, and project structure.
Steps:
Check current state:
CLAUDE.md in project rootdocs/blueprint/manifest.json for configurationclaude_md_mode (single, modular, or both)Determine action (use AskUserQuestion):
{If CLAUDE.md exists:}
question: "CLAUDE.md already exists. What would you like to do?"
options:
- "Update with latest project info" → merge updates
- "Regenerate completely" → overwrite (backup first)
- "Add missing sections only" → append new content
- "Convert to modular rules" → split into .claude/rules/
- "View current structure" → analyze and display
{If CLAUDE.md doesn't exist:}
question: "No CLAUDE.md found. How would you like to create it?"
options:
- "Generate from project analysis" → auto-generate
- "Generate from PRDs" → use blueprint PRDs
- "Start with template" → use starter template
- "Use modular rules instead" → skip CLAUDE.md, use rules/
Gather project context:
docs/prds/*.md for requirements.claude/rules/ if presentGenerate CLAUDE.md sections:
Standard sections:
# Project: {name}
## Overview
{Brief project description from PRDs or detection}
## Tech Stack
- Language: {detected}
- Framework: {detected}
- Build: {detected}
- Test: {detected}
## Development Workflow
### Getting Started
{Setup commands}
### Running Tests
{Test commands}
### Building
{Build commands}
## Architecture
{Key architectural decisions from PRDs}
## Conventions
### Code Style
{Detected or from PRDs}
### Commit Messages
{Conventional commits if detected}
### Testing Requirements
{From PRDs or rules}
## Current Focus
{From work-overview.md}
## Key Files
{Important files and their purposes}
## See Also
{If modular rules enabled:}
- `.claude/rules/` - Detailed rules by domain
- `docs/prds/` - Product requirements
If modular rules mode = "both":
.claude/rules/ for details:
## Detailed Rules
See `.claude/rules/` for domain-specific guidelines:
- `development.md` - Development workflow
- `testing.md` - Testing requirements
- `frontend/` - Frontend-specific rules
- `backend/` - Backend-specific rules
If modular rules mode = "modular":
.claude/rules/Smart update (for existing CLAUDE.md):
question: "Found outdated sections. Which would you like to update?"
options: [list of sections]
allowMultiSelect: true
Sync with modular rules:
.claude/rules/question: "Found duplicate content between CLAUDE.md and rules/. How to resolve?"
options:
- "Keep in CLAUDE.md, remove from rules"
- "Keep in rules, reference from CLAUDE.md"
- "Keep both (may cause confusion)"
Update manifest:
Report:
✅ CLAUDE.md updated!
{Created | Updated}: CLAUDE.md
Sections:
- Overview ✅
- Tech Stack ✅
- Development Workflow ✅
- Architecture ✅
- Conventions ✅
- Current Focus ✅
Sources used:
- PRDs: {list}
- Rules: {list}
- Project detection: {what was detected}
{If modular mode:}
Note: Detailed rules are in .claude/rules/
CLAUDE.md serves as overview and quick reference.
Run `/blueprint-status` to see full configuration.
CLAUDE.md Best Practices:
Prompt for next action (use AskUserQuestion):
question: "CLAUDE.md updated. What would you like to do next?"
options:
- label: "Check blueprint status (Recommended)"
description: "Run /blueprint:status to verify configuration"
- label: "Manage modular rules"
description: "Add or edit rules in .claude/rules/"
- label: "Continue development"
description: "Run /project:continue to work on next task"
- label: "I'm done for now"
description: "Exit - CLAUDE.md is saved"
Based on selection:
/blueprint:status/blueprint:rules/project:continueTemplate Sections (customize per project type):
| Project Type | Key Sections |
|---|---|
| Python | Virtual env, pytest, type hints |
| Node.js | Package manager, test runner, build |
| Rust | Cargo, clippy, unsafe usage rules |
| Monorepo | Workspace structure, shared deps |
| API | Endpoints, auth, error handling |
| Frontend | Components, state, styling |