Skip to content

docs: add Agent-friendly entry index and source-derived API specs#627

Merged
Benson0224 merged 4 commits into
tronprotocol:masterfrom
abn2357:add_agent_friendly_doc
Jun 30, 2026
Merged

docs: add Agent-friendly entry index and source-derived API specs#627
Benson0224 merged 4 commits into
tronprotocol:masterfrom
abn2357:add_agent_friendly_doc

Conversation

@abn2357

@abn2357 abn2357 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add docs/llms.txt as an Agent entry index linking the API references and node-operation pages (served at /llms.txt).
  • Add source-derived API specs: OpenAPI (docs/api/openapi.yaml), OpenRPC (docs/api/openrpc.json), and per-endpoint HTTP / JSON-RPC spec files under docs/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. The local generation assets (java-tron source dump, overlays, scripts) are kept out of the repo via .gitignore.

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:

  • Declare documentation-en as the authoritative source on the home page, with documentation-zh as the translation that follows it.
  • Add an SR-setup safety note: chmod 600 the config, never commit a config file with a real private key, and prefer keystore.

Test plan

  • mkdocs build succeeds with the new pages and mkdocs.yml nav entry.
  • /llms.txt resolves and its links point to valid pages.
  • Generated OpenAPI / OpenRPC specs parse without errors.

abn2357 added 3 commits June 18, 2026 16:53
- 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 documentation-zh 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.
@abn2357 abn2357 changed the title docs: add AI-friendly entry index and source-derived API specs docs: add Agent-friendly entry index and source-derived API specs Jun 20, 2026
@abn2357 abn2357 force-pushed the add_agent_friendly_doc branch 2 times, most recently from 33a18b8 to 047f62e Compare June 29, 2026 13:14
@abn2357 abn2357 force-pushed the add_agent_friendly_doc branch from 047f62e to 19cb333 Compare June 30, 2026 07:55

@vivian1912 vivian1912 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Benson0224 Benson0224 merged commit 6bb54e7 into tronprotocol:master Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants