governance.ListProblemtypeno test imports ittype ListProblem = { readonly kind: "not-in-list"; readonly list: string; readonly text: string; readonly expected: readonly string[] };A text that is not a case of a closed list.
The closed lists of Planning, each a union of literals with one registry entry for each case (commons 0037-planning FR-002, FR-041). A registry entry names the member of the ontology plan: the case is (ontology), so that the code and the ontology cannot drift apart, and carries the name another standard gives the case where the ontology has one. A value that is not in a list does not compile, and a value read from outside is an error value of parse.
import { SEVERITIES, severity } from "./vocab.ts";
severity.parse("warning"); // { kind: "ok", value: "warning" }
severity.parse("fatal"); // { kind: "err", error: { kind: "not-in-list", list: "severity", text: "fatal", expected: SEVERITIES } }governance.ListProblemtypeno test imports ittype ListProblem = { readonly kind: "not-in-list"; readonly list: string; readonly text: string; readonly expected: readonly string[] };A text that is not a case of a closed list.
governance.ClosedListtypeno test imports ittype ClosedList<L extends string> = {
readonly name: string;
readonly cases: readonly L[];
readonly is: (value: unknown) => value is L;
readonly parse: (value: unknown) => Result<L, ListProblem>;
};A closed list: its name, its cases, a guard and a parser.
governance.Entrytypeno test imports ittype Entry = { readonly ontology: string };What every registry entry says: the member of the ontology plan: the case is.
governance.ITEM_KINDSconstno test imports itconst ITEM_KINDS: readonly ["issue", "task", "todo", "finding"]The four kinds of item (0037-planning FR-001).
governance.ItemKindtypeno test imports ittype ItemKind = (typeof ITEM_KINDS)[number];One kind of item.
governance.itemKindconstno test imports itconst itemKind: ClosedList<"finding" | "issue" | "task" | "todo">The list of the kinds of item.
governance.ITEM_KIND_REGISTRYconstno test imports itconst ITEM_KIND_REGISTRY: { readonly finding: Entry & { readonly webAnnotationMotivation?: string | undefined; }; readonly issue: Entry & { readonly webAnnotationMotivation?: string | undefined; }; readonly task: Entry & { readonly webAnnotationMotivation?: string | undefined; }; readonly todo: Entry & { readonly webAnnotationMotivation?: string | undefined; }; }One entry for each kind of item; a finding is the kind whose Web Annotation motivation is assessing.
governance.STATE_KINDSconstno test imports itconst STATE_KINDS: readonly ["proposed", "open", "in-progress", "deferred", "closed"]The five states of an item (0037-planning FR-004).
governance.StateKindtypeno test imports ittype StateKind = (typeof STATE_KINDS)[number];One state of an item.
governance.stateKindconstno test imports itconst stateKind: ClosedList<"closed" | "deferred" | "in-progress" | "open" | "proposed">The list of the states.
governance.STATE_REGISTRYconstno test imports itconst STATE_REGISTRY: { readonly closed: Entry & { readonly icalStatus?: string | undefined; }; readonly deferred: Entry & { readonly icalStatus?: string | undefined; }; readonly "in-progress": Entry & { readonly icalStatus?: string | undefined; }; readonly open: Entry & { readonly icalStatus?: string | undefined; }; readonly proposed: Entry & { readonly icalStatus?: string | undefined; }; }One entry for each state, with the iCalendar STATUS it is closest to where there is one (RFC 5545 section 3.8.1.11).
governance.CLOSE_REASONSconstno test imports itconst CLOSE_REASONS: readonly ["completed", "not-planned", "duplicate"]The three reasons an item is closed.
governance.CloseReasontypeno test imports ittype CloseReason = (typeof CLOSE_REASONS)[number];One reason an item is closed.
governance.closeReasonconstno test imports itconst closeReason: ClosedList<"completed" | "duplicate" | "not-planned">The list of the close reasons.
governance.CLOSE_REASON_REGISTRYconstno test imports itconst CLOSE_REASON_REGISTRY: { readonly completed: Entry & { readonly githubStateReason: string; }; readonly duplicate: Entry & { readonly githubStateReason: string; }; readonly "not-planned": Entry & { readonly githubStateReason: string; }; }One entry for each close reason, with the state_reason GitHub gives it (REST API 2026-03-10, update an issue).
governance.SEVERITIESconstno test imports itconst SEVERITIES: readonly ["error", "warning", "note"]The three severities: the SARIF result levels that apply where the kind of a result is fail (SARIF 2.1.0 sections 3.27.9, 3.27.10).
governance.Severitytypeno test imports ittype Severity = (typeof SEVERITIES)[number];One severity.
governance.severityconstno test imports itconst severity: ClosedList<"error" | "note" | "warning">The list of the severities.
governance.SEVERITY_REGISTRYconstno test imports itconst SEVERITY_REGISTRY: { readonly error: Entry & { readonly sarifLevel: string; }; readonly note: Entry & { readonly sarifLevel: string; }; readonly warning: Entry & { readonly sarifLevel: string; }; }One entry for each severity, with the SARIF level it is.
governance.VERDICTSconstno test imports itconst VERDICTS: readonly ["accept", "minor-revision", "major-revision", "reject"]The four verdicts of a decided event.
governance.Verdicttypeno test imports ittype Verdict = (typeof VERDICTS)[number];One verdict.
governance.verdictconstno test imports itconst verdict: ClosedList<"accept" | "major-revision" | "minor-revision" | "reject">The list of the verdicts.
governance.VERDICT_REGISTRYconstno test imports itconst VERDICT_REGISTRY: { readonly accept: Entry; readonly "major-revision": Entry; readonly "minor-revision": Entry; readonly reject: Entry; }One entry for each verdict.
governance.LINK_KINDSconstno test imports itconst LINK_KINDS: readonly ["blocks", "same-as", "relates-to", "parent-of"]The four kinds of link between two items.
governance.LinkKindtypeno test imports ittype LinkKind = (typeof LINK_KINDS)[number];One kind of link.
governance.linkKindconstno test imports itconst linkKind: ClosedList<"blocks" | "parent-of" | "relates-to" | "same-as">The list of the kinds of link.
governance.LINK_KIND_REGISTRYconstno test imports itconst LINK_KIND_REGISTRY: { readonly blocks: Entry; readonly "parent-of": Entry; readonly "relates-to": Entry; readonly "same-as": Entry; }One entry for each kind of link.
governance.CAPABILITIESconstno test imports itconst CAPABILITIES: readonly ["read", "create", "append-event", "edit", "close", "assign", "delete"]The seven abilities of a source.
governance.Capabilitytypeno test imports ittype Capability = (typeof CAPABILITIES)[number];One ability of a source.
governance.capabilityconstno test imports itconst capability: ClosedList<"append-event" | "assign" | "close" | "create" | "delete" | "edit" | "read">The list of the capabilities.
governance.CAPABILITY_REGISTRYconstno test imports itconst CAPABILITY_REGISTRY: { readonly "append-event": Entry; readonly assign: Entry; readonly close: Entry; readonly create: Entry; readonly delete: Entry; readonly edit: Entry; readonly read: Entry; }One entry for each capability.
governance.FIELD_AUTHORITIESconstno test imports itconst FIELD_AUTHORITIES: readonly ["source-wins", "store-wins", "latest-wins", "person-only"]The four ways the value of a field is settled when sources disagree (0037-planning FR-012).
governance.FieldAuthoritytypeno test imports ittype FieldAuthority = (typeof FIELD_AUTHORITIES)[number];One authority over a field.
governance.fieldAuthorityconstno test imports itconst fieldAuthority: ClosedList<"latest-wins" | "person-only" | "source-wins" | "store-wins">The list of the authorities.
governance.FIELD_AUTHORITY_REGISTRYconstno test imports itconst FIELD_AUTHORITY_REGISTRY: { readonly "latest-wins": Entry; readonly "person-only": Entry; readonly "source-wins": Entry; readonly "store-wins": Entry; }One entry for each authority.
governance.ORIGINSconstno test imports itconst ORIGINS: readonly ["declared", "derived", "inferred"]The three ways an item came to be.
governance.Origintypeno test imports ittype Origin = (typeof ORIGINS)[number];One origin.
governance.originconstno test imports itconst origin: ClosedList<"declared" | "derived" | "inferred">The list of the origins.
governance.ORIGIN_REGISTRYconstno test imports itconst ORIGIN_REGISTRY: { readonly declared: Entry; readonly derived: Entry; readonly inferred: Entry; }One entry for each origin.
governance.ACTOR_KINDSconstno test imports itconst ACTOR_KINDS: readonly ["person", "agent", "tool"]The three kinds of actor.
governance.ActorKindtypeno test imports ittype ActorKind = (typeof ACTOR_KINDS)[number];One kind of actor.
governance.actorKindconstno test imports itconst actorKind: ClosedList<"agent" | "person" | "tool">The list of the kinds of actor.
governance.ACTOR_KIND_REGISTRYconstno test imports itconst ACTOR_KIND_REGISTRY: { readonly agent: Entry; readonly person: Entry; readonly tool: Entry; }One entry for each kind of actor.
governance.LOCATOR_KINDSconstno test imports itconst LOCATOR_KINDS: readonly ["file-span", "url", "commit"]The three ways a place is named.
governance.LocatorKindtypeno test imports ittype LocatorKind = (typeof LOCATOR_KINDS)[number];One way a place is named.
governance.locatorKindconstno test imports itconst locatorKind: ClosedList<"commit" | "file-span" | "url">The list of the kinds of locator.
governance.LOCATOR_KIND_REGISTRYconstno test imports itconst LOCATOR_KIND_REGISTRY: { readonly commit: Entry; readonly "file-span": Entry; readonly url: Entry; }One entry for each kind of locator.
governance.EVENT_TYPESconstno test imports itconst EVENT_TYPES: readonly ["opened", "commented", "edited", "labeled", "assigned", "severity-set", "blocker-set", "started", "deferred", "closed", "reopened", "decided", "linked", "confirmed"]The fourteen types of event: the cases of the union an item's history is made of (0037-planning FR-003).
governance.EventTypetypeno test imports ittype EventType = (typeof EVENT_TYPES)[number];One type of event.
governance.eventTypeconstno test imports itconst eventType: ClosedList<"assigned" | "blocker-set" | "closed" | "commented" | "confirmed" | "decided" | "deferred" | "edited" | "labeled" | "linked" | "opened" | "reopened" | "severity-set" | "started">The list of the types of event.
governance.EVENT_TYPE_REGISTRYconstno test imports itconst EVENT_TYPE_REGISTRY: { readonly assigned: Entry; readonly "blocker-set": Entry; readonly closed: Entry; readonly commented: Entry; readonly confirmed: Entry; readonly decided: Entry; readonly deferred: Entry; readonly edited: Entry; readonly labeled: Entry; readonly linked: Entry; readonly opened: Entry; readonly reopened: Entry; readonly "severity-set": Entry; readonly started: Entry; }One entry for each type of event.
governance.PRINCIPAL_BASESconstno test imports itconst PRINCIPAL_BASES: readonly ["session", "argument", "configuration", "commit-author"]The four ways the principal of an agent is established (0037-planning FR-045).
governance.PrincipalBasistypeno test imports ittype PrincipalBasis = (typeof PRINCIPAL_BASES)[number];One way a principal is established.
governance.principalBasisconstno test imports itconst principalBasis: ClosedList<"argument" | "commit-author" | "configuration" | "session">The list of the bases of a principal.
governance.PRINCIPAL_BASIS_REGISTRYconstno test imports itconst PRINCIPAL_BASIS_REGISTRY: { readonly argument: Entry; readonly "commit-author": Entry; readonly configuration: Entry; readonly session: Entry; }One entry for each basis of a principal.
governance.AUTHORITY_FIELDSconstno test imports itconst AUTHORITY_FIELDS: readonly ["title", "body", "labels", "assignees", "severity", "blocker", "state"]The fields of an item whose value a field authority settles (0037-planning FR-012): the title, the body, the labels, the assignees, the severity, the blocker flag and the state.
governance.AuthorityFieldtypeno test imports ittype AuthorityField = (typeof AUTHORITY_FIELDS)[number];One field that an authority settles.
governance.authorityFieldconstno test imports itconst authorityField: ClosedList<"assignees" | "blocker" | "body" | "labels" | "severity" | "state" | "title">The list of the fields an authority settles.
ListProblemtypeno test imports ittype ListProblem = { readonly kind: "not-in-list"; readonly list: string; readonly text: string; readonly expected: readonly string[] };A text that is not a case of a closed list.
ClosedListtypeno test imports ittype ClosedList<L extends string> = {
readonly name: string;
readonly cases: readonly L[];
readonly is: (value: unknown) => value is L;
readonly parse: (value: unknown) => Result<L, ListProblem>;
};A closed list: its name, its cases, a guard and a parser.
Entrytypeno test imports ittype Entry = { readonly ontology: string };What every registry entry says: the member of the ontology plan: the case is.
ITEM_KINDSconstno test imports itconst ITEM_KINDS: readonly ["issue", "task", "todo", "finding"]The four kinds of item (0037-planning FR-001).
ItemKindtypeno test imports ittype ItemKind = (typeof ITEM_KINDS)[number];One kind of item.
itemKindconstno test imports itconst itemKind: ClosedList<"finding" | "issue" | "task" | "todo">The list of the kinds of item.
ITEM_KIND_REGISTRYconstno test imports itconst ITEM_KIND_REGISTRY: { readonly finding: Entry & { readonly webAnnotationMotivation?: string | undefined; }; readonly issue: Entry & { readonly webAnnotationMotivation?: string | undefined; }; readonly task: Entry & { readonly webAnnotationMotivation?: string | undefined; }; readonly todo: Entry & { readonly webAnnotationMotivation?: string | undefined; }; }One entry for each kind of item; a finding is the kind whose Web Annotation motivation is assessing.
STATE_KINDSconstno test imports itconst STATE_KINDS: readonly ["proposed", "open", "in-progress", "deferred", "closed"]The five states of an item (0037-planning FR-004).
StateKindtypeno test imports ittype StateKind = (typeof STATE_KINDS)[number];One state of an item.
stateKindconstno test imports itconst stateKind: ClosedList<"closed" | "deferred" | "in-progress" | "open" | "proposed">The list of the states.
STATE_REGISTRYconstno test imports itconst STATE_REGISTRY: { readonly closed: Entry & { readonly icalStatus?: string | undefined; }; readonly deferred: Entry & { readonly icalStatus?: string | undefined; }; readonly "in-progress": Entry & { readonly icalStatus?: string | undefined; }; readonly open: Entry & { readonly icalStatus?: string | undefined; }; readonly proposed: Entry & { readonly icalStatus?: string | undefined; }; }One entry for each state, with the iCalendar STATUS it is closest to where there is one (RFC 5545 section 3.8.1.11).
CLOSE_REASONSconstno test imports itconst CLOSE_REASONS: readonly ["completed", "not-planned", "duplicate"]The three reasons an item is closed.
CloseReasontypeno test imports ittype CloseReason = (typeof CLOSE_REASONS)[number];One reason an item is closed.
closeReasonconstno test imports itconst closeReason: ClosedList<"completed" | "duplicate" | "not-planned">The list of the close reasons.
CLOSE_REASON_REGISTRYconstno test imports itconst CLOSE_REASON_REGISTRY: { readonly completed: Entry & { readonly githubStateReason: string; }; readonly duplicate: Entry & { readonly githubStateReason: string; }; readonly "not-planned": Entry & { readonly githubStateReason: string; }; }One entry for each close reason, with the state_reason GitHub gives it (REST API 2026-03-10, update an issue).
SEVERITIESconstno test imports itconst SEVERITIES: readonly ["error", "warning", "note"]The three severities: the SARIF result levels that apply where the kind of a result is fail (SARIF 2.1.0 sections 3.27.9, 3.27.10).
Severitytypeno test imports ittype Severity = (typeof SEVERITIES)[number];One severity.
severityconstno test imports itconst severity: ClosedList<"error" | "note" | "warning">The list of the severities.
SEVERITY_REGISTRYconstno test imports itconst SEVERITY_REGISTRY: { readonly error: Entry & { readonly sarifLevel: string; }; readonly note: Entry & { readonly sarifLevel: string; }; readonly warning: Entry & { readonly sarifLevel: string; }; }One entry for each severity, with the SARIF level it is.
VERDICTSconstno test imports itconst VERDICTS: readonly ["accept", "minor-revision", "major-revision", "reject"]The four verdicts of a decided event.
Verdicttypeno test imports ittype Verdict = (typeof VERDICTS)[number];One verdict.
verdictconstno test imports itconst verdict: ClosedList<"accept" | "major-revision" | "minor-revision" | "reject">The list of the verdicts.
VERDICT_REGISTRYconstno test imports itconst VERDICT_REGISTRY: { readonly accept: Entry; readonly "major-revision": Entry; readonly "minor-revision": Entry; readonly reject: Entry; }One entry for each verdict.
LINK_KINDSconstno test imports itconst LINK_KINDS: readonly ["blocks", "same-as", "relates-to", "parent-of"]The four kinds of link between two items.
LinkKindtypeno test imports ittype LinkKind = (typeof LINK_KINDS)[number];One kind of link.
linkKindconstno test imports itconst linkKind: ClosedList<"blocks" | "parent-of" | "relates-to" | "same-as">The list of the kinds of link.
LINK_KIND_REGISTRYconstno test imports itconst LINK_KIND_REGISTRY: { readonly blocks: Entry; readonly "parent-of": Entry; readonly "relates-to": Entry; readonly "same-as": Entry; }One entry for each kind of link.
CAPABILITIESconstno test imports itconst CAPABILITIES: readonly ["read", "create", "append-event", "edit", "close", "assign", "delete"]The seven abilities of a source.
Capabilitytypeno test imports ittype Capability = (typeof CAPABILITIES)[number];One ability of a source.
capabilityconstno test imports itconst capability: ClosedList<"append-event" | "assign" | "close" | "create" | "delete" | "edit" | "read">The list of the capabilities.
CAPABILITY_REGISTRYconstno test imports itconst CAPABILITY_REGISTRY: { readonly "append-event": Entry; readonly assign: Entry; readonly close: Entry; readonly create: Entry; readonly delete: Entry; readonly edit: Entry; readonly read: Entry; }One entry for each capability.
FIELD_AUTHORITIESconstno test imports itconst FIELD_AUTHORITIES: readonly ["source-wins", "store-wins", "latest-wins", "person-only"]The four ways the value of a field is settled when sources disagree (0037-planning FR-012).
FieldAuthoritytypeno test imports ittype FieldAuthority = (typeof FIELD_AUTHORITIES)[number];One authority over a field.
fieldAuthorityconstno test imports itconst fieldAuthority: ClosedList<"latest-wins" | "person-only" | "source-wins" | "store-wins">The list of the authorities.
FIELD_AUTHORITY_REGISTRYconstno test imports itconst FIELD_AUTHORITY_REGISTRY: { readonly "latest-wins": Entry; readonly "person-only": Entry; readonly "source-wins": Entry; readonly "store-wins": Entry; }One entry for each authority.
ORIGINSconstno test imports itconst ORIGINS: readonly ["declared", "derived", "inferred"]The three ways an item came to be.
Origintypeno test imports ittype Origin = (typeof ORIGINS)[number];One origin.
originconstno test imports itconst origin: ClosedList<"declared" | "derived" | "inferred">The list of the origins.
ORIGIN_REGISTRYconstno test imports itconst ORIGIN_REGISTRY: { readonly declared: Entry; readonly derived: Entry; readonly inferred: Entry; }One entry for each origin.
ACTOR_KINDSconstno test imports itconst ACTOR_KINDS: readonly ["person", "agent", "tool"]The three kinds of actor.
ActorKindtypeno test imports ittype ActorKind = (typeof ACTOR_KINDS)[number];One kind of actor.
actorKindconstno test imports itconst actorKind: ClosedList<"agent" | "person" | "tool">The list of the kinds of actor.
ACTOR_KIND_REGISTRYconstno test imports itconst ACTOR_KIND_REGISTRY: { readonly agent: Entry; readonly person: Entry; readonly tool: Entry; }One entry for each kind of actor.
LOCATOR_KINDSconstno test imports itconst LOCATOR_KINDS: readonly ["file-span", "url", "commit"]The three ways a place is named.
LocatorKindtypeno test imports ittype LocatorKind = (typeof LOCATOR_KINDS)[number];One way a place is named.
locatorKindconstno test imports itconst locatorKind: ClosedList<"commit" | "file-span" | "url">The list of the kinds of locator.
LOCATOR_KIND_REGISTRYconstno test imports itconst LOCATOR_KIND_REGISTRY: { readonly commit: Entry; readonly "file-span": Entry; readonly url: Entry; }One entry for each kind of locator.
EVENT_TYPESconstno test imports itconst EVENT_TYPES: readonly ["opened", "commented", "edited", "labeled", "assigned", "severity-set", "blocker-set", "started", "deferred", "closed", "reopened", "decided", "linked", "confirmed"]The fourteen types of event: the cases of the union an item's history is made of (0037-planning FR-003).
EventTypetypeno test imports ittype EventType = (typeof EVENT_TYPES)[number];One type of event.
eventTypeconstno test imports itconst eventType: ClosedList<"assigned" | "blocker-set" | "closed" | "commented" | "confirmed" | "decided" | "deferred" | "edited" | "labeled" | "linked" | "opened" | "reopened" | "severity-set" | "started">The list of the types of event.
EVENT_TYPE_REGISTRYconstno test imports itconst EVENT_TYPE_REGISTRY: { readonly assigned: Entry; readonly "blocker-set": Entry; readonly closed: Entry; readonly commented: Entry; readonly confirmed: Entry; readonly decided: Entry; readonly deferred: Entry; readonly edited: Entry; readonly labeled: Entry; readonly linked: Entry; readonly opened: Entry; readonly reopened: Entry; readonly "severity-set": Entry; readonly started: Entry; }One entry for each type of event.
PRINCIPAL_BASESconstno test imports itconst PRINCIPAL_BASES: readonly ["session", "argument", "configuration", "commit-author"]The four ways the principal of an agent is established (0037-planning FR-045).
PrincipalBasistypeno test imports ittype PrincipalBasis = (typeof PRINCIPAL_BASES)[number];One way a principal is established.
principalBasisconstno test imports itconst principalBasis: ClosedList<"argument" | "commit-author" | "configuration" | "session">The list of the bases of a principal.
PRINCIPAL_BASIS_REGISTRYconstno test imports itconst PRINCIPAL_BASIS_REGISTRY: { readonly argument: Entry; readonly "commit-author": Entry; readonly configuration: Entry; readonly session: Entry; }One entry for each basis of a principal.
AUTHORITY_FIELDSconstno test imports itconst AUTHORITY_FIELDS: readonly ["title", "body", "labels", "assignees", "severity", "blocker", "state"]The fields of an item whose value a field authority settles (0037-planning FR-012): the title, the body, the labels, the assignees, the severity, the blocker flag and the state.
AuthorityFieldtypeno test imports ittype AuthorityField = (typeof AUTHORITY_FIELDS)[number];One field that an authority settles.
authorityFieldconstno test imports itconst authorityField: ClosedList<"assignees" | "blocker" | "body" | "labels" | "severity" | "state" | "title">The list of the fields an authority settles.