internal/

directory
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: Apache-2.0

README

internal/

Shipped library packages for the assent CLI. Hexagonal layout: pure decision core (no I/O) at the centre; adapters and hosts at the edges. See C4 containers for the product sketch; this file lists what actually exists today (go list ./internal/...).

Pure (no filesystem, network, or forge I/O)

Package Role
internal/core/aggregate Obligations aggregator — CEL assert trees, coverage, tri-state
internal/core/decision Decision / findings / pins model and report emission
internal/core/classify Change-set classification helpers
internal/core/policy Policy envelope types (profiles, bindings, prove blocks)
internal/core/hash Canonical JSON hashing (ADR-0017 digest vectors)
internal/change Value tree, structural differ, canonical ChangeSet
internal/compare Policy comparison suite loader, classifiers, gates, records
internal/catalogue Catalogue load/combine and profile→pack activation
internal/evaldecode Strict decode of evaluation inputs from JSON/YAML
internal/glob Path glob matching for policy selectors
internal/lint Policy and presentation lint (hard-error fixtures)
internal/schemadrift Presentation/config drift detection
internal/render Markdown renderer, redaction, locale chrome, summary
internal/render/locale Locale string catalog

I/O and adapter edges

Package Role
internal/forge Forge port (snapshot, resolve, reconcile) + shared helpers
internal/forge/gitlab GitLab HTTP adapter
internal/forge/fake In-memory forge fake for tests
internal/forge/conformance SHA-guarded reconciliation conformance suite
internal/provider Provider host (HTTP/exec transport, sensitive handling)
internal/provider/builtin Built-in providers (repo-file, resource-owner, GitLab groups)

Test/support

Package Role
internal/adoptertest Adopter-facing policy test helpers (ADR-0014 fixtures)

Architecture rule

internal/core/aggregate, internal/core/decision, internal/core/classify, and internal/change must not import forge, provider, cmd/, or anything that performs I/O. Compare and catalogue stay pure (filesystem reads happen in cmd/assent before calling in). Enforcement: manual review today; depguard/purity lint is tracked separately (AUD-01).

Directories

Path Synopsis
Package adoptertest is the PURE library behind `assent test` (P5-E6).
Package adoptertest is the PURE library behind `assent test` (P5-E6).
Package catalogue is assent's pure generated rule catalogue (D-017 B10).
Package catalogue is assent's pure generated rule catalogue (D-017 B10).
Package change implements assent's canonical change model: it diffs a base and head version of a single file into a byte-stable ChangeSet that predicates evaluate over (ADR-0003, ADR-0011).
Package change implements assent's canonical change model: it diffs a base and head version of a single file into a byte-stable ChangeSet that predicates evaluate over (ADR-0003, ADR-0011).
Package compare is the PURE promotion-comparison engine behind `assent compare` (P5-E6-S09 seed, PCS epic extensions).
Package compare is the PURE promotion-comparison engine behind `assent compare` (P5-E6-S09 seed, PCS epic extensions).
core
aggregate
Package aggregate is the PURE, order-independent obligations aggregator for the P4-E1 walking skeleton (P4-E1-S03, ADR-0017 §2/§6).
Package aggregate is the PURE, order-independent obligations aggregator for the P4-E1 walking skeleton (P4-E1-S03, ADR-0017 §2/§6).
classify
Package classify is the PURE, minimal change-classifier for the P4-E1 walking skeleton (P4-E1-S07-01, ADR-0008 §1, ADR-0015 §1).
Package classify is the PURE, minimal change-classifier for the P4-E1 walking skeleton (P4-E1-S07-01, ADR-0008 §1, ADR-0015 §1).
decision
Package decision is the PURE serializer for the P4-E1 walking skeleton (P4-E1-S04, ADR-0016 §3, ADR-0017 §1/§9).
Package decision is the PURE serializer for the P4-E1 walking skeleton (P4-E1-S04, ADR-0016 §3, ADR-0017 §1/§9).
hash
Package hash provides schema-version domain-separated digests over canonical JSON.
Package hash provides schema-version domain-separated digests over canonical JSON.
policy
Package policy loads assent's frozen authored contracts — MergePolicy, RulesetBinding, Config, and Pack (schemas/policy/v1alpha1/**) — into engine types under strict decode, replacing the P4-E1 toy YAML (cmd/assent/policy.go).
Package policy loads assent's frozen authored contracts — MergePolicy, RulesetBinding, Config, and Pack (schemas/policy/v1alpha1/**) — into engine types under strict decode, replacing the P4-E1 toy YAML (cmd/assent/policy.go).
Package evaldecode is the E2-S04 REQ-06 boundary that turns the LIVE differ's output into the engine's typed EvaluationInput.
Package evaldecode is the E2-S04 REQ-06 boundary that turns the LIVE differ's output into the engine's typed EvaluationInput.
Package forge is the ADR-0017 §7 forge port surface:
Package forge is the ADR-0017 §7 forge port surface:
conformance
Package conformance holds L2 conformance goldens for the forge port (ADR-0005).
Package conformance holds L2 conformance goldens for the forge port (ADR-0005).
fake
Package fake is the in-memory forge substrate for the P4-E1 Reconcile tests (S06/S08/S07-02).
Package fake is the in-memory forge substrate for the P4-E1 Reconcile tests (S06/S08/S07-02).
gitlab
Package gitlab is the REAL GitLab REST v4 adapter for the P4-E1 walking skeleton (P4-E1-S10).
Package gitlab is the REAL GitLab REST v4 adapter for the P4-E1 walking skeleton (P4-E1-S10).
Package glob is the single, pure path/pointer glob matcher shared by the routing classifier (internal/core/classify) and the obligation-coverage loop (internal/core/aggregate).
Package glob is the single, pure path/pointer glob matcher shared by the routing classifier (internal/core/classify) and the obligation-coverage loop (internal/core/aggregate).
Package lint is assent's pure `assent lint` check library over the `.assent/**` authoring surface.
Package lint is assent's pure `assent lint` check library over the `.assent/**` authoring surface.
Package provider hosts the typed provider protocol (ADR-0017 §6).
Package provider hosts the typed provider protocol (ADR-0017 §6).
builtin
Package builtin registers hermetic Phase-5 provider fact sources (forge groups, repo-file walk).
Package builtin registers hermetic Phase-5 provider fact sources (forge groups, repo-file walk).
Package render is the pure presentation layer for assent (P5-E8, ADR-0016).
Package render is the pure presentation layer for assent (P5-E8, ADR-0016).
locale
Package locale ships fixed renderer chrome strings keyed by stable ids (ADR-0016 §5).
Package locale ships fixed renderer chrome strings keyed by stable ids (ADR-0016 §5).
Package schemadrift helpers verify git-tracked schema changes stay within allowed epic fences: the E8 D-088 presentation block in config.schema.json, and the D-120 toolDigest description annotation in decision-record.schema.json.
Package schemadrift helpers verify git-tracked schema changes stay within allowed epic fences: the E8 D-088 presentation block in config.schema.json, and the D-120 toolDigest description annotation in decision-record.schema.json.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL