Context MCP: make canonical workflow evidence primary - #91
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_contextand defaulted canonicalget_workflow_traceto only 4 rows. That could anchor an agent on derived heuristics before it had enough evidence to challenge them.Changes
get_workflow_tracethe documented primary Context MCP surface.get_current_work_contextand all existing response fields for compatibility, but explicitly mark the overview as derived/non-authoritative and point callers back toget_workflow_trace.Deliberately not changed
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.