agentleFS
Atypical-ConsultingAtypical-Consulting/AdrMcp/CLAUDE.md

AdrMcp

CLAUDE.md1 starsChanged 4 months agoMITView on GitHub

Guidance for Claude Code (and other agents) working in this repository. AdrMcp is an MCP server for Architectural Decision Records (ADRs). It lets an agent navigate, author, validate, link, and analyze decision records stored as Markdown files on disk. It targets .NET 10, communicates over the stdio transport using the ModelContextProtocol SDK, and exposes 18 tools. All mutating tools are preview-by-default. The code is layered: Tools → Services → Models / Interfaces, wired together with dependency injection in AdrMcp/Program.cs, which…

The file

Files
CLAUDE.md

CLAUDE.md

Guidance for Claude Code (and other agents) working in this repository.

What this project is

AdrMcp is an MCP server for Architectural Decision Records (ADRs). It lets an agent navigate, author, validate, link, and analyze decision records stored as Markdown files on disk. It targets .NET 10, communicates over the stdio transport using the ModelContextProtocol SDK, and exposes 18 tools. All mutating tools are preview-by-default.

Architecture

The code is layered: Tools → Services → Models / Interfaces, wired together with dependency injection in AdrMcp/Program.cs, which builds and runs the stdio MCP host.

  • AdrMcp/Tools/ — MCP tool surface, grouped by concern:
    • NavigationTools — list_adrs, get_adr, search_adrs, get_adr_index, find_related_adrs, get_adr_graph
    • AuthoringTools — create_adr, update_adr, set_status, supersede_adr, link_adrs, validate_adr
    • IntelligenceTools — detect_conflicts, find_stale_adrs, coverage_report, suggest_adr_from_change
    • UtilityTools — render_index, diff_adr Tool methods are annotated with [McpServerTool]; every parameter carries a [Description].
  • AdrMcp/Services/ — business logic: AdrRepositoryService, AdrValidationService, AdrGraphService, AdrTemplateService, AdrLifecycle, SearchService, FileSystemCodeLinkProvider, LexicalEmbeddingProvider, plus helpers (DiffUtil, MarkdownSections, Slug, Map, EnumMap, Authoring) and AdrOptions for configuration.
  • AdrMcp/Interfaces/ — abstractions the services implement and depend on: IAdrRepository, IAdrValidator, IAdrGraphService, IAdrTemplateService, ISearchService, ICodeLinkProvider, IEmbeddingProvider.
  • AdrMcp.Tests/ — xUnit test project mirroring the source layout.

Storage format

ADRs are Markdown files under docs/adr/, one file per decision, numbered and slugged (e.g. 0000-record-architecture-decisions.md). The default authoring format is MADR 4.0; a Nygard template is also supported. An index can be regenerated with render_index.

Reading legacy corpora. AdrRepositoryService also reads classic Nygard-format files that have no YAML frontmatter at all — the original Nygard/adr-tools convention (title/date/status/context/decision/consequences, nothing else). This only kicks in for files matching the NNNN-slug.md naming; title/date/status are recovered from the body (a Date: YYYY-MM-DD line, the ## Status section — including a Superseded by [NNNN](...) line, which also records the structured supersession link). The first mutating tool call against such a file upgrades it to the frontmatter format on save, since writes are preview-by-default and the added frontmatter is a visible diff before it's applied.

Conventions

  • Preview-by-default writes. Any tool that creates or changes files (create_adr, update_adr, set_status, supersede_adr, link_adrs, render_index) returns a preview of the intended change and only applies it when the caller explicitly confirms. Preserve this behavior when adding or modifying tools.
  • Lifecycle. Status transitions (proposed → accepted / rejected → deprecated / superseded) are enforced through AdrLifecycle. Supersession and linking maintain bidirectional links between records.
  • Provider-based code linking. Associating ADRs with source code and detecting stale decisions goes through ICodeLinkProvider (default: FileSystemCodeLinkProvider). Intelligence tools (find_stale_adrs, coverage_report, suggest_adr_from_change, detect_conflicts) build on this abstraction — keep the provider seam intact rather than reaching into the filesystem directly from tools.
  • Search. SearchService combines lexical matching with semantic (embedding-based) search via IEmbeddingProvider.

Skills

Three Claude skills live in .claude/skills/:

  • adr-author — guided authoring of a new decision record
  • adr-review — reviewing/critiquing an existing ADR
  • adr-supersede — driving the supersession lifecycle and bidirectional links

Build and test

The solution uses the new XML solution format, AdrMcp.slnx.

dotnet build AdrMcp.slnx
dotnet test AdrMcp.slnx

CI gates merges at 80% line coverage. Keep new code covered.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.