@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,44 @@
|
|
|
1
|
+
# Policy — skill observation
|
|
2
|
+
|
|
3
|
+
Load at a checkpoint, a handoff, or session end (`ocean policy lifecycle`) — never
|
|
4
|
+
continuously during a task.
|
|
5
|
+
|
|
6
|
+
## What counts as a signal
|
|
7
|
+
|
|
8
|
+
Only these, and only when they actually happened this session:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
the owner corrected an approach
|
|
12
|
+
the same workaround was applied more than once
|
|
13
|
+
a skill or capability was invoked and failed
|
|
14
|
+
a needed capability did not exist
|
|
15
|
+
routing picked the wrong tool, model, or skill for the task
|
|
16
|
+
a skill activated when the task did not need it
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
No signal this session ⇒ write nothing. A quiet session produces zero observation lines,
|
|
20
|
+
not a summary saying so.
|
|
21
|
+
|
|
22
|
+
## Where it goes
|
|
23
|
+
|
|
24
|
+
There is no separate observation log — that would be a second lifecycle subsystem next to
|
|
25
|
+
the one that already exists. A signal is recorded exactly like any other durable fact from
|
|
26
|
+
the session:
|
|
27
|
+
|
|
28
|
+
- a corrected approach or a validated judgment call → `ocean policy feedback` territory,
|
|
29
|
+
written to `02-personal/` per that policy's rules
|
|
30
|
+
- a missing capability, a bad routing outcome, or a repeated workaround → one line in the
|
|
31
|
+
task's own checkpoint note (`ocean tasks checkpoint <ID> --note "..."`), or the
|
|
32
|
+
session record if there is no task
|
|
33
|
+
|
|
34
|
+
## What this never does
|
|
35
|
+
|
|
36
|
+
- **Never rewrites a skill file automatically.** An observation is a candidate for a human
|
|
37
|
+
review, not an edit. Changing a skill, a policy, or a rule file happens through the same
|
|
38
|
+
explicit, reviewed path as any other change to governance — never as a side effect of
|
|
39
|
+
"noticing" something.
|
|
40
|
+
- **Never runs as an always-on transcript watcher.** Event-driven only: check at a
|
|
41
|
+
boundary that already exists (checkpoint, handoff, session end), not on every turn.
|
|
42
|
+
- **Never generates observation noise.** If the signal cannot be stated in one line with
|
|
43
|
+
the concrete evidence (what was corrected, what failed, what was missing), it is not
|
|
44
|
+
ready to record yet — keep working, revisit at the next boundary.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Policy — technical defaults
|
|
2
|
+
|
|
3
|
+
Load when choosing libraries or scaffolding a project.
|
|
4
|
+
|
|
5
|
+
Record the owner's defaults here once they are known, one line per need, so every session
|
|
6
|
+
scaffolds the same way:
|
|
7
|
+
|
|
8
|
+
| Need | Use |
|
|
9
|
+
|---|---|
|
|
10
|
+
| Package manager · runtime · language mode | <package manager> · <runtime and version> · <language settings> |
|
|
11
|
+
| Public site (SSR / SEO) | <framework> |
|
|
12
|
+
| Authenticated app or dashboard | <framework> |
|
|
13
|
+
| Styling / components | <styling and component library> |
|
|
14
|
+
| Back-end | <framework and protocol> |
|
|
15
|
+
| Data | <ORM and database> |
|
|
16
|
+
| Validation | <validation library, at every boundary> |
|
|
17
|
+
|
|
18
|
+
Until then:
|
|
19
|
+
|
|
20
|
+
- One formatter only. Never two competing ones.
|
|
21
|
+
- Environment variables: typed and validated at startup, fail fast on a missing one.
|
|
22
|
+
- Large tables: server-side pagination and sorting; virtualize before optimizing.
|
|
23
|
+
- Legacy repositories keep their own conventions — do not migrate unasked.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Policy — the task loop
|
|
2
|
+
|
|
3
|
+
Load when starting, checkpointing or completing a unit of work.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
UNDERSTAND → PLAN → EXECUTE → OBSERVE → TEST → VERIFY
|
|
7
|
+
→ error? → DIAGNOSE → FIX → RETEST (loop)
|
|
8
|
+
→ FINAL VERIFICATION → COMPLETE
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Changing the code is not completion.** Completion is the verification passing. Continue
|
|
12
|
+
until the authorized task is actually complete; if part of the scope is genuinely blocked,
|
|
13
|
+
finish everything else and say plainly what was left and why.
|
|
14
|
+
|
|
15
|
+
Plan first for anything touching multiple files or making an architectural decision. Skip
|
|
16
|
+
planning for a one-line fix.
|
|
17
|
+
|
|
18
|
+
## Cold start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
ocean context # project, live tasks, next actions, git state
|
|
22
|
+
ocean context <ID> # one task in full
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
That packet is derived from the records every time it runs, so it cannot be stale. Read a
|
|
26
|
+
file only when the packet says the work needs it. Do not read a project's `state.md`,
|
|
27
|
+
`roadmap.md` or `charter.md` to find out what to do next — none of them knows.
|
|
28
|
+
|
|
29
|
+
"What tasks do I have?", in any wording → `ocean tasks list` run **from the owner's working folder**
|
|
30
|
+
(MCP: `ocean_tasks_list` with `cwd`). It returns that folder's project's tasks; when the
|
|
31
|
+
project has none or the folder is no project, every project's, labelled. Never answer it by
|
|
32
|
+
listing `04-projects/` by hand.
|
|
33
|
+
|
|
34
|
+
## Every task is a task
|
|
35
|
+
|
|
36
|
+
The moment real work starts on something the owner asked for — in any project, whether or not they
|
|
37
|
+
says "task" — it becomes a task directory: `04-projects/<project>/tasks/<ID>/`. Size or
|
|
38
|
+
expected duration is not the test anymore; **a task was given** is the test.
|
|
39
|
+
`04-projects/backlog.md` is for intentions not yet started, not for work in progress.
|
|
40
|
+
|
|
41
|
+
**The task is the only place its status is declared.** Every other view of it is
|
|
42
|
+
generated; `ocean tasks index --write` regenerates the board and `ocean tasks doctor`
|
|
43
|
+
fails when a view has drifted. Never hand-edit a generated table, and never write a
|
|
44
|
+
task's status into project state, a daily log or a session record as if it were
|
|
45
|
+
authoritative there.
|
|
46
|
+
|
|
47
|
+
States: `todo` · `active` · `paused` · `blocked` · `done` · `cancelled`. Several being
|
|
48
|
+
`active` is normal. There is no current task and no stored pointer to one — the active
|
|
49
|
+
set is derived from the records. A bare id resolves directly at
|
|
50
|
+
`04-projects/<project>/tasks/<ID>/` (`ocean-paths` was a resolver in an earlier CLI
|
|
51
|
+
generation and was consolidated away — it is not a real command anymore); if two
|
|
52
|
+
projects ever claim the same id, that is a conflict to resolve by hand, not to merge.
|
|
53
|
+
|
|
54
|
+
Contract: `internal/schemas/task.md`.
|
|
55
|
+
|
|
56
|
+
## Claims — more than one session at once
|
|
57
|
+
|
|
58
|
+
Sessions share one disk and know nothing of each other, so two on the same task overwrite
|
|
59
|
+
each other silently. Before editing, **claim the task**; the claim is advisory and lives in
|
|
60
|
+
the task's own frontmatter (`claimed_by`, `claimed_at`, optional `claimed_paths`).
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
ocean tasks claim <ID> --by <your-session-name> [--paths kernel,packages/harness/src]
|
|
64
|
+
ocean tasks release <ID> --by <your-session-name> # when you stop, hand off or finish
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- **Refused** (exit 1, holder named) → another session holds it. Do not take the task, do not
|
|
68
|
+
`--force`. Work on another task, or tell the owner and wait. A claim expires after 2 h, so a
|
|
69
|
+
dead session never blocks forever; re-claim to refresh while you keep working.
|
|
70
|
+
- **`--paths`** is how a file-level claim is made: use the directories you will edit, and
|
|
71
|
+
`kernel` when you will switch branches or commit in the kernel checkout (it shares one HEAD).
|
|
72
|
+
Overlapping paths held by another session on another task are refused too.
|
|
73
|
+
- **Shared single-file stores** (`MEMORY.md`, an index): re-read immediately before writing
|
|
74
|
+
and append a line rather than rewriting the file, so a concurrent write is not lost.
|
|
75
|
+
- `ocean tasks doctor` errors on a malformed claim or two live claims on overlapping paths,
|
|
76
|
+
and warns on a stale one. Nothing blocks a raw file edit — the claim only works if every
|
|
77
|
+
client runs the step.
|
|
78
|
+
|
|
79
|
+
(`claim`/`release` ship with T-270's kernel PRs; until they are merged and installed, record
|
|
80
|
+
the same three fields by hand.)
|
|
81
|
+
|
|
82
|
+
## Keeping a task cheap
|
|
83
|
+
|
|
84
|
+
`task.md` is what a cold session reads, so everything in it is paid for on every such read.
|
|
85
|
+
|
|
86
|
+
- **`## Next action` is one action.** Not a status report, not three alternatives.
|
|
87
|
+
- **`## Log` keeps the recent entries.** Older ones move to `log.md` beside it.
|
|
88
|
+
- **`## Verification` is the command and its last real result**, not a transcript.
|
|
89
|
+
- History, designs and investigations are artifacts beside `task.md`, named in
|
|
90
|
+
`artifacts:`, never inlined into it.
|
|
91
|
+
|
|
92
|
+
`ocean tasks doctor` warns when a record has drifted back into being a transcript.
|
|
93
|
+
|
|
94
|
+
## Task artifacts — created on demand, never scaffolded
|
|
95
|
+
|
|
96
|
+
`task.md` is the only mandatory file. Two tests, in order:
|
|
97
|
+
|
|
98
|
+
1. **Is it needed?** Would a future session be materially worse off without it?
|
|
99
|
+
"It might be nice" means no.
|
|
100
|
+
2. **Task, or world?** Reusable beyond this task → `05-knowledge/<kind>/` instead,
|
|
101
|
+
and the task links to it.
|
|
102
|
+
|
|
103
|
+
| Artifact | Written when |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `research.md` | something external was investigated and the answer will be reused |
|
|
106
|
+
| `decisions.md` | a choice was made among real alternatives and the rejected ones still matter |
|
|
107
|
+
| `log.md` | the log outgrew the hot path |
|
|
108
|
+
| `notes.md` | raw working material too large for `task.md` and not yet shaped |
|
|
109
|
+
|
|
110
|
+
Most tasks produce `task.md` and nothing else. That is the correct outcome, not a gap.
|
|
111
|
+
|
|
112
|
+
## On completion — automatic, not on request
|
|
113
|
+
|
|
114
|
+
1. **Final verification** — run it, and report the real output.
|
|
115
|
+
2. **Lifecycle reading** — `ocean lifecycle --task <ID> --complete --verification passed|failed`.
|
|
116
|
+
This is the boundary hook: a task finishing is exactly the `TASK_COMPLETED` trigger, and
|
|
117
|
+
this is the one place it fires, deterministically, on every completion. Act on the
|
|
118
|
+
decision before moving on: `CHECKPOINT` → covered by step 4 below; `FRESH` → checkpoint
|
|
119
|
+
first, then tell the owner a fresh session is recommended and how to resume; `HANDOFF` →
|
|
120
|
+
run the `session-handoff` skill instead of continuing in this context. `CONTINUE` needs
|
|
121
|
+
nothing further here.
|
|
122
|
+
3. **Summary** — what changed, where, what proves it.
|
|
123
|
+
4. **`memory-curator`** — classify what the task produced and route each item once. Most
|
|
124
|
+
tasks produce nothing worth keeping; that is correct. See `memory.md` and `knowledge.md`.
|
|
125
|
+
5. **`task-scribe`** — task state, the project index, the daily log, the backlog line.
|
|
126
|
+
6. Sync only if canonical rules or skills changed.
|
|
127
|
+
|
|
128
|
+
Steps 4-6 are bookkeeping: delegate them, never run them on a strong model. Step 2 is a
|
|
129
|
+
single deterministic CLI call — no model reasoning, so it costs nothing to run on every
|
|
130
|
+
completion.
|
|
131
|
+
|
|
132
|
+
**Task completion is not session end.** Completion is where work state is saved, and it is
|
|
133
|
+
automatic. `/session-end` is optional cleanup, never the mechanism.
|
|
134
|
+
|
|
135
|
+
## Session records
|
|
136
|
+
|
|
137
|
+
`internal/sessions/` is not a second transcript store. A record holds the task, the
|
|
138
|
+
decisions, what was completed, important evidence, unresolved issues, the next action, and
|
|
139
|
+
references to the authoritative artifacts. Never a replay of the conversation.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Policy — verification
|
|
2
|
+
|
|
3
|
+
Load when proving a change works.
|
|
4
|
+
|
|
5
|
+
**`executed` is not `verified`.** A change that ran is not a change that works. An
|
|
6
|
+
unverified change is reported as unverified, never as done.
|
|
7
|
+
|
|
8
|
+
- Never claim a test passed without running it.
|
|
9
|
+
- Report the **actual output**, or its decisive lines. Never "looks fine".
|
|
10
|
+
- If verification was not run, say why.
|
|
11
|
+
- Name what was verified and what was assumed, separately.
|
|
12
|
+
|
|
13
|
+
Say "متأكد" only for a verified fact or a check you ran; "أعتقد" for a reasonable
|
|
14
|
+
assumption. Never answer with confidence you have not earned.
|
|
15
|
+
|
|
16
|
+
## Cost
|
|
17
|
+
|
|
18
|
+
Run the relevant tests first. If they pass and the change can affect shared behaviour, run
|
|
19
|
+
the full suite **once**. A second full run is required only when nondeterminism is
|
|
20
|
+
suspected, concurrency or runtime state is involved, the first result was inconsistent,
|
|
21
|
+
rollback is being tested, or the change is high risk.
|
|
22
|
+
|
|
23
|
+
Use `ocean observe -- <test command>` so a large run returns its failures and its summary
|
|
24
|
+
rather than its whole transcript. The raw stays retrievable.
|
|
25
|
+
|
|
26
|
+
## Fixes
|
|
27
|
+
|
|
28
|
+
Fix root causes. Never patch a symptom, and never swallow an exception to make a test pass.
|
|
29
|
+
Never modify production behaviour merely to satisfy a temporary test.
|
|
File without changes
|