Micronaut Guides Infrastructure
Scope
Use this skill for changes outside normal guide content, especially:
buildSrc/src/main/groovy/io/micronaut/guides/**
buildSrc/src/main/java/io/micronaut/guides/**
buildSrc/src/main/resources/guide-metadata.schema.json
buildSrc/src/main/resources/pom.xml
- root
build.gradle, settings.gradle, and gradle/asciidoc.gradle
cli/**
- generated guide task behavior, macros, feed/index output, and feature registration
For ordinary guide content under guides/, use micronaut-guides-authoring first.
Key Files
GuideAsciidocGenerator.groovy: custom Asciidoc macros, placeholders, exclusions, and rendered .adoc generation.
GuidesPlugin.groovy: dynamic Gradle tasks such as <slug>Build, <slug>GenerateDocs, <slug>RunTestScript, and zip generation.
GuideProjectGenerator.groovy and core/DefaultGuideProjectGenerator.java: generated sample project assembly.
GuideParser.java, Guide.java, App.java, and guide-metadata.schema.json: metadata contract.
Category.java: ordered display categories.
core/*MacroSubstitution.java: reusable macro implementations used by tests.
feature/*.java: local Starter feature replacements or additions.
buildSrc/src/main/resources/pom.xml: dependency coordinates used by local features and replacement logic.
IndexGenerator.groovy, JsonFeedGenerator, RssFeedGenerator, and ThemeProcessor.groovy: published site metadata and presentation.
Change Pattern
- Find an existing test for the affected behavior under
buildSrc/src/test.
- Add or update a focused test before changing generator behavior when possible.
- Keep macro syntax backward-compatible unless the user explicitly asks for a breaking migration.
- Update
guide-metadata.schema.json and metadata parsing together when adding metadata fields.
- Update
Category.java only with display strings that should appear on the public guide site.
- For new local features, add the feature class and ensure dependency coordinates exist in
buildSrc/src/main/resources/pom.xml when needed.
Validation
Run focused buildSrc tests for infrastructure changes:
./gradlew buildSrc:test --tests '<test-class-or-pattern>' --stacktrace
If tests touch Gradle task wiring or generated guide output, also build at least one representative guide:
./gradlew <lowerCamelSlug>Build --stacktrace
For broad generator or schema changes, run:
./gradlew buildSrc:test --stacktrace
./gradlew build --stacktrace
Use the micronaut-guides-validation skill for guide-specific rendering and generated sample project checks.
Review Risks
Before finishing, check for:
- Silent changes to all guides caused by macro, placeholder, or template edits.
- Metadata schema drift from parser behavior or tests.
- Task name changes that break documented commands or CI.
- Dependency replacement changes that affect both Gradle and Maven generated projects.
- Generated files or build artifacts accidentally staged outside intended outputs.
1---2name: micronaut-guides-infrastructure3description: Use when modifying the Micronaut Guides build infrastructure, including buildSrc guide generators, macro substitutions, metadata parsing/schema, categories, generated Gradle tasks, guide features, dependency coordinate replacement, indexing, feeds, theme processing, and the cli module.4---56# Micronaut Guides Infrastructure78## Scope910Use this skill for changes outside normal guide content, especially:1112- `buildSrc/src/main/groovy/io/micronaut/guides/**`13- `buildSrc/src/main/java/io/micronaut/guides/**`14- `buildSrc/src/main/resources/guide-metadata.schema.json`15- `buildSrc/src/main/resources/pom.xml`16- root `build.gradle`, `settings.gradle`, and `gradle/asciidoc.gradle`17- `cli/**`18- generated guide task behavior, macros, feed/index output, and feature registration1920For ordinary guide content under `guides/`, use `micronaut-guides-authoring` first.2122## Key Files2324- `GuideAsciidocGenerator.groovy`: custom Asciidoc macros, placeholders, exclusions, and rendered `.adoc` generation.25- `GuidesPlugin.groovy`: dynamic Gradle tasks such as `<slug>Build`, `<slug>GenerateDocs`, `<slug>RunTestScript`, and zip generation.26- `GuideProjectGenerator.groovy` and `core/DefaultGuideProjectGenerator.java`: generated sample project assembly.27- `GuideParser.java`, `Guide.java`, `App.java`, and `guide-metadata.schema.json`: metadata contract.28- `Category.java`: ordered display categories.29- `core/*MacroSubstitution.java`: reusable macro implementations used by tests.30- `feature/*.java`: local Starter feature replacements or additions.31- `buildSrc/src/main/resources/pom.xml`: dependency coordinates used by local features and replacement logic.32- `IndexGenerator.groovy`, `JsonFeedGenerator`, `RssFeedGenerator`, and `ThemeProcessor.groovy`: published site metadata and presentation.3334## Change Pattern35361. Find an existing test for the affected behavior under `buildSrc/src/test`.372. Add or update a focused test before changing generator behavior when possible.383. Keep macro syntax backward-compatible unless the user explicitly asks for a breaking migration.394. Update `guide-metadata.schema.json` and metadata parsing together when adding metadata fields.405. Update `Category.java` only with display strings that should appear on the public guide site.416. For new local features, add the feature class and ensure dependency coordinates exist in `buildSrc/src/main/resources/pom.xml` when needed.4243## Validation4445Run focused buildSrc tests for infrastructure changes:4647```bash48./gradlew buildSrc:test --tests '<test-class-or-pattern>' --stacktrace49```5051If tests touch Gradle task wiring or generated guide output, also build at least one representative guide:5253```bash54./gradlew <lowerCamelSlug>Build --stacktrace55```5657For broad generator or schema changes, run:5859```bash60./gradlew buildSrc:test --stacktrace61./gradlew build --stacktrace62```6364Use the `micronaut-guides-validation` skill for guide-specific rendering and generated sample project checks.6566## Review Risks6768Before finishing, check for:6970- Silent changes to all guides caused by macro, placeholder, or template edits.71- Metadata schema drift from parser behavior or tests.72- Task name changes that break documented commands or CI.73- Dependency replacement changes that affect both Gradle and Maven generated projects.74- Generated files or build artifacts accidentally staged outside intended outputs.