docs(ai): activate the project semantic graph pipeline — the moat path (plan)#925
Open
seonghobae wants to merge 1 commit into
Open
docs(ai): activate the project semantic graph pipeline — the moat path (plan)#925seonghobae wants to merge 1 commit into
seonghobae wants to merge 1 commit into
Conversation
The content-graph substrate is built and wired (email_import_service.py:307 persists ContentSegmentRecord per email), and the projects API + correction endpoint already read/annotate project_graph_objects — but the extract->persist step (extract_project_semantics / persist_project_graph_projection) has zero non-test callers, so the schema is never filled outside fixtures. Plans a phased activation: (1) wire extract->persist into import, async+owner-scoped+flagged, (2) upgrade the keyword extractor to grounded LLM/embedding with segment citations, (3) turn human corrections into an eval set + calibrated confidence. This is the one genuine per-tenant data-moat path in the codebase. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RkKdtHRLG4wSLh6PVsp8J
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.
Summary
The single highest-leverage AI work: the codebase has a wired content-graph substrate (every import persists
ContentSegmentRecord) and read/feedback surfaces (api/projects.py/candidates,apply_project_graph_correction) that already assume a project graph — but the extract→persist step is dead code (extract_project_semantics/persist_project_graph_projectionhave zero non-test callers). So the schema in the middle is never filled outside test fixtures.Evidence (code-verified)
email_import_service.py:307extract_project_semantics/persist_project_graph_projectionproject_graph/extractors.py:227,projection.py:11/candidatesread surfaceapi/projects.pyapply_project_graph_correction(projection.py:30)extractors.py_RULESPlan (docs-only; matches
docs/plans/convention)_append_email_content_graph(line 307), async + owner-scoped + flagged, off the synchronous import critical path. Ships the keyword baseline and makes the projects surfaces honest.source_segment_uidscitations (already modeled).apply_project_graph_correctionhuman corrections into a per-tenant eval set + calibrated (verified-against-citations) confidence + an eval harness (there is none today).Phase 1 is behavior-changing on the import path, so it lands test-first (RED: import → assert
project_graph_objectscreated with correct owner scope + real segment citations). This is the one genuine per-tenant data-moat path in the product.🤖 Generated with Claude Code