docs: add Service discoverability guide under Frontends - #323
Open
aterga wants to merge 5 commits into
Open
Conversation
Add a guide describing what a canister app exposes so an AI agent can discover and use it from just its URL, organized as five layers: composition (/.well-known/ic-architecture manifest), interface (candid:service), behavior (getApiDoc), data (OQL), and identity (/.well-known/ii-derivation-origin). Placed after Custom domains; bump Response certification and Frontend frameworks sidebar order to follow.
|
🤖 Here's your preview: https://soxyi-6iaaa-aaaam-ai2ra-cai.icp0.io |
Contributor
There was a problem hiding this comment.
Pull request overview
Note: live brand rules (/rules.json) could not be reached, so this review applied the bundled icp-brand-voice rules (authored against brand guide v2.25).
Adds a new frontend guide that defines a structured, layered approach for making canister apps discoverable to AI agents from only an app URL, and updates the Frontends guide ordering so the new page sits after Custom domains.
Changes:
- Add
Service discoverabilityguide underdocs/guides/frontends/describing five discovery layers (composition, interface, behavior, data, identity) and anti-patterns. - Adjust Frontends sidebar ordering to insert the new guide after Custom domains.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/guides/frontends/service-discoverability.md | New guide documenting URL-first discovery signals and a deployment/verification checklist for agent consumption. |
| docs/guides/frontends/certification.md | Sidebar order update to accommodate the new guide in the Frontends sequence. |
| docs/guides/frontends/frameworks.md | Sidebar order update to accommodate the new guide in the Frontends sequence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
curl -s exits 0 on an HTTP 404, so the '|| echo default' branch never ran when the ii-derivation-origin file is absent (the documented default case). Use curl -sf so a non-2xx response is treated as an error and the fallback fires.
aterga
marked this pull request as ready for review
July 25, 2026 16:31
raymondk
reviewed
Jul 26, 2026
Address review feedback: the Layer 1 serving rules pinned the specific .ic-assets.json5 rule inline, which is asset-canister-specific. State the requirement generically (serve /.well-known/* as a static file, exempt it from the SPA rewrite) and defer the concrete config to the Asset canister and Custom domains pages already linked.
raymondk
reviewed
Jul 26, 2026
Address review feedback on Layer 5: split the dense 'well-behaved agent' paragraph into who reads the file (the agent/connector, out of band like curl, not the II frontend during login, so no CORS or special headers) and what it does with it (report both origins alongside the principal so a mismatch is visible; a report in the agent's result, not a console log).
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
aterga
commented
Aug 5, 2026
Revise per PR review: declarative voice throughout (drop the proposed/standard/convention status framing and the standards-vs-proposed overview paragraph); trim the intro, drop the 'One way to expose each fact' and 'Anti-patterns' sections, the proposed-convention note, and the precedence table. Reformat the manifest as multi-line JSON with version and name fields (matching the ic-architecture template) and link the demo repo. Give the OQL Result payload a Candid type. Restructure Layer 5 (three-input framing; move the alternative-origins note after the derivation-origin file). Provide the icp canister metadata command in the acceptance tests. Rename the closing section to Related documents.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new guide, Service discoverability, under
guides/frontends/, placed immediately after Custom domains in the sidebar.The page describes what a canister app should expose so an AI agent can discover and use it end to end from just its URL, organized as five independently adoptable layers:
/.well-known/ic-architectureJSON manifest listing every canister and its role, served at the extensionless well-known path and generated at deploy time.candid:servicemetadata.getApiDoc/get_api_docquery method returning a markdown guide to units, lifecycle, and gotchas the types cannot convey.schema+executequery surface for data-rich apps./.well-known/ii-derivation-origin, and why theii-alternative-originsfile is the inverse relation and must not be read backwards.It also covers discovery anti-patterns (HTML-embedded metadata, the forgeable
x-ic-canister-idheader, runtime cookie config, JS-bundle mining, SPA catch-all responses), a precedence table of who produces what, a deployment checklist, and acceptance tests.Changes
docs/guides/frontends/service-discoverability.md(sidebar.order: 3).docs/guides/frontends/certification.md: sidebar order3→4.docs/guides/frontends/frameworks.md: sidebar order4→5.Notes
candid:service,ii-alternative-origins) and which are proposed..ic-assets.json5/ SPA routing), Custom domains (theic-domainswell-known pattern), Internet Identity (derivationOrigin/ alternative origins), and the Candid interface guide.npm run buildpasses; the new page builds with no validation warnings. Prose follows the docs style rules (no em-dashes, US spelling, sentence-case headings, relative.mdlinks).