IF Commons GitHub

governance/vocab

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-planning-core FR-001

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 } }

Source: commons/planning/src/governance/vocab.ts

0 of 116 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

governance.ListProblemtypeno test imports it
type 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 it
type 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 it
type Entry = { readonly ontology: string };

What every registry entry says: the member of the ontology plan: the case is.

governance.ITEM_KINDSconstno test imports it
const ITEM_KINDS: readonly ["issue", "task", "todo", "finding"]

The four kinds of item (0037-planning FR-001).

governance.ItemKindtypeno test imports it
type ItemKind = (typeof ITEM_KINDS)[number];

One kind of item.

governance.itemKindconstno test imports it
const itemKind: ClosedList<"finding" | "issue" | "task" | "todo">

The list of the kinds of item.

governance.ITEM_KIND_REGISTRYconstno test imports it
const 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 it
const STATE_KINDS: readonly ["proposed", "open", "in-progress", "deferred", "closed"]

The five states of an item (0037-planning FR-004).

governance.StateKindtypeno test imports it
type StateKind = (typeof STATE_KINDS)[number];

One state of an item.

governance.stateKindconstno test imports it
const stateKind: ClosedList<"closed" | "deferred" | "in-progress" | "open" | "proposed">

The list of the states.

governance.STATE_REGISTRYconstno test imports it
const 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 it
const CLOSE_REASONS: readonly ["completed", "not-planned", "duplicate"]

The three reasons an item is closed.

governance.CloseReasontypeno test imports it
type CloseReason = (typeof CLOSE_REASONS)[number];

One reason an item is closed.

governance.closeReasonconstno test imports it
const closeReason: ClosedList<"completed" | "duplicate" | "not-planned">

The list of the close reasons.

governance.CLOSE_REASON_REGISTRYconstno test imports it
const 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 it
const 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 it
type Severity = (typeof SEVERITIES)[number];

One severity.

governance.severityconstno test imports it
const severity: ClosedList<"error" | "note" | "warning">

The list of the severities.

governance.SEVERITY_REGISTRYconstno test imports it
const 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 it
const VERDICTS: readonly ["accept", "minor-revision", "major-revision", "reject"]

The four verdicts of a decided event.

governance.Verdicttypeno test imports it
type Verdict = (typeof VERDICTS)[number];

One verdict.

governance.verdictconstno test imports it
const verdict: ClosedList<"accept" | "major-revision" | "minor-revision" | "reject">

The list of the verdicts.

governance.VERDICT_REGISTRYconstno test imports it
const 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 it
const LINK_KINDS: readonly ["blocks", "same-as", "relates-to", "parent-of"]

The four kinds of link between two items.

governance.LinkKindtypeno test imports it
type LinkKind = (typeof LINK_KINDS)[number];

One kind of link.

governance.linkKindconstno test imports it
const linkKind: ClosedList<"blocks" | "parent-of" | "relates-to" | "same-as">

The list of the kinds of link.

governance.LINK_KIND_REGISTRYconstno test imports it
const 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 it
const CAPABILITIES: readonly ["read", "create", "append-event", "edit", "close", "assign", "delete"]

The seven abilities of a source.

governance.Capabilitytypeno test imports it
type Capability = (typeof CAPABILITIES)[number];

One ability of a source.

governance.capabilityconstno test imports it
const capability: ClosedList<"append-event" | "assign" | "close" | "create" | "delete" | "edit" | "read">

The list of the capabilities.

governance.CAPABILITY_REGISTRYconstno test imports it
const 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 it
const 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 it
type FieldAuthority = (typeof FIELD_AUTHORITIES)[number];

One authority over a field.

governance.fieldAuthorityconstno test imports it
const fieldAuthority: ClosedList<"latest-wins" | "person-only" | "source-wins" | "store-wins">

The list of the authorities.

governance.FIELD_AUTHORITY_REGISTRYconstno test imports it
const 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 it
const ORIGINS: readonly ["declared", "derived", "inferred"]

The three ways an item came to be.

governance.Origintypeno test imports it
type Origin = (typeof ORIGINS)[number];

One origin.

governance.originconstno test imports it
const origin: ClosedList<"declared" | "derived" | "inferred">

The list of the origins.

governance.ORIGIN_REGISTRYconstno test imports it
const ORIGIN_REGISTRY: { readonly declared: Entry; readonly derived: Entry; readonly inferred: Entry; }

One entry for each origin.

governance.ACTOR_KINDSconstno test imports it
const ACTOR_KINDS: readonly ["person", "agent", "tool"]

The three kinds of actor.

governance.ActorKindtypeno test imports it
type ActorKind = (typeof ACTOR_KINDS)[number];

One kind of actor.

governance.actorKindconstno test imports it
const actorKind: ClosedList<"agent" | "person" | "tool">

The list of the kinds of actor.

governance.ACTOR_KIND_REGISTRYconstno test imports it
const ACTOR_KIND_REGISTRY: { readonly agent: Entry; readonly person: Entry; readonly tool: Entry; }

One entry for each kind of actor.

governance.LOCATOR_KINDSconstno test imports it
const LOCATOR_KINDS: readonly ["file-span", "url", "commit"]

The three ways a place is named.

governance.LocatorKindtypeno test imports it
type LocatorKind = (typeof LOCATOR_KINDS)[number];

One way a place is named.

governance.locatorKindconstno test imports it
const locatorKind: ClosedList<"commit" | "file-span" | "url">

The list of the kinds of locator.

governance.LOCATOR_KIND_REGISTRYconstno test imports it
const 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 it
const 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 it
type EventType = (typeof EVENT_TYPES)[number];

One type of event.

governance.eventTypeconstno test imports it
const 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 it
const 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 it
const 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 it
type PrincipalBasis = (typeof PRINCIPAL_BASES)[number];

One way a principal is established.

governance.principalBasisconstno test imports it
const principalBasis: ClosedList<"argument" | "commit-author" | "configuration" | "session">

The list of the bases of a principal.

governance.PRINCIPAL_BASIS_REGISTRYconstno test imports it
const 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 it
const 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 it
type AuthorityField = (typeof AUTHORITY_FIELDS)[number];

One field that an authority settles.

governance.authorityFieldconstno test imports it
const authorityField: ClosedList<"assignees" | "blocker" | "body" | "labels" | "severity" | "state" | "title">

The list of the fields an authority settles.

ListProblemtypeno test imports it
type 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 it
type 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 it
type Entry = { readonly ontology: string };

What every registry entry says: the member of the ontology plan: the case is.

ITEM_KINDSconstno test imports it
const ITEM_KINDS: readonly ["issue", "task", "todo", "finding"]

The four kinds of item (0037-planning FR-001).

ItemKindtypeno test imports it
type ItemKind = (typeof ITEM_KINDS)[number];

One kind of item.

itemKindconstno test imports it
const itemKind: ClosedList<"finding" | "issue" | "task" | "todo">

The list of the kinds of item.

ITEM_KIND_REGISTRYconstno test imports it
const 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 it
const STATE_KINDS: readonly ["proposed", "open", "in-progress", "deferred", "closed"]

The five states of an item (0037-planning FR-004).

StateKindtypeno test imports it
type StateKind = (typeof STATE_KINDS)[number];

One state of an item.

stateKindconstno test imports it
const stateKind: ClosedList<"closed" | "deferred" | "in-progress" | "open" | "proposed">

The list of the states.

STATE_REGISTRYconstno test imports it
const 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 it
const CLOSE_REASONS: readonly ["completed", "not-planned", "duplicate"]

The three reasons an item is closed.

CloseReasontypeno test imports it
type CloseReason = (typeof CLOSE_REASONS)[number];

One reason an item is closed.

closeReasonconstno test imports it
const closeReason: ClosedList<"completed" | "duplicate" | "not-planned">

The list of the close reasons.

CLOSE_REASON_REGISTRYconstno test imports it
const 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 it
const 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 it
type Severity = (typeof SEVERITIES)[number];

One severity.

severityconstno test imports it
const severity: ClosedList<"error" | "note" | "warning">

The list of the severities.

SEVERITY_REGISTRYconstno test imports it
const 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 it
const VERDICTS: readonly ["accept", "minor-revision", "major-revision", "reject"]

The four verdicts of a decided event.

Verdicttypeno test imports it
type Verdict = (typeof VERDICTS)[number];

One verdict.

verdictconstno test imports it
const verdict: ClosedList<"accept" | "major-revision" | "minor-revision" | "reject">

The list of the verdicts.

VERDICT_REGISTRYconstno test imports it
const 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 it
const LINK_KINDS: readonly ["blocks", "same-as", "relates-to", "parent-of"]

The four kinds of link between two items.

LinkKindtypeno test imports it
type LinkKind = (typeof LINK_KINDS)[number];

One kind of link.

linkKindconstno test imports it
const linkKind: ClosedList<"blocks" | "parent-of" | "relates-to" | "same-as">

The list of the kinds of link.

LINK_KIND_REGISTRYconstno test imports it
const 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 it
const CAPABILITIES: readonly ["read", "create", "append-event", "edit", "close", "assign", "delete"]

The seven abilities of a source.

Capabilitytypeno test imports it
type Capability = (typeof CAPABILITIES)[number];

One ability of a source.

capabilityconstno test imports it
const capability: ClosedList<"append-event" | "assign" | "close" | "create" | "delete" | "edit" | "read">

The list of the capabilities.

CAPABILITY_REGISTRYconstno test imports it
const 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 it
const 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 it
type FieldAuthority = (typeof FIELD_AUTHORITIES)[number];

One authority over a field.

fieldAuthorityconstno test imports it
const fieldAuthority: ClosedList<"latest-wins" | "person-only" | "source-wins" | "store-wins">

The list of the authorities.

FIELD_AUTHORITY_REGISTRYconstno test imports it
const 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 it
const ORIGINS: readonly ["declared", "derived", "inferred"]

The three ways an item came to be.

Origintypeno test imports it
type Origin = (typeof ORIGINS)[number];

One origin.

originconstno test imports it
const origin: ClosedList<"declared" | "derived" | "inferred">

The list of the origins.

ORIGIN_REGISTRYconstno test imports it
const ORIGIN_REGISTRY: { readonly declared: Entry; readonly derived: Entry; readonly inferred: Entry; }

One entry for each origin.

ACTOR_KINDSconstno test imports it
const ACTOR_KINDS: readonly ["person", "agent", "tool"]

The three kinds of actor.

ActorKindtypeno test imports it
type ActorKind = (typeof ACTOR_KINDS)[number];

One kind of actor.

actorKindconstno test imports it
const actorKind: ClosedList<"agent" | "person" | "tool">

The list of the kinds of actor.

ACTOR_KIND_REGISTRYconstno test imports it
const ACTOR_KIND_REGISTRY: { readonly agent: Entry; readonly person: Entry; readonly tool: Entry; }

One entry for each kind of actor.

LOCATOR_KINDSconstno test imports it
const LOCATOR_KINDS: readonly ["file-span", "url", "commit"]

The three ways a place is named.

LocatorKindtypeno test imports it
type LocatorKind = (typeof LOCATOR_KINDS)[number];

One way a place is named.

locatorKindconstno test imports it
const locatorKind: ClosedList<"commit" | "file-span" | "url">

The list of the kinds of locator.

LOCATOR_KIND_REGISTRYconstno test imports it
const LOCATOR_KIND_REGISTRY: { readonly commit: Entry; readonly "file-span": Entry; readonly url: Entry; }

One entry for each kind of locator.

EVENT_TYPESconstno test imports it
const 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 it
type EventType = (typeof EVENT_TYPES)[number];

One type of event.

eventTypeconstno test imports it
const 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 it
const 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 it
const 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 it
type PrincipalBasis = (typeof PRINCIPAL_BASES)[number];

One way a principal is established.

principalBasisconstno test imports it
const principalBasis: ClosedList<"argument" | "commit-author" | "configuration" | "session">

The list of the bases of a principal.

PRINCIPAL_BASIS_REGISTRYconstno test imports it
const 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 it
const 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 it
type AuthorityField = (typeof AUTHORITY_FIELDS)[number];

One field that an authority settles.

authorityFieldconstno test imports it
const authorityField: ClosedList<"assignees" | "blocker" | "body" | "labels" | "severity" | "state" | "title">

The list of the fields an authority settles.

Titles, headings, exports, tables, columns and requirements. Esc closes.