Skip to content

Add generalized trace ingestion (loop C) to graph context engine plan#4776

Open
Evanfeenstra wants to merge 2 commits into
masterfrom
docs/graph-context-trace-ingestion
Open

Add generalized trace ingestion (loop C) to graph context engine plan#4776
Evanfeenstra wants to merge 2 commits into
masterfrom
docs/graph-context-trace-ingestion

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Contributor

Summary

Design-doc-only change to docs/plans/graph-context-engine.md. The existing plan learns only from outcomes (merged PR → touched leaves), which has two label gaps: essential read-only context scores as a retrieval miss, and the agent's wrong turns / dead ends are invisible. This adds loop C — trace ingestion, generalized so the engine never learns what a flow is.

What's new in the doc

  • "The trace stream" section: agent journeys reduce to a timestamped event stream per task in a closed five-verb vocabulary (search, inspect, act, revert, cite). Flow shape is emergent, never declared — chat→plan→task→PR→merged and ingest documents→build workflow→evaluate against legal benchmark look identical to the engine. Stage names are opaque strings; engine code branching on one is the same bug as a domain node type in engine source.
  • Outcome events pluralized, with magnitude: one outcome event per flow, each optionally graded (merged PR = binary; benchmark evaluation = score). Loop A reinforcement scales by magnitude.
  • Mandatory retrieval/self provenance on trace records: breaks the self-fulfilling-label confound (agents touch what you show them) and makes the recall gap directly measurable (self-discovered-then-used = what retrieval should have returned).
  • Domain-blind label derivations: read-positives, dead-end negatives (successful tasks only), path cost (time-to-context), recall gap — wired into loop A, the re-ranker labels/features, and the harness.
  • Honest degradation table for trace quality, mirroring the outcome-event one.
  • Threaded through: DomainProfile gains traceIngest and outcomeEvents[].magnitude; all three instantiations get flow + trace mappings; order-of-work phase 4 ships loop C with loop B (same logging substrate — code-domain tool traces are already persisted); four new success metrics (time-to-context, dead-end rate, self-discovery rate, trace resolution rate).

No engine domain-blindness is disturbed: "tool events joined to outcomes" is as domain-generic as the outcome event itself.

🤖 Generated with Claude Code

Evanfeenstra and others added 2 commits July 8, 2026 11:00
Outcome events alone erase the journey: essential read-only context
scores as a retrieval miss, and wrong turns/dead ends never become
labels. Loop C ingests agent traces through a closed five-verb
vocabulary (search/inspect/act/revert/cite) so flows stay emergent —
chat→plan→PR→merged and ingest→workflow→benchmark are the same event
stream to the engine. Outcome events become plural with optional
magnitude (graded outcomes like benchmark scores scale loop A
reinforcement), and mandatory retrieval/self provenance breaks the
self-fulfilling-label confound while exposing the recall gap.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Test environment is now live.

View it at: https://hive-preview-7.sphinx.chat

Database expires at: Jul 9, 2026, 9:38 AM UTC

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