@jayjiang/byoao 2.0.7 → 2.0.9
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/__tests__/plugin-config.test.js +11 -0
- package/dist/__tests__/plugin-config.test.js.map +1 -1
- package/dist/assets/obsidian-skills/obsidian-cli.md +7 -0
- package/dist/assets/presets/common/AGENTS.md.hbs +5 -5
- package/dist/assets/presets/common/INDEX.base.example +136 -0
- package/dist/assets/presets/common/Start Here.md.hbs +1 -1
- package/dist/assets/presets/pm-tpm/preset.json +1 -0
- package/dist/assets/skills/ask/SKILL.md +47 -10
- package/dist/assets/skills/connect/SKILL.md +1 -1
- package/dist/assets/skills/cook/SKILL.md +2 -2
- package/dist/assets/skills/diagnose/SKILL.md +1 -1
- package/dist/assets/skills/ideas/SKILL.md +2 -2
- package/dist/assets/skills/trace/SKILL.md +1 -1
- package/dist/assets/skills/wiki/SKILL.md +50 -57
- package/dist/cli/cli-program.js +52 -15
- package/dist/cli/cli-program.js.map +1 -1
- package/dist/e2e/cli-init.e2e.test.js +92 -0
- package/dist/e2e/cli-init.e2e.test.js.map +1 -0
- package/dist/hooks/idle-suggestions.js +1 -1
- package/dist/hooks/idle-suggestions.js.map +1 -1
- package/dist/index.js +213 -171
- package/dist/plugin-config.js +4 -0
- package/dist/plugin-config.js.map +1 -1
- package/dist/tools/init-vault.js +1 -1
- package/dist/tools/init-vault.js.map +1 -1
- package/dist/vault/__tests__/create.test.js +4 -1
- package/dist/vault/__tests__/create.test.js.map +1 -1
- package/dist/vault/__tests__/doctor.test.js +8 -0
- package/dist/vault/__tests__/doctor.test.js.map +1 -1
- package/dist/vault/__tests__/index-base-example.test.js +31 -0
- package/dist/vault/__tests__/index-base-example.test.js.map +1 -0
- package/dist/vault/__tests__/mcp.test.js +1 -0
- package/dist/vault/__tests__/mcp.test.js.map +1 -1
- package/dist/vault/__tests__/obsidian-plugins.test.js +1 -0
- package/dist/vault/__tests__/obsidian-plugins.test.js.map +1 -1
- package/dist/vault/__tests__/preset-init-filter.test.js +18 -0
- package/dist/vault/__tests__/preset-init-filter.test.js.map +1 -0
- package/dist/vault/create.js +4 -0
- package/dist/vault/create.js.map +1 -1
- package/dist/vault/doctor.js +11 -0
- package/dist/vault/doctor.js.map +1 -1
- package/dist/vault/index-base-example.js +19 -0
- package/dist/vault/index-base-example.js.map +1 -0
- package/dist/vault/manifest.js +1 -1
- package/dist/vault/preset.js +18 -2
- package/dist/vault/preset.js.map +1 -1
- package/dist/vault/self-update.js +1 -1
- package/dist/vault/upgrade.js +3 -0
- package/dist/vault/upgrade.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/obsidian-skills/obsidian-cli.md +7 -0
- package/src/assets/presets/common/AGENTS.md.hbs +5 -5
- package/src/assets/presets/common/INDEX.base.example +136 -0
- package/src/assets/presets/common/Start Here.md.hbs +1 -1
- package/src/assets/presets/pm-tpm/preset.json +1 -0
- package/src/skills/ask/SKILL.md +47 -10
- package/src/skills/connect/SKILL.md +1 -1
- package/src/skills/cook/SKILL.md +2 -2
- package/src/skills/diagnose/SKILL.md +1 -1
- package/src/skills/ideas/SKILL.md +2 -2
- package/src/skills/trace/SKILL.md +1 -1
- package/src/skills/wiki/SKILL.md +50 -57
package/src/skills/wiki/SKILL.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wiki
|
|
3
3
|
description: >
|
|
4
|
-
Generate and maintain INDEX.base — the
|
|
5
|
-
entity, concept, comparison, query). Uses Obsidian
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"rebuild INDEX.base", or wants
|
|
4
|
+
Generate and maintain INDEX.base — the Obsidian Bases wiki index for v2 agent pages
|
|
5
|
+
(type: entity, concept, comparison, query). Uses Obsidian CLI to inventory pages and
|
|
6
|
+
SCHEMA.md for taxonomy; agents retrieve via the same property/search graph the Base
|
|
7
|
+
evaluates in the UI. Use when the user says "update the index", "refresh the knowledge map",
|
|
8
|
+
"show me the wiki", "what's in the knowledge base", "rebuild INDEX.base", or wants the
|
|
9
|
+
current compiled knowledge overview.
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# /wiki — Knowledge Map
|
|
@@ -14,7 +15,13 @@ description: >
|
|
|
14
15
|
|
|
15
16
|
## Purpose
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
**`INDEX.base` is the vault wiki index.** In Obsidian, Bases runs a live query and renders each matching note as a row with rich metadata (frontmatter fields, paths, backlinks, dates — whatever columns you configure). That dynamic association model **is** the index; do not duplicate it with a separate static markdown catalog.
|
|
19
|
+
|
|
20
|
+
**Preferred vs fallback:** **Bases + `INDEX.base`** is the preferred index. A **markdown outline in chat** (below) is only a **fallback** when the user has no Bases / no `INDEX.base` (e.g. core plugin off, or vault not yet opened in Obsidian) — it is not a second on-disk index file.
|
|
21
|
+
|
|
22
|
+
For **CLI and AI**, there is no separate index file to maintain beyond `INDEX.base`: use **`obsidian properties`**, **`obsidian search`**, **`obsidian tags`**, and **`obsidian backlinks`** to traverse the same knowledge the Base surfaces. Run `obsidian help` for the latest commands.
|
|
23
|
+
|
|
24
|
+
`SCHEMA.md` defines tag taxonomy when summarizing or grouping entries.
|
|
18
25
|
|
|
19
26
|
## Process
|
|
20
27
|
|
|
@@ -34,9 +41,19 @@ obsidian read file="SCHEMA.md"
|
|
|
34
41
|
|
|
35
42
|
Understand the current tag taxonomy, domain definitions, and page conventions.
|
|
36
43
|
|
|
37
|
-
### Step 3:
|
|
44
|
+
### Step 3: Index source (Bases first, markdown outline as fallback)
|
|
45
|
+
|
|
46
|
+
#### Step 3a — Bases / `INDEX.base` (preferred)
|
|
47
|
+
|
|
48
|
+
1. If the vault has no **`INDEX.base`** at the root, install the template: copy **`INDEX.base.example`** from the BYOAO package to **`INDEX.base`** (same directory as `AGENTS.md`). **`byoao init`** / **`byoao upgrade`** already perform this copy when the file is missing — only copy manually if the user skipped init or removed the file.
|
|
49
|
+
- **Repo path:** `byoao/src/assets/presets/common/INDEX.base.example`
|
|
50
|
+
- **After `npm install`:** `node_modules/@jayjiang/byoao/src/assets/presets/common/INDEX.base.example`
|
|
51
|
+
- **Shell (from vault root, adjust source path):** `cp /path/to/INDEX.base.example ./INDEX.base`
|
|
52
|
+
2. Ask the user to open **`INDEX.base`** in Obsidian (Bases core plugin on). If YAML errors appear, fix quoting or formulas per the bundled **obsidian-bases** skill.
|
|
53
|
+
|
|
54
|
+
#### Step 3b — CLI inventory (always useful; also fallback summary)
|
|
38
55
|
|
|
39
|
-
|
|
56
|
+
Run:
|
|
40
57
|
|
|
41
58
|
```bash
|
|
42
59
|
obsidian properties type=entity
|
|
@@ -46,73 +63,49 @@ obsidian properties type=query
|
|
|
46
63
|
```
|
|
47
64
|
|
|
48
65
|
For each type, compile entries with:
|
|
66
|
+
|
|
49
67
|
- Page name (as wikilink)
|
|
50
68
|
- Title from frontmatter
|
|
51
69
|
- Brief summary (from content's first paragraph or definition section)
|
|
52
|
-
- Tags
|
|
53
|
-
|
|
54
|
-
Format by section:
|
|
70
|
+
- Tags, domain, `updated` — the same dimensions Bases can show as columns
|
|
55
71
|
|
|
56
|
-
|
|
57
|
-
# Knowledge Index
|
|
72
|
+
**If Bases is unavailable:** Present the inventory in your reply as a structured markdown outline (`# Knowledge Index` → `## Entities` → bullet list, etc.). **Do not** save that outline as a permanent `INDEX.md` unless the user explicitly asks. When the user enables Bases later, **`INDEX.base`** remains the canonical index.
|
|
58
73
|
|
|
59
|
-
|
|
60
|
-
- [[feature-a]] — Response time monitoring feature (tags: monitoring, backend)
|
|
61
|
-
- [[zhang-san]] — Senior engineer on Feature A team (tags: team, engineering)
|
|
74
|
+
### Step 4: Ensure `INDEX.base` matches that scope
|
|
62
75
|
|
|
63
|
-
|
|
64
|
-
- [[response-time-metrics]] — Why median replaced avg for trigger calculation (tags: metrics, decisions)
|
|
65
|
-
- [[search-trigger-rules]] — Search trigger rule design principles (tags: search, configuration)
|
|
76
|
+
Verify or refine the Base at vault root. Prefer a **rich Bases layout** (global scope + formulas + multiple views) over four minimal tables with only 2–4 columns.
|
|
66
77
|
|
|
67
|
-
|
|
68
|
-
- [[avg-vs-median-for-trigger]] — Side-by-side analysis of avg vs median as trigger metrics (tags: metrics, decisions)
|
|
78
|
+
**Reference template:** **`INDEX.base.example`** under preset `common/` (`byoao/src/assets/presets/common/INDEX.base.example` in the repo; `node_modules/@jayjiang/byoao/src/assets/presets/common/INDEX.base.example` when installed).
|
|
69
79
|
|
|
70
|
-
|
|
71
|
-
- [[why-did-we-choose-median]] — "Why did we choose median over avg?" — detailed answer (tags: metrics, history)
|
|
72
|
-
```
|
|
80
|
+
**Division of responsibilities — `INDEX.base` vs CLI**
|
|
73
81
|
|
|
74
|
-
|
|
82
|
+
| Layer | Role |
|
|
83
|
+
|-------|------|
|
|
84
|
+
| **`INDEX.base` (Obsidian)** | Live query, grouping, formulas (staleness, backlink count, labels), column display names — **human** scanning and **definition of scope** (which folders / types count as “compiled wiki”). |
|
|
85
|
+
| **Obsidian CLI** | **Does not** evaluate Base formulas. Agents **read** `INDEX.base` to learn filters/paths, then use **`obsidian properties`** (by `type`, etc.), **`obsidian search`**, **`obsidian tags`**, **`obsidian backlinks`** to list and read notes in the **same** scope. |
|
|
75
86
|
|
|
76
|
-
|
|
87
|
+
1. **Global scope (recommended)** — Top-level **`filters`** with `or:` so every view inherits the same universe, e.g. `file.inFolder("entities")`, … `file.inFolder("queries")`. Avoid relying only on per-view `type == "entity"` without folder scope. Search-style alternative: `path:entities/ OR …` if your Bases version supports it.
|
|
77
88
|
|
|
78
|
-
|
|
79
|
-
2. The query filters by `type` frontmatter field
|
|
80
|
-
3. Results are grouped by type
|
|
89
|
+
2. **Formulas (optional but valuable)** — e.g. `type_label`, `days_since_update` from frontmatter `updated`, `backlink_count` from `file.backlinks.length` (confirm syntax for your Obsidian version).
|
|
81
90
|
|
|
82
|
-
|
|
83
|
-
- Open Obsidian → Bases → Create new base
|
|
84
|
-
- Name it "Knowledge Index"
|
|
85
|
-
- Query: `path:entities/ OR path:concepts/ OR path:comparisons/ OR path:queries/`
|
|
86
|
-
- Group by: `type`
|
|
91
|
+
3. **`properties` + `displayName`** — Include **`file.name`** (e.g. displayName `"Name"`) plus `title`, `domain`, `tags`, `updated`, `status`, and `formula.*` fields.
|
|
87
92
|
|
|
88
|
-
|
|
93
|
+
4. **Views (suggested six)** — All Pages (`groupBy: type`); Entities / Concepts (`type` filter + `groupBy: domain`); Comparisons; Queries; **Recently Updated** — use **`limit`** and put **`updated` first in `order`**; **do not** `groupBy` raw `updated` (timestamps are too granular). Optional **`summaries`** (e.g. average of `formula.backlink_count` on wide tables).
|
|
89
94
|
|
|
90
|
-
|
|
95
|
+
5. **YAML** — Keep formula strings consistently quoted; see comments at the top of **`INDEX.base.example`**.
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
# Knowledge Index
|
|
97
|
+
If the Base doesn't exist or is misconfigured, guide the user to create it in Obsidian or copy **`INDEX.base.example`** as above.
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
**Reading via CLI:** `obsidian read file="INDEX.base"` returns the **on-disk definition**; it **defines** the live index Obsidian evaluates — use it to align CLI queries with paths and properties.
|
|
96
100
|
|
|
97
|
-
|
|
101
|
+
### Step 5: Present the index to the user
|
|
98
102
|
|
|
99
|
-
|
|
100
|
-
- backend: N pages
|
|
101
|
-
- frontend: M pages
|
|
102
|
-
- infrastructure: K pages
|
|
103
|
+
Show a markdown summary in your reply (totals, sections by type, sample lines) — **chat output**; not a substitute for **`INDEX.base`** when Bases is enabled.
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
- [[page-name]] — N inbound links
|
|
106
|
-
- [[page-name]] — M inbound links
|
|
107
|
-
|
|
108
|
-
## Recently Updated
|
|
109
|
-
- [[page-name]] — updated YYYY-MM-DD
|
|
110
|
-
- [[page-name]] — updated YYYY-MM-DD
|
|
111
|
-
```
|
|
105
|
+
### Step 6: Suggest gaps
|
|
112
106
|
|
|
113
|
-
|
|
107
|
+
Based on the inventory, identify knowledge gaps:
|
|
114
108
|
|
|
115
|
-
Based on the index, identify knowledge gaps:
|
|
116
109
|
- Entity mentioned in multiple concepts but no entity page exists
|
|
117
110
|
- Concept referenced in entity pages but no concept page exists
|
|
118
111
|
- Domains with very few pages (under-represented areas)
|
|
@@ -120,8 +113,8 @@ Based on the index, identify knowledge gaps:
|
|
|
120
113
|
|
|
121
114
|
## Key Principles
|
|
122
115
|
|
|
123
|
-
- **INDEX.base
|
|
116
|
+
- **One index on disk:** **`INDEX.base`** when Bases is on; use **`INDEX.base.example`** as the default layout. Chat markdown is fallback only.
|
|
124
117
|
- **Summary quality.** Each entry's one-line summary should be genuinely informative, not just the page title repeated.
|
|
125
|
-
- **Navigation first.**
|
|
118
|
+
- **Navigation first.** Structure the Base and your summary for scanning, not exhaustive prose.
|
|
126
119
|
- **Obsidian is first workbench.** All note operations go through Obsidian CLI.
|
|
127
|
-
- **Agent pages only
|
|
120
|
+
- **Agent pages only** in this index: `entities/`, `concepts/`, `comparisons/`, `queries/` — not arbitrary user notes.
|