@soleri/core 9.2.0 → 9.3.1

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 (316) 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 +2 -0
  14. package/dist/engine/module-manifest.d.ts.map +1 -1
  15. package/dist/engine/module-manifest.js +136 -1
  16. package/dist/engine/module-manifest.js.map +1 -1
  17. package/dist/engine/register-engine.d.ts.map +1 -1
  18. package/dist/engine/register-engine.js +25 -1
  19. package/dist/engine/register-engine.js.map +1 -1
  20. package/dist/flows/gate-evaluator.js.map +1 -1
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/operator/operator-profile.d.ts.map +1 -1
  26. package/dist/operator/operator-profile.js +11 -5
  27. package/dist/operator/operator-profile.js.map +1 -1
  28. package/dist/operator/operator-signals.d.ts.map +1 -1
  29. package/dist/operator/operator-signals.js.map +1 -1
  30. package/dist/planning/evidence-collector.js.map +1 -1
  31. package/dist/planning/gap-passes.d.ts.map +1 -1
  32. package/dist/planning/gap-passes.js +23 -6
  33. package/dist/planning/gap-passes.js.map +1 -1
  34. package/dist/planning/gap-patterns.d.ts.map +1 -1
  35. package/dist/planning/gap-patterns.js +57 -11
  36. package/dist/planning/gap-patterns.js.map +1 -1
  37. package/dist/planning/github-projection.d.ts.map +1 -1
  38. package/dist/planning/github-projection.js +39 -20
  39. package/dist/planning/github-projection.js.map +1 -1
  40. package/dist/planning/impact-analyzer.d.ts.map +1 -1
  41. package/dist/planning/impact-analyzer.js +20 -18
  42. package/dist/planning/impact-analyzer.js.map +1 -1
  43. package/dist/planning/plan-lifecycle.d.ts.map +1 -1
  44. package/dist/planning/plan-lifecycle.js +22 -9
  45. package/dist/planning/plan-lifecycle.js.map +1 -1
  46. package/dist/planning/planner.d.ts.map +1 -1
  47. package/dist/planning/planner.js +60 -17
  48. package/dist/planning/planner.js.map +1 -1
  49. package/dist/planning/rationalization-detector.d.ts.map +1 -1
  50. package/dist/planning/rationalization-detector.js.map +1 -1
  51. package/dist/planning/reconciliation-engine.d.ts.map +1 -1
  52. package/dist/planning/reconciliation-engine.js.map +1 -1
  53. package/dist/planning/task-complexity-assessor.d.ts +42 -0
  54. package/dist/planning/task-complexity-assessor.d.ts.map +1 -0
  55. package/dist/planning/task-complexity-assessor.js +132 -0
  56. package/dist/planning/task-complexity-assessor.js.map +1 -0
  57. package/dist/planning/task-verifier.d.ts.map +1 -1
  58. package/dist/planning/task-verifier.js +14 -6
  59. package/dist/planning/task-verifier.js.map +1 -1
  60. package/dist/runtime/admin-ops.d.ts.map +1 -1
  61. package/dist/runtime/admin-ops.js +18 -0
  62. package/dist/runtime/admin-ops.js.map +1 -1
  63. package/dist/runtime/admin-setup-ops.d.ts.map +1 -1
  64. package/dist/runtime/admin-setup-ops.js +2 -1
  65. package/dist/runtime/admin-setup-ops.js.map +1 -1
  66. package/dist/runtime/branching-ops.d.ts +12 -0
  67. package/dist/runtime/branching-ops.d.ts.map +1 -0
  68. package/dist/runtime/branching-ops.js +100 -0
  69. package/dist/runtime/branching-ops.js.map +1 -0
  70. package/dist/runtime/context-health.d.ts.map +1 -1
  71. package/dist/runtime/context-health.js.map +1 -1
  72. package/dist/runtime/facades/branching-facade.d.ts +7 -0
  73. package/dist/runtime/facades/branching-facade.d.ts.map +1 -0
  74. package/dist/runtime/facades/branching-facade.js +8 -0
  75. package/dist/runtime/facades/branching-facade.js.map +1 -0
  76. package/dist/runtime/facades/chat-service-ops.d.ts.map +1 -1
  77. package/dist/runtime/facades/chat-service-ops.js +3 -1
  78. package/dist/runtime/facades/chat-service-ops.js.map +1 -1
  79. package/dist/runtime/facades/chat-transport-ops.d.ts.map +1 -1
  80. package/dist/runtime/facades/chat-transport-ops.js.map +1 -1
  81. package/dist/runtime/facades/index.d.ts.map +1 -1
  82. package/dist/runtime/facades/index.js +42 -0
  83. package/dist/runtime/facades/index.js.map +1 -1
  84. package/dist/runtime/facades/intake-facade.d.ts +9 -0
  85. package/dist/runtime/facades/intake-facade.d.ts.map +1 -0
  86. package/dist/runtime/facades/intake-facade.js +11 -0
  87. package/dist/runtime/facades/intake-facade.js.map +1 -0
  88. package/dist/runtime/facades/links-facade.d.ts +9 -0
  89. package/dist/runtime/facades/links-facade.d.ts.map +1 -0
  90. package/dist/runtime/facades/links-facade.js +10 -0
  91. package/dist/runtime/facades/links-facade.js.map +1 -0
  92. package/dist/runtime/facades/operator-facade.d.ts.map +1 -1
  93. package/dist/runtime/facades/operator-facade.js.map +1 -1
  94. package/dist/runtime/facades/plan-facade.d.ts.map +1 -1
  95. package/dist/runtime/facades/plan-facade.js +4 -1
  96. package/dist/runtime/facades/plan-facade.js.map +1 -1
  97. package/dist/runtime/facades/tier-facade.d.ts +7 -0
  98. package/dist/runtime/facades/tier-facade.d.ts.map +1 -0
  99. package/dist/runtime/facades/tier-facade.js +8 -0
  100. package/dist/runtime/facades/tier-facade.js.map +1 -0
  101. package/dist/runtime/facades/vault-facade.d.ts +9 -1
  102. package/dist/runtime/facades/vault-facade.d.ts.map +1 -1
  103. package/dist/runtime/facades/vault-facade.js +44 -187
  104. package/dist/runtime/facades/vault-facade.js.map +1 -1
  105. package/dist/runtime/github-integration.d.ts.map +1 -1
  106. package/dist/runtime/github-integration.js +11 -4
  107. package/dist/runtime/github-integration.js.map +1 -1
  108. package/dist/runtime/orchestrate-ops.d.ts.map +1 -1
  109. package/dist/runtime/orchestrate-ops.js +75 -42
  110. package/dist/runtime/orchestrate-ops.js.map +1 -1
  111. package/dist/runtime/planning-extra-ops.d.ts.map +1 -1
  112. package/dist/runtime/planning-extra-ops.js.map +1 -1
  113. package/dist/runtime/runtime.d.ts.map +1 -1
  114. package/dist/runtime/runtime.js +3 -1
  115. package/dist/runtime/runtime.js.map +1 -1
  116. package/dist/runtime/session-briefing.d.ts.map +1 -1
  117. package/dist/runtime/session-briefing.js +5 -1
  118. package/dist/runtime/session-briefing.js.map +1 -1
  119. package/dist/runtime/tier-ops.d.ts +13 -0
  120. package/dist/runtime/tier-ops.d.ts.map +1 -0
  121. package/dist/runtime/tier-ops.js +110 -0
  122. package/dist/runtime/tier-ops.js.map +1 -0
  123. package/dist/skills/sync-skills.d.ts.map +1 -1
  124. package/dist/skills/sync-skills.js +1 -1
  125. package/dist/skills/sync-skills.js.map +1 -1
  126. package/dist/vault/linking.d.ts.map +1 -1
  127. package/dist/vault/linking.js +41 -5
  128. package/dist/vault/linking.js.map +1 -1
  129. package/dist/vault/vault-entries.d.ts.map +1 -1
  130. package/dist/vault/vault-entries.js +68 -26
  131. package/dist/vault/vault-entries.js.map +1 -1
  132. package/dist/vault/vault-maintenance.d.ts.map +1 -1
  133. package/dist/vault/vault-maintenance.js +6 -2
  134. package/dist/vault/vault-maintenance.js.map +1 -1
  135. package/dist/vault/vault-markdown-sync.d.ts.map +1 -1
  136. package/dist/vault/vault-markdown-sync.js.map +1 -1
  137. package/dist/vault/vault-memories.d.ts.map +1 -1
  138. package/dist/vault/vault-memories.js +3 -1
  139. package/dist/vault/vault-memories.js.map +1 -1
  140. package/dist/vault/vault-schema.js +36 -10
  141. package/dist/vault/vault-schema.js.map +1 -1
  142. package/dist/vault/vault.d.ts.map +1 -1
  143. package/dist/vault/vault.js +5 -1
  144. package/dist/vault/vault.js.map +1 -1
  145. package/package.json +7 -7
  146. package/src/agency/agency-manager.test.ts +60 -40
  147. package/src/agency/default-rules.test.ts +17 -9
  148. package/src/capabilities/registry.test.ts +2 -12
  149. package/src/chat/agent-loop.test.ts +33 -43
  150. package/src/chat/mcp-bridge.test.ts +7 -2
  151. package/src/claudemd/inject.test.ts +2 -12
  152. package/src/context/context-engine.test.ts +96 -51
  153. package/src/control/intent-router.test.ts +3 -3
  154. package/src/curator/classifier.test.ts +14 -8
  155. package/src/curator/contradiction-detector.test.ts +30 -5
  156. package/src/curator/curator.ts +278 -56
  157. package/src/curator/duplicate-detector.test.ts +77 -15
  158. package/src/curator/quality-gate.test.ts +71 -31
  159. package/src/curator/tag-manager.test.ts +12 -4
  160. package/src/domain-packs/knowledge-installer.test.ts +2 -10
  161. package/src/domain-packs/token-resolver.test.ts +1 -3
  162. package/src/domain-packs/types.test.ts +16 -2
  163. package/src/enforcement/registry.test.ts +2 -8
  164. package/src/engine/bin/soleri-engine.ts +3 -1
  165. package/src/engine/module-manifest.test.ts +48 -4
  166. package/src/engine/module-manifest.ts +138 -1
  167. package/src/engine/register-engine.test.ts +6 -1
  168. package/src/engine/register-engine.ts +26 -3
  169. package/src/errors/classify.test.ts +6 -2
  170. package/src/errors/retry.test.ts +1 -4
  171. package/src/facades/facade-factory.test.ts +110 -64
  172. package/src/flows/epilogue.test.ts +16 -10
  173. package/src/flows/gate-evaluator.test.ts +12 -6
  174. package/src/flows/gate-evaluator.ts +1 -3
  175. package/src/governance/governance.test.ts +137 -21
  176. package/src/health/health-registry.test.ts +8 -1
  177. package/src/index.ts +8 -0
  178. package/src/intake/content-classifier.test.ts +121 -51
  179. package/src/intake/dedup-gate.test.ts +38 -22
  180. package/src/intake/intake-pipeline.test.ts +5 -3
  181. package/src/intake/text-ingester.test.ts +26 -20
  182. package/src/llm/key-pool.test.ts +1 -3
  183. package/src/llm/llm-client.test.ts +1 -4
  184. package/src/llm/oauth-discovery.test.ts +16 -16
  185. package/src/llm/utils.test.ts +62 -18
  186. package/src/logging/logger.test.ts +4 -1
  187. package/src/loop/loop-manager.test.ts +2 -6
  188. package/src/migrations/migration-runner.edge-cases.test.ts +2 -7
  189. package/src/operator/operator-profile-extended.test.ts +15 -5
  190. package/src/operator/operator-profile.test.ts +26 -8
  191. package/src/operator/operator-profile.ts +38 -22
  192. package/src/operator/operator-signals-extended.test.ts +35 -23
  193. package/src/operator/operator-signals.test.ts +6 -10
  194. package/src/operator/operator-signals.ts +2 -1
  195. package/src/operator/prompts/hook-precompact-operator-dispatch.md +10 -6
  196. package/src/operator/prompts/subagent-soft-signal-extractor.md +5 -0
  197. package/src/operator/prompts/subagent-synthesis-cognition.md +19 -10
  198. package/src/operator/prompts/subagent-synthesis-communication.md +13 -7
  199. package/src/operator/prompts/subagent-synthesis-technical.md +19 -9
  200. package/src/operator/prompts/subagent-synthesis-trust.md +27 -21
  201. package/src/persona/defaults.test.ts +1 -5
  202. package/src/planning/evidence-collector.test.ts +147 -38
  203. package/src/planning/evidence-collector.ts +1 -4
  204. package/src/planning/gap-analysis-alternatives.test.ts +41 -11
  205. package/src/planning/gap-passes.test.ts +215 -33
  206. package/src/planning/gap-passes.ts +115 -46
  207. package/src/planning/gap-patterns.test.ts +87 -13
  208. package/src/planning/gap-patterns.ts +114 -31
  209. package/src/planning/github-projection.test.ts +6 -1
  210. package/src/planning/github-projection.ts +41 -20
  211. package/src/planning/impact-analyzer.test.ts +10 -23
  212. package/src/planning/impact-analyzer.ts +33 -46
  213. package/src/planning/plan-lifecycle.test.ts +103 -36
  214. package/src/planning/plan-lifecycle.ts +49 -18
  215. package/src/planning/planner.test.ts +12 -2
  216. package/src/planning/planner.ts +198 -58
  217. package/src/planning/rationalization-detector.test.ts +5 -20
  218. package/src/planning/rationalization-detector.ts +14 -16
  219. package/src/planning/reconciliation-engine.test.ts +20 -3
  220. package/src/planning/reconciliation-engine.ts +1 -2
  221. package/src/planning/task-complexity-assessor.test.ts +298 -0
  222. package/src/planning/task-complexity-assessor.ts +183 -0
  223. package/src/planning/task-verifier.test.ts +59 -27
  224. package/src/planning/task-verifier.ts +15 -9
  225. package/src/playbooks/playbook-executor.test.ts +1 -3
  226. package/src/plugins/plugin-loader.test.ts +19 -14
  227. package/src/plugins/plugin-registry.test.ts +45 -33
  228. package/src/project/project-registry.test.ts +23 -12
  229. package/src/prompts/template-manager.test.ts +4 -1
  230. package/src/queue/job-queue.test.ts +10 -14
  231. package/src/runtime/admin-extra-ops.test.ts +5 -19
  232. package/src/runtime/admin-ops.test.ts +22 -1
  233. package/src/runtime/admin-ops.ts +19 -0
  234. package/src/runtime/admin-setup-ops.test.ts +3 -4
  235. package/src/runtime/admin-setup-ops.ts +9 -2
  236. package/src/runtime/archive-ops.test.ts +4 -1
  237. package/src/runtime/branching-ops.test.ts +144 -0
  238. package/src/runtime/branching-ops.ts +107 -0
  239. package/src/runtime/capture-ops.test.ts +7 -21
  240. package/src/runtime/chain-ops.test.ts +16 -6
  241. package/src/runtime/claude-md-helpers.test.ts +1 -3
  242. package/src/runtime/context-health.test.ts +1 -3
  243. package/src/runtime/context-health.ts +1 -3
  244. package/src/runtime/curator-extra-ops.test.ts +3 -1
  245. package/src/runtime/domain-ops.test.ts +46 -36
  246. package/src/runtime/facades/admin-facade.test.ts +1 -4
  247. package/src/runtime/facades/archive-facade.test.ts +21 -7
  248. package/src/runtime/facades/brain-facade.test.ts +176 -72
  249. package/src/runtime/facades/branching-facade.test.ts +43 -0
  250. package/src/runtime/facades/branching-facade.ts +11 -0
  251. package/src/runtime/facades/chat-facade.test.ts +81 -28
  252. package/src/runtime/facades/chat-service-ops.test.ts +178 -73
  253. package/src/runtime/facades/chat-service-ops.ts +3 -1
  254. package/src/runtime/facades/chat-session-ops.test.ts +25 -10
  255. package/src/runtime/facades/chat-transport-ops.test.ts +101 -34
  256. package/src/runtime/facades/chat-transport-ops.ts +0 -1
  257. package/src/runtime/facades/context-facade.test.ts +19 -4
  258. package/src/runtime/facades/control-facade.test.ts +3 -3
  259. package/src/runtime/facades/index.ts +42 -0
  260. package/src/runtime/facades/intake-facade.test.ts +215 -0
  261. package/src/runtime/facades/intake-facade.ts +14 -0
  262. package/src/runtime/facades/links-facade.test.ts +203 -0
  263. package/src/runtime/facades/links-facade.ts +13 -0
  264. package/src/runtime/facades/loop-facade.test.ts +22 -5
  265. package/src/runtime/facades/memory-facade.test.ts +19 -5
  266. package/src/runtime/facades/operator-facade.test.ts +17 -4
  267. package/src/runtime/facades/operator-facade.ts +11 -3
  268. package/src/runtime/facades/orchestrate-facade.test.ts +7 -1
  269. package/src/runtime/facades/plan-facade.test.ts +29 -12
  270. package/src/runtime/facades/plan-facade.ts +7 -2
  271. package/src/runtime/facades/tier-facade.test.ts +47 -0
  272. package/src/runtime/facades/tier-facade.ts +11 -0
  273. package/src/runtime/facades/vault-facade.test.ts +174 -242
  274. package/src/runtime/facades/vault-facade.ts +55 -199
  275. package/src/runtime/github-integration.ts +11 -8
  276. package/src/runtime/grading-ops.test.ts +39 -8
  277. package/src/runtime/intake-ops.test.ts +69 -16
  278. package/src/runtime/loop-ops.test.ts +16 -6
  279. package/src/runtime/memory-cross-project-ops.test.ts +25 -14
  280. package/src/runtime/orchestrate-ops.test.ts +204 -0
  281. package/src/runtime/orchestrate-ops.ts +103 -65
  282. package/src/runtime/pack-ops.test.ts +23 -6
  283. package/src/runtime/planning-extra-ops.test.ts +17 -7
  284. package/src/runtime/planning-extra-ops.ts +3 -1
  285. package/src/runtime/playbook-ops.test.ts +26 -3
  286. package/src/runtime/plugin-ops.test.ts +83 -25
  287. package/src/runtime/project-ops.test.ts +26 -6
  288. package/src/runtime/runtime.ts +3 -1
  289. package/src/runtime/session-briefing.test.ts +183 -54
  290. package/src/runtime/session-briefing.ts +8 -2
  291. package/src/runtime/sync-ops.test.ts +3 -12
  292. package/src/runtime/telemetry-ops.test.ts +31 -6
  293. package/src/runtime/tier-ops.test.ts +159 -0
  294. package/src/runtime/tier-ops.ts +119 -0
  295. package/src/runtime/vault-extra-ops.test.ts +32 -8
  296. package/src/runtime/vault-sharing-ops.test.ts +1 -4
  297. package/src/skills/sync-skills.ts +2 -12
  298. package/src/transport/ws-server.test.ts +7 -4
  299. package/src/vault/__tests__/vault-characterization.test.ts +492 -81
  300. package/src/vault/linking.test.ts +50 -17
  301. package/src/vault/linking.ts +48 -7
  302. package/src/vault/obsidian-sync.test.ts +6 -3
  303. package/src/vault/scope-detector.test.ts +1 -3
  304. package/src/vault/vault-branching.test.ts +9 -7
  305. package/src/vault/vault-entries.ts +209 -65
  306. package/src/vault/vault-maintenance.ts +7 -12
  307. package/src/vault/vault-manager.test.ts +10 -10
  308. package/src/vault/vault-markdown-sync.ts +4 -1
  309. package/src/vault/vault-memories.ts +7 -7
  310. package/src/vault/vault-scaling.test.ts +5 -5
  311. package/src/vault/vault-schema.ts +72 -15
  312. package/src/vault/vault.ts +55 -9
  313. package/src/brain/strength-scorer.ts +0 -404
  314. package/src/engine/index.ts +0 -21
  315. package/src/persona/index.ts +0 -9
  316. package/src/vault/vault-interfaces.ts +0 -56
@@ -11,11 +11,13 @@ You are a dispatcher hook that runs during PreCompact. You decide which operator
11
11
  ### Step 1: Check Synthesis Status
12
12
 
13
13
  Call `{agentId}_operator op:synthesis_check` with:
14
+
14
15
  ```json
15
16
  {}
16
17
  ```
17
18
 
18
19
  This returns:
20
+
19
21
  ```json
20
22
  {
21
23
  "due": true | false,
@@ -40,6 +42,7 @@ This returns:
40
42
  Subagent A runs on every PreCompact regardless of synthesis status. It extracts new signals from the conversation that just happened.
41
43
 
42
44
  Spawn as **background** (non-blocking):
45
+
43
46
  - Prompt: contents of `subagent-soft-signal-extractor.md`
44
47
  - Context: the current conversation context available to this hook
45
48
 
@@ -49,12 +52,12 @@ Only spawn synthesis subagents if `synthesis_check` returned `due: true`.
49
52
 
50
53
  Map `sectionsToUpdate` to subagents:
51
54
 
52
- | Sections | Subagent | Prompt File |
53
- |----------|----------|-------------|
54
- | `communication: true` OR `workingRules: true` | Subagent B | `subagent-synthesis-communication.md` |
55
- | `cognition: true` OR `identity: true` OR `tasteProfile: true` | Subagent C | `subagent-synthesis-cognition.md` |
56
- | `technicalContext: true` OR `growthEdges: true` | Subagent D | `subagent-synthesis-technical.md` |
57
- | `trustModel: true` | Subagent E | `subagent-synthesis-trust.md` |
55
+ | Sections | Subagent | Prompt File |
56
+ | ------------------------------------------------------------- | ---------- | ------------------------------------- |
57
+ | `communication: true` OR `workingRules: true` | Subagent B | `subagent-synthesis-communication.md` |
58
+ | `cognition: true` OR `identity: true` OR `tasteProfile: true` | Subagent C | `subagent-synthesis-cognition.md` |
59
+ | `technicalContext: true` OR `growthEdges: true` | Subagent D | `subagent-synthesis-technical.md` |
60
+ | `trustModel: true` | Subagent E | `subagent-synthesis-trust.md` |
58
61
 
59
62
  Spawn each applicable subagent as **background** (non-blocking).
60
63
 
@@ -81,6 +84,7 @@ Pending signals: {count}.
81
84
  ## Subagent Isolation
82
85
 
83
86
  Each subagent operates independently:
87
+
84
88
  - They read their own signal types via `op:signal_list`.
85
89
  - They read their own profile sections via `op:profile_get`.
86
90
  - They write their own sections via `op:profile_update_section`.
@@ -21,6 +21,7 @@ You extract exactly three signal types:
21
21
  The operator revealed something about themselves — background, preferences, philosophy, or anecdotes.
22
22
 
23
23
  **Data shape:**
24
+
24
25
  ```json
25
26
  {
26
27
  "signalType": "personal_share",
@@ -42,6 +43,7 @@ The operator revealed something about themselves — background, preferences, ph
42
43
  The operator showed a preference for how they want to interact with the agent.
43
44
 
44
45
  **Data shape:**
46
+
45
47
  ```json
46
48
  {
47
49
  "signalType": "communication_pref",
@@ -61,6 +63,7 @@ The operator showed a preference for how they want to interact with the agent.
61
63
  The operator reacted to something the agent produced — positively, negatively, or with mixed feelings.
62
64
 
63
65
  **Data shape:**
66
+
64
67
  ```json
65
68
  {
66
69
  "signalType": "reaction_to_output",
@@ -83,6 +86,7 @@ The operator reacted to something the agent produced — positively, negatively,
83
86
  Only emit signals with confidence >= 0.4. If you are less than 40% sure, skip it.
84
87
 
85
88
  **Calibration guide:**
89
+
86
90
  - 0.4-0.5: Weak inference from indirect evidence. One data point.
87
91
  - 0.5-0.7: Reasonable inference from multiple indirect signals.
88
92
  - 0.7-0.85: Clear evidence but not explicitly stated.
@@ -97,6 +101,7 @@ For each signal you detect, call:
97
101
  ```
98
102
 
99
103
  With params:
104
+
100
105
  ```json
101
106
  {
102
107
  "signals": [
@@ -11,6 +11,7 @@ You are a background synthesizer. You read accumulated operator signals and upda
11
11
  ### Step 1: Retrieve Relevant Signals
12
12
 
13
13
  Call `{agentId}_operator op:signal_list` with:
14
+
14
15
  ```json
15
16
  {
16
17
  "types": ["personal_share", "reaction_to_output"],
@@ -24,12 +25,15 @@ If zero signals are returned, exit silently.
24
25
  ### Step 2: Read Current Profile Sections
25
26
 
26
27
  Call `{agentId}_operator op:profile_get` three times:
28
+
27
29
  ```json
28
30
  { "section": "cognition" }
29
31
  ```
32
+
30
33
  ```json
31
34
  { "section": "identity" }
32
35
  ```
36
+
33
37
  ```json
34
38
  { "section": "tasteProfile" }
35
39
  ```
@@ -38,18 +42,19 @@ Call `{agentId}_operator op:profile_get` three times:
38
42
 
39
43
  **Signal-to-section mapping:**
40
44
 
41
- | Signal Type | Updates Section | What It Informs |
42
- |-------------|----------------|-----------------|
43
- | `personal_share` (category: `background`) | `identity` | `background`, `role` |
44
- | `personal_share` (category: `philosophy`) | `identity` | `philosophy` |
45
- | `personal_share` (category: `preference`) | `tasteProfile` | New taste entries |
46
- | `personal_share` (category: `anecdote`) | `identity` or `cognition` | Context-dependent |
47
- | `reaction_to_output` (aspect: `style`) | `tasteProfile` | Style preferences |
48
- | `reaction_to_output` (aspect: `approach`) | `cognition` | Cognitive patterns |
49
- | `reaction_to_output` (aspect: `accuracy`) | `cognition` | Derivations about reasoning |
50
- | `reaction_to_output` (aspect: `completeness`) | `cognition` | Depth preference patterns |
45
+ | Signal Type | Updates Section | What It Informs |
46
+ | --------------------------------------------- | ------------------------- | --------------------------- |
47
+ | `personal_share` (category: `background`) | `identity` | `background`, `role` |
48
+ | `personal_share` (category: `philosophy`) | `identity` | `philosophy` |
49
+ | `personal_share` (category: `preference`) | `tasteProfile` | New taste entries |
50
+ | `personal_share` (category: `anecdote`) | `identity` or `cognition` | Context-dependent |
51
+ | `reaction_to_output` (aspect: `style`) | `tasteProfile` | Style preferences |
52
+ | `reaction_to_output` (aspect: `approach`) | `cognition` | Cognitive patterns |
53
+ | `reaction_to_output` (aspect: `accuracy`) | `cognition` | Derivations about reasoning |
54
+ | `reaction_to_output` (aspect: `completeness`) | `cognition` | Depth preference patterns |
51
55
 
52
56
  **Observed vs. Reported — applies here too:**
57
+
53
58
  - `personal_share` with `explicit: true` = **reported**. Direct statement from the operator.
54
59
  - `personal_share` with `explicit: false` = **observed**. Inferred by the signal extractor.
55
60
  - `reaction_to_output` is always **observed**. The operator reacted; they did not describe their cognitive style.
@@ -70,6 +75,7 @@ Update `identity`:
70
75
  ```
71
76
 
72
77
  **Rules:**
78
+
73
79
  - Only update `background` and `role` from `personal_share` signals with `explicit: true` or confidence >= 0.7.
74
80
  - `philosophy` can be inferred from repeated `personal_share` (philosophy category) or consistent `reaction_to_output` patterns showing values (e.g., always reacting negatively to over-engineering suggests "simplicity" as a value).
75
81
  - Never overwrite a reported identity field with an observed inference. Reported wins.
@@ -101,6 +107,7 @@ Update `cognition`:
101
107
  ```
102
108
 
103
109
  **Cognitive patterns to look for:**
110
+
104
111
  - `visual-first-thinker` — reacts positively to diagrams, tables, visual structure.
105
112
  - `depth-over-breadth` — prefers deep dives over surveys.
106
113
  - `breadth-first-explorer` — prefers seeing all options before choosing.
@@ -110,6 +117,7 @@ Update `cognition`:
110
117
  - Custom patterns as appropriate.
111
118
 
112
119
  **Rules:**
120
+
113
121
  - A new pattern requires at least 2 supporting signals.
114
122
  - Pattern `strength` starts at 0.3 and increases with each reinforcing signal (cap at 0.95).
115
123
  - Derivations require at least 2 source patterns. A derivation from a single pattern is just a restatement.
@@ -135,6 +143,7 @@ Update `tasteProfile`:
135
143
  ```
136
144
 
137
145
  **Rules:**
146
+
138
147
  - Taste entries from `reaction_to_output` (aspect: `style`) are observed.
139
148
  - Taste entries from `personal_share` (category: `preference`) may be reported (if `explicit: true`) or observed.
140
149
  - Every taste entry must have a `workImplication` — what should the agent do differently because of this taste?
@@ -11,6 +11,7 @@ You are a background synthesizer. You read accumulated operator signals, compare
11
11
  ### Step 1: Retrieve Relevant Signals
12
12
 
13
13
  Call `{agentId}_operator op:signal_list` with:
14
+
14
15
  ```json
15
16
  {
16
17
  "types": ["command_style", "communication_pref", "frustration"],
@@ -24,9 +25,11 @@ If zero signals are returned, exit silently. Nothing to synthesize.
24
25
  ### Step 2: Read Current Profile Sections
25
26
 
26
27
  Call `{agentId}_operator op:profile_get` twice:
28
+
27
29
  ```json
28
30
  { "section": "communication" }
29
31
  ```
32
+
30
33
  ```json
31
34
  { "section": "workingRules" }
32
35
  ```
@@ -38,6 +41,7 @@ If no profile exists yet, you are building from scratch. Use empty defaults.
38
41
  For each signal, classify it:
39
42
 
40
43
  **Observed vs. Reported:**
44
+
41
45
  - **Observed**: You inferred the preference from behavior. The operator used terse one-word messages (observed: prefers concise). The operator got frustrated when the agent was verbose (observed: dislikes verbosity).
42
46
  - **Reported**: The operator explicitly stated the preference. "Keep it short." "I prefer bullet points." "Don't explain things I already know."
43
47
 
@@ -45,13 +49,13 @@ This distinction matters. Reported preferences override observed ones. Observed
45
49
 
46
50
  **Signal-to-section mapping:**
47
51
 
48
- | Signal Type | Updates Section | What It Informs |
49
- |-------------|----------------|-----------------|
50
- | `command_style` | `communication` | `style`, `formality`, `signalWords` |
51
- | `command_style` | `workingRules` | Rules about how to interpret terse vs verbose requests |
52
- | `communication_pref` | `communication` | `style`, `patience`, `adaptationRules` |
53
- | `frustration` | `communication` | `patience`, `adaptationRules` |
54
- | `frustration` | `workingRules` | Rules about what to avoid |
52
+ | Signal Type | Updates Section | What It Informs |
53
+ | -------------------- | --------------- | ------------------------------------------------------ |
54
+ | `command_style` | `communication` | `style`, `formality`, `signalWords` |
55
+ | `command_style` | `workingRules` | Rules about how to interpret terse vs verbose requests |
56
+ | `communication_pref` | `communication` | `style`, `patience`, `adaptationRules` |
57
+ | `frustration` | `communication` | `patience`, `adaptationRules` |
58
+ | `frustration` | `workingRules` | Rules about what to avoid |
55
59
 
56
60
  ### Step 4: Synthesize Communication Section
57
61
 
@@ -74,6 +78,7 @@ Build the updated `communication` section:
74
78
  ```
75
79
 
76
80
  **Rules for synthesis:**
81
+
77
82
  - Do not overwrite existing data without stronger evidence. If the current profile says `style: "concise"` with 5 reinforcing signals, a single contradictory signal should not flip it.
78
83
  - Merge `signalWords` — add new ones, do not remove existing ones unless a correction signal contradicts them.
79
84
  - `formality` and `patience` are rolling averages. Weight recent signals more heavily (2x weight for signals from the last 3 sessions vs. older ones).
@@ -98,6 +103,7 @@ Build the updated `workingRules` section:
98
103
  ```
99
104
 
100
105
  **Rules for synthesis:**
106
+
101
107
  - A new rule requires at least 2 observed signals OR 1 reported signal.
102
108
  - If an existing rule is reinforced by new signals, increment `reinforcements` and update `lastSeen`.
103
109
  - If signals contradict an existing rule, do NOT remove it. Instead, add a new rule reflecting the updated preference and let the higher `reinforcements` count determine which is dominant.
@@ -11,6 +11,7 @@ You are a background synthesizer. You read accumulated operator signals and upda
11
11
  ### Step 1: Retrieve Relevant Signals
12
12
 
13
13
  Call `{agentId}_operator op:signal_list` with:
14
+
14
15
  ```json
15
16
  {
16
17
  "types": ["domain_expertise", "tool_preference", "correction"],
@@ -24,9 +25,11 @@ If zero signals are returned, exit silently.
24
25
  ### Step 2: Read Current Profile Sections
25
26
 
26
27
  Call `{agentId}_operator op:profile_get` twice:
28
+
27
29
  ```json
28
30
  { "section": "technicalContext" }
29
31
  ```
32
+
30
33
  ```json
31
34
  { "section": "growthEdges" }
32
35
  ```
@@ -35,17 +38,18 @@ Call `{agentId}_operator op:profile_get` twice:
35
38
 
36
39
  **Signal-to-section mapping:**
37
40
 
38
- | Signal Type | Updates Section | What It Informs |
39
- |-------------|----------------|-----------------|
40
- | `domain_expertise` | `technicalContext` | `domains`, `blindSpots` |
41
- | `domain_expertise` | `growthEdges` | Areas where level is `novice` or `intermediate` |
42
- | `tool_preference` | `technicalContext` | `tools` array |
43
- | `tool_preference` (action: `avoided`) | `technicalContext` | Negative preference — avoid suggesting this tool |
44
- | `correction` (category: `factual`) | `technicalContext` | `blindSpots` for the agent, expertise signal for the operator |
45
- | `correction` (category: `approach`) | `growthEdges` | May reveal operator's preferred approaches |
46
- | `correction` (category: `scope`) | `growthEdges` | Scope awareness — growth or expertise signal |
41
+ | Signal Type | Updates Section | What It Informs |
42
+ | ------------------------------------- | ------------------ | ------------------------------------------------------------- |
43
+ | `domain_expertise` | `technicalContext` | `domains`, `blindSpots` |
44
+ | `domain_expertise` | `growthEdges` | Areas where level is `novice` or `intermediate` |
45
+ | `tool_preference` | `technicalContext` | `tools` array |
46
+ | `tool_preference` (action: `avoided`) | `technicalContext` | Negative preference — avoid suggesting this tool |
47
+ | `correction` (category: `factual`) | `technicalContext` | `blindSpots` for the agent, expertise signal for the operator |
48
+ | `correction` (category: `approach`) | `growthEdges` | May reveal operator's preferred approaches |
49
+ | `correction` (category: `scope`) | `growthEdges` | Scope awareness — growth or expertise signal |
47
50
 
48
51
  **Observed vs. Reported:**
52
+
49
53
  - `domain_expertise` signals are always **observed** — the extractor inferred expertise from behavior.
50
54
  - `tool_preference` with action `requested` = **reported** (operator asked for the tool). Other actions = **observed**.
51
55
  - `correction` signals are always **observed** — the operator corrected the agent, revealing their own knowledge.
@@ -75,16 +79,19 @@ Update `technicalContext`:
75
79
  ```
76
80
 
77
81
  **Rules for domains:**
82
+
78
83
  - Add a domain when a `domain_expertise` signal at level `intermediate` or above is detected.
79
84
  - Do not add domains from a single weak signal. Require confidence >= 0.5 or 2+ signals.
80
85
 
81
86
  **Rules for tools:**
87
+
82
88
  - `tool_preference` with action `used` or `requested` — add or update the tool entry.
83
89
  - `tool_preference` with action `avoided` or `dismissed` — do NOT add to tools. Instead, consider a working rule (handled by Subagent B if relevant signals exist).
84
90
  - `proficiency` is inferred from `domain_expertise` level for related tools, or from how the operator uses the tool (basic commands = beginner, advanced features = expert).
85
91
  - `frequency` is inferred from how often the tool appears in signals. 1 signal = `rare`, 2-3 = `occasional`, 4-7 = `regular`, 8+ = `daily`.
86
92
 
87
93
  **Rules for blind spots:**
94
+
88
95
  - A blind spot is detected when the operator consistently makes errors in an area OR when `domain_expertise` shows `novice` level in a domain they work in.
89
96
  - Blind spots from agent corrections (where the operator was wrong) should NOT be recorded — those are the agent's blind spots, not the operator's.
90
97
  - Blind spots from `correction` signals (where the operator corrected the agent) reveal operator expertise, not blind spots. Use these to increase confidence in the operator's domain expertise.
@@ -114,15 +121,18 @@ Update `growthEdges`:
114
121
  ```
115
122
 
116
123
  **Observed growth edges:**
124
+
117
125
  - Detected when `domain_expertise` signals show level `novice` or `intermediate` in an area the operator is actively working in.
118
126
  - Also detected when `correction` signals show the operator learning — they corrected something they might not have caught before.
119
127
  - `progress`: `emerging` = first time seen, `developing` = seen across 2-3 sessions, `maturing` = consistent improvement signals.
120
128
 
121
129
  **Self-reported growth edges:**
130
+
122
131
  - From `personal_share` signals where the operator mentions learning something new, studying a topic, or acknowledging a gap. These would come via the signal extractor as `personal_share` with category `background` or `preference`.
123
132
  - Note: this subagent only receives `domain_expertise`, `tool_preference`, and `correction` signals directly. Self-reported growth edges are only updated if cross-referenced data already exists in the profile from Subagent C.
124
133
 
125
134
  **Rules:**
135
+
126
136
  - Do not create a growth edge from a single `domain_expertise` signal at `novice` level — the operator may simply not care about that domain.
127
137
  - Require 2+ signals or 1 signal with confidence >= 0.7 to establish a growth edge.
128
138
  - If a growth edge's domain expertise level increases over time, update `progress` accordingly.
@@ -11,6 +11,7 @@ You are a background synthesizer. You read accumulated operator signals and upda
11
11
  ### Step 1: Retrieve Relevant Signals
12
12
 
13
13
  Call `{agentId}_operator op:signal_list` with:
14
+
14
15
  ```json
15
16
  {
16
17
  "types": ["correction", "frustration", "session_depth", "work_rhythm"],
@@ -24,6 +25,7 @@ If zero signals are returned, exit silently.
24
25
  ### Step 2: Read Current Profile Section
25
26
 
26
27
  Call `{agentId}_operator op:profile_get`:
28
+
27
29
  ```json
28
30
  { "section": "trustModel" }
29
31
  ```
@@ -34,33 +36,35 @@ Each signal maps to a trust event with a positive or negative impact.
34
36
 
35
37
  **Trust builders (positive impact):**
36
38
 
37
- | Signal | Condition | Impact Range | Rationale |
38
- |--------|-----------|-------------|-----------|
39
- | `session_depth` | `depth: "deep"` or `"marathon"` | +0.05 to +0.15 | Long sessions = operator trusts the agent enough to invest time |
40
- | `work_rhythm` | `pattern: "steady"` or `"deep-focus"` | +0.03 to +0.08 | Steady rhythm = no friction, comfortable working pace |
41
- | `correction` | `category: "style"` | +0.02 to +0.05 | Style corrections mean the operator cares enough to refine, not reject |
42
- | `session_depth` | High `messageCount` (50+) | +0.05 to +0.10 | Extended engagement signals trust |
39
+ | Signal | Condition | Impact Range | Rationale |
40
+ | --------------- | ------------------------------------- | -------------- | ---------------------------------------------------------------------- |
41
+ | `session_depth` | `depth: "deep"` or `"marathon"` | +0.05 to +0.15 | Long sessions = operator trusts the agent enough to invest time |
42
+ | `work_rhythm` | `pattern: "steady"` or `"deep-focus"` | +0.03 to +0.08 | Steady rhythm = no friction, comfortable working pace |
43
+ | `correction` | `category: "style"` | +0.02 to +0.05 | Style corrections mean the operator cares enough to refine, not reject |
44
+ | `session_depth` | High `messageCount` (50+) | +0.05 to +0.10 | Extended engagement signals trust |
43
45
 
44
46
  **Trust breakers (negative impact):**
45
47
 
46
- | Signal | Condition | Impact Range | Rationale |
47
- |--------|-----------|-------------|-----------|
48
- | `frustration` | `level: "high"` | -0.15 to -0.25 | High frustration erodes trust significantly |
49
- | `frustration` | `level: "moderate"` | -0.05 to -0.10 | Moderate frustration is a warning |
50
- | `frustration` | `level: "mild"` | -0.02 to -0.05 | Mild frustration is noise unless repeated |
51
- | `correction` | `category: "factual"` | -0.05 to -0.10 | Agent got facts wrong — undermines reliability |
52
- | `correction` | `category: "approach"` | -0.03 to -0.08 | Wrong approach — undermines competence perception |
53
- | `correction` | `category: "scope"` | -0.02 to -0.05 | Scope mismatch — mild trust impact |
54
- | `work_rhythm` | `pattern: "burst"` with low `taskCount` | -0.02 to -0.05 | Short bursts with few completions may signal disengagement |
55
- | `session_depth` | `depth: "shallow"` repeated | -0.03 to -0.05 | Consistently short sessions may signal declining trust |
48
+ | Signal | Condition | Impact Range | Rationale |
49
+ | --------------- | --------------------------------------- | -------------- | ---------------------------------------------------------- |
50
+ | `frustration` | `level: "high"` | -0.15 to -0.25 | High frustration erodes trust significantly |
51
+ | `frustration` | `level: "moderate"` | -0.05 to -0.10 | Moderate frustration is a warning |
52
+ | `frustration` | `level: "mild"` | -0.02 to -0.05 | Mild frustration is noise unless repeated |
53
+ | `correction` | `category: "factual"` | -0.05 to -0.10 | Agent got facts wrong — undermines reliability |
54
+ | `correction` | `category: "approach"` | -0.03 to -0.08 | Wrong approach — undermines competence perception |
55
+ | `correction` | `category: "scope"` | -0.02 to -0.05 | Scope mismatch — mild trust impact |
56
+ | `work_rhythm` | `pattern: "burst"` with low `taskCount` | -0.02 to -0.05 | Short bursts with few completions may signal disengagement |
57
+ | `session_depth` | `depth: "shallow"` repeated | -0.03 to -0.05 | Consistently short sessions may signal declining trust |
56
58
 
57
59
  **Neutral signals:**
60
+
58
61
  - `correction` with `category: "tone"` — style preference, not trust signal.
59
62
  - `work_rhythm` with `pattern: "exploratory"` — could go either way; skip unless combined with other signals.
60
63
 
61
64
  ### Step 4: Compute Trust Level
62
65
 
63
66
  **Current level calculation:**
67
+
64
68
  1. Start with existing `currentLevel` (or 0.3 for a new profile — "new" baseline).
65
69
  2. Sum all trust event impacts from new signals.
66
70
  3. Apply decay: events older than 30 days lose 50% of their impact.
@@ -68,12 +72,12 @@ Each signal maps to a trust event with a positive or negative impact.
68
72
 
69
73
  **Level thresholds:**
70
74
 
71
- | Range | Label |
72
- |-------|-------|
73
- | 0.0 - 0.25 | `new` |
74
- | 0.25 - 0.50 | `developing` |
75
+ | Range | Label |
76
+ | ----------- | ------------- |
77
+ | 0.0 - 0.25 | `new` |
78
+ | 0.25 - 0.50 | `developing` |
75
79
  | 0.50 - 0.75 | `established` |
76
- | 0.75 - 1.0 | `deep` |
80
+ | 0.75 - 1.0 | `deep` |
77
81
 
78
82
  ### Step 5: Build Trust Events
79
83
 
@@ -90,6 +94,7 @@ For each signal that produced a trust impact, create a trust event:
90
94
  Classify as builder or breaker based on impact sign.
91
95
 
92
96
  **Observed vs. Reported distinction for trust:**
97
+
93
98
  - All trust signals are **observed**. Trust is never self-reported — it is inferred from behavior.
94
99
  - The operator saying "I trust you" is a `personal_share`, not a trust signal. It would be handled by Subagent C as an identity/philosophy update.
95
100
  - Trust is measured by what the operator does (session length, correction frequency, frustration patterns), not what they say.
@@ -112,6 +117,7 @@ Build the updated `trustModel`:
112
117
  ```
113
118
 
114
119
  **Rules for synthesis:**
120
+
115
121
  - Keep the last 20 builders and 20 breakers (most recent). Older events are summarized into the `currentLevel` calculation but dropped from the arrays to prevent unbounded growth.
116
122
  - When merging with existing data, append new events and trim to 20 per category.
117
123
  - If `currentLevel` drops by more than 0.15 in a single synthesis pass, this is a significant trust event. Log a breaker event summarizing the drop: "Trust declined from X to Y due to repeated frustration/corrections."
@@ -1,9 +1,5 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import {
3
- ITALIAN_CRAFTSPERSON,
4
- PERSONA_TEMPLATES,
5
- createDefaultPersona,
6
- } from './defaults.js';
2
+ import { ITALIAN_CRAFTSPERSON, PERSONA_TEMPLATES, createDefaultPersona } from './defaults.js';
7
3
 
8
4
  describe('ITALIAN_CRAFTSPERSON', () => {
9
5
  it('uses italian-craftsperson template id', () => {