@amoree-code/ocean 2.1.1 → 2.2.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 (30) hide show
  1. package/README.md +2 -2
  2. package/dist/interfaces/cli/capture-command.js +3 -1
  3. package/dist/interfaces/cli/command-registry.js +20 -2
  4. package/dist/interfaces/cli/setup-command.js +18 -2
  5. package/node_modules/@ocean/brain/dist/brain/brain-reindex.js +6 -2
  6. package/node_modules/@ocean/brain/dist/brain/brain-service.js +3 -1
  7. package/node_modules/@ocean/brain/dist/memory/frontmatter-flatten.js +5 -2
  8. package/node_modules/@ocean/brain/dist/memory/index-sync.js +5 -2
  9. package/node_modules/@ocean/brain/dist/memory/memory-write.js +5 -3
  10. package/node_modules/@ocean/brain/dist/memory/routing.json +1 -1
  11. package/node_modules/@ocean/brain/package.json +1 -1
  12. package/node_modules/@ocean/context/package.json +1 -1
  13. package/node_modules/@ocean/core/dist/shared/paths.js +12 -3
  14. package/node_modules/@ocean/core/dist/shared/project-resolution.js +30 -0
  15. package/node_modules/@ocean/core/package.json +1 -1
  16. package/node_modules/@ocean/loop/package.json +1 -1
  17. package/node_modules/@ocean/market/package.json +1 -1
  18. package/node_modules/@ocean/services/dist/doctor/workspace-doctor.js +16 -4
  19. package/node_modules/@ocean/services/dist/infrastructure/mcp/ocean-server.js +1 -1
  20. package/node_modules/@ocean/services/package.json +1 -1
  21. package/ocean-marketplace.json +36 -36
  22. package/package.json +7 -7
  23. package/skills/core/daily-harvest/SKILL.md +1 -1
  24. package/skills/core/weekly-review/SKILL.md +8 -4
  25. package/skills/index.json +2 -2
  26. package/templates/workspace/06-templates/TEMPLATES.md +1 -1
  27. package/templates/workspace/06-templates/note.md +1 -0
  28. package/templates/workspace/MANIFEST.json +1 -2
  29. package/templates/workspace/07-notes/.gitkeep +0 -0
  30. /package/templates/workspace/02-personal/{preferences → notes}/.gitkeep +0 -0
package/README.md CHANGED
@@ -227,8 +227,8 @@ you wrote it. `ocean skill sync` still does the core skills by hand.
227
227
  ```text
228
228
  ~/ocean/ private workspace (OCEAN_ROOT) — local only, never published
229
229
  ├── 00-inbox/ … 06-templates/ your records: inbox, daily, personal, professional,
230
- │ projects, knowledge, templates
231
- ├── 07-notes/ your own notes: agents read them, never write them
230
+ │ projects, knowledge, templates; your own notes in
231
+ │ 02-personal/notes/ — agents read them, never write them
232
232
  ├── charter/ your rules and the policies they route to
233
233
  └── bridge/ machine state: sessions, config, client integrations, shims
234
234
 
@@ -5,7 +5,7 @@ import { syncCaptureInbox } from "@ocean/brain/capture/inbox-sync.js";
5
5
  import { syncMemoryIndexes } from "@ocean/brain/memory/index-sync.js";
6
6
  import { validateSessionEntryContract } from "@ocean/core/domain/sessions/entry-contract.js";
7
7
  import { localDate } from "@ocean/core/shared/local-date.js";
8
- import { KNOWLEDGE_DIR, oceanPath, oceanRoot, PERSONAL_DIR, PROJECTS_DIR, WORKSPACE_PROJECT_ID, } from "@ocean/core/shared/paths.js";
8
+ import { isUnderNotes, KNOWLEDGE_DIR, NOTES_DIR, oceanPath, oceanRoot, PERSONAL_DIR, PROJECTS_DIR, WORKSPACE_PROJECT_ID, } from "@ocean/core/shared/paths.js";
9
9
  import { openSessionStore } from "@ocean/loop/infrastructure/persistence/session-store.js";
10
10
  import { sessionProjectId } from "@ocean/loop/sessions/session-projects.js";
11
11
  import { redactRuntimeText } from "../../infrastructure/observability/runtime-logger.js";
@@ -96,6 +96,8 @@ async function promote(item, target = "knowledge/results") {
96
96
  const memoryRoot = path.resolve(oceanPath(PERSONAL_DIR)) + path.sep;
97
97
  if (!file.startsWith(memoryRoot))
98
98
  throw new Error(`Memory target must stay inside ${PERSONAL_DIR}.`);
99
+ if (isUnderNotes(file))
100
+ throw new Error(`${NOTES_DIR}/ is the owner's own notes; a capture is never appended there.`);
99
101
  const header = `\n\n## Captured note — ${localDate()}\n\n${item.content.trim()}\n\n_Source: session-capture-${item.captureId}; review status: unverified._\n`;
100
102
  await appendFile(file, header);
101
103
  await syncMemoryIndexes(true);
@@ -7,7 +7,7 @@ import { promoteSessionToKnowledge } from "@ocean/brain/memory/session-promotion
7
7
  import { classifyIntent } from "@ocean/context/context/intent-router.js";
8
8
  import { resolveProfileName } from "@ocean/core/domain/profiles/runtime-config.js";
9
9
  import { oceanEnv, oceanPath, oceanRoot, SYSTEM_DIR, } from "@ocean/core/shared/paths.js";
10
- import { autoRegisterProject, bindProject, findGitRoot, knownTaskPrefixes, listProjectBindings, migrateProjectBindings, moveProject, PROJECT_CATEGORIES, projectCategory, renameProject, renderProjectIndex, resolveProject, scanProjectManifests, unbindProjectPath, writeProjectIndex, } from "@ocean/core/shared/project-resolution.js";
10
+ import { autoRegisterProject, bindProject, createProject, findGitRoot, knownTaskPrefixes, listProjectBindings, migrateProjectBindings, moveProject, PROJECT_CATEGORIES, projectCategory, renameProject, renderProjectIndex, resolveProject, scanProjectManifests, unbindProjectPath, writeProjectIndex, } from "@ocean/core/shared/project-resolution.js";
11
11
  import { claudeSessionEndHook, isSessionEndClient, SESSION_END_CLIENTS, } from "@ocean/loop/hooks/session-end-hook.js";
12
12
  import { isSessionStartClient, readBoundedStdin, SESSION_START_CLIENTS, sessionStartHookForClient, } from "@ocean/loop/hooks/session-start-hook.js";
13
13
  import { openSessionStore } from "@ocean/loop/infrastructure/persistence/session-store.js";
@@ -595,6 +595,24 @@ async function commandProject() {
595
595
  }
596
596
  }
597
597
  }
598
+ else if (action === "new") {
599
+ // A project with no code yet (one grown from a note); `bind` adds a path later.
600
+ const [id, category, ...name] = process.argv.slice(4);
601
+ if (!id || !category) {
602
+ console.error(`Usage: ocean project new <id> <${PROJECT_CATEGORIES.join("|")}> [display name]`);
603
+ process.exitCode = 1;
604
+ }
605
+ else {
606
+ try {
607
+ const result = await createProject(id, category, name.join(" ") || id);
608
+ console.log(JSON.stringify(result, null, 2));
609
+ }
610
+ catch (error) {
611
+ console.error(error instanceof Error ? error.message : String(error));
612
+ process.exitCode = 2;
613
+ }
614
+ }
615
+ }
598
616
  else if (action === "migrate") {
599
617
  const result = await migrateProjectBindings(process.argv.includes("--write"));
600
618
  console.log(JSON.stringify(result, null, 2));
@@ -616,7 +634,7 @@ async function commandProject() {
616
634
  console.log(await renderProjectIndex());
617
635
  }
618
636
  else {
619
- console.error("Usage: ocean project resolve [path]|bind <name> <path> [--add]|register [path]|unbind <path>|rename <id> <new-id>|move <id> <category> [--write]|list [--category <name>]|status [--json] [--write]|migrate [--write]|index [--write]");
637
+ console.error("Usage: ocean project resolve [path]|bind <name> <path> [--add]|register [path]|unbind <path>|rename <id> <new-id>|new <id> <category> [name]|move <id> <category> [--write]|list [--category <name>]|status [--json] [--write]|migrate [--write]|index [--write]");
620
638
  process.exitCode = 1;
621
639
  }
622
640
  }
@@ -1,8 +1,8 @@
1
- import { chmod, mkdir, readdir, readFile, writeFile } from "node:fs/promises";
1
+ import { access, chmod, mkdir, readdir, readFile, rename, writeFile, } from "node:fs/promises";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
  import { registryFile } from "@ocean/core/shared/fs-utils.js";
5
- import { DAILY_DIR, INBOX_DIR, KNOWLEDGE_DIR, liveEngineEntry, NOTES_DIR, oceanPath, oceanRoot, PERSONAL_DIR, projectDir, REGISTRY_DIR, SYSTEM_DIR, TEMPLATES_DIR, WORKSPACE_PROJECT_ID, } from "@ocean/core/shared/paths.js";
5
+ import { DAILY_DIR, INBOX_DIR, KNOWLEDGE_DIR, LEGACY_NOTES_DIR, liveEngineEntry, NOTES_DIR, oceanPath, oceanRoot, PERSONAL_DIR, projectDir, REGISTRY_DIR, SYSTEM_DIR, TEMPLATES_DIR, WORKSPACE_PROJECT_ID, } from "@ocean/core/shared/paths.js";
6
6
  import { connectObsidianVault } from "@ocean/services/obsidian/vault-discovery.js";
7
7
  import { seedWorkspaceTemplate } from "../../application/layout/workspace-template.js";
8
8
  import { installShellIntegration, syncProviderWrappers, } from "../../infrastructure/wrappers/wrapper-manager.js";
@@ -112,7 +112,23 @@ export function parseSetupArgs(args) {
112
112
  }
113
113
  return { kind: "run", options };
114
114
  }
115
+ // The notes moved from 07-notes into 02-personal/notes. An older workspace's folder moves once,
116
+ // whole; when both exist nothing is touched (the doctor names the leftover for the owner).
117
+ export async function moveLegacyNotes() {
118
+ const present = (file) => access(file).then(() => true, () => false);
119
+ const from = oceanPath(LEGACY_NOTES_DIR);
120
+ const to = oceanPath(NOTES_DIR);
121
+ if (!(await present(from)))
122
+ return "none";
123
+ if (await present(to))
124
+ return "kept";
125
+ await mkdir(path.dirname(to), { recursive: true });
126
+ await rename(from, to);
127
+ return "moved";
128
+ }
115
129
  export async function setup(options = {}) {
130
+ if ((await moveLegacyNotes()) === "moved")
131
+ console.log(`Moved your notes: ${LEGACY_NOTES_DIR}/ → ${NOTES_DIR}/`);
116
132
  await Promise.all([...personalDirectories, `${projectDir(WORKSPACE_PROJECT_ID)}/tasks`].map((directory) => mkdir(oceanPath(directory), { recursive: true })));
117
133
  // T-296: charter, policies, templates and indexes for a new workspace; existing files are kept.
118
134
  await seedWorkspaceTemplate();
@@ -1,7 +1,7 @@
1
1
  import { createHash } from "node:crypto";
2
2
  import { mkdir, readdir, readFile, stat, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
- import { INDEX_DIR, KNOWLEDGE_DIR, listProjectDirs, oceanRoot, resolveWithin, STORE_DIR, } from "@ocean/core/shared/paths.js";
4
+ import { INDEX_DIR, isUnderNotes, KNOWLEDGE_DIR, listProjectDirs, oceanRoot, resolveWithin, STORE_DIR, } from "@ocean/core/shared/paths.js";
5
5
  import { basenameStem, chunkBody, extractWikilinks, normalizeForSearch, normalizeRecord, } from "./brain-markdown.js";
6
6
  const STORES = ["memory", "knowledge", "notes", "sessions", "briefs"];
7
7
  const MAX_FILES = 10_000;
@@ -39,12 +39,16 @@ async function walk(root, depth = 0) {
39
39
  async function corpusFiles(root) {
40
40
  const found = [];
41
41
  const add = async (prefix, storeRoot) => {
42
- for (const file of await walk(storeRoot))
42
+ for (const file of await walk(storeRoot)) {
43
+ // The notes sit inside 02-personal: they are indexed once, as "notes/", the owner's own.
44
+ if (prefix === "memory" && isUnderNotes(file, root))
45
+ continue;
43
46
  found.push({
44
47
  prefix,
45
48
  storePath: `${prefix}/${path.relative(storeRoot, file).split(path.sep).join("/")}`,
46
49
  file,
47
50
  });
51
+ }
48
52
  };
49
53
  for (const store of STORES)
50
54
  await add(store, resolveWithin(root, STORE_DIR[store]));
@@ -299,7 +299,9 @@ export async function ensureIndexBuilt(root = oceanRoot()) {
299
299
  }
300
300
  export { reindexBrain };
301
301
  export function relativeStorePath(file, root = oceanRoot()) {
302
- for (const [store, dir] of Object.entries(STORE_DIR)) {
302
+ // Deepest store first: the notes sit inside 02-personal and must resolve to "notes/".
303
+ const stores = Object.entries(STORE_DIR).sort(([, a], [, b]) => b.length - a.length);
304
+ for (const [store, dir] of stores) {
303
305
  const relative = path.relative(resolveWithin(root, dir), file);
304
306
  if (!relative.startsWith("..") && !path.isAbsolute(relative))
305
307
  return `${store}/${relative.split(path.sep).join("/")}`;
@@ -1,7 +1,7 @@
1
1
  import { copyFile, mkdir, readdir, readFile, stat } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { atomicWrite } from "@ocean/core/shared/fs-utils.js";
4
- import { BRAIN_RECORD_DIRS, NOTES_DIR, oceanPath, PROJECTS_DIR, SYSTEM_DIR, } from "@ocean/core/shared/paths.js";
4
+ import { BRAIN_RECORD_DIRS, isUnderNotes, oceanPath, PROJECTS_DIR, SYSTEM_DIR, } from "@ocean/core/shared/paths.js";
5
5
  // Flat frontmatter (T-314): Obsidian Properties and Bases read top-level keys only, so a record's
6
6
  // `metadata:` block moves up one level. Readers already accept both shapes (parseFrontmatter
7
7
  // reads keys indented up to two spaces); this is the one-time move for files written before.
@@ -57,10 +57,13 @@ async function markdownFiles(directory) {
57
57
  // Every record area except the owner's own notes, which agents never write. Dry run unless
58
58
  // `apply`; an applied run copies each original to bridge/archive first.
59
59
  export async function flattenWorkspace(options) {
60
- const roots = [...BRAIN_RECORD_DIRS, PROJECTS_DIR].filter((root) => root !== NOTES_DIR);
60
+ const roots = [...BRAIN_RECORD_DIRS, PROJECTS_DIR];
61
61
  const changed = [];
62
62
  for (const root of new Set(roots))
63
63
  for (const file of await markdownFiles(oceanPath(root))) {
64
+ // The notes sit inside 02-personal: his to shape, never rewritten.
65
+ if (isUnderNotes(file))
66
+ continue;
64
67
  const text = flattenFrontmatter(await readFile(file, "utf8"));
65
68
  if (text === null)
66
69
  continue;
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { readdir, readFile, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
- import { oceanPath, STORE_DIR } from "@ocean/core/shared/paths.js";
4
+ import { isUnderNotes, oceanPath, STORE_DIR, } from "@ocean/core/shared/paths.js";
5
5
  import { conflictsFile, lessonsDir } from "./lessons.js";
6
6
  const generatedStart = "## Records (generated)";
7
7
  async function markdownFiles(directory) {
@@ -63,7 +63,10 @@ async function syncStore(store, apply) {
63
63
  const indexName = store === "memory" ? "MEMORY.md" : "KNOWLEDGE.md";
64
64
  const index = path.join(root, indexName);
65
65
  const current = await readFile(index, "utf8");
66
- const recordFiles = (await markdownFiles(root)).filter((file) => path.basename(file) !== indexName && !isLessonRecord(store, file));
66
+ const recordFiles = (await markdownFiles(root)).filter((file) => path.basename(file) !== indexName &&
67
+ !isLessonRecord(store, file) &&
68
+ // The owner's notes sit inside 02-personal but are his, not records MEMORY.md lists.
69
+ !isUnderNotes(file));
67
70
  const known = links(current);
68
71
  const missing = recordFiles.filter((file) => !known.has(relativeRecord(root, file)));
69
72
  const broken = [];
@@ -4,7 +4,7 @@ import { MemoryContractError } from "@ocean/core/domain/mcp/memory-contract.js";
4
4
  import { containsKnownSecret } from "@ocean/core/domain/redaction/redaction.js";
5
5
  import { atomicWrite, withFileLock } from "@ocean/core/shared/fs-utils.js";
6
6
  import { localDate } from "@ocean/core/shared/local-date.js";
7
- import { listProjectDirs, NOTES_DIR, oceanPath, PERSONAL_DIR, } from "@ocean/core/shared/paths.js";
7
+ import { isUnderNotes, listProjectDirs, NOTES_DIR, oceanPath, PERSONAL_DIR, } from "@ocean/core/shared/paths.js";
8
8
  import { syncMemoryIndexes } from "./index-sync.js";
9
9
  import { appendAudit, newId, sha256, writeDurable } from "./memory-audit.js";
10
10
  import { assertNoLinks, candidateFile, candidatesRoot, permanentRecord, projectDocument, storedCopy, } from "./memory-paths.js";
@@ -83,8 +83,10 @@ async function similarRecords(file, content) {
83
83
  for (const root of roots)
84
84
  for (const existing of await markdownFiles(root)) {
85
85
  // The target itself is not "similar": an exact existing path is EXISTS.
86
+ // The owner's notes are not records: a fact may share a note's name.
86
87
  if (existing === file ||
87
- path.basename(existing).toLowerCase() === "memory.md")
88
+ path.basename(existing).toLowerCase() === "memory.md" ||
89
+ isUnderNotes(existing))
88
90
  continue;
89
91
  const sameName = normalize(path.basename(existing)) === name;
90
92
  const sameTitle = heading !== "" &&
@@ -224,7 +226,7 @@ export async function proposeMemory(options) {
224
226
  });
225
227
  return { candidate, auditId: id, conflict: `${PERSONAL_DIR}/CONFLICTS.md` };
226
228
  }
227
- // 07-notes is the owner's: an agent never edits it, and a fact that disagrees with one of his
229
+ // The notes (02-personal/notes) are the owner's: an agent never edits it, and a fact that disagrees with one of his
228
230
  // notes is not reconciled by the agent. It waits in CONFLICTS.md, beside the candidate.
229
231
  async function humanNote(relative) {
230
232
  const clean = path.posix.normalize(relative.replace(/\\/g, "/"));
@@ -17,7 +17,7 @@
17
17
  "brief": "01-daily/briefs/",
18
18
  "weekly": "01-daily/weekly/",
19
19
  "monthly": "01-daily/monthly/",
20
- "note": "07-notes/",
20
+ "note": "02-personal/notes/",
21
21
  "decision": "05-knowledge/decisions/",
22
22
  "lesson": "05-knowledge/lessons/",
23
23
  "solution": "05-knowledge/solutions/",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocean/brain",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocean/context",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -77,8 +77,11 @@ export const KNOWLEDGE_DIR = brainArea("05-knowledge");
77
77
  export const DAILY_DIR = brainArea("01-daily");
78
78
  export const INBOX_DIR = brainArea("00-inbox");
79
79
  export const TEMPLATES_DIR = brainArea("06-templates");
80
- // The owner's own notes (T-314): agents read and index them, and never write there.
81
- export const NOTES_DIR = brainArea("07-notes");
80
+ // The owner's own notes (T-314): agents read and index them, and never write there. They sit
81
+ // inside 02-personal, so every walk of the personal store skips them (isUnderNotes).
82
+ export const NOTES_DIR = path.posix.join(PERSONAL_DIR, "notes");
83
+ // Where the notes lived before they moved under 02-personal: setup moves it, doctor warns.
84
+ export const LEGACY_NOTES_DIR = brainArea("07-notes");
82
85
  export const INDEX_DIR = brainArea(".index");
83
86
  export const PROJECTS_DIR = brainArea("04-projects");
84
87
  // Every top-level brain area that holds markdown records (used by the doctor and the
@@ -90,7 +93,7 @@ export const BRAIN_RECORD_DIRS = [
90
93
  brainArea("03-professional"),
91
94
  KNOWLEDGE_DIR,
92
95
  TEMPLATES_DIR,
93
- NOTES_DIR,
96
+ // NOTES_DIR is inside PERSONAL_DIR: listing it too would walk every note twice.
94
97
  ];
95
98
  // The workspace's own project. Callers use these helpers instead of a literal.
96
99
  export const WORKSPACE_PROJECT_ID = "ocean";
@@ -313,6 +316,12 @@ function escapesRoot(root, candidate) {
313
316
  !isFilesystemRoot &&
314
317
  !candidate.startsWith(`${root}${path.sep}`));
315
318
  }
319
+ // A file (absolute, or relative to the root) inside the owner's notes.
320
+ export function isUnderNotes(file, root = oceanRoot()) {
321
+ const relative = path.relative(path.resolve(root, NOTES_DIR), path.resolve(root, file));
322
+ return (relative === "" ||
323
+ (!relative.startsWith("..") && !path.isAbsolute(relative)));
324
+ }
316
325
  export function resolveWithin(root, ...parts) {
317
326
  const resolvedRoot = path.resolve(root);
318
327
  const resolved = path.resolve(resolvedRoot, ...parts);
@@ -961,6 +961,36 @@ export async function rewriteProjectReferences(from, to, write) {
961
961
  await visit(oceanPath(root));
962
962
  return changed.sort();
963
963
  }
964
+ // A project with no code yet, e.g. one grown from a note: a manifest with no paths, filed in its
965
+ // category folder with the usual tasks/, memory/ and docs/. `bind` adds its first path later.
966
+ // An id already registered is returned as it is, never overwritten.
967
+ export async function createProject(id, category, name = id) {
968
+ if (!isValidProjectId(id))
969
+ throw new Error(`Invalid project id '${id}': use lowercase letters, digits, dot, underscore or hyphen`);
970
+ if (!isProjectCategory(category))
971
+ throw new Error(`Unknown category '${category}': use ${PROJECT_CATEGORIES.join(", ")}`);
972
+ const created = await withProjectsLock(async () => {
973
+ const manifests = await listProjectManifests();
974
+ if (manifests.some((manifest) => manifest.id === id))
975
+ return false;
976
+ if (existsSync(oceanPath(projectDir(id))))
977
+ throw new ProjectFolderTaken(`${projectDir(id)} already exists; bind it explicitly`);
978
+ const manifest = await newManifest(id, {
979
+ name,
980
+ paths: [],
981
+ created: new Date().toISOString(),
982
+ autoRegistered: false,
983
+ }, manifests);
984
+ // The folder first, so projectDir resolves to the category folder the manifest goes into.
985
+ await mkdir(oceanPath(PROJECTS_DIR, category, id), { recursive: true });
986
+ await writeManifest(manifest);
987
+ await saveProjectBindings(cacheBindings(manifests.concat(manifest), await listLegacyBindings()));
988
+ return true;
989
+ });
990
+ if (created)
991
+ await ensureProjectLayout(id);
992
+ return { id, dir: projectDir(id), created };
993
+ }
964
994
  // Files a project under a category folder (T-311) and rewrites the workspace paths that name
965
995
  // its old folder. A dry run unless `write`: it reports the move and the files that would change.
966
996
  export async function moveProject(id, category, write = false) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocean/core",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocean/loop",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocean/market",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -6,10 +6,11 @@ import { promisify } from "node:util";
6
6
  import { inTypeLocation } from "@ocean/brain/memory/fact-routing.js";
7
7
  import { doctorMemoryIndexes, syncMemoryIndexes, } from "@ocean/brain/memory/index-sync.js";
8
8
  import { memorySettings } from "@ocean/brain/memory/memory-audit.js";
9
- import { BRAIN_RECORD_DIRS, CHARTER_DIR, enginePath, INBOX_DIR, NOTES_DIR, oceanEnv, oceanPath, POLICIES_DIR, PROJECTS_DIR, projectDir, repoPath, SYSTEM_DIR, workspaceTasksRoot, } from "@ocean/core/shared/paths.js";
9
+ import { BRAIN_RECORD_DIRS, CHARTER_DIR, enginePath, INBOX_DIR, LEGACY_NOTES_DIR, NOTES_DIR, oceanEnv, oceanPath, POLICIES_DIR, PROJECTS_DIR, projectDir, repoPath, SYSTEM_DIR, workspaceTasksRoot, } from "@ocean/core/shared/paths.js";
10
10
  import { ensureProjectLayout, listProjectManifests, PROJECT_ROOT_ENTRIES, scanProjectManifests, UNCATEGORIZED, } from "@ocean/core/shared/project-resolution.js";
11
11
  const execFile = promisify(execFileCallback);
12
- const roots = [...BRAIN_RECORD_DIRS, PROJECTS_DIR, SYSTEM_DIR];
12
+ // The notes root is inside 02-personal (not a record dir of its own) but still checked here.
13
+ const roots = [...BRAIN_RECORD_DIRS, NOTES_DIR, PROJECTS_DIR, SYSTEM_DIR];
13
14
  async function exists(file) {
14
15
  try {
15
16
  await access(file);
@@ -65,7 +66,7 @@ async function checkStructure() {
65
66
  message: `${root} root exists`,
66
67
  fixable: false,
67
68
  }
68
- : // 07-notes arrived in a later version (T-314): a workspace made before it is not broken.
69
+ : // The notes root arrived in a later version (T-314): a workspace made before it is not broken.
69
70
  root === NOTES_DIR
70
71
  ? {
71
72
  code: "ROOT_MISSING",
@@ -82,6 +83,17 @@ async function checkStructure() {
82
83
  fixable: false,
83
84
  });
84
85
  }
86
+ // The notes moved from 07-notes into 02-personal/notes; setup moves a folder still there.
87
+ if (await exists(oceanPath(LEGACY_NOTES_DIR)))
88
+ findings.push({
89
+ code: "LEGACY_NOTES_ROOT",
90
+ severity: "WARN",
91
+ path: LEGACY_NOTES_DIR,
92
+ message: (await exists(oceanPath(NOTES_DIR)))
93
+ ? `${LEGACY_NOTES_DIR}/ and ${NOTES_DIR}/ both exist; move what is left in ${LEGACY_NOTES_DIR}/ by hand`
94
+ : `your notes moved to ${NOTES_DIR}/; \`ocean setup\` moves ${LEGACY_NOTES_DIR}/ there`,
95
+ fixable: false,
96
+ });
85
97
  return findings;
86
98
  }
87
99
  // Session summaries are machine-written records that quote links from past chats, and
@@ -430,7 +442,7 @@ const INDEX_FILE = /^[A-Z][A-Z0-9_-]*\.md$/;
430
442
  const NOT_RECORDS = [
431
443
  /^00-inbox\/(?:candidates|native|brain-dump)\//,
432
444
  /^06-templates\//,
433
- /^07-notes\//,
445
+ /^02-personal\/notes\//,
434
446
  /^04-projects\/(?:.+\/)?tasks\//,
435
447
  // Indexes Ocean generates or appends to, not records: frontmatter there would be rewritten away.
436
448
  /^04-projects\/(?:backlog|registry)\.md$/,
@@ -271,7 +271,7 @@ const tools = new McpToolRegistry([
271
271
  },
272
272
  {
273
273
  name: "memory_propose",
274
- description: "Call this when the user states something worth keeping across sessions (a decision, preference or project fact) without asking you to remember it, for a fact you inferred, or for one imported from another tool's memory: it queues it for the user's review. It is not memory until approved. In a conversation about one project, pass its name (as the user's Claude project is called) or Ocean id as project, and kind instead of target: `fact` (a decision, preference or detail) or `doc` (a spec, brief or longer notes), each with a kebab-case name, is filed in that project's memory/ or docs/ — written at once when the user allows it; `todo` (work to do) waits for review as a backlog line. Optionally say why (reason). If the fact disagrees with one of the user's own notes in 07-notes, pass that note's path as contradicts: the note is never edited, and the disagreement waits in 02-personal/CONFLICTS.md for the user.",
274
+ description: "Call this when the user states something worth keeping across sessions (a decision, preference or project fact) without asking you to remember it, for a fact you inferred, or for one imported from another tool's memory: it queues it for the user's review. It is not memory until approved. In a conversation about one project, pass its name (as the user's Claude project is called) or Ocean id as project, and kind instead of target: `fact` (a decision, preference or detail) or `doc` (a spec, brief or longer notes), each with a kebab-case name, is filed in that project's memory/ or docs/ — written at once when the user allows it; `todo` (work to do) waits for review as a backlog line. Optionally say why (reason). If the fact disagrees with one of the user's own notes in 02-personal/notes, pass that note's path as contradicts: the note is never edited, and the disagreement waits in 02-personal/CONFLICTS.md for the user.",
275
275
  annotations: { readOnlyHint: false, destructiveHint: false },
276
276
  inputSchema: {
277
277
  type: "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocean/services",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -5,9 +5,9 @@
5
5
  {
6
6
  "kind": "skill",
7
7
  "name": "dev.ocean.skills.business-logic",
8
- "version": "2.1.1",
8
+ "version": "2.2.0",
9
9
  "engines": {
10
- "ocean": ">=2.1.1"
10
+ "ocean": ">=2.2.0"
11
11
  },
12
12
  "source": {
13
13
  "type": "path",
@@ -23,9 +23,9 @@
23
23
  {
24
24
  "kind": "skill",
25
25
  "name": "dev.ocean.skills.catch-up",
26
- "version": "2.1.1",
26
+ "version": "2.2.0",
27
27
  "engines": {
28
- "ocean": ">=2.1.1"
28
+ "ocean": ">=2.2.0"
29
29
  },
30
30
  "source": {
31
31
  "type": "path",
@@ -41,9 +41,9 @@
41
41
  {
42
42
  "kind": "skill",
43
43
  "name": "dev.ocean.skills.core-thinking",
44
- "version": "2.1.1",
44
+ "version": "2.2.0",
45
45
  "engines": {
46
- "ocean": ">=2.1.1"
46
+ "ocean": ">=2.2.0"
47
47
  },
48
48
  "source": {
49
49
  "type": "path",
@@ -59,16 +59,16 @@
59
59
  {
60
60
  "kind": "skill",
61
61
  "name": "dev.ocean.skills.daily-harvest",
62
- "version": "2.1.1",
62
+ "version": "2.2.0",
63
63
  "engines": {
64
- "ocean": ">=2.1.1"
64
+ "ocean": ">=2.2.0"
65
65
  },
66
66
  "source": {
67
67
  "type": "path",
68
68
  "path": "skills/core/daily-harvest"
69
69
  },
70
70
  "integrity": {
71
- "sha256": "4314c029393052b95bb675ead75a9ecbfb5138457c7367fd761d6efa8f2580ba"
71
+ "sha256": "23c7018021bda0bdf8eebe03e78c74ff42e14fe85c15b413b82b648505af2c08"
72
72
  },
73
73
  "spec": {
74
74
  "directory": "daily-harvest"
@@ -77,9 +77,9 @@
77
77
  {
78
78
  "kind": "skill",
79
79
  "name": "dev.ocean.skills.design-thinking",
80
- "version": "2.1.1",
80
+ "version": "2.2.0",
81
81
  "engines": {
82
- "ocean": ">=2.1.1"
82
+ "ocean": ">=2.2.0"
83
83
  },
84
84
  "source": {
85
85
  "type": "path",
@@ -95,9 +95,9 @@
95
95
  {
96
96
  "kind": "skill",
97
97
  "name": "dev.ocean.skills.graft",
98
- "version": "2.1.1",
98
+ "version": "2.2.0",
99
99
  "engines": {
100
- "ocean": ">=2.1.1"
100
+ "ocean": ">=2.2.0"
101
101
  },
102
102
  "source": {
103
103
  "type": "path",
@@ -113,9 +113,9 @@
113
113
  {
114
114
  "kind": "skill",
115
115
  "name": "dev.ocean.skills.loop",
116
- "version": "2.1.1",
116
+ "version": "2.2.0",
117
117
  "engines": {
118
- "ocean": ">=2.1.1"
118
+ "ocean": ">=2.2.0"
119
119
  },
120
120
  "source": {
121
121
  "type": "path",
@@ -131,9 +131,9 @@
131
131
  {
132
132
  "kind": "skill",
133
133
  "name": "dev.ocean.skills.memory-review",
134
- "version": "2.1.1",
134
+ "version": "2.2.0",
135
135
  "engines": {
136
- "ocean": ">=2.1.1"
136
+ "ocean": ">=2.2.0"
137
137
  },
138
138
  "source": {
139
139
  "type": "path",
@@ -149,9 +149,9 @@
149
149
  {
150
150
  "kind": "skill",
151
151
  "name": "dev.ocean.skills.session-handoff",
152
- "version": "2.1.1",
152
+ "version": "2.2.0",
153
153
  "engines": {
154
- "ocean": ">=2.1.1"
154
+ "ocean": ">=2.2.0"
155
155
  },
156
156
  "source": {
157
157
  "type": "path",
@@ -167,9 +167,9 @@
167
167
  {
168
168
  "kind": "skill",
169
169
  "name": "dev.ocean.skills.use-browser",
170
- "version": "2.1.1",
170
+ "version": "2.2.0",
171
171
  "engines": {
172
- "ocean": ">=2.1.1"
172
+ "ocean": ">=2.2.0"
173
173
  },
174
174
  "source": {
175
175
  "type": "path",
@@ -185,9 +185,9 @@
185
185
  {
186
186
  "kind": "skill",
187
187
  "name": "dev.ocean.skills.verification",
188
- "version": "2.1.1",
188
+ "version": "2.2.0",
189
189
  "engines": {
190
- "ocean": ">=2.1.1"
190
+ "ocean": ">=2.2.0"
191
191
  },
192
192
  "source": {
193
193
  "type": "path",
@@ -203,16 +203,16 @@
203
203
  {
204
204
  "kind": "skill",
205
205
  "name": "dev.ocean.skills.weekly-review",
206
- "version": "2.1.1",
206
+ "version": "2.2.0",
207
207
  "engines": {
208
- "ocean": ">=2.1.1"
208
+ "ocean": ">=2.2.0"
209
209
  },
210
210
  "source": {
211
211
  "type": "path",
212
212
  "path": "skills/core/weekly-review"
213
213
  },
214
214
  "integrity": {
215
- "sha256": "b7cb9dc2e0e425648cbbf7081c4445fb3ebdb1cdaa333265f2ca9163e01974ea"
215
+ "sha256": "346d7a276b8fccbd693ec766fe726c4f2d1887fae4d82fa728e619441fe7ef97"
216
216
  },
217
217
  "spec": {
218
218
  "directory": "weekly-review"
@@ -247,9 +247,9 @@
247
247
  "npx"
248
248
  ]
249
249
  },
250
- "version": "2.1.1",
250
+ "version": "2.2.0",
251
251
  "engines": {
252
- "ocean": ">=2.1.1"
252
+ "ocean": ">=2.2.0"
253
253
  },
254
254
  "source": {
255
255
  "type": "path",
@@ -299,9 +299,9 @@
299
299
  "kind": "mcp",
300
300
  "name": "dev.ocean/mcp-gateway",
301
301
  "description": "One MCP endpoint for every registered server: Ocean's own and those installed from the marketplace.",
302
- "version": "2.1.1",
302
+ "version": "2.2.0",
303
303
  "engines": {
304
- "ocean": ">=2.1.1"
304
+ "ocean": ">=2.2.0"
305
305
  },
306
306
  "source": {
307
307
  "type": "path",
@@ -343,9 +343,9 @@
343
343
  "kind": "mcp",
344
344
  "name": "dev.ocean/obsidian",
345
345
  "description": "Ocean's Obsidian vault bridge over MCP.",
346
- "version": "2.1.1",
346
+ "version": "2.2.0",
347
347
  "engines": {
348
- "ocean": ">=2.1.1"
348
+ "ocean": ">=2.2.0"
349
349
  },
350
350
  "source": {
351
351
  "type": "path",
@@ -387,9 +387,9 @@
387
387
  "kind": "mcp",
388
388
  "name": "dev.ocean/ocean",
389
389
  "description": "Ocean's own MCP server: workspace status, tasks, handoffs, sessions and the brain.",
390
- "version": "2.1.1",
390
+ "version": "2.2.0",
391
391
  "engines": {
392
- "ocean": ">=2.1.1"
392
+ "ocean": ">=2.2.0"
393
393
  },
394
394
  "source": {
395
395
  "type": "path",
@@ -441,9 +441,9 @@
441
441
  "npx"
442
442
  ]
443
443
  },
444
- "version": "2.1.1",
444
+ "version": "2.2.0",
445
445
  "engines": {
446
- "ocean": ">=2.1.1"
446
+ "ocean": ">=2.2.0"
447
447
  },
448
448
  "source": {
449
449
  "type": "path",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@amoree-code/ocean",
3
3
  "description": "Local-first memory, tasks and session capture shared by every AI coding client: one private workspace for Claude, Codex, Gemini and more.",
4
- "version": "2.1.1",
4
+ "version": "2.2.0",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "author": "AMEER ABDULKAREEM JABBAR LAMI",
@@ -53,12 +53,12 @@
53
53
  "@langchain/core": "1.2.14",
54
54
  "@langchain/langgraph": "1.4.19",
55
55
  "@modelcontextprotocol/sdk": "1.32.0",
56
- "@ocean/brain": "2.1.1",
57
- "@ocean/context": "2.1.1",
58
- "@ocean/core": "2.1.1",
59
- "@ocean/loop": "2.1.1",
60
- "@ocean/market": "2.1.1",
61
- "@ocean/services": "2.1.1",
56
+ "@ocean/brain": "2.2.0",
57
+ "@ocean/context": "2.2.0",
58
+ "@ocean/core": "2.2.0",
59
+ "@ocean/loop": "2.2.0",
60
+ "@ocean/market": "2.2.0",
61
+ "@ocean/services": "2.2.0",
62
62
  "playwright-core": "^1.48.0",
63
63
  "sqlite-vec": "0.1.9",
64
64
  "zod": "^4.6.5"
@@ -61,7 +61,7 @@ strengthen the record that holds it (merge into one current statement, fresh `up
61
61
  7. **The owner's journey**: a study session (IELTS, Letspeak) adds to his study log; finished,
62
62
  notable work becomes a milestone (`status: done`); a project's state goes to its `memory/`.
63
63
 
64
- **Stop and do not write** when a fact contradicts a record or one of his notes in `07-notes/`:
64
+ **Stop and do not write** when a fact contradicts a record or one of his notes in `02-personal/notes/`:
65
65
  propose it with `contradicts` so it waits in `02-personal/CONFLICTS.md`. Never write a secret;
66
66
  about other people, only what the work needs; never invent a detail.
67
67
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: weekly-review
3
- description: Walk the owner through the week to inbox zero - the weekly digest, pending memory candidates, and inbox captures - deciding each item with him.
4
- version: 1.0.0
3
+ description: Walk the owner through the week to inbox zero - the weekly digest, pending memory candidates, inbox captures and unsorted notes - deciding each item with him.
4
+ version: 1.1.0
5
5
  category: core
6
6
  ---
7
7
 
@@ -17,8 +17,12 @@ Take the owner from a full inbox to zero, one decision at a time. He decides; yo
17
17
  without his answer.
18
18
  3. Walk `00-inbox/captures/`: for each capture, file it where its type lives (routing.json),
19
19
  turn it into a task or backlog line, or mark it `status: processed`.
20
- 4. Run `ocean interests decay` (dry run) and the brief's keep/skip feedback he gives.
21
- 5. Finish with `ocean doctor`: report `INBOX_STALE`, `FRONTMATTER_MISSING`, `TYPE_LOCATION`, and
20
+ 4. List his notes in `02-personal/notes/` still `status: todo` and older than 7 days. For each,
21
+ suggest one of: a folder (`study/`, `work/`, `ideas/`, `archive/`), a status (`active`,
22
+ `paused`, `blocked`, `done`, `cancelled`), or "make it a project" (QuickAdd: Project from
23
+ this note). He acts on it in Obsidian; never move, rename or edit a note yourself.
24
+ 5. Run `ocean interests decay` (dry run) and the brief's keep/skip feedback he gives.
25
+ 6. Finish with `ocean doctor`: report `INBOX_STALE`, `FRONTMATTER_MISSING`, `TYPE_LOCATION`, and
22
26
  one next step.
23
27
 
24
28
  Ask one question at a time. Batch nothing he has not seen.
package/skills/index.json CHANGED
@@ -67,8 +67,8 @@
67
67
  },
68
68
  {
69
69
  "name": "weekly-review",
70
- "description": "Walk the owner through the week to inbox zero - the weekly digest, pending memory candidates, and inbox captures - deciding each item with him.",
71
- "version": "1.0.0",
70
+ "description": "Walk the owner through the week to inbox zero - the weekly digest, pending memory candidates, inbox captures and unsorted notes - deciding each item with him.",
71
+ "version": "1.1.0",
72
72
  "category": "core"
73
73
  }
74
74
  ]
@@ -15,7 +15,7 @@ Standardized templates for common document types used across Ocean workflows.
15
15
  | **task.md** | Task record template — scope, goal, constraints, artifacts, verification |
16
16
  | **capture.md** | Quick capture into `00-inbox/captures/` |
17
17
  | **daily.md** | Daily note in `01-daily/` |
18
- | **note.md** | Your own note in `07-notes/` (agents never write there) |
18
+ | **note.md** | Your own note in `02-personal/notes/` (agents never write there) |
19
19
  | **lesson.md** · **solution.md** · **failure.md** | Knowledge records in `05-knowledge/` |
20
20
  | **person.md** | One person in `02-personal/people/` (aliases in English and Arabic) |
21
21
  | **interest.md** | One interest in `02-personal/interests/` (priority, keywords, sources) |
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: note
3
+ status: todo
3
4
  created: {{date}}
4
5
  tags: []
5
6
  ---
@@ -12,8 +12,8 @@
12
12
  "02-personal/identity/.gitkeep": "keep",
13
13
  "02-personal/education/study/study.base": "default",
14
14
  "02-personal/milestones/milestones.base": "default",
15
+ "02-personal/notes/.gitkeep": "keep",
15
16
  "02-personal/people/people.base": "default",
16
- "02-personal/preferences/.gitkeep": "keep",
17
17
  "03-professional/.gitkeep": "keep",
18
18
  "04-projects/PROJECTS.md": "default",
19
19
  "04-projects/_template/docs/.gitkeep": "keep",
@@ -38,7 +38,6 @@
38
38
  "06-templates/person.md": "default",
39
39
  "06-templates/solution.md": "default",
40
40
  "06-templates/study.md": "default",
41
- "07-notes/.gitkeep": "keep",
42
41
  "bridge/config/CONFIG.md": "default",
43
42
  "bridge/config/runtime.json": "default",
44
43
  "charter/core.md": "default",
File without changes