Persist explicit relations and reconcile published Markdown references #89
Description
Work
Implement relations using the shared contract and extract references through #86. Update derived edges after successful authorized task saves or publication of memory revisions. Keep explicit links separate from derived links; support idempotent reconciliation and a backfill dry run.
Acceptance
- Adding/removing Markdown references updates only corresponding derived edges.
- Pending/rejected proposals cannot change published backlinks.
- Transaction failure, revision race and retry cannot leave partial or duplicate relations.
- Archive, expiry, restore and permission changes follow the lifecycle contract.