Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

blueprint-derive-adr蓝图导出 ADR

Agent Skill

blueprint-derive-adr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,273

周安装

52

GitHub Stars

28

下载量

412
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:blueprint-derive-adr(蓝图导出 ADR)
来源仓库:https://github.com/laurigates/claude-plugins
仓库路径:skills/blueprint-derive-adr
安装命令:
npx skills add https://github.com/laurigates/claude-plugins --skill blueprint-derive-adr
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill blueprint-derive-adr

简介

blueprint-derive-adr 用于通过分析代码结构和文档自动生成架构决策记录(ADR)。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。
  • 基于现有项目信息推导隐式架构决策,支持新项目的蓝图初始化。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Generate Architecture Decision Records (ADRs) for an existing project by analyzing code structure, dependencies, and documentation.

Use Case: Onboarding existing projects to Blueprint Development system, documenting implicit architecture decisions.

Prerequisites:

  • Blueprint Development initialized (docs/blueprint/ exists)
  • Ideally PRD exists (run /blueprint:derive-prd first)

Steps:

Phase 1: Discovery

1.1 Check Prerequisites

ls docs/blueprint/manifest.json
ls docs/prds/

If blueprint not initialized → suggest /blueprint:init If no PRD → suggest /blueprint:derive-prd first (recommended, not required)

1.2 Create ADR Directory

mkdir -p docs/adrs

1.3 Analyze Project Structure

Explore the codebase to identify architectural patterns:

Use Explore agent:

<Task subagent_type="Explore" prompt="Analyze project architecture: directory structure, major components, frameworks used, design patterns">

Key areas to examine:

  • Directory structure: How code is organized
  • Entry points: Main files, index files
  • Configuration: Config files, environment handling
  • Dependencies: Package manifests, imports
  • Data layer: Database, ORM, data models
  • API layer: Routes, controllers, handlers
  • Testing: Test structure and frameworks

Phase 1.5: Conflict Analysis

Before generating new ADRs, check for existing decisions that may conflict or relate.

1.5.1 Check for Existing ADRs

ls docs/adrs/*.md 2>/dev/null | wc -l

If ADRs exist, analyze for potential conflicts with decisions about to be documented.

1.5.2 Determine Domain for New ADR

Map decision categories to domains:

Decision CategoryDomain Tag
State Managementstate-management
Database/ORMdata-layer
Framework Choicefrontend-framework
API Designapi-design
Authenticationauthentication
Testing Strategytesting
Styling Approachstyling
Build Toolingbuild-tooling
Deploymentdeployment

1.5.3 Scan Existing ADRs in Same Domain

For each domain being documented:

grep -l "^domain: {domain}" docs/adrs/*.md

For each matching ADR with status: Accepted:

  • Extract ADR number and title
  • Extract decision outcome (chosen option)
  • Calculate conflict score:

- Same domain: +0.3 - Both Accepted: +0.2 - Opposite/different outcomes: +0.4 - Age > 6 months: +0.1

1.5.4 Surface Potential Conflicts

If conflict score >= 0.7, prompt user:

question: "Found existing ADR in same domain: ADR-{XXXX} - {title}. How should the new decision relate?"
options:
  - label: "Supersede ADR-{XXXX}"
    description: "New ADR replaces the existing decision"
  - label: "Extend ADR-{XXXX}"
    description: "New ADR builds on the existing decision"
  - label: "Mark as related"
    description: "Decisions are connected but independent"
  - label: "No relationship"
    description: "Continue without linking"

Store the relationship choice for inclusion in the generated ADR frontmatter.

1.5.5 Handle Multiple Conflicts

If multiple potential conflicts in same domain:

  • Present each for user decision
  • Allow bulk "supersede all" option for replacing multiple outdated decisions

Phase 2: Identify Architecture Decisions

2.1 Common Decision Categories

CategoryWhat to Look ForExample Decisions
Frameworkpackage.json, importsReact vs Vue, Express vs Fastify
LanguageFile extensions, tsconfigTypeScript vs JavaScript
State ManagementStore patterns, contextRedux vs Zustand vs Context
StylingCSS files, styled importsTailwind vs CSS-in-JS vs SCSS
TestingTest files, test configVitest vs Jest, Playwright vs Cypress
BuildBuild config, bundlersVite vs Webpack, esbuild
DatabaseORM config, migrationsPostgreSQL vs MongoDB, Prisma vs Drizzle
API StyleRoute patterns, schemasREST vs GraphQL, tRPC
DeploymentDocker, CI configContainer vs serverless
MonorepoWorkspace configTurborepo vs Nx vs none

2.2 Infer Decisions from Code

For each identified technology choice:

  1. Note the current implementation
  2. Consider common alternatives
  3. Infer rationale from context/comments

2.3 Confirm with User

Use AskUserQuestion for key decisions:

question: "I found the project uses {technology}. Why was this chosen over alternatives?"
options:
  - "Performance requirements" → document performance rationale
  - "Team familiarity" → document team expertise factor
  - "Ecosystem/community" → document ecosystem benefits
  - "Specific feature needs" → ask for details
  - "Legacy/inherited decision" → document as inherited
  - "Other" → custom rationale
question: "Are there any architecture decisions you'd like to document that aren't visible in the code?"
options:
  - "Yes, let me describe" → capture additional decisions
  - "No, the inferred decisions are sufficient" → proceed

Phase 3: ADR Generation

3.1 ADR Template (MADR format)

For each significant decision, create an ADR:

---
id: ADR-{NNNN}                          # Derived from filename (0003-*.md → ADR-0003)
date: {YYYY-MM-DD}
status: Accepted | Superseded | Deprecated | Proposed
deciders: {who made the decision}
domain: {domain-tag}                    # Optional: state-management, data-layer, etc.
supersedes: ADR-{XXXX}                  # Optional: if superseding another ADR
extends: ADR-{XXXX}                     # Optional: if extending another ADR
relates-to:                             # Cross-document references
  - PRD-{NNN}                           # Related PRDs
  - ADR-{YYYY}                          # Related ADRs
github-issues: []                       # Linked GitHub issues
name: blueprint-derive-adr
---

# ADR-{number}: {Title}

## Context

{Describe the issue motivating this decision}
{What is the problem we're trying to solve?}
{What constraints exist?}

## Decision Drivers

- {driver 1, e.g., "Performance under high load"}
- {driver 2, e.g., "Developer experience"}
- {driver 3, e.g., "Maintainability"}

## Considered Options

1. **{Option 1}** - {brief description}
2. **{Option 2}** - {brief description}
3. **{Option 3}** - {brief description}

## Decision Outcome

**Chosen option**: "{Option X}" because {justification}.

### Positive Consequences

- {positive outcome 1}
- {positive outcome 2}

### Negative Consequences

- {negative outcome / tradeoff 1}
- {negative outcome / tradeoff 2}

## Pros and Cons of Options

### {Option 1}

- ✅ {pro 1}
- ✅ {pro 2}
- ❌ {con 1}

### {Option 2}

- ✅ {pro 1}
- ❌ {con 1}
- ❌ {con 2}

## Links

- {Related ADRs}
- {External documentation}
- {Discussion threads}

---
*Generated from project analysis via /blueprint:derive-adr*

3.2 Standard ADRs to Generate

Generate ADRs for these common decisions (if applicable):

ADRWhen to Create
0001-project-language.mdLanguage/runtime choice
0002-framework-choice.mdMain framework selection
0003-testing-strategy.mdTest framework and approach
0004-styling-approach.mdCSS/styling methodology
0005-state-management.mdState handling (if applicable)
0006-database-choice.mdDatabase and ORM (if applicable)
0007-api-design.mdAPI style and patterns
0008-deployment-strategy.mdDeployment approach

3.3 Create ADR README

Write the ADR README template to docs/adrs/README.md using the template from blueprint-plugin/templates/adr-readme.md.

The README is self-documenting: it includes a programmatic fd + awk command that generates the ADR index on demand, eliminating static tables that drift out of sync.

Customizations when writing:

  • If undocumented decisions were identified during Phase 2 analysis that the user chose not to create full ADRs for, add them to the Proposed ADRs section: ## Proposed ADRs Decisions identified but not yet documented as full ADRs: - [] {Decision topic} — {brief context} (identified {YYYY-MM-DD}) - [] {Decision topic} — {brief context} (identified {YYYY-MM-DD})
  • Keep the programmatic listing command intact — it replaces the need for a static index

Phase 4: Relationship Updates & Validation

4.0 Update Superseded ADRs (Bidirectional Consistency)

If any new ADR supersedes an existing ADR:

  1. Read the superseded ADR file
  2. Update its frontmatter:

- Change status: Accepted to status: Superseded - Add superseded_by: ADR-{new_number}

  1. Update the Links section (add if missing): ## Links - Superseded by [ADR-{number}](./{filename}.md)
  2. Report the update: Updated ADR-{old_number}: - Status: Accepted → Superseded - Added: superseded_by: ADR-{new_number} - Updated Links section

Example: If ADR-0012 supersedes ADR-0003:

  • In ADR-0012: supersedes: ADR-0003
  • In ADR-0003:

- status: Superseded - superseded_by: ADR-0012 - Links section references ADR-0012

4.1 Update Manifest

Update docs/blueprint/manifest.json ID registry for each ADR:

{
  "id_registry": {
    "documents": {
      "ADR-0003": {
        "path": "docs/adrs/0003-database-choice.md",
        "title": "Database Choice",
        "status": "Accepted",
        "domain": "data-layer",
        "relates_to": ["PRD-001"],
        "github_issues": [],
        "created": "{date}"
      }
    }
  }
}

4.2 Present Summary

✅ ADRs Generated: {count} records

**Location**: `docs/adrs/`

**Decisions documented**:
- ADR-0001: {title} - {status} [{domain}]
- ADR-0002: {title} - {status} [{domain}]
...

**Relationships established**:
- ADR-{new} supersedes ADR-{old} (status updated)
- ADR-{new} extends ADR-{existing}
- ADR-{new} related to ADR-{other}

**ADRs updated** (bidirectional consistency):
- ADR-{old}: status → Superseded, superseded_by → ADR-{new}

**Sources analyzed**:
- {list of analyzed files/patterns}

**Confidence levels**:
- High confidence: {list - clear from code}
- Inferred: {list - reasonable assumptions}
- Needs review: {list - uncertain}

**Recommended next steps**:
1. Review generated ADRs for accuracy
2. Add rationale where marked as "inferred"
3. Run `/blueprint:derive-adr-validate` to check relationship consistency
4. Run `/blueprint:prp-create` for feature implementation
5. Run `/blueprint:generate-skills` for project skills

4.2 Suggest Next Steps

  • If PRD missing → suggest /blueprint:derive-prd
  • If ready for implementation → suggest /blueprint:prp-create
  • If architecture evolving → explain how to add new ADRs

Phase 5: Update Manifest

Update docs/blueprint/manifest.json:

  • Add has_adrs: true to structure
  • Add ADRs to generated_artifacts
  • Update updated_at timestamp

Tips:

  • Focus on decisions with real alternatives (not obvious choices)
  • Document inherited/legacy decisions as such
  • Mark uncertain rationales for user review
  • Keep ADRs concise - focus on "why", not implementation details
  • Reference related ADRs when decisions are connected

4.3 Prompt for next action (use AskUserQuestion):

question: "ADRs generated. What would you like to do next?"
options:
  - label: "Create a PRP for feature work (Recommended)"
    description: "Start implementing a specific feature with /blueprint:prp-create"
  - label: "Generate project skills"
    description: "Create skills from PRDs for Claude context"
  - label: "Review and add rationale"
    description: "Edit ADRs marked as 'inferred' or 'needs rationale'"
  - label: "Document another architecture decision"
    description: "Manually add a new ADR"
  - label: "I'm done for now"
    description: "Exit - ADRs are saved"

Based on selection:

  • "Create a PRP" → Run /blueprint:prp-create (ask for feature name)
  • "Generate project skills" → Run /blueprint:generate-skills
  • "Review and add rationale" → Show ADR files needing attention
  • "Document another decision" → Restart Phase 2 for a specific decision
  • "I'm done" → Exit

Error Handling:

  • If minimal codebase → create fewer, broader ADRs
  • If conflicting patterns → ask user which is intentional
  • If rationale unclear → mark as "needs rationale" for user input

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.84%
按下载量换算148

Claude

27.21%
按下载量换算112

Cursor

19.02%
按下载量换算78

Gemini CLI

9.49%
按下载量换算39

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills