ADR-0045 — Roles, an approval per layer, and role packages#
Status#
Accepted — 2026-10-29. Items 3 and 5 of the 1.0 line
(enterprise-sdd-gap.md). Delivered by the change
roles-approvals (REQ-310..319). Builds on the three layers of ADR-0044.
Context#
ADR-0044 gave each layer of a change an owner — product the Discover, the
architect the Design, the developer the Tasks — but change approve still
records one date for the whole change, by anyone, and keeps it after the
approved text is rewritten. Nobody can say who agreed to which version. And
the roles that constrain the work without owning a layer — security,
performance, infrastructure — have no place to say it once: their rules reach
the agent only if someone pastes them into a prompt prefix that applies to
everything.
Decision#
- Roles in
harness.config.yaml.roles:maps a role to the people who hold it, each an email or a name matched to the git identity of whoever runs the command, case-insensitive. A role nobody is named for is open to anyone, so a team of one, or a project that never names roles, keeps working. - An approval per layer, by its owner.
change approve <id> --layer discover|design|tasksrecords one; without--layerthe person approves every written layer they own.approvals.quorum.<layer>sets how many distinct people a layer needs (default 1). - What was approved is a hash. Each approval is a line of
approvals.jsonin the change folder: layer, name and email, role, the sha256 of the layer's text, the date. It moves to the archive with the change, which makes it the audit record. An approval counts only while the layer's text has that hash: an edit re-opens the layer. Theapproved:line ofchange.yamlis rewritten from the approvals, never read for a change whose layers are written; a change with only a delta keeps the 0.27 meaning of that line. - The harness waits — the 1.0 default.
approvals.requiredislayered(default: a change of the layered schema needs its approvals),always(also 0.27 changes) ornever(the 0.27 behaviour). An unapproved requirement is skipped before any worktree or agent, withharness_not_approved, the layers that wait and the command. - Role packages.
harness/<role>.md: a front matter (role,owner,version,applies-towithkind,capability,taglists) and the constraints in Markdown. A package applies when every dimension it lists matches the requirement — any value of a list — and with noapplies-toto everything. The implementing prompt gets a "Role constraints" section; thepromptevent, the run record andharness reportname the packages asrole@version. - A reviewer per package that only advises. The builtin review check asks
for one line per package (
- security: OKor- security: ADVICE — …). The advice never decides the verdict: a package is the owner's view, and only the gate fails an attempt. - The studio. Review shows each layer's approvals, how many it needs and whether the viewer owns it, with a button for the layer they own; the viewer is the git identity of the folder the studio serves.
Consequences#
- Breaking: a change created by 1.0 (
layered) is not built until it is approved;approvals: { required: never }restores the 0.27 behaviour. - Approval is not a
validateerror: a draft is legitimately unapproved while it is written. The harness and the studio's Build are where building starts, so that is where it is enforced. - Rejected: approvals as lines of
change.yaml(every sign-off a merge conflict); trusting the git author of a commit as the approver (a rebase or a squash rewrites it, and a bot commits for people). - A name in
roles:is as trustworthy as the git identity on the machine. A signed approval (a signed commit or tag ofapprovals.json) is the next step for a team that needs more than that.