Skip to content

Script to automatically create doc stubs for compat flags#5839

Open
npaun wants to merge 1 commit intomainfrom
npaun/compat-docs-generator
Open

Script to automatically create doc stubs for compat flags#5839
npaun wants to merge 1 commit intomainfrom
npaun/compat-docs-generator

Conversation

@npaun
Copy link
Copy Markdown
Member

@npaun npaun commented Jan 6, 2026

I asked Claude to vibe code a script to generate stub documentation for compatibility flags. It looks through compatibility-date.capnp and automatically makes a markdown file in cloudflare-docs for each flag it finds that meets the criteria. You'll still need to tweak the output before committing to remove any 'inside baseball' details about the implementation that aren't interesting for users, but this will get you started.

Currently it'll document flags that:

  • Have a default enable date or are implied by another flag after a date
  • Aren't experimental

Let me know if you'd find this script useful too.

See here for the output it produces (after my manual editing): cloudflare/cloudflare-docs#27450

@npaun npaun requested a review from a team January 6, 2026 21:55
@npaun npaun requested review from a team as code owners January 6, 2026 21:55
Comment thread tools/cross/generate-compat-flag-docs.py
@npaun npaun requested review from anonrig and jasnell January 9, 2026 00:07
@npaun npaun force-pushed the npaun/compat-docs-generator branch from 52b3d5f to 4aa2380 Compare March 9, 2026 16:07
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 9, 2026

Merging this PR will improve performance by 26.33%

⚡ 1 improved benchmark
✅ 69 untouched benchmarks
⏩ 129 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
bodyWithHeaders[Response] 38.6 µs 30.5 µs +26.33%

Comparing npaun/compat-docs-generator (4aa2380) with main (2536901)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants