fix(infra): agent-friendly docs spec v0.5.0 — easy compliance wins#182
Merged
fix(infra): agent-friendly docs spec v0.5.0 — easy compliance wins#182
Conversation
…ent-Type header Addresses two failures from the afdocs spec v0.5.0 compliance check (issue #181): - Inject `> For the complete documentation index, see [llms.txt](/llms.txt)` near the top of every generated .md file (llms-txt-directive-md check). New mandatory requirement in spec v0.5.0. - Add public/_headers to serve .md files as `text/markdown; charset=utf-8` (content-negotiation check). Fixing this should also resolve the content-start-position failures as a side effect: once the checker receives text/markdown responses it will use the clean .md files (which start with content immediately) instead of converting Starlight's nav-heavy HTML.
This was referenced Apr 30, 2026
raymondk
pushed a commit
that referenced
this pull request
Apr 30, 2026
…ing) (#183) Follow-up to #182. The `public/_headers` file added in #182 is a Cloudflare Pages convention and has no effect on IC asset canister hosting. The site is deployed via `icp.yaml` using `@dfinity/asset-canister`, which serves files by URL path and does not process `_headers` files. Custom response headers for `.md` files are already configured in `public/.ic-assets.json5` (`Content-Type: text/markdown; charset=utf-8` for `**/*.md`). The `content-negotiation` spec check (serving different content for the same URL based on the `Accept` header) is not achievable with the IC asset canister without an edge worker or CDN middleware. See #181 for tracking. ## Sync recommendation hand-written
marc0olo
pushed a commit
that referenced
this pull request
May 6, 2026
…kend example (#207) ## Summary Companion to dfinity/icskills#182. Updates the Motoko backend example on the Internet Identity guide to use `mo:core/CallerAttributes` (motoko-core v2.5.0+) instead of the manual `Prim.callerInfoSigner` / `Prim.callerInfoData` dance. - `CallerAttributes.getAttributes<system>() : ?Blob` returns the bundle and traps when the signer isn't listed in the canister's `trusted_attribute_signers` env var. The hardcoded II principal moves out of code and into deploy config. - Drops the `mo:prim` import on the Motoko path (the wrapper handles primitives + signer comparison). - Adds an `icp.yaml` `settings.environment_variables` snippet for declaring `trusted_attribute_signers`. - Splits the per-language intro and the 'common mistakes' bullet so the Rust path (still requires explicit `msg_caller_info_signer()` check, no CDK wrapper yet) stays distinct from Motoko. `npm run build` passes; no new agent-docs warnings on the affected file. ## Sync recommendation informed by caffeinelabs/motoko-core (`src/CallerAttributes.mo`); dfinity/icp-cli (`docs/reference/canister-settings.md#environment_variables`); dfinity/icskills (`skills/internet-identity/SKILL.md` companion PR #182)
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.
Closes two of the six failures found in #181.
Summary
llms-txt-directive-md: inject> For the complete documentation index, see [llms.txt](/llms.txt)near the top of every generated.mdfile, insidecleanMarkdown()inplugins/astro-agent-docs.mjs. This is a new mandatory requirement in spec v0.5.0 (split from the previous singlellms-txt-directivecheck).content-negotiation: addpublic/_headersto serve.mdfiles withContent-Type: text/markdown; charset=utf-8. Fixing this may also resolve thecontent-start-positionfailures (34/50 pages) as a side effect — once agents receive a propertext/markdownresponse, they should use the clean.mdfiles (which start with content immediately) instead of converting Starlight's nav-heavy HTML.Sync recommendation
hand-written