kmutt-y3-s1

Public
OVERVIEW.md

A semester vault became a way to give an AI agent context once and keep it findable.

In coursework, I kept running into the same setup cost: each new chat needed the slides, assignment rules, deadlines, and course background explained again. Image-heavy PDFs made that slow and sometimes unreliable. I organized my third-year semester as an Obsidian vault that a person can browse and an agent can enter without a fresh tour each time.

Building a map before asking for an answer

The structure has three levels. Root instructions explain how to use the vault; each course has its own rules and facts; an annotated index says what individual files contain. The agent can start with a small map and open only the relevant source. Four courses share that shape, while lecture files, assignments, notes, and scratch work have different places.

Adding a document created the next problem: an index becomes stale unless it is maintained. An ingest command updates course maps and checks links. PDFs can receive Markdown reading copies, using text extraction where it works and page-by-page transcription for math or figures. Those copies are caches, not replacements for the original PDF; files that would convert misleadingly can be excluded. Python checks catch broken Obsidian links and missing reading copies, and a checkpoint command makes saving the vault to Git less cumbersome.

The repository is real coursework as well as a context-engineering workflow. It shows how I tried to make information discoverable and reusable across sessions without treating an agent's summary as the authoritative source. The structure is intentionally more elaborate than a folder of notes; its benefit is easier navigation, while actual time or token savings have not been measured here.

README.md

KMUTT Year 3, Semester 1 — Computer Engineering

One semester of coursework, built so an AI agent can actually work inside it.

This repository is my third-year first-semester coursework at KMUTT — four courses' worth of lecture slides, assignment briefs and notes — kept as an Obsidian vault. It is also, deliberately, an agent workspace: sitting next to the course material are three Python scripts and a small set of instruction files that let any AI agent opened in this folder already know what I'm studying, who teaches it, what's been covered, and what's due — without me explaining a thing.

TL;DR — I drop a lecture PDF into a folder. The repo turns it into machine-readable Markdown, writes a summary of it into a map file, and links it into a graph. Every question after that is cheap. I never explain my semester to a chatbot twice.


What's actually in here

kmutt-y3-s1/
├── CLAUDE.md                    # 🧠 vault-wide rules for the agent — read first, always
├── README.md                    # 📖 you are here
├── PROBLEM.md                   # 🐛 my running pain-point log for the system itself
│
├── save-checkpoint.py           # ⭐ one-command checkpoint: add + commit + push
├── check-pdf-cache.py           # 🔎 which PDFs still need a Markdown cache (honours .pdfignore)
├── check-links.py               # 🔗 does every [[link]] and [text](path) still resolve?
│
├── CPE333-operating-systems/    # 🟢 one folder per class, identical shape
├── CPE334-software-engineering/ # 🟢
├── CPE342-machine-learning/     # 🟢
├── PRE380-engineering-economy/  # 🟢
│
├── format-template/             # 🧬 the seed — copy this to create a new class
├── prompts/                     # 🗂️  my own reusable prompt drafts — not part of the system
│
├── .claude/                     # ⚙️  agent config
│   ├── commands/update-index.md #    the ingest command
│   ├── skills/pdf-cache/        #    Law I — PDF → Markdown, the cheap way
│   ├── skills/vault-writing/    #    Law II — link syntax, formatting, prose wrap
│   └── settings*.json           #    permissions
├── .gitignore                   # 🙈 temp/, secrets, node_modules
└── .obsidian/                   # 🔗 vault config — committed, so settings travel with a clone

Every class folder is the same shape

Identical layout across all classes isn't aesthetics — it's what lets an agent navigate a course it has never seen before without being told anything.

<CODE>-<kebab-case-name>/
├── CLAUDE.md      # 📋 course facts + class-specific rules (instructor, grading, policies)
├── INDEX.md       # 🗺️ annotated map of every file — the agent's entry point
├── .pdfignore     # 🚫 optional — PDFs in this class that must never be cached
├── lecture/       # 📚 from the lecturer: slides, PDFs, readings (+ their .md caches)
├── assignment/    # ✏️  briefs, my working files, submissions
├── note/          # 🖊️  my own writing worth keeping
└── temp/          # 🗑️  scratch. volatile. never documented. here be dragons.

Where does a file go? From the lecturer → lecture/. About one assignment → assignment/. My own keeper writing → note/. Half-baked garbage → temp/.

Class roster — Semester 1 / 2026

CodeCourseFolderStatus
CPE333Operating SystemsCPE333-operating-systems🟢 active
CPE334Software EngineeringCPE334-software-engineering🟢 active
CPE342Machine LearningCPE342-machine-learning🟢 active
PRE380Engineering EconomyPRE380-engineering-economy🟢 active
GEN101Physical EducationGEN101-physical-education⚪ not created
GEN241Beauty of LifeGEN241-beauty-of-life⚪ not created

The idea: hard compute once, cheap forever

Every conversation with an AI assistant starts at zero. You paste a slide deck, explain which course it's for, explain that the deadline is one week and the lecturer forbids posted solutions, get an answer, close the tab — and all of that context evaporates. Meanwhile the raw material is hostile to machines: a lecture deck is 83 slides of images, so reading it burns enormous context and every equation comes out as �������.

So pay that expensive cost exactly once, at ingest, and write the result down in durable plain text.

PhaseCostHow often
Ingest — read the PDF, transcribe the math, describe the figures, summarize, index, linkExpensive (a subagent reads every page)Once per file, ever
Query — "explain LDA", "help me plan Lab 1", "what's on the midterm?"Nearly free (reads a 40-line map, then one cached .md)Unlimited

My entire job is step one of a two-step pipeline: put the file in the folder.

flowchart TD
    A["📥 I drop a file<br/>lecture.pdf / lab.pdf / slides.pptx"] --> B{"🔎 <b>check-pdf-cache.py</b><br/>is there an .md cache?"}
    B -->|"CACHED"| G
    B -->|"IGNORED — .pdfignore"| X["🚫 never cached, on purpose<br/><i>converting it would lie</i>"]
    B -->|"MISSING"| C{"Prose, or<br/>math &amp; figures?"}
    C -->|"Prose (syllabus)"| D["pdftotext -layout<br/><i>free, no model</i>"]
    C -->|"Formula / figure heavy"| E["Sonnet subagent reads<br/>every page → LaTeX + figure notes<br/><i>heavy reads stay out of main context</i>"]
    D --> F["📄 name.md — the text cache"]
    E --> F
    F --> G["🗺️ INDEX.md updated<br/>annotated entry + wiki-link"]
    X --> G
    G --> H["📋 CLAUDE.md updated<br/>only if course facts changed"]
    H --> I["✅ Permanently cheap to read"]

    style A fill:#1e40af,stroke:#93c5fd,color:#fff
    style E fill:#7c2d12,stroke:#fdba74,color:#fff
    style X fill:#3f3f46,stroke:#a1a1aa,color:#fff
    style I fill:#14532d,stroke:#86efac,color:#fff

The whole pipeline is one command: /update-index.


The three-layer context protocol

The core design. An agent entering this repo reads top-down, narrowing, and is oriented before it opens a single real file.

LayerFileAnswersAnalogy
1Root CLAUDE.mdHow does this system work?The OS
2<class>/CLAUDE.mdWhat is this course, and how do I help here?Per-app config
3<class>/INDEX.mdWhat's in this folder, and what's it about?The filesystem index
4The file itselfThe actual contentThe data

Why INDEX.md matters more than it looks. It isn't a file listing — it's a summary layer. Each entry says what the file covers in enough detail that the agent can answer many questions without opening the file at all, and knows exactly which file to open when it can't. It's a hand-maintained cache of "what do I know about this course." That's the whole trick.

Real example — the Lecture 1 entry in CPE342-machine-learning/INDEX.md breaks 83 slides into three sections with every topic named. An agent asked "where do I learn about the Bayes decision boundary?" answers correctly having read ~40 lines.


The two laws

Two rules do most of the heavy lifting. Each is stated in a few lines in CLAUDE.md, spelled out in full in a skill of its own, and applied automatically by /update-index. The skills are the source of truth — the summaries here are deliberately short, because a README that restates them in full is a README that will quietly contradict them.

📜 Law I — the reading rule

PDFs load as images, and the cost repeats every session. So every deck gets a permanent Markdown twin, generated once and read forever after — cheaply with pdftotext when it's prose, or by a throwaway Sonnet subagent that transcribes the math into LaTeX when pdftotext would mangle it. The expensive page reads happen inside the subagent and never touch the main thread's context.

Whether a file already has a cache is a script's answer, not a judgement call. Eyeballing a directory listing gets it wrong the moment a .pptx, its reading-copy .pdf and the .md sit side by side — three files, one document — and a listing can't see .pdfignore at all. check-pdf-cache.py answers it in one call, with no dependencies and no model involved.

And the cache is a proxy, never the truth. The ranking is .pdf > its .md cache > INDEX.md, and every step down loses something — a machine transcription of eighty slides will occasionally produce an equation that looks plausible and is simply wrong. Work from the .md by default; open the real page the moment an answer turns on an exact value, formula, figure or the lecturer's precise wording.

.pdfignore is the escape hatch, because some PDFs are pure cost. Thirty-two pages of compound-interest tables convert into misaligned columns where every value sits under the wrong heading — and a silently wrong cache is a lie the agent will believe. Any folder can carry one, with the same semantics as .gitignore. The file still gets its INDEX.md entry; it just never gets a cache.

Full procedure: pdf-cache.

🔗 Law II — the linking rule

This is an Obsidian vault, so every reference to a real file is a [[wiki-link]], never dead text in backticks. Links survive renames, show up in backlinks, and turn the vault into a navigable graph instead of a folder of orphans. Folders, dot-directories, paths outside the vault and <placeholder> patterns stay in backticks — they aren't files.

What makes this a law rather than a style preference: a wiki-link Obsidian can't resolve still looks valid. Extensions, path-qualified basenames, literal heading anchors, and the file types Obsidian ignores unless told otherwise are each a way to write a link that renders fine and goes nowhere. So check-links.py resolves every one of them — after blanking out code fences and LaTeX, because the docs here quote link syntax as an example constantly and \left[…\right](2) is a Markdown link to any regex.

Full syntax and every edge case: vault-writing.

This README is the one deliberate exception. It uses relative Markdown links, because GitHub renders [[…]] as literal dead text. Relative links work in both GitHub and Obsidian.


Commands & scripts

NameWhat it does
⭐🧠/update-index [folder]The ingest pipeline. Lists a class folder, caches every un-cached PDF, diffs disk against INDEX.md, rewrites both docs to match reality, verifies every link resolves, updates the class table. Skips temp/.
⭐💾python save-checkpoint.pyThe checkpoint. Stages the whole vault from the repo root, commits as <dd>/<mm>/<BE year>-<n> with n read back out of git log, pushes with --push. -n adds a note, --dry-run shows the plan.
🔎python check-pdf-cache.pyLaw I's lookup. Pairs every .pdf/.pptx with its .md twin and reports only the unpaired ones — one file or a whole folder, .pdfignore applied, temp/ skipped. Zero dependencies, zero model calls.
🔗python check-links.pyLaw II's enforcement. Resolves every [[wiki-link]], [text](path) and #heading anchor in the vault. Separates broken from merely risky (ambiguous basenames, extensions Obsidian hides).
📄pdf-cache (skill)Law I in full. Loads only when a PDF is about to be opened.
📐vault-writing (skill)Law II in full. Loads only when markdown is actually being written.

The two starred entries are the product; everything else is scaffolding. They attack the same enemy — drift — on two axes: /update-index keeps what the agent knows in sync with disk, save-checkpoint.py keeps what git records in sync with what I actually did. Neither asks me to stop being a person who dumps files in folders and forgets to commit. They just make catching up cost one keystroke.


Quick start

git clone https://github.com/jakkarin-promsee/kmutt-y3-s1.git
cd kmutt-y3-s1
claude

One setup step. In Obsidian: *Settings → Files and links → Detect all file extensions* — on. Without it Obsidian ignores .pptx and .py entirely, and any [[link]] to one renders perfectly while resolving to nothing. It lands in .obsidian/app.json, which is committed here, so flipping it once and committing that file fixes every clone — but Obsidian only writes the file when it exits, so close the app before you commit.

Daily use — this is the entire workflow

1. Drop the file where it belongs.

CPE342-machine-learning/lecture/Lecture+2+-+Regression.pdf

2. Tell the agent to absorb it.

/update-index CPE342-machine-learning

3. There is no step 3. Ask it anything.

> I have Lab 1 due Friday. Walk me through what it's actually asking for.
> Quiz me on Lecture 1 — I have a midterm.
> Brainstorm three approaches for the assignment, then tell me which one is dumb.

The agent already read the course policies, the grading breakdown, the instructor's quirks, and every lecture I've ever added. I don't brief it. That's the point.

Then, when I stand up from the desk:

python save-checkpoint.py

One line, no message to write, no branch to pick. Staged, committed as 04/08/2569-3, pushed.


Design principles

1. Plain text or it didn't happen. Everything is Markdown — readable by me, by Obsidian, by GitHub, by any model, by grep, and by whatever replaces all of them in two years.

2. The map is the product. INDEX.md and CLAUDE.md aren't documentation about the system — they are the system. The folders are just storage.

3. Auto-find, never interrogate. Neither command asks me what changed; they both go look. A tool that needs me to accurately describe my own mess inherits my unreliability.

4. Push expensive work down. Heavy page-by-page reads happen in a throwaway subagent whose context dies with it. The main thread stays clean and cheap.

5. Every class is identical. Uniform structure is what makes a new course zero-cost to onboard — for me and for the agent.

6. Friction is the only real failure mode. A correct system I don't run is worth less than a decent system I run constantly. Both commands are one line and zero decisions, because the version that demanded thought is the version I'd abandon in nine days.

7. Teach, don't just answer. Written directly into the instruction files: explain the why, push back when I'm wrong, and for graded work help me learn rather than hand me something to submit. Academic integrity is a config value here, not a vibe.

Non-goals

  • ❌ Not a cheating machine. Class policies are written into each class's CLAUDE.md, and the agent is instructed to walk me through gradable work instead of doing it. That constraint is deliberate and load-bearing.
  • ❌ Not a general note-taking app. It's an agent context substrate that happens to be readable by humans.
  • ❌ Not portable to your semester without edits. Fork it, gut the class folders, keep the two laws.

FAQ

Is this over-engineered for university homework?

Yes.

Why not just paste the PDF into the chat every time?

That is the exact cost this repo exists to eliminate. Pasting is O(n) in questions asked. This is O(1) — you pay once at ingest and the marginal cost of question #200 is reading a 40-line map. Also, pasting loses every equation, and you'd have to re-explain the grading policy each time.

What happens if I just... don't update the index?

It degrades exactly as gracefully as any other cache: the files still exist and are still readable, the agent just doesn't know they're there until it looks. Then you run /update-index and it self-heals. Correctness is never at risk — only cost.

Why is there a temp/ folder banned from all documentation?

Because a system that demands every scratch file be catalogued is a system I will abandon in nine days. temp/ is the pressure-release valve: a designated place for garbage, explicitly excluded from INDEX.md, CLAUDE.md, and every agent listing.

Can I use this for my own semester?

Fork it, delete my classes, copy format-template/ per course. The two laws and the three-layer protocol are the actual portable part.


Built by a third-year Computer Engineering student at KMUTT
who decided that explaining the same syllabus to an AI four hundred times
was a worse use of a semester than building this.

Hard compute once. Cheap forever.