architecture-refiner
Facilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles:…
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
Claude Code
$ npx -y skills add techygarg/lattice --skill architecture-compass --agent claude-code
Codex
$ npx skills add techygarg/lattice --skill architecture-compass -a codex -y
Cursor
$ npx skills add techygarg/lattice --skill architecture-compass -a cursor -y
Gemini CLI
$ npx skills add techygarg/lattice --skill architecture-compass -a gemini-cli -y
GitHub Copilot
$ npx skills add techygarg/lattice --skill architecture-compass -a github-copilot -y
OpenCode
$ npx skills add techygarg/lattice --skill architecture-compass -a opencode -y
Windsurf
$ npx skills add techygarg/lattice --skill architecture-compass -a windsurf -y
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'."
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)
**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.
**Check for an existing insights document first.** If `.lattice/insights/architecture.md` already exists:
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:**
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:
5. **Seam identification and viability** — natural boundaries where one side can change without the other knowing:
6. **Import and dependency patterns** — grep import statements across all source files. Do not open full bodies. Reveals
Composable AI skills that teach assistants structured thinking — design-first, context-aware, and architecture-guided.
Facilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles:…
Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode).…
Investigate, reproduce, and safely fix a bug with regression protection. Composes context, diagnosis, architecture, code quality,…
Facilitate a structured conversation to define clean code principles for a repository. Produces a formal clean-code.md document…
Apply clean code principles when generating or modifying implementation code. Enforces function focus, naming clarity, complexity…
Generate implementation code from an approved design blueprint or verbal requirements. Composes context anchoring, architecture,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.