/lattice:context-anchoringfrom lattice
Manages per-feature living documents that capture decisions, constraints, and reasoning across AI sessions. Use when starting a new feature, resuming work, or making technical decisions.
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.
Feature-level only — anchors decisions as a feature flows from design → implementation → bugfix → refactor.
This skill manages a directory of per-feature context docs. Resolution order:
.lattice/config.yaml in the repo root.paths.context_base is set → use that directory as the context base (the Create behavior creates it on demand).paths.context_base key → use the default .lattice/context/.Each feature gets one doc at <context_base>/<feature-name>.md. No default principles, no overlay modes, no override files -- just a thin template and per-feature docs that grow through enrichment.
AI has no persistent memory across sessions. Early decisions get contradicted, naming drifts, and the "why" evaporates -- a forgotten decision becomes a potential contradiction, a lost constraint becomes a violation, an unresolved question becomes a silent assumption.
Context anchor docs prevent this by being:
Two documents per feature: the requirement doc (static, written upfront, not managed by this skill) defines what to build; the context anchor doc (living, evolving, managed by this skill) captures how and why -- decisions, constraints, reasoning that emerge during development.
The requirement doc may live in this repo or in whatever system the team already tracks requirements in (Jira, Linear, a wiki) -- this atom never writes to it regardless of where it lives.
Three behaviors govern the context anchor doc's lifecycle. Each is triggered reactively (user asks) or proactively (AI suggests). In both cases, the AI always confirms before acting -- propose, user disposes.
| Behavior | Purpose | Reactive Trigger | Proactive Trigger |
|---|---|---|---|
| Create | Start a new context doc | User asks to create one | AI detects feature work beginning without a doc |
| Load | Restore context from an existing doc | User asks to load/resume | AI detects existing docs and suggests loading |
| Enrich | Add a new decision, constraint, or resolution | User asks to capture something | AI detects a decision made in conversation |
Every context doc carries a status frontmatter field. Never infer status from body prose.
| Value | Set by | Read by |
|---|---|---|
draft | context-anchoring Create, or design-blueprint when a level is reopened — design not yet complete | design-blueprint Step 1: resumes the design. code-forge Step 1: asks before building on it. |
approved | design-blueprint Step 3 — L1–L4 complete, design reviewed | design-blueprint Step 1: finished; reopens only on request or a code-forge [for design] note. code-forge Step 1: builds against it. |
complete | code-forge Step 5 — every planned component built | design-blueprint Step 1: closed; new scope gets a new context doc. code-forge Step 1: follow-ups on the existing design only, once the user confirms. |
STOP: Check this field before acting on a context doc. draft ≠ approved. approved ≠ complete. Deviation from an approved design → update the doc and re-approve — no new status values exist.
Always confirm before creating.
Steps:
user-authentication.md). Confirm the name with the user.requirement_doc frontmatter field -- a local file path, or an external reference (URL, ticket ID, or other identifier resolvable via a connected MCP tool). If neither, leave null.<context_base>/ if it does not already exist../assets/feature-doc-template.md and fill in:
feature, requirement_doc, created (today's date), status: draft---
feature: <feature-name>
requirement_doc: <local path, external reference, or null>
created: <today's date>
status: draft
---
# <Feature Name>
<one-line summary>
## Decisions Log
| Date | Decision | Reasoning | Alternatives Considered |
|------|----------|-----------|------------------------|
## Open Questions
None.
## Constraints
None.
## Key Files
Always confirm before loading.
Steps:
requirement_doc is not null. Local path → read directly. External reference (URL, ticket ID, or other identifier) and a connected MCP tool can resolve it → attempt the fetch. Neither applies → ask the user to paste the current requirement constraints directly -- expected, not an error. Use whatever is resolved to understand feature goals and scope, but do not modify it.status field — surface explicitly)Always confirm before writing.
What to capture in the Decisions Log:
Rules:
~~), and (c) add a decision entry in the Decisions Log recording the override and reasoning. Constraint history preserved; binding status revoked.When the user asks to load or resume but does not specify which feature:
.md files.feature field or by filename.user-authentication.md and oauth-authentication.md) → show all partial matches with full filenames and let the user choose. Never guess.When the user mentions a feature name in conversation, check whether a matching context doc exists. If it does and has not been loaded this session, suggest loading it.
Load: show feature name, status (from frontmatter), requirement doc status, decision count, open questions, constraints, latest decision. Close with: "All logged decisions are active. Constraints are non-negotiable. I will flag open questions when work touches them."
Enrich: show exactly what will be added (decision, reasoning, alternatives considered). Wait for confirmation before writing.
Create: show proposed path, feature name, requirement doc link. Wait for confirmation before creating.
This atom is composed by the molecules that orchestrate feature workflows:
design-blueprint — invokes Create or Load in Step 1 (Establish Context), then invokes Enrich at each design-level checkpoint to capture decisions as they emergecode-forge — invokes Load in Step 1 (Establish Implementation Context), then invokes Enrich throughout Steps 3–5 to capture implementation decisions, key files, and resolved questionsrefactor-safely — invokes Document Discovery and Load in Step 1, persists the approved refactor plan via Enrich in Step 3, and captures final decisions in Step 8bug-fix — invokes Document Discovery and Load in Step 1, captures diagnosis and repair decisions via Enrich in Step 7When a context doc is active (loaded in the current session), Enrich runs continuously -- the AI monitors the conversation for decisions worth capturing and suggests enrichment as they arise. This is not limited to the molecule that loaded the doc; any skill producing decisions can trigger an enrichment suggestion.
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'.Other plugins' skills for the same job