Skip to content

feat(yield): lab 22 — resumable skill programs (yskill V1 core) - #263

Merged
bigboateng merged 3 commits into
mainfrom
yield-lab-v1
Aug 1, 2026
Merged

feat(yield): lab 22 — resumable skill programs (yskill V1 core)#263
bigboateng merged 3 commits into
mainfrom
yield-lab-v1

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

What

New lab: Yield — turn SKILL.md workflows into resumable programs. A Go supervisor (yskill) executes deterministic skill programs that yield typed operations (ask_user, agent_task, run_command) to a coding agent, with an append-only run log and replay-based resume. The skill keeps its thin SKILL.md; control flow (order, branching, retries, approval, state, completion) moves into code; reasoning and judgment stay with the model. No daemon, no new agent loop, no host integration.

Positioning: entry point for people who already write skills today. Separate project from Boatstack — its control-law lessons come in as engineering (refusals, ledger discipline), not architecture or vocabulary.

Architecture (Locus-certified before implementation)

The run lifecycle was designed against certified models (labs/22-yield/yield/docs/locus-yield.md, models in docs/locus/):

  • supervisory-rw: controllable, no violations — stale-response acceptance and completion-after-failed-requirement are preventable; the kernel's disable-mechanism obligations are discharged by the refusing tests in internal/guard/guard_test.go.
  • nonblockingness: nonblocking — only because resume --accept-new-digest (migrate) exists; DIVERGED would otherwise block. The migrate verb is load-bearing.
  • diagnosability (rival designs, decided) — portable mode provably cannot diagnose off-protocol agent action (witness: OFF_PROTOCOLPENDING_OP); a correlated host adapter can (zero indistinguishable pairs). Stated as an explicit non-guarantee; the adapter is the certified post-V1 slice.

Execution model

Deterministic re-execution (no coroutine serialization): every run/resume re-executes the skill program from the top; recorded responses replay in order; the first unanswered operation emits a yield.v1 envelope and the process exits. A replayed step that produces a different operation is a divergence and fails the run loudly — never a silent fork.

run_command is executed by yskill itself, so command results enter the log as observed fact, not the agent's transcription (asserted in the e2e test). agent_task results are schema-validated on resume; schema validity is not truth, and that honesty gap is recorded, not papered over.

Contents

  • internal/protocol — yield.v1 envelopes, skill-source digests, compaction-invariant request digests, JSON-schema validation
  • internal/runlog — append-only JSONL per run, monotone sequences
  • internal/guard — typed refusals: stale / duplicate-with-different-content / wrong-run / wrong-request / schema-invalid / digest-mismatch / completion-unproven / run-closed
  • internal/engine — supervisor: journal rebuild from the log, subprocess execution, command evidence, evidence-bound termination
  • sdk/yield — skill-program SDK (AskUser, AgentTask, RunCommand, Require, Complete, Blocked/Refused)
  • cmd/yskillinit · run · resume · inspect · replay · test
  • examples/investigate — reference skill: ≥3 hypotheses, cheapest-to-disprove first, ≤3 failed attempts, completion requires a causal chain; runnable end-to-end via yskill test

Field note

The divergence detector caught its first real bug during the build: request digests differed across the log's JSON-compaction round-trip. Digests are now canonicalized with a regression test — the core invariant earned its keep before the lab shipped.

Verification

  • go test ./... green (incl. subprocess e2e: run→resume→complete, replay determinism, loud divergence, failed-requirement blocking, digest migration); go vet clean; module passes under GOWORK=off
  • yskill test examples/investigate reaches completed against scripted fixtures with real probe execution

Out of scope (deliberate)

Prose-to-program compilation, hosted runtime, workflow DSL, marketplace, multi-agent orchestration, security sandbox, any canonical IR. Working name Yield/yskill pending a collision scan before any public projection (labkit projection not wired yet).

…, guard refusals

Yield turns SKILL.md workflows into resumable programs: a Go supervisor
(yskill) executes deterministic skill programs that yield typed operations
(ask_user, agent_task, run_command) to a coding agent.

This slice lays the certified core:
- protocol: yield.v1 request/response envelopes, skill source digests,
  compaction-invariant request digests, JSON-schema result validation
- runlog: append-only JSONL per run, monotone sequences, refuses
  overwrite and broken sequences
- guard: every refusal as a typed rejection — stale, duplicate,
  wrong-run, wrong-request, schema-invalid, digest-mismatch,
  completion-unproven, run-closed; refusing tests discharge the
  supervisory obligations from the Locus derivation (controllable,
  nonblocking; docs land with the engine slice)

Disclosure-Reviewed: reviewed — public-safe only; the only private-tree change is the rebuilt locus binary, kept out of this commit
- engine: run creation bound to the skill source digest; subprocess
  execution against a journal rebuilt from the log; run_command executed
  by the engine itself so command results are observed fact, not the
  agent's transcription; evidence-bound termination (complete_unproven
  closes the run blocked, loudly)
- sdk/yield: deterministic re-execution context — recorded responses
  replay in order, the first unanswered operation emits a yield.v1
  envelope and exits; a replayed step that produces a different
  operation reports divergence and always fails the run (never a silent
  fork); Require(false) makes completion structurally unreachable
- cmd/yskill: init · run · resume (--accept-new-digest) · inspect ·
  replay · test
- e2e tests drive real subprocess skills through run→resume→complete,
  replay determinism, loud divergence (env-branch skill), failed
  requirement blocking, and digest-mismatch refusal then explicit
  migration

The replay-divergence detector caught its first real bug in-lab: request
digests differed across the log's JSON-compaction round-trip; digests are
now compaction-invariant with a regression test.

Disclosure-Reviewed: reviewed — public-safe only; the only private-tree change is the rebuilt locus binary, kept out of this commit
…models

- examples/investigate: the reference skill — code owns the discipline
  (>=3 hypotheses, cheapest-to-disprove first, <=3 failed attempts,
  completion requires a causal chain, honest blocked at the frontier);
  the model owns evidence collection, hypothesis formation, assessment;
  fixtures make it runnable end-to-end via 'yskill test'
- docs/locus-yield.md + docs/locus/: the fidelity-certified lifecycle
  models and verdicts the architecture was designed against —
  supervisory-rw controllable (no violations), nonblocking (the
  --accept-new-digest migrate verb is load-bearing), and the rival-design
  diagnosability derivation: portable mode provably cannot diagnose
  off-protocol agent action (OFF_PROTOCOL ~ PENDING_OP witness), a
  correlated host adapter can — stated as a non-guarantee, and the
  certified post-V1 slice

Disclosure-Reviewed: reviewed — public-safe only; the only private-tree change is the rebuilt locus binary, kept out of this commit
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Pitot coding-agent E2E

Intelligence Flow is the verification source; Pitot's public README carries the latest main status.

Agent Ubuntu macOS Windows Result Evidence
Claude ✅ Pass · real CLI 2.1.217 · native · binary-observed anthropic messages ✅ Pass · real CLI 2.1.217 · native · binary-observed anthropic messages ✅ Pass · real CLI 2.1.217 · native · binary-observed anthropic messages ✅ Passing All platforms are required
Cursor ✅ Pass · real CLI 2026.07.20-8cc9c0b · native · binary-observed cursor connect proto ✅ Pass · real CLI 2026.07.20-8cc9c0b · native · binary-observed cursor connect proto ✅ Pass · real CLI 2026.07.20-8cc9c0b · WSL · binary-observed cursor connect proto ✅ Passing All platforms are required
Codex ✅ Pass · real CLI 0.145.0 · native · binary-observed openai responses ✅ Pass · real CLI 0.145.0 · native · binary-observed openai responses ✅ Pass · real CLI 0.145.0 · native · binary-observed openai responses ✅ Passing All platforms are required
Devin ✅ Pass · real CLI 3000.3.22 · native · binary-observed devin connect proto ✅ Pass · real CLI 3000.3.22 · native · binary-observed devin connect proto ✅ Pass · real CLI 3000.3.22 · native · binary-observed devin connect proto ✅ Passing All platforms are required
GitHub Copilot CLI ✅ Pass · real CLI 1.0.73 · native · binary-observed openai chat ✅ Pass · real CLI 1.0.73 · native · binary-observed openai chat ✅ Pass · real CLI 1.0.73 · native · binary-observed openai chat ✅ Passing All platforms are required
Gemini ✅ Pass · real CLI 0.51.0 · native · binary-observed gemini generate content ✅ Pass · real CLI 0.51.0 · native · binary-observed gemini generate content ✅ Pass · real CLI 0.51.0 · native · binary-observed gemini generate content ✅ Passing All platforms are required
Kimi Code ✅ Pass · real CLI 0.29.0 · native · binary-observed openai chat ✅ Pass · real CLI 0.29.0 · native · binary-observed openai chat ✅ Pass · real CLI 0.29.0 · native · binary-observed openai chat ✅ Passing All platforms are required
OpenCode ✅ Pass · real CLI 1.18.4 · native · binary-observed openai responses ✅ Pass · real CLI 1.18.4 · native · binary-observed openai responses ✅ Pass · real CLI 1.18.4 · native · binary-observed openai responses ✅ Passing All platforms are required
Pi ✅ Pass · real CLI 0.81.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.81.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.81.1 · native · binary-observed openai chat ✅ Passing All platforms are required
Qwen Code ✅ Pass · real CLI 0.20.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.20.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.20.1 · native · binary-observed openai chat ✅ Passing All platforms are required

Runtime capabilities

Capability Ubuntu macOS Windows Result
pitot request ✅ Pass · real runtime allow/deny ✅ Pass · real runtime allow/deny ✅ Pass · real runtime allow/deny ✅ Passing

Source commit: 51f6587dafcf

@bigboateng
bigboateng merged commit f18afa3 into main Aug 1, 2026
48 checks passed
@bigboateng
bigboateng deleted the yield-lab-v1 branch August 1, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant