Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

blueprint-sync-ids

БесплатноЗапускает вложенные скриптыНе проверен

Scan blueprint docs and assign missing PRD/ADR/PRP/WO IDs. Use when assigning IDs to docs; --dry-run to preview, --link-issues to create GitHub issues for…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

Scan all PRDs, ADRs, PRPs, and work-orders, assign IDs to documents missing them, and update the manifest registry.

When to Use This Skill

Use this skill when... Use blueprint-sync instead when...
You're assigning PRD-NNN / ADR-NNNN / PRP-NNN / WO-NNN to docs missing them You want to detect modified or stale generated content (not IDs)
You're previewing ID assignments with --dry-run You're reconciling drift between .claude/rules/ and the manifest
You want to create GitHub issues for orphan docs via --link-issues Use document-linking instead for runtime cross-doc traceability

Flags

Flag Description
--dry-run Preview changes without modifying files
--link-issues Also create GitHub issues for orphan documents

Interaction Mode

Before any closing AskUserQuestion menu, resolve the automation config:

bash "${CLAUDE_SKILL_DIR}/../../scripts/get-automation-config.sh"

When EFFECTIVE_INTERACTION_MODE=quiet and this invocation was automation-initiated (autopilot, session bookend, drift-nudge follow-up — not a slash command the user typed), skip closing navigation menus ("what next?" / "create another?" style): apply the safe default and end with a one-line receipt instead. Quiet mode never skips confirmation gates that guard writes — only navigation menus. A direct user invocation always behaves fully interactively (explicit intent overrides quiet; see ADR-0020).

Prerequisites

  • Blueprint initialized (docs/blueprint/manifest.json exists)
  • At least one document exists in docs/prds/, docs/adrs/, docs/prps/, or docs/blueprint/work-orders/

Steps

Step 1: Initialize ID Registry

Check if id_registry exists in manifest:

jq -e '.id_registry' docs/blueprint/manifest.json >/dev/null 2>&1

If not, initialize it:

{
  "id_registry": {
    "last_prd": 0,
    "last_prp": 0,
    "documents": {},
    "github_issues": {}
  }
}

Step 2: Run the read-only ID audit

Run the helper. It owns the read-only scan: frontmatter id: extraction across PRDs/ADRs/PRPs/work-orders, deriving the expected ADR / WO-NNN id from each filename, flagging NEEDS_ID (no id) and id_mismatch (frontmatter id disagrees with the filename-derived expectation), checking ids against the manifest id_registry, and building the reverse github_issues index from it. ADRs come from docs/adrs/, else docs/adr/, named NNNN-title.md or ADR-NNN-title.md (else the frontmatter id: alone):

bash "${CLAUDE_SKILL_DIR}/scripts/blueprint-sync-ids.sh" --home-dir "$HOME"

Parse STATUS= and ISSUES: from the output:

  • PRD_NEEDS_ID / ADR_NEEDS_ID / PRP_NEEDS_ID / WO_NEEDS_ID and the needs_id issues are the documents to assign IDs to in Step 7 (each carries DOC= and, for ADRs/WOs, the EXPECTED= filename-derived ID).
  • ADR_MISMATCH / WO_MISMATCH and the id_mismatch issues (HAS= vs EXPECTED=) are documents whose frontmatter id disagrees with their filename — reconcile these in Step 7, never silently. STATUS=ERROR indicates at least one mismatch, duplicate, or registry conflict.
  • ADR_DIR is the ADR directory scanned (none if absent); ADR_FRONTMATTER_ONLY counts ADRs numbered only in frontmatter.
  • DUPLICATE_IDS / duplicate_id (ERROR, KIND= ID= DOCS=): two documents of one kind share a frontmatter id. Renumber one before assigning anything.
  • REGISTRY_PRESENT is true only when the manifest has id_registry with a documents map; when false, every registry check is skipped (counts 0). Documents under docs/{prds,adrs,prps,trps}/ and docs/blueprint/work-orders/ are compared by the id-registry engine (blueprint-autorun.sh --registry-reconcile --check, which writes nothing); the rows are what the engine would change on its next reconcile:
    • REGISTRY_ID_ABSENT / registry_id_absent (ERROR): the entry's path exists but its frontmatter does not carry the id (HAS= is what it carries) — a junk entry or the old key of a re-id'd document. The engine prunes it.
    • REGISTRY_UNREGISTERED / unregistered (WARN): the id is not in documents. Add it in Step 7.
    • REGISTRY_ID_PATH_MISMATCH / id_path_mismatch (ERROR): the id is registered under another path (REGISTRY_PATH=); outside the engine's scan set, also the path registered under another id (REGISTRY=). A swapped pair is two rows.
    • REGISTRY_FIELD_DRIFT / registry_field_drift (INFO): derived fields (FIELDS=) differ from frontmatter; the engine refreshes them.
    • REGISTRY_PATH_MISSING / registry_path_missing (ERROR): a documents path not on disk. Step 7a removes the entry once git confirms the deletion.
    • REGISTRY_PATH_IGNORED / registry_path_ignored (INFO): the missing path is git-ignored (work orders) or outside a sparse checkout. Keep the entry.
    • ADR_NUMBER_RESERVED / `adr_number
Полный SKILL.md на GitHub

Установить blueprint-sync-ids в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Glob
Bash(bash ${CLAUDE_SKILL_DIR}/../../scripts/get-automation-config.sh *)
Bash(bash ${CLAUDE_SKILL_DIR}/scripts/blueprint-sync-ids.sh *)
Bash(bash ${CLAUDE_SKILL_DIR}/../../scripts/blueprint-next-id.sh *)
Bash(jq *)
Bash(gh issue create *)
AskUserQuestion

Вложенные файлы

scripts/blueprint-sync-ids.sh

FAQ

Что делает скилл blueprint-sync-ids?

Scan blueprint docs and assign missing PRD/ADR/PRP/WO IDs. Use when assigning IDs to docs; --dry-run to preview, --link-issues to create GitHub issues for orphans.

Как установить скилл blueprint-sync-ids?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл blueprint-sync-ids запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить blueprint-sync-ids с