@jayjiang/byoao 1.1.0 → 1.1.2
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.
- package/dist/assets/obsidian-skills/byoao-conventions.md +103 -0
- package/dist/assets/obsidian-skills/defuddle.md +41 -0
- package/dist/assets/obsidian-skills/json-canvas.md +244 -0
- package/dist/assets/obsidian-skills/obsidian-bases.md +497 -0
- package/dist/assets/obsidian-skills/obsidian-cli.md +106 -0
- package/dist/assets/obsidian-skills/obsidian-markdown.md +196 -0
- package/dist/assets/obsidian-skills/vault-thinking.md +40 -0
- package/{src/assets/presets/common/AGENT.md.hbs → dist/assets/presets/common/AGENTS.md.hbs} +11 -15
- package/dist/assets/presets/common/Start Here.md.hbs +137 -0
- package/dist/assets/presets/common/obsidian/core-plugins.json +33 -0
- package/dist/assets/presets/common/obsidian/daily-notes.json +5 -0
- package/dist/assets/presets/common/obsidian/templates.json +3 -0
- package/dist/assets/presets/common/templates/Daily Note.md +19 -0
- package/dist/assets/presets/common/templates/Decision Record.md +32 -0
- package/dist/assets/presets/common/templates/Investigation.md +34 -0
- package/dist/assets/presets/common/templates/Meeting Notes.md +25 -0
- package/dist/assets/presets/minimal/preset.json +28 -0
- package/dist/assets/presets/pm-tpm/agent-section.hbs +15 -0
- package/dist/assets/presets/pm-tpm/preset.json +43 -0
- package/dist/assets/presets/pm-tpm/templates/Feature Doc.md +45 -0
- package/dist/assets/presets/pm-tpm/templates/Sprint Handoff.md +38 -0
- package/dist/assets/skills/ask.md +132 -0
- package/dist/assets/skills/challenge.md +174 -0
- package/dist/assets/skills/connect.md +213 -0
- package/dist/assets/skills/diagnose.md +72 -0
- package/dist/assets/skills/drift.md +223 -0
- package/dist/assets/skills/emerge.md +168 -0
- package/dist/assets/skills/ideas.md +172 -0
- package/dist/assets/skills/organize.md +206 -0
- package/dist/assets/skills/trace.md +156 -0
- package/dist/assets/skills/weave.md +287 -0
- package/dist/assets/skills/wiki.md +227 -0
- package/dist/cli/cli-program.js +1 -1
- package/dist/cli/cli-program.js.map +1 -1
- package/dist/cli/installer.js +37 -2
- package/dist/cli/installer.js.map +1 -1
- package/dist/hooks/__tests__/system-transform.test.js +47 -29
- package/dist/hooks/__tests__/system-transform.test.js.map +1 -1
- package/dist/hooks/system-transform.js +2 -113
- package/dist/hooks/system-transform.js.map +1 -1
- package/dist/index.js +162 -482
- package/dist/index.js.map +1 -1
- package/dist/lib/cjs-modules.js +4 -1
- package/dist/lib/cjs-modules.js.map +1 -1
- package/dist/tools/add-person.js +1 -1
- package/dist/tools/add-person.js.map +1 -1
- package/dist/tools/add-project.js +1 -1
- package/dist/tools/add-project.js.map +1 -1
- package/dist/tools/init-vault.js +1 -1
- package/dist/tools/init-vault.js.map +1 -1
- package/dist/tools/vault-doctor.js +1 -1
- package/dist/tools/vault-doctor.js.map +1 -1
- package/dist/vault/__tests__/create.test.js +23 -23
- package/dist/vault/__tests__/create.test.js.map +1 -1
- package/dist/vault/__tests__/obsidian-cli.test.js +108 -0
- package/dist/vault/__tests__/obsidian-cli.test.js.map +1 -0
- package/dist/vault/__tests__/status.test.js +1 -8
- package/dist/vault/__tests__/status.test.js.map +1 -1
- package/dist/vault/__tests__/vault-detect.test.js +1 -13
- package/dist/vault/__tests__/vault-detect.test.js.map +1 -1
- package/dist/vault/create.js +23 -64
- package/dist/vault/create.js.map +1 -1
- package/dist/vault/doctor.js +15 -6
- package/dist/vault/doctor.js.map +1 -1
- package/dist/vault/manifest.js +1 -1
- package/dist/vault/member.js +2 -2
- package/dist/vault/member.js.map +1 -1
- package/dist/vault/obsidian-cli.js +28 -5
- package/dist/vault/obsidian-cli.js.map +1 -1
- package/dist/vault/project.js +2 -2
- package/dist/vault/project.js.map +1 -1
- package/dist/vault/self-update.js +1 -1
- package/dist/vault/status.js +3 -5
- package/dist/vault/status.js.map +1 -1
- package/dist/vault/upgrade.js +7 -2
- package/dist/vault/upgrade.js.map +1 -1
- package/dist/vault/vault-detect.js +4 -5
- package/dist/vault/vault-detect.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/obsidian-skills/byoao-conventions.md +28 -55
- package/src/assets/obsidian-skills/vault-thinking.md +1 -1
- package/src/assets/presets/common/AGENTS.md.hbs +25 -0
- package/src/assets/presets/common/Start Here.md.hbs +2 -2
- package/src/skills/ask.md +132 -0
- package/src/skills/challenge.md +8 -2
- package/src/skills/connect.md +8 -1
- package/src/skills/diagnose.md +12 -13
- package/src/skills/drift.md +8 -2
- package/src/skills/emerge.md +8 -1
- package/src/skills/ideas.md +9 -3
- package/src/skills/organize.md +3 -4
- package/src/skills/trace.md +10 -3
- package/src/skills/weave.md +84 -79
- package/src/skills/wiki.md +227 -0
- /package/{src → dist}/assets/presets/common/Glossary.md.hbs +0 -0
package/src/skills/weave.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: weave
|
|
3
|
-
description: Scan vault notes, enrich with frontmatter + wikilinks,
|
|
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
4
|
---
|
|
5
5
|
|
|
6
6
|
# /weave — Connect Your Notes
|
|
7
7
|
|
|
8
|
-
You are a knowledge graph builder. Your job is to scan vault notes, enrich them with frontmatter and wikilinks,
|
|
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
9
|
|
|
10
10
|
## Prerequisites Check
|
|
11
11
|
|
|
@@ -44,8 +44,8 @@ When scanning files, skip:
|
|
|
44
44
|
| `node_modules/` | Dependencies |
|
|
45
45
|
| `.env`, `credentials.*`, `*.key` | Sensitive files |
|
|
46
46
|
| Binary files (images, PDFs, etc.) | Cannot add frontmatter/wikilinks |
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
47
|
+
| `AGENTS.md` | BYOAO-managed file |
|
|
48
|
+
| `*.base` | Obsidian Base files — not user content notes |
|
|
49
49
|
|
|
50
50
|
Report skipped non-markdown files at the end: "Skipped N non-markdown files".
|
|
51
51
|
|
|
@@ -53,15 +53,7 @@ Report skipped non-markdown files at the end: "Skipped N non-markdown files".
|
|
|
53
53
|
|
|
54
54
|
Execute these steps in order. Be explicit about each tool call — different LLM providers must execute this consistently.
|
|
55
55
|
|
|
56
|
-
### Step 1:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
obsidian read "Knowledge/Glossary.md"
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Parse the Glossary table. Extract all existing terms — these are automatic wikilink candidates for every file you scan.
|
|
63
|
-
|
|
64
|
-
### Step 2: Build Vault Map
|
|
56
|
+
### Step 1: Build Vault Map
|
|
65
57
|
|
|
66
58
|
```bash
|
|
67
59
|
obsidian list
|
|
@@ -75,51 +67,63 @@ obsidian properties sort=count counts
|
|
|
75
67
|
|
|
76
68
|
This reveals the vault's structure — which properties are used, how many notes have frontmatter.
|
|
77
69
|
|
|
78
|
-
### Step
|
|
70
|
+
### Step 2: Scan Target Files
|
|
79
71
|
|
|
80
72
|
For each markdown file in scope (respecting exclusion rules):
|
|
81
73
|
|
|
82
|
-
####
|
|
74
|
+
#### 2a. Read the file
|
|
83
75
|
|
|
84
76
|
```bash
|
|
85
77
|
obsidian read "<note name>"
|
|
86
78
|
```
|
|
87
79
|
|
|
88
|
-
####
|
|
80
|
+
#### 2b. Identify entities
|
|
81
|
+
|
|
82
|
+
Scan the content for concepts using semantic understanding (not a predefined list):
|
|
89
83
|
|
|
90
|
-
Scan the content for:
|
|
91
84
|
- **People names** — proper nouns that appear to be people
|
|
92
85
|
- **Project/product names** — capitalized multi-word phrases that recur
|
|
93
86
|
- **Domain concepts** — technical terms, acronyms, recurring themes
|
|
94
87
|
- **Tool/system names** — software, services, platforms mentioned
|
|
95
88
|
- **Dates and events** — meetings, deadlines, milestones
|
|
89
|
+
- **Methodologies/frameworks** — named approaches like "Zettelkasten", "Agile", etc.
|
|
96
90
|
|
|
97
|
-
####
|
|
91
|
+
#### 2c. Cross-reference against existing notes
|
|
98
92
|
|
|
99
93
|
For each entity found:
|
|
100
|
-
1. Is it already a Glossary term? → Mark as wikilink candidate
|
|
101
|
-
2. Does a vault note with this name exist? → Mark as wikilink candidate
|
|
102
|
-
3. Is it a new, unrecognized entity? → Track for Glossary suggestion (Step 5)
|
|
103
94
|
|
|
104
|
-
|
|
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
|
|
105
99
|
|
|
106
100
|
If the file has no frontmatter, or has incomplete frontmatter, propose additions:
|
|
107
101
|
|
|
108
102
|
```yaml
|
|
109
103
|
---
|
|
110
104
|
title: "<inferred from content or filename>"
|
|
105
|
+
note_type: <fleeting | literature | permanent>
|
|
111
106
|
type: "<inferred: meeting, idea, reference, daily, project, person, etc>"
|
|
112
107
|
date: YYYY-MM-DD
|
|
113
108
|
domain: "<knowledge area: analytics, infrastructure, design, etc>"
|
|
114
109
|
references:
|
|
115
110
|
- "[[Related Note]]"
|
|
116
|
-
- "[[Glossary]]"
|
|
117
111
|
tags: [<relevant tags>]
|
|
118
112
|
status: <draft | active | completed | archived>
|
|
119
113
|
source: "<URL if this note originates from a cloud document>"
|
|
120
114
|
---
|
|
121
115
|
```
|
|
122
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
|
+
|
|
123
127
|
**Date resolution (mandatory — never leave empty):**
|
|
124
128
|
|
|
125
129
|
1. Extract from content — explicit dates in the text, meeting dates, file name patterns (e.g. `2026-03-27-meeting.md`)
|
|
@@ -146,12 +150,13 @@ source: "<URL if this note originates from a cloud document>"
|
|
|
146
150
|
- **Merge arrays** — if file has `tags: [meeting]` and you suggest `tags: [meeting, migration]`, result is `[meeting, migration]`
|
|
147
151
|
- **Warn on conflicts** — if existing value seems wrong, note it but don't change it
|
|
148
152
|
|
|
149
|
-
####
|
|
153
|
+
#### 2e. Propose wikilinks
|
|
150
154
|
|
|
151
155
|
Convert plain text mentions to `[[wikilinks]]`:
|
|
152
|
-
|
|
156
|
+
|
|
153
157
|
- Existing note names → `[[Note Name]]`
|
|
154
158
|
- People → `[[Person Name]]`
|
|
159
|
+
- Domain concepts → `[[Concept Name]]`
|
|
155
160
|
|
|
156
161
|
Rules:
|
|
157
162
|
- Only link the **first occurrence** of each term in a file
|
|
@@ -159,7 +164,7 @@ Rules:
|
|
|
159
164
|
- Don't link common English words even if they happen to match a note name
|
|
160
165
|
- Preserve the original text when the casing differs: `rate limiting` → `[[Rate Limiting|rate limiting]]`
|
|
161
166
|
|
|
162
|
-
### Step
|
|
167
|
+
### Step 3: Backup Before Modification
|
|
163
168
|
|
|
164
169
|
Before modifying any file, create a backup:
|
|
165
170
|
|
|
@@ -170,77 +175,77 @@ cp "<file path>" ".byoao/backups/<timestamp>/<filename>"
|
|
|
170
175
|
|
|
171
176
|
Use the current date-time as the timestamp (e.g., `2026-03-27T20-45`).
|
|
172
177
|
|
|
173
|
-
This is critical for existing folder adoption
|
|
178
|
+
This is critical for existing folder adoption where files are user-created and irreplaceable.
|
|
174
179
|
|
|
175
|
-
### Step
|
|
180
|
+
### Step 4: Apply Changes
|
|
176
181
|
|
|
177
182
|
For each file with proposed changes:
|
|
178
183
|
1. Show the user a summary of proposed changes (frontmatter additions, wikilinks to add)
|
|
179
184
|
2. Wait for confirmation before applying
|
|
180
185
|
3. Apply changes using file edit tools
|
|
181
186
|
|
|
182
|
-
### Step
|
|
183
|
-
|
|
184
|
-
After scanning all files, analyze entity frequency and classify candidates:
|
|
187
|
+
### Step 5: Suggest Permanent Notes
|
|
185
188
|
|
|
186
|
-
|
|
187
|
-
unambiguous definition (proper nouns, product names, acronyms, technical terms
|
|
188
|
-
with standard meanings). Present as a batch for user review:
|
|
189
|
-
- "'Kafka' mentioned in 8 notes — message streaming platform. Add to Glossary?"
|
|
189
|
+
After scanning all files, analyze concept frequency across the vault:
|
|
190
190
|
|
|
191
|
-
**
|
|
192
|
-
|
|
193
|
-
-
|
|
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
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
Do not suggest these.
|
|
196
|
+
For each candidate, present to the user:
|
|
197
197
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
**Auto-graduation suggestions:**
|
|
202
|
-
- A Glossary term is referenced by 5+ notes
|
|
203
|
-
- Suggest creating a standalone concept note in `Knowledge/`
|
|
204
|
-
- The concept note gets auto-generated frontmatter:
|
|
205
|
-
```yaml
|
|
206
|
-
domain: <from Glossary>
|
|
207
|
-
references:
|
|
208
|
-
- "[[note1]]"
|
|
209
|
-
- "[[note2]]"
|
|
210
|
-
```
|
|
211
|
-
- Update the Glossary entry to link to the concept note
|
|
198
|
+
```markdown
|
|
199
|
+
### Permanent Note Candidate: [[Concept Name]]
|
|
212
200
|
|
|
213
|
-
|
|
201
|
+
**Appears in:** [[Note A]], [[Note B]], [[Note C]]
|
|
214
202
|
|
|
215
|
-
|
|
216
|
-
- "12 files mention 'Payment Migration' but no note exists — create it?"
|
|
217
|
-
- Hub notes aggregate references and provide a landing page for the topic
|
|
218
|
-
- Hub note template:
|
|
203
|
+
**Proposed content:**
|
|
219
204
|
|
|
220
|
-
```markdown
|
|
221
205
|
---
|
|
222
|
-
title: "
|
|
206
|
+
title: "Concept Name"
|
|
207
|
+
note_type: permanent
|
|
223
208
|
type: reference
|
|
224
|
-
|
|
225
|
-
|
|
209
|
+
domain: <inferred from source notes>
|
|
210
|
+
date: <today>
|
|
211
|
+
tags: [<inferred>]
|
|
226
212
|
references:
|
|
227
|
-
- "[[
|
|
228
|
-
- "[[
|
|
229
|
-
tags: [hub]
|
|
230
|
-
status: active
|
|
213
|
+
- "[[Note A]]"
|
|
214
|
+
- "[[Note B]]"
|
|
231
215
|
---
|
|
232
216
|
|
|
233
|
-
#
|
|
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)
|
|
234
232
|
|
|
235
|
-
|
|
233
|
+
Check for notes that contain multiple independent concepts. For each candidate:
|
|
236
234
|
|
|
237
|
-
|
|
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>
|
|
238
242
|
|
|
239
|
-
|
|
240
|
-
- [[note2]] — <brief context>
|
|
243
|
+
Consider splitting these into separate atomic notes for better knowledge graph connectivity.
|
|
241
244
|
```
|
|
242
245
|
|
|
243
|
-
|
|
246
|
+
**Do NOT split automatically.** Only suggest; the user decides.
|
|
247
|
+
|
|
248
|
+
### Step 7: Directory Organization (optional)
|
|
244
249
|
|
|
245
250
|
If the vault has many files in flat or disorganized directories, suggest:
|
|
246
251
|
|
|
@@ -252,7 +257,7 @@ to safely relocate files while automatically updating all links."
|
|
|
252
257
|
Do NOT move files during /weave — directory reorganization is
|
|
253
258
|
a separate step handled by `/organize`.
|
|
254
259
|
|
|
255
|
-
### Step
|
|
260
|
+
### Step 8: Report
|
|
256
261
|
|
|
257
262
|
After all changes are applied, provide a summary:
|
|
258
263
|
|
|
@@ -261,9 +266,8 @@ Weave complete:
|
|
|
261
266
|
- Scanned: N files
|
|
262
267
|
- Enriched: N files (frontmatter + wikilinks)
|
|
263
268
|
- Wikilinks added: N
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
- Concept notes graduated: N
|
|
269
|
+
- Permanent notes created: N
|
|
270
|
+
- Split suggestions: N (pending user review)
|
|
267
271
|
- Orphaned files (no links): N
|
|
268
272
|
- Skipped: N non-markdown files
|
|
269
273
|
- Backups: .byoao/backups/<timestamp>/
|
|
@@ -271,12 +275,13 @@ Weave complete:
|
|
|
271
275
|
|
|
272
276
|
## Single File Mode
|
|
273
277
|
|
|
274
|
-
When `file=` is provided, run the same process but only for that one file. Still read the
|
|
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).
|
|
275
279
|
|
|
276
280
|
## Important Guidelines
|
|
277
281
|
|
|
278
282
|
- **Be conservative**: When in doubt about a wikilink or frontmatter value, skip it. False positives degrade trust.
|
|
279
283
|
- **Ask, don't assume**: Always present changes for user confirmation before applying.
|
|
280
284
|
- **Preserve user content**: Never delete, rewrite, or reorganize existing text. Only add metadata and convert mentions to links.
|
|
281
|
-
- **Domain inference**: Use
|
|
285
|
+
- **Domain inference**: Use existing note domains to infer the domain for new notes. Consistency matters.
|
|
282
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.
|
|
@@ -0,0 +1,227 @@
|
|
|
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.
|
|
File without changes
|