Files
msd-core/docs/zh-CN/references/continuation-format.md
Tom Boucher 1e6737cd8e feat(plan-phase): --research-phase flag + scrub stale slash-command refs (#3042, #3044) (#3045)
* feat(plan-phase): --research-phase flag absorbs deleted /gsd-research-phase + scrub stale refs (#3042, #3044)

#3042 (orphaned research-phase): /gsd-research-phase had a workflow file
but no slash-command stub. Rather than restore the orphan, the research-
only capability is now a flag on /gsd-plan-phase:

  /gsd-plan-phase --research-phase <N>

When set, the workflow scopes to phase N, runs the research step (Section
5 of the existing plan-phase workflow), then early-exits before the
planner/plan-checker/verifier chain.

Per RCA against the deleted standalone, the flag adds two modifiers to
fully cover the original surface (Option B from the RCA discussion):

- --view : print existing RESEARCH.md to stdout, no spawn. Cheapest mode
  for the correction-without-replanning loop the issue reporter
  explicitly called out. Errors with a clear hint if RESEARCH.md is
  missing.
- --research : reuse the existing "force re-research" semantics. In
  research-only mode this skips the existing-RESEARCH.md prompt and
  re-spawns unconditionally.
- Neither flag, RESEARCH.md exists : prompt update/view/skip. Mirrors
  the deleted standalone's existing-artifact menu (#3042 RCA).

#3044 (stale slash-command refs): scrubbed five deleted commands from
all user-facing surfaces, including English docs, 4 localized doc sets
(ja-JP, ko-KR, zh-CN, pt-BR), workflows, templates, and references.

  /gsd-check-todos          → /gsd-capture --list
  /gsd-new-workspace        → /gsd-workspace --new
  /gsd-status               → /gsd-progress
  /gsd-plan-milestone-gaps  → table rows / orphan sections removed
                              (PR #3038 only scrubbed workflows/agent;
                              missed the docs surfaces this PR covers)
  /gsd-research-phase       → /gsd-plan-phase --research-phase

Includes a fix to docs/issue-driven-orchestration.md (PR #3036)
which itself referenced /gsd-new-workspace 4 times — self-correction.

Removed:
- get-shit-done/workflows/research-phase.md (orphan, capability
  absorbed into --research-phase flag)

Tests:
- tests/bug-3042-3044-research-flag-and-stale-refs.test.cjs — 46
  structural-IR tests across both bugs:
  - argument-hint advertises --research-phase + --view
  - workflow parses --research-phase, sets RESEARCH_ONLY,
    early-exits before planner
  - --view prints RESEARCH.md without spawning
  - --research forces refresh in research-only mode
  - existing-RESEARCH.md prompt path with update/view/skip
  - workflows/research-phase.md is removed
  - 5 deleted slash-commands absent from 17 English user-facing
    surfaces + 16 localized doc surfaces (4 locales × 4 docs each)
  - replacement command tokens present where deleted ones lived

6950/6950 full suite pass. Lints clean.

Closes #3042
Closes #3044

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: address all 8 CR findings on PR #3045

Major (3):
- get-shit-done/workflows/plan-phase.md:344 — added explicit early-exit
  guard at Section 5.1: "Skip if RESEARCH_ONLY=true". Without it, an LLM
  could fall through "use existing, skip to step 6" → planner spawn,
  violating the research-only contract. The guard makes the early-exit
  unreachable from any non-research-only branch.
- get-shit-done/references/continuation-format.md (3 examples) +
  zh-CN/.../continuation-format.md (3 examples) — pointed to
  `/gsd-plan-phase --research-phase` but docs/COMMANDS.md didn't
  document the flag. Added a full --research-phase + --view + --research
  modifier section to the /gsd-plan-phase flag table in COMMANDS.md so
  the canonical reference matches the continuation examples.

Minor (5):
- docs/FEATURES.md:1632 — `/gsd-plan-phase --research-phase` →
  `/gsd-plan-phase --research-phase <N>` (include required arg).
- get-shit-done/templates/README.md:46 — NN-VALIDATION.md producer
  reverted from `/gsd-plan-phase --research-phase` (Nyquist) to plain
  `/gsd-plan-phase` (Nyquist). VALIDATION.md is created during normal
  Nyquist flow, not research-only mode — the bulk replacement was
  wrong for that line.
- get-shit-done/workflows/help.md:89 — signature line was missing
  `--research`; added it alongside `--research-phase` and `--view`.
- tests/bug-3042-3044-...:197 — promptHasView/promptHasSkip were
  tautological (matched anywhere in 1700-line workflow). Tightened
  to a proximity check anchored on "RESEARCH.md already exists" prompt
  header within a 600-char window. Updated workflow to emit that
  literal phrase.
- tests/feat-2840-...:95 — workspace assertion used `/gsd-workspace`
  but the documented replacement is `/gsd-workspace --new`. Tightened
  to require both tokens (in 3 places: requiredCommands list, regex
  in conceptPairs, error message).

6950/6950 full suite pass. Lint clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 23:12:50 -04:00

4.2 KiB
Raw Blame History

续接格式

完成命令或工作流后展示下一步的标准格式。

核心结构

---

## ▶ 下一步

**{标识符}: {名称}** — {单行描述}

`{可复制粘贴的命令}`

<sub>`/clear` 优先 → 全新上下文窗口</sub>

---

**也可选:**
- `{备选项 1}` — 描述
- `{备选项 2}` — 描述

---

格式规则

  1. 始终展示它是什么 — 名称 + 描述,绝不仅仅是一个命令路径
  2. 从源文件拉取上下文 — ROADMAP.md 用于阶段,PLAN.md <objective> 用于计划
  3. 命令用内联代码 — 反引号,易于复制粘贴,渲染为可点击链接
  4. /clear 说明 — 始终包含,保持简洁但解释原因
  5. 用"也可选"而非"其他选项" — 听起来更像应用
  6. 视觉分隔符 — 上下用 --- 使其突出

变体

执行下一个计划

---

## ▶ 下一步

**02-03: 刷新令牌轮换** — 添加带滑动过期的 /api/auth/refresh

`/gsd-execute-phase 2`

<sub>`/clear` 优先 → 全新上下文窗口</sub>

---

**也可选:**
- 执行前审查计划
- `/gsd-list-phase-assumptions 2` — 检查假设

---

执行阶段中最后一个计划

添加注释说明这是最后一个计划以及接下来是什么:

---

## ▶ 下一步

**02-03: 刷新令牌轮换** — 添加带滑动过期的 /api/auth/refresh
<sub>阶段 2 的最后一个计划</sub>

`/gsd-execute-phase 2`

<sub>`/clear` 优先 → 全新上下文窗口</sub>

---

**完成后:**
- 阶段 2 → 阶段 3 过渡
- 下一步:**阶段 3: 核心功能** — 用户仪表板和设置

---

规划阶段

---

## ▶ 下一步

**阶段 2: 认证** — 带刷新令牌的 JWT 登录流程

`/gsd-plan-phase 2`

<sub>`/clear` 优先 → 全新上下文窗口</sub>

---

**也可选:**
- `/gsd-discuss-phase 2` — 先收集上下文
- `/gsd-plan-phase --research-phase 2` — 调查未知项
- 审查路线图

---

阶段完成,准备下一步

在下一步操作前显示完成状态:

---

## ✓ 阶段 2 完成

3/3 计划已执行

## ▶ 下一步

**阶段 3: 核心功能** — 用户仪表板、设置和数据导出

`/gsd-plan-phase 3`

<sub>`/clear` 优先 → 全新上下文窗口</sub>

---

**也可选:**
- `/gsd-discuss-phase 3` — 先收集上下文
- `/gsd-plan-phase --research-phase 3` — 调查未知项
- 回顾阶段 2 构建的内容

---

多个同等选项

当没有明确的主要操作时:

---

## ▶ 下一步

**阶段 3: 核心功能** — 用户仪表板、设置和数据导出

**直接规划:** `/gsd-plan-phase 3`

**先讨论上下文:** `/gsd-discuss-phase 3`

**研究未知项:** `/gsd-plan-phase --research-phase 3`

<sub>`/clear` 优先 → 全新上下文窗口</sub>

---

里程碑完成

---

## 🎉 里程碑 v1.0 完成

全部 4 个阶段已发布

## ▶ 下一步

**开始 v1.1** — 提问 → 研究 → 需求 → 路线图

`/gsd-new-milestone`

<sub>`/clear` 优先 → 全新上下文窗口</sub>

---

拉取上下文

用于阶段(从 ROADMAP.md):

### 阶段 2: 认证
**目标**: 带刷新令牌的 JWT 登录流程

提取:**阶段 2: 认证** — 带刷新令牌的 JWT 登录流程

用于计划(从 ROADMAP.md):

计划:
- [ ] 02-03: 添加刷新令牌轮换

或从 PLAN.md <objective>:

<objective>
添加带滑动过期窗口的刷新令牌轮换。

目的: 在不影响安全性的前提下延长会话生命周期。
</objective>

提取:**02-03: 刷新令牌轮换** — 添加带滑动过期的 /api/auth/refresh

反模式

不要:仅命令(无上下文)

## 继续

运行 `/clear`,然后粘贴:
/gsd-execute-phase 2

用户不知道 02-03 是关于什么的。

不要:缺少 /clear 说明

`/gsd-plan-phase 3`

先运行 /clear。

没有解释原因。用户可能跳过。

不要:"其他选项" 措辞

其他选项:
- 审查路线图

听起来像是事后补充。用"也可选:"替代。

不要:用围栏代码块展示命令

/gsd-plan-phase 3

模板内的围栏代码块会造成嵌套歧义。用内联反引号替代。