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.
Start in the repo you already have. Core detects the project, generates the rules pack, and wires up the quality loop around it.
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.
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 latticeaiInteractive setup for the repo you are already in.
npx latticeai setup --projectType nextjs --preset proNon-interactive setup when you already know the target stack and strictness.
npx latticeai init --detectCreate config only, without generating or applying the pack yet.
npx latticeai generate --output ./lattice-packGenerate the pack into a folder so you can inspect it before applying.
npx latticeai apply --previewPreview what a generated pack would change in the current project.
Quality and Safety
npx latticeai verifyRun the standard verification checks for the current preset.
npx latticeai verify --fullForce the full lint, typecheck, test, and build path.
npx latticeai verify-rulesCheck whether the generated rules still match the expected stack.
npx latticeai release-check --fixRun the pre-release checklist and auto-fix the issues it safely can.
npx latticeai security-scan --fixScan for exposed secrets and fix the obvious cases before they spread.
Visibility and Maintenance
npx latticeai statusSee configuration state and compliance at a glance.
npx latticeai driftDetect where the repo has drifted from the generated baseline.
npx latticeai diffShow what changed since the last generation pass.
npx latticeai update --previewSee what a rule refresh would do before writing anything.
npx latticeai checkAsk whether a newer Lattice update is available.
Bundles and Helpers
npx latticeai setup --bundle nextjs-saasApply a supported bundle when you want an opinionated starter path.
npx latticeai bundle diffPreview bundle regeneration changes before committing to them.
npx latticeai bundle rollbackRevert to the previous bundle version if the new output is not right.
npx latticeai ci --dry-runPreview the CI workflow Lattice would generate for your provider.
npx latticeai doctor --agentsValidate the AGENTS, Cursor, Claude, and Copilot surfaces Core expects in the repo.
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.
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.
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.
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.
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.
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 GuideUse 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