zed/script
morgankrey 2ec2b4c600
Fix and improve docs automation scripts (#50120)
## Summary

Fixes issues discovered while running the docs automation workflow for
the first time, plus improvements based on the v0.225 run where 44
suggestions overwhelmed a single Droid invocation.

### docs-suggest-publish
- Ignore untracked files when checking for clean working directory
- Add `--auto high` flag to droid exec for non-interactive use
- Add error handling to show droid output on failure
- Remove non-existent `documentation` label from PR creation
- Use `--write` flag for prettier to fix formatting
- **Batch suggestions** into groups of 10 (configurable with
`--batch-size`) to prevent Droid from dropping suggestions when context
is too large
- **Pre-PR docs build validation** — runs `generate-action-metadata` +
`mdbook build` before creating the PR to catch invalid `{#action}` and
`{#kb}` references locally instead of waiting for CI (skippable with
`--skip-validation`)
- **Prompt guardrail** — instructs Droid not to invent `{#kb}` or
`{#action}` references, only reusing action names already present in
docs files
- **Stable release detection** — at publish time, checks each queued
PR's merge commit against the latest stable release tag. PRs already in
stable get annotated "ALREADY IN STABLE" so Droid applies content
changes without adding incorrect Preview callouts
- **Feature flag detection** — parses
`crates/feature_flags/src/flags.rs` for all feature flag struct names,
then checks each PR's diff for references. PRs behind feature flags are
skipped entirely since those features aren't generally available yet

### docs-strip-preview-callouts
- Remove non-existent `documentation` label from PR creation
- Add `Release Notes: - N/A` to generated PR body (fixes Danger bot
check)

## Context

These scripts were run for the first time as part of the v0.225 release.
Issues found:
1. The `documentation` label doesn't exist in this repo
2. Droid exec needs `--auto high` for non-interactive execution
3. Prettier needs `--write` to actually fix files (was running in check
mode)
4. Untracked files should not block the workflow
5. Sending all 44 suggestions in one Droid invocation only applied 2 —
batching in groups of 10 fixed this
6. Droid hallucinated action names (`settings::OpenSettings`,
`gpui::Modifiers::secondary_key`) that broke the docs preprocessor build
7. PRs that shipped in stable v0.225 incorrectly got Preview callouts
because the queue doesn't distinguish preview-only from
already-in-stable
8. PRs behind feature flags (subagents, git graph) got documented
despite not being generally available

Release Notes:

- N/A
2026-02-25 19:02:37 -06:00
..
danger danger: Remove check for modifying prompts (#47028) 2026-01-16 22:21:58 +00:00
flatpak Add (flatpak) and (snap) suffixes to Zed version in system info (#32903) 2025-06-17 20:39:35 +00:00
lib gpui: Fix typo in publish script (#39836) 2025-10-09 05:11:11 +00:00
licenses Make check-licenses script check that AGPL crates are not included in release binaries (#42571) 2025-11-12 21:58:12 +00:00
terms Fix invalid Unicode in terms & conditions (#42906) 2025-11-19 13:00:35 -05:00
update_top_ranking_issues Format update_top_ranking_issues with latest ruff (#47023) 2026-01-16 21:43:22 +00:00
analyze_highlights.py Use a proper name for highlights.scm (#43412) 2025-11-24 16:15:38 +00:00
bootstrap collab: Add automatic install of minio deb or rpm to script/bootstrap (#32968) 2025-06-18 19:07:57 +00:00
bootstrap.ps1 windows: Make collab run on Windows (#23117) 2025-01-17 09:39:13 +02:00
build-docker Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
bump-extension-cli Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
bump-gpui-version gpui: Update dependency package names (#40143) 2025-10-14 04:43:28 +00:00
bump-nightly Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
bump-zed-minor-versions Fix markdown list in bump-zed-minor-versions (#38515) 2025-09-19 16:11:19 +00:00
bump-zed-patch-version Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
bundle-freebsd linux: Make desktop file executable (#35597) 2025-08-04 15:35:19 -04:00
bundle-linux linux: Name desktop file correctly during bundle (#45508) 2026-02-13 20:21:07 +05:30
bundle-mac Remove unnused line from bundle-mac (#48972) 2026-02-11 21:33:01 -07:00
bundle-windows.ps1 Fail windows bundle when cargo about fails (#48056) 2026-01-30 19:55:29 -07:00
cargo Better cargo wrapper (#49946) 2026-02-24 05:13:04 +00:00
cargo-timing-info.js Add a cargo wrapper to report build times (#49632) 2026-02-23 09:46:28 -07:00
check-keymaps Add CI check that cmd- is not in linux keymaps + check other mods (#32334) 2025-06-08 09:34:07 +00:00
check-licenses licenses: Verify validity of the symlink files (#46444) 2026-01-11 11:43:08 +01:00
check-links ci: Restore lychee link check. Only validate internal links (#32463) 2025-06-10 11:20:07 -04:00
check-todos Add CI check that cmd- is not in linux keymaps + check other mods (#32334) 2025-06-08 09:34:07 +00:00
cherry-pick Fetch (just) enough refs in script/cherry-pick (#41949) 2025-11-04 17:09:43 -07:00
clear-target-dir-if-larger-than Use arithmetic expansion instead of expr in ./script/clear-target-dir-if-larger-than (#47298) 2026-01-21 11:10:18 -05:00
clear-target-dir-if-larger-than.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
clippy Run additional checks from script/clippy if local (#29768) 2025-05-02 01:26:12 +00:00
clippy.ps1 Windows tests on self-hosted runners (#29764) 2025-06-16 17:29:36 -04:00
collab-flamegraph Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
crate-dep-graph Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
create-draft-release Avoid re-creating releases when re-running workflows (#42573) 2025-11-12 21:50:15 -07:00
debug-cli cli: Allow opening non-existent paths (#43250) 2025-11-24 11:30:19 +02:00
deploy-collab Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
determine-release-channel Fix bad quote in script/determine-release-channel (#20613) 2024-11-13 12:41:50 -05:00
determine-release-channel.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
digital-ocean-db.sh Add a script to connect to the database. (#32023) 2025-06-04 09:23:23 -06:00
docs-strip-preview-callouts Fix and improve docs automation scripts (#50120) 2026-02-25 19:02:37 -06:00
docs-suggest Improve agent pull request hygiene (#49469) 2026-02-18 08:46:47 -06:00
docs-suggest-publish Fix and improve docs automation scripts (#50120) 2026-02-25 19:02:37 -06:00
download-wasi-sdk Try to download wasi-sdk ahead of time (#42377) 2025-11-10 19:50:43 +00:00
draft-release-notes Add fallback message when preview changelog is empty (#46260) 2026-01-07 14:24:02 +00:00
drop-test-dbs Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
exit-ci-if-dev-drive-is-full.ps1 windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
freebsd Fix capitalization of libX11 in FreeBSD dependencies (#48159) 2026-02-02 23:55:03 +01:00
generate-action-metadata Remove zed dependency from docs_preprocessor (#45130) 2025-12-18 21:59:05 -05:00
generate-licenses Pin cargo-about to 0.8.2 (#44012) 2025-12-02 17:54:08 +00:00
generate-licenses-csv Pin cargo-about to 0.8.2 (#44012) 2025-12-02 17:54:08 +00:00
generate-licenses.ps1 Fail windows bundle when cargo about fails (#48056) 2026-01-30 19:55:29 -07:00
generate-terms-rtf Fix invalid Unicode in terms & conditions (#42906) 2025-11-19 13:00:35 -05:00
get-crate-version Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
get-crate-version.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
get-pull-requests-since Add a get-release-notes-since script (#18445) 2024-09-27 10:59:19 -04:00
get-release-notes-since Add a get-release-notes-since script (#18445) 2024-09-27 10:59:19 -04:00
get-released-version Use cloud.zed.dev for install.sh (#42399) 2025-11-10 23:55:19 +00:00
github-check-new-issue-for-duplicates.py Post comments on duplicate bug reports (#49482) 2026-02-18 17:15:15 +00:00
github-clean-issue-types.py Add a one-off cleanup script for GH issue types (#42515) 2025-11-12 11:40:31 +01:00
github-find-top-duplicated-bugs.py Post comments on duplicate bug reports (#49482) 2026-02-18 17:15:15 +00:00
github-label-issues-to-triage.py Add a script to label untriaged GH issues (#43711) 2025-11-28 10:24:59 +01:00
github-pr-status A script to help with PR naggery (#32025) 2025-06-04 09:23:14 -06:00
github-track-duplicate-bot-effectiveness.py Add duplicate bot effectiveness tracking (w/github project) (#49879) 2026-02-23 13:22:29 +00:00
histogram Print error message and skip line 2024-01-23 16:52:08 +01:00
import-themes Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
install-cmake Improve install-cmake script (#20836) 2024-11-18 16:39:57 -05:00
install-linux Fix install linux (#43205) 2025-11-21 09:12:19 -07:00
install-mold Don't upload symbols to DO anymore (#41317) 2025-10-27 15:22:53 -06:00
install-rustup.ps1 Windows tests on self-hosted runners (#29764) 2025-06-16 17:29:36 -04:00
install-wild Fix wild install script (#42747) 2025-11-15 15:15:37 +01:00
install.sh linux: Name desktop file correctly during bundle (#45508) 2026-02-13 20:21:07 +05:30
kube-shell Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
language-extension-version proto: Bump to v0.2.3 (#43791) 2025-11-29 13:59:18 +00:00
linux Show config messages from install-wild, install-mold (#38979) 2025-09-26 16:47:38 +00:00
metal-debug Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
mitm-proxy.sh Improve script/mitm-proxy.sh to support podman (#25834) 2025-02-28 22:37:03 +00:00
new-crate Remove workspace-hack (#40216) 2025-10-17 18:58:14 +00:00
prettier Improve autofix (#44930) 2025-12-15 22:19:18 -07:00
prompts Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
randomized-test-ci Remove ZED_CLIENT_SECRET_TOKEN 2024-01-23 10:34:43 -07:00
randomized-test-minimize Format scripts with Prettier (#8393) 2024-02-25 11:03:33 -05:00
redeploy-vercel Fewer race-conditions in Vercel redeploy (#46826) 2026-01-15 14:48:05 -07:00
remote-server Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
reset_db Fix reset_db script (#29067) 2025-04-18 19:28:14 +00:00
run-background-agent-mvp-local Update AI docs for retired hosted models (#49486) 2026-02-18 10:36:38 -06:00
run-local-minio collab: Add automatic install of minio deb or rpm to script/bootstrap (#32968) 2025-06-18 19:07:57 +00:00
run-unit-evals Fetch the unit eval commit before checking it out (#42636) 2025-11-13 15:21:53 +00:00
seed-db Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
select-sentry-crash-candidates background-agent: Scaffold week-one crash MVP pipeline (#49299) 2026-02-16 20:32:51 -06:00
sentry-fetch Add prompts and scripts for automatic crash repro and fix (#49063) 2026-02-12 12:42:41 -08:00
setup-dev-driver.ps1 windows: Use dev drive instead of ReFS (#25858) 2025-03-01 22:43:10 +08:00
setup-sccache Fix sccache on windows (#48943) 2026-02-11 09:59:20 -07:00
setup-sccache.ps1 Fix sccache --show-stats not working sometimes on windows (#48974) 2026-02-11 21:40:42 +00:00
shellcheck-scripts ci: Add shellcheck for scripts (#20631) 2024-11-18 16:41:22 -05:00
snap-build Add scripts and configuration for building snap package (#25064) 2025-02-19 10:28:23 -07:00
snap-try Add scripts and configuration for building snap package (#25064) 2025-02-19 10:28:23 -07:00
squawk ACP debug tools pane (#36768) 2025-08-22 19:32:49 +00:00
storybook Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
test-docs-suggest-batch Add documentation suggestion automation (#49194) 2026-02-18 06:39:09 -06:00
triage_watcher.jl Add script/triage_watcher.jl (#45384) 2025-12-19 18:09:40 +00:00
trigger-release Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
uninstall.sh Add an uninstall script (#21213) 2024-11-28 10:31:12 +02:00
update-json-schemas Bump JSON schemas: package.json, tsconfig.json (#20910) 2024-11-20 13:35:00 -05:00
upload-extension-cli Add GitHub Action for publishing the extension CLI (#9542) 2024-03-19 14:19:32 -04:00
upload-nightly script: Fix upload-nightly versioning (#43933) 2025-12-01 22:38:58 +01:00
upload-nightly.ps1 Add SSH remote server for Windows (#47460) 2026-01-24 13:15:01 -05:00
verify-macos-document-icon macOS: Bundle placeholder Document.icns so Finder can display Zed file icons (#44833) 2025-12-17 16:42:31 -06:00
what-is-deployed Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
zed-local Fix script/zed-local on Windows (#38832) 2025-09-25 09:03:27 -04:00