{
  "id": "uc_de0d5526787f",
  "slug": "autonomous-claude-code-pr-loop",
  "asset_type": "use_case",
  "name": "Autonomous Test-Driven Refactoring & CI Self-Healing Loop",
  "tagline": "Executes large-scale TypeScript/Swift codebase migrations in small atomic commits, running the test suite after each step and self-healing CI failures.",
  "description_md": "### 1. The Workflow Bottleneck & Problem Statement\nLarge framework or SDK upgrades touch hundreds of files and stall for weeks when done manually between feature sprints.\n\n### 2. Synthesized Agent Architecture & Connected Stack\n**Autonomous Test-Driven Refactoring & CI Self-Healing Loop** (`autonomous-claude-code-pr-loop`) is a verified production blueprint curated from **@steipete**'s real-world implementation.\n\n- **Primary Capability:** Executes large-scale TypeScript/Swift codebase migrations in small atomic commits, running the test suite after each step and self-healing CI failures.\n- **Connected Tool Stack:** GitHub MCP, Git MCP, Filesystem MCP\n- **Execution Governance:** `Read-Only Discovery` → `Deterministic Policy Check` → `Ask-First Human Approval`\n- **Certified Builder Source:** [@steipete](https://github.com/github/github-mcp-server)\n\n### 3. Step-by-Step Implementation Blueprint\n1. **Trigger & Data Ingestion:** Configure your agent routine to watch **GitHub MCP** on a scheduled cadence or event webhook. Treat all external text as untrusted data inside XML fences.\n2. **Cross-System Enrichment & Verification:** Query **Git MCP** to validate live capacity, account status, or code state before generating recommendations.\n3. **Human-in-the-Loop Action Staging:** Post a structured summary card to **Filesystem MCP** with 1-click approve/edit controls so your team retains full oversight.\n\n### 4. Copy-Paste System Prompt & Routine Configuration\n```text\nImplement the 'Autonomous Test-Driven Refactoring & CI Self-Healing Loop' workflow curated with @steipete.\n\n1. OBJECTIVE:\nExecutes large-scale TypeScript/Swift codebase migrations in small atomic commits, running the test suite after each step and self-healing CI failures.\n\n2. CONNECTED TOOL STACK:\nGitHub MCP, Git MCP, Filesystem MCP\n\n3. STEP-BY-STEP EXECUTION LOOP:\n- Step A (Ingest & Ground): Query live inputs from GitHub MCP and cross-reference state in Git MCP.\n- Step B (Analyze & Validate): Apply strict filtering rules, verify schema/policy constraints, and flag any anomalies or missing fields.\n- Step C (Stage & Report): Prepare the structured output, draft replies/tickets in Filesystem MCP, and request human confirmation before executing any external send or production write.\n```\n\n### 5. Measured ROI & Production Impact\n- **Verified Outcome:** Completes multi-hundred-file SDK upgrades overnight with 100% green CI verification.\n- **Builder Portfolio:** [Explore all capabilities by @steipete →](/u/steipete)\n",
  "primary_category": "engineering",
  "categories_json": "[\"engineering\", \"use-cases\"]",
  "tags_json": "[\"autonomous-claude-code-pr-loop\", \"use-case\", \"engineering\", \"steipete\", \"github-mcp\", \"git-mcp\"]",
  "compatible_agents_json": "[\"grok-bot\", \"claude-code\", \"cursor\"]",
  "integrations_json": "[\"GitHub MCP\", \"Git MCP\", \"Filesystem MCP\"]",
  "includes_json": "[]",
  "safety_level": "Read-Only / Ask-First",
  "safety_summary": "Verified capability blueprint by @steipete.",
  "share_url": "",
  "deep_link_uri": "",
  "mcp_endpoint": "",
  "mcp_transport": "http",
  "install_command": "npx lightstate inspect autonomous-claude-code-pr-loop",
  "skill_markdown": "",
  "starter_prompt": "Implement the 'Autonomous Test-Driven Refactoring & CI Self-Healing Loop' workflow curated with @steipete.\n\n1. OBJECTIVE:\nExecutes large-scale TypeScript/Swift codebase migrations in small atomic commits, running the test suite after each step and self-healing CI failures.\n\n2. CONNECTED TOOL STACK:\nGitHub MCP, Git MCP, Filesystem MCP\n\n3. STEP-BY-STEP EXECUTION LOOP:\n- Step A (Ingest & Ground): Query live inputs from GitHub MCP and cross-reference state in Git MCP.\n- Step B (Analyze & Validate): Apply strict filtering rules, verify schema/policy constraints, and flag any anomalies or missing fields.\n- Step C (Stage & Report): Prepare the structured output, draft replies/tickets in Filesystem MCP, and request human confirmation before executing any external send or production write.",
  "project_url": "https://github.com/github/github-mcp-server",
  "repo_url": "https://github.com/github/github-mcp-server",
  "creator_handle": "steipete",
  "creator_name": "Peter Steinberger (@steipete)",
  "creator_avatar_url": null,
  "creator_url": "https://x.com/steipete",
  "creator_platform": "x",
  "creator_cal_url": null,
  "claimed_by_user_id": null,
  "scouted_by_handle": null,
  "source_url": "https://github.com/github/github-mcp-server",
  "source_tweet_id": null,
  "source_origin": "certified_builder",
  "source_posted_at": null,
  "x_likes": 408,
  "x_bookmarks": 893,
  "x_retweets": 223,
  "x_views": 5712,
  "human_upvotes": 408,
  "human_installs": 408,
  "bot_pulls": 893,
  "pulse_score": 86,
  "gravity_rank_score": 3186.5,
  "is_featured": 0,
  "is_verified": 1,
  "is_sponsored": 0,
  "sponsor_tier": "free",
  "sponsor_label": "",
  "sponsor_cta_url": "",
  "sponsor_expires_at": null,
  "commercial_intent_score": 0,
  "status": "active",
  "created_at": "2026-10-24T20:00:00Z",
  "updated_at": "2026-10-24T20:00:00Z",
  "verified_at": null,
  "primitive": "use_case",
  "title": "Autonomous Test-Driven Refactoring & CI Self-Healing Loop",
  "description": "Executes large-scale TypeScript/Swift codebase migrations in small atomic commits, running the test suite after each step and self-healing CI failures.",
  "category": "engineering",
  "tags": "[\"autonomous-claude-code-pr-loop\", \"use-case\", \"engineering\", \"steipete\", \"github-mcp\", \"git-mcp\"]",
  "agent_compatibility": "[\"grok-bot\", \"claude-code\", \"cursor\"]",
  "author_handle": "steipete",
  "author_name": "Peter Steinberger (@steipete)",
  "author_avatar": null,
  "source_tweet_url": "https://github.com/github/github-mcp-server",
  "github_url": "https://github.com/github/github-mcp-server",
  "external_url": "https://github.com/github/github-mcp-server",
  "upvotes_count": 408,
  "installs_count": 408
}