Skip to content

docs: add AGENTS.md and reorganize project documentation - #6871

Open
SeriousCoding789 wants to merge 33 commits into
tronprotocol:release_v4.8.3from
Little-Peony:fix_readme
Open

SeriousCoding789 wants to merge 33 commits into
tronprotocol:release_v4.8.3from
Little-Peony:fix_readme

Conversation

@SeriousCoding789

@SeriousCoding789 SeriousCoding789 commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Adds AGENTS.md, a build, test and architecture guide for AI coding assistants and new contributors.
  • Adds a Documentation index to the README.
  • Documents the p2p module: adds it to the module layout in AGENTS.md and to the modular introduction (en / zh), links its README from the Documentation index, and lists p2p-standalone.jar under Executables.
  • Moves the protobuf protocol document and the metrics changelog into docs/, and marks the two 2022 protocol copies as superseded.
  • Brings the protobuf protocol document in line with the .proto files: missing fields and enum values, the six Stake 2.0 contracts, and the removal of TransactionSign.
  • Adds Super Representative private-key security notes to docs/configuration.md.
  • Moves the java.lang.Math check into .github/scripts/check_math_usage.sh, run by both math-check.yml and the AGENTS.md self-check.
  • Removes the unused CodeClimate and Sonar configuration and the .dockerignore file.

Why are these changes required?

  • There was no single guide to building, testing and the rules CI enforces; several CI gates were undocumented.
  • A self-check copied into the docs drifts from CI; sharing one script keeps them identical.
  • Existing guides were not linked from the README, and the outdated protocol copies did not say so.
  • The module lists and the README predated the p2p module.
  • The protocol document had fallen behind the .proto files since 2023, mostly around Stake 2.0.
  • .codeclimate.yml and sonar-project.properties are no longer used by CI.

This PR has been tested by:

  • Unit Tests: N/A, documentation and CI script only.
  • Manual Testing: checked AGENTS.md against the build configuration and sources, ran the pre-commit checklist commands, and confirmed all moved paths and links resolve. check_math_usage.sh reports nothing on the repository and flags sample files using java.lang.Math.abs(-1), import java.lang.Math; and a static import. A script comparing every message and enum in the protocol document with the .proto files reports no differences. The p2p entries were checked against the build configuration, and the :p2p Checkstyle tasks referenced in AGENTS.md pass.

Follow up

None.

Extra details

None.

@abn2357

abn2357 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Two issues and one optional naming nit as below, please consider whether modifications are required.:

  • Reconcile the remaining Sonar references

    This PR removes .codeclimate.yml and sonar-project.properties because they are no longer used by CI, but Sonar-related references remain:

    • framework/build.gradle:3 still applies org.sonarqube.
    • CONTRIBUTING.md:150 says that the Sonar scanner is automatically triggered for pull requests.
    • CONTRIBUTING.md:161 requires contributions to pass the Sonar scanner test.

    Please update CONTRIBUTING.md to reflect the current CI process.

  • Fix the relative source link after moving the metrics changelog

    After moving METRICS_CHANGELOG.md into docs/, the link to common/src/main/java/org/tron/common/prometheus/ on line 22 now resolves to the non-existent path:

    docs/common/src/main/java/org/tron/common/prometheus/

    Please change the link target from:

    common/src/main/java/org/tron/common/prometheus/

    to:

    ../common/src/main/java/org/tron/common/prometheus/

  • [Nit] Consider using kebab-case consistently

    Most files under docs/ use kebab-case, while metrics_changelog.md uses snake_case. Consider renaming it to metrics-changelog.md for consistency with names such as protobuf-protocol-document.md.

@SeriousCoding789

Copy link
Copy Markdown
Contributor Author

Two issues and one optional naming nit as below, please consider whether modifications are required.:

  • Reconcile the remaining Sonar references
    This PR removes .codeclimate.yml and sonar-project.properties because they are no longer used by CI, but Sonar-related references remain:

    • framework/build.gradle:3 still applies org.sonarqube.
    • CONTRIBUTING.md:150 says that the Sonar scanner is automatically triggered for pull requests.
    • CONTRIBUTING.md:161 requires contributions to pass the Sonar scanner test.

    Please update CONTRIBUTING.md to reflect the current CI process.

  • Fix the relative source link after moving the metrics changelog
    After moving METRICS_CHANGELOG.md into docs/, the link to common/src/main/java/org/tron/common/prometheus/ on line 22 now resolves to the non-existent path:
    docs/common/src/main/java/org/tron/common/prometheus/
    Please change the link target from:
    common/src/main/java/org/tron/common/prometheus/
    to:
    ../common/src/main/java/org/tron/common/prometheus/

  • [Nit] Consider using kebab-case consistently
    Most files under docs/ use kebab-case, while metrics_changelog.md uses snake_case. Consider renaming it to metrics-changelog.md for consistency with names such as protobuf-protocol-document.md.

very good suggestion, will fix all.

Comment thread framework/build.gradle
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread README.md
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
download() now prints a notice and returns non-zero; release files
must be fetched and verified manually. It returns instead of exiting
so that restart() still completes when rebuildManifest reaches it.
start.sh and start.sh.simple are not changed on this branch, so keep their
guide and their rows in the README Executables table.
- Move the java.lang.Math check into .github/scripts/check_math_usage.sh and
  run it from both math-check.yml and AGENTS.md, so the self-check also flags
  fully qualified calls and imports.
- Document the protoLint rule that the zero value of a new enum starts with
  UNKNOWN_.
- Use an existing test method in the single-test example and drop protocol
  from the Checkstyle module list.
- Add the fields and enum values missing from Account, AccountResource,
  Transaction.Result, TransactionInfo, ResourceReceipt, InternalTransaction,
  SmartContract, ReasonCode and HelloMessage, with descriptions, and drop
  TransactionSign, which no longer exists.
- Document the six Stake 2.0 contracts and the FreezeV2 / UnFreezeV2
  messages.
- State that the .proto files are the source of truth in the document,
  README, AGENTS.md and the outdated copies under protocol/src/main/protos.
- README: list p2p-standalone.jar in the executables table.
- AGENTS.md and the modular introduction (en/zh): drop the libp2p
  version, the DNS providers, the tree:// URL format and how common
  exposes the module, since those can change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

8 participants