secondbrain-adr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate Architecture Decision Record
创建架构决策记录
Create numbered ADRs with category-based organization and status workflow.
创建带有分类组织和状态工作流的编号ADR。
Prerequisites
前提条件
Verify ADR entity is enabled in the secondbrain project:
- Check for
.claude/data/adrs/records.yaml - If not found, suggest running with ADRs enabled
secondbrain-init
验证secondbrain项目中是否启用了ADR实体:
- 检查是否存在
.claude/data/adrs/records.yaml - 若未找到,建议运行启用ADRs的 命令
secondbrain-init
Workflow
工作流
Step 1: Gather Information
步骤1:收集信息
Collect from user or conversation context:
-
Category (determines number range):
- (0001-0999) — Architecture & infrastructure
infrastructure - (2000-2999) — Feature implementation
feature - (3000-3999) — Process & workflow
process
-
Title — Brief decision title (will be slugified for filename)
-
Context — What problem prompted this decision?
从用户或对话上下文收集以下信息:
-
分类(决定编号范围):
- (0001-0999)—— 架构与基础设施
infrastructure - (2000-2999)—— 功能实现
feature - (3000-3999)—— 流程与工作流
process
-
标题 —— 简短的决策标题(将被转换为slug格式作为文件名的一部分)
-
背景 —— 是什么问题促使做出此决策?
Step 2: Determine ADR Number
步骤2:确定ADR编号
- Load
.claude/data/adrs/records.yaml - Find highest number in selected category range
- Increment to get next number
- Format: (zero-padded)
ADR-XXXX
Number Ranges:
infrastructure: 0001 - 0999
feature: 2000 - 2999
process: 3000 - 3999- 加载 文件
.claude/data/adrs/records.yaml - 找到所选分类范围内的最高编号
- 递增得到下一个编号
- 格式:(补零至四位)
ADR-XXXX
编号范围:
infrastructure: 0001 - 0999
feature: 2000 - 2999
process: 3000 - 3999Step 3: Generate ADR Document
步骤3:生成ADR文档
Use template from :
${CLAUDE_PLUGIN_ROOT}/templates/entities/adr/TEMPLATE.mdFilename:
docs/adrs/ADR-XXXX-<title-slug>.mdFrontmatter:
yaml
---
id: ADR-XXXX
status: draft
date_created: YYYY-MM-DD
date_updated: YYYY-MM-DD
author: <author>
category: <category>
---使用 中的模板:
${CLAUDE_PLUGIN_ROOT}/templates/entities/adr/TEMPLATE.md文件名:
docs/adrs/ADR-XXXX-<title-slug>.md前端元数据:
yaml
---
id: ADR-XXXX
status: draft
date_created: YYYY-MM-DD
date_updated: YYYY-MM-DD
author: <author>
category: <category>
---Step 4: Update Records
步骤4:更新记录
Add entry to :
.claude/data/adrs/records.yamlyaml
- number: XXXX
title: "<title>"
status: draft
category: <category>
created: YYYY-MM-DD
file: docs/adrs/ADR-XXXX-<slug>.md
author: <author>Update if this is the new highest.
last_number向 添加条目:
.claude/data/adrs/records.yamlyaml
- number: XXXX
title: "<title>"
status: draft
category: <category>
created: YYYY-MM-DD
file: docs/adrs/ADR-XXXX-<slug>.md
author: <author>如果此编号是新的最高编号,更新 字段。
last_numberStep 5: Sidebar Note
步骤5:侧边栏注意事项
DO NOT manually add ADRs to VitePress sidebar.
ADRs are automatically listed via the component on , which reads from . No sidebar modification needed.
EntityTabledocs/adrs/index.md.claude/data/adrs/records.yaml请勿手动将ADRs添加到VitePress侧边栏。
ADRs会通过 中的 组件自动列出,该组件会读取 的内容,无需修改侧边栏。
docs/adrs/index.mdEntityTable.claude/data/adrs/records.yamlStep 6: Confirm Creation
步骤6:确认创建
undefinedundefinedADR Created
ADR已创建
ID: ADR-0012
Title: Kubernetes Migration Strategy
Category: infrastructure
Status: draft
File: docs/adrs/ADR-0012-kubernetes-migration-strategy.md
ID: ADR-0012
标题: Kubernetes迁移策略
分类: infrastructure
状态: draft
文件: docs/adrs/ADR-0012-kubernetes-migration-strategy.md
Next Steps
后续步骤
- Edit the ADR to add context, options, and decision
- Change status to 'proposed' when ready for review
- Use /secondbrain-adr-status to update status
- 编辑ADR以添加背景、可选方案和决策内容
- 准备好审核后将状态更改为'proposed'
- 使用 /secondbrain-adr-status 命令更新状态
Status Workflow
状态工作流
draft → proposed → admitted → applied → implemented → tested
undefineddraft → proposed → admitted → applied → implemented → tested
undefinedStatus Workflow
状态工作流
Draft → Proposed → Admitted → Applied → Implemented → Tested
↘ Rejected
↘ Canceled| Status | Description |
|---|---|
| draft | Initial creation, under development |
| proposed | Ready for review |
| admitted | Approved, pending implementation |
| applied | Implementation started |
| implemented | Implementation complete |
| tested | Verified in production |
| rejected | Not approved |
| canceled | Abandoned |
Draft → Proposed → Admitted → Applied → Implemented → Tested
↘ Rejected
↘ Canceled| 状态 | 描述 |
|---|---|
| draft | 初始创建,正在开发中 |
| proposed | 准备好审核 |
| admitted | 已批准,待实施 |
| applied | 已开始实施 |
| implemented | 实施完成 |
| tested | 已在生产环境中验证 |
| rejected | 未获批准 |
| canceled | 已废弃 |
Additional Resources
其他资源
- — Full ADR template
references/adr-template.md
- —— 完整的ADR模板
references/adr-template.md