@jayjiang/byoao 1.1.2 → 2.0.0

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 (136) 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/dist/assets/skills/ask.md +28 -27
  11. package/dist/assets/skills/challenge.md +79 -121
  12. package/dist/assets/skills/connect.md +75 -163
  13. package/dist/assets/skills/cook.md +167 -0
  14. package/dist/assets/skills/diagnose.md +102 -43
  15. package/dist/assets/skills/drift.md +64 -165
  16. package/dist/assets/skills/health.md +63 -0
  17. package/dist/assets/skills/ideas.md +11 -10
  18. package/dist/assets/skills/organize.md +56 -155
  19. package/dist/assets/skills/prep.md +63 -0
  20. package/dist/assets/skills/trace.md +75 -90
  21. package/dist/assets/skills/wiki.md +77 -178
  22. package/dist/cli/cli-program.js +17 -14
  23. package/dist/cli/cli-program.js.map +1 -1
  24. package/dist/cli/installer.js +10 -4
  25. package/dist/cli/installer.js.map +1 -1
  26. package/dist/hooks/idle-suggestions.js +4 -4
  27. package/dist/hooks/idle-suggestions.js.map +1 -1
  28. package/dist/hooks/system-transform.js +35 -1
  29. package/dist/hooks/system-transform.js.map +1 -1
  30. package/dist/index.js +395 -623
  31. package/dist/index.js.map +1 -1
  32. package/dist/plugin-config.js +6 -32
  33. package/dist/plugin-config.js.map +1 -1
  34. package/dist/tools/init-vault.js +8 -38
  35. package/dist/tools/init-vault.js.map +1 -1
  36. package/dist/tools/vault-doctor.js +1 -1
  37. package/dist/tools/vault-doctor.js.map +1 -1
  38. package/dist/tools/vault-status.js +1 -1
  39. package/dist/tools/vault-status.js.map +1 -1
  40. package/dist/vault/__tests__/create.test.js +47 -115
  41. package/dist/vault/__tests__/create.test.js.map +1 -1
  42. package/dist/vault/__tests__/doctor.test.js +14 -2
  43. package/dist/vault/__tests__/doctor.test.js.map +1 -1
  44. package/dist/vault/__tests__/manifest.test.js +2 -2
  45. package/dist/vault/__tests__/manifest.test.js.map +1 -1
  46. package/dist/vault/__tests__/status.test.js +12 -0
  47. package/dist/vault/__tests__/status.test.js.map +1 -1
  48. package/dist/vault/__tests__/upgrade.test.js +3 -3
  49. package/dist/vault/__tests__/upgrade.test.js.map +1 -1
  50. package/dist/vault/create.js +75 -188
  51. package/dist/vault/create.js.map +1 -1
  52. package/dist/vault/doctor.js +49 -0
  53. package/dist/vault/doctor.js.map +1 -1
  54. package/dist/vault/manifest.js +1 -1
  55. package/dist/vault/preset.js +10 -4
  56. package/dist/vault/preset.js.map +1 -1
  57. package/dist/vault/self-update.js +1 -1
  58. package/dist/vault/status.js +24 -0
  59. package/dist/vault/status.js.map +1 -1
  60. package/dist/vault/upgrade.js +120 -16
  61. package/dist/vault/upgrade.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/assets/obsidian-skills/byoao-conventions.md +9 -6
  64. package/src/assets/obsidian-skills/vault-thinking.md +6 -5
  65. package/src/assets/presets/common/AGENTS.md.hbs +23 -19
  66. package/src/assets/presets/common/SCHEMA.md.hbs +57 -0
  67. package/src/assets/presets/common/Start Here.md.hbs +29 -40
  68. package/src/assets/presets/minimal/preset.json +3 -3
  69. package/src/assets/presets/pm-tpm/preset.json +2 -2
  70. package/src/skills/ask.md +28 -27
  71. package/src/skills/challenge.md +79 -121
  72. package/src/skills/connect.md +75 -163
  73. package/src/skills/cook.md +167 -0
  74. package/src/skills/diagnose.md +102 -43
  75. package/src/skills/drift.md +64 -165
  76. package/src/skills/health.md +63 -0
  77. package/src/skills/ideas.md +11 -10
  78. package/src/skills/organize.md +56 -155
  79. package/src/skills/prep.md +63 -0
  80. package/src/skills/trace.md +75 -90
  81. package/src/skills/wiki.md +77 -178
  82. package/dist/assets/presets/common/Glossary.md.hbs +0 -16
  83. package/dist/assets/presets/common/obsidian/daily-notes.json +0 -5
  84. package/dist/assets/presets/common/obsidian/templates.json +0 -3
  85. package/dist/assets/presets/common/templates/Daily Note.md +0 -19
  86. package/dist/assets/presets/common/templates/Decision Record.md +0 -32
  87. package/dist/assets/presets/common/templates/Investigation.md +0 -34
  88. package/dist/assets/presets/common/templates/Meeting Notes.md +0 -25
  89. package/dist/assets/skills/emerge.md +0 -168
  90. package/dist/assets/skills/weave.md +0 -287
  91. package/dist/tools/add-glossary-term.js +0 -21
  92. package/dist/tools/add-glossary-term.js.map +0 -1
  93. package/dist/tools/add-person.js +0 -21
  94. package/dist/tools/add-person.js.map +0 -1
  95. package/dist/tools/add-project.js +0 -24
  96. package/dist/tools/add-project.js.map +0 -1
  97. package/dist/tools/graph-health.js +0 -25
  98. package/dist/tools/graph-health.js.map +0 -1
  99. package/dist/tools/note-read.js +0 -19
  100. package/dist/tools/note-read.js.map +0 -1
  101. package/dist/tools/search-vault.js +0 -22
  102. package/dist/tools/search-vault.js.map +0 -1
  103. package/dist/vault/__tests__/glossary.test.js +0 -68
  104. package/dist/vault/__tests__/glossary.test.js.map +0 -1
  105. package/dist/vault/__tests__/graph-health.test.js +0 -102
  106. package/dist/vault/__tests__/graph-health.test.js.map +0 -1
  107. package/dist/vault/__tests__/member.test.js +0 -85
  108. package/dist/vault/__tests__/member.test.js.map +0 -1
  109. package/dist/vault/__tests__/note-read.test.js +0 -71
  110. package/dist/vault/__tests__/note-read.test.js.map +0 -1
  111. package/dist/vault/__tests__/obsidian-cli.test.js +0 -108
  112. package/dist/vault/__tests__/obsidian-cli.test.js.map +0 -1
  113. package/dist/vault/__tests__/search-vault.test.js +0 -93
  114. package/dist/vault/__tests__/search-vault.test.js.map +0 -1
  115. package/dist/vault/glossary.js +0 -27
  116. package/dist/vault/glossary.js.map +0 -1
  117. package/dist/vault/graph-health.js +0 -83
  118. package/dist/vault/graph-health.js.map +0 -1
  119. package/dist/vault/member.js +0 -67
  120. package/dist/vault/member.js.map +0 -1
  121. package/dist/vault/note-read.js +0 -70
  122. package/dist/vault/note-read.js.map +0 -1
  123. package/dist/vault/project.js +0 -68
  124. package/dist/vault/project.js.map +0 -1
  125. package/dist/vault/retrieval-types.js +0 -5
  126. package/dist/vault/retrieval-types.js.map +0 -1
  127. package/dist/vault/search-vault.js +0 -87
  128. package/dist/vault/search-vault.js.map +0 -1
  129. package/src/assets/presets/common/obsidian/daily-notes.json +0 -5
  130. package/src/assets/presets/common/obsidian/templates.json +0 -3
  131. package/src/assets/presets/common/templates/Daily Note.md +0 -19
  132. package/src/assets/presets/common/templates/Decision Record.md +0 -32
  133. package/src/assets/presets/common/templates/Investigation.md +0 -34
  134. package/src/assets/presets/common/templates/Meeting Notes.md +0 -25
  135. package/src/skills/emerge.md +0 -168
  136. package/src/skills/weave.md +0 -287
@@ -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.