Best for
- Use when the user says 'assess my codebase architecture', 'what direction should my codebase go', 'architecture compass', 'understand my architecture', 'audit architecture drift', 'archit
techygarg/lattice/skills/molecules/architecture-compass/SKILL.md
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', 'archit
Decision brief
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.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/techygarg/lattice --skill "skills/molecules/architecture-compass"Inspect the Agent Skill "architecture-compass" from https://github.com/techygarg/lattice/blob/75b7e0728587f2e822e8cdbe11583a6f9a38a4b3/skills/molecules/architecture-compass/SKILL.md at commit 75b7e0728587f2e822e8cdbe11583a6f9a38a4b3. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
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…
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…
Do not ask any questions yet. Scan first, form a hypothesis, then ask only what code cannot reveal.
Read references/interview-guide.md. Apply the four-act arc, question bank per act, answer interpretation table, conversation principles, and red flags from that document.
Present the architectural snapshot from the scan. Goal: shared, accurate map — not a critique.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
`framework:knowledge-priming` -- Load codebase context: language, framework, structure, conventions (always)The documentation asks the agent to read local files, directories, or repositories.
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 moduleThe documentation asks the agent to create, modify, or delete local files.
Produce `.lattice/insights/architecture.md`. Create `.lattice/insights/` directory if it does not exist.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 170 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Read, apply:
framework:knowledge-priming -- Load codebase context: language, framework, structure, conventions (always)framework:architecture -- Architectural audit lens and recommended direction guardrails (always)framework:domain-driven-design -- Strategic DDD only: bounded contexts, domain seams (conditional: only when domain complexity warrants it)framework:collaborative-judgment -- Surface judgment calls during co-design rounds (always)Check for an existing insights document first. If .lattice/insights/architecture.md already exists:
pending — row exists, no content written yetin-progress — content exists in the section but no agreed date recorded✅ agreed — content exists and date is recordedpending or in-progress phase. For in-progress phases: present the existing content for re-confirmation rather than regenerating it.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.✅ 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.✅ agreed and the staleness check passes.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.
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:
Directory tree (3 levels deep) — intended organization, layer structure, naming conventions. Do this before opening any file.
Dependency manifests — package.json, pom.xml, go.mod, requirements.txt. Language, framework, key external dependencies.
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.
Archaeology — before analysing flows, reduce scope:
Seam identification and viability — natural boundaries where one side can change without the other knowing:
Import and dependency patterns — grep import statements across all source files. Do not open full bodies. Reveals dependency direction, load-bearing modules, layer violations cheaply.
Entry points — 3–5 files: routes, controllers, CLI handlers, event consumers. Reveals outermost layer.
Interface and contract files — interfaces, abstract classes, ports. Reveals intended boundaries, whether followed or not.
One representative file per top-level module — confirm responsibility, catch what import grep missed.
Stop. Form the hypothesis:
If a module remains unclear after Step 9, read one additional file from it. This is the only scan extension permitted.
If the scan produces no meaningful architectural signal — fewer than 3 distinct modules, no dependency violations, no seams, or the codebase is clearly early-stage (new repo, mostly generated code, flat structure) — surface this before the interview: "This codebase has no architectural complexity to assess — fewer than 3 modules, no dependency violations, and no identifiable seams. This is either early-stage or intentionally simple. /design-blueprint may be more appropriate if you're establishing architecture from scratch. Continue the assessment anyway?" If the user confirms, proceed. If not, end the session.
Skip entirely: full method implementations, test files, generated code, vendor directories, migration files, static assets.
Read references/interview-guide.md. Apply the four-act arc, question bank per act, answer interpretation table, conversation principles, and red flags from that document.
If the user explicitly declines the interview ("just analyze the code", "don't ask me questions"): "The recommended direction will be based solely on code signals without team context. It may miss delivery constraints, team topology, or unstated goals. Proceed?" If confirmed, skip to Step 4. Flag the Team Vision section in the insights document as "inferred, not confirmed."
STOP: Act 3 answers are architectural inputs, not soft context. The recommended direction in Step 5 must visibly respond to what the team said in Act 3. Consult the answer interpretation table in references/interview-guide.md before forming the recommendation.
Present the architectural snapshot from the scan. Goal: shared, accurate map — not a critique.
Present:
graph TD
[ActualEntryLayer] --> [ActualServiceLayer]
[ActualServiceLayer] --> [ActualDataLayer]
[ActualServiceLayer] --> [ActualDomainLayer]
[ActualDomainLayer] --> [ActualDataLayer]
style [ActualDataLayer] fill:#f96
If the scan findings and the interview answers contradict each other — e.g., scan shows no layers but team described having clean architecture — present both explicitly before asking for confirmation: "The scan shows [X]. You described [Y]. Is there a gap between intent and current implementation, or did I misread something?" Resolve the contradiction before advancing.
Ask specifically: "Does this map accurately reflect how the codebase is structured today? What's missing, wrong, or intentional that I've marked as a violation?"
If the map has not converged after 3 correction rounds, use framework:collaborative-judgment to surface the specific unresolved points and ask the user to make a decision rather than continuing to iterate.
STOP: Do not advance to Step 5 until the user explicitly confirms the current architecture map.
Use framework:collaborative-judgment for genuine ambiguities in the current-state read.
Propose a recommended architectural direction tailored to this codebase — not a generic template.
Carry drift/mismatch forward:
Minimum viable direction: Propose the simplest structure that resolves the stated pain. Test: can the team take the first move this week? A direction that only pays off after six months of work is the wrong direction.
Vision-guardrail tension: If the team's vision (Act 3) is structurally incompatible with a guardrail (Act 4), surface the tension explicitly before proposing: "Your goal of [X] requires changes to [Y], which you've marked as off-limits. The recommended direction will work around this constraint — here's how and what it costs in terms of the vision." Do not silently compromise — name the tradeoff.
Apply framework:architecture guardrails. The non-negotiable rule: domain has zero dependency on infrastructure — infrastructure depends on domain.
Apply framework:domain-driven-design (strategic only) when: multiple distinct business capabilities exist, different parts change at different rates, or different teams own different areas. When none apply, skip DDD.
The proposal covers:
Present:
graph TD
[ActualAPILayer] --> [ActualApplicationLayer]
[ActualApplicationLayer] --> [ActualDomainLayer]
[ActualInfraLayer] --> [ActualDomainLayer]
[ActualAPILayer] --> [ActualInfraLayer]
style [ActualDomainLayer] fill:#6f9
framework:knowledge-priming and .lattice/standards/language-idioms.md (if it exists) to ensure layer names and file naming conventions match this codebase's language and framework — not a generic OOP template. Not exhaustive — enough to make the structure unambiguous.Ask: "Does this direction address the pain you described? Are there constraints or preferences that should change this proposal?"
STOP: Do not advance to Step 6 until the user explicitly confirms the recommended direction.
If the direction has not converged after 3 revision rounds, use framework:collaborative-judgment to surface the specific unresolved tensions (e.g., vision vs. constraints, simplicity vs. completeness) and ask the user to make a decision rather than continuing to iterate.
This step is a valid stopping point. If the team only needs current + recommended direction agreed, the session can end here. In that case, run Step 7 immediately to persist what was agreed. Sections not yet reached must appear in the Session Status table as pending — do not omit them. Gap assessment and first moves can be completed in a follow-up session.
Gap assessment — structural items only:
Do not include tactical items (naming, test coverage, code style) — execution concerns handled by code-forge and refactor-safely.
First moves — not a full backlog. The 2–3 most important structural decisions to make next.
Right granularity: one layer introduced, one seam isolated, one dependency inverted. Not "improve the domain layer" (too broad). Not "rename this method" (too narrow).
For each first move:
/refactor-safely/design-blueprint → /code-forge[Move N] or none — makes sequencing explicitAsk: "Do these first moves match your team's capacity and what you want to tackle first?"
STOP: Do not advance to Step 7 until the user confirms the gap assessment and first moves.
Produce .lattice/insights/architecture.md. Create .lattice/insights/ directory if it does not exist.
Required structure:
# Architecture Compass — [Repository Name]
## Session Status
| Phase | Status | Agreed |
|---|---|---|
| Scan + Interview | complete | — |
| Current Architecture | ✅ agreed | [date] |
| Recommended Direction | ✅ agreed | [date] |
| Gap Assessment | ✅ agreed | [date] |
| First Moves | ✅ agreed | [date] |
## Repository Identity
Language, framework, size, scope boundary, delivery constraints, team context.
## Why We're Doing This
The burning platform — from the interview. What's breaking today.
Previous attempts and what stopped them.
## Team Vision & Guardrails
What the team wants to achieve (Act 3 answers — verbatim + architectural interpretation).
Constraints and off-limits areas (Act 4 answers).
These are architectural inputs that directly shape the Recommended Direction.
## Archaeology Findings
Dead code candidates. Duplicates to reconcile.
Implicit coupling. Hidden integration points. Quick wins.
## Domain Map
Core domain. Natural seams. Bounded contexts (if applicable).
## Current Architecture
Drift or mismatch — with rationale.
Layer structure. Module inventory.
[Mermaid diagram — layers and violations]
Key violations — specific and named.
## Recommended Direction
Architecture style and rationale.
Layer definitions and dependency rules.
[Mermaid diagram — clean target]
[Annotated target folder tree]
[Bounded context map — if applicable]
## Gap Assessment
Must change / Should change / Explicitly defer / Leave alone.
## First Moves
[Move 1] — what, why first, which molecule, affected modules, depends on, done when
[Move 2] — what, why first, which molecule, affected modules, depends on, done when
[Move 3] — what, why first, which molecule, affected modules, depends on, done when (if applicable)
## Progress Log
[Append on every subsequent session: YYYY-MM-DD — phase revisited, what changed, new findings]
Use today's date in YYYY-MM-DD format wherever [date] appears in the Session Status table.
On subsequent sessions that resume this document, append an entry to the Progress Log before closing: date, which phase was revisited, what changed, any new findings that emerged.
Alternatives
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
wanshuiyin/Auto-claude-code-research-in-sleep
Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.
dotnet/skills
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
aaron-he-zhu/aaron-marketing-skills
Use when the user asks to "set up my founder social-selling routine", "build a daily engagement block for target accounts", or "turn funding / hiring signals into selling plays"; produces the founder/seller daily operating block — a time-boxed engagement-block spec (substantive value-add comments on target-account posts, never a pitch), warm-touch-before-ask cadence rules, trigger-response plays consuming the social-pulse-monitor B2B trigger watchlist (funding / hiring / launch signals), and a q