{"slug": "internal-changelogs-unlock-autonomous-coding-agents", "title": "Internal Changelogs unlock autonomous coding agents", "summary": "Juno AI Labs has published agent instructions that require every module document in its Avalon codebase to end with a running changelog recording not only what changed but why, including rejected alternatives and false starts. The company reports the practice has cut down on churn between coding-agent sessions and reduced human oversight and monitoring for false starts or incorrect rabbit holes, because LLMs have no persistent memory across sessions and otherwise rebuild designs or features that were already removed. Juno AI Labs distinguishes the changelog from skills and AGENTS.md/CLAUDE.md files, which instruct a model on how to do something, and from code comments and git history, which capture the what but not the reasoning.", "body_md": "# Internal Changelogs unlock autonomous coding agents.\n\nThe key to enabling a software factory is internal changelogs, which give agents a long-term memory right next to the code. As a primer, LLMs have no \"memory\" and each turn (let alone coding session) is completely independent. \"Memory\" is created by passing the entirety of the conversation (the last 24 turns, let's say) or compression/extraction of previous conversations/sessions.\n\nAnthropomorphization of human-like behavior (aka memory) \"Don't you see the session last month where we tried that but it failed because of X and Y reasons\" doesn't translate to how coding agents behave. This has led to frustrations where autonomous agents have built an already-known bad design or built a feature we removed last month.\n\nThe key to coding agent autonomy is having them write an internal changelog [(an example below)](https://github.com/juno-ai-labs/avalon/blob/main/docs/authorization.md#changelog) that documents not only what was changed at a high-level but also why the change was made and any false-starts (this was a great late addition based on some traces we observed). This has cut down on churn between agent sessions and cut down human oversight and monitoring for false starts or incorrect rabbit holes the agent may go down.\n\n```\n### 2026-10-21 — Admit attachment and artifact reads once per request\n\n**What changed:** Resource reads reuse HTTP membership evidence, including its\nincarnation for migrated grants, and authorize once per read operation...\n\n**Why:** A production image preview spent about one second on its second\nauthorization RPC after reading R2...\n\n**Considered and rejected:** A cross-request grant cache adds invalidation state\nwithout removing....\n\n**Consequences:** An in-flight read can finish after revocation. Subsequent\nrequests reauthenticate and observe canonical grant changes...\n```\n\n## Difference with skills, code, code comments, and harness memory\n\nSkills (as well as AGENTS.md/CLAUDE.md files) are there to instruct the model on HOW to do something. These are great places to encode code styles, tool usage, environment peculiarities, and other gotchas on how to write code or debug a problem.\n\nCode and code comments describe the WHAT and maybe even the HOW but they don't communicate the WHY. Code history can be used to see changes and progression but (a) it still misses reasoning and context and (b) many models don't naturally look at the git history.\n\nMany platforms are introducing harness level memory but we've found these to be closer to auto-skills than long term product memory.\n\n## Pattern matching with human-native development\n\nHow do we pattern match with what we've been doing in (modern) software development for the last 20 years? We've always had tribal knowledge (\"Oh talk to Susan about that because I know we did some prototypes around that last year and learnings could be useful\") that is never captured in the code or documentation. Or our own long term memory where we track previous directions taken, experiments done, failed attempts, and lessons learned. While just living changes our natural neural network, models are still stiff and unchanging run-to-run and thus we need to work around it.\n\n## Implementing it yourself\n\n[Our agent instructions are below:](https://github.com/juno-ai-labs/avalon/blob/main/docs/module-documents.md#the-changelog)\n\n```\n## The changelog\n\n**Every module document ends with a running changelog that records not only what\nchanged, but why it changed.** This is the highest-value section in the file, and\nthe reason this specification exists.\n\nThe situation it is built for: someone — a person or a model — is about to change\nthis module a year from now. They can read the code, so they know what it does.\nThey can read the diff, so they know what moved. What they cannot recover is the\npressure that produced the design: the failure that made the obvious approach\nuntenable, the alternative that was tried and abandoned, the constraint that is\ninvisible from inside this file. Without it they will \"clean up\" the odd-looking\nthing, ship the simplification that was already rejected once, and rediscover the\noutage that motivated it. The changelog is how the reasoning survives the people\nwho held it.\n\nWrite every entry for that reader. They do not have the ticket, the pull request,\nthe thread, or you.\n\n### The shape of an entry\n\nEntries are `###` headings under `## Changelog`, **newest first**, each with a\ndate and a one-line claim, then these fields:\n\n``` markdown\n## Changelog\n\n### 2026-08-19 — Drafts expire lazily at read time, not on a schedule\n\n**What changed:** A cached draft whose TTL has passed is ignored when it is read\nand deleted by the next composer that mounts. The scheduled sweep is gone.\n\n**Why:** The sweep was a Workflow plus a cron trigger, and it existed to save a\ntimestamp comparison in a query that already loads the row. It also produced the\nonly class of bug we saw here in three months: a draft that vanished while its\nowner was typing, because the sweep and the debounced save raced. Read-time\nexpiry cannot drift from the data it is checking.\n\n**Considered and rejected:** Keeping the sweep and taking a lock around the save.\nThat is a distributed lock for a device-local cache, and it makes every keystroke\npath depend on a Workflow being healthy.\n\n**Consequences:** Expired rows now occupy quota until something reads them, which\nis bounded by the 12-hour TTL and has never been close to a device limit. Any\nfuture code that reads the store directly must filter on `updatedAt` itself —\n`pruneExpiredDrafts` is no longer the only place expiry is enforced.\n\nShipped in #412. Design: `docs/PRDs/2026-08-10_composer-drafts/prd.md`.\n```\n\n- **What changed** — One or two sentences in the module's own vocabulary.\n  Behavior, not a file list: filenames get renamed out from under an entry, and a\n  reader who wants the diff has the pull request link.\n- **Why** — **The required field, and the one to spend your effort on.** State\n  the pressure that forced the change: the failure someone hit, how often, what\n  it cost, what was measured, what constraint appeared. It must stand on its own\n  after the ticket, the thread, and the author are gone. \"Refactor\", \"cleanup\",\n  \"simplification\", and \"as discussed\" are not whys — they are the absence of\n  one. If the change was made because the previous design was wrong, say what was\n  wrong with it, plainly and without hedging.\n- **Considered and rejected** — The road not taken, and why it did not survive.\n  Required whenever a real alternative existed, because the rejected option is\n  precisely what the next person will propose. Omit it only when there genuinely\n  was no fork in the road.\n- **Consequences** — What this constrains going forward: what a future change\n  must respect, what got worse and was accepted, what to watch. This is what\n  turns the entry from history into guidance.\n\nClose with a trailer naming the pull request, and the PRD or issue where one\nexists. One line, no heading.\n\nThe entry is written and committed before the pull request exists, so its number\nis not knowable at the time. Write the four fields on the branch, and land the\nlink once the pull request is open — by amending before the push or in the next\ncommit on the same branch. The entry stays open for revision until the pull\nrequest merges (see [Rules](#rules)); after that, **correcting the trailer is the\none edit the frozen entry permits** — it is about finding the change, not about\nrestating why it was made, which is the same carve-out\n[`prds.md`](prds.md#completed-prds-are-frozen) makes for a frozen PRD.\n\n### What earns an entry\n\nNot every commit, and not most of them. The test: **would a competent engineer,\nseeing this code fresh, plausibly undo it — and be wrong to?** If yes, write the\nentry. If the diff explains itself, do not.\n\nThe bar is deliberately high, because this section only works while it is short.\nA reader who stops after three entries should have read the three that matter\nmost, and every entry that records a small thing pushes a large one further down.\nWhen the changelogs were consolidated in September 2026, roughly one entry in ten\nrecorded a change the diff already explained, and one in ten recorded a commit\nthat another entry in the same document already covered. The rules below exist\nto stop both.\n\nAlways worth an entry:\n\n- A design or mechanism replaced, or an approach abandoned after it was tried.\n- A new invariant, or an old one removed or relaxed.\n- A boundary moving — the module taking on something, or handing something off.\n- A limit, TTL, or budget changed, with the number and what it is derived from.\n- A deliberate trade-off, especially one that leaves a rough edge in place\n  because the alternative was worse.\n- Scope cut. Work that was planned and quietly did not happen is the single most\n  common thing this section exists to catch. Record what would have to be true to\n  pick it back up.\n- A fix for a production incident, with what actually broke.\n\nNever worth an entry, however large the diff:\n\n- **A rename**, unless it leaves a compatibility constraint behind — an export\n  kept for an old caller, a stored key still read, a Durable Object class that\n  cannot be swapped without losing its objects. The entry is then about the\n  constraint, not the name.\n- **A typo, wording, or formatting change**, or a cosmetic restyle that changes\n  no behavior.\n- **A dependency bump or tooling change**, unless it narrowed a contract the\n  module relies on.\n- **A test-only or CI-only change.** What a suite covers is recorded in\n  **Testing**; adding one is not a decision about the module.\n- **Documentation-only work**: a body catching up with the code, a clarification,\n  a correction to an earlier entry's wording. Fix the body; do not log that you\n  fixed it.\n- **Rebase and merge bookkeeping**: a migration renumbered after a collision, a\n  file restored, a heading repaired.\n- **A bug fix that changes no invariant** and had no production incident behind\n  it. The pull request holds it.\n- **A \"review fixes\" list.** Review changes the entry for the change under\n  review; it does not get an entry of its own.\n\nTwo tests catch the rest. If **Why** would say nothing that **What changed** did\nnot already say, there is no entry. If **Consequences** would say that nothing\nchanges for anyone touching the module next, there is no entry.\n\n### Granularity\n\n- **One entry per pull request per document.** A pull request that makes several\n  changes to one module writes one entry with several paragraphs, not several\n  entries. The changelog records decisions, and a pull request is the unit a\n  decision ships in; commits and review rounds are how it got written, and the\n  record does not need to show the seams.\n- **A cross-cutting change has one owning document.** The full entry goes in the\n  document that owns the mechanism that changed. Every other document the change\n  touched updates its body, and gets an entry only if the change moved *that*\n  module's boundary or invariants — a short one, pointing at the owner's entry\n  for the reasoning. A dozen copies of the same paragraph is not a dozen records.\n- **The four fields are required.** An entry that cannot fill them is a pull\n  request description, and that is where it belongs.\n\n### Rules\n\n- **Append in the same change that makes it true.** A changelog written at the\n  end of the build is a changelog written from memory, and the *why* is the part\n  memory loses first.\n- **Newest first.** The entries that explain today's code sit at the top, so a\n  reader who stops after three has read the three most likely to matter.\n- **Open until merge, frozen after.** While the pull request is open, its entry\n  is revised freely: a review finding changes the entry for the change it found,\n  a later commit on the same branch extends it, and the trailer is filled in when\n  the number exists. Once the pull request merges, never rewrite or delete the\n  entry, and never edit it to agree with a newer decision. An entry that turned\n  out to be wrong is still the true record of what was believed, and knowing that\n  a design was tried and failed is worth as much as knowing what replaced it. The\n  trailer is the sole exception after merge, and only to fill in a link that\n  could not exist yet — see [The shape of an entry](#the-shape-of-an-entry).\n- **A reversal is a new entry**, dated the day it was reversed, naming the entry\n  it overturns and saying why the first answer did not hold.\n- **Never invent a why.** When you change a module whose reasoning you do not\n  know, record your own reasoning and say plainly what you inherited: \"the\n  previous behavior's motivation is not recorded\". A guessed rationale is worse\n  than a missing one, because the next reader cannot tell it from a real one.\n- **Keep the body current in the same change.** The body says what is true now;\n  the changelog says why it became true. Neither substitutes for the other — a\n  body left stale on the grounds that \"the changelog covers it\" makes a reader\n  reconstruct the present from history.\n- **Length follows consequence.** Three lines for a limit change, a dozen for a\n  design replaced. If an entry outgrows the section it explains, the argument\n  belongs in a PRD and the entry links to it.\n- **Consolidation is a deliberate pass, not a habit.** The changelogs were\n  consolidated once, in September 2026, to the granularity above: entries one\n  commit had split across several headings were merged, and entries that failed\n  the test above were dropped. An entry that `git log` shows and the document\n  does not went in that pass. Do not repeat it piecemeal; if the rules drift\n  again, fix the rules and run one pass.\n\n### Starting one\n\nWhen you create a module document, the changelog starts with one entry dated that\nday, explaining **why the module exists at all** — the problem it was built for\nand the shape it was given. That entry is the one every later reader starts from.\n\nWhen you add a document to a module that already exists, the first entry says so\nand starts from the present:\n\n``` markdown\n## Changelog\n\n### 2026-08-11 — Document created\n\n**What changed:** Nothing in the code. This document describes the module as it\nstands today.\n\n**Why:** The module was built across four pull requests with no durable\ndescription, and its expiry behavior had been re-litigated twice from scratch.\n\n**Consequences:** Changes from here carry an entry. The reasoning behind\ndecisions taken before this date is not recorded and was not reconstructed —\n`git log` and the linked PRDs are what exist.\n```\n\nA document that predates this rule takes a third path, and it is the one most of\n`docs/` will take: the document already exists and is registered, and it grows\nits `## Changelog` section on the next substantial change to the module. There,\nthe first entry **is** that change, written in full, and its **Consequences**\nfield says that the reasoning behind everything before it is not recorded and was\nnot reconstructed. Do not open with a `Document created` entry for a document\nthat was not created that day, and do not mine `git log` for motivations to\nback-fill — a reconstructed why is the one thing this section must not contain.\nThe record starts where the record starts.\n\n### What belongs somewhere else\n\n| The thing you are writing | Where it goes |\n| --- | --- |\n| Why this module changed, and what that constrains | The module document's changelog. |\n| What the module is and how it behaves now | The module document's body. |\n| A proposal for a change not yet built | A [PRD](prds.md) under `docs/PRDs/`. |\n| A decision that moved a PRD's goals or scope while it was being built | That PRD's [decision log](prds.md#the-decision-log), which freezes when the PRD completes. The module document's changelog carries the durable consequence. |\n| A low-level ambiguity resolved without changing the product contract | [`assumptions.md`](assumptions.md). |\n| A purely internal choice with no consequence for anyone changing the module | The pull request description. |\n```\n\n", "url": "https://wpnews.pro/news/internal-changelogs-unlock-autonomous-coding-agents", "canonical_source": "https://rallywith.ai/blog/internal-changelogs/", "published_at": "2026-11-23 22:04:51+00:00", "updated_at": "2026-11-23 22:12:02.912498+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "developer-tools"], "entities": ["Juno AI Labs", "Avalon"], "also_reported_by": [], "takeaway": "Have coding agents append a per-module changelog entry recording what changed, why, and which alternatives were considered and rejected, so later sessions avoid rebuilding removed features or repeating failed designs.", "recommendation": {"advice": "Require every module document to end with a running changelog of what changed, why, and rejected alternatives so later agent sessions avoid repeating failed designs.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/internal-changelogs-unlock-autonomous-coding-agents", "markdown": "https://wpnews.pro/news/internal-changelogs-unlock-autonomous-coding-agents.md", "text": "https://wpnews.pro/news/internal-changelogs-unlock-autonomous-coding-agents.txt", "jsonld": "https://wpnews.pro/news/internal-changelogs-unlock-autonomous-coding-agents.jsonld"}}