Skip to content

feat: tell agents to use --force only when the user asks - #494

Open
angeloashmore wants to merge 5 commits into
mainfrom
claude/agents-destructive-commands
Open

angeloashmore wants to merge 5 commits into
mainfrom
claude/agents-destructive-commands

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Resolves:

Description

Before this PR, the Prismic skill told agents to use --force only when the user asks. The minimized skill (prismicio/skills#19) removes that rule, because CLI guidance now lives in the CLI.

After this PR, the agent help of push and pull tells agents to use --force only when the user asks, and says what forcing does. Humans see no change.

This is guidance, not an enforced confirmation. Other removal commands are unchanged.

AGENTS
  ...
  Use --force only when the user asks for it. It lets push delete remote
  models and skips the git check.

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1


Generated by Claude Code


Note

Low Risk
Help text and tests only; no change to pull/push behavior or human-facing CLI output.

Overview
Adds agent-only guidance on prismic pull and prismic push so automated clients see --force should be used only when the user explicitly asks, with short notes on what --force does (discard local changes on pull; allow remote deletes and skip git checks on push). Human --help output is unchanged; the text appears in the existing AGENTS section when an agent is detected.

Tests assert that running --help with AI_AGENT set includes the new --force wording for both commands.

Reviewed by Cursor Bugbot for commit 3ebb562. Bugbot is set up for automated code reviews on this repo. Configure here.


Generated by Claude Code

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment. ↩

Add agent help to each command that removes something, so that an
agent asks the user before it runs the command. Add agent help to
`push` and `pull`, so that an agent uses `--force` only when the user
asks for it. These rules were in the Prismic skill before.

Humans do not see this text. The shared AGENTS text does not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
…them

Change the agent help of the 12 removal commands. Agents must now ask
before they run the command, also when the user asked for the removal.
They can skip the question only when the user asked to force it.

Update the slice remove and token delete help tests to check the new
sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
The shared AGENTS behavior is already tested in index and init tests:
the section shows only for agents, before USAGE. The new tests now
only check the text that each command adds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Logout is not destructive. A user who wants to log out can log out.
Remove the agent help text that told agents to ask first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Remove the agent help text from the removal commands and from sync.
These commands have no --force option, and they can remove things
without extra guidance. Keep the text on push and pull, which have a
--force option. Remove the tests of the removed text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
@angeloashmore angeloashmore changed the title feat: tell agents to confirm destructive commands feat: tell agents to use --force only when the user asks Nov 16, 2026
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.

3 participants