Initialize Blueprint Development in this project.
When to Use This Skill
| Use this skill when... | Use blueprint-upgrade instead when... |
|---|---|
| The project has no docs/blueprint/manifest.json yet | The project already has a manifest at an older format version |
| You're bootstrapping a new project's PRD/ADR/PRP directories | You're migrating v1.x→v2, v2→v3, or v3.x→v3.y |
| You want to enable feature tracking and decision detection from scratch | Use blueprint-derive-plans to populate PRDs/ADRs/PRPs after init |
| You're configuring task scheduling for the first time | Use blueprint-execute instead when you want auto-detection of next step |
Execution
Execute this blueprint initialization workflow:
Step 1: Check if already initialized
- Look for
docs/blueprint/manifest.json - If it exists, read its version and ask with the Step 1 prompt in references/prompts.md (upgrade →
/blueprint:upgrade, reinitialize → Step 2, cancel → exit).
Step 1a: Detect monorepo context
Format_version 3.3.0+. Ancestor manifest found → child; descendant manifests found → root; neither → standalone (no workspaces block). Walk/scan rules are in references/monorepo-workspaces.md.
When an ancestor root is detected, ask whether to register as a child workspace using the prompt in references/monorepo-workspaces.md.
Step 2: Ask about feature tracking
Use AskUserQuestion with the Step 2 prompt in references/prompts.md.
If "Yes" selected:
a. Search for markdown files in the project that contain requirements, features, or user stories
b. Auto-detect the most likely source document based on content analysis
c. Create docs/blueprint/feature-tracker.json from template using the detected source
d. Set has_feature_tracker: true in manifest
Step 3: Ask about document migration
Search for existing markdown documentation files across the project (excluding standard files like README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md, CODE_OF_CONDUCT.md, SECURITY.md). The find command is in references/document-migration.md.
If no documentation files found: skip this step silently.
If documentation files found (e.g., REQUIREMENTS.md, ARCHITECTURE.md, DESIGN.md, docs in non-standard locations), measure cross-reference density before recommending migration — migrating a doc rewrites its path and breaks every reference to it. Run the per-doc reference-count loop in references/document-migration.md, then:
- Default to recommending migration (
label: "Yes, migrate documents (Recommended)") only when no candidate doc is referenced outsidedocs/. - When one or more candidate docs are referenced outside
docs/, DROP the "(Recommended)" marker from the migrate option and surface the reference count so the user judges the cost. Prefer steering toward "leave in place".
Ask with the migration prompt in references/document-migration.md (AskUserQuestion).
If "Yes" selected: classify, move, rename, and report each doc per references/document-migration.md.
Step 4: Ask about maintenance task scheduling
Use AskUserQuestion with the Step 4 prompt in references/prompts.md (Prompt / Auto-run safe / Fully automatic / Manual only).
Store selection for task_registry defaults:
- Prompt: all
auto_run: false, default schedules - Auto-run safe: read-only tasks (
adr-validate,feature-tracker-sync,sync-ids) getauto_run: true; write tasks getfalse - Fully automatic: all tasks get
auto_run: true, default schedules - Manual only: all
auto_run: false, all schedules set toon-demand
The same selection sets automation.autonomy_level (the ADR-0020 level
model — what actually executes the auto_run contract):
- Prompt / Manual only →
autonomy_level: 0(nothing runs unattended) - Auto-run safe →
autonomy_level: 1(deterministic due tasks run via
the SessionStart probe; due agent tasks surface as drift findings)
- Fully automatic →
autonomy_level: 2(quiet autopilot also runs due
agent tasks in-session; interaction_mode defaults to quiet)
Step 4a: Ask about generated-rules output path
Only prompt when .claude/rules/ already exists and contains files (i.e., hand-authored rules that pre-date blueprint). Skip silently in fresh repos and use the default.
Detect existing content and ask with the Step 4a prompt in references/prompts.md (AskUserQuestion).
Store the chosen path in structure.generated_rules_path in the manifest (defaults to .claude/rules/ when unset). This keeps blueprint-generate-rules and blueprint-derive-rules from clobbering hand-curated rule files (issue #1043).
Step 5: Ask about decision detection
Use AskUserQuestion with the Step 5 prompt in references/prompts.md.
Set has_document_detection in manifest based on response.
If enabled: resolve $RULES_DIR and copy the document-management rule per references/rules-setup.md.
Step 6: Create directory structure
Execute the creation explicitly so the directories exist even when no document migration happened in Step 3:
mkdir -p docs/blueprint/work-orders/completed
mkdir -p docs/blueprint/work-orders/archived
mkdir -p docs/adrs
mkdir -p docs/prds
mkdir -p docs/prps
Documents live at top-level docs/, not docs/blueprint/ — why, plus the resulting trees: references/directory-layout.md.
Step 7: Create `manifest.json`
v3.4.0 schema — canonical filename is docs/blueprint/manifest.json, no dot prefix. Write the template in references/manifest-template.md, filling each [...] placeholder from the answers in Steps 1–5. Fill created_by.blueprint_plugin with the plugin version (not the format version):
jq -r .version "${CLAUDE_SKILL_DIR}/../../.claude-plugin/plugin.json"
Note: Include feature_tracker section only if feature tracking is enabled.
For a monorepo child or root (Step 1a), append the workspaces block from references/monorepo-workspaces.md; a standalone blueprint omits it.
Step 8: Create initial rules
Write them under the resolved $RULES_DIR (the Step 4a
generated_rules_path, default .claude/rules/) — never a hardcoded
.claude/rules/ — so they sit alongside, not on top of, rulesync-managed or
hand-authored rules (issue #1675):
RULES_DIR=$(jq -r '.structure.generated_rules_path // ".claude/rules/"' docs/blueprint/manifest.json)
mkdir -p "$RULES_DIR"
$RULES_DIR/development.md: TDD workflow, commit conventions$RULES_DIR/testing.md: Test requirements, coverage expectations$RULES_DIR/document-management.md: Document organization rules (if decision detection enabled)
Step 8a: Register the rules just written in `generated.rules`
This step is not optional. /blueprint:sync and the SessionStart drift probe
detect staleness by comparing a registered record's content_hash against the file on
disk, so a rule written here but never registered is invisible to both: a
local edit is undetectable, a revised template never propagates, and sync
reports clean over a set it cannot see. Nothing surfaces as an error
(issue #2331).
Register every rule Step 8 actually wrote — pass only the filenames that
exist (document-management.md only when decision detection was enabled in
Step 5):
bash "${CLAUDE_SKILL_DIR}/../../scripts/register-generated-rules.sh" \
--source "blueprint-init" \
development.md testing.md document-management.md
The script records the plugin version from its own plugin.json, so the call carries no --plugin-version.
Check REGISTERED= and STATUS=OK in the script's output before continuing. The record shape and manifest key form are in references/rules-setup.md.
Step 9: Handle `.gitignore`
- Always commit
CLAUDE.mdand.claude/rules/(shared project instructions) - Add
docs/blueprint/work-orders/to.gitignore(task-specific, may contain sensitive details) - If secrets detected in
.claude/, warn user and suggest.gitignoreentries
Step 10: Report
Print the initialization report in references/report-templates.md.
Step 11: Prompt for next action
Use AskUserQuestion with the Step 11 prompt in references/prompts.md.
Based on selection:
- "Derive plans from git history" → Run
/blueprint:derive-plans - "Derive rules from codebase" → Run
/blueprint:derive-rules - "Update CLAUDE.md" → Run
/blueprint:claude-md - "I'm done for now" → Show the Quick Reference command list in references/report-templates.md and exit