Module 6 · The Destination

SwiftVector.
The kernel.

Domain-agnostic. The same kernel enforces a desktop AI agent's filesystem boundaries and a drone's geospatial envelope. The domain provides constraints. The kernel provides deterministic evaluation and faithful audit logging. This is where everything in the programme converges.

01

The convergence

Geometry gave us the axiomatic method. Calculus gave us optimisation. Linear algebra gave us transformations and attention. Statistics gave us reasoning under uncertainty. Specifying Systems gave us formal specification. SwiftVector is where all of it converges: a governance kernel that inherits Euclid's four-layer architecture, enforces constraints with deterministic evaluation, and produces a faithful audit trail of every decision.

Definitions → Axioms → Constitutional Laws → Evaluation Decisions
02

Domain-agnostic by design

The kernel doesn't know what it's governing. A filesystem boundary and a geospatial envelope are the same thing to SwiftVector: constraints that evaluate to ALLOW, DENY, or ESCALATE. The domain provides the constraints. The kernel provides the evaluation engine. This separation is what makes governance portable across every application domain.

03

Determinism as a design requirement

Every evaluation must produce the same result given the same inputs. No Date(), no UUID(), no .random() inside reducers. Replay must work. The audit trail must be complete. This is the same standard Euclid held: every proposition must be derivable from what came before.

Interactive explorer

The kernel, examined.

Explore the SwiftVector kernel's architecture. Constraints, Codex, domain contexts, and the evaluation engine — with code examples showing how the same kernel serves both filesystem governance and geospatial governance.

Architecture
SwiftVectorKernel ← domain-agnostic. Evaluates. Logs. Never executes.
  | evaluates against
DarwinCodex / FlightCodex ← compose constraints per domain
  | composed of
BoundaryConstraint · AuthorityConstraint · CompositionConstraint
  | produce
.allow · .deny(reason:) · .escalate(reason:)
// The base protocol for all governance constraints.
// Deterministic. Stateless. Single-purpose.

public protocol Constraint: Sendable {

    // Stable identifier used in audit logs
    var identifier: String { get }

    // Higher priority evaluates first
    var priority: Int { get }

    // Same input = same output. Always.
    func evaluate(_ action: Action,
                 context: some DomainContext) -> Verdict
}

Same protocol. Two domains.

FilesystemBoundaryDarwin
// Boundary = filesystem path scope
func evaluate(_ action, context) {
  if ctx.immutablePaths
     .contains(action.subject) {
    return .deny(
      reason: "Constitutionally immutable")
  }
  return isWithinBoundary(...)
    ? .allow : .deny(...)
}
GeospatialBoundaryFlight
// Boundary = geofence polygon
func evaluate(_ action, context) {
  guard action.metadata["command"]
        == "navigate" else {
    return .allow
  }
  return isWithinBoundary(...)
    ? .allow : .deny(
      reason: "Outside operational fence")
}

Tests as specification.

test_allowsWriteToMutablePath
Hexley can write to Sources/Tools/
Darwin
test_deniesWriteToImmutableGovernancePath
Cannot modify Sources/Governance/
Darwin
test_deniesWriteToConstitution
An agent that can rewrite its own constitution is not governed
Darwin
test_escalatesNetworkRequestToUnknownEndpoint
Unknown endpoints escalate to the principal
Darwin
test_detectsBoundaryProbePattern
After 3 DENYs targeting the same prefix, composition fires
Darwin
test_deniesWaypointOutsideOperationalFence
Geospatial boundary violation — same protocol
Flight
test_sameKernelTypeServesBothDomains
SwiftVectorKernel is the same type for both. Portability proof.
Arch
The sequence
Previous Module

← Specifying Systems

TLA+ as the bridge from mathematics to governance. Formal specification applied to systems.

The Essay

The Agency Paradox →

Governed autonomy as infrastructure. The position paper that frames SwiftVector's purpose.