yield/
FREE · OPEN SOURCE · EARLY LAB
SDKs · v0.1.8

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.

HOSTED BY OPERATORSTACK · NO PACKAGE-REGISTRY ACCOUNT NEEDED
$ npm install @operatorstack/yield
live example / code reviewready
TSreview.tsYield workflow
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.

Beforeone skill full of rules
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.
Afterthe same steps in code
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")
SKILL.md

Explain the goal. Run the program. Return its saved result.

Use a language you know

Write Go, TypeScript, Python, or Rust.

Test before you run

Review changes and test every path.

Pick up where you left off

The saved run survives a new session.

Stop when you should

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.

001

You run your custom command

Your command starts your workflow file.

002

The agent works

Your workflow can call the agent, run commands, or ask a person.

003

Yield checks and saves

It finishes only when the checks pass. If the run stops, start it again and continue.

USE BOTH

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.

GOinvestigate.go

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/

@operatorstack/yield · 0.1.8

Python

Use the OperatorStack Python index for this install.

python -m pip install yieldskill \ --index-url https://get.operatorstack.systems/pip/simple/

yieldskill · 0.1.8 · Python 3.10+

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

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

yieldskill · 0.1.8 · Rust 2021

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.

  1. GOFind the cause of a buginspect → test an idea → retry up to the limit → finish or stop
  2. TSRelease with approvalrun checks → ask a person → release or stop
  3. PYCheck and fix a setupcheck → suggest a fix → repair → check again
  4. RSRun a safe data changepreview → review → approve → apply → verify
  5. 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.

  1. PASSOne clear next stepThe program returns one request or one final result. Then it exits.
  2. PASSEvery run says how it endedThe run records finished, blocked, or refused.
  3. STOPOld answers stay with old stepsIf a step changes, Yield stops before it uses the saved answer.
  4. 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.

WHAT YIELD KNOWS

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.

  1. 001Find a skill with repeated rulesLook for words such as always, retry, before, after, or stop when.
  2. 002Keep the helpful guidanceLeave the goal, examples, and tool notes in SKILL.md.
  3. 003Move the strict stepsPut order, retries, approvals, saved state, and finish rules in Yield.
  4. 004Try every pathTest the happy path, the stop path, and each choice before an agent runs it.