Files
msd-core/get-shit-done/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.7 KiB

Continuation Format

Standard format for presenting next steps after completing a command or workflow.

Core Structure

---

## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}

**{identifier}: {name}** — {one-line description}

`/clear` then:

`{command to copy-paste}`

---

**Also available:**
- `{alternative option 1}` — description
- `{alternative option 2}` — description

---

If project_code is not set in the init context, omit the project identity suffix: ## ▶ Next Up (no — [CODE] Title).

Format Rules

  1. Always show what it is — name + description, never just a command path
  2. Pull context from source — ROADMAP.md for phases, PLAN.md <objective> for plans
  3. Command in inline code — backticks, easy to copy-paste, renders as clickable link
  4. /clear first — always show /clear before the command so users run it in the correct order
  5. "Also available" not "Other options" — sounds more app-like
  6. Visual separators — --- above and below to make it stand out
  7. Project identity in heading — include [PROJECT_CODE] PROJECT_TITLE from init context so handoffs are self-identifying across sessions. If project_code is not set, omit the suffix entirely (just ## ▶ Next Up)

Variants

Execute Next Plan

---

## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}

**02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry

`/clear` then:

`/gsd-execute-phase 2`

---

**Also available:**
- Review plan before executing
- `/gsd-list-phase-assumptions 2` — check assumptions

---

Execute Final Plan in Phase

Add note that this is the last plan and what comes after:

---

## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}

**02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry
<sub>Final plan in Phase 2</sub>

`/clear` then:

`/gsd-execute-phase 2`

---

**After this completes:**
- Phase 2 → Phase 3 transition
- Next: **Phase 3: Core Features** — User dashboard and settings

---

Plan a Phase

---

## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}

**Phase 2: Authentication** — JWT login flow with refresh tokens

`/clear` then:

`/gsd-plan-phase 2`

---

**Also available:**
- `/gsd-discuss-phase 2` — gather context first
- `/gsd-plan-phase --research-phase 2` — investigate unknowns
- Review roadmap

---

Phase Complete, Ready for Next

Show completion status before next action:

---

## ✓ Phase 2 Complete

3/3 plans executed

## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}

**Phase 3: Core Features** — User dashboard, settings, and data export

`/clear` then:

`/gsd-plan-phase 3`

---

**Also available:**
- `/gsd-discuss-phase 3` — gather context first
- `/gsd-plan-phase --research-phase 3` — investigate unknowns
- Review what Phase 2 built

---

Multiple Equal Options

When there's no clear primary action:

---

## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}

**Phase 3: Core Features** — User dashboard, settings, and data export

`/clear` then one of:

**To plan directly:** `/gsd-plan-phase 3`

**To discuss context first:** `/gsd-discuss-phase 3`

**To research unknowns:** `/gsd-plan-phase --research-phase 3`

---

Milestone Complete

---

## 🎉 Milestone v1.0 Complete

All 4 phases shipped

## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}

**Start v1.1** — questioning → research → requirements → roadmap

`/clear` then:

`/gsd-new-milestone`

---

Pulling Context

For phases (from ROADMAP.md):

### Phase 2: Authentication
**Goal**: JWT login flow with refresh tokens

Extract: **Phase 2: Authentication** — JWT login flow with refresh tokens

For plans (from ROADMAP.md):

Plans:
- [ ] 02-03: Add refresh token rotation

Or from PLAN.md <objective>:

<objective>
Add refresh token rotation with sliding expiry window.

Purpose: Extend session lifetime without compromising security.
</objective>

Extract: **02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry

Anti-Patterns

Don't: Command-only (no context)

## To Continue

Run `/clear`, then paste:
/gsd-execute-phase 2

User has no idea what 02-03 is about.

Don't: Missing /clear explanation

`/gsd-plan-phase 3`

Run /clear first.

Doesn't explain why. User might skip it.

Don't: "Other options" language

Other options:
- Review roadmap

Sounds like an afterthought. Use "Also available:" instead.

Don't: Fenced code blocks for commands

/gsd-plan-phase 3

Fenced blocks inside templates create nesting ambiguity. Use inline backticks instead.