Add documentation pages to the item relation graph #300
Description
Relations (#287) connect tasks and memories only; the page says "Documentation pages are not part of the relation graph yet". A page cannot point at the task that caused it or the decision it explains, so its history and code (via task commits) are unreachable from the page.
Why high (2026-10-02, user request)
Real case in project Whipyard: an agent wrote an assessment page (Whipyard #130 "Operator usability gaps") and created six follow-up tasks from it (#124-#129). Every link failed: relate page→task with related returned "Pages are not part of the relation graph yet (#300)", and task→page with discovered_from returned "Discovered_from links a task to the task or memory it was found from." The workaround was to write the task numbers into the page table by hand, which do not update and are not navigable from the tasks. "Write a page, then file tasks for its findings" is a core workflow, so discovered_from (task → page) should be allowed too, not only references/related.
Work
- Allow pages as source and target of
referencesandrelated; decide whetherimplements(task → page) applies as well and document the choice. - Allow
discovered_fromfrom a task to a page (the page the task was found from). - Derive
referencesfrom#Nin published page revisions throughRelationService.ReconcileMarkdown, recording the source revision like memories. Proposed and rejected page revisions never reconcile. relation_create,relation_list,relation_remove,item_action relateanditem_getaccept and return pages without a new tool.- Web: relation panel on the page view, and pages listed in the relation panels of tasks and memories.
- Update #287.
Acceptance
- A page reachable by the reader shows its relations; hidden endpoints reveal neither title nor existence, as for tasks and memories.
- Reconcile is idempotent and leaves explicit relations untouched.
- Archiving and restoring a page keeps its relations, and a page with active subpages still cannot be archived.
- A task created from a page can be related with
discovered_fromto it, and the page lists that task. - Tests for derived references from page text, explicit relations to and from pages, discovered_from task→page, and visibility in a public project with private tasks.