Files
mcp-memory/agent-rules/global_subagents.md
T
Riz Ashraf 8f924b793a feat(reconciliation): implement deterministic state reconciliation engine and post-commit hook
- Implement ReconciliationEngine in server/src/handlers/reconciliation.rs
- Auto-transition ADRs to implemented, resolve tech debts, and cascade task unblocking
- Ingest git commit events via POST /api/git/commit and scripts/git-reconcile.py post-commit hook
- Add universal pagination, search filtering, and keyboard navigation to dashboard
- Implement non-destructive task TTL expiry sweeper and gate verification
- Implements: ADR-0102, ADR-0103
2026-10-07 19:00:44 +01:00

40 lines
3.4 KiB
Markdown

---
name: global-subagents
description: Defines the standard global subagents (MemoryLibrarian, PrePushAuditor, BugDiagnostician) that must be dynamically invoked for standard workflow steps.
always_on: true
---
# Antigravity Subagents
Invoke these dynamically using the `invoke_subagent` tool. Use `send_message` to communicate.
**CRITICAL:** Before invoking any of these custom subagents for the first time in a conversation, you MUST define them using the `define_subagent` tool with the specific permissions they require.
## 1. MemoryLibrarian
* **Role:** The Knowledge Graph Curator
* **Permissions:** You MUST define this subagent with `enable_mcp_tools: true` and `enable_write_tools: true` so it can autonomously update the graph without hitting permission boundaries.
* **Trigger:** After completing a coding task, refactor, or bug fix.
* **Action:** Send a message detailing the work (with exact git hashes and branches). The Librarian will use MCP tools (`log_code_change`, `log_error_fix`, `create_entities`, etc.) in the background to organize the knowledge graph. **CRITICAL:** The Librarian MUST inspect recent git commits and commit messages for any referenced ADRs (e.g. `ADR-\d+`), and automatically reconcile their lifecycle status in `decisions` to `implemented` with the exact `git_commit` and `git_branch`. No ADR whose code has been committed should ever remain in `accepted` status.
## 2. PrePushAuditor
* **Role:** Quality Gate Enforcer
* **Permissions:** You MUST define this subagent with `enable_write_tools: true` so it can run tests and scripts.
* **Trigger:** Before executing `git push`.
* **Action:** The Auditor runs pre-commit hooks, formatters, linters, unit tests (`uv`, `cargo`) in a branched workspace, checks for uncommitted changes, and verifies if the Git history requires squashing (using `git reset --soft`). It returns a GO / NO-GO push decision to prevent violating push-safety rules.
## 3. BugDiagnostician
* **Role:** Observability & Root Cause Analyst
* **Permissions:** You MUST define this subagent with `enable_write_tools: true`.
* **Trigger:** When facing complex architectural bugs, race conditions, or eventually consistent state issues that are hard to track down.
* **Action:** Instead of guessing or patching blindly, this subagent creates diagnostic scripts, enhances reproducers with detailed logs, and isolates the bug. Once root cause is definitively proven, it hands the diagnostic evidence back to you to implement the fix.
## 4. ScrumMaster
* **Role:** Project & Task Orchestrator
* **Permissions:** You MUST define this subagent with `enable_mcp_tools: true` and `enable_write_tools: true`.
* **Trigger:** When we start a new feature or finish a task.
* **Action:** Passively monitors the `memory://tasks/active` and `memory://milestones` MCP resources. Creates tasks, organizes milestones, and updates statuses when criteria are met using `tasks` and `milestones`.
## 5. DevOpsSRE
* **Role:** Environment & Handoff Manager
* **Permissions:** You MUST define this subagent with `enable_mcp_tools: true` and `enable_write_tools: true`.
* **Trigger:** When dependencies change (e.g., you modify `Cargo.toml`, `package.json`, or `.env`) or at the end of a session.
* **Action:** Updates environment fingerprints when dependency files change. At the end of a session, it executes the `handoff_routine` MCP prompt to automatically generate standup reports and handoff memos.