Create a new document in the user's docs folder with the right format for the graph viewer. Use when the user asks to write a doc, add a synthesis/analysis/comments/note, capture notes, or otherwise add a markdown file to their folder. Also use when the user says 'create a doc', 'write a note', 'add a synthesis', 'capture this', or wants to save any structured markdown document. Regenerates the graph index after creation.
Create a new markdown document in the user's docs/ folder and regenerate the graph index so it shows up in the viewer.
Documents live in a docs/ subdirectory of the user's mounted folder:
<root>/ ← the folder the user mounted
├── _graph/ ← graph viewer (don't put docs here)
└── docs/ ← all documents go here
└── YYYY-MM-DD/
└── <type>-<slug>.md
If docs/ doesn't exist yet, create it.
Docs are grouped by date. Inside a date folder, files are named <type>-<short-slug>.md — for example synthesis-q2-strategy.md, analysis-pricing-review.md, comments-okr-feedback.md.
Before creating the file, make sure you know:
YYYY-MM-DD. Use via Bash if needed.date +%Y-%m-%dsynthesis, analysis, comments, brief, draft, note, or another short type that fits. This drives both the filename prefix and the frontmatter type field.q2-strategy, pricing-review).If any of these are missing and can't be inferred from context, ask the user.
Path: <root>/docs/<YYYY-MM-DD>/<type>-<slug>.md
Create the date folder if it doesn't already exist.
The file MUST start with YAML frontmatter in this exact shape so build.py can parse it:
---