| name | prepare-pr |
| description | Thorough pre-merge audit — dependency graph, correctness, conventions, security, test coverage, and improvement suggestions |
| disable-model-invocation | true |
| argument-hint | |
Prepare PR
Perform a thorough pre-merge audit of the current changes. Start from the diff, then follow the dependency graph to understand how the changes fit into the broader system. Check correctness, security, MESA conventions, test coverage, and suggest improvements.
Scope: $ARGUMENTS
Step 1: Gather Changes
Get all changes on the branch compared to main:
- Run
git diff main to capture all committed and uncommitted changes on the branch
Also run git status to identify new untracked files.
Read the diff output AND the full content of every changed file.
Step 2: Follow the Dependency Graph
Starting from the changed files, trace connections to understand the full impact:
- Read related files within the same module (State, Event, Screen, StateHolder, UI, factories, interactors)
- Read interfaces being implemented or extended
- Read consumers of changed APIs — if a public interface, use case, or domain type was modified, find the modules that depend on it and check they are compatible
- Read
build.gradle.kts files for dependency declarations when module boundaries are relevant
The goal is to understand how the changes integrate with everything that touches them — not to review the entire codebase, but to verify nothing is broken or inconsistent at the boundaries.
Step 3: Correctness & Logic Review
Present findings with checkboxes as you go:
Logic & Correctness
Best Practices
Security
For a deeper security audit, run /security-check.
General Quality
Step 4: Convention Review
Present findings with checkboxes as you go:
MESA / Trapeze Conventions
Strata Conventions
Module Structure & Clean Architecture
DI (Metro)
License
Step 5: Test Coverage Analysis
Unit Tests (src/test/)
UI Tests (src/androidTest/)
Flag any gaps.
Step 6: Improvement Suggestions
Beyond issues, suggest improvements that are directly relevant to the changed code:
- Code simplification opportunities
- Better use of MESA/Strata patterns
- Performance considerations (unnecessary recompositions, missing
remember, etc.)
- Accessibility (content descriptions, semantic properties)
- Better error handling or user feedback
Step 7: Report
Present a structured report:
Summary
Brief overview of the changes and overall assessment (ready to merge, needs work, etc.).
Checklist Results
Show all completed checklists from Steps 3-5 with pass/fail/not-applicable indicators.
Blocking Issues
Must fix before merge. Include file path and line references.
Warnings
Should fix. Style issues, potential problems, missing patterns.
Missing Tests
For each file missing tests or test cases:
- File path
- What specific tests are needed (unit, UI, or both)
- Suggest running
/add-tests @<filepath> to generate them
Suggestions
Improvement opportunities. These are optional but recommended.