A self-organizing Obsidian vault that gives AI coding agents persistent memory.
TypeScript ai-agentsclaude-codecodex-cligemini-cliknowledge-managementobsidianobsidian-vaultpersistent-memorysecond-braintemplate
fix: stop the meetings-inbox README flagging forever (#164)
Brenno Ferrari32b63832a631
diff --git a/.claude/scripts/lib/active-hygiene.ts b/.claude/scripts/lib/active-hygiene.tsindex d49320a..93adacf 100644--- a/.claude/scripts/lib/active-hygiene.ts+++ b/.claude/scripts/lib/active-hygiene.ts@@ -240,6 +240,11 @@ function findOpenLoops(// Archive notes hold historical bulk by convention — a "waiting on"// line in an archive is a record, not a live loop.if ((rel.split("/").pop() ?? "").includes("Archive")) continue;+ // The meetings-inbox scaffold is template prose, not a follow-up+ // surface. It carries no checkboxes today, so this changes nothing+ // yet — it stops the shipped file becoming an unclearable open loop+ // the first time its instructions gain one (#155).+ if (isInboxScaffold(rel)) continue;let content: string;let mtimeMs: number;try {@@ -418,10 +423,29 @@ function findOversizedNotes(export const INBOX_PRESSURE_DAYS = 7;+const INBOX_REL = "work/meetings";++/**+ * The inbox's own README ships with the template and describes how to drain+ * the folder — /om-intake never processes it, so counting it made the flag+ * permanently unclearable (#155): it fired on a genuinely empty inbox and+ * the "oldest Nd" figure climbed forever, training the reader to ignore the+ * whole hygiene block.+ *+ * Matched as an exact path, not as any README: a README a user creates+ * inside a subfolder of their own is their content, and theirs to process.+ * Compared case-insensitively because the shipped `README.md` can arrive as+ * `readme.md` through a case-insensitive checkout.+ */+function isInboxScaffold(rel: string): boolean {+ return rel.toLowerCase() === `${INBOX_REL}/readme.md`;+}+function findInboxPressure(root: string, nowMs: number): InboxPressure | null {let count = 0;let oldestDays = 0;- for (const rel of walkMarkdown(root, "work/meetings")) {+ for (const rel of walkMarkdown(root, INBOX_REL)) {+ if (isInboxScaffold(rel)) continue;let mtimeMs: number;try {mtimeMs = statSync(join(root, rel)).mtimeMs;diff --git a/.claude/scripts/tests/active-hygiene.test.ts b/.claude/scripts/tests/active-hygiene.test.tsindex bc4febe..cc092ca 100644--- a/.claude/scripts/tests/active-hygiene.test.ts+++ b/.claude/scripts/tests/active-hygiene.test.ts@@ -219,6 +219,34 @@ describe("scanActiveHygiene — detectors", () => {assert.ok(report.inboxPressure!.oldestDays >= 40);});+ test("the shipped inbox README never counts as pressure (#155)", () => {+ // Isolated root: the shared fixture already holds a real export, and+ // the point here is what an *untouched* inbox reports.+ const solo = mkdtempSync(join(tmpdir(), "active-hygiene-scaffold-"));+ try {+ mkdirSync(join(solo, "work/meetings"), { recursive: true });+ const scaffold = join(solo, "work/meetings/README.md");+ writeFileSync(scaffold, "# Meeting Notes Inbox\n\nDrop exports here.\n");+ // Well past the 7-day threshold — the age the flag kept climbing to.+ const t = new Date(NOW - 96 * DAY_MS);+ utimesSync(scaffold, t, t);++ // The bug: an inbox holding nothing but its own scaffold flagged+ // forever, and /om-intake could never clear it.+ assert.equal(scanActiveHygiene(solo, NOW, DEFAULTS).inboxPressure, null);++ // …while a genuine export beside it still counts, and counts once.+ const real = join(solo, "work/meetings/2026-04-01 Standup.md");+ writeFileSync(real, "raw dump");+ utimesSync(real, t, t);+ const withExport = scanActiveHygiene(solo, NOW, DEFAULTS).inboxPressure;+ assert.ok(withExport !== null);+ assert.equal(withExport!.count, 1);+ } finally {+ rmSync(solo, { recursive: true, force: true });+ }+ });+test("missing folders produce an empty report, not errors", () => {const empty = mkdtempSync(join(tmpdir(), "active-hygiene-empty-"));try {diff --git a/vault-manifest.json b/vault-manifest.jsonindex 732a528..0e1cbcf 100644--- a/vault-manifest.json+++ b/vault-manifest.json@@ -46,6 +46,7 @@"brain/Skills.md","perf/competencies/README.md","thinking/README.md",+ "work/meetings/README.md",".shardmind/**",".shardmindignore"],