@soleri/core 9.2.0 → 9.3.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 (298) hide show
  1. package/data/flows/build.flow.yaml +8 -9
  2. package/data/flows/deliver.flow.yaml +9 -10
  3. package/data/flows/design.flow.yaml +3 -4
  4. package/data/flows/enhance.flow.yaml +5 -6
  5. package/data/flows/explore.flow.yaml +3 -4
  6. package/data/flows/fix.flow.yaml +5 -6
  7. package/data/flows/plan.flow.yaml +4 -5
  8. package/data/flows/review.flow.yaml +3 -4
  9. package/dist/curator/curator.d.ts.map +1 -1
  10. package/dist/curator/curator.js +98 -22
  11. package/dist/curator/curator.js.map +1 -1
  12. package/dist/engine/bin/soleri-engine.js.map +1 -1
  13. package/dist/engine/module-manifest.d.ts.map +1 -1
  14. package/dist/engine/module-manifest.js +21 -1
  15. package/dist/engine/module-manifest.js.map +1 -1
  16. package/dist/engine/register-engine.d.ts.map +1 -1
  17. package/dist/engine/register-engine.js +25 -1
  18. package/dist/engine/register-engine.js.map +1 -1
  19. package/dist/flows/gate-evaluator.js.map +1 -1
  20. package/dist/operator/operator-profile.d.ts.map +1 -1
  21. package/dist/operator/operator-profile.js +11 -5
  22. package/dist/operator/operator-profile.js.map +1 -1
  23. package/dist/operator/operator-signals.d.ts.map +1 -1
  24. package/dist/operator/operator-signals.js.map +1 -1
  25. package/dist/planning/evidence-collector.js.map +1 -1
  26. package/dist/planning/gap-passes.d.ts.map +1 -1
  27. package/dist/planning/gap-passes.js +23 -6
  28. package/dist/planning/gap-passes.js.map +1 -1
  29. package/dist/planning/gap-patterns.d.ts.map +1 -1
  30. package/dist/planning/gap-patterns.js +57 -11
  31. package/dist/planning/gap-patterns.js.map +1 -1
  32. package/dist/planning/github-projection.d.ts.map +1 -1
  33. package/dist/planning/github-projection.js +39 -20
  34. package/dist/planning/github-projection.js.map +1 -1
  35. package/dist/planning/impact-analyzer.d.ts.map +1 -1
  36. package/dist/planning/impact-analyzer.js +20 -18
  37. package/dist/planning/impact-analyzer.js.map +1 -1
  38. package/dist/planning/plan-lifecycle.d.ts.map +1 -1
  39. package/dist/planning/plan-lifecycle.js +22 -9
  40. package/dist/planning/plan-lifecycle.js.map +1 -1
  41. package/dist/planning/planner.d.ts.map +1 -1
  42. package/dist/planning/planner.js +60 -17
  43. package/dist/planning/planner.js.map +1 -1
  44. package/dist/planning/rationalization-detector.d.ts.map +1 -1
  45. package/dist/planning/rationalization-detector.js.map +1 -1
  46. package/dist/planning/reconciliation-engine.d.ts.map +1 -1
  47. package/dist/planning/reconciliation-engine.js.map +1 -1
  48. package/dist/planning/task-verifier.d.ts.map +1 -1
  49. package/dist/planning/task-verifier.js +14 -6
  50. package/dist/planning/task-verifier.js.map +1 -1
  51. package/dist/runtime/admin-setup-ops.d.ts.map +1 -1
  52. package/dist/runtime/admin-setup-ops.js +2 -1
  53. package/dist/runtime/admin-setup-ops.js.map +1 -1
  54. package/dist/runtime/branching-ops.d.ts +12 -0
  55. package/dist/runtime/branching-ops.d.ts.map +1 -0
  56. package/dist/runtime/branching-ops.js +100 -0
  57. package/dist/runtime/branching-ops.js.map +1 -0
  58. package/dist/runtime/context-health.d.ts.map +1 -1
  59. package/dist/runtime/context-health.js.map +1 -1
  60. package/dist/runtime/facades/branching-facade.d.ts +7 -0
  61. package/dist/runtime/facades/branching-facade.d.ts.map +1 -0
  62. package/dist/runtime/facades/branching-facade.js +8 -0
  63. package/dist/runtime/facades/branching-facade.js.map +1 -0
  64. package/dist/runtime/facades/chat-service-ops.d.ts.map +1 -1
  65. package/dist/runtime/facades/chat-service-ops.js +3 -1
  66. package/dist/runtime/facades/chat-service-ops.js.map +1 -1
  67. package/dist/runtime/facades/chat-transport-ops.d.ts.map +1 -1
  68. package/dist/runtime/facades/chat-transport-ops.js.map +1 -1
  69. package/dist/runtime/facades/index.d.ts.map +1 -1
  70. package/dist/runtime/facades/index.js +42 -0
  71. package/dist/runtime/facades/index.js.map +1 -1
  72. package/dist/runtime/facades/intake-facade.d.ts +9 -0
  73. package/dist/runtime/facades/intake-facade.d.ts.map +1 -0
  74. package/dist/runtime/facades/intake-facade.js +11 -0
  75. package/dist/runtime/facades/intake-facade.js.map +1 -0
  76. package/dist/runtime/facades/links-facade.d.ts +9 -0
  77. package/dist/runtime/facades/links-facade.d.ts.map +1 -0
  78. package/dist/runtime/facades/links-facade.js +10 -0
  79. package/dist/runtime/facades/links-facade.js.map +1 -0
  80. package/dist/runtime/facades/operator-facade.d.ts.map +1 -1
  81. package/dist/runtime/facades/operator-facade.js.map +1 -1
  82. package/dist/runtime/facades/plan-facade.d.ts.map +1 -1
  83. package/dist/runtime/facades/plan-facade.js +4 -1
  84. package/dist/runtime/facades/plan-facade.js.map +1 -1
  85. package/dist/runtime/facades/tier-facade.d.ts +7 -0
  86. package/dist/runtime/facades/tier-facade.d.ts.map +1 -0
  87. package/dist/runtime/facades/tier-facade.js +8 -0
  88. package/dist/runtime/facades/tier-facade.js.map +1 -0
  89. package/dist/runtime/facades/vault-facade.d.ts +9 -1
  90. package/dist/runtime/facades/vault-facade.d.ts.map +1 -1
  91. package/dist/runtime/facades/vault-facade.js +44 -187
  92. package/dist/runtime/facades/vault-facade.js.map +1 -1
  93. package/dist/runtime/github-integration.d.ts.map +1 -1
  94. package/dist/runtime/github-integration.js +11 -4
  95. package/dist/runtime/github-integration.js.map +1 -1
  96. package/dist/runtime/orchestrate-ops.d.ts.map +1 -1
  97. package/dist/runtime/orchestrate-ops.js +32 -10
  98. package/dist/runtime/orchestrate-ops.js.map +1 -1
  99. package/dist/runtime/planning-extra-ops.d.ts.map +1 -1
  100. package/dist/runtime/planning-extra-ops.js.map +1 -1
  101. package/dist/runtime/runtime.d.ts.map +1 -1
  102. package/dist/runtime/runtime.js +3 -1
  103. package/dist/runtime/runtime.js.map +1 -1
  104. package/dist/runtime/session-briefing.d.ts.map +1 -1
  105. package/dist/runtime/session-briefing.js +5 -1
  106. package/dist/runtime/session-briefing.js.map +1 -1
  107. package/dist/runtime/tier-ops.d.ts +13 -0
  108. package/dist/runtime/tier-ops.d.ts.map +1 -0
  109. package/dist/runtime/tier-ops.js +110 -0
  110. package/dist/runtime/tier-ops.js.map +1 -0
  111. package/dist/skills/sync-skills.d.ts.map +1 -1
  112. package/dist/skills/sync-skills.js +1 -1
  113. package/dist/skills/sync-skills.js.map +1 -1
  114. package/dist/vault/linking.d.ts.map +1 -1
  115. package/dist/vault/linking.js +41 -5
  116. package/dist/vault/linking.js.map +1 -1
  117. package/dist/vault/vault-entries.d.ts.map +1 -1
  118. package/dist/vault/vault-entries.js +68 -26
  119. package/dist/vault/vault-entries.js.map +1 -1
  120. package/dist/vault/vault-maintenance.d.ts.map +1 -1
  121. package/dist/vault/vault-maintenance.js +6 -2
  122. package/dist/vault/vault-maintenance.js.map +1 -1
  123. package/dist/vault/vault-markdown-sync.d.ts.map +1 -1
  124. package/dist/vault/vault-markdown-sync.js.map +1 -1
  125. package/dist/vault/vault-memories.d.ts.map +1 -1
  126. package/dist/vault/vault-memories.js +3 -1
  127. package/dist/vault/vault-memories.js.map +1 -1
  128. package/dist/vault/vault-schema.js +36 -10
  129. package/dist/vault/vault-schema.js.map +1 -1
  130. package/dist/vault/vault.d.ts.map +1 -1
  131. package/dist/vault/vault.js +5 -1
  132. package/dist/vault/vault.js.map +1 -1
  133. package/package.json +7 -7
  134. package/src/agency/agency-manager.test.ts +60 -40
  135. package/src/agency/default-rules.test.ts +17 -9
  136. package/src/capabilities/registry.test.ts +2 -12
  137. package/src/chat/agent-loop.test.ts +33 -43
  138. package/src/chat/mcp-bridge.test.ts +7 -2
  139. package/src/claudemd/inject.test.ts +2 -12
  140. package/src/context/context-engine.test.ts +96 -51
  141. package/src/control/intent-router.test.ts +3 -3
  142. package/src/curator/classifier.test.ts +14 -8
  143. package/src/curator/contradiction-detector.test.ts +30 -5
  144. package/src/curator/curator.ts +278 -56
  145. package/src/curator/duplicate-detector.test.ts +77 -15
  146. package/src/curator/quality-gate.test.ts +71 -31
  147. package/src/curator/tag-manager.test.ts +12 -4
  148. package/src/domain-packs/knowledge-installer.test.ts +2 -10
  149. package/src/domain-packs/token-resolver.test.ts +1 -3
  150. package/src/domain-packs/types.test.ts +16 -2
  151. package/src/enforcement/registry.test.ts +2 -8
  152. package/src/engine/bin/soleri-engine.ts +3 -1
  153. package/src/engine/module-manifest.test.ts +5 -4
  154. package/src/engine/module-manifest.ts +21 -1
  155. package/src/engine/register-engine.test.ts +6 -1
  156. package/src/engine/register-engine.ts +26 -3
  157. package/src/errors/classify.test.ts +6 -2
  158. package/src/errors/retry.test.ts +1 -4
  159. package/src/facades/facade-factory.test.ts +110 -64
  160. package/src/flows/epilogue.test.ts +16 -10
  161. package/src/flows/gate-evaluator.test.ts +12 -6
  162. package/src/flows/gate-evaluator.ts +1 -3
  163. package/src/governance/governance.test.ts +137 -21
  164. package/src/health/health-registry.test.ts +8 -1
  165. package/src/intake/content-classifier.test.ts +121 -51
  166. package/src/intake/dedup-gate.test.ts +38 -22
  167. package/src/intake/intake-pipeline.test.ts +5 -3
  168. package/src/intake/text-ingester.test.ts +26 -20
  169. package/src/llm/key-pool.test.ts +1 -3
  170. package/src/llm/llm-client.test.ts +1 -4
  171. package/src/llm/oauth-discovery.test.ts +16 -16
  172. package/src/llm/utils.test.ts +62 -18
  173. package/src/logging/logger.test.ts +4 -1
  174. package/src/loop/loop-manager.test.ts +2 -6
  175. package/src/migrations/migration-runner.edge-cases.test.ts +2 -7
  176. package/src/operator/operator-profile-extended.test.ts +15 -5
  177. package/src/operator/operator-profile.test.ts +26 -8
  178. package/src/operator/operator-profile.ts +38 -22
  179. package/src/operator/operator-signals-extended.test.ts +35 -23
  180. package/src/operator/operator-signals.test.ts +6 -10
  181. package/src/operator/operator-signals.ts +2 -1
  182. package/src/operator/prompts/hook-precompact-operator-dispatch.md +10 -6
  183. package/src/operator/prompts/subagent-soft-signal-extractor.md +5 -0
  184. package/src/operator/prompts/subagent-synthesis-cognition.md +19 -10
  185. package/src/operator/prompts/subagent-synthesis-communication.md +13 -7
  186. package/src/operator/prompts/subagent-synthesis-technical.md +19 -9
  187. package/src/operator/prompts/subagent-synthesis-trust.md +27 -21
  188. package/src/persona/defaults.test.ts +1 -5
  189. package/src/planning/evidence-collector.test.ts +147 -38
  190. package/src/planning/evidence-collector.ts +1 -4
  191. package/src/planning/gap-analysis-alternatives.test.ts +41 -11
  192. package/src/planning/gap-passes.test.ts +215 -33
  193. package/src/planning/gap-passes.ts +115 -46
  194. package/src/planning/gap-patterns.test.ts +87 -13
  195. package/src/planning/gap-patterns.ts +114 -31
  196. package/src/planning/github-projection.test.ts +6 -1
  197. package/src/planning/github-projection.ts +41 -20
  198. package/src/planning/impact-analyzer.test.ts +10 -23
  199. package/src/planning/impact-analyzer.ts +33 -46
  200. package/src/planning/plan-lifecycle.test.ts +103 -36
  201. package/src/planning/plan-lifecycle.ts +49 -18
  202. package/src/planning/planner.test.ts +12 -2
  203. package/src/planning/planner.ts +198 -58
  204. package/src/planning/rationalization-detector.test.ts +5 -20
  205. package/src/planning/rationalization-detector.ts +14 -16
  206. package/src/planning/reconciliation-engine.test.ts +20 -3
  207. package/src/planning/reconciliation-engine.ts +1 -2
  208. package/src/planning/task-verifier.test.ts +59 -27
  209. package/src/planning/task-verifier.ts +15 -9
  210. package/src/playbooks/playbook-executor.test.ts +1 -3
  211. package/src/plugins/plugin-loader.test.ts +19 -14
  212. package/src/plugins/plugin-registry.test.ts +45 -33
  213. package/src/project/project-registry.test.ts +23 -12
  214. package/src/prompts/template-manager.test.ts +4 -1
  215. package/src/queue/job-queue.test.ts +10 -14
  216. package/src/runtime/admin-extra-ops.test.ts +5 -19
  217. package/src/runtime/admin-ops.test.ts +1 -3
  218. package/src/runtime/admin-setup-ops.test.ts +3 -4
  219. package/src/runtime/admin-setup-ops.ts +9 -2
  220. package/src/runtime/archive-ops.test.ts +4 -1
  221. package/src/runtime/branching-ops.test.ts +144 -0
  222. package/src/runtime/branching-ops.ts +107 -0
  223. package/src/runtime/capture-ops.test.ts +7 -21
  224. package/src/runtime/chain-ops.test.ts +16 -6
  225. package/src/runtime/claude-md-helpers.test.ts +1 -3
  226. package/src/runtime/context-health.test.ts +1 -3
  227. package/src/runtime/context-health.ts +1 -3
  228. package/src/runtime/curator-extra-ops.test.ts +3 -1
  229. package/src/runtime/domain-ops.test.ts +46 -36
  230. package/src/runtime/facades/admin-facade.test.ts +1 -4
  231. package/src/runtime/facades/archive-facade.test.ts +21 -7
  232. package/src/runtime/facades/brain-facade.test.ts +176 -72
  233. package/src/runtime/facades/branching-facade.test.ts +43 -0
  234. package/src/runtime/facades/branching-facade.ts +11 -0
  235. package/src/runtime/facades/chat-facade.test.ts +81 -28
  236. package/src/runtime/facades/chat-service-ops.test.ts +178 -73
  237. package/src/runtime/facades/chat-service-ops.ts +3 -1
  238. package/src/runtime/facades/chat-session-ops.test.ts +25 -10
  239. package/src/runtime/facades/chat-transport-ops.test.ts +101 -34
  240. package/src/runtime/facades/chat-transport-ops.ts +0 -1
  241. package/src/runtime/facades/context-facade.test.ts +19 -4
  242. package/src/runtime/facades/control-facade.test.ts +3 -3
  243. package/src/runtime/facades/index.ts +42 -0
  244. package/src/runtime/facades/intake-facade.test.ts +215 -0
  245. package/src/runtime/facades/intake-facade.ts +14 -0
  246. package/src/runtime/facades/links-facade.test.ts +203 -0
  247. package/src/runtime/facades/links-facade.ts +13 -0
  248. package/src/runtime/facades/loop-facade.test.ts +22 -5
  249. package/src/runtime/facades/memory-facade.test.ts +19 -5
  250. package/src/runtime/facades/operator-facade.test.ts +17 -4
  251. package/src/runtime/facades/operator-facade.ts +11 -3
  252. package/src/runtime/facades/orchestrate-facade.test.ts +7 -1
  253. package/src/runtime/facades/plan-facade.test.ts +29 -12
  254. package/src/runtime/facades/plan-facade.ts +7 -2
  255. package/src/runtime/facades/tier-facade.test.ts +47 -0
  256. package/src/runtime/facades/tier-facade.ts +11 -0
  257. package/src/runtime/facades/vault-facade.test.ts +174 -242
  258. package/src/runtime/facades/vault-facade.ts +55 -199
  259. package/src/runtime/github-integration.ts +11 -8
  260. package/src/runtime/grading-ops.test.ts +39 -8
  261. package/src/runtime/intake-ops.test.ts +69 -16
  262. package/src/runtime/loop-ops.test.ts +16 -6
  263. package/src/runtime/memory-cross-project-ops.test.ts +25 -14
  264. package/src/runtime/orchestrate-ops.ts +54 -27
  265. package/src/runtime/pack-ops.test.ts +23 -6
  266. package/src/runtime/planning-extra-ops.test.ts +17 -7
  267. package/src/runtime/planning-extra-ops.ts +3 -1
  268. package/src/runtime/playbook-ops.test.ts +26 -3
  269. package/src/runtime/plugin-ops.test.ts +83 -25
  270. package/src/runtime/project-ops.test.ts +26 -6
  271. package/src/runtime/runtime.ts +3 -1
  272. package/src/runtime/session-briefing.test.ts +183 -54
  273. package/src/runtime/session-briefing.ts +8 -2
  274. package/src/runtime/sync-ops.test.ts +3 -12
  275. package/src/runtime/telemetry-ops.test.ts +31 -6
  276. package/src/runtime/tier-ops.test.ts +159 -0
  277. package/src/runtime/tier-ops.ts +119 -0
  278. package/src/runtime/vault-extra-ops.test.ts +32 -8
  279. package/src/runtime/vault-sharing-ops.test.ts +1 -4
  280. package/src/skills/sync-skills.ts +2 -12
  281. package/src/transport/ws-server.test.ts +7 -4
  282. package/src/vault/__tests__/vault-characterization.test.ts +492 -81
  283. package/src/vault/linking.test.ts +50 -17
  284. package/src/vault/linking.ts +48 -7
  285. package/src/vault/obsidian-sync.test.ts +6 -3
  286. package/src/vault/scope-detector.test.ts +1 -3
  287. package/src/vault/vault-branching.test.ts +9 -7
  288. package/src/vault/vault-entries.ts +209 -65
  289. package/src/vault/vault-maintenance.ts +7 -12
  290. package/src/vault/vault-manager.test.ts +10 -10
  291. package/src/vault/vault-markdown-sync.ts +4 -1
  292. package/src/vault/vault-memories.ts +7 -7
  293. package/src/vault/vault-schema.ts +72 -15
  294. package/src/vault/vault.ts +55 -9
  295. package/src/brain/strength-scorer.ts +0 -404
  296. package/src/engine/index.ts +0 -21
  297. package/src/persona/index.ts +0 -9
  298. package/src/vault/vault-interfaces.ts +0 -56
@@ -31,12 +31,20 @@ describe('evaluateQuality', () => {
31
31
  });
32
32
 
33
33
  it('returns ACCEPT for high-quality entry', async () => {
34
- const llm = mockLLM(JSON.stringify({
35
- verdict: 'ACCEPT',
36
- overallScore: 85,
37
- scores: { novelty: 80, actionability: 90, specificity: 85, relevance: 80, informationDensity: 90 },
38
- reasoning: 'High quality entry with specific guidance.',
39
- }));
34
+ const llm = mockLLM(
35
+ JSON.stringify({
36
+ verdict: 'ACCEPT',
37
+ overallScore: 85,
38
+ scores: {
39
+ novelty: 80,
40
+ actionability: 90,
41
+ specificity: 85,
42
+ relevance: 80,
43
+ informationDensity: 90,
44
+ },
45
+ reasoning: 'High quality entry with specific guidance.',
46
+ }),
47
+ );
40
48
 
41
49
  const result = await evaluateQuality(makeEntry(), llm);
42
50
  expect(result.evaluated).toBe(true);
@@ -45,13 +53,21 @@ describe('evaluateQuality', () => {
45
53
  });
46
54
 
47
55
  it('returns REJECT for low-quality entry', async () => {
48
- const llm = mockLLM(JSON.stringify({
49
- verdict: 'REJECT',
50
- overallScore: 30,
51
- scores: { novelty: 10, actionability: 30, specificity: 40, relevance: 50, informationDensity: 20 },
52
- reasoning: 'Too generic.',
53
- rejectReasons: ['Low novelty', 'Not actionable'],
54
- }));
56
+ const llm = mockLLM(
57
+ JSON.stringify({
58
+ verdict: 'REJECT',
59
+ overallScore: 30,
60
+ scores: {
61
+ novelty: 10,
62
+ actionability: 30,
63
+ specificity: 40,
64
+ relevance: 50,
65
+ informationDensity: 20,
66
+ },
67
+ reasoning: 'Too generic.',
68
+ rejectReasons: ['Low novelty', 'Not actionable'],
69
+ }),
70
+ );
55
71
 
56
72
  const result = await evaluateQuality(makeEntry(), llm);
57
73
  expect(result.evaluated).toBe(true);
@@ -87,24 +103,40 @@ describe('evaluateQuality', () => {
87
103
  });
88
104
 
89
105
  it('normalizes non-REJECT verdict to ACCEPT', async () => {
90
- const llm = mockLLM(JSON.stringify({
91
- verdict: 'MAYBE',
92
- overallScore: 60,
93
- scores: { novelty: 60, actionability: 60, specificity: 60, relevance: 60, informationDensity: 60 },
94
- reasoning: 'Borderline entry.',
95
- }));
106
+ const llm = mockLLM(
107
+ JSON.stringify({
108
+ verdict: 'MAYBE',
109
+ overallScore: 60,
110
+ scores: {
111
+ novelty: 60,
112
+ actionability: 60,
113
+ specificity: 60,
114
+ relevance: 60,
115
+ informationDensity: 60,
116
+ },
117
+ reasoning: 'Borderline entry.',
118
+ }),
119
+ );
96
120
 
97
121
  const result = await evaluateQuality(makeEntry(), llm);
98
122
  expect(result.verdict).toBe('ACCEPT');
99
123
  });
100
124
 
101
125
  it('includes optional entry fields in prompt', async () => {
102
- const llm = mockLLM(JSON.stringify({
103
- verdict: 'ACCEPT',
104
- overallScore: 70,
105
- scores: { novelty: 70, actionability: 70, specificity: 70, relevance: 70, informationDensity: 70 },
106
- reasoning: 'OK.',
107
- }));
126
+ const llm = mockLLM(
127
+ JSON.stringify({
128
+ verdict: 'ACCEPT',
129
+ overallScore: 70,
130
+ scores: {
131
+ novelty: 70,
132
+ actionability: 70,
133
+ specificity: 70,
134
+ relevance: 70,
135
+ informationDensity: 70,
136
+ },
137
+ reasoning: 'OK.',
138
+ }),
139
+ );
108
140
 
109
141
  const entry = makeEntry();
110
142
  entry.why = 'Because security matters';
@@ -120,12 +152,20 @@ describe('evaluateQuality', () => {
120
152
  });
121
153
 
122
154
  it('uses low temperature for consistent scoring', async () => {
123
- const llm = mockLLM(JSON.stringify({
124
- verdict: 'ACCEPT',
125
- overallScore: 70,
126
- scores: { novelty: 70, actionability: 70, specificity: 70, relevance: 70, informationDensity: 70 },
127
- reasoning: 'OK.',
128
- }));
155
+ const llm = mockLLM(
156
+ JSON.stringify({
157
+ verdict: 'ACCEPT',
158
+ overallScore: 70,
159
+ scores: {
160
+ novelty: 70,
161
+ actionability: 70,
162
+ specificity: 70,
163
+ relevance: 70,
164
+ informationDensity: 70,
165
+ },
166
+ reasoning: 'OK.',
167
+ }),
168
+ );
129
169
 
130
170
  await evaluateQuality(makeEntry(), llm);
131
171
 
@@ -16,8 +16,12 @@ function mockTagStore(): TagStore {
16
16
 
17
17
  return {
18
18
  getAlias: vi.fn((lower: string) => aliases.get(lower) ?? null),
19
- insertCanonical: vi.fn((tag: string) => { canonicals.set(tag, null); }),
20
- upsertAlias: vi.fn((alias: string, canonical: string) => { aliases.set(alias, canonical); }),
19
+ insertCanonical: vi.fn((tag: string) => {
20
+ canonicals.set(tag, null);
21
+ }),
22
+ upsertAlias: vi.fn((alias: string, canonical: string) => {
23
+ aliases.set(alias, canonical);
24
+ }),
21
25
  getCanonicalRows: vi.fn(() =>
22
26
  Array.from(canonicals.entries()).map(([tag, description]) => ({
23
27
  tag,
@@ -59,7 +63,11 @@ describe('tag-manager', () => {
59
63
 
60
64
  it('returns lowercased tag when no alias found', () => {
61
65
  const result = normalizeTag('MyCustomTag', store);
62
- expect(result).toEqual({ original: 'MyCustomTag', normalized: 'mycustomtag', wasAliased: false });
66
+ expect(result).toEqual({
67
+ original: 'MyCustomTag',
68
+ normalized: 'mycustomtag',
69
+ wasAliased: false,
70
+ });
63
71
  });
64
72
 
65
73
  it('trims whitespace', () => {
@@ -92,7 +100,7 @@ describe('tag-manager', () => {
92
100
  describe('normalizeAndDedup', () => {
93
101
  it('deduplicates after normalization', () => {
94
102
  (store.getAlias as ReturnType<typeof vi.fn>)
95
- .mockReturnValueOnce('styling') // css -> styling
103
+ .mockReturnValueOnce('styling') // css -> styling
96
104
  .mockReturnValueOnce('styling'); // tailwind -> styling
97
105
  const { results, dedupedTags, changed } = normalizeAndDedup(['css', 'tailwind'], store);
98
106
  expect(results).toHaveLength(2);
@@ -128,11 +128,7 @@ describe('installKnowledge', () => {
128
128
  const canonicalDir = join(tempDir, 'canonical');
129
129
  writeMdFiles(canonicalDir, { 'tagged.md': 'Tagged entry.' });
130
130
  const runtime = mockRuntime();
131
- await installKnowledge(
132
- mockPack({ knowledge: { canonical: 'canonical' } }),
133
- runtime,
134
- tempDir,
135
- );
131
+ await installKnowledge(mockPack({ knowledge: { canonical: 'canonical' } }), runtime, tempDir);
136
132
  const addCall = (runtime.vault.add as unknown).mock.calls[0][0];
137
133
  expect(addCall.tags).toContain('pack:test-pack');
138
134
  expect(addCall.tags).toContain('tier:canonical');
@@ -144,11 +140,7 @@ describe('installKnowledge', () => {
144
140
  const curatedDir = join(tempDir, 'curated');
145
141
  writeMdFiles(curatedDir, { 'my-pattern.md': 'Content.' });
146
142
  const runtime = mockRuntime();
147
- await installKnowledge(
148
- mockPack({ knowledge: { curated: 'curated' } }),
149
- runtime,
150
- tempDir,
151
- );
143
+ await installKnowledge(mockPack({ knowledge: { curated: 'curated' } }), runtime, tempDir);
152
144
  const addCall = (runtime.vault.add as unknown).mock.calls[0][0];
153
145
  expect(addCall.id).toBe('pack-test-pack-my-pattern');
154
146
  });
@@ -75,9 +75,7 @@ describe('resolveToken', () => {
75
75
  });
76
76
 
77
77
  it('throws for unknown token', () => {
78
- expect(() => resolveToken('unknown-token', emptyProject())).toThrow(
79
- /Cannot resolve token/,
80
- );
78
+ expect(() => resolveToken('unknown-token', emptyProject())).toThrow(/Cannot resolve token/);
81
79
  });
82
80
 
83
81
  it('throws for unknown color scale', () => {
@@ -53,7 +53,9 @@ describe('validateDomainPack', () => {
53
53
  });
54
54
 
55
55
  it('accepts pack with rules string', () => {
56
- const result = validateDomainPack(minimalPack({ rules: '## Token Rules\nUse semantic tokens.' }));
56
+ const result = validateDomainPack(
57
+ minimalPack({ rules: '## Token Rules\nUse semantic tokens.' }),
58
+ );
57
59
  expect(result.success).toBe(true);
58
60
  });
59
61
 
@@ -122,7 +124,19 @@ describe('SEMANTIC_FACADE_NAMES', () => {
122
124
  });
123
125
 
124
126
  it('contains all core engine facades', () => {
125
- const expected = ['vault', 'plan', 'brain', 'memory', 'admin', 'curator', 'loop', 'orchestrate', 'control', 'cognee', 'governance'];
127
+ const expected = [
128
+ 'vault',
129
+ 'plan',
130
+ 'brain',
131
+ 'memory',
132
+ 'admin',
133
+ 'curator',
134
+ 'loop',
135
+ 'orchestrate',
136
+ 'control',
137
+ 'cognee',
138
+ 'governance',
139
+ ];
126
140
  for (const name of expected) {
127
141
  expect(SEMANTIC_FACADE_NAMES).toContain(name);
128
142
  }
@@ -74,10 +74,7 @@ describe('EnforcementRegistry', () => {
74
74
 
75
75
  describe('getEnabledRules', () => {
76
76
  it('excludes disabled rules', () => {
77
- registry.addRules([
78
- makeRule({ id: 'active' }),
79
- makeRule({ id: 'disabled', enabled: false }),
80
- ]);
77
+ registry.addRules([makeRule({ id: 'active' }), makeRule({ id: 'disabled', enabled: false })]);
81
78
  const enabled = registry.getEnabledRules();
82
79
  expect(enabled).toHaveLength(1);
83
80
  expect(enabled[0].id).toBe('active');
@@ -91,10 +88,7 @@ describe('EnforcementRegistry', () => {
91
88
 
92
89
  describe('getConfig', () => {
93
90
  it('returns config with only enabled rules', () => {
94
- registry.addRules([
95
- makeRule({ id: 'on' }),
96
- makeRule({ id: 'off', enabled: false }),
97
- ]);
91
+ registry.addRules([makeRule({ id: 'on' }), makeRule({ id: 'off', enabled: false })]);
98
92
  const config = registry.getConfig();
99
93
  expect(config.rules).toHaveLength(1);
100
94
  expect(config.rules[0].id).toBe('on');
@@ -169,7 +169,9 @@ async function main(): Promise<void> {
169
169
  const syncResult = syncSkillsToClaudeCode([skillsDir], config.name as string);
170
170
  const total = syncResult.installed.length + syncResult.updated.length;
171
171
  if (total > 0) {
172
- console.error(`${tag} Skills synced: ${syncResult.installed.length} new, ${syncResult.updated.length} updated`);
172
+ console.error(
173
+ `${tag} Skills synced: ${syncResult.installed.length} new, ${syncResult.updated.length} updated`,
174
+ );
173
175
  }
174
176
  }
175
177
 
@@ -29,10 +29,11 @@ describe('ENGINE_MODULE_MANIFEST', () => {
29
29
  expect(suffixes).toContain('agency');
30
30
  expect(suffixes).toContain('chat');
31
31
  expect(suffixes).toContain('operator');
32
+ expect(suffixes).toContain('intake');
32
33
  });
33
34
 
34
- it('has exactly 16 modules', () => {
35
- expect(ENGINE_MODULE_MANIFEST).toHaveLength(16);
35
+ it('has exactly 20 modules', () => {
36
+ expect(ENGINE_MODULE_MANIFEST).toHaveLength(20);
36
37
  });
37
38
 
38
39
  it('has no duplicate suffixes', () => {
@@ -118,7 +119,7 @@ describe('manifest order stability', () => {
118
119
  expect(ENGINE_MODULE_MANIFEST[0].suffix).toBe('vault');
119
120
  });
120
121
 
121
- it('review is the last module', () => {
122
- expect(ENGINE_MODULE_MANIFEST[ENGINE_MODULE_MANIFEST.length - 1].suffix).toBe('review');
122
+ it('tier is the last module', () => {
123
+ expect(ENGINE_MODULE_MANIFEST[ENGINE_MODULE_MANIFEST.length - 1].suffix).toBe('tier');
123
124
  });
124
125
  });
@@ -25,7 +25,7 @@ export interface ModuleManifestEntry {
25
25
  export const ENGINE_MODULE_MANIFEST: ModuleManifestEntry[] = [
26
26
  {
27
27
  suffix: 'vault',
28
- description: 'Knowledge management — search, CRUD, import/export, intake, sharing, linking.',
28
+ description: 'Knowledge management — search, CRUD, capture, sharing scope.',
29
29
  keyOps: ['search_intelligent', 'capture_knowledge', 'capture_quick'],
30
30
  },
31
31
  {
@@ -104,6 +104,26 @@ export const ENGINE_MODULE_MANIFEST: ModuleManifestEntry[] = [
104
104
  description: 'Knowledge review workflow.',
105
105
  keyOps: ['vault_submit_review', 'vault_approve', 'vault_reject'],
106
106
  },
107
+ {
108
+ suffix: 'intake',
109
+ description: 'Content ingestion — books, URLs, text, batch import.',
110
+ keyOps: ['intake_ingest_book', 'ingest_url', 'ingest_text', 'ingest_batch'],
111
+ },
112
+ {
113
+ suffix: 'links',
114
+ description: 'Entry linking — create, traverse, suggest, orphan detection.',
115
+ keyOps: ['link_entries', 'traverse', 'suggest_links', 'get_orphans'],
116
+ },
117
+ {
118
+ suffix: 'branching',
119
+ description: 'Vault branching — create, list, merge, delete branches.',
120
+ keyOps: ['vault_branch', 'vault_branch_list', 'vault_merge_branch'],
121
+ },
122
+ {
123
+ suffix: 'tier',
124
+ description: 'Multi-vault tiers — connect, disconnect, search across sources.',
125
+ keyOps: ['vault_connect_source', 'vault_search_all', 'vault_list_sources'],
126
+ },
107
127
  ];
108
128
 
109
129
  /** Core facade ops (always present, not in ENGINE_MODULES) */
@@ -97,7 +97,12 @@ describe('registerEngine — core ops', () => {
97
97
  it('registers core facade when coreOps provided', () => {
98
98
  const server = makeServer();
99
99
  const coreOps: OpDefinition[] = [
100
- { name: 'health', description: 'Health check', auth: 'read', handler: async () => ({ ok: true }) },
100
+ {
101
+ name: 'health',
102
+ description: 'Health check',
103
+ auth: 'read',
104
+ handler: async () => ({ ok: true }),
105
+ },
101
106
  ];
102
107
  const result = registerEngine(server, runtime, { agentId: 'core', coreOps });
103
108
  expect(result.tools).toContain('core_core');
@@ -39,6 +39,10 @@ import { createOperatorFacadeOps } from '../runtime/facades/operator-facade.js';
39
39
  import { createArchiveFacadeOps } from '../runtime/facades/archive-facade.js';
40
40
  import { createSyncFacadeOps } from '../runtime/facades/sync-facade.js';
41
41
  import { createReviewFacadeOps } from '../runtime/facades/review-facade.js';
42
+ import { createIntakeFacadeOps } from '../runtime/facades/intake-facade.js';
43
+ import { createLinksFacadeOps } from '../runtime/facades/links-facade.js';
44
+ import { createBranchingFacadeOps } from '../runtime/facades/branching-facade.js';
45
+ import { createTierFacadeOps } from '../runtime/facades/tier-facade.js';
42
46
  import { createDomainFacade } from '../runtime/domain-ops.js';
43
47
 
44
48
  // ─── Types ────────────────────────────────────────────────────────────
@@ -88,7 +92,7 @@ interface ModuleDef {
88
92
  export const ENGINE_MODULES: ModuleDef[] = [
89
93
  {
90
94
  suffix: 'vault',
91
- description: 'Knowledge management — search, CRUD, import/export, intake, sharing, linking.',
95
+ description: 'Knowledge management — search, CRUD, capture, sharing scope.',
92
96
  createOps: createVaultFacadeOps,
93
97
  },
94
98
  {
@@ -123,8 +127,7 @@ export const ENGINE_MODULES: ModuleDef[] = [
123
127
  },
124
128
  {
125
129
  suffix: 'orchestrate',
126
- description:
127
- 'Execution orchestration — session start, playbooks, plan/execute/complete.',
130
+ description: 'Execution orchestration — session start, playbooks, plan/execute/complete.',
128
131
  createOps: createOrchestrateFacadeOps,
129
132
  },
130
133
  {
@@ -167,6 +170,26 @@ export const ENGINE_MODULES: ModuleDef[] = [
167
170
  description: 'Knowledge review workflow.',
168
171
  createOps: createReviewFacadeOps,
169
172
  },
173
+ {
174
+ suffix: 'intake',
175
+ description: 'Content ingestion — books, URLs, text, batch import.',
176
+ createOps: createIntakeFacadeOps,
177
+ },
178
+ {
179
+ suffix: 'links',
180
+ description: 'Entry linking — create, traverse, suggest, orphan detection.',
181
+ createOps: createLinksFacadeOps,
182
+ },
183
+ {
184
+ suffix: 'branching',
185
+ description: 'Vault branching — create, list, merge, delete branches.',
186
+ createOps: createBranchingFacadeOps,
187
+ },
188
+ {
189
+ suffix: 'tier',
190
+ description: 'Multi-vault tiers — connect, disconnect, search across sources.',
191
+ createOps: createTierFacadeOps,
192
+ },
170
193
  ];
171
194
 
172
195
  // ─── Core Registration ────────────────────────────────────────────────
@@ -95,7 +95,9 @@ describe('classifyError', () => {
95
95
 
96
96
  describe('message pattern classification', () => {
97
97
  it('should classify "overloaded" as LLM_OVERLOAD', () => {
98
- expect(classifyError(new Error('server is overloaded')).code).toBe(SoleriErrorCode.LLM_OVERLOAD);
98
+ expect(classifyError(new Error('server is overloaded')).code).toBe(
99
+ SoleriErrorCode.LLM_OVERLOAD,
100
+ );
99
101
  });
100
102
 
101
103
  it('should classify "model busy" as LLM_OVERLOAD', () => {
@@ -123,7 +125,9 @@ describe('classifyError', () => {
123
125
  });
124
126
 
125
127
  it('should classify "not found" as RESOURCE_NOT_FOUND', () => {
126
- expect(classifyError(new Error('resource not found')).code).toBe(SoleriErrorCode.RESOURCE_NOT_FOUND);
128
+ expect(classifyError(new Error('resource not found')).code).toBe(
129
+ SoleriErrorCode.RESOURCE_NOT_FOUND,
130
+ );
127
131
  });
128
132
 
129
133
  it('should classify "rate limit" as RATE_LIMIT', () => {
@@ -118,10 +118,7 @@ describe('retryWithPreset', () => {
118
118
 
119
119
  it('should call onRetry callback on each retry', async () => {
120
120
  const onRetry = vi.fn();
121
- const fn = vi
122
- .fn()
123
- .mockRejectedValueOnce(new Error('network fail'))
124
- .mockResolvedValue('ok');
121
+ const fn = vi.fn().mockRejectedValueOnce(new Error('network fail')).mockResolvedValue('ok');
125
122
 
126
123
  const resultPromise = retryWithPreset(fn, 'fast', { onRetry });
127
124
  await vi.advanceTimersByTimeAsync(20_000);