Context

From rvdbreemen/adr-kit · View interactive version

Context is an AI agent skill from the GitHub repository rvdbreemen/adr-kit. Find ADRs relevant to a task before implementation. Use for ADR context, governing decisions, architecture constraints, or why a design exists. Read-only.

How to use this skill

Skill file

adr-kit context

Reply in the language the user writes in; default to English. Keep command output, identifiers, paths, and ADR file content unchanged.

Use $ARGUMENTS as the task topic. If empty, use the current user request or

ask for one short topic when the request does not identify one.

You are running /adr-kit:context. Purpose: surface the ADRs that constrain the

task at hand before writing code, so you implement within existing decisions

instead of rediscovering or contradicting them. This is read-only — it never

edits ADRs or code, so it is safe to call from parallel subagents.

Procedure

  1. Take the topic from the argument. If none was given, ask the user for a short

topic or task description (one phrase is enough).

  1. Treat schema-v2 docs/adr/ADR-INDEX.json as the generated local query

database. Never treat it as the decision authority or edit it by hand; source

Markdown remains authoritative. Run the shared deterministic query engine

from the project root and keep the default limit of 5:

```bash

python <adr-kit-plugin-path>/bin/adr-context --format json --limit 5 "<topic>"

```

docs/adr/.

(default 0.1).

Filter with --status or --authority; use --history only when the

task needs Rejected, Superseded, or Deprecated rationale.

python bin/adr-index docs/adr as the repair command. Use

--strict-index when fallback would be unsafe.

  1. If the result is an empty list ([]): tell the user plainly —

*"No ADRs match '<topic>'; all existing ADRs may apply, or none constrain

this work."* Do not invent relevance. Stop here.

  1. Otherwise, for each returned ADR, Read the file and present it as

readable context, not just a filename:

Order by relevance (highest first), most relevant ADR last in your message so

it stays closest to the work that follows.

  1. Briefly state the net constraint: in one or two sentences, what these

decisions require or forbid for the task. Then proceed with (or hand back to)

the implementation.

Boundaries

comply". Do not inflate scores to seem thorough.

the results, widen with a different topic or lower --min-score rather than

assuming no ADR exists.

merely to discover relevance.

with an Accepted ADR, surface the conflict and use /adr-kit:judge or

/adr-kit:adr to resolve it.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.