Skip to content

feat(workspace): contract, evidence and driver kinds and one session kind in the reference design member - #3400

Merged
lex00 merged 4 commits into
mainfrom
ws-3148-reference-kinds
Oct 3, 2026
Merged

lex00 merged 4 commits into
mainfrom
ws-3148-reference-kinds

Conversation

@lex00

@lex00 lex00 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

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) opens draft, is approved by its reviewers and is retired when nothing should be built against it. Its criteria are in the front matter with ids such as a1, 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 in checks, so records reports 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-id supersedes names 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's approved_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 optional work, lease and check. chant workspace records new now 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 with work evidence --from and a path entry.

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) beside subjects.kind, checks verdicts against all of them, joins citations from each kind's reviews list, and records review --session finds a session whose subjects include the reviewed kind. The session schema gains optional agenda digest, evidence and media, attendee joined, verdict roles, at and note, opened_by, closed_by, follow_ups as <kind>:<id>, and x- fields. A decision's constrains also accepts contract:<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.kinds as kind-invalid.

Studio's side (re-copying the decision schema, adopting the design member 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

lex00 added 2 commits October 3, 2026 16:30
…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.
lex00 added 2 commits October 3, 2026 16:46
…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
@lex00
lex00 merged commit c6501c8 into main Oct 3, 2026
12 checks passed
@lex00
lex00 deleted the ws-3148-reference-kinds branch October 3, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workspace chant workspace epic (#2525) boundaries Epic: boundaries between chant, hud, studio, behold and fountain enhancement New feature or request level:2 workspace opt-in level 2 (#2525)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reference workspace: contract, evidence, driver and proposal record kinds, and one session kind, from studio's design member

1 participant