---
title: "Discussion on \"AI Reads Your Codebase. Then It Forgets Everything.\" | Hashnode"
description: "Discussion on \"AI Reads Your Codebase. Then It Forgets Everything.\". AAT: A Semantic Layer for the AI Era"
url: "https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [AI Reads Your Codebase. Then It Forgets Everything.](https://blog.iroha1203.dev/ai-reads-your-codebase-then-it-forgets-everything?utm_source=hashnode&utm_medium=feed)

AAT: A Semantic Layer for the AI Era

Sep 7 · 15 min read · blog.iroha1203.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#software-architecture](https://hashnode.com/tag/software-architecture)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)
-   [#development](https://hashnode.com/tag/development)

## Written by

[Hiroyuki Nakahata](https://hashnode.com/@iroha1203)

@iroha1203 · Tokyo, Japan

  
[View profile](https://hashnode.com/@iroha1203)

Algebraic Architecture Theory

I’m a software engineer in Japan. Outside of work, I enjoy horse racing. ORCID:0009-0008-5928-0234

## Responses 5

Markdown supported · ⌘↵ to post

[JohnLogan](https://hashnode.com/@johnlogan)

[Sep 9](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6aa0d2a56ff33a73521484c8)

I totally get what you're saying about AI's memory issues! It's such a tricky balance—I've had moments where I felt like my own code was a bit forgotten, too. It's like we often rely on our tools to remember things for us but then feel let down when they don’t! Have you ever tried creating documentation alongside? It helps me keep things together. What do you think? space waves

[Hiroyuki Nakahata](https://hashnode.com/@iroha1203)

[Sep 9](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6aa0d2a56ff33a73521484c8#reply-6aa164dbce52a8e993fe9d86)

Thanks for the comment!

Documentation is really important, but I think it also needs a clear management policy. In my project, I organize documents into four tiers.

Tier 1 contains the canonical documents that affect the entire project. Tier 2 defines development rules and guidelines. Tier 3 contains task-level design documents and PRDs, while Tier 4 is for notes and informal working material.

By separating documents into tiers, it becomes easier to define which source takes priority when documents conflict, and to keep the direction of dependencies between documents clear.

[Mateo Ruiz](https://hashnode.com/@mateoruiz)

[Sep 8](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6a9ffd870afc99876113b923)

The distinction between storing code context and storing the relationships behind that context is the interesting part here. An agent can retrieve the same files in a new session, but that doesn't mean it has retained the reasoning needed to safely change them.

One practical extension I’d add is treating the semantic layer as a kind of architectural cache with explicit invalidation. If the code changes but the extracted relationships don't, the agent could be reasoning from a stale model without realizing it. Versioning those relationships against commits, tests, and design decisions could make the “persistent understanding” idea much more useful in real-world refactoring workflows.

That feels like an important bridge between semantic modeling and something engineers can actually trust in production.

[Hiroyuki Nakahata](https://hashnode.com/@iroha1203)

[Sep 8](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6a9ffd870afc99876113b923#reply-6aa00060bd8e491067fe8866)

Thanks for the comment! That’s a really interesting point.

For a general semantic layer, I agree that you’d need some form of cache invalidation or versioning to make sure stale references don’t remain in use.

AAT is aiming to model the geometry of meaning in a codebase, so the idea is for ArchMap to be updated synchronously whenever the code changes. In other words, the operational assumption is that an AI agent should not end up reasoning from an outdated semantic model in the first place.

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Sep 11](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6aa3dab66eec5d3664777b66)

This feels like the next kind of context debt agents will hit. The hard part isn't finding the code, it's keeping the relationships they figured out last time.
