ADR Formatting Guide
How to format Architecture Decision Records for Arc Memory
ADR Formatting Guide
This guide explains how to format Architecture Decision Records (ADRs) for optimal integration with Arc Memory.
What are ADRs?
Architecture Decision Records (ADRs) are documents that capture important architectural decisions made along with their context and consequences. They provide a record of the “why” behind code changes and system design.
Why Use ADRs with Arc Memory?
Arc Memory can parse and integrate ADRs into the knowledge graph, connecting them to:
- Commits that implement the decisions
- Pull requests related to the decisions
- Issues that motivated the decisions
- Code that was affected by the decisions
This creates a comprehensive view of not just what changed, but why it changed.
ADR Directory Structure
Arc Memory looks for ADRs in the following locations by default:
You can specify a custom location with:
ADR File Naming
Arc Memory supports the following naming conventions:
-
Numbered format:
NNNN-title-with-dashes.md
- Example:
0001-use-postgresql-for-database.md
- Example:
-
Date-based format:
YYYY-MM-DD-title-with-dashes.md
- Example:
2023-01-15-use-postgresql-for-database.md
- Example:
-
ADR prefix:
adr-NNNN-title-with-dashes.md
- Example:
adr-0001-use-postgresql-for-database.md
- Example:
ADR Content Format
Arc Memory supports multiple ADR formats, but the recommended format is:
Example ADR
Alternative ADR Formats
Arc Memory also supports these alternative formats:
Lightweight Format
MADR Format (Markdown Any Decision Records)
Linking ADRs to Code
To maximize the value of ADRs in Arc Memory, link them to code in the following ways:
1. Reference ADRs in Commit Messages
2. Reference ADRs in Pull Request Descriptions
3. Reference ADRs in Code Comments
4. Reference Issues and PRs in ADRs
In your ADR, include references to related issues and PRs:
ADR Templates
You can create a new ADR using the Arc Memory CLI:
This will create a new ADR with the recommended format in your ADR directory.
Viewing ADRs in Arc Memory
After building the knowledge graph with ADRs:
Best Practices
- Keep ADRs concise: Focus on the key information
- Use a consistent format: Stick to one format for all ADRs
- Number ADRs sequentially: Makes them easier to reference
- Update the status: Keep the status field up to date
- Link to related artifacts: Reference issues, PRs, and other ADRs
- Include dates: Always include the decision date
- Explain context thoroughly: The context is crucial for understanding the decision
- Document alternatives: Include alternatives that were considered
- Capture consequences: Document both positive and negative consequences
Common Mistakes
- Too much detail: ADRs should be concise and focused
- Missing context: Without context, the decision is hard to understand
- No status updates: ADRs should be updated when their status changes
- Inconsistent formatting: Makes it harder to parse and understand
- No references: Missing links to related artifacts reduces traceability
See Also
- ADR GitHub Repository - For more information about ADRs
- MADR Format - For details on the MADR format
- Examples Directory - For examples of building graphs with ADRs