zed/.github
morgankrey dc41f71f57
Add documentation suggestion automation (#49194)
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
2026-02-18 06:39:09 -06:00
..
actions ci: Fix docs build post #45130 (#45330) 2025-12-19 03:40:27 +00:00
DISCUSSION_TEMPLATE Fix feature request guidelines link in discussion template (#49129) 2026-02-13 20:27:01 +00:00
ISSUE_TEMPLATE Add security warnings to issue templates (#47957) 2026-01-29 14:17:53 -05:00
workflows Add documentation suggestion automation (#49194) 2026-02-18 06:39:09 -06:00
actionlint.yml Reapply "Try namespace mac runners (#47675)" (#47721) (#47727) 2026-01-26 22:02:52 -07:00
cherry-pick-bot.yml Maybe make cherry-pick-bot better 2024-02-28 15:26:30 -07:00
CODEOWNERS Update CODEOWNERS (includes suggested entries) (#47273) 2026-02-17 18:44:19 -05:00
FUNDING.yml Add sponsor button to main Zed repo (#46807) 2026-01-14 10:38:51 -06:00
pull_request_template.md Update pull_request_template.md (#48805) 2026-02-13 09:23:51 +00:00