From blueprint-plugin
Retroactively generates Blueprint PRDs, ADRs, and PRPs from git history, codebase structure, and existing docs for onboarding established projects.
npx claudepluginhub laurigates/claude-plugins --plugin blueprint-pluginThis skill is limited to using the following tools:
Retroactively generate Blueprint documentation (PRDs, ADRs, PRPs) from an existing established project by analyzing git history, codebase structure, and existing documentation.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Retroactively generate Blueprint documentation (PRDs, ADRs, PRPs) from an existing established project by analyzing git history, codebase structure, and existing documentation.
Use case: Onboarding established projects into the Blueprint Development system when PRD/ADR/PRP documents don't exist but the project has implementation history.
| Use this skill when... | Use alternative when... |
|---|---|
| Project has git history but no PRDs/ADRs/PRPs | Starting a brand new project with no history |
| Onboarding an established project to Blueprint | Creating a fresh PRD from scratch with user guidance |
| Need to extract features from commit history | Project lacks conventional commits and clear history |
| Want to document architecture decisions retroactively | Decisions are already fully documented |
git rev-parse --git-dirfind docs/blueprint -maxdepth 1 -name 'manifest.json' -type fgit rev-list --count HEADgit log --reverse --format=%ai --max-count=1git log --max-count=1 --format=%aifind . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' -o -name 'go.mod' -o -name 'pom.xml' \) -type f -print -quitfind . -maxdepth 2 \( -name "README.md" -o -name "ARCHITECTURE.md" -o -name "DESIGN.md" \)Parse these from $ARGUMENTS:
--quick: Fast scan (last 50 commits only)--since DATE: Analyze commits from specific date (e.g., --since 2024-01-01)Default behavior without flags: Standard analysis (last 200 commits with scope estimation).
For detailed templates, manifest format, and report examples, see REFERENCE.md.
Execute this retroactive documentation generation workflow:
Check context values above:
/blueprint:init, then continue with this step 1mkdir -p docs/prds docs/adrs docs/prpsParse $ARGUMENTS for --quick or --since:
--quick flag present → scope = last 50 commits--since DATE present → scope = commits from DATE to nowUse selected scope for all subsequent git analysis.
For commits in scope, calculate:
git log --oneline {scope} | wc -lgit log --format="%s" {scope} | grep -cE "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)\(?.*\)?:" || echo 0Report: "Git history quality: {score}/10 ({percentage}% conventional commits)"
Using methods from REFERENCE.md:
Collect findings in structured format for user confirmation.
Ask for clarifications on:
For confirmation step, present:
Create directory structure: mkdir -p docs/prds docs/adrs docs/prps
For each document type, use templates and patterns from REFERENCE.md:
Generate PRD as docs/prds/project-overview.md
Generate ADRs as docs/adrs/{NNNN}-{title}.md (one per decision)
Create ADR index at docs/adrs/README.md
Generate PRPs as docs/prps/{feature}.md (one per future work item)
docs/blueprint/manifest.json with import metadata: timestamp, commits analyzed, confidence scores, generated artifactsUpdate the task registry entry in docs/blueprint/manifest.json:
jq --arg now "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--arg sha "$(git rev-parse HEAD 2>/dev/null)" \
--argjson analyzed "${COMMITS_ANALYZED:-0}" \
--argjson created "${DOCS_GENERATED:-0}" \
'.task_registry["derive-plans"].last_completed_at = $now |
.task_registry["derive-plans"].last_result = "success" |
.task_registry["derive-plans"].context.commits_analyzed_up_to = $sha |
.task_registry["derive-plans"].context.commits_analyzed_count = $analyzed |
.task_registry["derive-plans"].stats.runs_total = ((.task_registry["derive-plans"].stats.runs_total // 0) + 1) |
.task_registry["derive-plans"].stats.items_processed = $analyzed |
.task_registry["derive-plans"].stats.items_created = $created' \
docs/blueprint/manifest.json > tmp.json && mv tmp.json docs/blueprint/manifest.json
Create summary report showing:
Prompt user for next action:
| Context | Command |
|---|---|
| Check git status | git rev-parse --git-dir 2>/dev/null && echo "YES" || echo "NO" |
| Count commits | git rev-list --count HEAD 2>/dev/null || echo "0" |
| Conventional commits count | git log --format="%s" | grep -cE "^(feat|fix|docs)" || echo 0 |
| Extract scopes | git log --format="%s" | grep -oE '\([^)]+\)' | sort | uniq -c |
| Fast analysis | Use --quick flag for last 50 commits only |
For detailed templates, git analysis patterns, document generation examples, and error handling guidance, see REFERENCE.md.