IF Commons GitHub

governance/verbs

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-repoctl-governance FR-002

The verbs of Repoctl as facts (commons repoctl 0002-repoctl-governance FR-002, FR-003; commons headless 0002-headless-governance, 0005-reach-and-targets): each verb is declared once, with what it is (a report or an action), what it may do (read, mutate, destructive), whether repeating it is safe, whether it previews and checks, the tier that may see it and the reach policy that says through which channels it comes and how a destruction is confirmed. The command line, the tool server and the documentation read this one table; a test holds that its facts do not contradict each other.

import { VERBS, verbIds } from "./verbs.ts";
VERBS["release publish"].effect; // "destructive"
verbIds().includes("sync"); // true

Source: commons/repoctl/src/governance/verbs.ts

3 of 8 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.VerbIdtypeno test imports it
type VerbId = "sync" | "merge" | "check" | "status" | "hygiene" | "release plan" | "release apply" | "release publish" | "new library" | "commit" | "doctor" | "prove" | "docs build" | "docs serve" | "docs check" | "query" | "usage" | "ci step" | "mcp";

The words of every verb, as a person types them: a closed union.

governance.VerbFactstypeno test imports it
type VerbFacts = { readonly id: VerbId; readonly summary: string; readonly kind: Kind; readonly effect: Effect; … (801 characters)
type VerbFacts = {
  readonly id: VerbId;
  readonly summary: string;
  readonly kind: Kind;
  readonly effect: Effect;
  /** Whether running it again with the same input changes nothing more. */
  readonly idempotent: boolean;
  /** Whether `--dry-run` previews what it would change. */
  readonly dryRun: boolean;
  /** Whether `--check` ends with findings where it would change something. */
  readonly check: boolean;
  /** The lowest tier that sees it. */
  readonly tier: TierId;
  /** The channels it comes through. */
  readonly channels: readonly Channel[];
  /** How it is confirmed: a destruction by a person (and, from a tool server, only as a preview). */
  readonly confirmation: ConfirmationClass;
  /** The options only a person may give. */
  readonly humanOnly: readonly string[];
};

What a verb is.

governance.VERBSconstno test imports it
const VERBS: Readonly<Record<VerbId, VerbFacts>>

Every verb, by its words: a registry the compiler holds complete.

governance.verbIdsfunctionno test imports it
function verbIds(): readonly VerbId[]

The words of every verb, in the order the help lists them.

VerbIdtype
type VerbId = "sync" | "merge" | "check" | "status" | "hygiene" | "release plan" | "release apply" | "release publish" | "new library" | "commit" | "doctor" | "prove" | "docs build" | "docs serve" | "docs check" | "query" | "usage" | "ci step" | "mcp";

The words of every verb, as a person types them: a closed union.

Imported by 14 tests of the run (14 passed, 0 failed): the library's results

VerbFactstypeno test imports it
type VerbFacts = { readonly id: VerbId; readonly summary: string; readonly kind: Kind; readonly effect: Effect; … (801 characters)
type VerbFacts = {
  readonly id: VerbId;
  readonly summary: string;
  readonly kind: Kind;
  readonly effect: Effect;
  /** Whether running it again with the same input changes nothing more. */
  readonly idempotent: boolean;
  /** Whether `--dry-run` previews what it would change. */
  readonly dryRun: boolean;
  /** Whether `--check` ends with findings where it would change something. */
  readonly check: boolean;
  /** The lowest tier that sees it. */
  readonly tier: TierId;
  /** The channels it comes through. */
  readonly channels: readonly Channel[];
  /** How it is confirmed: a destruction by a person (and, from a tool server, only as a preview). */
  readonly confirmation: ConfirmationClass;
  /** The options only a person may give. */
  readonly humanOnly: readonly string[];
};

What a verb is.

VERBSconst
const VERBS: Readonly<Record<VerbId, VerbFacts>>

Every verb, by its words: a registry the compiler holds complete.

Imported by 30 tests of the run (30 passed, 0 failed): the library's results

verbIdsfunction
function verbIds(): readonly VerbId[]

The words of every verb, in the order the help lists them.

Imported by 30 tests of the run (30 passed, 0 failed): the library's results

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