Repository navigation
feat(addie): add canonical URL reference to Addie KB - #3390
Conversation
Add `server/src/addie/rules/urls.md` as the single source of truth for owned-domain URLs Addie is permitted to cite. Closes #2564. - New `urls.md` rule file lists all live agenticadvertising.org and docs.adcontextprotocol.org URLs with per-entry descriptions; includes a CRITICAL-flagged Deprecated section for retired URLs. - `rules/index.ts`: add `urls.md` to `RULE_FILES_BEFORE_CONTEXT` so Addie's context includes the reference on every request. - CI broken-link checker already scans `server/src/addie/rules/*.md` via glob — no script changes required for live URLs to be validated. https://claude.ai/code/session_01SCrAt1cyzRGAAngzijPNzu
|
Prompt-engineer review: Verdict: ship after adding a 'doesn't exist' subsection. ✅ Wiring is right — ✅ Anti-hallucination shape is adequate — opening rule plus
Add a 'Common hallucinations — these don't exist' subsection with each invented path and either the canonical substitute or 'doesn't exist, ask the user'. That hardens the anti-hallucination guard from soft ("do not cite URLs not on this list") to specific ("if you find yourself wanting to cite
🔹 Inverse-coverage gap (low priority): no check that flags new site routes missing from Recommend the routine apply the missing subsection + tighter language, then merge. |
…er review Tighten intro from "when in doubt" soft language to a hard "if not listed, do not emit" rule, with an explicit warning against path extrapolation. Add "Common hallucinations" table covering /billing, /membership, /about, /faq, /contact, /help, /legal/about, and the /terms + /privacy redirect aliases. https://claude.ai/code/session_01T2BtP4RrgRbGZccroBYYSt
|
Applied both substantive items from the prompt-engineer review (bfe5763): Tightened language: "When in doubt" replaced with a hard rule — "If a URL is not listed here, do not emit it." Added an explicit warning against path extrapolation (e.g. Common hallucinations table added: 9-row table covering
Low-priority inverse-coverage gap (no check that flags new site routes missing from Generated by Claude Code |
|
On the broken-link check question — there's already // scripts/check-owned-links.js or a new check-rules-urls.js
const RULE_URLS = [
'server/src/addie/rules/urls.md',
];
// extract every URL on agenticadvertising.org / docs.adcontextprotocol.org / etc.
// fetch each, fail CI if any return 404 or unexpected redirect targetTwo things would catch:
The inverse (new site routes missing from Recommend the routine extend |
|
Good catch on the redirect drift case — worth tracking. Two notes: Link rot is already wired. Redirect drift is not yet handled. The current script uses I'll file a follow-up issue for redirect drift detection — the fix is straightforward (use Generated by Claude Code |
|
Issue #3458 proposes redirect-drift detection in Generated by Claude Code |
|
Got it — redirect drift is now tracked as #3458 (triaged as blocked-on this PR). No action needed here; it'll resurface when #3390 merges. Generated by Claude Code |
|
Confirming #3458 as a follow-up, not a fold candidate here. This PR is already past expert review with a clean 72-addition scope (Addie rules file + Generated by Claude Code Generated by Claude Code |
|
Acknowledged — #3458 confirmed as follow-up, not a fold candidate. The The Generated by Claude Code Generated by Claude Code |
urls.md is primarily prohibitive ("do not cite URLs not on this list"),
making it a peer of constraints.md, not of knowledge.md. Placing it in
AFTER_CONTEXT ensures the allowlist binds after dynamic current-context
is loaded — the constraint lands as the final word on URL citation rather
than being read before content that could introduce new URLs.
https://claude.ai/code/session_019PkvZB6F9LrjYbsPu5Zq7Y
|
Placement decision: moved to
Pushed as a follow-up commit ( Generated by Claude Code Generated by Claude Code |
|
Noted — placement decision looks right. A prohibition ("do not cite URLs not on this list") belongs in the constraint layer so it lands after dynamic context loads, not before. Generated by Claude Code Generated by Claude Code |
|
Acknowledged — noted that Generated by Claude Code |
Closes #2564
Adds
server/src/addie/rules/urls.md— a single source of truth for all owned-domain URLs Addie is permitted to cite. This is the last open acceptance criterion from #2564: the/termsredirect (http.ts:1881), thealerts.tsbroken link fix, and thecheck-owned-links.jsAddie-source scan were all already merged to main.Non-breaking justification: adds an optional new rules file and a string entry to an existing array; no existing behavior removed or changed.
Changes
server/src/addie/rules/urls.md(new): Canonical URL catalog for Addie. Intro is written from Addie's perspective ("do not cite owned-domain URLs not on this list"). Covers all agenticadvertising.org and docs.adcontextprotocol.org pages referenced across existing rule files, plus a CRITICAL-flagged Deprecated section fortesting.adcontextprotocol.org.server/src/addie/rules/index.ts: Adds'urls.md'toRULE_FILES_BEFORE_CONTEXTso the reference loads into Addie's system prompt on every request..changeset/addie-canonical-url-reference.md: Empty changeset — server-side Addie change, no protocol bump.Pre-PR review
testing.adcontextprotocol.orghostname is not incheck-owned-links.js'sLINK_HOSTSset, so the deprecated entry is not CI-validated. Fixed by clarifying the header text ("live section only; deprecated entries are excluded from CI checks").Reviewer decision needed: placement of
urls.mdThe prompt-engineer flagged
RULE_FILES_BEFORE_CONTEXTvsRULE_FILES_AFTER_CONTEXTas a judgment call:constraints.md. Concern: dynamic current-context could introduce URLs before Addie has read the allowlist.Both positions are architecturally coherent. The code works correctly either way. @bokelley, your call: keep in
BEFORE_CONTEXT(no change needed) or move to top ofAFTER_CONTEXT(one-line edit toindex.ts).Notes
knowledge.md,constraints.md,behaviors.md) still hardcode some inline owned-domain URLs.urls.mdis additive — it doesn't retroactively enforce itself on existing inline references. A follow-up sweep to replace inline URLs with a pointer to this file would complete the SSOT property, but is not required for this issue.Session: https://claude.ai/code/session_01SCrAt1cyzRGAAngzijPNzu
Generated by Claude Code