r/opencode • • 20d ago • Bravo 3

I love OpenCode

Post image

Working in OC is very satisfying. This is a subagent display I built for v1. I would never have been able to do this in claude.

EDIT: I'm enjoying the response this post is getting. There are the usual miserable, insufferable folks you get on any post, but lots of sincere people asking real questions. It motivates me to share more.

I am very familiar with the frustrations in this agent coding space. You can feel the power of the LLM, but harnessing it to produce good code is really tough. It's easy to get a pile of code, but that code has enormous code debt baked in much of the time. How to get good, maintainable code out is the trick. There is no one right answer. I think what's needed is a structure of repositories, skills, and various deterministic code bits, such as small helper CLIs, hooks, TUI plugins, etc, that allow you to build your workflow in the way that works for you. It's small steps over weeks and months that win the race. My workflow now can lift some heavy things, but it wasn't always that way. When a shortcoming is found in the flow, you need a place to address it. That place might be a skill, the AGENTS.md itself, an agent definition, or something else. The key is having the place, or creating it, so that you can capture the change you want. I like standing on the shoulders of Superpowers, because I think the developer is solid and I think the community around it is keeping the project on track, but I might ditch it at some point if I feel it's not helping anymore.

The first thing I would do is create a repo for holding your global agent configs. I called mine opencode, but you can call it anything. You will want to symlink the folders of this repo into your home directory so that OC sees its files as the global config. You want to be able to work in this repo just like any other repo. In this repo you want to create a folder called config where you'll keep all your global config like skills, your global AGENTS.md, your TUI plugins, etc.

Next, you'll want to create a launcher CLI in this repo that wraps the launch of OpenCode. Mine is oc. This gives you a place to run scripts before OC launches. Next, you're going to create a small CLI that manages the symlinks from this repo to your home directory. It will make sure that your global config and plugins and anything else you come up with are all linked correctly. Then you will put a call to this in your oc launcher.

Here are the global skills that I feel have been the most important. Each has a SKILL.md and a references/ folder with directive files loaded via progressive disclosure. I'm going to paste in Opus's description of each one:

---

directive-quality: This is my skill for writing and maintaining the AI instructions themselves: AGENTS.md, agent prompts, skill packages and directive-bearing config. Its core rule is "use the least context that fully specifies the required behavior." It aims for clear instructions the agent actually follows, not for a lower line count. It routes each job to a focused reference, covering wording and examples, how a skill package is laid out, how skills compose, metadata validation, where an instruction should live, and structured assessments (including sweeps across a whole collection and reviews of the directives in the current conversation). Before any change it checks that the instruction is going in the right place. Afterward it checks that nothing the old text required was lost, and tests the cases where a rule should fire, where it shouldn't, and the exceptions, while stating plainly that passing those checks doesn't guarantee the agent will always comply.

code-quality: This skill shapes the code agents write, and every rule in it comes from one idea: "good code is code that is cheap to change correctly." It's organized around nine pillars. Among them: one logical change should touch one place, invalid states should be impossible to represent, modules should hide more than their interfaces expose, names should tell you what the code does, errors should be handled once where recovery is possible, decisions should be kept apart from side effects, and the codebase's existing conventions win over the agent's own preferences. It also has a self-check table of common LLM coding mistakes, such as reinventing a helper the repo already has, flag sprawl where an enum belongs, catch-log-continue error handling, pass-through wrappers, comments that just restate the code, and tests that mirror the implementation. A matching eight-step review checklist makes the point that a diff can work and still fail review. Testing guidance and architecture/audit guidance sit in separate references that load only when that kind of work starts, and agents load the skill at the start of every role in my workflow, so it applies to coding and review alike.

superpowers-policy: This is my local layer on top of the obra/superpowers (https://github.com/obra/superpowers) plugin. It changes how Superpowers behaves in my setup without forking or patching the upstream package. Its main section names exactly which upstream behaviors I override. TDD still runs red-green-refactor, but test selection follows my own test-design guide. Review checklists only count within the approved scope, so a reviewer can't turn "you could also improve…" into required work. Brainstorming has to restate the intended outcome before it proposes options, and spec and plan locations follow my planning-folder conventions. The rest is a routing table: for each orchestration action it names the one reference that governs it, such as review-loop budgets, picking and continuing workers, sizing tasks, delegating writing, handling unknowns before dependent work, and closing out an effort. Agents load only the reference they need for the action at hand, and a missing reference stops that action instead of letting the agent improvise.

---

Ok, enough Opus spam. I'm going to stop there for now. If folks want to talk about other parts of the workflow, such as agent generation, let me know and I'll add it.

1.0k Upvotes

117 comments sorted by

View all comments

7

u/Any_Confidence2580 19d ago edited 19d ago • Bravo Mindblown

You seem butt hurt that anyone would look at this and not immediately see what's wrong with this.

You paid a frontier model to execute a workflow you had already designed. That is the whole problem, and everything below is why.

HarnessTax ran 21 model-harness pairs with the model held fixed. Harness choice moves success by +-2% on SWE-bench Lite and +-5% on Terminal-Bench 2.0. Cost moves 2x between harnesses and up to 5x overall. The Scaffold Effect study found up to 40x in tokens per solved task against 0 to 8 points of pass rate.

Your harness is worth a few points and a multiple on cost. That is the lever. It is not worth a frontier model's rate on top of it, and you have not noticed that the structure you built is the reason you don't need one.

For scale: my blended cost per token is three cents per million. The sticker price on the model is fifteen cents input and sixty cents output; three cents is what you get when the cache hit rate is high and the harness keeps the prefix stable. Against a frontier model that is a five to twenty times difference before you count anything else.

Your Talos upgrade proves the point. Three major versions behind, config format changes, plugins to decommission, failure modes to test, one node at a time with reboots. Every one of those is a lookup with a check attached. That version dropped the in-tree cloud provider. That API version is gone from that manifest. Snapshot etcd before every bump. None of it needs a model that reasons about ambiguity. It needs a list and something that refuses to advance when a check fails.

You keep calling the task complex. It is long. Those are different problems and only one of them costs money.

I run a .NET 10 / Avalonia agent harness: domain-driven, an ACL on every external dependency, a doctrine test suite that enforces its own conventions, LSP integration, chain orchestration with git worktrees and a reconciler step. It has never used anything but GLM-5.3-Flash and DeepSeek V4.1-Flash-1017.

It works because the harness decides and the model executes. A plan becomes a chain. Each step is one session. The session opens with a rendered brief naming its one step, the plan goal, the ledger key, and the completion contract, and nothing else. The model may mark exactly one step done, and only if a verification command exited 0 since its last edit. The gate reads the session's shell ledger, so a green run from an hour ago followed by five edits is refused. The harness starts the next session. The model never picks what runs next.

A model that only has to do the step in front of it does not need to be smart. It needs to not deviate. That is the trick, and it is why the model stops mattering.

Now the part you are being misled about. You wrote a superpowers-policy skill to override upstream behavior. You built a layer to overrule the framework and then credited the framework.

Look at what you are overriding. Superpowers is a SessionStart hook injecting a meta-skill in EXTREMELY_IMPORTANT tags with a 1% rule: if there is even a 1% chance a skill applies, you must invoke it. Plus a red-flags table that pre-rebuts the rationalizations a model might make. Vincent says on the record it is deliberate persuasion engineering, drawing on Cialdini and the Wharton call-me-a-jerk study.

That is a forcing function for models that do not reliably run the procedure. Opus already runs it. Ask it to write the failing test first and it does. It does not need a table of excuses it might make, so the skill arrives as a second specification for something the model already has, and the model reconciles the two in its own idiom. It reads as compliance in the transcript. It does not show up in the diff.

Which is why your workflow needs the expensive model. Your correctness depends on the model's judgment about your instructions. The more capable the model, the better it is at deciding which parts of your methodology to follow. That is the trap, and it gets more expensive every time models improve.

The inverse is why a harness running GLM-5.3-Flash and DeepSeek V4.1-Flash-1017 finds Superpowers naive, and is right. Those are not weak models. They execute a procedure as well as anything you would pay ten times for, which is the point of the whole post. You're making on overpriced Opus read a Superpowers directive, notices it conflicts with something else in the context, and resolves the conflict before it acts. You get the behavior the directive asked for and conclude the directive worked. A model that simply executes does not perform that reconciliation, so a directive that says nothing the harness does not already enforce shows up as work that had to be redone.

On subagents you already diagnosed it and then kept the expensive half. You said Superpowers reused them too much and contexts were bloating. A fresh subagent is a fresh context, and a fresh context is a full-price context. On DeepSeek's card a cache hit is 50x cheaper than a miss. Superpowers 6.4's own release notes put inline execution at roughly 2x faster and half the cost of subagent-driven development with frontier models. You are running the configuration its author moved off, at a frontier premium.

What would have made your upgrade cheap: write the checklist. One line per version bump, one line per API removal, one line per plugin to decommission. Put a gate on each line. Let a three-cent model work the list. Let kubectl get nodes and an etcd health check decide whether it worked. None of that is a model's opinion, which is exactly why it does not need an expensive model to produce it.

You're the one that said the answer is repositories and skills and deterministic bits. But you're not following your own advice. You're depending on Opus to fix a mess for you on every turn. If you just want a pat on the back for a screenshot and a "woopie!" for using Kubernetes, you already got it.

5

u/Any_Confidence2580 19d ago

I suspect you're going to have a fit about this, so in superpowers fashion:

EXTREMELY_IMPORTANT
STOP USING ANTHROPIC
STOP DEPENDING ON "ORCHESTRATORS"
STOP PRETENDING EVERYTHING YOU DO IS "COMPLEX"

1

u/NewAnxiety2478 19d ago

Do people really write such long responses or is it the usual trolling bots.

1

u/Any_Confidence2580 19d ago

Yes, they do. If you want short responses, see: https://www.reddit.com/r/opencode/comments/1xpylm3/comment/19saplq49jx5w/

Can't make everyone happy.

1

u/LaffingAtYuo 19d ago

Look at the sentence construction, it's Claude with an aggressive tone.

1

u/--EyeInTheSky-- 16d ago

My question is who reads these long posts?

1

u/Gumbi_Digital 19d ago

Great post, thank you!

1

u/neuralnomad 19d ago

Good lord… between this and the original post, I’m even more put off by the extreme agentic paradigm (I don’t like workflow, it’s too narrow) In one case, there’s so much effort keeping a SOTA model from doing what it’s designed to do so powerfully, and in the other, so much effort in accounting for so many contingencies so that, a model dutifully performs with high fidelity at the cost of the work it took to constrain it such that it had little other choice. Credit to the skill of those mentioned—way above my non-professional level, but I’m not seeing the payoff. Where is the return in all this human investment in concrete work-centric terms, not insulated benchmarks?

1

u/ReasonableLetter8427 18d ago

I like your ideas here and thanks for actually explaining the idea behind a harness.

I’m curious if this is fine for Lean code you think

1

u/_rick_sanchez_c_137_ 1d ago

What a fucking read man. I agree with every single line. These idiots are just happy burning their tokens while treating their harness as slot machines.

But in a way, most of them aren't even real programmers so you can't even blame them. I'm so sick of the "software is solved" crowd.