Skip to main content
Free CLI for existing repos

Keep AI Coding Grounded in the Repo You Already Have

Lattice Core is the guardrails layer for modern AI coding. It reads your live stack, writes reusable repo instructions, adds one-command verification and security workflows, and gives fast agents fewer ways to hallucinate their way into your main branch.

Quick Start
$ npx latticeai

Start in the repo you already have. Core detects the project, generates the rules pack, and wires up the quality loop around it.

.cursor/rules.mdCLAUDE.md.github/copilot-instructions.mdverify + release-checksecurity-scandrift + diff + status

Instruction files now matter as much as prompts

Modern coding tools rely on repo-level instructions, not just whatever you typed in the last chat window.

Fast agents create fast drift

When models can edit whole repos in minutes, you need one-command verification and visible drift checks.

Version mismatch still burns the most time

The fastest way to waste a session is letting the model guess packages, APIs, or config that your repo does not have.

Built for current AI coding habits

What Lattice Core Does Well Right Now

The best Core story is not "it does everything." It is "it makes the repo legible to fast-moving coding agents, then keeps the feedback loop tight."

Detects the repo you actually have

Lattice reads your current project config and dependency versions so assistant guidance starts from the installed stack, not a generic template.

Writes reusable assistant rules

Fresh Core installs write `AGENTS.md`, `docs/rules/codex.md`, `.cursor/rules.md`, `.cursor/rules/lattice-core.mdc`, `CLAUDE.md`, `.claude/settings.json`, and Copilot instruction files so mixed-agent teams share one repo contract.

Adds a real quality loop

Use `verify`, `release-check`, and `security-scan` to catch bad edits before fast-moving agent sessions turn into cleanup work.

Makes repo health visible

Status, drift, diff, and progress commands give you an explicit view of what changed and what still needs attention.

Updates without trashing your edits

Use `lattice update` when you want the generated baseline refreshed without blowing away the project-specific guidance you added later.

Supports clean-start bundle flows too

Beyond existing repos, Core can generate or apply supported bundle output for clean Next.js and Expo workflows when you want a faster starting point.

Includes reusable playbooks

Core also ships six prompt templates for feature work, bugfixes, refactors, tests, polish, and security reviews.

Keeps release hygiene close to the code

CI helpers, PR templates, commit message scaffolding, and verification commands make the human workflow stronger too.

Command Map for the Current Public CLI

This is the surface worth teaching. It covers the commands you will actually use in an active repo instead of a giant wall of stale wish-list copy.

Setup and Scaffolding

npx latticeai

Interactive setup for the repo you are already in.

npx latticeai setup --projectType nextjs --preset pro

Non-interactive setup when you already know the target stack and strictness.

npx latticeai init --detect

Create config only, without generating or applying the pack yet.

npx latticeai generate --output ./lattice-pack

Generate the pack into a folder so you can inspect it before applying.

npx latticeai apply --preview

Preview what a generated pack would change in the current project.

Quality and Safety

npx latticeai verify

Run the standard verification checks for the current preset.

npx latticeai verify --full

Force the full lint, typecheck, test, and build path.

npx latticeai verify-rules

Check whether the generated rules still match the expected stack.

npx latticeai release-check --fix

Run the pre-release checklist and auto-fix the issues it safely can.

npx latticeai security-scan --fix

Scan for exposed secrets and fix the obvious cases before they spread.

Visibility and Maintenance

npx latticeai status

See configuration state and compliance at a glance.

npx latticeai drift

Detect where the repo has drifted from the generated baseline.

npx latticeai diff

Show what changed since the last generation pass.

npx latticeai update --preview

See what a rule refresh would do before writing anything.

npx latticeai check

Ask whether a newer Lattice update is available.

Bundles and Helpers

npx latticeai setup --bundle nextjs-saas

Apply a supported bundle when you want an opinionated starter path.

npx latticeai bundle diff

Preview bundle regeneration changes before committing to them.

npx latticeai bundle rollback

Revert to the previous bundle version if the new output is not right.

npx latticeai ci --dry-run

Preview the CI workflow Lattice would generate for your provider.

npx latticeai doctor --agents

Validate the AGENTS, Cursor, Claude, and Copilot surfaces Core expects in the repo.

Latest LLM coding note

Cursor's current docs center `.cursor/rules` and also support a root `AGENTS.md` alternative. Claude Code officially uses `CLAUDE.md` plus project settings files. GitHub Copilot supports repository-wide and path-specific instruction files in `.github/`. Codex now spans IDE, CLI, web, mobile, and CI/CD workflows.

Core now writes the modern shared surfaces directly, including `AGENTS.md`, a Codex rules doc, a Cursor `.mdc` rule, legacy `.cursor/rules.md`, Claude settings, and GitHub Copilot instructions. Project Builder is still the stronger fit when you want the repo plan and generated startup architecture, not just the guardrail layer.

Recommended daily loop
npx latticeai
npx latticeai verify --watch
npx latticeai doctor --agents
npx latticeai security-scan
npx latticeai update --preview
Starting from zero?

Use Core when the repo already exists. Use Project Builder when you want the plan, the generated stack, and the broader Lattice pack for a new build.

What Core Writes Today

The exact output depends on whether you are hardening an existing repo or using a supported clean-start flow. That distinction matters, so the page should say it plainly.

Existing repo guardrails

These are the pieces fresh public Core installs write today when the goal is to harden an active project instead of inventing a new architecture.

AGENTS.md
docs/rules/codex.md
.cursor/rules.md
.cursor/rules/lattice-core.mdc
CLAUDE.md
.claude/settings.json
.github/copilot-instructions.md
.github/instructions/lattice-core.instructions.md
.lattice/prompts/*
package.json verify commands

Supported bundle or clean-start output

When you use bundle or clean-start flows, Core can also generate starter app files and config for supported stacks instead of just the rules pack.

app/layout.tsx
app/page.tsx
app/page.test.tsx
tsconfig.json
eslint.config.mjs
jest.config.js
next.config.js
Helpful if you work across agent surfaces

Core now writes the repo instruction pack for you

Cursor, Codex, and terminal agents increasingly recognize root-level instructions. Core now gives you that entry point out of the box, plus the deeper `docs/rules/codex.md` guide, Cursor/Claude companion files, and GitHub Copilot repo instructions. Keep edits to the generated baseline deliberate and use `update --preview` when you want to refresh it.

Read AGENTS.md first.
Follow docs/rules/codex.md for the deep workflow.
Use .cursor/rules/lattice-core.mdc in Cursor.
Use .github/copilot-instructions.md in Copilot.
Run npm run verify before marking work complete.

Frequently Asked Questions

Is Lattice Core still free?

Yes. Core remains the free CLI for adding guardrails to an existing repo. The paid product is Project Builder for new-project planning and broader generated output.

What kind of repos is Core best for?

Core is strongest on JavaScript and TypeScript repos where package.json gives Lattice enough signal to pin versions, scripts, and framework expectations. Next.js and Expo are the most explicit supported setup paths in the current CLI.

Does Core generate AGENTS.md, Copilot, and Codex-specific files today?

Yes. Fresh Core installs now write `AGENTS.md`, `docs/rules/codex.md`, `.cursor/rules/lattice-core.mdc`, the legacy `.cursor/rules.md` compatibility surface, `CLAUDE.md`, `.claude/settings.json`, `.github/copilot-instructions.md`, and `.github/instructions/lattice-core.instructions.md`.

Can I still use Lattice in Codex-heavy teams?

Yes. Core now ships a root `AGENTS.md`, the deeper Codex rules doc, and GitHub Copilot instruction files, so mixed-agent teams can keep one generated instruction baseline and use `verify`, `drift`, `doctor --agents`, and `security-scan` as the shared quality loop.

Will Lattice overwrite my custom rules?

The intent is the opposite. Use update and preview flows so generated guidance can refresh while your repo-specific additions stay readable and deliberate.

When should I use Project Builder instead?

Use Project Builder when you are starting from scratch, want a `PROJECT_GUIDE.md`, or want the planned product/build package instead of hardening an existing repo in place.

Need the details?

Read the focused Core guide

The updated guide covers setup paths, the current command map, what gets generated, and how to use Core in mixed-agent teams without the stale noise.

Read Full Guide
Starting a new build?

Use Project Builder when the repo itself needs to be generated

Project Builder is the better Lattice product when you want the project plan, supported scaffold output, and a generated startup repo for a brand-new build.

Learn About Project Builder