From blueprint-plugin
Generates project-specific Claude rules from docs/prds/ PRDs. Extracts architecture patterns, testing strategies, implementation guides, and quality standards into .claude/rules/. Supports path-scoped rules with brace expansion.
npx claudepluginhub laurigates/claude-plugins --plugin blueprint-pluginThis skill is limited to using the following tools:
Generate project-specific rules from Product Requirements Documents.
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.
Generate project-specific rules from Product Requirements Documents.
| Use this skill when... | Use alternative when... |
|---|---|
| Need to generate rules from existing PRDs | Use /blueprint:rules to manually create/edit rules |
| Want path-scoped rules for specific file types | Use /blueprint:claude-md for general project instructions |
| Automating rule creation from requirements | Writing custom rules without PRD reference |
| Extracting architecture/testing patterns from PRDs | Need to create one-off rules for specific contexts |
Rules are generated to .claude/rules/ directory. Rules with paths frontmatter are loaded conditionally when working on matching files.
Prerequisites:
docs/prds/ directory existsdocs/prds/Steps:
Find and read all PRDs:
.md files in docs/prds/Check for existing generated rules:
ls .claude/rules/ 2>/dev/null
Analyze PRDs and extract (aggregated from all PRDs):
Architecture Patterns:
Testing Strategies:
Implementation Guides:
Quality Standards:
Generate four aggregated domain rules:
Create in .claude/rules/:
architecture-patterns.md:
testing-strategies.md:
paths frontmatter if tests live in specific directories:
---
paths:
- "tests/**/*"
- "**/*.{test,spec}.*"
---
implementation-guides.md:
---
paths:
- "src/**/*"
- "lib/**/*"
---
quality-standards.md:
Path-scoping guidance: Add paths frontmatter when a rule only applies to specific file types or directories. This reduces context noise — Claude only loads the rule when working on matching files. Use brace expansion for concise patterns: *.{ts,tsx}, src/{api,routes}/**/*.
Update manifest with generation tracking:
{
"generated": {
"rules": {
"architecture-patterns": {
"source": "docs/prds/*",
"source_hash": "sha256:...",
"generated_at": "[ISO timestamp]",
"plugin_version": "3.0.0",
"content_hash": "sha256:...",
"status": "current"
},
"testing-strategies": { ... },
"implementation-guides": { ... },
"quality-standards": { ... }
}
}
}
Update task registry:
Update the task registry entry in docs/blueprint/manifest.json:
jq --arg now "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--argjson processed "${PRDS_READ:-0}" \
--argjson created "${RULES_GENERATED:-0}" \
'.task_registry["generate-rules"].last_completed_at = $now |
.task_registry["generate-rules"].last_result = "success" |
.task_registry["generate-rules"].context.source_prd_hashes = ($source_prd_hashes // {}) |
.task_registry["generate-rules"].stats.runs_total = ((.task_registry["generate-rules"].stats.runs_total // 0) + 1) |
.task_registry["generate-rules"].stats.items_processed = $processed |
.task_registry["generate-rules"].stats.items_created = $created' \
docs/blueprint/manifest.json > tmp.json && mv tmp.json docs/blueprint/manifest.json
For source_prd_hashes, compute sha256sum of each PRD file and pass as a JSON object via --argjson.
Report:
Rules generated from PRDs!
Created in .claude/rules/:
- architecture-patterns.md
- testing-strategies.md
- implementation-guides.md
- quality-standards.md
PRDs analyzed:
- docs/prds/[List PRD files]
Key patterns extracted:
- Architecture: [Brief summary]
- Testing: [Brief summary]
- Implementation: [Brief summary]
- Quality: [Brief summary]
Rules are immediately available - Claude auto-discovers them based on context!
Prompt for next action (use AskUserQuestion):
question: "Rules generated. What would you like to do next?"
options:
- label: "Generate workflow commands (Recommended)"
description: "Create /project:continue and /project:test-loop commands"
- label: "Update CLAUDE.md"
description: "Regenerate project overview document with new rules"
- label: "Review generated rules"
description: "I'll examine and refine the rules manually"
- label: "I'm done for now"
description: "Exit - rules are already available"
Based on selection:
/blueprint:generate-commands/blueprint:claude-mdImportant:
Error Handling:
/blueprint:derive-prd)