IF Commons GitHub

Archon layers

0001Active

0001-archon-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/dialect/ (Physical, the port of the dialects), and the shared checker of @intellectual-frontiers/kanon MUST find no import that the table does not allow.

Enforced (check): .github: cd commons/archon && 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: archon/suite/layers.test.ts

Written in: archon/about.ts, archon/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; Logical MUST import Governance, @intellectual-frontiers/core and @intellectual-frontiers/crypto; the dialect port MUST import Governance, Logical, @intellectual-frontiers/core and the governance and logical parts of @intellectual-frontiers/headless, and no other unit.

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

Proved by: archon/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, ./dialect and ./cli, and a dialect package or a plugin of the command MUST reach the library only through them.

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

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

Written in: archon/src/governance/mod.ts, archon/src/logical/mod.ts, archon/src/mod.ts, archon/src/physical/dialect/mod.ts

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

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 trace check, the layers check of Kanon, 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/archon && bun run verify — suite/layers.test.ts: verify runs every check of the library

Proved by: archon/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 archon-v<version> (commons 0026-works-versioning) with its release record release.ts, and MUST be published to the registries its manifest names.

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

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

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

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

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 manifest of the library, When its exports are read, Then they are ., ./governance, ./logical, ./dialect and ./cli, per FR-003.

Out of scope

  • The command line assembler, the tool server and the forced commands of the Physical layer: specified when they are built, in this kit.
  • The dialects themselves: each is a package of its own (commons 0034-archon FR-005) with its own specification kit.

Edge cases

  • A file in no unit of the table: it is a finding of the layers check, per FR-001.
  • An import of a private file of the library by a dialect package: it is a finding, per FR-003.

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

  • Archon - the library.
  • Unit - a folder of the library in one layer.

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 package for a dialect or a plugin 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.