diff --git a/labs/22-yield/README.md b/labs/22-yield/README.md index a1ada8c5..1ff42703 100644 --- a/labs/22-yield/README.md +++ b/labs/22-yield/README.md @@ -1,21 +1,19 @@ # Lab 22 — Yield -Programmable skills for coding agents. **Turn `SKILL.md` workflows into -resumable programs.** +**Write one skill workflow. Run it from your coding agents.** -> The skill yields the next typed operation. The coding agent performs it -> and resumes the skill. +A skill workflow is a portable, executable process that combines agent skills +with deterministic code, state, and verification. -A skill keeps its thin `SKILL.md` (so it works wherever skills work today) -and moves its control flow — order, branching, retries, approval, state, -completion — into a deterministic Go program. The model keeps reasoning, -exploration, editing, and judgment. No daemon, no new agent loop, no host -integration: the agent only runs a CLI and follows envelopes. +The canonical skill workflow stays beside the repository code and language +dependencies it uses. Generated `SKILL.md` adapters let each coding agent +discover it. The model keeps reasoning, exploration, editing, and judgment; +normal code owns order, branching, retries, approval, state, and completion. ## Execution model Deterministic re-execution (no resumable coroutines needed): on every -run/resume, `yskill` re-executes the skill program from the top, feeding +run/resume, `yskill` re-executes the skill workflow from the top, feeding recorded responses back in order. At the first unanswered operation the SDK emits a `yield.v1` request envelope and exits. A replayed step that produces a different operation than the journal recorded is a divergence @@ -23,13 +21,13 @@ and fails the run loudly — it never silently forks. Two processes: -- **`yskill` (supervisor)** — owns the append-only run log +- **`yskill` (Yield runtime)** — owns the append-only run log (`.yield/runs/.jsonl`), sequence and digest binding, response validation, and every refusal. `run_command` operations are executed by yskill itself, so command results enter the log as observed fact rather than the agent's transcription. -- **skill program (subprocess)** — an ordinary Go `main` using - `yield/sdk/yield`; every side effect crosses a yielded primitive +- **skill workflow (subprocess)** — an ordinary program using one Yield SDK; + the Go form uses `yield/sdk/yield`. Every side effect crosses a yielded primitive (`AskUser`, `AgentTask`, `RunCommand`, `Require`, `Complete`, plus the `Blocked`/`Refused` terminals). @@ -42,18 +40,18 @@ yield/ ├── internal/protocol/ yield.v1 envelopes, digests, schema validation (bound to ir/ by test) ├── internal/runlog/ append-only JSONL event log ├── internal/guard/ every refusal: stale/dup/wrong-run/schema/digest/unproven -├── internal/engine/ supervisor: subprocess execution, command evidence, terminals +├── internal/engine/ runtime: subprocess execution, command evidence, terminals ├── internal/conformance/ the SAME program in 4 languages; identical observable traces ├── sdk/yield/ Go SDK — examples/investigate ├── sdk/typescript/ TypeScript SDK — examples/release-checklist (node main.ts) ├── sdk/python/ Python SDK — examples/env-doctor (import yieldskill) ├── sdk/rust/ Rust SDK — examples/data-migration (crate yieldskill) -├── examples/library/ 10 workflows × 4 languages, all fixture-tested +├── examples/library/ 10 skill workflows × 4 languages, all fixture-tested └── docs/locus* certified lifecycle + SDK-contract models, verdicts, discharge ``` Skills declare their runner in `skill.json` (`{"run": ["python3", "main.py"]}`); -a bare `main.go` falls back to `go run .`. One supervisor drives all four +a bare `main.go` falls back to `go run .`. One Yield runtime drives all four languages because they all speak the yield.v1 IR — the SDK execution contract is Locus-certified (trace-refinement) and the in-SDK per-step divergence check is a *decided* design comparison, not a convention diff --git a/labs/22-yield/distribution/release-notes/2026-08-02-skill-workflows.md b/labs/22-yield/distribution/release-notes/2026-08-02-skill-workflows.md new file mode 100644 index 00000000..57a7fa51 --- /dev/null +++ b/labs/22-yield/distribution/release-notes/2026-08-02-skill-workflows.md @@ -0,0 +1,8 @@ +# Skill workflows for coding agents + +- Name the public category: a skill workflow combines agent skills with code, + checks, state, and human input. +- Separate the canonical workflow users edit from generated agent adapters. +- Align the README, quickstart, examples, SDK package descriptions, reference + docs, and CLI help around the same terms. +- Keep runtime APIs and the `yield.v1` execution contract unchanged. diff --git a/labs/22-yield/public-readme/README.md b/labs/22-yield/public-readme/README.md index 163512a5..01ee39a1 100644 --- a/labs/22-yield/public-readme/README.md +++ b/labs/22-yield/public-readme/README.md @@ -1,20 +1,26 @@ # Yield -Programmable skills for coding agents. **Turn `SKILL.md` workflows into -resumable programs.** +**Write one skill workflow. Run it from your coding agents.** -> The skill yields the next typed operation. The coding agent performs it -> and resumes the skill. +Skill workflows are portable, executable processes that combine agent skills +with deterministic code, state, and verification. -Write control flow in TypeScript, Python, Go, or Rust. Yield user -questions, agent tasks, and commands to the coding agent. Resume from the -result. No custom agent runtime required — the agent only runs a CLI and -follows envelopes. +Write the workflow in TypeScript, Python, Go, or Rust. Combine agent judgment, +real commands, human input, checks, and saved state. Yield generates the small +adapter each coding agent expects. -A skill keeps its thin `SKILL.md` (so it works wherever skills work today) -and moves the part prose loses under context pressure — order, branching, -retries, approval, state, completion — into a deterministic program. The -model keeps reasoning, exploration, editing, and judgment. +The split is small: + +| term | meaning | +|---|---| +| **skill** | one reusable capability | +| **workflow** | order, branches, checks, and saved state | +| **skill workflow** | an executable composition of skills, code, commands, and human input | +| **adapter** | a generated `SKILL.md` that lets one coding agent discover the workflow | + +The canonical skill workflow stays beside your code. Generated adapters are +disposable. The model keeps reasoning, exploration, editing, and judgment; +normal code owns the repeatable control flow. ## Install @@ -41,9 +47,9 @@ cargo install yieldskill \ yskill --version ``` -## Create and register a workflow +## Create and register a skill workflow -Keep the real workflow beside the language dependencies it uses. Yield writes +Keep the canonical workflow beside the language dependencies it uses. Yield writes small adapters into each coding agent's project skill directory; it does not copy the workflow or install its dependencies again. @@ -53,9 +59,11 @@ npm exec -- yskill init skills/review \ --language typescript \ --description "Review changed code when the user wants a branch checked before shipping." -# Detect installed agents, or pass --agent cursor,codex,claude-code -npm exec -- yskill register skills/review +# Replace the intentionally incomplete starter and fixture, then check it. npm exec -- yskill doctor skills/review --test + +# Detect installed agents, or pass --agent cursor,codex,claude-code. +npm exec -- yskill register skills/review ``` `yskill agents` lists the available agent IDs and project paths. Cursor, @@ -63,10 +71,10 @@ Codex, and Claude Code are verified. Remaining entries support explicit path registration from the pinned open registry; they are not presented as end-to-end verified. -## How it works +## How a skill workflow runs Deterministic re-execution: on every run/resume, `yskill` re-executes the -skill program from the top, feeding recorded responses back in order. At +skill workflow from the top, feeding recorded responses back in order. At the first unanswered operation the SDK emits a `yield.v1` request envelope and the process exits — no daemon. A replayed step that produces a different operation than the journal recorded is a divergence and fails @@ -76,7 +84,7 @@ the run loudly; it never silently forks. (`.yield/runs/.jsonl`), sequence and digest binding, response validation, and every refusal (stale, duplicate, wrong-run, schema-invalid, digest-mismatch, completion-unproven). -- **The skill program** is an ordinary Go `main` using `sdk/yield`; every +- **The skill workflow** is an ordinary program using one Yield SDK; every side effect crosses a yielded primitive. Five primitives, two exits: @@ -89,13 +97,13 @@ Five primitives, two exits: | `Require` | a claim bound to evidence; failure makes completion structurally unreachable | | `Complete` / `Blocked` / `Refused` | honest terminals, always recorded | -## Four languages, one protocol +## Four languages, one execution contract -Write the skill program in Go, TypeScript, Python, or Rust — the -runtime doesn't care. Every SDK implements the same certified -execution contract over the canonical `ir/yield.v1` schemas, and the -conformance suite (`internal/conformance`) runs the *same program* in all -four languages and asserts identical observable protocol behavior. +Write the skill workflow in Go, TypeScript, Python, or Rust. Every SDK +implements the same certified execution contract, and the conformance suite +(`internal/conformance`) runs the same program in all four languages and +asserts identical observable behavior. The language-neutral schemas are +documented in the [runtime reference](docs/reference/sdk-parity.md). | language | SDK | example | |---|---|---| @@ -107,28 +115,29 @@ four languages and asserts identical observable protocol behavior. Skills declare their language and runner in `skill.json`: `{"version": 1, "language": "typescript", "run": ["node", "main.ts"]}`. -## Ten workflows, every language +## Ten skill workflows, every language -The [example library](examples/library/) recreates ten common coding-agent -workflows independently in all four SDKs: branch review, failure +The [example library](examples/library/) implements ten common skill workflows +independently in all four SDKs: branch review, failure investigation, web QA, package release, issue triage, CI repair, dependency upgrade, database migration, security audit, and iOS publishing. -Each language has the same workflow, a thin `SKILL.md`, and a scripted +Each language has the same skill workflow, a thin adapter, and a scripted fixture. Start from the work you already do instead of starting from a framework tutorial. ## Documentation -Start with the [ten-minute TypeScript quickstart](docs/quickstart.md), then -use the documentation by job: +Start with [what a skill workflow is](docs/skill-workflows.md), then build one +with the [ten-minute TypeScript quickstart](docs/quickstart.md). Continue with +the documentation for your job: - [primitive guides](docs/primitives/README.md) — commands, model work, human input, evidence gates, and outcomes; - [tutorials](docs/tutorials/README.md) — review, approval, environment repair, bounded debugging, and migration; - [examples](docs/examples.md) — working programs in all four languages; -- [coding-agent setup](docs/agent-setup.md) — register one workflow with the +- [coding-agent setup](docs/agent-setup.md) — register one skill workflow with the agents used by the project; - [evaluations](evals/README.md) — first-party workflow conformance and runtime invariant results, including the exact claim boundary; @@ -151,7 +160,7 @@ YSKILL="$PWD/yskill" bash ./examples/library/test-all.sh ./yskill test examples/env-doctor # Python 3.10+ ./yskill test examples/data-migration # Rust (cargo) ./yskill run examples/investigate # prints the first operation envelope -./yskill init my-skill --description "Run this workflow when ..." +./yskill init my-skill --description "Run this skill workflow when ..." ./yskill register my-skill --agent codex # write a thin project adapter ./yskill doctor my-skill --agent codex # verify package + adapter wiring ``` diff --git a/labs/22-yield/yield/cmd/yskill/main.go b/labs/22-yield/yield/cmd/yskill/main.go index 5e9e7ff3..e10b8457 100644 --- a/labs/22-yield/yield/cmd/yskill/main.go +++ b/labs/22-yield/yield/cmd/yskill/main.go @@ -24,17 +24,17 @@ import ( "github.com/operatorstack/yield/internal/runlog" ) -const usage = `yskill — turn SKILL.md workflows into resumable programs +const usage = `yskill — run and resume skill workflows Usage: - yskill init scaffold a skill (or wrap an existing prose skill) + yskill init scaffold a skill workflow (or wrap an existing prose skill) [--language typescript|python|go|rust] [--description text] - yskill register expose one workflow to coding agents + yskill register expose one skill workflow to coding agents [--agent cursor,codex,...|auto] [--root repo] - yskill register-all expose every immediate workflow + yskill register-all expose every immediate skill workflow [--agent cursor,codex,...|auto] [--root repo] [--dry-run] [--prune] yskill agents list supported coding agents and paths - yskill doctor check package, workflow, and adapters + yskill doctor check package, skill workflow, and adapters [--agent cursor,codex,...|auto] [--root repo] [--test] yskill run [--input file] start a run; prints the first operation envelope yskill resume --response file feed a response; prints the next operation diff --git a/labs/22-yield/yield/docs/README.md b/labs/22-yield/yield/docs/README.md index b43fe380..31b54bce 100644 --- a/labs/22-yield/yield/docs/README.md +++ b/labs/22-yield/yield/docs/README.md @@ -1,28 +1,35 @@ # Yield documentation -You already know the workflow. You may be repeating it in a prompt: +You already know the skill workflow. You may be repeating it in a prompt: > Run the checks. Review the diff. Stop if anything critical remains. Ask me > before publishing. If the session ends, start again without losing our place. -Yield lets you keep the useful words and put the order in normal code. The -coding agent still investigates, reviews, edits, and explains. Your program +Yield lets you keep the useful words and put the repeatable flow in normal +code. The coding agent still investigates, reviews, edits, and explains. Your program decides which operation comes next, what evidence must exist, and when the run is finished. +A **skill workflow** is a portable, executable process that combines agent +skills with deterministic code, state, and verification. The canonical +workflow is the source you edit. Generated adapters let coding agents discover +and start it. + ## Start here -1. [Build and run your first skill](quickstart.md) — a TypeScript workflow you - can test in about ten minutes. -2. [Register it with your coding agents](agent-setup.md) — keep one workflow +1. [Understand skill workflows](skill-workflows.md) — the canonical workflow, + generated adapter, and execution boundary. +2. [Build and run your first skill workflow](quickstart.md) — a TypeScript + workflow you can test in about ten minutes. +3. [Register it with your coding agents](agent-setup.md) — keep one workflow and generate the small discovery adapters each agent needs. -3. [Learn the primitives](primitives/README.md) — commands, model work, human +4. [Learn the primitives](primitives/README.md) — commands, model work, human input, gates, and honest outcomes. -4. [Follow a complete tutorial](tutorials/README.md) — review, approval, +5. [Follow a complete tutorial](tutorials/README.md) — review, approval, environment repair, bounded debugging, and migration. -5. [Browse the examples](examples.md) — working programs in Go, TypeScript, - Python, and Rust. -6. [Convert an existing prose skill](convert-existing-skill.md) — use Yield's +6. [Browse the examples](examples.md) — working skill workflows in Go, + TypeScript, Python, and Rust. +7. [Convert an existing prose skill](convert-existing-skill.md) — use Yield's verified converter after you understand one ordinary workflow. ## The split to remember @@ -42,6 +49,7 @@ next unanswered operation. ## Reference +- [Skill workflow concepts](skill-workflows.md) - [CLI commands](reference/cli.md) - [Coding-agent registration](agent-setup.md) - [Run, pause, resume, and replay](reference/execution-model.md) diff --git a/labs/22-yield/yield/docs/agent-setup.md b/labs/22-yield/yield/docs/agent-setup.md index 5393050d..12c54ac3 100644 --- a/labs/22-yield/yield/docs/agent-setup.md +++ b/labs/22-yield/yield/docs/agent-setup.md @@ -1,10 +1,10 @@ -# Use one Yield workflow from your coding agents +# Run one skill workflow from your coding agents -Yield workflows belong beside the application and language dependencies they -use. `yskill register` creates only the small `SKILL.md` adapters required for -agent discovery. +The canonical skill workflow belongs beside the application and language +dependencies it uses. `yskill register` creates only the small `SKILL.md` +adapters required for agent discovery. -## Register an existing workflow +## Register an existing skill workflow ```bash # Detect installed verified agents @@ -39,8 +39,9 @@ snapshot of the open `vercel-labs/skills` registry and are labelled `registry`: path generation is tested, but the product itself has not been run end to end by Yield. -Generated adapters are safe to commit. Regenerate them after changing the -canonical workflow. Yield refuses to overwrite a user-owned skill with the +Generated adapters are safe to commit. They are disposable discovery files, +not copies of the workflow. Regenerate them after changing the canonical skill +workflow. Yield refuses to overwrite a user-owned skill with the same name. Names must also be unique across languages because coding agents use one project-level skill namespace. @@ -50,29 +51,29 @@ Replace the bracketed values, then paste this into the coding agent already open in the project: ```text -Set up a Yield workflow named [skill-name] in skills/[skill-name]. +Set up a Yield skill workflow named [skill-name] in skills/[skill-name]. 1. Detect whether this project uses TypeScript, Python, Go, or Rust. 2. Install that language's Yield package using the project's existing package manager. Do not install a second global runtime. 3. Run yskill init with the detected language and this description: [what the workflow does and when it should run] -4. Replace the starter program and fixture with the requested workflow. The +4. Replace the starter program and fixture with the requested skill workflow. The starter is intentionally blocked and must not pass tests unchanged. 5. Run yskill doctor with --test before registration. -6. Keep the workflow beside the project's language dependencies. +6. Keep the canonical workflow beside the project's language dependencies. 7. Run yskill register for the coding agent you are currently using. 8. Use the launcher from the installed language package for every yskill command: npm exec -- yskill, python -m yieldskill, or yskill. 9. Run yskill doctor with --agent and --test. 10. Report the commands, generated adapter path, and every changed file. -Do not move the workflow into an agent discovery directory and do not copy its +Do not move the skill workflow into an agent discovery directory and do not copy its dependencies into an adapter. ## Questions and agent results -Yield emits a typed operation. The coding agent may show that operation using +The skill workflow emits a typed operation. The coding agent may show that operation using its native question UI. Yield does not render the UI. After collecting an answer, the adapter uses `yskill respond`; it does not create `response.json`. diff --git a/labs/22-yield/yield/docs/examples.md b/labs/22-yield/yield/docs/examples.md index 31ce6c3a..cbf3ef16 100644 --- a/labs/22-yield/yield/docs/examples.md +++ b/labs/22-yield/yield/docs/examples.md @@ -1,10 +1,10 @@ -# Example library +# Skill workflow library -The library contains ten common coding-agent workflows. Every workflow is +The library contains ten common skill workflows for coding agents. Every workflow is implemented in TypeScript, Python, Go, and Rust, so the first choice is your repository's language—not which example happens to exist. -| Workflow | Control flow moved into code | +| Skill workflow | Control flow moved into code | |---|---| | [Review a branch](../examples/library/typescript/review-branch/) | checks, review, zero-critical gate | | [Investigate a failure](../examples/library/typescript/investigate-failure/) | evidence, diagnosis, supported cause | @@ -31,7 +31,7 @@ Run all forty fixtures: YSKILL=/tmp/yskill bash ./examples/library/test-all.sh The included commands produce harmless evidence so the examples run in this -repository. Replace them with project commands before adopting a workflow. +repository. Replace them with project commands before adopting a skill workflow. ## Complete walkthroughs @@ -67,6 +67,6 @@ The [first-party evaluation suite](../evals/) runs every example-library pattern through TypeScript, Python, Go, and Rust. It also checks resume, replay, changed behavior, blocking, and changed source. -These results show that the tested Yield version runs the workflow steps in +These results show that the tested Yield version runs the skill workflow steps in code. They do not compare Yield with prose or test whether an agent's judgment is correct. diff --git a/labs/22-yield/yield/docs/primitives/README.md b/labs/22-yield/yield/docs/primitives/README.md index ff6ea711..82b3c226 100644 --- a/labs/22-yield/yield/docs/primitives/README.md +++ b/labs/22-yield/yield/docs/primitives/README.md @@ -7,8 +7,8 @@ Yield has a deliberately small API. Each primitive has one clear owner. | [`RunCommand`](run-command.md) | Runs a command and records its real output | `yskill` | | [`AgentTask`](agent-task.md) | Requests model judgment with an optional JSON schema | coding agent | | [`AskUser`](ask-user.md) | Pauses for a human answer | coding agent and user | -| [`Require`](require.md) | Prevents completion unless a claim passes | skill program | -| [Outcomes](outcomes.md) | Completes, blocks, or refuses with a recorded reason | skill program | +| [`Require`](require.md) | Prevents completion unless a claim passes | skill workflow | +| [Outcomes](outcomes.md) | Completes, blocks, or refuses with a recorded reason | skill workflow | Ordinary language features provide the rest. Use `if` for choices, `for` or `while` for bounded retries, functions for reusable flows, and your language's diff --git a/labs/22-yield/yield/docs/quickstart.md b/labs/22-yield/yield/docs/quickstart.md index b2316291..f2556852 100644 --- a/labs/22-yield/yield/docs/quickstart.md +++ b/labs/22-yield/yield/docs/quickstart.md @@ -1,4 +1,4 @@ -# Run your first Yield skill +# Create your first skill workflow This tutorial turns a repeated review checklist into a small TypeScript program: run a real check, ask the coding agent to review the branch, stop on @@ -19,7 +19,7 @@ npm exec -- yskill --version The package includes the TypeScript SDK and its matching Yield runtime. -## 2. Create the canonical workflow +## 2. Initialize the skill workflow ```bash npm exec -- yskill init skills/review \ @@ -27,7 +27,7 @@ npm exec -- yskill init skills/review \ --description "Check and review the current branch before it is shipped." ``` -The workflow stays under `skills/review`, inside the same dependency tree as +The canonical workflow stays under `skills/review`, inside the same dependency tree as `@operatorstack/yield`. The generated `skill.json` records the language and program entry point: @@ -35,7 +35,10 @@ program entry point: {"version":1,"language":"typescript","run":["node","main.ts"]} ``` -## 3. Add the workflow logic +The starter is intentionally incomplete. It cannot pass `doctor --test` until +you replace its program and fixture with the behavior described by the skill. + +## 3. Implement the workflow and fixture Replace `skills/review/main.ts`: @@ -80,7 +83,7 @@ The generated `skills/review/SKILL.md` remains short. It tells the agent when to use the workflow and how to follow the yielded operations; the program owns the order and finish rule. -## 4. Prove the workflow locally +## 4. Test the skill workflow Replace `skills/review/fixtures/responses.json`: @@ -103,7 +106,7 @@ npm exec -- yskill doctor skills/review --test user responses. A successful result ends with `reached completed` and a doctor summary. -## 5. Register it with coding agents +## 5. Generate coding-agent adapters ```bash # Detect installed verified agents @@ -114,7 +117,7 @@ npm exec -- yskill register skills/review \ --agent cursor,codex,claude-code ``` -Yield keeps one workflow and writes only generated adapters: +Yield keeps one canonical skill workflow and writes only generated adapters: ```text .cursor/skills/review/SKILL.md # Cursor @@ -143,10 +146,11 @@ npm exec -- yskill register skills/review --agent cursor npm exec -- yskill run skills/review ``` -The agent reads the generated adapter, starts the canonical workflow, performs +The agent reads the generated adapter, starts the canonical skill workflow, performs each yielded operation, and answers with `yskill respond`. If the session closes, the run remains on disk. -Next: [set up coding agents](agent-setup.md), [understand each +Next: [understand skill workflows](skill-workflows.md), [set up coding +agents](agent-setup.md), [understand each primitive](primitives/README.md), or follow the [complete review tutorial](tutorials/code-review.md). diff --git a/labs/22-yield/yield/docs/reference/cli.md b/labs/22-yield/yield/docs/reference/cli.md index 16e2ab3f..48aa360a 100644 --- a/labs/22-yield/yield/docs/reference/cli.md +++ b/labs/22-yield/yield/docs/reference/cli.md @@ -1,7 +1,7 @@ # CLI reference -`yskill` runs workflows. It owns run logs, validates responses, executes -commands, and starts the skill program. It comes with each language package. +`yskill` runs and resumes skill workflows. It owns run logs, validates responses, executes +commands, and starts the skill workflow. It comes with each language package. ## `init` @@ -10,7 +10,8 @@ yskill init --description "What it does and when to use it" [--language typescript|python|go|rust] ``` -Scaffolds a new skill or adds a Yield program beside an existing prose skill. +Scaffolds a new skill workflow or adds a Yield program beside an existing +prose skill. Generated dependencies are pinned to the installed `yskill` version. New skills require a real trigger-oriented description. Existing `SKILL.md` files are preserved and validated. @@ -47,7 +48,7 @@ yskill doctor [--agent cursor,codex,...|auto] [--root repository] [--test] ``` -Checks the canonical workflow and package launcher. `--test` also runs the +Checks the canonical skill workflow and package launcher. `--test` also runs the workflow against `fixtures/responses.json` without leaving a run journal. Adapter checks run only when `--agent` is supplied, and all adapter problems are reported together. @@ -103,7 +104,7 @@ yskill register-all --agent cursor,codex [--root repository] [--dry-run] [--prune] ``` -Registers every immediate workflow in one directory. It checks all names and +Registers every immediate skill workflow in one directory. It checks all names and destinations before writing. `--prune` removes only obsolete adapters generated from that workflow directory. Agent-facing names must be unique. diff --git a/labs/22-yield/yield/docs/reference/execution-model.md b/labs/22-yield/yield/docs/reference/execution-model.md index a4e665a5..c78e151c 100644 --- a/labs/22-yield/yield/docs/reference/execution-model.md +++ b/labs/22-yield/yield/docs/reference/execution-model.md @@ -3,7 +3,7 @@ Yield does not keep a daemon or suspended coroutine alive. It uses deterministic re-execution. -1. `yskill` starts the skill program with its journal. +1. `yskill` starts the skill workflow with its journal. 2. The program runs from the top. 3. Recorded operations receive their recorded responses in order. 4. Before consuming each response, the SDK checks that the operation digest @@ -26,7 +26,7 @@ reviewing the change. ## Filesystem effects -Skill programs must remain deterministic between yielded operations. Do not +Skill workflows must remain deterministic between yielded operations. Do not read clocks, randomness, changing environment variables, or mutable files directly when they affect control flow. Cross observable system effects through `RunCommand`, and pass stable input through the run input or recorded responses. diff --git a/labs/22-yield/yield/docs/skill-workflows.md b/labs/22-yield/yield/docs/skill-workflows.md new file mode 100644 index 00000000..58fcaf1a --- /dev/null +++ b/labs/22-yield/yield/docs/skill-workflows.md @@ -0,0 +1,45 @@ +# Skill workflows + +A **skill workflow** is a portable, executable process that combines agent +skills with deterministic code, state, and verification. + +The terms have separate jobs: + +| term | meaning | +|---|---| +| **skill** | one reusable capability, described for the coding agent | +| **workflow** | sequencing, branching, checks, and saved state | +| **skill workflow** | an executable composition of skills, code, commands, and human input | +| **adapter** | a generated `SKILL.md` that lets one coding agent discover the workflow | + +## The two slices + +The canonical skill workflow is the source you edit. It stays under `skills/` +beside its language dependencies, fixtures, and saved runs. + +The agent adapter is generated. It contains only the description and the +package-correct commands needed to start or resume the canonical workflow. +Delete and regenerate it when the host changes; do not copy workflow code into +it. + +```text +coding agent + -> generated adapter + -> canonical skill workflow + -> agent task, command, or human question + -> saved response + -> next step or completed, blocked, or refused +``` + +## What belongs where + +Keep goals, examples, tool guidance, and judgment with the skill and coding +agent. Put order, branches, retry limits, approval points, required evidence, +and finish rules in normal code. + +Yield does not replace skills. It gives repeatable skill behavior an +executable boundary that can be tested, paused, resumed, and exposed to more +than one coding agent. + +Next: [create your first skill workflow](quickstart.md) or [register an +existing one](agent-setup.md). diff --git a/labs/22-yield/yield/docs/tutorials/README.md b/labs/22-yield/yield/docs/tutorials/README.md index ab9bb543..e52a2e8e 100644 --- a/labs/22-yield/yield/docs/tutorials/README.md +++ b/labs/22-yield/yield/docs/tutorials/README.md @@ -1,6 +1,6 @@ # Tutorials -Each tutorial starts with an engineering job, not a protocol concept. +Each tutorial starts with an engineering job, not an internal runtime concept. 1. [Check and review a branch](code-review.md) — combine deterministic checks with model judgment. @@ -13,5 +13,5 @@ Each tutorial starts with an engineering job, not a protocol concept. 5. [Run a migration safely](data-migration.md) — dry-run, approve, apply, and verify in order. -The repository contains fixture-backed versions of these patterns. Run an +The repository contains fixture-backed skill workflows for these patterns. Run an example with `yskill test examples/` before adapting it. diff --git a/labs/22-yield/yield/evals/README.md b/labs/22-yield/yield/evals/README.md index 35cc3e5e..76ea90b6 100644 --- a/labs/22-yield/yield/evals/README.md +++ b/labs/22-yield/yield/evals/README.md @@ -5,19 +5,18 @@ tool or company. The deterministic suite answers two questions: -1. Can each checked-in example workflow reach its expected final result +1. Can each checked-in example skill workflow reach its expected final result through every supported SDK? 2. Does the runtime behave correctly when a run resumes, replays, blocks, or encounters changed code? ## Current coverage -- 10 workflow patterns written by this project. +- 10 skill workflow patterns written by this project. - 4 SDKs: TypeScript, Python, Go, and Rust. - 40 end-to-end workflow tests. -- 5 runtime checks: resume and complete, repeat the same saved step, stop when - behavior changes, block when a rule fails, and require approval for changed - source. +- 8 runtime checks: response locking and recovery, declared user choices, + resume, replay, changed behavior, failed requirements, and changed source. Run the exact suite and refresh the checked-in result: @@ -36,7 +35,7 @@ npm test A passing result proves that the tested Yield revision: -- executes each owned workflow test to `completed`; +- executes each owned skill workflow test to `completed`; - runs command steps rather than asking the model to invent their outputs; - presents requests in the program-defined order; - resumes from recorded responses; diff --git a/labs/22-yield/yield/evals/results/latest.json b/labs/22-yield/yield/evals/results/latest.json index eec14efd..8d6c3ebf 100644 --- a/labs/22-yield/yield/evals/results/latest.json +++ b/labs/22-yield/yield/evals/results/latest.json @@ -1,8 +1,8 @@ { "schema_version": 2, "methodology_version": "1.1", - "generated_at": "2026-08-02T09:47:39.937Z", - "source_digest": "5a52fa0145a400283ee3140563124c2e7c758cfbcce8b20f7efcfa2e7c3c8cd4", + "generated_at": "2026-08-02T10:42:46.872Z", + "source_digest": "1819f3be5d90558331e24832f6b30294aa5b3a9b6b07771e3fd2db8e407bbf25", "status": "passed", "workflow_conformance": { "passed": 40, diff --git a/labs/22-yield/yield/examples/library/README.md b/labs/22-yield/yield/examples/library/README.md index a34a9ac0..dbe583dd 100644 --- a/labs/22-yield/yield/examples/library/README.md +++ b/labs/22-yield/yield/examples/library/README.md @@ -1,10 +1,10 @@ -# Example library +# Skill workflow library -Ten common coding-agent workflows, each implemented in TypeScript, Python, +Ten common skill workflows for coding agents, each implemented in TypeScript, Python, Go, and Rust. Choose the language already used by your repository; the workflow and fixture are otherwise the same. -| Workflow | What the code keeps in order | +| Skill workflow | What the code keeps in order | |---|---| | review-branch | checks -> review -> zero-critical gate | | investigate-failure | evidence -> diagnosis -> supported cause | @@ -39,7 +39,7 @@ Or run one: /tmp/yskill test examples/library/rust/review-branch The shell commands deliberately produce harmless fixture evidence. Replace -them with the real commands from your repository before adopting a workflow. +them with the real commands from your repository before adopting a skill workflow. The examples are independent implementations of recurring skill categories; they do not copy another project's prompts or claim compatibility with them. diff --git a/labs/22-yield/yield/sdk/python/README.md b/labs/22-yield/yield/sdk/python/README.md index df705e1e..f4e9b669 100644 --- a/labs/22-yield/yield/sdk/python/README.md +++ b/labs/22-yield/yield/sdk/python/README.md @@ -1,4 +1,4 @@ -# yieldskill — Yield skill-program SDK for Python +# yieldskill — Yield skill workflow SDK for Python The Python implementation of the yield.v1 SDK execution contract (see `ir/README.md`). The import name is `yieldskill` because `yield` is a diff --git a/labs/22-yield/yield/sdk/python/pyproject.toml b/labs/22-yield/yield/sdk/python/pyproject.toml index 6f106704..f153459f 100644 --- a/labs/22-yield/yield/sdk/python/pyproject.toml +++ b/labs/22-yield/yield/sdk/python/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "yieldskill" version = "0.1.0" -description = "Yield skill-program SDK for Python: turn SKILL.md workflows into resumable programs." +description = "Build portable, resumable skill workflows in Python." readme = "README.md" license = { text = "MIT" } requires-python = ">=3.10" diff --git a/labs/22-yield/yield/sdk/rust/Cargo.toml b/labs/22-yield/yield/sdk/rust/Cargo.toml index 518a30b6..312f640b 100644 --- a/labs/22-yield/yield/sdk/rust/Cargo.toml +++ b/labs/22-yield/yield/sdk/rust/Cargo.toml @@ -2,7 +2,7 @@ name = "yieldskill" version = "0.1.0" edition = "2021" -description = "Yield skill-program SDK for Rust: turn SKILL.md workflows into resumable programs." +description = "Build portable, resumable skill workflows in Rust." license = "MIT" repository = "https://github.com/operatorstack/yield" diff --git a/labs/22-yield/yield/sdk/typescript/package.json b/labs/22-yield/yield/sdk/typescript/package.json index ff23b46f..862bb7e4 100644 --- a/labs/22-yield/yield/sdk/typescript/package.json +++ b/labs/22-yield/yield/sdk/typescript/package.json @@ -1,7 +1,7 @@ { "name": "@operatorstack/yield", "version": "0.1.0", - "description": "Yield skill-program SDK for TypeScript: turn SKILL.md workflows into resumable programs.", + "description": "Build portable, resumable skill workflows in TypeScript.", "license": "MIT", "type": "module", "files": [