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.
Files changed (90) hide show
  1. package/adapters/README.md +98 -0
  2. package/adapters/claude-code/.claude-plugin/plugin.json +24 -0
  3. package/adapters/claude-code/CLAUDE.md +26 -0
  4. package/adapters/claude-code/skills/capture/SKILL.md +50 -0
  5. package/adapters/claude-code/skills/define/SKILL.md +51 -0
  6. package/adapters/claude-code/skills/doctor/SKILL.md +58 -0
  7. package/adapters/claude-code/skills/retrieve/SKILL.md +55 -0
  8. package/adapters/claude-code/skills/setup/SKILL.md +71 -0
  9. package/adapters/claude-code/skills/uninstall/SKILL.md +34 -0
  10. package/adapters/codex/.codex-plugin/plugin.json +8 -0
  11. package/adapters/codex/.mcp.json +14 -0
  12. package/adapters/codex/AGENTS.md +16 -0
  13. package/adapters/codex/rules/oms.md +25 -0
  14. package/adapters/codex/skills/oms-capture/SKILL.md +16 -0
  15. package/adapters/codex/skills/oms-doctor/SKILL.md +14 -0
  16. package/adapters/codex/skills/oms-install/SKILL.md +19 -0
  17. package/adapters/codex/skills/oms-retrieve/SKILL.md +10 -0
  18. package/adapters/codex/skills/oms-setup/SKILL.md +22 -0
  19. package/adapters/codex/skills/oms-uninstall/SKILL.md +20 -0
  20. package/adapters/hermes/README.md +8 -0
  21. package/adapters/hermes/SOUL.md +19 -0
  22. package/adapters/hermes/manifest.json +7 -0
  23. package/adapters/hermes/skills/capture/SKILL.md +16 -0
  24. package/adapters/hermes/skills/doctor/SKILL.md +14 -0
  25. package/adapters/hermes/skills/install/SKILL.md +19 -0
  26. package/adapters/hermes/skills/retrieve/SKILL.md +10 -0
  27. package/adapters/hermes/skills/setup/SKILL.md +22 -0
  28. package/adapters/hermes/skills/uninstall/SKILL.md +20 -0
  29. package/core/AGENTS.md +110 -0
  30. package/core/agents/librarian.md +43 -0
  31. package/core/agents/retriever.md +62 -0
  32. package/core/ontology/concepts/inbox.yaml +4 -0
  33. package/core/ontology/concepts/literature.yaml +27 -0
  34. package/core/ontology/taxonomy.yaml +11 -0
  35. package/core/skills/capture/SKILL.md +48 -0
  36. package/core/skills/define/SKILL.md +59 -0
  37. package/core/skills/doctor/SKILL.md +49 -0
  38. package/core/skills/retrieve/SKILL.md +56 -0
  39. package/core/skills/setup/SKILL.md +44 -0
  40. package/core/skills/uninstall/SKILL.md +34 -0
  41. package/dist/adapt/HostAdapter.d.ts +21 -0
  42. package/dist/adapt/HostAdapter.js +10 -0
  43. package/dist/adapt/HostAdapter.js.map +1 -0
  44. package/dist/adapt/claudeCode.d.ts +9 -0
  45. package/dist/adapt/claudeCode.js +15 -0
  46. package/dist/adapt/claudeCode.js.map +1 -0
  47. package/dist/adapt/codex.d.ts +9 -0
  48. package/dist/adapt/codex.js +15 -0
  49. package/dist/adapt/codex.js.map +1 -0
  50. package/dist/adapt/hermes.d.ts +9 -0
  51. package/dist/adapt/hermes.js +15 -0
  52. package/dist/adapt/hermes.js.map +1 -0
  53. package/dist/capture/safe.d.ts +36 -0
  54. package/dist/capture/safe.js +167 -0
  55. package/dist/capture/safe.js.map +1 -0
  56. package/dist/cli/oms.d.ts +18 -0
  57. package/dist/cli/oms.js +401 -0
  58. package/dist/cli/oms.js.map +1 -0
  59. package/dist/conventions/frontmatter.d.ts +15 -0
  60. package/dist/conventions/frontmatter.js +23 -0
  61. package/dist/conventions/frontmatter.js.map +1 -0
  62. package/dist/conventions/validate.d.ts +24 -0
  63. package/dist/conventions/validate.js +88 -0
  64. package/dist/conventions/validate.js.map +1 -0
  65. package/dist/graph/cache.d.ts +98 -0
  66. package/dist/graph/cache.js +347 -0
  67. package/dist/graph/cache.js.map +1 -0
  68. package/dist/index.d.ts +7 -0
  69. package/dist/index.js +8 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/install/hosts.d.ts +27 -0
  72. package/dist/install/hosts.js +465 -0
  73. package/dist/install/hosts.js.map +1 -0
  74. package/dist/mcp/server.d.ts +8 -0
  75. package/dist/mcp/server.js +461 -0
  76. package/dist/mcp/server.js.map +1 -0
  77. package/dist/ontology/loader.d.ts +13 -0
  78. package/dist/ontology/loader.js +63 -0
  79. package/dist/ontology/loader.js.map +1 -0
  80. package/dist/ontology/resolver.d.ts +13 -0
  81. package/dist/ontology/resolver.js +37 -0
  82. package/dist/ontology/resolver.js.map +1 -0
  83. package/dist/ontology/types.d.ts +72 -0
  84. package/dist/ontology/types.js +12 -0
  85. package/dist/ontology/types.js.map +1 -0
  86. package/docs/install.md +115 -0
  87. package/docs/release.md +91 -0
  88. package/package.json +64 -0
  89. package/scripts/install.sh +49 -0
  90. package/scripts/uninstall.sh +57 -0
@@ -0,0 +1,19 @@
1
+ # Oh My Second Brain Convention Shim — Hermes
2
+
3
+ <!-- Add this as a context file in your Hermes session to activate Oh My Second Brain conventions. -->
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` for folder-to-concept bindings.
12
+ - Read `.oms/concepts/*.yaml` for field declarations and lenses.
13
+
14
+ **Capture:** Follow the librarian persona — resolve concept, resolve folder from taxonomy,
15
+ construct required frontmatter, write note, then run `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor`.
16
+
17
+ **Retrieve:** Follow the retriever persona — identify purpose, match lens, project lens fields only.
18
+
19
+ > **v0 native install:** `oms install --runtime hermes` installs a Hermes skill bundle and registers Oh My Second Brain MCP in `~/.hermes/config.yaml`. Use Oh My Second Brain MCP tools for capture/retrieve and CLI commands for lifecycle.
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "oms",
3
+ "version": "0.1.5",
4
+ "description": "Oh My Second Brain convention layer for Obsidian vaults \u2014 Hermes skill bundle and MCP adapter.",
5
+ "_note": "oms install writes ~/.hermes/config.yaml mcp_servers.oms and installs skills under ~/.hermes/skills/knowledge-management/oms/.",
6
+ "skills": "./skills/"
7
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: 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: 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: 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: 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: 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: 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.
package/core/AGENTS.md ADDED
@@ -0,0 +1,110 @@
1
+ # Oh My Second Brain Vault Convention — SSOT for Host Agents
2
+
3
+ This file is the authoritative reference a host agent (Claude Code, Codex, Hermes, or any
4
+ other) reads when working inside a vault managed by Oh My Second Brain. It explains the convention model so
5
+ the agent understands *why* knowledge is organized the way it is — not just *where*.
6
+
7
+ ---
8
+
9
+ ## What is a Convention?
10
+
11
+ An Oh My Second Brain **convention** is declarative semantic data the **user owns**. It lives in
12
+ `vault/.oms/` (copied there by `oms setup`; Oh My Second Brain ships the defaults in `core/ontology/`).
13
+ The user edits it freely. Oh My Second Brain enforces whatever is declared — it does not impose structure.
14
+
15
+ The convention has four building blocks:
16
+
17
+ ---
18
+
19
+ ## 1. Concept
20
+
21
+ A **concept** is a note-type. Each concept carries:
22
+
23
+ | Field | Purpose |
24
+ |----------|---------|
25
+ | `concept` | Identifier (e.g. `literature`). |
26
+ | `intent` | One sentence: *what this knowledge is FOR.* |
27
+ | `folder` | The vault folder where notes of this type live. |
28
+ | `fields` | List of frontmatter keys the concept declares. |
29
+ | `lenses` | Named retrieval views (optional). |
30
+
31
+ > "The folder itself is information — every folder declares its intent."
32
+ > Rather than pattern-matching a directory listing, a host agent reads the declared `intent`
33
+ > to understand *why* knowledge lives in a given folder.
34
+
35
+ ---
36
+
37
+ ## 2. Field
38
+
39
+ A **field** is one frontmatter key — the smallest unit of convention. Each field declares:
40
+
41
+ | Property | Meaning |
42
+ |------------|---------|
43
+ | `name` | The frontmatter key (kebab-case, e.g. `source-url`). |
44
+ | `type` | One of `string`, `url`, `date`, `list`, `number`, `boolean`. |
45
+ | `required` | Whether the key must be present and non-empty. |
46
+ | `intent` | Semantic purpose: *what this field is FOR.* |
47
+ | `normalize` | Optional: `kebab`, `lower`, or `trim` — applied at validation. |
48
+ | `immutable` | Advisory: once written, should not change (v0: no-op, forward-compat). |
49
+
50
+ Users grow their convention field-by-field. There is no mandatory field list.
51
+
52
+ ---
53
+
54
+ ## 3. Lens
55
+
56
+ A **lens** is a pre-declared, named retrieval view. It is NOT a query filter — it is a
57
+ concept's declaration of which fields matter for a specific retrieval purpose.
58
+
59
+ Example: a `synthesis` lens on `literature` surfaces `title` and `source-url`, because those
60
+ are the fields needed when synthesizing across references. A host agent uses the active lens
61
+ to know which frontmatter to surface during retrieval.
62
+
63
+ ---
64
+
65
+ ## 4. Taxonomy
66
+
67
+ The **taxonomy** binds folders to concepts and gives each folder a declared `intent`.
68
+
69
+ ```yaml
70
+ version: 1
71
+ folders:
72
+ references:
73
+ intent: "Processed external sources the user has read and synthesized."
74
+ concept: literature
75
+ inbox:
76
+ intent: "Unprocessed captures awaiting triage."
77
+ concept: inbox
78
+ ```
79
+
80
+ A folder may bind to one concept, multiple concepts (list), or `null` (not yet assigned).
81
+
82
+ ---
83
+
84
+ ## Enforcement Posture
85
+
86
+ | Setting | Value | Meaning |
87
+ |---------|-------|---------|
88
+ | `onViolation` | `warn` | Violations are logged but never block writes (v0 is non-blocking). |
89
+ | `additionalProperties` | `preserve` | Frontmatter keys not declared in the concept are left untouched. |
90
+
91
+ Oh My Second Brain enforces what the user declared; it does not touch anything else.
92
+
93
+ ---
94
+
95
+ ## User Ownership
96
+
97
+ 1. `oms setup` scans the vault's existing top-level folders and creates `vault/.oms/`.
98
+ 2. It copies shipped default concepts into `vault/.oms/concepts/` and writes
99
+ `vault/.oms/taxonomy.yaml` — seeded with the user's real folders.
100
+ 3. The user fills in `intent` values and adds or removes fields/lenses freely.
101
+ 4. Oh My Second Brain never imposes a folder structure; it adopts what already exists.
102
+
103
+ ---
104
+
105
+ ## Quick Reference for Host Agents
106
+
107
+ - To understand a note: look up its folder in the taxonomy → read the `concept.intent`.
108
+ - To validate frontmatter: load the concept's `fields`; check `required` + `type`.
109
+ - To retrieve knowledge: apply the relevant `lens` to surface the fields that matter.
110
+ - When in doubt, preserve: `additionalProperties: preserve` means unknown keys are safe.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: librarian
3
+ description: Places incoming knowledge correctly in the vault, filling frontmatter per the declared concept.
4
+ ---
5
+
6
+ # Agent Persona: Librarian
7
+
8
+ The librarian places knowledge into the vault with precision.
9
+ Every note lands in the right folder, carries the right frontmatter, and respects the declared convention.
10
+
11
+ ## Governing principle
12
+
13
+ > "A note without declared intent is noise. A note with correct frontmatter is a first-class citizen."
14
+
15
+ The librarian never improvises a folder or invents a field.
16
+ It reads the convention first, then acts.
17
+
18
+ ## Responsibilities
19
+
20
+ 1. **Concept identification** — match incoming knowledge to a declared concept (`literature`, `inbox`, etc.) by comparing content and purpose against each concept's `intent`.
21
+ 2. **Folder resolution** — look up the correct target folder from `vault/.oms/taxonomy.yaml` based on the matched concept.
22
+ 3. **Frontmatter construction** — fill every `required: true` field; fill known optional fields; leave undeclared fields untouched.
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 oms doctor` (non-blocking) to confirm the new note is clean.
25
+
26
+ ## Decision rules
27
+
28
+ | Situation | Action |
29
+ |-----------|--------|
30
+ | Concept is ambiguous | Default to `inbox` and note ambiguity in a `status: needs-review` field |
31
+ | Required field value is unknown | Use a sentinel `"UNKNOWN"` string and flag it; never omit the key |
32
+ | Folder does not exist in taxonomy | Capture to `inbox/`; surface the missing taxonomy entry to the user |
33
+ | User provides extra context fields | Preserve them (`additionalProperties: preserve`) |
34
+
35
+ ## Interaction style
36
+
37
+ - Ask only for information that is truly missing for required fields.
38
+ - Propose the target folder and concept before writing — let the user confirm once.
39
+ - After writing, show the frontmatter block so the user can see what was committed.
40
+
41
+ ## Skill
42
+
43
+ Invoke via the `capture` skill: `core/skills/capture/SKILL.md`.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: retriever
3
+ description: Surfaces the right knowledge fields from the vault for a declared retrieval purpose using lenses.
4
+ ---
5
+
6
+ # Agent Persona: Retriever
7
+
8
+ The retriever surfaces knowledge through the vault's declared lenses (인출).
9
+ It never dumps raw notes — it filters to the fields that matter for the stated purpose.
10
+
11
+ ## Governing principle
12
+
13
+ > "Retrieval is not search. It is projection: show exactly the fields this purpose requires, nothing more."
14
+
15
+ The retriever reads lens declarations first, then scans notes,
16
+ then returns only the lens-selected fields.
17
+
18
+ ## Responsibilities
19
+
20
+ 1. **Purpose identification** — clarify the user's retrieval goal (synthesize, audit, plan, review, etc.).
21
+ 2. **Lens matching** — find the declared lens on the relevant concept whose `intent` best matches the purpose.
22
+ 3. **Field projection** — for each matching note, return only the fields listed in the lens; discard the rest.
23
+ 4. **Grouping** — present results grouped by concept/folder for orientation.
24
+ 5. **Citation** — always include `source-url` (or equivalent) when the concept carries it, even if the lens does not explicitly list it.
25
+
26
+ ## Lens resolution algorithm
27
+
28
+ ```
29
+ 1. Parse user purpose → keyword(s)
30
+ 2. For each concept in vault/.oms/concepts/*.yaml:
31
+ for each lens in concept.lenses:
32
+ score = semantic_overlap(purpose, lens.intent)
33
+ 3. Select lens with highest score
34
+ 4. Collect all notes in concept's folder
35
+ 5. Project each note's frontmatter to lens.fields
36
+ 6. Return projected results
37
+ ```
38
+
39
+ In v0, step 2 is agent judgment (no runtime engine). The retriever reads the YAML manually.
40
+
41
+ ## Output format
42
+
43
+ ```markdown
44
+ ## [Concept: literature] — Lens: synthesis
45
+
46
+ | title | thesis | source-url |
47
+ |-------|--------|------------|
48
+ | Attention Is All You Need | Self-attention replaces recurrence | https://arxiv.org/abs/1706.03762 |
49
+ ```
50
+
51
+ ## Decision rules
52
+
53
+ | Situation | Action |
54
+ |-----------|--------|
55
+ | No matching lens | Fall back to all `required: true` fields |
56
+ | Note missing a lens field | Show `—` for that cell; do not skip the note |
57
+ | Multiple concepts match purpose | Return results from all matching concepts, grouped |
58
+ | No notes in concept folder | Report "0 notes found under `<folder>/`" |
59
+
60
+ ## Skill
61
+
62
+ Invoke via the `retrieve` skill: `core/skills/retrieve/SKILL.md`.
@@ -0,0 +1,4 @@
1
+ concept: inbox
2
+ intent: "Unprocessed capture awaiting triage; no required structure yet."
3
+ folder: inbox
4
+ fields: []
@@ -0,0 +1,27 @@
1
+ concept: literature
2
+ intent: "A processed reference: an external source the user has read and synthesized."
3
+ folder: references
4
+ fields:
5
+ - name: title
6
+ type: string
7
+ required: true
8
+ intent: "The title of the referenced work."
9
+ - name: source-url
10
+ type: url
11
+ required: true
12
+ intent: "The canonical URL where the source can be found."
13
+ - name: author
14
+ type: list
15
+ required: false
16
+ intent: "One or more authors of the referenced work."
17
+ - name: tags
18
+ type: list
19
+ required: false
20
+ intent: "Topical tags for retrieval and clustering."
21
+ normalize: kebab
22
+ lenses:
23
+ - name: synthesis
24
+ intent: "Surface the minimal fields needed when synthesizing across references."
25
+ fields:
26
+ - title
27
+ - source-url
@@ -0,0 +1,11 @@
1
+ version: 1
2
+ folders:
3
+ references:
4
+ intent: "Processed external sources the user has read and synthesized."
5
+ concept: literature
6
+ notes:
7
+ intent: "Unprocessed or loosely structured notes awaiting triage or development."
8
+ concept: inbox
9
+ inbox:
10
+ intent: "Raw unprocessed captures awaiting triage; nothing required yet."
11
+ concept: inbox
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: capture
3
+ description: Capture knowledge into the vault under the declared Oh My Second Brain convention.
4
+ ---
5
+
6
+ # Skill: capture
7
+
8
+ Place a piece of knowledge into the vault according to the Oh My Second Brain convention.
9
+ The librarian persona governs this action.
10
+
11
+ ## What this skill does
12
+
13
+ 1. Determine the **concept** that best fits the incoming knowledge (literature, inbox, note, etc.).
14
+ 2. Resolve the **target folder** from `vault/.oms/taxonomy.yaml` — the folder whose declared `intent` matches this knowledge type.
15
+ 3. Generate a filename that follows the concept's naming rules (default: `YYYY-MM-DD-<slugified-title>.md`).
16
+ 4. Construct frontmatter from the concept's declared fields:
17
+ - Fill every `required: true` field.
18
+ - Fill optional fields where values are known.
19
+ - Leave undeclared (extra) frontmatter fields untouched (`additionalProperties: preserve`).
20
+ 5. Write the note body after the frontmatter block.
21
+ 6. Run `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 new note passes field validation.
22
+
23
+ ## Conceptual shell-out (roadmap — NOT wired in v0)
24
+
25
+ The runtime automation described above is **agent-guidance only in v0**.
26
+ No capture engine exists yet; the agent follows these steps manually.
27
+ When the MCP server is wired (`src/mcp/server.ts` → real), `capture` will call
28
+ the `capture` MCP tool directly.
29
+
30
+ ## Example agent steps
31
+
32
+ ```
33
+ User: "Save this paper: 'Attention Is All You Need', arxiv.org/abs/1706.03762"
34
+
35
+ 1. concept = literature (matches folder: references/)
36
+ 2. folder = vault/references/
37
+ 3. file = vault/references/2017-06-12-attention-is-all-you-need.md
38
+ 4. frontmatter:
39
+ title: "Attention Is All You Need"
40
+ source-url: "https://arxiv.org/abs/1706.03762"
41
+ captured-at: "2026-05-31"
42
+ 5. write note body
43
+ 6. npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor ← verify (exits 0, non-blocking)
44
+ ```
45
+
46
+ ## Persona
47
+
48
+ Use the **librarian** agent persona for this skill (`core/agents/librarian.md`).
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: define
3
+ description: Grow the vault convention by adding or editing a metadata field on a concept.
4
+ ---
5
+
6
+ # Skill: define
7
+
8
+ Extend your Oh My Second Brain convention field-by-field.
9
+ Each frontmatter key is a **unit of convention**: it carries a declared `intent`,
10
+ type, and optional rules (`required`, `normalize`, `immutable`).
11
+
12
+ ## Entry point
13
+
14
+ ```bash
15
+ npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz define
16
+ ```
17
+
18
+ This is the intended user-facing command (roadmap: interactive runtime not built yet).
19
+ In v0, `setup` and `doctor` are the REAL CLI commands today.
20
+ Use `define` as **agent-guided convention editing** until the interactive runtime ships.
21
+
22
+ ## What this skill does (agent-guided, v0)
23
+
24
+ 1. Ask the user: which **concept** are they extending? (e.g. `literature`, `inbox`)
25
+ 2. Ask: what is the new **field name**? (snake-case, e.g. `thesis`)
26
+ 3. Ask: what is this field's **intent** — why does this knowledge live here?
27
+ 4. Ask: **type** (`string` | `string[]` | `date` | `url` | `boolean`), **required** (yes/no).
28
+ 5. Optionally ask: `normalize` (e.g. `lowercase`), `immutable` (lock after creation).
29
+ 6. Open `vault/.oms/concepts/<concept>.yaml` and append the new field entry.
30
+ 7. 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 (exits 0).
31
+
32
+ ## Convention YAML shape (one field entry)
33
+
34
+ ```yaml
35
+ fields:
36
+ - name: thesis
37
+ type: string
38
+ required: false
39
+ intent: "The central claim this source makes"
40
+ ```
41
+
42
+ ## Growing lenses
43
+
44
+ After adding a field, consider whether it belongs in an existing lens (`synthesis`, `audit`)
45
+ or warrants a new lens. Edit the `lenses:` block in the same concept YAML.
46
+
47
+ ## Where the convention lives
48
+
49
+ All convention data is **user-owned** at `vault/.oms/`:
50
+ ```
51
+ vault/.oms/
52
+ concepts/
53
+ literature.yaml
54
+ inbox.yaml
55
+ taxonomy.yaml
56
+ ```
57
+
58
+ Oh My Second Brain ships defaults (from `core/ontology/`); `oms setup` copies them into the vault.
59
+ The user then edits them at will — Oh My Second Brain only enforces, never overwrites.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: doctor
3
+ description: Validate vault notes against the Oh My Second Brain convention and report violations (REAL today).
4
+ ---
5
+
6
+ # Skill: doctor
7
+
8
+ Check every note in your vault against its declared concept schema.
9
+ This skill is **REAL in v0** — the CLI command is fully implemented.
10
+
11
+ ## Shell-out
12
+
13
+ ```bash
14
+ npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor [--vault <path>]
15
+ ```
16
+
17
+ - `--vault <path>` — path to your Obsidian vault root (default: current directory).
18
+ - Always **exits 0** in v0 (non-blocking; `onViolation: warn`).
19
+
20
+ ## What the command does
21
+
22
+ 1. Loads `vault/.oms/` and `vault/.oms/taxonomy.yaml`.
23
+ 2. Walks every `.md` note in the vault.
24
+ 3. For each note, resolves its **concept** from the taxonomy folder binding.
25
+ 4. Calls `validateFrontmatter(frontmatter, concept)` and collects `Violation[]`.
26
+ 5. Prints a per-note summary of violations (field, rule, message).
27
+ 6. Prints total counts: notes checked, violations found.
28
+ 7. Exits 0 regardless of violation count (v0 is advisory only).
29
+
30
+ ## Violation rules
31
+
32
+ | Rule | Description |
33
+ |------|-------------|
34
+ | `required` | A field declared `required: true` is missing from the note's frontmatter |
35
+ | `type` | The field value does not match the declared type |
36
+ | `immutable` | Field changed after initial set — **suppressed in v0** (no baseline available) |
37
+
38
+ Undeclared frontmatter fields are **never** reported as violations
39
+ (`additionalProperties: preserve`).
40
+
41
+ ## Recommended usage
42
+
43
+ Run `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor` after:
44
+ - Any `oms setup` run
45
+ - Adding a new field via `oms define`
46
+ - Bulk-editing notes
47
+
48
+ Integrate into CI by adding `npx oms doctor --vault ./vault` to your workflow.
49
+ It will never fail the build in v0.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: retrieve
3
+ description: Retrieve knowledge from the vault through declared Oh My Second Brain lenses (인출).
4
+ ---
5
+
6
+ # Skill: retrieve
7
+
8
+ Surface the right notes and fields for a given purpose using the vault's
9
+ declared retrieval lenses.
10
+
11
+ ## What this skill does
12
+
13
+ 1. Identify the **retrieval purpose** from the user's request (e.g. "synthesize this topic", "audit my sources").
14
+ 2. Match the purpose to a declared **lens** (e.g. `synthesis`, `audit`) on the relevant concept.
15
+ 3. For each matching note, return only the fields listed in that lens — not all frontmatter.
16
+ 4. Present results grouped by concept/folder with lens-filtered frontmatter.
17
+
18
+ ## Lenses (인출 뷰)
19
+
20
+ A lens is a pre-declared named retrieval view, not a query filter.
21
+ Each concept declares which fields matter for which purpose:
22
+
23
+ ```yaml
24
+ lenses:
25
+ - name: synthesis
26
+ intent: "Surface what was argued and where to find it"
27
+ fields: [title, thesis, source-url]
28
+ - name: audit
29
+ intent: "Check provenance and capture date"
30
+ fields: [title, source-url, captured-at]
31
+ ```
32
+
33
+ The retrieval skill reads these declarations from `vault/.oms/concepts/*.yaml`.
34
+
35
+ ## Conceptual shell-out (roadmap — NOT wired in v0)
36
+
37
+ The runtime automation described above is **agent-guidance only in v0**.
38
+ No retrieval engine exists yet; the agent follows these steps manually.
39
+ When the MCP server is wired (`src/mcp/server.ts` → real), `retrieve` will call
40
+ the `retrieve` MCP tool directly.
41
+
42
+ ## Example agent steps
43
+
44
+ ```
45
+ User: "Synthesize my literature notes on transformers"
46
+
47
+ 1. purpose = synthesis
48
+ 2. concept = literature → lens = synthesis → fields = [title, thesis, source-url]
49
+ 3. scan = vault/references/*.md
50
+ 4. for each note: extract only those three frontmatter fields
51
+ 5. return a grouped summary with citations
52
+ ```
53
+
54
+ ## Persona
55
+
56
+ Use the **retriever** agent persona for this skill (`core/agents/retriever.md`).
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: setup
3
+ description: Adopt an existing Obsidian vault into the Oh My Second Brain convention (REAL today).
4
+ ---
5
+
6
+ # Skill: setup
7
+
8
+ Adopt your existing vault into the Oh My Second Brain convention.
9
+ This skill is **REAL in v0** — the CLI command is fully implemented.
10
+
11
+ ## Shell-out
12
+
13
+ ```bash
14
+ npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz setup [--vault <path>] [--yes]
15
+ ```
16
+
17
+ - `--vault <path>` — path to your Obsidian vault root (default: current directory).
18
+ - `--yes` / `OMS_NON_INTERACTIVE=1` — bypass all prompts and accept defaults (for CI / non-TTY).
19
+
20
+ ## What the command does
21
+
22
+ 1. Resolves the vault root (from `--vault` or `cwd`).
23
+ 2. Scans existing **top-level folders** in the vault (does NOT impose a structure).
24
+ 3. For each folder, asks its `intent` (why this knowledge lives here), pre-filling a humanized default.
25
+ 4. Asks which shipped concept binds to this folder (`literature`, `inbox`, or none).
26
+ 5. Writes `vault/.oms/taxonomy.yaml` (with `version: 0`).
27
+ 6. Copies the shipped default concepts into `vault/.oms/concepts/`.
28
+
29
+ After setup, the vault is governed by Oh My Second Brain conventions.
30
+ Run `npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor` at any time to validate existing notes.
31
+
32
+ ## What setup does NOT do
33
+
34
+ - Does NOT rename, move, or delete any existing notes.
35
+ - Does NOT impose a new folder structure.
36
+ - Does NOT modify existing frontmatter.
37
+
38
+ ## After setup
39
+
40
+ Run the `doctor` skill to check your notes against the convention:
41
+
42
+ ```bash
43
+ npx -y https://github.com/GoBeromsu/oms/releases/download/oms-v0.1.5/oms-0.1.5.tgz doctor [--vault <path>]
44
+ ```