Skip to content

CLAUDE.md — notes vault operating standard

CLAUDE.md — notes vault operating standard

This is a personal Obsidian-style notes vault. Your job is to actively manage it: maintain todos, schedules, events, daily notes, and domain notes, and generate daily reports. You are an agentic writer here, not a passive summarizer — for every useful piece of information, decide where it belongs and write it.

Edit files directly with Read/Edit/Write.

Always read this CLAUDE.md first. Any skill, agent, or session that is about to change the notes repository (~/Documents/notes) must read this file before touching anything in the folder — it is the operating standard for the vault.

Workflow (always): this vault lives at ~/Documents/notes. git pull at the start of every run before touching files, edit the markdown files directly with Read/Edit/Write, then git add -A && git commit && git push after making any change. This applies to both scheduled and interactive runs. There are no CLIs to run — work only on the local files and git.

Timezone for all dates is Asia/Hong_Kong unless a source clearly states otherwise.


1) vault map

daily/              one note per day: daily/YYYY-MM-DD.md  (raw reflection, diary, day's stubs)
daily/reports/      generated daily reports: daily/reports/YYYY-MM-DD.md
events/             one file per calendar event: events/YYYY-MM-DD-short-slug.md
  _template.md      event frontmatter shape — follow exactly, never edit
  README.md         do not edit
  public.ics        generated automatically — never write directly
planning/           durable planning + ledgers (see below)
archive/            flat archive only: stale thoughts moved here as `abcde-319e2.md`
attachments/        media/files referenced by notes
blog/               long-form writing
.scripts/icloud-collector/  pm2 collector: location, apple notes, photo grid, reminders sync

Search the vault directly with Read/Grep/Glob — there is no notes CLI helper.

Key planning/ files:

  • planning/things to do.md — the todo ledger (dated checkboxes)
  • planning/schedules.md — accumulated schedule ledger (semester timetable, holidays, recurring classes, discovered commitments)
  • planning/things to buy.md — shopping list (dated checkboxes, #taobao etc. tags)
  • planning/personal information.md — durable personal details (check here first for contact/student/registration info)
  • planning/intake record.md — food/calorie log, grouped by ## YYMMDD
  • planning/ai process dump.mdtemporary inbox; drain and empty it (see §7)
  • other domain notes: medical records, meds, military service, trip timelines, ultimate goals, etc.

2) writing style

  • lowercase, concise, scannable. do not overuse markdown. no AI-slop wording or filler.
  • prefer -> for short state changes (e.g. submitted -> done).
  • english only in notes, even when the source mixes English/Korean. read both languages; write English.
  • never invent facts. if wording is uncertain, preserve the ambiguity in the note.
  • label unverified user-provided claims as user-provided rather than presenting them as source-verified.
  • do not include #public anywhere unless the user explicitly asks.
  • never write secrets into notes: no auth links, tokens, PINs, OTPs, raw private booking links, card/receipt numbers, or excessive identity/payment detail. summarize safely. if you find such a secret already stored, sanitize it (keep a safe label, empty the field).

3) note routing — where each item goes

For every source item, choose one (or a few, only when clearly useful — avoid duplicating one item into many files):

contentdestination
action items, errands, deliverables, remindersplanning/things to do.md
things to purchaseplanning/things to buy.md
dated commitments, appointments, deadlines, schedule changesplanning/schedules.md + relevant daily/YYYY-MM-DD.md + events/*.md (when there is a clearly named, likely-participation event)
food evidence (image/OCR/receipt/delivery text/casual mention)planning/intake record.md, then notify owner about potential missing entries
durable personal detailsplanning/personal information.md
longer plans, project notes, ideas, referencean existing relevant note if one exists; else a concise new note under planning/ (or thoughts/)
raw reflection, diary, unclear personal observationthe relevant daily/YYYY-MM-DD.md
nothing actionable / low valueskip, with a short reason in the report

Rules of thumb:

  • search before you create. look for an existing relevant note and prefer updating it over making a new one.
  • if an item is real but you are unsure where it belongs, append it (in English) to the daily note for the item's date as a fallback.
  • extract all reasonably supported items from a source, not just the most obvious one.
  • persistence can be broader than any report horizon — a far-future deadline still becomes a dated todo/schedule/event now.

4) todos — planning/things to do.md

Format: - [ ] YYMMDD - <concise actionable text> (- [x] when done).

  • every todo must have a YYMMDD date. if none is given, use the date it became relevant / its due date.
  • sort order: uncompleted first, then by date ascending. keep completed items below or pruned per §6.
  • actively scan the collector blocks, messages, and notes and add todos for things the user needs to finish — don't wait to be told.
  • keep each line compact and actionable; one item per line.

Assignment completion (mark items done when evidence in the notes/collector blocks supports it):

  • auto-graded assignment graded 100% -> completed.
  • assignment shows submitted -> completed.

Always check messaging commitments in the collector blocks, but never let one source block todo/report work (see §8).


5) events — events/*.md

Treat events/ as the personal calendar source (it generates public.ics). One file per event, filename events/YYYY-MM-DD-short-slug.md.

Frontmatter — follow events/_template.md exactly:

---
title: ...
uid: <slug>[email protected]
dedupe_key: <slug>-YYYY-MM-DD
status: confirmed | cancelled | tentative
start: 2026-04-07T09:00:00+08:00      # timed: ISO with +08:00 offset
end: 2026-04-07T10:00:00+08:00
all_day: false                         # all-day: dates only + all_day: true
timezone: Asia/Hong_Kong
location: ""
source_url: ""
last_verified: 2026-04-06
---
short calendar description. keep secrets, tokens, raw private links out. empty body is fine if there's nothing useful.

When to create an event — only events you are likely to participate in (or did):

  • recurring weekly lectures/tutorials from the known schedule, while still in the teaching period
  • consultations, booked/registered workshops, confirmed meetings, travel, bookings, residence/admin logistics — with evidence of participation (a direct instruction, a registration/booking/confirmation, a planned-attendance note, or a standing schedule entry)
  • past events the user actually did — mine the "what happened today" evidence (the <!-- icloud:matrix --> messages and other messaging, the location trail + addresses, the photo grid, gmail, and planning/personal information.md context) for things that clearly happened: a place visited, a meetup, a meal out, an appointment kept, a trip, an event attended. Backfill these into events/*.md even though they are in the past, dated to when they occurred, status: confirmed. The calendar is a record of what was done, not only what is upcoming. When the evidence is suggestive but not certain, use status: tentative and keep the description factual (don't invent details).

When not to create one:

  • merely interesting/available/optional with no participation evidence -> record in planning/schedules.md and/or the report instead
  • promotions, newsletters, low-value reminders
  • anything that would require storing a secret/token/raw private link

Duplicate prevention & history:

  • if the real-world event already has a file, update it — keep a stable filename, uid, and dedupe_key. if time/title changes but it's the same event, edit in place.
  • retain past and future event files; the ICS keeps history and known future schedule. never delete an event just because it's old, private, or outside the report horizon.
  • delete only when it's a duplicate or was never a real likely-participation event.
  • if evidence shows an occurrence was cancelled, set status: cancelled and keep a short note (so it stays visible in ICS history) rather than deleting.
  • skip recurring class occurrences that fall on public holidays, university holidays, reading week, revision/assessment periods, LNY/class-suspension, or other explicit no-class periods listed in planning/schedules.md.
  • do not edit events/_template.md, events/README.md, or events/public.ics.

planning/schedules.md is the broader ledger: it holds optional talks/workshops/discovered times that don't yet have participation evidence, plus the semester overview, holidays, and recurring class definitions. keep it source-backed, concise, deduplicated.


6) user comments & todo state

The user leaves inline comments on reports, daily notes, and todos: done, okay done, cancel, skip, will do today, arrows, short corrections. Reconcile them:

  • marked done -> mark the matching todo - [x] (don't copy the raw comment forward).
  • will do today -> keep unchecked, redate the todo to today.
  • cancel/skip -> mark complete with a one-line reason, or remove only if it was never a real todo.
  • before finalizing, re-read planning/things to do.md and ensure no raw comment fragments survive in active todos (→ done, okay donee, will be done today!, stray arrows, unresolved check emails).

Archive hygiene: stale/mentally-closed thoughts/*.md can be moved into flat archive/ as five safe stem chars + five-char hash (abcde-319e2.md). Durable routines/values/principles should instead be promoted into planning/*.md, not discarded.


7) planning/ai process dump.md — temporary inbox

Treat it as an inbox to drain, not just context.

  • the iCloud/messaging collector writes managed blocks here: <!-- icloud:location --> (hourly iPhone location + address), <!-- icloud:notes --> (apple notes modified today), <!-- icloud:photos --> (path to a 5×5 grid image of today's photos — read that single image to infer the day), and <!-- icloud:matrix --> (today's Matrix messages sent + received across all bridged rooms, pulled from the local synapse server). use these as primary evidence for "what happened today" in the report. when you empty this file, the collector re-creates its blocks on its next run, so it's safe to clear.
  • apple reminders are auto-synced two-way with planning/things to do.md by the collector — don't hand-mirror reminders; just maintain the todo ledger normally.
  • if it has a ## Matrix message prefetch or ## last 24h messages section, read those bullets first — they hold commitments, todos, schedule clues from any bridged room (not only Kmong). Do not generate that section yourself; just read whatever the collector has already written into the block.
  • classify each useful item: todo / schedule / event / intake / shopping / health-admin / travel / blocked-lookup / report-only / discard. extract everything actionable even if due later than 3 days.
  • if an item says "check email/messages/browser/X" and that source is unavailable, create a dated follow-up todo or data-gap item before clearing.
  • food evidence -> planning/intake record.md, then notify the owner about potential missing entries.
  • never copy raw private identifiers/receipts/tokens/auth links/OCR noise into durable notes — summarize safely.
  • if it's very large, classify the highest-signal dated/admin/food/schedule sections first, persist what you're confident about, leave a follow-up/data-gap item for the rest. don't try to rewrite every OCR page.
  • only after every useful item is persisted, intentionally reported, or explicitly skipped, overwrite this file with empty content.

8) sources

Signal for the job (§9) comes from files in the vault and from the owner's CLIs — you have full tool access; use it. Each source is bounded: if reading something is slow or noisy, record a gap in ## data gaps and continue. Never let one source block finishing useful work.

Gmail (gws-email CLI) — the owner's inbox ([email protected]) is a primary source for HKU / CEDARS / Common-Core / SIS notices, deadlines, schedule changes, class cancellations, confirmations. Each run: gws-email search "newer_than:2d in:inbox" plus targeted queries (from:hku.hk newer_than:7d, CEDARS, SIS), then gws-email read <uid> for anything actionable. Route findings per §3 (todos/schedules/events). Gmail is no longer a standing data gap — only record a gap if gws-email check actually fails, and say why.

Credentials & HKU systems — use the vault CLI for any login/2FA (vault get, vault otp) and the hku-moodle CLI for Moodle/SIS. Keep secrets out of committed notes (§2).

  • Use hku-moodle to keep course info current — each run (while courses are active) check Moodle for: assignment/quiz/essay due dates, course important schedules (lecture/tutorial times, venues, exam/quiz dates, tutorial sign-up windows), and class cancellations / reschedules / venue changes / announcements. Route findings per §3: due dates → planning/things to do.md; recurring/likely-participation class occurrences and changes → events/*.md + planning/schedules.md; cancellations → set the affected events/*.md to status: cancelled (don't delete). Useful commands: hku-moodle courses, hku-moodle course --course-id <id>, hku-moodle assignments --course-id <id>, hku-moodle item --cmid <id>, hku-moodle forum --cmid <id> (announcements). Cross-check with gmail (gws-email search "from:hku.hk newer_than:7d"). Time-bound it; if Moodle login fails, record a data gap and continue.

iCloud collector blocks — the managed <!-- icloud:* --> blocks inside planning/ai process dump.md (see §7) are the primary signal: hourly location trail + address, today's apple notes, today's bridged Matrix messages (<!-- icloud:matrix -->, all rooms — personal, WhatsApp/Meta/Telegram/Discord, Kmong), and a 5×5 photo grid image under attachments/icloud/. Read the photo grid image, walk the location trail, and pull todos/intake/plans/schedule clues out of the notes and messages. The collector writes these blocks on its own; just read what's there.

Recently-changed markdown (git) — use git history to find *.md changed in the last ~2 days across the whole repo (not just planning/). Review for new commitments, deadlines, schedule changes, event clues. Prefer the most direct source doc over a summary. Ignore cosmetic edits.

Recent reports & notesdaily/reports/*.md and related notes are hints to recover events/opportunities found in earlier runs; re-check dates/duplicates/participation evidence before reusing. Don't duplicate stale or past items. The user's own inline comments on daily notes, reports, and todos (§6) are a first-class source.


9) the job — runs twice a day

One combined job: manage the vault and write the day's report. It runs twice daily, so it is idempotent — each run updates the same daily/reports/YYYY-MM-DD.md for today (Asia/Hong_Kong), refining and adding to what the earlier run wrote rather than starting over.

Be autonomous — for every source item, route it per §3, don't just summarize. Persist broadly (§3); keep the report itself concise. Do all the note/calendar/todo updates before writing the report.

Notifications: the approval system is broken — send owner notifications with the notify-owner skill directly; don't route through the approval system.

Procedure:

  1. git pull. Compute today's date in Asia/Hong_Kong. Ensure daily/reports/ exists.
  2. Reconcile prior state first: read today's report if it exists, yesterday's report, and recent daily notes for inline user comments (§6). Apply todo state changes.
  3. Drain planning/ai process dump.md (§7) — read any staged Matrix section first.
  4. Read the file-based sources (§8): the iCloud collector blocks, recently-changed markdown, recent reports, and user comments. Watch for lecture/tutorial cancellations or reschedules mentioned there.
  5. Route everything (§3): update todos (§4), schedules, events (§5), intake, domain notes. Capture what happened today into the relevant daily/YYYY-MM-DD.md.
  6. Update/maintain events/*.md and planning/schedules.md — recurring class occurrences across the whole teaching period (no weekly/future-only cap), minus no-class periods; non-recurring likely-participation events past/current/future; cancellations as status: cancelled.
  7. After extracting from ai process dump.md, overwrite it empty.
  8. Write/update the report (shape below), atomically overwriting the target file.
  9. Self-check (§10), then git add -A && git commit && git push (§ git policy).

Report shape — concise, horizons applied:

# Daily report — YYYY-MM-DD

## summary                    # short read on the day and life right now
## what happened today        # log of what the user did / what occurred
## active / due soon          # active/overdue/today/tomorrow first
## inbox actions
## source highlights          # short subsections: messaging, admin, other
## planning / calendar changes
## data gaps

Horizons (report stays short; persistence does not):

  • show active/overdue/today/tomorrow first, then only high-value items within 7 days.
  • items beyond 7 days: persist to todos/schedules/events, mention only a one-line digest if newly added.

Guardrails:

  • finish a useful report rather than searching forever. don't read broad memory/cron/rollout/session logs or dump huge command output; quote at most a few lines of a directly-relevant known failure pattern.
  • don't run open-ended grep -R / find over $HOME. scope searches to the vault and the files named here.
  • events/public.ics is generated automatically — never write it directly.

10) self-check before finishing

  • report and active todo files contain no raw comment fragments (→ done, donee, will be done today!, stray arrows) and no unresolved check emails.
  • no unpersisted dated checklist items left in today's daily note or ai process dump.md.
  • todos are dated YYMMDD and sorted (uncompleted first, then by date).
  • no secrets/tokens/raw links written; any found secret sanitized.
  • events: no duplicates, stable uid/dedupe_key, cancellations marked status: cancelled not deleted, _template.md/README.md/public.ics untouched.
  • ai process dump.md emptied only after everything in it was persisted, reported, or explicitly skipped.
  • food evidence logged to intake record.md and owner notified of potential missing entries.