---
title: "What is Lattice?"
canonical: https://salahmyn.me/lattice/
lang: en
---

# What is Lattice?

> A deterministic knowledge graph for AI-written code.

Lattice is a deterministic knowledge graph for AI-written code. It ties every line back to the feature it serves, and the requirement that asked for that feature. It is not the Lattice HR platform. This one is a tool Salah Al-Nawah is building in the open, and writing down as he goes.

## The problem it solves

AI writes code fast. Nothing keeps track of *why* each line exists, which feature it belongs to, or whether it's still needed once the feature changes. You end up with a codebase nobody can vouch for: plausible, working, and impossible to reason about.

Lattice fixes the bookkeeping. Every artifact is a node, a requirement, a feature, an entry point, a file, a function, and the links between them are recorded facts, not a model's guess. That's the deterministic part. Ask "which code serves this requirement?" and you get an answer you can trust, computed from the graph, not inferred on the spot.

## What it gives you

- **A traceability matrix.** Every requirement maps to the features that satisfy it, and every feature to the code that implements it. Both directions, on demand.
- **A real definition of dead code.** Code with no path from any entry point (route, CLI command, cron job, queue worker) is dead, provably, not by vibes.
- **Governed change.** Reversing a decision is a transaction with provenance, not a silent edit. The graph remembers what changed and why.
- **Context for machines.** The same graph that helps a new hire is what an agent reads before it writes a line.

## The series, in order

1. [The Trap of Vibe Coding: Is There a Better Way to Manage AI-Generated Code?](https://salahmyn.me/blog/trap-of-vibe-coding/) ([Markdown](https://salahmyn.me/blog/trap-of-vibe-coding.md))
2. [Constraints Are Free for Machines (I Think)](https://salahmyn.me/blog/constraints-free-machines/) ([Markdown](https://salahmyn.me/blog/constraints-free-machines.md))
3. [Reality Check: 1,900 Files Will Not Annotate Themselves](https://salahmyn.me/blog/reality-check-1900-files/) ([Markdown](https://salahmyn.me/blog/reality-check-1900-files.md))
4. [Features Say What Code Means. Nothing Says Who Can Reach It.](https://salahmyn.me/blog/entry-points/) ([Markdown](https://salahmyn.me/blog/entry-points.md))
5. [Nobody Believes a JSON File](https://salahmyn.me/blog/nobody-believes-json/) ([Markdown](https://salahmyn.me/blog/nobody-believes-json.md))
6. [The Layer I Was Avoiding: Why Does Any of This Exist?](https://salahmyn.me/blog/requirements-layer/) ([Markdown](https://salahmyn.me/blog/requirements-layer.md))
7. [The Question the Whole Stack Was Built to Ask](https://salahmyn.me/blog/question-the-stack-was-built-to-ask/) ([Markdown](https://salahmyn.me/blog/question-the-stack-was-built-to-ask.md))
8. [If Constraints Are Free, Which Constraints?](https://salahmyn.me/blog/if-constraints-are-free-which-constraints/) ([Markdown](https://salahmyn.me/blog/if-constraints-are-free-which-constraints.md))
9. ["Done" Is Not One Thing](https://salahmyn.me/blog/done-is-not-one-thing/) ([Markdown](https://salahmyn.me/blog/done-is-not-one-thing.md))
10. [I Changed My Mind on Purpose, to See What Would Break](https://salahmyn.me/blog/changed-my-mind-on-purpose/) ([Markdown](https://salahmyn.me/blog/changed-my-mind-on-purpose.md))
11. [Cleared the Bar, or Lowered It? I Wrote the Theory Down](https://salahmyn.me/blog/cleared-the-bar-or-lowered-it/) ([Markdown](https://salahmyn.me/blog/cleared-the-bar-or-lowered-it.md))
