一键导入
dld-decide
Record a single development decision as a markdown file with YAML frontmatter. Collects context, rationale, and code references interactively.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Record a single development decision as a markdown file with YAML frontmatter. Collects context, rationale, and code references interactively.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement one or more proposed decisions. Makes code changes, adds `@decision` annotations, and updates decision status.
Implement one or more proposed decisions. Makes code changes, adds `@decision` annotations, and updates decision status.
Resolve decision ID collisions between a local branch and the base branch (and open PRs) before rebasing. Renames colliding local decisions with git mv, rewrites cross-references and annotations, then squashes branch commits into a single rebase-clean reindex commit.
Shared utility scripts for DLD skills. Not intended for direct invocation — used internally by other DLD skills.
Resolve decision ID collisions between a local branch and the base branch (and open PRs) before rebasing. Renames colliding local decisions with git mv, rewrites cross-references and annotations, then squashes branch commits into a single rebase-clean reindex commit.
Autonomous audit — detects drift, fixes issues, and opens a PR. Designed for scheduled/CI execution without human interaction.
| name | dld-decide |
| description | Record a single development decision as a markdown file with YAML frontmatter. Collects context, rationale, and code references interactively. |
| user_invocable | true |
You are helping the developer record a development decision. This should be a focused, low-ceremony conversation — not an interrogation.
Use the AskUserQuestion tool for all questions and prompts. This provides a structured input experience for the user rather than waiting for freeform replies.
Shared scripts:
.claude/skills/dld-common/scripts/next-id.sh
.claude/skills/dld-common/scripts/regenerate-index.sh
.claude/skills/dld-common/scripts/update-status.sh
Skill-specific scripts:
.claude/skills/dld-decide/scripts/create-decision.sh
Check that dld.config.yaml exists at the repo root. If not, tell the user to run /dld-init first and stop.
dld.config.yaml to understand the project structure (flat vs namespaced, decisions directory, namespaces list)decisions/PRACTICES.md if it exists — be aware of project conventions when helping structure the decisiondecisions/records/<namespace>/PRACTICES.md if it exists for the relevant namespaceIf the user provided context with the skill invocation, use it. Otherwise ask:
What decision are you recording? Tell me what you decided, why, and what code it affects.
Listen for:
Only ask follow-up questions if the rationale or scope is genuinely unclear. Maximum 3-5 questions total. Don't interrogate — if the developer gave enough context, move on.
Good reasons to ask:
Scan existing decision files for potential relationships:
If you find related decisions, mention them and ask whether this decision supersedes (fully replaces) or amends (partially modifies) any of them. A superseded decision gets marked as superseded and is no longer active. An amended decision stays accepted — the amendment changes part of its scope while the rest remains in effect.
If the project is namespaced, determine which namespace this decision belongs to. Infer from the code references if possible, otherwise ask.
Run the next-id script:
bash .claude/skills/dld-common/scripts/next-id.sh
This outputs the next available ID (e.g., DL-004).
Compose the markdown body with the relevant sections (Context, Decision, Rationale, Consequences). Omit sections that aren't relevant, but always include Context and Decision.
Then run the create-decision script, piping the body via printf with \n for newlines (do not use literal newlines in the body argument — use \n escape sequences so the entire command stays on one logical line):
printf "## Context\n\nWhat prompted this decision.\n\n## Decision\n\nWhat was decided.\n\n## Rationale\n\nWhy this choice.\n\n## Consequences\n\nWhat becomes easier or harder." | bash .claude/skills/dld-decide/scripts/create-decision.sh \
--id "DL-NNN" \
--title "Short descriptive title" \
--namespace "billing" \
--tags "tag1, tag2" \
--supersedes "DL-003, DL-007" \
--amends "DL-005" \
--body-stdin
Flags --namespace, --tags, --supersedes, --amends are optional. The script creates the file with YAML frontmatter and the body content, and outputs the file path.
Note: If the body contains literal
%characters, escape them as%%(printf format string requirement).
If this decision supersedes others, also update their status:
bash .claude/skills/dld-common/scripts/update-status.sh DL-003 superseded
Do not update the status of amended decisions — they stay accepted.
bash .claude/skills/dld-common/scripts/regenerate-index.sh
Decision DL-NNN recorded as
proposed.Next steps:
/dld-adjust— refine the decision before implementing/dld-implement DL-NNN— implement this decision/dld-decide— record another decision