Ship the one skill as an attested computation, retire the placement gate - #22
Merged
Merged
Conversation
A computation is a skill (ADR E in the marketplace repository's docs/decisions). The template's one example becomes that shape. The skill's scripts/ now holds the two halves of an attested computation: example_executor.py binds the one declared parameter (window, 12 to 48 trailing months), reads the data root, writes a receipt with a run identifier, its own digest, the bound parameters and the results, and refuses a value outside the range with a reason code and exit status 3; example_attester.py hashes the executor, regenerates the series from the executor's own closed form, recomputes every number in the receipt and exits nonzero on drift, with no language model in the path. The example helper it replaces is gone. knowledge/computations/example-workflow.md is the Attested Computation concept beside them, in OKF v0.2 shape: runtime, one parameter, computation and executor.resource and attester.resource as paths relative to the concept that resolve to the scripts, the receipt fields, status draft and its sources. The data the executor reads moves out of verification/fixtures/ into the bundle's data root, knowledge/references/retrieval/example-series/, with a SOURCES.json provenance stamp: data is knowledge, and nothing under knowledge/ is runnable. The SKILL.md is the run procedure: bind values only, pass the runtime name, attest before quoting a number, cite the concept by path. The golden runs the executor on the data root, the attester on the receipt, the refusal, and the attester once more on a tampered receipt, which must fail. The gate loses the placement step and its comment; osp.py validate covers placement now. The README says where files go in one sentence, describes the computation the template ships, and no longer names the planes, ADR C or the placement rule; CONNECTORS.md and the package metadata comment lose the plane words too. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5XWr4m3ZmmuRqMa1yHHpi Signed-off-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A computation is a skill (ADR E,
docs/decisions/adr-e-a-computation-is-a-skill.mdin the marketplace repository). The template's one example becomes that shape, and the placement gate leaves the workflow.Files changed
skills/example-workflow/scripts/example_executor.pywindow, 12 to 48 trailing months), reads the data root, writes a receipt withrun_id,code_sha256,bound_parametersandresults, and refuses a value outside the range with a reason code and exit status 3, writing no receipt. It also owns the closed form the data root is generated from (--write-series), so there is one source of truth for the data. Standard library only.skills/example-workflow/scripts/example_attester.pyfields,code(the receipt's digest is the executor beside it),parameter,data(the series regenerated from the executor's closed form hashes to the receipt's and the committed file's digest),recompute(every number in the results) andplausible. Exit 1 on any drift.skills/example-workflow/scripts/example_helper.pyskills/example-workflow/SKILL.mdknowledge/computations/example-workflow.mdtype,runtime: python, oneparametersentry,computation,executor.resource,executor.receipt,attester.resource,status: draft,sources.computationandattester.resourceare paths relative to the concept (../../skills/example-workflow/scripts/...) and resolve to the scripts.knowledge/references/retrieval/example-series/example_series.csvverification/fixtures/, byte for byte. The data an executor reads is data, so it lives in the bundle.knowledge/references/retrieval/example-series/SOURCES.jsonknowledge/index.mdcomputationssection listing the concept, areferencessection describing the data root, andsphere_scope: cross-cuttingin the frontmatter, which is what lets a scaffold concept carry an emptysphereslist.knowledge/log.mdverification/example_workflow.pyverification/fixtures/README.md,verification/fixtures/make_fixtures.py,verification/fixtures/example_series.csv.github/workflows/plugin-gate.ymlplacement-checkstep and the comment that described it are gone..github/workflows/goldens.ymlverification/fixtures/.README.mdplacement-check. The merge rule is now the one sentence about where files go; a new section, "The computation this template ships", describes the concept, the executor, the attester and the golden; the layout block, the delete-the-examples step and the gate list follow the new shape.CONNECTORS.md.osp/package.yamlGate results
Run from the repository root with
build-kitandnasa-daac-knowledgechecked out beside it:The one warning is the concept's trust tier, which is what a template should show: the concept ships
status: draftand unsigned, and a copy signs its own computation once a steward has reviewed it.signature_check.py knowledge --reportreportsstable signed 0, owed 0, pending 0, untraced 0, stable unsigned 0, not stable 1.osp.py lock . --reportreports the release lock stale, which it also does onmainbefore this branch; a release commit re-runsosp.py lock.The build-kit branch
claude/r6-toolswas not pushed while this was being built, so the two new validate findings could not be run against the tree. The template is built to satisfy both by construction: nothing underknowledge/is runnable (the bundle holds one concept, one CSV and one JSON stamp), and the concept'scomputationandattester.resourceresolve inside the package to files the golden names.For the reviewer
Three things were decided that the brief left open, and each is worth a look.
The synthetic series moved out of
verification/fixtures/and into the bundle's data root atknowledge/references/retrieval/example-series/, and the fixtures tree was deleted rather than kept alongside. The brief said the executor reads a synthetic fixture and the attester regenerates it; keeping the fixture underverification/would have made a skill's script read from the goldens' tree, which is the direction the placement sentence forbids. One data root, read by the executor and by the golden, is the arrangement ADR E describes, and it lets the template show what a stamped data root looks like. The cost is that the template no longer carries a worked example of the fixture-provenance rule, so that rule is now stated in prose in the README's layout section instead.The fixture generator moved into the executor as a
series()function with a--write-seriesmode, replacingmake_fixtures.py. The attester regenerates the data from that same function, so the executor's digest covers the generator and an edit to either invalidates every earlier receipt. A separate generator would have been a second source of truth that the attester could not hash.The golden runs a fourth case the brief did not ask for: the attester on a receipt with one number changed, which must fail. It is four lines, and without it the PASS the golden asserts would not distinguish an attester that checks from one that returns PASS.
Two files outside the brief's list were touched, because leaving them would have contradicted the record this implements:
CONNECTORS.mdsaid "A connector is the REACH plane only", and.osp/package.yaml's header comment named REACH. Both are now plain words.provein.osp/surfaces.yamlis left alone: it is a qualification capability identifier validated against build-kit's schema, not the plane word.Merges after ADR E (marketplace docs/decisions/adr-e-a-computation-is-a-skill.md) merges, on the coordinator's review
🤖 Generated with Claude Code
https://claude.ai/code/session_01R5XWr4m3ZmmuRqMa1yHHpi
Generated by Claude Code