@jayjiang/byoao 0.4.0 → 0.6.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.
- package/dist/__tests__/plugin-config.test.js +11 -8
- package/dist/__tests__/plugin-config.test.js.map +1 -1
- package/dist/cli/cli-program.js +253 -157
- package/dist/cli/cli-program.js.map +1 -1
- package/dist/cli/installer.js +4 -11
- package/dist/cli/installer.js.map +1 -1
- package/dist/hooks/idle-suggestions.js +3 -3
- package/dist/hooks/idle-suggestions.js.map +1 -1
- package/dist/hooks/system-transform.js +37 -14
- package/dist/hooks/system-transform.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin-config.js +5 -2
- package/dist/plugin-config.js.map +1 -1
- package/dist/tools/add-glossary-term.js +2 -0
- package/dist/tools/add-glossary-term.js.map +1 -1
- package/dist/tools/add-person.js +21 -0
- package/dist/tools/add-person.js.map +1 -0
- package/dist/tools/init-vault.js +11 -9
- package/dist/tools/init-vault.js.map +1 -1
- package/dist/tools/vault-upgrade.js +77 -0
- package/dist/tools/vault-upgrade.js.map +1 -0
- package/dist/vault/__tests__/create.test.js +105 -39
- package/dist/vault/__tests__/create.test.js.map +1 -1
- package/dist/vault/__tests__/glossary.test.js +25 -14
- package/dist/vault/__tests__/glossary.test.js.map +1 -1
- package/dist/vault/__tests__/manifest.test.js +76 -0
- package/dist/vault/__tests__/manifest.test.js.map +1 -0
- package/dist/vault/__tests__/member.test.js +2 -4
- package/dist/vault/__tests__/member.test.js.map +1 -1
- package/dist/vault/__tests__/upgrade.test.js +181 -0
- package/dist/vault/__tests__/upgrade.test.js.map +1 -0
- package/dist/vault/create.js +211 -146
- package/dist/vault/create.js.map +1 -1
- package/dist/vault/doctor.js +1 -1
- package/dist/vault/doctor.js.map +1 -1
- package/dist/vault/glossary.js +8 -14
- package/dist/vault/glossary.js.map +1 -1
- package/dist/vault/manifest.js +68 -0
- package/dist/vault/manifest.js.map +1 -0
- package/dist/vault/member.js +1 -1
- package/dist/vault/member.js.map +1 -1
- package/dist/vault/project.js +1 -1
- package/dist/vault/project.js.map +1 -1
- package/dist/vault/upgrade.js +266 -0
- package/dist/vault/upgrade.js.map +1 -0
- package/dist/vault/vault-detect.js +30 -0
- package/dist/vault/vault-detect.js.map +1 -1
- package/package.json +3 -1
- package/src/assets/presets/common/AGENT.md.hbs +34 -67
- package/src/assets/presets/common/Glossary.md.hbs +7 -35
- package/src/assets/presets/common/Start Here.md.hbs +32 -64
- package/src/assets/presets/minimal/preset.json +28 -0
- package/src/skills/{vault-doctor.md → diagnose.md} +12 -12
- package/src/skills/{system-explainer.md → explain.md} +8 -8
- package/src/skills/weave.md +240 -0
- package/src/assets/web-clipper/confluence-page.json +0 -63
- package/src/assets/web-clipper/general-article.json +0 -53
- package/src/assets/web-clipper/jira-issue.json +0 -68
- package/src/assets/web-clipper/meeting-notes.json +0 -53
- package/src/skills/enrich-document.md +0 -52
|
@@ -1,44 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Glossary
|
|
3
3
|
type: reference
|
|
4
4
|
status: active
|
|
5
5
|
date: {{date}}
|
|
6
|
-
tags: [glossary,
|
|
6
|
+
tags: [glossary, reference]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
#
|
|
9
|
+
# Glossary
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Domain terms and key concepts in this knowledge base.
|
|
12
|
+
Maintained by /weave — run it to discover and add new terms.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Core Terms
|
|
19
|
-
|
|
20
|
-
| Term | Definition |
|
|
21
|
-
|------|-----------|
|
|
14
|
+
| Term | Definition | Domain |
|
|
15
|
+
|------|-----------|--------|
|
|
22
16
|
{{GLOSSARY_ENTRIES}}
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## How to Add a New Term
|
|
27
|
-
|
|
28
|
-
1. **Start here**: Add a row to the appropriate table above with a one-line definition.
|
|
29
|
-
2. **Graduate if needed**: If a term grows beyond 2 sentences, has 3+ relationships to other terms, or has important gotchas, create a concept note:
|
|
30
|
-
- Create `Knowledge/concepts/Term Name.md`
|
|
31
|
-
- Replace the definition here with: `Brief intro — see [[Term Name]] for full details.`
|
|
32
|
-
3. **Link generously**: Use `[[wikilinks]]` in definitions to connect related terms.
|
|
33
|
-
|
|
34
|
-
### Graduation Rule
|
|
35
|
-
|
|
36
|
-
A term should move from Tier 1 to Tier 2 when:
|
|
37
|
-
- Its definition needs **more than 2 sentences**
|
|
38
|
-
- It has **3+ relationships** to other notes (people, projects, systems)
|
|
39
|
-
- It has **gotchas or edge cases** that people frequently get wrong
|
|
40
|
-
- It requires **examples, diagrams, or data** to explain properly
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
*Maintenance: This file is the first stop for any domain question. Keep it alphabetized within sections. Review quarterly for stale or missing terms.*
|
|
@@ -5,91 +5,59 @@ status: active
|
|
|
5
5
|
tags: [onboarding]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Welcome to {{
|
|
8
|
+
# Welcome to {{KB_NAME}}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Your personal knowledge base. Write notes, import existing files,
|
|
11
|
+
and let AI connect the dots.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
## Get Started in 5 Minutes
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## 5 Essential Operations
|
|
17
|
-
|
|
18
|
-
### 1. Follow a Wikilink
|
|
19
|
-
|
|
20
|
-
See the double-bracket link below? Click it to jump to that note.
|
|
21
|
-
|
|
22
|
-
> Try it: [[Glossary]]
|
|
23
|
-
|
|
24
|
-
Every `[[link]]` in this vault connects two notes. These connections build a knowledge graph you can visualize (see operation 5).
|
|
25
|
-
|
|
26
|
-
### 2. Quick Switch
|
|
27
|
-
|
|
28
|
-
Press `Cmd+O` (Mac) or `Ctrl+O` (Windows) to open the quick switcher. Start typing any note name.
|
|
29
|
-
|
|
30
|
-
> Try it: `Cmd+O` → type any project name
|
|
15
|
+
### 1. Import Your Existing Notes (optional)
|
|
31
16
|
|
|
32
|
-
|
|
17
|
+
Already have files? Drop them into this vault folder, or use Obsidian
|
|
18
|
+
Web Clipper to save web pages directly here.
|
|
33
19
|
|
|
34
|
-
|
|
20
|
+
### 2. Write Your First Daily Note
|
|
35
21
|
|
|
36
|
-
|
|
22
|
+
Press `Cmd+T` (Mac) or `Ctrl+T` (Windows) → choose "Daily Note".
|
|
23
|
+
Write what's on your mind today. Don't worry about structure — just write.
|
|
37
24
|
|
|
38
|
-
###
|
|
25
|
+
### 3. Run /weave
|
|
39
26
|
|
|
40
|
-
|
|
27
|
+
Open your AI agent and type `/weave`. It will scan your notes, discover
|
|
28
|
+
connections, and add frontmatter + wikilinks.
|
|
41
29
|
|
|
42
|
-
|
|
30
|
+
Watch: scattered files become a connected knowledge graph.
|
|
43
31
|
|
|
44
|
-
|
|
32
|
+
### 4. Explore the Graph
|
|
45
33
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
> Try it: `Cmd+G` → zoom into the cluster around [[{{TEAM_NAME}} Team]]
|
|
34
|
+
Press `Cmd+G` (Mac) or `Ctrl+G` (Windows) to see your knowledge
|
|
35
|
+
visualized. Every node is a note, every line is a connection
|
|
36
|
+
that /weave discovered.
|
|
51
37
|
|
|
52
38
|
---
|
|
53
39
|
|
|
54
|
-
##
|
|
55
|
-
|
|
56
|
-
Want to see what BYOAO can do? Try this in OpenCode:
|
|
40
|
+
## Obsidian Essentials
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
| Shortcut | Action |
|
|
43
|
+
|----------|--------|
|
|
44
|
+
| `Cmd+O` | Quick Switch — jump to any note |
|
|
45
|
+
| `Cmd+T` | Insert Template |
|
|
46
|
+
| `Cmd+G` | Graph View |
|
|
47
|
+
| `Cmd+N` | New note |
|
|
48
|
+
| `Cmd+Shift+F` | Search across all notes |
|
|
49
|
+
| `[[double brackets]]` | Create a link to another note |
|
|
63
50
|
|
|
64
51
|
---
|
|
65
52
|
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
1. Open [[Glossary]] — scan the term tables to orient yourself on domain language
|
|
69
|
-
2. Pick any project in `Projects/` — follow links to people and concepts
|
|
70
|
-
3. Open Graph View (`Cmd+G`) — see the full knowledge map
|
|
71
|
-
4. Create a Daily Note (`Cmd+T` → Daily Note) — start capturing your own notes
|
|
72
|
-
5. Read `AGENT.md` to see how AI agents navigate this vault
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Folder Map
|
|
77
|
-
|
|
78
|
-
| Folder | Purpose |
|
|
79
|
-
|--------|---------|
|
|
80
|
-
| `Inbox` | Drop zone for unprocessed notes |
|
|
81
|
-
| `Projects` | One note per active project |
|
|
82
|
-
| `Sprints` | Sprint handoff documents |
|
|
83
|
-
| `Knowledge` | Domain reference, glossary, concept notes, templates |
|
|
84
|
-
| `People` | One note per team member + team index |
|
|
85
|
-
| `Systems` | Codebase explanations (generated by AI agents) |
|
|
86
|
-
| `Archive` | Completed or deprecated notes |
|
|
87
|
-
| `Daily` | Daily notes (auto-created by template) |
|
|
53
|
+
## Key Files
|
|
88
54
|
|
|
89
|
-
|
|
55
|
+
- **[[Glossary]]** — Domain terms and key concepts
|
|
56
|
+
- **AGENT.md** — How AI agents navigate this vault
|
|
90
57
|
|
|
91
58
|
---
|
|
92
59
|
|
|
93
60
|
## For AI Agents
|
|
94
61
|
|
|
95
|
-
|
|
62
|
+
See `AGENT.md` at the vault root for navigation instructions
|
|
63
|
+
and knowledge graph conventions.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "minimal",
|
|
3
|
+
"displayName": "Personal Knowledge Base",
|
|
4
|
+
"description": "A minimal personal knowledge base — just Daily notes, templates, and Glossary. Add structure as you go.",
|
|
5
|
+
"directories": [],
|
|
6
|
+
"agentDescription": "Personal knowledge base. Notes are connected through wikilinks and frontmatter. Use /weave to discover and strengthen connections.",
|
|
7
|
+
"frontmatterExtras": {},
|
|
8
|
+
"templates": [],
|
|
9
|
+
"mcpServers": {},
|
|
10
|
+
"obsidianPlugins": {
|
|
11
|
+
"agent-client": {
|
|
12
|
+
"repo": "RAIT-09/obsidian-agent-client",
|
|
13
|
+
"version": "latest",
|
|
14
|
+
"config": {
|
|
15
|
+
"defaultAgentId": "opencode-acp",
|
|
16
|
+
"customAgents": [
|
|
17
|
+
{
|
|
18
|
+
"id": "opencode-acp",
|
|
19
|
+
"displayName": "OpenCode",
|
|
20
|
+
"command": "opencode",
|
|
21
|
+
"args": ["acp"],
|
|
22
|
+
"env": []
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Diagnose
|
|
2
|
+
name: diagnose
|
|
3
|
+
description: Diagnose knowledge graph health — find missing frontmatter, orphan notes, broken wikilinks, and AGENT.md drift. Suggests fixes and asks for confirmation before making changes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# /diagnose — Knowledge Graph Health Check
|
|
7
7
|
|
|
8
|
-
You are a vault health assistant. Your job is to diagnose issues in an Obsidian
|
|
8
|
+
You are a vault health assistant. Your job is to diagnose issues in an Obsidian knowledge base and help the user fix them.
|
|
9
9
|
|
|
10
10
|
## Execution Flow
|
|
11
11
|
|
|
@@ -28,18 +28,18 @@ Call `byoao_vault_doctor` with the vault path. This runs 5 checks:
|
|
|
28
28
|
Format the report by severity:
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
|
|
31
|
+
! 3 notes without frontmatter
|
|
32
32
|
- Inbox/quick-thought.md
|
|
33
33
|
- Projects/demo-notes.md
|
|
34
34
|
- Knowledge/api-overview.md
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
! AGENT.md lists [[Kent]] but no People/Kent.md found
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
i 2 orphan notes (no incoming or outgoing wikilinks)
|
|
39
39
|
- Archive/old-draft.md
|
|
40
40
|
- Inbox/random.md
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
ok 0 broken wikilinks
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
### Step 4: Suggest Fixes
|
|
@@ -48,9 +48,9 @@ For each issue category, suggest a concrete next action:
|
|
|
48
48
|
|
|
49
49
|
| Issue | Suggested Fix |
|
|
50
50
|
|-------|--------------|
|
|
51
|
-
| Missing frontmatter | "Run `/
|
|
52
|
-
| Missing type/tags | "Run `/
|
|
53
|
-
| AGENT.md drift | "Create the missing note? I can run `
|
|
51
|
+
| Missing frontmatter | "Run `/weave` on these files to add structure" |
|
|
52
|
+
| Missing type/tags | "Run `/weave` to fill in metadata" |
|
|
53
|
+
| AGENT.md drift | "Create the missing note? I can run `byoao_add_person` or `byoao_add_project`" |
|
|
54
54
|
| Orphan notes | "Consider adding `[[wikilinks]]` to connect them, or archive if unused" |
|
|
55
55
|
| Broken wikilinks | "Create the target note, or fix the link name" |
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ After fixes are applied (with user consent), append or update a `Last Scanned` l
|
|
|
62
62
|
|
|
63
63
|
```markdown
|
|
64
64
|
---
|
|
65
|
-
_Last scanned by
|
|
65
|
+
_Last scanned by /diagnose: 2026-03-27_
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Key Principles
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: explain
|
|
3
3
|
description: Explain codebase systems and workflows in clear, non-jargon language. Uses engineer-generated overviews as baseline, reads local repo clones for details, caches knowledge in Obsidian vault.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# System Explainer
|
|
6
|
+
# /explain — System Explainer
|
|
7
7
|
|
|
8
8
|
You are a codebase knowledge assistant for knowledge workers. Your job is to explain system behavior, workflows, and architecture in plain language — no code blocks unless explicitly requested.
|
|
9
9
|
|
|
@@ -12,21 +12,21 @@ You are a codebase knowledge assistant for knowledge workers. Your job is to exp
|
|
|
12
12
|
System knowledge comes from three sources, in priority order:
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
Layer 1: Baseline Overview —
|
|
15
|
+
Layer 1: Baseline Overview — Codebase overview per repo (high-level architecture)
|
|
16
16
|
Layer 2: Live Code Access — Local repo clone + file read/grep (detailed tracing)
|
|
17
17
|
Layer 3: Knowledge Cache — Obsidian Vault Systems/ (accumulated explanations)
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
### Layer 1: Baseline Overviews
|
|
21
21
|
|
|
22
|
-
Engineers generate a codebase overview for each repo
|
|
22
|
+
Engineers generate a codebase overview for each repo (e.g. via `opencode /init` or similar), containing architecture, key paths, conventions, and dependencies. These overviews are stored at:
|
|
23
23
|
|
|
24
24
|
```
|
|
25
25
|
.opencode/context/repos/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
_index.md # Repo registry: name, one-line description, last-updated date
|
|
27
|
+
payment-service.md # Overview of payment-service repo
|
|
28
|
+
auth-service.md # Overview of auth-service repo
|
|
29
|
+
api-gateway.md # Overview of api-gateway repo
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
**Always load the relevant baseline overview first** before reading raw code.
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weave
|
|
3
|
+
description: Scan vault notes, enrich with frontmatter + wikilinks, maintain the Glossary, create hub notes — building a connected knowledge graph.
|
|
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, maintain the Glossary as an entity dictionary, and create hub notes for frequently referenced topics — turning scattered files into an interconnected knowledge graph.
|
|
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
|
+
| `AGENT.md` | BYOAO-managed file |
|
|
48
|
+
| `Knowledge/templates/` | Template files — not user content |
|
|
49
|
+
|
|
50
|
+
Also respect `.byoaoignore` if present (same format as `.gitignore`).
|
|
51
|
+
|
|
52
|
+
Report skipped non-markdown files at the end: "Skipped N non-markdown files".
|
|
53
|
+
|
|
54
|
+
## Process
|
|
55
|
+
|
|
56
|
+
Execute these steps in order. Be explicit about each tool call — different LLM providers must execute this consistently.
|
|
57
|
+
|
|
58
|
+
### Step 1: Load Glossary
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
obsidian read "Knowledge/Glossary.md"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Parse the Glossary table. Extract all existing terms — these are automatic wikilink candidates for every file you scan.
|
|
65
|
+
|
|
66
|
+
### Step 2: Build Vault Map
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
obsidian list
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This gives you the full list of notes. Also run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
obsidian properties sort=count counts
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This reveals the vault's structure — which properties are used, how many notes have frontmatter.
|
|
79
|
+
|
|
80
|
+
### Step 3: Scan Target Files
|
|
81
|
+
|
|
82
|
+
For each markdown file in scope (respecting exclusion rules):
|
|
83
|
+
|
|
84
|
+
#### 3a. Read the file
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
obsidian read "<note name>"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### 3b. Identify entities
|
|
91
|
+
|
|
92
|
+
Scan the content for:
|
|
93
|
+
- **People names** — proper nouns that appear to be people
|
|
94
|
+
- **Project/product names** — capitalized multi-word phrases that recur
|
|
95
|
+
- **Domain concepts** — technical terms, acronyms, recurring themes
|
|
96
|
+
- **Tool/system names** — software, services, platforms mentioned
|
|
97
|
+
- **Dates and events** — meetings, deadlines, milestones
|
|
98
|
+
|
|
99
|
+
#### 3c. Cross-reference against Glossary + existing notes
|
|
100
|
+
|
|
101
|
+
For each entity found:
|
|
102
|
+
1. Is it already a Glossary term? → Mark as wikilink candidate
|
|
103
|
+
2. Does a vault note with this name exist? → Mark as wikilink candidate
|
|
104
|
+
3. Is it a new, unrecognized entity? → Track for Glossary suggestion (Step 5)
|
|
105
|
+
|
|
106
|
+
#### 3d. Propose frontmatter
|
|
107
|
+
|
|
108
|
+
If the file has no frontmatter, or has incomplete frontmatter, propose additions:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
---
|
|
112
|
+
title: "<inferred from content or filename>"
|
|
113
|
+
type: "<inferred: meeting, idea, reference, daily, project, person, etc>"
|
|
114
|
+
date: <if identifiable from content>
|
|
115
|
+
domain: "<knowledge area: analytics, infrastructure, design, etc>"
|
|
116
|
+
references:
|
|
117
|
+
- "[[Related Note]]"
|
|
118
|
+
- "[[Glossary]]"
|
|
119
|
+
tags: [<relevant tags>]
|
|
120
|
+
status: <draft | active | completed | archived>
|
|
121
|
+
---
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Frontmatter preservation rules:**
|
|
125
|
+
- **Never overwrite** existing fields
|
|
126
|
+
- **Only add** missing fields
|
|
127
|
+
- **Merge arrays** — if file has `tags: [meeting]` and you suggest `tags: [meeting, migration]`, result is `[meeting, migration]`
|
|
128
|
+
- **Warn on conflicts** — if existing value seems wrong, note it but don't change it
|
|
129
|
+
|
|
130
|
+
#### 3e. Propose wikilinks
|
|
131
|
+
|
|
132
|
+
Convert plain text mentions to `[[wikilinks]]`:
|
|
133
|
+
- Glossary terms → `[[Term]]`
|
|
134
|
+
- Existing note names → `[[Note Name]]`
|
|
135
|
+
- People → `[[Person Name]]`
|
|
136
|
+
|
|
137
|
+
Rules:
|
|
138
|
+
- Only link the **first occurrence** of each term in a file
|
|
139
|
+
- Don't link inside code blocks, frontmatter, or existing wikilinks
|
|
140
|
+
- Don't link common English words even if they happen to match a note name
|
|
141
|
+
- Preserve the original text when the casing differs: `rate limiting` → `[[Rate Limiting|rate limiting]]`
|
|
142
|
+
|
|
143
|
+
### Step 4: Backup Before Modification
|
|
144
|
+
|
|
145
|
+
Before modifying any file, create a backup:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
mkdir -p .byoao/backups/<timestamp>
|
|
149
|
+
cp "<file path>" ".byoao/backups/<timestamp>/<filename>"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Use the current date-time as the timestamp (e.g., `2026-03-27T20-45`).
|
|
153
|
+
|
|
154
|
+
This is critical for existing folder adoption (Mode B) where files are user-created and irreplaceable.
|
|
155
|
+
|
|
156
|
+
### Step 5: Apply Changes
|
|
157
|
+
|
|
158
|
+
For each file with proposed changes:
|
|
159
|
+
1. Show the user a summary of proposed changes (frontmatter additions, wikilinks to add)
|
|
160
|
+
2. Wait for confirmation before applying
|
|
161
|
+
3. Apply changes using file edit tools
|
|
162
|
+
|
|
163
|
+
### Step 6: Glossary Maintenance
|
|
164
|
+
|
|
165
|
+
After scanning all files, analyze entity frequency:
|
|
166
|
+
|
|
167
|
+
**New term suggestions:**
|
|
168
|
+
- An entity appears in 3+ files but is not in the Glossary
|
|
169
|
+
- Present each suggestion: "'Kafka' mentioned in 8 notes. Add to Glossary? (Y/n)"
|
|
170
|
+
- For confirmed terms, use `byoao_add_glossary_term` to add them
|
|
171
|
+
|
|
172
|
+
**Auto-graduation suggestions:**
|
|
173
|
+
- A Glossary term is referenced by 5+ notes
|
|
174
|
+
- Suggest creating a standalone concept note in `Knowledge/`
|
|
175
|
+
- The concept note gets auto-generated frontmatter:
|
|
176
|
+
```yaml
|
|
177
|
+
domain: <from Glossary>
|
|
178
|
+
references:
|
|
179
|
+
- "[[note1]]"
|
|
180
|
+
- "[[note2]]"
|
|
181
|
+
```
|
|
182
|
+
- Update the Glossary entry to link to the concept note
|
|
183
|
+
|
|
184
|
+
### Step 7: Hub Note Creation
|
|
185
|
+
|
|
186
|
+
Identify entities that are frequently mentioned but have no corresponding note:
|
|
187
|
+
- "12 files mention 'Payment Migration' but no note exists — create it?"
|
|
188
|
+
- Hub notes aggregate references and provide a landing page for the topic
|
|
189
|
+
- Hub note template:
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
---
|
|
193
|
+
title: "<Topic>"
|
|
194
|
+
type: reference
|
|
195
|
+
domain: "<inferred domain>"
|
|
196
|
+
references:
|
|
197
|
+
- "[[note1]]"
|
|
198
|
+
- "[[note2]]"
|
|
199
|
+
tags: [hub]
|
|
200
|
+
status: active
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
# <Topic>
|
|
204
|
+
|
|
205
|
+
(Auto-created by /weave — this topic is mentioned across multiple notes)
|
|
206
|
+
|
|
207
|
+
## Referenced In
|
|
208
|
+
|
|
209
|
+
- [[note1]] — <brief context>
|
|
210
|
+
- [[note2]] — <brief context>
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Step 8: Report
|
|
214
|
+
|
|
215
|
+
After all changes are applied, provide a summary:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
Weave complete:
|
|
219
|
+
- Scanned: N files
|
|
220
|
+
- Enriched: N files (frontmatter + wikilinks)
|
|
221
|
+
- Wikilinks added: N
|
|
222
|
+
- Glossary terms added: N
|
|
223
|
+
- Hub notes created: N
|
|
224
|
+
- Concept notes graduated: N
|
|
225
|
+
- Orphaned files (no links): N
|
|
226
|
+
- Skipped: N non-markdown files
|
|
227
|
+
- Backups: .byoao/backups/<timestamp>/
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Single File Mode
|
|
231
|
+
|
|
232
|
+
When `file=` is provided, run the same process but only for that one file. Still read the Glossary and check for cross-references, but skip Steps 6-7 (Glossary maintenance and hub note creation are batch operations).
|
|
233
|
+
|
|
234
|
+
## Important Guidelines
|
|
235
|
+
|
|
236
|
+
- **Be conservative**: When in doubt about a wikilink or frontmatter value, skip it. False positives degrade trust.
|
|
237
|
+
- **Ask, don't assume**: Always present changes for user confirmation before applying.
|
|
238
|
+
- **Preserve user content**: Never delete, rewrite, or reorganize existing text. Only add metadata and convert mentions to links.
|
|
239
|
+
- **Domain inference**: Use Glossary domains and existing note domains to infer the domain for new notes. Consistency matters.
|
|
240
|
+
- **Idempotent**: Running /weave twice on the same file should not add duplicate wikilinks or frontmatter fields.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "0.1.0",
|
|
3
|
-
"name": "BYOAO — Confluence Page",
|
|
4
|
-
"behavior": "create",
|
|
5
|
-
"noteContentFormat": "text",
|
|
6
|
-
"properties": [
|
|
7
|
-
{
|
|
8
|
-
"name": "title",
|
|
9
|
-
"value": "{{title|safe_name}}",
|
|
10
|
-
"type": "text"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "type",
|
|
14
|
-
"value": "confluence-clip",
|
|
15
|
-
"type": "text"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "source",
|
|
19
|
-
"value": "{{url}}",
|
|
20
|
-
"type": "text"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"name": "author",
|
|
24
|
-
"value": "{{selector:.contributor-list a|wikilink}}",
|
|
25
|
-
"type": "text"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "space",
|
|
29
|
-
"value": "{{selector:#breadcrumb-nav a:first-child}}",
|
|
30
|
-
"type": "text"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "labels",
|
|
34
|
-
"value": "{{selector:.label-list a}}",
|
|
35
|
-
"type": "multitext"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "last-modified",
|
|
39
|
-
"value": "{{selector:.last-modified time}}",
|
|
40
|
-
"type": "text"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "clipped-date",
|
|
44
|
-
"value": "{{date}}",
|
|
45
|
-
"type": "date"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "status",
|
|
49
|
-
"value": "inbox",
|
|
50
|
-
"type": "text"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"name": "tags",
|
|
54
|
-
"value": "[confluence-clip, {{\"Based on this Confluence page content, suggest 3 relevant topic tags as comma-separated values (no # prefix, lowercase, hyphenated). Output ONLY the tags, nothing else.\"|prompt}}]",
|
|
55
|
-
"type": "multitext"
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"noteNameFormat": "{{date}} — {{title|safe_name|truncate:80}}",
|
|
59
|
-
"path": "Inbox",
|
|
60
|
-
"triggers": ["atlassian.net/wiki", "confluence"],
|
|
61
|
-
"context": "{{content}}",
|
|
62
|
-
"body": "## Summary\n\n{{\"Summarize the key points of this Confluence page in 3-5 bullet points. Focus on decisions, action items, and important context. Be concise.\"|prompt}}\n\n---\n\n## Original Content\n\n{{content}}"
|
|
63
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "0.1.0",
|
|
3
|
-
"name": "BYOAO — General Article",
|
|
4
|
-
"behavior": "create",
|
|
5
|
-
"noteContentFormat": "text",
|
|
6
|
-
"properties": [
|
|
7
|
-
{
|
|
8
|
-
"name": "title",
|
|
9
|
-
"value": "{{title|safe_name}}",
|
|
10
|
-
"type": "text"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "type",
|
|
14
|
-
"value": "web-clip",
|
|
15
|
-
"type": "text"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "source",
|
|
19
|
-
"value": "{{url}}",
|
|
20
|
-
"type": "text"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"name": "author",
|
|
24
|
-
"value": "{% if author %}{{author|wikilink}}{% elseif meta:property:article:author %}{{meta:property:article:author|wikilink}}{% else %}unknown{% endif %}",
|
|
25
|
-
"type": "text"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "published",
|
|
29
|
-
"value": "{% if meta:property:article:published_time %}{{meta:property:article:published_time|date:'YYYY-MM-DD'}}{% else %}{{date}}{% endif %}",
|
|
30
|
-
"type": "date"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "clipped-date",
|
|
34
|
-
"value": "{{date}}",
|
|
35
|
-
"type": "date"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "status",
|
|
39
|
-
"value": "inbox",
|
|
40
|
-
"type": "text"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "tags",
|
|
44
|
-
"value": "[web-clip, {{\"Based on this article, suggest 3 relevant topic tags as comma-separated values (no # prefix, lowercase, hyphenated). Output ONLY the tags, nothing else.\"|prompt}}]",
|
|
45
|
-
"type": "multitext"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"noteNameFormat": "{{date}} — {{title|safe_name|truncate:80}}",
|
|
49
|
-
"path": "Inbox",
|
|
50
|
-
"triggers": [],
|
|
51
|
-
"context": "{{content|truncate:3000}}",
|
|
52
|
-
"body": "## Summary\n\n{{\"Summarize this article in 3-5 bullet points. Focus on key insights, conclusions, and actionable takeaways. Be concise.\"|prompt}}\n\n## Key Quotes\n\n{% if highlights %}{% for highlight in highlights %}\n> {{highlight}}\n{% endfor %}{% else %}\n*No highlights selected. Use the Web Clipper highlighter to capture key passages.*\n{% endif %}\n\n---\n\n## Original Content\n\n{{content}}\n\n---\n\n*Clipped from [{{domain}}]({{url}}) on {{date}}*"
|
|
53
|
-
}
|