← All Specifications

UCF

The constitutional formalization of construction — how new constitutional artifacts are forged from existing ones through governed creation.

L4 — Constitutional Forge 13 Invariants 420 Lines ❄️ Frozen

UCF Formal Specification v0.1.0

The constitutional formalization of engineering — how constitutional workspaces, entities, reviews, attestations, and commits maintain provenance, integrity, and sovereignty throughout the engineering lifecycle.

Preamble

This document is the formal specification of the Universal Constitutional Forge (UCF) — the constitutional engineering environment where constitutional work is created, reviewed, attested, and committed. UCF answers the question: How are constitutional systems engineered?

This specification answers the constitutional question: How are systems engineered? It defines the invariants that engineering must satisfy — the properties that hold true regardless of implementation. UCF specifies no IDE, no file format, no UI framework. It specifies what any conforming engineering environment must guarantee.

UCF sits at the application layer (L5), derived from UCD (constitutional derivatives). Where USR defines how meaning is executed, UCN defines how meaning is communicated, and USDS defines how artifacts are distributed, UCF defines how constitutional work is produced with verified provenance — the engineering lifecycle from workspace creation to committed artifact.

The v0.1.0 PWA demonstrated that constitutional engineering is possible in a browser-first, offline-first environment. This specification proves that it is definable, verifiable, and sovereign.

Classification: Constitutional — defines the engineering model for all of ICore. Derivation:
UCD (constitutional derivatives) → UCF (constitutional engineering environment)
Depends on: UCD (constitutional derivatives composed from UCA capabilities). Transitively, UCF depends on the entire constitutional stack — engineering must produce work that answers all six constitutional questions. Depended on by: Studyo (visualizes engineering workflows), ICS (tests against engineering artifacts), CodeLabs (sandboxed experimentation within UCF workspaces).

Section 1: Foundational Axioms

Every engineering capability must trace to these axioms. Nothing exists in UCF that these axioms do not authorize.

1.1 The Five Engineering Axioms

#AxiomStatementDerived From
EA1Engineering requires workspace isolation.Every workspace is a constitutionally isolated environment. Entities within a workspace cannot affect entities in another workspace without explicit, attested transfer. No workspace may silently modify another.Constraint (USCP)
EA2Every entity requires provenance.Every constitutional artifact — specification, test, documentation, code — must carry verifiable provenance: what it is, who created it, what it derives from, and what it constrains. An entity without provenance is constitutionally void.Identity (USCP)
EA3No change enters the record without review.Every modification to a constitutional entity must pass through a review process before being committed. Unreviewed changes cannot become part of the constitutional record. Review is a gate, not a courtesy.Verification (USCP)
EA4Reviews produce attestations.Every completed review produces a cryptographic attestation binding the reviewer's identity to the verdict, the work reviewed, and the time of review. Attestations are immutable and append-only.Relationship (USCP)
EA5Commits are immutable history.Every committed change creates an immutable record linking the workspace state, the reviewed changes, the attestation chain, and a deterministic snapshot. History cannot be rewritten — only extended.Transformation (USCP)

1.2 Axiom Sufficiency

All six USCP primitives are represented across the axioms:

PrimitivePresent InRole
ExistenceEA2 (provenance)Entities exist as provenanced artifacts, not anonymous files
IdentityEA2 (provenance), EA4 (attestation)Every entity and review carries verified identity
RelationshipEA4 (attestation), EA5 (commits)Attestations bind reviewers to work; commits bind changes to history
ConstraintEA1 (workspace isolation)Workspaces are constitutionally isolated environments
TransformationEA5 (commits)Commits transform workspace state immutably
VerificationEA3 (review gate), EA4 (attestation)Review validates; attestation proves validation occurred
The foundation is complete. The six primitives are fully represented.

Section 2: The Engineering Model

2.1 Definitions

TermDefinition
WorkspaceA constitutionally isolated engineering environment containing entities, reviews, attestations, and commits. Workspaces are the atomic unit of engineering isolation.
EntityA constitutionally identified artifact within a workspace: a specification, test, document, blueprint, or any other work product. Every entity carries provenance.
ReviewA structured evaluation of an entity change by a qualified reviewer. Reviews produce verdicts (approve, reject, request-changes) with justification.
AttestationA cryptographic record binding a reviewer's identity to a review verdict, the entity reviewed, and the time of review. Attestations are immutable.
CommitAn immutable record of workspace state at a point in time, linking reviewed changes, attestation chains, and a deterministic snapshot hash.
RegistryA constitutional catalog of workspaces and their public entities, enabling discovery and cross-workspace reference.
SnapshotA deterministic hash of workspace state at commit time, enabling verification that the workspace has not been tampered with since commit.

2.2 The Workspace Model

┌═══════════════════════════════════════════════════════════════════┐
║  CONSTITUTIONAL WORKSPACE                                         ║
║                                                                   ║
║  ┌─────────────────────────────────────────────────────────────┐  ║
║  │  Entities                                                    │  ║
║  │  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐       │  ║
║  │  │  Spec A   │ │  Test B   │ │  Doc C   │ │  Code D   │       │  ║
║  │  │ (proven.) │ │ (proven.) │ │ (proven.) │ │ (proven.) │       │  ║
║  │  └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘       │  ║
║  │       │             │             │             │              │  ║
║  │       └─────────────┴──────┬──────┴─────────────┘              │  ║
║  │                            ↓                                   │  ║
║  │                    ┌──────────────┐                             │  ║
║  │                    │   Reviews    │                             │  ║
║  │                    │  (gate)      │                             │  ║
║  │                    └──────┬───────┘                             │  ║
║  │                           ↓                                    │  ║
║  │                    ┌──────────────┐                             │  ║
║  │                    │ Attestations │  ← cryptographic proof     │  ║
║  │                    │ (immutable)  │                             │  ║
║  │                    └──────┬───────┘                             │  ║
║  │                           ↓                                    │  ║
║  │                    ┌──────────────┐                             │  ║
║  │                    │   Commits    │  ← immutable history       │  ║
║  │                    │ (append-only)│                             │  ║
║  │                    └──────────────┘                             │  ║
║  └─────────────────────────────────────────────────────────────┘  ║
║                                                                   ║
║  Workspace is constitutionally isolated.                          ║
║  No workspace may silently modify another.                        ║
╚═══════════════════════════════════════════════════════════════════╝

2.3 Constitutional Layer

PropertyValue
Layer ordinal7 (Applications)
Layer nameApplications
Derives fromLayer 6 (Derivatives): UCD
Depended on byImplementation layer: Studyo, CodeLabs
Governance statusConstitutional — engineering changes require Part IV pipeline

Section 2.5: The Doctrine Position

UCF occupies a specific position in the constitutional doctrine:

Doctrine PrincipleUCF Position
Constitution before architectureUCF's axioms (EA1-EA5) are constitutional law, derived from USCP primitives
Architecture before implementationThe workspace/entity/review/commit model defines the architecture; browser-first PWA is implementation
Implementation before optimizationv0.1.0 proved browser-first engineering is possible; this spec makes it normative
UCF defines the invariants. Implementations choose the mechanisms.

Section 3: The Workspace Contract

3.1 Specification

PropertyRequirement
RecordWorkspace { id, name, description, created_at, owner, entities, reviews, attestations, commits, snapshot }
Operationscreate(name, description) → workspace, get_entity(id) → entity, list_entities() → list, get_history() → list[commit]
ID derivationSHA-256(name:owner:created_at) — deterministic, reproducible
IsolationWorkspaces are constitutionally isolated — no cross-workspace mutation without explicit transfer

3.2 Workspace Invariants

#InvariantStatement
W1Non-empty nameEvery workspace must have a non-empty human-readable name.
W2Owner requiredEvery workspace must have a declared owner identity.
W3IsolationEntities in workspace A cannot be modified by operations on workspace B.
W4Snapshot integrityThe workspace snapshot hash must match SHA-256(sorted_entity_hashes).
W5Append-only historyCommits are appended in order. No commit may be removed or reordered.

Section 4: The Entity Contract

4.1 Specification

PropertyRequirement
RecordEntity { id, workspace_id, name, type, content_hash, created_by, created_at, updated_at, provenance, status }
Operationscreate(name, type, content) → entity, update(id, content) → entity, verify(id) → bool
ID derivationSHA-256(workspace_id:name:type:content_hash) — deterministic
Typesspecification, test, documentation, blueprint, code, atlas, other

4.2 Entity Invariants

#InvariantStatement
EN1Provenance requiredEvery entity must carry provenance: creator identity, creation time, and derivation source.
EN2Type declarationEvery entity must declare a constitutional type from the allowed set.
EN3Content bindingThe entity's content_hash must equal SHA-256(content). Content tampering is detectable.
EN4Workspace membershipAn entity belongs to exactly one workspace. Cross-workspace movement requires explicit transfer with attestation.
EN5Status trackingEvery entity has a status: draft, review, approved, committed, archived. Status transitions follow the review gate.

4.3 Entity Status Lifecycle

┌────────┐     ┌────────┐     ┌──────────┐     ┌──────────┐
  │ draft  │────→│ review │────→│ approved │────→│ committed│
  └────────┘     └───┬────┘     └──────────┘     └──────────┘
                     │
                     ↓ (reject / request-changes)
                  ┌────────┐
                  │ draft  │  ← returns to draft
                  └────────┘

Any status → archived (with justification)


Section 5: The Review Contract

5.1 Specification

PropertyRequirement
RecordReview { id, entity_id, reviewer_id, verdict, justification, reviewed_at, changes_requested }
Verdictsapprove, reject, request-changes
Operationssubmit(entity, reviewer) → review, resolve(review_id, verdict, justification) → review
Gate ruleNo entity may transition from review to approved without a resolved review with verdict approve

5.2 Review Invariants

#InvariantStatement
R1Mandatory gateNo change to a committed entity may bypass review. Unreviewed changes cannot enter the constitutional record.
R2Reviewer identityEvery review must carry a verified reviewer identity. Anonymous reviews are constitutionally void.
R3Justified verdictEvery verdict must include a non-empty justification explaining the reasoning.
R4One review per changeEach entity version requires at least one resolved review before commitment. Multiple reviews are permitted but not required.
R5Self-review prohibitedA reviewer may not review their own entity changes. The reviewer must be a different identity than the entity's last updater.

Section 6: The Attestation Contract

6.1 Specification

PropertyRequirement
RecordAttestation { id, review_id, reviewer_id, entity_id, entity_hash, verdict, timestamp, signature }
Operationsattest(review) → attestation, verify(attestation) → bool, get_chain(entity_id) → list[attestation]
SignatureSHA-256("ucf-attestation:" + reviewer_id:entity_id:entity_hash:verdict:timestamp)

6.2 Attestation Invariants

#InvariantStatement
AT1Post-review onlyAn attestation may only be created after a review is resolved.
AT2Entity bindingThe attestation records the entity's content hash at review time — binding the attestation to the exact work reviewed.
AT3Reviewer bindingThe signature includes the reviewer's identity — the attestation cannot be forged or transferred.
AT4ImmutableAttestation records are never modified after creation. They are append-only.
AT5Chain integrityThe full attestation chain for an entity must be internally consistent — every record must verify.

Section 7: The Commit Contract

7.1 Specification

PropertyRequirement
RecordCommit { id, workspace_id, snapshot_hash, changes, attestation_ids, committed_at, message }
Operationscommit(workspace, changes, message) → commit, verify(commit) → bool, get_history(workspace) → list[commit]
SnapshotSHA-256(sorted_entity_content_hashes) at time of commit — deterministic, reproducible

7.2 Commit Invariants

#InvariantStatement
C1Reviewed changes onlyEvery change included in a commit must have a corresponding approved review and attestation.
C2Deterministic snapshotThe snapshot hash is computed from entity content hashes at commit time — identical state produces identical hash.
C3Append-onlyCommits are appended in chronological order. No commit may be removed, reordered, or modified.
C4Message requiredEvery commit must include a non-empty human-readable message describing the change.
C5Chain continuityEach commit (after the first) must reference the previous commit's snapshot hash, forming an unbroken chain.

7.3 The Commit Chain

Commit 1                    Commit 2                    Commit 3
┌─────────────────┐        ┌─────────────────┐        ┌─────────────────┐
│ snapshot: a1b2  │        │ snapshot: c3d4  │        │ snapshot: e5f6  │
│ prev: genesis   │───────→│ prev: a1b2      │───────→│ prev: c3d4      │
│ changes: [...]  │        │ changes: [...]  │        │ changes: [...]  │
│ attest: [...]   │        │ attest: [...]   │        │ attest: [...]   │
│ msg: "initial"  │        │ msg: "refine"   │        │ msg: "add spec" │
└─────────────────┘        └─────────────────┘        └─────────────────┘

Chain is unbreakable. Each commit proves continuity from the previous.


Section 8: The Registry Contract

8.1 Specification

PropertyRequirement
RecordRegistry { workspaces: list, entities: list, last_updated }
Operationsregister(workspace) → bool, search(query) → list[entity], get_workspace(id) → workspace

8.2 Registry Invariants

#InvariantStatement
RG1Discovery onlyThe registry enables discovery — it does not grant modification rights.
RG2Workspace opt-inWorkspaces register themselves voluntarily. Registration does not imply endorsement.
RG3Public metadataRegistry entries expose workspace name, description, entity count, and last commit time — not entity content.

Section 9: The Constitutional Error Model

9.1 Error Taxonomy

ErrorCategoryTrigger
WorkspaceIsolationViolationWorkspaceAttempting cross-workspace mutation without explicit transfer
ProvenanceMissingEntityEntity created without required provenance fields
ReviewBypassAttemptedReviewAttempting to commit unreviewed changes
SelfReviewAttemptedReviewReviewer is the same identity as the entity's last updater
AttestationInvalidAttestationSignature mismatch, entity hash mismatch, or chain break
CommitChainBrokenCommitCommit does not reference previous commit's snapshot hash
SnapshotMismatchCommitComputed snapshot hash does not match stored hash

9.2 Error Properties

#PropertyStatement
EP1TransparentEvery error carries a human-readable message explaining the failure.
EP2ClassifiedEvery error belongs to exactly one contract category.
EP3Non-destructiveErrors do not corrupt workspace state. The workspace remains consistent after any error.
EP4TraceableErrors reference the specific invariant or rule that was violated.

Section 10: Conformance Criteria

10.1 Conformance Tests

An implementation conforms to the UCF Formal Specification if and only if:

#TestPass CriterionSeverity
UCF-01Workspace IsolationEntities in workspace A cannot be modified by operations on workspace B.Critical
UCF-02Entity ProvenanceEvery entity carries creator identity, creation time, and derivation source.Critical
UCF-03Content IntegrityEntity content_hash equals SHA-256(content). Tampering is detectable.Critical
UCF-04Review GateNo entity transitions from review to approved without a resolved review with verdict approve.Critical
UCF-05Reviewer IdentityEvery review carries a verified reviewer identity.Critical
UCF-06Self-Review PreventionA reviewer cannot review their own entity changes.Major
UCF-07Attestation IntegrityEvery attestation record verifies (signature matches recomputed value).Critical
UCF-08Attestation ImmutabilityAttestation records are never modified after creation.Critical
UCF-09Commit Reviewed-OnlyEvery change in a commit has a corresponding approved review and attestation.Critical
UCF-10Snapshot DeterminismIdentical workspace state produces identical snapshot hash.Critical
UCF-11Commit Chain ContinuityEach commit references the previous commit's snapshot hash.Critical
UCF-12History ImmutabilityCommits cannot be removed or reordered.Critical
UCF-13Error TransparencyEvery error carries a classified, human-readable message.Major
UCF-14Registry DiscoveryRegistered workspaces are discoverable via search.Minor
UCF-15Workspace SnapshotWorkspace snapshot hash equals SHA-256(sorted_entity_content_hashes).Critical

10.2 Conformance Levels

LevelNameRequirementsCertification
F0Non-ConformantFails any Critical test.None. May not claim UCF conformance.
F1Core ConformantPasses all Critical tests + ≤2 Major failures.May operate as a constitutional forge.
F2Fully ConformantPasses all 15 tests (15/15).May enter the canonical reference. Eligible for standardization.

Section 11: Self-Verification

11.1 Against the 10 Constitutional Tests

UCF Formal Specification v0.1.0 verified against the Kernel's 10 constitutional tests:

#TestResultEvidence
1Reality✅ PASSThe specification addresses the real need: formal rules for constitutional engineering. Every section maps to a demonstrated implementation capability.
2Origin✅ PASSDerived from UCD (L5) and transitively the entire stack. All axioms trace to USCP primitives (Section 1.1). The five contracts map to constitutional questions.
3Necessity✅ PASSWithout UCF, constitutional work cannot be produced with verified provenance. The kernel has no mechanism for engineering lifecycle management.
4Derivation✅ PASSFollows D7 (applications are constitutionally derived from UCD). Follows D1 (derived from UCD, the layer below). No upward mutations.
5Consistency✅ PASSNo axiom contradicts another. No invariant conflicts with a different invariant. The five contracts are orthogonal.
6Verification✅ PASSEvery axiom can be verified by tracing to USCP primitives. The 15 conformance tests provide a concrete verification protocol.
7Simplicity✅ PASSFive axioms, five contracts, fifteen conformance tests. Each element exists because removing it creates a constitutional gap.
8Sovereignty✅ PASSThe specification introduces no external dependencies. Cryptographic primitives (SHA-256) serve sovereignty (attestation), not external coupling.
9Replaceability✅ PASSThe contract model is technology-independent. Any language implementing the workspace/entity/review/commit model produces a conforming forge.
10Evolution✅ PASSThe specification can be amended through Part IV governance. New entity types, review workflows, and attestation schemes can be added.
Result: 10/10 PASS. UCF Formal Specification v0.1.0 is constitutionally sound and enters the constitutional record.

Appendix: Relationship to v0.1.0 Implementation

This formal specification captures what v0.1.0 demonstrated and makes it normative:

Implementation (demonstrated)Specification (normative)Status
UCF_Workspace — workspace CRUD, entity managementSection 3: Workspace ContractFormalized
UCF_Context — entity creation, content managementSection 4: Entity ContractFormalized
UCF_Review — review submission and resolutionSection 5: Review ContractFormalized
UCF_Attestation — cryptographic attestationSection 6: Attestation ContractFormalized
UCF_Commit — versioned commits with snapshotsSection 7: Commit ContractFormalized
UCF_Registry — workspace discovery and registrationSection 8: Registry ContractFormalized
UCF_Crypto — SHA-256 hashing, attestation signingCryptographic substrateFormalized
UCF_Verification — snapshot and chain verificationSections 7, 10Formalized
UCF_Export / UCF_Import — data portabilityCross-cutting concern (UCA-adaptable)Informative
What the specification adds beyond v0.1.0 implementation:
  1. Normative axioms — the five engineering axioms (EA1-EA5) are constitutional law, not code comments
  2. Invariant completeness — 25 named invariants across all contracts (W1-W5, EN1-EN5, R1-R5, AT1-AT5, C1-C5, RG1-RG3, EP1-EP4)
  3. Conformance tests — 15 formalized tests (UCF-01 through UCF-15) with severity levels
  4. Self-review prevention — R5 is a new invariant not enforced in v0.1.0
  5. Commit chain continuity — C5 enforces unbroken history, not just append-only
  6. Error model — classified, transparent, non-destructive, traceable (Section 9)

Originator Attribution

This UCF Formal Specification v0.1.0 is originated, created, and concept-pioneered by:

Originator: Sir Collins — Creator and Concept Pioneer of ICore (access1@tutamail.com) Date of origination: July 21, 2026 Scope: All axioms, contract models, invariants, engineering lifecycle, error models, conformance criteria, and verification protocols presented in this specification.

This attribution is a constitutional artifact. It establishes provenance — the lowest and most fundamental layer of trust.


UCF is the Constitution's workshop. This specification is the Constitution's promise that the workshop will only produce work that the Constitution authorizes — with verified provenance, reviewed changes, and immutable history.