Autonomous AI Pair Programming & GitHub Assistant for Vibe Coding
version 1.0.1
- Overview
- Multi-Developer & Team Attribution
- Prerequisites & GitHub Setup (Essential)
- Quick Installation & Automated Keybinding Setup (30 Seconds)
- What Happens on GitHub? (The Lifecycle)
- Complete Command & Trigger Reference
- IDE Shortcuts & Snippets Reference
- End-to-End Walkthrough Tutorial
- Governance & Safety:
--cautiousvs--nocautious - Team Collaboration & Best Practices
- Uninstallation & Clean Removal Guide
- Troubleshooting & FAQ
The MM GitHub Assist Suite turns your AI assistant into an agile pair-programming team:
- π§
mm_vc_agent(MM Vibe Code Agent / Architect): Reads your codebase, analyzes multi-modal bug screenshots, writes clean code adhering to your architecture, and verifies builds locally. - π
mm_gh_agent(MM GitHub Assistant / Release Manager): An intelligent GitHub assistant that communicates with GitHub, opens Issues with root cause blueprints, creates feature branches, submits Pull Requests, logs iteration notes, and safely squash-merges into your main branch.
When multiple team members (e.g., Alice, Bob, and Mustafa) use the MM Dual-Agent Suite on the same project:
- Automatic Identity Detection: The agent inspects the active developer's Git config (
git config user.name) and GitHub login (gh auth status). - Attributed PRs & Comments: Every PR description and comment is clearly branded with the developer's handle:
### π€ [mm_gh_agent for @mustafamalik] Β· Status Update - No Collision: Each developer gets unique branch names (
fix/142-mustafa-expense-overflow), ensuring zero branch collisions between teammates.
Before using the agents, your local environment needs permissions to talk to GitHub. You have two easy options:
The GitHub CLI allows the agents to run securely using your local authenticated credentials without exposing tokens.
-
Install GitHub CLI:
- Windows (Winget / Chocolatey / Scoop):
winget install --id GitHub.cli # or: choco install gh
- macOS (Homebrew):
brew install gh
- Linux (apt):
sudo apt install gh
- Windows (Winget / Chocolatey / Scoop):
-
Reload Terminal Session (Windows Only):
β οΈ Important on Windows: New terminal sessions or existing windows need theirPATHrefreshed after installinggh. Run:$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
(Or simply close and reopen your PowerShell / IDE terminal).
-
Authenticate with your GitHub account:
gh auth login
Follow the prompts: Choose
GitHub.comβHTTPSorSSHβLogin with a web browser. -
Verify it works:
gh auth status
(You should see:
Logged in to github.com account <username>)
If you prefer using a token instead of the GitHub CLI:
- Go to GitHub Settings β Developer Settings β Personal Access Tokens β Fine-grained tokens (or click here).
- Click Generate new token.
- Set Repository access: Select
Only select repositoriesand choose your project. - Under Permissions, grant:
- Issues:
Read and write - Pull requests:
Read and write - Contents:
Read and write(to allow branch creation and pushes)
- Issues:
- Copy your token (starts with
github_pat_...). - Place it in a file named
.env.mm_agent.localin your project root:(Note: The installer automatically addsGITHUB_TOKEN=github_pat_your_token_here
.env.mm_agent.localto.gitignoreso your key is never committed).
To allow mm_gh_agent to manage branches, issues, and PRs without interrupting you with repetitive terminal confirmation dialogs, add these specific 2-to-3 token command prefixes to your IDE's auto-approved command list:
| Category | Specific Command Prefix to Allow | Purpose |
|---|---|---|
| GitHub Issues | gh issue create, gh issue view, gh issue close |
Create, read, and close issues |
| GitHub Pull Requests | gh pr create, gh pr view, gh pr merge |
Open PRs, check status, and squash-merge |
| GitHub Auth Check | gh auth status |
Verify authentication |
| Git Branching | git checkout, git branch |
Switch/create feature branches and sync main |
| Git Status & Staging | git status, git add |
Check workspace state and stage modified files |
| Git Commit & Push/Pull | git commit, git push, git pull |
Create tracked commits, push PRs, pull latest |
| Pre-Merge Verification | npm run build, npx tsc |
Sanity validation before merging |
- Google Antigravity IDE: Go to Settings β Advanced β Allow List Terminal Commands, and enter the specific prefixes from the table above (e.g.
gh issue create,gh pr create,gh pr merge,git checkout,git commit,git push,git pull). - Cursor: Go to Settings β Features β Terminal / Composer, and add the exact prefixes above to auto-approved commands.
- VS Code (Cline / Roo Code / Copilot): In extension settings under Auto-approved terminal commands, add the specific prefixes above.
Run the automated installer inside any existing project workspace:
npx mm-github-assist initThe interactive CLI will automatically:
- Detect your active code editor (Antigravity, Cursor, Claude Code, VS Code, Windsurf).
- Validate your GitHub connection (
gh auth status). - Auto-Inject
mm_Tagged Configs: Injects.vscode/mm_snippets.code-snippets, keybindings tagged with/* MM_KEYBINDINGS_START */, and rules files without touching existing user configurations. - Provision GitHub labels (
agent-generated,type:bug,type:feature,status:in-progress).
Here is exactly what the agents do on your GitHub repository during a task:
sequenceDiagram
autonumber
actor Dev as Developer (You)
participant VC as mm_vc_agent (Coder)
participant GH as mm_gh_agent (GitHub Assistant)
participant Remote as GitHub.com
Dev->>VC: 1. "MM_BUG [issue] + screenshot" or "MM_FEAT"
VC->>Dev: 2. Initial Root Cause + Target Files + Fix Blueprint
rect rgb(240, 245, 255)
note over Dev,VC: Pre-Execution Alignment Loop (HITL)
Dev->>VC: Developer Feedback / File adjustments / Scope changes
VC->>Dev: Updated & Refined Action Plan
end
Dev->>GH: 3. "PROCEED" (Final HITL Approval on Aligned Plan)
GH->>Remote: 4. Creates Issue #142 (Embeds Final Aligned Blueprint)
GH->>GH: 5. git checkout -b fix/142-slug
VC->>VC: 6. Applies code changes & validates locally
VC->>GH: 7. Ready for PR
GH->>Remote: 8. git push + Opens PR #143 (Closes #142)
Note over Dev,Remote: Live Local QA Testing
Dev->>GH: 9. "MM_BUGFIXED #142"
GH->>GH: 10. Runs sanity build check
GH->>Remote: 11. Squash-merges PR #143 & closes Issue #142
GH->>GH: 12. git checkout main && git pull
GH->>Dev: 13. All synced & resolved!
- GitHub Issues: An issue is opened with label
agent-generatedand title[BUG] <Summary>. The body contains the complete Root Cause Analysis, list of Target Files, and Final Aligned Blueprint. - GitHub Branches: A clean branch
fix/<issue-id>-<operator>-<slug>is created. - GitHub Pull Requests: A PR is opened with a description linking
Closes #<id>, showing full diffs and changelogs. - Issue / PR Comments: Every iteration note is logged with badge
### π€ [mm_gh_agent for @username] Β· Status Update. - Clean Merges: On sign-off, PR is squash-merged, remote branch is deleted, and your local workspace is updated.
| Command | Trigger Agent | Purpose & What It Does | Example |
|---|---|---|---|
MM_ON / MM_ENABLE |
Suite Control | Activates the automated MM Dual-Agent pair programming and GitHub tracking. | MM_ON |
MM_OFF / MM_DISABLE |
Suite Control | Pauses the MM suite for standard, unconstrained AI chat without issue/PR tracking. | MM_OFF |
MM_BUG [details] |
mm_vc_agent |
Starts bug investigation. Ingests screenshots/logs, inspects code, and presents root cause & fix plan. | MM_BUG Tooltip gets clipped on mobile view in Analytics |
MM_FEAT [details] |
mm_vc_agent |
Starts feature/enhancement flow. Analyzes architecture, plans new files, and outlines implementation. | MM_FEAT Add export CSV button with date range filter |
MM_GETISSUE |
mm_gh_agent |
Instantly retrieves active Issue #, PR link, active branch, and status if chat is long. | MM_GETISSUE |
MM_BUGFIXED #<id> |
mm_gh_agent |
Signals QA passed for a bug. Runs pre-merge build checks, squash-merges PR, closes issue, and pulls main. |
MM_BUGFIXED #142 (or MM_BUGFIXED) |
MM_FEATDONE #<id> |
mm_gh_agent |
Signals QA passed for a feature. Verifies build, squash-merges PR, closes issue, and syncs branch. | MM_FEATDONE #143 (or MM_FEATDONE) |
--cautious |
Flag | Enforces strict confirmation at every individual transition step. | MM_BUG --cautious Fix chart overflow |
--nocautious |
Flag | Fast-tracks execution, pausing only at Initial Plan and Final QA. | MM_BUG --nocautious Fix chart overflow |
Once installed, use these built-in snippets in your IDE chat or files:
| Snippet Shortcut | Action | What Gets Injected |
|---|---|---|
mmon |
Press Tab | MM_ON |
mmoff |
Press Tab | MM_OFF |
mmbug |
Press Tab | MM_BUG: |
mmfeat |
Press Tab | MM_FEAT: |
mmgetissue |
Press Tab | MM_GETISSUE |
mmfix |
Press Tab | MM_BUGFIXED # |
mmdone |
Press Tab | MM_FEATDONE # |
(Keybindings like Ctrl+Alt+M are auto-configured in your IDE during installation).
In your IDE chat, paste a screenshot or error and type:
MM_BUG The expense breakdown chart tooltip flickers and gets cut off on mobile screens.
mm_vc_agent will inspect your components, identify the CSS / component issue, and present a Fix Plan with Root Cause and Target Files.
You can review the plan and provide feedback:
Also make sure to check the dark-mode tooltip styling in expense-analytics-dark.css.
mm_vc_agent refines the blueprint and presents the updated target files.
When you are fully aligned with the blueprint, reply:
PROCEED
mm_gh_agent creates GitHub Issue #105 (posting the complete aligned Root Cause Analysis and Blueprint in the description) and switches to branch fix/105-mustafa-chart-tooltip-flicker.
mm_vc_agent writes the fix and verifies the build. mm_gh_agent commits, pushes, and creates Pull Request #106.
You test on your local dev server (npm run dev). If you notice something minor:
The tooltip looks great, but let's make the background slightly darker.
mm_vc_agent adjusts the color, and mm_gh_agent pushes an update commit.
If you've had a long conversation and forgot the issue number:
MM_GETISSUE
mm_gh_agent prints the active Issue #105 and PR #106 summary card with operator attribution.
Once tested and verified, type:
MM_BUGFIXED #105
mm_gh_agent runs a pre-merge sanity check, squash-merges PR #106, closes Issue #105, checks out main, and runs git pull.
--cautious(Default / Maximum Safety): The agents will ask for your explicit confirmation before:- Creating an Issue and Branch on GitHub.
- Modifying files in the workspace.
- Pushing code and opening a PR.
- Merging the PR to main.
--nocautious(Fast Execution): The agents will proceed autonomously from Plan approval directly to PR creation, stopping only when ready for your local manual testing.
- Clear Attribution: All PRs and comments are tagged
[mm_gh_agent for @username]or[mm_vc_agent for @username], ensuring human teammates can immediately see agent contributions in the PR timeline. - Never Commit Secrets: Ensure
.env.mm_agent.localremains in.gitignore. - No Direct Pushes to Main: All code must go through a branch and PR flow, preserving CI/CD integrity.
- Squash Merges: Default squash-merging keeps your main branch git history clean and readable.
If you ever wish to remove the MM Dual-Agent Suite from your project workspace, you can run the automated uninstaller:
npx mm-github-assist uninstall- β
Surgically strips injected MM shortcuts bounded by
/* MM_KEYBINDINGS_START */and/* MM_KEYBINDINGS_END */from.vscode/keybindings.json. - β
Deletes
.vscode/mm_snippets.code-snippets. - β
Removes all generated agent rules (
.cursor/rules/mm_dual_agent.mdc,.windsurfrulesMM blocks,.agents/skills/mm_dual_agent/). - β
Prompts to securely delete or archive
.env.mm_agent.local.
- π‘οΈ Your source code, Git history, closed GitHub issues, and merged Pull Requests remain 100% intact and untouched.
- Fix: Install GitHub CLI (
winget install GitHub.cliorbrew install gh), restart your terminal/IDE, and rungh auth login.
- Fix: Run
gh auth status. If expired, rungh auth refresh -h github.com -s repoor check yourGITHUB_TOKENin.env.mm_agent.local.
- Fix:
mm_gh_agentwill warn you before switching branches. Stash your changes withgit stashor commit them before starting a newMM_BUGorMM_FEAT.
- Yes! As long as your GitHub account or PAT has access to the private repository, the suite operates identically.
- Fix: Configure
base_branchin.env.mm_agent.exampleor pass--base develop.
Released under the MIT License. Built with β€οΈ for the AI developer community.