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
11 changes: 8 additions & 3 deletions docs/data/boundary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rows:
- category: "area"
concept: "declaration, kinds, members, links, lineage, migrations, `init --from`, `upgrade`"
owner: "chant"
carrier: "declaration.schema.json, workspace-kinds.schema.json, .chant/workspace.lock.json"
carrier: "declaration.schema.json, workspace-kinds.schema.json, workspace-principals.schema.json, .chant/workspace.lock.json"
what: "The repository specification itself: what a workspace declares, how each member is read, how members join, and where the files came from."
- category: "area"
concept: "records: schemas, states, seals, pins, supersession, attestation, provenance"
Expand Down Expand Up @@ -1057,6 +1057,11 @@ rows:
owner: "chant"
carrier: "changes.schema.json"
what: "The write is to a file writeScope.<class>.protected lists, or one under a directory it lists, outside any top-level keys the entry's except allows (#3146)."
- category: "reason-code"
concept: "write-scope-class-unknown"
owner: "chant"
carrier: "changes.schema.json, records-amend.schema.json, records-close.schema.json, records-new.schema.json, records-review.schema.json, work-evidence.schema.json"
what: "The declaration's writeScope at base names a principal class no pinned package supplies, and the writer is judged human, so it may be in that class; the write is refused until the package is installed at the pinned version or the entry removed (#3080)."
- category: "reason-code"
concept: "agent-unknown"
owner: "chant"
Expand Down Expand Up @@ -1543,13 +1548,13 @@ rows:
name: "kinds-unreadable"
owner: "chant"
carrier: "check.schema.json"
what: "Every pinned package's kinds can be read: it is installed at the pinned version, and its ./workspace-kinds file is valid kind data."
what: "Every pinned package's kinds and principal classes can be read: it is installed at the pinned version, its ./workspace-kinds file is valid kind data, and its ./workspace-principals file is valid class data."
- category: "wsp-check"
concept: "WSP003"
name: "kind-unknown"
owner: "chant"
carrier: "check.schema.json"
what: "Every member's kind is built in or supplied by a pinned package. Unknown kinds fail closed."
what: "Every member's kind is built in or supplied by a pinned package, and so is every principal class writeScope names (#3080). Unknown kinds and classes fail closed."
- category: "wsp-check"
concept: "WSP004"
name: "member-dir-missing"
Expand Down
2 changes: 1 addition & 1 deletion docs/design/decisions/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Decision files

Each file in this directory records one design decision. The format comes from [#2555](https://github.com/INTENTIUS/chant/issues/2555), and any epic can use it. The first set is the workspace design, [#2524](https://github.com/INTENTIUS/chant/issues/2524), with ids `ws-001` to `ws-050`, one per row of its Decisions table. Later workspace decisions continue the sequence: `ws-051` records how examples and fixtures are declared ([#2556](https://github.com/INTENTIUS/chant/issues/2556)), `ws-052` records the boundary between chant and hud ([#2657](https://github.com/INTENTIUS/chant/issues/2657)), `ws-053` records the record formats a kind may read beyond Markdown front matter ([#2664](https://github.com/INTENTIUS/chant/issues/2664)), and `ws-054` proposes a box record kind for decisions that constrain each other, settled into decision records ([#2698](https://github.com/INTENTIUS/chant/issues/2698)). Then `ws-055` puts what a development model tracks in the workspace's ledgers ([#2717](https://github.com/INTENTIUS/chant/issues/2717)), `ws-056` says where the chud lexicon's parts go when chud retires ([#2713](https://github.com/INTENTIUS/chant/issues/2713)), `ws-057` divides the factory's builds on Fountain between the spec and the thin layer ([#2714](https://github.com/INTENTIUS/chant/issues/2714)), `ws-058` records decision points over the workspace graph ([#2723](https://github.com/INTENTIUS/chant/issues/2723)), `ws-059` records who keeps a member's graph between reads ([#2876](https://github.com/INTENTIUS/chant/issues/2876)), `ws-060` records the telemetry attributes a workload carries and the link that says where its telemetry goes ([#2558](https://github.com/INTENTIUS/chant/issues/2558)), `ws-062` records what `check --live` resolves links against and the built-in `design` member kind ([#2549](https://github.com/INTENTIUS/chant/issues/2549)), `ws-063` keeps the review digest and the whole-file seal as two hashes ([#2546](https://github.com/INTENTIUS/chant/issues/2546)), `ws-064` makes this directory's kind file the decision kind's specification, which a plugin carries as a copy ([#2555](https://github.com/INTENTIUS/chant/issues/2555)), `ws-067` records the write scope per member and record kind and the agent sessions bound to one member, and `ws-068` keeps chant's lifecycle ledgers as ledgers rather than record kinds ([#2548](https://github.com/INTENTIUS/chant/issues/2548)). `ws-074` makes the repo the database: every durable fact about a workspace is a file in it, written only through chant, and a tool keeps only caches ([#3158](https://github.com/INTENTIUS/chant/issues/3158)). `ws-075` names chant's commit trailers, `Chant-Lease`, `Chant-Run`, `Chant-Record` and `Chant-Applied-*` beside ws-067's `Chant-Agent`, which replace studio's `Studio-*` and `Factory-*` trailers ([#3149](https://github.com/INTENTIUS/chant/issues/3149)). `ws-076` keeps each agent run's record, its cost and the commits it made, in a run ledger on `chant/lifecycle` written through `chant workspace runs` ([#3033](https://github.com/INTENTIUS/chant/issues/3033)). `ws-077` puts a box's factory and listing on its box block, with what a build may not change in `writeScope.<class>.protected` and plantable as a fact the read contract prints, replacing studio's `x-factory` ([#3146](https://github.com/INTENTIUS/chant/issues/3146)). `ws-078` takes a reader from a line or a symbol to the decisions governing it and the agent run that wrote it, through `graph --intent path#symbol` and the document's `why` answer ([#3034](https://github.com/INTENTIUS/chant/issues/3034)).
Each file in this directory records one design decision. The format comes from [#2555](https://github.com/INTENTIUS/chant/issues/2555), and any epic can use it. The first set is the workspace design, [#2524](https://github.com/INTENTIUS/chant/issues/2524), with ids `ws-001` to `ws-050`, one per row of its Decisions table. Later workspace decisions continue the sequence: `ws-051` records how examples and fixtures are declared ([#2556](https://github.com/INTENTIUS/chant/issues/2556)), `ws-052` records the boundary between chant and hud ([#2657](https://github.com/INTENTIUS/chant/issues/2657)), `ws-053` records the record formats a kind may read beyond Markdown front matter ([#2664](https://github.com/INTENTIUS/chant/issues/2664)), and `ws-054` proposes a box record kind for decisions that constrain each other, settled into decision records ([#2698](https://github.com/INTENTIUS/chant/issues/2698)). Then `ws-055` puts what a development model tracks in the workspace's ledgers ([#2717](https://github.com/INTENTIUS/chant/issues/2717)), `ws-056` says where the chud lexicon's parts go when chud retires ([#2713](https://github.com/INTENTIUS/chant/issues/2713)), `ws-057` divides the factory's builds on Fountain between the spec and the thin layer ([#2714](https://github.com/INTENTIUS/chant/issues/2714)), `ws-058` records decision points over the workspace graph ([#2723](https://github.com/INTENTIUS/chant/issues/2723)), `ws-059` records who keeps a member's graph between reads ([#2876](https://github.com/INTENTIUS/chant/issues/2876)), `ws-060` records the telemetry attributes a workload carries and the link that says where its telemetry goes ([#2558](https://github.com/INTENTIUS/chant/issues/2558)), `ws-062` records what `check --live` resolves links against and the built-in `design` member kind ([#2549](https://github.com/INTENTIUS/chant/issues/2549)), `ws-063` keeps the review digest and the whole-file seal as two hashes ([#2546](https://github.com/INTENTIUS/chant/issues/2546)), `ws-064` makes this directory's kind file the decision kind's specification, which a plugin carries as a copy ([#2555](https://github.com/INTENTIUS/chant/issues/2555)), `ws-067` records the write scope per member and record kind and the agent sessions bound to one member, and `ws-068` keeps chant's lifecycle ledgers as ledgers rather than record kinds ([#2548](https://github.com/INTENTIUS/chant/issues/2548)). `ws-074` makes the repo the database: every durable fact about a workspace is a file in it, written only through chant, and a tool keeps only caches ([#3158](https://github.com/INTENTIUS/chant/issues/3158)). `ws-075` names chant's commit trailers, `Chant-Lease`, `Chant-Run`, `Chant-Record` and `Chant-Applied-*` beside ws-067's `Chant-Agent`, which replace studio's `Studio-*` and `Factory-*` trailers ([#3149](https://github.com/INTENTIUS/chant/issues/3149)). `ws-076` keeps each agent run's record, its cost and the commits it made, in a run ledger on `chant/lifecycle` written through `chant workspace runs` ([#3033](https://github.com/INTENTIUS/chant/issues/3033)). `ws-077` puts a box's factory and listing on its box block, with what a build may not change in `writeScope.<class>.protected` and plantable as a fact the read contract prints, replacing studio's `x-factory` ([#3146](https://github.com/INTENTIUS/chant/issues/3146)). `ws-078` takes a reader from a line or a symbol to the decisions governing it and the agent run that wrote it, through `graph --intent path#symbol` and the document's `why` answer ([#3034](https://github.com/INTENTIUS/chant/issues/3034)). `ws-079` lets a pinned package name principal classes at a data-only `./workspace-principals` subpath, each the holders of one role at base, for `writeScope` to restrict, failing closed on a class nothing supplies ([#3080](https://github.com/INTENTIUS/chant/issues/3080)).

The `ws-` decisions are in state `decided`, except `ws-054`, which is `proposed`. A decision can start as `proposed`, listing its options with a recommendation in an `x-` field such as `x-recommendation` and a null `choice`. It becomes `decided` when the maintainer sets `state`, `choice`, `decided_by` and `decided_on`, removes the recommendation, keeps every rejected option under `rejected`, and `node scripts/import-decisions.mjs --check` passes. `ws-053` went that way, and pins its design note by hash in `evidence`. One maintainer chose each decided one, and they bind nobody until a group reviews and ratifies them as #2555 describes. The states and their transitions are drawn in [decision-states.md](../decision-states.md).

Expand Down
73 changes: 73 additions & 0 deletions docs/design/decisions/ws-079-principal-classes-from-plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
schema: 1
id: "ws-079"
title: "Principal classes from plugins"
state: "decided"
area: "D5"
source:
issue: "INTENTIUS/chant#3080"
row: "Principal classes: human, agent, runner, service in core; domain classes from plugins"
revision: null
question: "#2524 D5 lists human, agent, runner and service as core principal classes, with domain classes from plugins, and ws-067 shipped write scope for the core four only. Where does a plugin declare a class, which grant puts a principal in it, how does writeScope name it, and what happens when the declaration names a class nothing supplies, so that #3163 can rest person-attributed records and gates on a declared class?"
options:
- id: "a"
label: "a data-only ./workspace-principals subpath; each class names the role whose grant at base puts a principal in it; writeScope takes any class name and fails closed on an unknown one"
how: "A pinned package exports a JSON file at ./workspace-principals, beside ./workspace-kinds and under the same rules (the literal key, a .json target inside the package, never imported). It lists classes, each a name, a description and a role. A principal's classes are read from the role grants at base through one function, classesOf: the core agent, runner and service roles first, then the domain classes in pin order and file order; the first that holds is the class write scope judges it as, and human is the rest. writeScope accepts any class name as a key. A path pin is read at the base revision when the caller has it, so write scope reads the plugin where it reads the declaration and the trust policy. A class name or role two pins supply is left out. A writeScope key no pin supplies fails workspace check with WSP003, and a writer judged human is refused with write-scope-class-unknown, since it may be in that class."
tradeoff: "A class is only a name for a role, so who is in it stays in the one place roles are granted, and the plugin decides only the vocabulary. A separate subpath keeps old chants reading a plugin's kinds unchanged. The cost is one more data file per plugin, and a principal granted two domain classes' roles is judged by the first in pin order."
- id: "b"
label: "classes in the ./workspace-kinds file"
how: "workspace-kinds.json gains an optional principalClasses list beside kinds."
tradeoff: "One file per plugin. The kinds file refuses fields it doesn't know, so every chant before this one would refuse a plugin's kinds as soon as it listed a class, failing WSP002 for a workspace that never used the class."
- id: "c"
label: "classes declared in chant.workspace.json"
how: "The declaration gains principalClasses: [{ name, role }], and writeScope names those."
tradeoff: "No plugin needed, and the class is read at base with the declaration. It isn't what D5 says: a domain's vocabulary (a review plugin's reviewer, an infra plugin's operator) would be retyped in every workspace that uses the domain, and two workspaces could give one class name two meanings."
- id: "d"
label: "an unknown writeScope key is ignored, and its principals are humans"
how: "As option a, but a writeScope entry for a class no pin supplies has no effect."
tradeoff: "Nothing breaks while a plugin is missing. Restricting a domain class while leaving human open then widens silently whenever the plugin isn't installed at the pinned version."
choice:
option: "a"
reason: "D5 puts domain classes in plugins, and ws-031 already gives plugins a data-only subpath that chant reads without importing; a sibling subpath follows it without changing what older chants accept. A class names a role rather than listing principals, so membership stays in the role grants at base, read through one function, the way ws-067 reads the core classes, and #2534's move of roles into the declaration moves every class at once. Reading a path pin at base keeps ws-067's rule that a change can't widen its own scope. An unknown key fails closed because nothing says who is in that class, and only a writer judged human could be; a writer in a core or known class is judged by that class, which comes first. #3163 builds on classesOf: a gate or a person-attributed record asks whether a forge identity or signer principal is in a declared class, and requires attested provenance from it."
rejected:
- option: "b"
why: "Older chants would refuse the whole kinds file of a plugin that lists a class."
- option: "c"
why: "D5 gives domain classes to plugins; a per-workspace list repeats a domain's vocabulary and lets one name mean two things."
- option: "d"
why: "A missing plugin would silently widen a restricted class's writes to human's."
supersedes: []
evidence:
- title: "INTENTIUS/chant#3080, write scope: principal classes a plugin defines"
url: "https://github.com/INTENTIUS/chant/issues/3080"
as_of: "2026-10-03T00:00:00Z"
- title: "INTENTIUS/chant#2524, D5. Provenance"
url: "https://github.com/INTENTIUS/chant/issues/2524"
as_of: "2026-10-03T00:00:00Z"
- title: "INTENTIUS/chant#3163, person-attributed records and gates rest on forge identities or signer keys"
url: "https://github.com/INTENTIUS/chant/issues/3163"
as_of: "2026-10-03T00:00:00Z"
- title: "arugula-salad/hud#738, approvals and verdicts rest on a forge identity or signer key"
url: "https://github.com/arugula-salad/hud/issues/738"
as_of: "2026-10-03T00:00:00Z"
- title: "ws-067, write scope and agent sessions"
url: "https://github.com/INTENTIUS/chant/blob/main/docs/design/decisions/ws-067-write-scope-and-agent-sessions.md"
as_of: "2026-10-03T00:00:00Z"
- title: "ws-031, plugin shape"
url: "https://github.com/INTENTIUS/chant/blob/main/docs/design/decisions/ws-031-plugin-shape.md"
as_of: "2026-10-03T00:00:00Z"
decided_by: "lex00"
decided_on: "2026-10-03"
reviews: []
constrains:
- "INTENTIUS/chant#3080"
- "INTENTIUS/chant#3163"
- "arugula-salad/hud#738"
- "ws-067"
- "path:packages/core/src/workspace/principal-classes.ts"
- "path:packages/core/src/workspace/write-scope.ts"
---

# Principal classes from plugins

The `./workspace-principals` file is described in [Workspace Kinds](https://intentius.io/chant/reference/workspace-kinds/#principal-classes-from-a-package), and how `writeScope` names a domain class in [Workspace Declaration](https://intentius.io/chant/reference/workspace-declaration/#write-scope-and-agent-sessions).
Loading
Loading