From lattice
Manages per-feature living documents that capture decisions, constraints, and reasoning across AI sessions. Use when starting a feature, resuming work, or making technical decisions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lattice:context-anchoringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Feature-level only — anchors decisions as a feature flows from design → implementation → bugfix → refactor.
Feature-level only — anchors decisions as a feature flows from design → implementation → bugfix → refactor.
Skill manage dir of per-feature context docs. Resolution order:
.lattice/config.yaml in repo rootpaths.context_base for custom dir path.lattice/context/Each feature get one doc at <context_base>/<feature-name>.md. No default principles, no overlay modes, no override files -- just thin template and per-feature docs that grow through enrichment.
AI no persistent memory. Context decay real: by message 30+, early decisions contradicted, naming inconsistent, "why" evaporate. Damage compound -- forgotten decision become potential contradiction, lost constraint become violation, unresolved question become silent assumption.
Context anchor docs solve:
Two docs per feature: requirement doc (static, written upfront, not managed by this skill) and context anchor doc (living, evolving, managed by this skill). Requirement doc define what build. Context anchor doc capture how and why -- decisions, constraints, reasoning that emerge during development.
Three behaviors govern context anchor doc lifecycle. Each triggered reactively (user ask) or proactively (AI suggest). Both cases, AI always confirm before acting -- propose, user dispose.
| Behavior | Purpose | Reactive Trigger | Proactive Trigger |
|---|---|---|---|
| Create | Start new context doc | User ask create one | AI detect feature work beginning without doc |
| Load | Restore context from existing doc | User ask load/resume | AI detect existing docs and suggest loading |
| Enrich | Add new decision, constraint, resolution | User ask capture something | AI detect decision made in conversation |
Every context doc carries a status frontmatter field. Never infer status from body prose.
| Value | Set by |
|---|---|
draft | context-anchoring Create — design not yet complete |
approved | design-blueprint Step 3 — L1–L4 complete, design reviewed |
complete | code-forge Step 5 — implementation done |
STOP: Check this field before acting on a context doc. draft ≠ approved. approved ≠ complete. Deviation from approved design: update doc and re-approve — no new status values.
Always confirm before creating.
Steps:
user-authentication.md). Confirm name with user.requirement_doc frontmatter field. If not, leave null.<context_base>/ not already exist../assets/feature-doc-template.md and fill in:
feature, requirement_doc, created (today date), status: draft---
feature: <feature-name>
requirement_doc: <path 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 not null. Use to understand feature goals and scope, but not modify.status field — surface explicitly)Always confirm before writing.
What capture in Decisions Log:
Rules:
~~), and (c) add decision entry in Decisions Log recording override and reasoning. Constraint history preserved; binding status revoked.When user ask load or resume but 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 user choose. Never guess.When user mention feature name in conversation, check if matching context doc exist. If it do and not been loaded in 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 confirmation before writing.
Create: Show proposed path, feature name, requirement doc link. Wait confirmation before creating.
This atom composed by molecules that orchestrate feature workflows:
design-blueprint -- invoke Create or Load in Step 1 (Establish Context), then invoke Enrich at each design level checkpoint to capture decisions as they emergecode-forge -- invoke Load in Step 1 (Establish Implementation Context) to load blueprint, then invoke Enrich throughout Steps 3-5 to capture implementation decisions, key files, resolved questionsWhen context doc active (loaded in current session), Enrich run continuously -- AI monitor conversation for decisions worth capturing and suggest enrichment as they arise. Not limited to molecule that loaded doc; any skill producing decisions can trigger enrichment suggestion.
npx claudepluginhub techygarg/lattice --plugin latticeExports conversation context (purpose, intent, design decisions, constraints) to .dev/contexts/{sanitized-branch}.md for handoff to reviewers, other AIs, or new sessions. Triggers on phrases like 'export context' or 'save to .dev'.
Captures architectural decisions and project documentation with ADRs. Records context, trade-offs, and rationale for future developers.
Creates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.