Documentation

Snapr Commands provide the primary interface through which you interact with the Snapr platform directly from your integration platform. Currently, only GitHub is supported (other platforms are planned), so by invoking the slash command /snapr in a comment on a GitHub issue or pull request, the GitHub webhook sends the event to the Snapr API, which then spins up AI-powered workflows as Kubernetes Jobs in your cluster. This comment-driven interface lets you work naturally within your existing development process, with no separate CLI required.

Commands follow a simple pattern when added as comments on your integration platform:

/snapr <command>

Below is an overview of the core Snapr commands you can use to analyze code, refine issues, develop changes, or inspect files:

  • analyze - Run analysis jobs on your repository.
  • refine - Break complex issues into smaller, manageable tasks.
  • develop - Generate a pull request to address an issue, applying AI-generated code changes.
  • file - Inspect and modify individual files according to best practices.
  • review - Perform automated pull request reviews and feedback.

Detailed usage and available options for each command are described in their respective reference pages below.

analyze

The /snapr analyze command runs an issue analysis workflow on the current GitHub issue. It interprets the issue’s title and description as the analysis goal and uses your project’s code, documentation, tests, and any comments or discussion in the issue thread as context to fully understand that goal. The analysis comment surfaces missing details, potential risks or bugs, and suggests next steps, just like a human reviewer.

/snapr analyze
💡 Tip: Slash‑invoke /snapr analyze only on GitHub issues. It has no effect in pull request comments.

When /snapr analyze is invoked, Snapr adds the GitHub label snapr/phase: analysis to the issue to mark the analysis phase. While that label remains set:

  • Snapr listens to new comments or clarifications and updates its analysis in real time.
  • You can continue interacting with Snapr by adding comments without needing to reissue the command.

To exit analysis mode, simply remove the snapr/phase: analysis label and Snapr will stop monitoring the issue.

develop

The /snapr develop command runs a development workflow on the current GitHub issue. It treats the issue title and description as the development goal and uses your project’s code, documentation, tests, and any comments or discussion in the issue thread as context to generate a solution. Snapr creates a new branch, applies AI-generated code changes, and opens a pull request with the proposed implementation.

/snapr develop
💡 Tip: Slash‑invoke /snapr develop only on GitHub issues. It has no effect in pull request comments.

When /snapr develop is invoked, Snapr removes any existing snapr/phase: analysis label and adds the label snapr/phase: develop to mark the development phase. While that label remains set:

  • Snapr may post comments asking for clarification if it encounters uncertainties in the issue context.
  • Snapr continues to monitor discussion and incorporate feedback before finalizing the pull request.

Once the pull request is opened, Snapr removes the snapr/phase: develop label and continues to track that PR. Any new comments, suggestions, or code review feedback left on the pull request will be addressed automatically by Snapr, by replying with clarifications or by applying follow‑up changes to the branch as needed.

To exit development mode without opening a PR, remove the snapr/phase: develop label.

review

The /snapr review command runs a pull request review workflow on the current GitHub pull request. It treats the pull request title, description, author, and diff as the review goal and uses your project’s code, documentation, tests, and any existing discussion as context to generate a thorough review. Snapr ensures comments do not contradict previous feedback and replies only to threads where it has not yet responded.

/snapr review
💡 Tip: Slash‑invoke /snapr review only on GitHub pull requests. It has no effect on issues.

When /snapr review is invoked, Snapr adds the GitHub label snapr/phase: review to the pull request to mark the review phase. While that label remains set:

  • Snapr posts new review comments on relevant lines according to the diff hunk and avoids duplicating comments it has already made.
  • Snapr replies to existing comment threads where it has not yet responded, preserving continuity in the discussion.

To exit review mode without completing a review session, remove the snapr/phase: review label.

refine

The /snapr refine command runs an issue refinement workflow on the current GitHub issue. It interprets the issue’s title and description as the refinement goal and uses your project’s code, documentation, tests, and any comments or discussion in the issue thread as context. The refinement comment breaks down the issue into smaller, actionable tasks, just like a human would. This is especially useful for breaking down large or complex issues into smaller, manageable tasks.

/snapr refine
💡 Tip: Slash‑invoke /snapr refine only on GitHub issues. It has no effect in pull request comments.

When /snapr refine is invoked, Snapr adds the GitHub label snapr/phase: refine to the issue to mark the refinement phase. While that label remains set:

  • Snapr listens to new comments or clarifications and updates its refinement plan in real time.
  • You can continue interacting with Snapr by adding comments without needing to reissue the command.

To exit refine mode, simply remove the snapr/phase: refine label and Snapr will stop monitoring the issue.

file

The /snapr file command runs an issue file-splitting workflow on the current GitHub issue. It interprets the issue’s title and description as an umbrella goal and uses your project’s code, documentation, tests, and any comments or discussion in the issue thread as context. The file command proposes a set of child issues to be created for each actionable task identified from the umbrella issue.

After refining a large or complex issue, /snapr file can automatically create GitHub issues for each task. If more context is required before issue creation, it will ask for clarification in the discussion instead of generating issues. Typically, this command is used after entering the refine phase to turn refined tasks into actual issues.

/snapr file
💡 Tip: Slash‑invoke /snapr file only on GitHub issues. It has no effect in pull request comments.

When /snapr file is invoked, Snapr adds the GitHub label snapr/phase: file to the issue to mark the file-splitting phase. While that label remains set:

  • Snapr analyzes the issue discussion and automatically creates GitHub issues for each identified task.
  • If more context or clarification is needed before creating issues, Snapr will ask questions in the discussion instead of creating issues.

To exit file mode, simply remove the snapr/phase: file label and Snapr will stop monitoring the issue.