docs: add Agent-friendly entry index and source-derived API specs#347
Conversation
- Add docs/llms.txt as an AI entry index linking the API references and node operation pages (served at /llms.txt). - Declare documentation-en as the authoritative source on the home page, with this Chinese repository as the translation that follows it. - Add a warning in the SR setup section to chmod 600 the config, never commit a config file with a real private key, and prefer keystore.
|
The direction is valuable — generating machine-readable specs from java-tron source ground truth is the right idea. But I'd recommend reworking the PR before merging, primarily around where these artifacts live and how strict the schemas should be.
|
a97b067 to
0287e15
Compare
Thank you for your suggestions.
|
|
Broken directory links in The second table in | HTTP API | [`specs/http/`](specs/http/) |
| JSON-RPC API | [`specs/json-rpc/`](specs/json-rpc/) |MkDocs does not generate directory index pages by default, and there is no index.md under specs/http/ or specs/json-rpc/. Once built, both links will 404 on the published site. |
|
Verified against the merged
Where it lands: the PR fixed Concretely, 105 of the 110 SDK impact: request construction is type-safe, but every response deserializes through |
0287e15 to
7aa6fd6
Compare
Thank you. This has been fixed, along with the 404 issue for the link above. (Note: Adding an index.md file is not suitable here, so that approach was not adopted. Local deployment tests still return a 404 Github page; the link will only redirect to the correct GitHub page after this PR is merged.) The changes were amended into the latest commit rather than submitted separately. |
7aa6fd6 to
e2e3348
Compare
Summary
docs/llms.txtas an Agent entry index linking the API references and node-operation pages (served at/llms.txt).docs/api/openapi.yaml), OpenRPC (docs/api/openrpc.json), and per-endpoint HTTP / JSON-RPC spec files underdocs/api/specs/.Spec generation
The specs are produced with a base + per-endpoint overlay workflow: each HTTP path and JSON-RPC method is derived from a source-extracted base and refined by an endpoint-specific overlay, replacing the earlier monolithic generation approach. This yields more accurate per-interface fragments, which bundle into the top-level
openapi.yaml/openrpc.json.Spec quality assurance
The regenerated definitions go through a fine-grained, layered audit and cross-validation across multiple large language models — covering error response modeling, JSON content typing, integer formats, nested object schemas, and JSON-RPC result shapes — for higher-quality SDK generation.
Unrelated fixes bundled in
The following two items are not part of the Agent-friendly docs theme. They address two optimization items surfaced by the routine AI audit report and are included here for convenience:
documentation-enas the authoritative source on the home page, with this Chinese repository as the translation that follows it.chmod 600the config, never commit a config file with a real private key, and prefer keystore.Test plan
mkdocs buildsucceeds with the new pages andmkdocs.ymlnav entry./llms.txtresolves and its links point to valid pages.