Skip to content

Plugin slash commands: write authorization, handler commands and shared command ownership #3552

Open

Description

@integry

Goal

Complete plugin commands: commands that need write-capability servers, commands that call a handler, and what happens when two plugins offer the same command name.

What to build

  • Write servers: a prompt command with needsWrite: true exposes the plugin's write-capability servers to that one run only when both hold: an administrator switched on "Allow this command to use write access" for the command on the Plugins page (off by default, shown at install with an explanation), and the commenter has write permission on the repository. Otherwise the command is refused with a reply explaining what is missing. This is the command's explicit write authorization; it does not extend to later follow-ups or retries.
  • kind: 'handler': the command calls one of the plugin's handlers with the comment context (repository, number, commenter, argument) as a delivery of kind command, recorded in Activity; the handler can use ctx.propr (for example to comment back) and ctx.http.
  • Shared command names: a manifest may mark a command as shared (for example /deploy, offered by several deployment plugins). Each such plugin must also declare a specific command. When more than one enabled plugin offers the same shared name for a repository, the plain name is owned by the plugin chosen in a small instance setting on the Plugins page, defaulting to the only enabled one; with no choice made and several candidates, the command replies asking the user to use a specific command.

Acceptance criteria

  • needsWrite commands are refused unless the administrator switch is on and the commenter has write permission; when allowed, the write server is exposed to that run only (not to a retry or a later follow-up).
  • A handler command invokes the handler with repository, number, commenter and argument; the handler can comment back through ctx.propr; the delivery appears in Activity.
  • With two plugins offering a shared command: specific commands work, the plain name follows the instance setting, and with no setting the reply names the specific commands.
  • The per-command write switch and the shared-command owner are editable on the Plugins page by administrators only and recorded in the audit trail.
  • Docs: docs/docs/features/pr-commands.md and docs/docs/features/plugins.md.

Implementation

  1. Write authorization passed as the run's explicit write grant through the extension library's existing write-authorization path.
  2. handler commands enqueue a plugin delivery of kind command.
  3. Shared command ownership setting in the plugin store, surfaced on the Plugins page; plugins:check validates shared commands have a specific sibling.
  4. Plugins page: per-command write switch.
  5. Tests in test/ and packages/core/test with the example plugin and a second fixture plugin.

Notes

Depends on the prompt commands issue and the dispatcher issue. Keep the security rule that write-capability servers need explicit write authorization for the specific run.

Activity

  1. added
    base-3542-epic-plugin-system-xu8
    on Nov 14, 2026
  2. propr-dev commented on Nov 16, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3552/claude-opus-5-5-plugin-slash-commands-wri-20261116-0911-db6
    • Base Branch: 3542-epic-plugin-system-xu8
    • Worktree: issue-3552-20261116-0911-claude-opus-5-5-db6

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI-doneauto-mergebase-3542-epic-plugin-system-xu8llm-claude-opus55propr-planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions