Skip to content

Conversation

@dwdougherty
Copy link
Collaborator

@dwdougherty dwdougherty commented Nov 6, 2025

Hi folks. This experimental PR adds railroad type syntax diagrams (and 2.4M of additional image data) to the command pages. This has been a long time ask of PMs. There was a previous attempt to do this before I joined Redis, but it was incomplete, so I ripped it all out. This works a lot better.

There's lots to be vetted here, so I'm hoping for some help.

rr-diagrams-huzzah

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

DOC-5935

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Staging links:
https://redis.io/docs/staging/DOC-5935/commands/acl-cat/
https://redis.io/docs/staging/DOC-5935/commands/acl-deluser/
https://redis.io/docs/staging/DOC-5935/commands/acl-dryrun/
https://redis.io/docs/staging/DOC-5935/commands/acl-genpass/
https://redis.io/docs/staging/DOC-5935/commands/acl-getuser/
https://redis.io/docs/staging/DOC-5935/commands/acl-help/
https://redis.io/docs/staging/DOC-5935/commands/acl-list/
https://redis.io/docs/staging/DOC-5935/commands/acl-load/
https://redis.io/docs/staging/DOC-5935/commands/acl-log/
https://redis.io/docs/staging/DOC-5935/commands/acl-save/
https://redis.io/docs/staging/DOC-5935/commands/acl-setuser/
https://redis.io/docs/staging/DOC-5935/commands/acl-users/
https://redis.io/docs/staging/DOC-5935/commands/acl-whoami/
https://redis.io/docs/staging/DOC-5935/commands/acl/
https://redis.io/docs/staging/DOC-5935/commands/append/
https://redis.io/docs/staging/DOC-5935/commands/asking/
https://redis.io/docs/staging/DOC-5935/commands/auth/
https://redis.io/docs/staging/DOC-5935/commands/bf.add/
https://redis.io/docs/staging/DOC-5935/commands/bf.card/
https://redis.io/docs/staging/DOC-5935/commands/bf.exists/
https://redis.io/docs/staging/DOC-5935/commands/bf.info/
https://redis.io/docs/staging/DOC-5935/commands/bf.insert/
https://redis.io/docs/staging/DOC-5935/commands/bf.loadchunk/
https://redis.io/docs/staging/DOC-5935/commands/bf.madd/
https://redis.io/docs/staging/DOC-5935/commands/bf.mexists/
https://redis.io/docs/staging/DOC-5935/commands/bf.reserve/
https://redis.io/docs/staging/DOC-5935/commands/bf.scandump/

@andy-stark-redis
Copy link
Contributor

@dwdougherty This is looking good and is usable as-is. However, I just thought I'd mention some things I found out last week about AI usage of stuff like this.

AI often benefits from being able to parse a formal structure like this but visual diagrams are hard work for it to process and also more error-prone than a text format. Things like Mermaid diagrams let you add text to the page that gets processed at render time rather than build time. AI tends not to run JS on a page, so it can still see the original Mermaid source code, which is much easier for it to parse than the visual diagram (this was the thinking behind my checklist thing, btw). The source text also gets added to the index.html.md version of the page with no extra effort.

I've not gone into great depth with this, but some quick chats with Augie and Chatty suggest that the original JSON format (the input to the current railroad generator) would actually be more-or-less ideal for AI to understand, even in preference to standards like EBNF, etc. I'm thinking maybe we could include the existing command JSON metadata pretty much verbatim in each page and then run some in-page JS to turn it into railroad diagrams (and we could maybe even generate the text description of the syntax from the metadata)?

If you're interested in this, I've got a Markdown file of some "lessons" learned by Augie while implementing the checklist render hook, which I'd be happy to share, or we perhaps I could add it to the repo in a new folder somewhere.

@dwdougherty dwdougherty marked this pull request as draft November 7, 2025 14:30
Copy link
Collaborator

@mich-elle-luna mich-elle-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! I prefer the static files.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants