IDRs 作为意图记录
IDRs as Records of Intent

原始链接: https://wrla.ch/log/2026/10/idrs-as-records-of-intent/

在《撰写文档:2026 年版》中,作者反思了实现决策记录(IDR)。IDR 原本旨在改善 LLM 输出并保留实现决策。但在提示模糊时,LLM 往往只是重述其计划的实现,使 IDR 变得有损,并不比 diff 更好。一个 DuckDB 序列化 IDR 含糊且无用;一个 PyPI GitHub Actions IDR 效果更好。它有清晰的问题陈述、目标、非目标,以及一个不包含实现细节的简短建议方案。作者得出结论:有效的 IDR 必须不断回归意图和决策;否则它们只是用英语重述 diff。清晰、有力的 IDR 也能更好地引导 LLM 行为,而细节可以在 diff 中找到。

Hacker News 上的一场讨论审视了“IDR 作为意图记录”。评论者认为记录实现决策有价值,但对其长期维护争论不休。有人指出,随着代码变化,IDR 列表会变得庞大,并不可避免地过时、相互矛盾或产生误导;由于 IDR 记录的是 LLM 无法推断的信息,LLM 无法可靠判断它们是否仍然适用。管理它们需要索引/主题组织和持续的文档维护。另一位评论者使用类似的前置 PLAN.md,在编码前批准,之后丢弃。他们定义了“评审面”,例如公共 API 和数据库模式,未经评审不得更改。第三位强调,持久的意图记录至关重要:未来的开发者常会问,为什么会做出某个奇怪选择,而记录推理和先前尽职调查有助于判断何时应重新审视某项决策。该讨论串的结论是,决策记录很有价值,但需要积极维护。
相关文章

原文

October 10, 2026

idrs recurse

Beaver Pond

In Writing the Docs: 2026 Edition, I talked a little bit about IDRs (Implementation Decision Records, a pun on "Architecture Decision Records" which predate adoption of LLMs).

As a refresher, I created them to serve a couple purposes:

  1. To get better output out of LLMs
  2. To provide a durable record of a decision made during the implementation of a feature

I've realized that left to their own devices given a vague prompt, an LLM will often just try to fill one in with a textual description of what it planned to implement anyway. This makes them pretty lossy as a record of intent (it's basically not much better than a diff, and arguably worse) and I'm somewhat skeptical it improves their output much. At best, they might allow you to steer them towards a better outcome before too much code is written.

A great example is this one, where I asked the agent to update repo-parser to use DuckDB for the intermediate representation:

# DuckDB serialization

Owner: Will Lachance <[email protected]>

## Overview

### Problem Statement

repo-parser extracts metadata and structure from repositories into an in-memory `Resource` tree, but this ephemeral representation must be re-created for each consumer. We need a persistent, queryable serialization format that allows multiple tools to consume the extracted metadata without re-scanning the repository.

### Context

<very long winded, almost inscrutable LLM context>

...

link

The problem statement isn't horrible, but it's also rather vague. I don't think it really gave the agent much of a goal aside from "use duckdb in some way" to replace some other mechanism. I think the result was ok-ish, but I wonder a bit if the IDR had much value in that process. It certainly doesn't help explain what the duckdb output of repo-parser is actually good for (a BM25 search index of a repository's contents, possibly TUI search tools). And it's definitely not something I want to re-read later, I cringe looking at it now.

What I'm increasingly realizing is that for an IDR to be really effective it needs to keep returning to the intent and decisions taken to support it. Without this, it's just a long-winded way of restating the diff in english.

I'm much happier with this one:

# Publish to PyPI from GitHub Actions

Owner: Will Lachance <[email protected]>

## Overview

### Problem Statement

repo-parser packages can only be published to PyPI manually, which is time consuming, error prone and less secure than doing so via GitHub actions.

### Context (as needed)

### Goals

- Make it easier to publish new releases
- Improve security

### Non-Goals

- Automate version bumping (will still entail a seperate commit to bump version)

### Proposed Solution

Use the idiomatic best practice way of doing this, using the official packaging guide:

https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

In general this means adding a new GitHub workflow which ties uploads to PyPI to new releases.

## Other reading (as needed)

- [Official Guide](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/)
- [Stamina's implementation](https://github.com/hynek/stamina/blob/b25d4bc359ff603496aafbb217ab82c5a43715a6/.github/workflows/pypi-package.yml) (likely best practice)

link

The problem statement describes the "itch" that made me want to perform the intervention. The goals, non-goals and solution are short, punchy and explain the end result without getting into implementation details. When I go back and look at a repository later, this is the sort of thing I want to see. Bonus: when using an LLM it provides clearer guard-rails. Every sentence does the work of steering behaviour towards the actual result I want to see, rather than being a set of instructions that it might misinterpret. If I need more detail, I'll just look at the diff.


联系我们 contact @ memedata.com