/omni-dsdd:analyzefrom omni-dsdd
Analyzes and auto-fixes inconsistencies across spec.md, design.md, and tasks.md files. Runs autonomously without user prompts, printing remaining issues on completion.
Ships in omni-dsdd. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
在三份制品齐备后, 识别 ${FEATURE_DIR} 下核心制品(spec.md、design.md、tasks.md)之间的不一致、重复、模糊和规范不足,并自动修复可消除项。前置条件:三份制品均已落盘。
在继续之前,必须考虑用户的消息内容(若不为空)。
| 变量 | 含义 |
|---|---|
CLAUDE_PLUGIN_ROOT | Omni 插件安装根目录 |
CLAUDE_WORKING_DIR | 用户工作区目录 |
FEATURE_DIR | 特性目录(绝对路径,应在 ${CLAUDE_WORKING_DIR}/changes/... 下) |
| 制品 | 路径 |
|---|---|
| 规范 | ${FEATURE_DIR}/spec.md |
| 设计 | ${IMPL_DESIGN} 或 ${FEATURE_DIR}/design.md |
| 任务 | ${TASKS} 或 ${FEATURE_DIR}/tasks.md |
| 章程 | ${CLAUDE_WORKING_DIR}/.omni-infra/memory/constitution.md |
| 环境文件 | ${FEATURE_DIR}/.runs/env.sh |
test -n "${CLAUDE_PLUGIN_ROOT:-}" && test -d "${CLAUDE_PLUGIN_ROOT}"
test -n "${CLAUDE_WORKING_DIR:-}" && test -d "${CLAUDE_WORKING_DIR}"
两项均通过且已 source 过 env.sh、FEATURE_DIR 非空 → 进入步骤 1。否则执行 Step 0.2。
CLAUDE_PLUGIN_ROOT
${路径}/skills/analyze/SKILL.md 存在):
${CLAUDE_WORKING_DIR} 或其上级查找含 .claude-plugin/plugin.json 的目录;export CLAUDE_PLUGIN_ROOT="<绝对路径>"CLAUDE_WORKING_DIR
export CLAUDE_WORKING_DIR="$(pwd)"(不用 git rev-parse --show-toplevel)test -f "${CLAUDE_PLUGIN_ROOT}/scripts/bash/check-prerequisites.sh"
test -f "${CLAUDE_PLUGIN_ROOT}/skills/design/scripts/bash/design-resolve-context.sh"
test -d "${CLAUDE_WORKING_DIR}"
${CLAUDE_PLUGIN_ROOT}/scripts/bash/...CLAUDE_WORKING_DIR 下执行FEATURE_DIR;须以 env.sh / paths.json / design-resolve-context.sh 为准${FEATURE_DIR} 下 spec.md、design.md、tasks.md(及修复所必需的最小范围)。章程权威:${CLAUDE_WORKING_DIR}/.omni-infra/memory/constitution.md 中 MUST 原则不可协商;冲突须通过编辑制品消除。
完成下列步骤 0–6 后 必须执行步骤 7, 不得在 analyze 执行期间停下来等待用户输入.
开始执行步骤之前,需要进行一些打点记录工作,记录本skill的执行时间到 start_time字段:
Get-Date -Format "yyyy-MM-dd HH:mm:ss"
linux: date +"%Y-%m-%d %H:%M:%S"start_time与 tasks / design 一致:禁止用当前 Git 分支推断 FEATURE_DIR。
解析顺序:
FEATURE_DIR(若有)design-resolve-context(读 specify 链路的 paths.json / .active-feature / env.sh):eval "$(bash "${CLAUDE_PLUGIN_ROOT}/skills/design/scripts/bash/design-resolve-context.sh" \
--plugin-root "${CLAUDE_PLUGIN_ROOT}" \
--working-dir "${CLAUDE_WORKING_DIR}" \
${FEATURE_DIR:+--feature-dir "$FEATURE_DIR"} \
--export)"
source "${FEATURE_DIR}/.runs/env.sh"
env.sh 未含 IMPL_DESIGN/TASKS,读取 ${FEATURE_DIR}/.runs/paths.json 的 design_file、tasks_file、spec_filecheck-prerequisites --require-tasks --include-tasks(仅校验 AVAILABLE_DOCS 与制品存在性;FEATURE_DIR 已由上游确定,不得以 Git 分支覆盖):
pwsh "${CLAUDE_PLUGIN_ROOT}/scripts/powershell/check-prerequisites.ps1" --json --require-tasks --include-tasks --working-dir "${CLAUDE_WORKING_DIR}" --plugin-root "${CLAUDE_PLUGIN_ROOT}"bash "${CLAUDE_PLUGIN_ROOT}/scripts/bash/check-prerequisites.sh" --json --require-tasks --include-tasks --working-dir "${CLAUDE_WORKING_DIR}" --plugin-root "${CLAUDE_PLUGIN_ROOT}"路径赋值(source env.sh 后优先用环境变量):
${FEATURE_SPEC} 或 ${FEATURE_DIR}/spec.md${IMPL_DESIGN} 或 ${FEATURE_DIR}/design.md${TASKS} 或 ${FEATURE_DIR}/tasks.md强制校验:
FEATURE_DIR 位于 ${CLAUDE_WORKING_DIR}/changes/ 下spec.md、design.md、tasks.md 均存在;缺失则中止并提示补跑上游 specify/design/tasksanalyze 继承上游: FEATURE_DIR=..., source=specify-chain对于参数中的单引号, 如 "I'm Groot", 使用转义语法: 例如 'I'''m Groot'(或尽可能使用双引号: "I'm Groot").
仅从每个制品加载最小必需的上下文:
从 ${FEATURE_DIR}/spec.md:
从 design(${IMPL_DESIGN} 或 ${FEATURE_DIR}/design.md):
从 ${FEATURE_DIR}/tasks.md:
从章程:
${CLAUDE_WORKING_DIR}/.omni-infra/memory/constitution.md 进行原则验证创建内部表示(输出中不包含原始制品):
user-can-upload-file)专注于高信号发现. 限制总共 50 个发现; 在溢出摘要中聚合其余部分.
<placeholder> 等)使用此启发式方法对发现进行优先级排序:
每轮检测输出 Markdown 分析报告(不单独写入报告文件; 自动修复时对制品的编辑照常写入对应 spec.md / design.md / tasks.md), 结构如下:
| ID | 类别 | 严重性 | 位置 | 摘要 | 建议 |
|---|---|---|---|---|---|
| A1 | 重复 | 高 | spec.md:L120-134 | 两个相似需求... | 合并表述; 保留更清晰的版本 |
(每个发现添加一行; 生成以类别首字母为前缀的稳定 ID.)
覆盖摘要表:
| 需求键 | 有任务? | 任务 ID | 备注 |
|---|
章程对齐问题:(如果有)
未映射任务:(如果有)
指标:
${FEATURE_DIR} 下三制品及修复所必需的最小范围).本步骤仅将
analyze写入状态机并跑pre-implementgate。
${FEATURE_DIR}/.runs/env.sh:source "${FEATURE_DIR}/.runs/env.sh"bash "${CLAUDE_PLUGIN_ROOT}/scripts/bash/workflow-post-analyze.sh" \
--feature-dir "${FEATURE_DIR}"
workflow-post-analyze.sh 退出码 0 即本技能正常结束。omni-dsdd:runlog-record skill,将前面获取到的 start_time 作为参数传入(如 /omni-dsdd:runlog-record "2026-05-15 10:30:00")| 项 | 路径 |
|---|---|
| 前置检查(bash) | ${CLAUDE_PLUGIN_ROOT}/scripts/bash/check-prerequisites.sh |
| 前置检查(pwsh) | ${CLAUDE_PLUGIN_ROOT}/scripts/powershell/check-prerequisites.ps1 |
| analyze 收尾 | ${CLAUDE_PLUGIN_ROOT}/scripts/bash/workflow-post-analyze.sh |
| 未完成检测 | ${CLAUDE_PLUGIN_ROOT}/scripts/bash/workflow-check-incomplete.sh |
| workflow 门禁 | ${CLAUDE_PLUGIN_ROOT}/scripts/bash/workflow-gate.sh |
| 本技能 | ${CLAUDE_PLUGIN_ROOT}/skills/analyze/SKILL.md |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub zte-aicloud/co-omnispec --plugin omni-dsdd63 skills in this plugin
/archive将变更指示文件中的需求/设计/接口变更回流到 DOC_DIR/specs 下的要素文档. 当需要从 feature 变更目录同步更新到 DOC_DIR/specs 下的需求、场景、实体、功能和接口文档及其清单与关联关系时使用/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./brainstorming-sdd-bridgeExpert workflow adapter that converts an approved brainstorming *-design.md into the standard SDD document interface consumed by tasks/implement/review/local-sandbox-fix. Use only after expert brainstorming and before tasks.Other plugins' skills for the same job