oh-my-second-brain 0.1.5
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 +98 -0
- package/adapters/claude-code/.claude-plugin/plugin.json +24 -0
- package/adapters/claude-code/CLAUDE.md +26 -0
- package/adapters/claude-code/skills/capture/SKILL.md +50 -0
- package/adapters/claude-code/skills/define/SKILL.md +51 -0
- package/adapters/claude-code/skills/doctor/SKILL.md +58 -0
- package/adapters/claude-code/skills/retrieve/SKILL.md +55 -0
- package/adapters/claude-code/skills/setup/SKILL.md +71 -0
- package/adapters/claude-code/skills/uninstall/SKILL.md +34 -0
- package/adapters/codex/.codex-plugin/plugin.json +8 -0
- package/adapters/codex/.mcp.json +14 -0
- package/adapters/codex/AGENTS.md +16 -0
- package/adapters/codex/rules/oms.md +25 -0
- package/adapters/codex/skills/oms-capture/SKILL.md +16 -0
- package/adapters/codex/skills/oms-doctor/SKILL.md +14 -0
- package/adapters/codex/skills/oms-install/SKILL.md +19 -0
- package/adapters/codex/skills/oms-retrieve/SKILL.md +10 -0
- package/adapters/codex/skills/oms-setup/SKILL.md +22 -0
- package/adapters/codex/skills/oms-uninstall/SKILL.md +20 -0
- package/adapters/hermes/README.md +8 -0
- package/adapters/hermes/SOUL.md +19 -0
- package/adapters/hermes/manifest.json +7 -0
- package/adapters/hermes/skills/capture/SKILL.md +16 -0
- package/adapters/hermes/skills/doctor/SKILL.md +14 -0
- package/adapters/hermes/skills/install/SKILL.md +19 -0
- package/adapters/hermes/skills/retrieve/SKILL.md +10 -0
- package/adapters/hermes/skills/setup/SKILL.md +22 -0
- package/adapters/hermes/skills/uninstall/SKILL.md +20 -0
- package/core/AGENTS.md +110 -0
- package/core/agents/librarian.md +43 -0
- package/core/agents/retriever.md +62 -0
- package/core/ontology/concepts/inbox.yaml +4 -0
- package/core/ontology/concepts/literature.yaml +27 -0
- package/core/ontology/taxonomy.yaml +11 -0
- package/core/skills/capture/SKILL.md +48 -0
- package/core/skills/define/SKILL.md +59 -0
- package/core/skills/doctor/SKILL.md +49 -0
- package/core/skills/retrieve/SKILL.md +56 -0
- package/core/skills/setup/SKILL.md +44 -0
- package/core/skills/uninstall/SKILL.md +34 -0
- package/dist/adapt/HostAdapter.d.ts +21 -0
- package/dist/adapt/HostAdapter.js +10 -0
- package/dist/adapt/HostAdapter.js.map +1 -0
- package/dist/adapt/claudeCode.d.ts +9 -0
- package/dist/adapt/claudeCode.js +15 -0
- package/dist/adapt/claudeCode.js.map +1 -0
- package/dist/adapt/codex.d.ts +9 -0
- package/dist/adapt/codex.js +15 -0
- package/dist/adapt/codex.js.map +1 -0
- package/dist/adapt/hermes.d.ts +9 -0
- package/dist/adapt/hermes.js +15 -0
- package/dist/adapt/hermes.js.map +1 -0
- package/dist/capture/safe.d.ts +36 -0
- package/dist/capture/safe.js +167 -0
- package/dist/capture/safe.js.map +1 -0
- package/dist/cli/oms.d.ts +18 -0
- package/dist/cli/oms.js +401 -0
- package/dist/cli/oms.js.map +1 -0
- package/dist/conventions/frontmatter.d.ts +15 -0
- package/dist/conventions/frontmatter.js +23 -0
- package/dist/conventions/frontmatter.js.map +1 -0
- package/dist/conventions/validate.d.ts +24 -0
- package/dist/conventions/validate.js +88 -0
- package/dist/conventions/validate.js.map +1 -0
- package/dist/graph/cache.d.ts +98 -0
- package/dist/graph/cache.js +347 -0
- package/dist/graph/cache.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/install/hosts.d.ts +27 -0
- package/dist/install/hosts.js +465 -0
- package/dist/install/hosts.js.map +1 -0
- package/dist/mcp/server.d.ts +8 -0
- package/dist/mcp/server.js +461 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/ontology/loader.d.ts +13 -0
- package/dist/ontology/loader.js +63 -0
- package/dist/ontology/loader.js.map +1 -0
- package/dist/ontology/resolver.d.ts +13 -0
- package/dist/ontology/resolver.js +37 -0
- package/dist/ontology/resolver.js.map +1 -0
- package/dist/ontology/types.d.ts +72 -0
- package/dist/ontology/types.js +12 -0
- package/dist/ontology/types.js.map +1 -0
- package/docs/install.md +115 -0
- package/docs/release.md +91 -0
- package/package.json +64 -0
- package/scripts/install.sh +49 -0
- package/scripts/uninstall.sh +57 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Adapter Contract
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
4
|
+
|
|
5
|
+
Oh My Second Brain's **core** (ontology loading, convention validation, graph/search runtime targets, and MCP server once implemented) is written once.
|
|
6
|
+
Each **adapter** absorbs exactly one host's structural differences — manifest schema,
|
|
7
|
+
hook format, invocation sigil, and convention-file name — so adding a new host
|
|
8
|
+
means adding one new adapter directory, not touching core.
|
|
9
|
+
|
|
10
|
+
Per-host structural asymmetry is documented here, **not abstracted away**.
|
|
11
|
+
The goal is legibility: when something breaks on one host, you read its adapter,
|
|
12
|
+
not a shared abstraction layer.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Host Comparison Table
|
|
17
|
+
|
|
18
|
+
| Host | Manifest | Convention file | Sigil | Status |
|
|
19
|
+
|------|----------|----------------|-------|--------|
|
|
20
|
+
| **claude-code** | `.claude-plugin/plugin.json` | `CLAUDE.md` | `/` | REAL installable v0 |
|
|
21
|
+
| **codex** | `.codex-plugin/plugin.json` | `AGENTS.md` | `$` | Native skills + MCP install (v0) |
|
|
22
|
+
| **hermes** | `manifest.json` | `SOUL.md` + context files | (built-in tools) | Native skills + MCP install (v0) |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Adapter Structure
|
|
27
|
+
|
|
28
|
+
Each adapter lives at `adapters/<host>/` and contains:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
adapters/<host>/
|
|
32
|
+
<manifest-dir>/
|
|
33
|
+
plugin.json # Host-specific manifest (schema varies per host — see below)
|
|
34
|
+
skills/ # Host-specific skill wrappers/bundles
|
|
35
|
+
<verb>/
|
|
36
|
+
SKILL.md
|
|
37
|
+
CLAUDE.md # OR AGENTS.md OR SOUL.md — convention-file shim for this host
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Per-Host Structural Notes
|
|
43
|
+
|
|
44
|
+
### claude-code (REAL installable v0)
|
|
45
|
+
|
|
46
|
+
Release contract: the npm tarball must include `adapters/claude-code/` because `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup --install-claude` prints a packaged adapter path for `claude plugin install`.
|
|
47
|
+
|
|
48
|
+
- **Manifest**: `.claude-plugin/plugin.json`
|
|
49
|
+
- Schema: `{ name, version, description, author, license, keywords, skills: string[] }`
|
|
50
|
+
- `skills` is an **array of directory-path strings** relative to the plugin root (e.g. `"./skills/setup/"`).
|
|
51
|
+
- Each path must contain a `SKILL.md`.
|
|
52
|
+
- **Convention file**: `CLAUDE.md` — append `adapters/claude-code/CLAUDE.md` to your project's `CLAUDE.md`.
|
|
53
|
+
- **Sigil**: `/` (e.g. `/oms-setup`).
|
|
54
|
+
- **Hooks**: none in v0 (hook format is `hooks/hooks.json` multi-script array — roadmap).
|
|
55
|
+
- **Install**: `claude plugin install path/to/adapters/claude-code` or point Claude Code at the adapter directory.
|
|
56
|
+
|
|
57
|
+
### codex (native skills + MCP install v0)
|
|
58
|
+
|
|
59
|
+
- **Manifest**: `.codex-plugin/plugin.json`
|
|
60
|
+
- Schema differs from claude-code: codex uses a unified `codex-native-hook.mjs` instead of `hooks.json`.
|
|
61
|
+
- Skills are invoked with `$` sigil instead of `/`.
|
|
62
|
+
- **Convention file**: `AGENTS.md` — append `adapters/codex/AGENTS.md` to your project's `AGENTS.md`.
|
|
63
|
+
- **Status**: v0 native install. `oms install --runtime codex` installs `~/.codex/rules/oms.md`, namespaced `~/.codex/skills/oms-*`, a managed `[mcp_servers.oms]` block in `~/.codex/config.toml`, and a copy of the adapter under `~/.codex/plugins/oms`.
|
|
64
|
+
|
|
65
|
+
### hermes (native skills + MCP install v0)
|
|
66
|
+
|
|
67
|
+
- **Manifest**: `manifest.json` (Hermes/Nous Research format — schema TBD).
|
|
68
|
+
- Hermes skills register on agentskills.io; no local manifest equivalent exists yet.
|
|
69
|
+
- **Convention file**: `SOUL.md` + context files — append `adapters/hermes/SOUL.md` to your Hermes session context.
|
|
70
|
+
- **Sigil**: N/A (Hermes uses built-in tools + MCP, not a `/`/`$` sigil system).
|
|
71
|
+
- **Status**: v0 native install. `oms install --runtime hermes` installs the skill bundle under `~/.hermes/skills/knowledge-management/oms/`, registers `mcp_servers.oms` in `~/.hermes/config.yaml`, and keeps an adapter copy under `~/.hermes/adapters/oms`.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## MCP Backbone
|
|
76
|
+
|
|
77
|
+
The cross-host mechanism is an **MCP server** (`src/mcp/server.ts`) that exposes
|
|
78
|
+
contract validation, retrieve, graph/status, and gated capture tools.
|
|
79
|
+
|
|
80
|
+
All three hosts natively support MCP (`.mcp.json` for claude-code and codex; "any MCP server" for Hermes).
|
|
81
|
+
In the current repository, `src/mcp/server.ts` starts a real stdio MCP server via `oms mcp`.
|
|
82
|
+
|
|
83
|
+
The MCP server currently exposes status/read/cache/capture tools:
|
|
84
|
+
`oms_graph_status`, `oms_graph_build`, `oms_list_concepts`,
|
|
85
|
+
`oms_retrieve_by_axis`, `oms_lazy_load_note`, `oms_validate_contract`,
|
|
86
|
+
`oms_capture_prepare`, and `oms_capture_commit`.
|
|
87
|
+
Capture commit is gated by path-safety, vault-confinement, and contract validation. The CLI (`npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup`, `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install`, `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall`, `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor`) remains the real surface for lifecycle commands.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Adding a New Host
|
|
92
|
+
|
|
93
|
+
1. Create `adapters/<host>/`.
|
|
94
|
+
2. Write the host-specific manifest in the correct subdirectory and schema.
|
|
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 `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz <verb>` (for lifecycle) or call the MCP server (for capture/retrieve).
|
|
97
|
+
5. Document the host's structural differences in this table.
|
|
98
|
+
6. Do **not** modify `core/` or add host-specific logic to shared code.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "oms",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Oh My Second Brain convention layer for Obsidian vaults \u2014 capture, retrieve, and validate knowledge under a declared semantic convention.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "gobeumsu"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"obsidian",
|
|
11
|
+
"knowledge-base",
|
|
12
|
+
"convention",
|
|
13
|
+
"frontmatter",
|
|
14
|
+
"vault"
|
|
15
|
+
],
|
|
16
|
+
"skills": [
|
|
17
|
+
"./skills/setup/",
|
|
18
|
+
"./skills/doctor/",
|
|
19
|
+
"./skills/define/",
|
|
20
|
+
"./skills/capture/",
|
|
21
|
+
"./skills/retrieve/",
|
|
22
|
+
"./skills/uninstall/"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Oh My Second Brain Convention Fragment
|
|
2
|
+
|
|
3
|
+
<!-- Append this block to your project's CLAUDE.md to activate Oh My Second Brain conventions in Claude Code. -->
|
|
4
|
+
|
|
5
|
+
## Vault Convention (Oh My Second Brain)
|
|
6
|
+
|
|
7
|
+
This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
|
|
8
|
+
All knowledge capture and retrieval must follow the declared semantic convention.
|
|
9
|
+
|
|
10
|
+
**Before working with vault notes:**
|
|
11
|
+
- Run `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor` to validate existing notes against the convention (exits 0, non-blocking).
|
|
12
|
+
- Read `.oms/taxonomy.yaml` to understand which folders hold which concepts.
|
|
13
|
+
- Read `.oms/concepts/*.yaml` to understand field requirements and lenses.
|
|
14
|
+
|
|
15
|
+
**When capturing new knowledge:**
|
|
16
|
+
- Use the `/oms-capture` skill or follow the librarian persona (`core/agents/librarian.md`).
|
|
17
|
+
- Every note must carry the required frontmatter fields for its concept.
|
|
18
|
+
- Place notes in the folder declared in the taxonomy — do not invent new folders without updating `.oms/taxonomy.yaml`.
|
|
19
|
+
|
|
20
|
+
**When retrieving knowledge:**
|
|
21
|
+
- Use the `/oms-retrieve` skill or follow the retriever persona (`core/agents/retriever.md`).
|
|
22
|
+
- Apply the concept's declared lens for the retrieval purpose (synthesis, audit, etc.).
|
|
23
|
+
- Return only the fields the lens specifies — do not dump full frontmatter.
|
|
24
|
+
|
|
25
|
+
**Convention violations are warnings, not errors (v0).**
|
|
26
|
+
`npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor` always exits 0. Fix violations incrementally.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-capture
|
|
3
|
+
description: Capture knowledge into the vault under the Oh My Second Brain convention using gated MCP prepare/commit tools.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: oms-capture (Claude Code)
|
|
7
|
+
|
|
8
|
+
Place a piece of knowledge into the vault with correct frontmatter and folder placement.
|
|
9
|
+
|
|
10
|
+
## Invocation
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/oms-capture
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## What this skill does
|
|
17
|
+
|
|
18
|
+
Uses MCP `oms_capture_prepare` first. Only call MCP `oms_capture_commit`
|
|
19
|
+
after prepare returns `ready` or the user has supplied missing fields.
|
|
20
|
+
|
|
21
|
+
## Agent-guided steps (v0)
|
|
22
|
+
|
|
23
|
+
1. Identify the **concept** that fits the incoming knowledge (check `vault/.oms/concepts/`).
|
|
24
|
+
2. Resolve the **target folder** from `vault/.oms/taxonomy.yaml`.
|
|
25
|
+
3. Generate a filename: `YYYY-MM-DD-<slug>.md`.
|
|
26
|
+
4. Construct frontmatter — fill `required: true` fields; preserve any extra fields.
|
|
27
|
+
5. If required fields are missing, ask for them; do not write.
|
|
28
|
+
6. If placement is ambiguous, route to inbox.
|
|
29
|
+
7. Commit only through `oms_capture_commit` (`create` or `append`).
|
|
30
|
+
8. Shell out: `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor` (non-blocking, exits 0) to confirm the note is clean.
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Input: "Attention Is All You Need", https://arxiv.org/abs/1706.03762
|
|
36
|
+
|
|
37
|
+
→ concept: literature
|
|
38
|
+
→ folder: vault/references/
|
|
39
|
+
→ file: vault/references/2017-06-12-attention-is-all-you-need.md
|
|
40
|
+
→ frontmatter:
|
|
41
|
+
title: "Attention Is All You Need"
|
|
42
|
+
source-url: "https://arxiv.org/abs/1706.03762"
|
|
43
|
+
captured-at: "2026-05-31"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Runtime
|
|
47
|
+
|
|
48
|
+
`oms_capture_prepare` preserves route-to-inbox and ask-missing-fields behavior.
|
|
49
|
+
`oms_capture_commit` refuses unsafe paths, `.oms/` internals, non-markdown
|
|
50
|
+
targets, and frontmatter that violates the resolved concept contract.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-define
|
|
3
|
+
description: Grow the vault convention by adding a metadata field to a concept. Entry point is npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz define (roadmap).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: oms-define (Claude Code)
|
|
7
|
+
|
|
8
|
+
Extend your vault convention field-by-field.
|
|
9
|
+
Each frontmatter key is a unit of convention with a declared `intent`, type, and rules.
|
|
10
|
+
|
|
11
|
+
## Invocation
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/oms-define
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What this skill does
|
|
18
|
+
|
|
19
|
+
Intended to shell out to:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz define
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Roadmap note:** The `oms define` interactive runtime is not yet implemented in v0.
|
|
26
|
+
Today this skill guides you through the same steps manually (agent-guided).
|
|
27
|
+
|
|
28
|
+
## Agent-guided steps (v0)
|
|
29
|
+
|
|
30
|
+
1. Identify which **concept** to extend (e.g. `literature`, `inbox`).
|
|
31
|
+
2. Choose a new **field name** (snake-case, e.g. `thesis`).
|
|
32
|
+
3. State the field's **intent** — why this knowledge matters.
|
|
33
|
+
4. Choose **type**: `string` | `string[]` | `date` | `url` | `boolean`.
|
|
34
|
+
5. Choose **required**: yes / no.
|
|
35
|
+
6. Optionally set **normalize** (e.g. `lowercase`) or **immutable** (lock after creation).
|
|
36
|
+
7. Append the entry to `vault/.oms/concepts/<concept>.yaml`.
|
|
37
|
+
8. Run `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor` to validate existing notes against the updated schema.
|
|
38
|
+
|
|
39
|
+
## YAML snippet to append
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
fields:
|
|
43
|
+
- name: thesis
|
|
44
|
+
type: string
|
|
45
|
+
required: false
|
|
46
|
+
intent: "The central claim this source makes"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## When the runtime ships
|
|
50
|
+
|
|
51
|
+
`npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz define` will run the same Q&A interactively and write the YAML for you.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-doctor
|
|
3
|
+
description: Validate vault notes against the Oh My Second Brain convention by running npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: oms-doctor (Claude Code)
|
|
7
|
+
|
|
8
|
+
Check every note in your vault against its declared concept schema.
|
|
9
|
+
This skill is **REAL in v0** — it shells out to the fully-implemented CLI.
|
|
10
|
+
|
|
11
|
+
## Invocation
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/oms-doctor
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What this skill does
|
|
18
|
+
|
|
19
|
+
Shells out to:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor [--vault <path>]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The CLI will:
|
|
26
|
+
1. Load `vault/.oms/` and `vault/.oms/taxonomy.yaml`.
|
|
27
|
+
2. Walk every `.md` note in the vault.
|
|
28
|
+
3. Resolve each note's concept from the taxonomy folder binding.
|
|
29
|
+
4. Validate frontmatter fields against the concept schema.
|
|
30
|
+
5. Print per-note violations (field, rule, message) and total counts.
|
|
31
|
+
6. **Always exits 0** — v0 is advisory only (`onViolation: warn`).
|
|
32
|
+
|
|
33
|
+
## Options
|
|
34
|
+
|
|
35
|
+
| Flag | Description |
|
|
36
|
+
|------|-------------|
|
|
37
|
+
| `--vault <path>` | Path to your Obsidian vault root (default: current directory) |
|
|
38
|
+
|
|
39
|
+
## Example
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor --vault ~/Documents/MyVault
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Sample output
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
vault/references/attention.md
|
|
49
|
+
WARN title required Field "title" is required but missing
|
|
50
|
+
WARN source-url type Expected url, got string
|
|
51
|
+
|
|
52
|
+
Checked 12 notes. 2 violations found. (exits 0)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Roadmap
|
|
56
|
+
|
|
57
|
+
Doctor is fully real in v0. Run it after any `oms setup`, `oms define`,
|
|
58
|
+
or bulk note edit to keep your vault clean.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-retrieve
|
|
3
|
+
description: Retrieve knowledge from the vault through declared Oh My Second Brain retrieval views and axes (agent-guided; runtime is roadmap).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: oms-retrieve (Claude Code)
|
|
7
|
+
|
|
8
|
+
Surface the right notes and fields for a given purpose using the vault's declared retrieval axes and views (인출).
|
|
9
|
+
|
|
10
|
+
## Invocation
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/oms-retrieve
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## What this skill does
|
|
17
|
+
|
|
18
|
+
Conceptually shells out to:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz retrieve
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Runtime note:** Retrieval is available through MCP tools (`oms_retrieve_by_axis`
|
|
25
|
+
and `oms_lazy_load_note`). This skill still guides the agent on intent and
|
|
26
|
+
output shaping.
|
|
27
|
+
|
|
28
|
+
## Agent-guided steps (v0)
|
|
29
|
+
|
|
30
|
+
1. Clarify the user's **retrieval purpose** (synthesize, audit, plan, review, etc.).
|
|
31
|
+
2. Narrow by declared **folder/concept/property/wikilink axes** where possible.
|
|
32
|
+
3. Match the purpose to a declared **retrieval view** (`lenses` in YAML) in `vault/.oms/concepts/*.yaml`.
|
|
33
|
+
4. Scan notes in the candidate concept/folder set.
|
|
34
|
+
5. For each note, return the retrieval-view fields and lazy-load body only when needed.
|
|
35
|
+
6. Return results grouped by concept/folder with retrieval-view frontmatter.
|
|
36
|
+
|
|
37
|
+
## Example
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Purpose: "Synthesize my transformer papers"
|
|
41
|
+
|
|
42
|
+
→ concept: literature
|
|
43
|
+
→ view: synthesis (YAML key: lenses; fields: [title, thesis, source-url])
|
|
44
|
+
→ scan: vault/references/*.md
|
|
45
|
+
→ output:
|
|
46
|
+
|
|
47
|
+
| title | thesis | source-url |
|
|
48
|
+
|-------|--------|------------|
|
|
49
|
+
| Attention Is All You Need | Self-attention replaces recurrence | https://arxiv.org/abs/1706.03762 |
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Runtime
|
|
53
|
+
|
|
54
|
+
Use MCP `oms_retrieve_by_axis` for axis-first narrowing and optional lexical
|
|
55
|
+
ranking. Use MCP `oms_lazy_load_note` only after selecting candidate notes.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-setup
|
|
3
|
+
description: Adopt an existing Obsidian vault into the Oh My Second Brain convention by running npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: oms-setup (Claude Code)
|
|
7
|
+
|
|
8
|
+
Adopt your Obsidian vault into the Oh My Second Brain convention.
|
|
9
|
+
This skill is **REAL in v0** — it shells out to the fully-implemented CLI.
|
|
10
|
+
|
|
11
|
+
## Invocation
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/oms-setup
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What this skill does
|
|
18
|
+
|
|
19
|
+
Shells out to:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup [--vault <path>] [--yes] [--install-claude]
|
|
23
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install [--runtime <auto|all|claude|codex|hermes>] [--vault <path>] [--dry-run] [--execute] [--yes]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The CLI will:
|
|
27
|
+
1. Scan your vault's existing top-level folders (does NOT impose a structure).
|
|
28
|
+
2. Interactively ask the `intent` for each folder (use `--yes` to skip prompts).
|
|
29
|
+
3. Write `vault/.oms/taxonomy.yaml` and copy default concept schemas.
|
|
30
|
+
|
|
31
|
+
## Options
|
|
32
|
+
|
|
33
|
+
| Flag | Description |
|
|
34
|
+
|------|-------------|
|
|
35
|
+
| `--vault <path>` | Path to your Obsidian vault root (default: current directory) |
|
|
36
|
+
| `--yes` | Non-interactive: accept all defaults, no prompts |
|
|
37
|
+
| `--install-claude` | Legacy setup-only dry-run that prints Claude Code plugin install and MCP registration commands. |
|
|
38
|
+
| `install --runtime <name>` | Install host adapter/MCP registration for `auto`, `all`, `claude`, `codex`, or `hermes`. |
|
|
39
|
+
| `install --dry-run` | Preview host writes without mutating config. |
|
|
40
|
+
| `install --execute` | Allow external host CLIs such as `claude plugin install` to run when available. |
|
|
41
|
+
|
|
42
|
+
## Example
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Interactive (recommended first run):
|
|
46
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup --vault ~/Documents/MyVault
|
|
47
|
+
|
|
48
|
+
# Non-interactive (CI / scripted):
|
|
49
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup --vault ~/Documents/MyVault --yes
|
|
50
|
+
|
|
51
|
+
# Preview all host adapter installs:
|
|
52
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install --runtime all --vault ~/Documents/MyVault --dry-run
|
|
53
|
+
|
|
54
|
+
# Install all host adapter/MCP registrations:
|
|
55
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install --runtime all --vault ~/Documents/MyVault --yes
|
|
56
|
+
|
|
57
|
+
# Also run external host CLIs where available:
|
|
58
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install --runtime claude --vault ~/Documents/MyVault --yes --execute
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## After setup
|
|
62
|
+
|
|
63
|
+
Run `/oms-doctor` to validate your existing notes against the convention.
|
|
64
|
+
|
|
65
|
+
## Roadmap
|
|
66
|
+
|
|
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`, `oms_retrieve_by_axis`, `oms_lazy_load_note`,
|
|
70
|
+
`oms_validate_contract`, `oms_capture_prepare`, `oms_capture_commit`).
|
|
71
|
+
Capture commit is gated by path-safety and contract validation.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-uninstall
|
|
3
|
+
description: Remove Oh My Second Brain host adapter and MCP registrations by running npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: oms-uninstall (Claude Code)
|
|
7
|
+
|
|
8
|
+
Remove Oh My Second Brain host registrations and adapter files. This does **not** delete vault notes or `vault/.oms/` ontology data.
|
|
9
|
+
|
|
10
|
+
## Invocation
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/oms-uninstall
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## What this skill does
|
|
17
|
+
|
|
18
|
+
Shells out to:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall [--runtime <all|claude|codex|hermes>] [--dry-run] [--execute] [--yes]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Recommended flow
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Preview first:
|
|
28
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall --runtime all --dry-run
|
|
29
|
+
|
|
30
|
+
# Remove Oh My Second Brain host registrations:
|
|
31
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall --runtime all --yes
|
|
32
|
+
```
|
|
33
|
+
|
|
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`.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "oms",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Oh My Second Brain convention layer for Obsidian vaults \u2014 Codex native rules, skills, and MCP adapter.",
|
|
5
|
+
"_note": "oms install writes Codex MCP config, installs ~/.codex/rules/oms.md, and installs ~/.codex/skills/oms-*.",
|
|
6
|
+
"skills": "./skills/",
|
|
7
|
+
"mcpServers": "./.mcp.json"
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Oh My Second Brain Convention Shim — Codex
|
|
2
|
+
|
|
3
|
+
<!-- Append this block to your project's AGENTS.md to activate Oh My Second Brain conventions in Codex (oh-my-codex). -->
|
|
4
|
+
|
|
5
|
+
## Vault Convention (Oh My Second Brain)
|
|
6
|
+
|
|
7
|
+
This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
|
|
8
|
+
|
|
9
|
+
**Before working with vault notes:**
|
|
10
|
+
- Run `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor` to validate notes against the convention (exits 0, non-blocking).
|
|
11
|
+
- Read `.oms/taxonomy.yaml` and `.oms/concepts/*.yaml` for folder and field declarations.
|
|
12
|
+
|
|
13
|
+
**Capture:** Use `$oms-capture` skill or follow the librarian persona.
|
|
14
|
+
**Retrieve:** Use `$oms-retrieve` skill or follow the retriever persona with declared lenses.
|
|
15
|
+
|
|
16
|
+
> **v0 native install:** `oms install --runtime codex` installs Codex rules, `$oms-*` skills, and a managed Codex MCP config. Use Oh My Second Brain MCP tools for capture/retrieve and CLI commands for lifecycle.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Oh My Second Brain for Codex
|
|
2
|
+
|
|
3
|
+
Use Oh My Second Brain when the user asks to set up, validate, capture into, retrieve from, or inspect an Obsidian/Markdown vault governed by `vault/.oms/`.
|
|
4
|
+
|
|
5
|
+
## Core rule
|
|
6
|
+
|
|
7
|
+
Oh My Second Brain is a convention harness, not a content generator. The user owns the ontology in `vault/.oms/`; agents must use the declared folder axis, frontmatter/property axes, wikilinks, and retrieval lenses before reading or writing notes.
|
|
8
|
+
|
|
9
|
+
## Command mapping
|
|
10
|
+
|
|
11
|
+
| User intent | Preferred Oh My Second Brain surface |
|
|
12
|
+
|---|---|
|
|
13
|
+
| adopt a vault | `$oms-setup` or `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup --vault <path>` |
|
|
14
|
+
| install host integration | `$oms-install` or `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install --runtime codex --vault <path> --yes` |
|
|
15
|
+
| uninstall host integration | `$oms-uninstall` or `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall --runtime codex --yes` |
|
|
16
|
+
| validate notes | `$oms-doctor` or `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor --vault <path>` |
|
|
17
|
+
| capture knowledge | use MCP `oms_capture_prepare` then `oms_capture_commit` |
|
|
18
|
+
| retrieve knowledge | use MCP `oms_retrieve_by_axis`, then `oms_lazy_load_note` only when needed |
|
|
19
|
+
|
|
20
|
+
## Safety
|
|
21
|
+
|
|
22
|
+
- Never delete vault notes or `vault/.oms/` during uninstall.
|
|
23
|
+
- Capture must stay inside the configured vault and target Markdown files only.
|
|
24
|
+
- If required frontmatter is missing, ask for it; do not invent user-owned ontology values.
|
|
25
|
+
- Route ambiguous captures to inbox when the ontology cannot decide.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-capture
|
|
3
|
+
description: Capture knowledge into the vault through Oh My Second Brain's folder/frontmatter contract.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# oms-capture
|
|
7
|
+
|
|
8
|
+
Use MCP `oms_capture_prepare` before writing. Commit only with `oms_capture_commit` after the plan is `ready` or the user provides missing fields.
|
|
9
|
+
|
|
10
|
+
Rules:
|
|
11
|
+
|
|
12
|
+
1. Resolve concept from the user-owned ontology.
|
|
13
|
+
2. Resolve folder from `vault/.oms/taxonomy.yaml`.
|
|
14
|
+
3. Fill required frontmatter; preserve additional properties.
|
|
15
|
+
4. Route ambiguity to inbox.
|
|
16
|
+
5. Keep writes inside the vault and Markdown-only.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-doctor
|
|
3
|
+
description: Validate vault notes against the active Oh My Second Brain ontology.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# oms-doctor
|
|
7
|
+
|
|
8
|
+
Run:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor --vault <vault>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The command is advisory in v0 and exits 0 even when warnings are found.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-install
|
|
3
|
+
description: Install Oh My Second Brain Codex/Hermes/Claude host adapters and MCP registration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# oms-install
|
|
7
|
+
|
|
8
|
+
Use for host lifecycle installation.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install --runtime <auto|all|claude|codex|hermes> --vault <vault> --yes
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
For Codex, this installs:
|
|
15
|
+
|
|
16
|
+
- `~/.codex/rules/oms.md`
|
|
17
|
+
- `~/.codex/skills/oms-*`
|
|
18
|
+
- `~/.codex/plugins/oms`
|
|
19
|
+
- managed `[mcp_servers.oms]` in `~/.codex/config.toml`
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-retrieve
|
|
3
|
+
description: Retrieve vault knowledge axis-first using folders, frontmatter, wikilinks, and declared lenses.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# oms-retrieve
|
|
7
|
+
|
|
8
|
+
Use `oms_retrieve_by_axis` first. Narrow by concept/folder/property/value/wikilink before lexical query. Use `oms_lazy_load_note` only after selecting candidate notes.
|
|
9
|
+
|
|
10
|
+
Return lens-shaped fields where possible; do not dump full note bodies unless the user asks or the retrieval task needs body evidence.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-setup
|
|
3
|
+
description: Adopt an Obsidian markdown vault into the Oh My Second Brain convention and optionally install host MCP integration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# oms-setup
|
|
7
|
+
|
|
8
|
+
Use when the user wants to initialize Oh My Second Brain for a vault.
|
|
9
|
+
|
|
10
|
+
Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup --vault <vault> --yes
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Then, when host registration is desired:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz install --runtime codex --vault <vault> --yes
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Do not modify vault notes during setup. Oh My Second Brain writes only `vault/.oms/taxonomy.yaml` and `vault/.oms/concepts/`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oms-uninstall
|
|
3
|
+
description: Remove Oh My Second Brain host adapter files and MCP registration without deleting vault notes or vault ontology.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# oms-uninstall
|
|
7
|
+
|
|
8
|
+
Preview first:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall --runtime all --dry-run
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Remove host registrations:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz uninstall --runtime all --yes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Never delete vault notes or `vault/.oms/` as part of host uninstall.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Oh My Second Brain Hermes Adapter
|
|
2
|
+
|
|
3
|
+
Installed by `oms install --runtime hermes` into:
|
|
4
|
+
|
|
5
|
+
- `~/.hermes/skills/knowledge-management/oms/`
|
|
6
|
+
- `~/.hermes/config.yaml` as `mcp_servers.oms`
|
|
7
|
+
|
|
8
|
+
The skill bundle mirrors Oh My Second Brain's capture/retrieve/setup/doctor lifecycle and uses the Oh My Second Brain MCP server for runtime operations.
|