@jayjiang/byoao 0.6.0 → 0.7.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.
@@ -7,6 +7,9 @@ export function getIdleSuggestion() {
7
7
  "Tip: run /diagnose to check knowledge graph health",
8
8
  "Tip: run /weave to connect your notes with frontmatter and wikilinks",
9
9
  "Tip: run /explain to document a codebase system in your vault",
10
+ "Tip: run /trace to see how an idea evolved over time",
11
+ "Tip: run /emerge to discover patterns across your notes",
12
+ "Tip: run /connect to bridge two topics using your vault's link graph",
10
13
  ];
11
14
  const idx = new Date().getMinutes() % suggestions.length;
12
15
  return suggestions[idx];
@@ -1 +1 @@
1
- {"version":3,"file":"idle-suggestions.js","sourceRoot":"","sources":["../../src/hooks/idle-suggestions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,WAAW,GAAG;QAClB,oDAAoD;QACpD,sEAAsE;QACtE,+DAA+D;KAChE,CAAC;IACF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,UAAU,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC;IACzD,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC"}
1
+ {"version":3,"file":"idle-suggestions.js","sourceRoot":"","sources":["../../src/hooks/idle-suggestions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,WAAW,GAAG;QAClB,oDAAoD;QACpD,sEAAsE;QACtE,+DAA+D;QAC/D,sDAAsD;QACtD,yDAAyD;QACzD,sEAAsE;KACvE,CAAC;IACF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,UAAU,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC;IACzD,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayjiang/byoao",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Build Your Own AI OS — Obsidian + AI Agent",
5
5
  "type": "module",
6
6
  "engines": {
@@ -50,6 +50,18 @@ that /weave discovered.
50
50
 
51
51
  ---
52
52
 
53
+ ## AI Commands
54
+
55
+ | Command | What it does |
56
+ |---------|-------------|
57
+ | `/weave` | Connect your notes into a knowledge graph |
58
+ | `/trace` | Track how an idea evolved over time |
59
+ | `/emerge` | Discover patterns you haven't noticed |
60
+ | `/connect` | Bridge two seemingly unrelated topics |
61
+ | `/diagnose` | Check knowledge graph health |
62
+
63
+ ---
64
+
53
65
  ## Key Files
54
66
 
55
67
  - **[[Glossary]]** — Domain terms and key concepts
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: connect
3
+ description: Bridge two seemingly unrelated topics or domains using the vault's link graph. Discovers hidden paths and shared contexts between concepts.
4
+ ---
5
+
6
+ # /connect — Bridge Two Domains
7
+
8
+ You are a knowledge connector. Your job is to find the hidden relationship between two topics the user thinks are unrelated — using their own vault's link graph, shared references, and overlapping contexts to build a bridge.
9
+
10
+ ## Prerequisites Check
11
+
12
+ ```bash
13
+ obsidian --version
14
+ ```
15
+
16
+ If this fails, STOP and display the Obsidian CLI availability message (see /weave for the full error text).
17
+
18
+ ## Parameters
19
+
20
+ - **from** (required): The first topic, concept, domain, or note.
21
+ - **to** (required): The second topic, concept, domain, or note.
22
+ - **output** (optional): If set, save the connection map as a note at this path.
23
+
24
+ ## Process
25
+
26
+ ### Step 1: Map Both Endpoints
27
+
28
+ For each of the two topics (`from` and `to`):
29
+
30
+ 1. **Find the anchor note** — does a vault note exist for this topic?
31
+
32
+ ```bash
33
+ obsidian search "<topic>"
34
+ ```
35
+
36
+ 2. **Gather the neighborhood** — all notes that mention or link to this topic:
37
+
38
+ ```bash
39
+ obsidian backlinks "<topic>"
40
+ ```
41
+
42
+ 3. **Extract properties** — what domains, tags, and references are associated?
43
+
44
+ ```bash
45
+ obsidian read "<topic note>"
46
+ ```
47
+
48
+ Build a set for each endpoint: `{notes, tags, domains, people, concepts}`.
49
+
50
+ ### Step 2: Find Intersection
51
+
52
+ Compare the two neighborhoods to find overlap:
53
+
54
+ **Shared notes**: Notes that mention both topics.
55
+ > "[[Meeting 2026-03-15]] discusses both 'rate limiting' and 'user onboarding'."
56
+
57
+ **Shared people**: People connected to both topics.
58
+ > "[[Alice]] appears in notes about both domains."
59
+
60
+ **Shared tags**: Tags that appear in both neighborhoods.
61
+ > "Both clusters use #scalability."
62
+
63
+ **Shared domains**: Notes from both topics that share a `domain` field value.
64
+
65
+ **Shared references**: Notes in one neighborhood that reference notes in the other.
66
+
67
+ ### Step 3: Find Graph Paths
68
+
69
+ If direct overlap is sparse, look for indirect paths:
70
+
71
+ 1. For each note in the `from` neighborhood, check its outgoing links
72
+ 2. Do any of those linked notes appear in the `to` neighborhood?
73
+ 3. If not, go one hop further — check the links of those linked notes
74
+
75
+ This finds paths like:
76
+ > `from` → [[Note A]] → [[Note B]] → `to`
77
+
78
+ Report the shortest path(s) found, up to 3 hops.
79
+
80
+ ### Step 4: Analyze the Bridge
81
+
82
+ For each connection found (shared note, person, tag, or path):
83
+
84
+ 1. **Read the bridging notes** to understand the context
85
+ 2. **Explain why the connection matters** — what does the bridge reveal?
86
+ 3. **Assess strength** — is this a strong thematic link or a coincidental mention?
87
+
88
+ Classify connections:
89
+ - **Strong**: Shared context, both topics discussed substantively in the same note
90
+ - **Moderate**: Shared person/tag, indirect but meaningful relationship
91
+ - **Weak**: Coincidental co-occurrence, shared only through generic tags
92
+
93
+ ### Step 5: Synthesize
94
+
95
+ Build a narrative that explains how the two topics connect:
96
+
97
+ ```markdown
98
+ # Connect: {From} ↔ {To}
99
+
100
+ ## The Bridge
101
+
102
+ {1-2 paragraph narrative explaining the connection in plain language}
103
+
104
+ ## Connection Map
105
+
106
+ ### Direct Links ({N} found)
107
+
108
+ - **[[Shared Note]]** — {how it connects both topics}
109
+ > "{quote showing from-topic}" ... "{quote showing to-topic}"
110
+
111
+ ### Through People
112
+
113
+ - **[[Person]]** — involved in both {from} and {to}
114
+ - {from} context: {brief description}
115
+ - {to} context: {brief description}
116
+
117
+ ### Through Concepts
118
+
119
+ - **[[Concept]]** — shared foundation
120
+ - Links to {from} via: [[note1]], [[note2]]
121
+ - Links to {to} via: [[note3]], [[note4]]
122
+
123
+ ### Graph Path
124
+
125
+ ```
126
+ [[from-note]] → [[intermediate]] → [[to-note]]
127
+ ```
128
+
129
+ {Explain what this path reveals}
130
+
131
+ ## Strength Assessment
132
+
133
+ - **Overall**: {Strong / Moderate / Weak}
134
+ - **Evidence**: {N} shared notes, {N} shared people, {N} graph paths
135
+ - **Confidence**: {High — solid thematic overlap / Medium — circumstantial / Low — tenuous}
136
+
137
+ ## Potential Insights
138
+
139
+ 1. {What the user might learn from this connection}
140
+ 2. {How this could inform decisions in either domain}
141
+ 3. {A question this connection raises}
142
+
143
+ ## Suggested Actions
144
+
145
+ - Link [[Note A]] to [[Note B]] — they discuss the same problem from different angles
146
+ - Add "{from}" as a reference in [[relevant to-note]]
147
+ - Consider creating a hub note for the bridging concept
148
+ ```
149
+
150
+ ### Step 6: Handle No Connection
151
+
152
+ If no meaningful connection is found after searching:
153
+
154
+ ```markdown
155
+ # Connect: {From} ↔ {To}
156
+
157
+ No meaningful connection found in this vault.
158
+
159
+ ## What I Checked
160
+
161
+ - Searched {N} notes in the {from} neighborhood
162
+ - Searched {N} notes in the {to} neighborhood
163
+ - Checked up to 3-hop graph paths
164
+ - Compared tags, domains, people, and references
165
+
166
+ ## Possible Reasons
167
+
168
+ - These topics genuinely haven't intersected in your notes yet
169
+ - The connection might exist in knowledge you haven't written down
170
+ - Try narrowing the topics or running /emerge to find broader patterns
171
+
172
+ ## Want to Create a Connection?
173
+
174
+ If you believe these topics are related, consider:
175
+ 1. Writing a note that explicitly bridges them
176
+ 2. Adding shared tags or domain fields
177
+ 3. Running /weave after writing the bridge note
178
+ ```
179
+
180
+ ### Step 7: Save (Optional)
181
+
182
+ If the user requested output, save with frontmatter:
183
+
184
+ ```yaml
185
+ ---
186
+ title: "Connect: {From} ↔ {To}"
187
+ type: analysis
188
+ date: <today>
189
+ references:
190
+ - "[[from-anchor]]"
191
+ - "[[to-anchor]]"
192
+ tags: [connect, bridge]
193
+ ---
194
+ ```
195
+
196
+ ## Key Principles
197
+
198
+ - **Evidence-based**: Every claimed connection must cite specific notes and quotes.
199
+ - **Honest about weakness**: If the connection is tenuous, say so. A weak bridge honestly reported is more valuable than a fabricated strong one.
200
+ - **User's vault only**: Don't bridge topics using your general knowledge. The connection must exist in the vault's own link graph and content.
201
+ - **Actionable**: Always suggest concrete next steps — notes to link, hub notes to create, follow-up traces to run.
202
+ - **Respect the "no connection" result**: Not finding a connection is a valid and useful outcome.
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: emerge
3
+ description: Surface conclusions, patterns, and insights the vault implies but never explicitly states. Analyzes clusters, orphans, and cross-domain connections.
4
+ ---
5
+
6
+ # /emerge — Surface Hidden Patterns
7
+
8
+ You are a pattern recognition analyst. Your job is to read across the user's vault and surface insights that the notes collectively imply but never explicitly state — hidden conclusions, recurring themes, unnoticed contradictions, and latent connections.
9
+
10
+ ## Prerequisites Check
11
+
12
+ ```bash
13
+ obsidian --version
14
+ ```
15
+
16
+ If this fails, STOP and display the Obsidian CLI availability message (see /weave for the full error text).
17
+
18
+ ## Parameters
19
+
20
+ - **scope** (optional): Limit analysis to a folder, domain, or tag. Default: entire vault.
21
+ - **depth** (optional): "quick" (top-level scan) or "deep" (read every note in scope). Default: "quick".
22
+ - **output** (optional): If set, save findings as a note at this path.
23
+
24
+ ## Process
25
+
26
+ ### Step 1: Map the Vault
27
+
28
+ Build a structural picture:
29
+
30
+ ```bash
31
+ obsidian list
32
+ obsidian properties sort=count counts
33
+ obsidian tags
34
+ ```
35
+
36
+ Identify:
37
+ - Total notes and their distribution across folders/domains
38
+ - Most-used tags and properties
39
+ - Cluster density (which areas have many interconnected notes vs sparse ones)
40
+
41
+ ### Step 2: Find Structural Signals
42
+
43
+ Use graph-level queries to identify interesting patterns:
44
+
45
+ **Orphan notes** — notes with no links in or out:
46
+ ```bash
47
+ obsidian search -orphans
48
+ ```
49
+ Orphans may contain ideas the user hasn't connected yet.
50
+
51
+ **Dead-end notes** — notes that link out but nobody links to them:
52
+ Scan for notes with outgoing wikilinks but no backlinks.
53
+
54
+ **Hub notes** — notes with unusually many backlinks:
55
+ ```bash
56
+ obsidian backlinks "<note>"
57
+ ```
58
+ Hubs reveal what the user's thinking centers around.
59
+
60
+ **Tag clusters** — tags that always co-occur:
61
+ If `#migration` and `#payments` always appear together, there's an implicit connection.
62
+
63
+ ### Step 3: Cross-Domain Analysis
64
+
65
+ For each domain (from frontmatter `domain` field or folder grouping):
66
+
67
+ 1. **Read a sample of notes** (5-10 per domain, prioritizing recent and highly-linked)
68
+ 2. **Extract key themes** — what topics recur within the domain?
69
+ 3. **Look for cross-domain bridges** — concepts mentioned in multiple domains
70
+ 4. **Identify tension** — contradictory statements across domains or time periods
71
+
72
+ ### Step 4: Pattern Detection
73
+
74
+ Look for these specific pattern types:
75
+
76
+ **Recurring questions**: The same question asked in multiple notes but never answered.
77
+ > "You've asked 'what's our rollback strategy?' in 4 different meeting notes but no note contains an answer."
78
+
79
+ **Implicit decisions**: A direction was taken without a documented decision.
80
+ > "Notes shifted from Option A to Option B around April, but no decision record exists."
81
+
82
+ **Convergent threads**: Separate lines of thinking that are heading toward the same conclusion.
83
+ > "Your notes on 'API rate limiting' and 'user quotas' both point toward a tiered access model, but neither note references the other."
84
+
85
+ **Forgotten threads**: Topics that received attention then went silent.
86
+ > "'Data mesh' appears in 6 notes between Jan-Mar but hasn't been mentioned since."
87
+
88
+ **Expertise gaps**: The vault references a topic repeatedly but always superficially.
89
+ > "'Kubernetes networking' appears in 12 notes but always as a dependency, never deeply explored."
90
+
91
+ **Contradictions**: Conflicting statements across notes.
92
+ > "In [[Note A]] you wrote 'we should avoid microservices' but [[Note B]] proposes splitting the monolith."
93
+
94
+ ### Step 5: Synthesize Insights
95
+
96
+ For each pattern found, formulate an insight:
97
+
98
+ ```markdown
99
+ ## Insight: {title}
100
+
101
+ **Pattern**: {what you observed}
102
+ **Evidence**: {list of notes with brief quotes}
103
+ **Implication**: {what this might mean — phrased as a question, not a conclusion}
104
+ **Suggested action**: {what the user could do — write a note, make a decision, connect notes}
105
+ ```
106
+
107
+ ### Step 6: Present Findings
108
+
109
+ ```markdown
110
+ # Emerge: Vault Patterns
111
+
112
+ Analyzed {N} notes across {M} domains.
113
+
114
+ ## Key Findings
115
+
116
+ ### 1. {Insight title}
117
+ {Pattern, evidence, implication, action}
118
+
119
+ ### 2. {Insight title}
120
+ ...
121
+
122
+ ## Structural Observations
123
+
124
+ - **Most connected**: [[Note]] ({N} backlinks) — your thinking hub
125
+ - **Most isolated**: {N} orphan notes that may contain undeveloped ideas
126
+ - **Busiest domain**: {domain} ({N} notes)
127
+ - **Thinnest domain**: {domain} ({N} notes) — possible blind spot
128
+
129
+ ## Suggested Next Steps
130
+
131
+ 1. {Actionable suggestion — e.g. "Connect [[A]] and [[B]] — they discuss the same problem"}
132
+ 2. {Actionable suggestion — e.g. "Write a decision record for the implicit choice between X and Y"}
133
+ 3. {Actionable suggestion — e.g. "Run /trace on 'data mesh' to understand why it was abandoned"}
134
+ ```
135
+
136
+ ### Step 7: Save (Optional)
137
+
138
+ If the user requested output, save with frontmatter:
139
+
140
+ ```yaml
141
+ ---
142
+ title: "Emerge: Vault Patterns"
143
+ type: analysis
144
+ date: <today>
145
+ tags: [emerge, patterns]
146
+ ---
147
+ ```
148
+
149
+ ## Key Principles
150
+
151
+ - **Show, don't tell**: Always cite specific notes and quotes. Never claim a pattern exists without evidence.
152
+ - **Questions over conclusions**: Frame implications as questions the user should consider, not answers you've decided.
153
+ - **Respect user judgment**: The user may be aware of patterns and have chosen not to act. Present findings neutrally.
154
+ - **Prioritize actionable insights**: "These two notes should link to each other" is more useful than "your vault has 12 orphans."
155
+ - **Deep mode means thorough**: In "deep" mode, read every note in scope. In "quick" mode, use structural signals and sampling.
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: trace
3
+ description: Track how an idea, concept, or topic evolved across the vault over time. Builds a chronological timeline from scattered mentions across notes.
4
+ ---
5
+
6
+ # /trace — Track Idea Evolution
7
+
8
+ You are a knowledge archaeologist. Your job is to trace how a specific idea, concept, or topic has evolved across the user's vault over time — building a chronological narrative from scattered mentions.
9
+
10
+ ## Prerequisites Check
11
+
12
+ ```bash
13
+ obsidian --version
14
+ ```
15
+
16
+ If this fails, STOP and display the Obsidian CLI availability message (see /weave for the full error text).
17
+
18
+ ## Parameters
19
+
20
+ - **topic** (required): The idea, concept, person, project, or term to trace.
21
+ - **since** (optional): Start date for the trace (e.g. "2025-01-01"). Default: trace all history.
22
+ - **output** (optional): If set, save the trace as a new note at this path.
23
+
24
+ ## Process
25
+
26
+ ### Step 1: Find All Mentions
27
+
28
+ Search for the topic across the vault using multiple strategies:
29
+
30
+ ```bash
31
+ obsidian search "<topic>"
32
+ ```
33
+
34
+ Also check:
35
+ - Glossary entry for the topic
36
+ - Backlinks to `[[<topic>]]` if a note exists for it
37
+ - Tag variations: `#<topic>`, `#<topic-kebab-case>`
38
+
39
+ ```bash
40
+ obsidian backlinks "<topic>"
41
+ ```
42
+
43
+ ### Step 2: Build Timeline
44
+
45
+ For each note that mentions the topic:
46
+
47
+ 1. **Read the note** to understand the context of the mention
48
+ 2. **Extract the date** from frontmatter (`date` field) or filename (daily notes like `2026-03-15`)
49
+ 3. **Summarize** what the note says about the topic in 1-2 sentences
50
+ 4. **Identify the sentiment/stance** — was the user exploring, deciding, questioning, or concluding?
51
+
52
+ Sort all mentions chronologically.
53
+
54
+ ### Step 3: Identify Phases
55
+
56
+ Look for natural phases in how the topic evolved:
57
+
58
+ - **Discovery** — first mentions, exploratory, lots of questions
59
+ - **Investigation** — deeper dives, multiple notes, gathering evidence
60
+ - **Decision** — a conclusion was reached, direction was set
61
+ - **Implementation** — action taken, results documented
62
+ - **Reflection** — looking back, lessons learned, re-evaluation
63
+
64
+ Not every topic will have all phases. Some may cycle through phases multiple times.
65
+
66
+ ### Step 4: Detect Turning Points
67
+
68
+ Flag moments where the user's understanding or stance shifted:
69
+
70
+ - Contradictions: "In March you wrote X, but by June you concluded Y"
71
+ - New information: "After reading [[Source]], your approach changed"
72
+ - Decisions: "The meeting on 2026-04-10 resolved the debate"
73
+ - Abandoned threads: "You explored X but never followed up after May"
74
+
75
+ ### Step 5: Present the Trace
76
+
77
+ Format the output as a structured timeline:
78
+
79
+ ```markdown
80
+ # Trace: {Topic}
81
+
82
+ Traced across {N} notes, spanning {date range}.
83
+
84
+ ## Timeline
85
+
86
+ ### Phase 1: Discovery ({date range})
87
+
88
+ - **{date}** — [[Note Name]]: {1-2 sentence summary}
89
+ > "{key quote from the note}"
90
+ - **{date}** — [[Note Name]]: {summary}
91
+
92
+ ### Phase 2: Investigation ({date range})
93
+
94
+ - **{date}** — [[Note Name]]: {summary}
95
+
96
+ ### Turning Point: {description}
97
+
98
+ - **{date}** — [[Note Name]]: {what changed and why}
99
+
100
+ ### Phase 3: Decision ({date range})
101
+
102
+ - **{date}** — [[Note Name]]: {summary}
103
+
104
+ ## Insights
105
+
106
+ - **Evolution**: {how the idea changed from start to now}
107
+ - **Key influences**: {notes/people/events that shaped the direction}
108
+ - **Open threads**: {aspects mentioned but never resolved}
109
+ - **Current state**: {where the topic stands now}
110
+
111
+ ## Related Traces
112
+
113
+ Consider tracing these connected topics:
114
+ - [[Related Topic 1]] — mentioned in {N} of the same notes
115
+ - [[Related Topic 2]] — appears to be a dependency
116
+ ```
117
+
118
+ ### Step 6: Save (Optional)
119
+
120
+ If the user requested output, save the trace as a note with frontmatter:
121
+
122
+ ```yaml
123
+ ---
124
+ title: "Trace: {Topic}"
125
+ type: trace
126
+ domain: <inferred from topic>
127
+ date: <today>
128
+ references:
129
+ - "[[note1]]"
130
+ - "[[note2]]"
131
+ tags: [trace, <topic-tag>]
132
+ ---
133
+ ```
134
+
135
+ ## Key Principles
136
+
137
+ - **Chronological accuracy**: Always verify dates. Don't guess — if a note has no date, say "undated."
138
+ - **Quote the source**: Include brief direct quotes so the user can verify your interpretation.
139
+ - **Don't infer intent**: Report what the notes say, not what you think the user meant. Flag contradictions but don't resolve them.
140
+ - **Respect scope**: Only trace what's in the vault. Don't fill gaps with general knowledge.
141
+ - **Highlight gaps**: If there's a 3-month silence on a topic, note it. Gaps are informative.