@amoree-code/ocean 2.23.0 → 3.0.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 (380) hide show
  1. package/README.md +46 -53
  2. package/dist/application/clients/bundles.js +1 -1
  3. package/dist/application/clients/client-detect.js +291 -0
  4. package/dist/application/clients/clients.js +104 -25
  5. package/dist/application/clients/desktop-link.js +40 -0
  6. package/dist/application/clients/desktop-watcher.js +6 -4
  7. package/dist/application/clients/hook-trust.js +106 -0
  8. package/dist/application/clients/hooks.js +7 -1
  9. package/dist/application/clients/mcp-schema-cost.js +74 -0
  10. package/dist/application/clients/native.js +38 -2
  11. package/dist/application/clients/registry.js +51 -9
  12. package/dist/application/clients/status.js +7 -2
  13. package/dist/application/gateway/webhook-gateway.js +1 -1
  14. package/dist/application/integrations/charter-copies.js +1 -1
  15. package/dist/application/integrations/engine-entry-repair.js +4 -3
  16. package/dist/application/integrations/skill-auto-sync.js +2 -2
  17. package/dist/application/integrations/skill-filter.js +1 -1
  18. package/dist/application/integrations/skill-router.js +134 -90
  19. package/dist/application/layout/layout-apply.js +1 -1
  20. package/dist/application/layout/workspace-template.js +1 -1
  21. package/dist/application/onboarding/steps.js +121 -30
  22. package/dist/application/profiles/profile-doctor.js +118 -0
  23. package/dist/application/profiles/profile-migration-service.js +208 -0
  24. package/dist/application/profiles/profile-suggestion.js +3 -7
  25. package/dist/application/profiles/profile-upgrade-service.js +98 -86
  26. package/dist/application/pull/history-index.js +1 -1
  27. package/dist/application/pull/project-match.js +3 -3
  28. package/dist/application/pull/pull.js +1 -1
  29. package/dist/application/pull/server-capture.js +92 -9
  30. package/dist/application/scheduler/local-scheduler.js +2 -2
  31. package/dist/application/spend/claude-prices.js +55 -0
  32. package/dist/application/spend/claude-spend.js +365 -0
  33. package/dist/application/uninstall/uninstall.js +25 -3
  34. package/dist/application/upkeep/nightly-upkeep.js +4 -4
  35. package/dist/composition/runtime.js +2 -2
  36. package/dist/infrastructure/desktop/claude-export.js +1 -1
  37. package/dist/infrastructure/desktop/desktop-chat.js +60 -13
  38. package/dist/infrastructure/desktop/indexeddb.js +4 -4
  39. package/dist/infrastructure/desktop/leveldb.js +2 -2
  40. package/dist/infrastructure/filesystem/profile-loader.js +3 -45
  41. package/dist/infrastructure/filesystem/runtime-config-loader.js +1 -1
  42. package/dist/infrastructure/observability/runtime-logger.js +1 -1
  43. package/dist/infrastructure/process/agent-tool-executor.js +3 -3
  44. package/dist/infrastructure/process/process-supervisor.js +1 -1
  45. package/dist/infrastructure/process/service.js +8 -8
  46. package/dist/infrastructure/providers/openai-compatible.js +2 -2
  47. package/dist/infrastructure/providers/provider-invocation.js +1 -1
  48. package/dist/infrastructure/providers/session-facts-completer.js +78 -5
  49. package/dist/interfaces/cli/auth-command.js +2 -2
  50. package/dist/interfaces/cli/brief-command.js +1 -1
  51. package/dist/interfaces/cli/browser-command.js +6 -6
  52. package/dist/interfaces/cli/browser-findings.js +6 -9
  53. package/dist/interfaces/cli/browser-settings.js +10 -10
  54. package/dist/interfaces/cli/capture-command.js +6 -6
  55. package/dist/interfaces/cli/client-test-command.js +3 -3
  56. package/dist/interfaces/cli/clients-command.js +33 -6
  57. package/dist/interfaces/cli/command-aliases.js +56 -0
  58. package/dist/interfaces/cli/command-registry.js +48 -1414
  59. package/dist/interfaces/cli/commands/browser.js +5 -0
  60. package/dist/interfaces/cli/commands/capture.js +19 -0
  61. package/dist/interfaces/cli/commands/catalog.js +9 -0
  62. package/dist/interfaces/cli/commands/client.js +135 -0
  63. package/dist/interfaces/cli/commands/clients.js +33 -0
  64. package/dist/interfaces/cli/commands/connectors.js +14 -0
  65. package/dist/interfaces/cli/commands/context.js +9 -0
  66. package/dist/interfaces/cli/commands/cost.js +15 -0
  67. package/dist/interfaces/cli/commands/daily.js +11 -0
  68. package/dist/interfaces/cli/commands/day.js +25 -0
  69. package/dist/interfaces/cli/commands/dispatch.js +31 -0
  70. package/dist/interfaces/cli/commands/doctor.js +60 -0
  71. package/dist/interfaces/cli/commands/env.js +5 -0
  72. package/dist/interfaces/cli/commands/gateway.js +16 -0
  73. package/dist/interfaces/cli/commands/handoff.js +11 -0
  74. package/dist/interfaces/cli/commands/health.js +17 -0
  75. package/dist/interfaces/cli/commands/hook.js +142 -0
  76. package/dist/interfaces/cli/commands/idea.js +11 -0
  77. package/dist/interfaces/cli/commands/install.js +31 -0
  78. package/dist/interfaces/cli/commands/intent.js +14 -0
  79. package/dist/interfaces/cli/commands/intercept.js +22 -0
  80. package/dist/interfaces/cli/commands/layout.js +11 -0
  81. package/dist/interfaces/cli/commands/lifecycle.js +5 -0
  82. package/dist/interfaces/cli/commands/loop.js +73 -0
  83. package/dist/interfaces/cli/commands/market.js +11 -0
  84. package/dist/interfaces/cli/commands/mcp.js +57 -0
  85. package/dist/interfaces/cli/commands/memory.js +5 -0
  86. package/dist/interfaces/cli/commands/migrate.js +5 -0
  87. package/dist/interfaces/cli/commands/observe.js +11 -0
  88. package/dist/interfaces/cli/commands/obsidian.js +111 -0
  89. package/dist/interfaces/cli/commands/operate.js +7 -0
  90. package/dist/interfaces/cli/commands/policy.js +16 -0
  91. package/dist/interfaces/cli/commands/project.js +207 -0
  92. package/dist/interfaces/cli/commands/repair.js +20 -0
  93. package/dist/interfaces/cli/commands/run.js +52 -0
  94. package/dist/interfaces/cli/commands/schedule.js +58 -0
  95. package/dist/interfaces/cli/commands/service.js +21 -0
  96. package/dist/interfaces/cli/commands/session.js +182 -0
  97. package/dist/interfaces/cli/commands/sessions.js +12 -0
  98. package/dist/interfaces/cli/commands/setup.js +21 -0
  99. package/dist/interfaces/cli/commands/skill.js +159 -0
  100. package/dist/interfaces/cli/commands/tasks.js +10 -0
  101. package/dist/interfaces/cli/commands/update-remove.js +25 -0
  102. package/dist/interfaces/cli/connectors-command.js +150 -0
  103. package/dist/interfaces/cli/context-command.js +39 -3
  104. package/dist/interfaces/cli/cost-command.js +104 -0
  105. package/dist/interfaces/cli/curator-command.js +1 -1
  106. package/dist/interfaces/cli/daily-command.js +7 -1
  107. package/dist/interfaces/cli/desktop-command.js +43 -7
  108. package/dist/interfaces/cli/distill-command.js +7 -2
  109. package/dist/interfaces/cli/express-command.js +1 -1
  110. package/dist/interfaces/cli/failures-command.js +4 -4
  111. package/dist/interfaces/cli/gateway-findings.js +2 -2
  112. package/dist/interfaces/cli/governance-command.js +23 -16
  113. package/dist/interfaces/cli/handoff-command.js +1 -1
  114. package/dist/interfaces/cli/harvest-command.js +2 -2
  115. package/dist/interfaces/cli/help-command.js +53 -169
  116. package/dist/interfaces/cli/hygiene-command.js +1 -1
  117. package/dist/interfaces/cli/idea-command.js +1 -1
  118. package/dist/interfaces/cli/intercept-command.js +8 -7
  119. package/dist/interfaces/cli/interests-command.js +1 -1
  120. package/dist/interfaces/cli/layout-command.js +2 -0
  121. package/dist/interfaces/cli/market-command.js +9 -9
  122. package/dist/interfaces/cli/mcp-gateway-command.js +124 -7
  123. package/dist/interfaces/cli/mcp-probe-command.js +186 -0
  124. package/dist/interfaces/cli/mcp-status-command.js +5 -5
  125. package/dist/interfaces/cli/memory-command.js +41 -7
  126. package/dist/interfaces/cli/migrate-command.js +2 -2
  127. package/dist/interfaces/cli/note-command.js +1 -1
  128. package/dist/interfaces/cli/onboard-command.js +14 -0
  129. package/dist/interfaces/cli/operate-command.js +5 -5
  130. package/dist/interfaces/cli/profiles-command.js +61 -1
  131. package/dist/interfaces/cli/rhythm-command.js +11 -5
  132. package/dist/interfaces/cli/running-server-findings.js +1 -1
  133. package/dist/interfaces/cli/scorecard-command.js +8 -8
  134. package/dist/interfaces/cli/session-facts-command.js +2 -2
  135. package/dist/interfaces/cli/sessions-command.js +145 -0
  136. package/dist/interfaces/cli/setup-command.js +15 -2
  137. package/dist/interfaces/cli/tasks-command.js +63 -13
  138. package/dist/interfaces/cli/telemetry-command.js +4 -4
  139. package/dist/interfaces/cli/uninstall-command.js +1 -1
  140. package/dist/interfaces/cli/week-failures.js +32 -0
  141. package/dist/main.js +12 -0
  142. package/node_modules/@ocean/brain/dist/{infrastructure/brain/brain-index.js → brain-index.js} +2 -2
  143. package/node_modules/@ocean/brain/dist/{brain/brain-markdown.js → brain-markdown.js} +1 -1
  144. package/node_modules/@ocean/brain/dist/{brain/brain-service.js → brain-service.js} +12 -2
  145. package/node_modules/@ocean/brain/dist/memory/brain-dump.js +92 -16
  146. package/node_modules/@ocean/brain/dist/memory/extraction-log.js +125 -0
  147. package/node_modules/@ocean/brain/dist/memory/extraction-retry.js +54 -0
  148. package/node_modules/@ocean/brain/dist/memory/fact-routing.js +44 -1
  149. package/node_modules/@ocean/brain/dist/memory/lesson-activation.js +2 -2
  150. package/node_modules/@ocean/brain/dist/memory/lesson-learning.js +2 -2
  151. package/node_modules/@ocean/brain/dist/memory/lessons.js +1 -1
  152. package/node_modules/@ocean/brain/dist/memory/memory-audit.js +2 -2
  153. package/node_modules/@ocean/brain/dist/memory/memory-harvest.js +1 -1
  154. package/node_modules/@ocean/brain/dist/memory/memory-paths.js +8 -0
  155. package/node_modules/@ocean/brain/dist/memory/memory-review.js +31 -3
  156. package/node_modules/@ocean/brain/dist/memory/memory-trash.js +29 -0
  157. package/node_modules/@ocean/brain/dist/memory/memory-write.js +4 -2
  158. package/node_modules/@ocean/brain/dist/memory/model-narrative.js +2 -2
  159. package/node_modules/@ocean/brain/dist/memory/profile-facts.js +1 -1
  160. package/node_modules/@ocean/brain/dist/memory/routing.json +6 -6
  161. package/node_modules/@ocean/{market/dist/skills → brain/dist/memory}/signal-detection.js +1 -1
  162. package/node_modules/@ocean/brain/dist/{memory → people}/people.js +1 -1
  163. package/node_modules/@ocean/brain/dist/sessions-capture/session-facts.js +625 -0
  164. package/node_modules/@ocean/brain/dist/{memory → sessions-capture}/session-promotion.js +7 -15
  165. package/node_modules/@ocean/brain/dist/{memory → sessions-capture}/session-summary.js +1 -1
  166. package/node_modules/@ocean/brain/dist/sessions-capture/session-triage.js +52 -0
  167. package/node_modules/@ocean/brain/package.json +1 -1
  168. package/node_modules/@ocean/connect/dist/connectors/connector-hub.js +173 -0
  169. package/node_modules/@ocean/{market → connect}/dist/install/default-marketplace.js +6 -2
  170. package/node_modules/@ocean/{market → connect}/dist/install/marketplace-service.js +1 -1
  171. package/node_modules/@ocean/connect/dist/mcp/mcp-gateway.js +987 -0
  172. package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-launch.js +102 -5
  173. package/node_modules/@ocean/{market → connect}/dist/registry/official-registry.js +1 -1
  174. package/node_modules/@ocean/{market → connect}/dist/security/permissions.js +1 -1
  175. package/node_modules/@ocean/{market → connect}/dist/skills/skill-hub.js +104 -6
  176. package/node_modules/@ocean/{market → connect}/package.json +2 -2
  177. package/node_modules/@ocean/context/dist/{context/context-ladder.js → context-ladder.js} +3 -3
  178. package/node_modules/@ocean/context/dist/{context/context-references.js → context-references.js} +5 -4
  179. package/node_modules/@ocean/context/dist/{context/context-cost.js → context-size.js} +6 -6
  180. package/node_modules/@ocean/context/dist/{context/intent-router.js → intent-router.js} +1 -1
  181. package/node_modules/@ocean/context/dist/{context/resource-injection.js → resource-injection.js} +3 -1
  182. package/node_modules/@ocean/context/package.json +1 -1
  183. package/node_modules/@ocean/core/dist/domain/brain/brain-record.js +1 -1
  184. package/node_modules/@ocean/core/dist/domain/capabilities/capability-manifest.js +5 -5
  185. package/node_modules/@ocean/core/dist/domain/connector-entry.js +86 -0
  186. package/node_modules/@ocean/core/dist/domain/context/context.js +1 -1
  187. package/node_modules/@ocean/core/dist/domain/context/project-id.js +8 -2
  188. package/node_modules/@ocean/core/dist/domain/{evidence/evidence.js → evidence.js} +1 -1
  189. package/node_modules/@ocean/core/dist/domain/mcp/memory-contract.js +4 -1
  190. package/node_modules/@ocean/core/dist/domain/ports/brain-index-port.js +1 -1
  191. package/node_modules/@ocean/core/dist/domain/profiles/profile-markdown.js +40 -0
  192. package/node_modules/@ocean/core/dist/domain/profiles/profile-resolution.js +276 -0
  193. package/node_modules/@ocean/core/dist/domain/profiles/profile-selection.js +23 -60
  194. package/node_modules/@ocean/core/dist/domain/profiles/profile-upgrade.js +2 -2
  195. package/node_modules/@ocean/core/dist/domain/profiles/profile.js +66 -6
  196. package/node_modules/@ocean/core/dist/domain/profiles/runtime-config.js +1 -1
  197. package/node_modules/@ocean/core/dist/domain/runs/agent-tools.js +2 -2
  198. package/node_modules/@ocean/core/dist/domain/sessions/session-identity.js +53 -0
  199. package/node_modules/@ocean/core/dist/domain/sessions/session-metadata.js +208 -0
  200. package/node_modules/@ocean/core/dist/domain/{tasks/task-id.js → task-id.js} +2 -2
  201. package/node_modules/@ocean/core/dist/profiles/profile-files.js +57 -0
  202. package/node_modules/@ocean/core/dist/profiles/profile-loader.js +97 -0
  203. package/node_modules/@ocean/core/dist/profiles/project-profile-fill.js +33 -0
  204. package/node_modules/@ocean/core/dist/profiles/session-profile.js +158 -0
  205. package/node_modules/@ocean/core/dist/shared/charter.js +110 -0
  206. package/node_modules/@ocean/core/dist/shared/context-ack.js +1 -1
  207. package/node_modules/@ocean/core/dist/shared/context-triggers.js +67 -0
  208. package/node_modules/@ocean/core/dist/shared/paths.js +6 -6
  209. package/node_modules/@ocean/core/dist/shared/project-legacy.js +232 -0
  210. package/node_modules/@ocean/core/dist/shared/project-manifest.js +308 -0
  211. package/node_modules/@ocean/core/dist/shared/project-names.js +87 -0
  212. package/node_modules/@ocean/core/dist/shared/project-register.js +560 -0
  213. package/node_modules/@ocean/core/dist/shared/project-resolution.js +83 -861
  214. package/node_modules/@ocean/core/dist/shared/repo-signals.js +45 -0
  215. package/node_modules/@ocean/core/dist/shared/task-reference.js +1 -1
  216. package/node_modules/@ocean/core/dist/shared/text-tokens.js +37 -0
  217. package/node_modules/@ocean/core/dist/shared/tool-groups.js +224 -0
  218. package/node_modules/@ocean/core/package.json +4 -1
  219. package/node_modules/@ocean/services/dist/day/day.js +45 -3
  220. package/node_modules/@ocean/services/dist/{distill → day}/distill.js +29 -3
  221. package/node_modules/@ocean/services/dist/{harvest → day}/harvest.js +54 -14
  222. package/node_modules/@ocean/services/dist/{brief → day}/interest-discovery.js +3 -3
  223. package/node_modules/@ocean/services/dist/day/note.js +2 -2
  224. package/node_modules/@ocean/services/dist/{onboarding → day}/onboarding.js +1 -1
  225. package/node_modules/@ocean/services/dist/day/patterns.js +68 -0
  226. package/node_modules/@ocean/services/dist/{curator → health}/curator.js +5 -5
  227. package/node_modules/@ocean/services/dist/{journey → health}/failures.js +7 -5
  228. package/node_modules/@ocean/services/dist/{hygiene → health}/hygiene.js +2 -2
  229. package/node_modules/@ocean/services/dist/{journey → health}/lesson-effect.js +1 -1
  230. package/node_modules/@ocean/services/dist/{scorecard → health}/scorecard.js +3 -3
  231. package/node_modules/@ocean/services/dist/{upkeep → health}/upkeep.js +2 -2
  232. package/node_modules/@ocean/services/dist/{doctor → health}/workspace-doctor.js +57 -17
  233. package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-session.js +1 -1
  234. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/call-ledger.js +3 -0
  235. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/mcp-client.js +19 -3
  236. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/obsidian-server.js +4 -4
  237. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/ocean-server.js +423 -34
  238. package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/conflict-log.js +1 -1
  239. package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/folder-templates.js +8 -5
  240. package/node_modules/@ocean/services/dist/projects/project-doctor.js +173 -0
  241. package/node_modules/@ocean/services/dist/projects/project-snippet.js +9 -0
  242. package/node_modules/@ocean/services/dist/projects/projects-overview.js +2 -2
  243. package/node_modules/@ocean/services/package.json +1 -1
  244. package/node_modules/@ocean/{loop/dist/loops → work/dist/runs}/guard-runtime.js +3 -3
  245. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/memory-knowledge-operations.js +4 -12
  246. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/operation-contract.js +2 -2
  247. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/project-operations.js +2 -1
  248. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/task-operations.js +4 -4
  249. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/write-guard.js +1 -1
  250. package/node_modules/@ocean/{loop → work}/dist/runs/prompt-assembly.js +2 -2
  251. package/node_modules/@ocean/{loop → work}/dist/runs/run-agent.js +4 -4
  252. package/node_modules/@ocean/{loop → work}/dist/runs/tool-loop.js +4 -4
  253. package/node_modules/@ocean/work/dist/sessions/hooks/desktop-facts.js +309 -0
  254. package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-end-hook.js +36 -5
  255. package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-facts-hook.js +144 -14
  256. package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-start-hook.js +129 -12
  257. package/node_modules/@ocean/work/dist/sessions/hooks/start-brief.js +110 -0
  258. package/node_modules/@ocean/work/dist/sessions/hooks/unlinked-warning.js +68 -0
  259. package/node_modules/@ocean/{loop → work}/dist/sessions/session-closeout.js +4 -4
  260. package/node_modules/@ocean/{loop → work}/dist/sessions/session-projects.js +13 -3
  261. package/node_modules/@ocean/work/dist/sessions/session-relink.js +300 -0
  262. package/node_modules/@ocean/{loop → work}/dist/sessions/session-retention.js +1 -1
  263. package/node_modules/@ocean/{loop → work}/dist/tasks/list-tasks.js +7 -2
  264. package/node_modules/@ocean/{loop → work}/dist/tasks/renumber-tasks.js +4 -2
  265. package/node_modules/@ocean/{loop → work}/dist/tasks/session-task.js +2 -2
  266. package/node_modules/@ocean/{loop → work}/dist/tasks/sync-task-prs.js +77 -7
  267. package/node_modules/@ocean/work/dist/tasks/task-git.js +63 -0
  268. package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/task-loop.js +4 -4
  269. package/node_modules/@ocean/{loop → work}/dist/tasks/verification-readiness.js +1 -1
  270. package/node_modules/@ocean/{loop → work}/dist/tasks/verify-task.js +1 -1
  271. package/node_modules/@ocean/{loop → work}/package.json +2 -2
  272. package/ocean-marketplace.json +41 -41
  273. package/package.json +12 -11
  274. package/skills/core/daily-harvest/SKILL.md +1 -1
  275. package/skills/core/ocean-memory/SKILL.md +4 -0
  276. package/skills/core/use-browser/SKILL.md +30 -7
  277. package/skills/index.json +1 -1
  278. package/templates/profiles/default.md +44 -0
  279. package/templates/profiles/developer.md +45 -0
  280. package/templates/profiles/reviewer.md +44 -0
  281. package/templates/profiles/strategist.md +44 -0
  282. package/templates/profiles-v3/analysis.md +16 -0
  283. package/templates/profiles-v3/backend.md +16 -0
  284. package/templates/profiles-v3/base.md +57 -0
  285. package/templates/profiles-v3/code-review.md +16 -0
  286. package/templates/profiles-v3/devops.md +16 -0
  287. package/templates/profiles-v3/docs-office.md +16 -0
  288. package/templates/profiles-v3/frontend.md +16 -0
  289. package/templates/profiles-v3/learning.md +16 -0
  290. package/templates/profiles-v3/marketing-ads.md +16 -0
  291. package/templates/profiles-v3/marketing-content-seo.md +16 -0
  292. package/templates/profiles-v3/ocean-ops.md +16 -0
  293. package/templates/profiles-v3/product-strategy.md +16 -0
  294. package/templates/profiles-v3/qa-testing.md +16 -0
  295. package/templates/profiles-v3/security.md +16 -0
  296. package/templates/workspace/MANIFEST.json +1 -0
  297. package/templates/workspace/charter/core.md +22 -90
  298. package/templates/workspace/charter/policies/README.md +7 -1
  299. package/templates/workspace/charter/policies/claude-code-context.md +6 -1
  300. package/templates/workspace/charter/policies/concise-output.md +5 -0
  301. package/templates/workspace/charter/policies/context.md +5 -0
  302. package/templates/workspace/charter/policies/contracts/task.md +2 -2
  303. package/templates/workspace/charter/policies/git.md +5 -0
  304. package/templates/workspace/charter/policies/graph.md +6 -1
  305. package/templates/workspace/charter/policies/knowledge.md +11 -4
  306. package/templates/workspace/charter/policies/layout.md +23 -0
  307. package/templates/workspace/charter/policies/lifecycle.md +5 -0
  308. package/templates/workspace/charter/policies/memory.md +5 -0
  309. package/templates/workspace/charter/policies/minimal-change.md +5 -0
  310. package/templates/workspace/charter/policies/models.md +5 -0
  311. package/templates/workspace/charter/policies/response.md +5 -0
  312. package/templates/workspace/charter/policies/skill-observer.md +12 -0
  313. package/templates/workspace/charter/policies/stack.md +5 -0
  314. package/templates/workspace/charter/policies/task.md +17 -3
  315. package/templates/workspace/charter/policies/verification.md +5 -0
  316. package/node_modules/@ocean/brain/dist/evidence/verification-report.js +0 -13
  317. package/node_modules/@ocean/brain/dist/memory/daily-narrative.js +0 -142
  318. package/node_modules/@ocean/brain/dist/memory/session-facts.js +0 -283
  319. package/node_modules/@ocean/context/dist/context/context-compression.js +0 -66
  320. package/node_modules/@ocean/loop/dist/hooks/desktop-facts.js +0 -174
  321. package/node_modules/@ocean/loop/dist/operations/task-linker.js +0 -40
  322. package/node_modules/@ocean/loop/dist/sessions/session-pointer.js +0 -133
  323. package/node_modules/@ocean/loop/dist/tasks/task-git.js +0 -28
  324. package/node_modules/@ocean/market/dist/mcp/mcp-gateway.js +0 -533
  325. package/templates/profiles/default.json +0 -51
  326. package/templates/profiles/developer.json +0 -51
  327. package/templates/profiles/reviewer.json +0 -51
  328. package/templates/profiles/strategist.json +0 -51
  329. /package/node_modules/@ocean/brain/dist/{brain/brain-eval.js → brain-eval.js} +0 -0
  330. /package/node_modules/@ocean/brain/dist/{brain/brain-reindex.js → brain-reindex.js} +0 -0
  331. /package/node_modules/@ocean/brain/dist/{capture → sessions-capture}/inbox-sync.js +0 -0
  332. /package/node_modules/@ocean/{market → connect}/dist/adapters/mcp-adapter.js +0 -0
  333. /package/node_modules/@ocean/{market → connect}/dist/adapters/owned-directory.js +0 -0
  334. /package/node_modules/@ocean/{market → connect}/dist/adapters/plugin-adapter.js +0 -0
  335. /package/node_modules/@ocean/{market → connect}/dist/adapters/skill-adapter.js +0 -0
  336. /package/node_modules/@ocean/{market → connect}/dist/capability/adapter.js +0 -0
  337. /package/node_modules/@ocean/{market → connect}/dist/capability/catalog.js +0 -0
  338. /package/node_modules/@ocean/{market → connect}/dist/capability/content-digest.js +0 -0
  339. /package/node_modules/@ocean/{market → connect}/dist/capability/registry.js +0 -0
  340. /package/node_modules/@ocean/{market → connect}/dist/install/lock.js +0 -0
  341. /package/node_modules/@ocean/{market → connect}/dist/install/own-server.js +0 -0
  342. /package/node_modules/@ocean/{market → connect}/dist/mcp/chrome-debugging.js +0 -0
  343. /package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-connection.js +0 -0
  344. /package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-runner.js +0 -0
  345. /package/node_modules/@ocean/{market → connect}/dist/security/description-scan.js +0 -0
  346. /package/node_modules/@ocean/{market → connect}/dist/security/secrets.js +0 -0
  347. /package/node_modules/@ocean/{market → connect}/dist/skills/core-skill-sync.js +0 -0
  348. /package/node_modules/@ocean/context/dist/{context/context-packet.js → context-packet.js} +0 -0
  349. /package/node_modules/@ocean/core/dist/domain/{process/process-events.js → process-events.js} +0 -0
  350. /package/node_modules/@ocean/core/dist/domain/{redaction/redaction.js → redaction.js} +0 -0
  351. /package/node_modules/@ocean/services/dist/{brief → day}/brief.js +0 -0
  352. /package/node_modules/@ocean/services/dist/{express → day}/express.js +0 -0
  353. /package/node_modules/@ocean/services/dist/{brief → day}/source-registry.json +0 -0
  354. /package/node_modules/@ocean/services/dist/{journey → health}/telemetry.js +0 -0
  355. /package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-service.js +0 -0
  356. /package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-task-runner.js +0 -0
  357. /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/mcp-session.js +0 -0
  358. /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/server-version.js +0 -0
  359. /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/tool-registry.js +0 -0
  360. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/inbox-promotion.js +0 -0
  361. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-discovery.js +0 -0
  362. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-ingestion.js +0 -0
  363. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-sync.js +0 -0
  364. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-writer.js +0 -0
  365. /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/operation-scope.js +0 -0
  366. /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/record-io.js +0 -0
  367. /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/record-operations.js +0 -0
  368. /package/node_modules/@ocean/{loop → work}/dist/runs/run-authorization.js +0 -0
  369. /package/node_modules/@ocean/{loop → work}/dist/runs/session-tokens.js +0 -0
  370. /package/node_modules/@ocean/{loop/dist/handoff → work/dist/sessions}/handoff-service.js +0 -0
  371. /package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/lifecycle-hooks.js +0 -0
  372. /package/node_modules/@ocean/{loop/dist/infrastructure/persistence → work/dist/sessions}/session-store.js +0 -0
  373. /package/node_modules/@ocean/{loop/dist/infrastructure/persistence → work/dist/sessions}/session-validator.js +0 -0
  374. /package/node_modules/@ocean/{loop → work}/dist/tasks/archive-tasks.js +0 -0
  375. /package/node_modules/@ocean/{loop → work}/dist/tasks/checkpoint-task.js +0 -0
  376. /package/node_modules/@ocean/{loop → work}/dist/tasks/claim-task.js +0 -0
  377. /package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/iteration-graph.js +0 -0
  378. /package/node_modules/@ocean/{loop → work}/dist/tasks/new-task.js +0 -0
  379. /package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/task-loop-record.js +0 -0
  380. /package/node_modules/@ocean/{loop → work}/dist/tasks/task-verification.js +0 -0
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: devops
4
+ kind: domain
5
+ extends: base
6
+ description: "Engineer for CI/CD, deployment, Docker and hosting."
7
+ role: "engineer for CI/CD, deployment, Docker and hosting"
8
+ triggers: [deploy, deployment, release, ci, pipeline, docker, infra, rollout, render]
9
+ signals: [dockerfile, render, github, dep:wrangler]
10
+ skills: [ship, workspace-health]
11
+ mcp: [render]
12
+ connectors: []
13
+ composio: []
14
+ ---
15
+
16
+ Prefer reversible steps. Ask before touching production, credentials or shared infrastructure.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: docs-office
4
+ kind: domain
5
+ extends: base
6
+ description: "Author of Word, PowerPoint, PDF, Excel and Docs files."
7
+ role: "author of Word, PowerPoint, PDF, Excel and Docs files"
8
+ triggers: [word, docx, powerpoint, pptx, pdf, excel, xlsx, slides, spreadsheet, document]
9
+ signals: []
10
+ skills: [docx, pptx, pdf, xlsx]
11
+ mcp: []
12
+ connectors: ["Claude Docs"]
13
+ composio: []
14
+ ---
15
+
16
+ Match the format asked for. Check the rendered output before calling it done.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: frontend
4
+ kind: domain
5
+ extends: base
6
+ description: "Engineer for React/Next UI, RTL and i18n, responsive layout and animation."
7
+ role: "engineer for React/Next UI, RTL and i18n, responsive layout and animation"
8
+ triggers: [react, next, component, ui, css, tailwind, rtl, responsive, layout, animation, i18n, design]
9
+ signals: [dep:react, dep:next, dep:tailwindcss, dep:vite]
10
+ skills: [responsive-craft, design-taste-frontend, frontend-review, mobile-responsiveness, visual-diff, gsap-framer-scroll-animation, animation-stack-integration, 3d-web-experience]
11
+ mcp: [ocean-uiux, chrome-devtools]
12
+ connectors: []
13
+ composio: []
14
+ ---
15
+
16
+ Mind RTL and both locales. Reuse the project's components before writing new ones. Check the result at mobile and desktop widths.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: learning
4
+ kind: domain
5
+ extends: base
6
+ description: "Coach for IELTS, English and study-abroad work."
7
+ role: "coach for IELTS, English and study-abroad work"
8
+ triggers: [ielts, english, study, university, scholarship, vocabulary, speaking, "writing task"]
9
+ signals: []
10
+ skills: [research]
11
+ mcp: []
12
+ connectors: []
13
+ composio: []
14
+ ---
15
+
16
+ Correct gently and explain why. Keep Arabic text in its own block, apart from English.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: marketing-ads
4
+ kind: domain
5
+ extends: base
6
+ description: "Paid-ads specialist for Meta, Google, LinkedIn and Reddit."
7
+ role: "paid-ads specialist for Meta, Google, LinkedIn and Reddit"
8
+ triggers: [ads, campaign, "meta ads", facebook, instagram, ctr, cpm, roas, retargeting, creative, audience]
9
+ signals: []
10
+ skills: [meta-ads-audit, google-ads-audit, linkedin-ads-audit, reddit-ads-audit, ad-spend-allocator, creative-fatigue-detection, audience-overlap-analysis, frequency-cap-recommendations, retargeting-window-analysis, ab-test-analyzer, utm-tracking-generator, competitor-creative-analysis]
11
+ mcp: []
12
+ connectors: [Meta]
13
+ composio: [metaads, facebook, instagram]
14
+ ---
15
+
16
+ Never change a live budget or launch a campaign without asking. Start from an audit skill and show the numbers behind each recommendation.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: marketing-content-seo
4
+ kind: domain
5
+ extends: base
6
+ description: "Content and SEO specialist for landing pages, email and programmatic SEO."
7
+ role: "content and SEO specialist for landing pages, email and programmatic SEO"
8
+ triggers: [seo, content, email, "landing page", keyword, blog, copy, newsletter, programmatic]
9
+ signals: []
10
+ skills: [programmatic-seo-builder, programmatic-seo-playbook, e2e-seo-assistant, content-repurposer, email-sequence-writer, landing-page-audit-39, icp-research-assistant, competitor-teardown]
11
+ mcp: []
12
+ connectors: []
13
+ composio: []
14
+ ---
15
+
16
+ Name the audience and the one action each page should drive. Cite sources for claims and numbers.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: ocean-ops
4
+ kind: domain
5
+ extends: base
6
+ description: "Maintainer of Ocean itself: memory, tasks, harvest and reviews."
7
+ role: "maintainer of Ocean itself: memory, tasks, harvest and reviews"
8
+ triggers: [harvest, inbox, memory, "weekly review", "session end", "day start", "work pull", register, ocean]
9
+ signals: [graphify-out]
10
+ skills: [daily-harvest, memory-review, weekly-review, day-start, session-end, work-pull, project-register, project-init, graphify]
11
+ mcp: [ocean]
12
+ connectors: []
13
+ composio: []
14
+ ---
15
+
16
+ Ocean is the authority for memory. Never delete; archive. Record durable facts only.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: product-strategy
4
+ kind: domain
5
+ extends: base
6
+ description: "Planner for specs, business rules and roadmaps."
7
+ role: "planner for specs, business rules and roadmaps"
8
+ triggers: [plan, spec, requirements, roadmap, strategy, proposal, architecture, decide]
9
+ signals: []
10
+ skills: [business-logic, design-thinking, grilling, planning-with-files]
11
+ mcp: []
12
+ connectors: [Atlassian]
13
+ composio: []
14
+ ---
15
+
16
+ Make rules, states and exceptions explicit. Ask the one question that unblocks the decision.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: qa-testing
4
+ kind: domain
5
+ extends: base
6
+ description: "Tester for end-to-end and unit tests and browser QA."
7
+ role: "tester for end-to-end and unit tests and browser QA"
8
+ triggers: [test, testing, regression, reproduce, flaky, coverage, e2e, qa]
9
+ signals: [dep:vitest, dep:jest, dep:playwright, dep:cypress]
10
+ skills: [webapp-testing, vitest, javascript-typescript-jest, use-browser, visual-diff, verification]
11
+ mcp: [chrome-devtools]
12
+ connectors: []
13
+ composio: []
14
+ ---
15
+
16
+ Reproduce first, then fix. Report what ran and what was only assumed.
@@ -0,0 +1,16 @@
1
+ ---
2
+ schemaVersion: 3
3
+ name: security
4
+ kind: domain
5
+ extends: base
6
+ description: "Security auditor."
7
+ role: "security auditor"
8
+ triggers: [security, privacy, secret, vulnerability, vulnerable, auth, authorization, permission, leak]
9
+ signals: []
10
+ skills: [verification]
11
+ mcp: []
12
+ connectors: []
13
+ composio: []
14
+ ---
15
+
16
+ Never print a secret value; report key names only. Prefer evidence over suspicion and rank findings.
@@ -49,6 +49,7 @@
49
49
  "charter/policies/git.md": "default",
50
50
  "charter/policies/graph.md": "default",
51
51
  "charter/policies/knowledge.md": "default",
52
+ "charter/policies/layout.md": "default",
52
53
  "charter/policies/lifecycle.md": "default",
53
54
  "charter/policies/memory.md": "default",
54
55
  "charter/policies/minimal-change.md": "default",
@@ -1,104 +1,36 @@
1
1
  # Global rules
2
2
 
3
- Canonical source: `charter/`. Shared by every AI client on this machine, and rendered into each
4
- client's system prompt — so **everything here is paid for on every request of every session.**
5
- It is a bootstrap and a router, nothing more.
3
+ Bootstrap only: paid on every request of every client. Detail is routed, not inlined —
4
+ `ocean policy list`, `ocean policy <name>`, or `ocean_context` with `policy` (the prompt hook
5
+ names the one that applies).
6
6
 
7
- Conditional detail lives in `charter/policies/` and is read when it applies:
8
-
9
- ```bash
10
- ocean policy list # what exists, and when each applies
11
- ocean policy <name> # print one
12
- ```
13
-
14
- | Load | When |
15
- | ---------------------- | --------------------------------------------------------------------- |
16
- | `task` | starting, checkpointing or completing a unit of work |
17
- | `context` | deciding what to read, how much, and when to stop |
18
- | `lifecycle` | continuing, checkpointing, compacting, restarting cold or handing off |
19
- | `memory` · `knowledge` | recording or retrieving a durable fact, or what past work taught |
20
- | `git` | anything beyond reading git state |
21
- | `models` | choosing a model or an effort level, or delegating |
22
- | `concise-output` | producing any response |
23
- | `minimal-change` | writing new code, or adding a file/dependency |
24
- | `skill-observer` | a checkpoint, a handoff, or session end |
25
- | `verification` | proving a change works |
26
- | `response` | a substantial report |
27
- | `graph` | navigating an unfamiliar or large tree |
28
- | `stack` | choosing libraries or scaffolding a project |
29
-
30
- ## Who you are working with
31
-
32
- **<owner name>** — use this exact spelling in anything that carries the owner's name. Everything
33
- else about the owner (role, domain, constraints) is in `02-personal/MEMORY.md`, the index: read
34
- it, then only the sections the task touches. Never the whole store.
7
+ **<owner name>** — use this exact spelling in anything that carries the owner's name. Facts
8
+ about the owner: `02-personal/MEMORY.md`, index first.
35
9
 
36
10
  ## Language
37
11
 
38
12
  <reply language, and any script-direction or formatting rule that is a correctness constraint>
39
13
 
40
- ## Working style
41
-
42
- Direct, no preamble; infer intent from rough phrasing; ask **one** question at a time.
43
- Non-trivial or irreversible work gets a one-line plan first, then wait — a one-line fix just gets
44
- done. **Say what was verified versus assumed, separately** (verified = you ran the check,
45
- assumed = a reasonable assumption) — never claim a test passed without running it. Detail on
46
- output shape and code-change discipline: `ocean policy concise-output`,
47
- `ocean policy minimal-change`.
48
-
49
- ## Minimum sufficient context
50
-
51
- **Storage is not context. Never read a whole repository into context.** Load in layers, stop as
52
- soon as you can act, expand on evidence when confidence is low — under-reading is a correctness
53
- failure and outranks every budget. Detail and commands: `ocean policy context`,
54
- `ocean policy lifecycle`.
55
-
56
14
  ## Authority — the hard boundaries
57
15
 
58
- These never depend on another file having been read.
59
-
60
- - **`git push` requires explicit approval, every time, on every repo.** Never push to `main` —
61
- branch first, everything lands via pull request. A PR merge needs an explicit instruction from
62
- the owner naming the merge. Silence, a prior approval from a different request, or inferring
63
- intent from context does not count. Never close a PR, force push, or rewrite pushed history
64
- unless asked by name.
65
- - **Any AI client doing real work on a task works on its own branch — never directly on
66
- `main`.** Branch at the start of the work. When that work is done, a PR is opened for it (still
67
- under the push-approval rule above). Merge stays the owner's call, always.
68
- - **Real work worth doing gets a task before it starts**, in `04-projects/<project>/tasks/<ID>/`
69
- — not just recorded in a daily log or a commit message after the fact. See `ocean policy task`.
70
- - **Git exists only in the kernel checkout.** Everything else in the workspace is local files:
71
- edit them, never commit them. Copying any private data into the kernel needs approval each time.
16
+ - **`git push` needs explicit approval, every time, every repo.** Never push to `main`;
17
+ everything lands via pull request. A merge needs the owner's instruction naming it; it covers only
18
+ the PR(s) named. Never close a PR, force push or rewrite pushed history unless asked by name.
19
+ Exception: a `/ship` mission the owner launched may push its own feature branches and open PRs —
20
+ never `main`, never force, never merge.
21
+ - **Real work happens on its own branch**, from the start, and lands via PR.
22
+ - **A task is opened only when the owner asks, or the work spans sessions**
23
+ (`04-projects/<category>/<project>/tasks/<ID>/`); a side finding is one line in
24
+ `04-projects/backlog.md`.
25
+ - **One repo at `~/ocean`; only `kernel/` is committed.** Workspace files are local: edit them,
26
+ never commit or mention committing them. Widening the whitelist, `git add -f`, or copying
27
+ private data into `kernel/` needs approval each time.
72
28
  - **Ask before:** deleting files or projects, database drops or migrations, force push,
73
- rewriting pushed history, changing SSH keys or credentials, installing global software, and
74
- anything irreversible. Rebasing local unpushed work is not in this list.
75
- - Reading git state, committing, branching and stashing locally are free.
29
+ rewriting pushed history, changing SSH keys or credentials, installing global software,
30
+ anything irreversible. Reading git state, committing, branching, stashing: free.
31
+ - **No subagents** unless the owner asks for one by name in that message.
76
32
 
77
33
  ## Security
78
34
 
79
- - Never write a secret, token, API key, password or connection string into any file, any
80
- markdown, any generated config, or any commit.
81
- - When inspecting `.env`, report **key names only** — never echo a value.
82
- - Secrets belong in the platform, the OS keychain, or environment variables — never in a config
83
- file that could be committed or synced.
84
-
85
- ## Where things live
86
-
87
- | | |
88
- | ----------------------------------------- | --------------------------------------------------------------- |
89
- | what is true about the owner | `02-personal/` — index first |
90
- | what work taught us | `05-knowledge/` — check `decisions/` before contradicting one |
91
- | what we are working on | `04-projects/<project>/tasks/<ID>/` — the task is authoritative |
92
- | a project's references · lessons | `04-projects/<project>/docs/` · `memory/` — never its root |
93
- | what happened in one sitting | `sessions/` |
94
- | the rules and config shaping every client | `charter/` (incl. `policies/`), `bridge/config/` |
95
-
96
- **The task declares its own status, and nothing else does.** Every other view of it is
97
- generated; `ocean tasks doctor` fails when one has drifted.
98
-
99
- ## Model routing
100
-
101
- Use the default model for most work; do not ask which model to use. Prefer deterministic tools
102
- over a model where they answer reliably. Delegate to subagents only when the owner asks for it.
103
-
104
- Detail: `ocean policy models`.
35
+ Never write a secret, token, API key, password or connection string into any file or commit.
36
+ `.env`: report key names only. Secrets live in the platform, the keychain or env vars.
@@ -28,4 +28,10 @@ ocean policy list # what exists, and when each applies
28
28
  | `stack.md` | choosing libraries or scaffolding a project |
29
29
 
30
30
  A module states what must be true. It never states how one client implements it — that is
31
- the adapter's, and lives in the public repo.
31
+ the adapter's, and lives in the public repo.
32
+ ## Frontmatter (T-339)
33
+
34
+ Every policy opens with `triggers:` (English words, or Iraqi Arabic phrases matched as
35
+ substrings) and a `digest:` of at most 200 bytes. The prompt hook adds the digest of at most
36
+ two matching policies to a prompt, once per session; `ocean policy validate` fails on a policy
37
+ without them.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["claude code", "hook", "settings.json", "slash command", "skill file"]
3
+ digest: "Claude Code detail: tech stack, task loop, memory schema and graph use beyond the bootstrap; read when working on the client itself."
4
+ ---
5
+
1
6
  # Claude Code — extended context
2
7
 
3
8
  Claude-Code-specific detail beyond `governance/rules/core.md`. Loaded on demand via
@@ -66,7 +71,7 @@ Four kinds of context, kept distinct:
66
71
  | | Answers | Lives | Lifespan |
67
72
  |---|---|---|---|
68
73
  | **Memory** | what is true about the owner and their world | `02-personal/<section>/` | years |
69
- | **Knowledge** | what work taught us that saves effort next time | `05-knowledge/<kind>/` | until superseded |
74
+ | **Knowledge** | what work taught us that saves effort next time | `05-knowledge/<decisions|lessons>/` | until superseded |
70
75
  | **Session** | what we are doing right now | `.ai/tasks/current.md`, `sessions/` | one session |
71
76
  | **Daily** | what happened today | `01-daily/YYYY-MM-DD.md` | one day |
72
77
 
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["concise", "shorter", "too long", "summary", "اختصر", "مختصر", "طويل"]
3
+ digest: "Answer first, no preamble or recap; cut filler; one question at a time; length follows what the reader needs."
4
+ ---
5
+
1
6
  # Policy — concise output
2
7
 
3
8
  Load when producing any response: a chat reply, a report, a checkpoint note.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["what to read", "how much context", "read the repo", "explore", "اقرا", "سياق"]
3
+ digest: "Storage is not context: load in layers, stop once you can act, expand on evidence; under-reading is a failure."
4
+ ---
5
+
1
6
  # Policy — context admission
2
7
 
3
8
  Load when deciding what to read, how much of it, and when to stop.
@@ -208,7 +208,7 @@ Two tests decide, in order:
208
208
  materially worse off without this file? If the answer is "it might be nice", the
209
209
  answer is no.
210
210
  2. **Does it belong to the task, or to the world?** Task-specific → the task directory.
211
- Reusable beyond this task → `05-knowledge/<kind>/` instead, and the task links
211
+ Reusable beyond this task → `05-knowledge/<decisions|lessons>/` instead, and the task links
212
212
  to it. Durable fact about the user → `02-personal/`.
213
213
 
214
214
  Test 2 is the one that keeps task directories small. A finding worth keeping is almost
@@ -225,7 +225,7 @@ When a task reaches `done`:
225
225
 
226
226
  1. `ocean tasks verify <ID>` has run, and the task carries `verified: yes` (or `partial`)
227
227
  with its `evidence` ids — `ocean tasks doctor` fails a `done` task without them.
228
- 2. Each artifact is resolved once — promoted to `05-knowledge/<kind>/` if reusable,
228
+ 2. Each artifact is resolved once — promoted to `05-knowledge/<decisions|lessons>/` if reusable,
229
229
  left with the task if not. Nothing is copied to both places.
230
230
  3. `state: done`, `updated:` bumped, the index line updated.
231
231
  4. The task moves to `archive/<ID>/` when it stops being live context.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["commit", "branch", "push", "merge", "pull request", "rebase", "stash", "كومت", "بوش", "دمج", "فرع"]
3
+ digest: "Local git is free; push needs approval each time; never main; land via PR; merge only on an explicit instruction naming it."
4
+ ---
5
+
1
6
  # Policy — git
2
7
 
3
8
  Load for anything beyond reading git state. The hard remote boundary is in the bootstrap
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["graph", "unfamiliar code", "large repo", "where is", "codebase map", "وين موجود"]
3
+ digest: "Graph explains, files decide, tests prove: ask the graph for where to look, then open the real file at the span."
4
+ ---
5
+
1
6
  # Policy — Graph Brain
2
7
 
3
8
  Load when navigating an unfamiliar or large tree. Graph Brain is an **accelerator, not a
@@ -44,4 +49,4 @@ Derived, never authoritative: rebuilt on demand, gitignored, never edited, never
44
49
  never published. It may suggest a relevant skill, capability or record, but the real record
45
50
  must still be read and the task's approval gates still apply.
46
51
 
47
- Detail: `05-knowledge/architecture/ocean-graph-brain.md`.
52
+ Detail: `05-knowledge/decisions/ocean-graph-brain.md`.
@@ -1,17 +1,24 @@
1
+ ---
2
+ triggers: ["lesson", "decision", "what we learned", "postmortem", "درس", "قرار"]
3
+ digest: "Knowledge is what work taught: check 05-knowledge/decisions before contradicting one; write once, dedupe, link."
4
+ ---
5
+
1
6
  # Policy — knowledge
2
7
 
3
8
  Load when recording or retrieving what past work taught.
4
9
 
5
10
  **Knowledge answers: what did work teach us that saves effort next time.** Lifespan: until
6
- superseded. `~/ocean/05-knowledge/<kind>/`.
11
+ superseded. `~/ocean/05-knowledge/<decisions|lessons>/`.
7
12
 
8
13
  Knowledge exists to **cut tokens**: retrieving one compact entry beats re-reading old files
9
14
  and re-deriving what was already established.
10
15
 
11
- ## Kinds
16
+ ## Folders
12
17
 
13
- `task-results/` · `technical-solutions/` · `decisions/` · `architecture/` · `research/` ·
14
- `discoveries/` · `failures/`
18
+ Two (T-329 phase 4): `decisions/` — what was chosen and why, architecture included — and
19
+ `lessons/` — everything work taught: fixes, discoveries, failures, results, research. A
20
+ lesson record says what it was born as in `kind:` (solution · discovery · failure · result ·
21
+ research). Project references belong in `04-projects/<category>/<project>/docs/`.
15
22
 
16
23
  ## Before investigating
17
24
 
@@ -0,0 +1,23 @@
1
+ ---
2
+ triggers: ["where is", "where do", "which folder", "file location", "وين احط", "وين", "مجلد"]
3
+ digest: "Where things live: 02-personal facts, 05-knowledge lessons, 04-projects tasks, sessions/, charter rules; workspace files stay local."
4
+ ---
5
+
6
+ # Policy — where things live
7
+
8
+ Load when deciding where a file, fact or note goes, or where to look for one.
9
+
10
+ | | |
11
+ | ----------------------------------------- | -------------------------------------------------------------------------- |
12
+ | what is true about the owner | `02-personal/` — index first |
13
+ | what work taught us | `05-knowledge/` — check `decisions/` before contradicting one |
14
+ | what we are working on | `04-projects/<category>/<project>/tasks/<ID>/` — the task is authoritative |
15
+ | a project's references · lessons | `04-projects/<category>/<project>/docs/` · `memory/` — never its root |
16
+ | what happened in one sitting | `sessions/` |
17
+ | the rules and config shaping every client | `charter/` (incl. `policies/`), `bridge/config/` |
18
+
19
+ **The task declares its own status, and nothing else does.** Every other view of it is
20
+ generated; `ocean tasks doctor` fails when one has drifted. Per-provider context injection:
21
+ `bridge/integrations/context-injection.md`.
22
+
23
+ Workspace folders are local: only `kernel/` is committed.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["compact", "checkpoint", "restart", "hand off", "continue later", "context full", "كمل بعدين", "تسليم"]
3
+ digest: "Durable state on disk, not in context: checkpoint before compacting; restarting is the owner's move; state what you cannot know."
4
+ ---
5
+
1
6
  # Policy — the context lifecycle
2
7
 
3
8
  Load when deciding whether this session should keep going.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["remember", "my preference", "about me", "forget", "تذكر", "احفظ", "عني"]
3
+ digest: "Memory is what is true about him: one home per fact, read the index first, never load everything, never store secrets."
4
+ ---
5
+
1
6
  # Policy — memory
2
7
 
3
8
  Load when recording or retrieving a durable fact about the owner.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["new file", "add dependency", "refactor", "abstraction", "new package", "ملف جديد", "مكتبه"]
3
+ digest: "Smallest change that works: reuse before adding; a new file, dependency or abstraction needs a reason; never cut tests."
4
+ ---
5
+
1
6
  # Policy — minimal change
2
7
 
3
8
  Load before writing new code, and before proposing a new file, dependency, or abstraction.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["which model", "effort", "delegate", "subagent", "opus", "sonnet", "موديل", "وكيل"]
3
+ digest: "Deterministic tools first; Sonnet by default; effort follows the task's class; no subagents unless asked by name."
4
+ ---
5
+
1
6
  # Policy — model and effort routing
2
7
 
3
8
  Load when choosing a model, choosing an effort level, or delegating.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["report", "write up", "status update", "تقرير", "شنو صار"]
3
+ digest: "Reports use labelled lines: Done, Verified, Not verified, Next (one step, a question when it needs his yes)."
4
+ ---
5
+
1
6
  # Policy — response format
2
7
 
3
8
  Load when writing a substantial reply or a report.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["session end", "skill signal", "improve skill", "نهايه الجلسه"]
3
+ digest: "At a checkpoint or session end only: note a skill signal in one line; never rewrite a skill file automatically."
4
+ ---
5
+
1
6
  # Policy — skill observation
2
7
 
3
8
  Load at a checkpoint, a handoff, or session end (`ocean policy lifecycle`) — never
@@ -31,6 +36,13 @@ the session:
31
36
  task's own checkpoint note (`ocean tasks checkpoint <ID> --note "..."`), or the
32
37
  session record if there is no task
33
38
 
39
+ ## Profile routing — at session end only
40
+
41
+ Run `ocean profiles doctor`. It reads the profile selection log and prints each repeated
42
+ routing miss with a `suggest:` line: a trigger to add to a profile, or a profile to bind to
43
+ a project. Offer each suggestion to the owner in one line and apply it only on his explicit
44
+ yes, as an ordinary edit of that profile or `project.json`. No findings ⇒ say nothing.
45
+
34
46
  ## What this never does
35
47
 
36
48
  - **Never rewrites a skill file automatically.** An observation is a candidate for a human
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["scaffold", "which library", "new project", "setup project", "مشروع جديد", "مكتبه"]
3
+ digest: "pnpm, Node 22 LTS via fnm, TypeScript strict; prefer the stack's defaults over a new library."
4
+ ---
5
+
1
6
  # Policy — technical defaults
2
7
 
3
8
  Load when choosing libraries or scaffolding a project.
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["task", "ticket", "start work", "done", "backlog", "تاسك", "مهمه", "تكت", "خلصت"]
3
+ digest: "The task declares its own status; open one only when asked or work spans sessions; completion is verification passing."
4
+ ---
5
+
1
6
  # Policy — the task loop
2
7
 
3
8
  Load when starting, checkpointing or completing a unit of work.
@@ -48,7 +53,7 @@ States: `todo` · `active` · `in-qa` · `paused` · `blocked` · `done` · `can
48
53
  being `active` is normal. `in-qa`: built and its PR is open, waiting on test or review; it
49
54
  moves to `done` once the PR merges and verification passed, or back to `active` on a fix.
50
55
  `ocean tasks sync` moves it by itself from the PR links in the task (session start runs it):
51
- an open PR → `in-qa`; every linked PR merged → `done` through the `tasks complete` gate, or it
56
+ an open PR → `in-qa` (found by itself from a PR title or branch carrying the task id or Jira key; no `artifacts:` link needed); a `todo` task whose branch is ahead of its base → `active`; every linked PR merged → `done` through the `tasks complete` gate, or it
52
57
  stays `in-qa` with the reason when the gate refuses. There is no current task and no stored pointer to one — the active
53
58
  set is derived from the records. A bare id resolves directly at
54
59
  `04-projects/<project>/tasks/<ID>/` (`ocean-paths` was a resolver in an earlier CLI
@@ -57,6 +62,15 @@ projects ever claim the same id, that is a conflict to resolve by hand, not to m
57
62
 
58
63
  Contract: `internal/schemas/task.md`.
59
64
 
65
+ ## Phases — one task, one branch, one PR
66
+
67
+ A task with several pieces of work lands them all on **one branch in one PR**, never a PR per
68
+ piece. List the pieces in the task under `## Phases` as checkboxes (`- [ ] schema`,
69
+ `- [x] endpoint`) and tick each as it lands. While any box is unticked the task stays `active`,
70
+ even with its PR open; `ocean tasks sync` moves it to `in-qa` only once every phase is ticked
71
+ (and back to `active` if a phase is added later). A task with no `## Phases` section behaves as
72
+ before.
73
+
60
74
  ## Claims — more than one session at once
61
75
 
62
76
  Sessions share one disk and know nothing of each other, so two on the same task overwrite
@@ -64,7 +78,7 @@ each other silently. Before editing, **claim the task**; the claim is advisory a
64
78
  the task's own frontmatter (`claimed_by`, `claimed_at`, optional `claimed_paths`).
65
79
 
66
80
  ```bash
67
- ocean tasks claim <ID> --by <your-session-name> [--paths kernel,packages/harness/src]
81
+ ocean tasks claim <ID> --by <your-session-name> [--paths kernel,packages/cli/src]
68
82
  ocean tasks release <ID> --by <your-session-name> # when you stop, hand off or finish
69
83
  ```
70
84
 
@@ -101,7 +115,7 @@ the same three fields by hand.)
101
115
 
102
116
  1. **Is it needed?** Would a future session be materially worse off without it?
103
117
  "It might be nice" means no.
104
- 2. **Task, or world?** Reusable beyond this task → `05-knowledge/<kind>/` instead,
118
+ 2. **Task, or world?** Reusable beyond this task → `05-knowledge/<decisions|lessons>/` instead,
105
119
  and the task links to it.
106
120
 
107
121
  | Artifact | Written when |
@@ -1,3 +1,8 @@
1
+ ---
2
+ triggers: ["verify", "test", "prove", "does it work", "check it", "تاكد", "اختبر", "جرب"]
3
+ digest: "Executed is not verified: run the check that proves the claim; say what was verified and what was assumed, separately."
4
+ ---
5
+
1
6
  # Policy — verification
2
7
 
3
8
  Load when proving a change works.
@@ -1,13 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import { evidenceSchema, } from "@ocean/core/domain/evidence/evidence.js";
3
- export function buildVerificationReport(records) {
4
- const evidence = records.map((record) => evidenceSchema.parse(record));
5
- const proven = evidence.filter((record) => record.result === "proven");
6
- const notProven = evidence.filter((record) => record.result === "not_proven");
7
- const limitations = evidence.filter((record) => record.result === "limitation");
8
- const fingerprint = createHash("sha256")
9
- .update(JSON.stringify({ proven, notProven, limitations }))
10
- .digest("hex");
11
- return { proven, notProven, limitations, fingerprint };
12
- }
13
- //# sourceMappingURL=verification-report.js.map