Diagrams — Capstone CAP1: The Air-Gapped Domain Model

Module: CAP1 — The Air-Gapped Domain Model Diagram count: 5 Tool: Mermaid (primary). Each diagram validated in Mermaid Live Editor.


Diagram 1 — The Seven-Phase Pipeline (end to end)

Type: Layered pipeline Purpose: The single diagram that anchors the capstone. Seven phases, bottom-up, each producing a deliverable that feeds the next. Reading the diagram: Bottom-up. Phase 1 chooses the base; Phase 7 packages the reproducible result. The right column is the deliverable at each phase.

flowchart TD
  P1["PHASE 1 — Choose domain + open-data base<br/>MiniCPM / OLMo / Tulu / SmolLM3"]
  P2["PHASE 2 — HIPAA-safe data prep<br/>open datasets + synthetic (FT05/FT06)"]
  P3["PHASE 3 — QLoRA fine-tune + merge<br/>4-bit base, LoRA, merge_and_unload"]
  P4["PHASE 4 — Eval<br/>domain held-out + general benchmark"]
  P5["PHASE 5 — GGUF export<br/>convert + quantize (FT19)"]
  P6["PHASE 6 — Local serve<br/>Ollama / llama.cpp, no telemetry (FT20)"]
  P7["PHASE 7 — Reproducibility package<br/>README + pinned deps + one-command run"]

  P1 --> P2 --> P3 --> P4 --> P5 --> P6 --> P7

  style P1 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style P2 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P3 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P4 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P5 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P6 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P7 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8

Diagram 2 — The Three Success Criteria

Type: Criteria map Purpose: What a passing submission proves. Three falsifiable criteria, each with a measurement. Reading the diagram: Each criterion has a metric and a pass bar. A submission meets the capstone when all three pass.

flowchart LR
  subgraph C1["Criterion 1 — Domain lift"]
    D1["Held-out domain eval<br/>fine_tuned - base"]
    D2["Pass: >+3 to +15 pts<br/>(non-trivial, defensible)"]
  end
  subgraph C2["Criterion 2 — Local serve"]
    S1["GGUF via Ollama/llama.cpp<br/>loads, generates, no telemetry"]
    S2["Pass: usable tok/s,<br/>air-gap confirmed"]
  end
  subgraph C3["Criterion 3 — Reproducibility"]
    R1["Pinned deps, seeds,<br/>one-command run, numbers in README"]
    R2["Pass: re-run within tolerance"]
  end

  style C1 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style C2 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style C3 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8

Diagram 3 — Lift vs Forgetting (the eval dual)

Type: Comparison / measurement pair Purpose: Why two evals are required. Lift proves steering worked; forgetting proves it was disciplined. Reporting only one is incomplete. Reading the diagram: Left = the gain (domain held-out). Right = the cost (general benchmark). Both numbers go in the README.

flowchart LR
  Base["Base model"]
  FT["Fine-tuned model"]

  Base --> EL["Domain held-out eval<br/>score_base_domain"]
  FT --> EF["Domain held-out eval<br/>score_ft_domain"]
  EF -. lift .- EL

  Base --> GL["General benchmark (MMLU/GSM8K)<br/>score_base_general"]
  FT --> GF["General benchmark<br/>score_ft_general"]
  GF -. forgetting .- GL

  style Base fill:#14141f,stroke:#ffffff1f,color:#e4e4e8
  style FT fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style EL fill:#08080c,stroke:#5eead44c,color:#e4e4e8
  style EF fill:#08080c,stroke:#5eead44c,color:#e4e4e8
  style GL fill:#08080c,stroke:#ffffff14,color:#9494a0
  style GF fill:#08080c,stroke:#ffffff14,color:#9494a0

Diagram 4 — The Air-Gap Property (what "local" actually means)

Type: Boundary diagram Purpose: The air-gap is a property of the whole pipeline, not a deployment feature. Every phase must be local; if any phase touches the network, the claim is false. Reading the diagram: The pipeline runs inside the boundary. The boundary is the owner's hardware. No outbound calls in any phase.

flowchart TD
  subgraph AirGap["THE AIR-GAP — owner's hardware"]
    direction TB
    DP["Data prep<br/>(local open data + synthetic)"]
    TR["Training<br/>(QLoRA on local GPU/MPS)"]
    EV["Eval<br/>(local held-out + benchmark)"]
    EX["Export<br/>(local GGUF conversion)"]
    SV["Serve<br/>(Ollama / llama.cpp)"]
    DP --> TR --> EV --> EX --> SV
  end
  Net["The network<br/>(vendors, APIs, telemetry)"]

  AirGap -.no outbound calls in any phase.- Net

  style AirGap fill:#08080c,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style DP fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style TR fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style EV fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style EX fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style SV fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style Net fill:#14141f,stroke:#ffffff1f,color:#9494a0

Diagram 5 — The Evaluation Rubric

Type: Rubric matrix Purpose: How a reviewer scores the submission. Five dimensions; HIPAA-safety is a gate (a 1 fails the submission regardless of total). Reading the diagram: Each dimension scored 1-3. Passing = 12/15 with no dimension below 2, and HIPAA-safety not below 2.

flowchart TD
  subgraph Rubric["Evaluation rubric — 5 dimensions"]
    L["Domain lift<br/>held-out, defensible"]
    F["Forgetting control<br/>general benchmark reported"]
    S["Local serve<br/>GGUF loads, fine-tuned behavior, no telemetry"]
    R["Reproducibility<br/>pinned deps, one-command, numbers in README"]
    H["HIPAA-safety<br/>open/de-identified data, provenance documented"]
  end
  Gate["HIPAA-safety is a GATE<br/>score below 2 = fail, regardless of total"]
  Pass["Passing: 12/15+<br/>no dimension below 2"]

  Rubric --> Gate
  Gate --> Pass

  style L fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style F fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style S fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style R fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style H fill:#14141f,stroke:#f08080,stroke-width:1.5px,color:#e4e4e8
  style Gate fill:#08080c,stroke:#f08080,stroke-dasharray: 4 2,color:#f08080
  style Pass fill:#08080c,stroke:#82e0aa,color:#82e0aa

Validation notes

# Diagrams — Capstone CAP1: The Air-Gapped Domain Model

**Module**: CAP1 — The Air-Gapped Domain Model
**Diagram count**: 5
**Tool**: Mermaid (primary). Each diagram validated in [Mermaid Live Editor](https://mermaid.live).

---

## Diagram 1 — The Seven-Phase Pipeline (end to end)

**Type**: Layered pipeline
**Purpose**: The single diagram that anchors the capstone. Seven phases, bottom-up, each producing a deliverable that feeds the next.
**Reading the diagram**: Bottom-up. Phase 1 chooses the base; Phase 7 packages the reproducible result. The right column is the deliverable at each phase.

```mermaid
flowchart TD
  P1["PHASE 1 — Choose domain + open-data base<br/>MiniCPM / OLMo / Tulu / SmolLM3"]
  P2["PHASE 2 — HIPAA-safe data prep<br/>open datasets + synthetic (FT05/FT06)"]
  P3["PHASE 3 — QLoRA fine-tune + merge<br/>4-bit base, LoRA, merge_and_unload"]
  P4["PHASE 4 — Eval<br/>domain held-out + general benchmark"]
  P5["PHASE 5 — GGUF export<br/>convert + quantize (FT19)"]
  P6["PHASE 6 — Local serve<br/>Ollama / llama.cpp, no telemetry (FT20)"]
  P7["PHASE 7 — Reproducibility package<br/>README + pinned deps + one-command run"]

  P1 --> P2 --> P3 --> P4 --> P5 --> P6 --> P7

  style P1 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style P2 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P3 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P4 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P5 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P6 fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style P7 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
```

---

## Diagram 2 — The Three Success Criteria

**Type**: Criteria map
**Purpose**: What a passing submission proves. Three falsifiable criteria, each with a measurement.
**Reading the diagram**: Each criterion has a metric and a pass bar. A submission meets the capstone when all three pass.

```mermaid
flowchart LR
  subgraph C1["Criterion 1 — Domain lift"]
    D1["Held-out domain eval<br/>fine_tuned - base"]
    D2["Pass: >+3 to +15 pts<br/>(non-trivial, defensible)"]
  end
  subgraph C2["Criterion 2 — Local serve"]
    S1["GGUF via Ollama/llama.cpp<br/>loads, generates, no telemetry"]
    S2["Pass: usable tok/s,<br/>air-gap confirmed"]
  end
  subgraph C3["Criterion 3 — Reproducibility"]
    R1["Pinned deps, seeds,<br/>one-command run, numbers in README"]
    R2["Pass: re-run within tolerance"]
  end

  style C1 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style C2 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style C3 fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
```

---

## Diagram 3 — Lift vs Forgetting (the eval dual)

**Type**: Comparison / measurement pair
**Purpose**: Why two evals are required. Lift proves steering worked; forgetting proves it was disciplined. Reporting only one is incomplete.
**Reading the diagram**: Left = the gain (domain held-out). Right = the cost (general benchmark). Both numbers go in the README.

```mermaid
flowchart LR
  Base["Base model"]
  FT["Fine-tuned model"]

  Base --> EL["Domain held-out eval<br/>score_base_domain"]
  FT --> EF["Domain held-out eval<br/>score_ft_domain"]
  EF -. lift .- EL

  Base --> GL["General benchmark (MMLU/GSM8K)<br/>score_base_general"]
  FT --> GF["General benchmark<br/>score_ft_general"]
  GF -. forgetting .- GL

  style Base fill:#14141f,stroke:#ffffff1f,color:#e4e4e8
  style FT fill:#14141f,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style EL fill:#08080c,stroke:#5eead44c,color:#e4e4e8
  style EF fill:#08080c,stroke:#5eead44c,color:#e4e4e8
  style GL fill:#08080c,stroke:#ffffff14,color:#9494a0
  style GF fill:#08080c,stroke:#ffffff14,color:#9494a0
```

---

## Diagram 4 — The Air-Gap Property (what "local" actually means)

**Type**: Boundary diagram
**Purpose**: The air-gap is a property of the whole pipeline, not a deployment feature. Every phase must be local; if any phase touches the network, the claim is false.
**Reading the diagram**: The pipeline runs inside the boundary. The boundary is the owner's hardware. No outbound calls in any phase.

```mermaid
flowchart TD
  subgraph AirGap["THE AIR-GAP — owner's hardware"]
    direction TB
    DP["Data prep<br/>(local open data + synthetic)"]
    TR["Training<br/>(QLoRA on local GPU/MPS)"]
    EV["Eval<br/>(local held-out + benchmark)"]
    EX["Export<br/>(local GGUF conversion)"]
    SV["Serve<br/>(Ollama / llama.cpp)"]
    DP --> TR --> EV --> EX --> SV
  end
  Net["The network<br/>(vendors, APIs, telemetry)"]

  AirGap -.no outbound calls in any phase.- Net

  style AirGap fill:#08080c,stroke:#5eead4,stroke-width:1.5px,color:#e4e4e8
  style DP fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style TR fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style EV fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style EX fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style SV fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style Net fill:#14141f,stroke:#ffffff1f,color:#9494a0
```

---

## Diagram 5 — The Evaluation Rubric

**Type**: Rubric matrix
**Purpose**: How a reviewer scores the submission. Five dimensions; HIPAA-safety is a gate (a 1 fails the submission regardless of total).
**Reading the diagram**: Each dimension scored 1-3. Passing = 12/15 with no dimension below 2, and HIPAA-safety not below 2.

```mermaid
flowchart TD
  subgraph Rubric["Evaluation rubric — 5 dimensions"]
    L["Domain lift<br/>held-out, defensible"]
    F["Forgetting control<br/>general benchmark reported"]
    S["Local serve<br/>GGUF loads, fine-tuned behavior, no telemetry"]
    R["Reproducibility<br/>pinned deps, one-command, numbers in README"]
    H["HIPAA-safety<br/>open/de-identified data, provenance documented"]
  end
  Gate["HIPAA-safety is a GATE<br/>score below 2 = fail, regardless of total"]
  Pass["Passing: 12/15+<br/>no dimension below 2"]

  Rubric --> Gate
  Gate --> Pass

  style L fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style F fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style S fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style R fill:#14141f,stroke:#5eead480,color:#e4e4e8
  style H fill:#14141f,stroke:#f08080,stroke-width:1.5px,color:#e4e4e8
  style Gate fill:#08080c,stroke:#f08080,stroke-dasharray: 4 2,color:#f08080
  style Pass fill:#08080c,stroke:#82e0aa,color:#82e0aa
```

---

## Validation notes

- All five diagrams use the course design system colors: `#14141f` panel fill, `#5eead4` accent for primary, `#f08080` for the danger/gate, `#82e0aa` for pass, `#ffffff1f` for secondary borders, `#e4e4e8` / `#9494a0` for text.
- Paste each into [Mermaid Live Editor](https://mermaid.live) to render. All use stable Mermaid syntax (`flowchart`) supported in current Mermaid (v10.4+).
- For the slide deck (artifact 03), these are rendered as static captures from Mermaid Live, inlined into reveal.js.