Uh oh!
There was an error while loading. Please reload this page.
docs(api): a developer page for declarative apis: endpoints (ADR-0121) - #10333
Merged
Conversation
…R-0121)
`api` is an authorable metadata kind, live from protocol 17, whose only
hand-written coverage was the normative implementer text in
`protocol/kernel/http-protocol.mdx` — and the page a developer actually clicks,
`api/plugin-endpoints.mdx`, is a catalog of built-in plugin routes with nothing
about authoring. The naming collision sent the reader to the wrong page.
New `content/docs/api/declarative-endpoints.mdx` leads with the channel decision
(ADR-0121 D3: caller inside the platform → `actions`, caller outside → `apis:`),
states the four publish gates in the terms of the errors publish/validate
actually emit, gives `authRequired: false` its own section with the ADR-0121 D6
armed-`rateLimit` obligation, and covers `api` being code-only (403
`NOT_CREATABLE` on the runtime metadata route) plus what `/openapi.json` says.
Both worked examples carry `{/* os:check */}`, so they are type-checked against
the current spec by `check:skill-examples` — which caught one defect while this
page was being written: `target` is required on every entry even for an
`object_operation`, where nothing reads it. The page now says so.
`api/index.mdx` gets a Card, a module-list entry and the sentence that
disambiguates the two endpoint pages; `plugin-endpoints.mdx` gets one intro
sentence saying what it is not and a "See also" link (no restructuring);
`api/meta.json` gets one entry.
Declared deviation: `.claude/workflows/docs-accuracy-audit.js` carries the one
line written by `node scripts/docs-audit/check-audit-scope.mjs --write`, which a
new hand-written page requires. It is committed exactly as generated, never hand
edited. That makes `.claude/**` part of this diff, so the PR is human-merge-only.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GawRwpD44VwBDVy3hs77AX`Build Docs` failed deterministically on this page: the `description` was an unquoted YAML scalar containing `apis: `, and a colon-followed-by-space inside a plain scalar opens a nested mapping. YAMLParseError: Nested mappings are not allowed in compact mappings at line 2, column 14 Quoting the whole scalar is the fix; the text is unchanged. Verified with the same `yaml` 2.9.0 the docs build resolves — the pre-fix string reproduces that exact error and the committed one parses, and all 396 `content/docs/**/*.mdx` frontmatter blocks parse clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GawRwpD44VwBDVy3hs77AX
os-elon
marked this pull request as ready for review
August 21, 2026 01:09
os-elon
enabled auto-merge
August 21, 2026 01:09
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 21, 2026
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 freeto 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.
Fixes#10215
apiis an authorable metadata kind (ApiEndpointSchema, ADR-0121), live from protocol17, and the only hand-written page that covered it was the normative implementer text in
protocol/kernel/http-protocol.mdx. The page a developer actually clicks —api/plugin-endpoints.mdx— is a catalog of built-in plugin routes with nothing aboutauthoring, so the naming collision sent the reader to the wrong page. That mattered more
than usual here:
authRequired: falseis, in ADR-0121's own words, an anonymous,internet-reachable execution entry point, and it was undocumented outside the protocol
reference.
What this adds
New
content/docs/api/declarative-endpoints.mdx, developer-facing rather thannormative:
action, caller outside reaches anapis:endpoint. Plus D5's reassurance: choosingwrong costs the URL shape and the policy keys, never the execution semantics.
error publish/validate actually emits, with the real message fragments quoted. Evaluation
order and the stop-at-first-failure behaviour are stated, because they decide which of
three problems you are told about.
authRequired: falsegets its own section, not a bullet — what it opens, the D6armed-
rateLimitobligation (and whyenableddefaulting tofalsemakes a budgetwritten without it meter nothing), the pre-auth metering order, the bucket key, and two
things the flag does not buy: it is not a permission grant, and payload authenticity is
not covered by any key in this vocabulary.
apiis code-only (api注册表条目声明 allowRuntimeCreate: true,但运行时创建的端点匹配器永远看不见 —— 声明的能力运行时不兑现(真实 boot 实测) #5488) —allowRuntimeCreate: false/allowOrgOverride: false,the 403
NOT_CREATABLEbefore body validation, and why the runtime metadata door wasnever the door that serves.
/openapi.jsonsays about the result.Edits, all inside
content/docs/api/:index.mdx— a Card, a module-list entry, and the sentence that disambiguates the twoendpoint pages.
plugin-endpoints.mdx— one intro sentence saying what the page is not, and one "Seealso" link. No restructuring, no re-titling.
meta.json— one entry, placed next toplugin-endpointsso the sidebar itself does thedisambiguating.
protocol/kernel/http-protocol.mdxis not edited — it is cross-linked, including onenote reconciling its five-row gate table with this page's four families (same checks,
different grouping).
Declared deviation:
.claude/is in this diffA new hand-written page turns
check:docs-audit-scopered until the workflow's derivedscope list is regenerated.
.claude/workflows/docs-accuracy-audit.jstherefore carries theone line written by
node scripts/docs-audit/check-audit-scope.mjs --write, committedexactly as generated and never hand-edited:
.claude/**is a governed surface (#9866), so this PR is human-merge-only: it stays adraft, is not enqueued, and has no auto-merge armed. Batch-2 siblings #10213 and #10216
append to the same file; on conflict the remedy is re-running
--writeon the mergedbase, never a hand edit.
No changeset: the diff is documentation plus that generated line, so nothing is published.
A defect the page caught while being written
Both worked examples carry
{/* os:check */}, socheck:skill-examplestype-checks themagainst the current spec. It rejected the first draft:
targetis required on everyApiEndpoint, including anobject_operation, where neither the publish gate nor theexecutor reads it. The examples now declare it and the page says so in prose — exactly the
kind of thing a developer discovers as a type error otherwise.
Verification
All local gates green on
cd7e5773b, the final commit — re-derived after committing withnode scripts/pm/dispatch-gates.mjs(which named three families the dispatch list did not:check:doc-formula-expressions,check:pm-governed-merges,check:skill-frame-sync, allvia the
.claude/path):check:doc-anchors252 internal #fragment link(s) across 400 source file(s) all resolve to a real headingcheck:doc-authoring381 files clean — no bare metadata literalscheck:docs-audit-scopescope is in sync with content/docs/: 181 hand-written doc(s)check:docs-redirectsOK (92 entries …)check:published-readme-links152 outbound link(s) across 60 published markdown file(s)check:role-wordOK, no new occurrences of the reserved wordcheck:cross-package-test-inputsOK: 12 package(s) read outside themselves, all declaredcheck:skill-examples211 prose examples type-check against @objectstack/speccheck:empty-stateall classified (1 closed, 2 open, 4 output, 9 scope)check:livenessevery governed-type property … is classifiedcheck:strictness-ledger61 file(s) across 5 triaged director(ies)check:variant-docs18 discriminated union(s) — 8 governed, 10 exemptcheck:doc-formula-expressions22 record-scoped formula example(s) across 407 files / 1417 TS blocks judged cleancheck:skill-frame-sync4 copies of the decision frame are structurally isomorphiccheck:pm-governed-merges--self-test: 81 assertionsEvery heavy step ran through
scripts/pm/os-verify-lock.sh.Generated by Claude Code
Generated by Claude Code