Skip to content

Pull Request Guide

This guide covers the pull request workflow for HoloMUSH, including creation, review, and merge processes.

All code changes go through pull requests. This ensures:

  • Code quality through automated and manual review
  • Knowledge sharing across the team
  • Traceable history of changes and decisions
RequirementDescription
Tests passRun task test locally
Linting passesRun task lint to catch issues early
Follow commit formatUse conventional commits (see Commits)
Keep PRs focusedOne logical change per PR

Before creating a PR, verify:

  • Tests pass locally (task test)
  • Linting passes (task lint)
  • Code is formatted (task fmt)
  • New code has appropriate test coverage (> 80%)
  • Documentation updated if behavior changed
  • No debug code or commented-out code left behind
  • Code is as simple as possible

Before pushing to a PR branch, run task pr-prep to mirror every CI job locally. The gate is serialized via a lockfile under ${TMPDIR:-/tmp}/holomush-pr-prep/ — on macOS this is typically per-user (because $TMPDIR is user-scoped); on Linux it is typically machine-global (because /tmp is shared). If you see an “another pr-prep is running” error, wait for the holder to finish or kill its process tree (see Pre-Push Quality Gate for details — note that kill <pid> alone is insufficient because descendants inherit the lock fd).

Use descriptive branch names:

PatternExampleUse Case
feature/<name>feature/add-dark-modeNew features
fix/<name>fix/login-redirectBug fixes
refactor/<name>refactor/auth-middlewareCode improvements
docs/<name>docs/api-referenceDocumentation

Follow conventional commit format for PR titles:

<type>(<scope>): <description>

Examples:

  • feat(plugin): add Lua script hot reload
  • fix(telnet): handle connection reset gracefully
  • docs(api): add authentication examples
## Summary
Brief description of what this PR does and why.
## Changes
- Bullet points of specific changes
- Include file paths for significant changes
## Testing
How was this tested? Include:
- Unit tests added/modified
- Manual testing performed
- Edge cases considered
## Related Issues
- Closes #123
- Related to #456

All PRs automatically trigger:

  1. CI Pipeline - Tests, linting, formatting checks
  2. Coverage Analysis - Ensures coverage thresholds met
AreaFocus
CorrectnessDoes the code do what it’s supposed to?
TestingAre there adequate tests?
ClarityIs the code easy to understand?
PatternsDoes it follow project conventions?
SecurityAre there any security concerns?
PerformanceAny obvious performance issues?

When addressing review comments:

  1. Fix the issue - Make the requested change
  2. Explain if declining - Provide reasoning if not making a change
  3. Ask for clarification - If feedback is unclear, ask questions
  4. Don’t argue - If you disagree, discuss constructively
<type>(<scope>): <description>
[optional body]
[optional footer]
TypeDescription
featNew feature
fixBug fix
docsDocumentation changes
styleFormatting (no code change)
refactorCode change without feature/fix
perfPerformance improvement
testAdding or updating tests
buildBuild system or dependencies
ciCI configuration
choreOther changes (e.g., .gitignore)
RequirementDescription
Be atomicOne logical change per commit
Have clear messageDescribe what and why, not how
Never include secretsNo credentials, tokens, or keys
Reference issuesUse Closes #123 or Related to #456

Before merging, ensure:

RequirementDescription
CI passingAll automated checks green
Review approvalAt least one approving review
Up to dateRebased on latest main
Squash mergeAll merges to main are squash merges

All merges to main use squash merge to maintain a clean, linear history:

  • Each PR becomes one atomic commit on main
  • Easier to bisect, revert, and understand history
  • WIP commits and fixups don’t clutter the main branch
  • Commit message can be refined at merge time
IssueSolution
Test failuresRun task test locally, fix failing tests
Lint errorsRun task lint, address each error
Format issuesRun task fmt, commit formatted files
Coverage dropAdd tests for new code paths

If your PR isn’t getting reviewed:

  1. Ensure CI is passing
  2. Check PR description is complete
  3. Keep PR size reasonable (< 500 lines ideal)
Terminal window
# Run before creating PR
task test # Run tests
task lint # Run linters
task fmt # Format code
# Create PR
gh pr create --title "type(scope): description" --body "..."
# View PR status
gh pr view
# Request review
gh pr edit --add-reviewer username
1. Create feature branch
2. Make changes with atomic commits
3. Run tests and lints locally
4. Create PR with clear description
5. Address CI failures
6. Get review and address findings
7. Get approval and merge

Three adversarial read-only sub-agents (design-reviewer, plan-reviewer, code-reviewer, plus crypto-reviewer / abac-reviewer when applicable) gate hand-offs BEFORE the PR surface. They complement pr-review-toolkit:review-pr (which runs on the PR itself) by providing an earlier, in-session review pass. The gate tables (which agent fires when, and the READY / NOT READY contract) live in the root CLAUDE.md under “Pre-Push Review Gates”.

Agent definitions live in .claude/agents/; slash commands in .claude/commands/; persistent memory in .claude/agent-memory/ (checked into VCS).