Repository navigation
feat(workspace): contract, evidence and driver kinds and one session kind in the reference design member - #3400
Merged
Merged
Conversation
…kind in the reference design member The reference workspace's design member declares contract, driver and evidence record kinds beside its session kind, so studio's design records read and write through chant (#3148, ws-082). - contract: C-NNN Markdown records, draft, approved or retired, with criteria in the front matter, checks pinned by hash, reviews and a bare-id supersedes. An approved contract changes only in its state, checks and reviews. - evidence: content-addressed JSON check runs with the fields studio's factory writes. records new now writes a content-addressed kind, named for the SHA-256 of its bytes; amend, review and close still refuse it. - driver: D-NNN records grouping contracts under one intent. - session: session.subjects.kinds lets one session kind judge several kinds; the reference session judges decisions, contracts and drivers, and its schema takes agenda digests, evidence and media, verdict roles, follow-ups and x- fields. - decisions may constrain contract:<id>. Studio's proposals map onto proposed work items, lessons and decisions. The writer conformance fixture carries the new session kind and its subject kinds byte for byte.
This was referenced Oct 3, 2026
Closed
…s are chant's in the boundary roster test; narrow the write results in the reference test
# Conflicts: # docs/src/content/docs/reference/workspace-writer-conformance.mdx
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.
The reference workspace's design member now declares contract, driver and evidence record kinds beside its review-session kind, so the records studio's factory and design sessions keep are read and written through chant instead of parsed by studio itself. The design is recorded as ws-082.
A contract (
design/contracts/C-NNN-*.md) opensdraft, isapprovedby its reviewers and isretiredwhen nothing should be built against it. Its criteria are in the front matter with ids such asa1, which a check's test names, an evidence record reports and a work item's acceptance can repeat. Its check files are pinned by hash inchecks, sorecordsreports a check edited after it was pinned. Approval ranks keep an approved contract's substance fixed: only its state, checks and reviews move, and a change is a new contract whose bare-idsupersedesnames the old one, as studio's contracts already write it. Verdicts on a contract carry the digest of the text they judged, which replaces studio'sapproved_sha. The reference fixture has one draft contract, C-001, with a check that runs against the app.An evidence record (
design/evidence/<sha256>.json) is one run of one contract's check, with the fields studio's factory writes plus optionalwork,leaseandcheck.chant workspace records newnow writes a content-addressed JSON kind: the fields in the schema's order as JSON, in a file named for the SHA-256 of those bytes, refused if that file exists. Amend, review and close still refuse such a kind. A work item attaches the record to a criterion withwork evidence --fromand apathentry.A driver (
design/drivers/D-NNN-*.md) groups contracts under one intent, with no lifecycle of its own. The fixture has D-001 grouping C-001.The one session kind judges decisions, contracts and drivers. Core reads a new
session.subjects.kinds(a list of kind files) besidesubjects.kind, checks verdicts against all of them, joins citations from each kind's reviews list, andrecords review --sessionfinds a session whose subjects include the reviewed kind. The session schema gains optional agendadigest,evidenceandmedia, attendeejoined, verdictroles,atandnote,opened_by,closed_by,follow_upsas<kind>:<id>, andx-fields. A decision'sconstrainsalso acceptscontract:<id>, in chant's decision schema and its copies. Studio's agent proposals get no kind of their own: they are proposed work items, lessons or decisions, which an agent's write scope already allows.The writer conformance fixture copies the new session kind, its schema and the contract and driver kinds byte for byte, and its test checks them. Docs: the records CLI page (session subjects, the new session fields, content-addressed writes), the boundary roster (contract, evidence and driver are chant's now), the decisions README, the declaration and writer conformance pages, and the reference workspace's READMEs, with a v0.103 row: a chant older than 0.103.0 refuses
subjects.kindsaskind-invalid.Studio's side (re-copying the decision schema, adopting the
designmember kind and these kinds, moving criteria into front matter) is arugula-salad/studio#287 and #338. The review fields hud needs on the session (#3350) are in a pull request stacked on this one.Verified with core tsc, the targeted tests (records-formats, records-sessions, records-sessions-write, the writer fixture test, the writer conformance and session-write e2e files, and the reference workspace test file, which now writes evidence, approves C-001 in a session and reads every record back on a copy), the docs prose and citation lints and the diataxis check.
Closes #3148