# techygarg/lattice architecture

> Architecture diagram of the GitHub repository techygarg/lattice, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techygarg/lattice
- Repository: https://github.com/techygarg/lattice

## Overview

#### Purpose and Runtime Model
Lattice is a repository-distributed framework of Markdown AI-agent skills, not an application service. It guides coding assistants through design, implementation, and review while persisting project context in a target project's `.lattice/` directory. Primary user entry points are chat commands supplied by installed skills, beginning with `/lattice-init`; local installation is via `tools/install.sh`.

Paths: `README.md`, `tools/install.sh`, `skills/molecules/lattice-init/SKILL.md`.

#### Canonical Skill Library
The canonical content is organized as composable skill tiers:
- **Atoms** enforce focused engineering disciplines.
- **Molecules** orchestrate multi-step delivery workflows using atoms.
- **Refiners** interview teams and create project-specific standards/templates.

These are declarative instruction packages consumed by an AI runtime; `SKILL.md` files are the behavior boundary, with references/assets supplying detailed rules and output templates.

Paths: `skills/atoms/architecture/SKILL.md`, `skills/molecules/design-blueprint/SKILL.md`, `skills/refiners/architecture-refiner/SKILL.md`.

#### Delivery Pipeline
The principal flow is requirements → design → implementation → review. `requirement-forge` produces feature specifications under the consuming project’s `.lattice/requirements/`; `design-blueprint` turns approved requirements and living context into a design; `code-forge` implements against that design and quality atoms; `review` evaluates changes and retains insights for later work. `bug-fix` and `refactor-safely` provide alternate defect and structural-change paths.

Paths: `skills/molecules/requirement-forge/SKILL.md`, `skills/molecules/code-forge/SKILL.md`, `skills/molecules/review/SKILL.md`.

#### Living Context and Initialization
`lattice-init` is the onboarding/control entry point for a target repository: it scans context, recommends refiners, and establishes `.lattice/config.yaml`. Refiners then capture architectural, DDD, clean-code, requirements, language, and review conventions. This separates Lattice’s reusable framework from per-project decisions and accumulating artifacts.

Paths: `skills/molecules/lattice-init/SKILL.md`, `skills/refiners/ddd-refiner/SKILL.md`, `docs/configuration.md`.

#### Architecture Discovery Boundary
For existing codebases, `architecture-compass` precedes feature work. It analyzes the repository and runs a structured judgment/interview process to establish an agreed architectural direction. The resulting guidance constrains subsequent requirements, design, and code skills rather than directly changing application code.

Paths: `skills/molecules/architecture-compass/SKILL.md`, `skills/molecules/architecture-compass/references/interview-guide.md`, `docs/architecture-compass.md`.

#### Distribution and Host Integrations
Lattice supports Claude Code, Cursor-compatible skill discovery, and Codex-compatible packaging. The root `skills/` tree is replicated/flattened into the Codex plugin package, while Claude/Cursor marketplaces expose plugin metadata. There is no backend, database, or required external operational service; execution depends on the host AI assistant and filesystem access to the target project.

Paths: `.claude-plugin/plugin.json`, `.agents/plugins/marketplace.json`, `plugins/lattice/.codex-plugin/plugin.json`.

#### Maintenance and Governance
`dev-skills/` contains a separate contributor-facing skill set for evolving Lattice itself, distinct from distributable end-user skills. Repository governance and automated security scanning protect the content supply chain.

Paths: `dev-skills/README.md`, `AGENTS.md`, `.github/workflows/security.yml`.

Main entry points: [`skills/molecules/requirement-forge/SKILL.md`](https://github.com/techygarg/lattice/blob/main/skills/molecules/requirement-forge/SKILL.md) (requirement-forge), [`skills/molecules/lattice-init/SKILL.md`](https://github.com/techygarg/lattice/blob/main/skills/molecules/lattice-init/SKILL.md) (lattice-init), [`.github/workflows/security.yml`](https://github.com/techygarg/lattice/blob/main/.github/workflows/security.yml) (Security scanning), [`skills/molecules/design-blueprint/SKILL.md`](https://github.com/techygarg/lattice/blob/main/skills/molecules/design-blueprint/SKILL.md) (design-blueprint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_library["Canonical Skill Library"]
  node_refiners["Refiners<br/>standards interviews<br/>[SKILL.md]"]
  node_ddd_refiner["DDD refiner<br/>domain standards<br/>[SKILL.md]"]
  node_atoms["Atoms<br/>engineering disciplines<br/>[SKILL.md]"]
end

subgraph group_delivery["Delivery Workflows"]
  node_design_blueprint["design-blueprint<br/>design molecule<br/>[SKILL.md]"]
  node_requirements["requirement-forge<br/>requirements molecule<br/>[SKILL.md]"]
  node_code_forge["code-forge<br/>implementation molecule<br/>[SKILL.md]"]
  node_review["review<br/>[SKILL.md]"]
  node_architecture_compass["architecture-compass<br/>discovery molecule<br/>[SKILL.md]"]
  node_compass_interview["Architecture interview guide<br/>judgment reference<br/>[interview-guide.md]"]
  node_alternate_paths["Bug fix &amp; safe refactor<br/>alternate molecules"]
end

subgraph group_target["Target Project Context"]
  node_init["lattice-init<br/>onboarding molecule<br/>[SKILL.md]"]
  node_project_context[(".lattice/ context<br/>project-local artifacts")]
end

subgraph group_distribution["Distribution &amp; Governance"]
  node_installer["Local installer<br/>shell installer<br/>[install.sh]"]
  node_claude_cursor["Claude/Cursor metadata<br/>host integration<br/>[plugin.json]"]
  node_codex_package["Codex plugin package<br/>host integration<br/>[plugin.json]"]
  node_dev_skills["Contributor skills<br/>maintenance skill set<br/>[README.md]"]
  node_security["Security scanning<br/>governance automation<br/>[security.yml]"]
end

node_host{{"Host AI assistant<br/>AI runtime"}}

node_installer -->|"installs for discovery"| node_claude_cursor
node_claude_cursor -->|"exposes skills"| node_host
node_codex_package -->|"packages skills"| node_host
node_host -->|"runs command"| node_init
node_init -->|"creates config and context"| node_project_context
node_init -->|"recommends"| node_refiners
node_refiners -->|"captures standards"| node_project_context
node_ddd_refiner -->|"captures domain conventions"| node_project_context
node_architecture_compass -->|"uses"| node_compass_interview
node_architecture_compass -->|"records architectural direction"| node_project_context
node_project_context -->|"constrains"| node_requirements
node_requirements -->|"writes specifications"| node_project_context
node_requirements -->|"approved requirements"| node_design_blueprint
node_project_context -->|"living context"| node_design_blueprint
node_design_blueprint -->|"approved design"| node_code_forge
node_atoms -->|"quality disciplines"| node_code_forge
node_code_forge -->|"changes"| node_review
node_review -->|"retains insights"| node_project_context
node_alternate_paths -->|"uses project standards"| node_project_context
node_security -.->|"scans distributable content"| node_claude_cursor
node_security -.->|"scans package"| node_codex_package
node_dev_skills -.->|"maintains governed content"| node_security

click node_installer "https://github.com/techygarg/lattice/blob/main/tools/install.sh"
click node_init "https://github.com/techygarg/lattice/blob/main/skills/molecules/lattice-init/SKILL.md"
click node_refiners "https://github.com/techygarg/lattice/blob/main/skills/refiners/architecture-refiner/SKILL.md"
click node_ddd_refiner "https://github.com/techygarg/lattice/blob/main/skills/refiners/ddd-refiner/SKILL.md"
click node_atoms "https://github.com/techygarg/lattice/blob/main/skills/atoms/architecture/SKILL.md"
click node_design_blueprint "https://github.com/techygarg/lattice/blob/main/skills/molecules/design-blueprint/SKILL.md"
click node_requirements "https://github.com/techygarg/lattice/blob/main/skills/molecules/requirement-forge/SKILL.md"
click node_code_forge "https://github.com/techygarg/lattice/blob/main/skills/molecules/code-forge/SKILL.md"
click node_review "https://github.com/techygarg/lattice/blob/main/skills/molecules/review/SKILL.md"
click node_architecture_compass "https://github.com/techygarg/lattice/blob/main/skills/molecules/architecture-compass/SKILL.md"
click node_compass_interview "https://github.com/techygarg/lattice/blob/main/skills/molecules/architecture-compass/references/interview-guide.md"
click node_claude_cursor "https://github.com/techygarg/lattice/blob/main/.claude-plugin/plugin.json"
click node_codex_package "https://github.com/techygarg/lattice/blob/main/plugins/lattice/.codex-plugin/plugin.json"
click node_dev_skills "https://github.com/techygarg/lattice/blob/main/dev-skills/README.md"
click node_security "https://github.com/techygarg/lattice/blob/main/.github/workflows/security.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_refiners,node_ddd_refiner,node_atoms toneBlue
class node_design_blueprint,node_requirements,node_code_forge,node_review,node_architecture_compass,node_compass_interview,node_alternate_paths toneAmber
class node_init,node_project_context toneMint
class node_installer,node_claude_cursor,node_codex_package,node_dev_skills,node_security toneRose
class node_host toneNeutral
```

## Components

### Canonical Skill Library

Reusable declarative instruction packages.

- [Refiners](https://github.com/techygarg/lattice/blob/main/skills/refiners/architecture-refiner/SKILL.md): standards interviews · Create project-specific conventions and templates. · `skills/refiners/architecture-refiner/SKILL.md`
- [DDD refiner](https://github.com/techygarg/lattice/blob/main/skills/refiners/ddd-refiner/SKILL.md): domain standards · `skills/refiners/ddd-refiner/SKILL.md`
- [Atoms](https://github.com/techygarg/lattice/blob/main/skills/atoms/architecture/SKILL.md): engineering disciplines · Focused rules consumed by workflow skills. · `skills/atoms/architecture/SKILL.md`

### Delivery Workflows

Feature and change delivery paths.

- [design-blueprint](https://github.com/techygarg/lattice/blob/main/skills/molecules/design-blueprint/SKILL.md): design molecule · Turns approved requirements and context into a design. · `skills/molecules/design-blueprint/SKILL.md`
- [requirement-forge](https://github.com/techygarg/lattice/blob/main/skills/molecules/requirement-forge/SKILL.md): requirements molecule · Produces feature specifications in project context. · `skills/molecules/requirement-forge/SKILL.md`
- [code-forge](https://github.com/techygarg/lattice/blob/main/skills/molecules/code-forge/SKILL.md): implementation molecule · Implements an approved design using quality atoms. · `skills/molecules/code-forge/SKILL.md`
- [review](https://github.com/techygarg/lattice/blob/main/skills/molecules/review/SKILL.md): review molecule · Evaluates changes and retains insights. · `skills/molecules/review/SKILL.md`
- [architecture-compass](https://github.com/techygarg/lattice/blob/main/skills/molecules/architecture-compass/SKILL.md): discovery molecule · Establishes agreed direction for existing codebases. · `skills/molecules/architecture-compass/SKILL.md`
- [Architecture interview guide](https://github.com/techygarg/lattice/blob/main/skills/molecules/architecture-compass/references/interview-guide.md): judgment reference · `skills/molecules/architecture-compass/references/interview-guide.md`
- **Bug fix & safe refactor**: alternate molecules · Defect and structural-change workflows.

### Target Project Context

Project-local decisions and accumulated artifacts.

- [lattice-init](https://github.com/techygarg/lattice/blob/main/skills/molecules/lattice-init/SKILL.md): onboarding molecule · Chat-command entry point that establishes project context. · `skills/molecules/lattice-init/SKILL.md`
- **.lattice/ context**: project-local artifacts · Configuration, requirements, standards, and retained insights.

### Distribution & Governance

Installation, host packaging, and content protection.

- [Local installer](https://github.com/techygarg/lattice/blob/main/tools/install.sh): shell installer · `tools/install.sh`
- [Claude/Cursor metadata](https://github.com/techygarg/lattice/blob/main/.claude-plugin/plugin.json): host integration · Plugin and marketplace discovery metadata. · `.claude-plugin/plugin.json`
- [Codex plugin package](https://github.com/techygarg/lattice/blob/main/plugins/lattice/.codex-plugin/plugin.json): host integration · Flattened replication of the root skill tree. · `plugins/lattice/.codex-plugin/plugin.json`
- [Contributor skills](https://github.com/techygarg/lattice/blob/main/dev-skills/README.md): maintenance skill set · Separate skills for evolving Lattice itself. · `dev-skills/README.md`
- [Security scanning](https://github.com/techygarg/lattice/blob/main/.github/workflows/security.yml): governance automation · Protects the skill content supply chain. · `.github/workflows/security.yml`

### Other components

- **Host AI assistant**: AI runtime · Executes skills with target filesystem access.

## Connections

- Local installer → Claude/Cursor metadata: installs for discovery
- Claude/Cursor metadata → Host AI assistant: exposes skills
- Codex plugin package → Host AI assistant: packages skills
- Host AI assistant → lattice-init: runs command
- lattice-init → .lattice/ context: creates config and context
- lattice-init → Refiners: recommends
- Refiners → .lattice/ context: captures standards
- DDD refiner → .lattice/ context: captures domain conventions
- architecture-compass → Architecture interview guide: uses
- architecture-compass → .lattice/ context: records architectural direction
- .lattice/ context → requirement-forge: constrains
- requirement-forge → .lattice/ context: writes specifications
- requirement-forge → design-blueprint: approved requirements
- .lattice/ context → design-blueprint: living context
- design-blueprint → code-forge: approved design
- Atoms → code-forge: quality disciplines
- code-forge → review: changes
- review → .lattice/ context: retains insights
- Bug fix & safe refactor → .lattice/ context: uses project standards
- Security scanning → Claude/Cursor metadata: scans distributable content
- Security scanning → Codex plugin package: scans package
- Contributor skills → Security scanning: maintains governed content
