@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,8 @@
|
|
|
1
|
+
### <Decision title>
|
|
2
|
+
**Date:** YYYY-MM-DD
|
|
3
|
+
**Context:** <what forced a choice>
|
|
4
|
+
**Options:** <a · b · c>
|
|
5
|
+
**Chosen:** <a>
|
|
6
|
+
**Reason:** <why, in terms of the context above>
|
|
7
|
+
**Consequences:** <what this commits us to, including the bad parts>
|
|
8
|
+
**Status:** Active | Superseded by <x> | Reversed
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# <Topic>
|
|
2
|
+
|
|
3
|
+
**Date:** YYYY-MM-DD
|
|
4
|
+
**Category:** ai | development | tools | research
|
|
5
|
+
|
|
6
|
+
## Question
|
|
7
|
+
|
|
8
|
+
<what prompted this>
|
|
9
|
+
|
|
10
|
+
## Findings
|
|
11
|
+
|
|
12
|
+
-
|
|
13
|
+
|
|
14
|
+
## Sources
|
|
15
|
+
|
|
16
|
+
- <title> — <url>
|
|
17
|
+
|
|
18
|
+
## Analysis
|
|
19
|
+
|
|
20
|
+
<what the findings actually mean, not a restatement of them>
|
|
21
|
+
|
|
22
|
+
## Why it matters
|
|
23
|
+
|
|
24
|
+
<relevance to my stack, projects, or goals — the reason this file exists>
|
|
25
|
+
|
|
26
|
+
## Action
|
|
27
|
+
|
|
28
|
+
<what to do, or "none — informational">
|
|
29
|
+
|
|
30
|
+
## Follow-up
|
|
31
|
+
|
|
32
|
+
<what to re-check, and when. Or "none".>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# <Project name>
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
<what it does and who uses it, in two lines>
|
|
6
|
+
|
|
7
|
+
## Stack
|
|
8
|
+
|
|
9
|
+
<framework · language · styling · data · deploy>
|
|
10
|
+
|
|
11
|
+
## Architecture
|
|
12
|
+
|
|
13
|
+
<the shape of the system: entry points, main modules, data flow. Only what isn't obvious from the tree.>
|
|
14
|
+
|
|
15
|
+
## Layout
|
|
16
|
+
|
|
17
|
+
| Path | What |
|
|
18
|
+
| ---- | ---- |
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# install
|
|
24
|
+
# dev
|
|
25
|
+
# build
|
|
26
|
+
# test
|
|
27
|
+
# lint
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Environment
|
|
31
|
+
|
|
32
|
+
Required env vars, **names only** — values live in the platform, never here.
|
|
33
|
+
|
|
34
|
+
| Var | Purpose |
|
|
35
|
+
| --- | ------- |
|
|
36
|
+
|
|
37
|
+
## Conventions
|
|
38
|
+
|
|
39
|
+
<what differs from the defaults in charter/policies/stack.md. If nothing differs, say so and stop.>
|
|
40
|
+
|
|
41
|
+
## Constraints
|
|
42
|
+
|
|
43
|
+
<non-negotiables: browser support, RTL, data scale, compliance, team rules>
|
|
44
|
+
|
|
45
|
+
## Status
|
|
46
|
+
|
|
47
|
+
**Current:** <where the project stands>
|
|
48
|
+
**Objective:** <what's being worked on now>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Session — <topic>
|
|
2
|
+
|
|
3
|
+
**Date:** YYYY-MM-DD HH:MM
|
|
4
|
+
**Project:** <name> · `<abs path>`
|
|
5
|
+
**Branch:** <branch>
|
|
6
|
+
**Tasks touched:** <TASK-ID, TASK-ID — or none>
|
|
7
|
+
|
|
8
|
+
## Objective
|
|
9
|
+
|
|
10
|
+
<what this session set out to do, one or two lines>
|
|
11
|
+
|
|
12
|
+
## Completed
|
|
13
|
+
|
|
14
|
+
-
|
|
15
|
+
|
|
16
|
+
## Files changed
|
|
17
|
+
|
|
18
|
+
-
|
|
19
|
+
|
|
20
|
+
## Decisions
|
|
21
|
+
|
|
22
|
+
<decision + why. Omit the section if none.>
|
|
23
|
+
|
|
24
|
+
## Problems / solutions
|
|
25
|
+
|
|
26
|
+
<what broke and what fixed it. Omit if none.>
|
|
27
|
+
|
|
28
|
+
## Discoveries
|
|
29
|
+
|
|
30
|
+
<non-obvious things learned that aren't already in the code. Omit if none.>
|
|
31
|
+
|
|
32
|
+
## Remaining
|
|
33
|
+
|
|
34
|
+
-
|
|
35
|
+
|
|
36
|
+
## Next step
|
|
37
|
+
|
|
38
|
+
<the single next action, concrete enough to start cold>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: <SCOPE-NNN>
|
|
3
|
+
title: <one line — what the task is, not how>
|
|
4
|
+
state: todo
|
|
5
|
+
project: <registry name, or ->
|
|
6
|
+
opened: <YYYY-MM-DD>
|
|
7
|
+
updated: <YYYY-MM-DD>
|
|
8
|
+
artifacts: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
<what done looks like from outside, one or two lines>
|
|
14
|
+
|
|
15
|
+
## Definition of done
|
|
16
|
+
|
|
17
|
+
<the observable condition that proves it works>
|
|
18
|
+
|
|
19
|
+
## Next action
|
|
20
|
+
|
|
21
|
+
<the single next thing to do — concrete enough to start cold>
|
|
22
|
+
|
|
23
|
+
## Verification
|
|
24
|
+
|
|
25
|
+
<the command that proves the work, and its last actual result>
|
|
26
|
+
|
|
27
|
+
## Blockers
|
|
28
|
+
|
|
29
|
+
<none, or the specific thing and who or what can clear it>
|
|
30
|
+
|
|
31
|
+
## Log
|
|
32
|
+
|
|
33
|
+
- <YYYY-MM-DD> — <what landed, with the file it touched>
|
|
34
|
+
|
|
35
|
+
<!--
|
|
36
|
+
Contract: ~/ocean/charter/policies/contracts/task.md
|
|
37
|
+
|
|
38
|
+
This file is the whole record for most tasks — it is the checkpoint. Add an artifact
|
|
39
|
+
beside it only when something needs to persist that this file cannot hold, and only when
|
|
40
|
+
a future session would be materially worse off without it. Reusable beyond this task?
|
|
41
|
+
It belongs in 05-knowledge/ instead. Delete this comment when you fill the template.
|
|
42
|
+
-->
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"description": "T-296 workspace template: every file and its class (default | private-empty | keep). Checked by scripts/check-template-purity.mjs.",
|
|
4
|
+
"files": {
|
|
5
|
+
"00-inbox/INBOX.md": "default",
|
|
6
|
+
"00-inbox/candidates/.gitkeep": "keep",
|
|
7
|
+
"00-inbox/native/.gitkeep": "keep",
|
|
8
|
+
"01-daily/.gitkeep": "keep",
|
|
9
|
+
"02-personal/CONFLICTS.md": "private-empty",
|
|
10
|
+
"02-personal/MEMORY.md": "default",
|
|
11
|
+
"02-personal/goals/.gitkeep": "keep",
|
|
12
|
+
"02-personal/identity/.gitkeep": "keep",
|
|
13
|
+
"02-personal/preferences/.gitkeep": "keep",
|
|
14
|
+
"03-professional/.gitkeep": "keep",
|
|
15
|
+
"04-projects/PROJECTS.md": "default",
|
|
16
|
+
"04-projects/_template/docs/.gitkeep": "keep",
|
|
17
|
+
"04-projects/_template/memory/.gitkeep": "keep",
|
|
18
|
+
"04-projects/_template/tasks/.gitkeep": "keep",
|
|
19
|
+
"05-knowledge/KNOWLEDGE.md": "default",
|
|
20
|
+
"05-knowledge/decisions/.gitkeep": "keep",
|
|
21
|
+
"05-knowledge/lessons/.gitkeep": "keep",
|
|
22
|
+
"06-templates/TEMPLATES.md": "default",
|
|
23
|
+
"06-templates/decision.md": "default",
|
|
24
|
+
"06-templates/intelligence.md": "default",
|
|
25
|
+
"06-templates/project-claude.md": "default",
|
|
26
|
+
"06-templates/session.md": "default",
|
|
27
|
+
"06-templates/task.md": "default",
|
|
28
|
+
"bridge/config/CONFIG.md": "default",
|
|
29
|
+
"bridge/config/runtime.json": "default",
|
|
30
|
+
"charter/core.md": "default",
|
|
31
|
+
"charter/policies/README.md": "default",
|
|
32
|
+
"charter/policies/claude-code-context.md": "default",
|
|
33
|
+
"charter/policies/concise-output.md": "default",
|
|
34
|
+
"charter/policies/context.md": "default",
|
|
35
|
+
"charter/policies/contracts/task.md": "default",
|
|
36
|
+
"charter/policies/git.md": "default",
|
|
37
|
+
"charter/policies/graph.md": "default",
|
|
38
|
+
"charter/policies/knowledge.md": "default",
|
|
39
|
+
"charter/policies/lifecycle.md": "default",
|
|
40
|
+
"charter/policies/memory.md": "default",
|
|
41
|
+
"charter/policies/minimal-change.md": "default",
|
|
42
|
+
"charter/policies/models.md": "default",
|
|
43
|
+
"charter/policies/privacy-terms.txt": "private-empty",
|
|
44
|
+
"charter/policies/response.md": "default",
|
|
45
|
+
"charter/policies/skill-observer.md": "default",
|
|
46
|
+
"charter/policies/stack.md": "default",
|
|
47
|
+
"charter/policies/task.md": "default",
|
|
48
|
+
"charter/policies/verification.md": "default",
|
|
49
|
+
"sessions/.gitkeep": "keep"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# config/
|
|
2
|
+
|
|
3
|
+
Private application configuration. **Never publishable.**
|
|
4
|
+
|
|
5
|
+
Managed by `ocean setup` and the runtime. Contains only machine-specific startup documentation; canonical governance (charter, policies, task contract) lives under `charter/`.
|
|
6
|
+
|
|
7
|
+
## Layout
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
config/
|
|
11
|
+
└── startup/ startup integration documentation (OS-level launch entries live in the OS)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Privacy
|
|
15
|
+
|
|
16
|
+
All files under `config/` are private workspace state. They may reference workspace-internal paths and contain behavioral configuration specific to this machine. Never commit or publish.
|
|
17
|
+
|
|
18
|
+
## Management
|
|
19
|
+
|
|
20
|
+
- Created by `ocean setup` during workspace bootstrap.
|
|
21
|
+
- `bridge/config/` is restricted to `0700` permissions as part of the private system tree.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Global rules
|
|
2
|
+
|
|
3
|
+
Canonical source: `charter/`. Shared by every AI client on this machine, and rendered into each
|
|
4
|
+
client's system prompt — so **everything here is paid for on every request of every session.**
|
|
5
|
+
It is a bootstrap and a router, nothing more.
|
|
6
|
+
|
|
7
|
+
Conditional detail lives in `charter/policies/` and is read when it applies:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ocean policy list # what exists, and when each applies
|
|
11
|
+
ocean policy <name> # print one
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Load | When |
|
|
15
|
+
| ---------------------- | --------------------------------------------------------------------- |
|
|
16
|
+
| `task` | starting, checkpointing or completing a unit of work |
|
|
17
|
+
| `context` | deciding what to read, how much, and when to stop |
|
|
18
|
+
| `lifecycle` | continuing, checkpointing, compacting, restarting cold or handing off |
|
|
19
|
+
| `memory` · `knowledge` | recording or retrieving a durable fact, or what past work taught |
|
|
20
|
+
| `git` | anything beyond reading git state |
|
|
21
|
+
| `models` | choosing a model or an effort level, or delegating |
|
|
22
|
+
| `concise-output` | producing any response |
|
|
23
|
+
| `minimal-change` | writing new code, or adding a file/dependency |
|
|
24
|
+
| `skill-observer` | a checkpoint, a handoff, or session end |
|
|
25
|
+
| `verification` | proving a change works |
|
|
26
|
+
| `response` | a substantial report |
|
|
27
|
+
| `graph` | navigating an unfamiliar or large tree |
|
|
28
|
+
| `stack` | choosing libraries or scaffolding a project |
|
|
29
|
+
|
|
30
|
+
## Who you are working with
|
|
31
|
+
|
|
32
|
+
**<owner name>** — use this exact spelling in anything that carries the owner's name. Everything
|
|
33
|
+
else about the owner (role, domain, constraints) is in `02-personal/MEMORY.md`, the index: read
|
|
34
|
+
it, then only the sections the task touches. Never the whole store.
|
|
35
|
+
|
|
36
|
+
## Language
|
|
37
|
+
|
|
38
|
+
<reply language, and any script-direction or formatting rule that is a correctness constraint>
|
|
39
|
+
|
|
40
|
+
## Working style
|
|
41
|
+
|
|
42
|
+
Direct, no preamble; infer intent from rough phrasing; ask **one** question at a time.
|
|
43
|
+
Non-trivial or irreversible work gets a one-line plan first, then wait — a one-line fix just gets
|
|
44
|
+
done. **Say what was verified versus assumed, separately** (verified = you ran the check,
|
|
45
|
+
assumed = a reasonable assumption) — never claim a test passed without running it. Detail on
|
|
46
|
+
output shape and code-change discipline: `ocean policy concise-output`,
|
|
47
|
+
`ocean policy minimal-change`.
|
|
48
|
+
|
|
49
|
+
## Minimum sufficient context
|
|
50
|
+
|
|
51
|
+
**Storage is not context. Never read a whole repository into context.** Load in layers, stop as
|
|
52
|
+
soon as you can act, expand on evidence when confidence is low — under-reading is a correctness
|
|
53
|
+
failure and outranks every budget. Detail and commands: `ocean policy context`,
|
|
54
|
+
`ocean policy lifecycle`.
|
|
55
|
+
|
|
56
|
+
## Authority — the hard boundaries
|
|
57
|
+
|
|
58
|
+
These never depend on another file having been read.
|
|
59
|
+
|
|
60
|
+
- **`git push` requires explicit approval, every time, on every repo.** Never push to `main` —
|
|
61
|
+
branch first, everything lands via pull request. A PR merge needs an explicit instruction from
|
|
62
|
+
the owner naming the merge. Silence, a prior approval from a different request, or inferring
|
|
63
|
+
intent from context does not count. Never close a PR, force push, or rewrite pushed history
|
|
64
|
+
unless asked by name.
|
|
65
|
+
- **Any AI client doing real work on a task works on its own branch — never directly on
|
|
66
|
+
`main`.** Branch at the start of the work. When that work is done, a PR is opened for it (still
|
|
67
|
+
under the push-approval rule above). Merge stays the owner's call, always.
|
|
68
|
+
- **Real work worth doing gets a task before it starts**, in `04-projects/<project>/tasks/<ID>/`
|
|
69
|
+
— not just recorded in a daily log or a commit message after the fact. See `ocean policy task`.
|
|
70
|
+
- **Git exists only in the kernel checkout.** Everything else in the workspace is local files:
|
|
71
|
+
edit them, never commit them. Copying any private data into the kernel needs approval each time.
|
|
72
|
+
- **Ask before:** deleting files or projects, database drops or migrations, force push,
|
|
73
|
+
rewriting pushed history, changing SSH keys or credentials, installing global software, and
|
|
74
|
+
anything irreversible. Rebasing local unpushed work is not in this list.
|
|
75
|
+
- Reading git state, committing, branching and stashing locally are free.
|
|
76
|
+
|
|
77
|
+
## Security
|
|
78
|
+
|
|
79
|
+
- Never write a secret, token, API key, password or connection string into any file, any
|
|
80
|
+
markdown, any generated config, or any commit.
|
|
81
|
+
- When inspecting `.env`, report **key names only** — never echo a value.
|
|
82
|
+
- Secrets belong in the platform, the OS keychain, or environment variables — never in a config
|
|
83
|
+
file that could be committed or synced.
|
|
84
|
+
|
|
85
|
+
## Where things live
|
|
86
|
+
|
|
87
|
+
| | |
|
|
88
|
+
| ----------------------------------------- | --------------------------------------------------------------- |
|
|
89
|
+
| what is true about the owner | `02-personal/` — index first |
|
|
90
|
+
| what work taught us | `05-knowledge/` — check `decisions/` before contradicting one |
|
|
91
|
+
| what we are working on | `04-projects/<project>/tasks/<ID>/` — the task is authoritative |
|
|
92
|
+
| a project's references · lessons | `04-projects/<project>/docs/` · `memory/` — never its root |
|
|
93
|
+
| what happened in one sitting | `sessions/` |
|
|
94
|
+
| the rules and config shaping every client | `charter/` (incl. `policies/`), `bridge/config/` |
|
|
95
|
+
|
|
96
|
+
**The task declares its own status, and nothing else does.** Every other view of it is
|
|
97
|
+
generated; `ocean tasks doctor` fails when one has drifted.
|
|
98
|
+
|
|
99
|
+
## Model routing
|
|
100
|
+
|
|
101
|
+
Use the default model for most work; do not ask which model to use. Prefer deterministic tools
|
|
102
|
+
over a model where they answer reliably. Delegate to subagents only when the owner asks for it.
|
|
103
|
+
|
|
104
|
+
Detail: `ocean policy models`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Policies — loaded when they apply, not before
|
|
2
|
+
|
|
3
|
+
`../rules/core.md` is the bootstrap: identity, the hard boundaries, and a routing table.
|
|
4
|
+
It is rendered into every AI client's system prompt, so every byte in it is paid for on
|
|
5
|
+
every request of every session, whether or not the request has anything to do with it.
|
|
6
|
+
|
|
7
|
+
These modules hold the rest. Each is read **when the work is of that kind**, through:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ocean policy <name> # print one module
|
|
11
|
+
ocean policy list # what exists, and when each applies
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Module | Load it when |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `task.md` | starting, checkpointing or completing a unit of work |
|
|
17
|
+
| `context.md` | deciding what to read, how much, and when to stop |
|
|
18
|
+
| `memory.md` | recording or retrieving a durable fact about the owner |
|
|
19
|
+
| `knowledge.md` | recording or retrieving what past work taught |
|
|
20
|
+
| `git.md` | anything beyond reading git state |
|
|
21
|
+
| `models.md` | choosing a model, an effort level, or delegating |
|
|
22
|
+
| `concise-output.md` | producing any response |
|
|
23
|
+
| `minimal-change.md` | writing new code, or adding a file/dependency |
|
|
24
|
+
| `skill-observer.md` | a checkpoint, a handoff, or session end |
|
|
25
|
+
| `verification.md` | proving a change works |
|
|
26
|
+
| `response.md` | formatting a substantial reply |
|
|
27
|
+
| `graph.md` | navigating an unfamiliar or large tree |
|
|
28
|
+
| `stack.md` | choosing libraries or scaffolding a project |
|
|
29
|
+
|
|
30
|
+
A module states what must be true. It never states how one client implements it — that is
|
|
31
|
+
the adapter's, and lives in the public repo.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Claude Code — extended context
|
|
2
|
+
|
|
3
|
+
Claude-Code-specific detail beyond `governance/rules/core.md`. Loaded on demand via
|
|
4
|
+
`ocean policy claude-code-context`, not injected on every request.
|
|
5
|
+
|
|
6
|
+
## Technical defaults
|
|
7
|
+
|
|
8
|
+
Record the owner's stack here once it is known (package manager, runtime, framework per kind of
|
|
9
|
+
project, styling, data layer, validation), so every session starts from the same defaults instead
|
|
10
|
+
of re-deciding them. Until then: follow each repository's own conventions, use one formatter,
|
|
11
|
+
validate environment variables at startup, and do not migrate a legacy repository unasked.
|
|
12
|
+
|
|
13
|
+
## Task loop
|
|
14
|
+
|
|
15
|
+
The default shape of any non-trivial task:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
UNDERSTAND → PLAN → EXECUTE → OBSERVE → TEST → VERIFY
|
|
19
|
+
→ error? → DIAGNOSE → FIX → RETEST (loop)
|
|
20
|
+
→ FINAL VERIFICATION → COMPLETE
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Continue until the authorized task is actually complete. **Changing the code is not
|
|
24
|
+
completion** — completion is the verification passing. Do not hand work back mid-task, and
|
|
25
|
+
do not keep asking whether to continue normal work; if part of the scope is genuinely
|
|
26
|
+
blocked, finish everything else and say plainly what was left and why.
|
|
27
|
+
|
|
28
|
+
### Checkpoints
|
|
29
|
+
For any task longer than a few steps, checkpoint into the task record itself:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
ocean tasks checkpoint <ID> --note "what landed, evidence, verification state" \
|
|
33
|
+
--next "the one next action"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The record at `04-projects/<project>/tasks/<ID>/task.md` carries objective,
|
|
37
|
+
definition of done, verification state, blockers and next action. Update it as steps land —
|
|
38
|
+
it is what makes recovery possible after compaction, a model switch, a crash, or an
|
|
39
|
+
interrupted session.
|
|
40
|
+
|
|
41
|
+
There is no `current.md` and no separate checkpoint file; both were folded into the record
|
|
42
|
+
(`knowledge/decisions/views-are-generated-records-are-authoritative.md`) because a view
|
|
43
|
+
maintained by hand is a second record with no owner.
|
|
44
|
+
|
|
45
|
+
## Context and codebase navigation
|
|
46
|
+
|
|
47
|
+
`graftify`/`graft` builds a local AST knowledge graph so a large codebase can be navigated
|
|
48
|
+
without reading it end to end.
|
|
49
|
+
|
|
50
|
+
- **Use it for:** large or unfamiliar repos, architecture questions, dependency and call
|
|
51
|
+
tracing, "what depends on this?", locating a feature.
|
|
52
|
+
- **Don't use it for:** small projects, files you already know, simple edits, config
|
|
53
|
+
changes, obvious bugs. Reading the file directly is faster.
|
|
54
|
+
- When indexed: `graft ask "<question>" --source`, `graft map` for orientation.
|
|
55
|
+
- `--code-only` is mandatory on client repositories — the default mode sends docs and
|
|
56
|
+
images to an external LLM API.
|
|
57
|
+
|
|
58
|
+
**Graphify/graft is codebase knowledge, not personal memory.** The two never merge: the
|
|
59
|
+
graph is derived data about source code, rebuilt on demand and gitignored; memory is
|
|
60
|
+
curated facts about the owner and their decisions.
|
|
61
|
+
|
|
62
|
+
## Memory and knowledge — detailed schema
|
|
63
|
+
|
|
64
|
+
Four kinds of context, kept distinct:
|
|
65
|
+
|
|
66
|
+
| | Answers | Lives | Lifespan |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| **Memory** | what is true about the owner and their world | `02-personal/<section>/` | years |
|
|
69
|
+
| **Knowledge** | what work taught us that saves effort next time | `05-knowledge/<kind>/` | until superseded |
|
|
70
|
+
| **Session** | what we are doing right now | `.ai/tasks/current.md`, `sessions/` | one session |
|
|
71
|
+
| **Daily** | what happened today | `01-daily/YYYY-MM-DD.md` | one day |
|
|
72
|
+
|
|
73
|
+
**The test when ambiguous:** *would this still be true if they never wrote another line of
|
|
74
|
+
code?* Yes → memory. No → knowledge.
|
|
75
|
+
|
|
76
|
+
Memory sections: `identity/` · `education/` · `career/` · `projects/` · `goals/` ·
|
|
77
|
+
`travel/` · `preferences/` · `interests/`. One canonical home per fact — a fact touching
|
|
78
|
+
two sections lives in the one matching its meaning; the other links to it.
|
|
79
|
+
|
|
80
|
+
Knowledge kinds: `task-results/` · `technical-solutions/` · `decisions/` · `architecture/`
|
|
81
|
+
· `research/` · `discoveries/` · `failures/`. Check `knowledge/decisions/` before proposing
|
|
82
|
+
something that contradicts a past decision.
|
|
83
|
+
|
|
84
|
+
Retrieval: `task → identify the domain → read the index → open only what it names`.
|
|
85
|
+
`memory/MEMORY.md` and `knowledge/README.md` are the indexes and the only files read by
|
|
86
|
+
default. Reading the whole store is a mistake, not thoroughness.
|
|
87
|
+
|
|
88
|
+
Conflicts: new information contradicting a record is never silently kept alongside it.
|
|
89
|
+
Record both versions in `memory/CONFLICTS.md`, ask which is current, then update the
|
|
90
|
+
owning file.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Policy — concise output
|
|
2
|
+
|
|
3
|
+
Load when producing any response: a chat reply, a report, a checkpoint note.
|
|
4
|
+
|
|
5
|
+
Output tokens are a standing bill, paid on every turn. The rule stays small on purpose —
|
|
6
|
+
spending a thousand tokens of instruction to save a hundred of output is a net loss.
|
|
7
|
+
|
|
8
|
+
## Rules
|
|
9
|
+
|
|
10
|
+
- No preamble. Do not restate the task before answering it.
|
|
11
|
+
- Do not narrate a routine, successful tool call. Silence between meaningful events is
|
|
12
|
+
correct — see `ocean policy lifecycle`.
|
|
13
|
+
- Do not repeat unchanged code back. Reference it (`file:line`); show only the diff.
|
|
14
|
+
- Do not explain a successful, expected operation. Explain a surprising one.
|
|
15
|
+
- Prefer stating the finding, the result, and the next action over the path taken to get
|
|
16
|
+
there.
|
|
17
|
+
- Preserve exactly, never paraphrase: error text, commands, file paths, identifiers,
|
|
18
|
+
numbers.
|
|
19
|
+
|
|
20
|
+
## What this is not
|
|
21
|
+
|
|
22
|
+
Not code golf, and not a ban on explanation. A genuinely non-obvious decision, a security
|
|
23
|
+
tradeoff, or a result the owner did not expect still gets the sentence it needs. The
|
|
24
|
+
target is zero *wasted* tokens, not zero tokens.
|
|
25
|
+
|
|
26
|
+
## Relation to response formatting
|
|
27
|
+
|
|
28
|
+
This governs *how much* to say. `ocean policy response` governs *how* — language,
|
|
29
|
+
direction, labels. Both apply together to a substantial reply.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Policy — context admission
|
|
2
|
+
|
|
3
|
+
Load when deciding what to read, how much of it, and when to stop.
|
|
4
|
+
|
|
5
|
+
**Storage is not context.** A fact existing in memory, knowledge, project state, a task,
|
|
6
|
+
a session record or the filesystem does not mean it should enter the model's context. It
|
|
7
|
+
stays external until the task needs it.
|
|
8
|
+
|
|
9
|
+
**Conversation is working memory, not durable memory.** Decisions and state are distilled
|
|
10
|
+
into the task; after that the conversation is expendable.
|
|
11
|
+
|
|
12
|
+
## Admission
|
|
13
|
+
|
|
14
|
+
Before reading something, the question is not "is it available?" but "why does the model
|
|
15
|
+
need this now?" Five answers:
|
|
16
|
+
|
|
17
|
+
| | |
|
|
18
|
+
|---|---|
|
|
19
|
+
| **ADMIT** | it decides something in this task |
|
|
20
|
+
| **DEFER** | it may matter later; name it, do not read it |
|
|
21
|
+
| **SUMMARIZE** | it decides something, but only a small part of it does |
|
|
22
|
+
| **ISOLATE** | reading it would pollute this context; send it to a worker |
|
|
23
|
+
| **REJECT** | it is not relevant, however available it is |
|
|
24
|
+
|
|
25
|
+
Deterministic first: the project comes from the working directory, the task from the
|
|
26
|
+
records, the policy from the kind of work. Reason about admission only where those do not
|
|
27
|
+
already answer it.
|
|
28
|
+
|
|
29
|
+
## Progressive loading
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
search → identify → read the relevant range → act, or expand on evidence
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Not: read the whole file, the whole directory, the whole repository, all of memory. Expand
|
|
36
|
+
because evidence demands it, never in case it helps.
|
|
37
|
+
|
|
38
|
+
## Sufficient context — the stop condition
|
|
39
|
+
|
|
40
|
+
**"Do we already have enough evidence to execute correctly?"** If yes, stop retrieving. Do
|
|
41
|
+
not keep reading because more is available. If no, name what is missing and get exactly
|
|
42
|
+
that.
|
|
43
|
+
|
|
44
|
+
Under-reading is a correctness failure and outranks every budget here. When confidence is
|
|
45
|
+
low, expand. The target is *minimum sufficient* context, never minimum context.
|
|
46
|
+
|
|
47
|
+
## Value per token
|
|
48
|
+
|
|
49
|
+
Prefer small and highly relevant over large and possibly useful. Weigh relevance,
|
|
50
|
+
necessity, freshness, authority and scope against what it costs to read. Reject weak,
|
|
51
|
+
expensive context.
|
|
52
|
+
|
|
53
|
+
## Relevance decays
|
|
54
|
+
|
|
55
|
+
Current error and the file being changed are HOT. Subsystem shape is WARM. A resolved
|
|
56
|
+
command's output is DEAD. An unrelated earlier task is COLD. Relevance decays unless
|
|
57
|
+
renewed by current evidence — which is what makes a checkpoint and a fresh context cheap
|
|
58
|
+
rather than lossy.
|
|
59
|
+
|
|
60
|
+
## Tool output
|
|
61
|
+
|
|
62
|
+
Raw output does not enter context by default: shell, tests, logs, diffs, API and MCP
|
|
63
|
+
responses, browser output, database results, large reads.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
ocean observe -- <command> # keeps the raw, returns what decides
|
|
67
|
+
ocean observe show <id> --grep RE # retrieve any slice, later
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Return the exit status, the failing names, the relevant error lines and the paths — not
|
|
71
|
+
twenty thousand lines of passing tests. Do not wrap a command whose output is already
|
|
72
|
+
small: the wrapper would cost more than it saves.
|
|
73
|
+
|
|
74
|
+
Re-reading a file that has not changed buys nothing. `ocean observe` reports an identical
|
|
75
|
+
re-run in one line instead of re-admitting the text.
|
|
76
|
+
|
|
77
|
+
## Isolate heavy, disposable reads
|
|
78
|
+
|
|
79
|
+
Send to a worker when the work would pour a large amount of throwaway context into this
|
|
80
|
+
one: broad repository exploration, large logs and test output, documentation research,
|
|
81
|
+
multi-file investigation, an independent workstream.
|
|
82
|
+
|
|
83
|
+
Do not spawn one for a single grep, one small file or a trivial edit — a worker re-reads
|
|
84
|
+
its own floor, so it costs more than it saves there. The question is whether the parent
|
|
85
|
+
would otherwise be polluted, not whether the output is long.
|
|
86
|
+
|
|
87
|
+
## What comes back
|
|
88
|
+
|
|
89
|
+
A worker returns a packet, never a transcript: goal · findings · evidence · confidence ·
|
|
90
|
+
relevant paths · constraints · recommended action · unresolved issues · verification
|
|
91
|
+
state. The same shape as a handoff record, for the same reason.
|