Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The Superpowers Methodology: Agent-Centric Engineering & Skill Design

Overview: Process-as-Code

The superpowers project is not merely a collection of instructions; it is a software development methodology where process is treated as code. The core philosophy is that agent behavior should not be left to chance or “good prompting,” but should be engineered through a repeatable, verifiable, and iterative pipeline.

The goal is to transform the AI agent from a “guessing machine” into a disciplined engineer that follows a mandatory, linear workflow.


1. The General Engineering Pipeline

For any new task (feature or bug), the project enforces a strict, linear pipeline. Jumping straight to code is considered a process failure.

The Workflow Stages:

  1. Socratic Brainstorming →\rightarrow Spec:

    • The agent does not implement; it interrogates.

    • It refines rough ideas through targeted questioning, explores alternatives, and presents the design in digestible chunks for human validation.

    • Outcome: A validated design document.

  2. Environmental Isolation (Git Worktrees):

    • Work is performed in isolated git worktrees.

    • This ensures a clean baseline and prevents the “pollution” of the main development branch during experimental phases.

  3. Bite-Sized Planning:

    • The approved spec is broken down into a high-granularity implementation plan.

    • Constraint: Tasks must be “bite-sized” (typically 2–5 minutes each).

    • Requirement: Every task must list exact file paths and specific verification steps.

  4. Subagent-Driven Development:

    • Fresh subagents are often dispatched to handle individual tasks.

    • Two-Stage Review: Each task undergoes a review for spec compliance (did it meet the design?) followed by a review for code quality.

  5. Strict TDD (RED-GREEN-REFACTOR):

    • Implementation is governed by a rigid TDD cycle.

    • The Hard Rule: Writing implementation code before a failing test is a violation. In strict mode, code written before the test is deleted.

  6. Branch Finalization:

    • Final verification of tests, clean-up of the worktree, and a decision on the merge/PR strategy.


2. The Meta-Workflow: TDD for Skills

Because the “product” of this repository is the skills themselves, the developers apply TDD to documentation. They treat a skill as a “behavior-shaping program.”

The RED-GREEN-REFACTOR Cycle for Documentation:

The “Iron Law”

No skill exists without a failing test first. Adding a section “just because it seems like a good idea” is forbidden. Every line of a skill must be a response to a documented failure.


3. PR Rigor & Quality Governance

The project maintains an intentionally high PR rejection rate (historically ~94%) to prevent “AI slop” and maintain a zero-dependency core.

Acceptance Criteria:


4. Knowledge Management: Decisions vs. Examples

The repository distinguishes between governance (what we decided) and training (how we do it).

ADRs vs. Golden Examples

The “Few-Shot” Training Logic

Instead of giving an agent a rulebook on “how to write a spec,” the project points the agent to a Golden Example.

By providing “Golden Examples,” the developers use the LLM’s pattern-matching capability to enforce a level of detail and rigor that prose instructions alone cannot achieve.

The Danger of Golden Examples: Pollution and Drift

Using “Golden Examples” is a double-edged sword. If applied naively, it leads to two major failures: Context Pollution and Data Drift.

1. Context Pollution (Token Noise) Loading every example into the prompt is a catastrophe for the context window. It dilutes the agent’s focus and consumes excessive tokens.

2. Data Drift (Pattern Hallucination) This is the “silent killer” of agent-centric systems. As a project evolves (e.g., moving from a monolith to microservices), a “Golden Example” from six months ago will teach the agent to write outdated specs. In specialized domains like Security, this drift is critical: a pattern that was “Golden” two years ago may be a vulnerability today.

The Trade-off: Guessing vs. Drift The developers of this repo have made a conscious trade-off. They believe the risk of “AI-style guessing” (relying on the LLM’s generic, often mediocre training data) is far higher and more frequent than the risk of “pattern drift.”

They would rather the agent be “consistently wrong” (which is easy to fix by updating one example) than “randomly mediocre” (which requires fighting the LLM’s base nature in every single prompt).

Advanced Guardrails: Negative Examples and Audits To further prevent drift and refine boundaries, one can implement:

Beyond Lazy Loading: Solving Content Contamination

Even with “Lazy Loading,” if the agent reads a 2,000-token Golden Example every time it starts a task, you are still paying a “context tax” and, more importantly, you risk Content Contamination.

When an agent reads a specific example (e.g., a perfect spec for “User Authentication”), it often starts mimicking the content (mentioning tokens, passwords, or sessions) even when it’s supposed to be writing a spec for “Database Indexing.”

To be truly “smart” about this and avoid pollution, you move from Few-Shot Mimicry to Rubric-Based Validation.

Three Levels of Sophistication:

Level 1: The Reviewer-Writer Split (The “Superpowers” Way) Instead of giving the Golden Example to the Writer (the agent doing the work), you give it only to the Reviewer (the subagent checking the work).

Level 2: Distillation (The “Rubric” Approach) You treat the Golden Example as a source of truth to create a Rubric (a checklist of properties), then you throw the example away. Instead of: “Read this perfect spec and do the same,” you write: “A ‘Golden Spec’ must possess these 5 properties: (1) Lists at least 3 non-obvious edge cases, (2) References exactly which existing files will be modified, (3) Includes a ‘Failure Mode’ section... etc.”

Level 3: The “Meta-Review” (The Ultimate Filter) You use a separate “Distiller Agent” to analyze the Golden Example and generate the Rubric automatically.

  1. Distiller Agent: Reads perfect-spec.md →\rightarrow Generates a rubric.md (the “DNA” of the example).

  2. Writer Agent: Uses rubric.md to write.

  3. Reviewer Agent: Uses rubric.md to validate.

Summary of the Evolution

StageMethodContext CostRiskResult
NaiveDump examples in promptVery HighMassive PollutionGeneric “AI-style” slop
LazyAgent reads example on demandMediumContent MimicryBetter, but “noisy”
SplitReviewer holds the exampleLow (Isolated)MinimalHigh rigor, clean writer
RubricExample →\rightarrow RubricVery LowNoneSurgical precision

If you are building your own skills repo, don’t just provide examples—provide rubrics derived from examples. That is how you achieve surgical precision without context pollution.

Standards vs. Examples: The “Abstraction Gap”

A common question is whether a comprehensive standards document (e.g., a testing_standards.md that defines “Non-Brittle Assertions” and “Adversary Testing”) is sufficient. While such documents are necessary as the “Law” of the project, they are often insufficient for LLMs due to the Abstraction Gap.

The “What” vs. the “How” A standards document tells an agent what to do (e.g., “Avoid brittle assertions”), but it does not show them how to apply that rule to a specific, complex scenario. An LLM can read a rule and still produce a brittle assertion because it lacks a concrete “sense” of what “brittle” looks like in the context of a particular project. A Golden Example closes this gap by providing a concrete “This →\rightarrow That” transformation.

The Ritual of Process Standard documents often enforce processes like TDD (Red →\rightarrow Green →\rightarrow Refactor). However, agents are notorious for “faking” these rituals—writing the test and the code simultaneously and claiming it was TDD. Golden Examples (especially those including session transcripts) demonstrate the temporal sequence:

  1. Write a test.

  2. Observe a specific error message.

  3. Write the minimal code to fix it. By showing the ritual, you teach the agent the behavior of TDD, not just the definition of it.

The Constitution vs. Case Law To understand the relationship:

When is a Standard “Enough”?

ScenarioStandard Document is EnoughGolden Example/Rubric is Required
Agent CapabilityHighly experienced agent with a strong internal model of the domain.Agent struggling with the “depth” or “style” of the required output.
Task ComplexityStraightforward tasks with clear, binary success criteria.Complex tasks where “quality” is subjective or requires high nuance.
ConsistencyWhen slight variance in implementation style is acceptable.When absolute consistency across multiple different agents is required.

5. Comparison: Human-Centric Governance vs. Agent-Centric Bootstrapping

When comparing a professional human-led engineering approach with the superpowers methodology, a fundamental difference in intent emerges: Governance vs. Training.

Human-Centric Governance

This approach (exemplified by the use of ADRs and Post-mortems) is designed for human accountability and institutional memory.

Agent-Centric Bootstrapping

The superpowers approach is designed to solve the “LLM Variance” problem. It treats the codebase as a training set for the agent.

Summary Table

FeatureHuman-Centric GovernanceAgent-Centric Bootstrapping
Key DocumentADR / Post-mortemGolden Example (Spec/Plan)
Mental Model“The Law” (Conclusion)“The Tutorial” (Pattern)
Primary AudienceHumans / MaintainersAI Agents / New Contributors
Value PropositionInstitutional Memory & AuditFew-Shot Training & Consistency
Success Metrica reasoned, documented decisiona behaviorally compliant agent

6. Synthesis: The Anatomy of a “Complete Skill”

To build a truly professional, “bulletproof” skill, you are essentially creating a complete legal and operational framework for a specific behavior. If you look at it as a package, a “Complete Skill” consists of these three layers:

1. The Constitution (The SKILL.md / Reference)

2. The Case Law (The Golden Examples / Rubrics)

3. The Infrastructure (The Tools / Supporting Files)


The Final “Power Move”: The Feedback Loop

The most important part of this entire system—the part that makes it “Superpowers” and not just “Documentation”—is that these three layers are linked by TDD.

  1. Agent fails →\rightarrow You realize the Constitution is missing a rule.

  2. Agent is confused →\rightarrow You realize the Case Law (Example) is missing or outdated.

  3. Agent makes a mechanical error →\rightarrow You realize the Infrastructure (Tool) needs to be built.

When you build specialized skills (e.g., for Security or BR/FR generation), providing all three—the Law, the Example, and the Tool—means you aren’t just giving the agent a “tip,” you are giving it a complete operational system that is almost impossible to deviate from.