Write milestone brief

From open-gsd/gsd-pi · View interactive version

Write milestone brief is an AI agent skill from the GitHub repository open-gsd/gsd-pi. Synthesize the current conversation into a milestone brief (PRD). Saves it as the milestone CONTEXT (`gsd_summary_save`) by default, or files a GitHub issue only with explicit user confirmation. Use when asked to "turn this into a PRD", "draft a milestone brief", "capture this context", "write it up

How to use this skill

Skill file

<objective>

Take everything established in the current conversation (plus repo reality) and produce a milestone brief that a future agent can execute from with zero additional context. The output is a populated M###-CONTEXT.md, matching the template at src/resources/extensions/gsd/templates/context.md. Optionally, with explicit confirmation, also a GitHub issue.

</objective>

<context>

This skill runs at the end of a discussion phase, after enough grilling/design has happened that the plan has stabilized. It does NOT interview — use the grill-me skill for that. This skill collapses what is already on the page into a durable artifact.

Typical invocation points:

</context>

<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>

<process>

Step 1: Locate the target

Find the active milestone:

  1. Call gsd_project_snapshot — it names the active milestone.
  2. If no milestone is active, ask the user whether this is a new milestone (create directory + files) or appending to an existing one.
  3. For a new milestone, use gsd_milestone_new or the /gsd new-milestone flow — do not create directories by hand.

Step 2: Read the template

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.

Step 3: Sketch the modules

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.

Step 4: Fill the template

Populate M###-CONTEXT.md using the template. Key sections:

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.

Step 5: Write it

Call gsd_summary_save with the milestone_id, artifact_type: "CONTEXT" and the full brief as content. The tool stores the brief in the database and renders .gsd/milestones/<MID>/<MID>-CONTEXT.md; do not write the file. Do not ask for approval of the contents before saving — the user will see the rendered file and can ask for changes.

Then call gsd_decision_save for any genuinely hard-to-reverse architectural decision, with a one-line rationale.

Step 6: Offer next steps

After writing, offer the user (do not auto-execute):

  1. Proceed to planning — run /gsd dispatch plan to generate M###-ROADMAP.md from this brief.
  2. File as GitHub issue — use the active GitHub issue-write tool if one is available, using its exact active tool name. Requires explicit "yes" per the outward-action rule. Use the PRD template below for the body.
  3. Iterate on the brief — if something feels wrong, run grill-me to stress-test before moving on.

GitHub issue body template (only if user chooses option 2)

## 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.

</process>

<anti_patterns>

</anti_patterns>

<success_criteria>

</success_criteria>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.