Architecture Decision Record (ADR) management skill. An agent skill from rvdbreemen/OTGW-firmware.

MITAuto-check passedDevelopment

Install Adr

skills CLI
$ npx skills add rvdbreemen/OTGW-firmware --skill adr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rvdbreemen/OTGW-firmware adr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rvdbreemen/OTGW-firmware.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/adr .claude/skills/adr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
adr
GitHub stars
207
Token cost
~7.7k tokens
SKILL.md length
1,483 words
Files
6
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Architecture Decision Record (ADR) management skill. An agent skill from rvdbreemen/OTGW-firmware.

  • Works in 3 steps: During Implementation → After Implementation → When Superseding an ADR
  • Tasks that involve Architecture decision records
  • SKILL.md covers Overview, When to Use, Initial Codebase Analysis and ADR Principles, plus 7 more sections
  • Calls python

What it does

Adr is an agent skill from rvdbreemen/OTGW-firmware. Architecture Decision Record (ADR) management skill. Creates, maintains, and enforces architectural decisions. Ensures code changes align with documented decisions. Documents alternatives considered and rejected. Facilitates architectural planning and human decision documentation.

Its SKILL.md is about 7.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `ALWAYS_USE_SKILL.md`, `IMPLEMENTATION_SUMMARY.md` and `QUICK_START.md`).

It sits in Development, covering Architecture decision records. It works with Home Assistant. The repository describes itself as: A ESP8266 devkit firmware for the Nodoshop version of the Opentherm Gateway (OTGW). The licence is MIT.

When your agent uses it

  • Tasks that involve Architecture decision records

Example prompts

  • “/adr”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. During Implementation
  2. After Implementation
  3. When Superseding an ADR

What it can do on your machine

Read from SKILL.md and the folder at commit 5e66c3b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • adr.github.io
    • cognitect.com
    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Adr loads about 7.7k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 1,483 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~7.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rvdbreemen/OTGW-firmware at commit 5e66c3b, republished under its MIT licence (© rvdbreemen). 1,483 words, ~7,666 tokens.

Download SKILL.mdSave it as .claude/skills/adr/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
adr
description
Architecture Decision Record (ADR) management skill. Creates, maintains, and enforces architectural decisions. Ensures code changes align with documented decisions. Documents alternatives considered and rejected. Facilitates architectural planning and human decision documentation.
license
MIT

ADR-Skill: Architecture Decision Record Management

Overview

This skill enables systematic creation, maintenance, and enforcement of Architecture Decision Records (ADRs) for the OTGW-firmware project. ADRs document significant architectural choices along with their context, alternatives considered, and consequences. They serve as living documentation to help current and future developers understand why the system is built the way it is.

When to Use

Automatic Trigger Scenarios

Use this skill automatically when:

  • Code review or PR analysis - Verify changes align with existing ADRs
  • CI/CD automation review - Enforce architectural compliance
  • Major code changes - Check if new ADR is needed
  • Architecture planning - Document important decisions before implementation
  • Refactoring proposals - Validate against existing decisions or create new ADR
Explicit User Requests

Use this skill when user mentions:

  • "Create an ADR"
  • "Document this decision"
  • "Architecture decision"
  • "Why did we choose..."
  • "Alternatives considered"
  • "Document my choice"
Decision Triggers

Create a new ADR when making a decision that:

  • Has long-term impact on architecture
  • Affects multiple components or modules
  • Involves trade-offs between alternatives
  • Constrains future development choices
  • Addresses a significant technical challenge
  • Changes existing architectural patterns
  • Requires human decision that should be preserved
Do NOT Create ADR For
  • Bug fixes that don't change architecture
  • Code refactoring maintaining same structure
  • Configuration changes
  • Documentation updates (non-architectural)
  • Minor feature additions within existing patterns
  • Temporary workarounds or experiments

Initial Codebase Analysis

First-Time Use: Discovering Undocumented Decisions

IMPORTANT: On first use or when introducing this skill to an existing codebase, perform a comprehensive architectural analysis to identify and document existing but undocumented decisions.

Analysis Workflow

Step 1: Identify Architectural Patterns

bash
# Areas to analyze:
1. Platform choices (ESP8266, Arduino, frameworks)
2. Memory management patterns (static buffers, PROGMEM)
3. Network architecture (protocols, security models)
4. Integration patterns (MQTT, APIs, WebSocket)
5. Core system design (timers, scheduling, persistence)
6. Hardware interfaces (sensors, watchdog, GPIO)
7. Build and development tools

Step 2: Ask Critical Questions

For each pattern discovered:
- WHY was this approach chosen? (context, constraints)
- WHAT alternatives exist? (at least 2-3 viable options)
- WHY were alternatives rejected? (specific technical reasons)
- WHAT are the consequences? (benefits, costs, risks)
- HOW is this implemented? (code examples, key files)
- WHEN was this decided? (estimate if unknown)

Step 3: Generate ADRs Systematically

For each undocumented architectural decision:
1. Use the explore agent to understand the pattern
2. Review code, comments, git history for context
3. Identify constraints (memory, performance, compatibility)
4. Research alternatives (even if obvious)
5. Document consequences (positive AND negative)
6. Create ADR with Status: Accepted (since implemented)
7. Link to actual implementation (files, commits)

Step 4: Prioritize Documentation

Start with foundational decisions that:
- Affect multiple components
- Constrain future choices
- Are non-obvious or counterintuitive
- Have significant trade-offs
- Are frequently questioned
Initial Analysis Prompts

Trigger codebase analysis:

"Analyze this codebase to identify undocumented architectural decisions"
"Generate ADRs for existing architectural patterns in this codebase"
"What architectural decisions should be documented in this project?"

For specific areas:

"Identify and document memory management architectural decisions"
"What network architecture decisions are undocumented?"
"Analyze platform choices and create ADRs"
Example: Discovering ADR-009 (PROGMEM)

Pattern discovered: String literals use F() and PSTR() macros throughout codebase

Critical questions:

  • WHY? → ESP8266 has only 40KB RAM; string literals waste 5-8KB
  • Alternatives? → Keep in RAM, external RAM, compressed strings, string table
  • Why rejected? → RAM too limited, hardware changes, complexity, doesn't solve problem
  • Consequences? → +5-8KB heap (positive), verbose code (negative), flash slower than RAM (accepted)

Result: ADR-009 documents mandatory PROGMEM usage with clear rationale


ADR Principles

The Golden Rules
  1. One Decision Per ADR - Each ADR captures a single architectural choice
  2. Immutable History - Never modify accepted ADRs; supersede with new ones instead
  3. Context is King - Explain WHY the decision was made, not just WHAT
  4. Alternatives Matter - Document what was considered but rejected
  5. Human Decisions Marked - Clearly indicate when decision came from user/stakeholder
  6. Critical Analysis - Be thorough, question assumptions, document trade-offs honestly
  7. Understandable Language - Write for developers unfamiliar with the decision; avoid unexplained jargon
ADR Best Practices
✓ Write for future developers who weren't there
✓ Include code examples and diagrams
✓ Reference related ADRs
✓ Use clear, simple language
✓ Document constraints that drove the decision
✓ Explain consequences (positive and negative)
✓ Link to implementation (files, PRs, commits)
✓ Be critical - question the decision, document risks
✓ Provide specific evidence (measurements, benchmarks)
✓ Explain technical terms on first use

✗ Don't use jargon without explanation
✗ Don't assume reader knows the context
✗ Don't skip alternatives (even obvious ones)
✗ Don't make assumptions unstated
✗ Don't forget to update status when superseding
✗ Don't be vague ("it's better", "improves performance")
✗ Don't skip negative consequences
✗ Don't write marketing copy - be honest about trade-offs

ADR Template

Use this comprehensive template for all new ADRs:

markdown
# ADR-XXX: [Concise Decision Title]

**Status:** Proposed | Accepted | Deprecated | Superseded by ADR-XXX  
**Date:** YYYY-MM-DD  
**Decision Maker:** [Copilot Agent | User: Name | Team Discussion]

## Context

### Problem Statement
[What problem are we solving? What is the situation or challenge?]

### Background
[Relevant history, current state, or technical context]

### Constraints
[What constraints apply? Hardware, memory, security, compatibility, budget, timeline?]

### Stakeholders
[Who is affected by this decision? Users, developers, operations, integrations?]

## Decision

[Clear statement of the choice made and rationale]

### Why This Choice
[Explain reasoning behind the decision]

### Implementation Summary
[High-level description of how this will be implemented]

## Alternatives Considered

### Alternative 1: [Name]
**Description:** [What is this alternative?]

**Pros:**
- Benefit 1
- Benefit 2

**Cons:**
- Drawback 1
- Drawback 2

**Why Not Chosen:** [Clear explanation]

### Alternative 2: [Name]
[Repeat structure for each alternative]

[Include at least 2-3 alternatives. If none exist, explain why this is the only viable option.]

## Consequences

### Positive
- **[Benefit Category]:** Specific benefit
- **[Another Category]:** Another benefit

### Negative
- **[Cost/Limitation]:** Specific drawback
- **[Trade-off]:** What we're giving up

### Risks & Mitigation
- **Risk:** [Description]  
  **Mitigation:** [How we address this]

### Impact Areas
- **Performance:** [Impact on system performance]
- **Maintainability:** [Impact on code maintenance]
- **Security:** [Security implications]
- **Scalability:** [Scaling implications]
- **Developer Experience:** [Impact on development]

## Implementation Notes

### Key Files/Modules Affected
- `path/to/file.ext` - [Brief description of changes]
- `another/file.ext` - [Brief description]

### Code Examples

```language
// Example showing how this decision is implemented
function example() {
  // Demonstrate the pattern
}
Migration Required

[If this changes existing code, describe migration steps. Otherwise state "None."]

Verification

How to Verify This Decision

[How can a developer verify this decision is being followed?]

Testing Requirements

[What testing ensures this decision is properly implemented?]

Monitoring/Metrics

[What metrics indicate this decision is working?]

  • Depends on: ADR-XXX ([Title])
  • Related to: ADR-XXX ([Title])
  • Supersedes: ADR-XXX ([Title]) - if applicable
  • Superseded by: ADR-XXX ([Title]) - if applicable

References

  • [Link to relevant documentation]
  • [Link to code examples]
  • [Link to related issues/PRs]
  • [External resources]
  • [Standards or specifications]

Timeline

  • YYYY-MM-DD: Initial proposal
  • YYYY-MM-DD: Discussion/review
  • YYYY-MM-DD: Accepted
  • YYYY-MM-DD: Implemented
  • YYYY-MM-DD: Superseded (if applicable)

Metadata:

  • ADR Number: XXX
  • Status: [Current status]
  • Category: [Platform/Memory/Network/Integration/etc.]
  • Impact: [High/Medium/Low]

---

## Naming Convention

### ADR File Naming

Format: ADR-XXX-short-descriptive-title.md

Where:

  • XXX = Zero-padded sequential number (001, 002, ..., 029, 030, etc.)
  • short-descriptive-title = Kebab-case description

Examples: ✓ ADR-001-esp8266-platform-selection.md ✓ ADR-009-progmem-string-literals.md ✓ ADR-029-simple-xhr-ota-flash.md

✗ ADR-1-esp8266.md (not zero-padded) ✗ ADR-030-This_Is_Wrong.md (not kebab-case) ✗ adr-030-lowercase-adr.md (ADR prefix must be uppercase)


### Number Assignment

- Sequential numbering starting from 001
- Check `docs/adr/` for highest number and increment
- Don't reuse numbers from deprecated/superseded ADRs
- Don't leave gaps in numbering

---

## ADR Categories

Group ADRs by architectural domain for easier navigation:

- **Platform & Build System** - Platform choice, build tools, frameworks
- **Memory Management** - RAM optimization, buffer strategies, PROGMEM
- **Network & Security** - Protocols, encryption, authentication
- **Integration & Communication** - APIs, MQTT, WebSocket
- **System Architecture** - Core patterns, scheduling, persistence
- **Hardware & Reliability** - Hardware interface, watchdog, sensors
- **Development & Build** - Developer tools, CI/CD, testing
- **Core Services** - Time management, queuing, configuration
- **Features & Extensions** - Specific features, sensor integration
- **Browser & Client** - Frontend, browser compatibility, UX
- **OTA & Updates** - Firmware updates, version management

---

## ADR Workflow

### 1. Before Making Architectural Changes

```bash
# Step 1: Review existing ADRs
- Read docs/adr/README.md for navigation
- Search for related decisions
- Check if change conflicts with existing ADRs
- Understand architectural constraints

# Step 2: Determine if new ADR needed
- Will this have long-term impact?
- Does it affect multiple components?
- Are there multiple alternatives?
- Will future developers need context?

# Step 3: If ADR needed, draft it
- Use the template above
- Fill in all sections thoughtfully
- Include code examples
- Document alternatives thoroughly
2. During Implementation
bash
# Step 1: Create ADR with Status: Proposed
- Get next ADR number
- Write comprehensive ADR
- Include decision maker (Copilot Agent or User: Name)

# Step 2: Reference ADR in code
- Add comments linking to ADR
- Example: // See ADR-030 for why we use this pattern

# Step 3: Implement according to decision
- Follow patterns established in ADR
- Ensure code aligns with decision
- Implement mitigation for identified risks
3. After Implementation
bash
# Step 1: Update ADR status to Accepted
- Change Status: Proposed → Accepted
- Add implementation date to timeline
- Link to PR/commit that implemented it

# Step 2: Update docs/adr/README.md
- Add entry to ADR index
- Categorize appropriately
- Update reference counts if applicable

# Step 3: Store memory (if using Copilot)
- Store key facts for future reference
- Include ADR number in citations
4. When Superseding an ADR
bash
# Step 1: Create new ADR
- Write new ADR explaining change
- Reference original ADR
- Explain why change needed

# Step 2: Update old ADR
- Change status to "Superseded by ADR-XXX"
- Do NOT delete or modify decision/context
- Add superseded date to timeline

# Step 3: Update README
- Update both ADRs in index
- Note the supersession relationship

Code Review Integration

During Code Reviews

Automatic Checks:

  1. Do changes violate any existing ADRs?
  2. Do changes require a new ADR?
  3. Are ADR references in code accurate?
  4. Is ADR status up to date?

Example Review Comments:

✗ "This change violates ADR-004 (Static Buffer Allocation). 
   The String class should not be used here."

✓ "This change aligns with ADR-007 (Timer-Based Scheduling).
   Good use of DECLARE_TIMER_SEC macro."

? "This introduces a new architectural pattern. 
   Please create an ADR documenting the decision."

! "ADR-029 is referenced but hasn't been updated to Accepted status.
   Please update the status since this is now implemented."
PR Checklist with ADRs
markdown
## ADR Compliance Checklist

- [ ] Changes reviewed against existing ADRs
- [ ] No violations of architectural decisions
- [ ] New ADR created if needed (Status: Proposed)
- [ ] ADR status updated if implementing existing ADR
- [ ] Code comments reference relevant ADRs
- [ ] docs/adr/README.md updated if new ADR added

CI/CD Integration

Pre-Commit Checks
bash
# Check ADR compliance
python evaluate.py  # Includes ADR pattern enforcement

# Verify ADR references are valid
grep -r "ADR-[0-9]" src/ | while read line; do
  # Extract ADR number and verify file exists
  # Report broken references
done

# Check for architectural pattern violations
# (e.g., String usage, missing PROGMEM, etc.)
PR Automation
yaml
# .github/workflows/adr-check.yml
name: ADR Compliance Check

on: [pull_request]

jobs:
  adr-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      
      - name: Check ADR compliance
        run: |
          # Run automated checks
          # Verify no ADR violations
          # Check if new ADRs needed
          
      - name: Comment on PR
        if: violations found
        # Post comment suggesting ADR review

Human Decision Documentation

When User Makes Architectural Choice

If a user explicitly makes an architectural decision, document it clearly:

markdown
# ADR-XXX: [Title]

**Status:** Accepted  
**Date:** YYYY-MM-DD  
**Decision Maker:** User: [Name/Role]  ← IMPORTANT: Mark as human decision

## Context
[User's problem or request]

## Decision
**User Decision:** [What the user chose]

The user explicitly chose [X] over [Y] because [reason given].

## Alternatives Considered
[What was presented to the user]

### Alternative 1: [Option presented]
**User Feedback:** [User's reasoning for/against]

### Alternative 2: [Option presented]
**User Feedback:** [User's reasoning for/against]

## Rationale
**User's Stated Reasons:**
- Reason 1
- Reason 2

**Technical Context:**
[Agent's analysis of the decision's technical implications]
Example Human Decision ADR
markdown
# ADR-030: Use PostgreSQL for Sensor Data Storage

**Status:** Accepted  
**Date:** 2026-02-06  
**Decision Maker:** User: Rob van den Breemen

## Context
User requested evaluation of database options for storing sensor historical data.

## Decision
**User Decision:** Use PostgreSQL instead of SQLite

The user explicitly chose PostgreSQL after being presented with both options,
citing need for multi-client access and superior analytics capabilities.

## Alternatives Considered

### Alternative 1: SQLite
**Pros:** Lightweight, embedded, no server needed  
**Cons:** Single writer limitation  
**User Feedback:** "Need multiple Home Assistant instances to query simultaneously"

### Alternative 2: PostgreSQL
**Pros:** Multi-client, powerful queries, excellent HA integration  
**Cons:** Requires separate server, more complex setup  
**User Feedback:** "Worth the complexity for analytics and flexibility"

## Rationale
**User's Stated Reasons:**
- Need concurrent access from multiple HA instances
- Plan to use TimescaleDB extension for time-series data
- Want to run complex queries for energy analytics
- Already running PostgreSQL for other home automation

**Technical Context:**
This decision means we'll implement a RESTful API for sensor data
instead of direct database access from the firmware.

ADR Index Management

Maintaining docs/adr/README.md

The README is the navigation hub for all ADRs. Keep it up to date:

Required Sections:

  1. What are ADRs? - Explanation for new readers
  2. Quick Navigation - By topic with counts
  3. ADR Index - Full categorized list
  4. ADR Template - Link or embed template
  5. Key Architectural Themes - Cross-cutting concerns
  6. Architectural Dependencies - Which ADRs depend on which
  7. When to Create an ADR - Guidance
  8. Superseding ADRs - How to handle changes
  9. Resources - Links to best practices

Update Process:

bash
# When adding new ADR:
1. Add entry under appropriate category
2. Update category count
3. Update "Foundational ADRs" if highly referenced
4. Update "Decision Timeline" if appropriate
5. Add to "Related Decisions" in other ADRs

Code Examples in ADRs

Good ADR Code Examples

Principle: Show, don't just tell

markdown
## Implementation Notes

### WRONG: No example
Use PROGMEM for string literals.

### RIGHT: Clear example
```cpp
// WRONG - String literal wastes RAM
DebugTln("Starting WiFi");

// CORRECT - F() macro stores in flash
DebugTln(F("Starting WiFi"));

// WRONG - strcmp on PROGMEM
strcmp(value, "ON");

// CORRECT - strcmp_P for PROGMEM
strcmp_P(value, PSTR("ON"));

### Include Diagrams When Helpful

```markdown
## Implementation Notes

### Architecture Diagram

[WebSocket Client] ─── ws:// ───> [ESP8266:81] │ ├─> [Buffer] (1KB) │ │ │ ▼ [HTTP Client] ──── http:// ─> [ESP8266:80] [Queue] │ │ └──────┴─> [PIC Serial]


### Data Flow

User Request → REST API → Command Queue → Serial → PIC → OpenTherm Boiler ↓ ↓ ↓ ↓ Validate JSON Parse Dedup Check Protocol


ADR Metrics & Maintenance

Health Indicators

Healthy ADR Repository:

  • ✓ All ADRs have clear status
  • ✓ Superseded ADRs reference replacement
  • ✓ Code references match existing ADRs
  • ✓ README index is up to date
  • ✓ Recent ADRs include implementation dates
  • ✓ Each ADR has at least 2 alternatives documented

Needs Attention:

  • ✗ Multiple ADRs with "Proposed" status for >30 days
  • ✗ ADR numbers with gaps
  • ✗ Code comments reference non-existent ADRs
  • ✗ ADRs without alternatives section
  • ✗ README categories don't match actual ADRs
Periodic Review

Quarterly ADR Review:

bash
# Review checklist
1. Are any "Proposed" ADRs abandoned? (Mark deprecated)
2. Are any "Accepted" ADRs being violated? (Update enforcement)
3. Do new patterns need ADRs? (Create them)
4. Are superseded ADRs properly linked? (Verify)
5. Is README accurately reflecting current state? (Update)

Integration with Copilot Instructions

Show full SKILL.md (608 more words)Show less
How This Skill Connects to .github/copilot-instructions.md

The copilot instructions file references ADRs but doesn't duplicate them:

In copilot-instructions.md:

markdown
## Architecture Decision Records (ADRs)

**IMPORTANT:** This project maintains ADRs documenting key architectural choices.

- **ADR Index:** `docs/adr/README.md`
- **Before making changes:** Review relevant ADRs
- **ADR Compliance:** Follow patterns in ADRs
- **Creating ADRs:** Use the ADR-skill for guidance

**Key Decisions:**
- ADR-003: HTTP-Only (no HTTPS/WSS) ← Link, don't duplicate
- ADR-004: Static Buffer Allocation ← Link, don't duplicate
- ADR-009: PROGMEM String Literals ← Link, don't duplicate

In this skill:

  • Full ADR creation process
  • Templates and examples
  • Decision guidance
  • Workflow details

Division of Responsibility:

  • Copilot Instructions: Quick reference, links to ADRs, enforcement rules
  • ADR-Skill: Comprehensive ADR creation and management process
  • Individual ADRs: Detailed context, decisions, and consequences

Examples from OTGW-Firmware

Example 1: Memory Management ADR (ADR-004)

What makes it good:

  • Clear problem statement (heap fragmentation)
  • Specific measurements (3,130-3,730 bytes saved)
  • Multiple alternatives with detailed pros/cons
  • Implementation patterns with code examples
  • Risk mitigation strategies
  • References to evaluation framework

Key Sections:

markdown
## Consequences

### Positive
- **Stability:** Eliminates most out-of-memory crashes
- **Scalability:** Can add features without exhausting RAM
- **Measurable:** RAM usage is stable and predictable

### Negative
- **Code verbosity:** Requires buffer size management
  - Accepted: Necessary trade-off for stability
Example 2: Protocol Decision ADR (ADR-003)

What makes it good:

  • Explains why not HTTPS (memory constraints)
  • Documents security model (local network only)
  • Lists 4 rejected alternatives with clear reasoning
  • Includes documentation requirements
  • References related ADRs (dependencies)

Key Sections:

markdown
## Alternatives Considered

### Alternative 1: HTTPS with Self-Signed Certificates
**Cons:**
- Requires 20-30KB RAM for TLS handshake (50-75% of available heap)
- OTA updates may fail due to insufficient memory

**Why not chosen:** Memory constraints prohibitive
Example 3: Feature ADR (ADR-029)

What makes it good:

  • Quantifies improvement (68.5% code reduction)
  • Shows before/after code comparison
  • Explains Safari-specific bug being fixed
  • Links to the problem it solves (ADR-025)
  • Includes migration path

Quick Reference

ADR Creation Checklist
markdown
Creating a new ADR? Check these:

- [ ] Next sequential number assigned (check docs/adr/)
- [ ] Filename follows ADR-XXX-kebab-case-title.md format
- [ ] Status field present (Proposed/Accepted/etc.)
- [ ] Date field present (YYYY-MM-DD)
- [ ] Decision Maker identified (Copilot Agent or User: Name)
- [ ] Context section explains problem clearly
- [ ] At least 2-3 alternatives documented
- [ ] Pros and cons listed for each alternative
- [ ] "Why not chosen" for each rejected alternative
- [ ] Consequences section complete (positive, negative, risks)
- [ ] Code examples included (if applicable)
- [ ] Related ADRs referenced
- [ ] Implementation notes with affected files
- [ ] Added to docs/adr/README.md index
- [ ] Category assigned
- [ ] References/links included
Common ADR Mistakes to Avoid
markdown
❌ Writing "We should use X" without explaining why
❌ Skipping alternatives ("This is the only way")
❌ No code examples for technical decisions
❌ Forgetting to update status after implementation
❌ Not referencing related ADRs
❌ Vague consequences ("It will be better")
❌ No decision maker attribution
❌ Missing constraints that drove the decision
❌ Modifying accepted ADRs instead of superseding
❌ Not updating README.md index
❌ Using jargon without defining it (e.g., "TLS handshake" without explaining)
❌ Being superficial - not digging into the "why" behind constraints
❌ Hiding negative consequences or pretending there are none
❌ Writing marketing copy instead of honest technical analysis
❌ Skipping measurements ("faster" vs "68.5% code reduction")
❌ Not explaining technical trade-offs in understandable terms
Critical Analysis Guidelines

Be thorough and questioning:

✓ Challenge assumptions - "Why is this constraint real?"
✓ Quantify impacts - "Saves 5-8KB RAM" not "saves memory"
✓ Be honest about negatives - "Code is more verbose (accepted trade-off)"
✓ Question the decision - "Is this still the right choice?"
✓ Document risks explicitly - "Risk: X. Mitigation: Y."
✓ Use real measurements - "Requires 20-30KB RAM (50-75% of heap)"
✓ Explain technical concepts - "TLS/SSL = encrypted network protocol"

Write in understandable language:

✓ Define acronyms on first use: "PROGMEM (Program Memory)"
✓ Explain technical terms: "heap fragmentation = memory becoming unusable"
✓ Use analogies for complex concepts: "like trying to park a bus in scattered car spaces"
✓ Provide context: "ESP8266 has 40KB RAM total, after libraries ~20-25KB available"
✓ Show concrete examples: Include code snippets showing the pattern
✓ Break down complex ideas: Use bullet points and clear structure
✓ Avoid assumed knowledge: Don't assume reader knows ESP8266 specifics

Example of critical, understandable writing:

markdown
## Consequences

### Positive
- **Stability:** Eliminates most out-of-memory crashes
  - Measured: Heap available increased from ~15KB to ~20KB
  - Evidence: No OOM crashes in 30-day stress test after implementation

### Negative
- **Code verbosity:** Every string needs F() macro wrapper
  - Impact: ~10-15% more characters per debug statement
  - Accepted because: Stability more important than typing convenience
  - Example: `DebugTln(F("Message"))` vs `DebugTln("Message")`

### Risks & Mitigation
- **Risk:** Developers forget to use F() macro
  - **Impact:** RAM gradually consumed, eventual crashes
  - **Mitigation 1:** Evaluation framework catches violations (evaluate.py)
  - **Mitigation 2:** Code review checklist includes PROGMEM check
  - **Mitigation 3:** Copilot instructions enforce pattern
When in Doubt

Ask these questions:

  1. Will a developer in 6 months understand WHY we did this?
  2. Have I explained what we REJECTED, not just what we chose?
  3. Could this ADR help someone avoid making a wrong decision?
  4. Have I included enough code examples?
  5. Is the decision maker clearly identified?
  6. Can someone unfamiliar with this technology understand the core trade-offs?
  7. Have I been honest about negative consequences?
  8. Have I quantified impacts with actual measurements?

If you answered "No" to any of these, improve the ADR.


Skill Invocation

How Copilot Uses This Skill

Automatic triggers:

  • When analyzing code for architectural changes
  • When creating/reviewing pull requests
  • When user asks architectural questions
  • When refactoring requires decision documentation

Manual invocation:

  • User: "Create an ADR for this"
  • User: "Document this architectural decision"
  • User: "Why did we choose X?"

Workflow:

1. Copilot detects architectural change
2. Checks existing ADRs for conflicts
3. If new pattern: Suggests creating ADR
4. Uses this skill to generate comprehensive ADR
5. Updates README and references
6. Stores facts for future sessions
Integration with Copilot Instructions

This skill is integrated with GitHub Copilot through multiple instruction layers:

Repository-wide instructions (.github/copilot-instructions.md):

  • Defines ADR workflow for all Copilot interactions
  • Establishes ADR lifecycle (Proposed → Accepted → Superseded)
  • Specifies when ADRs are required
  • Enforces immutability of accepted ADRs

Path-specific instructions (.github/instructions/):

  • adr.coding-agent.instructions.md - Specific guidance for coding agent
    • Before/during implementation ADR requirements
    • Creating new ADRs checklist
    • Supersession workflow
  • adr.code-review.instructions.md - Specific guidance for code review
    • ADR compliance checks
    • Review checklist for architectural changes
    • Review comment examples

How it works:

  1. Copilot reads repository-wide instructions for all operations
  2. Path-specific instructions apply based on context (coding vs review)
  3. This skill provides the comprehensive ADR template and best practices
  4. Together, they ensure consistent ADR governance across all Copilot interactions

Verification: You can verify custom instructions are being used by checking the "References" section in Copilot Chat responses, where the instruction files will appear as references.


Resources

Official ADR Resources
ADR Tooling Ecosystem
Project-Specific Resources
  • OTGW-Firmware ADR Index: /docs/adr/README.md
  • Copilot Instructions: /.github/copilot-instructions.md
  • Coding Agent Instructions: /.github/instructions/adr.coding-agent.instructions.md
  • Code Review Instructions: /.github/instructions/adr.code-review.instructions.md
  • Evaluation Framework: /evaluate.py (enforces ADR decisions)

Remember: ADRs are living documentation stored as docs-as-code in the same repository as the implementation. They should be consulted during development, referenced in code reviews, and evolved through supersession (not modification). Good ADRs make architectural decisions visible, understandable, and enforceable.

© rvdbreemen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in .github/skills/adr of rvdbreemen/OTGW-firmware.

  • SKILL.md
  • ALWAYS_USE_SKILL.md
  • IMPLEMENTATION_SUMMARY.md
  • QUICK_START.md
  • README.md
  • USAGE_GUIDE.md

Open the folder on GitHubat commit 5e66c3b

Compare with similar skills

Adr next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Adr compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Adr this skillrvdbreemen/OTGW-firmware207—~7.7kAutomated safety check: PassMIT
Grounding A Designandrew-blake/melcloudhome142—~1.1kAutomated safety check: PassMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT
Cto AdvisorIbrahim-3d/orchestrator-supaconductor3814 repos~2.4kAutomated safety check: PassMIT
Architecture DecisionDonchitos/Claude-Code-Game-Studios26k—~1.7kAutomated safety check: PassMIT
Improve Codebase Architectureywwynm/EverythingDone14415 repos~1.3kAutomated safety check: PassGPL-3.0

Similar skills

  • Grounding A Design

    andrew-blake/melcloudhome

    A skill your agent uses when about to propose, brainstorm, review or revise a design, fix approach or plan for a feature or behaviour change in this repo, including "brief" or "quick" design…

    142 GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Cto Advisor

    Ibrahim-3d/orchestrator-supaconductor

    Technical leadership guidance for engineering teams, architecture decisions, and technology strategy.

    381 GitHub starsUsed in 4 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Architecture Decision

    Donchitos/Claude-Code-Game-Studios

    Create an ADR documenting a technical decision: context, alternatives considered, consequences.

    26k GitHub stars~1.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Improve Codebase Architecture

    ywwynm/EverythingDone

    Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.

    144 GitHub starsUsed in 15 repos~1.3k tokens
    DevelopmentAuto-check passed
  • Domain Modeling

    brim-borium/spotify_sdk

    Build and sharpen a project's domain model. An agent skill from brim-borium/spotify_sdk.

    166 GitHub starsUsed in 5 repos~806 tokens
    DevelopmentAuto-check passed

More from rvdbreemen/OTGW-firmware

All 13 skills in this repo
  • DOCX

    rvdbreemen/OTGW-firmware

    A skill your agent uses whenever the user wants to create, read, edit, or manipulate Word documents (.docx files).

    207 GitHub starsUsed in 33 repos~4.3k tokens
    Auto-check passed
  • PPTX

    rvdbreemen/OTGW-firmware

    Use this skill any time a .pptx file is involved in any way — as input, output, or both.

    207 GitHub starsUsed in 34 repos~2.3k tokens
    Auto-check passed
  • XLSX

    rvdbreemen/OTGW-firmware

    Use this skill any time a spreadsheet file is the primary input or output.

    207 GitHub starsUsed in 35 repos~2.9k tokens
    Auto-check passed
  • Implement Next Task

    rvdbreemen/OTGW-firmware

    Drive the autonomous 2.0.0 ESP32-S3-only async + FreeRTOS migration (epic TASK-865).

    207 GitHub stars~2.1k tokensUpdated 4 days ago
    Auto-check passed
  • Beta Prerelease

    rvdbreemen/OTGW-firmware

    Publish an OTGW-firmware beta prerelease — bump VERSIONPRERELEASE, push to otgw-1.x.x, tag, and let CI build + publish the GitHub prerelease

    207 GitHub stars~2.7k tokensUpdated 4 days ago
    Auto-check passed
  • Lint

    rvdbreemen/OTGW-firmware

    Lints existing Architecture Decision Records against the four verification gates (Completeness, Evidence, Clarity, Consistency).

    207 GitHub stars~4.3k tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Adr

What does Adr do?

Architecture Decision Record (ADR) management skill. An agent skill from rvdbreemen/OTGW-firmware. Adr is an agent skill from rvdbreemen/OTGW-firmware. Architecture Decision Record (ADR) management skill.

When should I use Adr?

Adr fits situations like: tasks that involve Architecture decision records.

How do I install Adr in Claude Code?

Run `npx skills add rvdbreemen/OTGW-firmware --skill adr -a claude-code`. Or copy the skill folder (.github/skills/adr in rvdbreemen/OTGW-firmware) into .claude/skills/adr in your project. Claude Code loads it when a task matches its description.

How do I install Adr in Codex?

Run `npx skills add rvdbreemen/OTGW-firmware --skill adr -a codex`. Or copy the skill folder (.github/skills/adr in rvdbreemen/OTGW-firmware) into .agents/skills/adr in your project. Codex loads it when a task matches its description.

Can I use Adr in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rvdbreemen/OTGW-firmware --skill adr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adr, .gemini/skills/adr, .github/skills/adr and .opencode/skills/adr in your project.

What does Adr need to run?

Going by SKILL.md and its folder, Adr needs the command-line tools its instructions call (python).

Does Adr access the network?

SKILL.md names 4 domains. As links in the text: github.com, adr.github.io, cognitect.com and learn.microsoft.com. This is read from the text; nothing was executed.

Is Adr safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Adr use?

Adr is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Adr use?

About 7.7k tokens (SKILL.md is roughly 31k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Adr?

Skills that share tags, products or a category with Adr: Grounding A Design (andrew-blake/melcloudhome, 142 stars), PR Design Doc (OpenHands/OpenHands, 90k stars), Cto Advisor (Ibrahim-3d/orchestrator-supaconductor, 381 stars) and Architecture Decision (Donchitos/Claude-Code-Game-Studios, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Adr?

rvdbreemen (a GitHub user) maintains it in rvdbreemen/OTGW-firmware, which has 207 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 6, 2026.

Source: rvdbreemen/OTGW-firmware on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.