From agent-context
Generate evidence-driven context files (AGENTS.md, CLAUDE.md, docs/agents/, .claude/settings.json) from Understand-Anything knowledge graphs. Use when the user runs /agent-context, asks to "bootstrap agent context", "generate AGENTS.md", "initialize Claude Code context", or "make this repo AI-agent-ready". Requires ./understand-anything/knowledge-graph.json — produced by running /understand on the target repo first.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-context:agent-contextThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Self-contained execution runbook. Read top-to-bottom. Do not backtrack.
Self-contained execution runbook. Read top-to-bottom. Do not backtrack.
Every output file reads like a human wrote it from real evidence. No [to fill] residue except in
docs/agents/testing.md
Mock stance. If the graph does not support a section, omit the section entirely — do not scaffold.
Reference files (read on-demand, not required for normal execution):
references/SCHEMAS.md — full graph schemas, 20-rule lint spec, sample datareferences/TEMPLATES.md — verbatim output file templates numbered 1–19 matching write orderAll variables set during execution. Phases that set each variable are noted.
| Variable | Type | Set in | Description |
|---|---|---|---|
PROJECT_ROOT | string | Phase 0 | Absolute path to target repo |
FORCE | bool | Phase 0 | Overwrite existing files |
DRY_RUN | bool | Phase 0 | Print content, write nothing |
WITH_CI | bool | Phase 0 | Generate CI workflow and hook |
IS_GIT_REPO | bool | Phase 0 | Whether PROJECT_ROOT is a git repo |
KNOWLEDGE_GRAPH | object | Phase 1 | Parsed knowledge-graph.json |
DOMAIN_GRAPH | object or null | Phase 1 | Parsed domain-graph.json or null |
GRAPH_STALE | bool | Phase 1 | HEAD != graph commit hash |
DOMAIN_QUALITY | enum | Phase 1 | "high", "mixed", "low", or "missing" |
EXISTING_CONVENTIONS | string or null | Phase 1 | Content of existing CONVENTIONS.md |
nodesById | Map | Phase 2 | node.id → Node |
functionsByFile | Map | Phase 2 | filePath → function Node[] |
importsOut | Map | Phase 2 | node.id → target id[] |
importsIn | Map | Phase 2 | node.id → source id[] |
containsOut | Map | Phase 2 | file node.id → function node.id[] |
layersByNodeId | Map | Phase 2 | node.id → layer name |
nodesByLayer | Map | Phase 2 | layer name → node.id[] |
COMMANDS | dict | Phase 3 | keys: install, dev, test, lint, build (any subset) |
FRAMEWORK | string | Phase 3 | Primary framework name (e.g. "Nuxt.js", "FastAPI") or "unknown" if manifest found but no match |
LANG | string | Phase 3 | Primary language (e.g. "TypeScript/JavaScript", "Python", "Rust", "Go") or empty if no manifest found |
PROJECT_SUMMARY | string | Phase 3 | One-line project summary from knowledge-graph project.description or first tour step (120 chars max) |
NON_OBVIOUS | string[] | Phase 4 | Up to 5 phrased bullet strings |
CONVENTIONS_DIRECTIVES | map or null | Phase 4 | Extracted directives from CONVENTIONS.md, grouped by category (safety, naming, patterns, workflow, other) |
$ARGUMENTS on whitespace.--force → FORCE=true, --dry-run → DRY_RUN=true, --with-ci → WITH_CI=true. Defaults: all
false.PROJECT_ROOT = CWD.PROJECT_ROOT is a directory. If not → print agent-context: <path> is not a directory. → stop.git -C <PROJECT_ROOT> rev-parse --git-dir. Success → IS_GIT_REPO=true. Failure → IS_GIT_REPO=false (warn,
continue).Run gates A → B → C → D in order. Gate A is hard (stop on failure). Gates B, C, D are soft (warn, continue).
Check <PROJECT_ROOT>/./understand-anything/knowledge-graph.json.
Missing — print verbatim and stop:
agent-context: knowledge graph not found.
This plugin needs ./understand-anything/knowledge-graph.json in the target
repo to generate useful context files. If you have not set up
Understand-Anything yet, run:
/plugin marketplace add Lum1104/Understand-Anything
/plugin install understand-anything
Then, in the repo you want to generate context for, run:
/understand
That will produce ./understand-anything/knowledge-graph.json. Re-run
/agent-context once it is present.
Present but not valid JSON — print verbatim and stop:
agent-context: knowledge graph is not valid JSON.
./understand-anything/knowledge-graph.json exists but cannot be parsed.
This usually means /understand was interrupted. Re-run:
/understand
and try again.
Missing required top-level keys (version, project, nodes, edges, layers) — print verbatim and stop:
agent-context: knowledge graph schema does not match what this plugin
expects. Required top-level keys: version, project, nodes, edges, layers.
Missing: <list>.
Update Understand-Anything (/plugin update understand-anything) or file
an issue at github.com/jonaskahn/agent-context describing the schema
mismatch.
Valid — set KNOWLEDGE_GRAPH to parsed object.
Skip if IS_GIT_REPO=false. Compare git rev-parse HEAD vs project.gitCommitHash.
Mismatch — set GRAPH_STALE=true. Print:
agent-context: knowledge graph was generated against commit <graph_hash>
but the repo is at <head_hash>. Generated files may be out of date.
Re-run /understand for the best results.
Match or no git — set GRAPH_STALE=false.
Also check project.analyzedAt: if older than 14 days from now, print a staleness warning. Continue either way.
Check <PROJECT_ROOT>/./understand-anything/domain-graph.json.
Missing — set DOMAIN_QUALITY="missing", DOMAIN_GRAPH=null. Print:
agent-context: domain graph not found. Glossary will be stubbed.
Run /understand-domain to populate docs/agents/glossary.md with
domain-level content.
Present — parse it. Set DOMAIN_GRAPH to parsed object. Compute quality grade:
HEURISTIC_COUNT = count of domain-type nodes whose summary contains "Heuristic"
TOTAL_COUNT = count of domain-type nodes (type == "domain")
if TOTAL_COUNT == 0: DOMAIN_QUALITY = "missing"
elif HEURISTIC_COUNT / TOTAL_COUNT >= 0.5: DOMAIN_QUALITY = "low"
elif HEURISTIC_COUNT / TOTAL_COUNT >= 0.1: DOMAIN_QUALITY = "mixed"
else: DOMAIN_QUALITY = "high"
Check <PROJECT_ROOT>/CONVENTIONS.md.
Found — read content. Set EXISTING_CONVENTIONS to content string. Print:
agent-context: found existing CONVENTIONS.md (<N> lines).
Existing conventions will be transformed into AI-targeted directives in docs/agents/conventions.md.
Existing conventions are parsed and distilled into docs/agents/conventions.md (terse AI directives, not verbatim
copy) and linked from AGENTS.md §6 (Deeper Context).
They are NOT inlined into AGENTS.md — the 100-line cap forbids it.
Missing — set EXISTING_CONVENTIONS=null. Print:
agent-context: no CONVENTIONS.md found.
Consider creating one with your team's coding standards, naming
conventions, and architectural decisions. These human-authored rules
complement the graph-derived context and will be merged into all
generated files on the next run.
Node key fields: id (opaque, file: or func: prefix), type ("file"|"function"), filePath (always present),
lineRange ([start,end], function nodes only), summary (generic if starts with "Source file " or ends with
"— function in this module."), complexity ("simple"|"moderate"|"complex").
Edge types: contains (file→function), imports (file→file, one-directional).
Layer: { id, name, description, nodeIds[] }. Pre-computed — do not recompute.
Tour: { order, title, description, nodeIds[] }. Dependency-ordered onboarding steps.
For full field-level documentation, see references/SCHEMAS.md §1–§6.
One pass each:
nodes[] → nodesById (Map: node.id → Node).edges[]:
type == "contains" → push target into containsOut[source]type == "imports" → push target into importsOut[source], push source into importsIn[target]layers[] → nodesByLayer (Map: layer.name → node.id[]), and for each nodeId:
layersByNodeId[nodeId] = layer.name.nodesById values where type == "function" → group by filePath into functionsByFile.nodesById. Print warning with orphan count if any.layer.nodeIds entries exist in nodesById. Same.tour[].nodeIds entries exist in nodesById. Same.nodes[] empty → all indexes are empty maps. Phase 4 produces zero signals. Phase 5 emits AGENTS.md with header +
§3 (if commands found) + §5 (Safety) + §6 (Deeper Context pointing to stubs). Omit §1, §2, §4.layers[] empty → layersByNodeId and nodesByLayer are empty. AGENTS.md §2 tagline becomes:
**No layers detected. Run /understand with more source files.**tour[] empty → AGENTS.md §1 has tagline and test sentence but zero bullets. Tagline becomes:
**Layers are the architecture. Read the module map below.**The graph does not contain build commands. Read manifests directly from PROJECT_ROOT:
If package.json exists, parse it:
scripts.dev → COMMANDS.devscripts.test → COMMANDS.testscripts.lint → COMMANDS.lintscripts.build → COMMANDS.buildInfer install command from lockfile. Check in this order, use first found:
bun.lockb → bun installpnpm-lock.yaml → pnpm installyarn.lock → yarn installpackage-lock.json → npm installnpm install (default)Set COMMANDS.install to the inferred command.
pip install -e .pytestcargo buildcargo testcargo checkgo build ./...go test ./...go vet ./...COMMANDS is empty. Omit AGENTS.md §3 entirely.
Run this step using whichever manifest was found above (or "none" if none found). Set FRAMEWORK, LANG, and
PROJECT_SUMMARY.
LANG — infer from which manifest was found:
package.json → "TypeScript/JavaScript"pyproject.toml → "Python"Cargo.toml → "Rust"go.mod → "Go""" (empty — omit Stack line from architecture.md)FRAMEWORK — scan the manifest found above for these keys (check in order listed, use first match):
package.json — inspect dependencies and devDependencies keys:
| Key present | FRAMEWORK |
|---|---|
nuxt or any @nuxtjs/* | "Nuxt.js" |
next | "Next.js" |
@nestjs/core | "NestJS" |
astro | "Astro" |
svelte | "Svelte" |
solid-js | "SolidJS" |
hono | "Hono" |
fastify | "Fastify" |
express | "Express" |
react | "React" |
vue | "Vue.js" |
| None of the above | "unknown" |
pyproject.toml — inspect [tool.poetry.dependencies] or [project.dependencies]:
| Key present | FRAMEWORK |
|---|---|
fastapi | "FastAPI" |
django | "Django" |
litestar | "Litestar" |
flask | "Flask" |
| None of the above | "unknown" |
Cargo.toml — inspect [dependencies]:
| Key present | FRAMEWORK |
|---|---|
actix-web | "Actix Web" |
axum | "Axum" |
rocket | "Rocket" |
| None of the above | "unknown" |
go.mod — inspect require block:
| Module present | FRAMEWORK |
|---|---|
github.com/gin-gonic/gin | "Gin" |
github.com/labstack/echo | "Echo" |
github.com/gofiber/fiber | "Fiber" |
| None of the above | "unknown" |
No manifest → FRAMEWORK = "" (empty).
PROJECT_SUMMARY — derive from KNOWLEDGE_GRAPH:
project.description is non-empty → use it (truncate to 120 chars at word boundary).tour is non-empty → use tour[0].description (truncate to 120 chars at word boundary)."" (empty).Apply 5 signals. Each produces zero or more candidate bullets. Rank all candidates by rarity. Take top 3–5. Phrase every bullet negation-forward (lead with "Don't", "No", "Never", or "If X, stop").
For each imports edge, look up source and target layers via layersByNodeId. For each (source_layer, target_layer)
pair, count edges. Pairs with count == 1 or count == 2 are anomalies.
Phrase each anomaly as:
- {source_layer} rarely imports {target_layer} directly — the one exception is \{source.filePath}` importing
`{target.filePath}`. Don't remove it.`
Rarity per candidate: 1.0 / count (where count is the pair's edge count).
For each layer with >=5 file nodes:
., -, and _..vue, .ts).Phrase as:
- Most {layer} files end in \{token}`. Don't rename the exceptions — {list of up to 3 deviators} — they are
intentional.`
Rarity per candidate: 1.0 / deviator_count.
For each file node, predict its layer from filePath top-level directory prefix:
app/pages/ or pages/ → "Pages"app/components/ or components/ → "Components"app/composables/ or composables/ → "Composables"server/ → "Server"app/utils/ or utils/ or lib/ → "App utils" or "Utility"src/ → infer from next directory segmentCompare predicted layer to actual layer from layersByNodeId. Collect disagreements.
If total disagreements > 3: skip this signal entirely (bulk disagreements indicate graph-level misclassification, not conventions).
If <= 3 disagreements, phrase each as:
- \{filePath}` lives under {predicted} by path but is classified as {actual}. Don't reorganise it.`
Rarity per candidate: 1.0 / total_disagreement_count.
Select precedence array based on project.frameworks:
["Pages", "Components", "Composables", "App utils", "Server"]["API", "Service", "Data", "Utility"]For each imports edge, get source and target layer positions in the precedence array. If target position < source
position (target is "higher" than source), it is an upward violation.
Skip edges where either layer is not in the precedence array.
Phrase as:
- {source_layer} normally does not import from {target_layer}, but \{source.filePath}` does. If removing it, verify
it is not an event callback.`
Rarity per candidate: 1.0 / violation_count_for_this_layer_pair.
NON_OBVIOUS to the selected bullet strings.EXISTING_CONVENTIONS not null)Parse EXISTING_CONVENTIONS into AI-targeted directives and set CONVENTIONS_DIRECTIVES.
Step 1 — Identify imperative lines. For each line or bullet in EXISTING_CONVENTIONS, check if it contains any
of the following keywords (case-insensitive): must, must not, never, always, don't, do not, avoid,
use, prefer, require. Lines matching at least one keyword are rule candidates. Lines that are headings
(#-prefixed), blank, or pure prose narrative (no imperative verb) are skipped.
Step 2 — Strip rationale. For each candidate, truncate at the first occurrence of —, because, (this,
or . that follows the core directive clause. Keep only the imperative clause.
Step 3 — Normalize prefix.
must not, never, don't, do not, avoid, no ): normalize prefix to
MUST NOT.must, always, require, use, prefer): normalize prefix to MUST.Step 4 — Categorize each directive into exactly one bucket:
safety — keywords: secret, credential, env, migration, destructive, delete, drop, test disab, commitnaming — keywords: name, naming, case, suffix, prefix, file name, variable, module name, casingpatterns — keywords: import, abstract, class, struct, coupling, layer, circular, dependworkflow — keywords: phase, PR, pull request, review, gate, branch, deploy, merge, approvalother — anything not matching the aboveStep 5 — Deduplicate. For each directive, check if it semantically overlaps with any string in NON_OBVIOUS
(same file path mentioned, or >70% word overlap). If so, skip it — NON_OBVIOUS already surfaces it.
Step 6 — Set result. If at least one directive was extracted: set CONVENTIONS_DIRECTIVES to a map of
{safety: [...], naming: [...], patterns: [...], workflow: [...], other: [...]} (omit empty categories).
If zero directives were extracted: set CONVENTIONS_DIRECTIVES = null.
| Condition | Action |
|---|---|
| File does not exist | Create |
File exists + FORCE=false | Skip. Add to "skipped" list for Phase 7. |
File exists + FORCE=true | Overwrite |
AGENTS.md exists + contains ## Absolute rules + FORCE=true | Overwrite all sections except ## Absolute rules — read the existing file, extract the section from its heading to the next ## heading, and splice it into the freshly-generated content in place of the template's §5. This protects user customisations across forced refreshes. |
.claude/settings.json (any state) | Always merge (union deny arrays, preserve existing hooks). Never overwrite. |
.gitignore (any state) | Always append CLAUDE.local.md if line not already present. |
.aider.conf.yml exists | Merge: append to read list if not present. |
DRY_RUN=true | For all files including merge targets: compute final content (reading existing files for merges), print between ===== FILE: <path> ===== separators, write nothing. |
| # | File | Condition | Template |
|---|---|---|---|
| 1 | docs/agents/tech-debt.md | always | TEMPLATES.md §11 |
| 2 | docs/agents/testing.md | always | TEMPLATES.md §10 |
| 3 | docs/agents/glossary.md | always | TEMPLATES.md §7 (if quality "high"/"mixed") or §8 (if "low"/"missing") |
| 4 | docs/agents/conventions.md | only if EXISTING_CONVENTIONS not null | TEMPLATES.md §9 |
| 5 | docs/agents/patterns.md | always | TEMPLATES.md §6 |
| 6 | docs/agents/architecture.md | always | TEMPLATES.md §5 |
| 7 | docs/agents/flow.md | always | TEMPLATES.md §19 |
| 8 | .claude/settings.json | always (merge) | TEMPLATES.md §4 |
| 9 | .gitignore | always (append) | — |
| 10 | CLAUDE.local.md | always | TEMPLATES.md §3 |
| 11 | CLAUDE.md | always | TEMPLATES.md §2 |
| 12 | AGENTS.md | always | TEMPLATES.md §1 |
| 13 | .cursor/rules/agents.mdc | always | TEMPLATES.md §12 |
| 14 | .github/copilot-instructions.md | always | TEMPLATES.md §13 |
| 15 | .codex/instructions.md | always | TEMPLATES.md §14 |
| 16 | CONVENTIONS.md | only if EXISTING_CONVENTIONS is null | TEMPLATES.md §15 |
| 17 | .aider.conf.yml | always (merge if exists) | TEMPLATES.md §16 |
| 18 | .github/workflows/agent-context-freshness.yml | only if WITH_CI=true | TEMPLATES.md §17 |
| 19 | hooks/check-freshness.sh | only if WITH_CI=true | TEMPLATES.md §18 (chmod +x) |
AGENTS.md is the most critical output. 6 numbered H2 sections. Target 70–100 lines. Hard cap 100 lines.
Read TEMPLATES.md §1 for the structural template. Apply these derivation rules:
Header:
# {project.name}project.descriptionA {languages[0]}/{languages[1]} codebase built with {frameworks[0]}, {frameworks[1]}, and {frameworks[2]}. (use
first 2 languages, first 3 frameworks; omit missing items)GRAPH_STALE=true, insert after header:
> ⚠ Graph generated at commit {graph_hash[:7]}; repo is at {head_hash[:7]}. Re-run /understand for current context.§1 Architectural Altitude:
**{top_layer} is the main stage. {second_layer} is the backstage.** (layers sorted by node count desc). If
1 layer: **{layer} is the architecture. Read the module map below.** If 0 layers:
**No layers detected. Run /understand with more source files.**- To understand {step.description (lowercase first char)}, start at \{filePath
of first nodeId}`.`The test: open AGENTS.md cold, name the top three layers without scrolling.§2 Module Map:
**Layers are disjoint. Don't blur them.**- {layer.name} ({nodeCount}) — {layer.description}- Other layers: {comma-separated remaining names}.- No layers detected.The test: every file under {primary_source_dir}/ maps to exactly one layer above.§3 Commands (omit entire section if COMMANDS is empty):
**One way to run things. Use it.**The test: a fresh clone should run green after pasting the install and dev commands.§4 Non-Obvious Conventions (omit entire section if NON_OBVIOUS is empty):
**Match existing shape. Don't normalise the outliers.**NON_OBVIOUS list from Phase 4.The test: grep for the convention in two more places before assuming it holds.§5 Absolute rules (partially static, partially derived):
H3 subsections are permitted within this section only (exception to Rule 3). MUST/MUST NOT prefixes are permitted within this section only (exception to Rule 9).
**Read and follow. No exceptions, no workarounds.**### Safety with fixed bullets:
- MUST NOT commit secrets, \.env` files, or credentials.`- MUST NOT edit migrations after they have been applied.- MUST NOT disable tests to make them pass.- MUST NOT run destructive commands without explicit human approval.- When a hook blocks a command, stop and ask — never work around it.### While coding with fixed bullets:
- MUST NOT add abstractions beyond what is planned.- MUST NOT improve or refactor adjacent unrelated code.- MUST state assumptions explicitly; if uncertain, ask before proceeding.### Project-specific (emit only if CONVENTIONS_DIRECTIVES not null):
CONVENTIONS_DIRECTIVES.safety: each directive not already present in the Safety bullets above.CONVENTIONS_DIRECTIVES.patterns: each directive not already present in the While coding bullets above.### Project-specific subsection entirely.The test: line in this section.§6 Deeper Context:
**AGENTS.md is the kernel. Below it, read on demand.**- docs/agents/architecture.md — project overview, stack, quick start, layer map.- docs/agents/flow.md — entry points, business flows, execution paths.- docs/agents/patterns.md — recurring patterns with file:line exemplars.DOMAIN_QUALITY is "high" or "mixed": - docs/agents/glossary.md — canonical vocabulary.EXISTING_CONVENTIONS not null: - docs/agents/conventions.md — AI-targeted coding directives.- docs/agents/testing.md — runner, layout, mock stance.- docs/agents/tech-debt.md — known gotchas.The test: if the answer is in AGENTS.md, don't open \docs/agents/`.`Footer:
---Working if: agents stop asking "where does X live?", hook denials are respected, and PRs match the conventions above without being told.
Apply these rules during generation. If line count exceeds 100, cut lowest-value section first (§4 before §3 before §6).
## 1. Title). No H3s except within §5 Absolute rules, which uses H3 for Safety/While
coding/Project-specific subsections. Maximum 7 sections."..." for jargon. Backticks only for identifiers, paths, commands.The test: <sentence>. line. Exception: §5 Absolute rules has no test line.--- then Working if: paragraph. No sign-off.→ for before/after transforms, one line each, max three per section.For each file below, read the corresponding template from references/TEMPLATES.md at the indicated section number. The
template contains the structural scaffold; derivation rules are specified there alongside each template.
docs/agents/architecture.md (TEMPLATES.md §5):
PROJECT_SUMMARY, FRAMEWORK, LANG (set in Phase 3).COMMANDS dict (set in Phase 3). Omit block if COMMANDS is empty.importsIn count desc, capped at 10 per layer.imports edges AND >=1 outgoing edge.imports edges crossing layers, grouped by (source_layer → target_layer), counted.docs/agents/flow.md (TEMPLATES.md §19):
DOMAIN_QUALITY is "high" or "mixed": render Business flows section.
domains_with_flows: domain-type nodes with >=1 outgoing contains_flow edge, sorted by outgoing-edge count
desc.domainMeta.entryPoint, domainMeta.entryType, and summary (
if non-generic).DOMAIN_QUALITY is "low", "missing", or DOMAIN_GRAPH is null): render entry-points fallback only.
imports edges AND >=1 outgoing edge).docs/agents/patterns.md (TEMPLATES.md §6):
complexity == "complex", as table.importsIn count, as table.docs/agents/glossary.md (TEMPLATES.md §7 or §8):
DOMAIN_QUALITY "high" or "mixed": use §7. Compute per-entry confidence score:
score = 0
if "Heuristic" not in node.summary: score += 3
if len(node.summary) > 80 chars: score += 1
if node has >= 1 outgoing edge: score += 1
if node has related flow nodes: score += 1
Score >= 4 → full entry. Score 2–3 → compact entry. Score < 2 → omit.
Group by clusters (nodes connected by cross_domain edges). Sort clusters by outgoing-edge count desc. Within
cluster, sort by score desc. No cross_domain edges → alphabetical.DOMAIN_QUALITY "low": use §8 variant B.DOMAIN_QUALITY "missing": use §8 variant A.docs/agents/conventions.md (TEMPLATES.md §9):
EXISTING_CONVENTIONS is not null.docs/agents/testing.md (TEMPLATES.md §10):
*.test.*, *.spec.*, test_*, tests/*). Report co-located /
separate / mixed.[to fill] placeholder (the only allowed placeholder in any output).docs/agents/tech-debt.md (TEMPLATES.md §11):
.claude/settings.json (TEMPLATES.md §4):
{{stop_hook_command}} per rules in TEMPLATES.md §4..gitignore: append CLAUDE.local.md as its own line if not already present. Create file if missing.
CLAUDE.md (TEMPLATES.md §2): exact content @AGENTS.md.
CLAUDE.local.md (TEMPLATES.md §3): 3-line stub.
Multi-vendor files (TEMPLATES.md §12–§16):
.cursor/rules/agents.mdc: AGENTS.md content without H1, wrapped in MDC frontmatter..github/copilot-instructions.md: AGENTS.md verbatim..codex/instructions.md: AGENTS.md verbatim.CONVENTIONS.md (Aider): AGENTS.md verbatim. Skip if existing CONVENTIONS.md was found — print:
⏭ CONVENTIONS.md — preserved (existing content copied to docs/agents/conventions.md).aider.conf.yml: create or merge. Append CONVENTIONS.md to read list if not present.CI files (TEMPLATES.md §17–§18, only if WITH_CI=true):
.github/workflows/agent-context-freshness.yml: use template verbatim.hooks/check-freshness.sh: use template verbatim. chmod +x.Read AGENTS.md back from disk. Run these 6 quick-checks. Report pass/fail per check. Do NOT fail the overall run.
^## line matches ^## \d+\. [A-Z]. No ^### lines.**.The test: line.MUST, NEVER, ALWAYS (all-caps words).``` — must be <= 2.For the full 20-rule mechanical lint with regex patterns, see references/SCHEMAS.md §8.
Print this template, substituting values. Use ✓ for created, ⏭ for skipped, ⚠ for warnings.
agent-context — summary
Gates:
✓ knowledge-graph.json present (v<version>, analysed <date>, commit <hash[:7]>)
[⚠ stale warning if GRAPH_STALE]
[✓|⚠] domain-graph.json [present (quality: <grade>) | not found]
[✓ CONVENTIONS.md found (<N> lines) — copied to docs/agents/conventions.md]
[ℹ no CONVENTIONS.md — consider creating one]
Files:
✓/⏭ AGENTS.md (<N> lines)
✓/⏭ CLAUDE.md (1 line)
✓/⏭ CLAUDE.local.md (3 lines)
✓/⏭ .claude/settings.json [created | merged; <N> new deny entries]
✓/⏭ docs/agents/architecture.md (<N> lines)
✓/⏭ docs/agents/flow.md (<N> lines)
✓/⏭ docs/agents/patterns.md (<N> lines)
✓/⏭ docs/agents/glossary.md (<N> lines)
[✓/⏭ docs/agents/conventions.md (<N> lines)]
✓/⏭ docs/agents/testing.md (<N> lines)
✓/⏭ docs/agents/tech-debt.md (<N> lines, stub)
✓ .gitignore [updated | already present]
Cross-vendor:
✓/⏭ .cursor/rules/agents.mdc (synced from AGENTS.md)
✓/⏭ .github/copilot-instructions.md (synced from AGENTS.md)
✓/⏭ .codex/instructions.md (synced from AGENTS.md)
[✓/⏭ CONVENTIONS.md (created from AGENTS.md)]
[⏭ CONVENTIONS.md (preserved — existing)]
✓/⏭ .aider.conf.yml [created | merged]
CI (--with-ci):
[✓/⏭ .github/workflows/agent-context-freshness.yml]
[✓/⏭ hooks/check-freshness.sh]
Lint (AGENTS.md, 6 quick-checks):
✓ <N>/6 passed
[✗ check <N>: <description> if failed]
Next:
1. Review AGENTS.md — address any lint failures above.
2. Hand-curate docs/agents/glossary.md if business terms are missing.
3. Fill Mock stance in docs/agents/testing.md.
[4. Re-run /understand — graph is stale.]
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub jonaskahn/agent-context --plugin agent-context