From cx
CX 工作流 — 架构决策记录。当用户提到"架构决策"、"技术选型"、 "ADR"、"为什么选择 X"、"架构方案对比"时可能触发(通常由 cx-design 自动调用)。 仅在 L 规模或重大架构取舍出现时记录,保存到本地 开发文档/CX工作流/功能/{feature_title}/架构决策.md。
How this skill is triggered — by the user, by Claude, or both
Slash command
/cx:cx-adrThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
为少数高影响设计决策留一份短而清楚的取舍记录。
为少数高影响设计决策留一份短而清楚的取舍记录。
/cx:cx-adr {决策标题}
/cx:cx-adr
以下情况才建议写 ADR:
普通实现细节不要滥用 ADR。 Claude Code 侧写 ADR 时仍然只是在共享 core 上补充文档,不改变其他 runner 的 lease。 允许在用户明确确认需要 ADR 后,由工作流自动衔接到本 skill。
PROJECT_ROOT=$(git rev-parse --show-toplevel)
CX_DIR="$PROJECT_ROOT/开发文档/CX工作流"
FEATURE_TITLE="{功能标题}"
FEATURE_DIR="$CX_DIR/功能/$FEATURE_TITLE"
ADR_FILE="$FEATURE_DIR/架构决策.md"
默认关联同目录下已有文档:
需求.md设计.mdADR 只保留这些核心内容:
在 feature 的 状态.json 中补上:
{
"docs": {
"prd": "需求.md",
"design": "设计.md",
"adr": "架构决策.md"
}
}
如果没有明确架构决策,不要为了流程完整而硬写一份 ADR。
npx claudepluginhub m19803261706/cx-workflow --plugin cxCaptures architecture decisions as structured ADR files during coding sessions. Detects decision moments, logs context, alternatives, and rationale alongside code in docs/adr/.
Records architectural decisions in DECISIONS.md via Y-statement or full format with context, alternatives, rationale, and consequences. Use after resolving trade-offs or non-obvious choices to inform future sessions.
Writes Architecture Decision Records (ADRs) documenting decisions, rationale, alternatives, and trade-offs from codebases or conversations. Triggers on 'write an ADR' or 'document decision'.