Skip to content

docs: --help documents the CLI for agents - #48

Merged
alukach merged 6 commits into
mainfrom
docs/help-for-agents
Oct 15, 2026
Merged

alukach merged 6 commits into
mainfrom
docs/help-for-agents

Conversation

@alukach

@alukach alukach commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Stacked on #47.

Agents learn a CLI from --help, which always matches the installed version, so this makes it complete enough to use on its own.

  • No blank help: --title and --description on product create/edit now have help lines. A new test, every_command_and_argument_has_help, fails on any command or argument without one.
  • Agent summary: source-coop --help ends with a "For scripts and agents" block (FOR_SCRIPTS in src/main.rs) covering --json and the error shape, running without prompts (SOURCE_PROMPT_DISABLED, -F -, --yes), SOURCE_TOKEN, and exit codes. -h stays short.
  • Examples in each product subcommand's help.
  • AGENTS.md gets a short "Help is the agents' documentation" section: help is the reference, the README is the guide, and a skill or llms.txt should point to --help rather than copy flags.
  • README.md notes that --help carries this summary.

Checked with cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test and cargo test --features staging.

🤖 Generated with Claude Code

@claude

claude Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Claude finished @alukach's task in 11s —— View job


✅ No blocking issues — safe to merge.

I read the diff and checked that SOURCE_TOKEN and SOURCE_PROMPT_DISABLED exist and behave as FOR_SCRIPTS says. I did not run the build or tests.

  • The new help text matches the code and the README.
  • every_command_and_argument_has_help, help_examples_parse and help_headings_are_styled_like_clap_s cover the help rules in AGENTS.md.
  • shlex is a dev-dependency only, so it doesn't reach the release binary.

Simplify (ponytail)

  • Cargo.toml:52 — shlex is a new dev-dependency used only for splitting example lines. It could be dropped by splitting on whitespace, since the examples quote only "My data" and '{"title": "My data"}'. That breaks as soon as an example needs richer quoting, so keeping it is fine.

💰 Estimated review cost: $0.11 · 0m10s · 5 turns

Base automatically changed from feat/product-commands-v2 to main October 15, 2026 05:45
@alukach
alukach force-pushed the docs/help-for-agents branch from b9ecea4 to 786e300 Compare October 15, 2026 05:52
alukach and others added 6 commits October 14, 2026 22:54
Every command and argument has a help line (checked by a test),
product commands show examples, and `source-coop --help` ends with a
summary for scripts and agents: --json, prompts, exit codes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alukach
alukach force-pushed the docs/help-for-agents branch from 786e300 to 88365a3 Compare October 15, 2026 05:55
@alukach
alukach merged commit 7b70ae0 into main Oct 15, 2026
10 checks passed
@alukach
alukach deleted the docs/help-for-agents branch October 15, 2026 05:57
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.

1 participant