ALWAYS inspect the incident first. RETRY when the evidence is weak. BEFORE a repair, ask a human. AFTER a repair, verify the result. Complete ONLY IF verification passes. STOP WHEN three attempts have no confirmed cause.
For skills that have outgrown a checklist
Keep the instructions. Move the steps to code.
Yield turns long agent instructions into small programs you can run, test, pause, and resume.
$ npm install @operatorstack/yield
import { defineSkill } from "@operatorstack/yield";
type Review = { critical: number; fixed: number };
defineSkill((ctx) => {
const check = ctx.runCommand("typecheck", "npm run typecheck", 300);
ctx.require(check.exit_code === 0, "typecheck passes", check);
const result = ctx.agentTask<Review>(
"review", "/gstack review", undefined,
{ type: "object", required: ["critical", "fixed"],
properties: { critical: { type: "number" }, fixed: { type: "number" } } },
);
ctx.require(result.critical === 0, "no critical findings", result);
return result;
});
Example code review. Yield controls the gates; the agent performs the review.
Compile → review → require proof → save the result.
00 / BEFORE + AFTER
Keep the helpful words. Move the repeatable steps.
Use words for the goal, context, and examples. Use code for rules that must run the same way each time.
for attempt := 0; attempt < 3; attempt++ {
id := fmt.Sprintf("attempt-%d", attempt)
report := ctx.AgentTask(id+"-inspect", "Inspect the incident.", nil, nil)
if len(report) == 0 { continue }
approved := ctx.AskUser(id+"-approve", "Apply the repair? Reply yes or no.")
if approved != "yes" {
return yield.Outcome{}, ctx.Refused("repair not approved")
}
repair := ctx.RunCommand(id+"-repair", "./scripts/repair.sh", 300)
ctx.Require(repair.ExitCode == 0, "repair succeeds", repair)
verify := ctx.RunCommand(id+"-verify", "./scripts/verify.sh", 300)
ctx.Require(verify.ExitCode == 0, "verification passes", verify)
return ctx.Complete(map[string]any{"evidence": report})
}
return yield.Outcome{}, ctx.Blocked("confirmed evidence is missing")
Explain the goal. Run the program. Return its saved result.
Write Go, TypeScript, Python, or Rust.
Review changes and test every path.
The saved run survives a new session.
If proof is missing, Yield saves the reason and stops.
01 / WHAT HAPPENS
The agent does the work. Yield remembers the workflow.
Start a small program. It runs one step, saves the result, and knows what comes next—even in a new session.
You run your custom command
Your command starts your workflow file.
The agent works
Your workflow can call the agent, run commands, or ask a person.
Yield checks and saves
It finishes only when the checks pass. If the run stops, start it again and continue.
Not a replacement for your skills.
SKILL.md + your skillGive the agent the goal, context, and tools.
Your workflow + YieldKeep the order, checks, choices, and saved state.
02 / YOUR LANGUAGE
Use the language you already know.
These are workflows you write. Yield provides the primitives to ask, run commands, require proof, and save the result.
03 / INSTALL
Add Yield in the language you use.
The SDKs are open source and served from OperatorStack's package service. Pick one command and start with one workflow.
TypeScript
Install the scoped package through the read-only registry front door.
npm install @operatorstack/yield \
--registry=https://get.operatorstack.systems/npm/
Python
Use the OperatorStack Python index for this install.
python -m pip install yieldskill \
--index-url https://get.operatorstack.systems/pip/simple/
Go
Point this command at the OperatorStack Go module proxy.
GOPROXY=https://get.operatorstack.systems/go,direct \
go get github.com/operatorstack/yield@v0.1.8
Rust
Add the read-only sparse registry once, then add the crate.
# .cargo/config.toml
[registries.operatorstack]
index = "sparse+https://get.operatorstack.systems/cargo/index/"
cargo add yieldskill --registry operatorstack
04 / START HERE
Start with work that already has rules.
Use Yield when your instructions say what must happen first, what can retry, or when a person must approve.
- GOFind the cause of a buginspect → test an idea → retry up to the limit → finish or stop
- TSRelease with approvalrun checks → ask a person → release or stop
- PYCheck and fix a setupcheck → suggest a fix → repair → check again
- RSRun a safe data changepreview → review → approve → apply → verify
- IDEAImprove a skill within a fixed budgetpropose → test → compare → accept or reject → stop when proof is missing
05 / BUILT TO STOP
A changed step never reuses the wrong answer.
Yield checks the saved run before it continues. If the program changed, the run stops and tells you.
- PASSOne clear next stepThe program returns one request or one final result. Then it exits.
- PASSEvery run says how it endedThe run records finished, blocked, or refused.
- STOPOld answers stay with old stepsIf a step changes, Yield stops before it uses the saved answer.
- DETAILThe technical trace stays availableop_drifts → consume_unchecked → CONSUMED_MISMATCHED
06 / NO MAGIC CLAIMS
Clear limits. Useful guarantees.
Yield keeps the steps in order. It does not make every model answer true.
A valid answer can still be wrong
Yield can check the format. Your workflow must still check the facts.
Yield sees its own steps
It cannot see every action an agent takes outside the run.
Command results are saved directly
Yield runs the command and records what happened.
07 / TRY ONE
Start with one skill that has too many rules.
Keep the useful instructions. Move only the repeatable steps. You do not need a new agent platform.
- 001Find a skill with repeated rulesLook for words such as
always,retry,before,after, orstop when. - 002Keep the helpful guidanceLeave the goal, examples, and tool notes in
SKILL.md. - 003Move the strict stepsPut order, retries, approvals, saved state, and finish rules in Yield.
- 004Try every pathTest the happy path, the stop path, and each choice before an agent runs it.