From cx
CX 工作流 — 技术设计与执行契约。当用户提到"技术设计"、"Design Doc"、 "API 设计"、"接口设计"、"架构设计"、"系统设计"时触发。 读取 PRD 生成设计文档,保存到本地 开发文档/CX工作流/功能/{feature_title}/设计.md。 该步骤只服务中大 feature 的执行契约,不强加给所有小功能。
How this skill is triggered — by the user, by Claude, or both
Slash command
/cx:cx-designThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
把中大 feature 的关键决策、接口契约和测试重点先锁住,再进入任务规划。
把中大 feature 的关键决策、接口契约和测试重点先锁住,再进入任务规划。
先阅读:
${CLAUDE_PLUGIN_ROOT}/core/workflow/README.md${CLAUDE_PLUGIN_ROOT}/core/workflow/protocols/design.md所有文件读写必须使用绝对路径。 禁止使用 ../ 相对路径。先用 git rev-parse --show-toplevel 获取绝对路径。
执行前检测:
check_output=$(bash ${CLAUDE_PLUGIN_ROOT}/scripts/cx-worktree.sh check \
--feature "{feature-slug}" \
--project-root "$(git rev-parse --show-toplevel)" 2>&1) || true
如果返回 on_main=true:
/cx:cx-prd 创建 worktree,或手动进入已有 worktreeAskUserQuestion 列出可用 worktree 供选择/cx:cx-design {功能名}
/cx:cx-design
cc adapter,不能绕过租约直接覆盖其他 runner 的 featurePROJECT_ROOT=$(git rev-parse --show-toplevel)
CX_DOCS_DIR="$PROJECT_ROOT/开发文档/CX工作流"
FEATURE_TITLE="{功能标题}"
FEATURE_SLUG="{feature-slug}"
FEATURE_DIR="$CX_DIR/功能/$FEATURE_TITLE"
PRD_FILE="$FEATURE_DIR/需求.md"
DESIGN_FILE="$FEATURE_DIR/设计.md"
内部关联始终使用 slug,目录展示使用中文标题。
需求.md设计文档最少包含这些章节:
对这些高风险内容给用户做确认:
普通实现细节不需要频繁打断。
优先调用共享 runner:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/cx-workflow-design.sh \
--feature <feature-slug> \
--runner cc \
--session-id <session-id>
写入:
开发文档/CX工作流/功能/{功能标题}/设计.md
同时把 feature 状态推进到可规划阶段,例如:
{
"slug": "feature-slug",
"status": "planned",
"docs": {
"prd": "需求.md",
"design": "设计.md"
}
}
只有在这些情况出现时,才建议进入 /cx:cx-adr:
npx claudepluginhub m19803261706/cx-workflow --plugin cxExecutes an implementation planning workflow: sets up design artifacts, loads context, reads architecture docs, and produces structured design outputs before coding begins.
Generates technical design documents including API design, database schema, and implementation details from PRDs, user stories, or tech research reports. Activates when user requests architecture or design docs.
Generates architecture/design documents from approved SRS docs when no prior design exists, proposing 2-3 approaches with trade-offs and securing section-by-section approval.