Repository navigation
fix(agent-setup): link the .md rendering of every docs page an agent receives - #836
Conversation
…receives The managed AGENTS.md block says the `.md` suffix serves the plain-text source an agent can read, then linked /apps/reference/, /apps/guide/ and /apps/examples by their HTML routes (200 text/html, full site shell). The `--track api` refusal did the same with /site/ and /orchestration/. All five now link their `.md` twins, each probed 200 text/markdown with no redirect. The "over 100 KB, so page it" sentence is replaced by a shared-tail line that names no size and promises no sub-page: a fetch tool may cut a long reference page off, so missing content was probably truncated - download and search the page, or fetch a narrower page if it links to one. New guard TestEveryDocsPageURLAnAgentReceivesIsMarkdown (+ detector control): every developer.civitai.com address in the whole rendered block, both SDK arms, and the refusal must be `.md` or /llms.txt. Red at ca9504b (32 findings), green here. TestEveryDocsURLSpellingIsLedgered now also derives each `.md` URL's `<path>/` form so the ledger keeps matching the pages under /apps/guide/ (unchanged result: 17 ledgered, 4 exempt). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Audit round 0 (requirements & deletion) — verdict: proceed to the checklist. Audited head Dispositions: 🤖 Generated with Claude Code |
|
Audit round 1 (nine-axis checklist) — clean: no 🔴, no 🟡. The audit ladder ends here. Audited head Re-verified independently rather than taken from the PR body:
🟢 noted, not acted on: Not covered by this PR: the Verdict: safe to merge (advisory). 🤖 Generated with Claude Code |
What
civitai agent-setup --track appwrites an AGENTS.md block that tells coding agents the.mdsuffix serves the agent-readable source. Then it linked three pages by their HTML route. The--track apirefusal did the same thing with two more pages. This PR switches all five to their.mdtwins:/apps/reference/(both SDK arms)/apps/reference.md/apps/guide//apps/guide.md/apps/examples/apps/examples.md/site/(--track apirefusal)/site.md/orchestration/(--track apirefusal)/orchestration.mdProbed 2026-10-14 without following redirects. Every new spelling returns
200 text/markdownwith front matter. Every old one returns200 text/htmlwith a full<!DOCTYPE html>site shell (77–118 KB).app_submit.go's first-review URL was already.md. I left the human-facing links inapp_listing.go, the README and the scaffold READMEs alone.The size sentence
The line "It is over 100 KB, so page it" is gone. In its place is one line in the shared tail, so both SDK arms get it. It says some reference pages are long enough that a fetch tool cuts them off without saying so. If content is missing, it was probably truncated, so the agent should download the page and search it, or fetch a narrower page if the page links to one. The line names no size and promises no sub-page, so it stays true whether or not the planned hub + sub-page split of the large reference pages has landed. Net cost: +238 template bytes.
Tests
TestEveryDocsPageURLAnAgentReceivesIsMarkdown. It renders the whole block for every project shape under both{{ if .ElementsSDK }}arms, plus the--track apirefusal. Everydeveloper.civitai.comaddress must end in.mdor be/llms.txt. It fails atca9504b(origin/main) with only the test file added, with 32 findings (3 routes × 10 rendered blocks, plus the refusal's 2), and passes here.TestHTMLRouteDetectorCanFailis its control.wantDocsSectionandTestAgentSetupTrackAPIRefusesare updated to the new spellings and wording.TestEveryDocsURLSpellingIsLedgered: each.mdgolden URL now also contributes its<path>/form. Without that, 12 ledger rows that link pages under/apps/guide/(README, the scaffolds' responsive pointer, and others) report "no longer spells ANY" even though none of their URLs changed. The ledger result is the same as on main: 17 ledgered, 4 exempt.go test ./...: the same 3 top-level failures as on origin/main, allTestOracle*dogfood tests that need a local Chromium/container. The new tests add 2 passes.go vet,gofmt -s -landmake lintare clean.CIVITAI_CHECK_DOCS_LINKS=1:TestBlockDocsLinksResolvepasses: 8 of 8 links live, 0 moved, 0 gone.TestEveryShippedDocsURLResolvesfails, with the same 4 moved and 2 gone as origin/main. All six are in test fixtures (/apps/scopes,/apps/submit,/apps/guidein redact fixtures,http://…/apps), and none come from this change.🤖 Generated with Claude Code