name: docs description: Write and maintain Micronaut Framework module guides for micronaut-projects repositories. Use when users ask to add or update AsciiDoc guide sections, edit guide toc.yml, apply Micronaut docs macros, or fix docs build/publishing tasks. license: Apache-2.0 compatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template metadata: author: Álvaro Sánchez-Mariscal version: "1.0.0"
Docs (Micronaut Maintainer)
Use this skill for maintainer-facing guide work in Micronaut framework repositories. Do not default to end-user application documentation advice.
Goal
Implement source-backed documentation changes in src/main/docs/guide, keep toc.yml and content in sync, and validate with the Gradle docs pipeline used across micronaut-projects modules.
Procedure
- Confirm repository docs layout and build tasks.
- Plan
toc.ymland.adocupdates in lockstep. - Apply Micronaut docs macro conventions used by maintainers.
- Prefer generated configuration property references over manual tables.
- Build and validate
publishGuideanddocsoutputs.
1) Confirm docs layout and build tasks
- Check
src/main/docs/guide/toc.ymlfirst. - List relevant guide files under
src/main/docs/guide/**/*.adoc. - If examples are involved, inspect
doc-examples/(if present) and plan snippet tags from executable sources. - If assets are involved, keep images in
src/main/docs/resources/img/. - Confirm standard commands from
CONTRIBUTING.md:./gradlew publishGuide(or./gradlew pG) for guide assembly../gradlew docsfor guide + API docs assembly.
- If repository layout diverges from template conventions, follow local conventions and explicitly report the divergence.
2) Keep toc.yml and files in lockstep
Treat src/main/docs/guide/toc.yml as navigation source of truth.
Rules:
- Every visible section must exist in
toc.yml. - Every
toc.ymlentry must resolve to a real.adocpath. - Preserve section order unless the request explicitly changes navigation.
- Use nested sections for grouped topics when needed.
Example nested pattern:
controlPanels:
title: Available Control Panels
builtIn: Built-in
management: Management
This maps to:
src/main/docs/guide/controlPanels.adocsrc/main/docs/guide/controlPanels/builtIn.adocsrc/main/docs/guide/controlPanels/management.adoc
3) Apply Micronaut docs macro conventions
Use docs macros registered by micronaut-build (DocsExtensionRegistry) and maintained for framework guides.
Preferred mapping:
| Need | Preferred pattern |
|---|---|
| Dependency instructions | dependency:group:artifact[scope=...] |
| Source sample synchronized with test suites | snippet::path/to/File.ext[tags=...] |
| Multi-format configuration snippets | [configuration] listing blocks |
| Configuration properties reference | include::{includedir}configurationProperties/<fqcn>.adoc[] |
| Shell commands | [source,bash] blocks |
| Repository/release links | https://github.com/{githubSlug} and /releases links |
Guardrails:
- Do not handwrite separate Maven/Gradle dependency blocks when
dependency:is suitable. - Do not duplicate configuration property tables manually when generated references exist.
- Keep environment-sensitive instructions explicit (for example
MICRONAUT_ENVIRONMENTS=dev). - Prefer stable links to official Micronaut docs for endpoint semantics.
4) Use generated configuration property references correctly
micronaut-docsprovidesAsciiDocPropertyReferenceWriter, which generates AsciiDoc property fragments from configuration metadata.- Micronaut docs build wiring consumes those fragments via
{includedir}configurationProperties/...includes. - Prefer includes over hand-maintained property tables.
See references/micronaut-docs-providers.md for confirmed provider/macro details and source locations.
5) Build and validate documentation
From repository root, run:
./gradlew publishGuide
./gradlew docs
Validation checklist:
- Commands exit with code
0. - Output exists under
build/docs/. - Updated sections appear in navigation and render without missing includes.
- Added images/links resolve.
If publishGuide passes but docs fails, fix the failing stage and rerun both commands.
Maintainer Delivery Contract
When finishing docs work, report:
- Exact changed files (
.adoc,toc.yml, docs resources). - Which conventions were applied (
dependency:,snippet::,[configuration], generated property includes). - Build commands run and outcomes.
- Any repo-specific divergences or follow-ups.
Validation Checklist
-
toc.ymland.adocchanges are consistent. - Macros and includes follow Micronaut maintainer conventions.
-
publishGuideanddocsexecuted successfully. - Output and navigation verified under
build/docs/. - Guidance remains maintainer-focused (not generic app docs).
References
references/micronaut-docs-providers.mdreferences/control-panel-patterns.mdCONTRIBUTING.mdsrc/main/docs/guide/toc.yml