Skip to content
Skills Library
Programming · Writing

context-document

/context-document

Use when the user says \"create context\", \"document this area\", or wants a structured snapshot of a codebase area for agent orientation.

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when the user says \"create context\", \"document this area\", or wants a structured snapshot of a codebase area for agent orientation.

Triggers from the description

create context\document this area\
Original author description

Use when the user says \"create context\", \"document this area\", or wants a structured snapshot of a codebase area for agent orientation.

How it works

  1. When to use
  2. Procedure: Manage contexts
  3. File structure
  4. Context types
  5. Where to store contexts
  6. Integration with other systems
  7. Behavior rules
  8. Commands
  9. Output format
  10. Auto-trigger keywords
Original SKILL.md headings · 203 lines, 1,245 words
SKILL.md preview
---
model_tier: inherit
name: context-document
description: "Use when the user says \"create context\", \"document this area\", or wants a structured snapshot of a codebase area for agent orientation."
domain: process
workspaces:
  - agent-config-maintainer
packs:
  - meta
---

# 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-management` skill)

## Procedure: Manage contexts

1. **Identify scope** — Which area of the codebase needs a context document?
2. **Research** — Use codebase-retrieval to understand the area (files, patterns, dependencies).
3. **Write or update** — Create/update the context doc following the template below.
4. **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
[`source-discovery`](../source-discovery/SKILL.md) for when a structure is
card-worthy and [`evidence-discipline`](../../agent-src/contexts/execution/evidence-discipline.md)
for the full model.

### Knowledge pages — the typed sibling directories

Alongside knowledge cards, `agents/knowledge/{sessions,concepts,procedures,decisions}/`
holds team-shared knowledge that grows **while working the project** —
coding standards observed, module structure, API endpoint shapes, recurring
mistakes, small decisions not big enough for an ADR. Fill new pages from the
[`knowledge-pages`](../../agent-src/templates/contexts/knowledge-pages.md)
template.

**Retrieval protocol — index-first, then grep, then read.** Read
`agents/knowledge/INDEX.md` first (one line per page, regenerated by
`src/scripts/generate_knowledge_index.ts`); `grep` for keywords second; read
the specific file third. Never enumerate every knowledge file directly —
there is no search infrastructure by design.

### Standards cards — Class A configured convention (Evidence v2)

A **standards card** is a present-state context whose claims are **derived from
the project's real tooling config** (`.editorconfig`, `eslint.config.js`,
`pint.json`, `pyproject.toml`/`ruff.toml`, commit-lint, CI lint steps). It is
`trust: high (config-derived)` — high *because* the config is the truth, not
because the agent believes it. Each standard is a **pointer + digest** (value +
`source: file:key` + scope), never a flattened claim; conflicting configs are
surfaced as two pointers, never merged. The digest is **regenerated** when a
source config's mtime/hash changes (auto-refresh, no human gate — Class A is
deterministic) and is read for heuristics only, never to bypass a fresh
structural read. Build it with the
[`standards-from-config`](../standards-from-config/SKILL.md) skill; store under
`agents/settings/contexts/`.

### Shared vs. project-specific contexts

**`.augment/contexts/`** — Part of the shared package. Describes the agent infrastructure:
how overrides work, what skills/commands exist, the documentation hierarchy.
These are read-only at project level (like all `.augment/` content).

**`agents/settings/contexts/`** — Project-specific. Describes the project's business domain:
modules, services, integrations, database architecture.
These are created and maintained per project.

## Integration with other systems

### Sessions
When working in an area that has a context document, load it at session start.
The session's Context section can reference it.

### Features
Before planning a feature, check if a context document exists for the affected area.
It provides the baseline understanding needed for planning.

### Module exploration
`/module-explore` gathers the data needed to create a module context.
`/context-create` turns that exploration into a persistent document.

### Overrides
When customizing a shared skill or command, read `.augment/contexts/override-system.md` for the naming conventions and format.

### Shared contexts
When working on the agent infrastructure itself (skills, commands, rules), check
`.augment/contexts/` for existing documentation about the system.

## Behavior rules

### Creating contexts

1. **Always analyze the code first** — use `codebase-retrieval`, `view`, and file listing.
2. **Be factual** — describe what IS, not what SHOULD be.
3. **Be specific** — link to files, name classes, reference tables.
4. **Ask the user** about anything unclear.

### Maintaining contexts

- Update `Last Updated` when modifying.
- When code changes affect a context, update it.
- `/context-refactor` is the dedicated command for this.

## Commands

| Command | Purpose |
|---|---|
| `context-create` | Analyze an area and create a new context document |
| `context-refactor` | Revisit, update, and extend an existing context |


## Output format

1. Context document in the correct location with structured sections
2. Cross-references to related contexts updated

## Auto-trigger keywords

- context document
- codebase context
- orientation doc
- context creation

## Gotcha

- Context docs become stale — always check the actual code before trusting a context document.
- Don't create context docs for areas that change weekly — they'll be outdated immediately.
- Keep context docs factual, not aspirational — document what IS, not what should be.

## Do NOT

- Do NOT create contexts without analyzing the code first.
- Do NOT guess about architecture — verify by reading the code.
- Do NOT duplicate information from `AGENTS.md` — reference it instead.
- Do NOT commit or push without permission.
- Do NOT create contexts for trivial areas — only when the knowledge is worth persisting.

Versions

The database has no other skills named context-document.

Database snapshot: 13.11.2026 · package version 7180525dea65 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100explore-area
    Orient on a new codebase area using get_context for token-budgeted exploration. Use when the user asks "what does this module do", "explain this part", or wants to understand an unfamiliar area before making changes.
  • 100project-tree
    Create or incrementally maintain a compact repository map in .tree/. Use for project orientation or after changes to file layout, responsibilities or module boundaries.
  • 100c4-model
    Generate C4 architecture documentation at any level using specialized agents (Code, Component, Container, Context). Use this skill whenever the user wants to document system architecture with the C4 model, create architecture diagrams, document code structure, define component…
  • 100document-this
    Generate multi-audience documentation from any codebase — workflows for non-technical readers, architecture for developers, and AI orientation for agents. Deterministic JS scripts handle structural extraction; the agent writes the prose. Project-agnostic and self-orienting. Use…
  • 90duck-orient
    Codebase-orientation session with the rubber duck — generate or refresh .claude/orientation.md with interactive exercises. Use when new to a codebase, returning after a break, or says \"duck orient\", \"I'm new to this repo\".
  • 100code-mapping
    Creates and navigates hierarchical code maps (L0/L1/L2/L3) for AI agent and human orientation. Use when bootstrapping codebase understanding, creating navigation documentation, exploring architecture, or validating map integrity.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.