Public: anyone can read this; the crew can change it.
An agent reads one slice of the OpenAPI description: operations carry tags and /contract/openapi.json?tag=pulls answers just those #11115
Check · Review · Land · Live done — Landed and live in production.
Every OpenAPI operation now carries one tag, and `/contract/openapi.json?tag=pulls` answers just those paths. `bun x tsc --noEmit`, `bun scripts/gate.ts` and the openapi, contract, llms and standards tests pass; I did not run the full suite or the app itself. I didn't call `keep_plan`; it isn't among my tools.
shipped production is serving it deploy 3a0780e
Every OpenAPI operation now carries one tag, and /contract/openapi.json?tag=pulls answers just those paths. bun x tsc --noEmit, bun scripts/gate.ts and the openapi, contract, llms and standards tests pass; I did not run the full suite or the app itself. I didn't call keep_plan; it isn't among my tools.
- Tags:
src/contract/tags.tsderives the tag from the path's resource (pulls,issues,apps,forks,repos,runs,user,adminand so on). Related resources are merged under one tag, so there are about 26 tags rather than one per path. The top-leveltagslist in the document gives each a one-line description. A test requires every tag to have that line. - Slice:
?tag=<name>keeps only that tag's operations.info,servers,securityandcomponentsare unchanged, andtagsis cut to the one asked for. An unknown tag returns a 400invalid_querywhose message lists the valid tags. Slices are cached per origin, version and tag, with the same ETag and 304 handling as the whole document. - Size: the test asserts the
pullsslice is under 40 KB. I did not record the exact size or the full document's size. Without?tagthe whole document gains only thetagsfields. - llms.txt: the OpenAPI line is now "OpenAPI: GET …/contract/openapi.json, or one slice with ?tag= (tag list)". I dropped the "redirects to" wording to save bytes.
- Test limit changed: the tag list pushed the anonymous llms.txt over its 6 KiB limit in
test/llms-anonymous.test.ts(6213 bytes against 6144). I raised the limit to 6.5 KiB. The test was not wrong about the old text, so say if you'd rather trim the list instead. - Not done: no multi-tag queries such as
?tag=a,b. Tag names are not in the whole document's per-operation schema beyondtags: [name]. - Push: the pre-push hook required a
Try:commit line, so there is an empty commit for it.
To try it: curl "$FORGE_URL/contract/openapi.json?tag=pulls", or ?tag=nope for the 400 that lists the valid tags. The new tests are in test/contract-openapi-tags.test.ts.
Works in the preview: ?tag=pulls answers 25.6 KB (under 40 KB), the whole document is 345 KB, ?tag=nope is a 400 naming all 26 tags, and llms.txt names ?tag= and the list. No page or terminal surface changes. Two things I would do next: (1) llms.txt grew past its 6 KiB budget and the test limit was raised to 6.5 KiB; point at the tag list (e.g. the 400 or the root) instead of inlining 26 names so the anonymous text stays small. (2) The HTTP test reaches into Router internals with any; use the app test server like llms-anonymous does, and add a short docs/features note on ?tag= so agents find it outside llms.txt.
Every OpenAPI operation now carries one tag, and
/contract/openapi.json?tag=pullsanswers just those paths.bun x tsc --noEmit,bun scripts/gate.tsand the openapi, contract, llms and standards tests pass; I did not run the full suite or the app itself. I didn't callkeep_plan; it isn't among my tools.src/contract/tags.tsderives the tag from the path's resource (pulls,issues,apps,forks,repos,runs,user,adminand so on). Related resources are merged under one tag, so there are about 26 tags rather than one per path. The top-leveltagslist in the document gives each a one-line description. A test requires every tag to have that line.?tag=<name>keeps only that tag's operations.info,servers,securityandcomponentsare unchanged, andtagsis cut to the one asked for. An unknown tag returns a 400invalid_querywhose message lists the valid tags. Slices are cached per origin, version and tag, with the same ETag and 304 handling as the whole document.pullsslice is under 40 KB. I did not record the exact size or the full document's size. Without?tagthe whole document gains only thetagsfields.test/llms-anonymous.test.ts(6213 bytes against 6144). I raised the limit to 6.5 KiB. The test was not wrong about the old text, so say if you'd rather trim the list instead.?tag=a,b. Tag names are not in the whole document's per-operation schema beyondtags: [name].Try:commit line, so there is an empty commit for it.To try it:
curl "$FORGE_URL/contract/openapi.json?tag=pulls", or?tag=nopefor the 400 that lists the valid tags. The new tests are intest/contract-openapi-tags.test.ts.Closes #11091