Deliver a ContractSpec-native central context system with auditable background agents and full ACP server + client support (HTTP streamable first), while keeping data retrieval powerful, governed, and traceable.
- Context is fragmented across docs, contracts, schemas, and data sources, which makes AI output inconsistent and hard to audit.
- Background automation lacks durable run logs, approvals, and replayable provenance.
- External agent interoperability (ACP) is missing or incomplete.
- Data access is either too constrained (no live data) or too risky (no governance layer).
- 100 percent of agent runs reference a context snapshot ID.
- Context snapshots are deterministic and reproducible across environments.
- ACP server + client conformance tests pass for HTTP streamable transport.
- Policy enforcement prevents any unauthorized data access or tool execution.
- Studio surfaces can explain why an agent did something (context + tools + approvals).
- Spec-first: contracts come before implementation.
- DocBlocks are canonical; no /docs markdown updates.
- Layering rules: libs -> bundles -> apps, no upward dependencies.
- No raw HTML in apps or bundles; design system components only.
- Auditability and traceability take precedence over convenience.
- Security priority: Security > Compliance > Safety/Privacy > Stability/Quality > UX > Performance > Convenience.
- ACP must support server + client with HTTP streamable transport first.
- Auth must support API key, OAuth, and internal tokens.
- Vector store defaults to Postgres pgvector, but must be pluggable.
- Studio integration happens after ACP baseline is stable.
-
Query:
context.pack.describe->packages/libs/contracts/src/operations/context/contextPackDescribe.query.ts(owners: platform.context) -
Query:
context.pack.search->packages/libs/contracts/src/operations/context/contextPackSearch.query.ts(owners: platform.context) -
Command:
context.pack.snapshot->packages/libs/contracts/src/operations/context/contextPackSnapshot.command.ts(owners: platform.context) -
Query:
database.schema.describe->packages/libs/contracts/src/operations/database/databaseSchemaDescribe.query.ts(owners: platform.data) -
Query:
database.migrations.list->packages/libs/contracts/src/operations/database/databaseMigrationsList.query.ts(owners: platform.data) -
Query:
database.dictionary.get->packages/libs/contracts/src/operations/database/databaseDictionaryGet.query.ts(owners: platform.data) -
Query:
database.query.readonly->packages/libs/contracts/src/operations/database/databaseQueryReadonly.query.ts(owners: platform.data) -
Command:
agent.run->packages/libs/contracts/src/operations/agent/agentRun.command.ts(owners: platform.ai) -
Query:
agent.status->packages/libs/contracts/src/operations/agent/agentStatus.query.ts(owners: platform.ai) -
Command:
agent.cancel->packages/libs/contracts/src/operations/agent/agentCancel.command.ts(owners: platform.ai) -
Query:
agent.artifacts->packages/libs/contracts/src/operations/agent/agentArtifacts.query.ts(owners: platform.ai) -
Command:
agent.approvals->packages/libs/contracts/src/operations/agent/agentApprovals.command.ts(owners: platform.ai) -
Command:
acp.session.init->packages/libs/contracts/src/operations/acp/acpSessionInit.command.ts(owners: platform.ai) -
Command:
acp.session.resume->packages/libs/contracts/src/operations/acp/acpSessionResume.command.ts(owners: platform.ai) -
Command:
acp.session.stop->packages/libs/contracts/src/operations/acp/acpSessionStop.command.ts(owners: platform.ai) -
Command:
acp.prompt.turn->packages/libs/contracts/src/operations/acp/acpPromptTurn.command.ts(owners: platform.ai) -
Command:
acp.tool.calls->packages/libs/contracts/src/operations/acp/acpToolCalls.command.ts(owners: platform.ai) -
Command:
acp.terminal.exec->packages/libs/contracts/src/operations/acp/acpTerminalExec.command.ts(owners: platform.ai) -
Command:
acp.fs.access->packages/libs/contracts/src/operations/acp/acpFsAccess.command.ts(owners: platform.ai) -
Event:
context.snapshot.created->packages/libs/contracts/src/events/context/contextSnapshotCreated.event.ts(owners: platform.context) -
Event:
agent.run.started->packages/libs/contracts/src/events/agent/agentRunStarted.event.ts(owners: platform.ai) -
Event:
agent.run.completed->packages/libs/contracts/src/events/agent/agentRunCompleted.event.ts(owners: platform.ai) -
Event:
agent.run.failed->packages/libs/contracts/src/events/agent/agentRunFailed.event.ts(owners: platform.ai) -
Event:
agent.approval.requested->packages/libs/contracts/src/events/agent/agentApprovalRequested.event.ts(owners: platform.ai) -
Capability:
context.system->packages/libs/contracts/src/capabilities/contextSystem.capability.ts(owners: platform.context) -
Capability:
agent.execution->packages/libs/contracts/src/capabilities/agentExecution.capability.ts(owners: platform.ai) -
Capability:
acp.transport->packages/libs/contracts/src/capabilities/acpTransport.capability.ts(owners: platform.ai) -
Capability:
database.context->packages/libs/contracts/src/capabilities/databaseContext.capability.ts(owners: platform.data) -
Data view:
context.snapshot.index->packages/libs/contracts/src/data-views/contextSnapshots.dataView.ts(owners: platform.context) -
Data view:
agent.run.index->packages/libs/contracts/src/data-views/agentRuns.dataView.ts(owners: platform.ai) -
Data view:
database.schema.index->packages/libs/contracts/src/data-views/databaseSchemas.dataView.ts(owners: platform.data) -
Form:
agent.run.form->packages/libs/contracts/src/forms/agentRun.form.ts(owners: platform.ai) -
Form:
context.pack.search.form->packages/libs/contracts/src/forms/contextPackSearch.form.ts(owners: platform.context) -
Presentation:
context.snapshot.summary->packages/libs/contracts/src/presentations/contextSnapshot.presentation.ts(owners: platform.context) -
Presentation:
agent.run.audit->packages/libs/contracts/src/presentations/agentRunAudit.presentation.ts(owners: platform.ai)
name,version,description,goal,context,owners,tags- IO schemas and policy definitions must be present for every operation.
- Update registries for operations, events, capabilities, data views, forms, and presentations.
- Ensure DocBlocks are registered (no barrel registries).
- New specs start at
1.0.0and follow semver. - Breaking changes require new major versions and deprecation notices in DocBlocks.
- Old versions remain registered until migration is complete.
-
Define contracts (spec-first)
- Create all operations, events, capabilities, data views, forms, and presentations listed above.
- Add DocBlocks for every new spec and link them via
docId. - Register all specs in their registries.
-
Implement handlers and adapters using contract types
- Build context snapshot pipeline and knowledge ingestion with pgvector default and pluggable adapters.
- Implement read-only data access using DataView-backed queries with policy gating and redaction.
- Implement durable agent run orchestration with approvals, artifacts, and telemetry.
- Implement ACP server (HTTP streamable) and ACP client; bridge MCP-over-ACP.
- Defer Studio UI implementation until ACP baseline is stable.
-
Tests and docs updates
- Add contract tests, run orchestration tests, and ACP conformance tests.
- Update DocBlocks for all behavior and policy decisions.
- Ensure knowledge and context documentation is in DocBlocks only.
- Run
contractspec impactbefore committing changes. - Run
contractspec impact --baseline mainto generate PR summaries. - Use
contractspec diff <refA>..<refB> --jsonwhen comparing versions. - For breaking changes, create new versions and document deprecations with migration guidance.
- Run
contractspec generatewhen scaffolding specs or registries is needed. - Run
contractspec ci --check-driftbefore PR or push. - Run package-level lint and tests for touched packages.
- Product and business review: confirm contract goals and context align to intended outcomes.
- Technical review: run Greptile or Graphite review if configured, summarize findings.
- Confirm
contractspec impactreports no unexpected breaking changes.
- Hand off to
/implementation-planonce this plan is finalized.