Logotipo de Context Anchoring

Context Anchoring

Comunidad
techygarg
context-anchoring

Manage per-feature living documents that capture decisions, constraints, and reasoning across AI sessions during active development. Scoped to feature-level work — design, implementation, bugfix, refactor — not for codebase-wide assessments or product-wide specifications (those define their own document lifecycles). Handles creating new context documents, loading existing ones, and enriching them with new decisions. Use when starting a new feature, resuming work, making technical decisions, resolving questions, or when context needs to persist across sessions. Use this skill whenever the user mentions 'load context', 'update context', 'context doc', 'decisions', 'continue where we left off', 'what did we decide', or 'capture this decision'.

Descripción general

Editortechygarg
Repositoriolattice
Nombre de la habilidadcontext-anchoring
Estrellas
208
Forks
16
Archivos incluidos
1
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 1 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por techygarg en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Context Anchoring en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/techygarg/lattice/tree/main/skills/context-anchoring
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/techygarg/lattice.git /tmp/lattice
mkdir -p .claude/skills
cp -r /tmp/lattice/skills/context-anchoring .claude/skills/context-anchoring
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Context Anchoring en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Context Anchoring automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Context Anchoring no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Context Anchoring

Scope

Feature-level only — anchors decisions as a feature flows from design → implementation → bugfix → refactor.

Config Resolution

This skill manages a directory of per-feature context docs. Resolution order:

  1. Read .lattice/config.yaml in the repo root.
  2. If found and paths.context_base is set → use that directory as the context base (the Create behavior creates it on demand).
  3. If there is no config file or no 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.

Why Context Anchors Exist

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:

  • Feature-bound -- one doc per feature, scoped decisions only
  • Decision-focused -- capture what, why, and what-else-was-considered for every choice
  • Append-only -- decisions are never removed or rewritten, only added chronologically
  • Session-spanning -- the doc outlives the conversation and carries context forward
  • Git-native -- lives in the repo, versioned alongside code

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.

Document Lifecycle

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.

BehaviorPurposeReactive TriggerProactive Trigger
CreateStart a new context docUser asks to create oneAI detects feature work beginning without a doc
LoadRestore context from an existing docUser asks to load/resumeAI detects existing docs and suggests loading
EnrichAdd a new decision, constraint, or resolutionUser asks to capture somethingAI detects a decision made in conversation

Status Lifecycle

Every context doc carries a status frontmatter field. Never infer status from body prose.

ValueSet by
draftcontext-anchoring Create — design not yet complete
approveddesign-blueprint Step 3 — L1–L4 complete, design reviewed
completecode-forge Step 5 — implementation done

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.

Create Behavior

Always confirm before creating.

Steps:

  1. Identify the feature name. Derive the kebab-case filename from it (e.g., "User Authentication" → user-authentication.md). Confirm the name with the user.
  2. Ask about the requirement doc. If the user has one, capture it for the 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.
  3. Create <context_base>/ if it does not already exist.
  4. Generate from template. Read ./assets/feature-doc-template.md and fill in:
    • Frontmatter: feature, requirement_doc, created (today's date), status: draft
    • H1 heading: feature name
    • Summary: one-line description (ask the user or derive from context)
    • If the template file is not found, generate the doc using this minimal structure:
      ---
      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
  5. Confirm creation. Show the user the proposed path and a content summary.

Load Behavior

Always confirm before loading.

Steps:

  1. Read the context doc. Parse the frontmatter and all sections.
  2. Resolve the linked requirement doc if 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.
  3. Present the structured acknowledgment (see Output Formats below):
    • Feature name and summary
    • Status (from the frontmatter status field — surface explicitly)
    • Requirement doc status (linked or not linked)
    • Decision count and latest decision
    • Open questions (if any)
    • Constraints (if any)
  4. Honor all logged decisions. Every decision in the log is an active commitment. Never contradict a logged decision without explicit discussion and a new decision entry explaining the change.
  5. Respect constraints as non-negotiable. Constraints are harder than decisions -- they represent boundaries that cannot be crossed without a deliberate, documented override.
  6. Flag open questions when work touches them. If the current task involves an area with an unresolved question, surface it immediately. Never silently assume an answer.

Enrich Behavior

Always confirm before writing.

What to capture in the Decisions Log:

  • Date -- when the decision was made
  • Decision -- what was decided, stated clearly and concisely
  • Reasoning -- why this choice was made, key factors
  • Alternatives Considered -- what else was evaluated and why it was rejected

Rules:

  1. Append-only. New entries go at the bottom of the Decisions Log table. Never modify or remove existing entries.
  2. Chronological order. Entries reflect the order decisions were made, not grouped by topic.
  3. Concise but complete. Each entry must be understandable on its own without re-reading the full conversation.
  4. Feature-bound only. Capture only decisions relevant to this specific feature. Cross-cutting concerns, project-wide conventions, and general preferences belong elsewhere.
  5. Resolve open questions explicitly. When an open question gets answered, add the answer as a decision in the log and remove the question from the Open Questions list.
  6. Constraints are non-negotiable. Once recorded, a constraint binds. Changing a constraint requires a new decision entry explaining why it is being revised.
  7. Constraint Override Protocol. If the user explicitly says to override a constraint (e.g., "forget that constraint, we've changed direction"), never silently delete it. Instead: (a) ask the user to confirm the override explicitly, (b) strike through the constraint in the Constraints section (prefix with ~~), and (c) add a decision entry in the Decisions Log recording the override and reasoning. Constraint history preserved; binding status revoked.
  8. Key Files dedup. When adding to the Key Files table, check whether the path already exists in the table. If it does — skip.
  9. Cross-cutting check. After enriching, apply the learning-harvest cross-cutting test: (1) does it name a pattern or approach, not a feature-specific fact? (2) could a developer on a different feature apply it without knowing this feature's context? If both pass — silently add it to the learning-harvest queue. Do not prompt the user here.

Document Discovery

When the user asks to load or resume but does not specify which feature:

  1. Scan the context base directory for .md files.
  2. Match by frontmatter feature field or by filename.
  3. Multiple docs exist → present a numbered list with feature name, creation date, and decision count. Let the user choose.
  4. Only one doc exists → suggest loading it. Confirm before proceeding.
  5. No docs exist → inform the user and suggest creating one.
  6. Fuzzy match: the user's term partially matches multiple docs (e.g., "auth" matching 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.

Output Formats

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.

Integration with Other Skills

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 emerge
  • code-forge — invokes Load in Step 1 (Establish Implementation Context), then invokes Enrich throughout Steps 3–5 to capture implementation decisions, key files, and resolved questions
  • refactor-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 8
  • bug-fix — invokes Document Discovery and Load in Step 1, captures diagnosis and repair decisions via Enrich in Step 7

When 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.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Context Anchoring?

Manage per-feature living documents that capture decisions, constraints, and reasoning across AI sessions during active development. Scoped to feature-level work — design, implementation, bugfix, refactor — not for codebase-wide assessments or product-wide specifications (those define their own document lifecycles). Handles creating new context documents, loading existing ones, and enriching them with new decisions. Use when starting a new feature, resuming work, making technical decisions, resolving questions, or when context needs to persist across sessions. Use this skill whenever the us...

¿Por qué usar Context Anchoring en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Context Anchoring está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Context Anchoring en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/techygarg/lattice/tree/main/skills/context-anchoring. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Context Anchoring?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Context Anchoring?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Context Anchoring con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Context Anchoring?

Sí. techygarg la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇