Doc generation

From axone-protocol/contracts · View interactive version

Doc generation is an AI agent skill from the GitHub repository axone-protocol/contracts. Guide for regenerating Axone contract schemas and rendered Markdown docs. Use when contract APIs or metadata change, when checking generated-doc drift, or when preparing documentation commits.

How to use this skill

Skill file

Generated Documentation

Source of Truth

Generated docs come from Rust API types and schema metadata:

Rust messages/types + metadata.json
              ↓
      contracts/*/schema/*
              ↓
          docs/*.md

In this repository, the canonical command is:

cargo make docs

Do not treat docs/*.md as hand-edited source files. The Rust types and metadata are the source of truth.

What `cargo make docs` really does

cargo make docs already depends on:

That means one docs refresh can update both:

Standard Workflow

Regenerate everything

cargo make docs

Inspect what changed

git status --short
git diff -- docs contracts

Commit the generated artifacts

If the change is documentation generation only, prefer a message such as:

docs(gov): regenerate documentation
docs(vc): regenerate documentation
docs: regenerate generated documentation

Avoid vague subjects such as docs: update generated documentation.

When regeneration is required

Refresh generated docs whenever you change:

File Expectations

After regeneration, review and commit all relevant generated artifacts:

Even if CI only reports drift on docs/*.md, schema files are still generated source artifacts in this repo and should stay in sync with the code.

Repo-Specific Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.