Feat(ship): add configurable PR body sections (#3391)
* feat: add configurable ship PR body sections * chore: add changeset for ship PR sections * docs: avoid prompt scanner trigger in PR body guide * docs: escape pr body source separator
This commit is contained in:
@@ -59,6 +59,9 @@ GSD stores project settings in `.planning/config.json`. Created during `/gsd-new
|
||||
"build_command": null,
|
||||
"test_command": null
|
||||
},
|
||||
"ship": {
|
||||
"pr_body_sections": []
|
||||
},
|
||||
"hooks": {
|
||||
"context_warnings": true,
|
||||
"workflow_guard": false
|
||||
@@ -225,6 +228,56 @@ All workflow toggles follow the **absent = enabled** pattern. If a key is missin
|
||||
| `workflow.build_command` | string | (none) | Shell command to build the project in the post-merge build gate (Step A of step 5.6 in execute-phase). When unset, the gate auto-detects: Xcode (`.xcodeproj` present) → `xcodebuild build`, `Makefile` with `build:` target → `make build`, Justfile → `just build`, `Cargo.toml` → `cargo build`, `go.mod` → `go build ./...`, Python → `python -m py_compile`, `package.json` with `build` script → `npm run build`. Runs with a 5-minute timeout; failure increments `WAVE_FAILURE_COUNT`. Added in v1.39 |
|
||||
| `workflow.test_command` | string | (none) | Shell command to run the project's test suite in the post-merge test gate (Step B of step 5.6 in execute-phase) and the regression gate. When unset, the gate auto-detects: Xcode (`.xcodeproj` present) → `xcodebuild test`, `Makefile` with `test:` target → `make test`, Justfile → `just test`, `package.json` → `npm test`, `Cargo.toml` → `cargo test`, `go.mod` → `go test ./...`, Python → `python -m pytest`. Runs with a 5-minute timeout; failure increments `WAVE_FAILURE_COUNT`. Added in v1.39 |
|
||||
|
||||
## Ship Settings
|
||||
|
||||
`ship.pr_body_sections` adds additional PR body sections for project-specific PRD/PR body content in `/gsd-ship` without editing `get-shit-done/workflows/ship.md`.
|
||||
|
||||
For a user guide with onboarding examples and troubleshooting, see [Custom PR Body Sections](ship-pr-body-sections.md).
|
||||
|
||||
This list is append-only: configured entries are added after the core `Summary`, `Changes`, `Requirements Addressed`, `Verification`, and `Key Decisions` sections. They cannot replace, remove, or reorder required sections.
|
||||
|
||||
Recommended lean/agile PRD uses include user stories, acceptance criteria, Definition of Done or release criteria, risks and dependencies, success metrics, and stakeholder review notes. Keep these sections short and evidence-oriented so the PR body remains a living release artifact rather than a static requirements dump.
|
||||
|
||||
Each entry supports:
|
||||
|
||||
| Field | Type | Default | Description |
|
||||
|-------|------|---------|-------------|
|
||||
| `heading` | string | required | Markdown section heading rendered as `## {heading}`. Must be a single line. |
|
||||
| `enabled` | boolean | `true` | When `false`, onboarding can keep a candidate section in config without rendering it in generated PR bodies. |
|
||||
| `source` | string | (none) | Optional fallback chain of planning artifact headings, such as `PLAN.md ## Risks \|\| VERIFICATION.md ## Manual Checks`. Allowed artifacts are `ROADMAP.md`, `PLAN.md`, `SUMMARY.md`, `VERIFICATION.md`, `STATE.md`, `REQUIREMENTS.md`, and `CONTEXT.md`. |
|
||||
| `template` | string | (none) | Literal Markdown with closed tokens: `{phase_number}`, `{phase_name}`, `{phase_dir}`, `{base_branch}`, `{padded_phase}`. |
|
||||
| `fallback` | string | (none) | Literal Markdown used when `source` yields no content and no `template` is provided. |
|
||||
|
||||
At least one of `source`, `template`, or `fallback` is required for each section. The default is `[]`, so existing projects keep their current `/gsd-ship` output until onboarding adds enabled entries.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"ship": {
|
||||
"pr_body_sections": [
|
||||
{
|
||||
"heading": "User Stories & Acceptance Criteria",
|
||||
"enabled": true,
|
||||
"source": "REQUIREMENTS.md ## User Stories || REQUIREMENTS.md ## Acceptance Criteria",
|
||||
"fallback": "- Acceptance criteria are covered by the linked requirements and verification evidence."
|
||||
},
|
||||
{
|
||||
"heading": "Risks & Rollback",
|
||||
"enabled": true,
|
||||
"source": "PLAN.md ## Risks || PLAN.md ## Rollback",
|
||||
"fallback": "- Rollback: revert this PR."
|
||||
},
|
||||
{
|
||||
"heading": "Stakeholder Sign-off",
|
||||
"enabled": false,
|
||||
"template": "- Product owner: pending for {phase_name}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Recommended Presets
|
||||
|
||||
| Scenario | mode | granularity | profile | research | plan_check | verifier |
|
||||
|
||||
Reference in New Issue
Block a user