Architect

Your code compiles.
Is it in the right place?

An architecture linter for Next.js App Router projects written in TypeScript. Eleven deterministic rules, no model call, exit 1 on a violation.

$npm install -g @levironexe/architect
Please install architect https://leviron-architect.vercel.app/llms.txt

One command. No setup.

No install, no config file, no API key. Architect parses your TypeScript locally and checks it against the Next.js App Router blueprint. Every rule is deterministic — there is no model call, and nothing leaves your machine.

See the rules

Rescue existing projects.

Architect is for the developer who already has a messy project. It's the ER room, not the gym.

1

Detect

Walks the project directory, respecting .gitignore, and detects the stack from package.json and file conventions. Nothing leaves your machine.

2

Check

Parses every TypeScript file and evaluates the blueprint's eleven rules against it - imports, directives, calls and layer boundaries. Deterministic, no model call.

3

Report

Prints each violation with its file, line, rule id and the move that fixes it. Exits 1 on anything critical, so it fails CI as-is.

The Spaghetti Point.

“Vibe-coded projects accumulate technical debt fast. AI-generated code optimizes for ‘make it work,’ not ‘make it maintainable.’”

Nobody installs stack-specific architectural knowledge into a coding agent for an existing project, automatically. Architect fills that gap.

CapabilitySonar / ESLintCLAUDE.md / .cursorrulesArchitect
File-level code quality checks--
Custom rule mechanism--
Existing codebase architecture scan--
Stack auto-detection--
Stack-specific architecture blueprint--
Stack-specific best practices--
Anti-pattern detection with fix examples--
Auto-generated assistant instructions--
Refactor-phase guidance for messy projects--

Three in your terminal.
Three in your agent.

Architect is a CLI you run and a set of skills your agent runs. The CLI finds the violations and gates them; the skills give the agent a plan to fix them, built from the same blueprint.

The blueprint is data, so adding a rule means writing YAML, not TypeScript.

In your terminalThe CLI. Deterministic, no model call.
architect check .

Report

Parses every TypeScript file and evaluates the blueprint's rules against it. Prints each violation with its file, line, rule id and the move that fixes it, then exits 1 on anything critical so it fails CI as-is.

--json--list-rules--ignore <rules>--baseline
architect init .

Install

Detects the stack from package.json and file conventions, then writes the three slash commands into .claude/skills/, rendered from that stack's blueprint so the agent gets your architecture, not generic advice.

--skill <id>--update
architect verify . --strict

Hold the line

Re-checks the project against .architect/baseline.json and fails when the violation count rises. Also checks TypeScript compilation, import resolution and circular dependencies. Existing debt stays; new debt does not.

--phase <n>--json
In your coding agentInstalled by init. The agent is the intelligence.
/architect-plan

Roadmap generation

The agent walks the codebase, reads the stack blueprint that init installed, compares your current structure against it, and writes a phased refactoring roadmap to .architect/plan.md.

/architect-refactor

Guided execution

The agent reads .architect/plan.md and executes each phase step by step. After every phase it runs architect verify . --phase N --strict, stops on a failure, and pauses for your confirmation before continuing.

/architect-catchup

Skill refresh

After you add new code, the agent re-runs architect init . --update so the installed guidance reflects the current codebase, not the state it was in when you first ran init.

Eleven rules.
Every one of them deterministic.

No model call, no heuristics, no score out of a hundred. Ten are detect: blocks in the stack blueprint, matched against a real parse of your code; the eleventh comes from the directories the blueprint requires. Run architect check --list-rules to print this list from the blueprint itself.

criticaldirect_db_in_pageA database client is imported in page.tsx or layout.tsx — directly, or one hop away through a workspace package or local file
criticaldirect_db_in_routeA database client is imported in route.ts
criticalleaked_server_secretA 'use client' file reads a non-NEXT_PUBLIC_ env var
criticalillegal_importcomponents/ imports from app/
warninguse_client_everywhere'use client' sits on a layout
warningclient_data_fetching_by_defaultA client component loads data with a GET fetch inside useEffect
warningserver_action_throwsA Server Action throws instead of returning a result
warningscattered_process_envprocess.env is read outside lib/config.ts, within the app's own layers
warningalert_for_errorsalert() is used to show an error
warningoversized_extractionA file exceeds 300 lines (test files exempt)
warningmissing_layerA required directory from the blueprint does not exist

One further rule, auth_mechanism_mismatch, ships in the blueprint as guidance for a coding agent but is never reported by check — it needs judgement a static matcher would get wrong. Silence any rule with --ignore or an architect-ignore-next-line comment.