[KongchangAI]
· 3 min read· 1,544 words

Three New Metapunk Skills: Building a Closed Loop for AI Software Development

Three New Metapunk Skills: Building a Closed Loop for AI Software Development

Metapunk adds Implement Spec, PR, and Retro skills to complete the AI development loop.

The Metapunk skill set shared by a Bilibili content creator adds three key skills to fill gaps in the AI-assisted software development workflow. Implement Spec uses dependency graphs to process tickets in parallel, automatically merges branches, and invokes code review, accelerating the cycle from plan to implementation; the PR skill makes AI-generated pull requests easier to review through structured summaries (diagrams showing relationships), evidence (performance screenshots, test results), and merge risk assessment; the Retro skill traces back through Agent conversations to optimize context engineering (such as agent.md) and guardrails (Lint rules) to prevent repeated mistakes. The three new skills form a complete closed loop with the original Grooming, To Spec, To Ticket, Implement, and Code Review skills, covering the full lifecycle from context collection, planning, task splitting, implementation, and review to retrospective, providing teams with a customizable AI development framework.

In today's world where AI-assisted software development is increasingly common, how to make AI Agents complete the entire process from requirements to launch more efficiently and reliably has become a focus for many developers. In the new version of the Metapunk skill set shared by a Bilibili content creator, three key skills have been added, aiming to fill the gaps in the existing workflow and form a complete closed loop for AI software development. This article will take a deep dive into these three skills—Implement Spec, PR, and Retro—and explore how they fit into the entire development lifecycle.

Review of Existing Skills: From Grooming to Code Review

Before introducing the new skills, it is necessary to quickly review the existing skill chain of Metapunk. The entire process starts with the Grooming skill, whose core goal is to collect as much context as possible before the AI Agent performs any operation (such as building an application or workflow), thereby significantly improving the AI's accuracy. Next, the To Spec skill converts the consensus reached during the Grooming phase into a formal plan, and the To Ticket skill breaks that plan into feature-based Tickets, ensuring that each ticket can be completed by a single AI Agent to protect the context window. After that, the Implement skill executes the concrete implementation using test-driven development, and finally the Code Review skill uses a fresh context window and follows the 12 refactoring principles from Martin Fowler's book to review the code. This series of skills forms the basic pipeline for AI software development.

You can ask questions and get help at any time

Test-Driven Development (TDD) is a software development methodology that emphasizes writing test cases before writing functional code. Its core loop is "red-green-refactor": first write a failing test (red), then write just enough code to make the test pass (green), and finally refactor the code under the protection of tests to improve the design. In the context of AI Agents, TDD is especially important because tests provide the AI with clear success criteria and immediate feedback, preventing the AI from generating code that looks plausible but is actually wrong. The Implement skill uses TDD for implementation, meaning the AI will first generate tests based on the ticket and then implement the feature, thereby ensuring that the code behavior meets expectations.

Martin Fowler's 12 refactoring principles come from his classic book Refactoring: Improving the Design of Existing Code, and include specific techniques such as "Extract Function," "Inline Function," "Move Feature," and "Reorganize Data." These principles guide developers in improving the internal structure of code without changing external behavior. The Code Review skill uses a fresh context window and follows these principles, aiming to let the AI review code with "fresh eyes," identify code smells such as duplicate code, overly long functions, and improper naming, and propose structured refactoring suggestions, thereby improving maintainability.

Implement Spec: Parallel Processing of Tickets to Accelerate Development

The first newly added skill is Implement Spec, which solves a pain point in the existing process: after converting the Spec into tickets, they need to be processed manually one by one. The core function of Implement Spec is to use the specifications and tickets generated by the first two skills to automatically organize all tickets, select tasks with no dependencies, and start processing them, allowing multiple AI Agents to work in parallel and greatly increasing processing speed. Ultimately, all tasks are merged into one branch, and the Code Review skill is automatically invoked for review; after issues are fixed, a clean pull request is generated. In short, Implement Spec integrates code review and parallel multi-task processing, significantly shortening the cycle from plan to implementation.

Dependency Graph is used in task scheduling to represent the precedence constraints among tasks. When multiple tickets are split out, some tasks may depend on the output of other tasks (for example, the database model must be completed before the API interface). The Implement Spec skill analyzes the dependencies among tickets, builds a directed graph, and identifies all tasks with zero in-degree (that is, tasks with no dependencies), which can be executed in parallel immediately. As dependent tasks are completed, subsequent tasks are unlocked, forming dynamic scheduling. This dependency-graph-based parallel processing maximizes the concurrency of multiple AI Agents while avoiding rework caused by incorrect ordering.

Pull Request (PR) is a core mechanism in code collaboration platforms (such as GitHub and GitLab), through which developers request to merge their branch into the main branch. A PR usually includes change descriptions, review discussions, and automated check results. In AI-assisted development, the PR becomes the main interface for humans to review AI-generated code. Implement Spec automatically generates a clean PR after parallel tasks are merged, meaning it integrates branch management, conflict resolution, and the code review feedback loop, so that humans only need to focus on the final merge decision rather than the intermediate process.

PR Skill: Making AI-Generated Pull Requests Easier to Review

With the growing popularity of AI-written code, reviewing AI-generated pull requests (PRs) has become a new bottleneck. Metapunk's PR skill aims to accelerate this process. Traditional PRs usually contain a brief summary and a test plan, but the effectiveness of the test plan still needs manual verification. The PR skill requires three parts: Summary (showing relationships through diagrams for at-a-glance understanding), Evidence (including performance screenshots, test pass status, etc., proving that the code actually runs correctly), and Merge Risk (assessing the impact on the production environment, rollback difficulty, and scope of impact). This structured information helps reviewers quickly determine whether a PR is safe, especially for critical changes in the production environment.

You may need to create a separate branch

Production environment change risk assessment is a key part of the software release process, usually involving the scope of change impact, rollback strategy, monitoring metrics, and canary release plans. The PR skill requires a "Merge Risk" section, which precisely structures this practice: assessing the impact on the production environment (such as whether core transaction paths are involved), rollback difficulty (such as whether database migrations are reversible), and scope of impact (such as the proportion of affected users). This explicit risk assessment helps reviewers quickly determine whether a PR is safe, especially for critical changes. Combined with the "Evidence" section (performance screenshots, test pass status), reviewers can obtain highly credible verification information without running the code themselves, thereby accelerating review decisions.

Retro Skill: Letting AI Learn from Mistakes

The third skill, Retro (retrospective), addresses the problem that AI may repeat mistakes in long-term tasks. This skill traces back through the Agent's conversation process and optimizes from two aspects: Context Engineering (for example, creating an agent.md file listing key file locations to help the AI find information faster, and streamlining redundant parts of the system prompt) and Guardrails (setting coding standards, such as prohibited API calls or import styles, and preventing errors through Lint rules). The Retro skill does not recommend enabling autopilot mode; instead, it should be run periodically and suggestions should be approved by humans, to avoid the project over-focusing on details and drifting away from core feature development.

And how to find them faster

Context Engineering refers to a set of practices for designing and optimizing the information environment visible to an AI Agent, including system prompt writing, file indexing, tool descriptions, and memory management. In long-term tasks, the AI's context window is limited, and redundant or outdated information crowds out useful context, causing the AI to "forget" key constraints or repeat mistakes. By tracing back through conversations, the Retro skill identifies which information should be solidified into agent.md (such as key file paths and project conventions) and which system prompt content can be streamlined, thereby improving the AI's retrieval efficiency and decision quality.

Guardrails in AI systems refer to mechanisms that limit the boundaries of AI behavior, including input/output filtering, tool call restrictions, and coding standards. The Retro skill suggests setting coding standards (such as prohibited API calls and import styles) and enforcing them through Lint rules, which are static guardrails; periodic human approval of suggestions is a dynamic guardrail. Guardrails and context engineering complement each other: the former prevents the AI from doing the wrong thing, while the latter helps the AI do the right thing. The Retro skill emphasizes not enabling autopilot mode precisely to prevent the AI from over-optimizing local details without supervision and drifting away from core feature development.

The Complete Workflow: Formation of the Closed Loop

After integrating the three new skills, the Metapunk skill set forms a more complete closed loop: Implement Spec sits between tickets and code review, enabling parallel processing and automatic review; the PR skill comes after code review and optimizes the human review experience; and the Retro skill conducts a retrospective after task completion to improve future efficiency. The entire workflow covers the full lifecycle from context collection, planning, task splitting, implementation, and review to retrospective, helping AI Agents become more efficient and reliable in software development. According to the content creator, the specific definitions and use cases of these skills can be viewed on the page they provide.

Rather than just feeling

For teams hoping to improve AI development efficiency, this Metapunk skill system provides a customizable framework that is worth exploring in depth.

#Metapunk#AI software development#Implement Spec#Pull Request review#Retro#Context Engineering#Guardrails#AI Agent
Share:

Related articles