adr-index-skill: Keeping AGENTS.md Lean

adr-index: Keeping AGENTS.md Small with ADRs + a Lightweight Index

After really digging into AI coding tools like Codex, Claude Code, and Gemini, I hit a wall pretty fast.

AGENTS.md (or whatever you use for agent guidelines) eventually becomes a dumpster fire.

At first, it’s great. You write down everything:

But as the project grows, AGENTS.md turns into a monster:

So I pivoted.

To make this workflow effortless, I built a skill called adr-index.


The Problem: Completed Logs Kill AGENTS.md

Treating AGENTS.md as a persistent log of completed work is a trap. The interest on that technical debt compounds daily.

  1. Context Tax: As the file grows, the agent has to read more text for every single prompt. That’s burning tokens for no reason.
  2. Signal-to-Noise Ratio: When you have pages of “done” tasks, the “now” gets buried.
  3. Maintenance Hell: What started as a rulebook becomes a wiki. And wikis rot.

AGENTS.md should be ephemeral, not cumulative.


The Fix: Decisions in ADRs, Index for the Agent

The goal isn’t to throw away history. It’s to organize it efficiently.

What belongs in an ADR?

What DOESN’T belong?


How adr-index Works (The Tech)

adr-index generates a “Decision Index” without RAG or embeddings. It keeps things dumb and fast.

1) Header Scanning Only

It doesn’t read the whole file. It scans the top (e.g., first 60 lines). Why? Speed. Less noise. Deterministic generation.

2) Format Validation

It expects a strictly formatted filename/header: # ADR-YYYYMMDD-####-XXX: <title>

Example: # ADR-20260203-0007-A9F: Use JSONB for event payload storage

This format gives us natural sorting by date, avoids collision even if I write multiple ADRs a day, and plays nice with parallel work.

3) Metadata Parsing

It grabs the metadata if it exists:

4) Excludes the Fluff

Ignores README.md, templates, etc.

5) JSON Generation

The output index.json is minimal: id, title, tags, status, date, tldr, path. Unicode is preserved so diffs look clean.


Workflow: When to Run It?

Only when you touch an ADR.

Commands:


Managing AGENTS.md

The rule is simple.

Example flow:

  1. Working: AGENTS.md has specific tasks.
  2. Decision made: Write ADR.
  3. Run adr-index: Updates index.json.
  4. Done: Remove the task from AGENTS.md (or replace with ADR link).

AGENTS.md stays lean naturally.


When to write an ADR? (Heuristics)

If any of these are true, writing an ADR is cheaper than not writing one:

When in doubt, write the ADR.


Open Source: adr-index v0.1.0

It’s small, it’s simple, and it keeps my agents from hallucinating on old context.

Repo: https://github.com/studiojin-dev/adr-index-skill


Written with help from GPT-5.2. It’s getting scary good.

Note: I’m a solo developer based in Korea. To share my journey with a wider audience, I used AI to help translate my thoughts into English. If any phrasing feels a bit “too AI” or unnatural, please bear with me—I’m spending most of my energy on the code!

Join the Investigation

Get the latest updates on my projects and indie hacking journey directly in your inbox.

No spam. Unsubscribe anytime.