mcpField
B
blueprint-status

blueprint-status

github.com/laurigates开发5954 次安装1 天前更新
代码仓库

关于 blueprint-status

blueprint-status 用于审查项目的 Blueprint 配置,并汇报文档、任务及生成内容的状态,帮助团队检查可追溯性和配置问题,也可仅输出报告。

主要功能

  1. 01汇报 Blueprint 版本与配置
  2. 02统计 PRD、ADR、PRP 和工单
  3. 03检查生成内容状态
  4. 04审计可追溯性和文档链接
  5. 05标记逾期任务与过期跟踪器
  6. 06根据检查结果提供后续操作

适用场景

  1. 01检查 Blueprint 项目状态
  2. 02查找孤立或未关联的文档
  3. 03检查生成规则是否有改动或过期
  4. 04执行非交互式状态审计

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/laurigates/claude-plugins --skill blueprint-status

安装后在 Claude Code 中输入/blueprint-status确认已加载。

详细介绍

显示当前蓝图配置状态,并按三层架构进行拆解。

何时使用此技能

在以下情况下使用此技能……在以下情况下改用 blueprint-execute……
你需要只读状态报告(PRD/ADR/PRP 数量、可追溯性)你希望自动检测并执行下一步操作,而不仅仅是生成报告
你需要三层架构拆解如需查看 FR/阶段进度,请改用 blueprint-feature-tracker-status
你需要审计孤立文档和过时的生成内容如需可执行的偏差协调,请改用 blueprint-sync
你使用 --report-only 进行非交互式审计如果你已发现需要升级,请改用 blueprint-upgrade

标志

标志说明
--report-only显示状态报告并退出,不提示下一步操作

步骤

  1. 检查蓝图是否已初始化:

    • 查找 docs/blueprint/manifest.json
    • 如果未找到,请报告:
      Blueprint not initialized in this project.
      Run `/blueprint:init` to get started.
      
  2. 读取清单并收集信息:

    • 解析 manifest.json 中的版本和配置
    • 解析 id_registry,获取可追溯性指标
    • 统计 docs/prds/ 中的 PRD 数量
    • 统计 docs/adrs/ 中的 ADR 数量
    • 统计 docs/prps/ 中的 PRP 数量
    • 对于 ADR,还要统计:
      • 带有领域标签的数量(grep -l "^domain:" docs/adrs/*.md | wc -l)
      • 声明了关系(supersedes、extends、related)的数量
      • 按状态统计(Accepted、Superseded、Deprecated)
    • 统计工作订单(待处理、已完成、已归档)
    • 解析已配置的规则路径:jq -r '.structure.generated_rules_path // ".claude/rules/"' docs/blueprint/manifest.json
    • 统计已配置路径中的生成规则数量(默认路径为 .claude/rules/)
    • 统计 .claude/skills/ 中的自定义技能数量
    • 统计 .claude/commands/ 中的自定义命令数量
    • 检查 .claude/rules/ 目录是否存在
    • 检查 CLAUDE.md 文件是否存在
    • 检查 docs/blueprint/feature-tracker.json 是否存在
    • 如果功能跟踪器存在,读取统计信息和 last_updated
    • 读取清单中的 task_registry(如果存在)
    • 对每项任务计算计划状态:
      • ok:根据计划尚未到期
      • due:根据计划应当执行
      • overdue:已逾期超过 1 个计划周期(例如,每日任务超过 2 天未运行)
      • disabled:enabled: false
      • never:last_completed_at 为 null(从未跟踪)
  3. 检查是否有可用升级:

    • 比较清单中的 format_version 与当前插件版本
    • 当前格式版本:3.3.0
    • 如果清单版本 < 当前版本 → 有可用升级

3a. 刷新多仓库组合(v3.3.0+):

  • 如果 workspaces.role == "root",调用 /blueprint:workspace-scan, 刷新 workspaces.children 和缓存统计信息后再生成报告。如果 last_scanned_at 显示最近一小时内已扫描,则跳过。
  • 如果 workspaces.role == "child",解析 workspaces.root_relative_path, 并在状态报告中提及父级,但不要触发扫描。
  1. 检查生成内容状态:

    • 对清单中的每条生成规则:
      • 计算当前文件内容的哈希值
      • 与存储的 content_hash 进行比较
      • 状态:current(未更改)、modified(用户已编辑)、stale(源 PRD 已更改)
  2. 显示状态报告:

    Blueprint Status
    
    Version: v{format_version} {upgrade_indicator}
    Initialized: {created_at}
    Last Updated: {updated_at}
    
    Project Configuration:
    - Name: {project.name}
    - Type: {project.type}
    - Stack: {project.detected_stack}
    - Rules Mode: {structure.claude_md_mode}
    
    Project Documentation (docs/):
    - PRDs: {count} in docs/prds/
    - ADRs: {count} in docs/adrs/
      - With domain tags: {count}/{total} ({percent}%)
      - With relationships: {count}
      - Status: {accepted} Accepted, {superseded} Superseded, {deprecated} Deprecated
    - PRPs: {count} in docs/prps/
    
    Work Orders (docs/blueprint/work-orders/):
    - Pending: {count}
    - Completed: {count}
    - Archived: {count}
    
    Three-Layer Architecture:
    
    Layer 1: Plugin (blueprint-plugin)
    - Commands: /blueprint:* (auto-updated with plugin)
    - Skills: blueprint-development, blueprint-migration, confidence-scoring
    - Agents: requirements-documentation, architecture-decisions, prp-preparation
    
    Layer 2: Generated ({structure.generated_rules_path or .claude/rules/})
    - Path: {structure.generated_rules_path} (default: .claude/rules/)
    - Rules: {count} ({status_summary})
      {list each with status indicator: ✅ current, ⚠️ modified, 🔄 stale}
    
    Layer 3: Custom (.claude/skills/, .claude/commands/)
    - Skills: {count} (user-maintained)
    - Commands: {count} (user-maintained)
    
    {If feature_tracker enabled:}
    Feature Tracker:
    - Status: Enabled
    - Source: {feature_tracker.source_document}
    - Progress: {statistics.complete}/{statistics.total_features} ({statistics.completion_percentage}%)
    - Last Sync: {last_updated}
    - Phases: {count in_progress} active, {count complete} complete
    
    {If workspaces.role == "root":}
    Monorepo Portfolio ({workspaces.children|length} workspaces, scanned {last_scanned_at}):
    | Workspace | Format | Progress | Phase |
    |-----------|--------|----------|-------|
    {for each child:}
    | {child.path} | v{child.manifest_format_version} | {child.cached_stats.complete}/{child.cached_stats.total} ({child.cached_stats.completion_percentage}%) | {child.cached_stats.current_phase or "—"} |
    
    {If workspaces.role == "child":}
    Workspace: child of blueprint at {workspaces.root_relative_path}
    
    {If task_registry exists:}
    Task Health:
    - derive-plans        last: {age}  schedule: {schedule}  status: {status}
    - derive-rules        last: {age}  schedule: {schedule}  status: {status}
    - generate-rules      last: {age}  schedule: {schedule}  status: {status}
    - adr-validate        last: {age}  schedule: {schedule}  status: {status}
    - feature-tracker-sync last: {age}  schedule: {schedule}  status: {status}
    - sync-ids            last: {age}  schedule: {schedule}  status: {status}
    - claude-md           last: {age}  schedule: {schedule}  status: {status}
    - curate-docs         disabled
    
    Traceability (ID Registry):
    - Total documents: {count} ({x} PRDs, {y} ADRs, {z} PRPs, {w} WOs)
    - With IDs: {count}/{total} ({percent}%)
    - Linked to GitHub: {count}/{total} ({percent}%)
    - Orphan documents: {count} (docs without GitHub issues)
    - Orphan issues: {count} (issues without linked docs)
    - Broken links: {count}
    
    {If orphans exist:}
    Orphan Documents (no GitHub issues):
    - {PRD-001}: {title}
    - {PRP-003}: {title}
    
    Orphan GitHub Issues (no linked docs):
    - #{N}: {title}
    - #{M}: {title}
    
    Structure:
    ✅ docs/blueprint/manifest.json
    {✅|❌} docs/prds/
    {✅|❌} docs/adrs/
    {✅|❌} docs/prps/
    {✅|❌} docs/blueprint/work-orders/
    {✅|❌} docs/blueprint/feature-tracker.json
    {✅|❌} .claude/rules/
    {✅|❌} CLAUDE.md
    
    {If upgrade available:}
    Upgrade available: v{current} → v{latest}
       Run `/blueprint:upgrade` to upgrade.
    
    {If modified generated content:}
    Modified content detected: {count} files
       Run `/blueprint:sync` to review changes.
       Run `/blueprint:promote [name]` to move to custom layer.
    
    {If stale generated content:}
    Stale content detected: {count} files (PRDs changed since generation)
       Run `/blueprint:generate-skills` to regenerate.
    
    {If up to date:}
    Blueprint is up to date.
    
  3. 其他检查:

    • 如果有逾期任务,则发出警告(例如:“3 项维护任务已逾期 - 运行 /blueprint:execute 以补上”)
    • 如果 feature-tracker.json 已过时(距上次更新超过 1 天),则发出警告
    • 如果存在 PRD,但没有生成的规则,则发出警告
    • 如果已启用模块化规则,但 .claude/rules/ 为空,则发出警告
    • 如果生成的内容已修改或过时,则发出警告
    • 如果 feature-tracker.json 的更新时间超过 7 天(需要同步),则发出警告
    • 如果 TODO.md 自上次同步后已修改,则发出警告
    • 如果 ADR 存在潜在问题,则发出警告:
      • 同一领域中有多个“Accepted”ADR(可能存在冲突)
      • ADR 缺少领域标签(更难检测冲突)
      • 缺少双向链接(例如,存在 supersedes,但没有对应的 superseded_by)
    • 可追溯性检查:
      • 如果文档没有 ID,则发出警告(运行 /blueprint:sync-ids)
      • 如果存在孤立文档(没有 GitHub issue 的文档),则发出警告
      • 如果存在孤立 issue(没有关联文档的 GitHub issue),则发出警告
      • 如果检测到断开的链接(引用的文档 / issue 不存在),则发出警告
  4. 如果使用 --report-only:输出步骤 5–6 的状态报告,然后退出。跳过下面的交互式提示。

  5. 提示下一步操作(使用 AskUserQuestion):

    根据当前状态动态生成选项:

    • 如果有可用升级 → 包含“升级到 v{latest}”
    • 如果内容已修改 → 包含“同步生成的内容”
    • 如果内容已过时 → 包含“重新生成技能”
    • 如果存在 PRD,但没有生成的技能 → 包含“根据 PRD 生成技能”
    • 如果存在技能,但没有命令 → 包含“生成工作流命令”
    • 如果 CLAUDE.md 已过时 → 包含“更新 CLAUDE.md”
    • 如果 feature tracker 存在但已过时 → 包含“同步 feature tracker”
    • 如果 ADR 存在潜在问题 → 包含“验证 ADR”
    • 如果有文档没有 ID → 包含“同步文档 ID”
    • 如果存在孤立文档 / issue → 包含“将文档关联到 GitHub”
    • 如果存在逾期任务 → 包含“运行逾期维护任务”
    • 始终包含“继续开发”和“我已完成”
    question: "What would you like to do?"
    options:
      # Dynamic - include based on state detected above
      - label: "Upgrade to v{latest}" (if upgrade available)
        description: "Upgrade blueprint format to latest version"
      - label: "Sync generated content" (if modified)
        description: "Review changes to generated skills/commands"
      - label: "Regenerate from PRDs" (if stale)
        description: "Update generated content from changed PRDs"
      - label: "Generate rules from PRDs" (if PRDs exist, no rules)
        description: "Extract project-specific rules from your PRDs"
      - label: "Update CLAUDE.md" (if stale or missing)
        description: "Regenerate project overview document"
      - label: "Sync feature tracker" (if feature tracker stale)
        description: "Synchronize tracker with TODO.md"
      - label: "Validate ADRs" (if ADR issues detected)
        description: "Check ADR relationships, conflicts, and missing links"
      - label: "Sync document IDs" (if documents without IDs)
        description: "Assign IDs to all documents missing them"
      - label: "Link documents to GitHub" (if orphans exist)
        description: "Create/link GitHub issues for orphan documents"
      - label: "Run overdue tasks ({N} due)" (if overdue tasks exist)
        description: "Execute overdue maintenance tasks"
      # Always include these:
      - label: "Continue development"
        description: "Run /project:continue to work on next task"
      - label: "I'm done for now"
        description: "Exit status check"
    

    根据选择执行:

    • “升级” → 运行 /blueprint:upgrade
    • “同步” → 运行 /blueprint:sync
    • “重新生成” → 运行 /blueprint:generate-rules
    • “生成规则” → 运行 /blueprint:generate-rules
    • “更新 CLAUDE.md” → 运行 /blueprint:claude-md
    • “同步 feature tracker” → 运行 /blueprint:feature-tracker-sync
    • “验证 ADR” → 运行 /blueprint:adr-validate
    • “同步文档 ID” → 运行 /blueprint:sync-ids
    • “将文档关联到 GitHub” → 对每个孤立项,提示创建 / 关联 issue
    • “运行逾期任务” → 对逾期任务运行 /blueprint:execute
    • “继续开发” → 运行 /project:continue
    • “我已完成” → 退出

示例输出:

Blueprint Status

Version: v3.0.0
Initialized: 2024-01-10T09:00:00Z
Last Updated: 2024-01-15T14:30:00Z

Project Configuration:
- Name: my-awesome-project
- Type: team
- Stack: typescript, bun, react
- Rules Mode: modular

Project Documentation (docs/):
- PRDs: 3 in docs/prds/
- ADRs: 5 in docs/adrs/
  - With domain tags: 4/5 (80%)
  - With relationships: 2
  - Status: 3 Accepted, 2 Superseded
- PRPs: 2 in docs/prps/

Work Orders (docs/blueprint/work-orders/):
- Pending: 5
- Completed: 12
- Archived: 2

Three-Layer Architecture:

Layer 1: Plugin (blueprint-plugin)
- Commands: 13 /blueprint:* commands (auto-updated)
- Skills: 3 (blueprint-development, blueprint-migration, confidence-scoring)
- Agents: 3 (requirements-documentation, architecture-decisions, prp-preparation)

Layer 2: Generated (.claude/rules/blueprint/)
- Path: .claude/rules/blueprint/ (configured; default is .claude/rules/)
- Rules: 4 (3 current, 1 modified)
  - ✅ architecture-patterns.md (current)
  - ⚠️ testing-strategies.md (modified locally)
  - ✅ implementation-guides.md (current)
  - ✅ quality-standards.md (current)

Layer 3: Custom (.claude/skills/, .claude/commands/, .claude/rules/)
- Skills: 1 (my-custom-skill)
- Commands: 0
- Rules: 0 (user-maintained)

Feature Tracker:
- Status: Enabled
- Source: REQUIREMENTS.md
- Progress: 22/42 (52.4%)
- Last Sync: 2024-01-14
- Phases: 1 active, 2 complete

Task Health:
  derive-plans        last: 5d ago   schedule: weekly      status: due
  derive-rules        last: 3d ago   schedule: weekly      status: ok
  generate-rules      last: 1d ago   schedule: on-change   status: ok
  adr-validate        last: 4d ago   schedule: weekly      status: ok
  feature-tracker-sync last: 3d ago  schedule: daily       status: overdue
  sync-ids            last: 3d ago   schedule: on-change   status: ok
  claude-md           last: 2d ago   schedule: on-change   status: ok
  curate-docs         disabled

Traceability (ID Registry):
- Total documents: 22 (3 PRDs, 5 ADRs, 2 PRPs, 12 WOs)
- With IDs: 22/22 (100%)
- Linked to GitHub: 18/22 (82%)
- Orphan documents: 4 (PRD-002, ADR-0004, PRP-001, WO-008)
- Orphan issues: 2 (#23, #45)
- Broken links: 0

Structure:
✅ docs/blueprint/manifest.json
✅ docs/prds/
✅ docs/adrs/
✅ docs/prps/
✅ docs/blueprint/work-orders/
✅ docs/blueprint/feature-tracker.json
✅ .claude/rules/
✅ CLAUDE.md

Modified content detected: 1 file
   Run `/blueprint:sync` to review or `/blueprint:promote testing-strategies` to preserve.

Blueprint is up to date.

评论

支持 Markdown