{"id":51951718,"url":"https://github.com/dubsopenhub/grid-medic","last_synced_at":"2026-07-29T06:01:28.924Z","repository":{"id":350517651,"uuid":"1174242378","full_name":"DUBSOpenHub/grid-medic","owner":"DUBSOpenHub","description":"🚑 Self-healing meta-agent that monitors, repairs, and continuously improves your AI agent fleet","archived":false,"fork":false,"pushed_at":"2026-04-10T17:33:32.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-07T22:21:29.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DUBSOpenHub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-06T08:13:12.000Z","updated_at":"2026-05-21T19:41:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DUBSOpenHub/grid-medic","commit_stats":null,"previous_names":["dubsopenhub/grid-medic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DUBSOpenHub/grid-medic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DUBSOpenHub%2Fgrid-medic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DUBSOpenHub%2Fgrid-medic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DUBSOpenHub%2Fgrid-medic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DUBSOpenHub%2Fgrid-medic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DUBSOpenHub","download_url":"https://codeload.github.com/DUBSOpenHub/grid-medic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DUBSOpenHub%2Fgrid-medic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36020486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-29T02:00:04.910Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-29T06:01:27.278Z","updated_at":"2026-07-29T06:01:28.903Z","avatar_url":"https://github.com/DUBSOpenHub.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚑 Grid-Medic\n\n\u003e *Your agents just ran a mission. Who's checking if they came back healthy?*\n\nGrid-Medic is a self-healing meta-agent that monitors, repairs, and continuously improves your AI agent fleet. It reads scan outputs, diagnoses failures, proposes minimal fixes, validates every change across multiple AI models, and auto-applies only what passes consensus.\n\nThink of it as the immune system for your agents. They do the work. Grid-Medic keeps them healthy.\n\n---\n\n🌍 **Works with any agent.** Scans `.agent.md` prompt files for Copilot CLI, but the patterns apply to any AI agent framework. Zero dependencies beyond the Copilot CLI itself.\n\n🏭 **Built with [Dark Factory](https://github.com/DUBSOpenHub/dark-factory)** — 6 AI agents, [sealed-envelope testing](https://github.com/DUBSOpenHub/shadow-score-spec), validated and shipped.\n\n🔬 **Pairs with [Agent X-Ray](https://github.com/DUBSOpenHub/agent-xray)** — X-Ray scans your agents for weaknesses. Grid-Medic fixes what it finds.\n\n---\n\n## Why This Tool?\n\nAgents degrade. APIs change, scoring goes stale, edge cases pile up, new capabilities emerge that your agents don't leverage. Manually reviewing and updating 8+ agent prompt files is tedious and error-prone.\n\nGrid-Medic automates the entire maintenance lifecycle:\n\n- **Self-healing** — detects and fixes API errors (403 misclassification, deprecated endpoints, malformed queries) without human intervention\n- **Multi-model validation** — every change is reviewed by 3 AI models before being applied. No cowboy commits to your agent prompts\n- **Full auditability** — every diagnosis, proposal, validation result, and applied change is logged with rationale\n- **Fleet health tracking** — quality scores per agent, trend lines over time, a dashboard showing which agents need attention\n\n## 🚀 Quick Start\n\nGrid-Medic runs as a [Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-copilot-cli) custom agent.\n\n### Install\n\n```bash\n# Copy the agent file to your Copilot agents directory\ncurl -fsSL https://raw.githubusercontent.com/DUBSOpenHub/grid-medic/main/grid-medic.agent.md \\\n  -o ~/.copilot/agents/grid-medic.agent.md\n```\n\nRestart your Copilot CLI session (`/exit` then `copilot`). Grid-Medic will appear in your agent list.\n\n### Run\n\nOpen Copilot CLI and say any of these:\n\n```\ngrid-medic diagnose                    # Scan all agents for issues\ngrid-medic improve security-audit      # Focus on one agent\ngrid-medic review-log                  # See improvement history\ngrid-medic /path/to/scan-output        # Analyze sweep results\n```\n\nThat's it. Point it at your agents and let it work.\n\n## 🔧 The 5-Phase Improvement Cycle\n\n```\n  📥 Input          🔍 Diagnose        💊 Prescribe       🧪 Validate         ✅ Apply\n  ─────────── ──▶ ─────────── ──▶ ─────────── ──▶ ─────────── ──▶ ───────────\n  diagnose         Read agents        Generate          Send to 3 models     Auto-apply\n  improve X        Detect issues      minimal fixes     (2/3 consensus)      + log everything\n  scan output      Categorize         Exact old/new     Approve / Reject     Rollback if broken\n```\n\n### Phase 1 — Diagnosis\n\nReads all agent files from `~/.copilot/agents/` and categorizes issues:\n\n| Category | Icon | What It Catches |\n|----------|------|-----------------|\n| API Fix | 🔴 | API calls returning errors, deprecated endpoints, malformed commands |\n| Logic Fix | 🔴 | Missing fallback logic, edge cases that crash the agent |\n| Scoring | 🟡 | Formulas that produce unintuitive or unfair results |\n| Output | 🟡 | Missing evidence citations, broken formatting |\n| Prompt Clarity | 🟡 | Ambiguous instructions causing inconsistent behavior |\n| Performance | 🟡 | Redundant API calls, sequential ops that could be parallel |\n| New Dimension | 🟢 | New data sources or analysis dimensions to add |\n\n### Phase 2 — Prescription\n\nFor each issue, Grid-Medic generates a specific, minimal improvement with exact old/new text. No rewrites. Surgical edits only.\n\n### Phase 3 — Multi-Model Validation\n\nEvery proposed change gets sent to 3 AI models in parallel:\n\n```\n  💊 Proposed Change\n      │\n      ├──▶ Claude Sonnet    ──▶ ✅ 8/10\n      ├──▶ GPT Codex        ──▶ ✅ 7/10\n      └──▶ Gemini Pro       ──▶ ❌ 4/10\n                                    │\n                            2/3 = Apply with note\n```\n\n| Consensus | Action |\n|-----------|--------|\n| 3/3 Approve | Auto-apply immediately |\n| 2/3 Approve | Apply with \"majority approved\" note |\n| 1/3 Approve | Log as proposed, don't apply |\n| 0/3 Approve | Reject and log reason |\n\n### Phase 4 — Application\n\nApproved changes are applied to agent files with automatic rollback if anything breaks. YAML frontmatter is validated after every edit.\n\n### Phase 5 — Logging\n\nEverything is logged to `~/.copilot/grid-medic-log.md` and tracked in SQL for cross-session trend analysis.\n\n## 📊 Sample Output\n\n```\n🚑 Grid-Medic Report\n══════════════════════════════════════════════════════════\n\n📋 DIAGNOSIS\n  Agents scanned:     8\n  🔴 Errors:          1\n  🟡 Inefficiencies:  2\n  🟢 Enhancements:    1\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n💊 IMPROVEMENTS\n\n  [🔴] security-audit: Fix code-scanning 403 response handling\n    Validation: {Sonnet: ✅ 9/10} {Codex: ✅ 8/10} {Gemini: ✅ 9/10} → APPLIED ✅\n\n  [🟡] msft-impact: Add path: filter to org:microsoft code search\n    Validation: {Sonnet: ✅ 8/10} {Codex: ✅ 7/10} {Gemini: ✅ 8/10} → APPLIED ✅\n\n  [🟡] octoscanner: Add retry logic for stats/commit_activity 202\n    Validation: {Sonnet: ✅ 9/10} {Codex: ✅ 8/10} {Gemini: ✅ 7/10} → APPLIED ✅\n\n  [🟢] compliance-inspector: Add SPDX license list version check\n    Validation: {Sonnet: ✅ 6/10} {Codex: ❌ 4/10} {Gemini: ✅ 5/10} → PROPOSED\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n📊 AGENT HEALTH DASHBOARD\n  Agent                  Quality  Issues  Trend\n  ──────────────────────────────────────────────\n  repo-detective         9/10     0       → Stable\n  security-audit         8/10     0       ↑ Fixed (was 6/10)\n  contact-info           9/10     0       → Stable\n  social-presence        8/10     0       → Stable\n  msft-impact            8/10     0       ↑ Fixed (was 6/10)\n  compliance-inspector   8/10     1       → Stable\n  full-sweep             8/10     0       → Stable\n  octoscanner            8/10     0       ↑ Fixed (was 7/10)\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n📈 CUMULATIVE STATS\n  Total improvements applied:  3\n  Total improvements proposed: 1\n  Fleet quality average:       8.3/10\n\n🚑 Grid-Medic signing off.\n```\n\n## 🛡️ Safety Rules\n\n- **Never break a working agent.** If uncertain, propose but don't apply.\n- **Validate everything.** No change is applied without multi-model consensus (≥ 2/3).\n- **Log everything.** Every diagnosis, proposal, validation, and application is recorded.\n- **Minimal changes.** Surgical edits only. Never rewrite an entire agent file.\n- **Preserve personality.** Agent codenames, emojis, and voice are sacred.\n- **Evidence-based.** Improvements must be justified by observed failures.\n- **Rollback on failure.** If a change breaks the file, immediately revert.\n- If no issues are found, say so and sign off. Don't invent problems.\n\n## 🔬 Works Great With\n\n| Tool | How They Work Together |\n|------|----------------------|\n| [Agent X-Ray](https://github.com/DUBSOpenHub/agent-xray) | X-Ray scans for weaknesses. Grid-Medic fixes them. |\n| [Groundhog Day](https://github.com/DUBSOpenHub/groundhog-day) | Groundhog backs up your skills. Grid-Medic keeps agents healthy. |\n| [Dark Factory](https://github.com/DUBSOpenHub/dark-factory) | Dark Factory builds agents. Grid-Medic maintains them post-deploy. |\n\n## License\n\nMIT\n\n---\n\n🐙 Created with 💜 by [@DUBSOpenHub](https://github.com/DUBSOpenHub) with the [GitHub Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-copilot-cli).\n\nLet's build! 🚀✨\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdubsopenhub%2Fgrid-medic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdubsopenhub%2Fgrid-medic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdubsopenhub%2Fgrid-medic/lists"}