oh-my-second-brain 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/CHANGELOG-assets.md +4 -0
  5. package/CHANGELOG-cli.md +4 -0
  6. package/CHANGELOG-kernel.md +5 -0
  7. package/CHANGELOG-mcp.md +7 -0
  8. package/CHANGELOG-vendors.md +4 -0
  9. package/CHANGELOG.md +8 -0
  10. package/README.ko.md +58 -12
  11. package/README.md +57 -11
  12. package/assets/claude/CLAUDE.md +5 -0
  13. package/assets/codex/AGENTS.md +8 -0
  14. package/assets/codex/rules/oms.md +25 -0
  15. package/assets/hermes/SOUL.md +23 -0
  16. package/assets/hermes-manifest.json +1 -1
  17. package/assets/skills/search/SKILL.md +23 -1
  18. package/assets/skills/status/SKILL.md +22 -0
  19. package/assets/skills/template/SKILL.md +38 -10
  20. package/assets/skills/write/SKILL.md +35 -8
  21. package/dist/cli/note-command.js +3 -3
  22. package/dist/cli/note-command.js.map +1 -1
  23. package/dist/cli/setup-command.js +2 -2
  24. package/dist/cli/setup-command.js.map +1 -1
  25. package/dist/cli/template-command.js +133 -36
  26. package/dist/cli/template-command.js.map +1 -1
  27. package/dist/kernel/capture/safe.d.ts +1 -0
  28. package/dist/kernel/capture/safe.js +166 -39
  29. package/dist/kernel/capture/safe.js.map +1 -1
  30. package/dist/kernel/contracts/index.d.ts +2 -0
  31. package/dist/kernel/contracts/index.js +18 -12
  32. package/dist/kernel/contracts/index.js.map +1 -1
  33. package/dist/kernel/conventions/write-contract.d.ts +2 -1
  34. package/dist/kernel/conventions/write-contract.js +12 -1
  35. package/dist/kernel/conventions/write-contract.js.map +1 -1
  36. package/dist/kernel/search/morning-test-fixtures.js +5 -3
  37. package/dist/kernel/search/morning-test-fixtures.js.map +1 -1
  38. package/dist/kernel/setup/documents.d.ts +0 -1
  39. package/dist/kernel/setup/documents.js +0 -1
  40. package/dist/kernel/setup/documents.js.map +1 -1
  41. package/dist/kernel/templates/canonical.js +5 -1
  42. package/dist/kernel/templates/canonical.js.map +1 -1
  43. package/dist/kernel/templates/census.d.ts +54 -0
  44. package/dist/kernel/templates/census.js +735 -0
  45. package/dist/kernel/templates/census.js.map +1 -0
  46. package/dist/kernel/templates/content-contract.d.ts +160 -0
  47. package/dist/kernel/templates/content-contract.js +608 -0
  48. package/dist/kernel/templates/content-contract.js.map +1 -0
  49. package/dist/kernel/templates/doctor.d.ts +5 -1
  50. package/dist/kernel/templates/doctor.js +72 -49
  51. package/dist/kernel/templates/doctor.js.map +1 -1
  52. package/dist/kernel/templates/file-lock.d.ts +3 -0
  53. package/dist/kernel/templates/file-lock.js +86 -0
  54. package/dist/kernel/templates/file-lock.js.map +1 -0
  55. package/dist/kernel/templates/index.d.ts +5 -3
  56. package/dist/kernel/templates/index.js +1 -1
  57. package/dist/kernel/templates/index.js.map +1 -1
  58. package/dist/kernel/templates/interview-ledger.d.ts +51 -0
  59. package/dist/kernel/templates/interview-ledger.js +236 -0
  60. package/dist/kernel/templates/interview-ledger.js.map +1 -0
  61. package/dist/kernel/templates/interview-service.d.ts +49 -0
  62. package/dist/kernel/templates/interview-service.js +484 -0
  63. package/dist/kernel/templates/interview-service.js.map +1 -0
  64. package/dist/kernel/templates/interview.d.ts +33 -0
  65. package/dist/kernel/templates/interview.js +813 -0
  66. package/dist/kernel/templates/interview.js.map +1 -0
  67. package/dist/kernel/templates/migration.d.ts +1 -9
  68. package/dist/kernel/templates/migration.js +28 -52
  69. package/dist/kernel/templates/migration.js.map +1 -1
  70. package/dist/kernel/templates/operations.d.ts +1 -1
  71. package/dist/kernel/templates/operations.js +17 -7
  72. package/dist/kernel/templates/operations.js.map +1 -1
  73. package/dist/kernel/templates/paths.js +4 -4
  74. package/dist/kernel/templates/paths.js.map +1 -1
  75. package/dist/kernel/templates/policy.d.ts +36 -5
  76. package/dist/kernel/templates/policy.js +131 -33
  77. package/dist/kernel/templates/policy.js.map +1 -1
  78. package/dist/kernel/templates/reconcile.d.ts +12 -0
  79. package/dist/kernel/templates/reconcile.js +434 -0
  80. package/dist/kernel/templates/reconcile.js.map +1 -0
  81. package/dist/kernel/templates/renderer.d.ts +1 -0
  82. package/dist/kernel/templates/renderer.js +2 -2
  83. package/dist/kernel/templates/renderer.js.map +1 -1
  84. package/dist/kernel/templates/resolver.d.ts +27 -2
  85. package/dist/kernel/templates/resolver.js +407 -92
  86. package/dist/kernel/templates/resolver.js.map +1 -1
  87. package/dist/kernel/templates/review-context.d.ts +22 -0
  88. package/dist/kernel/templates/review-context.js +201 -0
  89. package/dist/kernel/templates/review-context.js.map +1 -0
  90. package/dist/kernel/templates/transaction.js +15 -90
  91. package/dist/kernel/templates/transaction.js.map +1 -1
  92. package/dist/kernel/templates/types.d.ts +31 -9
  93. package/dist/mcp/server.d.ts +7 -0
  94. package/dist/mcp/server.js +156 -57
  95. package/dist/mcp/server.js.map +1 -1
  96. package/dist/mcp/template-notice.d.ts +52 -0
  97. package/dist/mcp/template-notice.js +222 -0
  98. package/dist/mcp/template-notice.js.map +1 -0
  99. package/dist/mcp/update-notice.d.ts +2 -2
  100. package/dist/mcp/update-notice.js +5 -3
  101. package/dist/mcp/update-notice.js.map +1 -1
  102. package/docs/adapters.md +26 -20
  103. package/docs/architecture.md +71 -7
  104. package/docs/cli-map.md +33 -5
  105. package/docs/conventions.md +80 -12
  106. package/docs/install.md +54 -7
  107. package/package.json +1 -1
  108. package/skills/search/SKILL.md +23 -1
  109. package/skills/status/SKILL.md +22 -0
  110. package/skills/template/SKILL.md +38 -10
  111. package/skills/write/SKILL.md +35 -8
  112. package/dist/kernel/templates/register.d.ts +0 -12
  113. package/dist/kernel/templates/register.js +0 -138
  114. package/dist/kernel/templates/register.js.map +0 -1
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "name": "oms",
12
12
  "description": "Oh My Second Brain convention layer for Obsidian vaults — capture, retrieve, and validate knowledge under a declared semantic convention.",
13
- "version": "0.14.0",
13
+ "version": "0.15.0",
14
14
  "author": {
15
15
  "name": "gobeumsu",
16
16
  "email": "gobeumsu@gmail.com"
@@ -37,5 +37,5 @@
37
37
  ]
38
38
  }
39
39
  ],
40
- "version": "0.14.0"
40
+ "version": "0.15.0"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Oh My Second Brain convention layer for Obsidian vaults — seven shared skills and five MCP tools under a declared semantic convention.",
5
5
  "author": {
6
6
  "name": "gobeumsu"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Oh My Second Brain convention layer for Obsidian vaults — Codex native rules, skills, and MCP adapter.",
5
5
  "_note": "oms host install writes Codex MCP config and provenance, installs ~/.codex/rules/oms.md, and installs the seven shared skills under ~/.codex/skills/oms-*.",
6
6
  "skills": "./assets/skills/",
@@ -4,6 +4,10 @@ Skills, agents, templates, and host guidance changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.15.0] - 2026-09-19
8
+
9
+ - **Host guidance now teaches selected-folder template sources instead of per-file registration or folder modes.** It documents the exact `템플릿에 변경이 있습니다` / `확인하기` / `나중에` notice, host-only deferral, long-lived `templateNotice` results, and the resumable `interview-next` → `interview-answer` → `commit-contracts` flow that publishes only user-confirmed controls. Placement is write-time only (explicit destination, then taxonomy default, then `ask`); source review preserves Markdown bytes and does not invent a registration prerequisite, widget, or host configuration.
10
+
7
11
  ## [0.14.0] - 2026-09-05
8
12
 
9
13
  - Shared skills and runtime guidance use the final command families and exclusive MCP operations, with no obsolete command aliases. Authored assets and the shipped root skill mirror remain byte-identical. (#125)
package/CHANGELOG-cli.md CHANGED
@@ -4,6 +4,10 @@ Changes to the `oms` command surface belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.15.0] - 2026-09-19
8
+
9
+ - **Breaking: the template CLI now exposes a selected-folder census and linear review flow.** The exact leaves are `scan|list|show|add|update|move|remove|default|check|regenerate-types|review|answer|commit`; `scan` is read-only, `add <folder>` selects source scope, and `add --id <id> --from <file>` remains explicit source authoring rather than contract review. `answer <question-id> --answer <JSON> --census-digest <digest> --ledger-digest <digest|null>` forwards server-returned CAS fields, while `commit` adds the existing dry-run or `--yes --approved-digest` guard. This removes the per-file registration ritual without weakening verified-target writes; note creation considers `--folder <note-folder>` before a taxonomy default and then `ask`, with no template-creation target-folder form.
10
+
7
11
  ## [0.14.0] - 2026-09-05
8
12
 
9
13
  - HTTP routes reject malformed bodies and fields instead of coercing them into empty queries. Status retains unaffected component evidence when convention, history, engine, or graph health is unavailable. (#125)
@@ -4,6 +4,11 @@ Domain logic changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.15.0] - 2026-09-19
8
+
9
+ - **Breaking: template contracts now reconcile from an explicit selected-folder census instead of per-file registration or auto/manual modes.** Every `.md` beneath the selected scope is classified for add, edit, delete, or rename; source bytes stay in place and only user-confirmed `.oms` controls publish. The two-tier freshness gate hashes raw shared authorities first and then isolates changed templates as pending while preserving unrelated note writes. Metadata and bounded body-node contracts (with per-node requiredness/order) replace opaque body assumptions; anchored resumable questions and a locked CAS preserve unaffected answers. Historical ledger census is not blanket stale rejection: current request CAS and per-answer anchors govern validity. Ambiguous repeated body nodes remain contextualized, missing required-body rules require explicit disposition, and placement is optional during review then resolves at note creation by explicit destination, taxonomy default, or `ask`.
10
+ - **Review approval is bound to independently recorded source/body evidence, the exact captured controls, and the complete selected census.** Derived descriptors alone cannot transfer template identity; approved raw-body evidence preserves confirmation-only rename hints after restart without inferring body requirements. New unbound sources invalidate the reviewed scope, other template operations cannot absorb pending sibling edits, and deferred deletions remain actionable. Mutation and taxonomy identities normalize before routing so NFC/NFD spelling cannot lose source updates or authored placement. Public confirmation omits raw source/control byte arrays.
11
+
7
12
  ## [0.14.0] - 2026-09-05
8
13
 
9
14
  - Read-only engine connections use stable vault-external SQLite snapshots, including committed WAL content, so source sidecars remain untouched even while the reader is open. Store rebuild/drop repairs share verified-target admission and server-checked postconditions across entrypoints. (#125)
package/CHANGELOG-mcp.md CHANGED
@@ -4,6 +4,13 @@ MCP server tools and resources belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.15.0] - 2026-09-19
8
+
9
+ - The bundled MCP SDK now resolves `hono` 4.13.8, clearing the moderate advisory group that affected its HTTP transport's body and query parsing. Only the lockfile moves; no declared dependency is added or changed.
10
+ - Pending body contracts and incomplete fresh projection coverage also surface the generic template notice when no new raw source diff exists, so successful source authoring cannot hide the remaining contract confirmation.
11
+
12
+ - **Template review now uses exactly `interview-next`, `interview-answer`, and `commit-contracts` under `write { op: "template" }`, with a minimal notice and long-lived carrier.** Selected-folder census changes preserve source bytes and publish only user-confirmed controls through the guarded flow; an affected template is pending without blocking unrelated templates, while shared-authority drift still fails closed vault-wide. The initial display is exactly `템플릿에 변경이 있습니다` with exactly `확인하기` and `나중에`; `나중에` is host-only with no server call or ledger mutation, and `templateNotice` is surfaced on tool results even when boot instructions are stale. The five-tool surface is unchanged.
13
+
7
14
  ## [0.14.0] - 2026-09-05
8
15
 
9
16
  ### Changed
@@ -4,6 +4,10 @@ Per-host adapter and installer changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.15.0] - 2026-09-19
8
+
9
+ - **Claude, Codex, and Hermes guidance now aligns with folder-sourced template contracts.** Each native host surface explains selected-folder census without per-file registration or folder modes, the exact minimal notice and host-only `나중에`, and the resumable `interview-next` → `interview-answer` → `commit-contracts` flow. Review preserves source bytes and publishes only user-confirmed controls; affected-template pending remains scoped while shared-authority failures stay fail-closed globally. Note creation uses explicit folder, taxonomy default, then `ask`, without changing the host-specific skill/tool asymmetry.
10
+
7
11
  ## [0.14.0] - 2026-09-05
8
12
 
9
13
  - Native host launch manifests use `oms serve mcp`; registrations retain seven shared skills and exactly five MCP tools. Host synchronization updates OMS assets independently of package installation and never upgrades the host application. (#125)
package/CHANGELOG.md CHANGED
@@ -10,6 +10,14 @@ This aggregate changelog contains changes that span multiple layers.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.15.0] - 2026-09-19
14
+
15
+ - **Breaking: a selected template folder, not a per-file registration step, is what makes a template usable.** Every `.md` beneath a folder you explicitly select is a census candidate tracked by content hash, so adding, editing, deleting, or renaming a source is picked up without registering each file and without the retired auto/manual folder modes. This spans layers deliberately: the kernel owns the census, contract derivation, interview ledger, and guarded reconcile; the CLI gains `oms template review|answer|commit`; MCP gains the matching `interview-next`, `interview-answer`, and `commit-contracts` modes plus the notice carrier; and the shared skills and host guidance describe one vocabulary. The five MCP tools and seven skills are unchanged.
16
+
17
+ Your files stay yours. Review reads and verifies source bytes where they already are and publishes only `.oms` control files through the existing exact-digest transaction — it never rewrites a template or an existing note. A change surfaces as exactly `템플릿에 변경이 있습니다` with `확인하기` and `나중에`, naming nothing; `나중에` is handled by the host alone. Confirming opens one linear interview that asks only what it must, keeps confirmed answers that the edit did not touch, resumes after an interruption, re-asks only the answers whose anchored part of the source actually changed, and still ends at an explicit final confirmation even when nothing is left to ask. Contracts now describe frontmatter *and* a bounded body grammar with per-node requiredness and order; what OMS observed and what you confirmed stay separate, so an ambiguous source asks rather than inventing a rule.
18
+
19
+ A changed template no longer stalls the rest of the vault: shared authority files still fail closed vault-wide, but a single edited source makes only its own template pending while unrelated notes keep writing. Approval records independently derived source and body evidence, so a hand-edited projection can never transfer a template's identity. Note placement is no longer a precondition for having a contract — it is resolved when a note is created, from an explicit destination, then the taxonomy default, then by asking. See ADR-013.
20
+
13
21
  ## [0.14.0] - 2026-09-05
14
22
 
15
23
  - **Breaking: commands have one noun-and-verb home across CLI, MCP, skills, and host launchers.** (#125) Note, template, wikilink, bridge, index, graph, host, package, and model operations no longer overlap through legacy top-level aliases. The five MCP tools remain; exclusive operations retain the underlying capabilities. See `docs/cli-map.md` for the full map. Native MCP launch is `oms serve mcp`.
package/README.ko.md CHANGED
@@ -8,14 +8,16 @@ Oh My Second Brain(`oms`)은 기존 Obsidian/Markdown 볼트를 노트 소유권
8
8
  - 각 템플릿은 경로·digest와 독립적인 안정적 `templateId`를 가지며, 볼트 전체의 `BaseContract` 하나를 상속한다.
9
9
  - `.obsidian/types.json`은 읽기 전용 타입 권위다.
10
10
  - 사용자 소유 온톨로지는 계속 활성 상태다. `.oms/template-policy.json`은 노트·필드 의미와 필수값, 형식, 허용값, 기본값, 이름 규칙, 정체성, 바인딩을 기록한다.
11
- - `.oms/taxonomy.json`은 폴더·링크 의미와 배치를 소유하며, 작성된 폴더 의미는 `folder-ontology` 검색 축으로 노출된다. runtime의 유일한 권위이며, setup이 레거시 YAML을 한 번 변환한다.
11
+ - `.oms/taxonomy.json`은 폴더·링크 의미와 배치를 소유하며, 작성된 폴더 의미는 `folder-ontology` 검색 축으로 노출된다. runtime의 유일한 권위다.
12
12
  - `.oms/types.json`은 쓰기·검색용 검증된 파생 projection이다. 직접 편집하지 않는다.
13
13
 
14
14
  제거된 것은 노트 정체성으로서의 `concept`와 번들 runtime 기본값이지, 의미 계층으로서의 온톨로지가 아니다.
15
15
 
16
16
  ## 설정
17
17
 
18
- Setup은 기존 템플릿을 재귀 탐색하고 migration을 제안한다. 노트 타입 기본값을 번들로 강요하지 않으며 노트를 수정하지 않는다.
18
+ Setup은 명시적으로 선택한 템플릿 폴더 안의 기존 템플릿을 재귀 탐색하고
19
+ migration을 제안한다. 노트 타입 기본값을 번들로 강요하지 않으며 노트를
20
+ 수정하지 않는다.
19
21
 
20
22
  ```bash
21
23
  oms setup --vault /path/to/vault --dry-run
@@ -24,11 +26,57 @@ oms setup --vault /path/to/vault --yes --approved-digest <표시된-digest>
24
26
 
25
27
  관리 템플릿 변경도 dry-run, 호출자가 검토한 정확한 digest, CAS, transaction, 사후조건 receipt를 거친다.
26
28
 
29
+ ## 템플릿 흐름
30
+
31
+ 명시적으로 선택한 템플릿 폴더 아래의 모든 `.md`는 템플릿 원본
32
+ 후보가 된다. review는 원본을 검증하고 같은 위치의 바이트를 보존하며,
33
+ 파일별 등록 절차나 auto/manual 폴더 mode는 필요하지 않다. OMS는
34
+ 메타데이터 계약(frontmatter key·type·requiredness·`filledBy`)과 제한된
35
+ 본문 구조(ATX heading, fence code block, fence 밖의 ordered/unordered list
36
+ run, `<!-- oms:content -->`, 문서 순서/EOL/BOM/final-newline)를 함께
37
+ 도출한다. paragraph, setext heading, 모든 Markdown을 강제한다고 주장하지
38
+ 않는다. 원본이 바뀌면 의존하는 템플릿만 pending이 되므로 다른 템플릿
39
+ 쓰기는 계속 가능하며, shared authority 변경이나 불일치는 볼트 전체를
40
+ fail-closed 한다.
41
+
42
+ 선택한 폴더의 원본이 바뀌면 호스트에 처음 표시할 알림은 정확히
43
+ `템플릿에 변경이 있습니다`이며, 동작은 정확히 `확인하기`와 `나중에`다.
44
+ 처음 알림에는 템플릿 이름·hash·change class를 표시하지 않는다.
45
+ `나중에`는 host-only로 server를 호출하지 않고 interview ledger도 바꾸지
46
+ 않는다. `확인하기`는 MCP `write { op: "template", mode: "interview-next" }`로
47
+ 선형 resumable interview를 시작한다. 서버가 반환한 다음 질문을 따라
48
+ 진행하고 영향 없는 confirmed answer는 보존한다. 모든 필요한 질문 뒤에는
49
+ 정확한 최종 digest를 보여주고 사용자가 승인한 경우에만
50
+ `mode: "commit-contracts"`로 `.oms` control만 publish한다. self-approve하지
51
+ 않는다. `status`와 search는 계속 읽기 전용이며 boot instruction이 stale한
52
+ long-lived host도 반환된 `templateNotice`를 표시해야 한다.
53
+
54
+ 정확한 CLI review 흐름은 다음과 같다.
55
+
56
+ ```text
57
+ oms template review
58
+ oms template answer <question-id> --answer <JSON> --census-digest <digest> --ledger-digest <digest|null>
59
+ oms template commit --census-digest <digest> --ledger-digest <digest|null> --dry-run
60
+ oms template commit --census-digest <digest> --ledger-digest <digest|null> --yes --approved-digest <digest>
61
+ ```
62
+
63
+ answer는 서버가 반환한 question과 CAS 값을 사용한다. commit은 같은 CAS
64
+ 값과 기존 dry-run 또는 yes/approved-digest guard를 함께 사용한다.
65
+
66
+ 정확한 note 생성 사용법은 다음과 같다.
67
+
68
+ ```text
69
+ oms note create [template-id] --body <text>|--body-file <file> [--frontmatter <json>|--frontmatter-file <file>] [--folder <note-folder>]
70
+ ```
71
+
72
+ 노트 생성 시 배치 우선순위는 명시적 caller folder, taxonomy default, `ask`
73
+ 순서이며, 배치가 없다고 contract review를 막지 않는다.
74
+
27
75
  ## CLI
28
76
 
29
77
  ```text
30
78
  oms setup 기존 볼트 템플릿 탐색 및 채택
31
- oms template scan|list|show|add|update|move|remove|default|check|regenerate-types
79
+ oms template scan|list|show|add|update|move|remove|default|check|regenerate-types|review|answer|commit
32
80
  oms note create|append|update|audit|backfill|get
33
81
  oms link check|suggest|apply 노트 wikilink 점검·제안·적용
34
82
  oms bridge add|remove|status 저장소-볼트 target bridge 관리
@@ -45,15 +93,6 @@ oms status 읽기 전용 종합 상태 표
45
93
 
46
94
  `oh-my-second-brain`은 전체 명령이고 `oms`는 짧은 별칭이다.
47
95
 
48
- `oms template add`에는 세 형태가 있다. 폴더를 넘기면 그 안의 템플릿을
49
- 등록하고, 파일과 `--id`를 넘기면 기존 템플릿을 등록하며, `--id`와
50
- `--from`을 함께 쓰면 새 템플릿을 만든다. `--from` 형태는 등록된
51
- `templateFolders[].default` 위치에 쓰며, 이 템플릿 폴더는 노트 배치
52
- 위치를 제한하지 않는다. `oms template default <id>`가 기본 바인딩을
53
- 선언한다. 명시적 템플릿 없이 노트를 만들 때는 이 바인딩만 사용하며,
54
- 없으면 첫 템플릿을 임의 선택하지 않고 `TEMPLATE_DEFAULT_UNDECLARED`로
55
- 실패한다.
56
-
57
96
  ### 도움말 계약
58
97
 
59
98
  인식된 모든 명령은 `--help`와 `-h`를 받아들이며, exit 0으로 종료하고
@@ -91,6 +130,13 @@ Setup에서는 로컬 검증 acquisition 정책 하나를 선택한다:
91
130
 
92
131
  쓰기는 하나의 `ResolvedTemplate`을 해석해 create, append, update를 수행한다. 템플릿 변경, projection 재생성, 한 노트 정체성 backfill은 검증된 target과 명시적 승인 digest가 필요하다. `status`와 모든 검색 동작은 읽기 전용이다.
93
132
 
133
+ 템플릿 contract review는 `oms_write`의 `op: "template"`에서 정확히
134
+ `interview-next`, `interview-answer`, `commit-contracts` mode를 사용한다.
135
+ 정확한 CLI 대응은 `oms template review`, `oms template answer`,
136
+ `oms template commit`이다. answer는 서버가 반환한 question, request, CAS
137
+ field를 그대로 사용하며 parameter 이름을 만들지 않는다. 질문이 0개면
138
+ 곧바로 최종 확인으로 간다.
139
+
94
140
  일반 lexical 검색은 projection과 독립적이다. 템플릿·선언 필드·폴더·링크 축은 쓰기와 같은 projection을 사용하며 누락·stale 상태를 크게 실패시킨다. 관리 템플릿 원본은 검색 대상에서 제외한다. Vector/HyDE는 provider와 model이 모두 설정되지 않으면 가짜 대체 없이 실패한다.
95
141
 
96
142
  ## 설치
package/README.md CHANGED
@@ -8,14 +8,16 @@ Oh My Second Brain (`oms`) connects an existing Obsidian or Markdown vault to AI
8
8
  - Each template has a stable `templateId`, independent of its path and digest, and inherits one vault-wide `BaseContract`.
9
9
  - `.obsidian/types.json` is read-only type authority.
10
10
  - The user-owned ontology remains active: `.oms/template-policy.json` records note/field meaning alongside requiredness, formats, allowed values, defaults, naming, identity, and bindings.
11
- - `.oms/taxonomy.json` records folder/link meaning and owns placement; authored folder intents are exposed through the `folder-ontology` search axis. It is the sole runtime authority; setup performs the one-time legacy YAML conversion.
11
+ - `.oms/taxonomy.json` records folder/link meaning and owns placement; authored folder intents are exposed through the `folder-ontology` search axis. It is the sole runtime authority.
12
12
  - `.oms/types.json` is a validated derived write/search projection. Never hand-edit it.
13
13
 
14
14
  The retired model is `concept` as note identity and bundled runtime defaults—not ontology as semantic meaning.
15
15
 
16
16
  ## Setup
17
17
 
18
- Setup recursively discovers existing templates and proposes migration. It ships no note-type defaults and never modifies notes.
18
+ Setup recursively discovers existing templates within explicitly selected
19
+ template folders and proposes migration. It ships no note-type defaults and
20
+ never modifies notes.
19
21
 
20
22
  ```bash
21
23
  oms setup --vault /path/to/vault --dry-run
@@ -24,11 +26,56 @@ oms setup --vault /path/to/vault --yes --approved-digest <shown-digest>
24
26
 
25
27
  Managed-template changes use the same dry-run, exact caller approval, compare-and-swap, transaction, and postcondition receipt boundary.
26
28
 
29
+ ## Template workflow
30
+
31
+ An explicitly selected template folder makes every `.md` beneath it a template
32
+ source candidate. Review verifies the source and preserves its bytes in place;
33
+ no per-file registration or auto/manual folder mode is required. OMS derives
34
+ both metadata (frontmatter keys, types, requiredness, and `filledBy`) and a
35
+ bounded body structure (ATX headings, fenced code blocks, ordered/unordered
36
+ list runs outside fences, `<!-- oms:content -->`, and document
37
+ order/EOL/BOM/final-newline details). It does not claim to enforce paragraphs,
38
+ setext headings, or all Markdown. A changed source makes only its dependent
39
+ template pending, so unrelated writes remain available; shared-authority
40
+ changes or mismatches fail closed for the whole vault.
41
+
42
+ When a selected-folder source changes, the initial host notice is exactly
43
+ `템플릿에 변경이 있습니다` with exactly `확인하기` and `나중에`; it names no
44
+ template and shows no hash or change class. `나중에` is host-only and makes no
45
+ server call or ledger mutation. `확인하기` starts a linear, resumable interview
46
+ through MCP `write { op: "template", mode: "interview-next" }`. Continue with
47
+ the server-returned next question, preserving unaffected confirmed answers.
48
+ After all necessary questions, show the exact final digest and publish only
49
+ `.oms` controls after the user approves it with `mode: "commit-contracts"`; never
50
+ self-approve. `status` and search remain read-only, and long-lived hosts
51
+ surface a returned `templateNotice` even when boot instructions are stale.
52
+
53
+ The exact CLI review flow is:
54
+
55
+ ```text
56
+ oms template review
57
+ oms template answer <question-id> --answer <JSON> --census-digest <digest> --ledger-digest <digest|null>
58
+ oms template commit --census-digest <digest> --ledger-digest <digest|null> --dry-run
59
+ oms template commit --census-digest <digest> --ledger-digest <digest|null> --yes --approved-digest <digest>
60
+ ```
61
+
62
+ Answer uses the server-returned question and CAS values. Commit uses the same
63
+ CAS values plus the existing dry-run or yes/approved-digest guard.
64
+
65
+ The exact note-create usage is:
66
+
67
+ ```text
68
+ oms note create [template-id] --body <text>|--body-file <file> [--frontmatter <json>|--frontmatter-file <file>] [--folder <note-folder>]
69
+ ```
70
+
71
+ At note creation, placement is explicit caller folder, then the taxonomy
72
+ default, then `ask`; missing placement does not block contract review.
73
+
27
74
  ## CLI
28
75
 
29
76
  ```text
30
77
  oms setup Discover and adopt existing vault templates
31
- oms template scan|list|show|add|update|move|remove|default|check|regenerate-types
78
+ oms template scan|list|show|add|update|move|remove|default|check|regenerate-types|review|answer|commit
32
79
  oms note create|append|update|audit|backfill|get
33
80
  oms link check|suggest|apply Check, suggest, or apply note wikilinks
34
81
  oms bridge add|remove|status Manage repository-to-vault target bridges
@@ -45,14 +92,6 @@ oms status Show the read-only aggregate stat
45
92
 
46
93
  `oh-my-second-brain` is the full command; `oms` is its short alias.
47
94
 
48
- `oms template add` has three forms: a folder registers its templates, a file
49
- with `--id` registers that existing template, and `--id` with `--from` creates
50
- one. The `--from` form writes to the registered `templateFolders[].default`
51
- destination; that template folder does not constrain where notes are placed.
52
- `oms template default <id>` declares the default binding. Creating a note
53
- without an explicit template uses only that binding and otherwise fails with
54
- `TEMPLATE_DEFAULT_UNDECLARED`; it never silently selects the first template.
55
-
56
95
  ### Help contract
57
96
 
58
97
  Every recognized command accepts `--help` and `-h`, exits 0, and performs no
@@ -88,6 +127,13 @@ The seven skills (`write`, `search`, `link`, `distill`, `status`, `doctor`, `tem
88
127
 
89
128
  Writes resolve one `ResolvedTemplate` and support create, append, and update. Template mutation, projection regeneration, and one-note identity backfill require a verified target and explicit approval digest. `status` and every search operation are read-only.
90
129
 
130
+ Template contract review uses `oms_write` with `op: "template"` and exactly
131
+ `interview-next`, `interview-answer`, and `commit-contracts` modes. The exact
132
+ CLI counterparts are `oms template review`, `oms template answer`, and
133
+ `oms template commit`. Answer submissions use the server-returned question,
134
+ request, and CAS fields; hosts must not invent parameter names. A zero-question
135
+ response proceeds directly to final confirmation.
136
+
91
137
  Plain lexical search is projection-independent. Typed template/declared-field/folder/link axes use the same projection as writes and fail loudly when it is missing or stale. Managed template sources are excluded. Vector and HyDE requests fail loudly unless both embedding provider and model are configured.
92
138
 
93
139
  ## Install
@@ -13,6 +13,11 @@ Writes:
13
13
  - Use `/write` and MCP `oms_write`; never host Write/Edit for vault notes or managed templates.
14
14
  - Notes use `op: "note"` with a stable template ID.
15
15
  - Template changes use `op: "template"`: dry-run first, then apply only with the exact reviewed `approvalDigest`.
16
+ - An explicitly selected template folder makes every `.md` beneath it a source candidate; no per-file registration or folder mode is required. Contract review verifies the source and leaves its bytes in place.
17
+ - A changed source makes only its dependent template pending; unrelated template writes remain available, while shared-authority failures fail closed for the whole vault.
18
+ - Surface the initial source-change notice exactly as `템플릿에 변경이 있습니다` with exactly `확인하기` and `나중에`; do not render a template name, hash, or change taxonomy. `나중에` is host-only and makes no server call or interview-ledger mutation. Surface returned `templateNotice` data in long-lived sessions even when boot instructions are stale.
19
+ - `확인하기` starts MCP `write { op: "template", mode: "interview-next" }`; answer with `interview-answer` and commit with `commit-contracts` only after all required questions and the user's approval of the exact final digest. Use server-returned next/request/CAS fields without inventing parameter names. The exact CLI counterparts are `oms template review`, `oms template answer`, and `oms template commit`; never self-approve.
20
+ - At note creation, choose placement by explicit caller folder, then taxonomy default, then `ask`; registration is not required and there is no Inbox fallback.
16
21
 
17
22
  Retrieval:
18
23
  - Use `/search`; discover identities with `op: "templates"`.
@@ -14,6 +14,14 @@ The vault is governed by user-owned template conventions in `.oms/`.
14
14
 
15
15
  **Write:** Use `$oms-write` and MCP `oms_write`, never host Write/Edit for vault notes or managed templates. Notes use `op: "note"`. Template changes use `op: "template"`, first as a dry-run and then only with the exact reviewed `approvalDigest`.
16
16
 
17
+ An explicitly selected template folder makes every `.md` beneath it a source candidate; no per-file registration or folder mode is required. Contract review verifies the selected source and preserves its bytes in place. A changed source makes only its dependent template pending; writes for other templates remain available, while a shared-authority failure remains fail-closed for the whole vault.
18
+
19
+ When a source-change notice is returned, surface the initial notice exactly as `템플릿에 변경이 있습니다` with exactly `확인하기` and `나중에`; do not add a template name, hash, or change taxonomy. `나중에` is host-only and performs no server call or interview-ledger mutation. Surface a returned `templateNotice` in long-lived sessions even when boot guidance is stale.
20
+
21
+ `확인하기` starts MCP `write { op: "template", mode: "interview-next" }`; submit answers with `interview-answer` and commit only with `commit-contracts`, forwarding the server-returned next/request/CAS fields without inventing parameter names. The exact CLI counterparts are `oms template review`, `oms template answer`, and `oms template commit`. Continue through every required question, preserve unaffected confirmed answers, and never self-approve the final digest.
22
+
23
+ At note creation, choose placement by explicit caller folder, then taxonomy default, then `ask`; do not require template registration or invent an Inbox fallback.
24
+
17
25
  **Retrieve:** Use `$oms-search`; discover stable IDs with `op: "templates"`, then use template, declared field, folder, and link axes.
18
26
 
19
27
  **Maintain:** `$oms-status` is read-only. `$oms-doctor` diagnoses and performs explicit repairs.
@@ -22,3 +22,28 @@ Actual Obsidian Markdown templates own note shape and body scaffolding. The user
22
22
  - Never use direct file tools for vault notes or managed templates.
23
23
  - Never invent required values or self-approve a repair digest.
24
24
  - `status` and search are read-only; mutation requires a verified target.
25
+
26
+ ## Template source and review
27
+
28
+ An explicitly selected template folder makes every `.md` beneath it a source
29
+ candidate; no per-file registration or folder mode is required. Review verifies
30
+ the source and leaves its bytes in place. A changed source makes only the
31
+ dependent template pending, so unrelated template writes remain available;
32
+ shared-authority failures still fail closed for the whole vault.
33
+
34
+ Surface a source-change notice exactly as `템플릿에 변경이 있습니다` with
35
+ exactly `확인하기` and `나중에`. Do not render a template name, hash, or change
36
+ taxonomy in the initial notice. `나중에` is host-only: it makes no server call
37
+ and does not mutate the interview ledger. Surface a returned `templateNotice`
38
+ in long-lived sessions even when boot instructions are stale.
39
+
40
+ `확인하기` starts MCP `write { op: "template", mode: "interview-next" }`.
41
+ Submit answers with `interview-answer`, then use `commit-contracts` only after
42
+ all required questions and the user's approval of the exact final digest.
43
+ Forward the server-returned next/request/CAS fields without inventing parameter
44
+ names. The exact CLI counterparts are `oms template review`, `oms template
45
+ answer`, and `oms template commit`; never self-approve.
46
+
47
+ At note creation, placement is explicit caller folder, then the taxonomy
48
+ default, then `ask`. Template registration is not a placement prerequisite, and
49
+ there is no invented Inbox fallback.
@@ -11,6 +11,29 @@ Before vault work:
11
11
 
12
12
  **Write:** Use the `write` skill and MCP `oms_write`; never direct file tools for vault notes or managed templates. Notes use `op: "note"`. Template changes use `op: "template"`, dry-run first, then exact reviewed `approvalDigest`.
13
13
 
14
+ An explicitly selected template folder makes every `.md` beneath it a source
15
+ candidate; no per-file registration or folder mode is required. Contract review
16
+ verifies the source and preserves its bytes in place. A changed source makes
17
+ only its dependent template pending; unrelated template writes remain
18
+ available, while shared-authority failures fail closed for the whole vault.
19
+
20
+ Surface the initial source-change notice exactly as `템플릿에 변경이 있습니다`
21
+ with exactly `확인하기` and `나중에`; do not render a template name, hash, or
22
+ change taxonomy. `나중에` is host-only and makes no server call or
23
+ interview-ledger mutation. Surface returned `templateNotice` data in long-lived
24
+ sessions even when boot instructions are stale.
25
+
26
+ `확인하기` starts MCP `write { op: "template", mode: "interview-next" }`;
27
+ submit answers with `interview-answer`, then use `commit-contracts` only after
28
+ all required questions and the user's approval of the exact final digest.
29
+ Forward server-returned next/request/CAS fields without inventing parameter
30
+ names. The exact CLI counterparts are `oms template review`, `oms template
31
+ answer`, and `oms template commit`; never self-approve.
32
+
33
+ At note creation, choose placement by explicit caller folder, then taxonomy
34
+ default, then `ask`; template registration is not required and there is no
35
+ Inbox fallback.
36
+
14
37
  **Retrieve:** Use `search`, discover IDs through `op: "templates"`, and filter by template, declared fields, folder, or links.
15
38
 
16
39
  **Maintain:** `status` is read-only. `doctor` diagnoses and performs explicit repairs. Hermes installs the same seven write, search, link, distill, status, doctor, and tool-less template skills.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Oh My Second Brain convention layer for Obsidian vaults — Hermes skill bundle and MCP adapter.",
5
5
  "_note": "oms host install writes ~/.hermes/config.yaml mcp_servers.oms and installs the seven shared skills with provenance under ~/.hermes/skills/knowledge-management/oms/."
6
6
  }
@@ -20,7 +20,7 @@ Retrieve vault knowledge without changing the vault.
20
20
 
21
21
  - `query` requires `mode: "query" | "search" | "vsearch"` and exactly one of `query` or `searches`. Plain `mode: "query"` is projection-independent lexical retrieval and remains available when no embedding provider is configured.
22
22
  - `context` retrieves the declared search context.
23
- - `template-scan` reports template candidates without registering or writing them.
23
+ - `template-scan` is a read-only census and pending view; it never registers or writes a source.
24
24
  - `templates` lists templates when `templateId` is absent and shows one template when `templateId` is present.
25
25
  - `index-status` requires `view: "status" | "collections" | "contexts"`.
26
26
  - `get-document` requires exactly one of `target`, `targets`, or `notePath` with its window.
@@ -35,3 +35,25 @@ Use `search { op: "templates" }` to list stable template IDs and declared axes,
35
35
  - `axes.link` follows observed wikilinks.
36
36
 
37
37
  Axes intersect. They require current authority and fail loudly on an undeclared field or stale signature; remove the typed axis or run template diagnosis rather than guessing. Vector or HyDE retrieval also fails loudly without a configured embedding provider and model. Missing results and history are unobserved, not proof of absence or non-use.
38
+
39
+ ## Template-change notices
40
+
41
+ Search is read-only, including census and notice handling. A result may carry a
42
+ machine `templateNotice` for a selected-folder source change. Surface the first
43
+ notice exactly as `템플릿에 변경이 있습니다` with exactly `확인하기` and
44
+ `나중에`; do not render a template name, hash, or change taxonomy. This
45
+ requirement applies to long-lived sessions even when boot instructions are
46
+ stale. `status` returns the full notice on every poll; `search` emits it once
47
+ per process and pending digest, and again when that digest changes.
48
+
49
+ `나중에` is host-only: it performs no server call and does not mutate the
50
+ interview ledger. `확인하기` starts the linear interview with
51
+ `write { op: "template", mode: "interview-next" }`. Answers use
52
+ `interview-answer` and the server-returned question, request, and CAS values;
53
+ resume from the server-returned next question rather than inventing fields.
54
+ Unchanged confirmed answers are preserved. A zero-question response proceeds to
55
+ final confirmation, and `commit-contracts` is sent only after the user approves
56
+ the exact final digest; never self-approve.
57
+
58
+ The surface remains five MCP tools and seven skills. Search never mutates
59
+ templates, notes, controls, or the interview ledger.
@@ -18,3 +18,25 @@ With `status` op absent, show the combined read-only view: resolved template cou
18
18
  A malformed or missing projection is reported as invalid with an actionable doctor operation. Status never regenerates controls, rebuilds indexes, repairs notes, edits controls, or writes the vault. Use `oms graph build` / `doctor { op: "build-graph" }` for graph construction and `oms index sync|embed|repair` for embedding work.
19
19
 
20
20
  Report runtime history separately: events live outside the vault and are scoped to the current host and vault. A missing event means unobserved, never unused. Distinguish actual mutation time from observation time; external drift gives a changed-between interval, not an invented modification timestamp. Every use/check verifies current authority instead of applying an age-based expiry rule. Surface `LEDGER_APPEND_FAILED` explicitly without claiming a successful vault write failed.
21
+
22
+ ## Template-change notices
23
+
24
+ `status` is the read-only polling channel for selected-folder template changes.
25
+ When a machine `templateNotice` is present, return the full notice on every
26
+ poll and surface the initial display exactly as `템플릿에 변경이 있습니다`
27
+ with exactly `확인하기` and `나중에`. Do not render a template name, hash, or
28
+ change taxonomy in that first notice. A census failure yields no notice and no
29
+ tool error.
30
+
31
+ `나중에` is host-only: it performs no server call and leaves the pending set and
32
+ interview ledger unchanged. `확인하기` starts
33
+ `write { op: "template", mode: "interview-next" }`; subsequent answers use
34
+ `interview-answer` with the server-returned question, request, and CAS values.
35
+ Resume from the returned next question, preserve unaffected confirmed answers,
36
+ and proceed directly to final confirmation when there are zero questions.
37
+ `commit-contracts` publishes only after the user approves the exact final
38
+ digest; never self-approve.
39
+
40
+ Long-lived sessions must surface this tool-result notice even if boot
41
+ instructions are stale. The five-MCP-tool/seven-skill surface and read-only
42
+ status contract remain unchanged.
@@ -7,15 +7,24 @@ description: Design, migrate, and safely apply vault-resident Obsidian templates
7
7
 
8
8
  Turn the user's natural-language note design into an actual Obsidian Markdown template and the smallest matching policy change. People and agents follow the same template contract; never introduce personas.
9
9
 
10
- ## Authority
10
+ ## Authority and source scope
11
11
 
12
12
  - The actual `.md` template owns frontmatter order/default scaffolding and body shape.
13
13
  - `.obsidian/types.json` is read-only property-type authority.
14
14
  - The user-owned ontology remains active: `.oms/template-policy.json` owns note/field `intent` plus BaseContract inheritance, requiredness, formats, allowed values, naming, stable identity, and bindings.
15
15
  - `.oms/taxonomy.json` owns folder/link `intent`, note placement, and global axes.
16
16
  - `.oms/types.json` is derived state. Never edit it directly.
17
+ - Every `.md` beneath an explicitly selected template folder is a template candidate. The source bytes stay at their existing vault-relative path; contract review reads and verifies them but does not rewrite them.
18
+ - Selecting a folder is the only scope-widening act. A candidate does not need a per-file registration step or a folder mode.
17
19
 
18
- Use an existing stable `templateId` when updating or moving a template. A path or digest change never creates a new identity. New OMS-managed templates default to `<sourceFolder>/<templateId>.md` inside a registered template folder (the folder marked `default: true` unless you name another registered folder); registered existing templates keep their explicitly verified `sourcePath`.
20
+ Use an existing stable `templateId` when updating or moving a template. A path or digest change never creates a new identity; the server derives an ID for a newly discovered source. For note creation, choose a destination in this order: an explicit caller folder, the taxonomy default for that template, then `ask`. Placement is not a contract-review prerequisite and there is no implicit Inbox fallback.
21
+
22
+ ## Derived contracts
23
+
24
+ OMS derives both parts of the contract from the selected source:
25
+
26
+ - The metadata contract records frontmatter keys, types, requiredness, and `filledBy`. Unknown frontmatter and policy extensions remain preserved.
27
+ - The body-format contract records supported nodes: ATX headings, fenced code blocks, contiguous ordered or unordered list runs outside fences, and the `<!-- oms:content -->` placeholder. It also records document order, EOL, BOM, and final-newline details. This bounded scanner does not claim to enforce paragraphs, setext headings, or all Markdown; an ambiguous source fact becomes an interview question rather than an inferred rule.
19
28
 
20
29
  ## Renderers
21
30
 
@@ -27,16 +36,35 @@ Every binding carries `renderer`. Obsidian renders; OMS validates.
27
36
 
28
37
  You may **propose** an `obsidian-core` copy of a Templater template when the mapping is exact: `tp.date.now("FMT")` -> `{{date:FMT}}` / `{{time:FMT}}`, `tp.file.title` -> `{{title}}`. Anything else has no faithful mapping; do not invent one. Submit the converted bytes as a new template through the guarded flow; the kernel validates syntax, contract, path, signatures, and CAS, and the user approves the digest.
29
38
 
39
+ ## Source-change notice and interview
40
+
41
+ A selected-folder source census detects pending adds, edits, deletes, and renames. The first displayed notice is exactly:
42
+
43
+ ```text
44
+ 템플릿에 변경이 있습니다
45
+ ```
46
+
47
+ It has exactly `확인하기` and `나중에` actions. Do not render a template name, hash, or change taxonomy in that initial notice. A machine `templateNotice` may carry richer state for the host, but the host must keep the first display generic.
48
+
49
+ - `나중에` is host-only: dismiss or defer locally. Do not call the server or mutate the interview ledger.
50
+ - `확인하기` starts the one linear interview with `write { op: "template", mode: "interview-next" }`.
51
+ - Submit each answer with `mode: "interview-answer"` using the question, request, and CAS values returned by the server. Do not invent parameter names, questions, or digests.
52
+ - Resume from the next question returned by each answer. Opening a new review reopens deferred deletion decisions without editing the draft or erasing other confirmed answers. This is distinct from host-only `나중에`; a zero-question response still requires final confirmation.
53
+ - After every required question is answered, show the server's final proposal and exact final approval digest. Call `mode: "commit-contracts"` only after the user approves that exact digest; never self-approve.
54
+
55
+ Long-lived hosts must surface `templateNotice` on `write`, `search`, and `status` results even when boot instructions are stale. Emit it once per process and pending digest (and again when that digest changes); `status` remains the polling view and writes nothing.
56
+
30
57
  ## Workflow
31
58
 
32
- 1. Read `search { op: "templates" }` to list bindings, or `search { op: "templates", templateId }` to show one, then read the user's requested shape. Use `search { op: "template-scan" }` for candidates. Do not guess existing IDs or fields, and never auto-register a scan result.
59
+ 1. Read `search { op: "templates" }` to list bindings, or `search { op: "templates", templateId }` to show one. Use `search { op: "template-scan" }` for the read-only census and pending view; never treat that view as a write.
33
60
  2. Draft the exact Markdown and policy/taxonomy intent. Preserve unknown frontmatter, policy extensions, body bytes, and Obsidian property types.
34
- 3. Call `write { op: "template", ..., dryRun: true }` for create, update, reclassify, relocate-folder, register-folder, remove, or default. Regeneration is not a write-template mode: use `doctor { op: "regenerate-types", dryRun: true }`. Current signatures are derived and verified by the server, not hand-assembled by the host.
35
- 4. To adopt a template that already exists in the vault, call `write { op: "template", mode: "register-existing", templateId, sourceFolder, sourcePath, renderer, filledBy, contract, naming, dryRun: true }` instead. `filledBy` lists Obsidian-filled field names (an empty array for a Core template). The server verifies the proposed metadata against the source and derives every signature itself; you supply no `expected*` digests and no template bytes.
36
- 5. Show the proposal, paths, diagnostics, and `approvalDigest` to the user.
37
- 6. Apply only after the caller explicitly approves that exact digest. Submit the same request with `dryRun: false` and `approvedDigest`.
38
- 7. Report the server-verified receipt and postconditions.
61
+ 3. Use guarded template operations with a dry run for source authoring and for separate update, move, remove, reclassify, relocate, folder-scope, or default changes. Explicit source authoring is `oms template add --id <id> --from <source>`; it is not contract review. Contract review never writes source bytes. Current signatures are derived and verified by the server, not hand-assembled by the host.
62
+ 4. Show the proposal, paths, diagnostics, and `approvalDigest` to the user. Apply a guarded operation only after the caller explicitly approves that exact digest, then report the server-verified receipt and postconditions.
63
+
64
+ CLI uses the noun leaves `oms template scan|list|show|add|update|move|remove|default|check|regenerate-types|review|answer|commit`.
39
65
 
40
- CLI uses the noun leaves `oms template scan|list|show|add|update|move|remove|default|check|regenerate-types`. Mutations require `--dry-run`, then the same request with `--yes --approved-digest`; resume uses `oms template update --resume` with the exact `transactionId` and `approvedDigest`. `add <folder>` registers a source folder; `add <file> --id` registers existing bytes; `add --id --from` proposes a new source inside an explicitly registered creation folder. `default <id>` chooses the default note binding, not the source creation folder. Removal keeps registered-existing files; `--delete-source` applies only to managed sources. Never remove the current default without selecting another binding first.
66
+ - `oms template add <folder>` adds an explicit source scope; `oms template add --id <id> --from <source>` authorizes new source authoring.
67
+ - `oms template review`, `answer`, and `commit` are the exact CLI counterparts of MCP `interview-next`, `interview-answer`, and `commit-contracts`.
68
+ - `scan` is read-only. Update, move, remove, and other template mutations remain separate guarded operations; none is a substitute for contract review.
41
69
 
42
- Reject unsupported expressions, unsafe paths, unresolved legacy mappings, stale signatures, and identity changes. Preserve non-observed proposal gaps explicitly. Never self-approve, silently fall back to a legacy Concept reader, or directly mutate managed template/control files.
70
+ Reject unsupported expressions, unsafe paths, stale signatures, and identity changes. Preserve non-observed proposal gaps explicitly. Never self-approve, use a stale-contract fallback or compatibility reader, or directly mutate managed template/control files.