Summary
write_doc places docs at <status>/<phase>/<slug>.md. Phase validation only checks slug shape, so build, dist, target, and venv are accepted as phase names, but all four are on the scanner skip list and on the watcher skip list. The write succeeds, MCP list_docs shows the doc, and the GUI can never display it. No error is surfaced anywhere. Agents pick phase names like "build" naturally, so this matches the reported "agent wrote it, the app never shows it" cases.
Reproduction (release build of f485396, macOS)
- In a scanned workspace, create
research/build/invisible-build-phase.md (the layout write_doc produces for phase: "build"), plus a sibling control file research/visible-control.md in the same batch.
- Wait for the watcher rescan.
- The control file appears; the
build/ folder and its doc never do (screenshot: "5 files", no build folder in the tree). Manual refresh does not help, since the scanner itself prunes the directory.
On-disk state during the screenshot:
research/
build/
invisible-build-phase.md <- exists on disk, never listed
created-while-closed.md
created-while-running.md
getting-started.md
linked-from-outside.md <- symlink, tracked separately in issue #21
visible-control.md <- control, appeared immediately
Root cause
- Phase becomes a subfolder:
src-tauri/core/src/write.rs:122-127; validation accepts any slug: write.rs:156-166.
- The scanner prunes any directory whose exact name is in
SKIP_DIRS (src-tauri/core/src/scan.rs:88-126, applied at 153-166), which includes build, dist, target, venv.
- The frontend watcher mirror drops events for those paths too (
src/hooks/useLibrary.ts:62-108), so no rescan is even attempted.
- MCP
list_docs/find_doc_location walk phase dirs with plain read_dir and no skip list (write.rs:145-154, 168-182), so the agent sees the doc and gets ok: true while the GUI never lists it.
Proposed fix
Reject (or remap) phase names that collide with SKIP_DIRS in validate_phase, and derive all three consumers (scanner, watcher mirror, phase validation) from one shared skip-list definition so they cannot drift. Alternatively scope skip-dir pruning to depths where it makes sense: direct children of a status folder are always workspace content.
Screenshot
Control file visible, research/build/ and its doc absent:

Summary
write_docplaces docs at<status>/<phase>/<slug>.md. Phase validation only checks slug shape, sobuild,dist,target, andvenvare accepted as phase names, but all four are on the scanner skip list and on the watcher skip list. The write succeeds, MCPlist_docsshows the doc, and the GUI can never display it. No error is surfaced anywhere. Agents pick phase names like "build" naturally, so this matches the reported "agent wrote it, the app never shows it" cases.Reproduction (release build of f485396, macOS)
research/build/invisible-build-phase.md(the layoutwrite_docproduces forphase: "build"), plus a sibling control fileresearch/visible-control.mdin the same batch.build/folder and its doc never do (screenshot: "5 files", nobuildfolder in the tree). Manual refresh does not help, since the scanner itself prunes the directory.On-disk state during the screenshot:
Root cause
src-tauri/core/src/write.rs:122-127; validation accepts any slug:write.rs:156-166.SKIP_DIRS(src-tauri/core/src/scan.rs:88-126, applied at 153-166), which includesbuild,dist,target,venv.src/hooks/useLibrary.ts:62-108), so no rescan is even attempted.list_docs/find_doc_locationwalk phase dirs with plainread_dirand no skip list (write.rs:145-154, 168-182), so the agent sees the doc and getsok: truewhile the GUI never lists it.Proposed fix
Reject (or remap) phase names that collide with
SKIP_DIRSinvalidate_phase, and derive all three consumers (scanner, watcher mirror, phase validation) from one shared skip-list definition so they cannot drift. Alternatively scope skip-dir pruning to depths where it makes sense: direct children of a status folder are always workspace content.Screenshot
Control file visible,
research/build/and its doc absent: