Arrange a consultation
|
Beratung vereinbaren

Reliable Coding Agents in Practice: Lessons from the Superpowers Workflow

Fabian Wahren

published on September 8, 2026

The Missing Link Between a Harness and a Working Agent

Reliable coding agents need safeguards tied to the mistakes they actually make. When a check fails, the agent must investigate the cause, revise its plan, or escalate the problem. Without that connection, an agent can produce convincing code while misunderstanding the requested change, missing an architectural dependency, relying on an outdated API, or declaring success without running the checks that would expose the mistake. The goal of these safeguards therefore is to add enough structure to enable the agent to validate and recover more optimally when failures occur.

The first article in this series examined the agent harness which focuses on the context, tools, permissions, and validation signals that surround a model. The second article focused on the agentic loop. It defines how the agent acts, observes results, adapts, and eventually stops or escalates. This final article presents a framework which is a practical synthesis of the two views one should have on agents..

Superpowers is a software-development methodology based on predefined, composable agent skills. It provides an interesting case study as it explicitly includes many of the aforementioned agentic software engineering paradigms. Its workflow combines specification, planning, isolation, test-driven development, review, durable progress tracking, and explicit completion gates. For complex, unfamiliar, or consequential changes, this combination can provide valuable control. If this is not required, as for smaller or simpler tasks, due to the composable approach, one can just disable the irrelevant modules.

Management Summary

  • Harness engineering defines the agent’s operating realm: the context, tools, permissions, and validation signals available to it.
  • Loop engineering defines the iterative control cycle around the agent’s work: how actions, outputs, and feedback inform each subsequent step until completion or escalation.
  • Superpowers builds on these concepts by providing predefined mechanisms for planning, isolated worktrees, TDD, review, and completion checks, and integrating them into a loop that supports continuous work.
  • These controls can improve consistency and confidence for complex, unfamiliar, or consequential changes.
  • Use the complete workflow in environments with high uncertainty, broad scope of impact, costly recovery, or serious production consequences; use selected controls for local, reversible, and easily validated work.

1. Why More Agent Capability Does Not Automatically Mean More Reliability

Many serious failures occur because the agent never validates whether its created artifacts produce the actual requested result.

This can already happen before the actual implementation. The agent may interpret a request too narrowly, therefore searches the obvious files, and misses a dependency elsewhere in the codebase. It fills the gap with outdated API knowledge and produces code that looks credible. If the workflow does not require validation by execution, the mistake persists. When told to change the affected lines, the agent may repeat the same unsuccessful approach without reconsidering its initial assumptions. On longer tasks, decisions and evidence may even disappear as context changes or work passes between agents. Finally, the agent declares success from the appearance of the code rather than from tests, builds, static analysis, or review.

No single tool prevents this entire chain of mistakes. Tools expand what an agent can do. The harness directs attention to relevant code and sets operating boundaries. The loop turns results into decisions, including changing strategy when repeated attempts fail. A durable state preserves decisions and evidence between tasks. Validation tests completion claims against observable results.

2. Superpowers as a Harness-and-Loop Case Study

Superpowers provides a useful example of an explicitly engineered coding-agent workflow. Instead of passing a request directly to an implementation agent, it places specification, execution, validation, and completion decisions into a defined sequence.

For substantive development work, the Superpowers workflow starts by clarifying the problem and defining a design before implementation. A human then approves the specification, establishing the scope of the work. For changes that warrant it, implementation then proceeds in an isolated environment. The approved design becomes a set of executable tasks, each completed through test creation, implementation, execution, and review. Progress, decisions, and validation evidence persist between tasks rather than depending entirely on the model’s active context. The workflow concludes with an explicit integration or handoff decision instead of allowing the agent to infer completion from plausible-looking code.

The specification, workspace, tools, permissions, and checks form the harness. The task-by-task cycle of implementation, feedback, correction, and approval provides the loop. This makes Superpowers useful for analysis because it exposes orchestration choices that are often left implicit. Each mechanism can be assessed according to the failure it addresses, the evidence it produces, and the time, context, or review effort it consumes.

3. How Controls Turn Failure Into Feedback

The practices and checks in this workflow address different stages of failure: specification exposes misalignment, planning reveals drift, isolation contains failed experiments, tests and review challenge implementation claims, and completion gates prevent premature success. Together, they create opportunities to correct course before mistakes become more expensive. Consider a seemingly small API change that also affects several consumers elsewhere in the repository.

Specification Makes Misalignment Visible

Specification reduces misalignment by making the intended behavior, constraints, and proposed approach reviewable before implementation begins. An agent might otherwise interpret the API change narrowly and overlook a compatibility requirement.

Exploration, clarifying questions, and design review turn its assumptions into an inspectable proposal covering intended behavior, architecture, data flow, error handling, and testing. If review exposes a misunderstanding, the loop returns to design before implementation makes the mistake more expensive.

For larger designs, section-by-section review makes assumptions and inconsistencies easier to identify without requiring reviewers to evaluate the entire specification at once.

Planning Makes Drift Detectable

Planning makes drift detectable by turning the approved design into explicit, revisable tasks and expectations about the affected code.

A file map might reveal that the API change also affects a serializer, two clients, and a migration. The plan records the expected work, assigns each task an objective, and provides a reference for later assessment.

A useful plan is not immutable. If execution reveals another dependency, it should be updated rather than followed mechanically. However, splitting the work into unnecessarily small tasks, or including near-complete code in the plan, adds cost without necessarily improving execution.

Isolation Contains Failed Experiments

Isolation limits the consequences of failed experiments by keeping changes bounded, reversible, and separate from unrelated work.

In the Superpowers workflow, implementation begins by checking for an existing isolated workspace and, if needed, creating a separate worktree before running project setup and baseline tests. The resulting change can be reviewed, revised, discarded, or integrated without first repairing the primary working environment. Isolation can therefore support greater autonomy when experimentation is likely or recovery would otherwise be costly.

Tests and Review Challenge Implementation Claims

Tests and review challenge implementation claims with execution results and separate inspection. Contradictory evidence routes the work back to diagnosis or planning.

Implementation creates several claims: that the original behavior is understood, that the change addresses the intended problem, and that existing consumers remain compatible. A test should first fail for the expected reason and then pass after the relevant implementation change. Compilation, static checks, and review can examine the wider impact. If a client still assumes the old API, the workflow should treat that result as evidence that the change remains incomplete rather than respond with another superficial patch.

These signals remain incomplete. Tests cannot verify properties they do not examine, and a reviewer may share the implementer’s assumptions. Documentation, exploratory work, and some configuration changes may therefore require other forms of validation.

Completion Gates Prevent Premature Success

Completion gates require evidence of repository-level readiness before integration or handoff. A passing local test or an empty task list is not sufficient.

The plan states what the agent intended to change. Fresh test results, a reviewable diff, and a list of unresolved issues show what it actually changed. The agent may declare the task complete only when the required tests and checks pass and the remaining issues are documented.

The same analysis applies when extending the harness with external tools.

4. Extending the Harness with Targeted Tools

Targeted tools strengthen the harness when they close a specific information gap. This can further improve consistency and quality when working with any harness. For superpowers, the following two deemed to be valuable additions: Context7 challenges outdated API knowledge, while CodeGraph makes repository relationships easier to inspect.

Context7 Challenges Outdated API Knowledge
Context7 can reduce errors caused by stale model knowledge by supplying documentation for the dependency version used by the repository, when that version is available. During design or implementation, documentation can challenge what the model intrinsically remembers and clarify signatures, constraints, and usage. This is especially useful for fast-moving dependencies, provided the retrieved documentation matches the version installed by the repository. Documentation can establish intended API behavior, but it cannot show whether a particular implementation integrates correctly. That still requires compilation and repository tests.

CodeGraph Makes Repository Relationships Queryable
CodeGraph can make repository exploration more efficient by exposing structural relationships such as dependencies, dependents, imports, and exports. Text search can locate exact strings, but understanding how a symbol is used often requires several searches and file reads. It may also miss related code that refers to the symbol indirectly or under another name. In the project’s own July 2026 benchmark, CodeGraph-assisted runs used fewer tool calls and tokens on average across seven repositories, although execution-time results varied by repository.

Neither tool closes the loop. They improve its inputs. The agent must still test its assumptions through execution, respond to contradictory results, revise its approach, and escalate unresolved uncertainty. Targeted tools can close important information gaps, but every additional source can also increase the cost and complexity of the workflow.

5. Stronger Guardrails Buy Autonomy - at a Cost

Strong orchestration drives costs of a coding task. Specification, planning, isolation, additional agent runs, reviews, and repeated validation increase latency, consume context, and create more work to inspect. They also depend on sound assumptions: a flawed plan or shared misconception can propagate through an otherwise disciplined process.

The additional effort can allow the agent to work longer without human intervention while keeping its changes reviewable and reversible. Structured workflows expose progress and validation evidence, contain failed approaches, and create points for correction or escalation. The relevant question is whether these benefits justify the overhead for the task at hand.

The answer depends less on code volume than on uncertainty, scope of impact, reversibility, and consequence. A local change that is easy to understand, test, and undo may require only targeted context, a constrained implementation, the relevant checks, and a reviewable diff. Additional specifications and review loops would provide little new evidence.

When uncertainty is the main risk, exploration should precede planning. Read-only investigation, a bounded effort, and a clear account of findings and unresolved questions can support a decision about whether to implement. Writing a detailed plan before feasibility or scope is understood merely turns assumptions into apparent certainty.

As dependencies, consequences, or recovery costs increase, a more structured workflow becomes valuable. A short design may expose conflicting requirements; isolation may contain experimentation; targeted test-driven development and independent review may challenge implementation claims. The complete Superpowers sequence is easiest to justify when several of these risks coincide, and the cost of an undetected error exceeds the cost of orchestration.

6. Five Questions to Ask Before Adding Another Tool or Gate

Use these five questions to decide whether a tool helps the agent catch a likely failure or make a better next decision.

  1. Which failure mode does it address?
    Name the concrete breakdown: misunderstood scope, outdated API knowledge, unsafe edits, missed dependencies, or premature completion. Then check whether an existing control already covers it.
  2. What new evidence does it provide?
    Its output should answer a question the existing workflow cannot answer - for example, whether the code compiles, which consumers depend on an API, or whether a policy check passes
  3. How can that evidence change the loop?
    Useful output must support a decision to continue, revise the plan, retry with a different approach, stop, or escalate. If the output cannot influence a decision, its operational value is limited.
  4. What does it cost in practice?
    Count more than tokens or tool calls. Include latency, context consumption, maintenance, coordination, false positives, and the human effort required to interpret additional output.
  5. When is it required - and when is it optional?
    Define the task conditions that justify the control, such as unfamiliarity, high scope of impact, weak validation, or costly recovery. Local, reversible, well-tested changes may not need it.

Conclusion: Reliable Agents Require Selective Engineering

Reliable coding agents do not emerge from model capability alone. The harness determines what the agent can see and do; the loop determines how evidence changes its behavior. Teams should start with the failures most relevant to their environment, add controls that expose or contain those failures, and grant greater autonomy only when the resulting evidence can support a decision to continue, revise, stop, or escalate.

Superpowers demonstrates how specification, execution, validation, and completion decisions can form a controlled feedback system. It also shows why the complete workflow should be applied selectively: the goal is enough structure to make the agent’s work verifiable and recoverable, not maximum process.

Sources

  • obra. “Superpowers.” GitHub repository. Describes the project’s specification, planning, worktree, test-driven development, review, and completion workflows. github.com/obra/superpowers. Accessed 31 July 2026.
  • Upstash. “Context7.” GitHub repository. Documents the retrieval of current, version-specific library documentation and the limitations of community-contributed content. github.com/upstash/context7. Accessed 31 July 2026.
  • McHenry, Colby. “CodeGraph.” GitHub repository. Documents local code indexing, relationship and impact analysis, automatic synchronization, supported languages, and maintainer-run performance benchmarks. github.com/colbymchenry/codegraph. Accessed 31 July 2026.

The harness supplies the agent’s context, tools, permissions, constraints, and validation signals. The loop determines how the agent responds to those signals - whether it continues, revises its approach, stops, or escalates. Reliability depends on connecting both.
Superpowers shows how specification, planning, isolation, test-driven development, persistent records of progress and decisions, review, and completion gates can form a controlled feedback system. Its main contribution is not any single mechanism, but the way those mechanisms connect intent, execution, and evidence.
A full workflow is most useful when uncertainty, scope of impact, recovery cost, or production consequences are high. A local, reversible, well-understood change with fast validation may need only selected controls rather than the complete sequence.
Add another tool or skill when it addresses a specific information or execution gap that existing tools cannot cover efficiently. Its output should provide new evidence or capability that can change the agent’s next action; otherwise, it adds context and maintenance cost without improving control.
Not by themselves. Tests verify only the behavior they cover, while review agents may share the implementer’s assumptions. Stronger completion evidence may combine focused tests, compilation, static analysis, integration checks, diff review, and human judgment where the consequences justify it.
Fabian Wahren
Data Scientist

Questions about the article?

We are happy to provide answers.
Contact Us
© 2024 – 2026 HMS Analytical Software
chevron-down