@amoree-code/ocean 0.0.0-stage → 1.1.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.
- package/LICENSE +21 -0
- package/README.md +284 -2
- package/dist/application/auth/auth-orchestrator.js +77 -0
- package/dist/application/clients/clients.js +646 -0
- package/dist/application/clients/editors.js +398 -0
- package/dist/application/clients/hooks.js +335 -0
- package/dist/application/clients/native.js +410 -0
- package/dist/application/clients/opencode-plugin.js +158 -0
- package/dist/application/clients/registry.js +188 -0
- package/dist/application/gateway/webhook-gateway.js +137 -0
- package/dist/application/install/provider-installer.js +184 -0
- package/dist/application/integrations/charter-copies.js +76 -0
- package/dist/application/integrations/claude-vscode.js +106 -0
- package/dist/application/integrations/engine-entry-repair.js +105 -0
- package/dist/application/integrations/skill-filter.js +254 -0
- package/dist/application/layout/layout-apply.js +443 -0
- package/dist/application/layout/layout-plan.js +236 -0
- package/dist/application/layout/workspace-template.js +34 -0
- package/dist/application/onboarding/state.js +23 -0
- package/dist/application/onboarding/steps.js +249 -0
- package/dist/application/profiles/profile-distribution.js +53 -0
- package/dist/application/profiles/profile-suggestion.js +39 -0
- package/dist/application/profiles/profile-upgrade-service.js +208 -0
- package/dist/application/pull/history-index.js +476 -0
- package/dist/application/pull/project-match.js +132 -0
- package/dist/application/pull/pull.js +202 -0
- package/dist/application/pull/server-capture.js +307 -0
- package/dist/application/scheduler/local-scheduler.js +210 -0
- package/dist/composition/runtime.js +64 -0
- package/dist/engine-root.js +9 -0
- package/dist/infrastructure/filesystem/profile-loader.js +46 -0
- package/dist/infrastructure/filesystem/runtime-config-loader.js +29 -0
- package/dist/infrastructure/filesystem/skill-loader.js +84 -0
- package/dist/infrastructure/filesystem/workspace-capability.js +37 -0
- package/dist/infrastructure/observability/runtime-logger.js +16 -0
- package/dist/infrastructure/process/agent-tool-executor.js +99 -0
- package/dist/infrastructure/process/cli-process.js +49 -0
- package/dist/infrastructure/process/interactive-process.js +145 -0
- package/dist/infrastructure/process/process-supervisor.js +194 -0
- package/dist/infrastructure/process/service.js +252 -0
- package/dist/infrastructure/providers/browser-provider.js +2 -0
- package/dist/infrastructure/providers/claude-sdk.js +137 -0
- package/dist/infrastructure/providers/client-home.js +14 -0
- package/dist/infrastructure/providers/fake-browser-provider.js +146 -0
- package/dist/infrastructure/providers/ollama-embedder.js +74 -0
- package/dist/infrastructure/providers/openai-compatible.js +268 -0
- package/dist/infrastructure/providers/playwright-browser-provider.js +380 -0
- package/dist/infrastructure/providers/provider-capabilities.js +50 -0
- package/dist/infrastructure/providers/provider-invocation.js +184 -0
- package/dist/infrastructure/providers/provider-registry.js +77 -0
- package/dist/infrastructure/providers/providers.js +134 -0
- package/dist/infrastructure/wrappers/wrapper-manager.js +374 -0
- package/dist/interfaces/cli/auth-command.js +54 -0
- package/dist/interfaces/cli/browser-bridge-command.js +93 -0
- package/dist/interfaces/cli/browser-command.js +119 -0
- package/dist/interfaces/cli/capture-command.js +125 -0
- package/dist/interfaces/cli/client-test-command.js +133 -0
- package/dist/interfaces/cli/clients-command.js +129 -0
- package/dist/interfaces/cli/command-registry.js +1211 -0
- package/dist/interfaces/cli/context-command.js +172 -0
- package/dist/interfaces/cli/daily-command.js +131 -0
- package/dist/interfaces/cli/governance-command.js +55 -0
- package/dist/interfaces/cli/handoff-command.js +35 -0
- package/dist/interfaces/cli/help-command.js +207 -0
- package/dist/interfaces/cli/idea-command.js +47 -0
- package/dist/interfaces/cli/intercept-command.js +317 -0
- package/dist/interfaces/cli/layout-command.js +27 -0
- package/dist/interfaces/cli/market-command.js +52 -0
- package/dist/interfaces/cli/mcp-gateway-command.js +30 -0
- package/dist/interfaces/cli/memory-command.js +317 -0
- package/dist/interfaces/cli/migrate-command.js +26 -0
- package/dist/interfaces/cli/observe-command.js +78 -0
- package/dist/interfaces/cli/onboard-command.js +123 -0
- package/dist/interfaces/cli/operate-command.js +59 -0
- package/dist/interfaces/cli/profiles-command.js +70 -0
- package/dist/interfaces/cli/pull-command.js +54 -0
- package/dist/interfaces/cli/setup-command.js +143 -0
- package/dist/interfaces/cli/tasks-command.js +249 -0
- package/dist/main.js +49 -0
- package/dist/node-warnings.js +17 -0
- package/dist/version.js +8 -0
- package/market/mcp/chrome-devtools/ocean.capability.json +28 -0
- package/market/mcp/gateway/ocean.capability.json +21 -0
- package/market/mcp/obsidian/ocean.capability.json +21 -0
- package/market/mcp/ocean/ocean.capability.json +21 -0
- package/market/mcp/playwright/ocean.capability.json +23 -0
- package/node_modules/@ocean/brain/dist/brain/brain-eval.js +29 -0
- package/node_modules/@ocean/brain/dist/brain/brain-markdown.js +226 -0
- package/node_modules/@ocean/brain/dist/brain/brain-reindex.js +247 -0
- package/node_modules/@ocean/brain/dist/brain/brain-service.js +320 -0
- package/node_modules/@ocean/brain/dist/capture/inbox-sync.js +22 -0
- package/node_modules/@ocean/brain/dist/evidence/verification-report.js +13 -0
- package/node_modules/@ocean/brain/dist/infrastructure/brain/brain-index.js +285 -0
- package/node_modules/@ocean/brain/dist/memory/brain-dump.js +145 -0
- package/node_modules/@ocean/brain/dist/memory/daily-narrative.js +142 -0
- package/node_modules/@ocean/brain/dist/memory/index-sync.js +124 -0
- package/node_modules/@ocean/brain/dist/memory/lesson-activation.js +93 -0
- package/node_modules/@ocean/brain/dist/memory/lesson-learning.js +188 -0
- package/node_modules/@ocean/brain/dist/memory/lessons.js +321 -0
- package/node_modules/@ocean/brain/dist/memory/memory-audit.js +100 -0
- package/node_modules/@ocean/brain/dist/memory/memory-digest.js +49 -0
- package/node_modules/@ocean/brain/dist/memory/memory-harvest.js +345 -0
- package/node_modules/@ocean/brain/dist/memory/memory-paths.js +174 -0
- package/node_modules/@ocean/brain/dist/memory/memory-review.js +278 -0
- package/node_modules/@ocean/brain/dist/memory/memory-trash.js +152 -0
- package/node_modules/@ocean/brain/dist/memory/memory-write.js +216 -0
- package/node_modules/@ocean/brain/dist/memory/model-narrative.js +129 -0
- package/node_modules/@ocean/brain/dist/memory/profile-facts.js +103 -0
- package/node_modules/@ocean/brain/dist/memory/session-promotion.js +61 -0
- package/node_modules/@ocean/brain/dist/memory/session-summary.js +113 -0
- package/node_modules/@ocean/brain/dist/memory/signal-detection.js +66 -0
- package/node_modules/@ocean/brain/package.json +11 -0
- package/node_modules/@ocean/context/dist/context/context-compression.js +66 -0
- package/node_modules/@ocean/context/dist/context/context-cost.js +587 -0
- package/node_modules/@ocean/context/dist/context/context-ladder.js +363 -0
- package/node_modules/@ocean/context/dist/context/context-packet.js +213 -0
- package/node_modules/@ocean/context/dist/context/context-references.js +255 -0
- package/node_modules/@ocean/context/dist/context/intent-router.js +259 -0
- package/node_modules/@ocean/context/dist/context/resource-injection.js +36 -0
- package/node_modules/@ocean/context/package.json +11 -0
- package/node_modules/@ocean/core/dist/domain/brain/brain-record.js +22 -0
- package/node_modules/@ocean/core/dist/domain/brain/record-scope.js +22 -0
- package/node_modules/@ocean/core/dist/domain/capabilities/browser-contract.js +64 -0
- package/node_modules/@ocean/core/dist/domain/capabilities/capability-contract.js +16 -0
- package/node_modules/@ocean/core/dist/domain/capabilities/capability-manifest.js +72 -0
- package/node_modules/@ocean/core/dist/domain/context/context-validator.js +5 -0
- package/node_modules/@ocean/core/dist/domain/context/context.js +34 -0
- package/node_modules/@ocean/core/dist/domain/context/project-id.js +30 -0
- package/node_modules/@ocean/core/dist/domain/evidence/evidence.js +16 -0
- package/node_modules/@ocean/core/dist/domain/mcp/mcp-contract.js +36 -0
- package/node_modules/@ocean/core/dist/domain/mcp/memory-contract.js +41 -0
- package/node_modules/@ocean/core/dist/domain/ports/brain-index-port.js +7 -0
- package/node_modules/@ocean/core/dist/domain/ports/browser-port.js +8 -0
- package/node_modules/@ocean/core/dist/domain/ports/embedder-port.js +2 -0
- package/node_modules/@ocean/core/dist/domain/ports/platform-ports.js +2 -0
- package/node_modules/@ocean/core/dist/domain/ports/runtime-ports.js +2 -0
- package/node_modules/@ocean/core/dist/domain/ports/session-store-port.js +2 -0
- package/node_modules/@ocean/core/dist/domain/process/process-events.js +5 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile-distribution.js +19 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile-policy.js +34 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile-selection.js +73 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile-upgrade.js +123 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile-validator.js +5 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile.js +218 -0
- package/node_modules/@ocean/core/dist/domain/profiles/runtime-config.js +30 -0
- package/node_modules/@ocean/core/dist/domain/providers/provider-capability.js +28 -0
- package/node_modules/@ocean/core/dist/domain/providers/provider.js +2 -0
- package/node_modules/@ocean/core/dist/domain/redaction/redaction.js +86 -0
- package/node_modules/@ocean/core/dist/domain/runs/agent-tools.js +92 -0
- package/node_modules/@ocean/core/dist/domain/runs/execution-plan.js +71 -0
- package/node_modules/@ocean/core/dist/domain/runs/run-contract.js +38 -0
- package/node_modules/@ocean/core/dist/domain/sessions/entry-contract.js +31 -0
- package/node_modules/@ocean/core/dist/domain/sessions/handoff.js +78 -0
- package/node_modules/@ocean/core/dist/domain/sessions/session.js +58 -0
- package/node_modules/@ocean/core/dist/domain/skills/default-skills.js +29 -0
- package/node_modules/@ocean/core/dist/domain/skills/skill-validator.js +5 -0
- package/node_modules/@ocean/core/dist/domain/skills/skill.js +11 -0
- package/node_modules/@ocean/core/dist/domain/tasks/task-id.js +85 -0
- package/node_modules/@ocean/core/dist/shared/fs-utils.js +212 -0
- package/node_modules/@ocean/core/dist/shared/local-date.js +16 -0
- package/node_modules/@ocean/core/dist/shared/paths.js +324 -0
- package/node_modules/@ocean/core/dist/shared/project-resolution.js +1065 -0
- package/node_modules/@ocean/core/dist/shared/task-reference.js +133 -0
- package/node_modules/@ocean/core/package.json +14 -0
- package/node_modules/@ocean/loop/dist/handoff/handoff-service.js +133 -0
- package/node_modules/@ocean/loop/dist/hooks/lifecycle-hooks.js +15 -0
- package/node_modules/@ocean/loop/dist/hooks/session-end-hook.js +183 -0
- package/node_modules/@ocean/loop/dist/hooks/session-start-hook.js +237 -0
- package/node_modules/@ocean/loop/dist/infrastructure/persistence/session-store.js +690 -0
- package/node_modules/@ocean/loop/dist/infrastructure/persistence/session-validator.js +5 -0
- package/node_modules/@ocean/loop/dist/loops/iteration-graph.js +147 -0
- package/node_modules/@ocean/loop/dist/loops/task-loop-record.js +2 -0
- package/node_modules/@ocean/loop/dist/loops/task-loop.js +281 -0
- package/node_modules/@ocean/loop/dist/operations/memory-knowledge-operations.js +263 -0
- package/node_modules/@ocean/loop/dist/operations/operation-contract.js +227 -0
- package/node_modules/@ocean/loop/dist/operations/operation-scope.js +28 -0
- package/node_modules/@ocean/loop/dist/operations/project-operations.js +93 -0
- package/node_modules/@ocean/loop/dist/operations/record-io.js +65 -0
- package/node_modules/@ocean/loop/dist/operations/record-operations.js +45 -0
- package/node_modules/@ocean/loop/dist/operations/task-linker.js +40 -0
- package/node_modules/@ocean/loop/dist/operations/task-operations.js +279 -0
- package/node_modules/@ocean/loop/dist/operations/write-guard.js +157 -0
- package/node_modules/@ocean/loop/dist/runs/prompt-assembly.js +112 -0
- package/node_modules/@ocean/loop/dist/runs/run-agent.js +425 -0
- package/node_modules/@ocean/loop/dist/runs/run-authorization.js +24 -0
- package/node_modules/@ocean/loop/dist/runs/tool-loop.js +173 -0
- package/node_modules/@ocean/loop/dist/sessions/session-closeout.js +150 -0
- package/node_modules/@ocean/loop/dist/sessions/session-pointer.js +133 -0
- package/node_modules/@ocean/loop/dist/sessions/session-projects.js +26 -0
- package/node_modules/@ocean/loop/dist/sessions/session-retention.js +132 -0
- package/node_modules/@ocean/loop/dist/tasks/archive-tasks.js +210 -0
- package/node_modules/@ocean/loop/dist/tasks/checkpoint-task.js +31 -0
- package/node_modules/@ocean/loop/dist/tasks/claim-task.js +126 -0
- package/node_modules/@ocean/loop/dist/tasks/list-tasks.js +113 -0
- package/node_modules/@ocean/loop/dist/tasks/new-task.js +42 -0
- package/node_modules/@ocean/loop/dist/tasks/renumber-tasks.js +134 -0
- package/node_modules/@ocean/loop/dist/tasks/verification-readiness.js +78 -0
- package/node_modules/@ocean/loop/dist/tasks/verify-task.js +234 -0
- package/node_modules/@ocean/loop/package.json +11 -0
- package/node_modules/@ocean/market/dist/adapters/mcp-adapter.js +64 -0
- package/node_modules/@ocean/market/dist/adapters/owned-directory.js +89 -0
- package/node_modules/@ocean/market/dist/adapters/plugin-adapter.js +39 -0
- package/node_modules/@ocean/market/dist/adapters/skill-adapter.js +32 -0
- package/node_modules/@ocean/market/dist/capability/adapter.js +2 -0
- package/node_modules/@ocean/market/dist/capability/catalog.js +63 -0
- package/node_modules/@ocean/market/dist/capability/content-digest.js +40 -0
- package/node_modules/@ocean/market/dist/capability/registry.js +81 -0
- package/node_modules/@ocean/market/dist/install/default-marketplace.js +47 -0
- package/node_modules/@ocean/market/dist/install/lock.js +34 -0
- package/node_modules/@ocean/market/dist/install/marketplace-service.js +165 -0
- package/node_modules/@ocean/market/dist/mcp/browser-bridge.js +263 -0
- package/node_modules/@ocean/market/dist/mcp/mcp-connection.js +67 -0
- package/node_modules/@ocean/market/dist/mcp/mcp-gateway.js +317 -0
- package/node_modules/@ocean/market/dist/mcp/mcp-launch.js +102 -0
- package/node_modules/@ocean/market/dist/mcp/mcp-runner.js +32 -0
- package/node_modules/@ocean/market/dist/security/description-scan.js +45 -0
- package/node_modules/@ocean/market/dist/security/permissions.js +57 -0
- package/node_modules/@ocean/market/dist/security/sandbox.js +74 -0
- package/node_modules/@ocean/market/dist/skills/core-skill-sync.js +113 -0
- package/node_modules/@ocean/market/dist/skills/signal-detection.js +84 -0
- package/node_modules/@ocean/market/dist/skills/skill-curation.js +123 -0
- package/node_modules/@ocean/market/dist/skills/skill-hub.js +220 -0
- package/node_modules/@ocean/market/dist/skills/task-observer.js +165 -0
- package/node_modules/@ocean/market/package.json +11 -0
- package/node_modules/@ocean/services/dist/browser/browser-service.js +124 -0
- package/node_modules/@ocean/services/dist/browser/browser-session.js +287 -0
- package/node_modules/@ocean/services/dist/browser/browser-task-runner.js +70 -0
- package/node_modules/@ocean/services/dist/doctor/workspace-doctor.js +547 -0
- package/node_modules/@ocean/services/dist/infrastructure/mcp/call-ledger.js +114 -0
- package/node_modules/@ocean/services/dist/infrastructure/mcp/mcp-client.js +162 -0
- package/node_modules/@ocean/services/dist/infrastructure/mcp/obsidian-server.js +251 -0
- package/node_modules/@ocean/services/dist/infrastructure/mcp/ocean-server.js +880 -0
- package/node_modules/@ocean/services/dist/infrastructure/mcp/server-version.js +20 -0
- package/node_modules/@ocean/services/dist/infrastructure/mcp/tool-registry.js +29 -0
- package/node_modules/@ocean/services/dist/obsidian/conflict-log.js +68 -0
- package/node_modules/@ocean/services/dist/obsidian/inbox-promotion.js +80 -0
- package/node_modules/@ocean/services/dist/obsidian/vault-discovery.js +113 -0
- package/node_modules/@ocean/services/dist/obsidian/vault-ingestion.js +77 -0
- package/node_modules/@ocean/services/dist/obsidian/vault-sync.js +73 -0
- package/node_modules/@ocean/services/dist/obsidian/vault-writer.js +75 -0
- package/node_modules/@ocean/services/package.json +11 -0
- package/ocean-marketplace.json +415 -0
- package/package.json +67 -4
- package/skills/core/business-logic/SKILL.md +22 -0
- package/skills/core/catch-up/SKILL.md +17 -0
- package/skills/core/core-thinking/SKILL.md +11 -0
- package/skills/core/design-thinking/SKILL.md +19 -0
- package/skills/core/graft/SKILL.md +156 -0
- package/skills/core/loop/SKILL.md +20 -0
- package/skills/core/session-handoff/SKILL.md +15 -0
- package/skills/core/use-browser/SKILL.md +69 -0
- package/skills/core/verification/SKILL.md +11 -0
- package/skills/index.json +56 -0
- package/templates/README.md +4 -0
- package/templates/profiles/default.json +51 -0
- package/templates/profiles/developer.json +51 -0
- package/templates/profiles/reviewer.json +51 -0
- package/templates/profiles/strategist.json +51 -0
- package/templates/workspace/00-inbox/INBOX.md +7 -0
- package/templates/workspace/00-inbox/candidates/.gitkeep +0 -0
- package/templates/workspace/00-inbox/native/.gitkeep +0 -0
- package/templates/workspace/01-daily/.gitkeep +0 -0
- package/templates/workspace/02-personal/CONFLICTS.md +7 -0
- package/templates/workspace/02-personal/MEMORY.md +15 -0
- package/templates/workspace/02-personal/goals/.gitkeep +0 -0
- package/templates/workspace/02-personal/identity/.gitkeep +0 -0
- package/templates/workspace/02-personal/preferences/.gitkeep +0 -0
- package/templates/workspace/03-professional/.gitkeep +0 -0
- package/templates/workspace/04-projects/PROJECTS.md +5 -0
- package/templates/workspace/04-projects/_template/docs/.gitkeep +0 -0
- package/templates/workspace/04-projects/_template/memory/.gitkeep +0 -0
- package/templates/workspace/04-projects/_template/tasks/.gitkeep +0 -0
- package/templates/workspace/05-knowledge/KNOWLEDGE.md +8 -0
- package/templates/workspace/05-knowledge/decisions/.gitkeep +0 -0
- package/templates/workspace/05-knowledge/lessons/.gitkeep +0 -0
- package/templates/workspace/06-templates/TEMPLATES.md +25 -0
- package/templates/workspace/06-templates/decision.md +8 -0
- package/templates/workspace/06-templates/intelligence.md +32 -0
- package/templates/workspace/06-templates/project-claude.md +48 -0
- package/templates/workspace/06-templates/session.md +38 -0
- package/templates/workspace/06-templates/task.md +42 -0
- package/templates/workspace/MANIFEST.json +51 -0
- package/templates/workspace/bridge/config/CONFIG.md +21 -0
- package/templates/workspace/bridge/config/runtime.json +4 -0
- package/templates/workspace/charter/core.md +104 -0
- package/templates/workspace/charter/policies/README.md +31 -0
- package/templates/workspace/charter/policies/claude-code-context.md +90 -0
- package/templates/workspace/charter/policies/concise-output.md +29 -0
- package/templates/workspace/charter/policies/context.md +91 -0
- package/templates/workspace/charter/policies/contracts/task.md +189 -0
- package/templates/workspace/charter/policies/git.md +60 -0
- package/templates/workspace/charter/policies/graph.md +47 -0
- package/templates/workspace/charter/policies/knowledge.md +33 -0
- package/templates/workspace/charter/policies/lifecycle.md +119 -0
- package/templates/workspace/charter/policies/memory.md +67 -0
- package/templates/workspace/charter/policies/minimal-change.md +43 -0
- package/templates/workspace/charter/policies/models.md +57 -0
- package/templates/workspace/charter/policies/privacy-terms.txt +3 -0
- package/templates/workspace/charter/policies/response.md +39 -0
- package/templates/workspace/charter/policies/skill-observer.md +44 -0
- package/templates/workspace/charter/policies/stack.md +23 -0
- package/templates/workspace/charter/policies/task.md +139 -0
- package/templates/workspace/charter/policies/verification.md +29 -0
- package/templates/workspace/sessions/.gitkeep +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Task record schema
|
|
2
|
+
|
|
3
|
+
The structural contract for `~/ocean/04-projects/<project>/tasks/<ID>/task.md`. One
|
|
4
|
+
file per durable task. **The project owns its work**, and that record is the
|
|
5
|
+
authoritative one. `task.md` is the **only** mandatory file in a task; everything
|
|
6
|
+
else is an artifact created on demand (see §4).
|
|
7
|
+
|
|
8
|
+
There is no global task namespace. `~/ocean/tasks/` held redirect pointers for one
|
|
9
|
+
release and has been deleted; an id resolves directly at `04-projects/<project>/tasks/<ID>/`
|
|
10
|
+
(`ocean-paths` was the resolver for this in an earlier CLI generation — it was
|
|
11
|
+
consolidated away and is not a real command anymore). If two projects ever claim the
|
|
12
|
+
same id, that is a conflict to resolve by hand, not to merge.
|
|
13
|
+
|
|
14
|
+
`ocean memory doctor` does not validate this — it owns the memory store. This schema is
|
|
15
|
+
the contract; the rule that enforces it in practice is
|
|
16
|
+
`charter/policies/task.md` (`ocean policy task`).
|
|
17
|
+
|
|
18
|
+
**Workspace paths are the live layout, not a moving target.** The relocation this
|
|
19
|
+
section used to describe (several private roots migrated one reversible slice at a
|
|
20
|
+
time via an `ocean-paths` resolver) is finished; that tool was consolidated away and
|
|
21
|
+
is not a real command anymore. There is no `work` root — tasks and context live
|
|
22
|
+
directly under each project, so `04-projects/<project>/tasks/<ID>/` is the lookup for a
|
|
23
|
+
durable record. If a root is ever found present in two different layouts at once,
|
|
24
|
+
that is a conflict to resolve by hand — never merge, copy, or pick a side
|
|
25
|
+
automatically.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 1. Identity
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
<SCOPE>-<NNN>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`SCOPE` is short, uppercase, and stable: a project key from
|
|
36
|
+
`04-projects/registry.md` (`RCCM`, `RIYADA`, `HARMONY`), `OCEAN` for work on this
|
|
37
|
+
system, or `OPS` for machine/workspace work with no project. `NNN` is a zero-padded
|
|
38
|
+
counter within the scope, never reused.
|
|
39
|
+
|
|
40
|
+
The ID is the task's name everywhere — index, session records, commit messages, chat.
|
|
41
|
+
It never changes, including after the task is archived.
|
|
42
|
+
|
|
43
|
+
## 2. Frontmatter
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
---
|
|
47
|
+
id: OCEAN-002 # required · matches the directory name
|
|
48
|
+
title: <one line> # required · what the task is, not how
|
|
49
|
+
state: active # required · see §3
|
|
50
|
+
project: ocean # required · registry name, or `-` for none
|
|
51
|
+
opened: 2026-08-31 # required · YYYY-MM-DD
|
|
52
|
+
updated: 2026-08-31 # required · YYYY-MM-DD, bumped whenever the file changes
|
|
53
|
+
artifacts: [decisions.md] # required · [] when task.md is the whole record
|
|
54
|
+
|
|
55
|
+
class: medium # optional · small | medium | large — how much reasoning the work needs
|
|
56
|
+
expected_context: small # optional · small | medium | large — how much context it should take
|
|
57
|
+
---
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`class` and `expected_context` are **durable classifications of the task**, and the only
|
|
61
|
+
routing-relevant fields a task carries. `class` is what the work is: `small` is a change
|
|
62
|
+
whose shape is already known, `medium` is ordinary implementation and debugging, `large` is
|
|
63
|
+
architecture, security, an ambiguous requirement or a migration. `expected_context` is a
|
|
64
|
+
prediction, used to notice when a task's real context runs far past what its shape implied.
|
|
65
|
+
|
|
66
|
+
Neither is a limit, and neither is enforced. **Runtime decisions do not belong here** — the
|
|
67
|
+
model and effort actually used, which memory and knowledge were retrieved, which
|
|
68
|
+
capabilities were exposed, whether a graph was consulted, and what the session did at the
|
|
69
|
+
end are all properties of one run rather than of the task, and are recorded in runtime
|
|
70
|
+
receipts. A task that accumulated them would become a log of every attempt at it.
|
|
71
|
+
|
|
72
|
+
`claimed_by`, `claimed_at` and `claimed_paths` are **optional and transient**: they say a
|
|
73
|
+
session is working on the task right now (T-270). `claimed_at` is an ISO-8601 UTC timestamp;
|
|
74
|
+
`claimed_paths` is an inline list (`[kernel, docs]`). A claim goes stale after 2 hours and is
|
|
75
|
+
removed by `ocean tasks release` — it is not part of the task's lasting description. Rules
|
|
76
|
+
and commands: `ocean policy task`, "Claims".
|
|
77
|
+
|
|
78
|
+
`artifacts` lists what actually exists beside `task.md`, and nothing more. It is a
|
|
79
|
+
manifest, not a plan: a name appears here the moment the file is written and never
|
|
80
|
+
before. An empty list is the normal, healthy value.
|
|
81
|
+
|
|
82
|
+
`project: -` is legitimate. A task does not need a project.
|
|
83
|
+
|
|
84
|
+
## 3. States
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
todo ──▶ active ──▶ done ──▶ (archive/)
|
|
88
|
+
│ ▲
|
|
89
|
+
│ └──── paused ──┐ deliberately set aside; resumable by choice
|
|
90
|
+
├──────▶ blocked ─┤ cannot proceed; waiting on something external
|
|
91
|
+
│ ▲ │
|
|
92
|
+
│ └────────┘
|
|
93
|
+
└──────▶ cancelled ──▶ (archive/)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
| State | Means | Leaves when |
|
|
97
|
+
| ----------- | ----------------------------------------------------------- | --------------------------------------- |
|
|
98
|
+
| `todo` | promoted to a durable task, not started | work begins → `active` |
|
|
99
|
+
| `active` | being worked now | paused, blocked, finished, or abandoned |
|
|
100
|
+
| `paused` | set aside by choice, resumable | picked up again → `active` |
|
|
101
|
+
| `blocked` | cannot proceed; the blocker is named in the body | blocker clears → `active` |
|
|
102
|
+
| `done` | finished **and** verified — the verification ran and passed | archived |
|
|
103
|
+
| `cancelled` | abandoned; the reason is recorded in the body | archived |
|
|
104
|
+
|
|
105
|
+
**There is no `current` task and no stored pointer to one.** The active set is derived:
|
|
106
|
+
every task whose `state: active`. More than one may be active at a time — that is the
|
|
107
|
+
normal case, not an error. Which one a given moment concerns is resolved the same way
|
|
108
|
+
the active _project_ is (cwd against the registry) or by asking. Nothing mutable is
|
|
109
|
+
stored to answer it.
|
|
110
|
+
|
|
111
|
+
`done` is a state; archiving is a location. A task stays under `tasks/` while it is
|
|
112
|
+
still live context and moves to `archive/<ID>/` when it is not.
|
|
113
|
+
|
|
114
|
+
## 4. Body
|
|
115
|
+
|
|
116
|
+
Recovery fields first — they are what a cold session reads. This is the checkpoint
|
|
117
|
+
mechanism: for most tasks `task.md` **is** the checkpoint, and no separate
|
|
118
|
+
`checkpoint.md` exists.
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
## Objective
|
|
122
|
+
|
|
123
|
+
<what done looks like from outside, one or two lines>
|
|
124
|
+
|
|
125
|
+
## Definition of done
|
|
126
|
+
|
|
127
|
+
<the observable condition that proves it works>
|
|
128
|
+
|
|
129
|
+
## Next action
|
|
130
|
+
|
|
131
|
+
<the single next thing to do — concrete enough to start cold>
|
|
132
|
+
|
|
133
|
+
## Verification
|
|
134
|
+
|
|
135
|
+
<the command that proves the work, and its last actual result>
|
|
136
|
+
|
|
137
|
+
## Blockers
|
|
138
|
+
|
|
139
|
+
<none, or the specific thing and who or what can clear it>
|
|
140
|
+
|
|
141
|
+
## Log
|
|
142
|
+
|
|
143
|
+
- 2026-08-31 — <what landed, with the file it touched>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Optional sections, added only when there is something to put in them: `## Scope`
|
|
147
|
+
(explicit non-goals), `## Sessions` (only when the session records are hard to find).
|
|
148
|
+
|
|
149
|
+
`## Log` is append-only and dated. It replaces the old `completed:` / `remaining:` /
|
|
150
|
+
`last_successful_action:` fields: what landed is in the log, what remains is the next
|
|
151
|
+
action, and the last successful action is the last log line.
|
|
152
|
+
|
|
153
|
+
## 5. Artifacts
|
|
154
|
+
|
|
155
|
+
An artifact is any file in the task directory other than `task.md`. It exists only
|
|
156
|
+
because something needed to persist that `task.md` could not hold.
|
|
157
|
+
|
|
158
|
+
**No artifact is scaffolded. Ever.** There is no fixed set, no template directory, and
|
|
159
|
+
no empty placeholder. A task directory containing only `task.md` is complete.
|
|
160
|
+
|
|
161
|
+
Two tests decide, in order:
|
|
162
|
+
|
|
163
|
+
1. **Is it needed?** Would a future session — or the same session after compaction — be
|
|
164
|
+
materially worse off without this file? If the answer is "it might be nice", the
|
|
165
|
+
answer is no.
|
|
166
|
+
2. **Does it belong to the task, or to the world?** Task-specific → the task directory.
|
|
167
|
+
Reusable beyond this task → `05-knowledge/<kind>/` instead, and the task links
|
|
168
|
+
to it. Durable fact about the user → `02-personal/`.
|
|
169
|
+
|
|
170
|
+
Test 2 is the one that keeps task directories small. A finding worth keeping is almost
|
|
171
|
+
always knowledge, not a task artifact.
|
|
172
|
+
|
|
173
|
+
Naming is descriptive and lowercase (`research.md`, `decisions.md`, `checkpoint.md`,
|
|
174
|
+
`api-notes.md`). The common shapes and their triggers are in
|
|
175
|
+
`charter/policies/task.md` § Task artifacts; that list is a guide to recognising a trigger, never a
|
|
176
|
+
checklist to satisfy.
|
|
177
|
+
|
|
178
|
+
## 6. Completion
|
|
179
|
+
|
|
180
|
+
When a task reaches `done`:
|
|
181
|
+
|
|
182
|
+
1. The verification in `## Verification` has actually run, and its real output is recorded.
|
|
183
|
+
2. Each artifact is resolved once — promoted to `05-knowledge/<kind>/` if reusable,
|
|
184
|
+
left with the task if not. Nothing is copied to both places.
|
|
185
|
+
3. `state: done`, `updated:` bumped, the index line updated.
|
|
186
|
+
4. The task moves to `archive/<ID>/` when it stops being live context.
|
|
187
|
+
|
|
188
|
+
Steps 2–4 are bookkeeping: they belong to `task-scribe` and `memory-curator`, never to a
|
|
189
|
+
reasoning model.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Policy — git
|
|
2
|
+
|
|
3
|
+
Load for anything beyond reading git state. The hard remote boundary is in the bootstrap
|
|
4
|
+
because it must never depend on this file having been read.
|
|
5
|
+
|
|
6
|
+
**Local and remote are separate trust boundaries. Maximum autonomy locally; explicit human
|
|
7
|
+
approval remotely.**
|
|
8
|
+
|
|
9
|
+
## Free, no asking
|
|
10
|
+
|
|
11
|
+
`status` · `diff` · `log` · `show` · `branch` · `checkout` / `switch` · `add` · `commit` ·
|
|
12
|
+
`stash` · `fetch` · `pull` · rebasing local unpushed work · reading anything with `gh`.
|
|
13
|
+
|
|
14
|
+
## Publication is the last step, not the next one
|
|
15
|
+
|
|
16
|
+
Keep substantial workspace, public-repo and private-repo restructuring local until the
|
|
17
|
+
owner says the structure is settled and explicitly asks to publish. Do not propose `push`
|
|
18
|
+
as the automatic next action while architecture or public/private boundaries are still
|
|
19
|
+
moving.
|
|
20
|
+
|
|
21
|
+
## When local work is done
|
|
22
|
+
|
|
23
|
+
Stop and report. Do not push, and do not ask permission in advance of finishing:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
The task is complete locally.
|
|
27
|
+
|
|
28
|
+
Branch: <name>
|
|
29
|
+
Commit: <sha> <subject>
|
|
30
|
+
Tests: <command> → <actual result>
|
|
31
|
+
Changes: <n files — the notable ones>
|
|
32
|
+
|
|
33
|
+
Ready to push and open/update the PR. Do you want me to push?
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
After an explicit yes: push → verify the remote ref → `gh pr list --head <branch>` →
|
|
37
|
+
create the PR, or update the existing one. **Never open a second PR for a branch that
|
|
38
|
+
already has one.** Never merge, never close, never force push, never rewrite history that
|
|
39
|
+
has been pushed — each is the owner's call, asked for by name.
|
|
40
|
+
|
|
41
|
+
Run verification locally to prove a fix, then delete temporary test files before staging.
|
|
42
|
+
|
|
43
|
+
## Working in the kernel
|
|
44
|
+
|
|
45
|
+
Code work happens in `~/ocean/kernel` itself, on its own branch — no worktrees (owner decision
|
|
46
|
+
2026-10-16). `git fetch origin && git switch -c <branch> origin/main`, commit, push by name with
|
|
47
|
+
approval, PR, owner merges. If the kernel tree already has uncommitted changes you did not make,
|
|
48
|
+
they belong to another session: never stash, commit, discard or `git add -A` them — stage by
|
|
49
|
+
path, or stop and say so. Before editing, claim the task and the dirs
|
|
50
|
+
(`ocean policy task`, "Claims"); use path `kernel` if you will switch branches or commit — the
|
|
51
|
+
checkout has one HEAD, and another session may be committing in it right now.
|
|
52
|
+
`~/ocean` is not a Git repository for our purposes (see below), so task records are plain-file
|
|
53
|
+
edits and need no branch.
|
|
54
|
+
|
|
55
|
+
## Only the kernel uses Git
|
|
56
|
+
|
|
57
|
+
Git exists only in `~/ocean/kernel` (its own remote): branch, push with explicit
|
|
58
|
+
approval, PR, owner merges. Everything else, including `~/ocean`, is local files with no remote
|
|
59
|
+
and no repository to think about — edit them, never commit or mention committing. Copying any
|
|
60
|
+
private data into `kernel/` crosses a trust boundary and needs approval each time.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Policy — Graph Brain
|
|
2
|
+
|
|
3
|
+
Load when navigating an unfamiliar or large tree. Graph Brain is an **accelerator, not a
|
|
4
|
+
first step.**
|
|
5
|
+
|
|
6
|
+
## Decide in this order
|
|
7
|
+
|
|
8
|
+
1. **Can the cheap route answer it?** `ocean context`, the project index, the registry,
|
|
9
|
+
`grep`, a targeted read. Usually yes — then stop.
|
|
10
|
+
2. **Is a fresh graph already built?** Query it.
|
|
11
|
+
3. **Would building one materially help this task?** Only then build it.
|
|
12
|
+
|
|
13
|
+
A one-line fix, a config change, an obvious bug or a file you already know needs no graph.
|
|
14
|
+
Reading the file is faster.
|
|
15
|
+
|
|
16
|
+
## Two graphs, never merged
|
|
17
|
+
|
|
18
|
+
| Ask | Graph | Root |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| where is X recorded · what did we decide · what is still open | global brain | `~/ocean` |
|
|
21
|
+
| how does this code work · what calls it · what breaks if I change it | project graph | the project repo |
|
|
22
|
+
| what is true about the owner | neither — `memory/MEMORY.md` | |
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
graphify query "<question>" graphify path "<A>" "<B>" graphify explain "<X>"
|
|
26
|
+
cd <root> && graphify update . # --force after deletions
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- **`--code-only` is mandatory** on every client and public code repository.
|
|
30
|
+
- **Never pass `--no-gitignore`** — it drags worktrees and `runtime/` into the graph.
|
|
31
|
+
- **Never merge the two graphs, and never `--global`.** The private graph carries personal
|
|
32
|
+
memory and is `publishable: false`.
|
|
33
|
+
- **Never set `GEMINI_API_KEY` / `GOOGLE_API_KEY`.** With a key set, extraction routes to
|
|
34
|
+
Google, which on the private root would ship memory off the machine. There is no key
|
|
35
|
+
today; keep it that way.
|
|
36
|
+
|
|
37
|
+
## What a graph is and is not
|
|
38
|
+
|
|
39
|
+
**Graph explains. Files decide. Tests prove.** It tells you where to look; open the real
|
|
40
|
+
file before changing anything, and prove the change with tests. Never quote a graph node as
|
|
41
|
+
evidence — it is a summary from extraction time and goes stale the moment a file changes.
|
|
42
|
+
|
|
43
|
+
Derived, never authoritative: rebuilt on demand, gitignored, never edited, never committed,
|
|
44
|
+
never published. It may suggest a relevant skill, capability or record, but the real record
|
|
45
|
+
must still be read and the task's approval gates still apply.
|
|
46
|
+
|
|
47
|
+
Detail: `05-knowledge/architecture/ocean-graph-brain.md`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Policy — knowledge
|
|
2
|
+
|
|
3
|
+
Load when recording or retrieving what past work taught.
|
|
4
|
+
|
|
5
|
+
**Knowledge answers: what did work teach us that saves effort next time.** Lifespan: until
|
|
6
|
+
superseded. `~/ocean/05-knowledge/<kind>/`.
|
|
7
|
+
|
|
8
|
+
Knowledge exists to **cut tokens**: retrieving one compact entry beats re-reading old files
|
|
9
|
+
and re-deriving what was already established.
|
|
10
|
+
|
|
11
|
+
## Kinds
|
|
12
|
+
|
|
13
|
+
`task-results/` · `technical-solutions/` · `decisions/` · `architecture/` · `research/` ·
|
|
14
|
+
`discoveries/` · `failures/`
|
|
15
|
+
|
|
16
|
+
## Before investigating
|
|
17
|
+
|
|
18
|
+
Search `knowledge/` **before** investigating from scratch. **Check `decisions/` before
|
|
19
|
+
proposing something that contradicts a past decision** — that is the section's whole
|
|
20
|
+
purpose. `knowledge/README.md` is the index.
|
|
21
|
+
|
|
22
|
+
## Writing
|
|
23
|
+
|
|
24
|
+
Small and factual. An entry that has to be skimmed has failed. No transcripts, no
|
|
25
|
+
narration. Mark verification honestly: `verified` (we ran it) · `inferred` · `unverified` ·
|
|
26
|
+
`outdated`. A guess recorded as verified is worse than no entry.
|
|
27
|
+
|
|
28
|
+
## Deduplicate
|
|
29
|
+
|
|
30
|
+
Do not store the same content in a session record, a task, knowledge, memory and the
|
|
31
|
+
daily log. **One authoritative artifact, plus references.** A decision is stored once; the
|
|
32
|
+
task references it, the session references it, and the daily log records only that the
|
|
33
|
+
decision was made.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Policy — the context lifecycle
|
|
2
|
+
|
|
3
|
+
Load when deciding whether this session should keep going.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
WORK → PERSIST DURABLE STATE → DETECT BOUNDARY → CHECKPOINT
|
|
7
|
+
→ DISCARD LOW-VALUE WORKING CONTEXT → RECONSTRUCT CHEAPLY → CONTINUE
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**Persistent intelligence without persistent context.** Durable state lives on disk; the
|
|
11
|
+
working context is disposable. A long-lived session is not the execution model — it is the
|
|
12
|
+
thing measurement found expensive.
|
|
13
|
+
|
|
14
|
+
## Why
|
|
15
|
+
|
|
16
|
+
Measured over 53 sessions: per-turn context grew roughly linearly and never fell, no
|
|
17
|
+
session ever checkpointed and restarted, and cached re-reads were 57% of weighted spend.
|
|
18
|
+
The always-loaded prompt is 8% of where a long session ends up. Session length is the
|
|
19
|
+
cost.
|
|
20
|
+
|
|
21
|
+
## The decision is a command, not a judgement call
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ocean lifecycle # continue · checkpoint · compact · fresh · handoff
|
|
25
|
+
ocean lifecycle --task <ID> # against one record
|
|
26
|
+
ocean lifecycle --json # the same verdict, with every signal behind it
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Deterministic, no model, and it explains itself. Evidence it takes from the records and
|
|
30
|
+
from the client's own transcript: task state, verification, whether the record
|
|
31
|
+
reconstructs cold, an open handoff, turn count, per-turn growth, large raw tool results.
|
|
32
|
+
|
|
33
|
+
**No single threshold decides anything.** Two independent cost signals are required
|
|
34
|
+
before context is called expensive, and it is never discarded for being large.
|
|
35
|
+
|
|
36
|
+
## What it cannot know, state explicitly
|
|
37
|
+
|
|
38
|
+
Nothing on disk knows whether the reasoning in flight still needs this transcript, whether
|
|
39
|
+
your next request starts a different workstream, or whether the next step is heavy
|
|
40
|
+
disposable investigation. Those are flags, and the default is conservative:
|
|
41
|
+
|
|
42
|
+
| | |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `--resolved` | nothing in flight depends on the current context |
|
|
45
|
+
| `--complete` | the task's work is done |
|
|
46
|
+
| `--transition <ID>` | the next request starts that other task |
|
|
47
|
+
| `--exploration` | the next step is heavy disposable investigation |
|
|
48
|
+
| `--milestone` · `--verification passed` | durable progress the record does not carry |
|
|
49
|
+
|
|
50
|
+
Without `--resolved`, FRESH is never recommended. That is deliberate: a keyword rule
|
|
51
|
+
guessing at intent would be trusted, and would be wrong.
|
|
52
|
+
|
|
53
|
+
## The five decisions
|
|
54
|
+
|
|
55
|
+
| | |
|
|
56
|
+
|---|---|
|
|
57
|
+
| **CONTINUE** | the same task is in flight and its context is still deciding the work |
|
|
58
|
+
| **CHECKPOINT** | durable progress the record does not yet carry — persist it, keep going |
|
|
59
|
+
| **COMPACT** | expensive, and the record cannot reconstruct it: compress rather than lose it |
|
|
60
|
+
| **FRESH** | the task is finished, or a different one starts, or context is expensive and the record reconstructs cold |
|
|
61
|
+
| **HANDOFF** | isolate heavy disposable investigation in a worker so its output never enters this context |
|
|
62
|
+
|
|
63
|
+
COMPACT is the narrow case, not the habit: it needs expense *and* a record that cannot
|
|
64
|
+
rebuild the work. Repeated compaction of the same context is the pattern this replaces.
|
|
65
|
+
|
|
66
|
+
## Checkpointing
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
ocean tasks checkpoint <ID> --note "what landed, evidence, verification state" \
|
|
70
|
+
--next "the one next action"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
One writer, one record. It writes nothing when nothing changed, so a boundary that is not
|
|
74
|
+
a boundary costs nothing.
|
|
75
|
+
|
|
76
|
+
Carries: goal · status · milestone · decisions · changed files · evidence · verification
|
|
77
|
+
state · blockers · next action · handoff state.
|
|
78
|
+
|
|
79
|
+
Never: conversation history · raw logs · repeated explanation · superseded reasoning ·
|
|
80
|
+
large tool output. Those are why the transcript is expensive; copying them into the record
|
|
81
|
+
moves the cost instead of removing it.
|
|
82
|
+
|
|
83
|
+
`log` is the one-line note. `checkpoint` also moves `## Next action`, which is what the
|
|
84
|
+
next cold session actually reads — a record whose next action describes the previous
|
|
85
|
+
boundary sends it to the wrong place.
|
|
86
|
+
|
|
87
|
+
## Restarting is the owner's move
|
|
88
|
+
|
|
89
|
+
No agent can clear or restart its own Claude Code session. `/clear` and `/effort` are
|
|
90
|
+
typed by a person, `--effort` and `--continue` start a new process, and a hook receives the
|
|
91
|
+
effort as read-only input. So FRESH prints the boundary and the resume command, and stops
|
|
92
|
+
there. Claiming a restart happened would be worse than naming whose move it is.
|
|
93
|
+
|
|
94
|
+
## Effort
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
ocean lifecycle effort --class <small|medium|large>
|
|
98
|
+
ocean lifecycle effort --doctor # what the client is configured to do, against policy
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Effort follows the declared class — `small: low`, `medium: medium`, `large: high` — and is
|
|
102
|
+
overridden **down** to `low` for mechanical work: grep, path lookup, task bookkeeping,
|
|
103
|
+
deterministic commands, summaries, simple edits, routine tests, file routing.
|
|
104
|
+
|
|
105
|
+
Raising it above the class default needs one of the recorded reasons in the model policy:
|
|
106
|
+
architecture contract change, security-sensitive decision, large blast radius, ambiguous
|
|
107
|
+
root cause, cross-system reasoning, or lower effort having demonstrably failed. A failure
|
|
108
|
+
count is not a reason.
|
|
109
|
+
|
|
110
|
+
The verified effort levers are client-owned: `claude --effort <level>` at launch,
|
|
111
|
+
`/effort` typed in a session, and `CLAUDE_CODE_EFFORT_LEVEL` for one process. Ocean does
|
|
112
|
+
not maintain a duplicate global `settings.json` effort setting.
|
|
113
|
+
|
|
114
|
+
Per-task effort via a subagent's `effort:` frontmatter is **confirmed not to work**:
|
|
115
|
+
re-probed 2026-09-05 from an ordinary session (no ultracode), a subagent declaring `high`
|
|
116
|
+
recorded `medium` — its parent session's level, not the declared one. `model:` in the same
|
|
117
|
+
frontmatter *is* honoured. The field has been removed from every agent file; a task's
|
|
118
|
+
effort is whatever the session runs at, full stop — set it with `--effort` or
|
|
119
|
+
`CLAUDE_CODE_EFFORT_LEVEL` before delegating. Full routing: `ocean policy models`.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Policy — memory
|
|
2
|
+
|
|
3
|
+
Load when recording or retrieving a durable fact about the owner.
|
|
4
|
+
|
|
5
|
+
**Memory answers: what is true about the owner and their world.** Lifespan: years.
|
|
6
|
+
`~/ocean/02-personal/<section>/`.
|
|
7
|
+
|
|
8
|
+
**The test when it is ambiguous:** would this still be true if they never wrote another line
|
|
9
|
+
of code? Yes → memory. No → knowledge (`knowledge.md`).
|
|
10
|
+
|
|
11
|
+
## One home
|
|
12
|
+
|
|
13
|
+
Ocean is the only memory home (`05-knowledge/decisions/ocean-is-the-only-memory-home.md`).
|
|
14
|
+
A client's own store (Claude Code, Codex, Gemini, Hermes, Antigravity, claude.ai) is a cache:
|
|
15
|
+
promote a durable fact found there into Ocean; on conflict Ocean wins.
|
|
16
|
+
|
|
17
|
+
## Sections
|
|
18
|
+
|
|
19
|
+
`identity/` · `education/` · `career/` · `projects/` · `goals/` · `travel/` ·
|
|
20
|
+
`preferences/` · `interests/`
|
|
21
|
+
|
|
22
|
+
**One canonical home per fact.** A fact touching two sections lives in the one matching its
|
|
23
|
+
meaning; the other links to it. Example: a course funded by a grant lives in `education/`,
|
|
24
|
+
the move it requires in `travel/`, and neither repeats the other. No place or topic gets its
|
|
25
|
+
own section just because it recurs.
|
|
26
|
+
|
|
27
|
+
Project *implementation* detail stays in the repo at `.claude/memory/`, not here. Project
|
|
28
|
+
memory lives in `04-projects/<project>/memory/` (indexed by its `MEMORY.md`); reference
|
|
29
|
+
material lives in `04-projects/<project>/docs/` — never at the project root.
|
|
30
|
+
|
|
31
|
+
## Retrieval — never load everything
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
task → identify the domain → read the index → open only what it names
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`memory/MEMORY.md` is the index and the only file read by default. A React question needs
|
|
38
|
+
`preferences/`. A question about that course needs `education/` and `travel/`. Neither
|
|
39
|
+
needs the other. Reading the whole store is a mistake, not thoroughness.
|
|
40
|
+
|
|
41
|
+
## Promotion
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
observation → candidate → classify → promote? → memory | knowledge | discard
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Promote only what will still be true and useful in a month, is not already recorded, and is
|
|
48
|
+
not derivable from the repo or git history. **Most observations promote to nothing** — that
|
|
49
|
+
is correct, not a failure. Search before writing; update an existing entry rather than
|
|
50
|
+
adding a near-duplicate. Never store secrets or temporary debugging state.
|
|
51
|
+
|
|
52
|
+
If a fact fits no existing section, say so and propose one rather than scattering it into
|
|
53
|
+
the nearest file.
|
|
54
|
+
|
|
55
|
+
## Conflicts
|
|
56
|
+
|
|
57
|
+
New information contradicting a record is never silently kept alongside it and never
|
|
58
|
+
resolved by invention. Record both versions in `memory/CONFLICTS.md`, ask which is current,
|
|
59
|
+
then update the owning file and remove the entry. Supersession by time — a job change, a
|
|
60
|
+
finished certificate — is not a conflict: update it, and mark the old value `historical` if
|
|
61
|
+
it still explains something.
|
|
62
|
+
|
|
63
|
+
## Writing
|
|
64
|
+
|
|
65
|
+
Delegate to `memory-curator`. It owns the section routing, the frontmatter schema and the
|
|
66
|
+
conflict procedure. `ai-memory doctor` checks structure, duplicates, broken links and
|
|
67
|
+
orphans.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Policy — minimal change
|
|
2
|
+
|
|
3
|
+
Load before writing new code, and before proposing a new file, dependency, or abstraction.
|
|
4
|
+
|
|
5
|
+
## The sequence
|
|
6
|
+
|
|
7
|
+
Answer these in order. Stop at the first one that resolves the task — do not keep going
|
|
8
|
+
"just in case" a later question would also apply.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
1. Does this actually need to exist?
|
|
12
|
+
2. Does the repository already do this somewhere?
|
|
13
|
+
3. Does the language or platform standard library solve it?
|
|
14
|
+
4. Does an already-installed dependency solve it?
|
|
15
|
+
5. Can an existing abstraction be extended safely, in place?
|
|
16
|
+
6. What is the smallest correct patch?
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Only after (6) does new code get written. Three similar lines beat a premature
|
|
20
|
+
abstraction; a bug fix does not need surrounding cleanup; a one-shot script does not need
|
|
21
|
+
a framework.
|
|
22
|
+
|
|
23
|
+
## What this never cuts
|
|
24
|
+
|
|
25
|
+
Never in the name of a smaller diff:
|
|
26
|
+
|
|
27
|
+
- validation, authorization, or a security check the task actually requires
|
|
28
|
+
- accessibility or data integrity
|
|
29
|
+
- error handling for a case that can actually happen
|
|
30
|
+
- backwards compatibility where something else still depends on the old shape
|
|
31
|
+
- a test that establishes the change is correct
|
|
32
|
+
|
|
33
|
+
The target is the smallest *necessary* implementation, not the smallest character count.
|
|
34
|
+
Removing a guard to shrink a diff is not this policy — it is a defect this policy exists
|
|
35
|
+
to prevent.
|
|
36
|
+
|
|
37
|
+
## Dependencies specifically
|
|
38
|
+
|
|
39
|
+
Before adding one, per `ocean policy stack`: what layer does it solve, do we already solve
|
|
40
|
+
that layer, and what is the runtime/context cost of pulling it in versus writing the 10%
|
|
41
|
+
actually needed. A dependency added to save twenty lines that then needs its own update
|
|
42
|
+
cadence, its own failure mode, and its own security surface is not a smaller change — it
|
|
43
|
+
is a deferred larger one.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Policy — model and effort routing
|
|
2
|
+
|
|
3
|
+
Load when choosing a model, choosing an effort level, or delegating.
|
|
4
|
+
|
|
5
|
+
Routing happens **by delegation to model-pinned agents**, never by a gateway and never by
|
|
6
|
+
asking the owner to switch. Recorded: `knowledge/decisions/no-model-routing-gateway.md`.
|
|
7
|
+
|
|
8
|
+
## Tiers
|
|
9
|
+
|
|
10
|
+
| Tier | What runs it | For |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| **0** | no model at all | path resolution, task lookup, project detection, parsing config, reading the registry, listing changed files, filtering a log, counting tokens |
|
|
13
|
+
| **1** | cheapest capable model | classification, small summaries, log reduction, retrieval ranking, bookkeeping |
|
|
14
|
+
| **2** | the normal model | implementation, UI, refactoring, ordinary debugging, tests, docs |
|
|
15
|
+
| **3** | the strong reasoning model | architecture, security reasoning, deeply ambiguous problems, difficult cross-system debugging, large migrations |
|
|
16
|
+
|
|
17
|
+
**Tier 0 first, always.** Before routing anything to a model, ask whether reliable
|
|
18
|
+
deterministic code already answers it. `ocean context`, `ocean tasks`, `ocean observe`
|
|
19
|
+
and `git` are Tier 0 and answer most of what a session needs to know. (`ocean-paths` was
|
|
20
|
+
a Tier-0 tool in an earlier CLI generation; it was consolidated away and is not a real
|
|
21
|
+
command anymore — resolve a task path directly at `04-projects/<project>/tasks/<ID>/`.)
|
|
22
|
+
|
|
23
|
+
A strong model should make difficult decisions, not spend turns on grep, file reading and
|
|
24
|
+
bookkeeping. **Administrative work never runs on the task's model**: memory and knowledge
|
|
25
|
+
routing → `memory-curator`; summaries, checkpoints, logs, registry updates → `task-scribe`.
|
|
26
|
+
|
|
27
|
+
## Effort follows the task's class
|
|
28
|
+
|
|
29
|
+
The task declares `class`. Match effort to it: `small` → low, `medium` → normal,
|
|
30
|
+
`large` → high. "Always think deeply" and "always be exhaustive" are not policies; they
|
|
31
|
+
are a standing bill.
|
|
32
|
+
|
|
33
|
+
## Escalation is evidence, not arithmetic
|
|
34
|
+
|
|
35
|
+
Escalate to Tier 3 when there is a **reason**, and record it:
|
|
36
|
+
|
|
37
|
+
- the failure is a genuine reasoning difficulty, not a typo or a wrong path;
|
|
38
|
+
- the cause is in a different place from the symptom;
|
|
39
|
+
- a race, a heisenbug, or state that changes under observation;
|
|
40
|
+
- the blast radius is large, or the change is architecturally load-bearing;
|
|
41
|
+
- two honest attempts failed **and the hypotheses ruled out are written down**.
|
|
42
|
+
|
|
43
|
+
Two failures alone are not a reason. Two failures whose evidence points somewhere the
|
|
44
|
+
current tier cannot reach is. Say one line — *"Two attempts failed; handing the root-cause
|
|
45
|
+
hunt to `debugger`, ruled out: X, Y."* — then do it. A bare counter is a conservative
|
|
46
|
+
floor, not the rule: never escalate past three failures without a written reason.
|
|
47
|
+
|
|
48
|
+
## Delegation carries the task forward
|
|
49
|
+
|
|
50
|
+
It never restarts it. Hand the agent the objective, what is already done, what was already
|
|
51
|
+
ruled out, and where the record is. Never re-derive established work.
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
simple: TASK → tier 2 → execute → verify → done
|
|
55
|
+
complex: TASK → architect (tier 3) → plan → tier 2 implements → test
|
|
56
|
+
→ debugger (tier 3) only if verification is genuinely hard
|
|
57
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Policy — response format
|
|
2
|
+
|
|
3
|
+
Load when writing a substantial reply or a report.
|
|
4
|
+
|
|
5
|
+
## Shape
|
|
6
|
+
|
|
7
|
+
The smallest response shape is enough for simple messages; use the lightest complete
|
|
8
|
+
format that answers the request. Use bold sparingly.
|
|
9
|
+
|
|
10
|
+
## Formatting rules
|
|
11
|
+
|
|
12
|
+
- Never claim a test passed, a fix worked, or a task is complete without a real check.
|
|
13
|
+
Say what is unverified.
|
|
14
|
+
- Do not perform destructive actions without explicit approval: delete, force-push,
|
|
15
|
+
overwrite, drop, or equivalent irreversible work.
|
|
16
|
+
- Do not mark owner approval or final verification on the user's behalf.
|
|
17
|
+
- Keep reports concise. No filler, no restating the request. A report ends with exactly
|
|
18
|
+
one next step.
|
|
19
|
+
- Use a markdown table for structured or comparative data instead of a bullet list.
|
|
20
|
+
- Every code block carries a language tag (`ts`, `bash`, `sql`, `text`, `json`, ...); never
|
|
21
|
+
an untagged block.
|
|
22
|
+
|
|
23
|
+
## Default tone
|
|
24
|
+
|
|
25
|
+
Direct, warm, no preamble. Answer first, explain only if needed.
|
|
26
|
+
|
|
27
|
+
## Prompt artifacts
|
|
28
|
+
|
|
29
|
+
A requested reusable prompt comes back as one fenced `text` block, ready to paste.
|
|
30
|
+
Explanatory prose stays outside the prompt block.
|
|
31
|
+
|
|
32
|
+
## Cost
|
|
33
|
+
|
|
34
|
+
Output and thinking are real cost. For execution work: result first; no preamble; no
|
|
35
|
+
repeating the plan after every tool call; no background replay unless the user asks.
|
|
36
|
+
|
|
37
|
+
For long-running work, update only on meaningful events: finding, defect, phase change,
|
|
38
|
+
blocker, verification result, or changed strategy. Silence between meaningful events is
|
|
39
|
+
correct.
|