IF Commons GitHub

Toolchain layers

0001Active

0001-toolchain-layers · owner if · domain commons

Requirements

FR-001checkpassing

The library MUST be Kanon: its manifest library.ts MUST declare the table of its units in the field kanon, with the units src/governance/ (Governance), src/logical/ (Logical) and src/physical/ontology/ (Physical, the one adapter), and the shared checker of @intellectual-frontiers/kanon MUST find no import that the table does not allow.

Enforced (check): .github: cd commons/toolchain && bun run verify — suite/layers.test.ts: every file of the real tree is in a unit and a file in none is layers/unclassified

Proved by: toolchain/suite/layers.test.ts

Written in: toolchain/about.ts, toolchain/library.ts

Tests: passed: suite/layers.test.ts the shared checker finds nothing in the real tree; passed: suite/layers.test.ts a file in no unit is layers/unclassified

FR-002checkpassing

Governance MUST import no unit of the library and no package but @intellectual-frontiers/core, the digest type of @intellectual-frontiers/crypto and the governance of @intellectual-frontiers/archon; Logical MUST import Governance, @intellectual-frontiers/core and the governance of @intellectual-frontiers/archon, and the adapter MUST import Governance, Logical, @intellectual-frontiers/core and the downloads of @intellectual-frontiers/ontology, and no other unit.

Enforced (check): .github: cd commons/toolchain && bun run verify — suite/layers.test.ts: below may not import above and each unit imports only what its row allows

Proved by: toolchain/suite/layers.test.ts

Tests: passed: suite/layers.test.ts the shared checker finds nothing in the real tree; passed: suite/layers.test.ts below may not import above, a unit reaches another through exports, and each unit imports

FR-003checkpassing

The package MUST export ., ./governance, ./logical and ./ontology, and a dialect package or a consumer MUST reach the library only through them.

Enforced (check): .github: cd commons/toolchain && bun run verify — suite/layers.test.ts: the package exports the library and its layers

Proved by: toolchain/suite/layers.test.ts

Written in: toolchain/src/governance/mod.ts, toolchain/src/logical/mod.ts, toolchain/src/mod.ts, toolchain/src/physical/ontology/mod.ts

Tests: passed: suite/layers.test.ts the package exports the library and its layers

FR-004checkpassing

bun run verify in the folder of the library MUST run the TypeScript 7 compiler, the checks of the specification kit, the check of the level L1, the layers check of Kanon, the trace check, the tests under Bun and the check of the package, and MUST fail on any finding that is not held by a baseline that only shrinks.

Enforced (check): .github: cd commons/toolchain && bun run verify — suite/layers.test.ts: verify runs every check of the library

Proved by: toolchain/suite/layers.test.ts

Tests: passed: suite/layers.test.ts verify runs the compiler, the specification checks, the layers check, the trace check, the

FR-005checkpassing

The library MUST be released as toolchain-v<version> (commons 0026-works-versioning), and its name MUST be one that commons/libraries holds for it.

Enforced (check): .github: cd commons/toolchain && bun run verify — suite/layers.test.ts: the release record agrees with the manifest and the package

Proved by: toolchain/suite/layers.test.ts

Written in: toolchain/tools/check.ts, toolchain/tools/pack.ts

Tests: passed: suite/layers.test.ts the release record agrees with the manifest and the package

FR-006checkpassing

The library MUST do no input or output: it MUST NOT read a file, reach the network or run a program, so that every function of it is pure and the dialects are the only place a tool is obtained.

Enforced (check): .github: cd commons/toolchain && bun run verify — suite/layers.test.ts: no source imports a module that reads a file, reaches the network or runs a program

Proved by: toolchain/suite/layers.test.ts

Tests: passed: suite/layers.test.ts no source reads a file, reaches the network or runs a program

Acceptance scenarios

  1. Given the real tree of the library, When the layers check runs, Then every file is in a unit and no import is outside its row, per FR-001 and FR-002.
  2. Given a file of Governance that imports Logical, When the layers check runs, Then it is a finding, per FR-002.
  3. Given the sources of the library, When they are read, Then none imports a module of Node for files, the network or processes, per FR-006.

Out of scope

  • Obtaining a tool: the dialect packages, each with its own specification kit.
  • The command a person types (archon tool ...): a plugin of the command, a package of its own.
  • Reading what is installed on a computer: the dialects and the estate library.

Edge cases

  • A file in no unit of the table: it is a finding of the layers check, per FR-001.
  • A source that imports node:fs: it is a finding, per FR-002 and FR-006.

Assumptions

  • The shared checker of Kanon and the manifest check of the libraries are on the branch that holds this library.

Open questions

  • None.

Key entities

  • Toolchain - the library.
  • Tool - a program a computer needs, declared once.

Success criteria

SC-001success criterion

The layers check of Kanon finds nothing in the real tree, and a deliberate breach of a row is found by its code.

SC-002success criterion

A dialect package needs only the public exports named here.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

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