Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/release-yield/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: release-yield
description: "Release Yield through its protected GitHub workflows and verify every public registry."
---

<!-- generated-by: yskill; source: skills/release-yield; digest: sha256:67db7d77c1f4f2d7ccc597c43c9bfe4be84be0795121cac9a3f08f79017b5738; version: 0.1.38 -->
<!-- generated-by: yskill; source: skills/release-yield; digest: sha256:85ef5fa8c0d09817ced3213451a72e211bd92736a9e851b567b2fd4034cc5c4c; version: 0.1.38 -->

This adapter exposes the canonical Yield workflow at `skills/release-yield`.
Read its SKILL.md, then run from the repository root:
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/release-yield/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: release-yield
description: "Release Yield through its protected GitHub workflows and verify every public registry."
---

<!-- generated-by: yskill; source: skills/release-yield; digest: sha256:67db7d77c1f4f2d7ccc597c43c9bfe4be84be0795121cac9a3f08f79017b5738; version: 0.1.38 -->
<!-- generated-by: yskill; source: skills/release-yield; digest: sha256:85ef5fa8c0d09817ced3213451a72e211bd92736a9e851b567b2fd4034cc5c4c; version: 0.1.38 -->

This adapter exposes the canonical Yield workflow at `skills/release-yield`.
Read its SKILL.md, then run from the repository root:
Expand Down
2 changes: 1 addition & 1 deletion .cursor/skills/release-yield/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: release-yield
description: "Release Yield through its protected GitHub workflows and verify every public registry."
---

<!-- generated-by: yskill; source: skills/release-yield; digest: sha256:67db7d77c1f4f2d7ccc597c43c9bfe4be84be0795121cac9a3f08f79017b5738; version: 0.1.38 -->
<!-- generated-by: yskill; source: skills/release-yield; digest: sha256:85ef5fa8c0d09817ced3213451a72e211bd92736a9e851b567b2fd4034cc5c4c; version: 0.1.38 -->

This adapter exposes the canonical Yield workflow at `skills/release-yield`.
Read its SKILL.md, then run from the repository root:
Expand Down
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,mjs,cjs,ts,tsx,json,md,yaml,yml,toml}]
indent_style = space
indent_size = 2

[*.py]
indent_style = space
indent_size = 4

[*.go]
indent_style = tab

[*.rs]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false
22 changes: 21 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ concurrency:
cancel-in-progress: true

jobs:
format:
name: Repository formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "24"
cache: npm
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- run: npm ci --ignore-scripts
- run: python -m pip install uv==0.12.3
- run: npm run format:check

go:
name: Go and agent registration (${{ matrix.os }})
strategy:
Expand Down Expand Up @@ -169,7 +189,7 @@ jobs:
validate:
name: Release authority and full validation
if: ${{ always() }}
needs: [go, release, selfhost, typescript, python, rust, conformance, examples]
needs: [format, go, release, selfhost, typescript, python, rust, conformance, examples]
runs-on: ubuntu-latest
steps:
- name: Require every validation job
Expand Down
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.yield/
.agents/
.claude/
.cursor/
node_modules/
dist/
build/
target/
evals/runs/
evals/results/
evals/agent/
examples/library/go/
examples/library/python/
examples/library/rust/
examples/library/typescript/
examples/library/catalog.json
internal/
sdk/typescript/src/index.ts
package-lock.json
evals/package-lock.json
sdk/typescript/package-lock.json
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 100,
"proseWrap": "preserve",
"semi": false,
"singleQuote": false,
"trailingComma": "all"
}
75 changes: 42 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ available for 73 more coding agents.

Run the command for your project:

| Language | Command |
|---|---|
| TypeScript | `npm create @operatorstack/yield@latest` |
| Python | `uvx --from yieldskill yskill bootstrap --language python` |
| Rust | `cargo install yieldskill --locked`, then `yskill bootstrap --language rust` |
| Go | `go run github.com/operatorstack/yield/cmd/yskill@latest bootstrap --language go` |
| Language | Command |
| ---------- | --------------------------------------------------------------------------------- |
| TypeScript | `npm create @operatorstack/yield@latest` |
| Python | `uvx --from yieldskill yskill bootstrap --language python` |
| Rust | `cargo install yieldskill --locked`, then `yskill bootstrap --language rust` |
| Go | `go run github.com/operatorstack/yield/cmd/yskill@latest bootstrap --language go` |

Yield detects the repository, language, and installed coding agents. It shows
every proposed file and dependency change. It asks before it writes. It then
Expand Down Expand Up @@ -84,17 +84,18 @@ A release skill often starts as prose:
Yield makes the order and stopping rules executable:

<!-- release-example:start -->

```typescript
import { defineSkill } from "@operatorstack/yield";
import { defineSkill } from "@operatorstack/yield"

type Review = { critical: number; summary: string };
type Review = { critical: number; summary: string }

defineSkill((ctx) => {
// Yield runs commands itself and records their output and exit status.
const tests = ctx.runCommand("test", "echo tests-ok", 300);
const tests = ctx.runCommand("test", "echo tests-ok", 300)

// A failed requirement stops the workflow and keeps its evidence.
ctx.require(tests.exit_code === 0, "the test command succeeds", tests);
ctx.require(tests.exit_code === 0, "the test command succeeds", tests)

// Review gives TypeScript its compile-time type. The JSON schema checks the
// coding agent's response at runtime before this workflow can continue.
Expand All @@ -110,28 +111,29 @@ defineSkill((ctx) => {
summary: { type: "string", minLength: 1 },
},
},
);
ctx.require(review.critical === 0, "the review has no critical findings", review);
)
ctx.require(review.critical === 0, "the review has no critical findings", review)

// Yield emits these fixed choices. A supported host may show native controls;
// otherwise the coding agent asks through its normal interface.
const approval = ctx.askUser("approve-publish", "Publish this package?", [
{ value: "yes", label: "Publish" },
{ value: "no", label: "Stop" },
]);
if (approval !== "yes") ctx.refused("the operator declined publication");
])
if (approval !== "yes") ctx.refused("the operator declined publication")

// Publishing cannot start before approval. Verification is a separate step,
// so completion requires evidence that the registry contains the release.
const publish = ctx.runCommand("publish", "echo publish-ok", 600);
ctx.require(publish.exit_code === 0, "the publish command succeeds", publish);
const publish = ctx.runCommand("publish", "echo publish-ok", 600)
ctx.require(publish.exit_code === 0, "the publish command succeeds", publish)

const registry = ctx.runCommand("verify-registry", "echo registry-ok", 300);
ctx.require(registry.exit_code === 0, "the registry contains the release", registry);
const registry = ctx.runCommand("verify-registry", "echo registry-ok", 300)
ctx.require(registry.exit_code === 0, "the registry contains the release", registry)

return { published: true, summary: review.summary };
});
return { published: true, summary: review.summary }
})
```

<!-- release-example:end -->

The example uses harmless commands so its fixture can run in any checkout.
Expand All @@ -140,6 +142,7 @@ The complete tested source is in
[`examples/release-checklist`](https://github.com/operatorstack/yield/tree/main/examples/release-checklist/).

<!-- npm-exclude:start -->

## Yield releases Yield

This repository uses its own exact published SDK for stable releases. The
Expand Down Expand Up @@ -263,13 +266,13 @@ The agent follows the generated adapter, runs the canonical workflow in
If replay produces a different operation, the run fails instead of silently
forking. Every side effect crosses one of these primitives:

| Primitive | Purpose |
|---|---|
| `runCommand` | Execute a command and record its exit code and output. |
| `agentTask` | Ask the coding agent for schema-valid JSON. |
| `askUser` | Request an explicit human decision. |
| `require` | Bind a required claim to recorded evidence. |
| `blocked` / `refused` | Stop honestly when work cannot or must not continue. |
| Primitive | Purpose |
| --------------------- | ------------------------------------------------------ |
| `runCommand` | Execute a command and record its exit code and output. |
| `agentTask` | Ask the coding agent for schema-valid JSON. |
| `askUser` | Request an explicit human decision. |
| `require` | Bind a required claim to recorded evidence. |
| `blocked` / `refused` | Stop honestly when work cannot or must not continue. |

See the [primitive guides](https://github.com/operatorstack/yield/blob/main/docs/primitives/README.md) and
[runtime reference](https://github.com/operatorstack/yield/blob/main/docs/reference/cli.md) for the full contract.
Expand All @@ -279,12 +282,12 @@ See the [primitive guides](https://github.com/operatorstack/yield/blob/main/docs
All four SDKs implement the same execution contract. The conformance suite runs
the same program in every language and compares observable behavior.

| Language | SDK | Example |
|---|---|---|
| TypeScript | [`@operatorstack/yield`](https://github.com/operatorstack/yield/tree/main/sdk/typescript/) | [`release-checklist`](https://github.com/operatorstack/yield/tree/main/examples/release-checklist/) |
| Python | [`yieldskill`](https://github.com/operatorstack/yield/tree/main/sdk/python/) | [`env-doctor`](https://github.com/operatorstack/yield/tree/main/examples/env-doctor/) |
| Go | [`github.com/operatorstack/yield/sdk/yield`](https://pkg.go.dev/github.com/operatorstack/yield/sdk/yield) | [`investigate`](https://github.com/operatorstack/yield/tree/main/examples/investigate/) |
| Rust | [`yieldskill`](https://github.com/operatorstack/yield/tree/main/sdk/rust/) | [`data-migration`](https://github.com/operatorstack/yield/tree/main/examples/data-migration/) |
| Language | SDK | Example |
| ---------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| TypeScript | [`@operatorstack/yield`](https://github.com/operatorstack/yield/tree/main/sdk/typescript/) | [`release-checklist`](https://github.com/operatorstack/yield/tree/main/examples/release-checklist/) |
| Python | [`yieldskill`](https://github.com/operatorstack/yield/tree/main/sdk/python/) | [`env-doctor`](https://github.com/operatorstack/yield/tree/main/examples/env-doctor/) |
| Go | [`github.com/operatorstack/yield/sdk/yield`](https://pkg.go.dev/github.com/operatorstack/yield/sdk/yield) | [`investigate`](https://github.com/operatorstack/yield/tree/main/examples/investigate/) |
| Rust | [`yieldskill`](https://github.com/operatorstack/yield/tree/main/sdk/rust/) | [`data-migration`](https://github.com/operatorstack/yield/tree/main/examples/data-migration/) |

Cursor, Codex, and Claude Code are verified integrations. Yield also includes
registry-backed project paths for 73 more coding agents. Those paths support
Expand Down Expand Up @@ -318,10 +321,16 @@ loop, multi-agent orchestrator, or security sandbox.
Run the main checks from the repository root:

```bash
npm run format:check
go test ./...
npm run test:release
```

Run `npm run format` to format the supported source files. Install the repository
npm dependencies first. The command also needs Go, Rust, and `uvx`. Generated
files and evaluation sources with byte-bound receipts stay unchanged until their
generators or evaluations run.

The [example library](https://github.com/operatorstack/yield/tree/main/examples/library/) contains ten common workflows in all
four SDKs, including code review, failure investigation, CI repair, dependency
updates, database migration, security audit, and package release.
Expand Down
16 changes: 9 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Yield documentation

- [Repository formatting](formatting.md)

Move repeatable coding-agent instructions from words into code.

The [public documentation](https://yield.operatorstack.systems/docs/) is the
Expand Down Expand Up @@ -42,13 +44,13 @@ and start it.

## The split to remember

| Put in code | Leave with the model |
|---|---|
| order and branching | investigation and judgment |
| retry limits | reading unfamiliar code |
| commands that must really run | proposing changes |
| approval points | writing explanations |
| evidence required to finish | interpreting evidence |
| Put in code | Leave with the model |
| ----------------------------- | -------------------------- |
| order and branching | investigation and judgment |
| retry limits | reading unfamiliar code |
| commands that must really run | proposing changes |
| approval points | writing explanations |
| evidence required to finish | interpreting evidence |

This is not a new agent loop or a hosted agent runtime. A thin `SKILL.md` starts
the program, the program emits one typed operation, and the coding agent
Expand Down
15 changes: 9 additions & 6 deletions docs/agent-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ yskill register-all skills --agent cursor,codex,claude-code --prune

Use the launcher installed by the selected language package:

| Language | Launcher |
|---|---|
| TypeScript | `npm exec -- yskill` |
| Python | `python -m yieldskill` |
| Go | `.yield/bin/yskill` |
| Rust | `.yield/bin/yskill` |
| Language | Launcher |
| ---------- | ---------------------- |
| TypeScript | `npm exec -- yskill` |
| Python | `python -m yieldskill` |
| Go | `.yield/bin/yskill` |
| Rust | `.yield/bin/yskill` |

Go and Rust keep one version-locked runtime in `.yield/bin` at the repository
root. Registration checks that runtime, the workflow SDK, and the generated
Expand Down Expand Up @@ -117,4 +117,7 @@ Workflow-only `doctor` works without `.git`. A Go or Rust runtime under
`.yield/bin` also identifies the project root for `init`, `doctor`, and
registration. For other non-Git layouts, pass `--root` so Yield knows where
agent adapters belong.

```

```
38 changes: 19 additions & 19 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ The library contains ten common skill workflows for coding agents. Every workflo
implemented in TypeScript, Python, Go, and Rust, so the first choice is your
repository's language—not which example happens to exist.

| 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 |
| [QA a web change](../examples/library/typescript/qa-web-change/) | build, changed-route QA, no-blocker gate |
| [Release a package](../examples/library/typescript/release-package/) | tests, review, approval, publish, verify |
| [Triage an issue](../examples/library/typescript/triage-issue/) | read, classify, one next action |
| [Repair CI](../examples/library/typescript/repair-ci/) | failed log, supported repair, rerun |
| [Upgrade a dependency](../examples/library/typescript/upgrade-dependency/) | baseline, compatibility review, approval, update, tests |
| [Run a database migration](../examples/library/typescript/migrate-database/) | dry-run, risk review, approval, apply, verify |
| [Audit security](../examples/library/typescript/audit-security/) | mechanical scans, trust-boundary review, zero-critical gate |
| [Publish an iOS build](../examples/library/typescript/publish-ios/) | archive, metadata review, approval, upload, processing check |
| 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 |
| [QA a web change](../examples/library/typescript/qa-web-change/) | build, changed-route QA, no-blocker gate |
| [Release a package](../examples/library/typescript/release-package/) | tests, review, approval, publish, verify |
| [Triage an issue](../examples/library/typescript/triage-issue/) | read, classify, one next action |
| [Repair CI](../examples/library/typescript/repair-ci/) | failed log, supported repair, rerun |
| [Upgrade a dependency](../examples/library/typescript/upgrade-dependency/) | baseline, compatibility review, approval, update, tests |
| [Run a database migration](../examples/library/typescript/migrate-database/) | dry-run, risk review, approval, apply, verify |
| [Audit security](../examples/library/typescript/audit-security/) | mechanical scans, trust-boundary review, zero-critical gate |
| [Publish an iOS build](../examples/library/typescript/publish-ios/) | archive, metadata review, approval, upload, processing check |

Change the language segment in any link to python, go, or rust. Source files
are grouped separately for fast browsing:
Expand All @@ -38,13 +38,13 @@ repository. Replace them with project commands before adopting a skill workflow.
These examples show longer programs with a thin `SKILL.md` and scripted
responses under `fixtures/responses.json`.

| Example | Language | Pattern |
|---|---|---|
| [`release-checklist`](../examples/release-checklist/) | TypeScript | approval, build, model-authored notes, publish, verify |
| [`env-doctor`](../examples/env-doctor/) | Python | probe, diagnose, wait for a person, recheck |
| [`investigate`](../examples/investigate/) | Go | structured hypotheses, real probes, bounded attempts |
| [`data-migration`](../examples/data-migration/) | Rust | dry-run, approval, apply, verify |
| [`convert-skill`](../examples/convert-skill/) | Go | extract a prose workflow, generate code, execute its fixtures |
| Example | Language | Pattern |
| ----------------------------------------------------- | ---------- | ------------------------------------------------------------- |
| [`release-checklist`](../examples/release-checklist/) | TypeScript | approval, build, model-authored notes, publish, verify |
| [`env-doctor`](../examples/env-doctor/) | Python | probe, diagnose, wait for a person, recheck |
| [`investigate`](../examples/investigate/) | Go | structured hypotheses, real probes, bounded attempts |
| [`data-migration`](../examples/data-migration/) | Rust | dry-run, approval, apply, verify |
| [`convert-skill`](../examples/convert-skill/) | Go | extract a prose workflow, generate code, execute its fixtures |

From the repository root:

Expand Down
Loading