@jayjiang/byoao 1.1.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/__tests__/plugin-config.test.js +7 -10
  2. package/dist/__tests__/plugin-config.test.js.map +1 -1
  3. package/dist/assets/obsidian-skills/byoao-conventions.md +30 -54
  4. package/dist/assets/obsidian-skills/vault-thinking.md +6 -5
  5. package/dist/assets/presets/common/AGENTS.md.hbs +29 -46
  6. package/dist/assets/presets/common/SCHEMA.md.hbs +57 -0
  7. package/dist/assets/presets/common/Start Here.md.hbs +29 -40
  8. package/dist/assets/presets/minimal/preset.json +3 -3
  9. package/dist/assets/presets/pm-tpm/preset.json +2 -2
  10. package/{src/skills/ask.md → dist/assets/skills/ask/SKILL.md} +30 -27
  11. package/dist/assets/skills/ask.md +28 -27
  12. package/dist/assets/skills/challenge/SKILL.md +134 -0
  13. package/dist/assets/skills/challenge.md +79 -121
  14. package/dist/assets/skills/connect/SKILL.md +126 -0
  15. package/dist/assets/skills/connect.md +75 -163
  16. package/dist/assets/skills/cook/SKILL.md +170 -0
  17. package/dist/assets/skills/cook.md +167 -0
  18. package/dist/assets/skills/diagnose/SKILL.md +134 -0
  19. package/dist/assets/skills/diagnose.md +102 -43
  20. package/dist/assets/skills/drift/SKILL.md +123 -0
  21. package/dist/assets/skills/drift.md +64 -165
  22. package/dist/assets/skills/health/SKILL.md +65 -0
  23. package/dist/assets/skills/health.md +63 -0
  24. package/{src/skills/ideas.md → dist/assets/skills/ideas/SKILL.md} +11 -10
  25. package/dist/assets/skills/ideas.md +11 -10
  26. package/dist/assets/skills/organize/SKILL.md +109 -0
  27. package/dist/assets/skills/organize.md +56 -155
  28. package/dist/assets/skills/prep/SKILL.md +65 -0
  29. package/dist/assets/skills/prep.md +63 -0
  30. package/dist/assets/skills/trace/SKILL.md +143 -0
  31. package/dist/assets/skills/trace.md +75 -90
  32. package/dist/assets/skills/wiki/SKILL.md +127 -0
  33. package/dist/assets/skills/wiki.md +77 -178
  34. package/dist/cli/cli-program.js +18 -15
  35. package/dist/cli/cli-program.js.map +1 -1
  36. package/dist/cli/installer.js +54 -29
  37. package/dist/cli/installer.js.map +1 -1
  38. package/dist/hooks/idle-suggestions.js +4 -4
  39. package/dist/hooks/idle-suggestions.js.map +1 -1
  40. package/dist/hooks/system-transform.js +35 -1
  41. package/dist/hooks/system-transform.js.map +1 -1
  42. package/dist/index.js +455 -636
  43. package/dist/index.js.map +1 -1
  44. package/dist/plugin-config.js +6 -32
  45. package/dist/plugin-config.js.map +1 -1
  46. package/dist/tools/init-vault.js +8 -38
  47. package/dist/tools/init-vault.js.map +1 -1
  48. package/dist/tools/vault-doctor.js +1 -1
  49. package/dist/tools/vault-doctor.js.map +1 -1
  50. package/dist/tools/vault-status.js +1 -1
  51. package/dist/tools/vault-status.js.map +1 -1
  52. package/dist/vault/__tests__/create.test.js +48 -116
  53. package/dist/vault/__tests__/create.test.js.map +1 -1
  54. package/dist/vault/__tests__/doctor.test.js +14 -2
  55. package/dist/vault/__tests__/doctor.test.js.map +1 -1
  56. package/dist/vault/__tests__/manifest.test.js +2 -2
  57. package/dist/vault/__tests__/manifest.test.js.map +1 -1
  58. package/dist/vault/__tests__/status.test.js +12 -0
  59. package/dist/vault/__tests__/status.test.js.map +1 -1
  60. package/dist/vault/__tests__/upgrade.test.js +3 -3
  61. package/dist/vault/__tests__/upgrade.test.js.map +1 -1
  62. package/dist/vault/create.js +86 -196
  63. package/dist/vault/create.js.map +1 -1
  64. package/dist/vault/doctor.js +49 -0
  65. package/dist/vault/doctor.js.map +1 -1
  66. package/dist/vault/manifest.js +2 -2
  67. package/dist/vault/manifest.js.map +1 -1
  68. package/dist/vault/preset.js +10 -4
  69. package/dist/vault/preset.js.map +1 -1
  70. package/dist/vault/self-update.js +1 -1
  71. package/dist/vault/status.js +24 -0
  72. package/dist/vault/status.js.map +1 -1
  73. package/dist/vault/upgrade.js +165 -23
  74. package/dist/vault/upgrade.js.map +1 -1
  75. package/package.json +1 -1
  76. package/src/assets/obsidian-skills/byoao-conventions.md +9 -6
  77. package/src/assets/obsidian-skills/vault-thinking.md +6 -5
  78. package/src/assets/presets/common/AGENTS.md.hbs +23 -19
  79. package/src/assets/presets/common/SCHEMA.md.hbs +57 -0
  80. package/src/assets/presets/common/Start Here.md.hbs +29 -40
  81. package/src/assets/presets/minimal/preset.json +3 -3
  82. package/src/assets/presets/pm-tpm/preset.json +2 -2
  83. package/src/skills/ask/SKILL.md +135 -0
  84. package/src/skills/challenge/SKILL.md +134 -0
  85. package/src/skills/connect/SKILL.md +126 -0
  86. package/src/skills/cook/SKILL.md +170 -0
  87. package/src/skills/diagnose/SKILL.md +134 -0
  88. package/src/skills/drift/SKILL.md +123 -0
  89. package/src/skills/health/SKILL.md +65 -0
  90. package/src/skills/ideas/SKILL.md +173 -0
  91. package/src/skills/organize/SKILL.md +109 -0
  92. package/src/skills/prep/SKILL.md +65 -0
  93. package/src/skills/trace/SKILL.md +143 -0
  94. package/src/skills/wiki/SKILL.md +127 -0
  95. package/dist/assets/presets/common/Glossary.md.hbs +0 -16
  96. package/dist/assets/presets/common/obsidian/daily-notes.json +0 -5
  97. package/dist/assets/presets/common/obsidian/templates.json +0 -3
  98. package/dist/assets/presets/common/templates/Daily Note.md +0 -19
  99. package/dist/assets/presets/common/templates/Decision Record.md +0 -32
  100. package/dist/assets/presets/common/templates/Investigation.md +0 -34
  101. package/dist/assets/presets/common/templates/Meeting Notes.md +0 -25
  102. package/dist/assets/skills/emerge.md +0 -168
  103. package/dist/assets/skills/weave.md +0 -287
  104. package/dist/tools/add-glossary-term.js +0 -21
  105. package/dist/tools/add-glossary-term.js.map +0 -1
  106. package/dist/tools/add-person.js +0 -21
  107. package/dist/tools/add-person.js.map +0 -1
  108. package/dist/tools/add-project.js +0 -24
  109. package/dist/tools/add-project.js.map +0 -1
  110. package/dist/tools/graph-health.js +0 -25
  111. package/dist/tools/graph-health.js.map +0 -1
  112. package/dist/tools/note-read.js +0 -19
  113. package/dist/tools/note-read.js.map +0 -1
  114. package/dist/tools/search-vault.js +0 -22
  115. package/dist/tools/search-vault.js.map +0 -1
  116. package/dist/vault/__tests__/glossary.test.js +0 -68
  117. package/dist/vault/__tests__/glossary.test.js.map +0 -1
  118. package/dist/vault/__tests__/graph-health.test.js +0 -102
  119. package/dist/vault/__tests__/graph-health.test.js.map +0 -1
  120. package/dist/vault/__tests__/member.test.js +0 -85
  121. package/dist/vault/__tests__/member.test.js.map +0 -1
  122. package/dist/vault/__tests__/note-read.test.js +0 -71
  123. package/dist/vault/__tests__/note-read.test.js.map +0 -1
  124. package/dist/vault/__tests__/obsidian-cli.test.js +0 -108
  125. package/dist/vault/__tests__/obsidian-cli.test.js.map +0 -1
  126. package/dist/vault/__tests__/search-vault.test.js +0 -93
  127. package/dist/vault/__tests__/search-vault.test.js.map +0 -1
  128. package/dist/vault/glossary.js +0 -27
  129. package/dist/vault/glossary.js.map +0 -1
  130. package/dist/vault/graph-health.js +0 -83
  131. package/dist/vault/graph-health.js.map +0 -1
  132. package/dist/vault/member.js +0 -67
  133. package/dist/vault/member.js.map +0 -1
  134. package/dist/vault/note-read.js +0 -70
  135. package/dist/vault/note-read.js.map +0 -1
  136. package/dist/vault/project.js +0 -68
  137. package/dist/vault/project.js.map +0 -1
  138. package/dist/vault/retrieval-types.js +0 -5
  139. package/dist/vault/retrieval-types.js.map +0 -1
  140. package/dist/vault/search-vault.js +0 -87
  141. package/dist/vault/search-vault.js.map +0 -1
  142. package/src/assets/presets/common/obsidian/daily-notes.json +0 -5
  143. package/src/assets/presets/common/obsidian/templates.json +0 -3
  144. package/src/assets/presets/common/templates/Daily Note.md +0 -19
  145. package/src/assets/presets/common/templates/Decision Record.md +0 -32
  146. package/src/assets/presets/common/templates/Investigation.md +0 -34
  147. package/src/assets/presets/common/templates/Meeting Notes.md +0 -25
  148. package/src/skills/challenge.md +0 -174
  149. package/src/skills/connect.md +0 -213
  150. package/src/skills/diagnose.md +0 -72
  151. package/src/skills/drift.md +0 -223
  152. package/src/skills/emerge.md +0 -168
  153. package/src/skills/organize.md +0 -206
  154. package/src/skills/trace.md +0 -156
  155. package/src/skills/weave.md +0 -287
  156. package/src/skills/wiki.md +0 -227
@@ -1,287 +0,0 @@
1
- ---
2
- name: weave
3
- description: Scan vault notes, enrich with frontmatter + wikilinks, suggest permanent concept notes, and create a connected knowledge graph. Use when the user says "connect my notes", "add links", "enrich", "run weave", "weave my vault", or after importing new files into the vault.
4
- ---
5
-
6
- # /weave — Connect Your Notes
7
-
8
- You are a knowledge graph builder. Your job is to scan vault notes, enrich them with frontmatter and wikilinks, suggest permanent concept notes, and create hub notes for frequently referenced topics — turning scattered files into an interconnected knowledge graph inspired by the Zettelkasten method.
9
-
10
- ## Prerequisites Check
11
-
12
- **Before doing anything else**, verify Obsidian CLI is available:
13
-
14
- ```bash
15
- obsidian --version
16
- ```
17
-
18
- If this fails, STOP and display:
19
-
20
- ```
21
- Obsidian CLI is not available. Please ensure:
22
- 1. Obsidian is running
23
- 2. This vault is open in Obsidian
24
- 3. CLI is enabled: Settings → General → Advanced → Command-line interface
25
- ```
26
-
27
- Do NOT proceed with degraded results — graph queries are essential.
28
-
29
- ## Parameters
30
-
31
- - **file** (optional): Path to a single file to weave. If omitted, scan the entire vault.
32
- - **folder** (optional): Path to a folder to scan. If omitted, scan the entire vault.
33
- - **dry-run** (optional): If set, show proposed changes without applying them.
34
-
35
- ## File Exclusion Rules
36
-
37
- When scanning files, skip:
38
-
39
- | Pattern | Reason |
40
- |---------|--------|
41
- | `.obsidian/` | Obsidian internal config |
42
- | `.git/` | Git internals |
43
- | `.byoao/` | BYOAO internal data |
44
- | `node_modules/` | Dependencies |
45
- | `.env`, `credentials.*`, `*.key` | Sensitive files |
46
- | Binary files (images, PDFs, etc.) | Cannot add frontmatter/wikilinks |
47
- | `AGENTS.md` | BYOAO-managed file |
48
- | `*.base` | Obsidian Base files — not user content notes |
49
-
50
- Report skipped non-markdown files at the end: "Skipped N non-markdown files".
51
-
52
- ## Process
53
-
54
- Execute these steps in order. Be explicit about each tool call — different LLM providers must execute this consistently.
55
-
56
- ### Step 1: Build Vault Map
57
-
58
- ```bash
59
- obsidian list
60
- ```
61
-
62
- This gives you the full list of notes. Also run:
63
-
64
- ```bash
65
- obsidian properties sort=count counts
66
- ```
67
-
68
- This reveals the vault's structure — which properties are used, how many notes have frontmatter.
69
-
70
- ### Step 2: Scan Target Files
71
-
72
- For each markdown file in scope (respecting exclusion rules):
73
-
74
- #### 2a. Read the file
75
-
76
- ```bash
77
- obsidian read "<note name>"
78
- ```
79
-
80
- #### 2b. Identify entities
81
-
82
- Scan the content for concepts using semantic understanding (not a predefined list):
83
-
84
- - **People names** — proper nouns that appear to be people
85
- - **Project/product names** — capitalized multi-word phrases that recur
86
- - **Domain concepts** — technical terms, acronyms, recurring themes
87
- - **Tool/system names** — software, services, platforms mentioned
88
- - **Dates and events** — meetings, deadlines, milestones
89
- - **Methodologies/frameworks** — named approaches like "Zettelkasten", "Agile", etc.
90
-
91
- #### 2c. Cross-reference against existing notes
92
-
93
- For each entity found:
94
-
95
- 1. Does a vault note with this name exist? → Mark as wikilink candidate
96
- 2. Is it a new, unrecognized concept? → Track for permanent note suggestion (Step 4)
97
-
98
- #### 2d. Propose frontmatter
99
-
100
- If the file has no frontmatter, or has incomplete frontmatter, propose additions:
101
-
102
- ```yaml
103
- ---
104
- title: "<inferred from content or filename>"
105
- note_type: <fleeting | literature | permanent>
106
- type: "<inferred: meeting, idea, reference, daily, project, person, etc>"
107
- date: YYYY-MM-DD
108
- domain: "<knowledge area: analytics, infrastructure, design, etc>"
109
- references:
110
- - "[[Related Note]]"
111
- tags: [<relevant tags>]
112
- status: <draft | active | completed | archived>
113
- source: "<URL if this note originates from a cloud document>"
114
- ---
115
- ```
116
-
117
- **note_type classification (Zettelkasten):**
118
-
119
- | `note_type` | When to use |
120
- |-------------|-------------|
121
- | `fleeting` | Raw inputs: quick notes, meeting minutes, clipped articles, thoughts not yet processed |
122
- | `literature` | Processed references: summaries of papers, books, articles, or external sources |
123
- | `permanent` | Atomic concepts: single-idea notes that synthesize understanding from multiple sources |
124
-
125
- If unsure, default to `fleeting` — the user can reclassify later.
126
-
127
- **Date resolution (mandatory — never leave empty):**
128
-
129
- 1. Extract from content — explicit dates in the text, meeting dates, file name patterns (e.g. `2026-03-27-meeting.md`)
130
- 2. If no date in content, get the file creation time:
131
- ```bash
132
- stat -f '%SB' -t '%Y-%m-%d' "<file path>" # macOS
133
- stat -c '%w' "<file path>" # Linux (birth time)
134
- ```
135
- If birth time is unavailable (`-` or empty), fall back to modification time:
136
- ```bash
137
- stat -f '%Sm' -t '%Y-%m-%d' "<file path>" # macOS
138
- stat -c '%y' "<file path>" # Linux
139
- ```
140
- 3. Never leave `date` empty in the proposed frontmatter.
141
-
142
- **Source field (optional):**
143
-
144
- - Add `source` only when the note clearly originates from a cloud document (e.g. contains Confluence export markers, Google Docs formatting, or a URL in the content pointing to the original).
145
- - If the file already has a `source` field, always preserve it.
146
-
147
- **Frontmatter preservation rules:**
148
- - **Never overwrite** existing fields
149
- - **Only add** missing fields
150
- - **Merge arrays** — if file has `tags: [meeting]` and you suggest `tags: [meeting, migration]`, result is `[meeting, migration]`
151
- - **Warn on conflicts** — if existing value seems wrong, note it but don't change it
152
-
153
- #### 2e. Propose wikilinks
154
-
155
- Convert plain text mentions to `[[wikilinks]]`:
156
-
157
- - Existing note names → `[[Note Name]]`
158
- - People → `[[Person Name]]`
159
- - Domain concepts → `[[Concept Name]]`
160
-
161
- Rules:
162
- - Only link the **first occurrence** of each term in a file
163
- - Don't link inside code blocks, frontmatter, or existing wikilinks
164
- - Don't link common English words even if they happen to match a note name
165
- - Preserve the original text when the casing differs: `rate limiting` → `[[Rate Limiting|rate limiting]]`
166
-
167
- ### Step 3: Backup Before Modification
168
-
169
- Before modifying any file, create a backup:
170
-
171
- ```bash
172
- mkdir -p .byoao/backups/<timestamp>
173
- cp "<file path>" ".byoao/backups/<timestamp>/<filename>"
174
- ```
175
-
176
- Use the current date-time as the timestamp (e.g., `2026-03-27T20-45`).
177
-
178
- This is critical for existing folder adoption where files are user-created and irreplaceable.
179
-
180
- ### Step 4: Apply Changes
181
-
182
- For each file with proposed changes:
183
- 1. Show the user a summary of proposed changes (frontmatter additions, wikilinks to add)
184
- 2. Wait for confirmation before applying
185
- 3. Apply changes using file edit tools
186
-
187
- ### Step 5: Suggest Permanent Notes
188
-
189
- After scanning all files, analyze concept frequency across the vault:
190
-
191
- **When to suggest a permanent note:**
192
- - A concept appears in 3+ notes
193
- - No dedicated note exists for that concept
194
- - The concept has a clear, non-ambiguous definition
195
-
196
- For each candidate, present to the user:
197
-
198
- ```markdown
199
- ### Permanent Note Candidate: [[Concept Name]]
200
-
201
- **Appears in:** [[Note A]], [[Note B]], [[Note C]]
202
-
203
- **Proposed content:**
204
-
205
- ---
206
- title: "Concept Name"
207
- note_type: permanent
208
- type: reference
209
- domain: <inferred from source notes>
210
- date: <today>
211
- tags: [<inferred>]
212
- references:
213
- - "[[Note A]]"
214
- - "[[Note B]]"
215
- ---
216
-
217
- # Concept Name
218
-
219
- *Auto-generated by /weave — this concept appears across multiple notes. Review and refine.*
220
-
221
- ## Summary
222
- <1-2 sentence summary synthesized from source notes>
223
-
224
- ## References
225
- - [[Note A]] — <context>
226
- - [[Note B]] — <context>
227
- ```
228
-
229
- Ask the user: "Create this permanent note?" Only create if confirmed.
230
-
231
- ### Step 6: Suggest Note Splitting (Zettelkasten Atomicity)
232
-
233
- Check for notes that contain multiple independent concepts. For each candidate:
234
-
235
- ```markdown
236
- ### Split Suggestion: [[Multi-Concept Note]]
237
-
238
- This note appears to cover multiple distinct concepts:
239
- 1. **Concept A** — <brief description>
240
- 2. **Concept B** — <brief description>
241
- 3. **Concept C** — <brief description>
242
-
243
- Consider splitting these into separate atomic notes for better knowledge graph connectivity.
244
- ```
245
-
246
- **Do NOT split automatically.** Only suggest; the user decides.
247
-
248
- ### Step 7: Directory Organization (optional)
249
-
250
- If the vault has many files in flat or disorganized directories, suggest:
251
-
252
- "Your vault has files that could benefit from reorganization.
253
- Run `/organize` to see a proposed directory structure based on
254
- the frontmatter metadata we just added. It uses `obsidian move`
255
- to safely relocate files while automatically updating all links."
256
-
257
- Do NOT move files during /weave — directory reorganization is
258
- a separate step handled by `/organize`.
259
-
260
- ### Step 8: Report
261
-
262
- After all changes are applied, provide a summary:
263
-
264
- ```
265
- Weave complete:
266
- - Scanned: N files
267
- - Enriched: N files (frontmatter + wikilinks)
268
- - Wikilinks added: N
269
- - Permanent notes created: N
270
- - Split suggestions: N (pending user review)
271
- - Orphaned files (no links): N
272
- - Skipped: N non-markdown files
273
- - Backups: .byoao/backups/<timestamp>/
274
- ```
275
-
276
- ## Single File Mode
277
-
278
- When `file=` is provided, run the same process but only for that one file. Still read the vault map and check for cross-references, but skip Steps 5-6 (permanent note generation and split suggestions are batch operations).
279
-
280
- ## Important Guidelines
281
-
282
- - **Be conservative**: When in doubt about a wikilink or frontmatter value, skip it. False positives degrade trust.
283
- - **Ask, don't assume**: Always present changes for user confirmation before applying.
284
- - **Preserve user content**: Never delete, rewrite, or reorganize existing text. Only add metadata and convert mentions to links.
285
- - **Domain inference**: Use existing note domains to infer the domain for new notes. Consistency matters.
286
- - **Idempotent**: Running /weave twice on the same file should not add duplicate wikilinks or frontmatter fields.
287
- - **Zettelkasten principle**: Favor atomicity. One idea per note. Suggest splits for multi-concept notes.
@@ -1,227 +0,0 @@
1
- ---
2
- name: wiki
3
- description: Generate INDEX.base knowledge graph at vault root and update AGENTS.md with current stats. Use when the user says "generate index", "build wiki", "update INDEX", "create knowledge map", or wants a visual overview of their vault.
4
- ---
5
-
6
- # /wiki — Generate Knowledge Index
7
-
8
- You are a knowledge cartographer. Your job is to generate an `INDEX.base` file at the vault root that serves as the knowledge graph entry point, and update `AGENTS.md` with current vault statistics.
9
-
10
- ## Prerequisites Check
11
-
12
- **Before doing anything else**, verify Obsidian CLI is available:
13
-
14
- ```bash
15
- obsidian --version
16
- ```
17
-
18
- If this fails, STOP and display:
19
-
20
- ```
21
- Obsidian CLI is not available. Please ensure:
22
- 1. Obsidian is running
23
- 2. This vault is open in Obsidian
24
- 3. CLI is enabled: Settings → General → Advanced → Command-line interface
25
- ```
26
-
27
- ## Process
28
-
29
- ### Step 1: Build Vault Map
30
-
31
- ```bash
32
- obsidian list
33
- ```
34
-
35
- ```bash
36
- obsidian properties sort=count counts
37
- ```
38
-
39
- This gives you the full list of notes and their frontmatter distribution.
40
-
41
- ### Step 2: Read Existing INDEX.base (if any)
42
-
43
- If `INDEX.base` already exists, read it to understand the current structure:
44
-
45
- ```bash
46
- obsidian read "INDEX"
47
- ```
48
-
49
- ### Step 3: Analyze Knowledge Structure
50
-
51
- Group notes by their `domain` frontmatter field. For notes without `domain`, infer it from content. Count:
52
- - Total notes
53
- - Notes by `domain` (topics)
54
- - Notes by `note_type` (fleeting, literature, permanent)
55
- - Most frequently referenced concepts
56
-
57
- ### Step 4: Generate INDEX.base
58
-
59
- Create or overwrite `INDEX.base` at the vault root. Use Obsidian CLI to create the file:
60
-
61
- ```bash
62
- obsidian create name="INDEX" content="<YAML content>" silent overwrite
63
- ```
64
-
65
- The content should be valid YAML for an Obsidian Base:
66
-
67
- ```yaml
68
- filters:
69
- not:
70
- - 'note_type == ""'
71
- formulas: {}
72
- properties:
73
- note_type:
74
- displayName: Type
75
- domain:
76
- displayName: Domain
77
- views:
78
- - type: table
79
- name: "All Notes"
80
- groupBy:
81
- property: domain
82
- direction: ASC
83
- order:
84
- - file.name
85
- - note_type
86
- - domain
87
- - tags
88
- - date
89
- - type: cards
90
- name: "Gallery"
91
- groupBy:
92
- property: note_type
93
- direction: ASC
94
- order:
95
- - file.name
96
- - note_type
97
- - domain
98
- - date
99
- ```
100
-
101
- **IMPORTANT:** The YAML must be properly formatted. Use single quotes for formulas containing special characters. Ensure proper indentation (2 spaces).
102
-
103
- ### Step 5: Generate AGENTS.md
104
-
105
- Read the current `AGENTS.md` (if it exists):
106
-
107
- ```bash
108
- obsidian read "AGENTS"
109
- ```
110
-
111
- Generate a complete `AGENTS.md` that serves as the agent's entry point for the vault. Use `obsidian create` with `overwrite`:
112
-
113
- ```bash
114
- obsidian create path="AGENTS.md" content="<content>" overwrite silent
115
- ```
116
-
117
- The AGENTS.md must contain these sections:
118
-
119
- **Header**
120
- ```markdown
121
- # BYOAO — Build Your Own AI OS
122
-
123
- This knowledge base contains **M topics** and **N indexed notes**.
124
- ```
125
-
126
- **Usage**
127
- ```markdown
128
- ## Usage
129
-
130
- - `/weave` — Scan notes, enrich with frontmatter and wikilinks, build the knowledge graph
131
- - `/wiki` — Regenerate the INDEX.base knowledge map
132
- - `/organize` — Suggest a directory structure based on frontmatter metadata
133
- ```
134
-
135
- **Current Stats**
136
- ```markdown
137
- ## Current Stats
138
-
139
- - Total notes: {total}
140
- - Indexed notes (have note_type): {indexed}
141
- - Topics (domain): {domain1}, {domain2}, ...
142
- - Pending notes (need weave): {pending}
143
- ```
144
-
145
- **Interacting with the Vault** — This is critical. The agent must always prefer Obsidian CLI:
146
- ```markdown
147
- ## Working with this Vault
148
-
149
- When you need to interact with notes, always use Obsidian CLI first:
150
-
151
- | Task | Command |
152
- |------|---------|
153
- | Search notes | `obsidian search query="keyword"` |
154
- | Read a note | `obsidian read file="Note Name"` |
155
- | Create a new note | `obsidian create name="Note Title" content="# Content"` |
156
- | Create note in folder | `obsidian create path="Folder/Note.md" content="# Content"` |
157
- | Append to a note | `obsidian append file="Note" content="New content"` |
158
- | Add frontmatter | `obsidian prepend file="Note" content='---
159
- title: "Title"
160
- note_type: fleeting
161
- domain: Topic
162
- date: YYYY-MM-DD
163
- tags: [tag1]
164
- ---
165
-
166
- '` |
167
- | Rename/move a note | `obsidian move path="Old.md" to="NewFolder/New.md"` |
168
- | List backlinks | `obsidian backlinks file="Note"` |
169
- | Check links | `obsidian links file="Note"` |
170
- | List all files | `obsidian files ext=md` |
171
- | Check unresolved links | `obsidian unresolved total` |
172
- | Open random note | `obsidian random` |
173
-
174
- For multi-line content, use `\\n` for newlines in the `content=` parameter.
175
- ```
176
-
177
- **Creating New Notes** — explicit guidance:
178
- ```markdown
179
- ## Creating New Notes
180
-
181
- When asked to write, research, or document something:
182
-
183
- 1. **Search first** — `obsidian search query="topic"` to check if a relevant note already exists
184
- 2. **Read existing notes** — `obsidian read file="Note"` to understand what's already captured
185
- 3. **Create with frontmatter** — always include proper YAML frontmatter when creating:
186
- ```
187
- obsidian create name="New Note" content='---
188
- title: "New Note"
189
- note_type: fleeting
190
- domain: YourDomain
191
- date: YYYY-MM-DD
192
- tags: [relevant-tags]
193
- ---
194
-
195
- # New Note
196
-
197
- Content here...
198
- '
199
- ```
200
- 4. **Link to existing notes** — use `[[wikilink]]` syntax to connect new notes to existing ones
201
- 5. **Use `/weave` after bulk creation** — to enrich and connect the new notes to the graph
202
- ```
203
-
204
- **Footer**
205
- ```markdown
206
- ---
207
- *Generated by /wiki skill*
208
- ```
209
-
210
- ### Step 6: Report
211
-
212
- ```
213
- Wiki index generated:
214
- - INDEX.base: created/updated at vault root
215
- - Notes indexed: N
216
- - Topics: M (by domain)
217
- - AGENTS.md: updated with new counts
218
- ```
219
-
220
- Suggest the user open `INDEX.base` in Obsidian to view the knowledge graph in table or card view.
221
-
222
- ## Important Guidelines
223
-
224
- - **INDEX.base is a query, not static content** — it dynamically displays notes based on frontmatter. The file itself only contains the query configuration.
225
- - **Only index notes with `note_type`** — notes without this field are not yet processed by `/weave` and should not appear in the index.
226
- - **Preserve custom views** — if the user has added custom views to `INDEX.base`, merge new views rather than overwriting.
227
- - **Idempotent** — running `/wiki` multiple times should produce the same result without duplication.