Skip to content

Context MCP: make canonical workflow evidence primary - #91

Merged
KAVentures merged 3 commits into
mainfrom
feat/context-mcp-evidence-first
Sep 27, 2026
Merged

KAVentures merged 3 commits into
mainfrom
feat/context-mcp-evidence-first

Conversation

@KAVentures

Copy link
Copy Markdown
Owner

Why

A real OpenWorkGraph session showed that deterministic inferred-task rows can be materially wrong (for example, unattended foreground Claude time becoming repeated “Work in Claude” tasks) even when the underlying evidence is sufficient for an AI to reconstruct the workflow correctly.

The export AI guide and starter prompt are already evidence-first, but the compact MCP still told agents to start with get_current_work_context and defaulted canonical get_workflow_trace to only 4 rows. That could anchor an agent on derived heuristics before it had enough evidence to challenge them.

Changes

  • Make get_workflow_trace the documented primary Context MCP surface.
  • Increase its default page from 4 to 100 rows, matching the older canonical MCP path while retaining the existing 500-row server cap and stable cursor pagination.
  • Keep get_current_work_context and all existing response fields for compatibility, but explicitly mark the overview as derived/non-authoritative and point callers back to get_workflow_trace.
  • Update the compact MCP data-model resource so agents are told to reconstruct from canonical evidence first.
  • Add regression coverage that:
    • compact overview remains small;
    • canonical trace defaults to 100 rows and still accepts explicit limits;
    • the Context contract is evidence-first;
    • canonical workflow trace is not coupled to the Observe connection filtering used by the Agents UI.

Deliberately not changed

  • No database/schema migration.
  • No Observe ingestion or connection behavior changes.
  • No removal of task inference, work profile, procedural memory, or existing MCP tools.
  • No response keys removed.
  • No export-format changes.

Architectural invariant

Observe state controls future agent collection. Context state controls AI read access. UI views may filter historical agent runs. Canonical stored workflow evidence is not rewritten or hidden because Observe is later switched off.

This is intentionally a narrow alignment PR. A later refactor can make export and Context MCP share a single snapshot provider, but this PR does not take that larger blast radius.

@KAVentures
KAVentures merged commit 93faadb into main Sep 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant