oh-my-second-brain 0.1.5 → 0.1.7
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/adapters/README.md +6 -6
- package/adapters/claude-code/.claude-plugin/plugin.json +1 -1
- package/adapters/claude-code/CLAUDE.md +2 -2
- package/adapters/claude-code/skills/capture/SKILL.md +1 -1
- package/adapters/claude-code/skills/define/SKILL.md +4 -4
- package/adapters/claude-code/skills/doctor/SKILL.md +3 -3
- package/adapters/claude-code/skills/retrieve/SKILL.md +14 -9
- package/adapters/claude-code/skills/setup/SKILL.md +12 -11
- package/adapters/claude-code/skills/uninstall/SKILL.md +4 -4
- package/adapters/codex/.codex-plugin/plugin.json +1 -1
- package/adapters/codex/.mcp.json +1 -3
- package/adapters/codex/AGENTS.md +1 -1
- package/adapters/codex/rules/oms.md +5 -5
- package/adapters/codex/skills/oms-doctor/SKILL.md +1 -1
- package/adapters/codex/skills/oms-install/SKILL.md +1 -1
- package/adapters/codex/skills/oms-retrieve/SKILL.md +9 -1
- package/adapters/codex/skills/oms-setup/SKILL.md +2 -2
- package/adapters/codex/skills/oms-uninstall/SKILL.md +2 -2
- package/adapters/hermes/SOUL.md +2 -2
- package/adapters/hermes/manifest.json +1 -1
- package/adapters/hermes/skills/doctor/SKILL.md +1 -1
- package/adapters/hermes/skills/install/SKILL.md +1 -1
- package/adapters/hermes/skills/retrieve/SKILL.md +9 -1
- package/adapters/hermes/skills/setup/SKILL.md +2 -2
- package/adapters/hermes/skills/uninstall/SKILL.md +2 -2
- package/core/agents/librarian.md +1 -1
- package/core/skills/capture/SKILL.md +9 -7
- package/core/skills/define/SKILL.md +2 -2
- package/core/skills/doctor/SKILL.md +2 -2
- package/core/skills/retrieve/SKILL.md +17 -5
- package/core/skills/setup/SKILL.md +3 -3
- package/core/skills/uninstall/SKILL.md +4 -4
- package/dist/cli/oms.js +15 -31
- package/dist/cli/oms.js.map +1 -1
- package/dist/conventions/frontmatter.d.ts +11 -0
- package/dist/conventions/frontmatter.js +56 -6
- package/dist/conventions/frontmatter.js.map +1 -1
- package/dist/graph/explore.d.ts +34 -0
- package/dist/graph/explore.js +181 -0
- package/dist/graph/explore.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/install/hosts.js +4 -8
- package/dist/install/hosts.js.map +1 -1
- package/dist/mcp/server.js +69 -8
- package/dist/mcp/server.js.map +1 -1
- package/dist/retrieve/morning.d.ts +36 -0
- package/dist/retrieve/morning.js +73 -0
- package/dist/retrieve/morning.js.map +1 -0
- package/dist/runtime/assets.d.ts +7 -0
- package/dist/runtime/assets.js +13 -0
- package/dist/runtime/assets.js.map +1 -0
- package/dist/search/qmd.d.ts +59 -0
- package/dist/search/qmd.js +141 -0
- package/dist/search/qmd.js.map +1 -0
- package/docs/install.md +19 -20
- package/docs/release.md +5 -1
- package/package.json +5 -4
- package/scripts/install.sh +8 -5
- package/scripts/uninstall.sh +6 -3
package/adapters/README.md
CHANGED
|
@@ -43,7 +43,7 @@ adapters/<host>/
|
|
|
43
43
|
|
|
44
44
|
### claude-code (REAL installable v0)
|
|
45
45
|
|
|
46
|
-
Release contract: the npm tarball must include `adapters/claude-code/` because `
|
|
46
|
+
Release contract: the npm tarball must include `adapters/claude-code/` because `oms setup --install-claude` prints a packaged adapter path for `claude plugin install`.
|
|
47
47
|
|
|
48
48
|
- **Manifest**: `.claude-plugin/plugin.json`
|
|
49
49
|
- Schema: `{ name, version, description, author, license, keywords, skills: string[] }`
|
|
@@ -80,11 +80,11 @@ contract validation, retrieve, graph/status, and gated capture tools.
|
|
|
80
80
|
All three hosts natively support MCP (`.mcp.json` for claude-code and codex; "any MCP server" for Hermes).
|
|
81
81
|
In the current repository, `src/mcp/server.ts` starts a real stdio MCP server via `oms mcp`.
|
|
82
82
|
|
|
83
|
-
The MCP server currently exposes status/read/cache/capture tools:
|
|
83
|
+
The MCP server currently exposes status/read/cache/retrieve/capture tools:
|
|
84
84
|
`oms_graph_status`, `oms_graph_build`, `oms_list_concepts`,
|
|
85
|
-
`
|
|
86
|
-
`oms_capture_prepare`, and `oms_capture_commit`.
|
|
87
|
-
Capture commit is gated by path-safety, vault-confinement, and contract validation. The CLI (`
|
|
85
|
+
`oms_retrieve_context`, `oms_retrieve_by_axis`, `oms_lazy_load_note`,
|
|
86
|
+
`oms_validate_contract`, `oms_capture_prepare`, and `oms_capture_commit`.
|
|
87
|
+
Capture commit is gated by path-safety, vault-confinement, and contract validation. The CLI (`oms setup`, `oms install`, `oms uninstall`, `oms doctor`) remains the real surface for lifecycle commands.
|
|
88
88
|
|
|
89
89
|
---
|
|
90
90
|
|
|
@@ -93,6 +93,6 @@ Capture commit is gated by path-safety, vault-confinement, and contract validati
|
|
|
93
93
|
1. Create `adapters/<host>/`.
|
|
94
94
|
2. Write the host-specific manifest in the correct subdirectory and schema.
|
|
95
95
|
3. Write the convention-file shim (`CLAUDE.md` / `AGENTS.md` / `SOUL.md` / whatever the host uses).
|
|
96
|
-
4. Write skill wrappers that shell out to `
|
|
96
|
+
4. Write skill wrappers that shell out to `oms <verb>` (for lifecycle) or call the MCP server (for capture/retrieve).
|
|
97
97
|
5. Document the host's structural differences in this table.
|
|
98
98
|
6. Do **not** modify `core/` or add host-specific logic to shared code.
|
|
@@ -8,7 +8,7 @@ This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
|
|
|
8
8
|
All knowledge capture and retrieval must follow the declared semantic convention.
|
|
9
9
|
|
|
10
10
|
**Before working with vault notes:**
|
|
11
|
-
- Run `
|
|
11
|
+
- Run `oms doctor` to validate existing notes against the convention (exits 0, non-blocking).
|
|
12
12
|
- Read `.oms/taxonomy.yaml` to understand which folders hold which concepts.
|
|
13
13
|
- Read `.oms/concepts/*.yaml` to understand field requirements and lenses.
|
|
14
14
|
|
|
@@ -23,4 +23,4 @@ All knowledge capture and retrieval must follow the declared semantic convention
|
|
|
23
23
|
- Return only the fields the lens specifies — do not dump full frontmatter.
|
|
24
24
|
|
|
25
25
|
**Convention violations are warnings, not errors (v0).**
|
|
26
|
-
`
|
|
26
|
+
`oms doctor` always exits 0. Fix violations incrementally.
|
|
@@ -27,7 +27,7 @@ after prepare returns `ready` or the user has supplied missing fields.
|
|
|
27
27
|
5. If required fields are missing, ask for them; do not write.
|
|
28
28
|
6. If placement is ambiguous, route to inbox.
|
|
29
29
|
7. Commit only through `oms_capture_commit` (`create` or `append`).
|
|
30
|
-
8. Shell out: `
|
|
30
|
+
8. Shell out: `oms doctor` (non-blocking, exits 0) to confirm the note is clean.
|
|
31
31
|
|
|
32
32
|
## Example
|
|
33
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oms-define
|
|
3
|
-
description: Grow the vault convention by adding a metadata field to a concept. Entry point is
|
|
3
|
+
description: Grow the vault convention by adding a metadata field to a concept. Entry point is oms define (roadmap).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: oms-define (Claude Code)
|
|
@@ -19,7 +19,7 @@ Each frontmatter key is a unit of convention with a declared `intent`, type, and
|
|
|
19
19
|
Intended to shell out to:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
22
|
+
oms define
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
**Roadmap note:** The `oms define` interactive runtime is not yet implemented in v0.
|
|
@@ -34,7 +34,7 @@ Today this skill guides you through the same steps manually (agent-guided).
|
|
|
34
34
|
5. Choose **required**: yes / no.
|
|
35
35
|
6. Optionally set **normalize** (e.g. `lowercase`) or **immutable** (lock after creation).
|
|
36
36
|
7. Append the entry to `vault/.oms/concepts/<concept>.yaml`.
|
|
37
|
-
8. Run `
|
|
37
|
+
8. Run `oms doctor` to validate existing notes against the updated schema.
|
|
38
38
|
|
|
39
39
|
## YAML snippet to append
|
|
40
40
|
|
|
@@ -48,4 +48,4 @@ fields:
|
|
|
48
48
|
|
|
49
49
|
## When the runtime ships
|
|
50
50
|
|
|
51
|
-
`
|
|
51
|
+
`oms define` will run the same Q&A interactively and write the YAML for you.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oms-doctor
|
|
3
|
-
description: Validate vault notes against the Oh My Second Brain convention by running
|
|
3
|
+
description: Validate vault notes against the Oh My Second Brain convention by running oms doctor.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: oms-doctor (Claude Code)
|
|
@@ -19,7 +19,7 @@ This skill is **REAL in v0** — it shells out to the fully-implemented CLI.
|
|
|
19
19
|
Shells out to:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
22
|
+
oms doctor [--vault <path>]
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
The CLI will:
|
|
@@ -39,7 +39,7 @@ The CLI will:
|
|
|
39
39
|
## Example
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
|
|
42
|
+
oms doctor --vault ~/Documents/MyVault
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
## Sample output
|
|
@@ -18,21 +18,25 @@ Surface the right notes and fields for a given purpose using the vault's declare
|
|
|
18
18
|
Conceptually shells out to:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
21
|
+
oms retrieve
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
**Runtime note:** Retrieval is available through MCP tools
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
**Runtime note:** Retrieval is available through MCP tools. Prefer
|
|
25
|
+
`oms_retrieve_context` for live graph + qmd context retrieval, then
|
|
26
|
+
`oms_lazy_load_note` after selecting candidate notes. `oms_retrieve_by_axis`
|
|
27
|
+
remains available for legacy cache-backed axis retrieval.
|
|
27
28
|
|
|
28
29
|
## Agent-guided steps (v0)
|
|
29
30
|
|
|
30
31
|
1. Clarify the user's **retrieval purpose** (synthesize, audit, plan, review, etc.).
|
|
31
32
|
2. Narrow by declared **folder/concept/property/wikilink axes** where possible.
|
|
32
33
|
3. Match the purpose to a declared **retrieval view** (`lenses` in YAML) in `vault/.oms/concepts/*.yaml`.
|
|
33
|
-
4.
|
|
34
|
-
5.
|
|
35
|
-
|
|
34
|
+
4. Call MCP `oms_retrieve_context` with the best available axes and query.
|
|
35
|
+
5. Use default `qmdScope: "global"` for broad semantic search; use
|
|
36
|
+
`qmdScope: "graph"` only when qmd must stay inside the selected graph
|
|
37
|
+
candidates.
|
|
38
|
+
6. For each note, return the retrieval-view fields and lazy-load body only when needed.
|
|
39
|
+
7. Return results grouped by concept/folder with retrieval-view frontmatter.
|
|
36
40
|
|
|
37
41
|
## Example
|
|
38
42
|
|
|
@@ -51,5 +55,6 @@ Purpose: "Synthesize my transformer papers"
|
|
|
51
55
|
|
|
52
56
|
## Runtime
|
|
53
57
|
|
|
54
|
-
Use MCP `
|
|
55
|
-
|
|
58
|
+
Use MCP `oms_retrieve_context` for live graph/qmd retrieval. Use MCP
|
|
59
|
+
`oms_retrieve_by_axis` only for legacy axis-first cache retrieval. Use MCP
|
|
60
|
+
`oms_lazy_load_note` only after selecting candidate notes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oms-setup
|
|
3
|
-
description: Adopt an existing Obsidian vault into the Oh My Second Brain convention by running
|
|
3
|
+
description: Adopt an existing Obsidian vault into the Oh My Second Brain convention by running oms setup.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: oms-setup (Claude Code)
|
|
@@ -19,8 +19,8 @@ This skill is **REAL in v0** — it shells out to the fully-implemented CLI.
|
|
|
19
19
|
Shells out to:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
oms setup [--vault <path>] [--yes] [--install-claude]
|
|
23
|
+
oms install [--runtime <auto|all|claude|codex|hermes>] [--vault <path>] [--dry-run] [--execute] [--yes]
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
The CLI will:
|
|
@@ -43,19 +43,19 @@ The CLI will:
|
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
# Interactive (recommended first run):
|
|
46
|
-
|
|
46
|
+
oms setup --vault ~/Documents/MyVault
|
|
47
47
|
|
|
48
48
|
# Non-interactive (CI / scripted):
|
|
49
|
-
|
|
49
|
+
oms setup --vault ~/Documents/MyVault --yes
|
|
50
50
|
|
|
51
51
|
# Preview all host adapter installs:
|
|
52
|
-
|
|
52
|
+
oms install --runtime all --vault ~/Documents/MyVault --dry-run
|
|
53
53
|
|
|
54
54
|
# Install all host adapter/MCP registrations:
|
|
55
|
-
|
|
55
|
+
oms install --runtime all --vault ~/Documents/MyVault --yes
|
|
56
56
|
|
|
57
57
|
# Also run external host CLIs where available:
|
|
58
|
-
|
|
58
|
+
oms install --runtime claude --vault ~/Documents/MyVault --yes --execute
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
## After setup
|
|
@@ -65,7 +65,8 @@ Run `/oms-doctor` to validate your existing notes against the convention.
|
|
|
65
65
|
## Roadmap
|
|
66
66
|
|
|
67
67
|
Setup plus `oms install`/`oms uninstall` host lifecycle commands are real and release-gated by unpacked npm tarball smoke tests. The MCP command starts
|
|
68
|
-
the status/read/cache/capture runtime (`oms_graph_status`, `oms_graph_build`,
|
|
69
|
-
`oms_list_concepts`, `
|
|
70
|
-
`oms_validate_contract`, `oms_capture_prepare`,
|
|
68
|
+
the status/read/cache/retrieve/capture runtime (`oms_graph_status`, `oms_graph_build`,
|
|
69
|
+
`oms_list_concepts`, `oms_retrieve_context`, `oms_retrieve_by_axis`,
|
|
70
|
+
`oms_lazy_load_note`, `oms_validate_contract`, `oms_capture_prepare`,
|
|
71
|
+
`oms_capture_commit`).
|
|
71
72
|
Capture commit is gated by path-safety and contract validation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oms-uninstall
|
|
3
|
-
description: Remove Oh My Second Brain host adapter and MCP registrations by running
|
|
3
|
+
description: Remove Oh My Second Brain host adapter and MCP registrations by running oms uninstall.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: oms-uninstall (Claude Code)
|
|
@@ -18,17 +18,17 @@ Remove Oh My Second Brain host registrations and adapter files. This does **not*
|
|
|
18
18
|
Shells out to:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
21
|
+
oms uninstall [--runtime <all|claude|codex|hermes>] [--dry-run] [--execute] [--yes]
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Recommended flow
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
# Preview first:
|
|
28
|
-
|
|
28
|
+
oms uninstall --runtime all --dry-run
|
|
29
29
|
|
|
30
30
|
# Remove Oh My Second Brain host registrations:
|
|
31
|
-
|
|
31
|
+
oms uninstall --runtime all --yes
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Use `--execute` only when you want Oh My Second Brain to call external host CLIs such as `claude mcp remove oms` or `claude plugin uninstall oms`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Oh My Second Brain convention layer for Obsidian vaults \u2014 Codex native rules, skills, and MCP adapter.",
|
|
5
5
|
"_note": "oms install writes Codex MCP config, installs ~/.codex/rules/oms.md, and installs ~/.codex/skills/oms-*.",
|
|
6
6
|
"skills": "./skills/",
|
package/adapters/codex/.mcp.json
CHANGED
package/adapters/codex/AGENTS.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
|
|
8
8
|
|
|
9
9
|
**Before working with vault notes:**
|
|
10
|
-
- Run `
|
|
10
|
+
- Run `oms doctor` to validate notes against the convention (exits 0, non-blocking).
|
|
11
11
|
- Read `.oms/taxonomy.yaml` and `.oms/concepts/*.yaml` for folder and field declarations.
|
|
12
12
|
|
|
13
13
|
**Capture:** Use `$oms-capture` skill or follow the librarian persona.
|
|
@@ -10,12 +10,12 @@ Oh My Second Brain is a convention harness, not a content generator. The user ow
|
|
|
10
10
|
|
|
11
11
|
| User intent | Preferred Oh My Second Brain surface |
|
|
12
12
|
|---|---|
|
|
13
|
-
| adopt a vault | `$oms-setup` or `
|
|
14
|
-
| install host integration | `$oms-install` or `
|
|
15
|
-
| uninstall host integration | `$oms-uninstall` or `
|
|
16
|
-
| validate notes | `$oms-doctor` or `
|
|
13
|
+
| adopt a vault | `$oms-setup` or `oms setup --vault <path>` |
|
|
14
|
+
| install host integration | `$oms-install` or `oms install --runtime codex --vault <path> --yes` |
|
|
15
|
+
| uninstall host integration | `$oms-uninstall` or `oms uninstall --runtime codex --yes` |
|
|
16
|
+
| validate notes | `$oms-doctor` or `oms doctor --vault <path>` |
|
|
17
17
|
| capture knowledge | use MCP `oms_capture_prepare` then `oms_capture_commit` |
|
|
18
|
-
| retrieve knowledge | use MCP `
|
|
18
|
+
| retrieve knowledge | use MCP `oms_retrieve_context`, then `oms_lazy_load_note` only when needed |
|
|
19
19
|
|
|
20
20
|
## Safety
|
|
21
21
|
|
|
@@ -8,7 +8,7 @@ description: Validate vault notes against the active Oh My Second Brain ontology
|
|
|
8
8
|
Run:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
oms doctor --vault <vault>
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
The command is advisory in v0 and exits 0 even when warnings are found.
|
|
@@ -8,7 +8,7 @@ description: Install Oh My Second Brain Codex/Hermes/Claude host adapters and MC
|
|
|
8
8
|
Use for host lifecycle installation.
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
oms install --runtime <auto|all|claude|codex|hermes> --vault <vault> --yes
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
For Codex, this installs:
|
|
@@ -5,6 +5,14 @@ description: Retrieve vault knowledge axis-first using folders, frontmatter, wik
|
|
|
5
5
|
|
|
6
6
|
# oms-retrieve
|
|
7
7
|
|
|
8
|
-
Use `
|
|
8
|
+
Use `oms_retrieve_context` first for natural-language retrieval. It combines live
|
|
9
|
+
frontmatter/folder/wikilink graph context with optional qmd lexical/vector
|
|
10
|
+
candidates and does not require a warm graph cache. Pass declared
|
|
11
|
+
concept/folder/property/value/wikilink axes when the user's intent gives them.
|
|
12
|
+
|
|
13
|
+
Use `qmdScope: "global"` when the user asks broad semantic search across the
|
|
14
|
+
vault, and `qmdScope: "graph"` when qmd candidates must stay inside the selected
|
|
15
|
+
OMS graph candidates. Use `oms_retrieve_by_axis` only for legacy axis-first
|
|
16
|
+
cache retrieval. Use `oms_lazy_load_note` only after selecting candidate notes.
|
|
9
17
|
|
|
10
18
|
Return lens-shaped fields where possible; do not dump full note bodies unless the user asks or the retrieval task needs body evidence.
|
|
@@ -10,13 +10,13 @@ Use when the user wants to initialize Oh My Second Brain for a vault.
|
|
|
10
10
|
Run:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
oms setup --vault <vault> --yes
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then, when host registration is desired:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
oms install --runtime codex --vault <vault> --yes
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Do not modify vault notes during setup. Oh My Second Brain writes only `vault/.oms/taxonomy.yaml` and `vault/.oms/concepts/`.
|
|
@@ -8,13 +8,13 @@ description: Remove Oh My Second Brain host adapter files and MCP registration w
|
|
|
8
8
|
Preview first:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
oms uninstall --runtime all --dry-run
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Remove host registrations:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
|
|
17
|
+
oms uninstall --runtime all --yes
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Never delete vault notes or `vault/.oms/` as part of host uninstall.
|
package/adapters/hermes/SOUL.md
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
|
|
8
8
|
|
|
9
9
|
**Before working with vault notes:**
|
|
10
|
-
- Run `
|
|
10
|
+
- Run `oms doctor` to validate notes against the convention (exits 0, non-blocking).
|
|
11
11
|
- Read `.oms/taxonomy.yaml` for folder-to-concept bindings.
|
|
12
12
|
- Read `.oms/concepts/*.yaml` for field declarations and lenses.
|
|
13
13
|
|
|
14
14
|
**Capture:** Follow the librarian persona — resolve concept, resolve folder from taxonomy,
|
|
15
|
-
construct required frontmatter, write note, then run `
|
|
15
|
+
construct required frontmatter, write note, then run `oms doctor`.
|
|
16
16
|
|
|
17
17
|
**Retrieve:** Follow the retriever persona — identify purpose, match lens, project lens fields only.
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Oh My Second Brain convention layer for Obsidian vaults \u2014 Hermes skill bundle and MCP adapter.",
|
|
5
5
|
"_note": "oms install writes ~/.hermes/config.yaml mcp_servers.oms and installs skills under ~/.hermes/skills/knowledge-management/oms/.",
|
|
6
6
|
"skills": "./skills/"
|
|
@@ -8,7 +8,7 @@ description: Validate vault notes against the active Oh My Second Brain ontology
|
|
|
8
8
|
Run:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
oms doctor --vault <vault>
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
The command is advisory in v0 and exits 0 even when warnings are found.
|
|
@@ -8,7 +8,7 @@ description: Install Oh My Second Brain Codex/Hermes/Claude host adapters and MC
|
|
|
8
8
|
Use for host lifecycle installation.
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
oms install --runtime <auto|all|claude|codex|hermes> --vault <vault> --yes
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
For Codex, this installs:
|
|
@@ -5,6 +5,14 @@ description: Retrieve vault knowledge axis-first using folders, frontmatter, wik
|
|
|
5
5
|
|
|
6
6
|
# oms-retrieve
|
|
7
7
|
|
|
8
|
-
Use `
|
|
8
|
+
Use `oms_retrieve_context` first for natural-language retrieval. It combines live
|
|
9
|
+
frontmatter/folder/wikilink graph context with optional qmd lexical/vector
|
|
10
|
+
candidates and does not require a warm graph cache. Pass declared
|
|
11
|
+
concept/folder/property/value/wikilink axes when the user's intent gives them.
|
|
12
|
+
|
|
13
|
+
Use `qmdScope: "global"` when the user asks broad semantic search across the
|
|
14
|
+
vault, and `qmdScope: "graph"` when qmd candidates must stay inside the selected
|
|
15
|
+
OMS graph candidates. Use `oms_retrieve_by_axis` only for legacy axis-first
|
|
16
|
+
cache retrieval. Use `oms_lazy_load_note` only after selecting candidate notes.
|
|
9
17
|
|
|
10
18
|
Return lens-shaped fields where possible; do not dump full note bodies unless the user asks or the retrieval task needs body evidence.
|
|
@@ -10,13 +10,13 @@ Use when the user wants to initialize Oh My Second Brain for a vault.
|
|
|
10
10
|
Run:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
oms setup --vault <vault> --yes
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then, when host registration is desired:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
oms install --runtime codex --vault <vault> --yes
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Do not modify vault notes during setup. Oh My Second Brain writes only `vault/.oms/taxonomy.yaml` and `vault/.oms/concepts/`.
|
|
@@ -8,13 +8,13 @@ description: Remove Oh My Second Brain host adapter files and MCP registration w
|
|
|
8
8
|
Preview first:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
oms uninstall --runtime all --dry-run
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Remove host registrations:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
|
|
17
|
+
oms uninstall --runtime all --yes
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Never delete vault notes or `vault/.oms/` as part of host uninstall.
|
package/core/agents/librarian.md
CHANGED
|
@@ -21,7 +21,7 @@ It reads the convention first, then acts.
|
|
|
21
21
|
2. **Folder resolution** — look up the correct target folder from `vault/.oms/taxonomy.yaml` based on the matched concept.
|
|
22
22
|
3. **Frontmatter construction** — fill every `required: true` field; fill known optional fields; leave undeclared fields untouched.
|
|
23
23
|
4. **Note creation** — write the file at the resolved path; use the concept's naming convention (default: `YYYY-MM-DD-<slug>.md`).
|
|
24
|
-
5. **Post-capture validation** — run `npx
|
|
24
|
+
5. **Post-capture validation** — run `npx oh-my-second-brain doctor` (non-blocking) to confirm the new note is clean.
|
|
25
25
|
|
|
26
26
|
## Decision rules
|
|
27
27
|
|
|
@@ -18,14 +18,16 @@ The librarian persona governs this action.
|
|
|
18
18
|
- Fill optional fields where values are known.
|
|
19
19
|
- Leave undeclared (extra) frontmatter fields untouched (`additionalProperties: preserve`).
|
|
20
20
|
5. Write the note body after the frontmatter block.
|
|
21
|
-
6. Run `
|
|
21
|
+
6. Run `oms doctor` (non-blocking, exits 0) to confirm the new note passes field validation.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Engine
|
|
24
24
|
|
|
25
|
-
The
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
the `
|
|
25
|
+
The capture engine is implemented in `src/capture/safe.ts` and exposed via two MCP tools:
|
|
26
|
+
|
|
27
|
+
- **`oms_capture_prepare`** — resolves the target path and constructs the proposed frontmatter/body without writing anything. Call this first to let the agent review the proposed note before committing.
|
|
28
|
+
- **`oms_capture_commit`** — writes the file to disk. Gated by vault confinement: rejects writes that are outside the vault, to non-`.md` files, or into the `.oms/` config directory. Frontmatter violations are warn-only and do not block the commit.
|
|
29
|
+
|
|
30
|
+
The recommended agent flow is to call `oms_capture_prepare`, review the result, then call `oms_capture_commit` to finalize.
|
|
29
31
|
|
|
30
32
|
## Example agent steps
|
|
31
33
|
|
|
@@ -40,7 +42,7 @@ User: "Save this paper: 'Attention Is All You Need', arxiv.org/abs/1706.03762"
|
|
|
40
42
|
source-url: "https://arxiv.org/abs/1706.03762"
|
|
41
43
|
captured-at: "2026-05-31"
|
|
42
44
|
5. write note body
|
|
43
|
-
6.
|
|
45
|
+
6. oms doctor ← verify (exits 0, non-blocking)
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
## Persona
|
|
@@ -12,7 +12,7 @@ type, and optional rules (`required`, `normalize`, `immutable`).
|
|
|
12
12
|
## Entry point
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
|
|
15
|
+
oms define
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
This is the intended user-facing command (roadmap: interactive runtime not built yet).
|
|
@@ -27,7 +27,7 @@ Use `define` as **agent-guided convention editing** until the interactive runtim
|
|
|
27
27
|
4. Ask: **type** (`string` | `string[]` | `date` | `url` | `boolean`), **required** (yes/no).
|
|
28
28
|
5. Optionally ask: `normalize` (e.g. `lowercase`), `immutable` (lock after creation).
|
|
29
29
|
6. Open `vault/.oms/concepts/<concept>.yaml` and append the new field entry.
|
|
30
|
-
7. Run `
|
|
30
|
+
7. Run `oms doctor` to validate existing notes against the updated schema (exits 0).
|
|
31
31
|
|
|
32
32
|
## Convention YAML shape (one field entry)
|
|
33
33
|
|
|
@@ -11,7 +11,7 @@ This skill is **REAL in v0** — the CLI command is fully implemented.
|
|
|
11
11
|
## Shell-out
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
|
|
14
|
+
oms doctor [--vault <path>]
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
- `--vault <path>` — path to your Obsidian vault root (default: current directory).
|
|
@@ -40,7 +40,7 @@ Undeclared frontmatter fields are **never** reported as violations
|
|
|
40
40
|
|
|
41
41
|
## Recommended usage
|
|
42
42
|
|
|
43
|
-
Run `
|
|
43
|
+
Run `oms doctor` after:
|
|
44
44
|
- Any `oms setup` run
|
|
45
45
|
- Adding a new field via `oms define`
|
|
46
46
|
- Bulk-editing notes
|
|
@@ -32,12 +32,24 @@ lenses:
|
|
|
32
32
|
|
|
33
33
|
The retrieval skill reads these declarations from `vault/.oms/concepts/*.yaml`.
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Engine
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
Use MCP `oms_retrieve_context` first for natural-language retrieval. It combines:
|
|
38
|
+
|
|
39
|
+
- live folder/frontmatter/wikilink graph exploration without requiring a warm cache
|
|
40
|
+
- taxonomy-axis seeds from concept, folder, property, value, or wikilink inputs
|
|
41
|
+
- graph neighbors through shared frontmatter values, wikilinks, and backlinks
|
|
42
|
+
- optional qmd lexical/vector candidates when the local `qmd` CLI is available
|
|
43
|
+
|
|
44
|
+
Use `qmdScope: "global"` for broad semantic search across the vault. Use
|
|
45
|
+
`qmdScope: "graph"` when qmd candidates must stay inside the selected OMS graph
|
|
46
|
+
candidates. The qmd provider is fail-soft: retrieval must still return OMS graph
|
|
47
|
+
hits when qmd is unavailable or disabled.
|
|
48
|
+
|
|
49
|
+
Use the older MCP tools only for narrower follow-up steps:
|
|
50
|
+
|
|
51
|
+
- **`oms_retrieve_by_axis`** — legacy cache-backed axis retrieval by concept, folder, property, value, or wikilink.
|
|
52
|
+
- **`oms_lazy_load_note`** — fetches the full body of a single selected note on demand, avoiding loading all note bodies upfront.
|
|
41
53
|
|
|
42
54
|
## Example agent steps
|
|
43
55
|
|
|
@@ -11,7 +11,7 @@ This skill is **REAL in v0** — the CLI command is fully implemented.
|
|
|
11
11
|
## Shell-out
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
|
|
14
|
+
oms setup [--vault <path>] [--yes]
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
- `--vault <path>` — path to your Obsidian vault root (default: current directory).
|
|
@@ -27,7 +27,7 @@ npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.t
|
|
|
27
27
|
6. Copies the shipped default concepts into `vault/.oms/concepts/`.
|
|
28
28
|
|
|
29
29
|
After setup, the vault is governed by Oh My Second Brain conventions.
|
|
30
|
-
Run `
|
|
30
|
+
Run `oms doctor` at any time to validate existing notes.
|
|
31
31
|
|
|
32
32
|
## What setup does NOT do
|
|
33
33
|
|
|
@@ -40,5 +40,5 @@ Run `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.
|
|
|
40
40
|
Run the `doctor` skill to check your notes against the convention:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
43
|
+
oms doctor [--vault <path>]
|
|
44
44
|
```
|