<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: martinlepage26-bit</title>
    <description>The latest articles on DEV Community by martinlepage26-bit (@martinlepage26bit).</description>
    <link>https://dev.to/martinlepage26bit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3887707%2F9f5388fd-f7b1-4f9f-87bf-6f08707d552f.png</url>
      <title>DEV Community: martinlepage26-bit</title>
      <link>https://dev.to/martinlepage26bit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/martinlepage26bit"/>
    <language>en</language>
    <item>
      <title>I tried 4 approaches to AI agent memory. Here's what actually worked.</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:41:46 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/i-tried-4-approaches-to-ai-agent-memory-heres-what-actually-worked-2a22</link>
      <guid>https://dev.to/martinlepage26bit/i-tried-4-approaches-to-ai-agent-memory-heres-what-actually-worked-2a22</guid>
      <description>&lt;h1&gt;
  
  
  I tried 4 approaches to AI agent memory. Here's what actually worked.
&lt;/h1&gt;

&lt;p&gt;Six months ago I started building a governance SaaS product with Claude Code as my primary dev partner. The codebase grew. The context problem grew faster.&lt;/p&gt;

&lt;p&gt;I tried four approaches to keeping the agent oriented across sessions. Three of them failed in predictable ways. Here's what I learned from each.&lt;/p&gt;




&lt;h2&gt;
  
  
  Approach 1: Long CLAUDE.md
&lt;/h2&gt;

&lt;p&gt;The obvious starting point. One file, everything in it — project description, architectural decisions, tech stack, naming conventions, open questions, constraints, active tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened:&lt;/strong&gt; It worked for the first two months. Then the file hit ~600 lines and started failing silently. The agent would read it, acknowledge constraints, then propose something that violated a constraint buried in paragraph 14. It wasn't hallucinating — it was attending correctly to the first ~300 tokens and poorly to the rest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The failure mode:&lt;/strong&gt; Flat context doesn't scale. The most relevant information competes with everything else. As the file grows, the signal-to-noise ratio drops and you can't fix it by curating better — the file just becomes a negotiation between what you cut and what the agent needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When it works:&lt;/strong&gt; Projects with a short, stable context that fits in ~200 lines and doesn't evolve much. Anything living longer than a month will outgrow it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Approach 2: Raw note dump + grep/search
&lt;/h2&gt;

&lt;p&gt;Second attempt: put everything in a directory of Markdown files, let the agent search when it needs context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened:&lt;/strong&gt; The agent searched correctly but retrieved fragments. A decision log retrieved in isolation — without the surrounding context of what problem it was solving, what came before it, what constraints shaped it — is almost useless. The agent would find the "what" without the "why."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The failure mode:&lt;/strong&gt; Full-text search retrieves by keyword match, not by meaning. And even when it retrieves the right note, a standalone note without links to adjacent concepts gives the agent a fragment, not understanding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When it works:&lt;/strong&gt; Narrow, well-scoped queries where the right answer is self-contained. Not for architectural context that depends on a web of prior decisions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Approach 3: Embeddings + semantic search (RAG)
&lt;/h2&gt;

&lt;p&gt;Third attempt: embed all notes with &lt;code&gt;sentence-transformers&lt;/code&gt;, query by cosine similarity, feed top-k results as context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened:&lt;/strong&gt; Better recall than keyword search, but a new failure mode appeared — similarity isn't relevance. A note about your authentication design and a note about your deployment checklist can be equally "similar" to a query about your API architecture. The model retrieved plausible-sounding context that wasn't actually the right context.&lt;/p&gt;

&lt;p&gt;More importantly, RAG returns chunks. Chunks don't have relationships. The agent got the right paragraph but not the connected decision that made that paragraph meaningful.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The failure mode:&lt;/strong&gt; Semantic similarity measures distance in embedding space, not logical relevance in your project. And chunked retrieval destroys the graph structure that makes notes meaningful to each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When it works:&lt;/strong&gt; Finding notes you forgot existed, surfacing material you didn't know to search for. Good as a discovery layer, bad as the primary retrieval mechanism for agent context.&lt;/p&gt;




&lt;h2&gt;
  
  
  Approach 4: Structured knowledge graph with mandatory inline linking
&lt;/h2&gt;

&lt;p&gt;What finally held up: restructuring all project knowledge as a linked graph, where the agent navigates by traversal rather than by reading or searching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The structure:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw/       unsynthesized captures, never modified
wiki/      synthesized notes — each requires ≥2 inline [[links]]
CLAUDE.md  ~50 lines pointing to the project hub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The key constraint:&lt;/strong&gt; every note in &lt;code&gt;wiki/&lt;/code&gt; must link to at least two related notes &lt;em&gt;in the body&lt;/em&gt; — not in a trailing "Related" section. A link in the body means the connection is part of the reasoning, not an afterthought. Orphan notes don't exist to the agent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why traversal beats retrieval:&lt;/strong&gt; The agent starts at &lt;code&gt;CLAUDE.md&lt;/code&gt;, follows the link to the project hub, follows links from there to the decision log and active constraints, and reaches relevant context in 3 hops — without searching, without reading everything, without similarity scoring.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The note type that changed everything:&lt;/strong&gt; Decision logs with a "Rejected Alternatives" section. Not just what was decided, but what was explicitly ruled out and why. The agent reads this before suggesting anything architectural. It doesn't re-propose the rejected approach because it already knows why it was rejected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What broke the pattern:&lt;/strong&gt; Notes without links. An insight captured in isolation is invisible to traversal. The discipline of linking before saving — finding the related project, person, concept, or decision and wiring the new note into the graph — is what makes the whole system work. It takes 30 extra seconds per note. It saves 15 minutes per session.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I'd do differently
&lt;/h2&gt;

&lt;p&gt;Start with the graph structure from session one, not after the context problem appears. The worst time to restructure your knowledge is when you're 150 notes in with no backlinks.&lt;/p&gt;

&lt;p&gt;The minimum viable version: one project hub note, one decision log, one active constraints note, wired together. Three notes, all linked. Everything else can come later.&lt;/p&gt;




&lt;p&gt;I packaged the vault structure — skeleton, templates, note types, skill guides, optional local runtime — as a $49 template: &lt;strong&gt;&lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;Obsidian Agent Vault&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The four approaches above are what I went through before landing on the graph structure. Hopefully this saves you the same six-month detour.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>obsidian</category>
      <category>productivity</category>
      <category>claudeai</category>
    </item>
    <item>
      <title>Why Your CLAUDE.md Fails at Scale (and What to Replace It With)</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:41:10 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/why-your-claudemd-fails-at-scale-and-what-to-replace-it-with-3o1h</link>
      <guid>https://dev.to/martinlepage26bit/why-your-claudemd-fails-at-scale-and-what-to-replace-it-with-3o1h</guid>
      <description>&lt;p&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; is one of the best ideas in AI-assisted development. A project-level instruction file the agent reads before every session — architecture overview, tech stack, constraints, conventions. For small projects and short contexts, it works well.&lt;/p&gt;

&lt;p&gt;At scale it breaks. Here's exactly where, why, and what to use instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three failure modes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Failure 1: Attention dilution past ~300 tokens
&lt;/h3&gt;

&lt;p&gt;Language models don't read flat files the way humans do. They weight content throughout the context, and that weighting isn't uniform — content earlier in a long file tends to receive more attention than content buried in the middle.&lt;/p&gt;

&lt;p&gt;Past about 300 tokens (roughly 50-60 lines), a &lt;code&gt;CLAUDE.md&lt;/code&gt; becomes a competition. The specific architectural constraint you need the agent to apply right now is competing for attention with the boilerplate at the top, the tech stack list, the deployment instructions, the conventions section. &lt;/p&gt;

&lt;p&gt;The result: the agent reads the file but acts on the parts that got weighted highest — which may not be the parts relevant to your current task.&lt;/p&gt;

&lt;h3&gt;
  
  
  Failure 2: Stale context mixed with current context
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; files accumulate. You add the new constraint when it's established. You rarely remove the old one when it's superseded. Six months in, the file contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Constraints that no longer apply (the auth approach you changed in February)&lt;/li&gt;
&lt;li&gt;Architectural decisions that have been superseded (the caching strategy you replaced)&lt;/li&gt;
&lt;li&gt;Notes that were relevant during one sprint but shouldn't be shaping AI behavior now&lt;/li&gt;
&lt;li&gt;Actual current constraints buried among the outdated ones&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent can't distinguish fresh from stale. It treats a constraint from eight months ago with the same weight as one established last week, unless you've carefully dated and annotated everything — which adds length and compounds the attention problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Failure 3: One file can't serve multiple retrieval needs
&lt;/h3&gt;

&lt;p&gt;Different sessions need different context. A session working on the auth flow needs auth architecture, the security constraints, the token handling decisions. A session working on the data pipeline needs schema decisions, the ETL constraints, the performance requirements.&lt;/p&gt;

&lt;p&gt;A flat &lt;code&gt;CLAUDE.md&lt;/code&gt; either includes everything (long, diluted) or misses something (short, incomplete). There's no way to load exactly what's relevant for the current session without pre-loading everything and hoping attention lands on the right parts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The breaking point
&lt;/h2&gt;

&lt;p&gt;In practice, &lt;code&gt;CLAUDE.md&lt;/code&gt; works reliably up to about 50-80 lines (300-500 tokens). Most projects hit this limit within the first two months. After that, adding more content actively degrades the context quality — longer file, more competition, worse attention on the sections that matter.&lt;/p&gt;

&lt;p&gt;The symptom: the agent starts making suggestions that violate constraints you know are in the file. Not because it didn't read it — because the constraint was weighted below the threshold of effective influence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The replacement: entry file + knowledge graph
&lt;/h2&gt;

&lt;p&gt;The pattern that scales is a short entry file that boots traversal into a structured knowledge graph. Instead of one long file the agent reads linearly, you give it a 50-line entry point that points to exactly what it needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The entry file (&lt;code&gt;CLAUDE.md&lt;/code&gt;) — stays short, always:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# [Project Name]&lt;/span&gt;

&lt;span class="gu"&gt;## Start here&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Read [[Session State — Project Name]] → current position, next step, open questions
&lt;span class="p"&gt;2.&lt;/span&gt; Read [[Active Constraints — Project Name]] → non-negotiable limits for this project
&lt;span class="p"&gt;3.&lt;/span&gt; Navigate to [[Project Hub]] for architecture and decisions

&lt;span class="gu"&gt;## Quick reference&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Stack: React 18 + FastAPI + Cloudflare Workers
&lt;span class="p"&gt;-&lt;/span&gt; Repo: ~/repos/project-name  
&lt;span class="p"&gt;-&lt;/span&gt; Deploy: &lt;span class="sb"&gt;`npm run build &amp;amp;&amp;amp; wrangler deploy`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Tests: &lt;span class="sb"&gt;`pytest`&lt;/span&gt; (backend) / &lt;span class="sb"&gt;`npm test`&lt;/span&gt; (frontend)

&lt;span class="gu"&gt;## Agent behavior&lt;/span&gt;
Load session state before proposing anything.
Check active constraints before suggesting solutions.
Do not re-propose items in decision logs marked as rejected.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the whole &lt;code&gt;CLAUDE.md&lt;/code&gt;. 30 lines. Clear traversal instructions. No content — only pointers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The knowledge graph (in Obsidian or any linked markdown system):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Session State — Project Name.md    ← 5-field operational record, updated every session
Active Constraints — Project Name.md  ← deployment, compliance, architecture, scope limits
Project Hub.md                     ← links to all decision logs, architecture notes, open work
Decision Log — Auth Layer.md       ← decision + reasoning + rejected alternatives
Decision Log — API Gateway.md
Architecture — Data Pipeline.md
Open Questions — Project Name.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each file is focused. Each file is current — because you update the specific file when something changes, not the monolithic &lt;code&gt;CLAUDE.md&lt;/code&gt;. The agent reads only what's relevant to the current session.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the agent traverses it
&lt;/h2&gt;

&lt;p&gt;At session start, the agent reads the entry file (30 lines, under 200 tokens). The entry file points to session state and active constraints — the two files relevant to every session. The session state points to the project hub; the hub points to the specific decision logs and architecture notes relevant to what you're working on.&lt;/p&gt;

&lt;p&gt;The agent follows links. Two or three hops reaches any relevant context. No attention dilution — it's loading targeted files, not scanning a wall of text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migration: what to pull out of CLAUDE.md
&lt;/h2&gt;

&lt;p&gt;If you have a long &lt;code&gt;CLAUDE.md&lt;/code&gt; that's already hitting these failure modes, migration is straightforward:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What's in your CLAUDE.md&lt;/th&gt;
&lt;th&gt;Where it goes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Current project state&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Session State&lt;/code&gt; — update it every session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Non-obvious rules and limits&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Active Constraints&lt;/code&gt; — organized by category&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Architectural decisions&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Decision Log — [Topic]&lt;/code&gt; — with reasoning and rejected alternatives&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Out-of-scope items&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Active Constraints&lt;/code&gt; → Scope Boundaries section&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tech stack / quick reference&lt;/td&gt;
&lt;td&gt;Stays in &lt;code&gt;CLAUDE.md&lt;/code&gt; — this is genuinely useful at the top level&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment commands&lt;/td&gt;
&lt;td&gt;Stays in &lt;code&gt;CLAUDE.md&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;After migration, your &lt;code&gt;CLAUDE.md&lt;/code&gt; should be under 50 lines. If it's still longer than that, you haven't moved enough out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compounding benefit
&lt;/h2&gt;

&lt;p&gt;The graph structure doesn't just fix the scale problem — it builds compounding context. Each decision log entry becomes a durable record. The session state carries the project forward. The constraints file stays current as the project evolves.&lt;/p&gt;

&lt;p&gt;Six months in, you have an accumulated record of every decision, every rejected alternative, every constraint — all retrievable in two hops, all informing every session. The context quality improves continuously as you work, not just when you remember to update &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;The Obsidian vault template that ships with this graph structure — entry file pattern, session-state format, active constraints template, decision log format, hub template, skill guides — is $49.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;https://pharosml.gumroad.com/l/kvbhdo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're hitting &lt;code&gt;CLAUDE.md&lt;/code&gt; length problems on your current project, the migration takes an afternoon. The template has the target structure ready to populate.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claudeai</category>
      <category>devtools</category>
      <category>obsidian</category>
    </item>
    <item>
      <title>Managing AI Context Across Multiple Projects Without Context Bleed</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:40:34 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/managing-ai-context-across-multiple-projects-without-context-bleed-590a</link>
      <guid>https://dev.to/martinlepage26bit/managing-ai-context-across-multiple-projects-without-context-bleed-590a</guid>
      <description>&lt;p&gt;Single-project AI workflows are tractable. You have one &lt;code&gt;CLAUDE.md&lt;/code&gt;, one context, one set of decisions. You brief the agent once, keep the session-state current, and it works.&lt;/p&gt;

&lt;p&gt;Multi-project workflows break this in three specific ways.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context bleed.&lt;/strong&gt; You've been working on Project A all morning. The auth architecture, the deployment constraints, the open questions — all of that is live in your session. You switch to Project B. The agent carries residual context from A into B. It makes suggestions that would be correct for A but are wrong for B.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Re-briefing overhead.&lt;/strong&gt; You switch projects cleanly, but now you need to re-establish context for B from scratch. Fifteen minutes of re-orientation. You do this every context switch, several times a day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decision contamination.&lt;/strong&gt; You've made decisions on Project A that you're tempted to apply to Project B because they're fresh in mind — even though B has different constraints that make those decisions wrong.&lt;/p&gt;

&lt;p&gt;I run six simultaneous workstreams. Here's the structure that eliminated all three.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core principle: one session-state per project, never shared
&lt;/h2&gt;

&lt;p&gt;The session-state is the working memory for a single project at a single point in time. It must be completely isolated. Nothing from Project A's session-state should ever appear in Project B's.&lt;/p&gt;

&lt;p&gt;This sounds obvious. The implementation is less obvious.&lt;/p&gt;

&lt;p&gt;The naive approach — one &lt;code&gt;CLAUDE.md&lt;/code&gt; per project directory — works if your projects live in separate repos you never open simultaneously. It breaks the moment you're switching between projects in a shared knowledge environment, or when projects share common concepts and you're not careful about which project's context the agent is loading.&lt;/p&gt;

&lt;p&gt;The structure that actually works has three layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: Project-isolated context files
&lt;/h2&gt;

&lt;p&gt;Each project gets its own set of context files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wiki/
  projects/
    project-alpha/
      Alpha Hub.md          ← entry point, links out
      Alpha Session State.md ← 5-field operational record
      Alpha Constraints.md   ← non-obvious limits
      Alpha Decision Log.md  ← decisions + rejected alternatives
    project-beta/
      Beta Hub.md
      Beta Session State.md
      Beta Constraints.md
      Beta Decision Log.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing is shared between these directories. If two projects share a technology or pattern, they each link to the same concept note in &lt;code&gt;wiki/concepts/&lt;/code&gt; — but their session-states, constraints, and decision logs are completely separate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2: The project hub as session entry point
&lt;/h2&gt;

&lt;p&gt;Each project hub is a clean entry point that loads exactly what the agent needs for that project — and nothing else.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Project Alpha Hub&lt;/span&gt;

&lt;span class="gs"&gt;**Active as of:**&lt;/span&gt; 2026-04-20

&lt;span class="gu"&gt;## What This Is&lt;/span&gt;
One sentence. What Project Alpha is building.

&lt;span class="gu"&gt;## Current State&lt;/span&gt;
→ Read [[Alpha Session State]] — updated at every session close

&lt;span class="gu"&gt;## Constraints&lt;/span&gt;
→ [[Alpha Constraints]] — non-obvious limits, always check before proposing

&lt;span class="gu"&gt;## Decisions&lt;/span&gt;
→ [[Alpha Decision Log]] — what was decided and what was rejected

&lt;span class="gu"&gt;## Key Context&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Stack: [specifics]
&lt;span class="p"&gt;-&lt;/span&gt; Repo: ~/repos/alpha
&lt;span class="p"&gt;-&lt;/span&gt; Deploy: [specifics]

&lt;span class="gu"&gt;## For the agent&lt;/span&gt;
Load session state first. Check constraints before proposing solutions.
Do not apply patterns from other projects unless explicitly asked.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last line is load-bearing. It explicitly tells the agent not to transfer patterns from other sessions. This won't prevent all context bleed (the agent doesn't have true memory isolation), but it establishes a clear behavioral norm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 3: The routing entry file
&lt;/h2&gt;

&lt;p&gt;With six projects, you need a routing layer — a master entry that points to the right hub without loading everything at once.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Project Router&lt;/span&gt;

&lt;span class="gu"&gt;## Active Projects&lt;/span&gt;

| Project | Hub | Last Session | Status |
|---------|-----|-------------|--------|
| Alpha | [[Alpha Hub]] | 2026-04-20 | Active |
| Beta | [[Beta Hub]] | 2026-04-19 | Blocked — waiting on client |
| Gamma | [[Gamma Hub]] | 2026-04-18 | Active |
| Delta | [[Delta Hub]] | 2026-04-15 | Parked |
| Epsilon | [[Epsilon Hub]] | 2026-04-20 | Active |
| Zeta | [[Zeta Hub]] | 2026-04-10 | Closing |

&lt;span class="gu"&gt;## How to start a session&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Name the project in your first message
&lt;span class="p"&gt;2.&lt;/span&gt; Load the hub for that project
&lt;span class="p"&gt;3.&lt;/span&gt; Read session state before anything else
&lt;span class="p"&gt;4.&lt;/span&gt; Work within that project's context only
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your &lt;code&gt;CLAUDE.md&lt;/code&gt; points to this router. At session start, you tell the agent which project you're working on. It loads the hub, reads the session-state, and operates in that project's context.&lt;/p&gt;

&lt;p&gt;The key: you only load one hub per session. The router exists so you can see all projects at a glance, but loading it doesn't load all the session-states. You navigate to the right one explicitly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The context-switch protocol
&lt;/h2&gt;

&lt;p&gt;When switching projects mid-session:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Close the current project.&lt;/strong&gt; Update its session-state (what changed, what was decided, next step). This takes 3–4 minutes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start a new session&lt;/strong&gt; (or explicitly tell the agent you're switching projects). Don't try to continue in the same session with a different project context — the residual is too strong.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open the new project.&lt;/strong&gt; Tell the agent which project you're switching to. Load its hub. Read its session-state. Work.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The session-state update at step 1 is the mechanism that makes the switch clean. If you don't update before switching, you lose the current project's state and you can't re-establish it without re-reading everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling shared concepts
&lt;/h2&gt;

&lt;p&gt;Projects often share concepts: a shared API, a common design system, a regulatory framework both projects operate under.&lt;/p&gt;

&lt;p&gt;These go in &lt;code&gt;wiki/concepts/&lt;/code&gt; or &lt;code&gt;wiki/shared/&lt;/code&gt; — notes that any project can link to but that don't belong to any single project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wiki/
  concepts/
    EU AI Act Requirements.md   ← both Projects Alpha and Gamma link here
    Design System Tokens.md     ← shared by Alpha, Beta, Epsilon
    PIPEDA Compliance Notes.md  ← shared regulatory context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each project's constraint file links to the relevant shared concepts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Alpha Constraints&lt;/span&gt;

&lt;span class="gu"&gt;## Regulatory&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; PIPEDA applies — see [[PIPEDA Compliance Notes]] for specifics
&lt;span class="p"&gt;-&lt;/span&gt; EU AI Act: deferred to v2 (see [[EU AI Act Requirements]] for scope)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The shared concept note is updated once. All projects that link to it get the update automatically. No duplicated content, no risk of projects having different versions of the same regulatory information.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this looks like in practice
&lt;/h2&gt;

&lt;p&gt;A typical day running this system:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9:00am — Project Alpha session&lt;/strong&gt;&lt;br&gt;
Open Claude. Load Alpha Hub. Read Alpha Session State. Work on the endpoint spec that was the "next step" from yesterday's close. 90 seconds to orient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11:30am — Switch to Project Gamma&lt;/strong&gt;&lt;br&gt;
Close Alpha: update session-state (decided on caching strategy, rejected option C, next step is load testing). Start fresh session. Load Gamma Hub. Read Gamma Session State. 90 seconds to orient. Work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2:00pm — Back to Alpha&lt;/strong&gt;&lt;br&gt;
Start fresh session. Load Alpha Hub. Read Alpha Session State (which I updated at 11:30). Pick up from the next step I left. No re-briefing. 90 seconds.&lt;/p&gt;

&lt;p&gt;The context bleed is gone because each session is a clean start from an isolated session-state. The re-briefing overhead is gone because the session-state captures everything. The decision contamination is gone because each project's decision log is separate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost without this structure
&lt;/h2&gt;

&lt;p&gt;Without isolated session-states, context-switching has a compounding tax. Each switch costs 15 minutes of re-orientation. Each project degrades the next one slightly through residual context. Decisions made in one project bleed into another.&lt;/p&gt;

&lt;p&gt;For six projects, that tax is 1–2 hours of overhead per day. Over a month, it's real time lost.&lt;/p&gt;

&lt;p&gt;The structure above takes half a day to set up once. It pays back within the first week.&lt;/p&gt;




&lt;p&gt;The vault template that ships with the per-project hub structure, session-state format, constraint files, decision logs, and routing pattern is $49.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;https://pharosml.gumroad.com/l/kvbhdo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;$299 for a guided setup — I configure the multi-project structure for your specific workstream mix. Worth it if you're running 4+ simultaneous projects and the context overhead is already noticeable.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>obsidian</category>
      <category>devtools</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why AI Code Review Keeps Flagging the Wrong Things (and How to Fix It)</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:39:58 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/why-ai-code-review-keeps-flagging-the-wrong-things-and-how-to-fix-it-4j2e</link>
      <guid>https://dev.to/martinlepage26bit/why-ai-code-review-keeps-flagging-the-wrong-things-and-how-to-fix-it-4j2e</guid>
      <description>&lt;p&gt;AI code review has a consistent failure mode: it surfaces generic issues and misses the ones that actually matter for your project.&lt;/p&gt;

&lt;p&gt;You paste a function. The AI flags potential null pointer issues, suggests adding error logging, recommends extracting a constant. These are fine observations — for a codebase it knows nothing about. But it misses the actual problem: this function violates the constraint that all auth-path operations must complete under 200ms, which you established three months ago when you separated the auth layer from the API gateway.&lt;/p&gt;

&lt;p&gt;The AI didn't miss this because it's bad at code review. It missed it because you never told it the constraint existed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What AI code review is actually reviewing
&lt;/h2&gt;

&lt;p&gt;When you paste code for review without context, the AI is doing generic static analysis with pattern matching against common issues. It's reviewing your code against:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;General best practices for the language&lt;/li&gt;
&lt;li&gt;Common error patterns it's seen in training&lt;/li&gt;
&lt;li&gt;Standard code quality heuristics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is not reviewing against:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your architectural decisions&lt;/li&gt;
&lt;li&gt;Your explicit constraints&lt;/li&gt;
&lt;li&gt;The alternatives you already ruled out and why&lt;/li&gt;
&lt;li&gt;The tech debt you're intentionally carrying&lt;/li&gt;
&lt;li&gt;The SLA requirements that define what "good" looks like for this specific function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gap between "generic code review" and "project-aware code review" is the difference between a smart stranger looking at your code and a teammate who's been on the project for six months.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four things AI code review doesn't know without you
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Architectural decisions that constrain "correct"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your auth layer is separate from the API gateway. Any suggestion that couples them is wrong — not because coupling is bad in general, but because you've decided it's wrong for this project for specific reasons (independent scaling, latency isolation, deploy cycle separation).&lt;/p&gt;

&lt;p&gt;Without knowing this, the AI will periodically suggest approaches that violate your architecture. These suggestions look reasonable in isolation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Intentional tech debt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You have a known N+1 query in the profile endpoint. You know about it. You've decided to fix it in Q3 when you migrate to the new data layer. Until then, don't touch it.&lt;/p&gt;

&lt;p&gt;Without knowing this, the AI will flag it every time you paste code that touches the profile endpoint. You'll spend time explaining why you're not fixing it right now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Non-obvious constraints&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your application runs on Cloudflare Workers. There's no filesystem. No long-running processes. Any suggestion that involves either of those is invalid — not occasionally, but categorically, for every function in the codebase.&lt;/p&gt;

&lt;p&gt;Without knowing this, the AI will suggest solutions that are architecturally impossible for your deployment target.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Rejected alternatives&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You evaluated three caching strategies last month. Two were ruled out for specific reasons. The AI doesn't know this. It will suggest one of the rejected approaches as a "potential improvement."&lt;/p&gt;

&lt;p&gt;Without knowing this, you'll spend time re-evaluating an approach you already rejected.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix: a context file for code review
&lt;/h2&gt;

&lt;p&gt;Before asking for code review, give the AI a context file. Not a full architecture document — a focused summary of what the AI needs to review correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Code Review Context — [Project Name]&lt;/span&gt;

&lt;span class="gu"&gt;## Architecture Constraints&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Auth layer is separate from API gateway (independent scaling + latency isolation)
&lt;span class="p"&gt;  -&lt;/span&gt; Do NOT suggest coupling these
&lt;span class="p"&gt;-&lt;/span&gt; Deployment: Cloudflare Workers (no filesystem, no long-running processes, no Node.js APIs)
&lt;span class="p"&gt;  -&lt;/span&gt; Any suggestion requiring filesystem or persistent process is invalid

&lt;span class="gu"&gt;## Performance Requirements&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Auth-path endpoints: &amp;lt; 200ms P95
&lt;span class="p"&gt;-&lt;/span&gt; Data-path endpoints: &amp;lt; 500ms P95
&lt;span class="p"&gt;-&lt;/span&gt; Flag anything that adds synchronous operations on the hot path

&lt;span class="gu"&gt;## Known Tech Debt (Do Not Flag)&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; N+1 query in profile endpoint — tracked, fixing in Q3 migration
&lt;span class="p"&gt;-&lt;/span&gt; Legacy error format in /api/v1/&lt;span class="err"&gt;*&lt;/span&gt; routes — maintained for backwards compat

&lt;span class="gu"&gt;## Rejected Approaches&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; In-memory caching: rejected — Workers are stateless, cache doesn't persist between requests
&lt;span class="p"&gt;-&lt;/span&gt; Unified middleware: rejected — couples auth and data deploy cycles
&lt;span class="p"&gt;-&lt;/span&gt; Session tokens in KV: rejected — doesn't meet compliance requirements

&lt;span class="gu"&gt;## What to Focus On&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Correctness against the constraints above
&lt;span class="p"&gt;-&lt;/span&gt; Edge cases specific to the Cloudflare Workers runtime
&lt;span class="p"&gt;-&lt;/span&gt; Anything that violates the auth/data separation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this context loaded, the AI reviews against your actual project requirements. It won't suggest unified middleware — it knows that was rejected. It won't suggest filesystem operations — it knows the deployment target. It will flag the 200ms constraint violation you actually need to catch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this lives in a structured knowledge system
&lt;/h2&gt;

&lt;p&gt;If you're using a knowledge vault for project context, the code review constraints belong in your active constraints note — the same one your &lt;code&gt;CLAUDE.md&lt;/code&gt; points to for every session.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Active Constraints — [Project Name]&lt;/span&gt;

&lt;span class="gu"&gt;## Deployment&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Cloudflare Workers only — no filesystem, no persistent processes

&lt;span class="gu"&gt;## Performance&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Auth path: &amp;lt; 200ms P95
&lt;span class="p"&gt;-&lt;/span&gt; Data path: &amp;lt; 500ms P95

&lt;span class="gu"&gt;## Architecture (locked decisions)&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Auth layer separate from API gateway (see [[Decision: Auth Layer Separation]])
&lt;span class="p"&gt;-&lt;/span&gt; No unified middleware (see [[Decision: API Gateway Architecture]])

&lt;span class="gu"&gt;## Known Tech Debt (intentional, do not flag)&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; N+1 query in profile endpoint — scheduled for Q3 migration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When this note is linked from your project hub and the &lt;code&gt;CLAUDE.md&lt;/code&gt; points to the hub, the agent reads the constraints before every session — including code review sessions. You don't have to paste the context file manually each time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shift in review quality
&lt;/h2&gt;

&lt;p&gt;Code review without project context: generic, noisy, misses architectural violations, surfaces known tech debt as new findings.&lt;/p&gt;

&lt;p&gt;Code review with project context: project-specific, accurate, flags actual violations of your constraints, respects intentional debt decisions.&lt;/p&gt;

&lt;p&gt;Same model. Same code. Different context.&lt;/p&gt;




&lt;p&gt;The vault structure that maintains this context automatically — active constraints note, decision logs with rejected alternatives, hub template, session-state — is packaged as a $49 Obsidian template.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;https://pharosml.gumroad.com/l/kvbhdo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;$299 guided setup for teams who want it configured for their specific stack. The code review context pattern above is one of eight note types included in the template.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>devtools</category>
      <category>claudeai</category>
    </item>
    <item>
      <title>How to Architect AI Agent Memory That Survives Context Window Limits</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:39:23 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/how-to-architect-ai-agent-memory-that-survives-context-window-limits-1k1m</link>
      <guid>https://dev.to/martinlepage26bit/how-to-architect-ai-agent-memory-that-survives-context-window-limits-1k1m</guid>
      <description>&lt;p&gt;The most common advice for giving Claude Code project context: write a &lt;code&gt;CLAUDE.md&lt;/code&gt; file. Put your architecture decisions, tech stack, constraints, and current state in there. Keep it updated.&lt;/p&gt;

&lt;p&gt;This works until it doesn't.&lt;/p&gt;

&lt;p&gt;Past about 300 tokens, attention dilutes. The most relevant constraint competes with everything else in the file. You end up with a &lt;code&gt;CLAUDE.md&lt;/code&gt; that's 2,000 lines long and still misses context you need. The agent reads the whole thing and effectively prioritizes the first third.&lt;/p&gt;

&lt;p&gt;The fix isn't a better &lt;code&gt;CLAUDE.md&lt;/code&gt;. It's a different retrieval architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core problem: retrieval, not storage
&lt;/h2&gt;

&lt;p&gt;When you give an agent a long flat file, the retrieval model is "read everything." That's fine for small amounts of context. For anything beyond a few hundred tokens, it degrades — not because the model is bad, but because you're asking it to find a needle in a haystack it has to read start-to-finish.&lt;/p&gt;

&lt;p&gt;The architecture that works is &lt;strong&gt;graph traversal&lt;/strong&gt;: the agent starts from a short entry point and follows links to reach relevant context. Three hops covers anything specific. You never load everything at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three-zone structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw/              ← unsynthesized captures (never modified by the agent)
wiki/             ← synthesized, linked knowledge notes
session-state.md  ← live operational context per project
CLAUDE.md         ← 50-line entry point → graph
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Zone 1: &lt;code&gt;raw/&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Captures go here exactly as written — meeting notes, paste-ins, half-formed thoughts. The agent knows this is staging material, not established knowledge. It can reference it but should never reason from it as settled fact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zone 2: &lt;code&gt;wiki/&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Synthesized notes only. Each note requires at least two inline &lt;code&gt;[[links]]&lt;/code&gt; — not a trailing "Related" section, but links woven into the body where the connection is actually made. This creates the traversal graph.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zone 3: &lt;code&gt;session-state.md&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Five fields, updated at every session close:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Objective&lt;/span&gt;
What this project is trying to accomplish.

&lt;span class="gu"&gt;## Active Constraints&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Deployment: Cloudflare Workers only (no Node.js runtime)
&lt;span class="p"&gt;-&lt;/span&gt; Compliance: PIPEDA in scope; EU AI Act deferred to v2
&lt;span class="p"&gt;-&lt;/span&gt; Timeline: Revenue-positive by June 22

&lt;span class="gu"&gt;## Decisions Made&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; API gateway scoped separately from auth layer
  (reasons: latency isolation, independent scaling)
&lt;span class="p"&gt;-&lt;/span&gt; Rejected: unified middleware — couples deploy cycles,
  adds latency on every data request

&lt;span class="gu"&gt;## Open Questions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Whether to proxy through gateway on internal calls
      (UNRESOLVED — blocker for /auth/verify implementation)
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Caching strategy for user profile endpoint

&lt;span class="gu"&gt;## Next Step&lt;/span&gt;
Write /api/auth/verify endpoint spec.
Internal proxy question must be resolved first.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The CLAUDE.md entry pattern
&lt;/h2&gt;

&lt;p&gt;The entry file is not where context lives. It's where traversal starts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Project: [Name]&lt;/span&gt;

&lt;span class="gu"&gt;## Current State&lt;/span&gt;
→ Read [[Session State — Project Name]] for live context.

&lt;span class="gu"&gt;## Architecture&lt;/span&gt;
→ [[Project Hub]] — technical decisions entry point
→ [[Active Constraints]] — non-obvious limits in effect
→ [[Decision Log Index]] — decisions made + alternatives rejected

&lt;span class="gu"&gt;## Quick Context&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Stack: React 18 + FastAPI + MongoDB + Cloudflare Pages
&lt;span class="p"&gt;-&lt;/span&gt; Repo: ~/repos/project-name
&lt;span class="p"&gt;-&lt;/span&gt; Deploy: &lt;span class="sb"&gt;`npm run build &amp;amp;&amp;amp; wrangler publish`&lt;/span&gt;

&lt;span class="gu"&gt;## Agent Behavior&lt;/span&gt;
Read session-state first. Follow links to relevant context
before proposing solutions. Do not re-propose options listed
in "Alternatives Rejected" in any decision log.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;~50 lines, ~400 tokens. The agent reads this, then follows links to retrieve exactly what it needs. Context in 2–3 hops; never loads everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The decision log — highest ROI note type
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Decision: [Title]&lt;/span&gt;

&lt;span class="gs"&gt;**Date:**&lt;/span&gt; 2026-03-12  
&lt;span class="gs"&gt;**Status:**&lt;/span&gt; Locked

&lt;span class="gu"&gt;## Decision&lt;/span&gt;
[What was decided]

&lt;span class="gu"&gt;## Reasoning&lt;/span&gt;
[Why this approach. The non-obvious parts.]

&lt;span class="gu"&gt;## Alternatives Rejected&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [Option A]: rejected because [specific reason]
&lt;span class="p"&gt;-&lt;/span&gt; [Option B]: rejected because [specific reason]

&lt;span class="gu"&gt;## Open Questions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] [Anything still unresolved about this decision]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The "Alternatives Rejected" section is what earns the most. When this note is linked from the project hub, the agent reads it before proposing anything. It doesn't re-propose Option A — it already knows why you said no.&lt;/p&gt;

&lt;p&gt;Without this record: the agent periodically re-proposes rejected approaches because the reasoning that ruled them out only existed in a closed chat window.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mandatory linking rule
&lt;/h2&gt;

&lt;p&gt;Every &lt;code&gt;wiki/&lt;/code&gt; note requires at least two inline &lt;code&gt;[[links]]&lt;/code&gt;. Not links in a trailing section — links woven into the body where the connection is made.&lt;/p&gt;

&lt;p&gt;This isn't aesthetic. A note with no backlinks is an orphan: the agent can't traverse to it. Your decision log doesn't exist to the agent if nothing links to it.&lt;/p&gt;

&lt;p&gt;The enforcement pattern that works: &lt;strong&gt;hub templates&lt;/strong&gt; that scaffold the link structure before you fill in content.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# [[Project Name]] Hub&lt;/span&gt;

&lt;span class="gu"&gt;## Current State&lt;/span&gt;
→ [[Session State — Project Name]]

&lt;span class="gu"&gt;## Technical Architecture&lt;/span&gt;
→ [[Architecture Overview]]
→ [[Active Constraints]]
→ [[API Design Decisions]]

&lt;span class="gu"&gt;## Open Work&lt;/span&gt;
→ [[Sprint Log]]
→ [[Open Questions — Project Name]]

&lt;span class="gu"&gt;## Key People&lt;/span&gt;
→ [[Client Name]]
→ [[Stakeholder Name]]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hub creates entry points. Entry points create traversal paths. Traversal paths mean context reaches the agent without the agent reading everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optional: local runtime for offline or local-model use
&lt;/h2&gt;

&lt;p&gt;For Ollama / LM Studio / llama.cpp workflows, the vault ships with a Python runtime:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;setup.sh&lt;/code&gt;&lt;/strong&gt; — installs deps, builds the vector index:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;sentence-transformers
python embed.py   &lt;span class="c"&gt;# ~2 min for 200+ notes, all-MiniLM-L6-v2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;ask.py&lt;/code&gt;&lt;/strong&gt; — hybrid query (vector similarity + backlink traversal):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python ask.py &lt;span class="s2"&gt;"what constraints apply to the auth module?"&lt;/span&gt;
python ask.py &lt;span class="s2"&gt;"what did we decide about the API gateway?"&lt;/span&gt; &lt;span class="nt"&gt;--top&lt;/span&gt; 5
python ask.py &lt;span class="s2"&gt;"current project state"&lt;/span&gt; &lt;span class="nt"&gt;--full&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;vault_watcher.py&lt;/code&gt;&lt;/strong&gt; — watches for new notes, updates index on save.&lt;/p&gt;

&lt;p&gt;Why hybrid? Vector similarity retrieves semantically close notes; backlink traversal then widens the result by following links from those notes. You get related content by meaning &lt;em&gt;and&lt;/em&gt; by structure — chunks with relationships, not just chunks.&lt;/p&gt;

&lt;p&gt;Runs fully on-device. No cloud required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;After 212 notes and six months daily use:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Session startup&lt;/td&gt;
&lt;td&gt;15 min&lt;/td&gt;
&lt;td&gt;90 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Re-proposed rejected approaches&lt;/td&gt;
&lt;td&gt;Weekly&lt;/td&gt;
&lt;td&gt;Never&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Handoff cost on context-switch&lt;/td&gt;
&lt;td&gt;Full re-briefing&lt;/td&gt;
&lt;td&gt;Read the hub&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same model. Different retrieval architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  The skeleton
&lt;/h2&gt;

&lt;p&gt;The vault — note types, hub templates, decision-log format, skill guides, session-state protocol, and local runtime — is packaged as a $49 Obsidian template.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;https://pharosml.gumroad.com/l/kvbhdo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also: $299 guided setup (structure configured for your specific project type), $2,500 for teams who want a shared memory layer.&lt;/p&gt;

&lt;p&gt;The architecture above is the complete system. The template is six months of iteration baked into a skeleton you can drop into an existing Obsidian vault in an afternoon.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>obsidian</category>
      <category>devtools</category>
      <category>claudeai</category>
    </item>
    <item>
      <title>The 3 Notes Every AI-Assisted Project Needs Before the First Session</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:38:26 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/the-3-notes-every-ai-assisted-project-needs-before-the-first-session-54gn</link>
      <guid>https://dev.to/martinlepage26bit/the-3-notes-every-ai-assisted-project-needs-before-the-first-session-54gn</guid>
      <description>&lt;p&gt;Most advice about AI context management assumes you're building a full system. Vault architecture, note types, skill guides, linking rules — useful eventually, but a lot to absorb before you've even started.&lt;/p&gt;

&lt;p&gt;This is the minimal version. Three notes. You can create them in 20 minutes. They'll cut your session startup time in half before you've built anything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Note 1: The project hub
&lt;/h2&gt;

&lt;p&gt;One file per project. Call it &lt;code&gt;[ProjectName] Hub.md&lt;/code&gt;. Put it somewhere you'll remember.&lt;/p&gt;

&lt;p&gt;Contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# [Project Name] Hub&lt;/span&gt;

&lt;span class="gu"&gt;## What This Is&lt;/span&gt;
One sentence. What this project is trying to accomplish.

&lt;span class="gu"&gt;## Current State&lt;/span&gt;
What's true right now. Not the goal — the present position.
&lt;span class="p"&gt;-&lt;/span&gt; What's built / done
&lt;span class="p"&gt;-&lt;/span&gt; What's in progress
&lt;span class="p"&gt;-&lt;/span&gt; What's blocked

&lt;span class="gu"&gt;## Stack / Environment&lt;/span&gt;
The non-obvious technical details:
&lt;span class="p"&gt;-&lt;/span&gt; Language/framework versions
&lt;span class="p"&gt;-&lt;/span&gt; Deployment target
&lt;span class="p"&gt;-&lt;/span&gt; Key external dependencies
&lt;span class="p"&gt;-&lt;/span&gt; Anything that constrains how the AI should suggest solutions

&lt;span class="gu"&gt;## Key Files&lt;/span&gt;
The 3–5 files the AI should know about. Paths, not descriptions.

&lt;span class="gu"&gt;## Links&lt;/span&gt;
→ [[Active Constraints — Project Name]]
→ [[Session State — Project Name]]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the file your &lt;code&gt;CLAUDE.md&lt;/code&gt; (or equivalent) points to. Instead of loading everything at once, the agent reads the hub and follows links to what it needs.&lt;/p&gt;

&lt;p&gt;Keep it under 100 lines. If it grows past that, the project needs a more structured setup — but for most projects, this is enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Note 2: Active constraints
&lt;/h2&gt;

&lt;p&gt;A separate file: &lt;code&gt;Active Constraints — [ProjectName].md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is the note that earns its keep fastest. It captures the non-obvious rules — the ones an agent wouldn't know from reading your code, and that you've been re-explaining at the start of every session.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Active Constraints — [Project Name]&lt;/span&gt;

&lt;span class="gu"&gt;## Deployment&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [e.g. Cloudflare Workers only — no Node.js filesystem access]
&lt;span class="p"&gt;-&lt;/span&gt; [e.g. Must stay within free tier limits for now]

&lt;span class="gu"&gt;## Compliance / Legal&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [e.g. PIPEDA in scope — no US-only data storage]
&lt;span class="p"&gt;-&lt;/span&gt; [e.g. Client NDA — no third-party AI APIs on their data]

&lt;span class="gu"&gt;## Technical&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [e.g. No new dependencies without approval — bundle size constraint]
&lt;span class="p"&gt;-&lt;/span&gt; [e.g. Postgres only — no other databases]

&lt;span class="gu"&gt;## Timeline&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [e.g. Hard launch: June 22 — no scope creep past MVP definition]

&lt;span class="gu"&gt;## Explicitly Out of Scope (This Phase)&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [Thing you keep getting asked about that's intentionally deferred]
&lt;span class="p"&gt;-&lt;/span&gt; [Another deferred decision]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The "Explicitly Out of Scope" section is the one most people skip. It's also the one that saves the most time. When the agent suggests something you've already decided not to do this phase, you need to be able to say "it's in the out-of-scope list" rather than re-arguing the point.&lt;/p&gt;

&lt;p&gt;Fill this in before your first session. Update it whenever a constraint changes or a scope decision gets made.&lt;/p&gt;

&lt;h2&gt;
  
  
  Note 3: Session state
&lt;/h2&gt;

&lt;p&gt;One file per project: &lt;code&gt;Session State — [ProjectName].md&lt;/code&gt;. Five fields. Update it at the end of every session. Read it at the start of the next one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Session State — [Project Name]&lt;/span&gt;

&lt;span class="gs"&gt;**Last updated:**&lt;/span&gt; [date]

&lt;span class="gu"&gt;## Objective&lt;/span&gt;
[What this project is currently trying to accomplish — may be more specific than the hub]

&lt;span class="gu"&gt;## Decisions Made&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [Decision]: [brief reason why]
&lt;span class="p"&gt;  -&lt;/span&gt; Rejected: [alternative] — [why it was ruled out]
&lt;span class="p"&gt;-&lt;/span&gt; [Another decision]

&lt;span class="gu"&gt;## Open Questions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] [Something explicitly unresolved — not a to-do, an open decision]
&lt;span class="p"&gt;-&lt;/span&gt; [ ] [Another unresolved question]

&lt;span class="gu"&gt;## Blockers&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [Anything currently preventing forward progress]

&lt;span class="gu"&gt;## Next Step&lt;/span&gt;
[The exact action to take at the start of the next session. One sentence. Specific enough that the agent can start without clarification.]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The "Decisions Made" and "Open Questions" fields are the ones that matter most.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decisions Made&lt;/strong&gt; prevents re-litigation. When you write "Rejected: unified middleware — couples deploy cycles, adds latency on every data request," the agent reads that before suggesting anything architectural. It doesn't re-propose unified middleware. The no is on record.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Questions&lt;/strong&gt; prevents silent gap-filling. Questions not marked open get filled in — by you with guesses, by the agent with plausible inference. Writing them down forces both of you to hold the uncertainty rather than pretend it doesn't exist.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next Step&lt;/strong&gt; is what makes session re-entry frictionless. Not "continue working on auth." Specific: "Write the /api/auth/verify endpoint spec. The internal proxy question is a blocker — resolve that first."&lt;/p&gt;

&lt;h2&gt;
  
  
  Wiring it up
&lt;/h2&gt;

&lt;p&gt;In your &lt;code&gt;CLAUDE.md&lt;/code&gt; (or whatever entry file you use), add three lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Context&lt;/span&gt;
→ Read [[ProjectName Hub]] for current state and stack.
→ Read [[Active Constraints — ProjectName]] before proposing solutions.
→ Read [[Session State — ProjectName]] to understand where we are and what's next.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. The agent reads the hub, checks constraints, loads current state. The session starts with context instead of a briefing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this gets you
&lt;/h2&gt;

&lt;p&gt;Without these three notes, every session opens cold. You re-explain the project. The agent suggests something you've already ruled out. You correct it. You remember a constraint at minute eight and add it to the prompt. You spend 15 minutes getting to useful work.&lt;/p&gt;

&lt;p&gt;With these three notes, you read them at session open (2 minutes), the agent reads them too, and the session starts from current state. Not from zero.&lt;/p&gt;

&lt;p&gt;That shift — from 15 minutes to 2 minutes — is the whole value. Everything else (full vault structure, skill guides, linked knowledge graph) is an amplification of this core pattern.&lt;/p&gt;




&lt;p&gt;These three notes are part of a larger vault system I've been running for six months on a 212-note Obsidian vault. The full skeleton — note types, hub templates, decision-log format, linking rules, skill guides, session-state protocol, optional local runtime — is packaged as a $49 template.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;https://pharosml.gumroad.com/l/kvbhdo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But you don't need the template to start. Create the three notes above this week. See what happens to your session startup time. Then decide if the larger system is worth building.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>obsidian</category>
      <category>productivity</category>
      <category>claudeai</category>
    </item>
    <item>
      <title>Every new Claude session started from zero. Here's how I fixed it.</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:37:49 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/every-new-claude-session-started-from-zero-heres-how-i-fixed-it-4eng</link>
      <guid>https://dev.to/martinlepage26bit/every-new-claude-session-started-from-zero-heres-how-i-fixed-it-4eng</guid>
      <description>&lt;h1&gt;
  
  
  Every new Claude session started from zero. Here's how I fixed it.
&lt;/h1&gt;

&lt;p&gt;There's a specific kind of frustration that comes after you've been working with Claude Code for a few weeks.&lt;/p&gt;

&lt;p&gt;You open a new session. You start describing your project. The agent asks a clarifying question — and you realize it's the same question it asked in session three. You've explained this before. You've made this decision. You've already ruled out that approach, and you even remember &lt;em&gt;why&lt;/em&gt;. But the agent doesn't.&lt;/p&gt;

&lt;p&gt;The context window closes. The session ends. Everything that wasn't written somewhere permanent evaporates.&lt;/p&gt;

&lt;p&gt;I hit this wall hard while working on a governance software product with interconnected decisions across infrastructure, product architecture, compliance scope, and research writing. Every session felt like onboarding a new contractor who needed to be caught up from scratch. I was spending 20% of every session on re-explanation.&lt;/p&gt;

&lt;p&gt;The fix wasn't a better prompt. It was a memory layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the problem actually is
&lt;/h2&gt;

&lt;p&gt;Claude Code is stateless by design. Each session starts with whatever you hand it at the top: a &lt;code&gt;CLAUDE.md&lt;/code&gt;, some file paths, maybe a few recent commits. That's the entire context budget for "what is this project and how does it work."&lt;/p&gt;

&lt;p&gt;Most people solve this by making &lt;code&gt;CLAUDE.md&lt;/code&gt; longer. That doesn't scale. You can't fit the full reasoning behind a year of architectural decisions into a header file.&lt;/p&gt;

&lt;p&gt;What you actually need is a &lt;strong&gt;knowledge graph&lt;/strong&gt; that the agent can traverse — not a flat dump it has to read all at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture that works
&lt;/h2&gt;

&lt;p&gt;I use Obsidian as the memory layer. The structure has three zones:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw/         ← unsynthesized captures, preserved exactly as written
wiki/        ← synthesized notes with inline [[links]] to related concepts
CLAUDE.md    ← entry point: points to the project hub, not a wall of text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;wiki/&lt;/code&gt; directory is the knowledge graph. Every note in it must have at least two meaningful inline &lt;code&gt;[[links]]&lt;/code&gt; to other notes — not links dumped at the bottom in a "Related" section, but links woven into the body where the actual connection is made.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;CLAUDE.md&lt;/code&gt; is deliberately short. It points to a &lt;strong&gt;project hub note&lt;/strong&gt;, which links outward to decision logs, architecture notes, people, open questions, and constraints. The agent traverses the graph instead of reading a monolith.&lt;/p&gt;

&lt;h2&gt;
  
  
  The note types that matter
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Decision log:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Decision: Auth Layer Scope&lt;/span&gt;

&lt;span class="gs"&gt;**Status:**&lt;/span&gt; Locked  
&lt;span class="gs"&gt;**Date:**&lt;/span&gt; 2026-03-12

&lt;span class="gu"&gt;## Decision&lt;/span&gt;
Keep auth separate from the API gateway layer.

&lt;span class="gu"&gt;## Alternatives Rejected&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Unified middleware: rejected — couples deploy cycles, adds latency on every request.
&lt;span class="p"&gt;-&lt;/span&gt; Auth-in-gateway: rejected — obscures auth logic, harder to test independently.

&lt;span class="gu"&gt;## Open Questions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Whether internal calls should bypass gateway or proxy through
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When this note is linked from the project hub, the agent sees it before making architectural suggestions. It won't re-propose the unified middleware. It already knows why you rejected it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Active constraints note:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Project Constraints&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; [[Deployment Target]]: Cloudflare Pages + Workers only (no VMs)
&lt;span class="p"&gt;-&lt;/span&gt; [[Language]]: TypeScript frontend, Python backend — no language additions without discussion
&lt;span class="p"&gt;-&lt;/span&gt; [[Compliance]]: PIPEDA + Quebec Law 25 in scope; EU AI Act out of scope v1
&lt;span class="p"&gt;-&lt;/span&gt; [[Timeline]]: Revenue-positive by 2026-06-22
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Short, linked, updated as constraints change. The agent loads this in the first traversal hop and never proposes something that violates a locked constraint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open questions note:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Open Questions&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; [ ] Railway vs Hetzner for backend hosting — decision pending cost analysis
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Whether regulatory corpus ingestion is in scope for v1
&lt;span class="p"&gt;-&lt;/span&gt; [ ] CF Pages recreate vs rename — CF dashboard action required first
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This replaces the end-of-session "TODO" you write in chat that disappears when the session closes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The linking rule that makes it work
&lt;/h2&gt;

&lt;p&gt;The structure only holds if every note is &lt;strong&gt;connected into the graph&lt;/strong&gt; — reachable via traversal, not just search.&lt;/p&gt;

&lt;p&gt;A note that exists in &lt;code&gt;wiki/&lt;/code&gt; but has no backlinks from anywhere is invisible to the agent unless it reads every file. That defeats the purpose.&lt;/p&gt;

&lt;p&gt;The test I use: can the agent get from &lt;code&gt;CLAUDE.md&lt;/code&gt; to this note in three hops or fewer? If not, something in the chain is broken.&lt;/p&gt;

&lt;p&gt;I enforce this with a simple protocol:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before creating any note, search for related existing notes&lt;/li&gt;
&lt;li&gt;Always add &lt;code&gt;[[links]]&lt;/code&gt; inline in the body (not just at the end)&lt;/li&gt;
&lt;li&gt;After creating a note, update the relevant hub or MOC page so it links back&lt;/li&gt;
&lt;li&gt;Never create orphan notes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With 212 notes in my vault, the agent reliably finds relevant context without brute-force reading. It traverses. That's the difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I packaged
&lt;/h2&gt;

&lt;p&gt;After building and refining this over several months, I packaged the vault structure as a template:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vault skeleton&lt;/strong&gt; with the raw/wiki/maps/templates structure pre-configured&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hub templates&lt;/strong&gt; (project, person, concept, decision) that enforce the linking pattern before you fill in content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Four named skill guides&lt;/strong&gt; (Caelir for research synthesis, Ilyris for topic mapping, Ariun for linking hygiene, Mnara for archiving stale material) — these are plain-language instruction files the agent follows when invoked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional local runtime&lt;/strong&gt; (setup.sh + ask.py + vault_watcher.py) for running queries against the vault without a cloud subscription&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLAUDE.md patterns&lt;/strong&gt; that actually scale as the vault grows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The template is $49 and available here: &lt;strong&gt;&lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;Obsidian Agent Vault&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There's also a $299 guided setup option if you want help adapting the structure to your specific project type, and a $2,500 team license for small teams wanting a shared memory layer.&lt;/p&gt;




&lt;p&gt;The core insight: an AI agent with a well-structured graph of your project's decisions, constraints, and open questions is a fundamentally different tool than one reading a long &lt;code&gt;CLAUDE.md&lt;/code&gt; cold. The structure is what makes context persistent. The linking discipline is what makes it traversable.&lt;/p&gt;

&lt;p&gt;Happy to share the hub template or the linking-hygiene skill guide in the comments if there's interest.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>obsidian</category>
      <category>productivity</category>
      <category>claudeai</category>
    </item>
    <item>
      <title>Most AI "Hallucinations" Are Context Failures, Not Model Failures</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:37:14 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/most-ai-hallucinations-are-context-failures-not-model-failures-4ce</link>
      <guid>https://dev.to/martinlepage26bit/most-ai-hallucinations-are-context-failures-not-model-failures-4ce</guid>
      <description>&lt;p&gt;"Hallucination" is the word we use when an AI model produces something plausible but wrong. It's treated as a fundamental model failure — an inherent limitation of probabilistic text generation that we're stuck managing.&lt;/p&gt;

&lt;p&gt;I want to challenge that framing, at least for applied AI work.&lt;/p&gt;

&lt;p&gt;Most of what gets called hallucination in real workflows isn't the model inventing things out of nothing. It's the model filling in missing context with its best guess. And most of the time, the context isn't actually missing from reality — it's just missing from what you gave the model.&lt;/p&gt;

&lt;p&gt;That's a context problem, not a model problem. And it's fixable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What hallucination actually looks like in practice
&lt;/h2&gt;

&lt;p&gt;You're writing a technical specification. You ask Claude to add a section on authentication. It writes something technically reasonable but inconsistent with your actual architecture — it suggests OAuth when you've already decided on JWT for specific reasons, proposes a token rotation period that conflicts with your security policy, and doesn't mention the session handling constraint that came out of last month's incident review.&lt;/p&gt;

&lt;p&gt;Is that a hallucination? Sort of. The model generated plausible content. But the failures are all traceable to missing context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It didn't know you'd decided on JWT (no decision log)&lt;/li&gt;
&lt;li&gt;It didn't know your security policy constraints (no active-constraints record)&lt;/li&gt;
&lt;li&gt;It didn't know about the incident and what you learned from it (no session history)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Give the model all three pieces of context explicitly, and those specific errors disappear. The model wasn't wrong because it can't reason about authentication — it was wrong because it was reasoning from incomplete information.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap between capability and consistency
&lt;/h2&gt;

&lt;p&gt;Modern LLMs are remarkably capable. They can reason about complex domains, maintain logical consistency within a context window, and produce high-quality output when given the right inputs.&lt;/p&gt;

&lt;p&gt;The problem in applied work isn't capability — it's consistency. The same model, asked the same question at different times with different context, produces different answers. Some of those differences are fine (appropriate variation). Some are errors that get called hallucinations.&lt;/p&gt;

&lt;p&gt;The consistency gap is almost entirely explained by context variation. What you told the model in this session vs. last session. What you remembered to include vs. forgot. What changed in your project since the last time you worked on this.&lt;/p&gt;

&lt;h2&gt;
  
  
  What structured context actually prevents
&lt;/h2&gt;

&lt;p&gt;When I introduced a session-state protocol into my workflow — a structured record of active constraints, decisions made, open questions, and current project state, read by the AI at the start of every session — the incidence of the errors I was calling "hallucinations" dropped substantially.&lt;/p&gt;

&lt;p&gt;Not to zero. There are genuine model errors that context doesn't fix. But the large majority of my workflow failures were context failures that looked like model failures.&lt;/p&gt;

&lt;p&gt;Specific patterns that disappeared:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constraint violations.&lt;/strong&gt; "The AI keeps suggesting X even though I've told it we can't do X." Once the constraint was written into the active-constraints field and read every session, this stopped. The model was never incapable of respecting the constraint — it just wasn't being told about it consistently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decision revisiting.&lt;/strong&gt; "The AI keeps re-opening questions I've already answered." Once the decisions-made field included not just the decision but the rationale and the rejected alternatives, this stopped. The model could see not just what was decided but why — making the closed question clearly closed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stale-reference errors.&lt;/strong&gt; "The AI is working from an outdated version of the spec." Once the current-state field explicitly named the version and what had changed since the last session, this stopped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-project contamination.&lt;/strong&gt; "The AI seems to be mixing up details from different projects." Once each project had its own hub note with its own explicit context, this stopped.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture that makes this work
&lt;/h2&gt;

&lt;p&gt;The context needs to be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Structured&lt;/strong&gt; — not a prose dump, but specific fields: constraints, decisions, state, next step. Structured context is more reliably loaded than narrative context.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Current&lt;/strong&gt; — updated at session close, not just at project start. Context that's six weeks stale is almost as bad as no context.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connected&lt;/strong&gt; — linked to other relevant notes. An authentication constraint note that links to the threat model, the incident log, and the relevant decision records is more useful than a standalone note.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scoped&lt;/strong&gt; — per project, not global. A hub note for each active engagement prevents cross-project contamination.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is graph-structured, file-native knowledge — Obsidian's model, applied to AI workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The vault
&lt;/h2&gt;

&lt;p&gt;The Obsidian vault skeleton that operationalises this architecture — hub templates, session-state protocol, decision-log format, linking rules, note types — is packaged as a $49 template.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;Obsidian Agent Vault on Gumroad&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If your AI workflow is producing errors you're attributing to model failures, run the diagnosis first: how much of that context does the model actually have access to in each session? The answer is often "less than you think."&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: &lt;code&gt;#ai&lt;/code&gt; &lt;code&gt;#llm&lt;/code&gt; &lt;code&gt;#productivity&lt;/code&gt; &lt;code&gt;#obsidian&lt;/code&gt; &lt;code&gt;#pkm&lt;/code&gt; &lt;code&gt;#softwareengineering&lt;/code&gt; &lt;code&gt;#devtools&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>discuss</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>The Real Cost of Rebuilding AI Context (And How to Stop Paying It)</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:36:21 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/the-real-cost-of-rebuilding-ai-context-and-how-to-stop-paying-it-2ch7</link>
      <guid>https://dev.to/martinlepage26bit/the-real-cost-of-rebuilding-ai-context-and-how-to-stop-paying-it-2ch7</guid>
      <description>&lt;p&gt;Here's a calculation most people haven't done:&lt;/p&gt;

&lt;p&gt;How much time per week do you spend getting an AI back up to speed on what you're working on?&lt;/p&gt;

&lt;p&gt;I did this calculation six months ago. The number was uncomfortable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The baseline
&lt;/h2&gt;

&lt;p&gt;At the time I was doing about 8 meaningful AI-assisted work sessions per week — writing, research, code, analysis. Each session started with some amount of context-setting: explaining the project, pasting in relevant documents, reminding the AI of decisions we'd already made, re-establishing the constraints.&lt;/p&gt;

&lt;p&gt;I timed it. The average context-reconstruction overhead per session was &lt;strong&gt;12–15 minutes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;8 sessions × 13 minutes = ~1.75 hours per week on context reconstruction.&lt;/p&gt;

&lt;p&gt;That's one full work session. Every week. Just getting back to where I was.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you're actually reconstructing
&lt;/h2&gt;

&lt;p&gt;Context reconstruction isn't a single task. It breaks down into:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. State recovery&lt;/strong&gt; — "Where were we?" You paste in the document, scan for where you left off, remind yourself what you were trying to do. Even if you remember perfectly, the AI doesn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Decision archaeology&lt;/strong&gt; — "What did we already decide?" The thing you're about to ask the AI might be something you explicitly resolved two sessions ago. Without a record, you won't remember. You'll explore the same territory again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Constraint re-establishment&lt;/strong&gt; — "What are the rules?" The specific requirements, client preferences, or non-obvious constraints that shape this work. They live in your head. Every session, you rediscover how many of them matter when the AI violates them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Approach rejection&lt;/strong&gt; — "What didn't work?" The approaches you've already tried and discarded. Without a record, the AI will suggest them again. You'll spend time re-evaluating options you've already closed.&lt;/p&gt;

&lt;p&gt;Each of these has a time cost. Together, they're the overhead that prevents AI-assisted work from compounding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The ROI of a session-state protocol
&lt;/h2&gt;

&lt;p&gt;The fix is simple: write a structured note at the end of every session. Not a transcript — a state snapshot.&lt;/p&gt;

&lt;p&gt;Five fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Objective&lt;/span&gt;
[What this project is trying to accomplish]

&lt;span class="gu"&gt;## Active constraints  &lt;/span&gt;
[Non-obvious rules that shape the work]

&lt;span class="gu"&gt;## Decisions made&lt;/span&gt;
[What's been decided, with brief rationale — especially what was rejected]

&lt;span class="gu"&gt;## Open questions&lt;/span&gt;
[What's still unresolved]

&lt;span class="gu"&gt;## Next step&lt;/span&gt;
[The concrete next action, specific enough to act on immediately]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This takes 3–5 minutes to write at session close. At session open, the AI reads it. Context-reconstruction time drops from 13 minutes to 90 seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Weekly time saved: ~1.5 hours.&lt;/strong&gt; Per year: ~75 hours. At any reasonable hourly rate, the compounding value is significant.&lt;/p&gt;

&lt;h2&gt;
  
  
  The less obvious ROI: decision quality
&lt;/h2&gt;

&lt;p&gt;The time calculation understates the value. The bigger return is decision quality.&lt;/p&gt;

&lt;p&gt;When you have a record of &lt;em&gt;why&lt;/em&gt; you made previous decisions, you make better decisions on subsequent sessions. You don't re-open questions that are already closed. You don't lose constraints in the noise. You don't repeat failed approaches.&lt;/p&gt;

&lt;p&gt;The AI's output quality also improves — not because the model got better, but because it's receiving better context. A well-contextualised session with an average prompt outperforms a poorly-contextualised session with a perfect prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this looks like at scale
&lt;/h2&gt;

&lt;p&gt;The session-state protocol is the core habit. But at 10+ active projects, you need infrastructure around it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A hub note per project (canonical entry point, current state, decisions log)&lt;/li&gt;
&lt;li&gt;A raw-sources zone (captures that haven't been synthesized yet)&lt;/li&gt;
&lt;li&gt;A wiki layer (synthesized, permanently linked knowledge)&lt;/li&gt;
&lt;li&gt;MOC notes (indexes into the graph for fast navigation)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is what I built. It's now a 212-note Obsidian vault that serves as my persistent AI memory across all projects.&lt;/p&gt;

&lt;p&gt;The skeleton — note types, hub templates, linking patterns, session-state protocol, optional local runtime — is packaged as a template.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;Obsidian Agent Vault on Gumroad&lt;/a&gt; — $49&lt;/p&gt;

&lt;p&gt;If your AI sessions currently start with 10+ minutes of context-setting, that's the symptom. The vault addresses the cause.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: &lt;code&gt;#productivity&lt;/code&gt; &lt;code&gt;#ai&lt;/code&gt; &lt;code&gt;#obsidian&lt;/code&gt; &lt;code&gt;#pkm&lt;/code&gt; &lt;code&gt;#devtools&lt;/code&gt; &lt;code&gt;#timemanagement&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The one Obsidian note that stopped Claude from re-proposing ideas I'd already rejected</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:36:16 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/the-one-obsidian-note-that-stopped-claude-from-re-proposing-ideas-id-already-rejected-30m9</link>
      <guid>https://dev.to/martinlepage26bit/the-one-obsidian-note-that-stopped-claude-from-re-proposing-ideas-id-already-rejected-30m9</guid>
      <description>&lt;h1&gt;
  
  
  The one Obsidian note that stopped Claude from re-proposing ideas I'd already rejected
&lt;/h1&gt;

&lt;p&gt;There's a specific failure pattern that shows up after a few months of AI-assisted development.&lt;/p&gt;

&lt;p&gt;You're in a session. The agent proposes an approach. You push back — you tried that, it didn't work, here's why. The session continues. Two weeks later, different session, different context: the agent proposes the same approach again. With confident reasoning that sounds better than your original objection.&lt;/p&gt;

&lt;p&gt;This isn't hallucination. It's a record-keeping problem. The reasoning behind your rejection only existed in a closed chat window. From the agent's perspective, starting fresh, the approach looks reasonable.&lt;/p&gt;

&lt;p&gt;The fix is one note type: a Decision Log with a mandatory "Alternatives Rejected" section.&lt;/p&gt;




&lt;h2&gt;
  
  
  What makes a Decision Log different from a regular note
&lt;/h2&gt;

&lt;p&gt;Most notes capture what is. Decision Logs capture what was chosen, what was ruled out, and — critically — why.&lt;/p&gt;

&lt;p&gt;The "why rejected" is the load-bearing part. Without it, you have a record of decisions. With it, you have a record the agent can reason from.&lt;/p&gt;

&lt;p&gt;Here's the format I use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;decision&lt;/span&gt;
&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;locked&lt;/span&gt;
&lt;span class="na"&gt;date&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2026-03-12&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gh"&gt;# Decision — Auth Layer Scope&lt;/span&gt;

&lt;span class="gu"&gt;## Decision&lt;/span&gt;
Keep authentication separate from the API gateway layer.

&lt;span class="gu"&gt;## Context&lt;/span&gt;
[[Project Hub — CompassAI]] — this decision came up during the evidence endpoint
security audit when rate-limit telemetry was being added.

&lt;span class="gu"&gt;## Reasoning&lt;/span&gt;
Latency isolation: auth path and data path have different SLA requirements.
Independent scaling: auth service can be scaled without coupling to API deploy cycles.
Test isolation: auth logic stays testable independently of gateway routing.

&lt;span class="gu"&gt;## Alternatives Rejected&lt;/span&gt;

&lt;span class="gs"&gt;**Unified middleware:**&lt;/span&gt;
Rejected because it couples deploy cycles — a change to auth requires redeploying
the gateway, and vice versa. Also adds latency on every request, not just auth ones.
Profiled at +18ms median on the evidence ingest path.

&lt;span class="gs"&gt;**Auth-in-gateway:**&lt;/span&gt;
Rejected because it obscures auth logic from the backend team. Makes unit testing
harder (can't test auth without spinning up the gateway mock). Discovered during
the initial security review that this pattern makes CORS enforcement ambiguous.

&lt;span class="gu"&gt;## Open Questions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Whether internal service-to-service calls should bypass gateway or proxy through
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Token refresh: handle at gateway or push to client?

&lt;span class="gu"&gt;## Links&lt;/span&gt;
[[Active Constraints — CompassAI]] · [[Decision — Rate Limit Telemetry Scope]]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why each section is there
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;## Decision&lt;/code&gt;&lt;/strong&gt; — one sentence, no hedging. If you can't write the decision in one sentence, it's not a decision yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;## Context&lt;/code&gt;&lt;/strong&gt; — links back to the project hub and names the moment when this decision was made. Gives the agent temporal and project context so it understands why this mattered when it mattered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;## Reasoning&lt;/code&gt;&lt;/strong&gt; — the affirmative case. What made the chosen option correct. Keep it to 3-5 sentences. If it's longer, you're defending a bad decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;## Alternatives Rejected&lt;/code&gt;&lt;/strong&gt; — the section that does the actual work. Name each alternative, give a specific reason it was rejected, and include any concrete data if you have it (latency numbers, test failure rates, code review findings). Generic rejections ("too complex") don't help the agent or future-you. Specific rejections do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;## Open Questions&lt;/code&gt;&lt;/strong&gt; — the uncertainty that this decision leaves open. Checked off when resolved, linked to a new decision note when they become a decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;## Links&lt;/code&gt;&lt;/strong&gt; — inline links to adjacent notes. The decision log is useless if it's an orphan. It needs to be reachable from the project hub and linked to the constraints it produced.&lt;/p&gt;




&lt;h2&gt;
  
  
  How the agent uses it
&lt;/h2&gt;

&lt;p&gt;When you wire the decision log into your project hub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Project Hub — CompassAI&lt;/span&gt;

&lt;span class="gu"&gt;## Decisions&lt;/span&gt;
[[Decision — Auth Layer Scope]]
[[Decision — Rate Limit Telemetry Scope]]
[[Decision — DB Schema for Evidence Records]]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And your &lt;code&gt;CLAUDE.md&lt;/code&gt; points to the hub, the agent traverses this graph at the start of each session. It reads the decision log before making architectural suggestions. It sees "Unified middleware — rejected because it couples deploy cycles" and doesn't propose unified middleware.&lt;/p&gt;

&lt;p&gt;The rejection is visible before the suggestion happens. The proposal never surfaces.&lt;/p&gt;




&lt;h2&gt;
  
  
  The pattern that makes this work at scale
&lt;/h2&gt;

&lt;p&gt;A single decision log is useful. Twenty linked decision logs are a project memory.&lt;/p&gt;

&lt;p&gt;The key discipline: &lt;strong&gt;create a decision log every time you make a non-trivial architectural, product, or process decision&lt;/strong&gt; — not just the big ones. A decision about which HTTP status code to return on a specific error condition is worth logging if you spent more than five minutes reasoning about it.&lt;/p&gt;

&lt;p&gt;The cost is ~5 minutes per decision at creation time. The return is every future session where the agent doesn't re-open a closed question.&lt;/p&gt;




&lt;h2&gt;
  
  
  The two mistakes that break this
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mistake 1: Rejected alternatives without specific reasons.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Auth-in-gateway: rejected — too complex" tells the agent nothing it can reason from. The agent doesn't know what "too complex" means in this context. The next session it might propose auth-in-gateway again because the complexity trade-off looks different with a different feature set.&lt;/p&gt;

&lt;p&gt;"Auth-in-gateway: rejected — obscures auth logic from backend team, makes unit testing without gateway mock impractical, causes CORS ambiguity during security review" is specific enough to foreclose the option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mistake 2: Decision logs with no backlinks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A decision log that isn't linked from the project hub doesn't exist to the agent during traversal. It only shows up if the agent explicitly searches for it, which doesn't happen automatically. Wire every decision log into the hub under &lt;code&gt;## Decisions&lt;/code&gt;. Wire the constraints it produced into &lt;code&gt;Active Constraints&lt;/code&gt;. Bidirectional links mean the agent reaches it from either direction.&lt;/p&gt;




&lt;h2&gt;
  
  
  Starting point
&lt;/h2&gt;

&lt;p&gt;If you want to try this without restructuring your entire note system: just create one Decision Log for the last significant architectural decision you made on your current project.&lt;/p&gt;

&lt;p&gt;Use the format above. Write the "Alternatives Rejected" section even if it feels like overkill. Link it back to whatever project hub or &lt;code&gt;CLAUDE.md&lt;/code&gt; you already have.&lt;/p&gt;

&lt;p&gt;Run one session with the agent, give it access to that note, and watch whether it proposes the rejected alternative.&lt;/p&gt;

&lt;p&gt;If it doesn't — that's the pattern working.&lt;/p&gt;




&lt;p&gt;The full vault structure (hub templates, all note types, linking discipline, skill guides, optional local runtime) is packaged as a $49 template: &lt;strong&gt;&lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;Obsidian Agent Vault&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Decision Log template ships as part of it, along with the other three note types (project hub, active constraints, open questions). But the format above is enough to start.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>obsidian</category>
      <category>claudeai</category>
      <category>devtools</category>
    </item>
    <item>
      <title>The Context Window Is Not Your Memory</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:35:32 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/the-context-window-is-not-your-memory-d0o</link>
      <guid>https://dev.to/martinlepage26bit/the-context-window-is-not-your-memory-d0o</guid>
      <description>&lt;p&gt;There's a conflation in how most people talk about AI memory that leads them to build the wrong thing.&lt;/p&gt;

&lt;p&gt;The context window and memory are not the same thing. They serve different purposes, operate on different timescales, and fail in different ways. Conflating them produces a system that looks like it handles memory but doesn't actually compound over time.&lt;/p&gt;

&lt;p&gt;Here's the distinction and why it matters practically.&lt;/p&gt;

&lt;h2&gt;
  
  
  The context window
&lt;/h2&gt;

&lt;p&gt;The context window is the model's working memory — the span of tokens it can attend to in a single inference pass. Everything outside the window is invisible. Everything inside the window is equally weighted (with some positional decay depending on architecture).&lt;/p&gt;

&lt;p&gt;Key properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Session-scoped&lt;/strong&gt; — it resets when the conversation ends&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expensive to fill&lt;/strong&gt; — every token you put in costs inference compute&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flat&lt;/strong&gt; — there's no inherent hierarchy or structure; a crucial constraint and a filler paragraph cost the same&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bounded&lt;/strong&gt; — even very long context models have limits, and performance degrades with distance from the query&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-persistent&lt;/strong&gt; — nothing in the context window writes itself to storage automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The context window is useful for reasoning within a session. It's not useful as a persistence mechanism because it has no persistence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory
&lt;/h2&gt;

&lt;p&gt;Memory, in the sense that matters for ongoing work, is structured information that persists across sessions and is available to be selectively loaded into context when relevant.&lt;/p&gt;

&lt;p&gt;Key properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Durable&lt;/strong&gt; — survives session boundaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selective&lt;/strong&gt; — not everything needs to be loaded every time; only what's relevant to the current task&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured&lt;/strong&gt; — organized so the right things can be found and loaded efficiently&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linked&lt;/strong&gt; — connected to other relevant pieces so that loading one node gives you traversal hooks to related context&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accumulated&lt;/strong&gt; — gets richer over time as more decisions, constraints, and state are recorded&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Memory is what you build and maintain. The context window is what you load memory into at session time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the conflation is harmful
&lt;/h2&gt;

&lt;p&gt;When people treat the context window as their memory system, they build workflows that:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paste everything in every session.&lt;/strong&gt; Load all potentially relevant documents at the start of each conversation. This works until you hit context limits, runs the risk of missing something, costs tokens proportional to how much you paste, and requires you to manually curate what's relevant every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rely on chat history.&lt;/strong&gt; Use the conversation history as a de facto memory store. This fails when you start a new thread (history resets), when you need to find something specific (chat history is terrible for retrieval), and when you want to share context with a different model or tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build "memory" features on top of context.&lt;/strong&gt; Tools that summarize conversations and prepend them to the next session are still just filling the context window — with summaries instead of full history. Better than nothing, but fundamentally still ephemeral. The summary is lossy and unstructured.&lt;/p&gt;

&lt;p&gt;None of these produce the compounding effect that genuine persistent memory does, because none of them build a durable, structured, queryable store that gets richer over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture that works
&lt;/h2&gt;

&lt;p&gt;Persistent memory for AI-assisted work needs three things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. External storage.&lt;/strong&gt; Outside the model, in files or a database. Not in the context window. Not in chat history. Written to disk in a format you control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Structure.&lt;/strong&gt; Not a prose dump — typed fields with known semantics. A decision record has different fields than a constraint record has different fields than a session-state record. The structure makes selective loading possible and makes the content reliably interpretable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A loading protocol.&lt;/strong&gt; A defined process for deciding what gets loaded into context at session start. Not everything, every time — just the hub note for the active project, the session-state record, and any directly relevant linked notes. This keeps context costs low and ensures the most important information is loaded closest to the query.&lt;/p&gt;

&lt;p&gt;This is what I call the hub-and-spoke pattern: a hub note per project that's always loaded (current state, active constraints, key decisions), with spokes to more detailed notes that get loaded selectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  The file-native implementation
&lt;/h2&gt;

&lt;p&gt;The simplest implementation of this is also the most portable: plain Markdown files with structured sections and wiki-style &lt;code&gt;[[links]]&lt;/code&gt; between related notes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No database required&lt;/li&gt;
&lt;li&gt;No API calls for retrieval&lt;/li&gt;
&lt;li&gt;No build step for embeddings&lt;/li&gt;
&lt;li&gt;Works with any model that can read files&lt;/li&gt;
&lt;li&gt;Fully auditable (it's just text)&lt;/li&gt;
&lt;li&gt;Version-controllable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tradeoff vs. vector databases: discovery is harder (you need to know what you're looking for, or use a lightweight vector search layer for exploration). For ongoing projects where you know what you're working on, direct file reads are faster and more reliable than probabilistic retrieval.&lt;/p&gt;

&lt;h2&gt;
  
  
  The vault
&lt;/h2&gt;

&lt;p&gt;The Obsidian vault skeleton I use operationalises this pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hub templates (the always-loaded entry point per project)&lt;/li&gt;
&lt;li&gt;Session-state protocol (what gets written at close and read at open)&lt;/li&gt;
&lt;li&gt;Note types with defined structure (decisions, constraints, state, open questions)&lt;/li&gt;
&lt;li&gt;Linking conventions that enable traversal&lt;/li&gt;
&lt;li&gt;Optional lightweight vector search for discovery&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;Obsidian Agent Vault on Gumroad&lt;/a&gt; — $49&lt;/p&gt;

&lt;p&gt;If your AI workflow today is primarily context-window management — pasting, summarizing, re-loading — you're working against the grain of how these systems are designed. The context window is for reasoning. Memory is for persistence. Build the right thing for each.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: &lt;code&gt;#ai&lt;/code&gt; &lt;code&gt;#llm&lt;/code&gt; &lt;code&gt;#obsidian&lt;/code&gt; &lt;code&gt;#pkm&lt;/code&gt; &lt;code&gt;#softwareengineering&lt;/code&gt; &lt;code&gt;#productivity&lt;/code&gt; &lt;code&gt;#machinelearning&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>nlp</category>
    </item>
    <item>
      <title>Why Better Prompts Aren't the Fix (And What Actually Is)</title>
      <dc:creator>martinlepage26-bit</dc:creator>
      <pubDate>Thu, 07 May 2026 18:35:31 +0000</pubDate>
      <link>https://dev.to/martinlepage26bit/why-better-prompts-arent-the-fix-and-what-actually-is-4cd9</link>
      <guid>https://dev.to/martinlepage26bit/why-better-prompts-arent-the-fix-and-what-actually-is-4cd9</guid>
      <description>&lt;p&gt;I spent three months trying to get consistent results from Claude by improving my prompts.&lt;/p&gt;

&lt;p&gt;Better structure. More examples. Chain-of-thought instructions. Role framing. Temperature tuning. The whole toolkit.&lt;/p&gt;

&lt;p&gt;The results got marginally better, then plateaued. And then I noticed something uncomfortable: the same prompt produced wildly different output depending on &lt;em&gt;when&lt;/em&gt; in a project I ran it.&lt;/p&gt;

&lt;p&gt;Early in a project, when I had full context in my head — great results. Six weeks in, after I'd context-switched five times — mediocre results, even with the "good" prompt.&lt;/p&gt;

&lt;p&gt;The prompt hadn't changed. &lt;em&gt;My context had.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual variable
&lt;/h2&gt;

&lt;p&gt;Prompts tell the model what to do. Context tells the model who's asking, what they've already decided, what constraints they're operating under, and what "good" looks like for this specific situation.&lt;/p&gt;

&lt;p&gt;When you have rich context, a mediocre prompt works fine. When you have weak context, even a perfect prompt produces generic output.&lt;/p&gt;

&lt;p&gt;This is the thing prompt engineering tutorials don't address: they optimize the instruction while assuming context is constant. It isn't. Context degrades continuously across sessions, context-switches, and team handoffs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What degraded context looks like in practice
&lt;/h2&gt;

&lt;p&gt;You're working on a technical document. You've been iterating on it for two weeks. You have strong opinions about what should and shouldn't be in it — but those opinions live in your head, not anywhere the AI can see them.&lt;/p&gt;

&lt;p&gt;You open a new session. You paste in the document and your prompt. The AI helpfully adds sections you explicitly decided to exclude last week. It uses a tone you've already rejected. It misses the specific constraint that makes this project unusual.&lt;/p&gt;

&lt;p&gt;You spend 20 minutes correcting outputs that a well-contextualised session would have gotten right in one pass.&lt;/p&gt;

&lt;p&gt;Multiply that by every session, every project, every team member. That's the real cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  What structured context actually looks like
&lt;/h2&gt;

&lt;p&gt;The fix isn't a better prompt. It's a persistent record that travels with every session:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decision log&lt;/strong&gt; — what's been decided and, critically, what's been &lt;em&gt;rejected&lt;/em&gt;. Not just the current answer but the ruled-out alternatives. When the AI suggests something you've already considered and discarded, you can point to the record: "We tried that. Here's why it failed."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Active constraints&lt;/strong&gt; — the specific requirements, boundaries, and non-obvious rules that apply to this project. Things that wouldn't be obvious from the artifact alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Current state&lt;/strong&gt; — where the project is right now. Not a full history, just the present position: what's done, what's in progress, what's blocked and why.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next step&lt;/strong&gt; — the concrete action that closes the gap between current state and goal. Not "continue working on X" — the actual next move.&lt;/p&gt;

&lt;p&gt;This structure takes 10 minutes to set up per project. It eliminates the context-reconstruction overhead on every subsequent session.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compounding effect
&lt;/h2&gt;

&lt;p&gt;The real payoff isn't session 2. It's session 20.&lt;/p&gt;

&lt;p&gt;By the time you've been working on something for three months, the accumulated decisions, rejected approaches, and learned constraints are substantial. Without a record, you reconstruct a fraction of them each session and forget the rest. With a record, they're all available to the AI immediately, every time.&lt;/p&gt;

&lt;p&gt;The output quality doesn't plateau. It improves as the record grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  The vault structure
&lt;/h2&gt;

&lt;p&gt;I built a file-native knowledge vault that operationalises this pattern across all my AI-assisted work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hub notes&lt;/strong&gt; per project — one canonical entry point with the current state, decisions made, and active constraints&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decision log format&lt;/strong&gt; — a specific structure for recording &lt;em&gt;why&lt;/em&gt; things were rejected, not just what was chosen&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill notes&lt;/strong&gt; — reusable task templates that carry their own context requirements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session-state protocol&lt;/strong&gt; — a start/end ritual that updates the record so the next session starts clean&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The skeleton for this system — all the note types, hub templates, linking patterns, and the optional local runtime — is packaged as a $49 Obsidian vault template.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pharosml.gumroad.com/l/kvbhdo" rel="noopener noreferrer"&gt;Obsidian Agent Vault on Gumroad&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've been frustrated by inconsistent AI output and your first instinct has been to improve the prompt, consider that the problem might be upstream of the prompt.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: &lt;code&gt;#productivity&lt;/code&gt; &lt;code&gt;#ai&lt;/code&gt; &lt;code&gt;#obsidian&lt;/code&gt; &lt;code&gt;#promptengineering&lt;/code&gt; &lt;code&gt;#devtools&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
