[command-reference]: add diff script, CI check, and update reference docs#1571
[command-reference]: add diff script, CI check, and update reference docs#1571saehejkang wants to merge 1 commit into
Conversation
|
One generated-doc issue looks worth fixing before this becomes the drift baseline: It looks like the option help text already includes the default and the generator appends the parsed default again. |
|
@saehejkang I wonder if we can use ArgumentParser's experimental help dump feature here instead of needing to manually parse the help with python. What do you think? |
|
I think I'm more inclined toward a two-layer approach for this:
Having a script do things can get the job done for the command reference but isn't as adaptable as using a natural language based approach to solving a natural language related problem. Neither approach will be perfect but I feel the result will be better if we just lean into LLMs for this. |
LOL, I completely missed this feature. I can see it being something that simplifies a lot of the script and then we don't need to add any python stuff.
FWIW, I did use an LLM to actually go through and make the necessary updates to the command reference docs. The script made it a lot quicker for the LLM to see the drift and make the updates. Saves a lot more tokens and we only have to prompt it to:
Furthermore, if there is ever a time when a developer wants to see the drift (and has no AI), they can read the output of the script and make updates promptly. Also, the CI, would now have a way to check for the drift automatically (and fail if updates were missed), because I assume we can't use an LLM in the pipeline (yet)? |
Type of Change
Motivation and Context
Related to #1534
Thought it would be worthwhile to add a sort of mandatory check to the CI to fail, if the
command-referencedocs are not updated appropriately, whenever changes are made to the CLI. When the lint command is ran, there is an output that shows the diff between the current CLI build and what is written in the docs. Hopefully this will help keep the docs up to date and reduce tech debt over time.NOTE: The
scripts/generate-command-reference.pyfile was generated with AI but reviewed by me.Testing