diff --git a/design/vault-agents-md.pen b/design/vault-agents-md.pen new file mode 100644 index 00000000..c3c1c919 --- /dev/null +++ b/design/vault-agents-md.pen @@ -0,0 +1 @@ +{"children":[{"children":[{"alignItems":"center","children":[{"alignItems":"center","children":[{"fill":"$--traffic-red","height":12,"id":"t9oxy","name":"tl1","type":"ellipse","width":12},{"fill":"$--traffic-yellow","height":12,"id":"l5RlH","name":"tl2","type":"ellipse","width":12},{"fill":"$--traffic-green","height":12,"id":"K0bAe","name":"tl3","type":"ellipse","width":12}],"gap":8,"id":"1ph7l","name":"trafficLights","type":"frame"}],"fill":"$--sidebar","height":38,"id":"pNQ1R","name":"macOS Title Bar","padding":[0,12],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"children":[{"children":[{"alignItems":"center","children":[{"fill":"$--muted-foreground","height":16,"iconFontFamily":"lucide","iconFontName":"inbox","id":"e3bcH","name":"filterAllIcon","type":"icon_font","width":16},{"content":"All Notes","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"U0SDl","name":"filterAllLabel","type":"text"},{"content":"12","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"3s4eX","name":"filterAllCount","type":"text"}],"cornerRadius":6,"fill":"$--muted","gap":8,"id":"UPibw","name":"filterAll","padding":[6,16],"type":"frame","width":"fill_container"}],"gap":1,"id":"vX4kL","layout":"vertical","name":"Filters","padding":[8,8,16,8],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"alignItems":"center","children":[{"fill":"$--accent-purple","height":16,"iconFontFamily":"phosphor","iconFontName":"rocket-launch","id":"303MY","name":"secProjIcon","type":"icon_font","width":16},{"content":"Projects","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"FLQBt","name":"secProjLabel","type":"text"},{"content":"1","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"M1fpt","name":"secProjCount","type":"text"}],"gap":8,"id":"HI1le","name":"secProjects","padding":[6,16],"type":"frame","width":"fill_container"},{"alignItems":"center","children":[{"fill":"$--accent-blue","height":16,"iconFontFamily":"phosphor","iconFontName":"note","id":"uuuIy","name":"secNotesIcon","type":"icon_font","width":16},{"content":"Notes","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"ShBbX","name":"secNotesLabel","type":"text"},{"content":"4","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"XqaZ6","name":"secNotesCount","type":"text"}],"gap":8,"id":"fu0S4","name":"secNotes","padding":[6,16],"type":"frame","width":"fill_container"},{"alignItems":"center","children":[{"fill":"$--accent-green","height":16,"iconFontFamily":"phosphor","iconFontName":"user","id":"GidgQ","name":"secPeopleIcon","type":"icon_font","width":16},{"content":"People","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"8p9jY","name":"secPeopleLabel","type":"text"},{"content":"1","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"xkgKZ","name":"secPeopleCount","type":"text"}],"gap":8,"id":"vllAy","name":"secPeople","padding":[6,16],"type":"frame","width":"fill_container"},{"alignItems":"center","children":[{"fill":"$--accent-yellow","height":16,"iconFontFamily":"phosphor","iconFontName":"tag","id":"rih06","name":"secTopicsIcon","type":"icon_font","width":16},{"content":"Topics","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"RMMWq","name":"secTopicsLabel","type":"text"},{"content":"1","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"aBI8L","name":"secTopicsCount","type":"text"}],"gap":8,"id":"tzibu","name":"secTopics","padding":[6,16],"type":"frame","width":"fill_container"},{"height":8,"id":"QNr5k","name":"spacer","type":"frame","width":"fill_container"},{"content":"VAULT ROOT","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":10,"fontWeight":"600","id":"uLv01","letterSpacing":1,"name":"rootLabel","type":"text"},{"alignItems":"center","children":[{"fill":"$--primary-foreground","height":16,"iconFontFamily":"lucide","iconFontName":"file-text","id":"QFDjK","name":"agentsIcon","type":"icon_font","width":16},{"content":"AGENTS.md","fill":"$--primary-foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"u2NF1","name":"agentsLabel","type":"text"}],"cornerRadius":6,"fill":"$--primary","gap":8,"id":"p1FHZ","name":"agentsItem","padding":[6,16],"type":"frame","width":"fill_container"}],"height":"fill_container","id":"5DwQB","layout":"vertical","name":"Sections","padding":[8,0],"type":"frame","width":"fill_container"}],"clip":true,"fill":"$--sidebar","height":"fill_container","id":"t643b","layout":"vertical","name":"Panel: Sidebar","type":"frame","width":250},{"fill":"$--border","height":"fill_container","id":"EHHaL","name":"Divider","type":"rectangle","width":1},{"children":[{"alignItems":"center","children":[{"content":"All Notes","fill":"$--foreground","fontFamily":"Inter","fontSize":14,"fontWeight":"600","id":"PJU4E","name":"nlTitle","type":"text"},{"content":"12 notes","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":12,"fontWeight":"normal","id":"SA33b","name":"nlCount","type":"text"}],"height":45,"id":"ixPvn","justifyContent":"space_between","name":"NoteList Header","padding":[14,16],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"children":[{"content":"AGENTS.md","fill":"$--foreground","fontFamily":"Inter","fontSize":14,"fontWeight":"600","id":"4wQGe","name":"ni1Title","type":"text"},{"content":"Vault Instructions for AI Agents — This is a Laputa vault...","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":12,"fontWeight":"normal","id":"ywIcy","lineHeight":1.5,"name":"ni1Snippet","textGrowth":"fixed-width","type":"text","width":"fill_container"}],"fill":"$--muted","gap":4,"id":"vJ8oO","layout":"vertical","name":"ni1","padding":[14,16],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"Welcome to Laputa","fill":"$--foreground","fontFamily":"Inter","fontSize":14,"fontWeight":"500","id":"hBzxZ","name":"ni2Title","type":"text"},{"content":"Welcome to your new knowledge vault! Laputa helps you organize...","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":12,"fontWeight":"normal","id":"ndPAL","lineHeight":1.5,"name":"ni2Snippet","textGrowth":"fixed-width","type":"text","width":"fill_container"}],"gap":4,"id":"dOhss","layout":"vertical","name":"ni2","padding":[14,16],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"Editor Basics","fill":"$--foreground","fontFamily":"Inter","fontSize":14,"fontWeight":"500","id":"86Z5D","name":"ni3Title","type":"text"},{"content":"Laputa uses a rich markdown editor. Here are the key formatting...","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":12,"fontWeight":"normal","id":"FJRW7","lineHeight":1.5,"name":"ni3Snippet","textGrowth":"fixed-width","type":"text","width":"fill_container"}],"gap":4,"id":"R6muw","layout":"vertical","name":"ni3","padding":[14,16],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"Sample Project","fill":"$--foreground","fontFamily":"Inter","fontSize":14,"fontWeight":"500","id":"O7zNH","name":"ni4Title","type":"text"},{"content":"This is an example project to show how projects work in Laputa...","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":12,"fontWeight":"normal","id":"kv72Q","lineHeight":1.5,"name":"ni4Snippet","textGrowth":"fixed-width","type":"text","width":"fill_container"}],"gap":4,"id":"YvP6c","layout":"vertical","name":"ni4","padding":[14,16],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"}],"clip":true,"height":"fill_container","id":"qeL3K","layout":"vertical","name":"Note Items","type":"frame","width":"fill_container"}],"clip":true,"fill":"$--card","height":"fill_container","id":"tvBvY","layout":"vertical","name":"Panel: NoteList","type":"frame","width":300},{"fill":"$--border","height":"fill_container","id":"tjXh5","name":"Divider 2","type":"rectangle","width":1},{"children":[{"alignItems":"center","children":[{"alignItems":"center","children":[{"fill":"$--foreground","height":14,"iconFontFamily":"lucide","iconFontName":"file-text","id":"ujeOy","name":"tab1Icon","type":"icon_font","width":14},{"content":"AGENTS.md","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"Mu8XO","name":"tab1Label","type":"text"}],"gap":6,"height":"fill_container","id":"2eSEH","name":"tab1","padding":[0,16],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":2}},"type":"frame"}],"fill":"$--sidebar","height":45,"id":"JhTD2","name":"Tab Bar","stroke":{"align":"inside","fill":"$--sidebar-border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"AGENTS.md — Vault Instructions for AI Agents","fill":"$--foreground","fontFamily":"Inter","fontSize":28,"fontWeight":"700","id":"FJTxP","name":"edH1","textGrowth":"fixed-width","type":"text","width":"fill_container"},{"content":"This is a Laputa vault — a folder of markdown files with YAML frontmatter that form a personal knowledge graph.","fill":"$--foreground","fontFamily":"Inter","fontSize":16,"fontWeight":"normal","id":"KLRkh","lineHeight":1.6,"name":"edIntro","textGrowth":"fixed-width","type":"text","width":"fill_container"},{"content":"Structure","fill":"$--foreground","fontFamily":"Inter","fontSize":22,"fontWeight":"600","id":"StcZL","name":"edH2","type":"text"},{"content":"Files are organized in folders by type:","fill":"$--foreground","fontFamily":"Inter","fontSize":16,"fontWeight":"normal","id":"05oUA","lineHeight":1.6,"name":"edStructIntro","textGrowth":"fixed-width","type":"text","width":"fill_container"},{"children":[{"children":[{"content":"Folder","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"600","id":"H11FL","name":"hCol1","type":"text"},{"content":"Type","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"600","id":"JD8fz","name":"hCol2","type":"text"},{"content":"Purpose","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"600","id":"uU5Jz","name":"hCol3","type":"text"}],"fill":"$--muted","gap":8,"id":"mwbUg","name":"headerRow","padding":[8,12],"type":"frame","width":"fill_container"},{"children":[{"content":"note/","fill":"$--accent-blue","fontFamily":"IBM Plex Mono","fontSize":12,"fontWeight":"normal","id":"sb2yD","name":"r1c1","type":"text"},{"content":"Note","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"aGztj","name":"r1c2","type":"text"},{"content":"General-purpose documents, research, meeting notes","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"QagHP","name":"r1c3","type":"text"}],"gap":8,"id":"H8GnG","name":"row1","padding":[8,12],"stroke":{"align":"inside","fill":"$--border","thickness":{"top":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"project/","fill":"$--accent-purple","fontFamily":"IBM Plex Mono","fontSize":12,"fontWeight":"normal","id":"S7jzm","name":"r2c1","type":"text"},{"content":"Project","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"2DvpL","name":"r2c2","type":"text"},{"content":"Time-bounded efforts with clear goals","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"xOISN","name":"r2c3","type":"text"}],"gap":8,"id":"1X3Ey","name":"row2","padding":[8,12],"stroke":{"align":"inside","fill":"$--border","thickness":{"top":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"person/","fill":"$--accent-green","fontFamily":"IBM Plex Mono","fontSize":12,"fontWeight":"normal","id":"Dfb6K","name":"r3c1","type":"text"},{"content":"Person","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"yhjgH","name":"r3c2","type":"text"},{"content":"People — colleagues, collaborators, contacts","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"NL1qV","name":"r3c3","type":"text"}],"gap":8,"id":"sdSbp","name":"row3","padding":[8,12],"stroke":{"align":"inside","fill":"$--border","thickness":{"top":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"topic/","fill":"$--accent-yellow","fontFamily":"IBM Plex Mono","fontSize":12,"fontWeight":"normal","id":"t6yAK","name":"r4c1","type":"text"},{"content":"Topic","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"3hrTN","name":"r4c2","type":"text"},{"content":"Subject areas that group related notes","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"S2l0W","name":"r4c3","type":"text"}],"gap":8,"id":"3VN69","name":"row4","padding":[8,12],"stroke":{"align":"inside","fill":"$--border","thickness":{"top":1}},"type":"frame","width":"fill_container"},{"children":[{"content":"type/","fill":"$--accent-orange","fontFamily":"IBM Plex Mono","fontSize":12,"fontWeight":"normal","id":"W2m7P","name":"r5c1","type":"text"},{"content":"Type","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"7hzGz","name":"r5c2","type":"text"},{"content":"Type definitions — icon, color, ordering","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"normal","id":"TNj3M","name":"r5c3","type":"text"}],"gap":8,"id":"BNbt7","name":"row5","padding":[8,12],"stroke":{"align":"inside","fill":"$--border","thickness":{"top":1}},"type":"frame","width":"fill_container"}],"clip":true,"cornerRadius":6,"id":"20lr0","layout":"vertical","name":"Structure Table","stroke":{"align":"inside","fill":"$--border","thickness":1},"type":"frame","width":"fill_container"},{"content":"Frontmatter","fill":"$--foreground","fontFamily":"Inter","fontSize":22,"fontWeight":"600","id":"5BCet","name":"edH3","type":"text"},{"content":"YAML frontmatter between --- delimiters defines metadata:","fill":"$--foreground","fontFamily":"Inter","fontSize":16,"fontWeight":"normal","id":"eJvEG","lineHeight":1.6,"name":"edFmDesc","textGrowth":"fixed-width","type":"text","width":"fill_container"},{"children":[{"content":"---","fill":"$--muted-foreground","fontFamily":"IBM Plex Mono","fontSize":13,"fontWeight":"normal","id":"tX6oL","name":"codeLine1","type":"text"},{"content":"Is A: Project","fill":"$--foreground","fontFamily":"IBM Plex Mono","fontSize":13,"fontWeight":"normal","id":"Q0NAS","name":"codeLine2","type":"text"},{"content":"Status: Active","fill":"$--foreground","fontFamily":"IBM Plex Mono","fontSize":13,"fontWeight":"normal","id":"iAS2l","name":"codeLine3","type":"text"},{"content":"Owner: \"[[person/jane-doe]]\"","fill":"$--accent-blue","fontFamily":"IBM Plex Mono","fontSize":13,"fontWeight":"normal","id":"f9aJW","name":"codeLine4","type":"text"},{"content":"Belongs to: \"[[quarter/24q1]]\"","fill":"$--accent-blue","fontFamily":"IBM Plex Mono","fontSize":13,"fontWeight":"normal","id":"vHqgV","name":"codeLine5","type":"text"},{"content":"---","fill":"$--muted-foreground","fontFamily":"IBM Plex Mono","fontSize":13,"fontWeight":"normal","id":"m4081","name":"codeLine6","type":"text"}],"cornerRadius":6,"fill":"$--muted","gap":2,"id":"spZfl","layout":"vertical","name":"codeBlock","padding":16,"type":"frame","width":"fill_container"}],"clip":true,"gap":16,"height":"fill_container","id":"C7esA","layout":"vertical","name":"Editor Body","padding":[32,80],"type":"frame","width":"fill_container"}],"clip":true,"fill":"$--background","height":"fill_container","id":"koB66","layout":"vertical","name":"Panel: Editor","type":"frame","width":"fill_container"}],"height":"fill_container","id":"sqOO6","name":"Content","type":"frame","width":"fill_container"}],"clip":true,"fill":"$--background","height":900,"id":"iiSrM","layout":"vertical","name":"AGENTS.md — Vault Root + Editor View","type":"frame","width":1440,"x":0,"y":0},{"children":[{"children":[{"alignItems":"center","children":[{"fill":"$--muted-foreground","height":16,"iconFontFamily":"lucide","iconFontName":"layers","id":"tX1IJ","name":"allNotesIcon","type":"icon_font","width":16},{"content":"All Notes","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"h1AvC","name":"allNotesLabel","type":"text"},{"content":"12","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"E50Rv","name":"allNotesCount","type":"text"}],"cornerRadius":6,"gap":8,"id":"cHU7c","name":"filterAllNotes","padding":[6,16],"type":"frame","width":"fill_container"}],"gap":1,"id":"rn991","layout":"vertical","name":"Filters","padding":[8,8,16,8],"stroke":{"align":"inside","fill":"$--border","thickness":{"bottom":1}},"type":"frame","width":"fill_container"},{"children":[{"alignItems":"center","children":[{"fill":"$--accent-purple","height":16,"iconFontFamily":"phosphor","iconFontName":"rocket-launch","id":"LCxKU","name":"secProjIcon","type":"icon_font","width":16},{"content":"Projects","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"tCo0m","name":"secProjLabel","type":"text"},{"content":"1","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"WmcbF","name":"secProjCount","type":"text"}],"gap":8,"id":"ZV8hM","name":"secProjects","padding":[6,16],"type":"frame","width":"fill_container"},{"alignItems":"center","children":[{"fill":"$--accent-blue","height":16,"iconFontFamily":"phosphor","iconFontName":"note","id":"9N6hy","name":"secNotesIcon","type":"icon_font","width":16},{"content":"Notes","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"dwLa6","name":"secNotesLabel","type":"text"},{"content":"4","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"pF6Vk","name":"secNotesCount","type":"text"}],"gap":8,"id":"TF7eK","name":"secNotes","padding":[6,16],"type":"frame","width":"fill_container"},{"alignItems":"center","children":[{"fill":"$--accent-green","height":16,"iconFontFamily":"phosphor","iconFontName":"user","id":"aeUGs","name":"secPeopleIcon","type":"icon_font","width":16},{"content":"People","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"4Pksr","name":"secPeopleLabel","type":"text"},{"content":"1","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"mZkh4","name":"secPeopleCount","type":"text"}],"gap":8,"id":"5AJ0W","name":"secPeople","padding":[6,16],"type":"frame","width":"fill_container"},{"alignItems":"center","children":[{"fill":"$--accent-yellow","height":16,"iconFontFamily":"phosphor","iconFontName":"tag","id":"Lu26g","name":"secTopicsIcon","type":"icon_font","width":16},{"content":"Topics","fill":"$--foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"pd7sa","name":"secTopicsLabel","type":"text"},{"content":"1","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"zvf8X","name":"secTopicsCount","type":"text"}],"gap":8,"id":"uCdg1","name":"secTopics","padding":[6,16],"type":"frame","width":"fill_container"},{"height":8,"id":"XZNp8","name":"spacer","type":"frame","width":"fill_container"},{"content":"VAULT ROOT","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":10,"fontWeight":"600","id":"JH4k8","letterSpacing":1,"name":"rootLabel","type":"text"},{"alignItems":"center","children":[{"fill":"$--primary-foreground","height":16,"iconFontFamily":"lucide","iconFontName":"file-text","id":"TeldH","name":"agentsIcon","type":"icon_font","width":16},{"content":"AGENTS.md","fill":"$--primary-foreground","fontFamily":"Inter","fontSize":13,"fontWeight":"500","id":"goqrg","name":"agentsLabel","type":"text"}],"cornerRadius":6,"fill":"$--primary","gap":8,"id":"Vnjwi","name":"agentsItem","padding":[6,16],"type":"frame","width":"fill_container"}],"id":"kZsX6","layout":"vertical","name":"Sections","padding":[8,0],"type":"frame","width":"fill_container"},{"children":[{"content":"AGENTS.md appears in the vault root section of the sidebar, below type sections. It is always present and selected highlights it with the primary accent.","fill":"$--muted-foreground","fontFamily":"Inter","fontSize":11,"fontWeight":"normal","id":"gXRLY","lineHeight":1.5,"name":"annotationText","textGrowth":"fixed-width","type":"text","width":"fill_container"}],"fill":"$--muted","id":"bbJjG","name":"Annotation","padding":[12,16],"type":"frame","width":"fill_container"}],"clip":true,"fill":"$--sidebar","id":"omsAY","layout":"vertical","name":"AGENTS.md — Sidebar Vault Root Section","type":"frame","width":250,"x":1540,"y":0}],"variables":{"--accent-blue":{"type":"color","value":"#2383E2"},"--accent-green":{"type":"color","value":"#0F7B6C"},"--accent-orange":{"type":"color","value":"#D9730D"},"--accent-purple":{"type":"color","value":"#9065B0"},"--accent-yellow":{"type":"color","value":"#F0B100"},"--background":{"type":"color","value":"#FFFFFF"},"--border":{"type":"color","value":"#E9E9E7"},"--card":{"type":"color","value":"#FFFFFF"},"--foreground":{"type":"color","value":"#37352F"},"--muted":{"type":"color","value":"#F0F0EF"},"--muted-foreground":{"type":"color","value":"#787774"},"--primary":{"type":"color","value":"#155DFF"},"--primary-foreground":{"type":"color","value":"#FFFFFF"},"--sidebar":{"type":"color","value":"#F7F6F3"},"--sidebar-border":{"type":"color","value":"#E9E9E7"},"--traffic-green":{"type":"color","value":"#28c840"},"--traffic-red":{"type":"color","value":"#ff5f57"},"--traffic-yellow":{"type":"color","value":"#febc2e"}}} diff --git a/src-tauri/src/vault/getting_started.rs b/src-tauri/src/vault/getting_started.rs index aeed2e84..eaba6e70 100644 --- a/src-tauri/src/vault/getting_started.rs +++ b/src-tauri/src/vault/getting_started.rs @@ -18,6 +18,104 @@ struct SampleFile { content: &'static str, } +/// Content for the AGENTS.md file written to the vault root. +/// This file has no YAML frontmatter — it is a convention file for AI agents, +/// not a vault note. The vault scanner will still pick it up as a regular entry. +const AGENTS_MD: &str = r#"# AGENTS.md — Vault Instructions for AI Agents + +This is a [Laputa](https://github.com/refactoring-ai/laputa) vault — a folder of markdown files with YAML frontmatter that form a personal knowledge graph. + +## Structure + +Files are organized in folders by type: + +| Folder | Type | Purpose | +|--------|------|---------| +| `note/` | Note | General-purpose documents, research, meeting notes | +| `project/` | Project | Time-bounded efforts with clear goals | +| `person/` | Person | People — colleagues, collaborators, contacts | +| `topic/` | Topic | Subject areas that group related notes | +| `responsibility/` | Responsibility | Long-running duties with KPIs | +| `procedure/` | Procedure | Recurring workflows (weekly, monthly) | +| `event/` | Event | Something that happened on a specific date | +| `quarter/` | Quarter | Time containers (e.g. 24Q1) | +| `measure/` | Measure | Trackable metrics tied to responsibilities | +| `target/` | Target | Time-bound goals for a measure | +| `type/` | Type | Type definitions — icon, color, ordering | + +Custom folders are valid — the folder name becomes the type (capitalized). + +## Frontmatter + +YAML frontmatter between `---` delimiters defines metadata: + +```yaml +--- +Is A: Project +Status: Active +Owner: "[[person/jane-doe]]" +Belongs to: "[[quarter/24q1]]" +Related to: + - "[[topic/growth]]" + - "[[note/research-findings]]" +--- +``` + +### Standard fields + +| Field | Purpose | +|-------|---------| +| `Is A` | Entity type (usually inferred from folder) | +| `Status` | Active, Done, Paused, Archived, Dropped | +| `Owner` | Person responsible (wikilink) | +| `Belongs to` | Parent relationship(s) | +| `Related to` | Lateral associations | +| `Cadence` | For Procedures: Weekly, Monthly, etc. | +| `aliases` | Alternative names for wikilink resolution | + +### Custom fields + +Any YAML field containing `[[wikilinks]]` becomes a navigable relationship: + +```yaml +Has Measures: ["[[measure/revenue]]", "[[measure/churn]]"] +Resources: "[[note/api-docs]]" +``` + +## Wikilinks + +Connect notes with double-bracket syntax: + +- `[[note/my-note]]` — link by path +- `[[My Note Title]]` — link by title or alias +- `[[note/my-note|display text]]` — link with custom display text + +Wikilinks work in both frontmatter values and markdown body. Backlinks are computed automatically — linking A to B makes B show a backlink to A. + +## Type definitions + +Files in `type/` define entity types and control how they appear in the sidebar: + +```yaml +--- +Is A: Type +icon: rocket-launch +color: purple +order: 1 +--- +``` + +Available colors: red, purple, blue, green, yellow, orange. Icons are Phosphor names in kebab-case. + +## Conventions + +- First `# Heading` in a file becomes its title +- One entity per file +- Filenames use kebab-case: `my-note-title.md` +- Type is inferred from parent folder if not set in frontmatter +- Relationships are bidirectional via automatic backlinks +"#; + const SAMPLE_FILES: &[SampleFile] = &[ SampleFile { rel_path: "type/project.md", @@ -282,6 +380,10 @@ pub fn create_getting_started_vault(target_path: &str) -> Result fs::create_dir_all(vault_dir) .map_err(|e| format!("Failed to create vault directory: {}", e))?; + // Write AGENTS.md at the vault root + fs::write(vault_dir.join("AGENTS.md"), AGENTS_MD) + .map_err(|e| format!("Failed to write AGENTS.md: {}", e))?; + for sample in SAMPLE_FILES { let file_path = vault_dir.join(sample.rel_path); if let Some(parent) = file_path.parent() { @@ -326,6 +428,7 @@ mod tests { assert!(result.is_ok()); // Verify key files exist + assert!(vault_path.join("AGENTS.md").exists()); assert!(vault_path.join("note/welcome-to-laputa.md").exists()); assert!(vault_path.join("note/editor-basics.md").exists()); assert!(vault_path.join("note/using-properties.md").exists()); @@ -393,7 +496,57 @@ mod tests { create_getting_started_vault(vault_path.to_str().unwrap()).unwrap(); let entries = crate::vault::scan_vault(&vault_path).unwrap(); - assert_eq!(entries.len(), SAMPLE_FILES.len()); + // SAMPLE_FILES + AGENTS.md + assert_eq!(entries.len(), SAMPLE_FILES.len() + 1); + } + + #[test] + fn test_agents_md_present_after_vault_creation() { + let dir = tempfile::TempDir::new().unwrap(); + let vault_path = dir.path().join("agents-vault"); + create_getting_started_vault(vault_path.to_str().unwrap()).unwrap(); + + let agents_path = vault_path.join("AGENTS.md"); + assert!(agents_path.exists(), "AGENTS.md should exist at vault root"); + + let content = fs::read_to_string(&agents_path).unwrap(); + assert!( + content.contains("Vault Instructions for AI Agents"), + "AGENTS.md should contain instructions header" + ); + assert!( + content.contains("## Structure"), + "AGENTS.md should describe vault structure" + ); + assert!( + content.contains("## Frontmatter"), + "AGENTS.md should describe frontmatter" + ); + assert!( + content.contains("## Wikilinks"), + "AGENTS.md should describe wikilinks" + ); + assert!( + content.contains("## Type definitions"), + "AGENTS.md should describe type definitions" + ); + assert!( + content.contains("## Conventions"), + "AGENTS.md should describe conventions" + ); + } + + #[test] + fn test_agents_md_parseable_as_vault_entry() { + let dir = tempfile::TempDir::new().unwrap(); + let vault_path = dir.path().join("agents-parse-vault"); + create_getting_started_vault(vault_path.to_str().unwrap()).unwrap(); + + let entry = crate::vault::parse_md_file(&vault_path.join("AGENTS.md")).unwrap(); + assert_eq!( + entry.title, + "AGENTS.md \u{2014} Vault Instructions for AI Agents" + ); } #[test]