Files
msd-core/docs/zh-CN/references/decimal-phase-calculation.md
lone 1155c7564e docs: add Chinese (zh-CN) documentation
- Add language switch link to root README
- Translate README.md to docs/zh-CN/README.md
- Translate USER-GUIDE.md to docs/zh-CN/USER-GUIDE.md
- Translate all 13 reference documents to docs/zh-CN/references/

Key terminology mappings:
- context engineering → 上下文工程
- spec-driven development → 规格驱动开发
- context rot → 上下文衰减
- phase → 阶段
- milestone → 里程碑
- roadmap → 路线图

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 10:13:55 +08:00

1.3 KiB

小数阶段计算

为紧急插入计算下一个小数阶段编号。

使用 gsd-tools

# 获取阶段 6 之后的下一个小数阶段
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal 6

输出:

{
  "found": true,
  "base_phase": "06",
  "next": "06.1",
  "existing": []
}

已有小数时:

{
  "found": true,
  "base_phase": "06",
  "next": "06.3",
  "existing": ["06.1", "06.2"]
}

提取值

DECIMAL_INFO=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}")
DECIMAL_PHASE=$(printf '%s\n' "$DECIMAL_INFO" | jq -r '.next')
BASE_PHASE=$(printf '%s\n' "$DECIMAL_INFO" | jq -r '.base_phase')

或使用 --raw 标志:

DECIMAL_PHASE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --raw)
# 返回: 06.1

示例

已有阶段 下一个阶段
仅 06 06.1
06, 06.1 06.2
06, 06.1, 06.2 06.3
06, 06.1, 06.3(有空缺) 06.4

目录命名

小数阶段目录使用完整的小数编号:

SLUG=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" generate-slug "$DESCRIPTION" --raw)
PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
mkdir -p "$PHASE_DIR"

示例:.planning/phases/06.1-fix-critical-auth-bug/