@jayjiang/byoao 2.0.6 → 2.0.8

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 (46) hide show
  1. package/dist/assets/obsidian-skills/obsidian-cli.md +7 -0
  2. package/dist/assets/presets/common/AGENTS.md.hbs +5 -5
  3. package/dist/assets/presets/common/INDEX.base.example +136 -0
  4. package/dist/assets/presets/common/Start Here.md.hbs +1 -1
  5. package/dist/assets/skills/ask/SKILL.md +47 -10
  6. package/dist/assets/skills/connect/SKILL.md +1 -1
  7. package/dist/assets/skills/cook/SKILL.md +2 -2
  8. package/dist/assets/skills/diagnose/SKILL.md +1 -1
  9. package/dist/assets/skills/ideas/SKILL.md +2 -2
  10. package/dist/assets/skills/trace/SKILL.md +1 -1
  11. package/dist/assets/skills/wiki/SKILL.md +50 -57
  12. package/dist/cli/byoao-logo-art.js +12 -0
  13. package/dist/cli/byoao-logo-art.js.map +1 -0
  14. package/dist/cli/logo-bit.js +14 -0
  15. package/dist/cli/logo-bit.js.map +1 -0
  16. package/dist/cli/ui.js +38 -62
  17. package/dist/cli/ui.js.map +1 -1
  18. package/dist/hooks/idle-suggestions.js +1 -1
  19. package/dist/hooks/idle-suggestions.js.map +1 -1
  20. package/dist/index.js +189 -169
  21. package/dist/tools/init-vault.js +1 -1
  22. package/dist/tools/init-vault.js.map +1 -1
  23. package/dist/vault/__tests__/create.test.js +4 -1
  24. package/dist/vault/__tests__/create.test.js.map +1 -1
  25. package/dist/vault/__tests__/index-base-example.test.js +31 -0
  26. package/dist/vault/__tests__/index-base-example.test.js.map +1 -0
  27. package/dist/vault/create.js +4 -0
  28. package/dist/vault/create.js.map +1 -1
  29. package/dist/vault/index-base-example.js +19 -0
  30. package/dist/vault/index-base-example.js.map +1 -0
  31. package/dist/vault/manifest.js +1 -1
  32. package/dist/vault/self-update.js +1 -1
  33. package/dist/vault/upgrade.js +3 -0
  34. package/dist/vault/upgrade.js.map +1 -1
  35. package/package.json +2 -1
  36. package/src/assets/obsidian-skills/obsidian-cli.md +7 -0
  37. package/src/assets/presets/common/AGENTS.md.hbs +5 -5
  38. package/src/assets/presets/common/INDEX.base.example +136 -0
  39. package/src/assets/presets/common/Start Here.md.hbs +1 -1
  40. package/src/skills/ask/SKILL.md +47 -10
  41. package/src/skills/connect/SKILL.md +1 -1
  42. package/src/skills/cook/SKILL.md +2 -2
  43. package/src/skills/diagnose/SKILL.md +1 -1
  44. package/src/skills/ideas/SKILL.md +2 -2
  45. package/src/skills/trace/SKILL.md +1 -1
  46. package/src/skills/wiki/SKILL.md +50 -57
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: ask
3
3
  description: >
4
- Open-ended Q&A against the knowledge base. Agent reads INDEX.base for page discovery
5
- and SCHEMA.md for tag taxonomy, navigates entities/, concepts/, comparisons/, and queries/,
6
- synthesizes answers with citations. Use when the user asks questions about vault content
7
- like "what is X", "why did we decide Y", "explain Z", "what do my notes say about",
8
- "summarize what I know about", or any question that should be answered from accumulated
9
- knowledge rather than general training data.
4
+ Open-ended Q&A against the knowledge base. Uses INDEX.base as the vault Bases wiki index,
5
+ Obsidian CLI (properties, search, tags, backlinks) to traverse the same graph the Base
6
+ shows in Obsidian, SCHEMA.md for taxonomy, then reads and synthesizes with citations.
7
+ Use when the user asks questions about vault content like "what is X", "why did we decide Y",
8
+ "explain Z", "what do my notes say about", "summarize what I know about", or any question
9
+ that should be answered from accumulated knowledge rather than general training data.
10
10
  ---
11
11
 
12
12
  # /ask — Knowledge Q&A
@@ -36,21 +36,56 @@ Identify the key concepts, entities, and intent in the user's question.
36
36
 
37
37
  ### Step 2: Locate Relevant Pages
38
38
 
39
- If `INDEX.base` exists, read it first for page discovery and the compiled knowledge map:
39
+ **Do not delegate this workflow to a generic exploration subagent.** Run the Obsidian CLI steps yourself so searches merge and nothing is skipped.
40
+
41
+ #### 2a — Wiki index: `INDEX.base` (Bases)
42
+
43
+ If `INDEX.base` exists, read it first:
40
44
 
41
45
  ```bash
42
46
  obsidian read file="INDEX.base"
43
47
  ```
44
48
 
45
- Read `SCHEMA.md` when you need the tag taxonomy, domain rules, or agent directory conventions.
49
+ **What this is:** The vault’s **Obsidian Bases wiki index**. In the app, this file drives a **live, query-backed table** of notes with rich metadata (paths, tags, dates, backlinks, and any columns you add). The bytes on disk are the Base definition (views, filters, formulas); Obsidian **evaluates** that definition into the dynamic index you see in the UI.
50
+
51
+ **How to use it as an agent:** Parse the definition to learn **which paths and property filters** define “compiled knowledge” in this vault. Then run CLI commands that query the **same scope** — do not treat the YAML as meaningless “config” or assume the vault has no index when you do not see note titles in the read output.
52
+
53
+ #### 2b — List agent-maintained pages (same scope the Base should cover)
54
+
55
+ Enumerate compiled pages by v2 frontmatter `type` (high-speed retrieval, same notes the Base is meant to index):
56
+
57
+ ```bash
58
+ obsidian properties type=entity
59
+ obsidian properties type=concept
60
+ obsidian properties type=comparison
61
+ obsidian properties type=query
62
+ ```
63
+
64
+ Use paths and titles from this output as candidates. When helpful, add **`obsidian tags`**, **`obsidian backlinks file="..."`**, or other list commands from `obsidian help` to exploit metadata associations the Base surfaces as columns.
65
+
66
+ #### 2c — Taxonomy and conventions
46
67
 
47
- Then search for relevant pages:
68
+ Read `SCHEMA.md` when you need the tag taxonomy, domain rules, or agent directory conventions:
69
+
70
+ ```bash
71
+ obsidian read file="SCHEMA.md"
72
+ ```
73
+
74
+ If the question or `SCHEMA.md` points at specific tags, run targeted searches for those tags in addition to plain terms.
75
+
76
+ #### 2d — Search by key concepts
77
+
78
+ For each key concept in the question:
48
79
 
49
80
  ```bash
50
81
  obsidian search "<key concept>"
51
82
  ```
52
83
 
53
- Search for each key concept mentioned in the question. Combine results across concepts.
84
+ Combine and deduplicate results across queries.
85
+
86
+ #### 2e — User and source notes outside agent directories
87
+
88
+ Answers may live in raw notes (e.g. reports, dailies, `Projects/`) that are **not** under `entities/`, `concepts/`, `comparisons/`, or `queries/`. After agent-scope passes, run broader searches (filename keywords, dates, or tags) until you have checked plausible locations or confirmed the vault has no matching note.
54
89
 
55
90
  ### Step 3: Read Relevant Pages
56
91
 
@@ -61,6 +96,7 @@ obsidian read file="entities/some-page.md"
61
96
  ```
62
97
 
63
98
  Prioritize:
99
+
64
100
  - Agent pages in `entities/`, `concepts/`, `comparisons/`, `queries/`
65
101
  - Pages with matching tags or domain
66
102
  - Pages with `status: reviewed` (over `draft`)
@@ -133,3 +169,4 @@ Use `obsidian create` to save. Ask the user where they'd like it saved.
133
169
  - **Acknowledge gaps**: If the vault doesn't have enough information, say so.
134
170
  - **Respect scope**: Only answer based on vault content, not external knowledge.
135
171
  - **Save on request**: Always offer to save the answer as a note for future reference.
172
+ - **Bases + CLI:** The wiki index is **`INDEX.base`** in Obsidian; discovery via CLI is **`obsidian properties`** (by `type` and other fields), **`obsidian search`**, and related commands — not a duplicate markdown index file.
@@ -34,7 +34,7 @@ obsidian search "<from>"
34
34
  obsidian search "<to>"
35
35
  ```
36
36
 
37
- If `INDEX.base` exists, read it to spot compiled pages for either topic.
37
+ If `INDEX.base` exists, read it to align with the vault Bases index, then use `obsidian properties` / `search` as in **`/ask`**.
38
38
 
39
39
  Read any existing agent pages in `entities/`, `concepts/`, `comparisons/`, and `queries/`:
40
40
 
@@ -70,7 +70,7 @@ When user provides a URL:
70
70
  - Identify entities (named things), concepts (abstract ideas), decisions, contradictions
71
71
 
72
72
  ### Step 2: Match Against Existing Pages
73
- - Check `INDEX.base` or scan `entities/`, `concepts/` for existing pages
73
+ - Check `INDEX.base` (Bases index in Obsidian) or scan `entities/`, `concepts/` for existing pages; use `obsidian properties` by `type` for a fast listing
74
74
  - Determine: create new vs. update existing
75
75
  - Read `SCHEMA.md` (Obsidian CLI) for current tag and domain taxonomy so new pages prefer existing tags when they fit
76
76
 
@@ -98,7 +98,7 @@ After Step 3–4, reconcile agent pages touched this cycle with `SCHEMA.md`:
98
98
  - Stay consistent with SCHEMA rules: singular tags, 2–5 tags per page on agent pages, new tags documented here before (or as soon as) use.
99
99
 
100
100
  ### Step 6: Update Navigation
101
- - `INDEX.base` auto-updates via Obsidian Base query
101
+ - `INDEX.base` stays current in Obsidian via its Base query — suggest **`/wiki`** if views, filters, or columns need tuning after large cooks
102
102
  - Append entry to `log.md`
103
103
 
104
104
  ### Step 7: Report
@@ -84,7 +84,7 @@ Verify vault configuration:
84
84
  - `.opencode/` directory has current skill definitions
85
85
  - `SCHEMA.md` exists and has a defined tag taxonomy
86
86
  - `log.md` exists and has recent entries
87
- - `INDEX.base` exists for compiled knowledge discovery
87
+ - `INDEX.base` exists as the Bases wiki index (run `/wiki` to verify or improve it)
88
88
 
89
89
  ### Step 6: Present Diagnosis
90
90
 
@@ -2,7 +2,7 @@
2
2
  name: ideas
3
3
  description: >
4
4
  Deep vault scan to generate actionable ideas by combining insights across domains, finding gaps,
5
- and proposing concrete next steps. Uses INDEX.base and agent directories (`entities/`, `concepts/`,
5
+ and proposing concrete next steps. Uses INDEX.base (Bases wiki index) and agent directories (`entities/`, `concepts/`,
6
6
  `comparisons/`, `queries/`) for compiled knowledge. Use when the user asks "give me ideas", "what should I work
7
7
  on", "what opportunities do you see", "brainstorm from my notes", or wants creative suggestions
8
8
  grounded in their vault content.
@@ -48,7 +48,7 @@ Read notes across domains, prioritizing:
48
48
  - Recent notes (last 30 days) — what the user is actively thinking about
49
49
  - Highly connected notes (many backlinks) — central concepts
50
50
  - Notes with `status: active` — current work
51
- - `INDEX.base` if it existsfor knowledge structure overview
51
+ - `INDEX.base` and `obsidian properties` / `search` same compiled knowledge scope as **`/ask`**
52
52
  - Agent pages in `entities/`, `concepts/`, `comparisons/`, `queries/` — for compiled knowledge
53
53
 
54
54
  For each domain, read 5-10 representative notes to understand the landscape.
@@ -45,7 +45,7 @@ obsidian read file="comparisons/<topic>.md"
45
45
  obsidian read file="queries/<topic>.md"
46
46
  ```
47
47
 
48
- Read `INDEX.base` to check if there's already a compiled page for this topic.
48
+ Read `INDEX.base` if it exists, then use `obsidian properties` by `type` and `obsidian search` to find compiled pages (see **`/ask`**).
49
49
 
50
50
  ### Step 2: Build Timeline
51
51
 
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: wiki
3
3
  description: >
4
- Generate and maintain INDEX.base — the dynamic knowledge map for v2 agent pages (type:
5
- entity, concept, comparison, query). Uses Obsidian Base queries to list agent-maintained
6
- pages; SCHEMA.md defines tag taxonomy. Use when the user says "update the index",
7
- "refresh the knowledge map", "show me the wiki", "what's in the knowledge base",
8
- "rebuild INDEX.base", or wants to see the current state of compiled knowledge.
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
- Generate and maintain `INDEX.base`, the dynamic knowledge map that lists all agent-maintained pages grouped by v2 `type` (`entity`, `concept`, `comparison`, `query`). Unlike static index files, INDEX.base uses Obsidian Base queries to stay current automatically. Use `SCHEMA.md` for tag taxonomy when summarizing or grouping entries.
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: Generate INDEX.base Content
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
- Query all agent-maintained pages by v2 frontmatter `type` (`entity`, `concept`, `comparison`, `query`) so each page is listed under the correct section:
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 and domain
53
-
54
- Format by section:
70
+ - Tags, domain, `updated` — the same dimensions Bases can show as columns
55
71
 
56
- ```markdown
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
- ## Entities
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
- ## Concepts
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
- ## Comparisons
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
- ## Queries
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
- ### Step 4: Check Obsidian Base Configuration
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
- INDEX.base relies on Obsidian Base (saved search) configuration. Verify:
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
- 1. The Base query covers all four agent directories
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
- If the Base doesn't exist or is misconfigured, guide the user to set it up:
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
- ### Step 5: Present the Index
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
- Show the current INDEX.base content to the user:
95
+ 5. **YAML** Keep formula strings consistently quoted; see comments at the top of **`INDEX.base.example`**.
91
96
 
92
- ```markdown
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
- Generated on YYYY-MM-DD
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
- Total pages: N (X entities, Y concepts, Z comparisons, W queries)
101
+ ### Step 5: Present the index to the user
98
102
 
99
- ## By Domain
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
- ## Most Connected
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
- ### Step 6: Suggest Gaps
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 is dynamic.** The Obsidian Base query keeps it current no manual regeneration needed on every cook cycle.
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.** INDEX.base exists to help humans find knowledge quickly. Structure it for scanning, not completeness.
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.** INDEX.base covers only `entities/`, `concepts/`, `comparisons/`, `queries/` — not user notes.
120
+ - **Agent pages only** in this index: `entities/`, `concepts/`, `comparisons/`, `queries/` — not arbitrary user notes.