Adds scripts and a GitHub Action workflow for automatically suggesting
documentation updates when PRs modify user-facing code.
## Scripts
- **`script/docs-suggest`**: Analyze PRs/commits for documentation needs
using AI
- **`script/docs-suggest-publish`**: Create a PR from batched
suggestions
- **`script/docs-strip-preview-callouts`**: Remove Preview callouts when
shipping to stable
- **`script/test-docs-suggest-batch`**: Testing utility for batch
analysis
## Workflow
The GitHub Action (`.github/workflows/docs_suggestions.yml`) handles two
scenarios:
1. **PRs merged to main**: Suggestions are batched to
`docs/suggestions-pending` branch for the next Preview release
2. **Cherry-picks to release branches**: Suggestions are posted as PR
comments for immediate review
## Callout Types
The system distinguishes between:
- **Additive features** (new commands, settings, UI):
```markdown
> **Preview:** This feature is available in Zed Preview. It will be
included in the next Stable release.
```
- **Behavior modifications** (changed defaults, altered existing
behavior):
```markdown
> **Changed in Preview (v0.XXX).** See [release notes](/releases#0.XXX).
```
Both callout types are stripped by `docs-strip-preview-callouts` when
features ship to stable.
## Example Output
See PR #49190 for example documentation suggestions generated by running
this on PRs from the v0.224 preview window.
## Usage
```bash
# Analyze a PR (auto-detects batch vs immediate mode)
script/docs-suggest --pr 49100
# Dry run to see assembled context
script/docs-suggest --pr 49100 --dry-run
# Create PR from batched suggestions
script/docs-suggest-publish
# Strip callouts for stable release
script/docs-strip-preview-callouts
```
Release Notes:
- N/A