<?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: Eason XUE</title>
    <description>The latest articles on DEV Community by Eason XUE (@easonnotsing).</description>
    <link>https://dev.to/easonnotsing</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%2F3941178%2F478b8804-6413-4a5e-a786-da094bfb40a0.png</url>
      <title>DEV Community: Eason XUE</title>
      <link>https://dev.to/easonnotsing</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/easonnotsing"/>
    <language>en</language>
    <item>
      <title>How I Turned 6 Cognitive Science Principles Into an AI Agent That Builds Obsidian Vaults</title>
      <dc:creator>Eason XUE</dc:creator>
      <pubDate>Wed, 20 May 2026 01:51:19 +0000</pubDate>
      <link>https://dev.to/easonnotsing/how-i-turned-6-cognitive-science-principles-into-an-ai-agent-that-builds-obsidian-vaults-103e</link>
      <guid>https://dev.to/easonnotsing/how-i-turned-6-cognitive-science-principles-into-an-ai-agent-that-builds-obsidian-vaults-103e</guid>
      <description>&lt;p&gt;In 30 years, computers got 100x faster. Our learning method stayed the same: read → highlight → re-read → forget → re-read again.&lt;/p&gt;

&lt;p&gt;I shared with EMBA students who have to digest hundreds of pages of materials every month — textbooks, case studies, industry reports. They have demanding jobs, families, and a finite number of hours. The ones who fall behind aren't less capable. They just don't have a system.&lt;/p&gt;

&lt;p&gt;A few months ago I found a way to break that cycle. It combines a century-old insight about how knowledge works with modern AI. I open-sourced the result as &lt;strong&gt;VaultForge&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is the story of what it does and how it's built.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Method Was Always There — But It Had Two Bottlenecks
&lt;/h2&gt;

&lt;p&gt;Management consultants face the same problem my audience do. When a consulting firm lands a client in an unfamiliar industry, they have one week to get smart enough to talk to senior executives. They can't read everything. So they don't try.&lt;/p&gt;

&lt;p&gt;They do three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build a framework first — map out what dimensions matter before reading&lt;/li&gt;
&lt;li&gt;Define boundaries — know what they &lt;em&gt;don't&lt;/em&gt; need to know, and actively search for knowledge and information around a few core questions, building connections between knowledge and real-world problems&lt;/li&gt;
&lt;li&gt;Find experts — get someone to pinpoint the core consensus, debates and unknowns in 60 minutes, so you aren't limited by readily available knowledge but stand at the industry frontier to explore its direction and boundaries&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cognitive science backs this up. Passive re-reading creates &lt;em&gt;familiarity&lt;/em&gt;, not &lt;em&gt;memory&lt;/em&gt;. Active retrieval — explaining, questioning, connecting — is 3-5x more effective.&lt;/p&gt;

&lt;p&gt;And then there's Niklas Luhmann. The German sociologist wrote 70 books and 400+ papers using 90,000 index cards. His secret wasn't intelligence. It was &lt;em&gt;connection&lt;/em&gt;. Every card linked to others. Ideas fermented over years. He said he didn't think first and then write — &lt;em&gt;he wrote to discover what he was thinking&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;That's the zettelkasten method, formalized as digital tools like Obsidian.&lt;/p&gt;

&lt;p&gt;But here's the problem. The consulting method requires access to experts and years of framework-building practices. Luhmann's system requires a lifetime of manual card maintenance. Both are inaccessible to normal people with normal schedules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two bottlenecks that AI could break.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Six-Phase Pipeline
&lt;/h2&gt;

&lt;p&gt;VaultForge is an AI agent skill that loads into Claude Code, Codex, or Cursor. Give it a PDF or Markdown file, and it produces a complete Obsidian vault. The engineering is organized into six phases:&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 1: Roadmap Generation
&lt;/h3&gt;

&lt;p&gt;The agent reads the full material and produces two outputs: an outline version (H2/H3 hierarchy with bullet points) and a detailed version with cases, citations, and source page ranges. This replaces the "build a framework first" consulting step.&lt;/p&gt;

&lt;p&gt;Every H2 category must have at least 2 H3 topics. This prevents hierarchy from being a facade — if you can't break a category into at least two subtopics, your schema isn't well-formed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 2: File Structure
&lt;/h3&gt;

&lt;p&gt;Batch creates folders, Maps of Content (MOC) pages, and blank atomic note stubs. The MOC sits at the H3 level, ensuring every cluster of notes has an index page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 3: Parallel Content Fill (The Interesting Part)
&lt;/h3&gt;

&lt;p&gt;This is where the engineering gets specific. Each atomic note goes through a five-state state machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;draft → filling → filled → reviewed
                  ↘ needs_review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;filling&lt;/code&gt; state splits into two failure modes: crash before the &lt;code&gt;.md.tmp&lt;/code&gt; is written (no partial file) and crash after the rename but before metadata update (&lt;code&gt;.md&lt;/code&gt; exists but status is still &lt;code&gt;filling&lt;/code&gt;). Both are handled differently during recovery.&lt;/p&gt;

&lt;p&gt;A Python script (&lt;code&gt;context-extractor.py&lt;/code&gt;) pre-fetches source paragraphs per &lt;code&gt;source_range&lt;/code&gt;. Instead of passing the full PDF to every agent, each note agent receives only the pages it needs. Token consumption drops 5x or more.&lt;/p&gt;

&lt;p&gt;After filling, every note is reviewed by a separate agent. If it fails quality thresholds — 200+ words for core concepts, 150+ for case studies, 50-150 for original citations — it gets up to 2 repair attempts before being flagged as &lt;code&gt;needs_review&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 4: Wikilink Building
&lt;/h3&gt;

&lt;p&gt;A three-stage funnel:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Structural affinity&lt;/strong&gt; (zero cost) — notes in the same H2 category get linked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TF-IDF semantics&lt;/strong&gt; (low cost) — pure Python, zero external dependencies, scores term overlap&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM classification&lt;/strong&gt; (controlled cost) — five relationship types: derivation, analogy, contradiction, application, context&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most existing wikilink tools stop at "similar words match." The five-type classification maps to Bloom's taxonomy levels from comprehension to evaluation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 5: Core Questions
&lt;/h3&gt;

&lt;p&gt;Generates ≤5 guiding questions per topic. These anchor the learner's retrieval practice — not "what does this term mean" but "how would you apply this principle to a situation where X and Y conflict?"&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 6: Deep Research
&lt;/h3&gt;

&lt;p&gt;Web search for controversy analysis. Output uses a three-layer framework: consensus, disputes, and context-dependent. This is the closest the pipeline gets to the "expert interview" consulting step.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Engineering Decisions That Matter
&lt;/h2&gt;

&lt;p&gt;Three design choices separate VaultForge from most "AI agent" projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Atomic writes.&lt;/strong&gt; Every note is written as &lt;code&gt;.md.tmp&lt;/code&gt; first, verified on disk, then renamed. If the agent crashes mid-write — which happens constantly — the partial file is invisible to Obsidian and detectable on resume.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File-based statistics.&lt;/strong&gt; Phase 1 counts roadmap topics by parsing the output file, not by asking the model "how many did you write." Model self-report is unreliable. Deterministic file parsing is not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;English instructions, bilingual output.&lt;/strong&gt; All agent instructions are in English because LLMs execute English prompts with highest precision. But the first user prompt asks for language selection. The templates support English and Chinese section headers side by side. It's a small thing that matters a lot for non-English users.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Cognitive Science Evaluation Said
&lt;/h2&gt;

&lt;p&gt;I had a final evaluation done against cognitive science standards. The key findings:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Design Element&lt;/th&gt;
&lt;th&gt;Principle&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Atomic notes + length rules&lt;/td&gt;
&lt;td&gt;Cognitive Load Theory — chunking in both directions&lt;/td&gt;
&lt;td&gt;5/5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOC at H3 level&lt;/td&gt;
&lt;td&gt;Ausubel's advance organizers + Schema Theory&lt;/td&gt;
&lt;td&gt;5/5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Five-type wikilinks&lt;/td&gt;
&lt;td&gt;Constructivist semantic network + Bloom's&lt;/td&gt;
&lt;td&gt;4.5/5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Core questions (≤5)&lt;/td&gt;
&lt;td&gt;Elaborative Interrogation&lt;/td&gt;
&lt;td&gt;4/5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Controversy analysis&lt;/td&gt;
&lt;td&gt;Piaget cognitive conflict + critical thinking&lt;/td&gt;
&lt;td&gt;5/5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;H2 ≥ 2 H3 constraint&lt;/td&gt;
&lt;td&gt;Taxonomy minimum branching&lt;/td&gt;
&lt;td&gt;4/5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The overall judgment: &lt;strong&gt;"VaultForge is the project with the most solid educational theory and the most rigorous engineering architecture in the current Agent Skill ecosystem."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't disagree, but I'll let readers decide by examining the repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits and Next Steps
&lt;/h2&gt;

&lt;p&gt;It's not for everything. VaultForge works best with structured, high-quality materials — textbooks, academic papers, industry reports. It's unsuited for fragmented reading like news feeds or social media. For that, a different tool is needed.&lt;/p&gt;

&lt;p&gt;The biggest missing piece: incremental updates. If you add a new PDF to a processed vault, the current version requires re-running the full pipeline. Incremental mode is the next major feature.&lt;/p&gt;

&lt;p&gt;And the evaluation identified one clear upgrade path: adding a retrieval practice feedback loop — answer input, LLM assessment, weakness tagging, spaced repetition scheduling. That would take the educational dimension from 4.5/5 to 5/5.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Easonnotsing/VaultForge.git ~/.agents/skills/VaultForge
pip &lt;span class="nb"&gt;install &lt;/span&gt;pypdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then trigger in any Claude Code / Codex / Cursor session. That's it. The skill handles the rest.&lt;/p&gt;

&lt;p&gt;The repo has 51 automated tests, a compatibility guide for different clients, and a changelog of every failure pattern encountered during development.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Larger Pattern
&lt;/h2&gt;

&lt;p&gt;Tools will keep accelerating. What matters isn't which note-taking app you use or which model you call. What matters is what happens in your head while you use them.&lt;/p&gt;

&lt;p&gt;I built VaultForge because I wanted my students to spend their limited time &lt;em&gt;thinking&lt;/em&gt; — not formatting, not organizing, not wrestling with folder structures. The AI handles the production work. The human handles the judgment.&lt;/p&gt;

&lt;p&gt;That division of labor is going to become the default. This is one version of what it looks like.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;VaultForge is open source under MIT. Repo: &lt;a href="https://github.com/Easonnotsing/VaultForge" rel="noopener noreferrer"&gt;https://github.com/Easonnotsing/VaultForge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>obsidian</category>
      <category>ai</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
