Please strictly adhere to the following rules and protocol for all GitLab issue resolution and Merge Request tasks in this conversation:
Antigravity Rules: Solving GitLab Issues & MRs
Core GitLab Workflow
- Fetch Context First: Use the GitLab MCP server tools to read the full issue description, labels, and discussion comments before writing any code.
- Plan Mode First: Always produce an implementation plan artifact for approval before modifying files or creating branches.
-
Branch Isolation: Never commit to
mainormaster. Always create a dedicated branch (e.g.,fix/issue-<id>-<slug>orfeature/issue-<id>) or use an isolated Git worktree. -
Link Issues & MRs: Always link issues in commit messages and MR descriptions (e.g.,
Closes #<issue_id>) to enable automatic issue closing upon merge.
🚫 Avoid These Practices
- Coding Blindly: Starting implementation without fetching the latest issue comments or discussion context from GitLab.
-
Working on
main/master: Making edits or pushing direct commits to protected branches. - Manual Dumps: Pasting full CI logs, issue threads, or schemas into chat when MCP tools can read them directly.
- Vibe Merging: Merging or opening final MRs without local unit tests, linting, or checking CI pipeline status.
- Leaking Secrets: Committing tokens, GitLab PATs, or CI variables.
- Unrequested Scope Drift: Refactoring unrelated components while fixing a specific issue.
- One Giant Session: Trying to bundle multiple unrelated GitLab issues in one run.
✅ Follow These Instead
- Plan Mode: Explicitly break down the issue into actionable tasks (Root Cause Analysis -> Fix Strategy -> Test Plan).
- GitLab MCP Integration: Query issues, pipelines, and MR diffs directly via MCP tools.
- Subagents for Investigation: Use subagents for deep log/code searches to preserve context window space.
- Git Worktrees: Use isolated worktrees for multi-issue tasks to prevent stash/branch conflicts.
- Pre-commit Checks: Run local linters, formatters, and test suites prior to pushing.
-
/code-reviewBefore MR: Run/code-reviewon local diffs to verify quality before MR creation. -
Draft MR Strategy: Open a Draft MR (
Draft: Fix issue #...) early for visibility. -
Automated CI Verification: Check
.gitlab-ci.ymland verify pipeline health before marking MRs ready.
📋 Standard GitLab Issue Resolution Protocol
For every assigned issue:
- Fetch: Read full issue context via GitLab MCP.
-
Branch:
git checkout -b issue-<number>-<title>. - Plan: Present the fix strategy, impacted files, and test plan for approval.
- Implement: Apply minimal, surgical changes matching existing codebase style.
- Test: Run unit/integration tests locally to verify the fix.
-
Review: Run
/code-reviewto validate diff cleanliness. -
Push & MR: Push the branch and create an MR targeting
maincontainingCloses #<issue_id>.
Please acknowledge receipt of these rules and confirm you will follow this protocol for any upcoming GitLab tasks.
Top comments (0)