Urgent.News

What's breaking now, across thousands of outlets.

AI

The Real Reason AI Ignores Existing Decisions — Designing an ADR Context Auto-Injection Hook

TL;DR (about a 15-minute read) In May 2026, I was reworking a Claude Code plugin that delivers a shared way of working to several development projects. One of its targets was a mechanism for carrying past design decisions forward into the next session. It started with a choice of document-editing library. In one product, an Architecture Decision Record (ADR, a document that captures a design…

In May 2026, the author was working on a Claude Code plugin designed to share a consistent approach across various development projects. One component of this plugin involved handling past design decisions in subsequent sessions. The journey began with the selection of a document-editing library. While one product opted for BlockNote over TipTap, the AI suggested incorporating TipTap two weeks later.

The issue lay in the AI not being able to access the Architecture Decision Record (ADR) contents at the start of a session, despite the existence of the ADR.

To address this, the author crafted a script that read the project's ADRs, extracted key details like the document number, title, and status for accepted or amended records, and injected this information into the context via a Claude Code hook. Initially, the hook triggered on every turn, but this was later refined to run at the session's start, reducing the median startup time from 3,842ms to 94.7ms.

Further optimizations included consolidating the process to read all ADR files in a single command, significantly speeding up the process.

The plugin's primary objective was to facilitate reusable working methods across various projects. It served as a bridge between recorded design decisions and their implementation. This was achieved by delivering a list of current design decisions into the context during the session start, but the responsibility of selecting the relevant documents and incorporating the decisions into the implementation was left to subsequent stages.

The initial attempt at implementing TipTap as an alternative to BlockNote, which was chosen due to its out-of-the-box capabilities, resulted in the AI proposing the latter just a few days after. This decision was made based on BlockNote's compatibility with the project's requirements, such as Notion-like block operations and ease of integration. Despite the AI suggesting TipTap, the project reverted to BlockNote after a brief experiment, highlighting the complexities of AI decision-making in design contexts.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Automating SEO with AI: a self-improving content loop

Everyone agrees you should "let AI do your SEO." Few people explain what that looks like when you actually build it. This is the setup I run on my own site: an AI agent with read-only access to Google…

  • AI agent pulls search queries from Google Search Console every 30 days
  • Prioritizes one small improvement, makes it in each loop
  • After months, most tasks run automatically via cron job

More from Monday 28 September →