/lattice:knowledge-priming-refinerfrom lattice
Facilitates a structured conversation to create a project-specific knowledge base document that primes AI with the project's tech stack, architecture, and structure.
Ships in lattice. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This refiner facilitates a structured conversation to create a project-specific knowledge base document. The document captures the project's identity -- its tech stack, architecture, directory layout, and the trusted sources that shaped how the team works. Think of it as answering one question: "What does AI need to know about this project to avoid defaulting to generic internet patterns?"
This is not about how to write good code -- that is handled by the clean-code atom (coding principles), architecture atom (structural rules), and domain-driven-design atom (domain modeling). Knowledge priming covers what those skills cannot know: which framework, which version, which docs to trust, and how the repo is organized.
.lattice/standards/knowledge-base.md (or custom path from .lattice/config.yaml -> paths.knowledge_base)paths.knowledge_base in .lattice/config.yaml./assets/template.md for the full document structure and interview guidance commentsknowledge-priming atom loads this document via config resolution and provides it as ambient project context to all skills and moleculesKnowledge priming captures project identity and technical context. It deliberately excludes concerns covered by other skills:
| Concern | Where It Belongs | Not In Knowledge Priming |
|---|---|---|
| Language idioms (error handling, type system, naming, testing patterns, DI) | language-idioms document | No language-level patterns or idioms |
| Coding style, naming principles, function design | clean-code atom | No code examples, no naming rules |
| Architectural layers, dependency direction | architecture atom | No structural rules |
| Domain modeling, aggregate design | domain-driven-design atom | No DDD patterns |
| Code-level anti-patterns (god functions, deep nesting) | clean-code atom | No coding anti-patterns |
If you find yourself writing content that teaches how to write code, it belongs in one of the atoms above, not here. Knowledge priming answers "what are we working with?" -- not "how should we write?"
Before starting the interview:
.lattice/config.yaml -- does paths.knowledge_base point to a file?Look for signals that inform the conversation:
Share relevant findings with the user at the start: "I noticed your project uses [X framework] with [Y structure]. I'll use that as context for our conversation."
Read ./assets/template.md and follow the <!-- INTERVIEW GUIDANCE: --> comments for each section.
| # | Section | What It Captures |
|---|---|---|
| 1 | Architecture Overview | Big picture: what kind of application, major components, how they interact |
| 2 | Tech Stack and Versions | Specific technologies with version numbers, including "not X" clarifications |
| 3 | Curated Knowledge Sources | Official docs, trusted blogs, internal references the team relies on (5-10 max) |
| 4 | Project Structure | Directory layout showing where things live |
| 5 | Project Conventions | Brief project-specific conventions that other skills cannot infer (optional, slim) |
| Described in | Informs | How |
|---|---|---|
| §1 -- Architecture | §4 -- Project Structure | Architecture style shapes directory layout |
| §2 -- Tech Stack | §5 -- Project Conventions | Stack choices may imply project-specific conventions |
| §2 -- Tech Stack | §3 -- Curated Sources | Each technology has authoritative docs worth curating |
mode: override (or overlay for selective)<!-- TODO: Fill in during next revision --> comment<!-- INTERVIEW GUIDANCE: --> comments from the outputDetermine output path:
.lattice/config.yaml exists and has paths.knowledge_base, use that path..lattice/standards/knowledge-base.md.Update config:
.lattice/config.yaml does not exist, create it with paths.knowledge_base pointing to the output file.Before writing the final document, verify:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub techygarg/lattice --plugin lattice27 skills in this plugin
/architectureEnforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode). Defaults to clean architecture; supports any architecture style via the architecture-refiner. Validates layer responsibilities, dependency direction, and structural constraints using the loaded architecture rules. Use when generating code, reviewing architecture, creating new files, or when the user mentions 'architecture', 'layers', 'structure', 'dependency rules', 'hexagonal architecture', 'ports and adapters', 'modular monolith', or 'onion architecture'. Also use when reviewing generated code for structural compliance./architecture-compassArchitectural 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-refinerFacilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles: clean architecture (default), hexagonal / ports & adapters, modular monolith, or custom. Produces a formal architecture document that the corresponding atom will use. Use when setting up a new project, defining architecture standards, or when the user says 'setup architecture', 'define layers', 'architecture principles', 'help me define my architecture', 'hexagonal architecture', 'modular monolith', 'ports and adapters', or 'define my architecture style'./bug-fixInvestigate, reproduce, and safely fix a bug with regression protection. Composes context, diagnosis, architecture, code quality, and testing guardrails into a reproduce-first repair workflow. Use when the user says 'fix this bug', 'debug this', 'investigate this failure', 'patch this regression', 'repair this issue', or 'why is this broken'./clean-codeApply clean code principles when generating or modifying implementation code. Enforces function focus, naming clarity, complexity management, error handling, and self-documenting style. Use when the user mentions 'clean code', 'code quality', 'coding guidelines', or 'implementation quality'. Loaded automatically by the code-generating molecules (code-forge, refactor-safely, bug-fix). This skill governs the craft of writing individual code units -- not architecture (see architecture), not security posture (see secure-coding), not test structure (see test-quality), and not refactoring workflows (see refactor-safely)./clean-code-refinerFacilitate a structured conversation to define clean code principles for a repository. Produces a formal clean-code.md document that the clean-code atom will use as its override. Use when setting up coding standards, defining code quality rules, or when the user says 'setup clean code', 'define coding standards', 'code quality principles', 'coding guidelines', or 'help me define my code standards'.Other plugins' skills for the same job