IF Commons GitHub

logical/views

Written to: 1 requirement: 0 proved, 0 partly, 0 failing, 1 with no test recorded. 0003-planning-reconcile FR-012

The views of Planning (0037-planning FR-021): pure functions of the items. The roadmap puts each counted item after every item that blocks it; the graph of blocks and blocked by is the same relation both ways with its cycle check; the matrix of requirement by item links each item to the requirement it cites (a citation such as FR-014 or 0037-planning FR-014) and finds a requirement with no item and an item that cites one that does not exist; responsibility gives, for each person, the events their agents authored and the proposals of those agents that still wait.

import { citationsOf } from "./views.ts";
citationsOf("see 0037-planning FR-014 and FR-002"); // ["0037-planning FR-014", "FR-002"]

Source: commons/planning/src/logical/views.ts

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

logical.ViewProblemtypeno test imports it
type ViewProblem = { readonly kind: "cycle"; readonly items: readonly ItemId[] };

Why a view cannot be made.

logical.BlockGraphtypeno test imports it
type BlockGraph = ReadonlyMap<ItemId, { readonly blocks: readonly ItemId[]; readonly blockedBy: readonly ItemId[] }>;

The graph of blocks: for each counted item, what it blocks and what blocks it.

logical.blockGraphfunctionno test imports it
function blockGraph(items: readonly Item[]): Result<BlockGraph, ViewProblem>

The graph of blocks of the counted items, or the items of a cycle.

logical.roadmapfunctionno test imports it
function roadmap(items: readonly Item[]): Result<readonly Item[], ViewProblem>

The counted items that are not closed, in an order that puts each after every item that blocks it (ties by id), or the items of a cycle.

logical.citationsOffunctionno test imports it
function citationsOf(text: string): readonly string[]

The requirements a text cites: FR-014 or 0037-planning FR-014, in order of appearance, each once.

logical.RequirementRowtypeno test imports it
type RequirementRow = { readonly requirement: string; readonly items: readonly ItemId[] };

A row of the matrix of requirement by item.

logical.RequirementMatrixtypeno test imports it
type RequirementMatrix = {
  readonly rows: readonly RequirementRow[];
  readonly uncovered: readonly string[];
  readonly unknown: readonly { readonly item: ItemId; readonly citation: string }[];
};

The matrix: each known requirement with the counted items that cite it, the requirements no item cites and the citations of a requirement that does not exist.

logical.requirementMatrixfunctionno test imports it
function requirementMatrix(items: readonly Item[], known: readonly string[]): RequirementMatrix

Links each item to the requirements it cites (its cites, its title and its body) among the requirements given as known.

logical.Responsibilitytypeno test imports it
type Responsibility = {
  readonly person: string;
  readonly byAgent: readonly { readonly agent: string; readonly events: number }[];
  readonly proposals: readonly { readonly item: ItemId; readonly agent: string }[];
};

What the agents of one person did and what of it waits.

logical.responsibilityfunctionno test imports it
function responsibility(items: readonly Item[]): readonly Responsibility[]

For each person, the events their agents authored by agent, and the proposals of those agents that still wait (an item proposed, a change waiting for a person).

ViewProblemtypeno test imports it
type ViewProblem = { readonly kind: "cycle"; readonly items: readonly ItemId[] };

Why a view cannot be made.

BlockGraphtypeno test imports it
type BlockGraph = ReadonlyMap<ItemId, { readonly blocks: readonly ItemId[]; readonly blockedBy: readonly ItemId[] }>;

The graph of blocks: for each counted item, what it blocks and what blocks it.

blockGraphfunctionno test imports it
function blockGraph(items: readonly Item[]): Result<BlockGraph, ViewProblem>

The graph of blocks of the counted items, or the items of a cycle.

roadmapfunctionno test imports it
function roadmap(items: readonly Item[]): Result<readonly Item[], ViewProblem>

The counted items that are not closed, in an order that puts each after every item that blocks it (ties by id), or the items of a cycle.

citationsOffunctionno test imports it
function citationsOf(text: string): readonly string[]

The requirements a text cites: FR-014 or 0037-planning FR-014, in order of appearance, each once.

RequirementRowtypeno test imports it
type RequirementRow = { readonly requirement: string; readonly items: readonly ItemId[] };

A row of the matrix of requirement by item.

RequirementMatrixtypeno test imports it
type RequirementMatrix = {
  readonly rows: readonly RequirementRow[];
  readonly uncovered: readonly string[];
  readonly unknown: readonly { readonly item: ItemId; readonly citation: string }[];
};

The matrix: each known requirement with the counted items that cite it, the requirements no item cites and the citations of a requirement that does not exist.

requirementMatrixfunctionno test imports it
function requirementMatrix(items: readonly Item[], known: readonly string[]): RequirementMatrix

Links each item to the requirements it cites (its cites, its title and its body) among the requirements given as known.

Responsibilitytypeno test imports it
type Responsibility = {
  readonly person: string;
  readonly byAgent: readonly { readonly agent: string; readonly events: number }[];
  readonly proposals: readonly { readonly item: ItemId; readonly agent: string }[];
};

What the agents of one person did and what of it waits.

responsibilityfunctionno test imports it
function responsibility(items: readonly Item[]): readonly Responsibility[]

For each person, the events their agents authored by agent, and the proposals of those agents that still wait (an item proposed, a change waiting for a person).

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