Lincoln's central architectural commitment is that no language model is in the engagement decision path after the commander signs the mission artifact. This document shows where that line is drawn, which packages live on which side, the role models play in the packages where they are permitted, and how the build catches a violation. The build refuses to compile if the perimeter is breached.
Every package in the codebase falls into one of three zones, defined by their relationship to the engagement decision.
| Package | Zone | LM allowed? | Provider, if any | Role |
|---|---|---|---|---|
@lincoln/schemas | execute | no | — | Zod types, canonical JSON, source of truth |
@lincoln/memory | execute | no | — | Spatial index, freshness, snapshots |
@lincoln/policy-engine | execute | no | — | Hard-blocks, four-D scoring, decision routing |
@lincoln/arbitration | execute | no | — | Per-proposal orchestration, timeout-to-BLOCK, audit-append serialization |
@lincoln/audit | execute | no | — | Hash chain, Ed25519 sign / verify, canonical JSON |
@lincoln/tactical-bridge | execute | no | — | CoT validation, transport adapters, schema boundary |
@lincoln/bridge | execute | no | — | SSE event bus to UI, ring buffer, metrics |
@lincoln/scenario | execute | no | — | Deterministic event replay for the demo |
@lincoln/comms-monitor | execute | no | — | Frontier / tactical / GPS availability probe |
@lincoln/runtime | execute | no | — | Supervisor, CLI, mission boot & close |
@lincoln/interpretation | compile | yes | OpenAI gpt-4o-mini, gpt-4o vision | Prose / image → candidate MissionArtifact fields, gated by allowlist |
@lincoln/narration | explain | yes | Anthropic Claude (lazy import()) | Post-hoc prose rationale on its own signed chain, bound to audit tip |
@lincoln/on-device | explain | yes | Gemma 4 E4B int4 (MediaPipe), Ollama (dev) | Voice query, render rationale, RAG over audit chain |
@lincoln/ai-router | explain | no SDK | — | Tier selector — does not import any LM SDK itself; routes to frontier or on-device providers |
@lincoln/synthesis | explain | no SDK | — | Deterministic mission-artifact → scenario-script transform; uses no LM |
@lincoln/ui | explain | no SDK | — | React surfaces; routes LM calls through ai-router, never imports SDK directly |
@lincoln/capacitor | explain | yes | MediaPipe LLM Inference (Kotlin) | Pixel 9 Pro Fold wrapper; on-device Gemma plugin lives here |
@lincoln/interpretation
A frontend pass that converts ROE prose and brief images into candidate fields of a MissionArtifact. The model performs translation: it reads paragraph 8.a and proposes a PROHIB-NFA rule entry with a polygon and a paragraph reference. The rule grammar is fixed in the engine; the model's output runs into the deterministic allowlist gate (§02), then operator validation, then commander signature. Errors are caught by the gates downstream.
@lincoln/narrationA post-mission pass that takes each audit entry and produces a prose rationale suitable for an after-action review or JAG read-out. Narration runs on its own Ed25519-signed hash chain, bound to the audit chain via the audit chain's tip hash. The audit chain is the source of truth; narration is annotation that runs on a separate chain and cannot rewrite it.
The Anthropic SDK is loaded via dynamic import() so offline, cached, and non-narrating runs do not touch the dependency. The build's arch test for @lincoln/narration includes @anthropic-ai/sdk on the allowlist for that package.
@lincoln/on-deviceA live-mission pass for operator UX: voice queries (“what's the status of TRK-0x42?”), rendered rationales for QUEUE_APPROVAL modals (“why am I being asked?”), and RAG-style queries over the in-memory audit chain (“has anything blocked in the last five minutes?”). Runs on Gemma 4 E4B int4 via MediaPipe LLM Inference on the Pixel 9 Pro Fold's Tensor G4 GPU; falls back to Ollama for desktop development.
The on-device model reads audit entries and renders prose. Explain-zone code consumes execute-zone outputs and writes neither proposals nor weapons-control state.
Each execute-zone package contains a test/arch.test.ts that does static-import analysis of the package's src/ tree and fails the build if a forbidden module appears. The forbidden list:
| Module | Reason it's forbidden in the execute zone |
|---|---|
@anthropic-ai/sdk | Frontier LLM client — would put a model in the decision path |
anthropic / anthropic-ai | Older / alias forms of the same SDK |
openai | OpenAI SDK — same reason |
@google/generative-ai | Gemini SDK — same reason |
ollama | Local LLM dev shim — should never appear in execute-path code even for dev |
@mediapipe/tasks-genai | On-device Gemma client — lives in the explain zone, never here |
The arch test is mechanical: it reads every .ts file under src/, parses the import graph, and asserts no import path matches the forbidden list. A pull request that introduces a forbidden import fails CI before review. This is much stronger than a code-review convention — reviewers miss things; tsc doesn't.
pnpm typecheck. Adding a forbidden import requires both the import statement and a corresponding edit to the arch test, both of which appear in the diff. The perimeter is enforced by the toolchain that compiles the binary.
DoDD 3000.09 calls for “appropriate level of human judgment over the use of force.” The compile-and-execute model maps that requirement onto specific architectural commitments. The LM perimeter is the most concrete of them.
| Directive intent | Lincoln architectural commitment | Where you can verify |
|---|---|---|
| Human judgment governs the use of force | Commander signs the mission artifact at compile time; runtime refuses to boot on signature mismatch | Boot logic in @lincoln/runtime; test that flips a byte and asserts boot fails |
| Judgment is exercised at an appropriate point | Compile time, with full operational picture and staff support — not under engagement-tempo stress | The compile pipeline (§02), the operator validation UI |
| Engagement decisions are traceable | Every fired rule cites a paragraph_ref to the artifact, and through it to the source ROE |
Audit entries' fired_rules[].paragraph_ref field |
| Decisions are auditable after the fact | Hash-chained, Ed25519-signed audit log; verifyChain() recomputes at shutdown |
Integration test runs verifyChain(); result printed in evidence |
| Engagement logic is reviewable / certifiable | Decision is reproducible from (artifact, snapshot, proposal) — no nondeterministic components on the path |
Per-package arch tests forbidding LM SDK imports |
The LM perimeter is a structural property, not a sufficiency claim. It does not guarantee:
The five documents together describe the path from a commander's signed prose to a paragraph-cited, signed audit entry, with budgets, perimeter, and limitations stated.