-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Why: When knowledge gaps are detected, CORTEX must be able to broadcast the incomplete Metroid as a curiosity probe to connected peers. Peers respond with relevant fragments, enabling collaborative learning. Additionally, interest sharing is a core product value for both app and library surfaces. v1 must share public-interest graph sections while preventing personal data leakage.
-
P2-G0: Implement
sharing/CuriosityBroadcaster.ts- Consume pending
CuriosityProbeobjects queued byKnowledgeGapDetector - Serialize and broadcast to connected peers via P2P transport
- Handle responses: deserialize incoming graph fragments; pass to
SubgraphImporterfor integration - Rate-limit broadcasts to prevent spam
- Include
knowledgeBoundaryfield in probe so peers can target search precisely
- Consume pending
-
P2-G1: Implement
sharing/EligibilityClassifier.ts- Classify candidate nodes as share-eligible vs blocked before export
- Detect identity/PII-bearing content (person-specific identifiers, credentials, financial/health traces)
- Emit deterministic eligibility decisions with reason codes for auditability
-
P2-G2: Implement
sharing/SubgraphExporter.ts- Build topic-scoped graph slices from eligible nodes only
- For curiosity responses: select graph fragment relevant to the received probe's
knowledgeBoundary - Preserve node/edge signatures and provenance
- Strip or coarsen personal metadata fields that are not needed for discovery
-
P2-G3: Implement
sharing/PeerExchange.tsandsharing/SubgraphImporter.ts- Opt-in peer exchange over P2P transport
- Verify signatures and schema on import; reject invalid or tampered payloads
- Merge imported slices into discovery pathways without exposing sender identity metadata
- After import, retry MetroidBuilder for any pending knowledge gaps that may be resolved by new data
-
P2-G4: Add sharing safety and discovery tests
tests/sharing/EligibilityClassifier.test.tstests/sharing/CuriosityBroadcaster.test.tstests/sharing/SubgraphExchange.test.ts- Assert blocked nodes are never exported; assert imported fragments are discoverable via query
- Assert that after receiving a response to a curiosity probe, MetroidBuilder can now construct m2 for the previously-gapped topic
Exit Criteria: v1 can broadcast curiosity probes for knowledge gaps, receive graph fragments from peers, retry MetroidBuilder with new data, and exchange signed public-interest slices with PII blocking.