Context
SPEC-02 describes checking Cortex for existing opportunity nodes before creating new ones, using both title matching and semantic similarity to avoid duplicates.
Current Behavior
AssessmentAgent.run() calls upsert_node which prevents exact title duplicates. However, there's no semantic deduplication — if two modules generate semantically similar opportunities with different titles, both are created.
Expected Behavior
Before creating a new opportunity, search Cortex semantically for existing opportunities in the same category targeting the same file/symbol. Skip creation if a sufficiently similar one exists.
Impact
- Opportunity list may contain near-duplicates
- Evolution loop may attempt the same improvement multiple ways
- Not currently impactful with only 3 modules producing distinct opportunity types
References
atlas-specs/02-ASSESSMENT.md — deduplication strategy
atlas/assessment/agent.py — upsert only prevents exact title matches
Context
SPEC-02 describes checking Cortex for existing opportunity nodes before creating new ones, using both title matching and semantic similarity to avoid duplicates.
Current Behavior
AssessmentAgent.run()callsupsert_nodewhich prevents exact title duplicates. However, there's no semantic deduplication — if two modules generate semantically similar opportunities with different titles, both are created.Expected Behavior
Before creating a new opportunity, search Cortex semantically for existing opportunities in the same category targeting the same file/symbol. Skip creation if a sufficiently similar one exists.
Impact
References
atlas-specs/02-ASSESSMENT.md— deduplication strategyatlas/assessment/agent.py— upsert only prevents exact title matches