@jayjiang/byoao 0.2.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 (76) hide show
  1. package/dist/cli/cli-program.js +241 -0
  2. package/dist/cli/cli-program.js.map +1 -0
  3. package/dist/cli/installer.js +226 -0
  4. package/dist/cli/installer.js.map +1 -0
  5. package/dist/cli/ui.js +157 -0
  6. package/dist/cli/ui.js.map +1 -0
  7. package/dist/hooks/idle-suggestions.js +14 -0
  8. package/dist/hooks/idle-suggestions.js.map +1 -0
  9. package/dist/hooks/system-transform.js +34 -0
  10. package/dist/hooks/system-transform.js.map +1 -0
  11. package/dist/index.js +43 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/plugin-config.js +57 -0
  14. package/dist/plugin-config.js.map +1 -0
  15. package/dist/tools/add-glossary-term.js +19 -0
  16. package/dist/tools/add-glossary-term.js.map +1 -0
  17. package/dist/tools/add-member.js +21 -0
  18. package/dist/tools/add-member.js.map +1 -0
  19. package/dist/tools/add-project.js +24 -0
  20. package/dist/tools/add-project.js.map +1 -0
  21. package/dist/tools/init-vault.js +82 -0
  22. package/dist/tools/init-vault.js.map +1 -0
  23. package/dist/tools/vault-doctor.js +38 -0
  24. package/dist/tools/vault-doctor.js.map +1 -0
  25. package/dist/tools/vault-status.js +18 -0
  26. package/dist/tools/vault-status.js.map +1 -0
  27. package/dist/vault/create.js +230 -0
  28. package/dist/vault/create.js.map +1 -0
  29. package/dist/vault/doctor.js +148 -0
  30. package/dist/vault/doctor.js.map +1 -0
  31. package/dist/vault/glossary.js +33 -0
  32. package/dist/vault/glossary.js.map +1 -0
  33. package/dist/vault/member.js +67 -0
  34. package/dist/vault/member.js.map +1 -0
  35. package/dist/vault/obsidian-check.js +125 -0
  36. package/dist/vault/obsidian-check.js.map +1 -0
  37. package/dist/vault/obsidian-cli.js +47 -0
  38. package/dist/vault/obsidian-cli.js.map +1 -0
  39. package/dist/vault/opencode-check.js +65 -0
  40. package/dist/vault/opencode-check.js.map +1 -0
  41. package/dist/vault/preset.js +48 -0
  42. package/dist/vault/preset.js.map +1 -0
  43. package/dist/vault/project.js +68 -0
  44. package/dist/vault/project.js.map +1 -0
  45. package/dist/vault/status.js +135 -0
  46. package/dist/vault/status.js.map +1 -0
  47. package/dist/vault/template.js +14 -0
  48. package/dist/vault/template.js.map +1 -0
  49. package/package.json +58 -0
  50. package/src/assets/obsidian-skills/defuddle.md +41 -0
  51. package/src/assets/obsidian-skills/json-canvas.md +244 -0
  52. package/src/assets/obsidian-skills/obsidian-bases.md +497 -0
  53. package/src/assets/obsidian-skills/obsidian-cli.md +106 -0
  54. package/src/assets/obsidian-skills/obsidian-markdown.md +196 -0
  55. package/src/assets/presets/common/AGENT.md.hbs +29 -0
  56. package/src/assets/presets/common/Glossary.md.hbs +44 -0
  57. package/src/assets/presets/common/Start Here.md.hbs +95 -0
  58. package/src/assets/presets/common/obsidian/core-plugins.json +33 -0
  59. package/src/assets/presets/common/obsidian/daily-notes.json +5 -0
  60. package/src/assets/presets/common/obsidian/templates.json +3 -0
  61. package/src/assets/presets/common/templates/Daily Note.md +19 -0
  62. package/src/assets/presets/common/templates/Decision Record.md +32 -0
  63. package/src/assets/presets/common/templates/Investigation.md +34 -0
  64. package/src/assets/presets/common/templates/Meeting Notes.md +25 -0
  65. package/src/assets/presets/pm-tpm/agent-section.hbs +15 -0
  66. package/src/assets/presets/pm-tpm/preset.json +12 -0
  67. package/src/assets/presets/pm-tpm/templates/Feature Doc.md +45 -0
  68. package/src/assets/presets/pm-tpm/templates/Sprint Handoff.md +38 -0
  69. package/src/assets/web-clipper/confluence-page.json +63 -0
  70. package/src/assets/web-clipper/general-article.json +53 -0
  71. package/src/assets/web-clipper/jira-issue.json +68 -0
  72. package/src/assets/web-clipper/meeting-notes.json +53 -0
  73. package/src/skills/enrich-document.md +52 -0
  74. package/src/skills/init-knowledge-base.md +85 -0
  75. package/src/skills/system-explainer.md +58 -0
  76. package/src/skills/vault-doctor.md +73 -0
@@ -0,0 +1,53 @@
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": "00-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
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "schemaVersion": "0.1.0",
3
+ "name": "BYOAO — Jira Issue",
4
+ "behavior": "create",
5
+ "noteContentFormat": "text",
6
+ "properties": [
7
+ {
8
+ "name": "title",
9
+ "value": "{{selector:#summary-val|default:title}}",
10
+ "type": "text"
11
+ },
12
+ {
13
+ "name": "type",
14
+ "value": "jira-clip",
15
+ "type": "text"
16
+ },
17
+ {
18
+ "name": "jira-key",
19
+ "value": "{{selector:#key-val}}",
20
+ "type": "text"
21
+ },
22
+ {
23
+ "name": "source",
24
+ "value": "{{url}}",
25
+ "type": "text"
26
+ },
27
+ {
28
+ "name": "status",
29
+ "value": "{{selector:#status-val span}}",
30
+ "type": "text"
31
+ },
32
+ {
33
+ "name": "priority",
34
+ "value": "{{selector:#priority-val img|attr:alt}}",
35
+ "type": "text"
36
+ },
37
+ {
38
+ "name": "assignee",
39
+ "value": "{{selector:#assignee-val span|wikilink}}",
40
+ "type": "text"
41
+ },
42
+ {
43
+ "name": "reporter",
44
+ "value": "{{selector:#reporter-val span|wikilink}}",
45
+ "type": "text"
46
+ },
47
+ {
48
+ "name": "issue-type",
49
+ "value": "{{selector:#type-val}}",
50
+ "type": "text"
51
+ },
52
+ {
53
+ "name": "clipped-date",
54
+ "value": "{{date}}",
55
+ "type": "date"
56
+ },
57
+ {
58
+ "name": "tags",
59
+ "value": "[jira-clip]",
60
+ "type": "multitext"
61
+ }
62
+ ],
63
+ "noteNameFormat": "{{selector:#key-val|default:title|safe_name}} — {{selector:#summary-val|default:title|safe_name|truncate:60}}",
64
+ "path": "00-Inbox",
65
+ "triggers": ["atlassian.net/browse", "atlassian.net/jira"],
66
+ "context": "{{content}}",
67
+ "body": "## Summary\n\n**Status**: {{selector:#status-val span}} | **Priority**: {{selector:#priority-val img|attr:alt}} | **Assignee**: {{selector:#assignee-val span}}\n\n## Description\n\n{{selector:#description-val|markdown}}\n\n{% if selector:.acceptance-criteria %}## Acceptance Criteria\n\n{{selector:.acceptance-criteria|markdown}}\n{% endif %}\n\n---\n\n*Clipped from [Jira]({{url}}) on {{date}}*"
68
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "schemaVersion": "0.1.0",
3
+ "name": "BYOAO — Meeting Notes",
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": "meeting-notes",
15
+ "type": "text"
16
+ },
17
+ {
18
+ "name": "source",
19
+ "value": "{{url}}",
20
+ "type": "text"
21
+ },
22
+ {
23
+ "name": "date",
24
+ "value": "{{date}}",
25
+ "type": "date"
26
+ },
27
+ {
28
+ "name": "participants",
29
+ "value": "",
30
+ "type": "multitext"
31
+ },
32
+ {
33
+ "name": "project",
34
+ "value": "",
35
+ "type": "text"
36
+ },
37
+ {
38
+ "name": "status",
39
+ "value": "inbox",
40
+ "type": "text"
41
+ },
42
+ {
43
+ "name": "tags",
44
+ "value": "[meeting-notes]",
45
+ "type": "multitext"
46
+ }
47
+ ],
48
+ "noteNameFormat": "{{date}} — Meeting — {{title|safe_name|truncate:60}}",
49
+ "path": "00-Inbox",
50
+ "triggers": ["meet.google.com", "calendar.google.com", "outlook.office.com"],
51
+ "context": "{% if selection %}{{selection}}{% else %}{{content|truncate:3000}}{% endif %}",
52
+ "body": "## Meeting Info\n\n- **Date**: {{date}}\n- **Participants**: *fill in after meeting*\n- **Project**: *link to project*\n\n## Agenda / Context\n\n{% if selection %}{{selection|markdown}}{% else %}{{content|markdown}}{% endif %}\n\n## Notes\n\n- \n\n## Action Items\n\n- [ ] \n\n## Decisions\n\n- \n\n---\n\n*Clipped from [{{domain}}]({{url}}) on {{date}}*"
53
+ }
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: enrich-document
3
+ description: Auto-enrich an Obsidian note with frontmatter properties and wikilinks. Reads existing vault context to suggest connections.
4
+ ---
5
+
6
+ # Enrich Document
7
+
8
+ You are a document enrichment assistant. Your job is to improve Obsidian notes by adding proper frontmatter and wikilinks based on the vault's existing content.
9
+
10
+ ## Process
11
+
12
+ 1. **Read the target note** that needs enrichment.
13
+
14
+ 2. **Scan the vault** for context:
15
+ - Use `byoao_vault_status` to understand what's in the vault
16
+ - Read `AGENT.md` for project/people index
17
+ - Read `30-Knowledge/Glossary.md` for domain terms
18
+
19
+ 3. **Add/fix frontmatter**:
20
+ - Ensure `title`, `type`, `status`, `date`, `tags` are present
21
+ - Infer `type` from content: meeting → "meeting", feature spec → "feature", etc.
22
+ - Add `team`, `project`, `stakeholders` if identifiable from content
23
+
24
+ 4. **Add wikilinks**:
25
+ - Link mentions of people names to `[[Person Name]]`
26
+ - Link mentions of projects to `[[Project Name]]`
27
+ - Link domain terms to `[[Glossary]]` or concept notes
28
+ - Link related system references to `50-Systems/` docs
29
+
30
+ 5. **Preserve content**: Never delete or rewrite user content. Only add frontmatter and convert plain text mentions to wikilinks.
31
+
32
+ ## Example
33
+
34
+ Before:
35
+ ```markdown
36
+ Met with Alice and Bob about the payment migration. Need to check with the platform team about API rate limits.
37
+ ```
38
+
39
+ After:
40
+ ```markdown
41
+ ---
42
+ title: "Payment Migration Discussion"
43
+ type: meeting
44
+ date: 2026-03-12
45
+ team: HDR Operations
46
+ project: Payment Migration
47
+ stakeholders: [Alice, Bob]
48
+ tags: [meeting, payment, migration]
49
+ ---
50
+
51
+ Met with [[Alice]] and [[Bob]] about the [[Payment Migration]]. Need to check with the [[Platform Team]] about API rate limits.
52
+ ```
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: init-knowledge-base
3
+ description: Interactive skill that creates a fully configured Obsidian knowledge base for any team. Guides the user through a 4-phase conversation to gather team info, create vault structure, populate content, and provide onboarding instructions.
4
+ ---
5
+
6
+ # Init Knowledge Base
7
+
8
+ You are a knowledge base setup assistant. Your job is to create a fully configured Obsidian vault for any team through an interactive conversation.
9
+
10
+ ## Pre-flight Check
11
+
12
+ Before starting, call `byoao_vault_status` with a dummy path to verify the BYOAO plugin is loaded. If the tool is not available, tell the user to run `byoao install` first.
13
+
14
+ Also check Obsidian status — if Obsidian is not installed, guide the user to download it from https://obsidian.md/download. If not running, remind them to open it.
15
+
16
+ ## Execution Flow
17
+
18
+ Run these 4 phases sequentially. **Confirm with the user before advancing to each new phase.** The user can skip Phase 3 (content population) entirely — the vault will still be functional.
19
+
20
+ ---
21
+
22
+ ### Phase 1: Gather Information
23
+
24
+ Ask the user the following questions. Only `TEAM_NAME` is required — everything else has defaults or can be skipped.
25
+
26
+ **Required:**
27
+ - "What is your team name?" → `TEAM_NAME`
28
+
29
+ **Optional (with defaults):**
30
+ - "Where should I create the vault?" → `VAULT_PATH` (default: `~/Documents/{TEAM_NAME} Workspace`)
31
+ - "Who are your team members? (name and role for each)" → `MEMBERS` list of `{name, role}`
32
+ - "What are 5-10 key terms in your domain? (brief definition for each)" → `GLOSSARY_ENTRIES`
33
+ - "What are your active projects? (name and one-line description)" → `PROJECTS`
34
+ - "What is your JIRA host and project key?" → `JIRA_HOST`, `JIRA_PROJECT` (default: empty)
35
+
36
+ **Conversation tips:**
37
+ - Accept minimal input. If the user says "just create a basic vault", use only `TEAM_NAME` and defaults.
38
+ - Accept free-form input. If the user pastes a list of names, parse it. Don't demand a specific format.
39
+ - Summarize what you collected before moving to Phase 2.
40
+
41
+ ---
42
+
43
+ ### Phase 2: Create Vault
44
+
45
+ Call the `byoao_init_vault` tool with the collected information. This tool:
46
+ - Checks that Obsidian is installed (will error if not)
47
+ - Creates the full directory structure
48
+ - Copies .obsidian configs and note templates
49
+ - Generates Glossary.md, Start Here.md, AGENT.md, CLAUDE.md
50
+ - Creates people notes, project notes, and team index
51
+ - Wires all wikilinks
52
+
53
+ Tell the user what was created and confirm before proceeding.
54
+
55
+ ---
56
+
57
+ ### Phase 3: Enrich (Optional)
58
+
59
+ If the user wants to add more content:
60
+ - Use `byoao_add_member` to add individual team members
61
+ - Use `byoao_add_project` to add individual projects
62
+ - Use `byoao_add_glossary_term` to add domain terms
63
+
64
+ Each tool handles wikilink updates automatically.
65
+
66
+ ---
67
+
68
+ ### Phase 4: Guide the User
69
+
70
+ Provide these instructions:
71
+
72
+ 1. **Open the vault**: "Open Obsidian → `Open folder as vault` → select `{VAULT_PATH}`"
73
+ 2. **Start exploring**: "Open `Start Here.md` and follow the 5 Essential Operations"
74
+ 3. **Check the graph**: "Try Graph View (`Cmd+G`) — your vault has {N} notes with {M} wikilinks"
75
+ 4. **Daily workflow**: "Each day, press `Cmd+T` → Daily Note to create your daily note in `Daily/`"
76
+ 5. **Add content over time**: "Use templates (`Cmd+T`) to add meeting notes, feature docs, and investigations as they come up"
77
+
78
+ ---
79
+
80
+ ## Key Principles
81
+
82
+ - **Minimum viable input**: Only `TEAM_NAME` is required.
83
+ - **Interactive, not scripted**: Ask questions, confirm answers, adapt.
84
+ - **Idempotent where possible**: If a file already exists, mention it and don't overwrite.
85
+ - **Teach through structure**: The vault teaches Obsidian concepts through use.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: system-explainer
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
+ ---
5
+
6
+ # System Explainer
7
+
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
+
10
+ ## Three-Layer Knowledge Strategy
11
+
12
+ System knowledge comes from three sources, in priority order:
13
+
14
+ ```
15
+ Layer 1: Baseline Overview — Engineer-generated CLAUDE.md per repo (high-level architecture)
16
+ Layer 2: Live Code Access — Local repo clone + file read/grep (detailed tracing)
17
+ Layer 3: Knowledge Cache — Obsidian Vault Systems/ (accumulated explanations)
18
+ ```
19
+
20
+ ### Layer 1: Baseline Overviews
21
+
22
+ Engineers generate a codebase overview for each repo using Claude Code `/init`, which produces a CLAUDE.md containing architecture, key paths, conventions, and dependencies. These overviews are stored at:
23
+
24
+ ```
25
+ .opencode/context/repos/
26
+ ├── _index.md # Repo registry: name, one-line description, last-updated date
27
+ ├── payment-service.md # CLAUDE.md content from payment-service repo
28
+ ├── auth-service.md # CLAUDE.md content from auth-service repo
29
+ └── api-gateway.md # CLAUDE.md content from api-gateway repo
30
+ ```
31
+
32
+ **Always load the relevant baseline overview first** before reading raw code.
33
+
34
+ ### Layer 2: Local Repo Clones
35
+
36
+ For detailed questions, read the actual code from local clones at `~/repos/`. Use file read + grep + git log to trace specific workflows.
37
+
38
+ ### Layer 3: Obsidian Knowledge Cache
39
+
40
+ Previously generated explanations are cached in `Systems/`. Reuse them when the question matches and the doc is still current.
41
+
42
+ ## Behavior
43
+
44
+ 1. **Parse the question** — identify the target system, service, or feature.
45
+ 2. **Load baseline overview** — read `.opencode/context/repos/{service}.md`.
46
+ 3. **Check Obsidian vault** — search `50-Systems/` for existing knowledge docs.
47
+ 4. **If more detail needed** — read the local repo clone using baseline as guide.
48
+ 5. **Staleness detection** — flag discrepancies between baseline and actual code.
49
+ 6. **Synthesize a clear explanation** with Mermaid diagrams where helpful.
50
+ 7. **Save to Obsidian vault** — create or update a doc in `Systems/`.
51
+
52
+ ## Output Style
53
+
54
+ - Lead with **what the system does** (behavior), not how it's coded
55
+ - Use workflow descriptions: "When X happens, the system does Y, then Z"
56
+ - Include Mermaid diagrams for multi-step flows
57
+ - No code blocks unless explicitly requested
58
+ - Use `[[wikilinks]]` to connect related vault docs
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: vault-doctor
3
+ description: Diagnose vault health — find missing frontmatter, orphan notes, broken wikilinks, and AGENT.md drift. Suggests fixes and asks for confirmation before making changes.
4
+ ---
5
+
6
+ # Vault Doctor
7
+
8
+ You are a vault health assistant. Your job is to diagnose issues in an Obsidian vault and help the user fix them.
9
+
10
+ ## Execution Flow
11
+
12
+ ### Step 1: Locate Vault
13
+
14
+ Ask the user for their vault path, or detect it from the current working directory (look for AGENT.md in the cwd or parent directories).
15
+
16
+ ### Step 2: Run Diagnosis
17
+
18
+ Call `byoao_vault_doctor` with the vault path. This runs 5 checks:
19
+
20
+ 1. **Missing frontmatter** — notes without any YAML frontmatter
21
+ 2. **Missing type/tags** — notes with frontmatter but no `type` or `tags` field
22
+ 3. **AGENT.md drift** — AGENT.md references people or projects that don't have notes
23
+ 4. **Orphan notes** — notes with no incoming or outgoing wikilinks
24
+ 5. **Broken wikilinks** — links that point to non-existent notes
25
+
26
+ ### Step 3: Present Results
27
+
28
+ Format the report by severity:
29
+
30
+ ```
31
+ ⚠ 3 notes without frontmatter
32
+ - Inbox/quick-thought.md
33
+ - Projects/demo-notes.md
34
+ - Knowledge/api-overview.md
35
+
36
+ ⚠ AGENT.md lists [[Kent]] but no People/Kent.md found
37
+
38
+ ℹ 2 orphan notes (no incoming or outgoing wikilinks)
39
+ - Archive/old-draft.md
40
+ - Inbox/random.md
41
+
42
+ ✓ 0 broken wikilinks
43
+ ```
44
+
45
+ ### Step 4: Suggest Fixes
46
+
47
+ For each issue category, suggest a concrete next action:
48
+
49
+ | Issue | Suggested Fix |
50
+ |-------|--------------|
51
+ | Missing frontmatter | "Run `/enrich-document` on these files to add structure" |
52
+ | Missing type/tags | "Run `/enrich-document` to fill in metadata" |
53
+ | AGENT.md drift | "Create the missing note? I can run `byoao_add_member` or `byoao_add_project`" |
54
+ | Orphan notes | "Consider adding `[[wikilinks]]` to connect them, or archive if unused" |
55
+ | Broken wikilinks | "Create the target note, or fix the link name" |
56
+
57
+ **Always ask for user confirmation before making changes.** Do not auto-fix.
58
+
59
+ ### Step 5: Update AGENT.md Timestamp
60
+
61
+ After fixes are applied (with user consent), append or update a `Last Scanned` line at the bottom of AGENT.md:
62
+
63
+ ```markdown
64
+ ---
65
+ _Last scanned by vault-doctor: 2026-03-13_
66
+ ```
67
+
68
+ ## Key Principles
69
+
70
+ - **Diagnose + suggest, never auto-fix**
71
+ - **Group by severity** — warnings first, info second
72
+ - **Actionable suggestions** — tell the user exactly what to do
73
+ - **Respect user agency** — always ask before modifying files