style: backtick env vars in help prose; enforce the ADE_* rule in the style test - #188
Conversation
…le test PR #166 backticked bare flags across the help surface but left environment variables bare, which docs/agents/writing-style.md names as a backtick category (post-merge review feedback on #166). Backtick ADE_HOME / ADE_API_KEY / ADE_ENDPOINT in the env-overrides convention entry plus the sibling misses ($ADE_ENV in flag help normalizes to `ADE_ENV`), extend tests/test_help_style.py to enforce the env-var rule the same way it enforces flags, scan the store home/note fields it previously skipped (catching one bare --json), and regenerate the help.json snapshot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates help prose styling and strengthens automated enforcement for ADE_* environment variables.
Changes:
- Backticks environment variables and flags across help text.
- Adds environment-variable style validation and expands scanned fields.
- Updates writing guidance and regenerates the help snapshot.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_help_style.py |
Adds environment-variable checks and store fields. |
src/ade_cli/parse.py |
Normalizes ADE_ENV help prose. |
src/ade_cli/help.py |
Backticks help-surface literals. |
src/ade_cli/extract.py |
Normalizes ADE_ENV help prose. |
src/ade_cli/auth.py |
Normalizes authentication help prose. |
docs/reference/help.json |
Regenerates the help reference. |
docs/agents/writing-style.md |
Documents enforced environment-variable notation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot review on #188 found two guard gaps: topic titles are prose rendered in help and `help --json` but were not scanned (only bodies are exempt), and the code-span strip hid a backticked `$ADE_ENV` from the env-var check, so the documented not-`$ADE_ENV` notation was unenforced. Scan titles, and match $-prefixed mentions against the raw text. Test-only: the help surface itself is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thanks for the quick follow-up, @lai-bianca — this fully resolves the env-var gap from #166#issuecomment-5248246441. I re-scanned every string in this PR's One new thing this PR surfaces, worth a look before merging: the is the right instinct, but the docs repo's def code_cell(text):
return "`" + text.replace("|", "\|") + "`"I ran the resulting string through an actual CommonMark parser to check, rather than just eyeballing it:
|
|
Thanks @DanGH1 — good catch on the
Verified with markdown-it against this PR's Since the fix lands in the docs PR before the generator ever ships, no change is needed in this PR, and the backticked 🤖 Generated with Claude Code |
Follow-up to the post-merge review feedback on #166 (#166 (comment)): the
env overridesconvention entry was left unbackticked even thoughdocs/agents/writing-style.mdnames environment variables as a backtick category, and the style test could not catch it because it only matched--flagshapes.Changes
ADE_HOME,ADE_API_KEY, andADE_ENDPOINTin theenv overridesconvention entry (the reviewed miss).ADE_API_KEYin theauth statusresult key,ADE_HOMEin the store home line, and five prose$ADE_ENVmentions normalized to`ADE_ENV`(the style doc's notation). The topic-body mention stays bare per the pre-formatted exemption.tests/test_help_style.pywith aBARE_ENV_VARcheck so the env-var rule is enforced the same way the flag rule is. The test's original rationale for flag-only scope was that a long flag is unmistakable in prose; anADE_*env var is equally unmistakable. The pattern also flags$-prefixed mentions.store.homeandstore.notefields to the prose scan, which surfaced one more bare--jsonin the store note (now backticked).docs/agents/writing-style.mdto state that both rules are enforced and that env vars are written as a backticked bare name (ADE_ENV, not$ADE_ENV).docs/reference/help.jsonsnapshot.Deliberately out of scope: bare env vars in error and status messages outside the help surface (for example the login hints in
auth.pyandcredentials.py); those are not part of thehelp --jsoncontract the hosted docs consume.Full suite passes (743 passed, 8 skipped);
uvx ruff check src testsanduvx ty check srcare clean.🤖 Generated with Claude Code