context
When to use
Use this skill when:
- Documenting a module, service, or integration for future reference
- Exploring an unfamiliar area of the codebase
- Preparing for a feature that touches multiple areas
- Onboarding to a new part of the codebase
Do NOT use when:
- Writing code or features
- Creating roadmaps (use
roadmap-managementskill)
Procedure: Manage contexts
- Identify scope — Which area of the codebase needs a context document?
- Research — Use
code-graph askto understand the area (files, patterns, dependencies). - Write or update — Create/update the context doc following the template below.
- Verify — Confirm all referenced files exist and descriptions match current code.
A context document is a structured snapshot of a codebase area:
- What it does, why it exists
- Key files, classes, and patterns
- Database tables and API endpoints
- Dependencies and known issues
Unlike feature plans (future-focused) or roadmaps (task-focused), contexts are
present-focused — they describe the current state of the code.
File structure
.augment/contexts/ # Shared contexts (about the agent system itself)
├── augment-infrastructure.md
├── skills-and-commands.md
└── documentation-hierarchy.md
agents/settings/contexts/ # Project-wide contexts
├── {context-name}.md
{module_root}/{Module}/{agent_folder}/settings/contexts/ # Module-scoped contexts
├── {context-name}.md # Laravel: app/Modules/…
# Symfony: src/Bundle/…
# Monorepo: packages/…
.augment/templates/
└── contexts.md # Context template
Context types
| Type | Scope | Example |
|---|---|---|
| Module | Single module's structure and purpose | client-software.md |
| Domain | Business domain across modules | import-pipeline.md |
| Service | Complex service with its dependencies | customer-service.md |
| Integration | External API/system integration | probaus-api.md |
| Infrastructure | DevOps or infrastructure concern | queue-system.md |
| Knowledge card | Trust-tiered cache of expensive (remote) structural evidence — negative facts + pointers durable, positive structure a hypothesis | lodash.md, stripe-api.md |
| Standards card (Class A) | Coding standards derived from real tooling config — pointer + digest, trust: high (config-derived), auto-refreshed when the config changes; never a flattened claim | coding-standards.md (points at ruff.toml, .editorconfig) |
| Lesson card (Class C) | A learned lesson — symptom (fact) split from hypothesis (decaying theory), trust: low, subject-not-person, anti-calcification decay; promoted only via the human gate (accumulation layer is eval-gated) | agents/memory/curated/lessons/<slug>.md |
| Knowledge page (typed) | Team-shared, lifecycle-typed knowledge that grows while working a project — episodic sessions, semantic concepts, procedures on their way to a skill, small decisions | agents/knowledge/concepts/api-response-shape.md |
Where to store contexts
| Content | Location |
|---|---|
| About the .augment/ system itself | .augment/contexts/ (shared package) |
| Project-wide or cross-module | agents/settings/contexts/ |
| Module-specific | {module_root}/{Module}/{agent_folder}/settings/contexts/ (resolved via modules.root_paths + modules.agent_folder; Laravel example: app/Modules/{Module}/agents/settings/contexts/) |
| Knowledge card (committed) | agents/knowledge/<source>.md — fill from the knowledge-card template |
| Knowledge page (typed, committed) | agents/knowledge/{sessions,concepts,procedures,decisions}/<slug>.md — fill from the knowledge-pages template |
| Evidence Report / probe dumps / absence log (ephemeral) | agents/memory/knowledge/session/ (gitignored, overwritten each task) |
| If unsure | Ask the user |
Knowledge cards — a specialized, evidence-disciplined context type
A knowledge card extends this mechanism for the evidence-first discipline; it
is not a second system. Unlike a normal context (a present-state snapshot a
human curates), a card is governed: it is a cache of expensive remote evidence,
never a source of truth and never a build input. Its trusted core is its
negative facts + pointers (trust: durable); its positive structure is a
per-line, last-verified hypothesis that loads as "Assumed (from card)" and
must be re-confirmed against the live source before use. Cards pass the
check_knowledge_cards.ts pointer-CI (size ≤ 150, mandatory authoritative
pointer, trust tagging, multi-evidence consistency). See