Synthesize the current conversation into a milestone brief (PRD). Writes to `M###-CONTEXT.md` by default, or files a GitHub issue only with explicit user confir
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-write-milestone-brief-391f0ca6a632 ,按照其中的说明把「write-milestone-brief」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Typical invocation points:
discuss phase before moving to plan<core_principle>
SYNTHESIZE, DO NOT RE-INTERVIEW. Use what is already in this conversation. If a decision is genuinely missing, note it in Open Questions — do not relitigate.
REAL OUTCOMES, NOT TASKS. M###-CONTEXT.md describes what the user can do when the milestone ships, what scenarios must pass for "done," and what architectural decisions were made. It does NOT list tasks or implementation steps — those belong in M###-ROADMAP.md and S##-PLAN.md.
NO FILE PATHS OR LINE NUMBERS IN THE BRIEF. Those go stale. Describe modules, interfaces, and behaviors. The roadmap and plans can cite code locations; the brief should outlive refactors. </core_principle>
Find the active milestone:
.gsd/STATE.md — it names the active milestone.gsd_milestone_new or the /gsd new-milestone flow — do not create directories by hand.Read src/resources/extensions/gsd/templates/context.md (the full path is shown in the templatesDir system-prompt field). Match its structure exactly — parsers and downstream prompts depend on the headings.
Before filling the template, sketch the major modules the milestone will build or modify. Actively look for opportunities to extract deep modules — ones that encapsulate a lot of functionality in a simple, testable interface that rarely changes. A deep module is more testable, more AI-navigable, and survives refactors.
If the modules are non-obvious, offer the user a brief check-in: "The milestone touches modules A, B, and C. A can be extracted as a deep module that hides X. Does that match your thinking?" One round. Then proceed.
Populate M###-CONTEXT.md using the template. Key sections:
### Decision Title block per decision, with rationale and alternatives considered. If there were no architectural decisions, write "None — straightforward execution" and skip the subsections.The template headings above are mandatory — do not omit, rename, or reorder them. The exact required order matches
src/resources/extensions/gsd/templates/context.md: Project Description → Why This Milestone → User-Visible Outcome → Completion Class → Final Integrated Acceptance → Architectural Decisions → Error Handling Strategy → Risks and Unknowns → Existing Codebase / Prior Art → Relevant Requirements → Scope → Technical Constraints → Integration Points → Testing Requirements → Acceptance Criteria → Open Questions.
Use the write tool to create or overwrite .gsd/milestones/<MID>/<MID>-CONTEXT.md. Do not ask for approval of the file contents before writing — the user will see the rendered file and can edit directly.
Then append a one-line summary to .gsd/DECISIONS.md for any genuinely hard-to-reverse architectural decision: - YYYY-MM-DD [MID]: <decision> — <one-line rationale>.
After writing, offer the user (do not auto-execute):
/gsd dispatch plan to generate M###-ROADMAP.md from this brief.mcp__github__issue_write to create a tracking issue. Requires explicit "yes" per the outward-action rule. Use the PRD template below for the body.grill-me to stress-test before moving on.## Problem Statement
<user-perspective problem — one paragraph>
## Solution
<user-perspective solution — one paragraph>
## User Stories
1. As a <actor>, I want <feature>, so that <benefit>.
2. ...
<cover all aspects; be exhaustive>
## Architectural Decisions
<list of decisions with rationale — copy from M###-CONTEXT.md>
## Testing Strategy
<what a good test looks like here: external behavior only, which modules get tested, prior art>
## Out of Scope
<things explicitly not covered>
## Further Notes
<any extra context>
---
See `.gsd/milestones/<MID>/<MID>-CONTEXT.md` for the full brief.
<anti_patterns>
</anti_patterns>
<success_criteria>
M###-CONTEXT.md exists and follows the template structure..gsd/DECISIONS.md has a dated one-liner for any hard-to-reverse decision.</success_criteria>