Skip to content
Development
Skill

/architecture-compass

Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on current architectural state and recommended direction, and produces a shareable insights document. Scoped to one repository, module, or folder. Does not

From plugin
lattice
21127 skills1 agent

Claude Code

$ npx -y skills add techygarg/lattice --skill architecture-compass --agent claude-code

SKILL.md

architecture-compass.SKILL.md
name: architecture-compass
description: "Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on current architectural state and recommended direction, and produces a shareable insights document. Scoped to one repository, module, or folder. Does not execute transformation — it orients. Use when the user says 'assess my codebase architecture', 'what direction should my codebase go', 'architecture compass', 'understand my architecture', 'audit architecture drift', 'architectural assessment', or 'help me understand what is wrong with my codebase'."

Architecture Compass

Required Skills

Read, apply:

1. `framework:knowledge-priming` -- Load codebase context: language, framework, structure, conventions (always) 2. `framework:architecture` -- Architectural audit lens and recommended direction guardrails (always) 3. `framework:domain-driven-design` -- Strategic DDD only: bounded contexts, domain seams (conditional: only when domain complexity warrants it) 4. `framework:collaborative-judgment` -- Surface judgment calls during co-design rounds (always)

Additional Instructions

**STOP: Before Step 1, read `additional_instructions.architecture_compass` (one line or a list) from `.lattice/config.yaml`.** No file or no key → skip silently.

When lines are found:

1. Show them verbatim under "Additional instructions (from config):". 2. **Highest priority — apply them for the whole session, including on resume.** On any conflict with anything else in this skill — steps, gates, STOP rules — or with its Required Skills, standards documents, or operational learnings, the config line wins.

Workflow

Step 1: Load Existing Context

**Check for an existing insights document first.** If `.lattice/insights/architecture.md` already exists:

  • Read it. Check the Session Status table using these three states:
  • `pending` — row exists, no content written yet
  • `in-progress` — content exists in the section but no agreed date recorded
  • `✅ agreed` — content exists and date is recorded
  • Resume from the earliest `pending` or `in-progress` phase. For `in-progress` phases: present the existing content for re-confirmation rather than regenerating it.
  • **In-progress without content:** If Current Architecture is `in-progress` but the document has no Current Architecture content (the previous session's scan context was lost), re-run Step 2 scan before presenting.
  • **Staleness check:** If the most recent `✅ agreed` date in the Session Status table is older than 30 days, run a lightweight re-scan (Steps 2.1 and 2.6 only — tree + imports). If material structural changes are detected, present them and ask whether Current Architecture needs revision before proceeding.
  • Do not re-scan if Current Architecture is already `✅ agreed` and the staleness check passes.
  • Tell the user what was found and which phase the session resumes from.

If no existing document: proceed from Step 2.

Check for `.lattice/config.yaml`. Load `knowledge-base.md` and `architecture.md` from `.lattice/standards/` if they exist — these shape both the audit lens and the recommended direction proposal.

If no `.lattice/` config exists, offer to run `lattice-init` first. If declined, infer defaults from the scan.

---

Step 2: Silent Scan — Architectural Signal Extraction

Do not ask any questions yet. Scan first, form a hypothesis, then ask only what code cannot reveal.

**Confirm scope before scanning.** If the working directory is a monorepo or contains multiple independent services/modules, ask: *"Which service or module should this assessment focus on?"* Do not scan the full monorepo root — assess one bounded scope at a time. If the user requests the full monorepo: explain that a single insights document cannot meaningfully capture many independent architectures. Offer: (1) assess the shared infrastructure/platform layer as one scope, (2) produce a lightweight index of all services with one-line architecture classification, then deep-assess the 2–3 most painful ones. If the user still insists, proceed with a service-by-service scan at reduced depth (Steps 2.1 + 2.6 per service).

This is signal extraction, not a full read. **Target: 15–25 file reads** (view/open operations). Grep, glob, and directory listings do not count against this budget — they are structural reconnaissance, not deep reads. Stop reading a module once its responsibility, dependencies, and layer fit are clear.

**Scanning protocol — execute in order:**

1. **Directory tree** (3 levels deep) — intended organization, layer structure, naming conventions. Do this before opening any file.

2. **Dependency manifests** — `package.json`, `pom.xml`, `go.mod`, `requirements.txt`. Language, framework, key external dependencies.

3. **Architecture documents** — `README.md`, `ARCHITECTURE.md`, `docs/`, ADR directories. The intended architecture often lives here — the gap between intention and reality is itself a finding.

4. **Archaeology** — before analysing flows, reduce scope:

  • Dead code (no callers) — candidates for deletion, but verify no side effects first: static initializers, scheduled tasks, event listeners, and framework hooks are invisible to call-graph analysis
  • Duplicate functionality — two implementations of the same concept, must reconcile before any change
  • Implicit coupling — shared mutable state, globals, ambient context, thread-locals
  • Hidden integration points — outbound calls to external systems in unexpected places

5. **Seam identification and viability** — natural boundaries where one side can change without the other knowing:

  • Domain seams (distinct business concepts), technical seams (I/O vs. business logic), team seams, temporal seams
  • For each seam: assess viability — how many callers cross it? Cheap seams become first moves.

6. **Import and dependency patterns** — grep import statements across all source files. Do not open full bodies. Reveals

Read more
@techygarg
Ships withlattice

Composable AI skills that teach assistants structured thinking — design-first, context-aware, and architecture-guided.

21127 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
211
Star history of techygarg/lattice on GitHub, a chart by star-history.com

Other skills on lattice.

architecture-refiner

architecture-refiner

Facilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles:…

@techygarg@techygargInstall Skill
architecture

architecture

Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode).…

@techygarg@techygargInstall Skill
bug-fix

bug-fix

Investigate, reproduce, and safely fix a bug with regression protection. Composes context, diagnosis, architecture, code quality,…

@techygarg@techygargInstall Skill
clean-code-refiner

clean-code-refiner

Facilitate a structured conversation to define clean code principles for a repository. Produces a formal clean-code.md document…

@techygarg@techygargInstall Skill
clean-code

clean-code

Apply clean code principles when generating or modifying implementation code. Enforces function focus, naming clarity, complexity…

@techygarg@techygargInstall Skill
code-forge

code-forge

Generate implementation code from an approved design blueprint or verbal requirements. Composes context anchoring, architecture,…

@techygarg@techygargInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react3d252k
@facebook@facebookInstall Skill

Questions about architecture-compass.

Which coding agents can use architecture-compass?
architecture-compass installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.