Repository navigation
feat: guide agents through command help - #487
Open
angeloashmore wants to merge 6 commits into
Open
angeloashmore wants to merge 6 commits into
angeloashmore wants to merge 6 commits into
Conversation
…ow init picks a repository `slice connect` now names `type edit-tab --with-slice-zone` when the type has no slice zone, or lists the slice zones the type has. `init --help` says that init without --repo creates a repository, and that agents pick without asking. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Make slice disconnect list the other slice zones and point to --slice-zone, or say that the type has no slice zone. Make slice connect say only that the type has no slice zone when it has none. Rewrite the init help so that it states how init picks a repository, with no instructions for agents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Add an optional `agents` field to the command config. When the CLI detects an agent, `--help` shows it as an AGENTS section before USAGE, with the same format as the router AGENTS section. Humans do not see it. Use it in `init` to tell agents not to ask the user whether to create a new repository or connect an existing one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Agents now see the shared AGENTS paragraph on the help of all commands, not only on routers. When a leaf command sets `agents`, its text goes in the same AGENTS section, after the shared paragraph and a blank line. Routers and leaf commands use one rendering function. Router output does not change. Humans see no AGENTS section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Add tests for a type with no slice zone and for a --slice-zone that matches no slice zone, in slice connect and slice disconnect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
The loop already checks the AGENTS section on the root help. Move the --analytics-task-id check into the loop, so it also runs on the router and leaf help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
angeloashmore
marked this pull request as ready for review
November 13, 2026 23:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: prismicio/skills#14
Description
Before this PR, agents saw the CLI's agent guidance only in the top-level help. Two common problems had no guidance at all. On
init, agents often stopped to ask whether to create a new repository or reuse one. A missing slice zone gave an error with no next step. The Prismic skill used to cover these, but it's being reduced to general guidance, so the CLI needs to carry them.After this PR, agents see the AGENTS section on every command's help, and a command can add its own guidance there.
inituses it to tell agents to choose without asking. The slice errors now say how to fix a missing slice zone. The humaninithelp also explains when a repository is created. Humans never see AGENTS text.Nuxt setup eval, Claude Code with the minimized skill:
Checklist
Preview
How to QA 1
Generated by Claude Code
Note
Low Risk
Changes are limited to help text, agent-only UI, and CLI error messages; no runtime behavior change for normal command execution.
Overview
Extends CLI help so detected AI agents see an AGENTS section on every command (root, routers, and leaf commands like
init), not only at the top level. Shared guidance (--task-id,--user-intent) is centralized inagentsBlock(); commands can append command-specific text via a new optionalagentsfield onCommandConfig.prismic initadds agent-only instructions to run init without prompting the user to choose between creating a repo vs connecting, and only use--repowhen the user names a repository. Human help is unchanged (no AGENTS block).slice connectandslice disconnectimprove slice-zone errors: when a type has no slice zone, connect suggests adding one withprismic type edit-tab … --with-slice-zone; when the wrong--slice-zoneis used, errors list valid slice zone field IDs.Tests assert AGENTS placement/content for agents vs humans and the new slice error messages.
Reviewed by Cursor Bugbot for commit e0fd121. Bugbot is set up for automated code reviews on this repo. Configure here.
Generated by Claude Code
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩