← ClaudeAtlas

blueprint-generate-ruleslisted

Generate project-specific rules from PRDs with path-scoped frontmatter. Use when auto-creating architecture, testing, or quality rules from docs/prds/.
laurigates/claude-plugins · ★ 37 · Testing & QA · score 80
Install: claude install-skill laurigates/claude-plugins
Generate project-specific rules from Product Requirements Documents. ## When to Use This Skill | 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 the directory configured in `structure.generated_rules_path` (defaults to `.claude/rules/` when the field is absent). Rules with `paths` frontmatter are loaded conditionally when working on matching files. ## Steps **Prerequisites**: - `docs/prds/` directory exists - At least one PRD file in `docs/prds/` 0. **Resolve the output path**: Read `structure.generated_rules_path` from `docs/blueprint/manifest.json` (default `.claude/rules/`): ```bash RULES_DIR=$(jq -r '.structure.generated_rules_path // ".claude/rules/"' docs/blueprint/manifest.json) mkdir -p "$RULES_DIR" ``` Use `$RULES_DIR` for all subsequent reads/writes. This isolates blueprint-managed rules from any hand-written files in the parent `.claude/rules/` directory (issue #1043). 1. **Find and read all PRDs**: - Use Glob to find all `.md` files in `docs/prds/`