{"owner":"micronaut-projects","repo":"micronaut-core","hasSkills":true,"totalSkillsCount":23,"totalTokensCount":28350,"categories":["anthropic-skill","root-instruction"],"hasMcp":false,"mcpConfig":null,"found":[".agents/skills/gradle/SKILL.md",".agents/skills/agent-md-refactor/SKILL.md",".agents/skills/skill-creator/SKILL.md",".agents/skills/docs/SKILL.md",".agents/skills/guides/SKILL.md",".agents/skills/coding/SKILL.md",".agents/skills/micronaut-sourcegen/SKILL.md",".agents/skills/skill-creator/references/spec-checklist.md",".agents/skills/skill-creator/references/research-synthesis.md",".agents/skills/skill-creator/references/templates.md","inject/AGENTS.md","core-processor/AGENTS.md",".agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md",".agents/skills/guides/references/guide-authoring-conventions.md",".agents/skills/guides/references/guide-inventory.md",".agents/skills/guides/references/pdf-export-and-pr.md",".agents/skills/guides/references/repository-workflow.md",".agents/skills/gradle/references/gradle-best-practices.md",".agents/skills/gradle/references/micronaut-build-plugins.md",".agents/skills/docs/references/control-panel-patterns.md",".agents/skills/docs/references/micronaut-docs-providers.md",".agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md",".agents/skills/agent-md-refactor/references/refactor-playbook.md"],"skills":{".agents/skills/gradle/SKILL.md":"---\nname: gradle\ndescription: Execute Gradle maintainer operations for Micronaut repositories using micronaut-build internals and modern Gradle best practices. Use when users ask to diagnose build failures, maintain BOM/version catalogs, manage publishing/signing, enforce binary compatibility, or debug micronaut-build plugin behavior.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects using micronaut-build plugins\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n  gradle-major-version: \"9.x\"\nmcp:\n  maven-tools:\n    command: docker\n    args: [\"run\", \"-i\", \"--rm\", \"arvindand/maven-tools-mcp:latest\"]\n---\n\n# Gradle (Micronaut Committer)\n\nUse this skill for Micronaut framework maintainer work. Do not default to end-user app guidance.\n\n## Goal\n\nApply correct, source-backed Gradle changes in Micronaut repositories, using the `micronaut-build` plugin contracts and current Gradle best practices.\n\nCurrent coverage target: repositories on Gradle major line `9.x`.\n\nFor dependency-intelligence tasks (version freshness, stability, release cadence, CVE/license checks), use the embedded `maven-tools` MCP via `skill_mcp`.\n\n## Procedure\n\n1. Identify build shape and active plugins.\n2. Map requested work to exact `micronaut-build` plugin behavior.\n3. Execute minimal maintainer-safe change.\n4. Verify with targeted and aggregate Gradle tasks.\n\n### 1) Establish build shape first\n\n- Inspect `settings.gradle` or `settings.gradle.kts` for settings plugins and dependency management.\n- Confirm `io.micronaut.build.shared.settings` is present unless the repository intentionally diverged.\n- Validate settings-scoped plugins (especially Develocity wiring) in `settings.gradle(.kts)`, not in project `build.gradle(.kts)`.\n- Confirm root build applies `io.micronaut.build.internal.parent` for standard aggregation behavior.\n- Inspect root and impacted module build files for applied plugin IDs and `micronautBuild` extension usage.\n- Inspect `buildSrc`/convention plugins before modifying module build scripts.\n- Inspect `gradle.properties` and `gradle/*.versions.toml` for version source and overrides.\n- Treat module directory names and Gradle project paths separately; if standardized names are enabled, use `:micronaut-*` paths for task targeting.\n- If module paths are unclear, run `./gradlew projects`.\n- If dependency resolution is involved, capture `dependencyInsight` before changing files.\n\n### 2) Use source-of-truth plugin contracts\n\n- Use `references/micronaut-build-plugins.md` as the authoritative plugin behavior map.\n- Treat `micronaut-build` source as primary truth. Its README may be outdated.\n- Remember default plugin IDs are internal: `io.micronaut.build.internal.<name>`.\n- Important exception: `io.micronaut.build.shared.settings`.\n\n### 3) Execute maintainer workflows\n\n- **Build failures**: reproduce with minimal task path, then expand to module `check`, then root validation.\n- **Catalog/version updates**: use plugin-provided workflows (`updateVersionCatalogs`, `useLatestVersions`) where available.\n- **Catalog imports**: prefer `micronautBuild { importMicronautCatalog() }` and alias-specific imports over ad hoc BOM wiring when repository conventions use settings extension catalog import.\n- **Dependency intelligence**: use the `maven-tools` MCP for latest stable versions, upgrade comparisons, and dependency health signals before changing catalogs or BOM constraints.\n- **Dependency scope hygiene**: choose `api` only for public API surface; use `implementation` for internals; use `compileOnly`/`runtimeOnly` intentionally.\n- **BOM/publishing**: verify BOM generation, inlining behavior, publication metadata, and signing gates.\n- **Binary compatibility**: keep baseline discovery and accepted API changes explicit; never silently suppress regressions.\n- **Docs/quality**: treat root-only aggregator plugins and docs pipelines as first-class checks.\n- **Layering**: prefer convention plugin changes (`buildSrc`) over duplicating logic in many module build files.\n\n### 4) Verify before completion\n\n- Run at least one targeted task and one aggregate task:\n  - `./gradlew :<module>:check`\n  - `./gradlew check`\n- For maintainer pipelines, include docs and style gates where applicable:\n  - `./gradlew check docs`\n  - `./gradlew spotlessApply spotlessCheck`\n- For API-affecting changes, run compatibility checks:\n  - `./gradlew japiCmp`\n- For newly added published modules, define when binary compatibility checks start in module build logic (example):\n\n```kotlin\nmicronautBuild {\n    binaryCompatibility.enabledAfter(\"2.0.0\")\n}\n```\n\n- Use the repository's intended first compatible release version instead of blindly reusing `2.0.0`.\n- Add focused diagnostics when needed:\n  - `./gradlew dependencyInsight --configuration <conf> --dependency <module>`\n  - `./gradlew --scan <task>`\n- Report exact commands and outcomes.\n\n## Guardrails\n\n- Do not use `enforcedPlatform` when plugin logic explicitly forbids it.\n- Do not bypass Micronaut version mismatch checks except intentional development-version flows.\n- Do not apply root-only plugins to subprojects.\n- Do not replace framework maintainer workflows with generic app-centric shortcuts.\n\n## Best Practices\n\nUse `references/gradle-best-practices.md` for operational standards on:\n\n- configuration and build cache behavior,\n- provider/lazy configuration patterns,\n- toolchains and reproducibility,\n- secure publishing and dependency verification,\n- CI reliability.\n\n## Examples\n\n- \"Diagnose why micronaut-core version mismatch fails on compileClasspath.\"\n- \"Update version catalogs safely and apply latest allowed minor versions.\"\n- \"Fix Sonatype release pipeline behavior for a non-snapshot release.\"\n- \"Investigate binary compatibility failure and validate accepted changes file usage.\"\n\n## Validation Checklist\n\n- [ ] Active plugins identified from build files.\n- [ ] Decisions mapped to `micronaut-build` source behavior.\n- [ ] Changes align with maintainer workflows.\n- [ ] Verification tasks run and outcomes captured.\n- [ ] No end-user-only Gradle guidance substituted for framework operations.\n\n## References\n\n- `references/micronaut-build-plugins.md`\n- `references/gradle-best-practices.md`\n",".agents/skills/agent-md-refactor/SKILL.md":"---\nname: agent-md-refactor\ndescription: Refactor oversized agent instruction files into a progressive-disclosure structure. Use when users ask to split AGENTS.md/CLAUDE.md/COPILOT.md, reduce instruction bloat, or organize guidance into linked topic files.\nlicense: Apache-2.0\ncompatibility: Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Agent MD Refactor\n\nRefactor monolithic instruction files into a compact root file plus linked topic files.\nKeep this file focused on execution flow and load detailed templates/examples from references.\n\n## Goal\n\nDeliver a maintainable instruction system with:\n\n- a minimal root instruction file containing only universal guidance,\n- linked topic files for detailed rules,\n- contradictions resolved and vague/redundant rules removed.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Refactor this AGENTS.md to use progressive disclosure.\"\n- \"Split my CLAUDE.md into focused instruction files.\"\n- \"My instruction file is too long, reorganize it.\"\n\nShould not trigger:\n\n- \"Explain what AGENTS.md is.\"\n- \"Fix one typo in CLAUDE.md.\"\n- \"Write a brand-new coding standard from scratch.\"\n\nMore examples: [examples-and-anti-patterns](references/examples-and-anti-patterns.md).\n\n## Procedure\n\n1. Inventory instruction sources (`AGENTS.md`, `CLAUDE.md`, `COPILOT.md`, related guidance docs).\n2. Detect contradictions and resolve by repository precedence.\n3. Keep only root-level essentials in the root instruction file.\n4. Group remaining content into 3-8 linked topic files with clear names.\n5. Remove non-actionable, redundant, and outdated directives.\n6. Validate links, coverage, and consistency before completion.\n\nDetailed step playbook: [refactor-playbook](references/refactor-playbook.md).\n\n## Inputs\n\n- Root instruction file path(s)\n- Existing repository conventions (commands, toolchain, style)\n- User constraints (must-keep rules, preferred layout)\n\n## Outputs\n\n- Refactored root instruction file (minimal, universal guidance)\n- Topic files with detailed rules\n- List of removed/merged rules with rationale\n- Notes on contradiction handling\n\n## Edge Cases\n\n- If rule precedence is impossible to infer, request one targeted user decision.\n- If multiple files repeat the same rule, keep one canonical source and replace others with links.\n- If the instruction file is already concise, avoid unnecessary splitting.\n- Use relative markdown links for portability.\n\n## Validation Checklist\n\n- [ ] Frontmatter is valid YAML and `name` matches directory.\n- [ ] Description states capability and usage triggers.\n- [ ] Root file contains only universal instructions.\n- [ ] Topic files are self-contained and linked from root.\n- [ ] Contradictions are resolved or explicitly called out.\n- [ ] Vague/default/redundant directives are removed or rewritten.\n- [ ] Relative links resolve.\n\n## References\n\n- [Refactor playbook](references/refactor-playbook.md)\n- [Examples and anti-patterns](references/examples-and-anti-patterns.md)\n",".agents/skills/skill-creator/SKILL.md":"---\nname: skill-creator\ndescription: Create new Agent Skills or improve existing ones in an agent-agnostic way. Use when users ask to build, refactor, validate, or package skills compatible with the Agent Skills specification and the skills CLI ecosystem.\nlicense: MIT\ncompatibility: Compatible with Agent Skills spec and skill directories such as .agents/skills or equivalent agent-specific skill paths.\nmetadata:\n  author: local\n  version: \"1.0.0\"\n---\n\n# Skill Creator\n\nCreate and refine skills that work across agents implementing the Agent Skills specification.\n\nUse imperative instructions. Keep the process deterministic where possible. Keep the skill output portable.\n\n## Objectives\n\n1. Produce a valid skill with a correct `SKILL.md` frontmatter and useful body instructions.\n2. Keep the skill agent-agnostic unless the user explicitly requests agent-specific behavior.\n3. Apply progressive disclosure so only essential content stays in `SKILL.md`.\n4. Validate structure and naming before declaring completion.\n\n## Workflow\n\n### 1) Identify intent and scope\n\nDetermine whether the user wants one of these outcomes:\n\n- New skill from scratch\n- Update an existing skill\n- Improve trigger quality (`description` tuning)\n- Add reusable resources (`scripts/`, `references/`, `assets/`)\n\nExtract known constraints from conversation context first. Only ask for missing details that materially change implementation.\n\n### 2) Gather concrete examples\n\nCollect at least 2 realistic user prompts that should trigger the target skill. Also collect at least 2 near-miss prompts that should not trigger it.\n\nUse these examples to decide:\n\n- Required workflow steps\n- Output format expectations\n- Edge cases to handle\n- Whether deterministic scripts are needed\n\n### 3) Design the skill anatomy\n\nCreate a minimal structure first:\n\n```text\n<skill-name>/\n└── SKILL.md\n```\n\nAdd optional directories only when justified:\n\n- `scripts/` for deterministic or repeated operations\n- `references/` for detailed docs, schemas, and long procedures\n- `assets/` for templates and static resources used in outputs\n\n### 4) Author `SKILL.md` frontmatter\n\nSet required fields:\n\n- `name`: lowercase, digits, hyphens; matches folder name\n- `description`: what the skill does and when to use it\n\nCommon optional fields include `license`, `compatibility`, `metadata`, and `allowed-tools`. Additional frontmatter keys (for example, MCP or tooling configuration) are allowed when supported by the Agent Skills spec/validator, and may be nested under `metadata` when appropriate.\n\nDescription guidance:\n\n- Include both capability and trigger cues\n- Avoid vague phrases like \"helps with X\"\n- Prefer concrete contexts and user-language synonyms\n\n### 5) Author `SKILL.md` body\n\nStructure the body for execution, not marketing:\n\n1. Goal and success criteria\n2. Step-by-step operating procedure\n3. Input/output expectations\n4. Error handling and edge cases\n5. Examples\n6. Validation checklist\n\nWrite in imperative style. Explain why non-obvious constraints matter.\n\n### 6) Apply progressive disclosure\n\nKeep `SKILL.md` concise. Move large or specialized content into `references/` and link to it from `SKILL.md`.\n\nIf the skill spans multiple variants, separate variant details into dedicated reference files and keep variant-selection logic in `SKILL.md`.\n\n### 7) Validate and harden\n\nRun a final compatibility pass:\n\n- Frontmatter parses as valid YAML\n- `name` complies with spec constraints and folder match\n- `description` is explicit about trigger contexts\n- Relative file references resolve\n- Optional scripts are executable and documented\n- Language is agent-neutral and avoids vendor lock-in\n\nIf `skills-ref` is available, run:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nIf the skills CLI is available, verify discovery from the repo root:\n\n```bash\nnpx skills list\n```\n\n## Agent-Agnostic Rules\n\n- Do not require a specific model vendor or proprietary UI affordance.\n- Do not rely on agent-only file paths when portable paths exist.\n- Do not reference unavailable tools as mandatory.\n- Prefer open, portable commands and plain Markdown guidance.\n\n## Safety and integrity\n\n- Refuse to create skills intended for malware, exploitation, data exfiltration, or unauthorized access.\n- Keep behavior aligned with user intent; avoid hidden actions.\n\n## Completion criteria\n\nA skill-creation task is complete only when all are true:\n\n1. Skill folder exists in the requested location.\n2. `SKILL.md` is valid and complete.\n3. Optional resources are present only if needed.\n4. Validation checks pass or limitations are explicitly reported.\n\n## References\n\n- See `references/spec-checklist.md` for implementation rules distilled from the spec.\n- See `references/templates.md` for copy-ready scaffolds.\n- See `references/research-synthesis.md` for design rationale from cross-source research.\n",".agents/skills/docs/SKILL.md":"---\nname: docs\ndescription: 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.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Docs (Micronaut Maintainer)\n\nUse this skill for maintainer-facing guide work in Micronaut framework repositories. Do not default to end-user application documentation advice.\n\n## Goal\n\nImplement 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.\n\n## Procedure\n\n1. Confirm repository docs layout and build tasks.\n2. Plan `toc.yml` and `.adoc` updates in lockstep.\n3. Apply Micronaut docs macro conventions used by maintainers.\n4. Prefer generated configuration property references over manual tables.\n5. Build and validate `publishGuide` and `docs` outputs.\n\n### 1) Confirm docs layout and build tasks\n\n- Check `src/main/docs/guide/toc.yml` first.\n- List relevant guide files under `src/main/docs/guide/**/*.adoc`.\n- If examples are involved, inspect `doc-examples/` (if present) and plan snippet tags from executable sources.\n- If assets are involved, keep images in `src/main/docs/resources/img/`.\n- Confirm standard commands from `CONTRIBUTING.md`:\n  - `./gradlew publishGuide` (or `./gradlew pG`) for guide assembly.\n  - `./gradlew docs` for guide + API docs assembly.\n- If repository layout diverges from template conventions, follow local conventions and explicitly report the divergence.\n\n### 2) Keep `toc.yml` and files in lockstep\n\nTreat `src/main/docs/guide/toc.yml` as navigation source of truth.\n\nRules:\n\n1. Every visible section must exist in `toc.yml`.\n2. Every `toc.yml` entry must resolve to a real `.adoc` path.\n3. Preserve section order unless the request explicitly changes navigation.\n4. Use nested sections for grouped topics when needed.\n\nExample nested pattern:\n\n```yaml\ncontrolPanels:\n  title: Available Control Panels\n  builtIn: Built-in\n  management: Management\n```\n\nThis maps to:\n\n- `src/main/docs/guide/controlPanels.adoc`\n- `src/main/docs/guide/controlPanels/builtIn.adoc`\n- `src/main/docs/guide/controlPanels/management.adoc`\n\n### 3) Apply Micronaut docs macro conventions\n\nUse docs macros registered by `micronaut-build` (`DocsExtensionRegistry`) and maintained for framework guides.\n\nPreferred mapping:\n\n| Need | Preferred pattern |\n|---|---|\n| Dependency instructions | `dependency:group:artifact[scope=...]` |\n| Source sample synchronized with test suites | `snippet::path/to/File.ext[tags=...]` |\n| Multi-format configuration snippets | `[configuration]` listing blocks |\n| Configuration properties reference | `include::{includedir}configurationProperties/<fqcn>.adoc[]` |\n| Shell commands | `[source,bash]` blocks |\n| Repository/release links | `https://github.com/{githubSlug}` and `/releases` links |\n\nGuardrails:\n\n- Do not handwrite separate Maven/Gradle dependency blocks when `dependency:` is suitable.\n- Do not replace Micronaut `snippet::` macros with direct Asciidoctor `[source]` includes or pasted code blocks just because the current examples have one language. The macro is the multi-language, source-backed contract for generated module docs.\n- Do not remove snippet callouts when touching examples. Preserve existing callout tags and callout explanations unless the underlying executable source no longer has that behavior.\n- Do not duplicate configuration property tables manually when generated references exist.\n- Keep environment-sensitive instructions explicit (for example `MICRONAUT_ENVIRONMENTS=dev`).\n- Prefer stable links to official Micronaut docs for endpoint semantics.\n\n### 4) Use generated configuration property references correctly\n\n- `micronaut-docs` provides `AsciiDocPropertyReferenceWriter`, which generates AsciiDoc property fragments from configuration metadata.\n- Micronaut docs build wiring consumes those fragments via `{includedir}configurationProperties/...` includes.\n- Prefer includes over hand-maintained property tables.\n\nSee `references/micronaut-docs-providers.md` for confirmed provider/macro details and source locations.\n\n### 5) Build and validate documentation\n\nFrom repository root, run:\n\n```bash\n./gradlew publishGuide\n./gradlew docs\n```\n\nValidation checklist:\n\n1. Commands exit with code `0`.\n2. Output exists under `build/docs/`.\n3. Updated sections appear in navigation and render without missing includes.\n4. Added images/links resolve.\n\nIf `publishGuide` passes but `docs` fails, fix the failing stage and rerun both commands.\n\n## Maintainer Delivery Contract\n\nWhen finishing docs work, report:\n\n1. Exact changed files (`.adoc`, `toc.yml`, docs resources).\n2. Which conventions were applied (`dependency:`, `snippet::`, `[configuration]`, generated property includes).\n3. Build commands run and outcomes.\n4. Any repo-specific divergences or follow-ups.\n\n## Validation Checklist\n\n- [ ] `toc.yml` and `.adoc` changes are consistent.\n- [ ] Macros and includes follow Micronaut maintainer conventions.\n- [ ] Existing `snippet::` macros and callouts are preserved unless executable source changes require a different tagged snippet.\n- [ ] `publishGuide` and `docs` executed successfully.\n- [ ] Output and navigation verified under `build/docs/`.\n- [ ] Guidance remains maintainer-focused (not generic app docs).\n\n## References\n\n- `references/micronaut-docs-providers.md`\n- `references/control-panel-patterns.md`\n- `CONTRIBUTING.md`\n- `src/main/docs/guide/toc.yml`\n",".agents/skills/guides/SKILL.md":"---\nname: guides\ndescription: Create or update standalone Micronaut Guides in micronaut-projects/micronaut-guides, including topic discovery, guide authoring, validation, PDF export, and pull request handoff. Use for requests to create a Micronaut Guide, add a guide to micronaut-guides, author a tutorial for a Micronaut module, or prepare a guide PR with PDF.\nlicense: Apache-2.0\ncompatibility: Micronaut Guides repository and Micronaut repositories that need standalone tutorial PRs\nmetadata:\n  author: Micronaut Agent Company\n  version: \"1.0.0\"\n---\n\n# Guides (Micronaut Maintainer)\n\nUse this skill for standalone tutorial work in `micronaut-projects/micronaut-guides`. Start from the caller's local Micronaut repository to understand the API, module, or behavior being taught, then do the guide implementation in a current clone of `micronaut-guides`.\n\nDo not use this skill for ordinary module documentation under `src/main/docs/guide`; use the `docs` skill for that work. Do not use it for generic non-Micronaut tutorials.\n\n## Goal\n\nProduce a reviewable pull request against `micronaut-projects/micronaut-guides` with source-backed guide content, validation evidence, and a PDF export of the rendered guide page for maintainers.\n\n## Procedure\n\n1. Define the topic from the local repository.\n2. Refresh upstream `micronaut-guides` and deduplicate against existing guides.\n3. Inspect current repository conventions before writing.\n4. Author the smallest correct guide change.\n5. Validate the guide and render the page.\n6. Export a PDF and prepare the PR handoff.\n\n### 1) Define the Topic\n\n- Identify the exact Micronaut feature, module, API, integration, or migration path the guide should teach.\n- Read the local implementation, tests, module docs, and examples that prove the behavior.\n- Decide the target reader task in one sentence, for example: \"Use Micronaut Serialization with a custom serializer in a controller response.\"\n- Prefer a runnable application and tests over prose-only explanation.\n\n### 2) Refresh and Deduplicate\n\nWork from current upstream facts, not this skill's snapshot:\n\n```bash\ngit clone https://github.com/micronaut-projects/micronaut-guides.git\ncd micronaut-guides\ngit fetch origin\ngit switch master\ngit pull --ff-only\n```\n\nBefore creating a new guide, inventory `guides/*/metadata.json` and nearby guide source. Check titles, slugs, tags, categories, `apps`, `base`, `publish`, and guide bodies for duplicates or near-duplicates. Treat `publish: false` guides as base or partial guides, not public topics, but inspect them when a new guide could reuse them.\n\nIf an existing guide already teaches the task, update that guide instead of creating a duplicate. If overlap is ambiguous, stop and ask for maintainer direction.\n\n### 3) Inspect Current Conventions\n\nAlways read these current upstream files before editing:\n\n- `README.md`\n- `build.gradle`\n- `buildSrc/src/main/java/io/micronaut/guides/core/Guide.java`\n- `buildSrc/src/main/java/io/micronaut/guides/Category.java`\n- `buildSrc/src/main/resources/guide-metadata.schema.json`\n- Nearby guides in the same topic family\n\nUse `references/repository-workflow.md` for clone, branch, build-output, task naming, and validation details. Use `references/guide-authoring-conventions.md` for metadata, directory layout, macros, placeholders, and base-guide rules.\n\n### 4) Author the Guide\n\n- Choose a kebab-case slug that matches the reader task and does not collide with existing guide directories.\n- Create or update `guides/<slug>/metadata.json`.\n- Use one root AsciiDoc file named `<slug>.adoc` unless current metadata conventions require `asciidoctor`.\n- Put source under the expected Java, Groovy, and Kotlin layout when the guide supports multiple languages. If the feature is language-specific, set `languages` in metadata and explain why in the PR.\n- For single-app guides, use an app named `default`. For multi-app guides, mirror existing app-directory patterns and declare each app in metadata.\n- Use validated guide macros such as `common:`, `source:`, `resource:`, `test:`, `testResource:`, `callout:`, `external:`, `dependency:`, and `guideLink:` instead of manually duplicating generated paths.\n- Use conditional blocks such as `:exclude-for-languages:` and `:exclude-for-build:` for language-specific or build-tool-specific text.\n- Keep secrets out of source, generated code, rendered HTML, and the PDF. Use placeholders and documented cleanup steps for cloud resources.\n\n### 5) Validate\n\nConvert the guide slug from kebab-case to lowerCamelCase for dynamic tasks:\n\n```bash\n./gradlew <guideLowerCamel>Build\n./gradlew <guideLowerCamel>RunTestScript\n```\n\nFor broad validation or shared infrastructure changes, run:\n\n```bash\n./gradlew build\n```\n\nGenerated applications are under `build/code`. Rendered HTML and site assets are under `build/dist`. For cloud, credentialed, or cost-incurring guides, do not run provisioning commands without explicit confirmation; document skipped validation and the reason.\n\n### 6) Export PDF and Handoff\n\nAfter rendering, export the reviewed HTML page to PDF. Prefer a headless browser export when available, and fall back to a manual browser \"Print to PDF\" export when needed. Keep the PDF as local review evidence or attach it to the PR; do not commit generated PDFs unless maintainers explicitly request that.\n\nThe PR body must include:\n\n- Guide slug and user-facing task.\n- Files changed.\n- Commands run and outcomes.\n- Rendered HTML path inspected.\n- PDF filename and whether it is attached or linked.\n- Any skipped validation, cloud costs, credentials, or cleanup notes.\n\nSee `references/pdf-export-and-pr.md` for the export workflow and PR checklist.\n\n## Security Guardrails\n\n- Never commit secrets, tokens, local credentials, cloud account identifiers, `.env` files, or generated PDFs containing private data.\n- Ask before running commands that provision cloud resources or incur cost.\n- Prefer sample placeholders for credentials and explain cleanup for created resources.\n- Scrub screenshots, HTML, logs, and PDFs before attaching them to a PR.\n- Do not add custom Starter features, dependencies, or buildSrc changes unless the guide topic requires them and nearby guide conventions support the change.\n\n## Examples\n\nUse this skill for:\n\n- \"Create a Micronaut Guide for the new serialization feature.\"\n- \"Add a guide to `micronaut-guides` for this module.\"\n- \"Author a tutorial for Micronaut Data's new repository behavior.\"\n- \"Prepare a guide PR with the rendered PDF.\"\n\nDo not use this skill for:\n\n- \"Update `src/main/docs/guide/toc.yml` in this module.\"\n- \"Fix the release history page in this repository.\"\n- \"Write a generic blog post about Java.\"\n\n## Validation Checklist\n\n- [ ] Current `micronaut-guides` was cloned or fetched before writing.\n- [ ] Existing guide titles, slugs, tags, categories, and `publish: false` bases were checked for duplicates.\n- [ ] `README.md`, metadata schema, category source, and nearby guide examples were inspected.\n- [ ] Guide source uses current metadata, directory, macro, language, and build-tool conventions.\n- [ ] Single-guide build and test-script tasks were run, or skipped with a specific reason.\n- [ ] Rendered HTML was inspected under `build/dist`.\n- [ ] PDF export was created and named in the PR handoff.\n- [ ] PR handoff explains changed files, validation, skipped steps, and any security-sensitive handling.\n\n## References\n\n- `references/repository-workflow.md`\n- `references/guide-authoring-conventions.md`\n- `references/guide-inventory.md`\n- `references/pdf-export-and-pr.md`\n",".agents/skills/coding/SKILL.md":"---\nname: coding\ndescription: Implement and review Java code changes for Micronaut framework repositories using maintainer standards, including JSpecify null-safety conventions. Use when users ask to add or refactor Java code, fix framework bugs, evolve internal APIs, or prepare committer-ready changes with tests and verification.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Coding (Micronaut Committer)\n\nUse this skill for maintainer-facing Java implementation work in Micronaut repositories. Do not default to end-user application shortcuts.\n\n## Goal\n\nDeliver minimal, source-backed Java changes that preserve framework quality: binary compatibility, JSpecify null-safety, reflection-free behavior, and full Gradle verification (`check`, `docs`, and compatibility checks when API-facing).\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Implement this Micronaut Java feature in `src/main/java` and keep API compatibility.\"\n- \"Refactor this module internals and mark non-public APIs correctly.\"\n- \"Fix failing framework tests and prepare committer-ready validation output.\"\n- \"Add configuration support using Micronaut conventions, not app-level shortcuts.\"\n\nShould not trigger:\n\n- \"Explain Micronaut basics to a beginner.\"\n- \"Create an end-user sample app from scratch.\"\n- \"Only edit release notes/changelog text.\"\n\n## Procedure\n\n1. Establish scope and API impact.\n2. Implement Java code with Micronaut maintainer conventions.\n3. Enforce API boundaries and binary compatibility.\n4. Document Java APIs and implementation intent.\n5. Keep Gradle/build changes aligned with repository conventions.\n6. Verify with maintainer-grade checks before completion.\n\n### 1) Establish scope and API impact\n\n- Identify affected modules and whether any change is public API or internal-only.\n- Inspect existing package patterns before editing (imports, nullability style, tests, naming).\n- For API-facing edits, plan compatibility checks up front (`japiCmp`).\n- Keep change surface minimal; avoid opportunistic refactors unless required.\n\n### 2) Implement Java with Micronaut maintainer conventions\n\n- Prefer modern Java idioms where they improve clarity (records, sealed types, pattern matching, `var` for local inference), but only when supported by the repository toolchain/target level.\n- Do not use fully qualified class names unless import conflicts force it.\n- Micronaut Java code uses JSpecify nullness annotations from `org.jspecify.annotations`; use JSpecify for new or modified nullability contracts.\n- New Java packages must include `package-info.java` with `@NullMarked` and `import org.jspecify.annotations.NullMarked`; when touching an existing package without `@NullMarked`, add it unless the local code has an explicit exception.\n- Use `org.jspecify.annotations.Nullable` for nullable values, including nullable parameters, return values, fields, array/component positions such as `String @Nullable []`, nullable collection elements such as `List<@Nullable T>`, and nullable type bounds such as `<T extends @Nullable Object>`.\n- Preserve existing nullability intent when editing older code. Use JSpecify for new or modified contracts, but do not rewrite deliberate compatibility annotations such as `io.micronaut.core.annotation.Nullable` or `jakarta.annotation.Nullable` unless the task is specifically a nullability migration and compatibility impact has been checked.\n- Avoid reflection-oriented implementations in framework code paths; prefer Micronaut compile-time/introspection mechanisms.\n- Use `jakarta.inject` APIs for DI, not `javax.inject`.\n- Prefer constructor injection and immutable state over field injection.\n- For configuration models, prefer `@ConfigurationProperties` over scattered `@Value` usage.\n\n### 3) Enforce API boundaries and compatibility\n\n- Treat all public-facing changes through a Semantic Versioning lens (`https://semver.org/`) before implementation.\n- Classify impact explicitly: patch for backward-compatible fixes, minor for backward-compatible feature additions, major for breaking API/behavioral changes.\n- Keep public API binary compatible unless a major-version change explicitly allows breaks.\n- Prefer non-breaking API evolution first: deprecate existing methods and add replacement variants/overloads instead of deleting methods or changing signatures in place.\n- When using the deprecate-and-add path, keep deprecated APIs functional, point to replacements in Javadoc, and schedule removals only for the next major version.\n- If breaking public-facing changes are explicitly allowed, document them in the user guide under `src/main/docs/guide` with migration notes, and update `toc.yml` when adding new guide sections.\n- Mark non-user-facing APIs with `@io.micronaut.core.annotation.Internal`.\n- Mark unstable public APIs with `@io.micronaut.core.annotation.Experimental` and avoid presenting them as stable contracts.\n- Mark members directly called by generated code with `@io.micronaut.core.annotation.UsedByGeneratedCode`; preserve those signatures unless the generated-code callers are updated in the same change.\n- Keep visibility as narrow as possible for non-public internals.\n- When deprecating API, provide migration-friendly Javadoc and avoid silent behavioral breaks.\n\n### 4) Document Java APIs and implementation intent\n\n- All public Java types and public methods must have Javadoc. Include public constructors when they are part of the user-facing API.\n- All new public Java types, methods, and user-facing constructors must include an `@since` Javadoc tag for the version where the PR will debut.\n- Determine the `@since` version from the approved target branch, not from guesswork. Inspect that branch's `gradle.properties` (`projectVersion`) and use the corresponding release version; for example, `4.9.0-SNAPSHOT` means the new API debuts in `4.9.0`.\n- If the PR is retargeted during follow-through, re-check the target branch's `gradle.properties` and update any newly added `@since` tags when the debut version changes.\n- Do not add `@since` tags to internal-only APIs annotated with `@Internal` unless the repository already does so for that internal package.\n- Internal and package-private methods should include maintainer-focused Javadoc when the implementation contract, lifecycle, invariants, or generated-code interaction is not obvious from the signature.\n- Complex new code should include focused inline comments that explain implementation decisions or invariants; do not narrate straightforward control flow.\n\n### 5) Keep Gradle/build changes convention-aligned\n\n- Use `./gradlew` for all Gradle execution.\n- Use Gradle version catalogs (`gradle/libs.versions.toml`) instead of hard-coded dependency versions.\n- Use appropriate scopes (`api`, `implementation`, `compileOnly`, `runtimeOnly`) based on API exposure.\n- Do not add custom build logic directly in module build files when it belongs in convention plugins.\n- When uncertain about module paths, use `./gradlew projects` and prefer canonical `micronaut-*` project names.\n\n### 6) Verify before completion\n\nFirst confirm canonical verification tasks from `CONTRIBUTING.md` and existing CI/build files, then run the repository equivalents from root.\n\nCommon sequence in Micronaut repositories:\n\n```bash\n./gradlew :<module>:compileTestJava\n# If module includes Groovy tests:\n./gradlew :<module>:compileTestGroovy\n./gradlew :<module>:test --tests 'pkg.ClassTest'\n./gradlew :<module>:test\n# If repository documents cM alias/checkstyle aggregate task:\n./gradlew -q cM\n./gradlew -q spotlessCheck\n./gradlew check\n./gradlew docs\n```\n\nFor API-affecting changes, also run if configured in the repository:\n\n```bash\n./gradlew japiCmp\n```\n\nIf Spotless fails, run `./gradlew -q spotlessApply` and re-run `spotlessCheck`.\n\n## Guardrails\n\n- Do not introduce `javax.inject` usage.\n- Do not introduce legacy or third-party nullability annotations for new or modified Micronaut Java contracts when JSpecify is available, except for deliberate compatibility annotations whose impact has been checked.\n- Do not hard-code dependency versions in module build files.\n- Do not break public APIs without explicit major-version intent.\n- Do not skip tests or docs verification for code changes.\n- Do not use reflection as a convenience in framework internals.\n\n## Delivery Contract\n\nWhen finishing implementation work, report:\n\n1. Exactly which files changed and why.\n2. Whether the change is API-facing or internal-only.\n3. Semantic Versioning impact classification (patch/minor/major) for any public-facing change.\n4. For deprecate-and-add API evolution, which elements were deprecated and which replacement variants were introduced.\n5. For breaking public-facing changes, which user guide files were updated and what migration guidance was added.\n6. For new public Java APIs, the `@since` version used and how it was derived from the target branch's `gradle.properties`.\n7. Commands executed for verification and outcomes.\n8. Any follow-up risk (for example compatibility implications).\n\n## Validation Checklist\n\n- [ ] `SKILL.md` frontmatter is valid and `name` matches directory (`coding`).\n- [ ] Guidance is maintainer-focused (not end-user app guidance).\n- [ ] Java conventions include JSpecify nullability (`@NullMarked`, `@Nullable`), DI, and reflection-free guidance.\n- [ ] API boundary guidance includes `@Internal`, `@Experimental`, `@UsedByGeneratedCode`, and compatibility checks.\n- [ ] Public Java types and methods require Javadoc.\n- [ ] New public Java APIs require `@since` tags derived from the approved target branch's `gradle.properties`.\n- [ ] Internal/package-private methods and complex new code include maintainer-focused Javadoc or inline comments when implementation intent is not obvious.\n- [ ] For public API evolution without breaking changes, deprecations include clear replacement guidance and functional compatibility is preserved.\n- [ ] If breaking changes are allowed, user guide docs in `src/main/docs/guide` are updated with migration notes.\n- [ ] Verification includes tests, style checks, `check`, and `docs`.\n\n## References\n\n- `CONTRIBUTING.md`\n- `MAINTAINING.md`\n- `.agents/skills/gradle/SKILL.md`\n- `.agents/skills/docs/SKILL.md`\n- `.agents/skills/skill-creator/references/spec-checklist.md`\n",".agents/skills/micronaut-sourcegen/SKILL.md":"---\nname: micronaut-sourcegen\ndescription: Add, integrate, or review Micronaut Sourcegen usage in modules that generate Java source, Kotlin source, Groovy-compatible source, or bytecode from ObjectDef, TypeDef, MethodDef, ExpressionDef, StatementDef, and SourceGenerator APIs.\nlicense: Apache-2.0\ncompatibility: Micronaut framework and library modules that use io.micronaut.sourcegen for compile-time generation\nmetadata:\n  author: Denis Stepanov\n  version: \"1.0.0\"\n---\n\n# Micronaut Sourcegen\n\nUse this skill when a Micronaut module wants to generate types with Micronaut Sourcegen instead of handwritten source strings, reflection, JavaPoet/KotlinPoet calls in visitors, or ad hoc bytecode. The target module may emit Java source, Kotlin source, Groovy-compatible source, or bytecode, but the generation logic should model the type once with `io.micronaut.sourcegen.model`.\n\n## Goal\n\nHelp other modules adopt Micronaut Sourcegen safely: choose the right backend, wire the right processor dependencies, build language-neutral model definitions, and verify generated Java/Kotlin/bytecode behavior with targeted tests.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Use Micronaut Sourcegen in this module to generate a repository implementation.\"\n- \"Generate bytecode instead of Java source for this visitor.\"\n- \"Make this annotation processor generate Java and Kotlin outputs with Sourcegen.\"\n- \"Replace handwritten generated-source strings with `ClassDef` and `MethodDef`.\"\n- \"Add method bodies with switches, static calls, static field arguments, and constructor calls.\"\n\nShould not trigger:\n\n- \"Only edit user guide text.\"\n- \"Only change Gradle publishing metadata.\"\n- \"Only refactor backend writer internals without a module consuming Sourcegen.\"\n- \"Explain Micronaut annotation processing without generated types.\"\n\n## Procedure\n\n1. Identify the consuming module and generation target.\n2. Choose one backend for each compilation path.\n3. Wire dependencies using the repository version catalogs and processor configurations.\n4. Implement generation in a visitor with Sourcegen model builders and helpers.\n5. Emit through `SourceGenerator.write(...)` or bytecode writer APIs as appropriate.\n6. Add cross-target tests for the generated contract.\n7. Run focused compile/test/style verification.\n\n### 1) Identify the Consuming Module\n\n- Confirm whether the module is an annotation processor/generator module, an application/test-suite module consuming a generator, or a backend writer module.\n- Locate existing visitor registration under `META-INF/services/io.micronaut.inject.visitor.TypeElementVisitor`.\n- Identify source language paths:\n  - Java annotation processing uses `annotationProcessor`.\n  - Kotlin compilation usually uses `ksp`.\n  - Bytecode generation runs during Java-language processing and writes class files directly.\n- Inspect existing generated-type tests before changing behavior.\n\n### 2) Choose the Backend\n\n- Use `sourcegen-generator-java` when the module should emit `.java` source for `VisitorContext.Language.JAVA`; it also provides `GroovyPoetSourceGenerator` for `GROOVY`.\n- Use `sourcegen-generator-kotlin` when Kotlin/KSP processing should emit `.kt` source for `VisitorContext.Language.KOTLIN`.\n- Use `sourcegen-generator-bytecode` when Java-language processing should emit `.class` files directly through `ByteCodeGenerator`.\n- Do not put both Java-source and bytecode Sourcegen generators on the same Java annotation-processor path unless the module intentionally owns selection. Both advertise `VisitorContext.Language.JAVA`, and `SourceGenerators.findByLanguage(JAVA)` expects a single effective backend.\n- Use `sourcegen-bytecode-writer` directly only when implementing or testing bytecode writer behavior, not as the normal integration point for consuming annotation processors.\n\n### 3) Wire Dependencies\n\n- In a generator/processor module, depend on `sourcegen-generator` for the model and service lookup APIs. Add `sourcegen-annotations` only when the module consumes Sourcegen annotations such as builders/wither support.\n- In a Java consumer/test module, add the chosen backend and the custom generator to `annotationProcessor`.\n- In a Kotlin consumer/test module, add the Kotlin backend and KSP-compatible custom generator to `ksp`.\n- In a bytecode consumer/test module, add `sourcegen-generator-bytecode` to `annotationProcessor`.\n- Use Gradle version catalogs and existing project accessors. Do not hardcode dependency coordinates or versions.\n\nExample repository-local shapes:\n\n```kotlin\ndependencies {\n    implementation(projects.sourcegenGenerator)\n\n    annotationProcessor(projects.sourcegenGeneratorJava)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n```kotlin\ndependencies {\n    ksp(projects.sourcegenGeneratorKotlin)\n    ksp(projects.myCustomGeneratorsKotlin)\n}\n```\n\n```kotlin\ndependencies {\n    annotationProcessor(projects.sourcegenGeneratorBytecode)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n### 4) Build Models With Factories, Not Record Constructors\n\n- Always create Sourcegen model elements through builders, factory methods, or helper methods: `ClassDef.builder`, `InterfaceDef.builder`, `RecordDef.builder`, `EnumDef.builder`, `AnnotationObjectDef.builder`, `MethodDef.builder`, `MethodDef.constructor`, `FieldDef.builder`, `PropertyDef.builder`, `ParameterDef.builder`, `TypeDef.of`, `ClassTypeDef.of`, `TypeDef.parameterized`, `ExpressionDef.constant`, `StatementDef.multi`, `StatementDef.doTry`, `expr.returning`, `expr.invoke`, `type.invokeStatic`, `type.getStaticField`, and switch/if helper methods.\n- Do not instantiate DSL records directly in consuming modules, for example avoid `new ClassTypeDef.Parameterized(...)`, `new TypeDef.Array(...)`, `new ExpressionDef.Constant(...)`, `new StatementDef.Switch(...)`, or other `new ...record(...)` forms.\n- If a construct has no public helper yet, add or use a small named helper/factory at the nearest appropriate level instead of spreading direct record construction through module code.\n- Keep model construction language-neutral. Do not call JavaPoet, KotlinPoet, ASM, or write source strings from a visitor unless the task is explicitly inside a backend writer.\n\n### 5) Implement Visitors\n\n- Prefer `TypeElementVisitor` with `VisitorKind.ISOLATING` when generated output depends only on the visited element.\n- Resolve the backend through `SourceGenerators.findByLanguage(context.getLanguage()).orElse(null)` and return when none is available.\n- Build `ObjectDef` instances from Micronaut AST metadata (`ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`) when possible.\n- Emit with `sourceGenerator.write(objectDef, context, originatingElement)`.\n- Use `SourceGenerators.handleFatalException(...)` when generation may postpone to a later round.\n\nMinimal visitor shape:\n\n```java\nSourceGenerator sourceGenerator = SourceGenerators.findByLanguage(context.getLanguage()).orElse(null);\nif (sourceGenerator == null) {\n    return;\n}\n\nClassDef generated = ClassDef.builder(element.getPackageName() + \".Generated\")\n    .addModifiers(Modifier.PUBLIC, Modifier.FINAL)\n    .addMethod(MethodDef.builder(\"name\")\n        .addModifiers(Modifier.PUBLIC)\n        .returns(TypeDef.STRING)\n        .build((aThis, params) -> ExpressionDef.constant(\"generated\").returning()))\n    .build();\n\nsourceGenerator.write(generated, context, element);\n```\n\n### 6) Model Generated Behavior\n\n- Use `ClassDef`, `InterfaceDef`, `RecordDef`, `EnumDef`, and `AnnotationObjectDef` for generated type kind.\n- Use `TypeDef` and `ClassTypeDef` for primitives, arrays, generics, generated class names, nullability, and static field owners.\n- Use `MethodDef` body builders for executable logic. Prefer explicit `returns(...)` for public or non-trivial generated methods.\n- When generated code reads or writes a field that the same generator defines, keep the `FieldDef` instance and reference it with `aThis.field(fieldDef)` or `generatedType.getStaticField(fieldDef)` instead of repeating the field name and type.\n- When generated code invokes a method that the same generator defines, keep the `MethodDef` instance and invoke it with `receiver.invoke(methodDef, ...)` or `generatedType.invokeStatic(methodDef, ...)` instead of repeating the method name, parameter types, and return type.\n- When generated code targets an existing method or field that is accessible reflectively and present on the annotation processor classpath, prefer a reflective handle from `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)`. Pass method handles to `receiver.invoke(method, ...)` or `type.invokeStatic(method, ...)`; pass static field handles to `type.getStaticField(field)`; for instance fields, centralize the field-name/type bridge in a helper fed by the reflective `Field`. This uses reflection only at generation time to describe a known member; it must not generate runtime reflection.\n- Use `StatementDef.multi(...)`, `expr.returning()`, `expr.newLocal(...)`, `condition.doIf(...)`, `expr.asExpressionSwitch(...)`, `expr.asStatementSwitch(...)`, `StatementDef.doTry(...)`, and invocation helpers to compose bodies.\n- Use `ClassTypeDef.getStaticField(\"NAME\", valueType)` for enum constants, static constants, class literals, and static-field arguments passed to invocations.\n- String switches are supported. For string switch cases, use a `TypeDef.STRING` switch expression and `ExpressionDef.constant(\"case\")` keys with `asExpressionSwitch(...)` or `asStatementSwitch(...)`.\n\n### 7) Verify\n\n- Compile the generator module and the consuming test module.\n- Run targeted tests that load or compile generated types for each backend touched.\n- For Java source generation, verify generated `.java` behavior through Java test-suite tests.\n- For Kotlin source generation, verify KSP and Kotlin tests.\n- For bytecode generation, verify runtime behavior and bytecode writer tests when the model shape exercises bytecode-specific paths.\n- Finish source changes with the repository checks required by `AGENTS.md`: affected compile tasks, targeted tests, full affected module tests, `./gradlew -q cM`, and `./gradlew -q spotlessCheck` if new files were added.\n\n## Backend Notes\n\n- Java source backend: `JavaPoetSourceGenerator` writes Java source for `VisitorContext.Language.JAVA`.\n- Groovy-compatible source backend: `GroovyPoetSourceGenerator` reuses the Java source generator for `GROOVY`.\n- Kotlin source backend: `KotlinPoetSourceGenerator` writes Kotlin source for `VisitorContext.Language.KOTLIN`.\n- Bytecode backend: `ByteCodeGenerator` advertises `JAVA` and writes class files through `context.visitClass(...)`; it does not support `write(ObjectDef, Writer)`.\n\n## Cookbook\n\nUse `references/sourcegen-cookbook.md` for adoption patterns covering:\n\n- Gradle dependency placement for generator modules and consumers,\n- backend selection for Java, Kotlin, Groovy-compatible source, and bytecode,\n- type/model construction using builders and helper methods,\n- generated classes, interfaces, records, enums, annotations, method bodies, switches, invocations, static fields, arrays, lambdas, and super constructors,\n- testing and validation across source and bytecode backends.\n\n## Guardrails\n\n- Do not instantiate Sourcegen DSL records directly in consuming modules; use builders, factories, or named helper methods.\n- Do not duplicate generated member metadata in generated code bodies; prefer the existing `FieldDef` or `MethodDef` instance when reading/writing generated fields or invoking generated methods.\n- Do not use string-based references for known existing classpath methods/static fields when a `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)` handle can describe the member safely.\n- Do not generate source text with string concatenation when a Sourcegen model construct exists.\n- Do not place multiple `JAVA` Sourcegen backends on the same annotation-processor path unless selection is explicit and tested.\n- Do not use backend-specific JavaPoet/KotlinPoet/ASM APIs from normal visitors.\n- Do not use reflection for generation metadata when Micronaut AST elements are available.\n- Do not break public Sourcegen APIs without explicit approval and compatibility checks.\n\n## Validation Checklist\n\n- [ ] Skill folder name and `name:` frontmatter are `micronaut-sourcegen`.\n- [ ] Consuming module and target backend are identified.\n- [ ] Java/Kotlin/bytecode processor dependencies are scoped correctly.\n- [ ] Only one effective `JAVA` Sourcegen backend is present for a Java compilation path.\n- [ ] Model definitions use builders/factories/helpers, not direct DSL record constructors.\n- [ ] Generated fields/methods referenced from generated bodies are referenced through their `FieldDef`/`MethodDef` instances where available.\n- [ ] Generated sources/classes are emitted through `SourceGenerator.write(...)` or backend writer APIs where appropriate.\n- [ ] Targeted and full affected tests pass, or unrun checks are reported clearly.\n\n## References\n\n- `references/sourcegen-cookbook.md`\n",".agents/skills/skill-creator/references/spec-checklist.md":"# Agent Skills Spec Checklist\n\nUse this checklist when creating or modifying a skill to keep it compatible with the Agent Skills specification.\n\nPrimary source: https://agentskills.io/specification\n\n## MUST requirements\n\n1. Skill is a directory containing `SKILL.md`.\n2. `SKILL.md` starts with valid YAML frontmatter.\n3. Frontmatter includes required fields:\n   - `name`\n   - `description`\n4. `name` rules:\n   - 1-64 characters\n   - lowercase letters, numbers, hyphens only\n   - does not start/end with hyphen\n   - no consecutive hyphens\n   - matches parent directory name\n5. `description` rules:\n   - 1-1024 characters\n   - non-empty\n   - states what the skill does and when to use it\n6. Markdown body exists after frontmatter.\n\n## SHOULD guidance\n\n1. Keep `SKILL.md` under ~500 lines for efficient context usage.\n2. Use progressive disclosure:\n   - keep core instructions in `SKILL.md`\n   - move detailed material to `references/`\n3. Add `scripts/` only for deterministic or repeated work.\n4. Keep file references relative to skill root.\n5. Keep references shallow and easy to discover from `SKILL.md`.\n\n## Optional frontmatter fields\n\n- `license`\n- `compatibility`\n- `metadata`\n- `allowed-tools` (experimental; support varies by agent)\n\n## Portability rules\n\n1. Avoid vendor-specific instructions unless requested by the user.\n2. Avoid agent-specific path assumptions if portable paths are possible.\n3. Avoid relying on non-standard tools without fallback guidance.\n\n## Validation commands\n\nIf available:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nFor discovery checks in a workspace using skills CLI:\n\n```bash\nnpx skills list\n```\n",".agents/skills/skill-creator/references/research-synthesis.md":"# Research Synthesis\n\nThis note captures the design decisions used for `skill-creator`.\n\n## Sources\n\n- Agent Skills specification: https://agentskills.io/specification\n- Anthropic skill-creator reference:\n  https://github.com/anthropics/skills/tree/main/skills/skill-creator\n- OpenAI skill-creator reference:\n  https://github.com/openai/skills/tree/main/skills/.system/skill-creator\n- Skills CLI reference:\n  https://github.com/vercel-labs/skills\n\n## Shared patterns extracted\n\n1. Core process is iterative: scope, draft, test, refine.\n2. Trigger quality depends primarily on frontmatter description clarity.\n3. Progressive disclosure is essential for context efficiency.\n4. Optional resources should be added only when they reduce repeated work.\n\n## Vendor-specific elements intentionally avoided\n\n1. Model/provider-specific instructions and path assumptions.\n2. Dependence on platform-specific UI workflows.\n3. Tooling that only exists in one agent runtime.\n\n## Decisions in this skill\n\n1. Keep the main workflow in `SKILL.md` as a portable baseline.\n2. Move strict checklists and scaffolds into `references/` files.\n3. Include skills CLI validation guidance (`npx skills list`) and optional spec validator guidance (`skills-ref validate`).\n4. Keep language imperative and implementation-focused.\n",".agents/skills/skill-creator/references/templates.md":"# Universal Skill Templates\n\nUse these templates as starting points. Keep them concise and agent-agnostic.\n\n## 1) Minimal `SKILL.md` template\n\n```markdown\n---\nname: <skill-name>\ndescription: <what this skill does and when to use it>\nlicense: MIT\n---\n\n# <Skill Title>\n\n## Goal\n\n<one paragraph describing expected outcomes>\n\n## Procedure\n\n1. <step 1>\n2. <step 2>\n3. <step 3>\n\n## Inputs\n\n- <input 1>\n- <input 2>\n\n## Outputs\n\n- <output contract>\n\n## Edge cases\n\n- <edge case 1 and handling>\n- <edge case 2 and handling>\n\n## Validation\n\n- [ ] Frontmatter is valid YAML\n- [ ] Name matches folder\n- [ ] Description includes trigger contexts\n- [ ] Relative file references resolve\n```\n\n## 2) Expanded structure template\n\n```text\n<skill-name>/\n├── SKILL.md\n├── scripts/\n│   └── <script>.py\n├── references/\n│   ├── <domain>.md\n│   └── <schemas>.md\n└── assets/\n    └── <template-or-static-file>\n```\n\nUse this expanded layout only if those resources are truly needed.\n\n## 3) Trigger description pattern\n\nWrite descriptions that include both capability and activation cues.\n\nPattern:\n\n\"<Core capability>. Use when users ask to <intent 1>, <intent 2>, or <intent 3>, including phrasing such as <example cues>.\"\n\nExample:\n\n\"Generate release notes from Git history with categorized changes. Use when users ask to draft changelogs, summarize commits for releases, or prepare version notes from tags or commit ranges.\"\n\n## 4) Improvement loop template\n\nWhen improving an existing skill:\n\n1. Review current `SKILL.md` and user complaints.\n2. Capture 2-3 should-trigger and 2-3 should-not-trigger prompts.\n3. Revise `description` for better trigger clarity.\n4. Move long details from `SKILL.md` to `references/`.\n5. Re-validate against checklist in `references/spec-checklist.md`.\n","inject/AGENTS.md":"# `io.micronaut.inject` Class Map\n\nThis module is the runtime contract layer for Micronaut dependency injection. Most classes in `io.micronaut.inject` are small interfaces that generated bytecode implements; the heavier runtime bases that implement those contracts live mostly in `io.micronaut.context`.\n\nUse this file when changing `inject/src/main/java/io/micronaut/inject/**` to keep the generated-code model, bean lookup flow, and qualifier rules aligned.\n\n## Runtime Shape\n\nThe normal bean lifecycle is:\n\n1. Annotation processing writes a lightweight `BeanDefinitionReference` and a concrete `BeanDefinition`.\n2. `BeanContext` discovers references without loading user bean classes, checks `BeanContextConditional`, qualifiers, indexes, and replacement rules, then calls `BeanDefinitionReference.load(...)`.\n3. A loaded `BeanDefinition` describes the bean type, scope, constructor, injection points, executable methods, type arguments, metadata, and lifecycle hooks.\n4. If it is an `InstantiatableBeanDefinition`, the context creates the instance with a `BeanResolutionContext`.\n5. Generated definitions resolve constructor, method, field, `@Value`, `@Property`, provider, collection, stream, map, and registration dependencies through helper methods on `io.micronaut.context.AbstractInitializableBeanDefinition`.\n6. If implemented, `ValidatedBeanDefinition`, `InjectableBeanDefinition`, `InitializingBeanDefinition`, and `DisposableBeanDefinition` add argument validation, member injection, `@PostConstruct`, and `@PreDestroy` behavior.\n7. `ExecutableMethod` and `ExecutionHandle` expose reflection-free method calls for `@Executable`, AOP, event listeners, bean introspection methods, and processor startup work.\n\nGenerated classes are part of the API surface even when the supporting type is `@Internal`. Avoid changing method signatures, constructor shapes, visibility, or default method semantics unless the generated writers and compatibility impact are handled together.\n\n## Core Bean Model\n\n`BeanType<T>` is the common candidate abstraction. Both `BeanDefinitionReference<T>` and `BeanDefinition<T>` use it to expose the bean class, annotation metadata, exposed types, `@Primary`, optional bean name, candidate checks, and method-processing hint.\n\n`QualifiedBeanType<T>` extends `BeanType<T>` for anything that can expose a declared `Qualifier<T>`. It resolves qualifier annotations from target annotation metadata and is the bridge between static metadata and the runtime `io.micronaut.context.Qualifier` API.\n\n`BeanDefinitionReference<T>` is the soft-loading handle. It must answer whether the bean type is present, whether the bean is enabled, singleton, parallel, indexed, configuration-properties, proxy target, and how to load the real `BeanDefinition<T>`.\n\n`BeanDefinition<T>` is the full description used after loading. It extends `QualifiedBeanType`, `Named`, and `ArgumentCoercible`, and supplies scope, constructor, required components, injection points, lifecycle methods, executable methods, type arguments, default implementation, replacement metadata, and debug descriptions.\n\n`BeanContextConditional` is implemented by references, definitions, and configurations to decide whether something is enabled for a `BeanContext` and optional `BeanResolutionContext`.\n\n`BeanConfiguration` groups definitions by package and condition. `ConditionalBeanConfiguration` is the runtime record returned by `BeanConfiguration.of(...)` and `disabled(...)`; it deliberately rejects custom configurations for internal `io.micronaut.*` packages.\n\n`BeanIdentifier` is the stable instance key used by the context. `DefaultBeanIdentifier` is its internal string-backed implementation.\n\n`ArgumentBeanType<T>` adapts a core `Argument<T>` into a `BeanType<T>`, mainly so qualifier and candidate logic can operate on an argument-like requested type.\n\n## Bean Construction And Lifecycle\n\n`InstantiatableBeanDefinition<T>` marks definitions that can construct instances. It creates a `DefaultBeanResolutionContext` for convenience when only a `BeanContext` is supplied.\n\n`ParametrizedInstantiatableBeanDefinition<T>` is for definitions that need runtime-supplied `@Parameter` values. It finds required constructor arguments, validates/converts supplied values, and blocks no-argument instantiation.\n\n`InjectableBeanDefinition<T>` is for existing instances that need generated member injection after construction.\n\n`InitializingBeanDefinition<T>` invokes generated `@PostConstruct` hooks after dependency injection.\n\n`DisposableBeanDefinition<T>` invokes generated `@PreDestroy` hooks during shutdown.\n\n`ValidatedBeanDefinition<T>` delegates constructor/member/bean validation to `BeanDefinitionValidator` from the active context.\n\n`ReplacesDefinition<T>` represents `@Replaces` matching logic returned by `BeanDefinition.getReplacesDefinition()`.\n\n`DelegatingBeanDefinition<T>` decorates another definition by forwarding the full `BeanDefinition` surface. Use it when behavior must wrap a definition without copying its metadata model.\n\n## Injection Points\n\n`InjectionPoint<T>` is the base description of a place where the declaring bean needs a dependency. It exposes the declaring `BeanDefinition` and declared qualifier, and centralizes the `@Inject(required = false)` check.\n\n`CallableInjectionPoint<T>` adds an `Argument<?>[]` list for constructors and methods.\n\n`ConstructorInjectionPoint<T>` describes the constructor or factory method/field used to create a bean.\n\n`MethodInjectionPoint<B, T>` describes injected methods and lifecycle methods. It records the method name, arguments, declaring type, and whether it is post-construct or pre-destroy.\n\n`FieldInjectionPoint<B, T>` describes injected fields. Its `getField()` method is deprecated because resolving the `Field` initializes reflection metadata.\n\n`ArgumentInjectionPoint<B, T>` describes an argument inside an outer callable injection point and also acts as `ArgumentCoercible<T>`.\n\nGenerated `AbstractInitializableBeanDefinition` turns compact generated references into these injection point objects lazily and configures them with the `Environment` when needed.\n\n## Executable Methods\n\n`MethodReference<T, R>` is metadata for a method: declaring type, name, target `Method`, arguments, return type, and annotation metadata.\n\n`ExecutableMethod<T, R>` adds reflection-free invocation and source-like descriptions on top of `MethodReference`.\n\n`ExecutableMethodsDefinition<T>` is a generated collection of executable methods. `BeanDefinition` delegates method lookup and startup method processing to it.\n\n`DelegatingExecutableMethod<T, R>` wraps an executable method and forwards all method metadata and invocation.\n\n`BeanDefinitionMethodReference<T, R>` associates an executable method with the owning `BeanDefinition`. `DefaultBeanDefinitionMethodReference` is the package-private delegating implementation created by `BeanDefinitionMethodReference.of(...)`.\n\n`ExecutionHandle<T, R>` binds an executable method to a target instance and invokes without passing the instance as the first argument.\n\n`MethodExecutionHandle<T, R>` is an `ExecutionHandle` that also exposes the underlying `ExecutableMethod`.\n\n`UnsafeExecutionHandle<T, R>` is the internal variant that can invoke without argument validation.\n\n## AOP And Proxies\n\n`AdvisedBeanType<T>` is implemented by advised references and definitions to expose the intercepted target type for around or introduction advice.\n\n`ProxyBeanDefinition<T>` marks a bean definition as an AOP proxy and exposes the target definition type and target bean type.\n\n`io.micronaut.inject.proxy.InterceptedBean` marks generated proxy classes from the inject side.\n\n`io.micronaut.inject.proxy.InterceptedBeanProxy<T>` marks proxies that expose the intercepted target and optionally whether the target is already cached. It also implements the internal `Qualified<T>` hook so generated proxies can receive a bean qualifier.\n\nAOP proxy modes to keep distinct:\n\n| Mode | Target ownership | Generated marker | Main behavior |\n| --- | --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. For concrete classes it subclasses the target and calls `super` through generated bridge methods when proceeding. | `Intercepted` | Fast path for `@Around(proxyTarget = false)`. Intercepted methods run against `this`; no separate target bean is resolved. |\n| Proxy-target around proxy | The proxy and target bean are separate. The proxy bean definition points back to the target definition. | `ProxyBeanDefinition`, `InterceptedProxy` | Used for `@Around(proxyTarget = true)`, factory-produced around-advised beans, and interface cases that need a backing target. The proxy resolves the target through `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target proxy | Same as proxy-target, but target resolution is deferred until `interceptedTarget()` is needed. | `InterceptedProxy` | Stores a copied `BeanResolutionContext` and resolves the target on demand. With `cacheableLazyTarget`, the target is cached after the first lookup. |\n| Hotswap proxy-target proxy | Same as proxy-target, but the target reference is mutable. | `HotSwappableInterceptedProxy` | Stores the target behind a read/write lock and exposes `swap(...)` to replace it. |\n| Introduction proxy | There is no concrete target implementation for introduced methods. | `Introduced` | Generated proxy implements the advised interface/type and delegates behavior to introduction interceptors. Abstract/interface methods require an introduction interceptor or adapter. |\n| Runtime proxy | The generated bean definition asks a `RuntimeProxyCreator` to create the proxy object. | Runtime-specific proxy type | `DefaultRuntimeProxyDefinition` carries method metadata, interceptor data, target/proxy-target settings, and constructor values to the runtime proxy creator. |\n\n`@Around(proxyTarget = false)` is the normal class-subclass mode. `@Around(proxyTarget = true)` creates a proxy bean around a separate target bean, which changes lifecycle and destruction behavior because the context must find and destroy the target definition separately. Factory methods with around advice are forced into proxy-target mode because the factory owns creation of the original produced object. For factory-produced classes with constructor arguments, `proxyTargetMode` controls whether proxy generation fails, warns, or proceeds.\n\nMethod interception flow:\n\n1. The AOP writer records intercepted methods and interceptor binding metadata from class and method annotations.\n2. The generated proxy stores `ExecutableMethod[] $proxyMethods` and `Interceptor[][] $interceptors`.\n3. During proxy construction, `$proxyMethods` is filled from the generated executable-methods definition. In proxy-target mode, methods are looked up from the target `BeanDefinition` with `getRequiredMethod(...)`.\n4. The constructor resolves the applicable interceptor array for each method through `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`, using the preselected interceptor bean registrations injected into the proxy constructor.\n5. Each intercepted method override chooses the invocation target. Default around proxies pass `this`; proxy-target proxies pass the target field or call `interceptedTarget()` for lazy/hotswap cases.\n6. The override creates a `MethodInterceptorChain` with the method-specific interceptors, target, executable method, and argument values, then returns `proceed()`.\n7. In default around proxies, concrete methods get generated `$$access$$...` bridge methods so `proceed()` can call the original implementation via `super` without reflection. Introduction methods instead rely on introduction interceptors to provide the implementation.\n\n`io.micronaut.aop.beandefinition.ParameterizedInterceptedBeanDefinition<T>` is the AOP-side bridge for parametrized bean definitions with `@AroundConstruct`. It extends `ParametrizedInstantiatableBeanDefinition<T>` and adapts the normal `Map<String, Object>` argument path into a constructor interceptor chain: generated code resolves ordered construction values with `resolveInstantiationValues(...)`, the default map-based `doInstantiate(...)` starts `ConstructorInterceptorChain.instantiate(...)`, and the chain eventually calls the generated object-array `doInstantiate(...)` through `InterceptedParametrizedBeanConstructor`.\n\n`io.micronaut.aop.beandefinition.ParameterizedProxyBeanDefinition<T>` is the proxy-specific version of that bridge. Generated AOP proxy constructors append hidden parameters after the real constructor arguments: `BeanResolutionContext`, `BeanContext`, `Qualifier`, constructor interceptor registrations, and `InterceptorRegistry`. This interface extracts the pre-resolved constructor interceptors from the second-to-last constructor value and invokes `ConstructorInterceptorChain.instantiate(...)` with an additional proxy parameter count of `5`, so interceptors see only user constructor arguments while the final proxy constructor still receives its internal values.\n\n## Qualifiers\n\nUse `Qualifiers` as the factory entry point. It turns annotation metadata, names, type arguments, interceptor bindings, and composed qualifiers into `Qualifier<T>` instances.\n\nMost concrete qualifiers extend `FilteringQualifier<T>`, which implements the common `reduce`, `filter`, and `doesQualify` loops over `BeanType` and `QualifiedBeanType`.\n\nImportant qualifier implementations:\n\n| Class | Role |\n| --- | --- |\n| `AnyQualifier` | Matches every candidate and returns the first candidate for single lookup. |\n| `NoneQualifier` | Matches candidates with no declared qualifier. |\n| `PrimaryQualifier` | Matches `@Primary`, declared primary qualifiers, or primary-style candidate names. |\n| `NameQualifier` | Matches `@Named`, `NameResolver`, simple names, and generated name-plus-type conventions. |\n| `AnnotationQualifier` | Matches a runtime annotation instance. |\n| `AnnotationMetadataQualifier` | Matches annotation metadata, including binding and non-binding member rules. |\n| `AnnotationStereotypeQualifier` | Matches candidates by stereotype or repeatable stereotype container. |\n| `RepeatableAnnotationQualifier` | Matches repeatable qualifier annotation values. |\n| `CompositeQualifier` | Chains arbitrary qualifiers. |\n| `FilteringCompositeQualifier` | Chains only `FilteringQualifier` instances for faster direct matching. |\n| `TypeArgumentQualifier` | Matches candidate generic type arguments for a requested bean type. |\n| `ClosestTypeArgumentQualifier` | Narrows generic candidates to the closest assignable type argument match. |\n| `ExactTypeArgumentNameQualifier` | Matches a single generic argument by exact type name. |\n| `MatchArgumentQualifier` | Matches full nested `Argument` type parameters, including covariance and contravariance modes. |\n| `EachBeanQualifier` | Matches the origin bean definition for an `@EachBean` product. |\n| `TypeAnnotationQualifier` | Implements `@Type`-style filtering by exposed/assignable classes. |\n| `InterceptorBindingQualifier` | Matches interceptor beans against interceptor binding metadata. |\n| `QualifierUtils` | Shared package-private name, annotation, and declared-qualifier matching helpers. |\n| `Qualified` | Internal generated-code hook used to push a runtime qualifier into proxies/providers. |\n\nWhen changing qualifier behavior, check both `BeanType` candidates and `QualifiedBeanType` candidates. Many lookups first reduce references before loading definitions, so relying only on loaded `BeanDefinition` behavior can break startup and indexing paths.\n\n## Annotation Metadata\n\n`io.micronaut.inject.annotation` supplies the compile-time metadata implementation used by generated definitions and executable methods.\n\n`DefaultAnnotationMetadata` is the immutable runtime-oriented representation of declared annotations, all annotations, declared stereotypes, all stereotypes, and reverse stereotype indexes.\n\n`MutableAnnotationMetadata` is the build-time mutable variant used by processors and helper definitions before metadata is emitted or adapted.\n\n`AbstractAnnotationMetadata` supplies lazy synthesized annotation proxies and shared synthesis behavior.\n\n`AnnotationMetadataSupport` owns core annotation defaults, repeatable containers, annotation type registration, and proxy construction.\n\n`AnnotationMetadataReference` points to metadata by class name without unwrapping the target metadata. Generated code can use it as a stable metadata reference.\n\n`AnnotationMetadataHierarchy` composes metadata layers, especially factory-produced beans and AOP method/type metadata, while preserving declared-vs-inherited lookup behavior.\n\n`AbstractEnvironmentAnnotationMetadata`, `EnvironmentAnnotationMetadata`, `EnvironmentAnnotationValue`, `EnvironmentConvertibleValuesMap`, and `EnvironmentOptionalValuesMap` adapt annotation values to the active `Environment` and resolve placeholders lazily.\n\n`EvaluatedAnnotationMetadata`, `EvaluatedAnnotationValue`, `EvaluatedConvertibleValuesMap`, and `MappingAnnotationMetadataDelegate` adapt metadata with expression values that require a configured `BeanContext`, owning `BeanDefinition`, or method arguments.\n\n`AnnotationConvertersRegistrar` registers conversion from `AnnotationValue` objects to synthesized annotation instances.\n\n`AnnotatedElementValidator` is the compile-time validation hook for annotated elements.\n\n`AnnotationMetadataException` wraps metadata construction failures as `BeanContextException`.\n\n## Bean Introspection Helpers\n\n`io.micronaut.inject.beans` backs generated bean introspections, not dependency-injection definitions.\n\n`AbstractInitializableBeanIntrospection` is the generated-introspection base. It stores property, method, constructor, and annotation metadata and dispatches property/method access without reflection.\n\n`AbstractInitializableBeanIntrospectionAndReference` lets a generated introspection also serve as its own `BeanIntrospectionReference`.\n\n`AbstractEnumBeanIntrospectionAndReference` adds enum constant metadata support.\n\n`AbstractExecutableBeanMethod` adapts an introspection `BeanMethod` into an `ExecutableMethod`.\n\n`KotlinExecutableMethodUtils` recognizes Kotlin suspend functions whose continuation returns `Unit`.\n\n## Provider And Validation Helpers\n\n`io.micronaut.inject.provider.AbstractProviderDefinition` is both a `BeanDefinitionReference` and an `InstantiatableBeanDefinition` for provider-like injection points. It inspects the current `BeanResolutionContext` segment to determine the requested generic bean and qualifier.\n\n`JakartaProviderBeanDefinition` builds `jakarta.inject.Provider<T>` instances.\n\n`JavaxProviderBeanDefinition` builds legacy `javax.inject.Provider<T>` instances when that type is present.\n\n`BeanProviderDefinition` builds Micronaut `BeanProvider<T>` instances with lookup, iteration, streaming, qualifier composition, and definition access.\n\n`ProviderTypeInformationProvider` marks provider types as wrapper types for `Argument` type analysis.\n\n`io.micronaut.inject.validation.BeanDefinitionValidator` is the validation SPI used by `ValidatedBeanDefinition`.\n\n`io.micronaut.inject.validation.RequiresValidation` is an internal compile-time marker that generated definitions use to know validation is required.\n\n## Change Guidance\n\nKeep these contracts in sync with generated code in `inject-java`, `inject-groovy`, `inject-kotlin`, and the writers under annotation-processing modules. A default method change here can affect already-compiled generated definitions.\n\nPrefer adding new capability as default methods on interfaces only when old generated classes can keep working. If generated implementations must override a new method, update the relevant writers and tests together.\n\nAvoid reflection in new runtime paths. Existing deprecated reflection accessors are compatibility escape hatches and should not become part of new behavior.\n\nWhen a change touches bean selection, qualifiers, metadata, or lifecycle order, add focused tests that exercise lookup through `BeanContext`, not only direct unit calls on the helper class.\n","core-processor/AGENTS.md":"# `core-processor` Generation Guide\n\nThis module is the shared compile-time engine for Micronaut injection. Language-specific processors provide Micronaut AST elements; `core-processor` turns those elements and annotation metadata into generated bytecode models for bean definitions, executable methods, bean introspections, AOP proxies, expression classes, and configuration metadata.\n\nUse this file when changing `core-processor/src/main/java/**` so generated bytecode, runtime interfaces in `inject`, and annotation processing behavior stay aligned.\n\n## Mental Model\n\nThe normal compile-time path is:\n\n1. A language module such as `inject-java` supplies `ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`, and `ParameterElement` implementations.\n2. `TypeElementVisitor` implementations inspect and mutate annotation metadata. Examples include `ConfigurationMetadataWriterVisitor`, `ConfigurationReaderVisitor`, `ExecutableVisitor`, and `IntrospectedTypeElementVisitor`.\n3. `BeanDefinitionCreatorFactory` chooses the bean creation strategy for each `ClassElement`.\n4. Creator classes call `ElementBeanDefinitionBuilder` and `ElementProxyBuilder` APIs.\n5. Writers such as `BeanDefinitionWriter`, `ExecutableMethodsDefinitionWriter`, `BeanIntrospectionWriter`, `AopProxyWriter`, `RuntimeProxyBeanDefinitionWriter`, and `EvaluatedExpressionWriter` build `io.micronaut.sourcegen.model.ObjectDef` instances.\n6. The language processor writes bytecode through `ByteCodeWriterUtils` and registers service descriptors when an `OutputObjectDef` has a service type.\n\nDo not think of this module as producing Java source. Most writers build sourcegen AST objects such as `ClassDef`, `MethodDef`, `ExpressionDef`, `StatementDef`, and `TypeDef`; `ByteCodeWriterUtils` then emits bytecode with ASM.\n\n## AST Layer\n\n`io.micronaut.inject.ast` is a language-neutral AST over Java, Kotlin, and Groovy. It is the boundary between language-specific symbol APIs and shared generation logic.\n\nImportant AST types:\n\n| Type | Role |\n| --- | --- |\n| `Element` | Common annotated, named, documented, mutable metadata node. It can represent a class, method, field, parameter, package, enum constant, or property-like element. |\n| `ClassElement` | Type model with assignability, generics, optional/container helpers, constructors, bean properties, fields, methods, interfaces, super types, records, enums, arrays, and proxy detection. |\n| `MethodElement` | Method or constructor model. `getMethodAnnotationMetadata()` is method-only metadata; `getAnnotationMetadata()` may combine class and method metadata except for constructors. |\n| `ParameterElement` | Method or constructor argument model used for injection points, executable methods, constructor values, and Kotlin default detection. |\n| `FieldElement` | Field model used for field injection, factory field beans, and field-backed bean properties. |\n| `PropertyElement` | Synthesized bean property. Configuration readers process these first because the property is the user-facing binding unit. |\n| `KotlinParameterElement` | Marks a Kotlin parameter that has a default value. Writers use it to call Kotlin synthetic default constructors and methods. |\n| `ElementQuery` and `PropertyElementQuery` | The preferred way to select enclosed elements. Use queries instead of ad hoc scans when possible. |\n\nAST elements are often copied with modified metadata using `withAnnotationMetadata(...)`, `withParameters(...)`, or direct `annotate(...)` calls. This is intentional: visitors and creators add synthetic annotations such as `@Property`, `@ConfigurationReader`, interceptor bindings, validation markers, and `@Introspected` before code generation.\n\nBe careful with metadata layers. `AnnotationMetadataHierarchy` is frequently used to combine type metadata with method, factory, property, or parameter metadata while preserving declared-vs-inherited lookup rules. Generated code often stores an `AnnotationMetadataReference` back to a generated bean definition to avoid duplicating metadata.\n\n## Generated Output\n\nThe major generated artifacts are:\n\n| Writer | Generated class shape | Service descriptor |\n| --- | --- | --- |\n| `BeanDefinitionWriter` | `$Bean$Definition` classes extending `AbstractInitializableBeanDefinitionAndReference` unless a specialized super type is used. | `BeanDefinitionReference` |\n| `ExecutableMethodsDefinitionWriter` | `$Bean$Definition$Exec` classes extending `AbstractExecutableMethodsDefinition`. | None |\n| `BeanIntrospectionWriter` | `$Bean$Introspection` or `$fully_qualified_Bean$Introspection` classes extending `AbstractInitializableBeanIntrospectionAndReference` or enum equivalent. | `BeanIntrospectionReference` |\n| `AopProxyWriter` | A proxy type named from the target definition plus `$Intercepted`, and a proxy bean definition for that proxy type. | Proxy bean definition is a `BeanDefinitionReference` |\n| `RuntimeProxyBeanDefinitionWriter` | Runtime-proxy bean definition that calls a `RuntimeProxyCreator`. | `BeanDefinitionReference` |\n| `EvaluatedExpressionWriter` | Final expression class extending `AbstractEvaluatedExpression`. | None |\n\n`OutputObjectDef` couples an `ObjectDef`, optional service type, and originating elements. Writers should preserve originating elements so incremental compilation and generated service descriptors stay correct.\n\n## Bean Definition Selection\n\n`BeanDefinitionCreatorFactory` is the switchboard:\n\n- Classes with `ConfigurationReader` stereotypes go through `ConfigurationReaderBeanElementCreator`, or `IntroductionInterfaceBeanElementCreator` when the configuration reader is an interface.\n- `@Factory` classes go through `FactoryBeanElementCreator`.\n- Types with around advice go through `DeclaredBeanElementCreator` with an AOP proxy builder, except interceptor beans are excluded from around proxy detection.\n- Introduction advice goes through `AopIntroductionProxySupportedBeanElementCreator` or `IntroductionInterfaceBeanElementCreator`.\n- Ordinary declared beans go through `DeclaredBeanElementCreator`.\n- Interfaces without introduction/configuration behavior are ignored.\n\n`DeclaredBeanElementCreator` scans properties and members, then adds constructor, field, method, lifecycle, executable, validation, adapter, and AOP information to the builder.\n\nImportant declared-bean rules:\n\n- Injection methods are `@Inject` methods, plus configuration-specific extensions in `ConfigurationReaderBeanElementCreator`.\n- Field injection applies to non-static, non-final fields with `@Inject`, qualifier stereotypes, `@Value`, or `@Property`.\n- `@Executable` methods are emitted as executable methods if accessible by the generated definition or explicitly allowed.\n- AOP methods must not be final, private, or static. Class-level AOP applies to public/package-private methods; method-level advice can force proxy creation.\n- Methods marked with `RequiresValidation` are annotated with `io.micronaut.validation.Validated`, except configuration reader beans because configuration validation is handled by introspection.\n- `@Adapter` creates an introduction proxy for a SAM interface and also keeps the source method executable/interceptable as needed.\n\n## BeanDefinitionWriter\n\n`BeanDefinitionWriter` generates a compact runtime description and creation plan for one bean. It usually generates one class that is both a `BeanDefinitionReference` and a loaded `BeanDefinition`.\n\nThe generated definition contains:\n\n- Static annotation metadata, constructor references, injection method references, field references, annotation injection references, type arguments, executable methods, exposed types, replacement metadata, conditions, and `PrecalculatedInfo`.\n- `load()` returning a new definition instance.\n- `isEnabled(...)`, `isContextScope()`, `isProxiedBean()`, `isProxyTarget()`, `isParallel()`, `getIndexes()`, `getDefaultImplementation()`, and configuration/proxy target helpers when applicable.\n- `instantiate(...)` or `doInstantiate(...)` depending on whether construction is parametrized or intercepted.\n- `inject(...)` when fields, methods, or configuration builders need member injection.\n- `initialize(...)` and `dispose(...)` methods, or intercepted lifecycle variants, when lifecycle hooks exist.\n- Optional `$Exec` support for executable methods and startup method processors.\n- Optional evaluated expression classes and `@BuildTimeInit` registration.\n\nInstantiation is generated in three broad forms:\n\n- Normal beans override `instantiate(BeanResolutionContext, BeanContext)` and call the constructor/factory method/field.\n- Parametrized beans implement `ParametrizedInstantiatableBeanDefinition` and generate `doInstantiate(...)` so runtime-supplied `@Parameter` values can be resolved before construction.\n- Constructor-intercepted beans implement one of the `Intercepted...InstantiateBeanDefinition` interfaces and generate `resolveInstantiationValues(...)` plus `doInstantiate(...)` for the constructor interceptor chain.\n\n`PrecalculatedInfo` is important. It stores booleans for abstract, iterable, singleton, primary, configuration properties, container type, method preprocessing, and evaluated expressions. If a change affects these flags, check context candidate collection and startup behavior.\n\nFor configuration properties, `BeanDefinitionWriter` also:\n\n- Treats `@ConfigurationProperties`, `@EachProperty`, and `@EachBean` as configuration/iterable bean definitions.\n- Tracks nested configuration reader inner classes.\n- Skips storing some value injection point metadata when configured by `micronaut.inject.configuration-properties.omit-injection-points`.\n- In `inject(...)`, skips property injection when `containsProperties(...)` is false for a configuration bean.\n- Resolves `ConfigurationPath` directly as an injectable special type.\n\n## Executable Methods\n\n`ExecutableMethodsDefinitionWriter` generates the `$Exec` class used by `BeanDefinition.getExecutableMethods()` and AOP.\n\nEach executable method stores an `AbstractExecutableMethodsDefinition.MethodReference` with:\n\n- Declaring type.\n- Annotation metadata.\n- Method name.\n- Return `Argument`.\n- Argument array built from `methodElement.getSuspendParameters()`.\n- `isAbstract`.\n- `isSuspend`.\n\nDispatch is generated by `DispatchWriter`. It produces switch-based reflection-free calls when possible, reflective fallback when required, and bridge dispatch entries for intercepted proxy methods. Kotlin default methods use a specialized dispatch target and are not supported for reflection invocation.\n\nWhen a method is annotated `@Executable(processOnStartup = true)`, the writer marks `requiresMethodProcessing()` and the bean definition emits the indexes that startup processors must inspect.\n\n## Bean Introspection\n\n`IntrospectedTypeElementVisitor` handles `@Introspected` and writes `BeanIntrospectionReference` classes. It supports:\n\n- Direct class introspection.\n- `classes` and `classNames`.\n- Package scanning, but only when `includedAnnotations` limits the scan.\n- `targetPackage`.\n- Optional annotation metadata emission.\n- Indexed annotations.\n- Explicit `@Introspected.IntrospectionBuilder`.\n- Lombok builders after Lombok-generated methods appear in a later round.\n\n`BeanIntrospectionWriter` emits the actual introspection class. It stores:\n\n- Constructor metadata and constructor `Argument[]`.\n- `BeanPropertyRef[]` with read, write, and with/copy-constructor dispatch indexes.\n- `BeanMethodRef[]` for introspected executable methods.\n- Enum constant refs for enum introspections.\n- Indexed property lookup methods when `@Introspected(indexed = ...)` is used.\n- Dispatch methods for property get/set/with, bean methods, copy-constructor mutation, and construction.\n\nProperty mutation order matters:\n\n- A setter or writable field is used when present.\n- If a read-only property corresponds to a constructor argument, the property is still considered mutable through constructor reconstruction.\n- If no setter exists, the writer looks for a with-method using the configured `withPrefix`.\n- If neither exists, mutation dispatch throws `UnsupportedOperationException`.\n\nConstructor support:\n\n- A no-arg default constructor enables `instantiate()`.\n- A primary constructor enables `instantiateInternal(Object[])` and `isBuildable()`.\n- If every constructor parameter is a Kotlin default parameter, the writer also emits no-arg `instantiate()` by calling Kotlin defaults.\n\nConfiguration beans that need validation are annotated with `@Introspected` so validation can operate on introspection metadata rather than by adding validation advice to every configuration setter.\n\n## AOP Proxies\n\n`DefaultElementBeanDefinitionBuilderFactory` creates proxy builders. It rejects final classes for compile-time subclass proxying, forces factory-produced around-advised beans into proxy-target mode, and chooses `RuntimeProxyBeanDefinitionWriter` for `@RuntimeProxy` types or `AopProxyWriter` otherwise.\n\nProxy modes:\n\n| Mode | Target ownership | Main generated behavior |\n| --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. | Generated proxy subclasses the target when possible. Intercepted methods pass `this` to `MethodInterceptorChain`. Concrete original methods use generated `$$access$$...` bridge methods so `proceed()` can call `super`. |\n| Proxy-target around proxy | Proxy and target are separate beans. | The proxy bean definition implements `ProxyBeanDefinition` and points back to the target definition. The proxy resolves a target with `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target | Proxy target is separate and resolved on first use. | The proxy stores a copied `BeanResolutionContext`; `interceptedTarget()` resolves the target. With `cacheableLazyTarget`, it caches the target after first lookup. |\n| Hotswap proxy-target | Proxy target is separate and mutable. | The proxy implements `HotSwappableInterceptedProxy`, stores target behind read/write locks, and exposes `swap(...)`. |\n| Introduction proxy | No concrete target implementation is required. | Generated proxy implements the introduced interface/type. Abstract/interface methods are satisfied by introduction interceptors. |\n| Runtime proxy | Proxy object is produced by a runtime creator. | The bean definition builds a `DefaultRuntimeProxyDefinition` and invokes the configured `RuntimeProxyCreator`. |\n\n### Around vs Introduction\n\nAround advice decorates an implementation that already exists. Introduction advice supplies or routes an implementation for methods that may not exist on a concrete target.\n\nThe compile-time distinction starts with interceptor binding metadata:\n\n- `@Around` contributes `@InterceptorBinding(kind = AROUND)`.\n- `@Introduction` contributes `@InterceptorBinding(kind = INTRODUCTION)`.\n- `@AroundConstruct` contributes `@InterceptorBinding(kind = AROUND_CONSTRUCT)`.\n- `InterceptedMethodUtil.hasAroundStereotype(...)` and `hasIntroductionStereotype(...)` determine which creator path runs.\n- `InterceptedMethodUtil.resolveInterceptorBinding(metadata, kind)` extracts the binding values that become the proxy constructor's interceptor qualifier.\n\nAround proxy generation:\n\n- `DeclaredBeanElementCreator` creates a normal target bean definition and, when necessary, an around proxy builder.\n- A class-level around stereotype causes public/package-private methods to be considered for interception.\n- A method-level around stereotype can force proxy creation for a method even when the class is not already an AOP proxy.\n- Methods must be non-final, non-private, and non-static because generated compile-time proxies need an overridable method.\n- Default around proxies subclass the target and invoke original behavior through generated bridge methods.\n- Proxy-target around proxies keep a separate target definition and resolve the target through the context.\n\nIntroduction proxy generation:\n\n- `IntroductionInterfaceBeanElementCreator` handles interfaces with introduction advice or configuration-reader introduction advice.\n- `AopIntroductionProxySupportedBeanElementCreator` handles concrete classes that combine introduction behavior with possible around advice.\n- `DefaultElementBeanDefinitionBuilderFactory.introductionProxy(...)` builds a proxy definition that includes both around and introduction interceptor bindings.\n- Interface introduction processes abstract methods, property accessors, and non-abstract default methods only when those non-abstract methods declare around advice.\n- Concrete-class introduction reuses the introduction proxy builder as the bean definition builder; it does not keep a separate ordinary target definition for introduced behavior.\n- Introduction proxies implement `Introduced`. Around proxies implement `Intercepted`; proxy-target variants also implement `InterceptedProxy` or `HotSwappableInterceptedProxy`.\n\nRuntime chain differences:\n\n- Around method resolution calls `InterceptorChain.resolveAroundInterceptors(...)` and gets only `AROUND` interceptors.\n- Introduction method resolution calls `InterceptorChain.resolveIntroductionInterceptors(...)`, which resolves introduction interceptors and around interceptors, then concatenates around interceptors before introduction interceptors.\n- If an introduction method has no introduction interceptor and is not an adapter method, runtime resolution fails with an error because there is no implementation to invoke.\n- If the method is an adapter method, the runtime creates an internal `AdapterIntroduction` interceptor as the implementation fallback.\n\nMethod interception flow in `AopProxyWriter`:\n\n1. `addAroundMethod(...)` records the method and contributes interceptor binding metadata from method annotations.\n2. Concrete default-around methods get executable-method entries and bridge methods as needed.\n3. The proxy type gets `$proxyMethods` and `$interceptors` fields.\n4. The proxy constructor appends five hidden parameters after user constructor parameters: `BeanResolutionContext`, `BeanContext`, `Qualifier`, interceptor bean registrations list, and `InterceptorRegistry`.\n5. Constructor code initializes `$proxyMethods` from the executable-methods definition or target bean definition.\n6. Constructor code resolves each method's interceptors using `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`.\n7. Each intercepted method override chooses a target: `this` for default around, a target field for eager proxy-target, or `interceptedTarget()` for lazy/hotswap.\n8. The override creates a `MethodInterceptorChain` with method-specific interceptors, target, executable method, and arguments, then returns `proceed()`.\n\nConstructor interception:\n\n- `BeanDefinitionWriter` detects `AROUND_CONSTRUCT` bindings only for valid candidate definitions. For proxy-target beans, only the target definition should intercept construction; for default around proxies, the generated AOP implementation intercepts construction.\n- Non-parametrized constructor interception uses `InterceptedInstantiateBeanDefinition` or `ProxyInterceptedInstantiateBeanDefinition`.\n- Parametrized constructor interception uses `InterceptedParametrizedInstantiateBeanDefinition` or `ProxyInterceptedParametrizedInstantiateBeanDefinition`.\n- The proxy variants know that proxy constructors contain the five hidden parameters and keep them out of the user-visible constructor interception argument list.\n\nFactory-produced around-advised beans are always proxy-target beans because the factory method owns the real object creation. If the produced type has constructor arguments, `proxyTargetMode` controls handling:\n\n- `ERROR`: fail compilation.\n- `WARN`: allow construction, but warn.\n- `ALLOW`: allow construction silently.\n\nFor `WARN` and `ALLOW`, primitive constructor parameters are annotated with `@Value(false)` or `@Value(0)`, and reference parameters are marked nullable so proxy construction has placeholder values.\n\n### Adapters\n\n`@Adapter` creates a new bean definition that adapts a user method to a single-abstract-method interface.\n\nCompile-time adapter generation is in `DeclaredBeanElementCreator.visitAdaptedMethod(...)`:\n\n1. The source method must declare `@Adapter(TargetInterface.class)`.\n2. The target must be an interface.\n3. The target interface must have exactly one abstract method.\n4. Source and target parameter counts must match.\n5. Kotlin suspend source methods are rejected.\n6. Each source parameter generic type must be assignable to the matching target method generic type.\n7. Generic placeholders on the target interface are remapped from the source method parameter types.\n8. A synthetic adapter proxy class name is created from the declaring bean name, target interface simple name, source method name, and an index.\n9. The target interface `ClassElement` is annotated with internal `@Adapter` members:\n   - `adaptedBean`: source bean class.\n   - `adaptedMethod`: source method name.\n   - `adaptedArgumentTypes`: source argument types.\n   - `adaptedQualifier`: source bean `@Named` qualifier, when present.\n10. The target interface is annotated `@Indexed` for the adapted interface type.\n11. A merged metadata hierarchy of the source bean and adapted interface becomes the proxy metadata.\n12. `beanDefinitionBuilderFactory.introductionProxy(adapterProxyClassName, metadata, interfaceToAdapt)` creates an introduction proxy.\n13. `implementInterface(interfaceToAdapt)` adds the SAM methods to the generated proxy.\n\nAt runtime, adapter methods are implemented by `AdapterIntroduction`:\n\n- `DefaultInterceptorRegistry.resolveToNone(...)` returns an `AdapterIntroduction` when the method has `@Adapter` metadata and no introduction interceptor beans matched.\n- `AdapterIntroduction` reads the internal adapter metadata from the executable method.\n- It finds an `ExecutionHandle` for the original source bean and method, using `adaptedQualifier` when present.\n- Its `intercept(...)` method invokes the source execution handle with the intercepted SAM method arguments.\n\nAdapters are therefore introduction proxies, but they are special because the implementation interceptor is synthesized at runtime instead of being a user-defined `@InterceptorBean`.\n\n### Interceptor Binding Recognition\n\nInterceptor binding metadata is normalized at compile time before bean/proxy writers consume it.\n\n`InterceptorBindingMembers` remaps annotation values that have AOP stereotypes:\n\n- Applied annotations that are themselves `@Around`, `@Introduction`, `@AroundConstruct`, or `@InterceptorBinding` are left as direct AOP annotations.\n- User annotations meta-annotated with those stereotypes get an internal `@InterceptorBinding` value whose `value` member is the user annotation type.\n- The binding `kind` is set to `AROUND`, `INTRODUCTION`, or `AROUND_CONSTRUCT`.\n- If the stereotype uses `@InterceptorBinding(bindMembers = true)`, the remapper stores selected annotation member values under `InterceptorBindingQualifier.META_BINDING_VALUES`.\n- Members annotated with `@NonBinding` are removed from those binding values.\n- If the advice stereotype has `@Type(SomeInterceptor.class)`, the remapper copies that type to the binding as `interceptorType`. This preserves the old type-based interceptor selection path.\n\n`InterceptorBeanMapper` remaps `@InterceptorBean(...)` on interceptor beans:\n\n- `@InterceptorBean` is itself a bean stereotype and has default singleton scope.\n- Its `value` member names the advice annotations the interceptor supports.\n- The mapper converts each supported annotation into an internal `@InterceptorBinding` value.\n- Those values are stored in the internal interceptor-bindings container on the interceptor bean metadata.\n\nGenerated proxies use these normalized bindings in two places:\n\n- Proxy writers collect type-level, method-level, and constructor-level binding values using `InterceptedMethodUtil.resolveInterceptorBinding(...)`.\n- `AopProxyWriter` annotates the generated proxy constructor's hidden interceptor-registration-list parameter with `AnnotationUtil.ANN_INTERCEPTOR_BINDING_QUALIFIER` and the collected binding values.\n- `BeanDefinitionWriter.getQualifier(...)` sees that annotation on the constructor parameter and emits `Qualifiers.byInterceptorBinding(argument.getAnnotationMetadata())`.\n- The context uses `InterceptorBindingQualifier` to preselect candidate interceptor bean registrations for the proxy constructor argument.\n\n`InterceptorBindingQualifier` supports two matching modes:\n\n- Binding by annotation name and optional `$bindingValues`.\n- Binding by explicit `interceptorType`.\n\nThe constructor-injected list is intentionally a candidate set, not the final per-method chain. It narrows the list cheaply during bean construction; `DefaultInterceptorRegistry` performs the final method-specific selection.\n\n### Interceptor Beans And Runtime Resolution\n\n`InterceptorRegistryBean` is the built-in bean definition for `InterceptorRegistry`.\n\n- It is a hand-written `BeanDefinitionReference` and `InstantiatableBeanDefinition`.\n- It exposes `InterceptorRegistry` and `DefaultInterceptorRegistry`.\n- It is singleton, always present, and bootstrap-context compatible.\n- Its `instantiate(...)` method returns a new `DefaultInterceptorRegistry` for the active `BeanContext`.\n\nRuntime method interceptor resolution is handled by `DefaultInterceptorRegistry.resolveInterceptors(...)`:\n\n1. It reads the intercepted method annotation metadata.\n2. If no interceptor registrations were injected, it returns none for around advice, creates `AdapterIntroduction` for adapter introduction methods, or fails for other missing introduction implementations.\n3. It configures expression/environment-aware metadata before evaluating bindings.\n4. `AbstractInterceptorChain.resolveInterceptorValues(metadata, kind)` extracts the applicable `@InterceptorBinding` values for the requested kind.\n5. For `AnnotationMetadataHierarchy`, declared method-level bindings are preferred over parent/type bindings for non-repeatable annotations.\n6. Each candidate interceptor registration is checked by `selectInterceptor(...)`.\n7. Candidate registrations are sorted with `OrderUtil.ORDERED_COMPARATOR`.\n8. Method resolution keeps `MethodInterceptor` instances and generic `Interceptor` instances that are not constructor-only.\n9. Constructor resolution keeps `ConstructorInterceptor` instances and generic `Interceptor` instances that are not method-only.\n\n`DefaultInterceptorRegistry.selectInterceptor(...)` checks:\n\n- Constructor interceptor type arguments, when present, must be assignable from the intercepted declaring type.\n- If an intercept point binding carries `interceptorType`, the interceptor bean instance type can match directly.\n- Otherwise the interceptor bean definition must have its own interceptor binding metadata for the same kind.\n- Each interceptor binding declared on the interceptor must match an intercept point binding.\n- If binding member values are present, the `$bindingValues` metadata must match as well.\n\nThe runtime chain then executes through `MethodInterceptorChain` or `ConstructorInterceptorChain`:\n\n- `MethodInterceptorChain.proceed()` invokes interceptors in order until exhausted, then calls the generated `ExecutableMethod`.\n- Introduction methods normally reach an introduction interceptor instead of a concrete target method.\n- Adapter introduction interceptors invoke the original adapted source method.\n- Constructor chains use `BeanConstructor` metadata and eventually call the generated intercepted `doInstantiate(...)`.\n\n### Factory Methods And Proxies\n\n`@Factory` classes are processed by `FactoryBeanElementCreator`, which extends the ordinary declared-bean creator. The factory class is still a bean definition with its own constructor, injection points, lifecycle methods, executable methods, validation, and AOP behavior; each producer member creates an additional bean definition.\n\nProducer member discovery:\n\n- Factory methods are methods whose metadata declares bean-producing semantics, normally `@Bean` or a scope stereotype.\n- Factory fields are fields annotated as beans; inaccessible/private factory fields fail compilation.\n- Bean-producing property read elements are converted to a factory method when they have a getter, or to a factory field when the backing field is accessible.\n- Bean-producing property write elements are ignored as producers because the read side owns the produced value.\n- Producer methods can also remain executable or interceptable methods on the factory bean itself. After the produced bean definition is created, `FactoryBeanElementCreator` still visits the factory method as an AOP method when the factory is proxied, or as an executable method otherwise.\n\nProduced metadata is deliberately not just the method metadata:\n\n1. For non-primitive produced types, the processor merges the produced class metadata with the producing method/field/property metadata.\n2. If the producing element declares a scope or qualifier, scopes and qualifiers inherited from the produced type are removed unless the producing element also declares them.\n3. The producing element then receives a hierarchy of factory-class metadata plus produced metadata, but factory-class qualifiers are stripped when they are not present on the produced bean. This prevents a qualifier on the factory bean from accidentally qualifying every product.\n4. For produced types with `@EachProperty`, both the produced type and the producing element are annotated with a computed `@ConfigurationReader(prefix = ...)` so iterable configuration path generation works for factory products.\n\nThe generated produced bean definition is a separate `BeanDefinitionWriter`:\n\n- `DefaultElementBeanDefinitionBuilderFactory.factoryMethod(...)` creates a writer whose bean type is the generic return type and whose producer definition is a `MethodDefinition`.\n- `factoryField(...)` creates a writer whose bean type is the generic field type and whose producer definition is a `FieldDefinition`.\n- Factory method definition names include a unique index so overloaded producer methods do not collide.\n- `BeanDefinitionWriter.resolveConstructorParameters()` treats factory method parameters like construction parameters and factory fields as zero-argument construction.\n- If any factory method parameter is annotated `@Parameter`, the produced definition becomes parametrized in the same way as a parametrized constructor bean.\n\nRuntime instantiation is generated by switching on the producer definition:\n\n- Constructor-produced beans call `initializeBean(...)`.\n- Field-produced beans call `buildFactoryFieldCall(...)`.\n- Method-produced beans call `buildFactoryMethodCall(...)`.\n- Static factory members are invoked with no factory bean instance.\n- Instance factory members first resolve the factory bean from the `BeanResolutionContext` using the factory type and factory qualifier, mark the resolution as factory-dependent, then invoke the method or read the field.\n- Inaccessible factory methods and fields use the generated reflection helper path; accessible static and instance members use direct sourcegen dispatch.\n\nFactory-produced AOP beans are special because the factory method or field owns creation of the real target object. A default subclass around proxy would create a proxy instance instead of using the factory product, so `DefaultElementBeanDefinitionBuilderFactory.aroundProxy(...)` forces `Interceptor.PROXY_TARGET = true` whenever the target writer's producer is not a constructor.\n\nFactory proxy generation rules:\n\n- The target produced bean definition remains the factory method/field definition.\n- The proxy bean definition is an additional definition that points back to the target definition as a proxy target.\n- Factory products use `visitSuperBeanDefinitionFactory(...)` rather than normal `visitSuperBeanDefinition(...)`; this marks the proxy definition as being backed by a factory target without subclassing the target bean definition class.\n- Runtime proxy products follow the same factory-target rule, but use `RuntimeProxyBeanDefinitionWriter` instead of `AopProxyWriter`.\n- The proxy scans the produced type for public, non-final, non-static methods, then also scans synthetic bean property read/write methods. This is necessary because the producing factory method does not declare the methods that will be intercepted on the product.\n- Factory-produced arrays and primitive beans cannot receive AOP advice, and the original produced class must not be final.\n\nFactory products with constructor arguments need an extra compile-time decision. Even though the real target comes from the factory, a compile-time subclass proxy still has to call a superclass constructor. `@Around(proxyTargetMode = ...)` controls this:\n\n- `ERROR` is the default and fails when the produced non-interface type has a primary constructor with parameters.\n- `WARN` allows proxy construction and emits a warning.\n- `ALLOW` allows proxy construction silently.\n\nFor `WARN` and `ALLOW`, `FactoryBeanElementCreator.allowProxyConstruction(...)` mutates the produced type constructor parameters so the proxy can be instantiated with placeholders: primitive parameters get synthetic `@Value(false)` or `@Value(0)`, reference parameters are marked nullable, and non-null metadata is removed. These placeholder values are for the proxy superclass constructor, not for creating the real factory target.\n\nConstructor interception for factory products follows the proxy-target split:\n\n- A factory method counts as a factory/proxy-target construction path in `BeanDefinitionWriter.isInterceptedLifeCycleByType(...)`.\n- `@AroundConstruct` on a factory-produced around bean should wrap the target construction path, which is the generated factory method invocation path.\n- The generated proxy's hidden constructor contains AOP infrastructure arguments and is not the user construction point.\n- The intercepted instantiate interfaces used for proxy definitions keep proxy infrastructure parameters separate from the user-visible constructor/factory arguments.\n\nOther factory product features:\n\n- `@Executable` on produced metadata registers all produced type methods as executable methods, except for arrays and primitives.\n- `@Bean(preDestroy = \"...\")` resolves an accessible no-argument destroy method on the produced type and emits a pre-destroy hook.\n- Produced `@EachProperty` and `@EachBean` definitions stay iterable definitions; the factory method parameters can still be filled from `@Parameter` values when the runtime creates each delegate.\n\n## Evaluated Expressions\n\nEvaluated expressions are annotation values represented by `EvaluatedExpressionReference`. They can appear in direct and nested annotation values.\n\nThe generation flow is:\n\n1. Writers call `EvaluatedExpressionProcessor.processEvaluatedExpressions(...)` for class, constructor, method, parameter, field, property, and introspection metadata.\n2. `EvaluatedExpressionsUtils.findEvaluatedExpressionReferences(...)` scans annotation and stereotype metadata, including nested annotation values.\n3. `DefaultExpressionCompilationContextFactory` builds an expression context. It includes shared registered context types, annotation-level `@AnnotationExpressionContext`, annotation member contexts, method parameters when compiling method expressions, and optional `this`.\n4. `EvaluatedExpressionWriter` generates a final class extending `AbstractEvaluatedExpression`.\n5. The generated `doEvaluate(ExpressionEvaluationContext)` parses the original annotation value with `CompoundEvaluatedExpressionParser` and compiles it into sourcegen statements.\n6. The owning generated definition/introspection is annotated with `@BuildTimeInit` listing expression class names.\n\nExpression classes are deduplicated by generated class name in `EvaluatedExpressionProcessor`. `BeanDefinitionWriter.finish()` resets expression and metadata processor caches after a processing run.\n\n## Configuration Metadata And Paths\n\nConfiguration path calculation is split across compile-time and runtime.\n\nCompile-time path helpers:\n\n- `ConfigurationUtils.getTypePath(...)` reads `ConfigurationReader.PREFIX`, `BASE_PREFIX`, supertype prefixes, and enclosing configuration reader prefixes. It caches the computed prefix by annotating `ConfigurationReader.PREFIX_CALCULATED`.\n- `ConfigurationUtils` appends `.*` for map-style `@EachProperty` and `[*]` for list-style `@EachProperty`.\n- `ConfigurationMetadataBuilder.calculatePath(...)` creates property paths. Nested configuration reader property types use their own reader path; ordinary properties use owner/declaring type path plus the property name, then hyphenation.\n- `ConfigurationMetadataWriterVisitor` writes IDE metadata through `ConfigurationMetadataWriter` implementations at `finish(...)`.\n\nRuntime path helpers:\n\n- `ConfigurationPath` models a stack of configuration reader and `EachProperty` segments.\n- `DefaultApplicationContext.collectIterableBeans(...)` expands iterable definitions into `BeanDefinitionDelegate` instances.\n- `BeanDefinitionDelegate` temporarily pushes its `ConfigurationPath` into the active `BeanResolutionContext` during `instantiate(...)` and `inject(...)`.\n- Property placeholders and generated `@Property` names can be resolved against the current dynamic path.\n\n## `@ConfigurationProperties`\n\n`@ConfigurationProperties` is meta-annotated with `@ConfigurationReader`, so it enters the configuration reader path.\n\nFor classes and records:\n\n1. `ConfigurationMetadataWriterVisitor` visits the class, computes and writes the reader prefix, and records configuration metadata.\n2. If the class has validation markers, it adds `@Introspected` so validation can use bean introspection.\n3. For records and `@ConfigurationInject` constructors/methods, constructor or method parameters that are property-like get synthetic `@Property(name = ...)` annotations.\n4. For writable bean properties, the visitor records property metadata and annotates setters with `@Property(name = ...)`.\n5. `ConfigurationReaderBeanElementCreator` processes bean properties rather than hidden fields/methods first.\n6. Writable properties become generated value injection points using `@Property(name = calculatedPath)`.\n7. `@ConfigurationBuilder` properties or fields become builder injection commands instead of normal property injection.\n8. Read methods annotated `@Executable` are still emitted as executable methods.\n9. `BeanDefinitionWriter.inject(...)` only performs property injection if the environment contains matching properties for the configuration bean.\n\nFor interfaces:\n\n1. `ConfigurationMetadataWriterVisitor` annotates the interface with `io.micronaut.runtime.context.env.ConfigurationAdvice`.\n2. `BeanDefinitionCreatorFactory` routes it through introduction proxy generation.\n3. Getter methods are validated as configuration accessors.\n4. Getter methods returning property-like values are annotated with `@Property`.\n5. Getter methods returning bean/configuration-like values are marked as bean access through `ConfigurationAdvice`.\n6. Runtime `ConfigurationIntroductionAdvice` resolves values using the active `ConfigurationPath` and the environment.\n\nDo not add validation AOP to configuration setters as a substitute for introspection validation. The creator intentionally suppresses method validation interception for configuration readers.\n\n## `@EachProperty`\n\n`@EachProperty` is both a `ConfigurationReader` and an iterable bean definition.\n\nCompile-time behavior:\n\n- `ConfigurationUtils.computeIterablePrefix(...)` appends `.*` by default or `[*]` when `list = true`.\n- The computed prefix is stored as `ConfigurationReader.PREFIX`.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachProperty` stereotype.\n- Factory-produced bean types with `@EachProperty` are explicitly annotated with the computed `ConfigurationReader` prefix on both the produced type and producing element.\n- Properties inside an `EachProperty` bean are still generated as normal configuration reader property injection points, but the property paths contain dynamic segments.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` sees the bean definition is iterable and calls `transformEachPropertyBeanDefinition(...)`.\n2. The context creates or reuses a `ConfigurationPath`.\n3. It pushes an `EachProperty` root segment for the definition.\n4. `ConfigurationPath.traverseResolvableSegments(environment, callback)` finds map keys or list indexes present in the environment.\n5. For each resolvable segment, the context creates a `BeanDefinitionDelegate` with a qualifier from `path.beanQualifier()` or `PrimaryQualifier`.\n6. The delegate sets the path during construction and injection, so generated `@Property` values resolve against the current segment.\n7. `@Parameter` constructor arguments can receive the current map key/name, enum value, list index, or matching nested configuration bean through `BeanDefinitionDelegate.getParametersValues(...)`.\n\nPrimary selection for `@EachProperty` comes from the current `ConfigurationPath` segment. `BeanDefinitionDelegate.isPrimary()` returns true when the path segment name matches the configured primary name.\n\nNested `@ConfigurationProperties` inside `@EachProperty` are handled by pushing additional configuration reader segments onto the same path. Direct resolution of a nested dynamic configuration reader may rebuild the path by finding the enclosing delegate.\n\n## `@EachBean`\n\n`@EachBean` is an iterable bean definition driven by another bean type rather than by environment keys.\n\nCompile-time behavior:\n\n- The annotation remains metadata on the bean definition; the processor does not generate one class per origin bean.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachBean` stereotype.\n- Constructor parameters annotated `@Parameter` make the generated definition parametrized when the value must be supplied at runtime.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` calls `transformEachBeanBeanDefinition(...)`.\n2. The annotation's required value is the dependent/origin bean type.\n3. The context finds candidate bean definitions for that origin type.\n4. For each origin candidate, the context creates a `BeanDefinitionDelegate` of the `@EachBean` definition.\n5. If the origin is already a configuration delegate, its `ConfigurationPath` is reused. This is what connects `@EachBean(ExampleConfiguration)` to `@EachProperty` entries.\n6. Otherwise the delegate qualifier is the origin's declared qualifier, `PrimaryQualifier` for primary origins, or an internal `EachBeanQualifier` that matches the exact origin `BeanDefinition`.\n7. `remapGenerics` metadata can remap type arguments from the origin bean into the created delegate.\n8. The delegate carries the origin definition for ordering and type argument behavior.\n9. During instantiation, `BeanDefinitionDelegate.getParametersValues(...)` fills `@Parameter` arguments from the current qualifier, path, origin bean, or matching bean lookup.\n\n`EachBeanQualifier` is an internal identity qualifier. It lets unqualified origin beans still drive distinct `@EachBean` delegates, but user-visible names are only available when the origin has a named/primary qualifier or when the origin came from a configuration path.\n\nIf a required `@EachBean` constructor parameter cannot be supplied, `ParametrizedInstantiatableBeanDefinition.resolveParameterizedArgumentValues(...)` treats the missing origin-type argument as a disabled bean rather than a normal missing argument.\n\n## Kotlin-Specific Generation\n\nKotlin support is mostly expressed through AST flags, not by checking Kotlin compiler symbols directly in this module.\n\nKey rules:\n\n- `MethodElement.isSuspend()` marks Kotlin suspend functions.\n- `MethodElement.getSuspendParameters()` includes the synthetic continuation parameter. Writers use this when building `Argument[]`, executable method references, AOP method lookups, dispatch methods, and lifecycle/injection method definitions.\n- `ExecutableMethodsDefinitionWriter` stores `isSuspend` on method references.\n- AOP interception returns `Object` for suspend methods and passes the continuation through the normal argument array. Runtime AOP adapts suspend calls through the Kotlin intercepted-method utilities in the AOP runtime.\n- `KotlinParameterElement.hasDefault()` marks constructor or method parameters with Kotlin defaults.\n\nKotlin default constructor calls:\n\n- `MethodGenUtils.invokeBeanConstructor(...)` detects default parameters and calls the Kotlin synthetic constructor with original parameters, one or more integer default masks, and a final `kotlin.jvm.internal.DefaultConstructorMarker` argument.\n- A mask bit means Kotlin should use the default value for that parameter.\n- For constructor injection, the writer computes per-argument \"has value\" expressions. For `@Property` parameters, the expression checks whether the property is present in the environment; for bean parameters, it checks non-null.\n- Primitive values cannot use null as the missing sentinel, so default primitive placeholders are `false` or numeric zero.\n- `BeanDefinitionWriter.initializeBean(...)` only does this direct Kotlin-default constructor path for non-proxy definitions. Proxies handle their own super constructor calls.\n\nKotlin default method calls:\n\n- `DispatchWriter` uses `KotlinMethodWithDefaultsDispatchTarget` when any suspend/normal parameter is a `KotlinParameterElement` with a default.\n- The dispatch target calls `MethodGenUtils.invokeKotlinDefaultMethod(...)`, which invokes the static `$default` method with target, parameters, masks, and a null marker.\n- Kotlin default methods are rejected for reflection dispatch because the default-mask call shape is not a normal reflective method invocation.\n\nOther Kotlin-specific behavior:\n\n- `BeanIntrospectionWriter` emits no-arg `instantiate()` for a constructor when all parameters are Kotlin defaults.\n- `ExecutableVisitor` does not warn for `@Nullable` primitive parameters when the parameter is a Kotlin default parameter.\n- `AopProxyWriter.invokeSuperConstructor(...)` allows Kotlin defaults when calling the proxied superclass constructor.\n- Factory-produced proxy construction in `WARN` or `ALLOW` mode annotates primitive placeholders with `@Value` and reference placeholders as nullable, which also helps Kotlin proxy construction.\n\n## Configuration Builders\n\n`@ConfigurationBuilder` is handled in both metadata and injection generation.\n\n`ConfigurationMetadataWriterVisitor` records a configuration group for the builder type and records each builder method as property metadata. `ConfigurationReaderBeanElementCreator` turns the builder property or field into `InjectFieldConfigurationBuilder` or `InjectMethodConfigurationBuilder` commands.\n\nGenerated injection creates or accesses the builder, then invokes generated builder method statements. A zero-argument builder method can be represented by a boolean property injection point; one-argument builder methods receive the resolved property value.\n\nDo not treat builder properties like normal writable configuration bean properties. Excludes and includes do not suppress builders in the same way, and inaccessible builder fields require a non-private getter.\n\n## Change Guidance\n\nMost source changes here affect generated bytecode contracts. When changing a writer, also inspect the runtime interfaces and bases in `inject/src/main/java/io/micronaut/inject/**` and `inject/src/main/java/io/micronaut/context/**`.\n\nUseful checks after source changes usually include:\n\n- `./gradlew -q :micronaut-core-processor:compileJava`\n- `./gradlew -q :micronaut-inject-java:compileTestJava :micronaut-inject-java:compileTestGroovy`\n- Targeted tests in `inject-java`, `inject-groovy`, or `inject-kotlin` that compile sample beans.\n- AOP changes should include around, around-construct, proxy-target, introduction, and Kotlin tests when applicable.\n- Configuration changes should include `@ConfigurationProperties`, interface configuration, nested configuration, `@EachProperty` map/list, and `@EachBean` tests.\n\nFor markdown-only edits in this file, `git diff --cached --check` and `./gradlew -q spotlessCheck` are enough.\n",".agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md":"# References Skill\n\nPath: `.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md)",".agents/skills/guides/references/guide-authoring-conventions.md":"# References Skill\n\nPath: `.agents/skills/guides/references/guide-authoring-conventions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-authoring-conventions.md)",".agents/skills/guides/references/guide-inventory.md":"# References Skill\n\nPath: `.agents/skills/guides/references/guide-inventory.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-inventory.md)",".agents/skills/guides/references/pdf-export-and-pr.md":"# References Skill\n\nPath: `.agents/skills/guides/references/pdf-export-and-pr.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/pdf-export-and-pr.md)",".agents/skills/guides/references/repository-workflow.md":"# References Skill\n\nPath: `.agents/skills/guides/references/repository-workflow.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/repository-workflow.md)",".agents/skills/gradle/references/gradle-best-practices.md":"# References Skill\n\nPath: `.agents/skills/gradle/references/gradle-best-practices.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/gradle-best-practices.md)",".agents/skills/gradle/references/micronaut-build-plugins.md":"# References Skill\n\nPath: `.agents/skills/gradle/references/micronaut-build-plugins.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/micronaut-build-plugins.md)",".agents/skills/docs/references/control-panel-patterns.md":"# References Skill\n\nPath: `.agents/skills/docs/references/control-panel-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/control-panel-patterns.md)",".agents/skills/docs/references/micronaut-docs-providers.md":"# References Skill\n\nPath: `.agents/skills/docs/references/micronaut-docs-providers.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/micronaut-docs-providers.md)",".agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md":"# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md)",".agents/skills/agent-md-refactor/references/refactor-playbook.md":"# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/refactor-playbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/refactor-playbook.md)"},"files":{".agents/skills/gradle/SKILL.md":"---\nname: gradle\ndescription: Execute Gradle maintainer operations for Micronaut repositories using micronaut-build internals and modern Gradle best practices. Use when users ask to diagnose build failures, maintain BOM/version catalogs, manage publishing/signing, enforce binary compatibility, or debug micronaut-build plugin behavior.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects using micronaut-build plugins\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n  gradle-major-version: \"9.x\"\nmcp:\n  maven-tools:\n    command: docker\n    args: [\"run\", \"-i\", \"--rm\", \"arvindand/maven-tools-mcp:latest\"]\n---\n\n# Gradle (Micronaut Committer)\n\nUse this skill for Micronaut framework maintainer work. Do not default to end-user app guidance.\n\n## Goal\n\nApply correct, source-backed Gradle changes in Micronaut repositories, using the `micronaut-build` plugin contracts and current Gradle best practices.\n\nCurrent coverage target: repositories on Gradle major line `9.x`.\n\nFor dependency-intelligence tasks (version freshness, stability, release cadence, CVE/license checks), use the embedded `maven-tools` MCP via `skill_mcp`.\n\n## Procedure\n\n1. Identify build shape and active plugins.\n2. Map requested work to exact `micronaut-build` plugin behavior.\n3. Execute minimal maintainer-safe change.\n4. Verify with targeted and aggregate Gradle tasks.\n\n### 1) Establish build shape first\n\n- Inspect `settings.gradle` or `settings.gradle.kts` for settings plugins and dependency management.\n- Confirm `io.micronaut.build.shared.settings` is present unless the repository intentionally diverged.\n- Validate settings-scoped plugins (especially Develocity wiring) in `settings.gradle(.kts)`, not in project `build.gradle(.kts)`.\n- Confirm root build applies `io.micronaut.build.internal.parent` for standard aggregation behavior.\n- Inspect root and impacted module build files for applied plugin IDs and `micronautBuild` extension usage.\n- Inspect `buildSrc`/convention plugins before modifying module build scripts.\n- Inspect `gradle.properties` and `gradle/*.versions.toml` for version source and overrides.\n- Treat module directory names and Gradle project paths separately; if standardized names are enabled, use `:micronaut-*` paths for task targeting.\n- If module paths are unclear, run `./gradlew projects`.\n- If dependency resolution is involved, capture `dependencyInsight` before changing files.\n\n### 2) Use source-of-truth plugin contracts\n\n- Use `references/micronaut-build-plugins.md` as the authoritative plugin behavior map.\n- Treat `micronaut-build` source as primary truth. Its README may be outdated.\n- Remember default plugin IDs are internal: `io.micronaut.build.internal.<name>`.\n- Important exception: `io.micronaut.build.shared.settings`.\n\n### 3) Execute maintainer workflows\n\n- **Build failures**: reproduce with minimal task path, then expand to module `check`, then root validation.\n- **Catalog/version updates**: use plugin-provided workflows (`updateVersionCatalogs`, `useLatestVersions`) where available.\n- **Catalog imports**: prefer `micronautBuild { importMicronautCatalog() }` and alias-specific imports over ad hoc BOM wiring when repository conventions use settings extension catalog import.\n- **Dependency intelligence**: use the `maven-tools` MCP for latest stable versions, upgrade comparisons, and dependency health signals before changing catalogs or BOM constraints.\n- **Dependency scope hygiene**: choose `api` only for public API surface; use `implementation` for internals; use `compileOnly`/`runtimeOnly` intentionally.\n- **BOM/publishing**: verify BOM generation, inlining behavior, publication metadata, and signing gates.\n- **Binary compatibility**: keep baseline discovery and accepted API changes explicit; never silently suppress regressions.\n- **Docs/quality**: treat root-only aggregator plugins and docs pipelines as first-class checks.\n- **Layering**: prefer convention plugin changes (`buildSrc`) over duplicating logic in many module build files.\n\n### 4) Verify before completion\n\n- Run at least one targeted task and one aggregate task:\n  - `./gradlew :<module>:check`\n  - `./gradlew check`\n- For maintainer pipelines, include docs and style gates where applicable:\n  - `./gradlew check docs`\n  - `./gradlew spotlessApply spotlessCheck`\n- For API-affecting changes, run compatibility checks:\n  - `./gradlew japiCmp`\n- For newly added published modules, define when binary compatibility checks start in module build logic (example):\n\n```kotlin\nmicronautBuild {\n    binaryCompatibility.enabledAfter(\"2.0.0\")\n}\n```\n\n- Use the repository's intended first compatible release version instead of blindly reusing `2.0.0`.\n- Add focused diagnostics when needed:\n  - `./gradlew dependencyInsight --configuration <conf> --dependency <module>`\n  - `./gradlew --scan <task>`\n- Report exact commands and outcomes.\n\n## Guardrails\n\n- Do not use `enforcedPlatform` when plugin logic explicitly forbids it.\n- Do not bypass Micronaut version mismatch checks except intentional development-version flows.\n- Do not apply root-only plugins to subprojects.\n- Do not replace framework maintainer workflows with generic app-centric shortcuts.\n\n## Best Practices\n\nUse `references/gradle-best-practices.md` for operational standards on:\n\n- configuration and build cache behavior,\n- provider/lazy configuration patterns,\n- toolchains and reproducibility,\n- secure publishing and dependency verification,\n- CI reliability.\n\n## Examples\n\n- \"Diagnose why micronaut-core version mismatch fails on compileClasspath.\"\n- \"Update version catalogs safely and apply latest allowed minor versions.\"\n- \"Fix Sonatype release pipeline behavior for a non-snapshot release.\"\n- \"Investigate binary compatibility failure and validate accepted changes file usage.\"\n\n## Validation Checklist\n\n- [ ] Active plugins identified from build files.\n- [ ] Decisions mapped to `micronaut-build` source behavior.\n- [ ] Changes align with maintainer workflows.\n- [ ] Verification tasks run and outcomes captured.\n- [ ] No end-user-only Gradle guidance substituted for framework operations.\n\n## References\n\n- `references/micronaut-build-plugins.md`\n- `references/gradle-best-practices.md`\n",".agents/skills/agent-md-refactor/SKILL.md":"---\nname: agent-md-refactor\ndescription: Refactor oversized agent instruction files into a progressive-disclosure structure. Use when users ask to split AGENTS.md/CLAUDE.md/COPILOT.md, reduce instruction bloat, or organize guidance into linked topic files.\nlicense: Apache-2.0\ncompatibility: Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Agent MD Refactor\n\nRefactor monolithic instruction files into a compact root file plus linked topic files.\nKeep this file focused on execution flow and load detailed templates/examples from references.\n\n## Goal\n\nDeliver a maintainable instruction system with:\n\n- a minimal root instruction file containing only universal guidance,\n- linked topic files for detailed rules,\n- contradictions resolved and vague/redundant rules removed.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Refactor this AGENTS.md to use progressive disclosure.\"\n- \"Split my CLAUDE.md into focused instruction files.\"\n- \"My instruction file is too long, reorganize it.\"\n\nShould not trigger:\n\n- \"Explain what AGENTS.md is.\"\n- \"Fix one typo in CLAUDE.md.\"\n- \"Write a brand-new coding standard from scratch.\"\n\nMore examples: [examples-and-anti-patterns](references/examples-and-anti-patterns.md).\n\n## Procedure\n\n1. Inventory instruction sources (`AGENTS.md`, `CLAUDE.md`, `COPILOT.md`, related guidance docs).\n2. Detect contradictions and resolve by repository precedence.\n3. Keep only root-level essentials in the root instruction file.\n4. Group remaining content into 3-8 linked topic files with clear names.\n5. Remove non-actionable, redundant, and outdated directives.\n6. Validate links, coverage, and consistency before completion.\n\nDetailed step playbook: [refactor-playbook](references/refactor-playbook.md).\n\n## Inputs\n\n- Root instruction file path(s)\n- Existing repository conventions (commands, toolchain, style)\n- User constraints (must-keep rules, preferred layout)\n\n## Outputs\n\n- Refactored root instruction file (minimal, universal guidance)\n- Topic files with detailed rules\n- List of removed/merged rules with rationale\n- Notes on contradiction handling\n\n## Edge Cases\n\n- If rule precedence is impossible to infer, request one targeted user decision.\n- If multiple files repeat the same rule, keep one canonical source and replace others with links.\n- If the instruction file is already concise, avoid unnecessary splitting.\n- Use relative markdown links for portability.\n\n## Validation Checklist\n\n- [ ] Frontmatter is valid YAML and `name` matches directory.\n- [ ] Description states capability and usage triggers.\n- [ ] Root file contains only universal instructions.\n- [ ] Topic files are self-contained and linked from root.\n- [ ] Contradictions are resolved or explicitly called out.\n- [ ] Vague/default/redundant directives are removed or rewritten.\n- [ ] Relative links resolve.\n\n## References\n\n- [Refactor playbook](references/refactor-playbook.md)\n- [Examples and anti-patterns](references/examples-and-anti-patterns.md)\n",".agents/skills/skill-creator/SKILL.md":"---\nname: skill-creator\ndescription: Create new Agent Skills or improve existing ones in an agent-agnostic way. Use when users ask to build, refactor, validate, or package skills compatible with the Agent Skills specification and the skills CLI ecosystem.\nlicense: MIT\ncompatibility: Compatible with Agent Skills spec and skill directories such as .agents/skills or equivalent agent-specific skill paths.\nmetadata:\n  author: local\n  version: \"1.0.0\"\n---\n\n# Skill Creator\n\nCreate and refine skills that work across agents implementing the Agent Skills specification.\n\nUse imperative instructions. Keep the process deterministic where possible. Keep the skill output portable.\n\n## Objectives\n\n1. Produce a valid skill with a correct `SKILL.md` frontmatter and useful body instructions.\n2. Keep the skill agent-agnostic unless the user explicitly requests agent-specific behavior.\n3. Apply progressive disclosure so only essential content stays in `SKILL.md`.\n4. Validate structure and naming before declaring completion.\n\n## Workflow\n\n### 1) Identify intent and scope\n\nDetermine whether the user wants one of these outcomes:\n\n- New skill from scratch\n- Update an existing skill\n- Improve trigger quality (`description` tuning)\n- Add reusable resources (`scripts/`, `references/`, `assets/`)\n\nExtract known constraints from conversation context first. Only ask for missing details that materially change implementation.\n\n### 2) Gather concrete examples\n\nCollect at least 2 realistic user prompts that should trigger the target skill. Also collect at least 2 near-miss prompts that should not trigger it.\n\nUse these examples to decide:\n\n- Required workflow steps\n- Output format expectations\n- Edge cases to handle\n- Whether deterministic scripts are needed\n\n### 3) Design the skill anatomy\n\nCreate a minimal structure first:\n\n```text\n<skill-name>/\n└── SKILL.md\n```\n\nAdd optional directories only when justified:\n\n- `scripts/` for deterministic or repeated operations\n- `references/` for detailed docs, schemas, and long procedures\n- `assets/` for templates and static resources used in outputs\n\n### 4) Author `SKILL.md` frontmatter\n\nSet required fields:\n\n- `name`: lowercase, digits, hyphens; matches folder name\n- `description`: what the skill does and when to use it\n\nCommon optional fields include `license`, `compatibility`, `metadata`, and `allowed-tools`. Additional frontmatter keys (for example, MCP or tooling configuration) are allowed when supported by the Agent Skills spec/validator, and may be nested under `metadata` when appropriate.\n\nDescription guidance:\n\n- Include both capability and trigger cues\n- Avoid vague phrases like \"helps with X\"\n- Prefer concrete contexts and user-language synonyms\n\n### 5) Author `SKILL.md` body\n\nStructure the body for execution, not marketing:\n\n1. Goal and success criteria\n2. Step-by-step operating procedure\n3. Input/output expectations\n4. Error handling and edge cases\n5. Examples\n6. Validation checklist\n\nWrite in imperative style. Explain why non-obvious constraints matter.\n\n### 6) Apply progressive disclosure\n\nKeep `SKILL.md` concise. Move large or specialized content into `references/` and link to it from `SKILL.md`.\n\nIf the skill spans multiple variants, separate variant details into dedicated reference files and keep variant-selection logic in `SKILL.md`.\n\n### 7) Validate and harden\n\nRun a final compatibility pass:\n\n- Frontmatter parses as valid YAML\n- `name` complies with spec constraints and folder match\n- `description` is explicit about trigger contexts\n- Relative file references resolve\n- Optional scripts are executable and documented\n- Language is agent-neutral and avoids vendor lock-in\n\nIf `skills-ref` is available, run:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nIf the skills CLI is available, verify discovery from the repo root:\n\n```bash\nnpx skills list\n```\n\n## Agent-Agnostic Rules\n\n- Do not require a specific model vendor or proprietary UI affordance.\n- Do not rely on agent-only file paths when portable paths exist.\n- Do not reference unavailable tools as mandatory.\n- Prefer open, portable commands and plain Markdown guidance.\n\n## Safety and integrity\n\n- Refuse to create skills intended for malware, exploitation, data exfiltration, or unauthorized access.\n- Keep behavior aligned with user intent; avoid hidden actions.\n\n## Completion criteria\n\nA skill-creation task is complete only when all are true:\n\n1. Skill folder exists in the requested location.\n2. `SKILL.md` is valid and complete.\n3. Optional resources are present only if needed.\n4. Validation checks pass or limitations are explicitly reported.\n\n## References\n\n- See `references/spec-checklist.md` for implementation rules distilled from the spec.\n- See `references/templates.md` for copy-ready scaffolds.\n- See `references/research-synthesis.md` for design rationale from cross-source research.\n",".agents/skills/docs/SKILL.md":"---\nname: docs\ndescription: 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.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Docs (Micronaut Maintainer)\n\nUse this skill for maintainer-facing guide work in Micronaut framework repositories. Do not default to end-user application documentation advice.\n\n## Goal\n\nImplement 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.\n\n## Procedure\n\n1. Confirm repository docs layout and build tasks.\n2. Plan `toc.yml` and `.adoc` updates in lockstep.\n3. Apply Micronaut docs macro conventions used by maintainers.\n4. Prefer generated configuration property references over manual tables.\n5. Build and validate `publishGuide` and `docs` outputs.\n\n### 1) Confirm docs layout and build tasks\n\n- Check `src/main/docs/guide/toc.yml` first.\n- List relevant guide files under `src/main/docs/guide/**/*.adoc`.\n- If examples are involved, inspect `doc-examples/` (if present) and plan snippet tags from executable sources.\n- If assets are involved, keep images in `src/main/docs/resources/img/`.\n- Confirm standard commands from `CONTRIBUTING.md`:\n  - `./gradlew publishGuide` (or `./gradlew pG`) for guide assembly.\n  - `./gradlew docs` for guide + API docs assembly.\n- If repository layout diverges from template conventions, follow local conventions and explicitly report the divergence.\n\n### 2) Keep `toc.yml` and files in lockstep\n\nTreat `src/main/docs/guide/toc.yml` as navigation source of truth.\n\nRules:\n\n1. Every visible section must exist in `toc.yml`.\n2. Every `toc.yml` entry must resolve to a real `.adoc` path.\n3. Preserve section order unless the request explicitly changes navigation.\n4. Use nested sections for grouped topics when needed.\n\nExample nested pattern:\n\n```yaml\ncontrolPanels:\n  title: Available Control Panels\n  builtIn: Built-in\n  management: Management\n```\n\nThis maps to:\n\n- `src/main/docs/guide/controlPanels.adoc`\n- `src/main/docs/guide/controlPanels/builtIn.adoc`\n- `src/main/docs/guide/controlPanels/management.adoc`\n\n### 3) Apply Micronaut docs macro conventions\n\nUse docs macros registered by `micronaut-build` (`DocsExtensionRegistry`) and maintained for framework guides.\n\nPreferred mapping:\n\n| Need | Preferred pattern |\n|---|---|\n| Dependency instructions | `dependency:group:artifact[scope=...]` |\n| Source sample synchronized with test suites | `snippet::path/to/File.ext[tags=...]` |\n| Multi-format configuration snippets | `[configuration]` listing blocks |\n| Configuration properties reference | `include::{includedir}configurationProperties/<fqcn>.adoc[]` |\n| Shell commands | `[source,bash]` blocks |\n| Repository/release links | `https://github.com/{githubSlug}` and `/releases` links |\n\nGuardrails:\n\n- Do not handwrite separate Maven/Gradle dependency blocks when `dependency:` is suitable.\n- Do not replace Micronaut `snippet::` macros with direct Asciidoctor `[source]` includes or pasted code blocks just because the current examples have one language. The macro is the multi-language, source-backed contract for generated module docs.\n- Do not remove snippet callouts when touching examples. Preserve existing callout tags and callout explanations unless the underlying executable source no longer has that behavior.\n- Do not duplicate configuration property tables manually when generated references exist.\n- Keep environment-sensitive instructions explicit (for example `MICRONAUT_ENVIRONMENTS=dev`).\n- Prefer stable links to official Micronaut docs for endpoint semantics.\n\n### 4) Use generated configuration property references correctly\n\n- `micronaut-docs` provides `AsciiDocPropertyReferenceWriter`, which generates AsciiDoc property fragments from configuration metadata.\n- Micronaut docs build wiring consumes those fragments via `{includedir}configurationProperties/...` includes.\n- Prefer includes over hand-maintained property tables.\n\nSee `references/micronaut-docs-providers.md` for confirmed provider/macro details and source locations.\n\n### 5) Build and validate documentation\n\nFrom repository root, run:\n\n```bash\n./gradlew publishGuide\n./gradlew docs\n```\n\nValidation checklist:\n\n1. Commands exit with code `0`.\n2. Output exists under `build/docs/`.\n3. Updated sections appear in navigation and render without missing includes.\n4. Added images/links resolve.\n\nIf `publishGuide` passes but `docs` fails, fix the failing stage and rerun both commands.\n\n## Maintainer Delivery Contract\n\nWhen finishing docs work, report:\n\n1. Exact changed files (`.adoc`, `toc.yml`, docs resources).\n2. Which conventions were applied (`dependency:`, `snippet::`, `[configuration]`, generated property includes).\n3. Build commands run and outcomes.\n4. Any repo-specific divergences or follow-ups.\n\n## Validation Checklist\n\n- [ ] `toc.yml` and `.adoc` changes are consistent.\n- [ ] Macros and includes follow Micronaut maintainer conventions.\n- [ ] Existing `snippet::` macros and callouts are preserved unless executable source changes require a different tagged snippet.\n- [ ] `publishGuide` and `docs` executed successfully.\n- [ ] Output and navigation verified under `build/docs/`.\n- [ ] Guidance remains maintainer-focused (not generic app docs).\n\n## References\n\n- `references/micronaut-docs-providers.md`\n- `references/control-panel-patterns.md`\n- `CONTRIBUTING.md`\n- `src/main/docs/guide/toc.yml`\n",".agents/skills/guides/SKILL.md":"---\nname: guides\ndescription: Create or update standalone Micronaut Guides in micronaut-projects/micronaut-guides, including topic discovery, guide authoring, validation, PDF export, and pull request handoff. Use for requests to create a Micronaut Guide, add a guide to micronaut-guides, author a tutorial for a Micronaut module, or prepare a guide PR with PDF.\nlicense: Apache-2.0\ncompatibility: Micronaut Guides repository and Micronaut repositories that need standalone tutorial PRs\nmetadata:\n  author: Micronaut Agent Company\n  version: \"1.0.0\"\n---\n\n# Guides (Micronaut Maintainer)\n\nUse this skill for standalone tutorial work in `micronaut-projects/micronaut-guides`. Start from the caller's local Micronaut repository to understand the API, module, or behavior being taught, then do the guide implementation in a current clone of `micronaut-guides`.\n\nDo not use this skill for ordinary module documentation under `src/main/docs/guide`; use the `docs` skill for that work. Do not use it for generic non-Micronaut tutorials.\n\n## Goal\n\nProduce a reviewable pull request against `micronaut-projects/micronaut-guides` with source-backed guide content, validation evidence, and a PDF export of the rendered guide page for maintainers.\n\n## Procedure\n\n1. Define the topic from the local repository.\n2. Refresh upstream `micronaut-guides` and deduplicate against existing guides.\n3. Inspect current repository conventions before writing.\n4. Author the smallest correct guide change.\n5. Validate the guide and render the page.\n6. Export a PDF and prepare the PR handoff.\n\n### 1) Define the Topic\n\n- Identify the exact Micronaut feature, module, API, integration, or migration path the guide should teach.\n- Read the local implementation, tests, module docs, and examples that prove the behavior.\n- Decide the target reader task in one sentence, for example: \"Use Micronaut Serialization with a custom serializer in a controller response.\"\n- Prefer a runnable application and tests over prose-only explanation.\n\n### 2) Refresh and Deduplicate\n\nWork from current upstream facts, not this skill's snapshot:\n\n```bash\ngit clone https://github.com/micronaut-projects/micronaut-guides.git\ncd micronaut-guides\ngit fetch origin\ngit switch master\ngit pull --ff-only\n```\n\nBefore creating a new guide, inventory `guides/*/metadata.json` and nearby guide source. Check titles, slugs, tags, categories, `apps`, `base`, `publish`, and guide bodies for duplicates or near-duplicates. Treat `publish: false` guides as base or partial guides, not public topics, but inspect them when a new guide could reuse them.\n\nIf an existing guide already teaches the task, update that guide instead of creating a duplicate. If overlap is ambiguous, stop and ask for maintainer direction.\n\n### 3) Inspect Current Conventions\n\nAlways read these current upstream files before editing:\n\n- `README.md`\n- `build.gradle`\n- `buildSrc/src/main/java/io/micronaut/guides/core/Guide.java`\n- `buildSrc/src/main/java/io/micronaut/guides/Category.java`\n- `buildSrc/src/main/resources/guide-metadata.schema.json`\n- Nearby guides in the same topic family\n\nUse `references/repository-workflow.md` for clone, branch, build-output, task naming, and validation details. Use `references/guide-authoring-conventions.md` for metadata, directory layout, macros, placeholders, and base-guide rules.\n\n### 4) Author the Guide\n\n- Choose a kebab-case slug that matches the reader task and does not collide with existing guide directories.\n- Create or update `guides/<slug>/metadata.json`.\n- Use one root AsciiDoc file named `<slug>.adoc` unless current metadata conventions require `asciidoctor`.\n- Put source under the expected Java, Groovy, and Kotlin layout when the guide supports multiple languages. If the feature is language-specific, set `languages` in metadata and explain why in the PR.\n- For single-app guides, use an app named `default`. For multi-app guides, mirror existing app-directory patterns and declare each app in metadata.\n- Use validated guide macros such as `common:`, `source:`, `resource:`, `test:`, `testResource:`, `callout:`, `external:`, `dependency:`, and `guideLink:` instead of manually duplicating generated paths.\n- Use conditional blocks such as `:exclude-for-languages:` and `:exclude-for-build:` for language-specific or build-tool-specific text.\n- Keep secrets out of source, generated code, rendered HTML, and the PDF. Use placeholders and documented cleanup steps for cloud resources.\n\n### 5) Validate\n\nConvert the guide slug from kebab-case to lowerCamelCase for dynamic tasks:\n\n```bash\n./gradlew <guideLowerCamel>Build\n./gradlew <guideLowerCamel>RunTestScript\n```\n\nFor broad validation or shared infrastructure changes, run:\n\n```bash\n./gradlew build\n```\n\nGenerated applications are under `build/code`. Rendered HTML and site assets are under `build/dist`. For cloud, credentialed, or cost-incurring guides, do not run provisioning commands without explicit confirmation; document skipped validation and the reason.\n\n### 6) Export PDF and Handoff\n\nAfter rendering, export the reviewed HTML page to PDF. Prefer a headless browser export when available, and fall back to a manual browser \"Print to PDF\" export when needed. Keep the PDF as local review evidence or attach it to the PR; do not commit generated PDFs unless maintainers explicitly request that.\n\nThe PR body must include:\n\n- Guide slug and user-facing task.\n- Files changed.\n- Commands run and outcomes.\n- Rendered HTML path inspected.\n- PDF filename and whether it is attached or linked.\n- Any skipped validation, cloud costs, credentials, or cleanup notes.\n\nSee `references/pdf-export-and-pr.md` for the export workflow and PR checklist.\n\n## Security Guardrails\n\n- Never commit secrets, tokens, local credentials, cloud account identifiers, `.env` files, or generated PDFs containing private data.\n- Ask before running commands that provision cloud resources or incur cost.\n- Prefer sample placeholders for credentials and explain cleanup for created resources.\n- Scrub screenshots, HTML, logs, and PDFs before attaching them to a PR.\n- Do not add custom Starter features, dependencies, or buildSrc changes unless the guide topic requires them and nearby guide conventions support the change.\n\n## Examples\n\nUse this skill for:\n\n- \"Create a Micronaut Guide for the new serialization feature.\"\n- \"Add a guide to `micronaut-guides` for this module.\"\n- \"Author a tutorial for Micronaut Data's new repository behavior.\"\n- \"Prepare a guide PR with the rendered PDF.\"\n\nDo not use this skill for:\n\n- \"Update `src/main/docs/guide/toc.yml` in this module.\"\n- \"Fix the release history page in this repository.\"\n- \"Write a generic blog post about Java.\"\n\n## Validation Checklist\n\n- [ ] Current `micronaut-guides` was cloned or fetched before writing.\n- [ ] Existing guide titles, slugs, tags, categories, and `publish: false` bases were checked for duplicates.\n- [ ] `README.md`, metadata schema, category source, and nearby guide examples were inspected.\n- [ ] Guide source uses current metadata, directory, macro, language, and build-tool conventions.\n- [ ] Single-guide build and test-script tasks were run, or skipped with a specific reason.\n- [ ] Rendered HTML was inspected under `build/dist`.\n- [ ] PDF export was created and named in the PR handoff.\n- [ ] PR handoff explains changed files, validation, skipped steps, and any security-sensitive handling.\n\n## References\n\n- `references/repository-workflow.md`\n- `references/guide-authoring-conventions.md`\n- `references/guide-inventory.md`\n- `references/pdf-export-and-pr.md`\n",".agents/skills/coding/SKILL.md":"---\nname: coding\ndescription: Implement and review Java code changes for Micronaut framework repositories using maintainer standards, including JSpecify null-safety conventions. Use when users ask to add or refactor Java code, fix framework bugs, evolve internal APIs, or prepare committer-ready changes with tests and verification.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Coding (Micronaut Committer)\n\nUse this skill for maintainer-facing Java implementation work in Micronaut repositories. Do not default to end-user application shortcuts.\n\n## Goal\n\nDeliver minimal, source-backed Java changes that preserve framework quality: binary compatibility, JSpecify null-safety, reflection-free behavior, and full Gradle verification (`check`, `docs`, and compatibility checks when API-facing).\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Implement this Micronaut Java feature in `src/main/java` and keep API compatibility.\"\n- \"Refactor this module internals and mark non-public APIs correctly.\"\n- \"Fix failing framework tests and prepare committer-ready validation output.\"\n- \"Add configuration support using Micronaut conventions, not app-level shortcuts.\"\n\nShould not trigger:\n\n- \"Explain Micronaut basics to a beginner.\"\n- \"Create an end-user sample app from scratch.\"\n- \"Only edit release notes/changelog text.\"\n\n## Procedure\n\n1. Establish scope and API impact.\n2. Implement Java code with Micronaut maintainer conventions.\n3. Enforce API boundaries and binary compatibility.\n4. Document Java APIs and implementation intent.\n5. Keep Gradle/build changes aligned with repository conventions.\n6. Verify with maintainer-grade checks before completion.\n\n### 1) Establish scope and API impact\n\n- Identify affected modules and whether any change is public API or internal-only.\n- Inspect existing package patterns before editing (imports, nullability style, tests, naming).\n- For API-facing edits, plan compatibility checks up front (`japiCmp`).\n- Keep change surface minimal; avoid opportunistic refactors unless required.\n\n### 2) Implement Java with Micronaut maintainer conventions\n\n- Prefer modern Java idioms where they improve clarity (records, sealed types, pattern matching, `var` for local inference), but only when supported by the repository toolchain/target level.\n- Do not use fully qualified class names unless import conflicts force it.\n- Micronaut Java code uses JSpecify nullness annotations from `org.jspecify.annotations`; use JSpecify for new or modified nullability contracts.\n- New Java packages must include `package-info.java` with `@NullMarked` and `import org.jspecify.annotations.NullMarked`; when touching an existing package without `@NullMarked`, add it unless the local code has an explicit exception.\n- Use `org.jspecify.annotations.Nullable` for nullable values, including nullable parameters, return values, fields, array/component positions such as `String @Nullable []`, nullable collection elements such as `List<@Nullable T>`, and nullable type bounds such as `<T extends @Nullable Object>`.\n- Preserve existing nullability intent when editing older code. Use JSpecify for new or modified contracts, but do not rewrite deliberate compatibility annotations such as `io.micronaut.core.annotation.Nullable` or `jakarta.annotation.Nullable` unless the task is specifically a nullability migration and compatibility impact has been checked.\n- Avoid reflection-oriented implementations in framework code paths; prefer Micronaut compile-time/introspection mechanisms.\n- Use `jakarta.inject` APIs for DI, not `javax.inject`.\n- Prefer constructor injection and immutable state over field injection.\n- For configuration models, prefer `@ConfigurationProperties` over scattered `@Value` usage.\n\n### 3) Enforce API boundaries and compatibility\n\n- Treat all public-facing changes through a Semantic Versioning lens (`https://semver.org/`) before implementation.\n- Classify impact explicitly: patch for backward-compatible fixes, minor for backward-compatible feature additions, major for breaking API/behavioral changes.\n- Keep public API binary compatible unless a major-version change explicitly allows breaks.\n- Prefer non-breaking API evolution first: deprecate existing methods and add replacement variants/overloads instead of deleting methods or changing signatures in place.\n- When using the deprecate-and-add path, keep deprecated APIs functional, point to replacements in Javadoc, and schedule removals only for the next major version.\n- If breaking public-facing changes are explicitly allowed, document them in the user guide under `src/main/docs/guide` with migration notes, and update `toc.yml` when adding new guide sections.\n- Mark non-user-facing APIs with `@io.micronaut.core.annotation.Internal`.\n- Mark unstable public APIs with `@io.micronaut.core.annotation.Experimental` and avoid presenting them as stable contracts.\n- Mark members directly called by generated code with `@io.micronaut.core.annotation.UsedByGeneratedCode`; preserve those signatures unless the generated-code callers are updated in the same change.\n- Keep visibility as narrow as possible for non-public internals.\n- When deprecating API, provide migration-friendly Javadoc and avoid silent behavioral breaks.\n\n### 4) Document Java APIs and implementation intent\n\n- All public Java types and public methods must have Javadoc. Include public constructors when they are part of the user-facing API.\n- All new public Java types, methods, and user-facing constructors must include an `@since` Javadoc tag for the version where the PR will debut.\n- Determine the `@since` version from the approved target branch, not from guesswork. Inspect that branch's `gradle.properties` (`projectVersion`) and use the corresponding release version; for example, `4.9.0-SNAPSHOT` means the new API debuts in `4.9.0`.\n- If the PR is retargeted during follow-through, re-check the target branch's `gradle.properties` and update any newly added `@since` tags when the debut version changes.\n- Do not add `@since` tags to internal-only APIs annotated with `@Internal` unless the repository already does so for that internal package.\n- Internal and package-private methods should include maintainer-focused Javadoc when the implementation contract, lifecycle, invariants, or generated-code interaction is not obvious from the signature.\n- Complex new code should include focused inline comments that explain implementation decisions or invariants; do not narrate straightforward control flow.\n\n### 5) Keep Gradle/build changes convention-aligned\n\n- Use `./gradlew` for all Gradle execution.\n- Use Gradle version catalogs (`gradle/libs.versions.toml`) instead of hard-coded dependency versions.\n- Use appropriate scopes (`api`, `implementation`, `compileOnly`, `runtimeOnly`) based on API exposure.\n- Do not add custom build logic directly in module build files when it belongs in convention plugins.\n- When uncertain about module paths, use `./gradlew projects` and prefer canonical `micronaut-*` project names.\n\n### 6) Verify before completion\n\nFirst confirm canonical verification tasks from `CONTRIBUTING.md` and existing CI/build files, then run the repository equivalents from root.\n\nCommon sequence in Micronaut repositories:\n\n```bash\n./gradlew :<module>:compileTestJava\n# If module includes Groovy tests:\n./gradlew :<module>:compileTestGroovy\n./gradlew :<module>:test --tests 'pkg.ClassTest'\n./gradlew :<module>:test\n# If repository documents cM alias/checkstyle aggregate task:\n./gradlew -q cM\n./gradlew -q spotlessCheck\n./gradlew check\n./gradlew docs\n```\n\nFor API-affecting changes, also run if configured in the repository:\n\n```bash\n./gradlew japiCmp\n```\n\nIf Spotless fails, run `./gradlew -q spotlessApply` and re-run `spotlessCheck`.\n\n## Guardrails\n\n- Do not introduce `javax.inject` usage.\n- Do not introduce legacy or third-party nullability annotations for new or modified Micronaut Java contracts when JSpecify is available, except for deliberate compatibility annotations whose impact has been checked.\n- Do not hard-code dependency versions in module build files.\n- Do not break public APIs without explicit major-version intent.\n- Do not skip tests or docs verification for code changes.\n- Do not use reflection as a convenience in framework internals.\n\n## Delivery Contract\n\nWhen finishing implementation work, report:\n\n1. Exactly which files changed and why.\n2. Whether the change is API-facing or internal-only.\n3. Semantic Versioning impact classification (patch/minor/major) for any public-facing change.\n4. For deprecate-and-add API evolution, which elements were deprecated and which replacement variants were introduced.\n5. For breaking public-facing changes, which user guide files were updated and what migration guidance was added.\n6. For new public Java APIs, the `@since` version used and how it was derived from the target branch's `gradle.properties`.\n7. Commands executed for verification and outcomes.\n8. Any follow-up risk (for example compatibility implications).\n\n## Validation Checklist\n\n- [ ] `SKILL.md` frontmatter is valid and `name` matches directory (`coding`).\n- [ ] Guidance is maintainer-focused (not end-user app guidance).\n- [ ] Java conventions include JSpecify nullability (`@NullMarked`, `@Nullable`), DI, and reflection-free guidance.\n- [ ] API boundary guidance includes `@Internal`, `@Experimental`, `@UsedByGeneratedCode`, and compatibility checks.\n- [ ] Public Java types and methods require Javadoc.\n- [ ] New public Java APIs require `@since` tags derived from the approved target branch's `gradle.properties`.\n- [ ] Internal/package-private methods and complex new code include maintainer-focused Javadoc or inline comments when implementation intent is not obvious.\n- [ ] For public API evolution without breaking changes, deprecations include clear replacement guidance and functional compatibility is preserved.\n- [ ] If breaking changes are allowed, user guide docs in `src/main/docs/guide` are updated with migration notes.\n- [ ] Verification includes tests, style checks, `check`, and `docs`.\n\n## References\n\n- `CONTRIBUTING.md`\n- `MAINTAINING.md`\n- `.agents/skills/gradle/SKILL.md`\n- `.agents/skills/docs/SKILL.md`\n- `.agents/skills/skill-creator/references/spec-checklist.md`\n",".agents/skills/micronaut-sourcegen/SKILL.md":"---\nname: micronaut-sourcegen\ndescription: Add, integrate, or review Micronaut Sourcegen usage in modules that generate Java source, Kotlin source, Groovy-compatible source, or bytecode from ObjectDef, TypeDef, MethodDef, ExpressionDef, StatementDef, and SourceGenerator APIs.\nlicense: Apache-2.0\ncompatibility: Micronaut framework and library modules that use io.micronaut.sourcegen for compile-time generation\nmetadata:\n  author: Denis Stepanov\n  version: \"1.0.0\"\n---\n\n# Micronaut Sourcegen\n\nUse this skill when a Micronaut module wants to generate types with Micronaut Sourcegen instead of handwritten source strings, reflection, JavaPoet/KotlinPoet calls in visitors, or ad hoc bytecode. The target module may emit Java source, Kotlin source, Groovy-compatible source, or bytecode, but the generation logic should model the type once with `io.micronaut.sourcegen.model`.\n\n## Goal\n\nHelp other modules adopt Micronaut Sourcegen safely: choose the right backend, wire the right processor dependencies, build language-neutral model definitions, and verify generated Java/Kotlin/bytecode behavior with targeted tests.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Use Micronaut Sourcegen in this module to generate a repository implementation.\"\n- \"Generate bytecode instead of Java source for this visitor.\"\n- \"Make this annotation processor generate Java and Kotlin outputs with Sourcegen.\"\n- \"Replace handwritten generated-source strings with `ClassDef` and `MethodDef`.\"\n- \"Add method bodies with switches, static calls, static field arguments, and constructor calls.\"\n\nShould not trigger:\n\n- \"Only edit user guide text.\"\n- \"Only change Gradle publishing metadata.\"\n- \"Only refactor backend writer internals without a module consuming Sourcegen.\"\n- \"Explain Micronaut annotation processing without generated types.\"\n\n## Procedure\n\n1. Identify the consuming module and generation target.\n2. Choose one backend for each compilation path.\n3. Wire dependencies using the repository version catalogs and processor configurations.\n4. Implement generation in a visitor with Sourcegen model builders and helpers.\n5. Emit through `SourceGenerator.write(...)` or bytecode writer APIs as appropriate.\n6. Add cross-target tests for the generated contract.\n7. Run focused compile/test/style verification.\n\n### 1) Identify the Consuming Module\n\n- Confirm whether the module is an annotation processor/generator module, an application/test-suite module consuming a generator, or a backend writer module.\n- Locate existing visitor registration under `META-INF/services/io.micronaut.inject.visitor.TypeElementVisitor`.\n- Identify source language paths:\n  - Java annotation processing uses `annotationProcessor`.\n  - Kotlin compilation usually uses `ksp`.\n  - Bytecode generation runs during Java-language processing and writes class files directly.\n- Inspect existing generated-type tests before changing behavior.\n\n### 2) Choose the Backend\n\n- Use `sourcegen-generator-java` when the module should emit `.java` source for `VisitorContext.Language.JAVA`; it also provides `GroovyPoetSourceGenerator` for `GROOVY`.\n- Use `sourcegen-generator-kotlin` when Kotlin/KSP processing should emit `.kt` source for `VisitorContext.Language.KOTLIN`.\n- Use `sourcegen-generator-bytecode` when Java-language processing should emit `.class` files directly through `ByteCodeGenerator`.\n- Do not put both Java-source and bytecode Sourcegen generators on the same Java annotation-processor path unless the module intentionally owns selection. Both advertise `VisitorContext.Language.JAVA`, and `SourceGenerators.findByLanguage(JAVA)` expects a single effective backend.\n- Use `sourcegen-bytecode-writer` directly only when implementing or testing bytecode writer behavior, not as the normal integration point for consuming annotation processors.\n\n### 3) Wire Dependencies\n\n- In a generator/processor module, depend on `sourcegen-generator` for the model and service lookup APIs. Add `sourcegen-annotations` only when the module consumes Sourcegen annotations such as builders/wither support.\n- In a Java consumer/test module, add the chosen backend and the custom generator to `annotationProcessor`.\n- In a Kotlin consumer/test module, add the Kotlin backend and KSP-compatible custom generator to `ksp`.\n- In a bytecode consumer/test module, add `sourcegen-generator-bytecode` to `annotationProcessor`.\n- Use Gradle version catalogs and existing project accessors. Do not hardcode dependency coordinates or versions.\n\nExample repository-local shapes:\n\n```kotlin\ndependencies {\n    implementation(projects.sourcegenGenerator)\n\n    annotationProcessor(projects.sourcegenGeneratorJava)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n```kotlin\ndependencies {\n    ksp(projects.sourcegenGeneratorKotlin)\n    ksp(projects.myCustomGeneratorsKotlin)\n}\n```\n\n```kotlin\ndependencies {\n    annotationProcessor(projects.sourcegenGeneratorBytecode)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n### 4) Build Models With Factories, Not Record Constructors\n\n- Always create Sourcegen model elements through builders, factory methods, or helper methods: `ClassDef.builder`, `InterfaceDef.builder`, `RecordDef.builder`, `EnumDef.builder`, `AnnotationObjectDef.builder`, `MethodDef.builder`, `MethodDef.constructor`, `FieldDef.builder`, `PropertyDef.builder`, `ParameterDef.builder`, `TypeDef.of`, `ClassTypeDef.of`, `TypeDef.parameterized`, `ExpressionDef.constant`, `StatementDef.multi`, `StatementDef.doTry`, `expr.returning`, `expr.invoke`, `type.invokeStatic`, `type.getStaticField`, and switch/if helper methods.\n- Do not instantiate DSL records directly in consuming modules, for example avoid `new ClassTypeDef.Parameterized(...)`, `new TypeDef.Array(...)`, `new ExpressionDef.Constant(...)`, `new StatementDef.Switch(...)`, or other `new ...record(...)` forms.\n- If a construct has no public helper yet, add or use a small named helper/factory at the nearest appropriate level instead of spreading direct record construction through module code.\n- Keep model construction language-neutral. Do not call JavaPoet, KotlinPoet, ASM, or write source strings from a visitor unless the task is explicitly inside a backend writer.\n\n### 5) Implement Visitors\n\n- Prefer `TypeElementVisitor` with `VisitorKind.ISOLATING` when generated output depends only on the visited element.\n- Resolve the backend through `SourceGenerators.findByLanguage(context.getLanguage()).orElse(null)` and return when none is available.\n- Build `ObjectDef` instances from Micronaut AST metadata (`ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`) when possible.\n- Emit with `sourceGenerator.write(objectDef, context, originatingElement)`.\n- Use `SourceGenerators.handleFatalException(...)` when generation may postpone to a later round.\n\nMinimal visitor shape:\n\n```java\nSourceGenerator sourceGenerator = SourceGenerators.findByLanguage(context.getLanguage()).orElse(null);\nif (sourceGenerator == null) {\n    return;\n}\n\nClassDef generated = ClassDef.builder(element.getPackageName() + \".Generated\")\n    .addModifiers(Modifier.PUBLIC, Modifier.FINAL)\n    .addMethod(MethodDef.builder(\"name\")\n        .addModifiers(Modifier.PUBLIC)\n        .returns(TypeDef.STRING)\n        .build((aThis, params) -> ExpressionDef.constant(\"generated\").returning()))\n    .build();\n\nsourceGenerator.write(generated, context, element);\n```\n\n### 6) Model Generated Behavior\n\n- Use `ClassDef`, `InterfaceDef`, `RecordDef`, `EnumDef`, and `AnnotationObjectDef` for generated type kind.\n- Use `TypeDef` and `ClassTypeDef` for primitives, arrays, generics, generated class names, nullability, and static field owners.\n- Use `MethodDef` body builders for executable logic. Prefer explicit `returns(...)` for public or non-trivial generated methods.\n- When generated code reads or writes a field that the same generator defines, keep the `FieldDef` instance and reference it with `aThis.field(fieldDef)` or `generatedType.getStaticField(fieldDef)` instead of repeating the field name and type.\n- When generated code invokes a method that the same generator defines, keep the `MethodDef` instance and invoke it with `receiver.invoke(methodDef, ...)` or `generatedType.invokeStatic(methodDef, ...)` instead of repeating the method name, parameter types, and return type.\n- When generated code targets an existing method or field that is accessible reflectively and present on the annotation processor classpath, prefer a reflective handle from `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)`. Pass method handles to `receiver.invoke(method, ...)` or `type.invokeStatic(method, ...)`; pass static field handles to `type.getStaticField(field)`; for instance fields, centralize the field-name/type bridge in a helper fed by the reflective `Field`. This uses reflection only at generation time to describe a known member; it must not generate runtime reflection.\n- Use `StatementDef.multi(...)`, `expr.returning()`, `expr.newLocal(...)`, `condition.doIf(...)`, `expr.asExpressionSwitch(...)`, `expr.asStatementSwitch(...)`, `StatementDef.doTry(...)`, and invocation helpers to compose bodies.\n- Use `ClassTypeDef.getStaticField(\"NAME\", valueType)` for enum constants, static constants, class literals, and static-field arguments passed to invocations.\n- String switches are supported. For string switch cases, use a `TypeDef.STRING` switch expression and `ExpressionDef.constant(\"case\")` keys with `asExpressionSwitch(...)` or `asStatementSwitch(...)`.\n\n### 7) Verify\n\n- Compile the generator module and the consuming test module.\n- Run targeted tests that load or compile generated types for each backend touched.\n- For Java source generation, verify generated `.java` behavior through Java test-suite tests.\n- For Kotlin source generation, verify KSP and Kotlin tests.\n- For bytecode generation, verify runtime behavior and bytecode writer tests when the model shape exercises bytecode-specific paths.\n- Finish source changes with the repository checks required by `AGENTS.md`: affected compile tasks, targeted tests, full affected module tests, `./gradlew -q cM`, and `./gradlew -q spotlessCheck` if new files were added.\n\n## Backend Notes\n\n- Java source backend: `JavaPoetSourceGenerator` writes Java source for `VisitorContext.Language.JAVA`.\n- Groovy-compatible source backend: `GroovyPoetSourceGenerator` reuses the Java source generator for `GROOVY`.\n- Kotlin source backend: `KotlinPoetSourceGenerator` writes Kotlin source for `VisitorContext.Language.KOTLIN`.\n- Bytecode backend: `ByteCodeGenerator` advertises `JAVA` and writes class files through `context.visitClass(...)`; it does not support `write(ObjectDef, Writer)`.\n\n## Cookbook\n\nUse `references/sourcegen-cookbook.md` for adoption patterns covering:\n\n- Gradle dependency placement for generator modules and consumers,\n- backend selection for Java, Kotlin, Groovy-compatible source, and bytecode,\n- type/model construction using builders and helper methods,\n- generated classes, interfaces, records, enums, annotations, method bodies, switches, invocations, static fields, arrays, lambdas, and super constructors,\n- testing and validation across source and bytecode backends.\n\n## Guardrails\n\n- Do not instantiate Sourcegen DSL records directly in consuming modules; use builders, factories, or named helper methods.\n- Do not duplicate generated member metadata in generated code bodies; prefer the existing `FieldDef` or `MethodDef` instance when reading/writing generated fields or invoking generated methods.\n- Do not use string-based references for known existing classpath methods/static fields when a `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)` handle can describe the member safely.\n- Do not generate source text with string concatenation when a Sourcegen model construct exists.\n- Do not place multiple `JAVA` Sourcegen backends on the same annotation-processor path unless selection is explicit and tested.\n- Do not use backend-specific JavaPoet/KotlinPoet/ASM APIs from normal visitors.\n- Do not use reflection for generation metadata when Micronaut AST elements are available.\n- Do not break public Sourcegen APIs without explicit approval and compatibility checks.\n\n## Validation Checklist\n\n- [ ] Skill folder name and `name:` frontmatter are `micronaut-sourcegen`.\n- [ ] Consuming module and target backend are identified.\n- [ ] Java/Kotlin/bytecode processor dependencies are scoped correctly.\n- [ ] Only one effective `JAVA` Sourcegen backend is present for a Java compilation path.\n- [ ] Model definitions use builders/factories/helpers, not direct DSL record constructors.\n- [ ] Generated fields/methods referenced from generated bodies are referenced through their `FieldDef`/`MethodDef` instances where available.\n- [ ] Generated sources/classes are emitted through `SourceGenerator.write(...)` or backend writer APIs where appropriate.\n- [ ] Targeted and full affected tests pass, or unrun checks are reported clearly.\n\n## References\n\n- `references/sourcegen-cookbook.md`\n",".agents/skills/skill-creator/references/spec-checklist.md":"# Agent Skills Spec Checklist\n\nUse this checklist when creating or modifying a skill to keep it compatible with the Agent Skills specification.\n\nPrimary source: https://agentskills.io/specification\n\n## MUST requirements\n\n1. Skill is a directory containing `SKILL.md`.\n2. `SKILL.md` starts with valid YAML frontmatter.\n3. Frontmatter includes required fields:\n   - `name`\n   - `description`\n4. `name` rules:\n   - 1-64 characters\n   - lowercase letters, numbers, hyphens only\n   - does not start/end with hyphen\n   - no consecutive hyphens\n   - matches parent directory name\n5. `description` rules:\n   - 1-1024 characters\n   - non-empty\n   - states what the skill does and when to use it\n6. Markdown body exists after frontmatter.\n\n## SHOULD guidance\n\n1. Keep `SKILL.md` under ~500 lines for efficient context usage.\n2. Use progressive disclosure:\n   - keep core instructions in `SKILL.md`\n   - move detailed material to `references/`\n3. Add `scripts/` only for deterministic or repeated work.\n4. Keep file references relative to skill root.\n5. Keep references shallow and easy to discover from `SKILL.md`.\n\n## Optional frontmatter fields\n\n- `license`\n- `compatibility`\n- `metadata`\n- `allowed-tools` (experimental; support varies by agent)\n\n## Portability rules\n\n1. Avoid vendor-specific instructions unless requested by the user.\n2. Avoid agent-specific path assumptions if portable paths are possible.\n3. Avoid relying on non-standard tools without fallback guidance.\n\n## Validation commands\n\nIf available:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nFor discovery checks in a workspace using skills CLI:\n\n```bash\nnpx skills list\n```\n",".agents/skills/skill-creator/references/research-synthesis.md":"# Research Synthesis\n\nThis note captures the design decisions used for `skill-creator`.\n\n## Sources\n\n- Agent Skills specification: https://agentskills.io/specification\n- Anthropic skill-creator reference:\n  https://github.com/anthropics/skills/tree/main/skills/skill-creator\n- OpenAI skill-creator reference:\n  https://github.com/openai/skills/tree/main/skills/.system/skill-creator\n- Skills CLI reference:\n  https://github.com/vercel-labs/skills\n\n## Shared patterns extracted\n\n1. Core process is iterative: scope, draft, test, refine.\n2. Trigger quality depends primarily on frontmatter description clarity.\n3. Progressive disclosure is essential for context efficiency.\n4. Optional resources should be added only when they reduce repeated work.\n\n## Vendor-specific elements intentionally avoided\n\n1. Model/provider-specific instructions and path assumptions.\n2. Dependence on platform-specific UI workflows.\n3. Tooling that only exists in one agent runtime.\n\n## Decisions in this skill\n\n1. Keep the main workflow in `SKILL.md` as a portable baseline.\n2. Move strict checklists and scaffolds into `references/` files.\n3. Include skills CLI validation guidance (`npx skills list`) and optional spec validator guidance (`skills-ref validate`).\n4. Keep language imperative and implementation-focused.\n",".agents/skills/skill-creator/references/templates.md":"# Universal Skill Templates\n\nUse these templates as starting points. Keep them concise and agent-agnostic.\n\n## 1) Minimal `SKILL.md` template\n\n```markdown\n---\nname: <skill-name>\ndescription: <what this skill does and when to use it>\nlicense: MIT\n---\n\n# <Skill Title>\n\n## Goal\n\n<one paragraph describing expected outcomes>\n\n## Procedure\n\n1. <step 1>\n2. <step 2>\n3. <step 3>\n\n## Inputs\n\n- <input 1>\n- <input 2>\n\n## Outputs\n\n- <output contract>\n\n## Edge cases\n\n- <edge case 1 and handling>\n- <edge case 2 and handling>\n\n## Validation\n\n- [ ] Frontmatter is valid YAML\n- [ ] Name matches folder\n- [ ] Description includes trigger contexts\n- [ ] Relative file references resolve\n```\n\n## 2) Expanded structure template\n\n```text\n<skill-name>/\n├── SKILL.md\n├── scripts/\n│   └── <script>.py\n├── references/\n│   ├── <domain>.md\n│   └── <schemas>.md\n└── assets/\n    └── <template-or-static-file>\n```\n\nUse this expanded layout only if those resources are truly needed.\n\n## 3) Trigger description pattern\n\nWrite descriptions that include both capability and activation cues.\n\nPattern:\n\n\"<Core capability>. Use when users ask to <intent 1>, <intent 2>, or <intent 3>, including phrasing such as <example cues>.\"\n\nExample:\n\n\"Generate release notes from Git history with categorized changes. Use when users ask to draft changelogs, summarize commits for releases, or prepare version notes from tags or commit ranges.\"\n\n## 4) Improvement loop template\n\nWhen improving an existing skill:\n\n1. Review current `SKILL.md` and user complaints.\n2. Capture 2-3 should-trigger and 2-3 should-not-trigger prompts.\n3. Revise `description` for better trigger clarity.\n4. Move long details from `SKILL.md` to `references/`.\n5. Re-validate against checklist in `references/spec-checklist.md`.\n","inject/AGENTS.md":"# `io.micronaut.inject` Class Map\n\nThis module is the runtime contract layer for Micronaut dependency injection. Most classes in `io.micronaut.inject` are small interfaces that generated bytecode implements; the heavier runtime bases that implement those contracts live mostly in `io.micronaut.context`.\n\nUse this file when changing `inject/src/main/java/io/micronaut/inject/**` to keep the generated-code model, bean lookup flow, and qualifier rules aligned.\n\n## Runtime Shape\n\nThe normal bean lifecycle is:\n\n1. Annotation processing writes a lightweight `BeanDefinitionReference` and a concrete `BeanDefinition`.\n2. `BeanContext` discovers references without loading user bean classes, checks `BeanContextConditional`, qualifiers, indexes, and replacement rules, then calls `BeanDefinitionReference.load(...)`.\n3. A loaded `BeanDefinition` describes the bean type, scope, constructor, injection points, executable methods, type arguments, metadata, and lifecycle hooks.\n4. If it is an `InstantiatableBeanDefinition`, the context creates the instance with a `BeanResolutionContext`.\n5. Generated definitions resolve constructor, method, field, `@Value`, `@Property`, provider, collection, stream, map, and registration dependencies through helper methods on `io.micronaut.context.AbstractInitializableBeanDefinition`.\n6. If implemented, `ValidatedBeanDefinition`, `InjectableBeanDefinition`, `InitializingBeanDefinition`, and `DisposableBeanDefinition` add argument validation, member injection, `@PostConstruct`, and `@PreDestroy` behavior.\n7. `ExecutableMethod` and `ExecutionHandle` expose reflection-free method calls for `@Executable`, AOP, event listeners, bean introspection methods, and processor startup work.\n\nGenerated classes are part of the API surface even when the supporting type is `@Internal`. Avoid changing method signatures, constructor shapes, visibility, or default method semantics unless the generated writers and compatibility impact are handled together.\n\n## Core Bean Model\n\n`BeanType<T>` is the common candidate abstraction. Both `BeanDefinitionReference<T>` and `BeanDefinition<T>` use it to expose the bean class, annotation metadata, exposed types, `@Primary`, optional bean name, candidate checks, and method-processing hint.\n\n`QualifiedBeanType<T>` extends `BeanType<T>` for anything that can expose a declared `Qualifier<T>`. It resolves qualifier annotations from target annotation metadata and is the bridge between static metadata and the runtime `io.micronaut.context.Qualifier` API.\n\n`BeanDefinitionReference<T>` is the soft-loading handle. It must answer whether the bean type is present, whether the bean is enabled, singleton, parallel, indexed, configuration-properties, proxy target, and how to load the real `BeanDefinition<T>`.\n\n`BeanDefinition<T>` is the full description used after loading. It extends `QualifiedBeanType`, `Named`, and `ArgumentCoercible`, and supplies scope, constructor, required components, injection points, lifecycle methods, executable methods, type arguments, default implementation, replacement metadata, and debug descriptions.\n\n`BeanContextConditional` is implemented by references, definitions, and configurations to decide whether something is enabled for a `BeanContext` and optional `BeanResolutionContext`.\n\n`BeanConfiguration` groups definitions by package and condition. `ConditionalBeanConfiguration` is the runtime record returned by `BeanConfiguration.of(...)` and `disabled(...)`; it deliberately rejects custom configurations for internal `io.micronaut.*` packages.\n\n`BeanIdentifier` is the stable instance key used by the context. `DefaultBeanIdentifier` is its internal string-backed implementation.\n\n`ArgumentBeanType<T>` adapts a core `Argument<T>` into a `BeanType<T>`, mainly so qualifier and candidate logic can operate on an argument-like requested type.\n\n## Bean Construction And Lifecycle\n\n`InstantiatableBeanDefinition<T>` marks definitions that can construct instances. It creates a `DefaultBeanResolutionContext` for convenience when only a `BeanContext` is supplied.\n\n`ParametrizedInstantiatableBeanDefinition<T>` is for definitions that need runtime-supplied `@Parameter` values. It finds required constructor arguments, validates/converts supplied values, and blocks no-argument instantiation.\n\n`InjectableBeanDefinition<T>` is for existing instances that need generated member injection after construction.\n\n`InitializingBeanDefinition<T>` invokes generated `@PostConstruct` hooks after dependency injection.\n\n`DisposableBeanDefinition<T>` invokes generated `@PreDestroy` hooks during shutdown.\n\n`ValidatedBeanDefinition<T>` delegates constructor/member/bean validation to `BeanDefinitionValidator` from the active context.\n\n`ReplacesDefinition<T>` represents `@Replaces` matching logic returned by `BeanDefinition.getReplacesDefinition()`.\n\n`DelegatingBeanDefinition<T>` decorates another definition by forwarding the full `BeanDefinition` surface. Use it when behavior must wrap a definition without copying its metadata model.\n\n## Injection Points\n\n`InjectionPoint<T>` is the base description of a place where the declaring bean needs a dependency. It exposes the declaring `BeanDefinition` and declared qualifier, and centralizes the `@Inject(required = false)` check.\n\n`CallableInjectionPoint<T>` adds an `Argument<?>[]` list for constructors and methods.\n\n`ConstructorInjectionPoint<T>` describes the constructor or factory method/field used to create a bean.\n\n`MethodInjectionPoint<B, T>` describes injected methods and lifecycle methods. It records the method name, arguments, declaring type, and whether it is post-construct or pre-destroy.\n\n`FieldInjectionPoint<B, T>` describes injected fields. Its `getField()` method is deprecated because resolving the `Field` initializes reflection metadata.\n\n`ArgumentInjectionPoint<B, T>` describes an argument inside an outer callable injection point and also acts as `ArgumentCoercible<T>`.\n\nGenerated `AbstractInitializableBeanDefinition` turns compact generated references into these injection point objects lazily and configures them with the `Environment` when needed.\n\n## Executable Methods\n\n`MethodReference<T, R>` is metadata for a method: declaring type, name, target `Method`, arguments, return type, and annotation metadata.\n\n`ExecutableMethod<T, R>` adds reflection-free invocation and source-like descriptions on top of `MethodReference`.\n\n`ExecutableMethodsDefinition<T>` is a generated collection of executable methods. `BeanDefinition` delegates method lookup and startup method processing to it.\n\n`DelegatingExecutableMethod<T, R>` wraps an executable method and forwards all method metadata and invocation.\n\n`BeanDefinitionMethodReference<T, R>` associates an executable method with the owning `BeanDefinition`. `DefaultBeanDefinitionMethodReference` is the package-private delegating implementation created by `BeanDefinitionMethodReference.of(...)`.\n\n`ExecutionHandle<T, R>` binds an executable method to a target instance and invokes without passing the instance as the first argument.\n\n`MethodExecutionHandle<T, R>` is an `ExecutionHandle` that also exposes the underlying `ExecutableMethod`.\n\n`UnsafeExecutionHandle<T, R>` is the internal variant that can invoke without argument validation.\n\n## AOP And Proxies\n\n`AdvisedBeanType<T>` is implemented by advised references and definitions to expose the intercepted target type for around or introduction advice.\n\n`ProxyBeanDefinition<T>` marks a bean definition as an AOP proxy and exposes the target definition type and target bean type.\n\n`io.micronaut.inject.proxy.InterceptedBean` marks generated proxy classes from the inject side.\n\n`io.micronaut.inject.proxy.InterceptedBeanProxy<T>` marks proxies that expose the intercepted target and optionally whether the target is already cached. It also implements the internal `Qualified<T>` hook so generated proxies can receive a bean qualifier.\n\nAOP proxy modes to keep distinct:\n\n| Mode | Target ownership | Generated marker | Main behavior |\n| --- | --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. For concrete classes it subclasses the target and calls `super` through generated bridge methods when proceeding. | `Intercepted` | Fast path for `@Around(proxyTarget = false)`. Intercepted methods run against `this`; no separate target bean is resolved. |\n| Proxy-target around proxy | The proxy and target bean are separate. The proxy bean definition points back to the target definition. | `ProxyBeanDefinition`, `InterceptedProxy` | Used for `@Around(proxyTarget = true)`, factory-produced around-advised beans, and interface cases that need a backing target. The proxy resolves the target through `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target proxy | Same as proxy-target, but target resolution is deferred until `interceptedTarget()` is needed. | `InterceptedProxy` | Stores a copied `BeanResolutionContext` and resolves the target on demand. With `cacheableLazyTarget`, the target is cached after the first lookup. |\n| Hotswap proxy-target proxy | Same as proxy-target, but the target reference is mutable. | `HotSwappableInterceptedProxy` | Stores the target behind a read/write lock and exposes `swap(...)` to replace it. |\n| Introduction proxy | There is no concrete target implementation for introduced methods. | `Introduced` | Generated proxy implements the advised interface/type and delegates behavior to introduction interceptors. Abstract/interface methods require an introduction interceptor or adapter. |\n| Runtime proxy | The generated bean definition asks a `RuntimeProxyCreator` to create the proxy object. | Runtime-specific proxy type | `DefaultRuntimeProxyDefinition` carries method metadata, interceptor data, target/proxy-target settings, and constructor values to the runtime proxy creator. |\n\n`@Around(proxyTarget = false)` is the normal class-subclass mode. `@Around(proxyTarget = true)` creates a proxy bean around a separate target bean, which changes lifecycle and destruction behavior because the context must find and destroy the target definition separately. Factory methods with around advice are forced into proxy-target mode because the factory owns creation of the original produced object. For factory-produced classes with constructor arguments, `proxyTargetMode` controls whether proxy generation fails, warns, or proceeds.\n\nMethod interception flow:\n\n1. The AOP writer records intercepted methods and interceptor binding metadata from class and method annotations.\n2. The generated proxy stores `ExecutableMethod[] $proxyMethods` and `Interceptor[][] $interceptors`.\n3. During proxy construction, `$proxyMethods` is filled from the generated executable-methods definition. In proxy-target mode, methods are looked up from the target `BeanDefinition` with `getRequiredMethod(...)`.\n4. The constructor resolves the applicable interceptor array for each method through `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`, using the preselected interceptor bean registrations injected into the proxy constructor.\n5. Each intercepted method override chooses the invocation target. Default around proxies pass `this`; proxy-target proxies pass the target field or call `interceptedTarget()` for lazy/hotswap cases.\n6. The override creates a `MethodInterceptorChain` with the method-specific interceptors, target, executable method, and argument values, then returns `proceed()`.\n7. In default around proxies, concrete methods get generated `$$access$$...` bridge methods so `proceed()` can call the original implementation via `super` without reflection. Introduction methods instead rely on introduction interceptors to provide the implementation.\n\n`io.micronaut.aop.beandefinition.ParameterizedInterceptedBeanDefinition<T>` is the AOP-side bridge for parametrized bean definitions with `@AroundConstruct`. It extends `ParametrizedInstantiatableBeanDefinition<T>` and adapts the normal `Map<String, Object>` argument path into a constructor interceptor chain: generated code resolves ordered construction values with `resolveInstantiationValues(...)`, the default map-based `doInstantiate(...)` starts `ConstructorInterceptorChain.instantiate(...)`, and the chain eventually calls the generated object-array `doInstantiate(...)` through `InterceptedParametrizedBeanConstructor`.\n\n`io.micronaut.aop.beandefinition.ParameterizedProxyBeanDefinition<T>` is the proxy-specific version of that bridge. Generated AOP proxy constructors append hidden parameters after the real constructor arguments: `BeanResolutionContext`, `BeanContext`, `Qualifier`, constructor interceptor registrations, and `InterceptorRegistry`. This interface extracts the pre-resolved constructor interceptors from the second-to-last constructor value and invokes `ConstructorInterceptorChain.instantiate(...)` with an additional proxy parameter count of `5`, so interceptors see only user constructor arguments while the final proxy constructor still receives its internal values.\n\n## Qualifiers\n\nUse `Qualifiers` as the factory entry point. It turns annotation metadata, names, type arguments, interceptor bindings, and composed qualifiers into `Qualifier<T>` instances.\n\nMost concrete qualifiers extend `FilteringQualifier<T>`, which implements the common `reduce`, `filter`, and `doesQualify` loops over `BeanType` and `QualifiedBeanType`.\n\nImportant qualifier implementations:\n\n| Class | Role |\n| --- | --- |\n| `AnyQualifier` | Matches every candidate and returns the first candidate for single lookup. |\n| `NoneQualifier` | Matches candidates with no declared qualifier. |\n| `PrimaryQualifier` | Matches `@Primary`, declared primary qualifiers, or primary-style candidate names. |\n| `NameQualifier` | Matches `@Named`, `NameResolver`, simple names, and generated name-plus-type conventions. |\n| `AnnotationQualifier` | Matches a runtime annotation instance. |\n| `AnnotationMetadataQualifier` | Matches annotation metadata, including binding and non-binding member rules. |\n| `AnnotationStereotypeQualifier` | Matches candidates by stereotype or repeatable stereotype container. |\n| `RepeatableAnnotationQualifier` | Matches repeatable qualifier annotation values. |\n| `CompositeQualifier` | Chains arbitrary qualifiers. |\n| `FilteringCompositeQualifier` | Chains only `FilteringQualifier` instances for faster direct matching. |\n| `TypeArgumentQualifier` | Matches candidate generic type arguments for a requested bean type. |\n| `ClosestTypeArgumentQualifier` | Narrows generic candidates to the closest assignable type argument match. |\n| `ExactTypeArgumentNameQualifier` | Matches a single generic argument by exact type name. |\n| `MatchArgumentQualifier` | Matches full nested `Argument` type parameters, including covariance and contravariance modes. |\n| `EachBeanQualifier` | Matches the origin bean definition for an `@EachBean` product. |\n| `TypeAnnotationQualifier` | Implements `@Type`-style filtering by exposed/assignable classes. |\n| `InterceptorBindingQualifier` | Matches interceptor beans against interceptor binding metadata. |\n| `QualifierUtils` | Shared package-private name, annotation, and declared-qualifier matching helpers. |\n| `Qualified` | Internal generated-code hook used to push a runtime qualifier into proxies/providers. |\n\nWhen changing qualifier behavior, check both `BeanType` candidates and `QualifiedBeanType` candidates. Many lookups first reduce references before loading definitions, so relying only on loaded `BeanDefinition` behavior can break startup and indexing paths.\n\n## Annotation Metadata\n\n`io.micronaut.inject.annotation` supplies the compile-time metadata implementation used by generated definitions and executable methods.\n\n`DefaultAnnotationMetadata` is the immutable runtime-oriented representation of declared annotations, all annotations, declared stereotypes, all stereotypes, and reverse stereotype indexes.\n\n`MutableAnnotationMetadata` is the build-time mutable variant used by processors and helper definitions before metadata is emitted or adapted.\n\n`AbstractAnnotationMetadata` supplies lazy synthesized annotation proxies and shared synthesis behavior.\n\n`AnnotationMetadataSupport` owns core annotation defaults, repeatable containers, annotation type registration, and proxy construction.\n\n`AnnotationMetadataReference` points to metadata by class name without unwrapping the target metadata. Generated code can use it as a stable metadata reference.\n\n`AnnotationMetadataHierarchy` composes metadata layers, especially factory-produced beans and AOP method/type metadata, while preserving declared-vs-inherited lookup behavior.\n\n`AbstractEnvironmentAnnotationMetadata`, `EnvironmentAnnotationMetadata`, `EnvironmentAnnotationValue`, `EnvironmentConvertibleValuesMap`, and `EnvironmentOptionalValuesMap` adapt annotation values to the active `Environment` and resolve placeholders lazily.\n\n`EvaluatedAnnotationMetadata`, `EvaluatedAnnotationValue`, `EvaluatedConvertibleValuesMap`, and `MappingAnnotationMetadataDelegate` adapt metadata with expression values that require a configured `BeanContext`, owning `BeanDefinition`, or method arguments.\n\n`AnnotationConvertersRegistrar` registers conversion from `AnnotationValue` objects to synthesized annotation instances.\n\n`AnnotatedElementValidator` is the compile-time validation hook for annotated elements.\n\n`AnnotationMetadataException` wraps metadata construction failures as `BeanContextException`.\n\n## Bean Introspection Helpers\n\n`io.micronaut.inject.beans` backs generated bean introspections, not dependency-injection definitions.\n\n`AbstractInitializableBeanIntrospection` is the generated-introspection base. It stores property, method, constructor, and annotation metadata and dispatches property/method access without reflection.\n\n`AbstractInitializableBeanIntrospectionAndReference` lets a generated introspection also serve as its own `BeanIntrospectionReference`.\n\n`AbstractEnumBeanIntrospectionAndReference` adds enum constant metadata support.\n\n`AbstractExecutableBeanMethod` adapts an introspection `BeanMethod` into an `ExecutableMethod`.\n\n`KotlinExecutableMethodUtils` recognizes Kotlin suspend functions whose continuation returns `Unit`.\n\n## Provider And Validation Helpers\n\n`io.micronaut.inject.provider.AbstractProviderDefinition` is both a `BeanDefinitionReference` and an `InstantiatableBeanDefinition` for provider-like injection points. It inspects the current `BeanResolutionContext` segment to determine the requested generic bean and qualifier.\n\n`JakartaProviderBeanDefinition` builds `jakarta.inject.Provider<T>` instances.\n\n`JavaxProviderBeanDefinition` builds legacy `javax.inject.Provider<T>` instances when that type is present.\n\n`BeanProviderDefinition` builds Micronaut `BeanProvider<T>` instances with lookup, iteration, streaming, qualifier composition, and definition access.\n\n`ProviderTypeInformationProvider` marks provider types as wrapper types for `Argument` type analysis.\n\n`io.micronaut.inject.validation.BeanDefinitionValidator` is the validation SPI used by `ValidatedBeanDefinition`.\n\n`io.micronaut.inject.validation.RequiresValidation` is an internal compile-time marker that generated definitions use to know validation is required.\n\n## Change Guidance\n\nKeep these contracts in sync with generated code in `inject-java`, `inject-groovy`, `inject-kotlin`, and the writers under annotation-processing modules. A default method change here can affect already-compiled generated definitions.\n\nPrefer adding new capability as default methods on interfaces only when old generated classes can keep working. If generated implementations must override a new method, update the relevant writers and tests together.\n\nAvoid reflection in new runtime paths. Existing deprecated reflection accessors are compatibility escape hatches and should not become part of new behavior.\n\nWhen a change touches bean selection, qualifiers, metadata, or lifecycle order, add focused tests that exercise lookup through `BeanContext`, not only direct unit calls on the helper class.\n","core-processor/AGENTS.md":"# `core-processor` Generation Guide\n\nThis module is the shared compile-time engine for Micronaut injection. Language-specific processors provide Micronaut AST elements; `core-processor` turns those elements and annotation metadata into generated bytecode models for bean definitions, executable methods, bean introspections, AOP proxies, expression classes, and configuration metadata.\n\nUse this file when changing `core-processor/src/main/java/**` so generated bytecode, runtime interfaces in `inject`, and annotation processing behavior stay aligned.\n\n## Mental Model\n\nThe normal compile-time path is:\n\n1. A language module such as `inject-java` supplies `ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`, and `ParameterElement` implementations.\n2. `TypeElementVisitor` implementations inspect and mutate annotation metadata. Examples include `ConfigurationMetadataWriterVisitor`, `ConfigurationReaderVisitor`, `ExecutableVisitor`, and `IntrospectedTypeElementVisitor`.\n3. `BeanDefinitionCreatorFactory` chooses the bean creation strategy for each `ClassElement`.\n4. Creator classes call `ElementBeanDefinitionBuilder` and `ElementProxyBuilder` APIs.\n5. Writers such as `BeanDefinitionWriter`, `ExecutableMethodsDefinitionWriter`, `BeanIntrospectionWriter`, `AopProxyWriter`, `RuntimeProxyBeanDefinitionWriter`, and `EvaluatedExpressionWriter` build `io.micronaut.sourcegen.model.ObjectDef` instances.\n6. The language processor writes bytecode through `ByteCodeWriterUtils` and registers service descriptors when an `OutputObjectDef` has a service type.\n\nDo not think of this module as producing Java source. Most writers build sourcegen AST objects such as `ClassDef`, `MethodDef`, `ExpressionDef`, `StatementDef`, and `TypeDef`; `ByteCodeWriterUtils` then emits bytecode with ASM.\n\n## AST Layer\n\n`io.micronaut.inject.ast` is a language-neutral AST over Java, Kotlin, and Groovy. It is the boundary between language-specific symbol APIs and shared generation logic.\n\nImportant AST types:\n\n| Type | Role |\n| --- | --- |\n| `Element` | Common annotated, named, documented, mutable metadata node. It can represent a class, method, field, parameter, package, enum constant, or property-like element. |\n| `ClassElement` | Type model with assignability, generics, optional/container helpers, constructors, bean properties, fields, methods, interfaces, super types, records, enums, arrays, and proxy detection. |\n| `MethodElement` | Method or constructor model. `getMethodAnnotationMetadata()` is method-only metadata; `getAnnotationMetadata()` may combine class and method metadata except for constructors. |\n| `ParameterElement` | Method or constructor argument model used for injection points, executable methods, constructor values, and Kotlin default detection. |\n| `FieldElement` | Field model used for field injection, factory field beans, and field-backed bean properties. |\n| `PropertyElement` | Synthesized bean property. Configuration readers process these first because the property is the user-facing binding unit. |\n| `KotlinParameterElement` | Marks a Kotlin parameter that has a default value. Writers use it to call Kotlin synthetic default constructors and methods. |\n| `ElementQuery` and `PropertyElementQuery` | The preferred way to select enclosed elements. Use queries instead of ad hoc scans when possible. |\n\nAST elements are often copied with modified metadata using `withAnnotationMetadata(...)`, `withParameters(...)`, or direct `annotate(...)` calls. This is intentional: visitors and creators add synthetic annotations such as `@Property`, `@ConfigurationReader`, interceptor bindings, validation markers, and `@Introspected` before code generation.\n\nBe careful with metadata layers. `AnnotationMetadataHierarchy` is frequently used to combine type metadata with method, factory, property, or parameter metadata while preserving declared-vs-inherited lookup rules. Generated code often stores an `AnnotationMetadataReference` back to a generated bean definition to avoid duplicating metadata.\n\n## Generated Output\n\nThe major generated artifacts are:\n\n| Writer | Generated class shape | Service descriptor |\n| --- | --- | --- |\n| `BeanDefinitionWriter` | `$Bean$Definition` classes extending `AbstractInitializableBeanDefinitionAndReference` unless a specialized super type is used. | `BeanDefinitionReference` |\n| `ExecutableMethodsDefinitionWriter` | `$Bean$Definition$Exec` classes extending `AbstractExecutableMethodsDefinition`. | None |\n| `BeanIntrospectionWriter` | `$Bean$Introspection` or `$fully_qualified_Bean$Introspection` classes extending `AbstractInitializableBeanIntrospectionAndReference` or enum equivalent. | `BeanIntrospectionReference` |\n| `AopProxyWriter` | A proxy type named from the target definition plus `$Intercepted`, and a proxy bean definition for that proxy type. | Proxy bean definition is a `BeanDefinitionReference` |\n| `RuntimeProxyBeanDefinitionWriter` | Runtime-proxy bean definition that calls a `RuntimeProxyCreator`. | `BeanDefinitionReference` |\n| `EvaluatedExpressionWriter` | Final expression class extending `AbstractEvaluatedExpression`. | None |\n\n`OutputObjectDef` couples an `ObjectDef`, optional service type, and originating elements. Writers should preserve originating elements so incremental compilation and generated service descriptors stay correct.\n\n## Bean Definition Selection\n\n`BeanDefinitionCreatorFactory` is the switchboard:\n\n- Classes with `ConfigurationReader` stereotypes go through `ConfigurationReaderBeanElementCreator`, or `IntroductionInterfaceBeanElementCreator` when the configuration reader is an interface.\n- `@Factory` classes go through `FactoryBeanElementCreator`.\n- Types with around advice go through `DeclaredBeanElementCreator` with an AOP proxy builder, except interceptor beans are excluded from around proxy detection.\n- Introduction advice goes through `AopIntroductionProxySupportedBeanElementCreator` or `IntroductionInterfaceBeanElementCreator`.\n- Ordinary declared beans go through `DeclaredBeanElementCreator`.\n- Interfaces without introduction/configuration behavior are ignored.\n\n`DeclaredBeanElementCreator` scans properties and members, then adds constructor, field, method, lifecycle, executable, validation, adapter, and AOP information to the builder.\n\nImportant declared-bean rules:\n\n- Injection methods are `@Inject` methods, plus configuration-specific extensions in `ConfigurationReaderBeanElementCreator`.\n- Field injection applies to non-static, non-final fields with `@Inject`, qualifier stereotypes, `@Value`, or `@Property`.\n- `@Executable` methods are emitted as executable methods if accessible by the generated definition or explicitly allowed.\n- AOP methods must not be final, private, or static. Class-level AOP applies to public/package-private methods; method-level advice can force proxy creation.\n- Methods marked with `RequiresValidation` are annotated with `io.micronaut.validation.Validated`, except configuration reader beans because configuration validation is handled by introspection.\n- `@Adapter` creates an introduction proxy for a SAM interface and also keeps the source method executable/interceptable as needed.\n\n## BeanDefinitionWriter\n\n`BeanDefinitionWriter` generates a compact runtime description and creation plan for one bean. It usually generates one class that is both a `BeanDefinitionReference` and a loaded `BeanDefinition`.\n\nThe generated definition contains:\n\n- Static annotation metadata, constructor references, injection method references, field references, annotation injection references, type arguments, executable methods, exposed types, replacement metadata, conditions, and `PrecalculatedInfo`.\n- `load()` returning a new definition instance.\n- `isEnabled(...)`, `isContextScope()`, `isProxiedBean()`, `isProxyTarget()`, `isParallel()`, `getIndexes()`, `getDefaultImplementation()`, and configuration/proxy target helpers when applicable.\n- `instantiate(...)` or `doInstantiate(...)` depending on whether construction is parametrized or intercepted.\n- `inject(...)` when fields, methods, or configuration builders need member injection.\n- `initialize(...)` and `dispose(...)` methods, or intercepted lifecycle variants, when lifecycle hooks exist.\n- Optional `$Exec` support for executable methods and startup method processors.\n- Optional evaluated expression classes and `@BuildTimeInit` registration.\n\nInstantiation is generated in three broad forms:\n\n- Normal beans override `instantiate(BeanResolutionContext, BeanContext)` and call the constructor/factory method/field.\n- Parametrized beans implement `ParametrizedInstantiatableBeanDefinition` and generate `doInstantiate(...)` so runtime-supplied `@Parameter` values can be resolved before construction.\n- Constructor-intercepted beans implement one of the `Intercepted...InstantiateBeanDefinition` interfaces and generate `resolveInstantiationValues(...)` plus `doInstantiate(...)` for the constructor interceptor chain.\n\n`PrecalculatedInfo` is important. It stores booleans for abstract, iterable, singleton, primary, configuration properties, container type, method preprocessing, and evaluated expressions. If a change affects these flags, check context candidate collection and startup behavior.\n\nFor configuration properties, `BeanDefinitionWriter` also:\n\n- Treats `@ConfigurationProperties`, `@EachProperty`, and `@EachBean` as configuration/iterable bean definitions.\n- Tracks nested configuration reader inner classes.\n- Skips storing some value injection point metadata when configured by `micronaut.inject.configuration-properties.omit-injection-points`.\n- In `inject(...)`, skips property injection when `containsProperties(...)` is false for a configuration bean.\n- Resolves `ConfigurationPath` directly as an injectable special type.\n\n## Executable Methods\n\n`ExecutableMethodsDefinitionWriter` generates the `$Exec` class used by `BeanDefinition.getExecutableMethods()` and AOP.\n\nEach executable method stores an `AbstractExecutableMethodsDefinition.MethodReference` with:\n\n- Declaring type.\n- Annotation metadata.\n- Method name.\n- Return `Argument`.\n- Argument array built from `methodElement.getSuspendParameters()`.\n- `isAbstract`.\n- `isSuspend`.\n\nDispatch is generated by `DispatchWriter`. It produces switch-based reflection-free calls when possible, reflective fallback when required, and bridge dispatch entries for intercepted proxy methods. Kotlin default methods use a specialized dispatch target and are not supported for reflection invocation.\n\nWhen a method is annotated `@Executable(processOnStartup = true)`, the writer marks `requiresMethodProcessing()` and the bean definition emits the indexes that startup processors must inspect.\n\n## Bean Introspection\n\n`IntrospectedTypeElementVisitor` handles `@Introspected` and writes `BeanIntrospectionReference` classes. It supports:\n\n- Direct class introspection.\n- `classes` and `classNames`.\n- Package scanning, but only when `includedAnnotations` limits the scan.\n- `targetPackage`.\n- Optional annotation metadata emission.\n- Indexed annotations.\n- Explicit `@Introspected.IntrospectionBuilder`.\n- Lombok builders after Lombok-generated methods appear in a later round.\n\n`BeanIntrospectionWriter` emits the actual introspection class. It stores:\n\n- Constructor metadata and constructor `Argument[]`.\n- `BeanPropertyRef[]` with read, write, and with/copy-constructor dispatch indexes.\n- `BeanMethodRef[]` for introspected executable methods.\n- Enum constant refs for enum introspections.\n- Indexed property lookup methods when `@Introspected(indexed = ...)` is used.\n- Dispatch methods for property get/set/with, bean methods, copy-constructor mutation, and construction.\n\nProperty mutation order matters:\n\n- A setter or writable field is used when present.\n- If a read-only property corresponds to a constructor argument, the property is still considered mutable through constructor reconstruction.\n- If no setter exists, the writer looks for a with-method using the configured `withPrefix`.\n- If neither exists, mutation dispatch throws `UnsupportedOperationException`.\n\nConstructor support:\n\n- A no-arg default constructor enables `instantiate()`.\n- A primary constructor enables `instantiateInternal(Object[])` and `isBuildable()`.\n- If every constructor parameter is a Kotlin default parameter, the writer also emits no-arg `instantiate()` by calling Kotlin defaults.\n\nConfiguration beans that need validation are annotated with `@Introspected` so validation can operate on introspection metadata rather than by adding validation advice to every configuration setter.\n\n## AOP Proxies\n\n`DefaultElementBeanDefinitionBuilderFactory` creates proxy builders. It rejects final classes for compile-time subclass proxying, forces factory-produced around-advised beans into proxy-target mode, and chooses `RuntimeProxyBeanDefinitionWriter` for `@RuntimeProxy` types or `AopProxyWriter` otherwise.\n\nProxy modes:\n\n| Mode | Target ownership | Main generated behavior |\n| --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. | Generated proxy subclasses the target when possible. Intercepted methods pass `this` to `MethodInterceptorChain`. Concrete original methods use generated `$$access$$...` bridge methods so `proceed()` can call `super`. |\n| Proxy-target around proxy | Proxy and target are separate beans. | The proxy bean definition implements `ProxyBeanDefinition` and points back to the target definition. The proxy resolves a target with `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target | Proxy target is separate and resolved on first use. | The proxy stores a copied `BeanResolutionContext`; `interceptedTarget()` resolves the target. With `cacheableLazyTarget`, it caches the target after first lookup. |\n| Hotswap proxy-target | Proxy target is separate and mutable. | The proxy implements `HotSwappableInterceptedProxy`, stores target behind read/write locks, and exposes `swap(...)`. |\n| Introduction proxy | No concrete target implementation is required. | Generated proxy implements the introduced interface/type. Abstract/interface methods are satisfied by introduction interceptors. |\n| Runtime proxy | Proxy object is produced by a runtime creator. | The bean definition builds a `DefaultRuntimeProxyDefinition` and invokes the configured `RuntimeProxyCreator`. |\n\n### Around vs Introduction\n\nAround advice decorates an implementation that already exists. Introduction advice supplies or routes an implementation for methods that may not exist on a concrete target.\n\nThe compile-time distinction starts with interceptor binding metadata:\n\n- `@Around` contributes `@InterceptorBinding(kind = AROUND)`.\n- `@Introduction` contributes `@InterceptorBinding(kind = INTRODUCTION)`.\n- `@AroundConstruct` contributes `@InterceptorBinding(kind = AROUND_CONSTRUCT)`.\n- `InterceptedMethodUtil.hasAroundStereotype(...)` and `hasIntroductionStereotype(...)` determine which creator path runs.\n- `InterceptedMethodUtil.resolveInterceptorBinding(metadata, kind)` extracts the binding values that become the proxy constructor's interceptor qualifier.\n\nAround proxy generation:\n\n- `DeclaredBeanElementCreator` creates a normal target bean definition and, when necessary, an around proxy builder.\n- A class-level around stereotype causes public/package-private methods to be considered for interception.\n- A method-level around stereotype can force proxy creation for a method even when the class is not already an AOP proxy.\n- Methods must be non-final, non-private, and non-static because generated compile-time proxies need an overridable method.\n- Default around proxies subclass the target and invoke original behavior through generated bridge methods.\n- Proxy-target around proxies keep a separate target definition and resolve the target through the context.\n\nIntroduction proxy generation:\n\n- `IntroductionInterfaceBeanElementCreator` handles interfaces with introduction advice or configuration-reader introduction advice.\n- `AopIntroductionProxySupportedBeanElementCreator` handles concrete classes that combine introduction behavior with possible around advice.\n- `DefaultElementBeanDefinitionBuilderFactory.introductionProxy(...)` builds a proxy definition that includes both around and introduction interceptor bindings.\n- Interface introduction processes abstract methods, property accessors, and non-abstract default methods only when those non-abstract methods declare around advice.\n- Concrete-class introduction reuses the introduction proxy builder as the bean definition builder; it does not keep a separate ordinary target definition for introduced behavior.\n- Introduction proxies implement `Introduced`. Around proxies implement `Intercepted`; proxy-target variants also implement `InterceptedProxy` or `HotSwappableInterceptedProxy`.\n\nRuntime chain differences:\n\n- Around method resolution calls `InterceptorChain.resolveAroundInterceptors(...)` and gets only `AROUND` interceptors.\n- Introduction method resolution calls `InterceptorChain.resolveIntroductionInterceptors(...)`, which resolves introduction interceptors and around interceptors, then concatenates around interceptors before introduction interceptors.\n- If an introduction method has no introduction interceptor and is not an adapter method, runtime resolution fails with an error because there is no implementation to invoke.\n- If the method is an adapter method, the runtime creates an internal `AdapterIntroduction` interceptor as the implementation fallback.\n\nMethod interception flow in `AopProxyWriter`:\n\n1. `addAroundMethod(...)` records the method and contributes interceptor binding metadata from method annotations.\n2. Concrete default-around methods get executable-method entries and bridge methods as needed.\n3. The proxy type gets `$proxyMethods` and `$interceptors` fields.\n4. The proxy constructor appends five hidden parameters after user constructor parameters: `BeanResolutionContext`, `BeanContext`, `Qualifier`, interceptor bean registrations list, and `InterceptorRegistry`.\n5. Constructor code initializes `$proxyMethods` from the executable-methods definition or target bean definition.\n6. Constructor code resolves each method's interceptors using `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`.\n7. Each intercepted method override chooses a target: `this` for default around, a target field for eager proxy-target, or `interceptedTarget()` for lazy/hotswap.\n8. The override creates a `MethodInterceptorChain` with method-specific interceptors, target, executable method, and arguments, then returns `proceed()`.\n\nConstructor interception:\n\n- `BeanDefinitionWriter` detects `AROUND_CONSTRUCT` bindings only for valid candidate definitions. For proxy-target beans, only the target definition should intercept construction; for default around proxies, the generated AOP implementation intercepts construction.\n- Non-parametrized constructor interception uses `InterceptedInstantiateBeanDefinition` or `ProxyInterceptedInstantiateBeanDefinition`.\n- Parametrized constructor interception uses `InterceptedParametrizedInstantiateBeanDefinition` or `ProxyInterceptedParametrizedInstantiateBeanDefinition`.\n- The proxy variants know that proxy constructors contain the five hidden parameters and keep them out of the user-visible constructor interception argument list.\n\nFactory-produced around-advised beans are always proxy-target beans because the factory method owns the real object creation. If the produced type has constructor arguments, `proxyTargetMode` controls handling:\n\n- `ERROR`: fail compilation.\n- `WARN`: allow construction, but warn.\n- `ALLOW`: allow construction silently.\n\nFor `WARN` and `ALLOW`, primitive constructor parameters are annotated with `@Value(false)` or `@Value(0)`, and reference parameters are marked nullable so proxy construction has placeholder values.\n\n### Adapters\n\n`@Adapter` creates a new bean definition that adapts a user method to a single-abstract-method interface.\n\nCompile-time adapter generation is in `DeclaredBeanElementCreator.visitAdaptedMethod(...)`:\n\n1. The source method must declare `@Adapter(TargetInterface.class)`.\n2. The target must be an interface.\n3. The target interface must have exactly one abstract method.\n4. Source and target parameter counts must match.\n5. Kotlin suspend source methods are rejected.\n6. Each source parameter generic type must be assignable to the matching target method generic type.\n7. Generic placeholders on the target interface are remapped from the source method parameter types.\n8. A synthetic adapter proxy class name is created from the declaring bean name, target interface simple name, source method name, and an index.\n9. The target interface `ClassElement` is annotated with internal `@Adapter` members:\n   - `adaptedBean`: source bean class.\n   - `adaptedMethod`: source method name.\n   - `adaptedArgumentTypes`: source argument types.\n   - `adaptedQualifier`: source bean `@Named` qualifier, when present.\n10. The target interface is annotated `@Indexed` for the adapted interface type.\n11. A merged metadata hierarchy of the source bean and adapted interface becomes the proxy metadata.\n12. `beanDefinitionBuilderFactory.introductionProxy(adapterProxyClassName, metadata, interfaceToAdapt)` creates an introduction proxy.\n13. `implementInterface(interfaceToAdapt)` adds the SAM methods to the generated proxy.\n\nAt runtime, adapter methods are implemented by `AdapterIntroduction`:\n\n- `DefaultInterceptorRegistry.resolveToNone(...)` returns an `AdapterIntroduction` when the method has `@Adapter` metadata and no introduction interceptor beans matched.\n- `AdapterIntroduction` reads the internal adapter metadata from the executable method.\n- It finds an `ExecutionHandle` for the original source bean and method, using `adaptedQualifier` when present.\n- Its `intercept(...)` method invokes the source execution handle with the intercepted SAM method arguments.\n\nAdapters are therefore introduction proxies, but they are special because the implementation interceptor is synthesized at runtime instead of being a user-defined `@InterceptorBean`.\n\n### Interceptor Binding Recognition\n\nInterceptor binding metadata is normalized at compile time before bean/proxy writers consume it.\n\n`InterceptorBindingMembers` remaps annotation values that have AOP stereotypes:\n\n- Applied annotations that are themselves `@Around`, `@Introduction`, `@AroundConstruct`, or `@InterceptorBinding` are left as direct AOP annotations.\n- User annotations meta-annotated with those stereotypes get an internal `@InterceptorBinding` value whose `value` member is the user annotation type.\n- The binding `kind` is set to `AROUND`, `INTRODUCTION`, or `AROUND_CONSTRUCT`.\n- If the stereotype uses `@InterceptorBinding(bindMembers = true)`, the remapper stores selected annotation member values under `InterceptorBindingQualifier.META_BINDING_VALUES`.\n- Members annotated with `@NonBinding` are removed from those binding values.\n- If the advice stereotype has `@Type(SomeInterceptor.class)`, the remapper copies that type to the binding as `interceptorType`. This preserves the old type-based interceptor selection path.\n\n`InterceptorBeanMapper` remaps `@InterceptorBean(...)` on interceptor beans:\n\n- `@InterceptorBean` is itself a bean stereotype and has default singleton scope.\n- Its `value` member names the advice annotations the interceptor supports.\n- The mapper converts each supported annotation into an internal `@InterceptorBinding` value.\n- Those values are stored in the internal interceptor-bindings container on the interceptor bean metadata.\n\nGenerated proxies use these normalized bindings in two places:\n\n- Proxy writers collect type-level, method-level, and constructor-level binding values using `InterceptedMethodUtil.resolveInterceptorBinding(...)`.\n- `AopProxyWriter` annotates the generated proxy constructor's hidden interceptor-registration-list parameter with `AnnotationUtil.ANN_INTERCEPTOR_BINDING_QUALIFIER` and the collected binding values.\n- `BeanDefinitionWriter.getQualifier(...)` sees that annotation on the constructor parameter and emits `Qualifiers.byInterceptorBinding(argument.getAnnotationMetadata())`.\n- The context uses `InterceptorBindingQualifier` to preselect candidate interceptor bean registrations for the proxy constructor argument.\n\n`InterceptorBindingQualifier` supports two matching modes:\n\n- Binding by annotation name and optional `$bindingValues`.\n- Binding by explicit `interceptorType`.\n\nThe constructor-injected list is intentionally a candidate set, not the final per-method chain. It narrows the list cheaply during bean construction; `DefaultInterceptorRegistry` performs the final method-specific selection.\n\n### Interceptor Beans And Runtime Resolution\n\n`InterceptorRegistryBean` is the built-in bean definition for `InterceptorRegistry`.\n\n- It is a hand-written `BeanDefinitionReference` and `InstantiatableBeanDefinition`.\n- It exposes `InterceptorRegistry` and `DefaultInterceptorRegistry`.\n- It is singleton, always present, and bootstrap-context compatible.\n- Its `instantiate(...)` method returns a new `DefaultInterceptorRegistry` for the active `BeanContext`.\n\nRuntime method interceptor resolution is handled by `DefaultInterceptorRegistry.resolveInterceptors(...)`:\n\n1. It reads the intercepted method annotation metadata.\n2. If no interceptor registrations were injected, it returns none for around advice, creates `AdapterIntroduction` for adapter introduction methods, or fails for other missing introduction implementations.\n3. It configures expression/environment-aware metadata before evaluating bindings.\n4. `AbstractInterceptorChain.resolveInterceptorValues(metadata, kind)` extracts the applicable `@InterceptorBinding` values for the requested kind.\n5. For `AnnotationMetadataHierarchy`, declared method-level bindings are preferred over parent/type bindings for non-repeatable annotations.\n6. Each candidate interceptor registration is checked by `selectInterceptor(...)`.\n7. Candidate registrations are sorted with `OrderUtil.ORDERED_COMPARATOR`.\n8. Method resolution keeps `MethodInterceptor` instances and generic `Interceptor` instances that are not constructor-only.\n9. Constructor resolution keeps `ConstructorInterceptor` instances and generic `Interceptor` instances that are not method-only.\n\n`DefaultInterceptorRegistry.selectInterceptor(...)` checks:\n\n- Constructor interceptor type arguments, when present, must be assignable from the intercepted declaring type.\n- If an intercept point binding carries `interceptorType`, the interceptor bean instance type can match directly.\n- Otherwise the interceptor bean definition must have its own interceptor binding metadata for the same kind.\n- Each interceptor binding declared on the interceptor must match an intercept point binding.\n- If binding member values are present, the `$bindingValues` metadata must match as well.\n\nThe runtime chain then executes through `MethodInterceptorChain` or `ConstructorInterceptorChain`:\n\n- `MethodInterceptorChain.proceed()` invokes interceptors in order until exhausted, then calls the generated `ExecutableMethod`.\n- Introduction methods normally reach an introduction interceptor instead of a concrete target method.\n- Adapter introduction interceptors invoke the original adapted source method.\n- Constructor chains use `BeanConstructor` metadata and eventually call the generated intercepted `doInstantiate(...)`.\n\n### Factory Methods And Proxies\n\n`@Factory` classes are processed by `FactoryBeanElementCreator`, which extends the ordinary declared-bean creator. The factory class is still a bean definition with its own constructor, injection points, lifecycle methods, executable methods, validation, and AOP behavior; each producer member creates an additional bean definition.\n\nProducer member discovery:\n\n- Factory methods are methods whose metadata declares bean-producing semantics, normally `@Bean` or a scope stereotype.\n- Factory fields are fields annotated as beans; inaccessible/private factory fields fail compilation.\n- Bean-producing property read elements are converted to a factory method when they have a getter, or to a factory field when the backing field is accessible.\n- Bean-producing property write elements are ignored as producers because the read side owns the produced value.\n- Producer methods can also remain executable or interceptable methods on the factory bean itself. After the produced bean definition is created, `FactoryBeanElementCreator` still visits the factory method as an AOP method when the factory is proxied, or as an executable method otherwise.\n\nProduced metadata is deliberately not just the method metadata:\n\n1. For non-primitive produced types, the processor merges the produced class metadata with the producing method/field/property metadata.\n2. If the producing element declares a scope or qualifier, scopes and qualifiers inherited from the produced type are removed unless the producing element also declares them.\n3. The producing element then receives a hierarchy of factory-class metadata plus produced metadata, but factory-class qualifiers are stripped when they are not present on the produced bean. This prevents a qualifier on the factory bean from accidentally qualifying every product.\n4. For produced types with `@EachProperty`, both the produced type and the producing element are annotated with a computed `@ConfigurationReader(prefix = ...)` so iterable configuration path generation works for factory products.\n\nThe generated produced bean definition is a separate `BeanDefinitionWriter`:\n\n- `DefaultElementBeanDefinitionBuilderFactory.factoryMethod(...)` creates a writer whose bean type is the generic return type and whose producer definition is a `MethodDefinition`.\n- `factoryField(...)` creates a writer whose bean type is the generic field type and whose producer definition is a `FieldDefinition`.\n- Factory method definition names include a unique index so overloaded producer methods do not collide.\n- `BeanDefinitionWriter.resolveConstructorParameters()` treats factory method parameters like construction parameters and factory fields as zero-argument construction.\n- If any factory method parameter is annotated `@Parameter`, the produced definition becomes parametrized in the same way as a parametrized constructor bean.\n\nRuntime instantiation is generated by switching on the producer definition:\n\n- Constructor-produced beans call `initializeBean(...)`.\n- Field-produced beans call `buildFactoryFieldCall(...)`.\n- Method-produced beans call `buildFactoryMethodCall(...)`.\n- Static factory members are invoked with no factory bean instance.\n- Instance factory members first resolve the factory bean from the `BeanResolutionContext` using the factory type and factory qualifier, mark the resolution as factory-dependent, then invoke the method or read the field.\n- Inaccessible factory methods and fields use the generated reflection helper path; accessible static and instance members use direct sourcegen dispatch.\n\nFactory-produced AOP beans are special because the factory method or field owns creation of the real target object. A default subclass around proxy would create a proxy instance instead of using the factory product, so `DefaultElementBeanDefinitionBuilderFactory.aroundProxy(...)` forces `Interceptor.PROXY_TARGET = true` whenever the target writer's producer is not a constructor.\n\nFactory proxy generation rules:\n\n- The target produced bean definition remains the factory method/field definition.\n- The proxy bean definition is an additional definition that points back to the target definition as a proxy target.\n- Factory products use `visitSuperBeanDefinitionFactory(...)` rather than normal `visitSuperBeanDefinition(...)`; this marks the proxy definition as being backed by a factory target without subclassing the target bean definition class.\n- Runtime proxy products follow the same factory-target rule, but use `RuntimeProxyBeanDefinitionWriter` instead of `AopProxyWriter`.\n- The proxy scans the produced type for public, non-final, non-static methods, then also scans synthetic bean property read/write methods. This is necessary because the producing factory method does not declare the methods that will be intercepted on the product.\n- Factory-produced arrays and primitive beans cannot receive AOP advice, and the original produced class must not be final.\n\nFactory products with constructor arguments need an extra compile-time decision. Even though the real target comes from the factory, a compile-time subclass proxy still has to call a superclass constructor. `@Around(proxyTargetMode = ...)` controls this:\n\n- `ERROR` is the default and fails when the produced non-interface type has a primary constructor with parameters.\n- `WARN` allows proxy construction and emits a warning.\n- `ALLOW` allows proxy construction silently.\n\nFor `WARN` and `ALLOW`, `FactoryBeanElementCreator.allowProxyConstruction(...)` mutates the produced type constructor parameters so the proxy can be instantiated with placeholders: primitive parameters get synthetic `@Value(false)` or `@Value(0)`, reference parameters are marked nullable, and non-null metadata is removed. These placeholder values are for the proxy superclass constructor, not for creating the real factory target.\n\nConstructor interception for factory products follows the proxy-target split:\n\n- A factory method counts as a factory/proxy-target construction path in `BeanDefinitionWriter.isInterceptedLifeCycleByType(...)`.\n- `@AroundConstruct` on a factory-produced around bean should wrap the target construction path, which is the generated factory method invocation path.\n- The generated proxy's hidden constructor contains AOP infrastructure arguments and is not the user construction point.\n- The intercepted instantiate interfaces used for proxy definitions keep proxy infrastructure parameters separate from the user-visible constructor/factory arguments.\n\nOther factory product features:\n\n- `@Executable` on produced metadata registers all produced type methods as executable methods, except for arrays and primitives.\n- `@Bean(preDestroy = \"...\")` resolves an accessible no-argument destroy method on the produced type and emits a pre-destroy hook.\n- Produced `@EachProperty` and `@EachBean` definitions stay iterable definitions; the factory method parameters can still be filled from `@Parameter` values when the runtime creates each delegate.\n\n## Evaluated Expressions\n\nEvaluated expressions are annotation values represented by `EvaluatedExpressionReference`. They can appear in direct and nested annotation values.\n\nThe generation flow is:\n\n1. Writers call `EvaluatedExpressionProcessor.processEvaluatedExpressions(...)` for class, constructor, method, parameter, field, property, and introspection metadata.\n2. `EvaluatedExpressionsUtils.findEvaluatedExpressionReferences(...)` scans annotation and stereotype metadata, including nested annotation values.\n3. `DefaultExpressionCompilationContextFactory` builds an expression context. It includes shared registered context types, annotation-level `@AnnotationExpressionContext`, annotation member contexts, method parameters when compiling method expressions, and optional `this`.\n4. `EvaluatedExpressionWriter` generates a final class extending `AbstractEvaluatedExpression`.\n5. The generated `doEvaluate(ExpressionEvaluationContext)` parses the original annotation value with `CompoundEvaluatedExpressionParser` and compiles it into sourcegen statements.\n6. The owning generated definition/introspection is annotated with `@BuildTimeInit` listing expression class names.\n\nExpression classes are deduplicated by generated class name in `EvaluatedExpressionProcessor`. `BeanDefinitionWriter.finish()` resets expression and metadata processor caches after a processing run.\n\n## Configuration Metadata And Paths\n\nConfiguration path calculation is split across compile-time and runtime.\n\nCompile-time path helpers:\n\n- `ConfigurationUtils.getTypePath(...)` reads `ConfigurationReader.PREFIX`, `BASE_PREFIX`, supertype prefixes, and enclosing configuration reader prefixes. It caches the computed prefix by annotating `ConfigurationReader.PREFIX_CALCULATED`.\n- `ConfigurationUtils` appends `.*` for map-style `@EachProperty` and `[*]` for list-style `@EachProperty`.\n- `ConfigurationMetadataBuilder.calculatePath(...)` creates property paths. Nested configuration reader property types use their own reader path; ordinary properties use owner/declaring type path plus the property name, then hyphenation.\n- `ConfigurationMetadataWriterVisitor` writes IDE metadata through `ConfigurationMetadataWriter` implementations at `finish(...)`.\n\nRuntime path helpers:\n\n- `ConfigurationPath` models a stack of configuration reader and `EachProperty` segments.\n- `DefaultApplicationContext.collectIterableBeans(...)` expands iterable definitions into `BeanDefinitionDelegate` instances.\n- `BeanDefinitionDelegate` temporarily pushes its `ConfigurationPath` into the active `BeanResolutionContext` during `instantiate(...)` and `inject(...)`.\n- Property placeholders and generated `@Property` names can be resolved against the current dynamic path.\n\n## `@ConfigurationProperties`\n\n`@ConfigurationProperties` is meta-annotated with `@ConfigurationReader`, so it enters the configuration reader path.\n\nFor classes and records:\n\n1. `ConfigurationMetadataWriterVisitor` visits the class, computes and writes the reader prefix, and records configuration metadata.\n2. If the class has validation markers, it adds `@Introspected` so validation can use bean introspection.\n3. For records and `@ConfigurationInject` constructors/methods, constructor or method parameters that are property-like get synthetic `@Property(name = ...)` annotations.\n4. For writable bean properties, the visitor records property metadata and annotates setters with `@Property(name = ...)`.\n5. `ConfigurationReaderBeanElementCreator` processes bean properties rather than hidden fields/methods first.\n6. Writable properties become generated value injection points using `@Property(name = calculatedPath)`.\n7. `@ConfigurationBuilder` properties or fields become builder injection commands instead of normal property injection.\n8. Read methods annotated `@Executable` are still emitted as executable methods.\n9. `BeanDefinitionWriter.inject(...)` only performs property injection if the environment contains matching properties for the configuration bean.\n\nFor interfaces:\n\n1. `ConfigurationMetadataWriterVisitor` annotates the interface with `io.micronaut.runtime.context.env.ConfigurationAdvice`.\n2. `BeanDefinitionCreatorFactory` routes it through introduction proxy generation.\n3. Getter methods are validated as configuration accessors.\n4. Getter methods returning property-like values are annotated with `@Property`.\n5. Getter methods returning bean/configuration-like values are marked as bean access through `ConfigurationAdvice`.\n6. Runtime `ConfigurationIntroductionAdvice` resolves values using the active `ConfigurationPath` and the environment.\n\nDo not add validation AOP to configuration setters as a substitute for introspection validation. The creator intentionally suppresses method validation interception for configuration readers.\n\n## `@EachProperty`\n\n`@EachProperty` is both a `ConfigurationReader` and an iterable bean definition.\n\nCompile-time behavior:\n\n- `ConfigurationUtils.computeIterablePrefix(...)` appends `.*` by default or `[*]` when `list = true`.\n- The computed prefix is stored as `ConfigurationReader.PREFIX`.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachProperty` stereotype.\n- Factory-produced bean types with `@EachProperty` are explicitly annotated with the computed `ConfigurationReader` prefix on both the produced type and producing element.\n- Properties inside an `EachProperty` bean are still generated as normal configuration reader property injection points, but the property paths contain dynamic segments.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` sees the bean definition is iterable and calls `transformEachPropertyBeanDefinition(...)`.\n2. The context creates or reuses a `ConfigurationPath`.\n3. It pushes an `EachProperty` root segment for the definition.\n4. `ConfigurationPath.traverseResolvableSegments(environment, callback)` finds map keys or list indexes present in the environment.\n5. For each resolvable segment, the context creates a `BeanDefinitionDelegate` with a qualifier from `path.beanQualifier()` or `PrimaryQualifier`.\n6. The delegate sets the path during construction and injection, so generated `@Property` values resolve against the current segment.\n7. `@Parameter` constructor arguments can receive the current map key/name, enum value, list index, or matching nested configuration bean through `BeanDefinitionDelegate.getParametersValues(...)`.\n\nPrimary selection for `@EachProperty` comes from the current `ConfigurationPath` segment. `BeanDefinitionDelegate.isPrimary()` returns true when the path segment name matches the configured primary name.\n\nNested `@ConfigurationProperties` inside `@EachProperty` are handled by pushing additional configuration reader segments onto the same path. Direct resolution of a nested dynamic configuration reader may rebuild the path by finding the enclosing delegate.\n\n## `@EachBean`\n\n`@EachBean` is an iterable bean definition driven by another bean type rather than by environment keys.\n\nCompile-time behavior:\n\n- The annotation remains metadata on the bean definition; the processor does not generate one class per origin bean.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachBean` stereotype.\n- Constructor parameters annotated `@Parameter` make the generated definition parametrized when the value must be supplied at runtime.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` calls `transformEachBeanBeanDefinition(...)`.\n2. The annotation's required value is the dependent/origin bean type.\n3. The context finds candidate bean definitions for that origin type.\n4. For each origin candidate, the context creates a `BeanDefinitionDelegate` of the `@EachBean` definition.\n5. If the origin is already a configuration delegate, its `ConfigurationPath` is reused. This is what connects `@EachBean(ExampleConfiguration)` to `@EachProperty` entries.\n6. Otherwise the delegate qualifier is the origin's declared qualifier, `PrimaryQualifier` for primary origins, or an internal `EachBeanQualifier` that matches the exact origin `BeanDefinition`.\n7. `remapGenerics` metadata can remap type arguments from the origin bean into the created delegate.\n8. The delegate carries the origin definition for ordering and type argument behavior.\n9. During instantiation, `BeanDefinitionDelegate.getParametersValues(...)` fills `@Parameter` arguments from the current qualifier, path, origin bean, or matching bean lookup.\n\n`EachBeanQualifier` is an internal identity qualifier. It lets unqualified origin beans still drive distinct `@EachBean` delegates, but user-visible names are only available when the origin has a named/primary qualifier or when the origin came from a configuration path.\n\nIf a required `@EachBean` constructor parameter cannot be supplied, `ParametrizedInstantiatableBeanDefinition.resolveParameterizedArgumentValues(...)` treats the missing origin-type argument as a disabled bean rather than a normal missing argument.\n\n## Kotlin-Specific Generation\n\nKotlin support is mostly expressed through AST flags, not by checking Kotlin compiler symbols directly in this module.\n\nKey rules:\n\n- `MethodElement.isSuspend()` marks Kotlin suspend functions.\n- `MethodElement.getSuspendParameters()` includes the synthetic continuation parameter. Writers use this when building `Argument[]`, executable method references, AOP method lookups, dispatch methods, and lifecycle/injection method definitions.\n- `ExecutableMethodsDefinitionWriter` stores `isSuspend` on method references.\n- AOP interception returns `Object` for suspend methods and passes the continuation through the normal argument array. Runtime AOP adapts suspend calls through the Kotlin intercepted-method utilities in the AOP runtime.\n- `KotlinParameterElement.hasDefault()` marks constructor or method parameters with Kotlin defaults.\n\nKotlin default constructor calls:\n\n- `MethodGenUtils.invokeBeanConstructor(...)` detects default parameters and calls the Kotlin synthetic constructor with original parameters, one or more integer default masks, and a final `kotlin.jvm.internal.DefaultConstructorMarker` argument.\n- A mask bit means Kotlin should use the default value for that parameter.\n- For constructor injection, the writer computes per-argument \"has value\" expressions. For `@Property` parameters, the expression checks whether the property is present in the environment; for bean parameters, it checks non-null.\n- Primitive values cannot use null as the missing sentinel, so default primitive placeholders are `false` or numeric zero.\n- `BeanDefinitionWriter.initializeBean(...)` only does this direct Kotlin-default constructor path for non-proxy definitions. Proxies handle their own super constructor calls.\n\nKotlin default method calls:\n\n- `DispatchWriter` uses `KotlinMethodWithDefaultsDispatchTarget` when any suspend/normal parameter is a `KotlinParameterElement` with a default.\n- The dispatch target calls `MethodGenUtils.invokeKotlinDefaultMethod(...)`, which invokes the static `$default` method with target, parameters, masks, and a null marker.\n- Kotlin default methods are rejected for reflection dispatch because the default-mask call shape is not a normal reflective method invocation.\n\nOther Kotlin-specific behavior:\n\n- `BeanIntrospectionWriter` emits no-arg `instantiate()` for a constructor when all parameters are Kotlin defaults.\n- `ExecutableVisitor` does not warn for `@Nullable` primitive parameters when the parameter is a Kotlin default parameter.\n- `AopProxyWriter.invokeSuperConstructor(...)` allows Kotlin defaults when calling the proxied superclass constructor.\n- Factory-produced proxy construction in `WARN` or `ALLOW` mode annotates primitive placeholders with `@Value` and reference placeholders as nullable, which also helps Kotlin proxy construction.\n\n## Configuration Builders\n\n`@ConfigurationBuilder` is handled in both metadata and injection generation.\n\n`ConfigurationMetadataWriterVisitor` records a configuration group for the builder type and records each builder method as property metadata. `ConfigurationReaderBeanElementCreator` turns the builder property or field into `InjectFieldConfigurationBuilder` or `InjectMethodConfigurationBuilder` commands.\n\nGenerated injection creates or accesses the builder, then invokes generated builder method statements. A zero-argument builder method can be represented by a boolean property injection point; one-argument builder methods receive the resolved property value.\n\nDo not treat builder properties like normal writable configuration bean properties. Excludes and includes do not suppress builders in the same way, and inaccessible builder fields require a non-private getter.\n\n## Change Guidance\n\nMost source changes here affect generated bytecode contracts. When changing a writer, also inspect the runtime interfaces and bases in `inject/src/main/java/io/micronaut/inject/**` and `inject/src/main/java/io/micronaut/context/**`.\n\nUseful checks after source changes usually include:\n\n- `./gradlew -q :micronaut-core-processor:compileJava`\n- `./gradlew -q :micronaut-inject-java:compileTestJava :micronaut-inject-java:compileTestGroovy`\n- Targeted tests in `inject-java`, `inject-groovy`, or `inject-kotlin` that compile sample beans.\n- AOP changes should include around, around-construct, proxy-target, introduction, and Kotlin tests when applicable.\n- Configuration changes should include `@ConfigurationProperties`, interface configuration, nested configuration, `@EachProperty` map/list, and `@EachBean` tests.\n\nFor markdown-only edits in this file, `git diff --cached --check` and `./gradlew -q spotlessCheck` are enough.\n",".agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md":"# References Skill\n\nPath: `.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md)",".agents/skills/guides/references/guide-authoring-conventions.md":"# References Skill\n\nPath: `.agents/skills/guides/references/guide-authoring-conventions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-authoring-conventions.md)",".agents/skills/guides/references/guide-inventory.md":"# References Skill\n\nPath: `.agents/skills/guides/references/guide-inventory.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-inventory.md)",".agents/skills/guides/references/pdf-export-and-pr.md":"# References Skill\n\nPath: `.agents/skills/guides/references/pdf-export-and-pr.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/pdf-export-and-pr.md)",".agents/skills/guides/references/repository-workflow.md":"# References Skill\n\nPath: `.agents/skills/guides/references/repository-workflow.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/repository-workflow.md)",".agents/skills/gradle/references/gradle-best-practices.md":"# References Skill\n\nPath: `.agents/skills/gradle/references/gradle-best-practices.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/gradle-best-practices.md)",".agents/skills/gradle/references/micronaut-build-plugins.md":"# References Skill\n\nPath: `.agents/skills/gradle/references/micronaut-build-plugins.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/micronaut-build-plugins.md)",".agents/skills/docs/references/control-panel-patterns.md":"# References Skill\n\nPath: `.agents/skills/docs/references/control-panel-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/control-panel-patterns.md)",".agents/skills/docs/references/micronaut-docs-providers.md":"# References Skill\n\nPath: `.agents/skills/docs/references/micronaut-docs-providers.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/micronaut-docs-providers.md)",".agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md":"# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md)",".agents/skills/agent-md-refactor/references/refactor-playbook.md":"# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/refactor-playbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/refactor-playbook.md)"},"items":[{"name":"AGENTS.md","path":"core-processor/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/core-processor/AGENTS.md","title":"core-processor - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# `core-processor` Generation Guide\n\nThis module is the shared compile-time engine for Micronaut injection. Language-specific processors provide Micronaut AST elements; `core-processor` turns those elements and annotation metadata into generated bytecode models for bean definitions, executable methods, bean introspections, AOP proxies, expression classes, and configuration metadata.\n\nUse this file when changing `core-processor/src/main/java/**` so generated bytecode, runtime interfaces in `inject`, and annotation processing behavior stay aligned.\n\n## Mental Model\n\nThe normal compile-time path is:\n\n1. A language module such as `inject-java` supplies `ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`, and `ParameterElement` implementations.\n2. `TypeElementVisitor` implementations inspect and mutate annotation metadata. Examples include `ConfigurationMetadataWriterVisitor`, `ConfigurationReaderVisitor`, `ExecutableVisitor`, and `IntrospectedTypeElementVisitor`.\n3. `BeanDefinitionCreatorFactory` chooses the bean creation strategy for each `ClassElement`.\n4. Creator classes call `ElementBeanDefinitionBuilder` and `ElementProxyBuilder` APIs.\n5. Writers such as `BeanDefinitionWriter`, `ExecutableMethodsDefinitionWriter`, `BeanIntrospectionWriter`, `AopProxyWriter`, `RuntimeProxyBeanDefinitionWriter`, and `EvaluatedExpressionWriter` build `io.micronaut.sourcegen.model.ObjectDef` instances.\n6. The language processor writes bytecode through `ByteCodeWriterUtils` and registers service descriptors when an `OutputObjectDef` has a service type.\n\nDo not think of this module as producing Java source. Most writers build sourcegen AST objects such as `ClassDef`, `MethodDef`, `ExpressionDef`, `StatementDef`, and `TypeDef`; `ByteCodeWriterUtils` then emits bytecode with ASM.\n\n## AST Layer\n\n`io.micronaut.inject.ast` is a language-neutral AST over Java, Kotlin, and Groovy. It is the boundary between language-specific symbol APIs and shared generation logic.\n\nImportant AST types:\n\n| Type | Role |\n| --- | --- |\n| `Element` | Common annotated, named, documented, mutable metadata node. It can represent a class, method, field, parameter, package, enum constant, or property-like element. |\n| `ClassElement` | Type model with assignability, generics, optional/container helpers, constructors, bean properties, fields, methods, interfaces, super types, records, enums, arrays, and proxy detection. |\n| `MethodElement` | Method or constructor model. `getMethodAnnotationMetadata()` is method-only metadata; `getAnnotationMetadata()` may combine class and method metadata except for constructors. |\n| `ParameterElement` | Method or constructor argument model used for injection points, executable methods, constructor values, and Kotlin default detection. |\n| `FieldElement` | Field model used for field injection, factory field beans, and field-backed bean properties. |\n| `PropertyElement` | Synthesized bean property. Configuration readers process these first because the property is the user-facing binding unit. |\n| `KotlinParameterElement` | Marks a Kotlin parameter that has a default value. Writers use it to call Kotlin synthetic default constructors and methods. |\n| `ElementQuery` and `PropertyElementQuery` | The preferred way to select enclosed elements. Use queries instead of ad hoc scans when possible. |\n\nAST elements are often copied with modified metadata using `withAnnotationMetadata(...)`, `withParameters(...)`, or direct `annotate(...)` calls. This is intentional: visitors and creators add synthetic annotations such as `@Property`, `@ConfigurationReader`, interceptor bindings, validation markers, and `@Introspected` before code generation.\n\nBe careful with metadata layers. `AnnotationMetadataHierarchy` is frequently used to combine type metadata with method, factory, property, or parameter metadata while preserving declared-vs-inherited lookup rules. Generated code often stores an `AnnotationMetadataReference` back to a generated bean definition to avoid duplicating metadata.\n\n## Generated Output\n\nThe major generated artifacts are:\n\n| Writer | Generated class shape | Service descriptor |\n| --- | --- | --- |\n| `BeanDefinitionWriter` | `$Bean$Definition` classes extending `AbstractInitializableBeanDefinitionAndReference` unless a specialized super type is used. | `BeanDefinitionReference` |\n| `ExecutableMethodsDefinitionWriter` | `$Bean$Definition$Exec` classes extending `AbstractExecutableMethodsDefinition`. | None |\n| `BeanIntrospectionWriter` | `$Bean$Introspection` or `$fully_qualified_Bean$Introspection` classes extending `AbstractInitializableBeanIntrospectionAndReference` or enum equivalent. | `BeanIntrospectionReference` |\n| `AopProxyWriter` | A proxy type named from the target definition plus `$Intercepted`, and a proxy bean definition for that proxy type. | Proxy bean definition is a `BeanDefinitionReference` |\n| `RuntimeProxyBeanDefinitionWriter` | Runtime-proxy bean definition that calls a `RuntimeProxyCreator`. | `BeanDefinitionReference` |\n| `EvaluatedExpressionWriter` | Final expression class extending `AbstractEvaluatedExpression`. | None |\n\n`OutputObjectDef` couples an `ObjectDef`, optional service type, and originating elements. Writers should preserve originating elements so incremental compilation and generated service descriptors stay correct.\n\n## Bean Definition Selection\n\n`BeanDefinitionCreatorFactory` is the switchboard:\n\n- Classes with `ConfigurationReader` stereotypes go through `ConfigurationReaderBeanElementCreator`, or `IntroductionInterfaceBeanElementCreator` when the configuration reader is an interface.\n- `@Factory` classes go through `FactoryBeanElementCreator`.\n- Types with around advice go through `DeclaredBeanElementCreator` with an AOP proxy builder, except interceptor beans are excluded from around proxy detection.\n- Introduction advice goes through `AopIntroductionProxySupportedBeanElementCreator` or `IntroductionInterfaceBeanElementCreator`.\n- Ordinary declared beans go through `DeclaredBeanElementCreator`.\n- Interfaces without introduction/configuration behavior are ignored.\n\n`DeclaredBeanElementCreator` scans properties and members, then adds constructor, field, method, lifecycle, executable, validation, adapter, and AOP information to the builder.\n\nImportant declared-bean rules:\n\n- Injection methods are `@Inject` methods, plus configuration-specific extensions in `ConfigurationReaderBeanElementCreator`.\n- Field injection applies to non-static, non-final fields with `@Inject`, qualifier stereotypes, `@Value`, or `@Property`.\n- `@Executable` methods are emitted as executable methods if accessible by the generated definition or explicitly allowed.\n- AOP methods must not be final, private, or static. Class-level AOP applies to public/package-private methods; method-level advice can force proxy creation.\n- Methods marked with `RequiresValidation` are annotated with `io.micronaut.validation.Validated`, except configuration reader beans because configuration validation is handled by introspection.\n- `@Adapter` creates an introduction proxy for a SAM interface and also keeps the source method executable/interceptable as needed.\n\n## BeanDefinitionWriter\n\n`BeanDefinitionWriter` generates a compact runtime description and creation plan for one bean. It usually generates one class that is both a `BeanDefinitionReference` and a loaded `BeanDefinition`.\n\nThe generated definition contains:\n\n- Static annotation metadata, constructor references, injection method references, field references, annotation injection references, type arguments, executable methods, exposed types, replacement metadata, conditions, and `PrecalculatedInfo`.\n- `load()` returning a new definition instance.\n- `isEnabled(...)`, `isContextScope()`, `isProxiedBean()`, `isProxyTarget()`, `isParallel()`, `getIndexes()`, `getDefaultImplementation()`, and configuration/proxy target helpers when applicable.\n- `instantiate(...)` or `doInstantiate(...)` depending on whether construction is parametrized or intercepted.\n- `inject(...)` when fields, methods, or configuration builders need member injection.\n- `initialize(...)` and `dispose(...)` methods, or intercepted lifecycle variants, when lifecycle hooks exist.\n- Optional `$Exec` support for executable methods and startup method processors.\n- Optional evaluated expression classes and `@BuildTimeInit` registration.\n\nInstantiation is generated in three broad forms:\n\n- Normal beans override `instantiate(BeanResolutionContext, BeanContext)` and call the constructor/factory method/field.\n- Parametrized beans implement `ParametrizedInstantiatableBeanDefinition` and generate `doInstantiate(...)` so runtime-supplied `@Parameter` values can be resolved before construction.\n- Constructor-intercepted beans implement one of the `Intercepted...InstantiateBeanDefinition` interfaces and generate `resolveInstantiationValues(...)` plus `doInstantiate(...)` for the constructor interceptor chain.\n\n`PrecalculatedInfo` is important. It stores booleans for abstract, iterable, singleton, primary, configuration properties, container type, method preprocessing, and evaluated expressions. If a change affects these flags, check context candidate collection and startup behavior.\n\nFor configuration properties, `BeanDefinitionWriter` also:\n\n- Treats `@ConfigurationProperties`, `@EachProperty`, and `@EachBean` as configuration/iterable bean definitions.\n- Tracks nested configuration reader inner classes.\n- Skips storing some value injection point metadata when configured by `micronaut.inject.configuration-properties.omit-injection-points`.\n- In `inject(...)`, skips property injection when `containsProperties(...)` is false for a configuration bean.\n- Resolves `ConfigurationPath` directly as an injectable special type.\n\n## Executable Methods\n\n`ExecutableMethodsDefinitionWriter` generates the `$Exec` class used by `BeanDefinition.getExecutableMethods()` and AOP.\n\nEach executable method stores an `AbstractExecutableMethodsDefinition.MethodReference` with:\n\n- Declaring type.\n- Annotation metadata.\n- Method name.\n- Return `Argument`.\n- Argument array built from `methodElement.getSuspendParameters()`.\n- `isAbstract`.\n- `isSuspend`.\n\nDispatch is generated by `DispatchWriter`. It produces switch-based reflection-free calls when possible, reflective fallback when required, and bridge dispatch entries for intercepted proxy methods. Kotlin default methods use a specialized dispatch target and are not supported for reflection invocation.\n\nWhen a method is annotated `@Executable(processOnStartup = true)`, the writer marks `requiresMethodProcessing()` and the bean definition emits the indexes that startup processors must inspect.\n\n## Bean Introspection\n\n`IntrospectedTypeElementVisitor` handles `@Introspected` and writes `BeanIntrospectionReference` classes. It supports:\n\n- Direct class introspection.\n- `classes` and `classNames`.\n- Package scanning, but only when `includedAnnotations` limits the scan.\n- `targetPackage`.\n- Optional annotation metadata emission.\n- Indexed annotations.\n- Explicit `@Introspected.IntrospectionBuilder`.\n- Lombok builders after Lombok-generated methods appear in a later round.\n\n`BeanIntrospectionWriter` emits the actual introspection class. It stores:\n\n- Constructor metadata and constructor `Argument[]`.\n- `BeanPropertyRef[]` with read, write, and with/copy-constructor dispatch indexes.\n- `BeanMethodRef[]` for introspected executable methods.\n- Enum constant refs for enum introspections.\n- Indexed property lookup methods when `@Introspected(indexed = ...)` is used.\n- Dispatch methods for property get/set/with, bean methods, copy-constructor mutation, and construction.\n\nProperty mutation order matters:\n\n- A setter or writable field is used when present.\n- If a read-only property corresponds to a constructor argument, the property is still considered mutable through constructor reconstruction.\n- If no setter exists, the writer looks for a with-method using the configured `withPrefix`.\n- If neither exists, mutation dispatch throws `UnsupportedOperationException`.\n\nConstructor support:\n\n- A no-arg default constructor enables `instantiate()`.\n- A primary constructor enables `instantiateInternal(Object[])` and `isBuildable()`.\n- If every constructor parameter is a Kotlin default parameter, the writer also emits no-arg `instantiate()` by calling Kotlin defaults.\n\nConfiguration beans that need validation are annotated with `@Introspected` so validation can operate on introspection metadata rather than by adding validation advice to every configuration setter.\n\n## AOP Proxies\n\n`DefaultElementBeanDefinitionBuilderFactory` creates proxy builders. It rejects final classes for compile-time subclass proxying, forces factory-produced around-advised beans into proxy-target mode, and chooses `RuntimeProxyBeanDefinitionWriter` for `@RuntimeProxy` types or `AopProxyWriter` otherwise.\n\nProxy modes:\n\n| Mode | Target ownership | Main generated behavior |\n| --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. | Generated proxy subclasses the target when possible. Intercepted methods pass `this` to `MethodInterceptorChain`. Concrete original methods use generated `$$access$$...` bridge methods so `proceed()` can call `super`. |\n| Proxy-target around proxy | Proxy and target are separate beans. | The proxy bean definition implements `ProxyBeanDefinition` and points back to the target definition. The proxy resolves a target with `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target | Proxy target is separate and resolved on first use. | The proxy stores a copied `BeanResolutionContext`; `interceptedTarget()` resolves the target. With `cacheableLazyTarget`, it caches the target after first lookup. |\n| Hotswap proxy-target | Proxy target is separate and mutable. | The proxy implements `HotSwappableInterceptedProxy`, stores target behind read/write locks, and exposes `swap(...)`. |\n| Introduction proxy | No concrete target implementation is required. | Generated proxy implements the introduced interface/type. Abstract/interface methods are satisfied by introduction interceptors. |\n| Runtime proxy | Proxy object is produced by a runtime creator. | The bean definition builds a `DefaultRuntimeProxyDefinition` and invokes the configured `RuntimeProxyCreator`. |\n\n### Around vs Introduction\n\nAround advice decorates an implementation that already exists. Introduction advice supplies or routes an implementation for methods that may not exist on a concrete target.\n\nThe compile-time distinction starts with interceptor binding metadata:\n\n- `@Around` contributes `@InterceptorBinding(kind = AROUND)`.\n- `@Introduction` contributes `@InterceptorBinding(kind = INTRODUCTION)`.\n- `@AroundConstruct` contributes `@InterceptorBinding(kind = AROUND_CONSTRUCT)`.\n- `InterceptedMethodUtil.hasAroundStereotype(...)` and `hasIntroductionStereotype(...)` determine which creator path runs.\n- `InterceptedMethodUtil.resolveInterceptorBinding(metadata, kind)` extracts the binding values that become the proxy constructor's interceptor qualifier.\n\nAround proxy generation:\n\n- `DeclaredBeanElementCreator` creates a normal target bean definition and, when necessary, an around proxy builder.\n- A class-level around stereotype causes public/package-private methods to be considered for interception.\n- A method-level around stereotype can force proxy creation for a method even when the class is not already an AOP proxy.\n- Methods must be non-final, non-private, and non-static because generated compile-time proxies need an overridable method.\n- Default around proxies subclass the target and invoke original behavior through generated bridge methods.\n- Proxy-target around proxies keep a separate target definition and resolve the target through the context.\n\nIntroduction proxy generation:\n\n- `IntroductionInterfaceBeanElementCreator` handles interfaces with introduction advice or configuration-reader introduction advice.\n- `AopIntroductionProxySupportedBeanElementCreator` handles concrete classes that combine introduction behavior with possible around advice.\n- `DefaultElementBeanDefinitionBuilderFactory.introductionProxy(...)` builds a proxy definition that includes both around and introduction interceptor bindings.\n- Interface introduction processes abstract methods, property accessors, and non-abstract default methods only when those non-abstract methods declare around advice.\n- Concrete-class introduction reuses the introduction proxy builder as the bean definition builder; it does not keep a separate ordinary target definition for introduced behavior.\n- Introduction proxies implement `Introduced`. Around proxies implement `Intercepted`; proxy-target variants also implement `InterceptedProxy` or `HotSwappableInterceptedProxy`.\n\nRuntime chain differences:\n\n- Around method resolution calls `InterceptorChain.resolveAroundInterceptors(...)` and gets only `AROUND` interceptors.\n- Introduction method resolution calls `InterceptorChain.resolveIntroductionInterceptors(...)`, which resolves introduction interceptors and around interceptors, then concatenates around interceptors before introduction interceptors.\n- If an introduction method has no introduction interceptor and is not an adapter method, runtime resolution fails with an error because there is no implementation to invoke.\n- If the method is an adapter method, the runtime creates an internal `AdapterIntroduction` interceptor as the implementation fallback.\n\nMethod interception flow in `AopProxyWriter`:\n\n1. `addAroundMethod(...)` records the method and contributes interceptor binding metadata from method annotations.\n2. Concrete default-around methods get executable-method entries and bridge methods as needed.\n3. The proxy type gets `$proxyMethods` and `$interceptors` fields.\n4. The proxy constructor appends five hidden parameters after user constructor parameters: `BeanResolutionContext`, `BeanContext`, `Qualifier`, interceptor bean registrations list, and `InterceptorRegistry`.\n5. Constructor code initializes `$proxyMethods` from the executable-methods definition or target bean definition.\n6. Constructor code resolves each method's interceptors using `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`.\n7. Each intercepted method override chooses a target: `this` for default around, a target field for eager proxy-target, or `interceptedTarget()` for lazy/hotswap.\n8. The override creates a `MethodInterceptorChain` with method-specific interceptors, target, executable method, and arguments, then returns `proceed()`.\n\nConstructor interception:\n\n- `BeanDefinitionWriter` detects `AROUND_CONSTRUCT` bindings only for valid candidate definitions. For proxy-target beans, only the target definition should intercept construction; for default around proxies, the generated AOP implementation intercepts construction.\n- Non-parametrized constructor interception uses `InterceptedInstantiateBeanDefinition` or `ProxyInterceptedInstantiateBeanDefinition`.\n- Parametrized constructor interception uses `InterceptedParametrizedInstantiateBeanDefinition` or `ProxyInterceptedParametrizedInstantiateBeanDefinition`.\n- The proxy variants know that proxy constructors contain the five hidden parameters and keep them out of the user-visible constructor interception argument list.\n\nFactory-produced around-advised beans are always proxy-target beans because the factory method owns the real object creation. If the produced type has constructor arguments, `proxyTargetMode` controls handling:\n\n- `ERROR`: fail compilation.\n- `WARN`: allow construction, but warn.\n- `ALLOW`: allow construction silently.\n\nFor `WARN` and `ALLOW`, primitive constructor parameters are annotated with `@Value(false)` or `@Value(0)`, and reference parameters are marked nullable so proxy construction has placeholder values.\n\n### Adapters\n\n`@Adapter` creates a new bean definition that adapts a user method to a single-abstract-method interface.\n\nCompile-time adapter generation is in `DeclaredBeanElementCreator.visitAdaptedMethod(...)`:\n\n1. The source method must declare `@Adapter(TargetInterface.class)`.\n2. The target must be an interface.\n3. The target interface must have exactly one abstract method.\n4. Source and target parameter counts must match.\n5. Kotlin suspend source methods are rejected.\n6. Each source parameter generic type must be assignable to the matching target method generic type.\n7. Generic placeholders on the target interface are remapped from the source method parameter types.\n8. A synthetic adapter proxy class name is created from the declaring bean name, target interface simple name, source method name, and an index.\n9. The target interface `ClassElement` is annotated with internal `@Adapter` members:\n   - `adaptedBean`: source bean class.\n   - `adaptedMethod`: source method name.\n   - `adaptedArgumentTypes`: source argument types.\n   - `adaptedQualifier`: source bean `@Named` qualifier, when present.\n10. The target interface is annotated `@Indexed` for the adapted interface type.\n11. A merged metadata hierarchy of the source bean and adapted interface becomes the proxy metadata.\n12. `beanDefinitionBuilderFactory.introductionProxy(adapterProxyClassName, metadata, interfaceToAdapt)` creates an introduction proxy.\n13. `implementInterface(interfaceToAdapt)` adds the SAM methods to the generated proxy.\n\nAt runtime, adapter methods are implemented by `AdapterIntroduction`:\n\n- `DefaultInterceptorRegistry.resolveToNone(...)` returns an `AdapterIntroduction` when the method has `@Adapter` metadata and no introduction interceptor beans matched.\n- `AdapterIntroduction` reads the internal adapter metadata from the executable method.\n- It finds an `ExecutionHandle` for the original source bean and method, using `adaptedQualifier` when present.\n- Its `intercept(...)` method invokes the source execution handle with the intercepted SAM method arguments.\n\nAdapters are therefore introduction proxies, but they are special because the implementation interceptor is synthesized at runtime instead of being a user-defined `@InterceptorBean`.\n\n### Interceptor Binding Recognition\n\nInterceptor binding metadata is normalized at compile time before bean/proxy writers consume it.\n\n`InterceptorBindingMembers` remaps annotation values that have AOP stereotypes:\n\n- Applied annotations that are themselves `@Around`, `@Introduction`, `@AroundConstruct`, or `@InterceptorBinding` are left as direct AOP annotations.\n- User annotations meta-annotated with those stereotypes get an internal `@InterceptorBinding` value whose `value` member is the user annotation type.\n- The binding `kind` is set to `AROUND`, `INTRODUCTION`, or `AROUND_CONSTRUCT`.\n- If the stereotype uses `@InterceptorBinding(bindMembers = true)`, the remapper stores selected annotation member values under `InterceptorBindingQualifier.META_BINDING_VALUES`.\n- Members annotated with `@NonBinding` are removed from those binding values.\n- If the advice stereotype has `@Type(SomeInterceptor.class)`, the remapper copies that type to the binding as `interceptorType`. This preserves the old type-based interceptor selection path.\n\n`InterceptorBeanMapper` remaps `@InterceptorBean(...)` on interceptor beans:\n\n- `@InterceptorBean` is itself a bean stereotype and has default singleton scope.\n- Its `value` member names the advice annotations the interceptor supports.\n- The mapper converts each supported annotation into an internal `@InterceptorBinding` value.\n- Those values are stored in the internal interceptor-bindings container on the interceptor bean metadata.\n\nGenerated proxies use these normalized bindings in two places:\n\n- Proxy writers collect type-level, method-level, and constructor-level binding values using `InterceptedMethodUtil.resolveInterceptorBinding(...)`.\n- `AopProxyWriter` annotates the generated proxy constructor's hidden interceptor-registration-list parameter with `AnnotationUtil.ANN_INTERCEPTOR_BINDING_QUALIFIER` and the collected binding values.\n- `BeanDefinitionWriter.getQualifier(...)` sees that annotation on the constructor parameter and emits `Qualifiers.byInterceptorBinding(argument.getAnnotationMetadata())`.\n- The context uses `InterceptorBindingQualifier` to preselect candidate interceptor bean registrations for the proxy constructor argument.\n\n`InterceptorBindingQualifier` supports two matching modes:\n\n- Binding by annotation name and optional `$bindingValues`.\n- Binding by explicit `interceptorType`.\n\nThe constructor-injected list is intentionally a candidate set, not the final per-method chain. It narrows the list cheaply during bean construction; `DefaultInterceptorRegistry` performs the final method-specific selection.\n\n### Interceptor Beans And Runtime Resolution\n\n`InterceptorRegistryBean` is the built-in bean definition for `InterceptorRegistry`.\n\n- It is a hand-written `BeanDefinitionReference` and `InstantiatableBeanDefinition`.\n- It exposes `InterceptorRegistry` and `DefaultInterceptorRegistry`.\n- It is singleton, always present, and bootstrap-context compatible.\n- Its `instantiate(...)` method returns a new `DefaultInterceptorRegistry` for the active `BeanContext`.\n\nRuntime method interceptor resolution is handled by `DefaultInterceptorRegistry.resolveInterceptors(...)`:\n\n1. It reads the intercepted method annotation metadata.\n2. If no interceptor registrations were injected, it returns none for around advice, creates `AdapterIntroduction` for adapter introduction methods, or fails for other missing introduction implementations.\n3. It configures expression/environment-aware metadata before evaluating bindings.\n4. `AbstractInterceptorChain.resolveInterceptorValues(metadata, kind)` extracts the applicable `@InterceptorBinding` values for the requested kind.\n5. For `AnnotationMetadataHierarchy`, declared method-level bindings are preferred over parent/type bindings for non-repeatable annotations.\n6. Each candidate interceptor registration is checked by `selectInterceptor(...)`.\n7. Candidate registrations are sorted with `OrderUtil.ORDERED_COMPARATOR`.\n8. Method resolution keeps `MethodInterceptor` instances and generic `Interceptor` instances that are not constructor-only.\n9. Constructor resolution keeps `ConstructorInterceptor` instances and generic `Interceptor` instances that are not method-only.\n\n`DefaultInterceptorRegistry.selectInterceptor(...)` checks:\n\n- Constructor interceptor type arguments, when present, must be assignable from the intercepted declaring type.\n- If an intercept point binding carries `interceptorType`, the interceptor bean instance type can match directly.\n- Otherwise the interceptor bean definition must have its own interceptor binding metadata for the same kind.\n- Each interceptor binding declared on the interceptor must match an intercept point binding.\n- If binding member values are present, the `$bindingValues` metadata must match as well.\n\nThe runtime chain then executes through `MethodInterceptorChain` or `ConstructorInterceptorChain`:\n\n- `MethodInterceptorChain.proceed()` invokes interceptors in order until exhausted, then calls the generated `ExecutableMethod`.\n- Introduction methods normally reach an introduction interceptor instead of a concrete target method.\n- Adapter introduction interceptors invoke the original adapted source method.\n- Constructor chains use `BeanConstructor` metadata and eventually call the generated intercepted `doInstantiate(...)`.\n\n### Factory Methods And Proxies\n\n`@Factory` classes are processed by `FactoryBeanElementCreator`, which extends the ordinary declared-bean creator. The factory class is still a bean definition with its own constructor, injection points, lifecycle methods, executable methods, validation, and AOP behavior; each producer member creates an additional bean definition.\n\nProducer member discovery:\n\n- Factory methods are methods whose metadata declares bean-producing semantics, normally `@Bean` or a scope stereotype.\n- Factory fields are fields annotated as beans; inaccessible/private factory fields fail compilation.\n- Bean-producing property read elements are converted to a factory method when they have a getter, or to a factory field when the backing field is accessible.\n- Bean-producing property write elements are ignored as producers because the read side owns the produced value.\n- Producer methods can also remain executable or interceptable methods on the factory bean itself. After the produced bean definition is created, `FactoryBeanElementCreator` still visits the factory method as an AOP method when the factory is proxied, or as an executable method otherwise.\n\nProduced metadata is deliberately not just the method metadata:\n\n1. For non-primitive produced types, the processor merges the produced class metadata with the producing method/field/property metadata.\n2. If the producing element declares a scope or qualifier, scopes and qualifiers inherited from the produced type are removed unless the producing element also declares them.\n3. The producing element then receives a hierarchy of factory-class metadata plus produced metadata, but factory-class qualifiers are stripped when they are not present on the produced bean. This prevents a qualifier on the factory bean from accidentally qualifying every product.\n4. For produced types with `@EachProperty`, both the produced type and the producing element are annotated with a computed `@ConfigurationReader(prefix = ...)` so iterable configuration path generation works for factory products.\n\nThe generated produced bean definition is a separate `BeanDefinitionWriter`:\n\n- `DefaultElementBeanDefinitionBuilderFactory.factoryMethod(...)` creates a writer whose bean type is the generic return type and whose producer definition is a `MethodDefinition`.\n- `factoryField(...)` creates a writer whose bean type is the generic field type and whose producer definition is a `FieldDefinition`.\n- Factory method definition names include a unique index so overloaded producer methods do not collide.\n- `BeanDefinitionWriter.resolveConstructorParameters()` treats factory method parameters like construction parameters and factory fields as zero-argument construction.\n- If any factory method parameter is annotated `@Parameter`, the produced definition becomes parametrized in the same way as a parametrized constructor bean.\n\nRuntime instantiation is generated by switching on the producer definition:\n\n- Constructor-produced beans call `initializeBean(...)`.\n- Field-produced beans call `buildFactoryFieldCall(...)`.\n- Method-produced beans call `buildFactoryMethodCall(...)`.\n- Static factory members are invoked with no factory bean instance.\n- Instance factory members first resolve the factory bean from the `BeanResolutionContext` using the factory type and factory qualifier, mark the resolution as factory-dependent, then invoke the method or read the field.\n- Inaccessible factory methods and fields use the generated reflection helper path; accessible static and instance members use direct sourcegen dispatch.\n\nFactory-produced AOP beans are special because the factory method or field owns creation of the real target object. A default subclass around proxy would create a proxy instance instead of using the factory product, so `DefaultElementBeanDefinitionBuilderFactory.aroundProxy(...)` forces `Interceptor.PROXY_TARGET = true` whenever the target writer's producer is not a constructor.\n\nFactory proxy generation rules:\n\n- The target produced bean definition remains the factory method/field definition.\n- The proxy bean definition is an additional definition that points back to the target definition as a proxy target.\n- Factory products use `visitSuperBeanDefinitionFactory(...)` rather than normal `visitSuperBeanDefinition(...)`; this marks the proxy definition as being backed by a factory target without subclassing the target bean definition class.\n- Runtime proxy products follow the same factory-target rule, but use `RuntimeProxyBeanDefinitionWriter` instead of `AopProxyWriter`.\n- The proxy scans the produced type for public, non-final, non-static methods, then also scans synthetic bean property read/write methods. This is necessary because the producing factory method does not declare the methods that will be intercepted on the product.\n- Factory-produced arrays and primitive beans cannot receive AOP advice, and the original produced class must not be final.\n\nFactory products with constructor arguments need an extra compile-time decision. Even though the real target comes from the factory, a compile-time subclass proxy still has to call a superclass constructor. `@Around(proxyTargetMode = ...)` controls this:\n\n- `ERROR` is the default and fails when the produced non-interface type has a primary constructor with parameters.\n- `WARN` allows proxy construction and emits a warning.\n- `ALLOW` allows proxy construction silently.\n\nFor `WARN` and `ALLOW`, `FactoryBeanElementCreator.allowProxyConstruction(...)` mutates the produced type constructor parameters so the proxy can be instantiated with placeholders: primitive parameters get synthetic `@Value(false)` or `@Value(0)`, reference parameters are marked nullable, and non-null metadata is removed. These placeholder values are for the proxy superclass constructor, not for creating the real factory target.\n\nConstructor interception for factory products follows the proxy-target split:\n\n- A factory method counts as a factory/proxy-target construction path in `BeanDefinitionWriter.isInterceptedLifeCycleByType(...)`.\n- `@AroundConstruct` on a factory-produced around bean should wrap the target construction path, which is the generated factory method invocation path.\n- The generated proxy's hidden constructor contains AOP infrastructure arguments and is not the user construction point.\n- The intercepted instantiate interfaces used for proxy definitions keep proxy infrastructure parameters separate from the user-visible constructor/factory arguments.\n\nOther factory product features:\n\n- `@Executable` on produced metadata registers all produced type methods as executable methods, except for arrays and primitives.\n- `@Bean(preDestroy = \"...\")` resolves an accessible no-argument destroy method on the produced type and emits a pre-destroy hook.\n- Produced `@EachProperty` and `@EachBean` definitions stay iterable definitions; the factory method parameters can still be filled from `@Parameter` values when the runtime creates each delegate.\n\n## Evaluated Expressions\n\nEvaluated expressions are annotation values represented by `EvaluatedExpressionReference`. They can appear in direct and nested annotation values.\n\nThe generation flow is:\n\n1. Writers call `EvaluatedExpressionProcessor.processEvaluatedExpressions(...)` for class, constructor, method, parameter, field, property, and introspection metadata.\n2. `EvaluatedExpressionsUtils.findEvaluatedExpressionReferences(...)` scans annotation and stereotype metadata, including nested annotation values.\n3. `DefaultExpressionCompilationContextFactory` builds an expression context. It includes shared registered context types, annotation-level `@AnnotationExpressionContext`, annotation member contexts, method parameters when compiling method expressions, and optional `this`.\n4. `EvaluatedExpressionWriter` generates a final class extending `AbstractEvaluatedExpression`.\n5. The generated `doEvaluate(ExpressionEvaluationContext)` parses the original annotation value with `CompoundEvaluatedExpressionParser` and compiles it into sourcegen statements.\n6. The owning generated definition/introspection is annotated with `@BuildTimeInit` listing expression class names.\n\nExpression classes are deduplicated by generated class name in `EvaluatedExpressionProcessor`. `BeanDefinitionWriter.finish()` resets expression and metadata processor caches after a processing run.\n\n## Configuration Metadata And Paths\n\nConfiguration path calculation is split across compile-time and runtime.\n\nCompile-time path helpers:\n\n- `ConfigurationUtils.getTypePath(...)` reads `ConfigurationReader.PREFIX`, `BASE_PREFIX`, supertype prefixes, and enclosing configuration reader prefixes. It caches the computed prefix by annotating `ConfigurationReader.PREFIX_CALCULATED`.\n- `ConfigurationUtils` appends `.*` for map-style `@EachProperty` and `[*]` for list-style `@EachProperty`.\n- `ConfigurationMetadataBuilder.calculatePath(...)` creates property paths. Nested configuration reader property types use their own reader path; ordinary properties use owner/declaring type path plus the property name, then hyphenation.\n- `ConfigurationMetadataWriterVisitor` writes IDE metadata through `ConfigurationMetadataWriter` implementations at `finish(...)`.\n\nRuntime path helpers:\n\n- `ConfigurationPath` models a stack of configuration reader and `EachProperty` segments.\n- `DefaultApplicationContext.collectIterableBeans(...)` expands iterable definitions into `BeanDefinitionDelegate` instances.\n- `BeanDefinitionDelegate` temporarily pushes its `ConfigurationPath` into the active `BeanResolutionContext` during `instantiate(...)` and `inject(...)`.\n- Property placeholders and generated `@Property` names can be resolved against the current dynamic path.\n\n## `@ConfigurationProperties`\n\n`@ConfigurationProperties` is meta-annotated with `@ConfigurationReader`, so it enters the configuration reader path.\n\nFor classes and records:\n\n1. `ConfigurationMetadataWriterVisitor` visits the class, computes and writes the reader prefix, and records configuration metadata.\n2. If the class has validation markers, it adds `@Introspected` so validation can use bean introspection.\n3. For records and `@ConfigurationInject` constructors/methods, constructor or method parameters that are property-like get synthetic `@Property(name = ...)` annotations.\n4. For writable bean properties, the visitor records property metadata and annotates setters with `@Property(name = ...)`.\n5. `ConfigurationReaderBeanElementCreator` processes bean properties rather than hidden fields/methods first.\n6. Writable properties become generated value injection points using `@Property(name = calculatedPath)`.\n7. `@ConfigurationBuilder` properties or fields become builder injection commands instead of normal property injection.\n8. Read methods annotated `@Executable` are still emitted as executable methods.\n9. `BeanDefinitionWriter.inject(...)` only performs property injection if the environment contains matching properties for the configuration bean.\n\nFor interfaces:\n\n1. `ConfigurationMetadataWriterVisitor` annotates the interface with `io.micronaut.runtime.context.env.ConfigurationAdvice`.\n2. `BeanDefinitionCreatorFactory` routes it through introduction proxy generation.\n3. Getter methods are validated as configuration accessors.\n4. Getter methods returning property-like values are annotated with `@Property`.\n5. Getter methods returning bean/configuration-like values are marked as bean access through `ConfigurationAdvice`.\n6. Runtime `ConfigurationIntroductionAdvice` resolves values using the active `ConfigurationPath` and the environment.\n\nDo not add validation AOP to configuration setters as a substitute for introspection validation. The creator intentionally suppresses method validation interception for configuration readers.\n\n## `@EachProperty`\n\n`@EachProperty` is both a `ConfigurationReader` and an iterable bean definition.\n\nCompile-time behavior:\n\n- `ConfigurationUtils.computeIterablePrefix(...)` appends `.*` by default or `[*]` when `list = true`.\n- The computed prefix is stored as `ConfigurationReader.PREFIX`.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachProperty` stereotype.\n- Factory-produced bean types with `@EachProperty` are explicitly annotated with the computed `ConfigurationReader` prefix on both the produced type and producing element.\n- Properties inside an `EachProperty` bean are still generated as normal configuration reader property injection points, but the property paths contain dynamic segments.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` sees the bean definition is iterable and calls `transformEachPropertyBeanDefinition(...)`.\n2. The context creates or reuses a `ConfigurationPath`.\n3. It pushes an `EachProperty` root segment for the definition.\n4. `ConfigurationPath.traverseResolvableSegments(environment, callback)` finds map keys or list indexes present in the environment.\n5. For each resolvable segment, the context creates a `BeanDefinitionDelegate` with a qualifier from `path.beanQualifier()` or `PrimaryQualifier`.\n6. The delegate sets the path during construction and injection, so generated `@Property` values resolve against the current segment.\n7. `@Parameter` constructor arguments can receive the current map key/name, enum value, list index, or matching nested configuration bean through `BeanDefinitionDelegate.getParametersValues(...)`.\n\nPrimary selection for `@EachProperty` comes from the current `ConfigurationPath` segment. `BeanDefinitionDelegate.isPrimary()` returns true when the path segment name matches the configured primary name.\n\nNested `@ConfigurationProperties` inside `@EachProperty` are handled by pushing additional configuration reader segments onto the same path. Direct resolution of a nested dynamic configuration reader may rebuild the path by finding the enclosing delegate.\n\n## `@EachBean`\n\n`@EachBean` is an iterable bean definition driven by another bean type rather than by environment keys.\n\nCompile-time behavior:\n\n- The annotation remains metadata on the bean definition; the processor does not generate one class per origin bean.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachBean` stereotype.\n- Constructor parameters annotated `@Parameter` make the generated definition parametrized when the value must be supplied at runtime.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` calls `transformEachBeanBeanDefinition(...)`.\n2. The annotation's required value is the dependent/origin bean type.\n3. The context finds candidate bean definitions for that origin type.\n4. For each origin candidate, the context creates a `BeanDefinitionDelegate` of the `@EachBean` definition.\n5. If the origin is already a configuration delegate, its `ConfigurationPath` is reused. This is what connects `@EachBean(ExampleConfiguration)` to `@EachProperty` entries.\n6. Otherwise the delegate qualifier is the origin's declared qualifier, `PrimaryQualifier` for primary origins, or an internal `EachBeanQualifier` that matches the exact origin `BeanDefinition`.\n7. `remapGenerics` metadata can remap type arguments from the origin bean into the created delegate.\n8. The delegate carries the origin definition for ordering and type argument behavior.\n9. During instantiation, `BeanDefinitionDelegate.getParametersValues(...)` fills `@Parameter` arguments from the current qualifier, path, origin bean, or matching bean lookup.\n\n`EachBeanQualifier` is an internal identity qualifier. It lets unqualified origin beans still drive distinct `@EachBean` delegates, but user-visible names are only available when the origin has a named/primary qualifier or when the origin came from a configuration path.\n\nIf a required `@EachBean` constructor parameter cannot be supplied, `ParametrizedInstantiatableBeanDefinition.resolveParameterizedArgumentValues(...)` treats the missing origin-type argument as a disabled bean rather than a normal missing argument.\n\n## Kotlin-Specific Generation\n\nKotlin support is mostly expressed through AST flags, not by checking Kotlin compiler symbols directly in this module.\n\nKey rules:\n\n- `MethodElement.isSuspend()` marks Kotlin suspend functions.\n- `MethodElement.getSuspendParameters()` includes the synthetic continuation parameter. Writers use this when building `Argument[]`, executable method references, AOP method lookups, dispatch methods, and lifecycle/injection method definitions.\n- `ExecutableMethodsDefinitionWriter` stores `isSuspend` on method references.\n- AOP interception returns `Object` for suspend methods and passes the continuation through the normal argument array. Runtime AOP adapts suspend calls through the Kotlin intercepted-method utilities in the AOP runtime.\n- `KotlinParameterElement.hasDefault()` marks constructor or method parameters with Kotlin defaults.\n\nKotlin default constructor calls:\n\n- `MethodGenUtils.invokeBeanConstructor(...)` detects default parameters and calls the Kotlin synthetic constructor with original parameters, one or more integer default masks, and a final `kotlin.jvm.internal.DefaultConstructorMarker` argument.\n- A mask bit means Kotlin should use the default value for that parameter.\n- For constructor injection, the writer computes per-argument \"has value\" expressions. For `@Property` parameters, the expression checks whether the property is present in the environment; for bean parameters, it checks non-null.\n- Primitive values cannot use null as the missing sentinel, so default primitive placeholders are `false` or numeric zero.\n- `BeanDefinitionWriter.initializeBean(...)` only does this direct Kotlin-default constructor path for non-proxy definitions. Proxies handle their own super constructor calls.\n\nKotlin default method calls:\n\n- `DispatchWriter` uses `KotlinMethodWithDefaultsDispatchTarget` when any suspend/normal parameter is a `KotlinParameterElement` with a default.\n- The dispatch target calls `MethodGenUtils.invokeKotlinDefaultMethod(...)`, which invokes the static `$default` method with target, parameters, masks, and a null marker.\n- Kotlin default methods are rejected for reflection dispatch because the default-mask call shape is not a normal reflective method invocation.\n\nOther Kotlin-specific behavior:\n\n- `BeanIntrospectionWriter` emits no-arg `instantiate()` for a constructor when all parameters are Kotlin defaults.\n- `ExecutableVisitor` does not warn for `@Nullable` primitive parameters when the parameter is a Kotlin default parameter.\n- `AopProxyWriter.invokeSuperConstructor(...)` allows Kotlin defaults when calling the proxied superclass constructor.\n- Factory-produced proxy construction in `WARN` or `ALLOW` mode annotates primitive placeholders with `@Value` and reference placeholders as nullable, which also helps Kotlin proxy construction.\n\n## Configuration Builders\n\n`@ConfigurationBuilder` is handled in both metadata and injection generation.\n\n`ConfigurationMetadataWriterVisitor` records a configuration group for the builder type and records each builder method as property metadata. `ConfigurationReaderBeanElementCreator` turns the builder property or field into `InjectFieldConfigurationBuilder` or `InjectMethodConfigurationBuilder` commands.\n\nGenerated injection creates or accesses the builder, then invokes generated builder method statements. A zero-argument builder method can be represented by a boolean property injection point; one-argument builder methods receive the resolved property value.\n\nDo not treat builder properties like normal writable configuration bean properties. Excludes and includes do not suppress builders in the same way, and inaccessible builder fields require a non-private getter.\n\n## Change Guidance\n\nMost source changes here affect generated bytecode contracts. When changing a writer, also inspect the runtime interfaces and bases in `inject/src/main/java/io/micronaut/inject/**` and `inject/src/main/java/io/micronaut/context/**`.\n\nUseful checks after source changes usually include:\n\n- `./gradlew -q :micronaut-core-processor:compileJava`\n- `./gradlew -q :micronaut-inject-java:compileTestJava :micronaut-inject-java:compileTestGroovy`\n- Targeted tests in `inject-java`, `inject-groovy`, or `inject-kotlin` that compile sample beans.\n- AOP changes should include around, around-construct, proxy-target, introduction, and Kotlin tests when applicable.\n- Configuration changes should include `@ConfigurationProperties`, interface configuration, nested configuration, `@EachProperty` map/list, and `@EachBean` tests.\n\nFor markdown-only edits in this file, `git diff --cached --check` and `./gradlew -q spotlessCheck` are enough.\n","isInternal":false,"tokens":9156,"sizeBytes":48217},{"name":"AGENTS.md","path":"inject/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/inject/AGENTS.md","title":"inject - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# `io.micronaut.inject` Class Map\n\nThis module is the runtime contract layer for Micronaut dependency injection. Most classes in `io.micronaut.inject` are small interfaces that generated bytecode implements; the heavier runtime bases that implement those contracts live mostly in `io.micronaut.context`.\n\nUse this file when changing `inject/src/main/java/io/micronaut/inject/**` to keep the generated-code model, bean lookup flow, and qualifier rules aligned.\n\n## Runtime Shape\n\nThe normal bean lifecycle is:\n\n1. Annotation processing writes a lightweight `BeanDefinitionReference` and a concrete `BeanDefinition`.\n2. `BeanContext` discovers references without loading user bean classes, checks `BeanContextConditional`, qualifiers, indexes, and replacement rules, then calls `BeanDefinitionReference.load(...)`.\n3. A loaded `BeanDefinition` describes the bean type, scope, constructor, injection points, executable methods, type arguments, metadata, and lifecycle hooks.\n4. If it is an `InstantiatableBeanDefinition`, the context creates the instance with a `BeanResolutionContext`.\n5. Generated definitions resolve constructor, method, field, `@Value`, `@Property`, provider, collection, stream, map, and registration dependencies through helper methods on `io.micronaut.context.AbstractInitializableBeanDefinition`.\n6. If implemented, `ValidatedBeanDefinition`, `InjectableBeanDefinition`, `InitializingBeanDefinition`, and `DisposableBeanDefinition` add argument validation, member injection, `@PostConstruct`, and `@PreDestroy` behavior.\n7. `ExecutableMethod` and `ExecutionHandle` expose reflection-free method calls for `@Executable`, AOP, event listeners, bean introspection methods, and processor startup work.\n\nGenerated classes are part of the API surface even when the supporting type is `@Internal`. Avoid changing method signatures, constructor shapes, visibility, or default method semantics unless the generated writers and compatibility impact are handled together.\n\n## Core Bean Model\n\n`BeanType<T>` is the common candidate abstraction. Both `BeanDefinitionReference<T>` and `BeanDefinition<T>` use it to expose the bean class, annotation metadata, exposed types, `@Primary`, optional bean name, candidate checks, and method-processing hint.\n\n`QualifiedBeanType<T>` extends `BeanType<T>` for anything that can expose a declared `Qualifier<T>`. It resolves qualifier annotations from target annotation metadata and is the bridge between static metadata and the runtime `io.micronaut.context.Qualifier` API.\n\n`BeanDefinitionReference<T>` is the soft-loading handle. It must answer whether the bean type is present, whether the bean is enabled, singleton, parallel, indexed, configuration-properties, proxy target, and how to load the real `BeanDefinition<T>`.\n\n`BeanDefinition<T>` is the full description used after loading. It extends `QualifiedBeanType`, `Named`, and `ArgumentCoercible`, and supplies scope, constructor, required components, injection points, lifecycle methods, executable methods, type arguments, default implementation, replacement metadata, and debug descriptions.\n\n`BeanContextConditional` is implemented by references, definitions, and configurations to decide whether something is enabled for a `BeanContext` and optional `BeanResolutionContext`.\n\n`BeanConfiguration` groups definitions by package and condition. `ConditionalBeanConfiguration` is the runtime record returned by `BeanConfiguration.of(...)` and `disabled(...)`; it deliberately rejects custom configurations for internal `io.micronaut.*` packages.\n\n`BeanIdentifier` is the stable instance key used by the context. `DefaultBeanIdentifier` is its internal string-backed implementation.\n\n`ArgumentBeanType<T>` adapts a core `Argument<T>` into a `BeanType<T>`, mainly so qualifier and candidate logic can operate on an argument-like requested type.\n\n## Bean Construction And Lifecycle\n\n`InstantiatableBeanDefinition<T>` marks definitions that can construct instances. It creates a `DefaultBeanResolutionContext` for convenience when only a `BeanContext` is supplied.\n\n`ParametrizedInstantiatableBeanDefinition<T>` is for definitions that need runtime-supplied `@Parameter` values. It finds required constructor arguments, validates/converts supplied values, and blocks no-argument instantiation.\n\n`InjectableBeanDefinition<T>` is for existing instances that need generated member injection after construction.\n\n`InitializingBeanDefinition<T>` invokes generated `@PostConstruct` hooks after dependency injection.\n\n`DisposableBeanDefinition<T>` invokes generated `@PreDestroy` hooks during shutdown.\n\n`ValidatedBeanDefinition<T>` delegates constructor/member/bean validation to `BeanDefinitionValidator` from the active context.\n\n`ReplacesDefinition<T>` represents `@Replaces` matching logic returned by `BeanDefinition.getReplacesDefinition()`.\n\n`DelegatingBeanDefinition<T>` decorates another definition by forwarding the full `BeanDefinition` surface. Use it when behavior must wrap a definition without copying its metadata model.\n\n## Injection Points\n\n`InjectionPoint<T>` is the base description of a place where the declaring bean needs a dependency. It exposes the declaring `BeanDefinition` and declared qualifier, and centralizes the `@Inject(required = false)` check.\n\n`CallableInjectionPoint<T>` adds an `Argument<?>[]` list for constructors and methods.\n\n`ConstructorInjectionPoint<T>` describes the constructor or factory method/field used to create a bean.\n\n`MethodInjectionPoint<B, T>` describes injected methods and lifecycle methods. It records the method name, arguments, declaring type, and whether it is post-construct or pre-destroy.\n\n`FieldInjectionPoint<B, T>` describes injected fields. Its `getField()` method is deprecated because resolving the `Field` initializes reflection metadata.\n\n`ArgumentInjectionPoint<B, T>` describes an argument inside an outer callable injection point and also acts as `ArgumentCoercible<T>`.\n\nGenerated `AbstractInitializableBeanDefinition` turns compact generated references into these injection point objects lazily and configures them with the `Environment` when needed.\n\n## Executable Methods\n\n`MethodReference<T, R>` is metadata for a method: declaring type, name, target `Method`, arguments, return type, and annotation metadata.\n\n`ExecutableMethod<T, R>` adds reflection-free invocation and source-like descriptions on top of `MethodReference`.\n\n`ExecutableMethodsDefinition<T>` is a generated collection of executable methods. `BeanDefinition` delegates method lookup and startup method processing to it.\n\n`DelegatingExecutableMethod<T, R>` wraps an executable method and forwards all method metadata and invocation.\n\n`BeanDefinitionMethodReference<T, R>` associates an executable method with the owning `BeanDefinition`. `DefaultBeanDefinitionMethodReference` is the package-private delegating implementation created by `BeanDefinitionMethodReference.of(...)`.\n\n`ExecutionHandle<T, R>` binds an executable method to a target instance and invokes without passing the instance as the first argument.\n\n`MethodExecutionHandle<T, R>` is an `ExecutionHandle` that also exposes the underlying `ExecutableMethod`.\n\n`UnsafeExecutionHandle<T, R>` is the internal variant that can invoke without argument validation.\n\n## AOP And Proxies\n\n`AdvisedBeanType<T>` is implemented by advised references and definitions to expose the intercepted target type for around or introduction advice.\n\n`ProxyBeanDefinition<T>` marks a bean definition as an AOP proxy and exposes the target definition type and target bean type.\n\n`io.micronaut.inject.proxy.InterceptedBean` marks generated proxy classes from the inject side.\n\n`io.micronaut.inject.proxy.InterceptedBeanProxy<T>` marks proxies that expose the intercepted target and optionally whether the target is already cached. It also implements the internal `Qualified<T>` hook so generated proxies can receive a bean qualifier.\n\nAOP proxy modes to keep distinct:\n\n| Mode | Target ownership | Generated marker | Main behavior |\n| --- | --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. For concrete classes it subclasses the target and calls `super` through generated bridge methods when proceeding. | `Intercepted` | Fast path for `@Around(proxyTarget = false)`. Intercepted methods run against `this`; no separate target bean is resolved. |\n| Proxy-target around proxy | The proxy and target bean are separate. The proxy bean definition points back to the target definition. | `ProxyBeanDefinition`, `InterceptedProxy` | Used for `@Around(proxyTarget = true)`, factory-produced around-advised beans, and interface cases that need a backing target. The proxy resolves the target through `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target proxy | Same as proxy-target, but target resolution is deferred until `interceptedTarget()` is needed. | `InterceptedProxy` | Stores a copied `BeanResolutionContext` and resolves the target on demand. With `cacheableLazyTarget`, the target is cached after the first lookup. |\n| Hotswap proxy-target proxy | Same as proxy-target, but the target reference is mutable. | `HotSwappableInterceptedProxy` | Stores the target behind a read/write lock and exposes `swap(...)` to replace it. |\n| Introduction proxy | There is no concrete target implementation for introduced methods. | `Introduced` | Generated proxy implements the advised interface/type and delegates behavior to introduction interceptors. Abstract/interface methods require an introduction interceptor or adapter. |\n| Runtime proxy | The generated bean definition asks a `RuntimeProxyCreator` to create the proxy object. | Runtime-specific proxy type | `DefaultRuntimeProxyDefinition` carries method metadata, interceptor data, target/proxy-target settings, and constructor values to the runtime proxy creator. |\n\n`@Around(proxyTarget = false)` is the normal class-subclass mode. `@Around(proxyTarget = true)` creates a proxy bean around a separate target bean, which changes lifecycle and destruction behavior because the context must find and destroy the target definition separately. Factory methods with around advice are forced into proxy-target mode because the factory owns creation of the original produced object. For factory-produced classes with constructor arguments, `proxyTargetMode` controls whether proxy generation fails, warns, or proceeds.\n\nMethod interception flow:\n\n1. The AOP writer records intercepted methods and interceptor binding metadata from class and method annotations.\n2. The generated proxy stores `ExecutableMethod[] $proxyMethods` and `Interceptor[][] $interceptors`.\n3. During proxy construction, `$proxyMethods` is filled from the generated executable-methods definition. In proxy-target mode, methods are looked up from the target `BeanDefinition` with `getRequiredMethod(...)`.\n4. The constructor resolves the applicable interceptor array for each method through `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`, using the preselected interceptor bean registrations injected into the proxy constructor.\n5. Each intercepted method override chooses the invocation target. Default around proxies pass `this`; proxy-target proxies pass the target field or call `interceptedTarget()` for lazy/hotswap cases.\n6. The override creates a `MethodInterceptorChain` with the method-specific interceptors, target, executable method, and argument values, then returns `proceed()`.\n7. In default around proxies, concrete methods get generated `$$access$$...` bridge methods so `proceed()` can call the original implementation via `super` without reflection. Introduction methods instead rely on introduction interceptors to provide the implementation.\n\n`io.micronaut.aop.beandefinition.ParameterizedInterceptedBeanDefinition<T>` is the AOP-side bridge for parametrized bean definitions with `@AroundConstruct`. It extends `ParametrizedInstantiatableBeanDefinition<T>` and adapts the normal `Map<String, Object>` argument path into a constructor interceptor chain: generated code resolves ordered construction values with `resolveInstantiationValues(...)`, the default map-based `doInstantiate(...)` starts `ConstructorInterceptorChain.instantiate(...)`, and the chain eventually calls the generated object-array `doInstantiate(...)` through `InterceptedParametrizedBeanConstructor`.\n\n`io.micronaut.aop.beandefinition.ParameterizedProxyBeanDefinition<T>` is the proxy-specific version of that bridge. Generated AOP proxy constructors append hidden parameters after the real constructor arguments: `BeanResolutionContext`, `BeanContext`, `Qualifier`, constructor interceptor registrations, and `InterceptorRegistry`. This interface extracts the pre-resolved constructor interceptors from the second-to-last constructor value and invokes `ConstructorInterceptorChain.instantiate(...)` with an additional proxy parameter count of `5`, so interceptors see only user constructor arguments while the final proxy constructor still receives its internal values.\n\n## Qualifiers\n\nUse `Qualifiers` as the factory entry point. It turns annotation metadata, names, type arguments, interceptor bindings, and composed qualifiers into `Qualifier<T>` instances.\n\nMost concrete qualifiers extend `FilteringQualifier<T>`, which implements the common `reduce`, `filter`, and `doesQualify` loops over `BeanType` and `QualifiedBeanType`.\n\nImportant qualifier implementations:\n\n| Class | Role |\n| --- | --- |\n| `AnyQualifier` | Matches every candidate and returns the first candidate for single lookup. |\n| `NoneQualifier` | Matches candidates with no declared qualifier. |\n| `PrimaryQualifier` | Matches `@Primary`, declared primary qualifiers, or primary-style candidate names. |\n| `NameQualifier` | Matches `@Named`, `NameResolver`, simple names, and generated name-plus-type conventions. |\n| `AnnotationQualifier` | Matches a runtime annotation instance. |\n| `AnnotationMetadataQualifier` | Matches annotation metadata, including binding and non-binding member rules. |\n| `AnnotationStereotypeQualifier` | Matches candidates by stereotype or repeatable stereotype container. |\n| `RepeatableAnnotationQualifier` | Matches repeatable qualifier annotation values. |\n| `CompositeQualifier` | Chains arbitrary qualifiers. |\n| `FilteringCompositeQualifier` | Chains only `FilteringQualifier` instances for faster direct matching. |\n| `TypeArgumentQualifier` | Matches candidate generic type arguments for a requested bean type. |\n| `ClosestTypeArgumentQualifier` | Narrows generic candidates to the closest assignable type argument match. |\n| `ExactTypeArgumentNameQualifier` | Matches a single generic argument by exact type name. |\n| `MatchArgumentQualifier` | Matches full nested `Argument` type parameters, including covariance and contravariance modes. |\n| `EachBeanQualifier` | Matches the origin bean definition for an `@EachBean` product. |\n| `TypeAnnotationQualifier` | Implements `@Type`-style filtering by exposed/assignable classes. |\n| `InterceptorBindingQualifier` | Matches interceptor beans against interceptor binding metadata. |\n| `QualifierUtils` | Shared package-private name, annotation, and declared-qualifier matching helpers. |\n| `Qualified` | Internal generated-code hook used to push a runtime qualifier into proxies/providers. |\n\nWhen changing qualifier behavior, check both `BeanType` candidates and `QualifiedBeanType` candidates. Many lookups first reduce references before loading definitions, so relying only on loaded `BeanDefinition` behavior can break startup and indexing paths.\n\n## Annotation Metadata\n\n`io.micronaut.inject.annotation` supplies the compile-time metadata implementation used by generated definitions and executable methods.\n\n`DefaultAnnotationMetadata` is the immutable runtime-oriented representation of declared annotations, all annotations, declared stereotypes, all stereotypes, and reverse stereotype indexes.\n\n`MutableAnnotationMetadata` is the build-time mutable variant used by processors and helper definitions before metadata is emitted or adapted.\n\n`AbstractAnnotationMetadata` supplies lazy synthesized annotation proxies and shared synthesis behavior.\n\n`AnnotationMetadataSupport` owns core annotation defaults, repeatable containers, annotation type registration, and proxy construction.\n\n`AnnotationMetadataReference` points to metadata by class name without unwrapping the target metadata. Generated code can use it as a stable metadata reference.\n\n`AnnotationMetadataHierarchy` composes metadata layers, especially factory-produced beans and AOP method/type metadata, while preserving declared-vs-inherited lookup behavior.\n\n`AbstractEnvironmentAnnotationMetadata`, `EnvironmentAnnotationMetadata`, `EnvironmentAnnotationValue`, `EnvironmentConvertibleValuesMap`, and `EnvironmentOptionalValuesMap` adapt annotation values to the active `Environment` and resolve placeholders lazily.\n\n`EvaluatedAnnotationMetadata`, `EvaluatedAnnotationValue`, `EvaluatedConvertibleValuesMap`, and `MappingAnnotationMetadataDelegate` adapt metadata with expression values that require a configured `BeanContext`, owning `BeanDefinition`, or method arguments.\n\n`AnnotationConvertersRegistrar` registers conversion from `AnnotationValue` objects to synthesized annotation instances.\n\n`AnnotatedElementValidator` is the compile-time validation hook for annotated elements.\n\n`AnnotationMetadataException` wraps metadata construction failures as `BeanContextException`.\n\n## Bean Introspection Helpers\n\n`io.micronaut.inject.beans` backs generated bean introspections, not dependency-injection definitions.\n\n`AbstractInitializableBeanIntrospection` is the generated-introspection base. It stores property, method, constructor, and annotation metadata and dispatches property/method access without reflection.\n\n`AbstractInitializableBeanIntrospectionAndReference` lets a generated introspection also serve as its own `BeanIntrospectionReference`.\n\n`AbstractEnumBeanIntrospectionAndReference` adds enum constant metadata support.\n\n`AbstractExecutableBeanMethod` adapts an introspection `BeanMethod` into an `ExecutableMethod`.\n\n`KotlinExecutableMethodUtils` recognizes Kotlin suspend functions whose continuation returns `Unit`.\n\n## Provider And Validation Helpers\n\n`io.micronaut.inject.provider.AbstractProviderDefinition` is both a `BeanDefinitionReference` and an `InstantiatableBeanDefinition` for provider-like injection points. It inspects the current `BeanResolutionContext` segment to determine the requested generic bean and qualifier.\n\n`JakartaProviderBeanDefinition` builds `jakarta.inject.Provider<T>` instances.\n\n`JavaxProviderBeanDefinition` builds legacy `javax.inject.Provider<T>` instances when that type is present.\n\n`BeanProviderDefinition` builds Micronaut `BeanProvider<T>` instances with lookup, iteration, streaming, qualifier composition, and definition access.\n\n`ProviderTypeInformationProvider` marks provider types as wrapper types for `Argument` type analysis.\n\n`io.micronaut.inject.validation.BeanDefinitionValidator` is the validation SPI used by `ValidatedBeanDefinition`.\n\n`io.micronaut.inject.validation.RequiresValidation` is an internal compile-time marker that generated definitions use to know validation is required.\n\n## Change Guidance\n\nKeep these contracts in sync with generated code in `inject-java`, `inject-groovy`, `inject-kotlin`, and the writers under annotation-processing modules. A default method change here can affect already-compiled generated definitions.\n\nPrefer adding new capability as default methods on interfaces only when old generated classes can keep working. If generated implementations must override a new method, update the relevant writers and tests together.\n\nAvoid reflection in new runtime paths. Existing deprecated reflection accessors are compatibility escape hatches and should not become part of new behavior.\n\nWhen a change touches bean selection, qualifiers, metadata, or lifecycle order, add focused tests that exercise lookup through `BeanContext`, not only direct unit calls on the helper class.\n","isInternal":false,"tokens":3877,"sizeBytes":20099},{"name":"examples-and-anti-patterns.md","path":".agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md)","tokens":300,"sizeBytes":279},{"name":"refactor-playbook.md","path":".agents/skills/agent-md-refactor/references/refactor-playbook.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/refactor-playbook.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/refactor-playbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/refactor-playbook.md)","tokens":300,"sizeBytes":261},{"name":"SKILL.md","path":".agents/skills/agent-md-refactor/SKILL.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/SKILL.md","title":"agent-md-refactor","category":"anthropic-skill","format":"markdown","content":"---\nname: agent-md-refactor\ndescription: Refactor oversized agent instruction files into a progressive-disclosure structure. Use when users ask to split AGENTS.md/CLAUDE.md/COPILOT.md, reduce instruction bloat, or organize guidance into linked topic files.\nlicense: Apache-2.0\ncompatibility: Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Agent MD Refactor\n\nRefactor monolithic instruction files into a compact root file plus linked topic files.\nKeep this file focused on execution flow and load detailed templates/examples from references.\n\n## Goal\n\nDeliver a maintainable instruction system with:\n\n- a minimal root instruction file containing only universal guidance,\n- linked topic files for detailed rules,\n- contradictions resolved and vague/redundant rules removed.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Refactor this AGENTS.md to use progressive disclosure.\"\n- \"Split my CLAUDE.md into focused instruction files.\"\n- \"My instruction file is too long, reorganize it.\"\n\nShould not trigger:\n\n- \"Explain what AGENTS.md is.\"\n- \"Fix one typo in CLAUDE.md.\"\n- \"Write a brand-new coding standard from scratch.\"\n\nMore examples: [examples-and-anti-patterns](references/examples-and-anti-patterns.md).\n\n## Procedure\n\n1. Inventory instruction sources (`AGENTS.md`, `CLAUDE.md`, `COPILOT.md`, related guidance docs).\n2. Detect contradictions and resolve by repository precedence.\n3. Keep only root-level essentials in the root instruction file.\n4. Group remaining content into 3-8 linked topic files with clear names.\n5. Remove non-actionable, redundant, and outdated directives.\n6. Validate links, coverage, and consistency before completion.\n\nDetailed step playbook: [refactor-playbook](references/refactor-playbook.md).\n\n## Inputs\n\n- Root instruction file path(s)\n- Existing repository conventions (commands, toolchain, style)\n- User constraints (must-keep rules, preferred layout)\n\n## Outputs\n\n- Refactored root instruction file (minimal, universal guidance)\n- Topic files with detailed rules\n- List of removed/merged rules with rationale\n- Notes on contradiction handling\n\n## Edge Cases\n\n- If rule precedence is impossible to infer, request one targeted user decision.\n- If multiple files repeat the same rule, keep one canonical source and replace others with links.\n- If the instruction file is already concise, avoid unnecessary splitting.\n- Use relative markdown links for portability.\n\n## Validation Checklist\n\n- [ ] Frontmatter is valid YAML and `name` matches directory.\n- [ ] Description states capability and usage triggers.\n- [ ] Root file contains only universal instructions.\n- [ ] Topic files are self-contained and linked from root.\n- [ ] Contradictions are resolved or explicitly called out.\n- [ ] Vague/default/redundant directives are removed or rewritten.\n- [ ] Relative links resolve.\n\n## References\n\n- [Refactor playbook](references/refactor-playbook.md)\n- [Examples and anti-patterns](references/examples-and-anti-patterns.md)\n","frontmatter":{"name":"agent-md-refactor","description":"Refactor oversized agent instruction files into a progressive-disclosure structure. Use when users ask to split AGENTS.md/CLAUDE.md/COPILOT.md, reduce instruction bloat, or organize guidance into linked topic files.","license":"Apache-2.0","compatibility":"Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md","metadata":{"author":"Álvaro Sánchez-Mariscal","version":"1.0.0"}},"isInternal":false,"tokens":663,"sizeBytes":3065},{"name":"SKILL.md","path":".agents/skills/coding/SKILL.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/coding/SKILL.md","title":"coding","category":"anthropic-skill","format":"markdown","content":"---\nname: coding\ndescription: Implement and review Java code changes for Micronaut framework repositories using maintainer standards, including JSpecify null-safety conventions. Use when users ask to add or refactor Java code, fix framework bugs, evolve internal APIs, or prepare committer-ready changes with tests and verification.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Coding (Micronaut Committer)\n\nUse this skill for maintainer-facing Java implementation work in Micronaut repositories. Do not default to end-user application shortcuts.\n\n## Goal\n\nDeliver minimal, source-backed Java changes that preserve framework quality: binary compatibility, JSpecify null-safety, reflection-free behavior, and full Gradle verification (`check`, `docs`, and compatibility checks when API-facing).\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Implement this Micronaut Java feature in `src/main/java` and keep API compatibility.\"\n- \"Refactor this module internals and mark non-public APIs correctly.\"\n- \"Fix failing framework tests and prepare committer-ready validation output.\"\n- \"Add configuration support using Micronaut conventions, not app-level shortcuts.\"\n\nShould not trigger:\n\n- \"Explain Micronaut basics to a beginner.\"\n- \"Create an end-user sample app from scratch.\"\n- \"Only edit release notes/changelog text.\"\n\n## Procedure\n\n1. Establish scope and API impact.\n2. Implement Java code with Micronaut maintainer conventions.\n3. Enforce API boundaries and binary compatibility.\n4. Document Java APIs and implementation intent.\n5. Keep Gradle/build changes aligned with repository conventions.\n6. Verify with maintainer-grade checks before completion.\n\n### 1) Establish scope and API impact\n\n- Identify affected modules and whether any change is public API or internal-only.\n- Inspect existing package patterns before editing (imports, nullability style, tests, naming).\n- For API-facing edits, plan compatibility checks up front (`japiCmp`).\n- Keep change surface minimal; avoid opportunistic refactors unless required.\n\n### 2) Implement Java with Micronaut maintainer conventions\n\n- Prefer modern Java idioms where they improve clarity (records, sealed types, pattern matching, `var` for local inference), but only when supported by the repository toolchain/target level.\n- Do not use fully qualified class names unless import conflicts force it.\n- Micronaut Java code uses JSpecify nullness annotations from `org.jspecify.annotations`; use JSpecify for new or modified nullability contracts.\n- New Java packages must include `package-info.java` with `@NullMarked` and `import org.jspecify.annotations.NullMarked`; when touching an existing package without `@NullMarked`, add it unless the local code has an explicit exception.\n- Use `org.jspecify.annotations.Nullable` for nullable values, including nullable parameters, return values, fields, array/component positions such as `String @Nullable []`, nullable collection elements such as `List<@Nullable T>`, and nullable type bounds such as `<T extends @Nullable Object>`.\n- Preserve existing nullability intent when editing older code. Use JSpecify for new or modified contracts, but do not rewrite deliberate compatibility annotations such as `io.micronaut.core.annotation.Nullable` or `jakarta.annotation.Nullable` unless the task is specifically a nullability migration and compatibility impact has been checked.\n- Avoid reflection-oriented implementations in framework code paths; prefer Micronaut compile-time/introspection mechanisms.\n- Use `jakarta.inject` APIs for DI, not `javax.inject`.\n- Prefer constructor injection and immutable state over field injection.\n- For configuration models, prefer `@ConfigurationProperties` over scattered `@Value` usage.\n\n### 3) Enforce API boundaries and compatibility\n\n- Treat all public-facing changes through a Semantic Versioning lens (`https://semver.org/`) before implementation.\n- Classify impact explicitly: patch for backward-compatible fixes, minor for backward-compatible feature additions, major for breaking API/behavioral changes.\n- Keep public API binary compatible unless a major-version change explicitly allows breaks.\n- Prefer non-breaking API evolution first: deprecate existing methods and add replacement variants/overloads instead of deleting methods or changing signatures in place.\n- When using the deprecate-and-add path, keep deprecated APIs functional, point to replacements in Javadoc, and schedule removals only for the next major version.\n- If breaking public-facing changes are explicitly allowed, document them in the user guide under `src/main/docs/guide` with migration notes, and update `toc.yml` when adding new guide sections.\n- Mark non-user-facing APIs with `@io.micronaut.core.annotation.Internal`.\n- Mark unstable public APIs with `@io.micronaut.core.annotation.Experimental` and avoid presenting them as stable contracts.\n- Mark members directly called by generated code with `@io.micronaut.core.annotation.UsedByGeneratedCode`; preserve those signatures unless the generated-code callers are updated in the same change.\n- Keep visibility as narrow as possible for non-public internals.\n- When deprecating API, provide migration-friendly Javadoc and avoid silent behavioral breaks.\n\n### 4) Document Java APIs and implementation intent\n\n- All public Java types and public methods must have Javadoc. Include public constructors when they are part of the user-facing API.\n- All new public Java types, methods, and user-facing constructors must include an `@since` Javadoc tag for the version where the PR will debut.\n- Determine the `@since` version from the approved target branch, not from guesswork. Inspect that branch's `gradle.properties` (`projectVersion`) and use the corresponding release version; for example, `4.9.0-SNAPSHOT` means the new API debuts in `4.9.0`.\n- If the PR is retargeted during follow-through, re-check the target branch's `gradle.properties` and update any newly added `@since` tags when the debut version changes.\n- Do not add `@since` tags to internal-only APIs annotated with `@Internal` unless the repository already does so for that internal package.\n- Internal and package-private methods should include maintainer-focused Javadoc when the implementation contract, lifecycle, invariants, or generated-code interaction is not obvious from the signature.\n- Complex new code should include focused inline comments that explain implementation decisions or invariants; do not narrate straightforward control flow.\n\n### 5) Keep Gradle/build changes convention-aligned\n\n- Use `./gradlew` for all Gradle execution.\n- Use Gradle version catalogs (`gradle/libs.versions.toml`) instead of hard-coded dependency versions.\n- Use appropriate scopes (`api`, `implementation`, `compileOnly`, `runtimeOnly`) based on API exposure.\n- Do not add custom build logic directly in module build files when it belongs in convention plugins.\n- When uncertain about module paths, use `./gradlew projects` and prefer canonical `micronaut-*` project names.\n\n### 6) Verify before completion\n\nFirst confirm canonical verification tasks from `CONTRIBUTING.md` and existing CI/build files, then run the repository equivalents from root.\n\nCommon sequence in Micronaut repositories:\n\n```bash\n./gradlew :<module>:compileTestJava\n# If module includes Groovy tests:\n./gradlew :<module>:compileTestGroovy\n./gradlew :<module>:test --tests 'pkg.ClassTest'\n./gradlew :<module>:test\n# If repository documents cM alias/checkstyle aggregate task:\n./gradlew -q cM\n./gradlew -q spotlessCheck\n./gradlew check\n./gradlew docs\n```\n\nFor API-affecting changes, also run if configured in the repository:\n\n```bash\n./gradlew japiCmp\n```\n\nIf Spotless fails, run `./gradlew -q spotlessApply` and re-run `spotlessCheck`.\n\n## Guardrails\n\n- Do not introduce `javax.inject` usage.\n- Do not introduce legacy or third-party nullability annotations for new or modified Micronaut Java contracts when JSpecify is available, except for deliberate compatibility annotations whose impact has been checked.\n- Do not hard-code dependency versions in module build files.\n- Do not break public APIs without explicit major-version intent.\n- Do not skip tests or docs verification for code changes.\n- Do not use reflection as a convenience in framework internals.\n\n## Delivery Contract\n\nWhen finishing implementation work, report:\n\n1. Exactly which files changed and why.\n2. Whether the change is API-facing or internal-only.\n3. Semantic Versioning impact classification (patch/minor/major) for any public-facing change.\n4. For deprecate-and-add API evolution, which elements were deprecated and which replacement variants were introduced.\n5. For breaking public-facing changes, which user guide files were updated and what migration guidance was added.\n6. For new public Java APIs, the `@since` version used and how it was derived from the target branch's `gradle.properties`.\n7. Commands executed for verification and outcomes.\n8. Any follow-up risk (for example compatibility implications).\n\n## Validation Checklist\n\n- [ ] `SKILL.md` frontmatter is valid and `name` matches directory (`coding`).\n- [ ] Guidance is maintainer-focused (not end-user app guidance).\n- [ ] Java conventions include JSpecify nullability (`@NullMarked`, `@Nullable`), DI, and reflection-free guidance.\n- [ ] API boundary guidance includes `@Internal`, `@Experimental`, `@UsedByGeneratedCode`, and compatibility checks.\n- [ ] Public Java types and methods require Javadoc.\n- [ ] New public Java APIs require `@since` tags derived from the approved target branch's `gradle.properties`.\n- [ ] Internal/package-private methods and complex new code include maintainer-focused Javadoc or inline comments when implementation intent is not obvious.\n- [ ] For public API evolution without breaking changes, deprecations include clear replacement guidance and functional compatibility is preserved.\n- [ ] If breaking changes are allowed, user guide docs in `src/main/docs/guide` are updated with migration notes.\n- [ ] Verification includes tests, style checks, `check`, and `docs`.\n\n## References\n\n- `CONTRIBUTING.md`\n- `MAINTAINING.md`\n- `.agents/skills/gradle/SKILL.md`\n- `.agents/skills/docs/SKILL.md`\n- `.agents/skills/skill-creator/references/spec-checklist.md`\n","frontmatter":{"name":"coding","description":"Implement and review Java code changes for Micronaut framework repositories using maintainer standards, including JSpecify null-safety conventions. Use when users ask to add or refactor Java code, fix framework bugs, evolve internal APIs, or prepare committer-ready changes with tests and verification.","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"}},"isInternal":false,"tokens":2182,"sizeBytes":10393},{"name":"control-panel-patterns.md","path":".agents/skills/docs/references/control-panel-patterns.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/control-panel-patterns.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/docs/references/control-panel-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/control-panel-patterns.md)","tokens":300,"sizeBytes":245},{"name":"micronaut-docs-providers.md","path":".agents/skills/docs/references/micronaut-docs-providers.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/micronaut-docs-providers.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/docs/references/micronaut-docs-providers.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/micronaut-docs-providers.md)","tokens":300,"sizeBytes":249},{"name":"SKILL.md","path":".agents/skills/docs/SKILL.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/SKILL.md","title":"docs","category":"anthropic-skill","format":"markdown","content":"---\nname: docs\ndescription: 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.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Docs (Micronaut Maintainer)\n\nUse this skill for maintainer-facing guide work in Micronaut framework repositories. Do not default to end-user application documentation advice.\n\n## Goal\n\nImplement 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.\n\n## Procedure\n\n1. Confirm repository docs layout and build tasks.\n2. Plan `toc.yml` and `.adoc` updates in lockstep.\n3. Apply Micronaut docs macro conventions used by maintainers.\n4. Prefer generated configuration property references over manual tables.\n5. Build and validate `publishGuide` and `docs` outputs.\n\n### 1) Confirm docs layout and build tasks\n\n- Check `src/main/docs/guide/toc.yml` first.\n- List relevant guide files under `src/main/docs/guide/**/*.adoc`.\n- If examples are involved, inspect `doc-examples/` (if present) and plan snippet tags from executable sources.\n- If assets are involved, keep images in `src/main/docs/resources/img/`.\n- Confirm standard commands from `CONTRIBUTING.md`:\n  - `./gradlew publishGuide` (or `./gradlew pG`) for guide assembly.\n  - `./gradlew docs` for guide + API docs assembly.\n- If repository layout diverges from template conventions, follow local conventions and explicitly report the divergence.\n\n### 2) Keep `toc.yml` and files in lockstep\n\nTreat `src/main/docs/guide/toc.yml` as navigation source of truth.\n\nRules:\n\n1. Every visible section must exist in `toc.yml`.\n2. Every `toc.yml` entry must resolve to a real `.adoc` path.\n3. Preserve section order unless the request explicitly changes navigation.\n4. Use nested sections for grouped topics when needed.\n\nExample nested pattern:\n\n```yaml\ncontrolPanels:\n  title: Available Control Panels\n  builtIn: Built-in\n  management: Management\n```\n\nThis maps to:\n\n- `src/main/docs/guide/controlPanels.adoc`\n- `src/main/docs/guide/controlPanels/builtIn.adoc`\n- `src/main/docs/guide/controlPanels/management.adoc`\n\n### 3) Apply Micronaut docs macro conventions\n\nUse docs macros registered by `micronaut-build` (`DocsExtensionRegistry`) and maintained for framework guides.\n\nPreferred mapping:\n\n| Need | Preferred pattern |\n|---|---|\n| Dependency instructions | `dependency:group:artifact[scope=...]` |\n| Source sample synchronized with test suites | `snippet::path/to/File.ext[tags=...]` |\n| Multi-format configuration snippets | `[configuration]` listing blocks |\n| Configuration properties reference | `include::{includedir}configurationProperties/<fqcn>.adoc[]` |\n| Shell commands | `[source,bash]` blocks |\n| Repository/release links | `https://github.com/{githubSlug}` and `/releases` links |\n\nGuardrails:\n\n- Do not handwrite separate Maven/Gradle dependency blocks when `dependency:` is suitable.\n- Do not replace Micronaut `snippet::` macros with direct Asciidoctor `[source]` includes or pasted code blocks just because the current examples have one language. The macro is the multi-language, source-backed contract for generated module docs.\n- Do not remove snippet callouts when touching examples. Preserve existing callout tags and callout explanations unless the underlying executable source no longer has that behavior.\n- Do not duplicate configuration property tables manually when generated references exist.\n- Keep environment-sensitive instructions explicit (for example `MICRONAUT_ENVIRONMENTS=dev`).\n- Prefer stable links to official Micronaut docs for endpoint semantics.\n\n### 4) Use generated configuration property references correctly\n\n- `micronaut-docs` provides `AsciiDocPropertyReferenceWriter`, which generates AsciiDoc property fragments from configuration metadata.\n- Micronaut docs build wiring consumes those fragments via `{includedir}configurationProperties/...` includes.\n- Prefer includes over hand-maintained property tables.\n\nSee `references/micronaut-docs-providers.md` for confirmed provider/macro details and source locations.\n\n### 5) Build and validate documentation\n\nFrom repository root, run:\n\n```bash\n./gradlew publishGuide\n./gradlew docs\n```\n\nValidation checklist:\n\n1. Commands exit with code `0`.\n2. Output exists under `build/docs/`.\n3. Updated sections appear in navigation and render without missing includes.\n4. Added images/links resolve.\n\nIf `publishGuide` passes but `docs` fails, fix the failing stage and rerun both commands.\n\n## Maintainer Delivery Contract\n\nWhen finishing docs work, report:\n\n1. Exact changed files (`.adoc`, `toc.yml`, docs resources).\n2. Which conventions were applied (`dependency:`, `snippet::`, `[configuration]`, generated property includes).\n3. Build commands run and outcomes.\n4. Any repo-specific divergences or follow-ups.\n\n## Validation Checklist\n\n- [ ] `toc.yml` and `.adoc` changes are consistent.\n- [ ] Macros and includes follow Micronaut maintainer conventions.\n- [ ] Existing `snippet::` macros and callouts are preserved unless executable source changes require a different tagged snippet.\n- [ ] `publishGuide` and `docs` executed successfully.\n- [ ] Output and navigation verified under `build/docs/`.\n- [ ] Guidance remains maintainer-focused (not generic app docs).\n\n## References\n\n- `references/micronaut-docs-providers.md`\n- `references/control-panel-patterns.md`\n- `CONTRIBUTING.md`\n- `src/main/docs/guide/toc.yml`\n","frontmatter":{"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"}},"isInternal":false,"tokens":1292,"sizeBytes":5754},{"name":"gradle-best-practices.md","path":".agents/skills/gradle/references/gradle-best-practices.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/gradle-best-practices.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/gradle/references/gradle-best-practices.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/gradle-best-practices.md)","tokens":300,"sizeBytes":247},{"name":"micronaut-build-plugins.md","path":".agents/skills/gradle/references/micronaut-build-plugins.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/micronaut-build-plugins.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/gradle/references/micronaut-build-plugins.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/micronaut-build-plugins.md)","tokens":300,"sizeBytes":251},{"name":"SKILL.md","path":".agents/skills/gradle/SKILL.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/SKILL.md","title":"gradle","category":"anthropic-skill","format":"markdown","content":"---\nname: gradle\ndescription: Execute Gradle maintainer operations for Micronaut repositories using micronaut-build internals and modern Gradle best practices. Use when users ask to diagnose build failures, maintain BOM/version catalogs, manage publishing/signing, enforce binary compatibility, or debug micronaut-build plugin behavior.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects using micronaut-build plugins\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n  gradle-major-version: \"9.x\"\nmcp:\n  maven-tools:\n    command: docker\n    args: [\"run\", \"-i\", \"--rm\", \"arvindand/maven-tools-mcp:latest\"]\n---\n\n# Gradle (Micronaut Committer)\n\nUse this skill for Micronaut framework maintainer work. Do not default to end-user app guidance.\n\n## Goal\n\nApply correct, source-backed Gradle changes in Micronaut repositories, using the `micronaut-build` plugin contracts and current Gradle best practices.\n\nCurrent coverage target: repositories on Gradle major line `9.x`.\n\nFor dependency-intelligence tasks (version freshness, stability, release cadence, CVE/license checks), use the embedded `maven-tools` MCP via `skill_mcp`.\n\n## Procedure\n\n1. Identify build shape and active plugins.\n2. Map requested work to exact `micronaut-build` plugin behavior.\n3. Execute minimal maintainer-safe change.\n4. Verify with targeted and aggregate Gradle tasks.\n\n### 1) Establish build shape first\n\n- Inspect `settings.gradle` or `settings.gradle.kts` for settings plugins and dependency management.\n- Confirm `io.micronaut.build.shared.settings` is present unless the repository intentionally diverged.\n- Validate settings-scoped plugins (especially Develocity wiring) in `settings.gradle(.kts)`, not in project `build.gradle(.kts)`.\n- Confirm root build applies `io.micronaut.build.internal.parent` for standard aggregation behavior.\n- Inspect root and impacted module build files for applied plugin IDs and `micronautBuild` extension usage.\n- Inspect `buildSrc`/convention plugins before modifying module build scripts.\n- Inspect `gradle.properties` and `gradle/*.versions.toml` for version source and overrides.\n- Treat module directory names and Gradle project paths separately; if standardized names are enabled, use `:micronaut-*` paths for task targeting.\n- If module paths are unclear, run `./gradlew projects`.\n- If dependency resolution is involved, capture `dependencyInsight` before changing files.\n\n### 2) Use source-of-truth plugin contracts\n\n- Use `references/micronaut-build-plugins.md` as the authoritative plugin behavior map.\n- Treat `micronaut-build` source as primary truth. Its README may be outdated.\n- Remember default plugin IDs are internal: `io.micronaut.build.internal.<name>`.\n- Important exception: `io.micronaut.build.shared.settings`.\n\n### 3) Execute maintainer workflows\n\n- **Build failures**: reproduce with minimal task path, then expand to module `check`, then root validation.\n- **Catalog/version updates**: use plugin-provided workflows (`updateVersionCatalogs`, `useLatestVersions`) where available.\n- **Catalog imports**: prefer `micronautBuild { importMicronautCatalog() }` and alias-specific imports over ad hoc BOM wiring when repository conventions use settings extension catalog import.\n- **Dependency intelligence**: use the `maven-tools` MCP for latest stable versions, upgrade comparisons, and dependency health signals before changing catalogs or BOM constraints.\n- **Dependency scope hygiene**: choose `api` only for public API surface; use `implementation` for internals; use `compileOnly`/`runtimeOnly` intentionally.\n- **BOM/publishing**: verify BOM generation, inlining behavior, publication metadata, and signing gates.\n- **Binary compatibility**: keep baseline discovery and accepted API changes explicit; never silently suppress regressions.\n- **Docs/quality**: treat root-only aggregator plugins and docs pipelines as first-class checks.\n- **Layering**: prefer convention plugin changes (`buildSrc`) over duplicating logic in many module build files.\n\n### 4) Verify before completion\n\n- Run at least one targeted task and one aggregate task:\n  - `./gradlew :<module>:check`\n  - `./gradlew check`\n- For maintainer pipelines, include docs and style gates where applicable:\n  - `./gradlew check docs`\n  - `./gradlew spotlessApply spotlessCheck`\n- For API-affecting changes, run compatibility checks:\n  - `./gradlew japiCmp`\n- For newly added published modules, define when binary compatibility checks start in module build logic (example):\n\n```kotlin\nmicronautBuild {\n    binaryCompatibility.enabledAfter(\"2.0.0\")\n}\n```\n\n- Use the repository's intended first compatible release version instead of blindly reusing `2.0.0`.\n- Add focused diagnostics when needed:\n  - `./gradlew dependencyInsight --configuration <conf> --dependency <module>`\n  - `./gradlew --scan <task>`\n- Report exact commands and outcomes.\n\n## Guardrails\n\n- Do not use `enforcedPlatform` when plugin logic explicitly forbids it.\n- Do not bypass Micronaut version mismatch checks except intentional development-version flows.\n- Do not apply root-only plugins to subprojects.\n- Do not replace framework maintainer workflows with generic app-centric shortcuts.\n\n## Best Practices\n\nUse `references/gradle-best-practices.md` for operational standards on:\n\n- configuration and build cache behavior,\n- provider/lazy configuration patterns,\n- toolchains and reproducibility,\n- secure publishing and dependency verification,\n- CI reliability.\n\n## Examples\n\n- \"Diagnose why micronaut-core version mismatch fails on compileClasspath.\"\n- \"Update version catalogs safely and apply latest allowed minor versions.\"\n- \"Fix Sonatype release pipeline behavior for a non-snapshot release.\"\n- \"Investigate binary compatibility failure and validate accepted changes file usage.\"\n\n## Validation Checklist\n\n- [ ] Active plugins identified from build files.\n- [ ] Decisions mapped to `micronaut-build` source behavior.\n- [ ] Changes align with maintainer workflows.\n- [ ] Verification tasks run and outcomes captured.\n- [ ] No end-user-only Gradle guidance substituted for framework operations.\n\n## References\n\n- `references/micronaut-build-plugins.md`\n- `references/gradle-best-practices.md`\n","frontmatter":{"name":"gradle","description":"Execute Gradle maintainer operations for Micronaut repositories using micronaut-build internals and modern Gradle best practices. Use when users ask to diagnose build failures, maintain BOM/version catalogs, manage publishing/signing, enforce binary compatibility, or debug micronaut-build plugin behavior.","license":"Apache-2.0","compatibility":"Micronaut framework repositories in micronaut-projects using micronaut-build plugins","metadata":{"author":"Álvaro Sánchez-Mariscal","version":"1.0.0","gradle-major-version":"9.x"},"mcp":{"maven-tools":{"command":"docker","args":["run","-i","--rm","arvindand/maven-tools-mcp:latest"]}}},"isInternal":false,"tokens":1361,"sizeBytes":6229},{"name":"guide-authoring-conventions.md","path":".agents/skills/guides/references/guide-authoring-conventions.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-authoring-conventions.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/guides/references/guide-authoring-conventions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-authoring-conventions.md)","tokens":300,"sizeBytes":259},{"name":"guide-inventory.md","path":".agents/skills/guides/references/guide-inventory.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-inventory.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/guides/references/guide-inventory.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-inventory.md)","tokens":300,"sizeBytes":235},{"name":"pdf-export-and-pr.md","path":".agents/skills/guides/references/pdf-export-and-pr.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/pdf-export-and-pr.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/guides/references/pdf-export-and-pr.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/pdf-export-and-pr.md)","tokens":300,"sizeBytes":239},{"name":"repository-workflow.md","path":".agents/skills/guides/references/repository-workflow.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/repository-workflow.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/guides/references/repository-workflow.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/repository-workflow.md)","tokens":300,"sizeBytes":243},{"name":"SKILL.md","path":".agents/skills/guides/SKILL.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/SKILL.md","title":"guides","category":"anthropic-skill","format":"markdown","content":"---\nname: guides\ndescription: Create or update standalone Micronaut Guides in micronaut-projects/micronaut-guides, including topic discovery, guide authoring, validation, PDF export, and pull request handoff. Use for requests to create a Micronaut Guide, add a guide to micronaut-guides, author a tutorial for a Micronaut module, or prepare a guide PR with PDF.\nlicense: Apache-2.0\ncompatibility: Micronaut Guides repository and Micronaut repositories that need standalone tutorial PRs\nmetadata:\n  author: Micronaut Agent Company\n  version: \"1.0.0\"\n---\n\n# Guides (Micronaut Maintainer)\n\nUse this skill for standalone tutorial work in `micronaut-projects/micronaut-guides`. Start from the caller's local Micronaut repository to understand the API, module, or behavior being taught, then do the guide implementation in a current clone of `micronaut-guides`.\n\nDo not use this skill for ordinary module documentation under `src/main/docs/guide`; use the `docs` skill for that work. Do not use it for generic non-Micronaut tutorials.\n\n## Goal\n\nProduce a reviewable pull request against `micronaut-projects/micronaut-guides` with source-backed guide content, validation evidence, and a PDF export of the rendered guide page for maintainers.\n\n## Procedure\n\n1. Define the topic from the local repository.\n2. Refresh upstream `micronaut-guides` and deduplicate against existing guides.\n3. Inspect current repository conventions before writing.\n4. Author the smallest correct guide change.\n5. Validate the guide and render the page.\n6. Export a PDF and prepare the PR handoff.\n\n### 1) Define the Topic\n\n- Identify the exact Micronaut feature, module, API, integration, or migration path the guide should teach.\n- Read the local implementation, tests, module docs, and examples that prove the behavior.\n- Decide the target reader task in one sentence, for example: \"Use Micronaut Serialization with a custom serializer in a controller response.\"\n- Prefer a runnable application and tests over prose-only explanation.\n\n### 2) Refresh and Deduplicate\n\nWork from current upstream facts, not this skill's snapshot:\n\n```bash\ngit clone https://github.com/micronaut-projects/micronaut-guides.git\ncd micronaut-guides\ngit fetch origin\ngit switch master\ngit pull --ff-only\n```\n\nBefore creating a new guide, inventory `guides/*/metadata.json` and nearby guide source. Check titles, slugs, tags, categories, `apps`, `base`, `publish`, and guide bodies for duplicates or near-duplicates. Treat `publish: false` guides as base or partial guides, not public topics, but inspect them when a new guide could reuse them.\n\nIf an existing guide already teaches the task, update that guide instead of creating a duplicate. If overlap is ambiguous, stop and ask for maintainer direction.\n\n### 3) Inspect Current Conventions\n\nAlways read these current upstream files before editing:\n\n- `README.md`\n- `build.gradle`\n- `buildSrc/src/main/java/io/micronaut/guides/core/Guide.java`\n- `buildSrc/src/main/java/io/micronaut/guides/Category.java`\n- `buildSrc/src/main/resources/guide-metadata.schema.json`\n- Nearby guides in the same topic family\n\nUse `references/repository-workflow.md` for clone, branch, build-output, task naming, and validation details. Use `references/guide-authoring-conventions.md` for metadata, directory layout, macros, placeholders, and base-guide rules.\n\n### 4) Author the Guide\n\n- Choose a kebab-case slug that matches the reader task and does not collide with existing guide directories.\n- Create or update `guides/<slug>/metadata.json`.\n- Use one root AsciiDoc file named `<slug>.adoc` unless current metadata conventions require `asciidoctor`.\n- Put source under the expected Java, Groovy, and Kotlin layout when the guide supports multiple languages. If the feature is language-specific, set `languages` in metadata and explain why in the PR.\n- For single-app guides, use an app named `default`. For multi-app guides, mirror existing app-directory patterns and declare each app in metadata.\n- Use validated guide macros such as `common:`, `source:`, `resource:`, `test:`, `testResource:`, `callout:`, `external:`, `dependency:`, and `guideLink:` instead of manually duplicating generated paths.\n- Use conditional blocks such as `:exclude-for-languages:` and `:exclude-for-build:` for language-specific or build-tool-specific text.\n- Keep secrets out of source, generated code, rendered HTML, and the PDF. Use placeholders and documented cleanup steps for cloud resources.\n\n### 5) Validate\n\nConvert the guide slug from kebab-case to lowerCamelCase for dynamic tasks:\n\n```bash\n./gradlew <guideLowerCamel>Build\n./gradlew <guideLowerCamel>RunTestScript\n```\n\nFor broad validation or shared infrastructure changes, run:\n\n```bash\n./gradlew build\n```\n\nGenerated applications are under `build/code`. Rendered HTML and site assets are under `build/dist`. For cloud, credentialed, or cost-incurring guides, do not run provisioning commands without explicit confirmation; document skipped validation and the reason.\n\n### 6) Export PDF and Handoff\n\nAfter rendering, export the reviewed HTML page to PDF. Prefer a headless browser export when available, and fall back to a manual browser \"Print to PDF\" export when needed. Keep the PDF as local review evidence or attach it to the PR; do not commit generated PDFs unless maintainers explicitly request that.\n\nThe PR body must include:\n\n- Guide slug and user-facing task.\n- Files changed.\n- Commands run and outcomes.\n- Rendered HTML path inspected.\n- PDF filename and whether it is attached or linked.\n- Any skipped validation, cloud costs, credentials, or cleanup notes.\n\nSee `references/pdf-export-and-pr.md` for the export workflow and PR checklist.\n\n## Security Guardrails\n\n- Never commit secrets, tokens, local credentials, cloud account identifiers, `.env` files, or generated PDFs containing private data.\n- Ask before running commands that provision cloud resources or incur cost.\n- Prefer sample placeholders for credentials and explain cleanup for created resources.\n- Scrub screenshots, HTML, logs, and PDFs before attaching them to a PR.\n- Do not add custom Starter features, dependencies, or buildSrc changes unless the guide topic requires them and nearby guide conventions support the change.\n\n## Examples\n\nUse this skill for:\n\n- \"Create a Micronaut Guide for the new serialization feature.\"\n- \"Add a guide to `micronaut-guides` for this module.\"\n- \"Author a tutorial for Micronaut Data's new repository behavior.\"\n- \"Prepare a guide PR with the rendered PDF.\"\n\nDo not use this skill for:\n\n- \"Update `src/main/docs/guide/toc.yml` in this module.\"\n- \"Fix the release history page in this repository.\"\n- \"Write a generic blog post about Java.\"\n\n## Validation Checklist\n\n- [ ] Current `micronaut-guides` was cloned or fetched before writing.\n- [ ] Existing guide titles, slugs, tags, categories, and `publish: false` bases were checked for duplicates.\n- [ ] `README.md`, metadata schema, category source, and nearby guide examples were inspected.\n- [ ] Guide source uses current metadata, directory, macro, language, and build-tool conventions.\n- [ ] Single-guide build and test-script tasks were run, or skipped with a specific reason.\n- [ ] Rendered HTML was inspected under `build/dist`.\n- [ ] PDF export was created and named in the PR handoff.\n- [ ] PR handoff explains changed files, validation, skipped steps, and any security-sensitive handling.\n\n## References\n\n- `references/repository-workflow.md`\n- `references/guide-authoring-conventions.md`\n- `references/guide-inventory.md`\n- `references/pdf-export-and-pr.md`\n","frontmatter":{"name":"guides","description":"Create or update standalone Micronaut Guides in micronaut-projects/micronaut-guides, including topic discovery, guide authoring, validation, PDF export, and pull request handoff. Use for requests to create a Micronaut Guide, add a guide to micronaut-guides, author a tutorial for a Micronaut module, or prepare a guide PR with PDF.","license":"Apache-2.0","compatibility":"Micronaut Guides repository and Micronaut repositories that need standalone tutorial PRs","metadata":{"author":"Micronaut Agent Company","version":"1.0.0"}},"isInternal":false,"tokens":1691,"sizeBytes":7563},{"name":"sourcegen-cookbook.md","path":".agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md)","tokens":300,"sizeBytes":267},{"name":"SKILL.md","path":".agents/skills/micronaut-sourcegen/SKILL.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/micronaut-sourcegen/SKILL.md","title":"micronaut-sourcegen","category":"anthropic-skill","format":"markdown","content":"---\nname: micronaut-sourcegen\ndescription: Add, integrate, or review Micronaut Sourcegen usage in modules that generate Java source, Kotlin source, Groovy-compatible source, or bytecode from ObjectDef, TypeDef, MethodDef, ExpressionDef, StatementDef, and SourceGenerator APIs.\nlicense: Apache-2.0\ncompatibility: Micronaut framework and library modules that use io.micronaut.sourcegen for compile-time generation\nmetadata:\n  author: Denis Stepanov\n  version: \"1.0.0\"\n---\n\n# Micronaut Sourcegen\n\nUse this skill when a Micronaut module wants to generate types with Micronaut Sourcegen instead of handwritten source strings, reflection, JavaPoet/KotlinPoet calls in visitors, or ad hoc bytecode. The target module may emit Java source, Kotlin source, Groovy-compatible source, or bytecode, but the generation logic should model the type once with `io.micronaut.sourcegen.model`.\n\n## Goal\n\nHelp other modules adopt Micronaut Sourcegen safely: choose the right backend, wire the right processor dependencies, build language-neutral model definitions, and verify generated Java/Kotlin/bytecode behavior with targeted tests.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Use Micronaut Sourcegen in this module to generate a repository implementation.\"\n- \"Generate bytecode instead of Java source for this visitor.\"\n- \"Make this annotation processor generate Java and Kotlin outputs with Sourcegen.\"\n- \"Replace handwritten generated-source strings with `ClassDef` and `MethodDef`.\"\n- \"Add method bodies with switches, static calls, static field arguments, and constructor calls.\"\n\nShould not trigger:\n\n- \"Only edit user guide text.\"\n- \"Only change Gradle publishing metadata.\"\n- \"Only refactor backend writer internals without a module consuming Sourcegen.\"\n- \"Explain Micronaut annotation processing without generated types.\"\n\n## Procedure\n\n1. Identify the consuming module and generation target.\n2. Choose one backend for each compilation path.\n3. Wire dependencies using the repository version catalogs and processor configurations.\n4. Implement generation in a visitor with Sourcegen model builders and helpers.\n5. Emit through `SourceGenerator.write(...)` or bytecode writer APIs as appropriate.\n6. Add cross-target tests for the generated contract.\n7. Run focused compile/test/style verification.\n\n### 1) Identify the Consuming Module\n\n- Confirm whether the module is an annotation processor/generator module, an application/test-suite module consuming a generator, or a backend writer module.\n- Locate existing visitor registration under `META-INF/services/io.micronaut.inject.visitor.TypeElementVisitor`.\n- Identify source language paths:\n  - Java annotation processing uses `annotationProcessor`.\n  - Kotlin compilation usually uses `ksp`.\n  - Bytecode generation runs during Java-language processing and writes class files directly.\n- Inspect existing generated-type tests before changing behavior.\n\n### 2) Choose the Backend\n\n- Use `sourcegen-generator-java` when the module should emit `.java` source for `VisitorContext.Language.JAVA`; it also provides `GroovyPoetSourceGenerator` for `GROOVY`.\n- Use `sourcegen-generator-kotlin` when Kotlin/KSP processing should emit `.kt` source for `VisitorContext.Language.KOTLIN`.\n- Use `sourcegen-generator-bytecode` when Java-language processing should emit `.class` files directly through `ByteCodeGenerator`.\n- Do not put both Java-source and bytecode Sourcegen generators on the same Java annotation-processor path unless the module intentionally owns selection. Both advertise `VisitorContext.Language.JAVA`, and `SourceGenerators.findByLanguage(JAVA)` expects a single effective backend.\n- Use `sourcegen-bytecode-writer` directly only when implementing or testing bytecode writer behavior, not as the normal integration point for consuming annotation processors.\n\n### 3) Wire Dependencies\n\n- In a generator/processor module, depend on `sourcegen-generator` for the model and service lookup APIs. Add `sourcegen-annotations` only when the module consumes Sourcegen annotations such as builders/wither support.\n- In a Java consumer/test module, add the chosen backend and the custom generator to `annotationProcessor`.\n- In a Kotlin consumer/test module, add the Kotlin backend and KSP-compatible custom generator to `ksp`.\n- In a bytecode consumer/test module, add `sourcegen-generator-bytecode` to `annotationProcessor`.\n- Use Gradle version catalogs and existing project accessors. Do not hardcode dependency coordinates or versions.\n\nExample repository-local shapes:\n\n```kotlin\ndependencies {\n    implementation(projects.sourcegenGenerator)\n\n    annotationProcessor(projects.sourcegenGeneratorJava)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n```kotlin\ndependencies {\n    ksp(projects.sourcegenGeneratorKotlin)\n    ksp(projects.myCustomGeneratorsKotlin)\n}\n```\n\n```kotlin\ndependencies {\n    annotationProcessor(projects.sourcegenGeneratorBytecode)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n### 4) Build Models With Factories, Not Record Constructors\n\n- Always create Sourcegen model elements through builders, factory methods, or helper methods: `ClassDef.builder`, `InterfaceDef.builder`, `RecordDef.builder`, `EnumDef.builder`, `AnnotationObjectDef.builder`, `MethodDef.builder`, `MethodDef.constructor`, `FieldDef.builder`, `PropertyDef.builder`, `ParameterDef.builder`, `TypeDef.of`, `ClassTypeDef.of`, `TypeDef.parameterized`, `ExpressionDef.constant`, `StatementDef.multi`, `StatementDef.doTry`, `expr.returning`, `expr.invoke`, `type.invokeStatic`, `type.getStaticField`, and switch/if helper methods.\n- Do not instantiate DSL records directly in consuming modules, for example avoid `new ClassTypeDef.Parameterized(...)`, `new TypeDef.Array(...)`, `new ExpressionDef.Constant(...)`, `new StatementDef.Switch(...)`, or other `new ...record(...)` forms.\n- If a construct has no public helper yet, add or use a small named helper/factory at the nearest appropriate level instead of spreading direct record construction through module code.\n- Keep model construction language-neutral. Do not call JavaPoet, KotlinPoet, ASM, or write source strings from a visitor unless the task is explicitly inside a backend writer.\n\n### 5) Implement Visitors\n\n- Prefer `TypeElementVisitor` with `VisitorKind.ISOLATING` when generated output depends only on the visited element.\n- Resolve the backend through `SourceGenerators.findByLanguage(context.getLanguage()).orElse(null)` and return when none is available.\n- Build `ObjectDef` instances from Micronaut AST metadata (`ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`) when possible.\n- Emit with `sourceGenerator.write(objectDef, context, originatingElement)`.\n- Use `SourceGenerators.handleFatalException(...)` when generation may postpone to a later round.\n\nMinimal visitor shape:\n\n```java\nSourceGenerator sourceGenerator = SourceGenerators.findByLanguage(context.getLanguage()).orElse(null);\nif (sourceGenerator == null) {\n    return;\n}\n\nClassDef generated = ClassDef.builder(element.getPackageName() + \".Generated\")\n    .addModifiers(Modifier.PUBLIC, Modifier.FINAL)\n    .addMethod(MethodDef.builder(\"name\")\n        .addModifiers(Modifier.PUBLIC)\n        .returns(TypeDef.STRING)\n        .build((aThis, params) -> ExpressionDef.constant(\"generated\").returning()))\n    .build();\n\nsourceGenerator.write(generated, context, element);\n```\n\n### 6) Model Generated Behavior\n\n- Use `ClassDef`, `InterfaceDef`, `RecordDef`, `EnumDef`, and `AnnotationObjectDef` for generated type kind.\n- Use `TypeDef` and `ClassTypeDef` for primitives, arrays, generics, generated class names, nullability, and static field owners.\n- Use `MethodDef` body builders for executable logic. Prefer explicit `returns(...)` for public or non-trivial generated methods.\n- When generated code reads or writes a field that the same generator defines, keep the `FieldDef` instance and reference it with `aThis.field(fieldDef)` or `generatedType.getStaticField(fieldDef)` instead of repeating the field name and type.\n- When generated code invokes a method that the same generator defines, keep the `MethodDef` instance and invoke it with `receiver.invoke(methodDef, ...)` or `generatedType.invokeStatic(methodDef, ...)` instead of repeating the method name, parameter types, and return type.\n- When generated code targets an existing method or field that is accessible reflectively and present on the annotation processor classpath, prefer a reflective handle from `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)`. Pass method handles to `receiver.invoke(method, ...)` or `type.invokeStatic(method, ...)`; pass static field handles to `type.getStaticField(field)`; for instance fields, centralize the field-name/type bridge in a helper fed by the reflective `Field`. This uses reflection only at generation time to describe a known member; it must not generate runtime reflection.\n- Use `StatementDef.multi(...)`, `expr.returning()`, `expr.newLocal(...)`, `condition.doIf(...)`, `expr.asExpressionSwitch(...)`, `expr.asStatementSwitch(...)`, `StatementDef.doTry(...)`, and invocation helpers to compose bodies.\n- Use `ClassTypeDef.getStaticField(\"NAME\", valueType)` for enum constants, static constants, class literals, and static-field arguments passed to invocations.\n- String switches are supported. For string switch cases, use a `TypeDef.STRING` switch expression and `ExpressionDef.constant(\"case\")` keys with `asExpressionSwitch(...)` or `asStatementSwitch(...)`.\n\n### 7) Verify\n\n- Compile the generator module and the consuming test module.\n- Run targeted tests that load or compile generated types for each backend touched.\n- For Java source generation, verify generated `.java` behavior through Java test-suite tests.\n- For Kotlin source generation, verify KSP and Kotlin tests.\n- For bytecode generation, verify runtime behavior and bytecode writer tests when the model shape exercises bytecode-specific paths.\n- Finish source changes with the repository checks required by `AGENTS.md`: affected compile tasks, targeted tests, full affected module tests, `./gradlew -q cM`, and `./gradlew -q spotlessCheck` if new files were added.\n\n## Backend Notes\n\n- Java source backend: `JavaPoetSourceGenerator` writes Java source for `VisitorContext.Language.JAVA`.\n- Groovy-compatible source backend: `GroovyPoetSourceGenerator` reuses the Java source generator for `GROOVY`.\n- Kotlin source backend: `KotlinPoetSourceGenerator` writes Kotlin source for `VisitorContext.Language.KOTLIN`.\n- Bytecode backend: `ByteCodeGenerator` advertises `JAVA` and writes class files through `context.visitClass(...)`; it does not support `write(ObjectDef, Writer)`.\n\n## Cookbook\n\nUse `references/sourcegen-cookbook.md` for adoption patterns covering:\n\n- Gradle dependency placement for generator modules and consumers,\n- backend selection for Java, Kotlin, Groovy-compatible source, and bytecode,\n- type/model construction using builders and helper methods,\n- generated classes, interfaces, records, enums, annotations, method bodies, switches, invocations, static fields, arrays, lambdas, and super constructors,\n- testing and validation across source and bytecode backends.\n\n## Guardrails\n\n- Do not instantiate Sourcegen DSL records directly in consuming modules; use builders, factories, or named helper methods.\n- Do not duplicate generated member metadata in generated code bodies; prefer the existing `FieldDef` or `MethodDef` instance when reading/writing generated fields or invoking generated methods.\n- Do not use string-based references for known existing classpath methods/static fields when a `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)` handle can describe the member safely.\n- Do not generate source text with string concatenation when a Sourcegen model construct exists.\n- Do not place multiple `JAVA` Sourcegen backends on the same annotation-processor path unless selection is explicit and tested.\n- Do not use backend-specific JavaPoet/KotlinPoet/ASM APIs from normal visitors.\n- Do not use reflection for generation metadata when Micronaut AST elements are available.\n- Do not break public Sourcegen APIs without explicit approval and compatibility checks.\n\n## Validation Checklist\n\n- [ ] Skill folder name and `name:` frontmatter are `micronaut-sourcegen`.\n- [ ] Consuming module and target backend are identified.\n- [ ] Java/Kotlin/bytecode processor dependencies are scoped correctly.\n- [ ] Only one effective `JAVA` Sourcegen backend is present for a Java compilation path.\n- [ ] Model definitions use builders/factories/helpers, not direct DSL record constructors.\n- [ ] Generated fields/methods referenced from generated bodies are referenced through their `FieldDef`/`MethodDef` instances where available.\n- [ ] Generated sources/classes are emitted through `SourceGenerator.write(...)` or backend writer APIs where appropriate.\n- [ ] Targeted and full affected tests pass, or unrun checks are reported clearly.\n\n## References\n\n- `references/sourcegen-cookbook.md`\n","frontmatter":{"name":"micronaut-sourcegen","description":"Add, integrate, or review Micronaut Sourcegen usage in modules that generate Java source, Kotlin source, Groovy-compatible source, or bytecode from ObjectDef, TypeDef, MethodDef, ExpressionDef, StatementDef, and SourceGenerator APIs.","license":"Apache-2.0","compatibility":"Micronaut framework and library modules that use io.micronaut.sourcegen for compile-time generation","metadata":{"author":"Denis Stepanov","version":"1.0.0"}},"isInternal":false,"tokens":2705,"sizeBytes":13065},{"name":"research-synthesis.md","path":".agents/skills/skill-creator/references/research-synthesis.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/skill-creator/references/research-synthesis.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Research Synthesis\n\nThis note captures the design decisions used for `skill-creator`.\n\n## Sources\n\n- Agent Skills specification: https://agentskills.io/specification\n- Anthropic skill-creator reference:\n  https://github.com/anthropics/skills/tree/main/skills/skill-creator\n- OpenAI skill-creator reference:\n  https://github.com/openai/skills/tree/main/skills/.system/skill-creator\n- Skills CLI reference:\n  https://github.com/vercel-labs/skills\n\n## Shared patterns extracted\n\n1. Core process is iterative: scope, draft, test, refine.\n2. Trigger quality depends primarily on frontmatter description clarity.\n3. Progressive disclosure is essential for context efficiency.\n4. Optional resources should be added only when they reduce repeated work.\n\n## Vendor-specific elements intentionally avoided\n\n1. Model/provider-specific instructions and path assumptions.\n2. Dependence on platform-specific UI workflows.\n3. Tooling that only exists in one agent runtime.\n\n## Decisions in this skill\n\n1. Keep the main workflow in `SKILL.md` as a portable baseline.\n2. Move strict checklists and scaffolds into `references/` files.\n3. Include skills CLI validation guidance (`npx skills list`) and optional spec validator guidance (`skills-ref validate`).\n4. Keep language imperative and implementation-focused.\n","isInternal":false,"tokens":276,"sizeBytes":1299},{"name":"spec-checklist.md","path":".agents/skills/skill-creator/references/spec-checklist.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/skill-creator/references/spec-checklist.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Agent Skills Spec Checklist\n\nUse this checklist when creating or modifying a skill to keep it compatible with the Agent Skills specification.\n\nPrimary source: https://agentskills.io/specification\n\n## MUST requirements\n\n1. Skill is a directory containing `SKILL.md`.\n2. `SKILL.md` starts with valid YAML frontmatter.\n3. Frontmatter includes required fields:\n   - `name`\n   - `description`\n4. `name` rules:\n   - 1-64 characters\n   - lowercase letters, numbers, hyphens only\n   - does not start/end with hyphen\n   - no consecutive hyphens\n   - matches parent directory name\n5. `description` rules:\n   - 1-1024 characters\n   - non-empty\n   - states what the skill does and when to use it\n6. Markdown body exists after frontmatter.\n\n## SHOULD guidance\n\n1. Keep `SKILL.md` under ~500 lines for efficient context usage.\n2. Use progressive disclosure:\n   - keep core instructions in `SKILL.md`\n   - move detailed material to `references/`\n3. Add `scripts/` only for deterministic or repeated work.\n4. Keep file references relative to skill root.\n5. Keep references shallow and easy to discover from `SKILL.md`.\n\n## Optional frontmatter fields\n\n- `license`\n- `compatibility`\n- `metadata`\n- `allowed-tools` (experimental; support varies by agent)\n\n## Portability rules\n\n1. Avoid vendor-specific instructions unless requested by the user.\n2. Avoid agent-specific path assumptions if portable paths are possible.\n3. Avoid relying on non-standard tools without fallback guidance.\n\n## Validation commands\n\nIf available:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nFor discovery checks in a workspace using skills CLI:\n\n```bash\nnpx skills list\n```\n","isInternal":false,"tokens":380,"sizeBytes":1640},{"name":"templates.md","path":".agents/skills/skill-creator/references/templates.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/skill-creator/references/templates.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Universal Skill Templates\n\nUse these templates as starting points. Keep them concise and agent-agnostic.\n\n## 1) Minimal `SKILL.md` template\n\n```markdown\n---\nname: <skill-name>\ndescription: <what this skill does and when to use it>\nlicense: MIT\n---\n\n# <Skill Title>\n\n## Goal\n\n<one paragraph describing expected outcomes>\n\n## Procedure\n\n1. <step 1>\n2. <step 2>\n3. <step 3>\n\n## Inputs\n\n- <input 1>\n- <input 2>\n\n## Outputs\n\n- <output contract>\n\n## Edge cases\n\n- <edge case 1 and handling>\n- <edge case 2 and handling>\n\n## Validation\n\n- [ ] Frontmatter is valid YAML\n- [ ] Name matches folder\n- [ ] Description includes trigger contexts\n- [ ] Relative file references resolve\n```\n\n## 2) Expanded structure template\n\n```text\n<skill-name>/\n├── SKILL.md\n├── scripts/\n│   └── <script>.py\n├── references/\n│   ├── <domain>.md\n│   └── <schemas>.md\n└── assets/\n    └── <template-or-static-file>\n```\n\nUse this expanded layout only if those resources are truly needed.\n\n## 3) Trigger description pattern\n\nWrite descriptions that include both capability and activation cues.\n\nPattern:\n\n\"<Core capability>. Use when users ask to <intent 1>, <intent 2>, or <intent 3>, including phrasing such as <example cues>.\"\n\nExample:\n\n\"Generate release notes from Git history with categorized changes. Use when users ask to draft changelogs, summarize commits for releases, or prepare version notes from tags or commit ranges.\"\n\n## 4) Improvement loop template\n\nWhen improving an existing skill:\n\n1. Review current `SKILL.md` and user complaints.\n2. Capture 2-3 should-trigger and 2-3 should-not-trigger prompts.\n3. Revise `description` for better trigger clarity.\n4. Move long details from `SKILL.md` to `references/`.\n5. Re-validate against checklist in `references/spec-checklist.md`.\n","isInternal":false,"tokens":452,"sizeBytes":1815},{"name":"SKILL.md","path":".agents/skills/skill-creator/SKILL.md","rawUrl":"https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/skill-creator/SKILL.md","title":"skill-creator","category":"anthropic-skill","format":"markdown","content":"---\nname: skill-creator\ndescription: Create new Agent Skills or improve existing ones in an agent-agnostic way. Use when users ask to build, refactor, validate, or package skills compatible with the Agent Skills specification and the skills CLI ecosystem.\nlicense: MIT\ncompatibility: Compatible with Agent Skills spec and skill directories such as .agents/skills or equivalent agent-specific skill paths.\nmetadata:\n  author: local\n  version: \"1.0.0\"\n---\n\n# Skill Creator\n\nCreate and refine skills that work across agents implementing the Agent Skills specification.\n\nUse imperative instructions. Keep the process deterministic where possible. Keep the skill output portable.\n\n## Objectives\n\n1. Produce a valid skill with a correct `SKILL.md` frontmatter and useful body instructions.\n2. Keep the skill agent-agnostic unless the user explicitly requests agent-specific behavior.\n3. Apply progressive disclosure so only essential content stays in `SKILL.md`.\n4. Validate structure and naming before declaring completion.\n\n## Workflow\n\n### 1) Identify intent and scope\n\nDetermine whether the user wants one of these outcomes:\n\n- New skill from scratch\n- Update an existing skill\n- Improve trigger quality (`description` tuning)\n- Add reusable resources (`scripts/`, `references/`, `assets/`)\n\nExtract known constraints from conversation context first. Only ask for missing details that materially change implementation.\n\n### 2) Gather concrete examples\n\nCollect at least 2 realistic user prompts that should trigger the target skill. Also collect at least 2 near-miss prompts that should not trigger it.\n\nUse these examples to decide:\n\n- Required workflow steps\n- Output format expectations\n- Edge cases to handle\n- Whether deterministic scripts are needed\n\n### 3) Design the skill anatomy\n\nCreate a minimal structure first:\n\n```text\n<skill-name>/\n└── SKILL.md\n```\n\nAdd optional directories only when justified:\n\n- `scripts/` for deterministic or repeated operations\n- `references/` for detailed docs, schemas, and long procedures\n- `assets/` for templates and static resources used in outputs\n\n### 4) Author `SKILL.md` frontmatter\n\nSet required fields:\n\n- `name`: lowercase, digits, hyphens; matches folder name\n- `description`: what the skill does and when to use it\n\nCommon optional fields include `license`, `compatibility`, `metadata`, and `allowed-tools`. Additional frontmatter keys (for example, MCP or tooling configuration) are allowed when supported by the Agent Skills spec/validator, and may be nested under `metadata` when appropriate.\n\nDescription guidance:\n\n- Include both capability and trigger cues\n- Avoid vague phrases like \"helps with X\"\n- Prefer concrete contexts and user-language synonyms\n\n### 5) Author `SKILL.md` body\n\nStructure the body for execution, not marketing:\n\n1. Goal and success criteria\n2. Step-by-step operating procedure\n3. Input/output expectations\n4. Error handling and edge cases\n5. Examples\n6. Validation checklist\n\nWrite in imperative style. Explain why non-obvious constraints matter.\n\n### 6) Apply progressive disclosure\n\nKeep `SKILL.md` concise. Move large or specialized content into `references/` and link to it from `SKILL.md`.\n\nIf the skill spans multiple variants, separate variant details into dedicated reference files and keep variant-selection logic in `SKILL.md`.\n\n### 7) Validate and harden\n\nRun a final compatibility pass:\n\n- Frontmatter parses as valid YAML\n- `name` complies with spec constraints and folder match\n- `description` is explicit about trigger contexts\n- Relative file references resolve\n- Optional scripts are executable and documented\n- Language is agent-neutral and avoids vendor lock-in\n\nIf `skills-ref` is available, run:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nIf the skills CLI is available, verify discovery from the repo root:\n\n```bash\nnpx skills list\n```\n\n## Agent-Agnostic Rules\n\n- Do not require a specific model vendor or proprietary UI affordance.\n- Do not rely on agent-only file paths when portable paths exist.\n- Do not reference unavailable tools as mandatory.\n- Prefer open, portable commands and plain Markdown guidance.\n\n## Safety and integrity\n\n- Refuse to create skills intended for malware, exploitation, data exfiltration, or unauthorized access.\n- Keep behavior aligned with user intent; avoid hidden actions.\n\n## Completion criteria\n\nA skill-creation task is complete only when all are true:\n\n1. Skill folder exists in the requested location.\n2. `SKILL.md` is valid and complete.\n3. Optional resources are present only if needed.\n4. Validation checks pass or limitations are explicitly reported.\n\n## References\n\n- See `references/spec-checklist.md` for implementation rules distilled from the spec.\n- See `references/templates.md` for copy-ready scaffolds.\n- See `references/research-synthesis.md` for design rationale from cross-source research.\n","frontmatter":{"name":"skill-creator","description":"Create new Agent Skills or improve existing ones in an agent-agnostic way. Use when users ask to build, refactor, validate, or package skills compatible with the Agent Skills specification and the skills CLI ecosystem.","license":"MIT","compatibility":"Compatible with Agent Skills spec and skill directories such as .agents/skills or equivalent agent-specific skill paths.","metadata":{"author":"local","version":"1.0.0"}},"isInternal":false,"tokens":1015,"sizeBytes":4859}],"systemPromptSnippet":"<yakaai_skills repo=\"micronaut-projects/micronaut-core\">\n<!-- File: core-processor/AGENTS.md (Tokens: ~9156 | Category: root-instruction) -->\n# `core-processor` Generation Guide\n\nThis module is the shared compile-time engine for Micronaut injection. Language-specific processors provide Micronaut AST elements; `core-processor` turns those elements and annotation metadata into generated bytecode models for bean definitions, executable methods, bean introspections, AOP proxies, expression classes, and configuration metadata.\n\nUse this file when changing `core-processor/src/main/java/**` so generated bytecode, runtime interfaces in `inject`, and annotation processing behavior stay aligned.\n\n## Mental Model\n\nThe normal compile-time path is:\n\n1. A language module such as `inject-java` supplies `ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`, and `ParameterElement` implementations.\n2. `TypeElementVisitor` implementations inspect and mutate annotation metadata. Examples include `ConfigurationMetadataWriterVisitor`, `ConfigurationReaderVisitor`, `ExecutableVisitor`, and `IntrospectedTypeElementVisitor`.\n3. `BeanDefinitionCreatorFactory` chooses the bean creation strategy for each `ClassElement`.\n4. Creator classes call `ElementBeanDefinitionBuilder` and `ElementProxyBuilder` APIs.\n5. Writers such as `BeanDefinitionWriter`, `ExecutableMethodsDefinitionWriter`, `BeanIntrospectionWriter`, `AopProxyWriter`, `RuntimeProxyBeanDefinitionWriter`, and `EvaluatedExpressionWriter` build `io.micronaut.sourcegen.model.ObjectDef` instances.\n6. The language processor writes bytecode through `ByteCodeWriterUtils` and registers service descriptors when an `OutputObjectDef` has a service type.\n\nDo not think of this module as producing Java source. Most writers build sourcegen AST objects such as `ClassDef`, `MethodDef`, `ExpressionDef`, `StatementDef`, and `TypeDef`; `ByteCodeWriterUtils` then emits bytecode with ASM.\n\n## AST Layer\n\n`io.micronaut.inject.ast` is a language-neutral AST over Java, Kotlin, and Groovy. It is the boundary between language-specific symbol APIs and shared generation logic.\n\nImportant AST types:\n\n| Type | Role |\n| --- | --- |\n| `Element` | Common annotated, named, documented, mutable metadata node. It can represent a class, method, field, parameter, package, enum constant, or property-like element. |\n| `ClassElement` | Type model with assignability, generics, optional/container helpers, constructors, bean properties, fields, methods, interfaces, super types, records, enums, arrays, and proxy detection. |\n| `MethodElement` | Method or constructor model. `getMethodAnnotationMetadata()` is method-only metadata; `getAnnotationMetadata()` may combine class and method metadata except for constructors. |\n| `ParameterElement` | Method or constructor argument model used for injection points, executable methods, constructor values, and Kotlin default detection. |\n| `FieldElement` | Field model used for field injection, factory field beans, and field-backed bean properties. |\n| `PropertyElement` | Synthesized bean property. Configuration readers process these first because the property is the user-facing binding unit. |\n| `KotlinParameterElement` | Marks a Kotlin parameter that has a default value. Writers use it to call Kotlin synthetic default constructors and methods. |\n| `ElementQuery` and `PropertyElementQuery` | The preferred way to select enclosed elements. Use queries instead of ad hoc scans when possible. |\n\nAST elements are often copied with modified metadata using `withAnnotationMetadata(...)`, `withParameters(...)`, or direct `annotate(...)` calls. This is intentional: visitors and creators add synthetic annotations such as `@Property`, `@ConfigurationReader`, interceptor bindings, validation markers, and `@Introspected` before code generation.\n\nBe careful with metadata layers. `AnnotationMetadataHierarchy` is frequently used to combine type metadata with method, factory, property, or parameter metadata while preserving declared-vs-inherited lookup rules. Generated code often stores an `AnnotationMetadataReference` back to a generated bean definition to avoid duplicating metadata.\n\n## Generated Output\n\nThe major generated artifacts are:\n\n| Writer | Generated class shape | Service descriptor |\n| --- | --- | --- |\n| `BeanDefinitionWriter` | `$Bean$Definition` classes extending `AbstractInitializableBeanDefinitionAndReference` unless a specialized super type is used. | `BeanDefinitionReference` |\n| `ExecutableMethodsDefinitionWriter` | `$Bean$Definition$Exec` classes extending `AbstractExecutableMethodsDefinition`. | None |\n| `BeanIntrospectionWriter` | `$Bean$Introspection` or `$fully_qualified_Bean$Introspection` classes extending `AbstractInitializableBeanIntrospectionAndReference` or enum equivalent. | `BeanIntrospectionReference` |\n| `AopProxyWriter` | A proxy type named from the target definition plus `$Intercepted`, and a proxy bean definition for that proxy type. | Proxy bean definition is a `BeanDefinitionReference` |\n| `RuntimeProxyBeanDefinitionWriter` | Runtime-proxy bean definition that calls a `RuntimeProxyCreator`. | `BeanDefinitionReference` |\n| `EvaluatedExpressionWriter` | Final expression class extending `AbstractEvaluatedExpression`. | None |\n\n`OutputObjectDef` couples an `ObjectDef`, optional service type, and originating elements. Writers should preserve originating elements so incremental compilation and generated service descriptors stay correct.\n\n## Bean Definition Selection\n\n`BeanDefinitionCreatorFactory` is the switchboard:\n\n- Classes with `ConfigurationReader` stereotypes go through `ConfigurationReaderBeanElementCreator`, or `IntroductionInterfaceBeanElementCreator` when the configuration reader is an interface.\n- `@Factory` classes go through `FactoryBeanElementCreator`.\n- Types with around advice go through `DeclaredBeanElementCreator` with an AOP proxy builder, except interceptor beans are excluded from around proxy detection.\n- Introduction advice goes through `AopIntroductionProxySupportedBeanElementCreator` or `IntroductionInterfaceBeanElementCreator`.\n- Ordinary declared beans go through `DeclaredBeanElementCreator`.\n- Interfaces without introduction/configuration behavior are ignored.\n\n`DeclaredBeanElementCreator` scans properties and members, then adds constructor, field, method, lifecycle, executable, validation, adapter, and AOP information to the builder.\n\nImportant declared-bean rules:\n\n- Injection methods are `@Inject` methods, plus configuration-specific extensions in `ConfigurationReaderBeanElementCreator`.\n- Field injection applies to non-static, non-final fields with `@Inject`, qualifier stereotypes, `@Value`, or `@Property`.\n- `@Executable` methods are emitted as executable methods if accessible by the generated definition or explicitly allowed.\n- AOP methods must not be final, private, or static. Class-level AOP applies to public/package-private methods; method-level advice can force proxy creation.\n- Methods marked with `RequiresValidation` are annotated with `io.micronaut.validation.Validated`, except configuration reader beans because configuration validation is handled by introspection.\n- `@Adapter` creates an introduction proxy for a SAM interface and also keeps the source method executable/interceptable as needed.\n\n## BeanDefinitionWriter\n\n`BeanDefinitionWriter` generates a compact runtime description and creation plan for one bean. It usually generates one class that is both a `BeanDefinitionReference` and a loaded `BeanDefinition`.\n\nThe generated definition contains:\n\n- Static annotation metadata, constructor references, injection method references, field references, annotation injection references, type arguments, executable methods, exposed types, replacement metadata, conditions, and `PrecalculatedInfo`.\n- `load()` returning a new definition instance.\n- `isEnabled(...)`, `isContextScope()`, `isProxiedBean()`, `isProxyTarget()`, `isParallel()`, `getIndexes()`, `getDefaultImplementation()`, and configuration/proxy target helpers when applicable.\n- `instantiate(...)` or `doInstantiate(...)` depending on whether construction is parametrized or intercepted.\n- `inject(...)` when fields, methods, or configuration builders need member injection.\n- `initialize(...)` and `dispose(...)` methods, or intercepted lifecycle variants, when lifecycle hooks exist.\n- Optional `$Exec` support for executable methods and startup method processors.\n- Optional evaluated expression classes and `@BuildTimeInit` registration.\n\nInstantiation is generated in three broad forms:\n\n- Normal beans override `instantiate(BeanResolutionContext, BeanContext)` and call the constructor/factory method/field.\n- Parametrized beans implement `ParametrizedInstantiatableBeanDefinition` and generate `doInstantiate(...)` so runtime-supplied `@Parameter` values can be resolved before construction.\n- Constructor-intercepted beans implement one of the `Intercepted...InstantiateBeanDefinition` interfaces and generate `resolveInstantiationValues(...)` plus `doInstantiate(...)` for the constructor interceptor chain.\n\n`PrecalculatedInfo` is important. It stores booleans for abstract, iterable, singleton, primary, configuration properties, container type, method preprocessing, and evaluated expressions. If a change affects these flags, check context candidate collection and startup behavior.\n\nFor configuration properties, `BeanDefinitionWriter` also:\n\n- Treats `@ConfigurationProperties`, `@EachProperty`, and `@EachBean` as configuration/iterable bean definitions.\n- Tracks nested configuration reader inner classes.\n- Skips storing some value injection point metadata when configured by `micronaut.inject.configuration-properties.omit-injection-points`.\n- In `inject(...)`, skips property injection when `containsProperties(...)` is false for a configuration bean.\n- Resolves `ConfigurationPath` directly as an injectable special type.\n\n## Executable Methods\n\n`ExecutableMethodsDefinitionWriter` generates the `$Exec` class used by `BeanDefinition.getExecutableMethods()` and AOP.\n\nEach executable method stores an `AbstractExecutableMethodsDefinition.MethodReference` with:\n\n- Declaring type.\n- Annotation metadata.\n- Method name.\n- Return `Argument`.\n- Argument array built from `methodElement.getSuspendParameters()`.\n- `isAbstract`.\n- `isSuspend`.\n\nDispatch is generated by `DispatchWriter`. It produces switch-based reflection-free calls when possible, reflective fallback when required, and bridge dispatch entries for intercepted proxy methods. Kotlin default methods use a specialized dispatch target and are not supported for reflection invocation.\n\nWhen a method is annotated `@Executable(processOnStartup = true)`, the writer marks `requiresMethodProcessing()` and the bean definition emits the indexes that startup processors must inspect.\n\n## Bean Introspection\n\n`IntrospectedTypeElementVisitor` handles `@Introspected` and writes `BeanIntrospectionReference` classes. It supports:\n\n- Direct class introspection.\n- `classes` and `classNames`.\n- Package scanning, but only when `includedAnnotations` limits the scan.\n- `targetPackage`.\n- Optional annotation metadata emission.\n- Indexed annotations.\n- Explicit `@Introspected.IntrospectionBuilder`.\n- Lombok builders after Lombok-generated methods appear in a later round.\n\n`BeanIntrospectionWriter` emits the actual introspection class. It stores:\n\n- Constructor metadata and constructor `Argument[]`.\n- `BeanPropertyRef[]` with read, write, and with/copy-constructor dispatch indexes.\n- `BeanMethodRef[]` for introspected executable methods.\n- Enum constant refs for enum introspections.\n- Indexed property lookup methods when `@Introspected(indexed = ...)` is used.\n- Dispatch methods for property get/set/with, bean methods, copy-constructor mutation, and construction.\n\nProperty mutation order matters:\n\n- A setter or writable field is used when present.\n- If a read-only property corresponds to a constructor argument, the property is still considered mutable through constructor reconstruction.\n- If no setter exists, the writer looks for a with-method using the configured `withPrefix`.\n- If neither exists, mutation dispatch throws `UnsupportedOperationException`.\n\nConstructor support:\n\n- A no-arg default constructor enables `instantiate()`.\n- A primary constructor enables `instantiateInternal(Object[])` and `isBuildable()`.\n- If every constructor parameter is a Kotlin default parameter, the writer also emits no-arg `instantiate()` by calling Kotlin defaults.\n\nConfiguration beans that need validation are annotated with `@Introspected` so validation can operate on introspection metadata rather than by adding validation advice to every configuration setter.\n\n## AOP Proxies\n\n`DefaultElementBeanDefinitionBuilderFactory` creates proxy builders. It rejects final classes for compile-time subclass proxying, forces factory-produced around-advised beans into proxy-target mode, and chooses `RuntimeProxyBeanDefinitionWriter` for `@RuntimeProxy` types or `AopProxyWriter` otherwise.\n\nProxy modes:\n\n| Mode | Target ownership | Main generated behavior |\n| --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. | Generated proxy subclasses the target when possible. Intercepted methods pass `this` to `MethodInterceptorChain`. Concrete original methods use generated `$$access$$...` bridge methods so `proceed()` can call `super`. |\n| Proxy-target around proxy | Proxy and target are separate beans. | The proxy bean definition implements `ProxyBeanDefinition` and points back to the target definition. The proxy resolves a target with `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target | Proxy target is separate and resolved on first use. | The proxy stores a copied `BeanResolutionContext`; `interceptedTarget()` resolves the target. With `cacheableLazyTarget`, it caches the target after first lookup. |\n| Hotswap proxy-target | Proxy target is separate and mutable. | The proxy implements `HotSwappableInterceptedProxy`, stores target behind read/write locks, and exposes `swap(...)`. |\n| Introduction proxy | No concrete target implementation is required. | Generated proxy implements the introduced interface/type. Abstract/interface methods are satisfied by introduction interceptors. |\n| Runtime proxy | Proxy object is produced by a runtime creator. | The bean definition builds a `DefaultRuntimeProxyDefinition` and invokes the configured `RuntimeProxyCreator`. |\n\n### Around vs Introduction\n\nAround advice decorates an implementation that already exists. Introduction advice supplies or routes an implementation for methods that may not exist on a concrete target.\n\nThe compile-time distinction starts with interceptor binding metadata:\n\n- `@Around` contributes `@InterceptorBinding(kind = AROUND)`.\n- `@Introduction` contributes `@InterceptorBinding(kind = INTRODUCTION)`.\n- `@AroundConstruct` contributes `@InterceptorBinding(kind = AROUND_CONSTRUCT)`.\n- `InterceptedMethodUtil.hasAroundStereotype(...)` and `hasIntroductionStereotype(...)` determine which creator path runs.\n- `InterceptedMethodUtil.resolveInterceptorBinding(metadata, kind)` extracts the binding values that become the proxy constructor's interceptor qualifier.\n\nAround proxy generation:\n\n- `DeclaredBeanElementCreator` creates a normal target bean definition and, when necessary, an around proxy builder.\n- A class-level around stereotype causes public/package-private methods to be considered for interception.\n- A method-level around stereotype can force proxy creation for a method even when the class is not already an AOP proxy.\n- Methods must be non-final, non-private, and non-static because generated compile-time proxies need an overridable method.\n- Default around proxies subclass the target and invoke original behavior through generated bridge methods.\n- Proxy-target around proxies keep a separate target definition and resolve the target through the context.\n\nIntroduction proxy generation:\n\n- `IntroductionInterfaceBeanElementCreator` handles interfaces with introduction advice or configuration-reader introduction advice.\n- `AopIntroductionProxySupportedBeanElementCreator` handles concrete classes that combine introduction behavior with possible around advice.\n- `DefaultElementBeanDefinitionBuilderFactory.introductionProxy(...)` builds a proxy definition that includes both around and introduction interceptor bindings.\n- Interface introduction processes abstract methods, property accessors, and non-abstract default methods only when those non-abstract methods declare around advice.\n- Concrete-class introduction reuses the introduction proxy builder as the bean definition builder; it does not keep a separate ordinary target definition for introduced behavior.\n- Introduction proxies implement `Introduced`. Around proxies implement `Intercepted`; proxy-target variants also implement `InterceptedProxy` or `HotSwappableInterceptedProxy`.\n\nRuntime chain differences:\n\n- Around method resolution calls `InterceptorChain.resolveAroundInterceptors(...)` and gets only `AROUND` interceptors.\n- Introduction method resolution calls `InterceptorChain.resolveIntroductionInterceptors(...)`, which resolves introduction interceptors and around interceptors, then concatenates around interceptors before introduction interceptors.\n- If an introduction method has no introduction interceptor and is not an adapter method, runtime resolution fails with an error because there is no implementation to invoke.\n- If the method is an adapter method, the runtime creates an internal `AdapterIntroduction` interceptor as the implementation fallback.\n\nMethod interception flow in `AopProxyWriter`:\n\n1. `addAroundMethod(...)` records the method and contributes interceptor binding metadata from method annotations.\n2. Concrete default-around methods get executable-method entries and bridge methods as needed.\n3. The proxy type gets `$proxyMethods` and `$interceptors` fields.\n4. The proxy constructor appends five hidden parameters after user constructor parameters: `BeanResolutionContext`, `BeanContext`, `Qualifier`, interceptor bean registrations list, and `InterceptorRegistry`.\n5. Constructor code initializes `$proxyMethods` from the executable-methods definition or target bean definition.\n6. Constructor code resolves each method's interceptors using `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`.\n7. Each intercepted method override chooses a target: `this` for default around, a target field for eager proxy-target, or `interceptedTarget()` for lazy/hotswap.\n8. The override creates a `MethodInterceptorChain` with method-specific interceptors, target, executable method, and arguments, then returns `proceed()`.\n\nConstructor interception:\n\n- `BeanDefinitionWriter` detects `AROUND_CONSTRUCT` bindings only for valid candidate definitions. For proxy-target beans, only the target definition should intercept construction; for default around proxies, the generated AOP implementation intercepts construction.\n- Non-parametrized constructor interception uses `InterceptedInstantiateBeanDefinition` or `ProxyInterceptedInstantiateBeanDefinition`.\n- Parametrized constructor interception uses `InterceptedParametrizedInstantiateBeanDefinition` or `ProxyInterceptedParametrizedInstantiateBeanDefinition`.\n- The proxy variants know that proxy constructors contain the five hidden parameters and keep them out of the user-visible constructor interception argument list.\n\nFactory-produced around-advised beans are always proxy-target beans because the factory method owns the real object creation. If the produced type has constructor arguments, `proxyTargetMode` controls handling:\n\n- `ERROR`: fail compilation.\n- `WARN`: allow construction, but warn.\n- `ALLOW`: allow construction silently.\n\nFor `WARN` and `ALLOW`, primitive constructor parameters are annotated with `@Value(false)` or `@Value(0)`, and reference parameters are marked nullable so proxy construction has placeholder values.\n\n### Adapters\n\n`@Adapter` creates a new bean definition that adapts a user method to a single-abstract-method interface.\n\nCompile-time adapter generation is in `DeclaredBeanElementCreator.visitAdaptedMethod(...)`:\n\n1. The source method must declare `@Adapter(TargetInterface.class)`.\n2. The target must be an interface.\n3. The target interface must have exactly one abstract method.\n4. Source and target parameter counts must match.\n5. Kotlin suspend source methods are rejected.\n6. Each source parameter generic type must be assignable to the matching target method generic type.\n7. Generic placeholders on the target interface are remapped from the source method parameter types.\n8. A synthetic adapter proxy class name is created from the declaring bean name, target interface simple name, source method name, and an index.\n9. The target interface `ClassElement` is annotated with internal `@Adapter` members:\n   - `adaptedBean`: source bean class.\n   - `adaptedMethod`: source method name.\n   - `adaptedArgumentTypes`: source argument types.\n   - `adaptedQualifier`: source bean `@Named` qualifier, when present.\n10. The target interface is annotated `@Indexed` for the adapted interface type.\n11. A merged metadata hierarchy of the source bean and adapted interface becomes the proxy metadata.\n12. `beanDefinitionBuilderFactory.introductionProxy(adapterProxyClassName, metadata, interfaceToAdapt)` creates an introduction proxy.\n13. `implementInterface(interfaceToAdapt)` adds the SAM methods to the generated proxy.\n\nAt runtime, adapter methods are implemented by `AdapterIntroduction`:\n\n- `DefaultInterceptorRegistry.resolveToNone(...)` returns an `AdapterIntroduction` when the method has `@Adapter` metadata and no introduction interceptor beans matched.\n- `AdapterIntroduction` reads the internal adapter metadata from the executable method.\n- It finds an `ExecutionHandle` for the original source bean and method, using `adaptedQualifier` when present.\n- Its `intercept(...)` method invokes the source execution handle with the intercepted SAM method arguments.\n\nAdapters are therefore introduction proxies, but they are special because the implementation interceptor is synthesized at runtime instead of being a user-defined `@InterceptorBean`.\n\n### Interceptor Binding Recognition\n\nInterceptor binding metadata is normalized at compile time before bean/proxy writers consume it.\n\n`InterceptorBindingMembers` remaps annotation values that have AOP stereotypes:\n\n- Applied annotations that are themselves `@Around`, `@Introduction`, `@AroundConstruct`, or `@InterceptorBinding` are left as direct AOP annotations.\n- User annotations meta-annotated with those stereotypes get an internal `@InterceptorBinding` value whose `value` member is the user annotation type.\n- The binding `kind` is set to `AROUND`, `INTRODUCTION`, or `AROUND_CONSTRUCT`.\n- If the stereotype uses `@InterceptorBinding(bindMembers = true)`, the remapper stores selected annotation member values under `InterceptorBindingQualifier.META_BINDING_VALUES`.\n- Members annotated with `@NonBinding` are removed from those binding values.\n- If the advice stereotype has `@Type(SomeInterceptor.class)`, the remapper copies that type to the binding as `interceptorType`. This preserves the old type-based interceptor selection path.\n\n`InterceptorBeanMapper` remaps `@InterceptorBean(...)` on interceptor beans:\n\n- `@InterceptorBean` is itself a bean stereotype and has default singleton scope.\n- Its `value` member names the advice annotations the interceptor supports.\n- The mapper converts each supported annotation into an internal `@InterceptorBinding` value.\n- Those values are stored in the internal interceptor-bindings container on the interceptor bean metadata.\n\nGenerated proxies use these normalized bindings in two places:\n\n- Proxy writers collect type-level, method-level, and constructor-level binding values using `InterceptedMethodUtil.resolveInterceptorBinding(...)`.\n- `AopProxyWriter` annotates the generated proxy constructor's hidden interceptor-registration-list parameter with `AnnotationUtil.ANN_INTERCEPTOR_BINDING_QUALIFIER` and the collected binding values.\n- `BeanDefinitionWriter.getQualifier(...)` sees that annotation on the constructor parameter and emits `Qualifiers.byInterceptorBinding(argument.getAnnotationMetadata())`.\n- The context uses `InterceptorBindingQualifier` to preselect candidate interceptor bean registrations for the proxy constructor argument.\n\n`InterceptorBindingQualifier` supports two matching modes:\n\n- Binding by annotation name and optional `$bindingValues`.\n- Binding by explicit `interceptorType`.\n\nThe constructor-injected list is intentionally a candidate set, not the final per-method chain. It narrows the list cheaply during bean construction; `DefaultInterceptorRegistry` performs the final method-specific selection.\n\n### Interceptor Beans And Runtime Resolution\n\n`InterceptorRegistryBean` is the built-in bean definition for `InterceptorRegistry`.\n\n- It is a hand-written `BeanDefinitionReference` and `InstantiatableBeanDefinition`.\n- It exposes `InterceptorRegistry` and `DefaultInterceptorRegistry`.\n- It is singleton, always present, and bootstrap-context compatible.\n- Its `instantiate(...)` method returns a new `DefaultInterceptorRegistry` for the active `BeanContext`.\n\nRuntime method interceptor resolution is handled by `DefaultInterceptorRegistry.resolveInterceptors(...)`:\n\n1. It reads the intercepted method annotation metadata.\n2. If no interceptor registrations were injected, it returns none for around advice, creates `AdapterIntroduction` for adapter introduction methods, or fails for other missing introduction implementations.\n3. It configures expression/environment-aware metadata before evaluating bindings.\n4. `AbstractInterceptorChain.resolveInterceptorValues(metadata, kind)` extracts the applicable `@InterceptorBinding` values for the requested kind.\n5. For `AnnotationMetadataHierarchy`, declared method-level bindings are preferred over parent/type bindings for non-repeatable annotations.\n6. Each candidate interceptor registration is checked by `selectInterceptor(...)`.\n7. Candidate registrations are sorted with `OrderUtil.ORDERED_COMPARATOR`.\n8. Method resolution keeps `MethodInterceptor` instances and generic `Interceptor` instances that are not constructor-only.\n9. Constructor resolution keeps `ConstructorInterceptor` instances and generic `Interceptor` instances that are not method-only.\n\n`DefaultInterceptorRegistry.selectInterceptor(...)` checks:\n\n- Constructor interceptor type arguments, when present, must be assignable from the intercepted declaring type.\n- If an intercept point binding carries `interceptorType`, the interceptor bean instance type can match directly.\n- Otherwise the interceptor bean definition must have its own interceptor binding metadata for the same kind.\n- Each interceptor binding declared on the interceptor must match an intercept point binding.\n- If binding member values are present, the `$bindingValues` metadata must match as well.\n\nThe runtime chain then executes through `MethodInterceptorChain` or `ConstructorInterceptorChain`:\n\n- `MethodInterceptorChain.proceed()` invokes interceptors in order until exhausted, then calls the generated `ExecutableMethod`.\n- Introduction methods normally reach an introduction interceptor instead of a concrete target method.\n- Adapter introduction interceptors invoke the original adapted source method.\n- Constructor chains use `BeanConstructor` metadata and eventually call the generated intercepted `doInstantiate(...)`.\n\n### Factory Methods And Proxies\n\n`@Factory` classes are processed by `FactoryBeanElementCreator`, which extends the ordinary declared-bean creator. The factory class is still a bean definition with its own constructor, injection points, lifecycle methods, executable methods, validation, and AOP behavior; each producer member creates an additional bean definition.\n\nProducer member discovery:\n\n- Factory methods are methods whose metadata declares bean-producing semantics, normally `@Bean` or a scope stereotype.\n- Factory fields are fields annotated as beans; inaccessible/private factory fields fail compilation.\n- Bean-producing property read elements are converted to a factory method when they have a getter, or to a factory field when the backing field is accessible.\n- Bean-producing property write elements are ignored as producers because the read side owns the produced value.\n- Producer methods can also remain executable or interceptable methods on the factory bean itself. After the produced bean definition is created, `FactoryBeanElementCreator` still visits the factory method as an AOP method when the factory is proxied, or as an executable method otherwise.\n\nProduced metadata is deliberately not just the method metadata:\n\n1. For non-primitive produced types, the processor merges the produced class metadata with the producing method/field/property metadata.\n2. If the producing element declares a scope or qualifier, scopes and qualifiers inherited from the produced type are removed unless the producing element also declares them.\n3. The producing element then receives a hierarchy of factory-class metadata plus produced metadata, but factory-class qualifiers are stripped when they are not present on the produced bean. This prevents a qualifier on the factory bean from accidentally qualifying every product.\n4. For produced types with `@EachProperty`, both the produced type and the producing element are annotated with a computed `@ConfigurationReader(prefix = ...)` so iterable configuration path generation works for factory products.\n\nThe generated produced bean definition is a separate `BeanDefinitionWriter`:\n\n- `DefaultElementBeanDefinitionBuilderFactory.factoryMethod(...)` creates a writer whose bean type is the generic return type and whose producer definition is a `MethodDefinition`.\n- `factoryField(...)` creates a writer whose bean type is the generic field type and whose producer definition is a `FieldDefinition`.\n- Factory method definition names include a unique index so overloaded producer methods do not collide.\n- `BeanDefinitionWriter.resolveConstructorParameters()` treats factory method parameters like construction parameters and factory fields as zero-argument construction.\n- If any factory method parameter is annotated `@Parameter`, the produced definition becomes parametrized in the same way as a parametrized constructor bean.\n\nRuntime instantiation is generated by switching on the producer definition:\n\n- Constructor-produced beans call `initializeBean(...)`.\n- Field-produced beans call `buildFactoryFieldCall(...)`.\n- Method-produced beans call `buildFactoryMethodCall(...)`.\n- Static factory members are invoked with no factory bean instance.\n- Instance factory members first resolve the factory bean from the `BeanResolutionContext` using the factory type and factory qualifier, mark the resolution as factory-dependent, then invoke the method or read the field.\n- Inaccessible factory methods and fields use the generated reflection helper path; accessible static and instance members use direct sourcegen dispatch.\n\nFactory-produced AOP beans are special because the factory method or field owns creation of the real target object. A default subclass around proxy would create a proxy instance instead of using the factory product, so `DefaultElementBeanDefinitionBuilderFactory.aroundProxy(...)` forces `Interceptor.PROXY_TARGET = true` whenever the target writer's producer is not a constructor.\n\nFactory proxy generation rules:\n\n- The target produced bean definition remains the factory method/field definition.\n- The proxy bean definition is an additional definition that points back to the target definition as a proxy target.\n- Factory products use `visitSuperBeanDefinitionFactory(...)` rather than normal `visitSuperBeanDefinition(...)`; this marks the proxy definition as being backed by a factory target without subclassing the target bean definition class.\n- Runtime proxy products follow the same factory-target rule, but use `RuntimeProxyBeanDefinitionWriter` instead of `AopProxyWriter`.\n- The proxy scans the produced type for public, non-final, non-static methods, then also scans synthetic bean property read/write methods. This is necessary because the producing factory method does not declare the methods that will be intercepted on the product.\n- Factory-produced arrays and primitive beans cannot receive AOP advice, and the original produced class must not be final.\n\nFactory products with constructor arguments need an extra compile-time decision. Even though the real target comes from the factory, a compile-time subclass proxy still has to call a superclass constructor. `@Around(proxyTargetMode = ...)` controls this:\n\n- `ERROR` is the default and fails when the produced non-interface type has a primary constructor with parameters.\n- `WARN` allows proxy construction and emits a warning.\n- `ALLOW` allows proxy construction silently.\n\nFor `WARN` and `ALLOW`, `FactoryBeanElementCreator.allowProxyConstruction(...)` mutates the produced type constructor parameters so the proxy can be instantiated with placeholders: primitive parameters get synthetic `@Value(false)` or `@Value(0)`, reference parameters are marked nullable, and non-null metadata is removed. These placeholder values are for the proxy superclass constructor, not for creating the real factory target.\n\nConstructor interception for factory products follows the proxy-target split:\n\n- A factory method counts as a factory/proxy-target construction path in `BeanDefinitionWriter.isInterceptedLifeCycleByType(...)`.\n- `@AroundConstruct` on a factory-produced around bean should wrap the target construction path, which is the generated factory method invocation path.\n- The generated proxy's hidden constructor contains AOP infrastructure arguments and is not the user construction point.\n- The intercepted instantiate interfaces used for proxy definitions keep proxy infrastructure parameters separate from the user-visible constructor/factory arguments.\n\nOther factory product features:\n\n- `@Executable` on produced metadata registers all produced type methods as executable methods, except for arrays and primitives.\n- `@Bean(preDestroy = \"...\")` resolves an accessible no-argument destroy method on the produced type and emits a pre-destroy hook.\n- Produced `@EachProperty` and `@EachBean` definitions stay iterable definitions; the factory method parameters can still be filled from `@Parameter` values when the runtime creates each delegate.\n\n## Evaluated Expressions\n\nEvaluated expressions are annotation values represented by `EvaluatedExpressionReference`. They can appear in direct and nested annotation values.\n\nThe generation flow is:\n\n1. Writers call `EvaluatedExpressionProcessor.processEvaluatedExpressions(...)` for class, constructor, method, parameter, field, property, and introspection metadata.\n2. `EvaluatedExpressionsUtils.findEvaluatedExpressionReferences(...)` scans annotation and stereotype metadata, including nested annotation values.\n3. `DefaultExpressionCompilationContextFactory` builds an expression context. It includes shared registered context types, annotation-level `@AnnotationExpressionContext`, annotation member contexts, method parameters when compiling method expressions, and optional `this`.\n4. `EvaluatedExpressionWriter` generates a final class extending `AbstractEvaluatedExpression`.\n5. The generated `doEvaluate(ExpressionEvaluationContext)` parses the original annotation value with `CompoundEvaluatedExpressionParser` and compiles it into sourcegen statements.\n6. The owning generated definition/introspection is annotated with `@BuildTimeInit` listing expression class names.\n\nExpression classes are deduplicated by generated class name in `EvaluatedExpressionProcessor`. `BeanDefinitionWriter.finish()` resets expression and metadata processor caches after a processing run.\n\n## Configuration Metadata And Paths\n\nConfiguration path calculation is split across compile-time and runtime.\n\nCompile-time path helpers:\n\n- `ConfigurationUtils.getTypePath(...)` reads `ConfigurationReader.PREFIX`, `BASE_PREFIX`, supertype prefixes, and enclosing configuration reader prefixes. It caches the computed prefix by annotating `ConfigurationReader.PREFIX_CALCULATED`.\n- `ConfigurationUtils` appends `.*` for map-style `@EachProperty` and `[*]` for list-style `@EachProperty`.\n- `ConfigurationMetadataBuilder.calculatePath(...)` creates property paths. Nested configuration reader property types use their own reader path; ordinary properties use owner/declaring type path plus the property name, then hyphenation.\n- `ConfigurationMetadataWriterVisitor` writes IDE metadata through `ConfigurationMetadataWriter` implementations at `finish(...)`.\n\nRuntime path helpers:\n\n- `ConfigurationPath` models a stack of configuration reader and `EachProperty` segments.\n- `DefaultApplicationContext.collectIterableBeans(...)` expands iterable definitions into `BeanDefinitionDelegate` instances.\n- `BeanDefinitionDelegate` temporarily pushes its `ConfigurationPath` into the active `BeanResolutionContext` during `instantiate(...)` and `inject(...)`.\n- Property placeholders and generated `@Property` names can be resolved against the current dynamic path.\n\n## `@ConfigurationProperties`\n\n`@ConfigurationProperties` is meta-annotated with `@ConfigurationReader`, so it enters the configuration reader path.\n\nFor classes and records:\n\n1. `ConfigurationMetadataWriterVisitor` visits the class, computes and writes the reader prefix, and records configuration metadata.\n2. If the class has validation markers, it adds `@Introspected` so validation can use bean introspection.\n3. For records and `@ConfigurationInject` constructors/methods, constructor or method parameters that are property-like get synthetic `@Property(name = ...)` annotations.\n4. For writable bean properties, the visitor records property metadata and annotates setters with `@Property(name = ...)`.\n5. `ConfigurationReaderBeanElementCreator` processes bean properties rather than hidden fields/methods first.\n6. Writable properties become generated value injection points using `@Property(name = calculatedPath)`.\n7. `@ConfigurationBuilder` properties or fields become builder injection commands instead of normal property injection.\n8. Read methods annotated `@Executable` are still emitted as executable methods.\n9. `BeanDefinitionWriter.inject(...)` only performs property injection if the environment contains matching properties for the configuration bean.\n\nFor interfaces:\n\n1. `ConfigurationMetadataWriterVisitor` annotates the interface with `io.micronaut.runtime.context.env.ConfigurationAdvice`.\n2. `BeanDefinitionCreatorFactory` routes it through introduction proxy generation.\n3. Getter methods are validated as configuration accessors.\n4. Getter methods returning property-like values are annotated with `@Property`.\n5. Getter methods returning bean/configuration-like values are marked as bean access through `ConfigurationAdvice`.\n6. Runtime `ConfigurationIntroductionAdvice` resolves values using the active `ConfigurationPath` and the environment.\n\nDo not add validation AOP to configuration setters as a substitute for introspection validation. The creator intentionally suppresses method validation interception for configuration readers.\n\n## `@EachProperty`\n\n`@EachProperty` is both a `ConfigurationReader` and an iterable bean definition.\n\nCompile-time behavior:\n\n- `ConfigurationUtils.computeIterablePrefix(...)` appends `.*` by default or `[*]` when `list = true`.\n- The computed prefix is stored as `ConfigurationReader.PREFIX`.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachProperty` stereotype.\n- Factory-produced bean types with `@EachProperty` are explicitly annotated with the computed `ConfigurationReader` prefix on both the produced type and producing element.\n- Properties inside an `EachProperty` bean are still generated as normal configuration reader property injection points, but the property paths contain dynamic segments.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` sees the bean definition is iterable and calls `transformEachPropertyBeanDefinition(...)`.\n2. The context creates or reuses a `ConfigurationPath`.\n3. It pushes an `EachProperty` root segment for the definition.\n4. `ConfigurationPath.traverseResolvableSegments(environment, callback)` finds map keys or list indexes present in the environment.\n5. For each resolvable segment, the context creates a `BeanDefinitionDelegate` with a qualifier from `path.beanQualifier()` or `PrimaryQualifier`.\n6. The delegate sets the path during construction and injection, so generated `@Property` values resolve against the current segment.\n7. `@Parameter` constructor arguments can receive the current map key/name, enum value, list index, or matching nested configuration bean through `BeanDefinitionDelegate.getParametersValues(...)`.\n\nPrimary selection for `@EachProperty` comes from the current `ConfigurationPath` segment. `BeanDefinitionDelegate.isPrimary()` returns true when the path segment name matches the configured primary name.\n\nNested `@ConfigurationProperties` inside `@EachProperty` are handled by pushing additional configuration reader segments onto the same path. Direct resolution of a nested dynamic configuration reader may rebuild the path by finding the enclosing delegate.\n\n## `@EachBean`\n\n`@EachBean` is an iterable bean definition driven by another bean type rather than by environment keys.\n\nCompile-time behavior:\n\n- The annotation remains metadata on the bean definition; the processor does not generate one class per origin bean.\n- `BeanDefinitionWriter.isIterable(...)` returns true because the metadata has an `EachBean` stereotype.\n- Constructor parameters annotated `@Parameter` make the generated definition parametrized when the value must be supplied at runtime.\n\nRuntime behavior:\n\n1. `DefaultApplicationContext.collectIterableBeans(...)` calls `transformEachBeanBeanDefinition(...)`.\n2. The annotation's required value is the dependent/origin bean type.\n3. The context finds candidate bean definitions for that origin type.\n4. For each origin candidate, the context creates a `BeanDefinitionDelegate` of the `@EachBean` definition.\n5. If the origin is already a configuration delegate, its `ConfigurationPath` is reused. This is what connects `@EachBean(ExampleConfiguration)` to `@EachProperty` entries.\n6. Otherwise the delegate qualifier is the origin's declared qualifier, `PrimaryQualifier` for primary origins, or an internal `EachBeanQualifier` that matches the exact origin `BeanDefinition`.\n7. `remapGenerics` metadata can remap type arguments from the origin bean into the created delegate.\n8. The delegate carries the origin definition for ordering and type argument behavior.\n9. During instantiation, `BeanDefinitionDelegate.getParametersValues(...)` fills `@Parameter` arguments from the current qualifier, path, origin bean, or matching bean lookup.\n\n`EachBeanQualifier` is an internal identity qualifier. It lets unqualified origin beans still drive distinct `@EachBean` delegates, but user-visible names are only available when the origin has a named/primary qualifier or when the origin came from a configuration path.\n\nIf a required `@EachBean` constructor parameter cannot be supplied, `ParametrizedInstantiatableBeanDefinition.resolveParameterizedArgumentValues(...)` treats the missing origin-type argument as a disabled bean rather than a normal missing argument.\n\n## Kotlin-Specific Generation\n\nKotlin support is mostly expressed through AST flags, not by checking Kotlin compiler symbols directly in this module.\n\nKey rules:\n\n- `MethodElement.isSuspend()` marks Kotlin suspend functions.\n- `MethodElement.getSuspendParameters()` includes the synthetic continuation parameter. Writers use this when building `Argument[]`, executable method references, AOP method lookups, dispatch methods, and lifecycle/injection method definitions.\n- `ExecutableMethodsDefinitionWriter` stores `isSuspend` on method references.\n- AOP interception returns `Object` for suspend methods and passes the continuation through the normal argument array. Runtime AOP adapts suspend calls through the Kotlin intercepted-method utilities in the AOP runtime.\n- `KotlinParameterElement.hasDefault()` marks constructor or method parameters with Kotlin defaults.\n\nKotlin default constructor calls:\n\n- `MethodGenUtils.invokeBeanConstructor(...)` detects default parameters and calls the Kotlin synthetic constructor with original parameters, one or more integer default masks, and a final `kotlin.jvm.internal.DefaultConstructorMarker` argument.\n- A mask bit means Kotlin should use the default value for that parameter.\n- For constructor injection, the writer computes per-argument \"has value\" expressions. For `@Property` parameters, the expression checks whether the property is present in the environment; for bean parameters, it checks non-null.\n- Primitive values cannot use null as the missing sentinel, so default primitive placeholders are `false` or numeric zero.\n- `BeanDefinitionWriter.initializeBean(...)` only does this direct Kotlin-default constructor path for non-proxy definitions. Proxies handle their own super constructor calls.\n\nKotlin default method calls:\n\n- `DispatchWriter` uses `KotlinMethodWithDefaultsDispatchTarget` when any suspend/normal parameter is a `KotlinParameterElement` with a default.\n- The dispatch target calls `MethodGenUtils.invokeKotlinDefaultMethod(...)`, which invokes the static `$default` method with target, parameters, masks, and a null marker.\n- Kotlin default methods are rejected for reflection dispatch because the default-mask call shape is not a normal reflective method invocation.\n\nOther Kotlin-specific behavior:\n\n- `BeanIntrospectionWriter` emits no-arg `instantiate()` for a constructor when all parameters are Kotlin defaults.\n- `ExecutableVisitor` does not warn for `@Nullable` primitive parameters when the parameter is a Kotlin default parameter.\n- `AopProxyWriter.invokeSuperConstructor(...)` allows Kotlin defaults when calling the proxied superclass constructor.\n- Factory-produced proxy construction in `WARN` or `ALLOW` mode annotates primitive placeholders with `@Value` and reference placeholders as nullable, which also helps Kotlin proxy construction.\n\n## Configuration Builders\n\n`@ConfigurationBuilder` is handled in both metadata and injection generation.\n\n`ConfigurationMetadataWriterVisitor` records a configuration group for the builder type and records each builder method as property metadata. `ConfigurationReaderBeanElementCreator` turns the builder property or field into `InjectFieldConfigurationBuilder` or `InjectMethodConfigurationBuilder` commands.\n\nGenerated injection creates or accesses the builder, then invokes generated builder method statements. A zero-argument builder method can be represented by a boolean property injection point; one-argument builder methods receive the resolved property value.\n\nDo not treat builder properties like normal writable configuration bean properties. Excludes and includes do not suppress builders in the same way, and inaccessible builder fields require a non-private getter.\n\n## Change Guidance\n\nMost source changes here affect generated bytecode contracts. When changing a writer, also inspect the runtime interfaces and bases in `inject/src/main/java/io/micronaut/inject/**` and `inject/src/main/java/io/micronaut/context/**`.\n\nUseful checks after source changes usually include:\n\n- `./gradlew -q :micronaut-core-processor:compileJava`\n- `./gradlew -q :micronaut-inject-java:compileTestJava :micronaut-inject-java:compileTestGroovy`\n- Targeted tests in `inject-java`, `inject-groovy`, or `inject-kotlin` that compile sample beans.\n- AOP changes should include around, around-construct, proxy-target, introduction, and Kotlin tests when applicable.\n- Configuration changes should include `@ConfigurationProperties`, interface configuration, nested configuration, `@EachProperty` map/list, and `@EachBean` tests.\n\nFor markdown-only edits in this file, `git diff --cached --check` and `./gradlew -q spotlessCheck` are enough.\n\n<!-- File: inject/AGENTS.md (Tokens: ~3877 | Category: root-instruction) -->\n# `io.micronaut.inject` Class Map\n\nThis module is the runtime contract layer for Micronaut dependency injection. Most classes in `io.micronaut.inject` are small interfaces that generated bytecode implements; the heavier runtime bases that implement those contracts live mostly in `io.micronaut.context`.\n\nUse this file when changing `inject/src/main/java/io/micronaut/inject/**` to keep the generated-code model, bean lookup flow, and qualifier rules aligned.\n\n## Runtime Shape\n\nThe normal bean lifecycle is:\n\n1. Annotation processing writes a lightweight `BeanDefinitionReference` and a concrete `BeanDefinition`.\n2. `BeanContext` discovers references without loading user bean classes, checks `BeanContextConditional`, qualifiers, indexes, and replacement rules, then calls `BeanDefinitionReference.load(...)`.\n3. A loaded `BeanDefinition` describes the bean type, scope, constructor, injection points, executable methods, type arguments, metadata, and lifecycle hooks.\n4. If it is an `InstantiatableBeanDefinition`, the context creates the instance with a `BeanResolutionContext`.\n5. Generated definitions resolve constructor, method, field, `@Value`, `@Property`, provider, collection, stream, map, and registration dependencies through helper methods on `io.micronaut.context.AbstractInitializableBeanDefinition`.\n6. If implemented, `ValidatedBeanDefinition`, `InjectableBeanDefinition`, `InitializingBeanDefinition`, and `DisposableBeanDefinition` add argument validation, member injection, `@PostConstruct`, and `@PreDestroy` behavior.\n7. `ExecutableMethod` and `ExecutionHandle` expose reflection-free method calls for `@Executable`, AOP, event listeners, bean introspection methods, and processor startup work.\n\nGenerated classes are part of the API surface even when the supporting type is `@Internal`. Avoid changing method signatures, constructor shapes, visibility, or default method semantics unless the generated writers and compatibility impact are handled together.\n\n## Core Bean Model\n\n`BeanType<T>` is the common candidate abstraction. Both `BeanDefinitionReference<T>` and `BeanDefinition<T>` use it to expose the bean class, annotation metadata, exposed types, `@Primary`, optional bean name, candidate checks, and method-processing hint.\n\n`QualifiedBeanType<T>` extends `BeanType<T>` for anything that can expose a declared `Qualifier<T>`. It resolves qualifier annotations from target annotation metadata and is the bridge between static metadata and the runtime `io.micronaut.context.Qualifier` API.\n\n`BeanDefinitionReference<T>` is the soft-loading handle. It must answer whether the bean type is present, whether the bean is enabled, singleton, parallel, indexed, configuration-properties, proxy target, and how to load the real `BeanDefinition<T>`.\n\n`BeanDefinition<T>` is the full description used after loading. It extends `QualifiedBeanType`, `Named`, and `ArgumentCoercible`, and supplies scope, constructor, required components, injection points, lifecycle methods, executable methods, type arguments, default implementation, replacement metadata, and debug descriptions.\n\n`BeanContextConditional` is implemented by references, definitions, and configurations to decide whether something is enabled for a `BeanContext` and optional `BeanResolutionContext`.\n\n`BeanConfiguration` groups definitions by package and condition. `ConditionalBeanConfiguration` is the runtime record returned by `BeanConfiguration.of(...)` and `disabled(...)`; it deliberately rejects custom configurations for internal `io.micronaut.*` packages.\n\n`BeanIdentifier` is the stable instance key used by the context. `DefaultBeanIdentifier` is its internal string-backed implementation.\n\n`ArgumentBeanType<T>` adapts a core `Argument<T>` into a `BeanType<T>`, mainly so qualifier and candidate logic can operate on an argument-like requested type.\n\n## Bean Construction And Lifecycle\n\n`InstantiatableBeanDefinition<T>` marks definitions that can construct instances. It creates a `DefaultBeanResolutionContext` for convenience when only a `BeanContext` is supplied.\n\n`ParametrizedInstantiatableBeanDefinition<T>` is for definitions that need runtime-supplied `@Parameter` values. It finds required constructor arguments, validates/converts supplied values, and blocks no-argument instantiation.\n\n`InjectableBeanDefinition<T>` is for existing instances that need generated member injection after construction.\n\n`InitializingBeanDefinition<T>` invokes generated `@PostConstruct` hooks after dependency injection.\n\n`DisposableBeanDefinition<T>` invokes generated `@PreDestroy` hooks during shutdown.\n\n`ValidatedBeanDefinition<T>` delegates constructor/member/bean validation to `BeanDefinitionValidator` from the active context.\n\n`ReplacesDefinition<T>` represents `@Replaces` matching logic returned by `BeanDefinition.getReplacesDefinition()`.\n\n`DelegatingBeanDefinition<T>` decorates another definition by forwarding the full `BeanDefinition` surface. Use it when behavior must wrap a definition without copying its metadata model.\n\n## Injection Points\n\n`InjectionPoint<T>` is the base description of a place where the declaring bean needs a dependency. It exposes the declaring `BeanDefinition` and declared qualifier, and centralizes the `@Inject(required = false)` check.\n\n`CallableInjectionPoint<T>` adds an `Argument<?>[]` list for constructors and methods.\n\n`ConstructorInjectionPoint<T>` describes the constructor or factory method/field used to create a bean.\n\n`MethodInjectionPoint<B, T>` describes injected methods and lifecycle methods. It records the method name, arguments, declaring type, and whether it is post-construct or pre-destroy.\n\n`FieldInjectionPoint<B, T>` describes injected fields. Its `getField()` method is deprecated because resolving the `Field` initializes reflection metadata.\n\n`ArgumentInjectionPoint<B, T>` describes an argument inside an outer callable injection point and also acts as `ArgumentCoercible<T>`.\n\nGenerated `AbstractInitializableBeanDefinition` turns compact generated references into these injection point objects lazily and configures them with the `Environment` when needed.\n\n## Executable Methods\n\n`MethodReference<T, R>` is metadata for a method: declaring type, name, target `Method`, arguments, return type, and annotation metadata.\n\n`ExecutableMethod<T, R>` adds reflection-free invocation and source-like descriptions on top of `MethodReference`.\n\n`ExecutableMethodsDefinition<T>` is a generated collection of executable methods. `BeanDefinition` delegates method lookup and startup method processing to it.\n\n`DelegatingExecutableMethod<T, R>` wraps an executable method and forwards all method metadata and invocation.\n\n`BeanDefinitionMethodReference<T, R>` associates an executable method with the owning `BeanDefinition`. `DefaultBeanDefinitionMethodReference` is the package-private delegating implementation created by `BeanDefinitionMethodReference.of(...)`.\n\n`ExecutionHandle<T, R>` binds an executable method to a target instance and invokes without passing the instance as the first argument.\n\n`MethodExecutionHandle<T, R>` is an `ExecutionHandle` that also exposes the underlying `ExecutableMethod`.\n\n`UnsafeExecutionHandle<T, R>` is the internal variant that can invoke without argument validation.\n\n## AOP And Proxies\n\n`AdvisedBeanType<T>` is implemented by advised references and definitions to expose the intercepted target type for around or introduction advice.\n\n`ProxyBeanDefinition<T>` marks a bean definition as an AOP proxy and exposes the target definition type and target bean type.\n\n`io.micronaut.inject.proxy.InterceptedBean` marks generated proxy classes from the inject side.\n\n`io.micronaut.inject.proxy.InterceptedBeanProxy<T>` marks proxies that expose the intercepted target and optionally whether the target is already cached. It also implements the internal `Qualified<T>` hook so generated proxies can receive a bean qualifier.\n\nAOP proxy modes to keep distinct:\n\n| Mode | Target ownership | Generated marker | Main behavior |\n| --- | --- | --- | --- |\n| Default around proxy | The proxy is the bean instance. For concrete classes it subclasses the target and calls `super` through generated bridge methods when proceeding. | `Intercepted` | Fast path for `@Around(proxyTarget = false)`. Intercepted methods run against `this`; no separate target bean is resolved. |\n| Proxy-target around proxy | The proxy and target bean are separate. The proxy bean definition points back to the target definition. | `ProxyBeanDefinition`, `InterceptedProxy` | Used for `@Around(proxyTarget = true)`, factory-produced around-advised beans, and interface cases that need a backing target. The proxy resolves the target through `BeanResolutionContext.getProxyTargetBean(...)`. |\n| Lazy proxy-target proxy | Same as proxy-target, but target resolution is deferred until `interceptedTarget()` is needed. | `InterceptedProxy` | Stores a copied `BeanResolutionContext` and resolves the target on demand. With `cacheableLazyTarget`, the target is cached after the first lookup. |\n| Hotswap proxy-target proxy | Same as proxy-target, but the target reference is mutable. | `HotSwappableInterceptedProxy` | Stores the target behind a read/write lock and exposes `swap(...)` to replace it. |\n| Introduction proxy | There is no concrete target implementation for introduced methods. | `Introduced` | Generated proxy implements the advised interface/type and delegates behavior to introduction interceptors. Abstract/interface methods require an introduction interceptor or adapter. |\n| Runtime proxy | The generated bean definition asks a `RuntimeProxyCreator` to create the proxy object. | Runtime-specific proxy type | `DefaultRuntimeProxyDefinition` carries method metadata, interceptor data, target/proxy-target settings, and constructor values to the runtime proxy creator. |\n\n`@Around(proxyTarget = false)` is the normal class-subclass mode. `@Around(proxyTarget = true)` creates a proxy bean around a separate target bean, which changes lifecycle and destruction behavior because the context must find and destroy the target definition separately. Factory methods with around advice are forced into proxy-target mode because the factory owns creation of the original produced object. For factory-produced classes with constructor arguments, `proxyTargetMode` controls whether proxy generation fails, warns, or proceeds.\n\nMethod interception flow:\n\n1. The AOP writer records intercepted methods and interceptor binding metadata from class and method annotations.\n2. The generated proxy stores `ExecutableMethod[] $proxyMethods` and `Interceptor[][] $interceptors`.\n3. During proxy construction, `$proxyMethods` is filled from the generated executable-methods definition. In proxy-target mode, methods are looked up from the target `BeanDefinition` with `getRequiredMethod(...)`.\n4. The constructor resolves the applicable interceptor array for each method through `InterceptorChain.resolveAroundInterceptors(...)` or `resolveIntroductionInterceptors(...)`, using the preselected interceptor bean registrations injected into the proxy constructor.\n5. Each intercepted method override chooses the invocation target. Default around proxies pass `this`; proxy-target proxies pass the target field or call `interceptedTarget()` for lazy/hotswap cases.\n6. The override creates a `MethodInterceptorChain` with the method-specific interceptors, target, executable method, and argument values, then returns `proceed()`.\n7. In default around proxies, concrete methods get generated `$$access$$...` bridge methods so `proceed()` can call the original implementation via `super` without reflection. Introduction methods instead rely on introduction interceptors to provide the implementation.\n\n`io.micronaut.aop.beandefinition.ParameterizedInterceptedBeanDefinition<T>` is the AOP-side bridge for parametrized bean definitions with `@AroundConstruct`. It extends `ParametrizedInstantiatableBeanDefinition<T>` and adapts the normal `Map<String, Object>` argument path into a constructor interceptor chain: generated code resolves ordered construction values with `resolveInstantiationValues(...)`, the default map-based `doInstantiate(...)` starts `ConstructorInterceptorChain.instantiate(...)`, and the chain eventually calls the generated object-array `doInstantiate(...)` through `InterceptedParametrizedBeanConstructor`.\n\n`io.micronaut.aop.beandefinition.ParameterizedProxyBeanDefinition<T>` is the proxy-specific version of that bridge. Generated AOP proxy constructors append hidden parameters after the real constructor arguments: `BeanResolutionContext`, `BeanContext`, `Qualifier`, constructor interceptor registrations, and `InterceptorRegistry`. This interface extracts the pre-resolved constructor interceptors from the second-to-last constructor value and invokes `ConstructorInterceptorChain.instantiate(...)` with an additional proxy parameter count of `5`, so interceptors see only user constructor arguments while the final proxy constructor still receives its internal values.\n\n## Qualifiers\n\nUse `Qualifiers` as the factory entry point. It turns annotation metadata, names, type arguments, interceptor bindings, and composed qualifiers into `Qualifier<T>` instances.\n\nMost concrete qualifiers extend `FilteringQualifier<T>`, which implements the common `reduce`, `filter`, and `doesQualify` loops over `BeanType` and `QualifiedBeanType`.\n\nImportant qualifier implementations:\n\n| Class | Role |\n| --- | --- |\n| `AnyQualifier` | Matches every candidate and returns the first candidate for single lookup. |\n| `NoneQualifier` | Matches candidates with no declared qualifier. |\n| `PrimaryQualifier` | Matches `@Primary`, declared primary qualifiers, or primary-style candidate names. |\n| `NameQualifier` | Matches `@Named`, `NameResolver`, simple names, and generated name-plus-type conventions. |\n| `AnnotationQualifier` | Matches a runtime annotation instance. |\n| `AnnotationMetadataQualifier` | Matches annotation metadata, including binding and non-binding member rules. |\n| `AnnotationStereotypeQualifier` | Matches candidates by stereotype or repeatable stereotype container. |\n| `RepeatableAnnotationQualifier` | Matches repeatable qualifier annotation values. |\n| `CompositeQualifier` | Chains arbitrary qualifiers. |\n| `FilteringCompositeQualifier` | Chains only `FilteringQualifier` instances for faster direct matching. |\n| `TypeArgumentQualifier` | Matches candidate generic type arguments for a requested bean type. |\n| `ClosestTypeArgumentQualifier` | Narrows generic candidates to the closest assignable type argument match. |\n| `ExactTypeArgumentNameQualifier` | Matches a single generic argument by exact type name. |\n| `MatchArgumentQualifier` | Matches full nested `Argument` type parameters, including covariance and contravariance modes. |\n| `EachBeanQualifier` | Matches the origin bean definition for an `@EachBean` product. |\n| `TypeAnnotationQualifier` | Implements `@Type`-style filtering by exposed/assignable classes. |\n| `InterceptorBindingQualifier` | Matches interceptor beans against interceptor binding metadata. |\n| `QualifierUtils` | Shared package-private name, annotation, and declared-qualifier matching helpers. |\n| `Qualified` | Internal generated-code hook used to push a runtime qualifier into proxies/providers. |\n\nWhen changing qualifier behavior, check both `BeanType` candidates and `QualifiedBeanType` candidates. Many lookups first reduce references before loading definitions, so relying only on loaded `BeanDefinition` behavior can break startup and indexing paths.\n\n## Annotation Metadata\n\n`io.micronaut.inject.annotation` supplies the compile-time metadata implementation used by generated definitions and executable methods.\n\n`DefaultAnnotationMetadata` is the immutable runtime-oriented representation of declared annotations, all annotations, declared stereotypes, all stereotypes, and reverse stereotype indexes.\n\n`MutableAnnotationMetadata` is the build-time mutable variant used by processors and helper definitions before metadata is emitted or adapted.\n\n`AbstractAnnotationMetadata` supplies lazy synthesized annotation proxies and shared synthesis behavior.\n\n`AnnotationMetadataSupport` owns core annotation defaults, repeatable containers, annotation type registration, and proxy construction.\n\n`AnnotationMetadataReference` points to metadata by class name without unwrapping the target metadata. Generated code can use it as a stable metadata reference.\n\n`AnnotationMetadataHierarchy` composes metadata layers, especially factory-produced beans and AOP method/type metadata, while preserving declared-vs-inherited lookup behavior.\n\n`AbstractEnvironmentAnnotationMetadata`, `EnvironmentAnnotationMetadata`, `EnvironmentAnnotationValue`, `EnvironmentConvertibleValuesMap`, and `EnvironmentOptionalValuesMap` adapt annotation values to the active `Environment` and resolve placeholders lazily.\n\n`EvaluatedAnnotationMetadata`, `EvaluatedAnnotationValue`, `EvaluatedConvertibleValuesMap`, and `MappingAnnotationMetadataDelegate` adapt metadata with expression values that require a configured `BeanContext`, owning `BeanDefinition`, or method arguments.\n\n`AnnotationConvertersRegistrar` registers conversion from `AnnotationValue` objects to synthesized annotation instances.\n\n`AnnotatedElementValidator` is the compile-time validation hook for annotated elements.\n\n`AnnotationMetadataException` wraps metadata construction failures as `BeanContextException`.\n\n## Bean Introspection Helpers\n\n`io.micronaut.inject.beans` backs generated bean introspections, not dependency-injection definitions.\n\n`AbstractInitializableBeanIntrospection` is the generated-introspection base. It stores property, method, constructor, and annotation metadata and dispatches property/method access without reflection.\n\n`AbstractInitializableBeanIntrospectionAndReference` lets a generated introspection also serve as its own `BeanIntrospectionReference`.\n\n`AbstractEnumBeanIntrospectionAndReference` adds enum constant metadata support.\n\n`AbstractExecutableBeanMethod` adapts an introspection `BeanMethod` into an `ExecutableMethod`.\n\n`KotlinExecutableMethodUtils` recognizes Kotlin suspend functions whose continuation returns `Unit`.\n\n## Provider And Validation Helpers\n\n`io.micronaut.inject.provider.AbstractProviderDefinition` is both a `BeanDefinitionReference` and an `InstantiatableBeanDefinition` for provider-like injection points. It inspects the current `BeanResolutionContext` segment to determine the requested generic bean and qualifier.\n\n`JakartaProviderBeanDefinition` builds `jakarta.inject.Provider<T>` instances.\n\n`JavaxProviderBeanDefinition` builds legacy `javax.inject.Provider<T>` instances when that type is present.\n\n`BeanProviderDefinition` builds Micronaut `BeanProvider<T>` instances with lookup, iteration, streaming, qualifier composition, and definition access.\n\n`ProviderTypeInformationProvider` marks provider types as wrapper types for `Argument` type analysis.\n\n`io.micronaut.inject.validation.BeanDefinitionValidator` is the validation SPI used by `ValidatedBeanDefinition`.\n\n`io.micronaut.inject.validation.RequiresValidation` is an internal compile-time marker that generated definitions use to know validation is required.\n\n## Change Guidance\n\nKeep these contracts in sync with generated code in `inject-java`, `inject-groovy`, `inject-kotlin`, and the writers under annotation-processing modules. A default method change here can affect already-compiled generated definitions.\n\nPrefer adding new capability as default methods on interfaces only when old generated classes can keep working. If generated implementations must override a new method, update the relevant writers and tests together.\n\nAvoid reflection in new runtime paths. Existing deprecated reflection accessors are compatibility escape hatches and should not become part of new behavior.\n\nWhen a change touches bean selection, qualifiers, metadata, or lifecycle order, add focused tests that exercise lookup through `BeanContext`, not only direct unit calls on the helper class.\n\n<!-- File: .agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/examples-and-anti-patterns.md)\n\n<!-- File: .agents/skills/agent-md-refactor/references/refactor-playbook.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/agent-md-refactor/references/refactor-playbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/agent-md-refactor/references/refactor-playbook.md)\n\n<!-- File: .agents/skills/agent-md-refactor/SKILL.md (Tokens: ~663 | Category: anthropic-skill) -->\n---\nname: agent-md-refactor\ndescription: Refactor oversized agent instruction files into a progressive-disclosure structure. Use when users ask to split AGENTS.md/CLAUDE.md/COPILOT.md, reduce instruction bloat, or organize guidance into linked topic files.\nlicense: Apache-2.0\ncompatibility: Repositories using markdown instruction files such as AGENTS.md, CLAUDE.md, or COPILOT.md\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Agent MD Refactor\n\nRefactor monolithic instruction files into a compact root file plus linked topic files.\nKeep this file focused on execution flow and load detailed templates/examples from references.\n\n## Goal\n\nDeliver a maintainable instruction system with:\n\n- a minimal root instruction file containing only universal guidance,\n- linked topic files for detailed rules,\n- contradictions resolved and vague/redundant rules removed.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Refactor this AGENTS.md to use progressive disclosure.\"\n- \"Split my CLAUDE.md into focused instruction files.\"\n- \"My instruction file is too long, reorganize it.\"\n\nShould not trigger:\n\n- \"Explain what AGENTS.md is.\"\n- \"Fix one typo in CLAUDE.md.\"\n- \"Write a brand-new coding standard from scratch.\"\n\nMore examples: [examples-and-anti-patterns](references/examples-and-anti-patterns.md).\n\n## Procedure\n\n1. Inventory instruction sources (`AGENTS.md`, `CLAUDE.md`, `COPILOT.md`, related guidance docs).\n2. Detect contradictions and resolve by repository precedence.\n3. Keep only root-level essentials in the root instruction file.\n4. Group remaining content into 3-8 linked topic files with clear names.\n5. Remove non-actionable, redundant, and outdated directives.\n6. Validate links, coverage, and consistency before completion.\n\nDetailed step playbook: [refactor-playbook](references/refactor-playbook.md).\n\n## Inputs\n\n- Root instruction file path(s)\n- Existing repository conventions (commands, toolchain, style)\n- User constraints (must-keep rules, preferred layout)\n\n## Outputs\n\n- Refactored root instruction file (minimal, universal guidance)\n- Topic files with detailed rules\n- List of removed/merged rules with rationale\n- Notes on contradiction handling\n\n## Edge Cases\n\n- If rule precedence is impossible to infer, request one targeted user decision.\n- If multiple files repeat the same rule, keep one canonical source and replace others with links.\n- If the instruction file is already concise, avoid unnecessary splitting.\n- Use relative markdown links for portability.\n\n## Validation Checklist\n\n- [ ] Frontmatter is valid YAML and `name` matches directory.\n- [ ] Description states capability and usage triggers.\n- [ ] Root file contains only universal instructions.\n- [ ] Topic files are self-contained and linked from root.\n- [ ] Contradictions are resolved or explicitly called out.\n- [ ] Vague/default/redundant directives are removed or rewritten.\n- [ ] Relative links resolve.\n\n## References\n\n- [Refactor playbook](references/refactor-playbook.md)\n- [Examples and anti-patterns](references/examples-and-anti-patterns.md)\n\n<!-- File: .agents/skills/coding/SKILL.md (Tokens: ~2182 | Category: anthropic-skill) -->\n---\nname: coding\ndescription: Implement and review Java code changes for Micronaut framework repositories using maintainer standards, including JSpecify null-safety conventions. Use when users ask to add or refactor Java code, fix framework bugs, evolve internal APIs, or prepare committer-ready changes with tests and verification.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Coding (Micronaut Committer)\n\nUse this skill for maintainer-facing Java implementation work in Micronaut repositories. Do not default to end-user application shortcuts.\n\n## Goal\n\nDeliver minimal, source-backed Java changes that preserve framework quality: binary compatibility, JSpecify null-safety, reflection-free behavior, and full Gradle verification (`check`, `docs`, and compatibility checks when API-facing).\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Implement this Micronaut Java feature in `src/main/java` and keep API compatibility.\"\n- \"Refactor this module internals and mark non-public APIs correctly.\"\n- \"Fix failing framework tests and prepare committer-ready validation output.\"\n- \"Add configuration support using Micronaut conventions, not app-level shortcuts.\"\n\nShould not trigger:\n\n- \"Explain Micronaut basics to a beginner.\"\n- \"Create an end-user sample app from scratch.\"\n- \"Only edit release notes/changelog text.\"\n\n## Procedure\n\n1. Establish scope and API impact.\n2. Implement Java code with Micronaut maintainer conventions.\n3. Enforce API boundaries and binary compatibility.\n4. Document Java APIs and implementation intent.\n5. Keep Gradle/build changes aligned with repository conventions.\n6. Verify with maintainer-grade checks before completion.\n\n### 1) Establish scope and API impact\n\n- Identify affected modules and whether any change is public API or internal-only.\n- Inspect existing package patterns before editing (imports, nullability style, tests, naming).\n- For API-facing edits, plan compatibility checks up front (`japiCmp`).\n- Keep change surface minimal; avoid opportunistic refactors unless required.\n\n### 2) Implement Java with Micronaut maintainer conventions\n\n- Prefer modern Java idioms where they improve clarity (records, sealed types, pattern matching, `var` for local inference), but only when supported by the repository toolchain/target level.\n- Do not use fully qualified class names unless import conflicts force it.\n- Micronaut Java code uses JSpecify nullness annotations from `org.jspecify.annotations`; use JSpecify for new or modified nullability contracts.\n- New Java packages must include `package-info.java` with `@NullMarked` and `import org.jspecify.annotations.NullMarked`; when touching an existing package without `@NullMarked`, add it unless the local code has an explicit exception.\n- Use `org.jspecify.annotations.Nullable` for nullable values, including nullable parameters, return values, fields, array/component positions such as `String @Nullable []`, nullable collection elements such as `List<@Nullable T>`, and nullable type bounds such as `<T extends @Nullable Object>`.\n- Preserve existing nullability intent when editing older code. Use JSpecify for new or modified contracts, but do not rewrite deliberate compatibility annotations such as `io.micronaut.core.annotation.Nullable` or `jakarta.annotation.Nullable` unless the task is specifically a nullability migration and compatibility impact has been checked.\n- Avoid reflection-oriented implementations in framework code paths; prefer Micronaut compile-time/introspection mechanisms.\n- Use `jakarta.inject` APIs for DI, not `javax.inject`.\n- Prefer constructor injection and immutable state over field injection.\n- For configuration models, prefer `@ConfigurationProperties` over scattered `@Value` usage.\n\n### 3) Enforce API boundaries and compatibility\n\n- Treat all public-facing changes through a Semantic Versioning lens (`https://semver.org/`) before implementation.\n- Classify impact explicitly: patch for backward-compatible fixes, minor for backward-compatible feature additions, major for breaking API/behavioral changes.\n- Keep public API binary compatible unless a major-version change explicitly allows breaks.\n- Prefer non-breaking API evolution first: deprecate existing methods and add replacement variants/overloads instead of deleting methods or changing signatures in place.\n- When using the deprecate-and-add path, keep deprecated APIs functional, point to replacements in Javadoc, and schedule removals only for the next major version.\n- If breaking public-facing changes are explicitly allowed, document them in the user guide under `src/main/docs/guide` with migration notes, and update `toc.yml` when adding new guide sections.\n- Mark non-user-facing APIs with `@io.micronaut.core.annotation.Internal`.\n- Mark unstable public APIs with `@io.micronaut.core.annotation.Experimental` and avoid presenting them as stable contracts.\n- Mark members directly called by generated code with `@io.micronaut.core.annotation.UsedByGeneratedCode`; preserve those signatures unless the generated-code callers are updated in the same change.\n- Keep visibility as narrow as possible for non-public internals.\n- When deprecating API, provide migration-friendly Javadoc and avoid silent behavioral breaks.\n\n### 4) Document Java APIs and implementation intent\n\n- All public Java types and public methods must have Javadoc. Include public constructors when they are part of the user-facing API.\n- All new public Java types, methods, and user-facing constructors must include an `@since` Javadoc tag for the version where the PR will debut.\n- Determine the `@since` version from the approved target branch, not from guesswork. Inspect that branch's `gradle.properties` (`projectVersion`) and use the corresponding release version; for example, `4.9.0-SNAPSHOT` means the new API debuts in `4.9.0`.\n- If the PR is retargeted during follow-through, re-check the target branch's `gradle.properties` and update any newly added `@since` tags when the debut version changes.\n- Do not add `@since` tags to internal-only APIs annotated with `@Internal` unless the repository already does so for that internal package.\n- Internal and package-private methods should include maintainer-focused Javadoc when the implementation contract, lifecycle, invariants, or generated-code interaction is not obvious from the signature.\n- Complex new code should include focused inline comments that explain implementation decisions or invariants; do not narrate straightforward control flow.\n\n### 5) Keep Gradle/build changes convention-aligned\n\n- Use `./gradlew` for all Gradle execution.\n- Use Gradle version catalogs (`gradle/libs.versions.toml`) instead of hard-coded dependency versions.\n- Use appropriate scopes (`api`, `implementation`, `compileOnly`, `runtimeOnly`) based on API exposure.\n- Do not add custom build logic directly in module build files when it belongs in convention plugins.\n- When uncertain about module paths, use `./gradlew projects` and prefer canonical `micronaut-*` project names.\n\n### 6) Verify before completion\n\nFirst confirm canonical verification tasks from `CONTRIBUTING.md` and existing CI/build files, then run the repository equivalents from root.\n\nCommon sequence in Micronaut repositories:\n\n```bash\n./gradlew :<module>:compileTestJava\n# If module includes Groovy tests:\n./gradlew :<module>:compileTestGroovy\n./gradlew :<module>:test --tests 'pkg.ClassTest'\n./gradlew :<module>:test\n# If repository documents cM alias/checkstyle aggregate task:\n./gradlew -q cM\n./gradlew -q spotlessCheck\n./gradlew check\n./gradlew docs\n```\n\nFor API-affecting changes, also run if configured in the repository:\n\n```bash\n./gradlew japiCmp\n```\n\nIf Spotless fails, run `./gradlew -q spotlessApply` and re-run `spotlessCheck`.\n\n## Guardrails\n\n- Do not introduce `javax.inject` usage.\n- Do not introduce legacy or third-party nullability annotations for new or modified Micronaut Java contracts when JSpecify is available, except for deliberate compatibility annotations whose impact has been checked.\n- Do not hard-code dependency versions in module build files.\n- Do not break public APIs without explicit major-version intent.\n- Do not skip tests or docs verification for code changes.\n- Do not use reflection as a convenience in framework internals.\n\n## Delivery Contract\n\nWhen finishing implementation work, report:\n\n1. Exactly which files changed and why.\n2. Whether the change is API-facing or internal-only.\n3. Semantic Versioning impact classification (patch/minor/major) for any public-facing change.\n4. For deprecate-and-add API evolution, which elements were deprecated and which replacement variants were introduced.\n5. For breaking public-facing changes, which user guide files were updated and what migration guidance was added.\n6. For new public Java APIs, the `@since` version used and how it was derived from the target branch's `gradle.properties`.\n7. Commands executed for verification and outcomes.\n8. Any follow-up risk (for example compatibility implications).\n\n## Validation Checklist\n\n- [ ] `SKILL.md` frontmatter is valid and `name` matches directory (`coding`).\n- [ ] Guidance is maintainer-focused (not end-user app guidance).\n- [ ] Java conventions include JSpecify nullability (`@NullMarked`, `@Nullable`), DI, and reflection-free guidance.\n- [ ] API boundary guidance includes `@Internal`, `@Experimental`, `@UsedByGeneratedCode`, and compatibility checks.\n- [ ] Public Java types and methods require Javadoc.\n- [ ] New public Java APIs require `@since` tags derived from the approved target branch's `gradle.properties`.\n- [ ] Internal/package-private methods and complex new code include maintainer-focused Javadoc or inline comments when implementation intent is not obvious.\n- [ ] For public API evolution without breaking changes, deprecations include clear replacement guidance and functional compatibility is preserved.\n- [ ] If breaking changes are allowed, user guide docs in `src/main/docs/guide` are updated with migration notes.\n- [ ] Verification includes tests, style checks, `check`, and `docs`.\n\n## References\n\n- `CONTRIBUTING.md`\n- `MAINTAINING.md`\n- `.agents/skills/gradle/SKILL.md`\n- `.agents/skills/docs/SKILL.md`\n- `.agents/skills/skill-creator/references/spec-checklist.md`\n\n<!-- File: .agents/skills/docs/references/control-panel-patterns.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/docs/references/control-panel-patterns.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/control-panel-patterns.md)\n\n<!-- File: .agents/skills/docs/references/micronaut-docs-providers.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/docs/references/micronaut-docs-providers.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/docs/references/micronaut-docs-providers.md)\n\n<!-- File: .agents/skills/docs/SKILL.md (Tokens: ~1292 | Category: anthropic-skill) -->\n---\nname: docs\ndescription: 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.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects generated from micronaut-project-template\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n---\n\n# Docs (Micronaut Maintainer)\n\nUse this skill for maintainer-facing guide work in Micronaut framework repositories. Do not default to end-user application documentation advice.\n\n## Goal\n\nImplement 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.\n\n## Procedure\n\n1. Confirm repository docs layout and build tasks.\n2. Plan `toc.yml` and `.adoc` updates in lockstep.\n3. Apply Micronaut docs macro conventions used by maintainers.\n4. Prefer generated configuration property references over manual tables.\n5. Build and validate `publishGuide` and `docs` outputs.\n\n### 1) Confirm docs layout and build tasks\n\n- Check `src/main/docs/guide/toc.yml` first.\n- List relevant guide files under `src/main/docs/guide/**/*.adoc`.\n- If examples are involved, inspect `doc-examples/` (if present) and plan snippet tags from executable sources.\n- If assets are involved, keep images in `src/main/docs/resources/img/`.\n- Confirm standard commands from `CONTRIBUTING.md`:\n  - `./gradlew publishGuide` (or `./gradlew pG`) for guide assembly.\n  - `./gradlew docs` for guide + API docs assembly.\n- If repository layout diverges from template conventions, follow local conventions and explicitly report the divergence.\n\n### 2) Keep `toc.yml` and files in lockstep\n\nTreat `src/main/docs/guide/toc.yml` as navigation source of truth.\n\nRules:\n\n1. Every visible section must exist in `toc.yml`.\n2. Every `toc.yml` entry must resolve to a real `.adoc` path.\n3. Preserve section order unless the request explicitly changes navigation.\n4. Use nested sections for grouped topics when needed.\n\nExample nested pattern:\n\n```yaml\ncontrolPanels:\n  title: Available Control Panels\n  builtIn: Built-in\n  management: Management\n```\n\nThis maps to:\n\n- `src/main/docs/guide/controlPanels.adoc`\n- `src/main/docs/guide/controlPanels/builtIn.adoc`\n- `src/main/docs/guide/controlPanels/management.adoc`\n\n### 3) Apply Micronaut docs macro conventions\n\nUse docs macros registered by `micronaut-build` (`DocsExtensionRegistry`) and maintained for framework guides.\n\nPreferred mapping:\n\n| Need | Preferred pattern |\n|---|---|\n| Dependency instructions | `dependency:group:artifact[scope=...]` |\n| Source sample synchronized with test suites | `snippet::path/to/File.ext[tags=...]` |\n| Multi-format configuration snippets | `[configuration]` listing blocks |\n| Configuration properties reference | `include::{includedir}configurationProperties/<fqcn>.adoc[]` |\n| Shell commands | `[source,bash]` blocks |\n| Repository/release links | `https://github.com/{githubSlug}` and `/releases` links |\n\nGuardrails:\n\n- Do not handwrite separate Maven/Gradle dependency blocks when `dependency:` is suitable.\n- Do not replace Micronaut `snippet::` macros with direct Asciidoctor `[source]` includes or pasted code blocks just because the current examples have one language. The macro is the multi-language, source-backed contract for generated module docs.\n- Do not remove snippet callouts when touching examples. Preserve existing callout tags and callout explanations unless the underlying executable source no longer has that behavior.\n- Do not duplicate configuration property tables manually when generated references exist.\n- Keep environment-sensitive instructions explicit (for example `MICRONAUT_ENVIRONMENTS=dev`).\n- Prefer stable links to official Micronaut docs for endpoint semantics.\n\n### 4) Use generated configuration property references correctly\n\n- `micronaut-docs` provides `AsciiDocPropertyReferenceWriter`, which generates AsciiDoc property fragments from configuration metadata.\n- Micronaut docs build wiring consumes those fragments via `{includedir}configurationProperties/...` includes.\n- Prefer includes over hand-maintained property tables.\n\nSee `references/micronaut-docs-providers.md` for confirmed provider/macro details and source locations.\n\n### 5) Build and validate documentation\n\nFrom repository root, run:\n\n```bash\n./gradlew publishGuide\n./gradlew docs\n```\n\nValidation checklist:\n\n1. Commands exit with code `0`.\n2. Output exists under `build/docs/`.\n3. Updated sections appear in navigation and render without missing includes.\n4. Added images/links resolve.\n\nIf `publishGuide` passes but `docs` fails, fix the failing stage and rerun both commands.\n\n## Maintainer Delivery Contract\n\nWhen finishing docs work, report:\n\n1. Exact changed files (`.adoc`, `toc.yml`, docs resources).\n2. Which conventions were applied (`dependency:`, `snippet::`, `[configuration]`, generated property includes).\n3. Build commands run and outcomes.\n4. Any repo-specific divergences or follow-ups.\n\n## Validation Checklist\n\n- [ ] `toc.yml` and `.adoc` changes are consistent.\n- [ ] Macros and includes follow Micronaut maintainer conventions.\n- [ ] Existing `snippet::` macros and callouts are preserved unless executable source changes require a different tagged snippet.\n- [ ] `publishGuide` and `docs` executed successfully.\n- [ ] Output and navigation verified under `build/docs/`.\n- [ ] Guidance remains maintainer-focused (not generic app docs).\n\n## References\n\n- `references/micronaut-docs-providers.md`\n- `references/control-panel-patterns.md`\n- `CONTRIBUTING.md`\n- `src/main/docs/guide/toc.yml`\n\n<!-- File: .agents/skills/gradle/references/gradle-best-practices.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/gradle/references/gradle-best-practices.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/gradle-best-practices.md)\n\n<!-- File: .agents/skills/gradle/references/micronaut-build-plugins.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/gradle/references/micronaut-build-plugins.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/gradle/references/micronaut-build-plugins.md)\n\n<!-- File: .agents/skills/gradle/SKILL.md (Tokens: ~1361 | Category: anthropic-skill) -->\n---\nname: gradle\ndescription: Execute Gradle maintainer operations for Micronaut repositories using micronaut-build internals and modern Gradle best practices. Use when users ask to diagnose build failures, maintain BOM/version catalogs, manage publishing/signing, enforce binary compatibility, or debug micronaut-build plugin behavior.\nlicense: Apache-2.0\ncompatibility: Micronaut framework repositories in micronaut-projects using micronaut-build plugins\nmetadata:\n  author: Álvaro Sánchez-Mariscal\n  version: \"1.0.0\"\n  gradle-major-version: \"9.x\"\nmcp:\n  maven-tools:\n    command: docker\n    args: [\"run\", \"-i\", \"--rm\", \"arvindand/maven-tools-mcp:latest\"]\n---\n\n# Gradle (Micronaut Committer)\n\nUse this skill for Micronaut framework maintainer work. Do not default to end-user app guidance.\n\n## Goal\n\nApply correct, source-backed Gradle changes in Micronaut repositories, using the `micronaut-build` plugin contracts and current Gradle best practices.\n\nCurrent coverage target: repositories on Gradle major line `9.x`.\n\nFor dependency-intelligence tasks (version freshness, stability, release cadence, CVE/license checks), use the embedded `maven-tools` MCP via `skill_mcp`.\n\n## Procedure\n\n1. Identify build shape and active plugins.\n2. Map requested work to exact `micronaut-build` plugin behavior.\n3. Execute minimal maintainer-safe change.\n4. Verify with targeted and aggregate Gradle tasks.\n\n### 1) Establish build shape first\n\n- Inspect `settings.gradle` or `settings.gradle.kts` for settings plugins and dependency management.\n- Confirm `io.micronaut.build.shared.settings` is present unless the repository intentionally diverged.\n- Validate settings-scoped plugins (especially Develocity wiring) in `settings.gradle(.kts)`, not in project `build.gradle(.kts)`.\n- Confirm root build applies `io.micronaut.build.internal.parent` for standard aggregation behavior.\n- Inspect root and impacted module build files for applied plugin IDs and `micronautBuild` extension usage.\n- Inspect `buildSrc`/convention plugins before modifying module build scripts.\n- Inspect `gradle.properties` and `gradle/*.versions.toml` for version source and overrides.\n- Treat module directory names and Gradle project paths separately; if standardized names are enabled, use `:micronaut-*` paths for task targeting.\n- If module paths are unclear, run `./gradlew projects`.\n- If dependency resolution is involved, capture `dependencyInsight` before changing files.\n\n### 2) Use source-of-truth plugin contracts\n\n- Use `references/micronaut-build-plugins.md` as the authoritative plugin behavior map.\n- Treat `micronaut-build` source as primary truth. Its README may be outdated.\n- Remember default plugin IDs are internal: `io.micronaut.build.internal.<name>`.\n- Important exception: `io.micronaut.build.shared.settings`.\n\n### 3) Execute maintainer workflows\n\n- **Build failures**: reproduce with minimal task path, then expand to module `check`, then root validation.\n- **Catalog/version updates**: use plugin-provided workflows (`updateVersionCatalogs`, `useLatestVersions`) where available.\n- **Catalog imports**: prefer `micronautBuild { importMicronautCatalog() }` and alias-specific imports over ad hoc BOM wiring when repository conventions use settings extension catalog import.\n- **Dependency intelligence**: use the `maven-tools` MCP for latest stable versions, upgrade comparisons, and dependency health signals before changing catalogs or BOM constraints.\n- **Dependency scope hygiene**: choose `api` only for public API surface; use `implementation` for internals; use `compileOnly`/`runtimeOnly` intentionally.\n- **BOM/publishing**: verify BOM generation, inlining behavior, publication metadata, and signing gates.\n- **Binary compatibility**: keep baseline discovery and accepted API changes explicit; never silently suppress regressions.\n- **Docs/quality**: treat root-only aggregator plugins and docs pipelines as first-class checks.\n- **Layering**: prefer convention plugin changes (`buildSrc`) over duplicating logic in many module build files.\n\n### 4) Verify before completion\n\n- Run at least one targeted task and one aggregate task:\n  - `./gradlew :<module>:check`\n  - `./gradlew check`\n- For maintainer pipelines, include docs and style gates where applicable:\n  - `./gradlew check docs`\n  - `./gradlew spotlessApply spotlessCheck`\n- For API-affecting changes, run compatibility checks:\n  - `./gradlew japiCmp`\n- For newly added published modules, define when binary compatibility checks start in module build logic (example):\n\n```kotlin\nmicronautBuild {\n    binaryCompatibility.enabledAfter(\"2.0.0\")\n}\n```\n\n- Use the repository's intended first compatible release version instead of blindly reusing `2.0.0`.\n- Add focused diagnostics when needed:\n  - `./gradlew dependencyInsight --configuration <conf> --dependency <module>`\n  - `./gradlew --scan <task>`\n- Report exact commands and outcomes.\n\n## Guardrails\n\n- Do not use `enforcedPlatform` when plugin logic explicitly forbids it.\n- Do not bypass Micronaut version mismatch checks except intentional development-version flows.\n- Do not apply root-only plugins to subprojects.\n- Do not replace framework maintainer workflows with generic app-centric shortcuts.\n\n## Best Practices\n\nUse `references/gradle-best-practices.md` for operational standards on:\n\n- configuration and build cache behavior,\n- provider/lazy configuration patterns,\n- toolchains and reproducibility,\n- secure publishing and dependency verification,\n- CI reliability.\n\n## Examples\n\n- \"Diagnose why micronaut-core version mismatch fails on compileClasspath.\"\n- \"Update version catalogs safely and apply latest allowed minor versions.\"\n- \"Fix Sonatype release pipeline behavior for a non-snapshot release.\"\n- \"Investigate binary compatibility failure and validate accepted changes file usage.\"\n\n## Validation Checklist\n\n- [ ] Active plugins identified from build files.\n- [ ] Decisions mapped to `micronaut-build` source behavior.\n- [ ] Changes align with maintainer workflows.\n- [ ] Verification tasks run and outcomes captured.\n- [ ] No end-user-only Gradle guidance substituted for framework operations.\n\n## References\n\n- `references/micronaut-build-plugins.md`\n- `references/gradle-best-practices.md`\n\n<!-- File: .agents/skills/guides/references/guide-authoring-conventions.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/guides/references/guide-authoring-conventions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-authoring-conventions.md)\n\n<!-- File: .agents/skills/guides/references/guide-inventory.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/guides/references/guide-inventory.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/guide-inventory.md)\n\n<!-- File: .agents/skills/guides/references/pdf-export-and-pr.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/guides/references/pdf-export-and-pr.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/pdf-export-and-pr.md)\n\n<!-- File: .agents/skills/guides/references/repository-workflow.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/guides/references/repository-workflow.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/guides/references/repository-workflow.md)\n\n<!-- File: .agents/skills/guides/SKILL.md (Tokens: ~1691 | Category: anthropic-skill) -->\n---\nname: guides\ndescription: Create or update standalone Micronaut Guides in micronaut-projects/micronaut-guides, including topic discovery, guide authoring, validation, PDF export, and pull request handoff. Use for requests to create a Micronaut Guide, add a guide to micronaut-guides, author a tutorial for a Micronaut module, or prepare a guide PR with PDF.\nlicense: Apache-2.0\ncompatibility: Micronaut Guides repository and Micronaut repositories that need standalone tutorial PRs\nmetadata:\n  author: Micronaut Agent Company\n  version: \"1.0.0\"\n---\n\n# Guides (Micronaut Maintainer)\n\nUse this skill for standalone tutorial work in `micronaut-projects/micronaut-guides`. Start from the caller's local Micronaut repository to understand the API, module, or behavior being taught, then do the guide implementation in a current clone of `micronaut-guides`.\n\nDo not use this skill for ordinary module documentation under `src/main/docs/guide`; use the `docs` skill for that work. Do not use it for generic non-Micronaut tutorials.\n\n## Goal\n\nProduce a reviewable pull request against `micronaut-projects/micronaut-guides` with source-backed guide content, validation evidence, and a PDF export of the rendered guide page for maintainers.\n\n## Procedure\n\n1. Define the topic from the local repository.\n2. Refresh upstream `micronaut-guides` and deduplicate against existing guides.\n3. Inspect current repository conventions before writing.\n4. Author the smallest correct guide change.\n5. Validate the guide and render the page.\n6. Export a PDF and prepare the PR handoff.\n\n### 1) Define the Topic\n\n- Identify the exact Micronaut feature, module, API, integration, or migration path the guide should teach.\n- Read the local implementation, tests, module docs, and examples that prove the behavior.\n- Decide the target reader task in one sentence, for example: \"Use Micronaut Serialization with a custom serializer in a controller response.\"\n- Prefer a runnable application and tests over prose-only explanation.\n\n### 2) Refresh and Deduplicate\n\nWork from current upstream facts, not this skill's snapshot:\n\n```bash\ngit clone https://github.com/micronaut-projects/micronaut-guides.git\ncd micronaut-guides\ngit fetch origin\ngit switch master\ngit pull --ff-only\n```\n\nBefore creating a new guide, inventory `guides/*/metadata.json` and nearby guide source. Check titles, slugs, tags, categories, `apps`, `base`, `publish`, and guide bodies for duplicates or near-duplicates. Treat `publish: false` guides as base or partial guides, not public topics, but inspect them when a new guide could reuse them.\n\nIf an existing guide already teaches the task, update that guide instead of creating a duplicate. If overlap is ambiguous, stop and ask for maintainer direction.\n\n### 3) Inspect Current Conventions\n\nAlways read these current upstream files before editing:\n\n- `README.md`\n- `build.gradle`\n- `buildSrc/src/main/java/io/micronaut/guides/core/Guide.java`\n- `buildSrc/src/main/java/io/micronaut/guides/Category.java`\n- `buildSrc/src/main/resources/guide-metadata.schema.json`\n- Nearby guides in the same topic family\n\nUse `references/repository-workflow.md` for clone, branch, build-output, task naming, and validation details. Use `references/guide-authoring-conventions.md` for metadata, directory layout, macros, placeholders, and base-guide rules.\n\n### 4) Author the Guide\n\n- Choose a kebab-case slug that matches the reader task and does not collide with existing guide directories.\n- Create or update `guides/<slug>/metadata.json`.\n- Use one root AsciiDoc file named `<slug>.adoc` unless current metadata conventions require `asciidoctor`.\n- Put source under the expected Java, Groovy, and Kotlin layout when the guide supports multiple languages. If the feature is language-specific, set `languages` in metadata and explain why in the PR.\n- For single-app guides, use an app named `default`. For multi-app guides, mirror existing app-directory patterns and declare each app in metadata.\n- Use validated guide macros such as `common:`, `source:`, `resource:`, `test:`, `testResource:`, `callout:`, `external:`, `dependency:`, and `guideLink:` instead of manually duplicating generated paths.\n- Use conditional blocks such as `:exclude-for-languages:` and `:exclude-for-build:` for language-specific or build-tool-specific text.\n- Keep secrets out of source, generated code, rendered HTML, and the PDF. Use placeholders and documented cleanup steps for cloud resources.\n\n### 5) Validate\n\nConvert the guide slug from kebab-case to lowerCamelCase for dynamic tasks:\n\n```bash\n./gradlew <guideLowerCamel>Build\n./gradlew <guideLowerCamel>RunTestScript\n```\n\nFor broad validation or shared infrastructure changes, run:\n\n```bash\n./gradlew build\n```\n\nGenerated applications are under `build/code`. Rendered HTML and site assets are under `build/dist`. For cloud, credentialed, or cost-incurring guides, do not run provisioning commands without explicit confirmation; document skipped validation and the reason.\n\n### 6) Export PDF and Handoff\n\nAfter rendering, export the reviewed HTML page to PDF. Prefer a headless browser export when available, and fall back to a manual browser \"Print to PDF\" export when needed. Keep the PDF as local review evidence or attach it to the PR; do not commit generated PDFs unless maintainers explicitly request that.\n\nThe PR body must include:\n\n- Guide slug and user-facing task.\n- Files changed.\n- Commands run and outcomes.\n- Rendered HTML path inspected.\n- PDF filename and whether it is attached or linked.\n- Any skipped validation, cloud costs, credentials, or cleanup notes.\n\nSee `references/pdf-export-and-pr.md` for the export workflow and PR checklist.\n\n## Security Guardrails\n\n- Never commit secrets, tokens, local credentials, cloud account identifiers, `.env` files, or generated PDFs containing private data.\n- Ask before running commands that provision cloud resources or incur cost.\n- Prefer sample placeholders for credentials and explain cleanup for created resources.\n- Scrub screenshots, HTML, logs, and PDFs before attaching them to a PR.\n- Do not add custom Starter features, dependencies, or buildSrc changes unless the guide topic requires them and nearby guide conventions support the change.\n\n## Examples\n\nUse this skill for:\n\n- \"Create a Micronaut Guide for the new serialization feature.\"\n- \"Add a guide to `micronaut-guides` for this module.\"\n- \"Author a tutorial for Micronaut Data's new repository behavior.\"\n- \"Prepare a guide PR with the rendered PDF.\"\n\nDo not use this skill for:\n\n- \"Update `src/main/docs/guide/toc.yml` in this module.\"\n- \"Fix the release history page in this repository.\"\n- \"Write a generic blog post about Java.\"\n\n## Validation Checklist\n\n- [ ] Current `micronaut-guides` was cloned or fetched before writing.\n- [ ] Existing guide titles, slugs, tags, categories, and `publish: false` bases were checked for duplicates.\n- [ ] `README.md`, metadata schema, category source, and nearby guide examples were inspected.\n- [ ] Guide source uses current metadata, directory, macro, language, and build-tool conventions.\n- [ ] Single-guide build and test-script tasks were run, or skipped with a specific reason.\n- [ ] Rendered HTML was inspected under `build/dist`.\n- [ ] PDF export was created and named in the PR handoff.\n- [ ] PR handoff explains changed files, validation, skipped steps, and any security-sensitive handling.\n\n## References\n\n- `references/repository-workflow.md`\n- `references/guide-authoring-conventions.md`\n- `references/guide-inventory.md`\n- `references/pdf-export-and-pr.md`\n\n<!-- File: .agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/micronaut-projects/micronaut-core/HEAD/.agents/skills/micronaut-sourcegen/references/sourcegen-cookbook.md)\n\n<!-- File: .agents/skills/micronaut-sourcegen/SKILL.md (Tokens: ~2705 | Category: anthropic-skill) -->\n---\nname: micronaut-sourcegen\ndescription: Add, integrate, or review Micronaut Sourcegen usage in modules that generate Java source, Kotlin source, Groovy-compatible source, or bytecode from ObjectDef, TypeDef, MethodDef, ExpressionDef, StatementDef, and SourceGenerator APIs.\nlicense: Apache-2.0\ncompatibility: Micronaut framework and library modules that use io.micronaut.sourcegen for compile-time generation\nmetadata:\n  author: Denis Stepanov\n  version: \"1.0.0\"\n---\n\n# Micronaut Sourcegen\n\nUse this skill when a Micronaut module wants to generate types with Micronaut Sourcegen instead of handwritten source strings, reflection, JavaPoet/KotlinPoet calls in visitors, or ad hoc bytecode. The target module may emit Java source, Kotlin source, Groovy-compatible source, or bytecode, but the generation logic should model the type once with `io.micronaut.sourcegen.model`.\n\n## Goal\n\nHelp other modules adopt Micronaut Sourcegen safely: choose the right backend, wire the right processor dependencies, build language-neutral model definitions, and verify generated Java/Kotlin/bytecode behavior with targeted tests.\n\n## Trigger Examples\n\nShould trigger:\n\n- \"Use Micronaut Sourcegen in this module to generate a repository implementation.\"\n- \"Generate bytecode instead of Java source for this visitor.\"\n- \"Make this annotation processor generate Java and Kotlin outputs with Sourcegen.\"\n- \"Replace handwritten generated-source strings with `ClassDef` and `MethodDef`.\"\n- \"Add method bodies with switches, static calls, static field arguments, and constructor calls.\"\n\nShould not trigger:\n\n- \"Only edit user guide text.\"\n- \"Only change Gradle publishing metadata.\"\n- \"Only refactor backend writer internals without a module consuming Sourcegen.\"\n- \"Explain Micronaut annotation processing without generated types.\"\n\n## Procedure\n\n1. Identify the consuming module and generation target.\n2. Choose one backend for each compilation path.\n3. Wire dependencies using the repository version catalogs and processor configurations.\n4. Implement generation in a visitor with Sourcegen model builders and helpers.\n5. Emit through `SourceGenerator.write(...)` or bytecode writer APIs as appropriate.\n6. Add cross-target tests for the generated contract.\n7. Run focused compile/test/style verification.\n\n### 1) Identify the Consuming Module\n\n- Confirm whether the module is an annotation processor/generator module, an application/test-suite module consuming a generator, or a backend writer module.\n- Locate existing visitor registration under `META-INF/services/io.micronaut.inject.visitor.TypeElementVisitor`.\n- Identify source language paths:\n  - Java annotation processing uses `annotationProcessor`.\n  - Kotlin compilation usually uses `ksp`.\n  - Bytecode generation runs during Java-language processing and writes class files directly.\n- Inspect existing generated-type tests before changing behavior.\n\n### 2) Choose the Backend\n\n- Use `sourcegen-generator-java` when the module should emit `.java` source for `VisitorContext.Language.JAVA`; it also provides `GroovyPoetSourceGenerator` for `GROOVY`.\n- Use `sourcegen-generator-kotlin` when Kotlin/KSP processing should emit `.kt` source for `VisitorContext.Language.KOTLIN`.\n- Use `sourcegen-generator-bytecode` when Java-language processing should emit `.class` files directly through `ByteCodeGenerator`.\n- Do not put both Java-source and bytecode Sourcegen generators on the same Java annotation-processor path unless the module intentionally owns selection. Both advertise `VisitorContext.Language.JAVA`, and `SourceGenerators.findByLanguage(JAVA)` expects a single effective backend.\n- Use `sourcegen-bytecode-writer` directly only when implementing or testing bytecode writer behavior, not as the normal integration point for consuming annotation processors.\n\n### 3) Wire Dependencies\n\n- In a generator/processor module, depend on `sourcegen-generator` for the model and service lookup APIs. Add `sourcegen-annotations` only when the module consumes Sourcegen annotations such as builders/wither support.\n- In a Java consumer/test module, add the chosen backend and the custom generator to `annotationProcessor`.\n- In a Kotlin consumer/test module, add the Kotlin backend and KSP-compatible custom generator to `ksp`.\n- In a bytecode consumer/test module, add `sourcegen-generator-bytecode` to `annotationProcessor`.\n- Use Gradle version catalogs and existing project accessors. Do not hardcode dependency coordinates or versions.\n\nExample repository-local shapes:\n\n```kotlin\ndependencies {\n    implementation(projects.sourcegenGenerator)\n\n    annotationProcessor(projects.sourcegenGeneratorJava)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n```kotlin\ndependencies {\n    ksp(projects.sourcegenGeneratorKotlin)\n    ksp(projects.myCustomGeneratorsKotlin)\n}\n```\n\n```kotlin\ndependencies {\n    annotationProcessor(projects.sourcegenGeneratorBytecode)\n    annotationProcessor(projects.myCustomGenerators)\n}\n```\n\n### 4) Build Models With Factories, Not Record Constructors\n\n- Always create Sourcegen model elements through builders, factory methods, or helper methods: `ClassDef.builder`, `InterfaceDef.builder`, `RecordDef.builder`, `EnumDef.builder`, `AnnotationObjectDef.builder`, `MethodDef.builder`, `MethodDef.constructor`, `FieldDef.builder`, `PropertyDef.builder`, `ParameterDef.builder`, `TypeDef.of`, `ClassTypeDef.of`, `TypeDef.parameterized`, `ExpressionDef.constant`, `StatementDef.multi`, `StatementDef.doTry`, `expr.returning`, `expr.invoke`, `type.invokeStatic`, `type.getStaticField`, and switch/if helper methods.\n- Do not instantiate DSL records directly in consuming modules, for example avoid `new ClassTypeDef.Parameterized(...)`, `new TypeDef.Array(...)`, `new ExpressionDef.Constant(...)`, `new StatementDef.Switch(...)`, or other `new ...record(...)` forms.\n- If a construct has no public helper yet, add or use a small named helper/factory at the nearest appropriate level instead of spreading direct record construction through module code.\n- Keep model construction language-neutral. Do not call JavaPoet, KotlinPoet, ASM, or write source strings from a visitor unless the task is explicitly inside a backend writer.\n\n### 5) Implement Visitors\n\n- Prefer `TypeElementVisitor` with `VisitorKind.ISOLATING` when generated output depends only on the visited element.\n- Resolve the backend through `SourceGenerators.findByLanguage(context.getLanguage()).orElse(null)` and return when none is available.\n- Build `ObjectDef` instances from Micronaut AST metadata (`ClassElement`, `MethodElement`, `FieldElement`, `PropertyElement`) when possible.\n- Emit with `sourceGenerator.write(objectDef, context, originatingElement)`.\n- Use `SourceGenerators.handleFatalException(...)` when generation may postpone to a later round.\n\nMinimal visitor shape:\n\n```java\nSourceGenerator sourceGenerator = SourceGenerators.findByLanguage(context.getLanguage()).orElse(null);\nif (sourceGenerator == null) {\n    return;\n}\n\nClassDef generated = ClassDef.builder(element.getPackageName() + \".Generated\")\n    .addModifiers(Modifier.PUBLIC, Modifier.FINAL)\n    .addMethod(MethodDef.builder(\"name\")\n        .addModifiers(Modifier.PUBLIC)\n        .returns(TypeDef.STRING)\n        .build((aThis, params) -> ExpressionDef.constant(\"generated\").returning()))\n    .build();\n\nsourceGenerator.write(generated, context, element);\n```\n\n### 6) Model Generated Behavior\n\n- Use `ClassDef`, `InterfaceDef`, `RecordDef`, `EnumDef`, and `AnnotationObjectDef` for generated type kind.\n- Use `TypeDef` and `ClassTypeDef` for primitives, arrays, generics, generated class names, nullability, and static field owners.\n- Use `MethodDef` body builders for executable logic. Prefer explicit `returns(...)` for public or non-trivial generated methods.\n- When generated code reads or writes a field that the same generator defines, keep the `FieldDef` instance and reference it with `aThis.field(fieldDef)` or `generatedType.getStaticField(fieldDef)` instead of repeating the field name and type.\n- When generated code invokes a method that the same generator defines, keep the `MethodDef` instance and invoke it with `receiver.invoke(methodDef, ...)` or `generatedType.invokeStatic(methodDef, ...)` instead of repeating the method name, parameter types, and return type.\n- When generated code targets an existing method or field that is accessible reflectively and present on the annotation processor classpath, prefer a reflective handle from `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)`. Pass method handles to `receiver.invoke(method, ...)` or `type.invokeStatic(method, ...)`; pass static field handles to `type.getStaticField(field)`; for instance fields, centralize the field-name/type bridge in a helper fed by the reflective `Field`. This uses reflection only at generation time to describe a known member; it must not generate runtime reflection.\n- Use `StatementDef.multi(...)`, `expr.returning()`, `expr.newLocal(...)`, `condition.doIf(...)`, `expr.asExpressionSwitch(...)`, `expr.asStatementSwitch(...)`, `StatementDef.doTry(...)`, and invocation helpers to compose bodies.\n- Use `ClassTypeDef.getStaticField(\"NAME\", valueType)` for enum constants, static constants, class literals, and static-field arguments passed to invocations.\n- String switches are supported. For string switch cases, use a `TypeDef.STRING` switch expression and `ExpressionDef.constant(\"case\")` keys with `asExpressionSwitch(...)` or `asStatementSwitch(...)`.\n\n### 7) Verify\n\n- Compile the generator module and the consuming test module.\n- Run targeted tests that load or compile generated types for each backend touched.\n- For Java source generation, verify generated `.java` behavior through Java test-suite tests.\n- For Kotlin source generation, verify KSP and Kotlin tests.\n- For bytecode generation, verify runtime behavior and bytecode writer tests when the model shape exercises bytecode-specific paths.\n- Finish source changes with the repository checks required by `AGENTS.md`: affected compile tasks, targeted tests, full affected module tests, `./gradlew -q cM`, and `./gradlew -q spotlessCheck` if new files were added.\n\n## Backend Notes\n\n- Java source backend: `JavaPoetSourceGenerator` writes Java source for `VisitorContext.Language.JAVA`.\n- Groovy-compatible source backend: `GroovyPoetSourceGenerator` reuses the Java source generator for `GROOVY`.\n- Kotlin source backend: `KotlinPoetSourceGenerator` writes Kotlin source for `VisitorContext.Language.KOTLIN`.\n- Bytecode backend: `ByteCodeGenerator` advertises `JAVA` and writes class files through `context.visitClass(...)`; it does not support `write(ObjectDef, Writer)`.\n\n## Cookbook\n\nUse `references/sourcegen-cookbook.md` for adoption patterns covering:\n\n- Gradle dependency placement for generator modules and consumers,\n- backend selection for Java, Kotlin, Groovy-compatible source, and bytecode,\n- type/model construction using builders and helper methods,\n- generated classes, interfaces, records, enums, annotations, method bodies, switches, invocations, static fields, arrays, lambdas, and super constructors,\n- testing and validation across source and bytecode backends.\n\n## Guardrails\n\n- Do not instantiate Sourcegen DSL records directly in consuming modules; use builders, factories, or named helper methods.\n- Do not duplicate generated member metadata in generated code bodies; prefer the existing `FieldDef` or `MethodDef` instance when reading/writing generated fields or invoking generated methods.\n- Do not use string-based references for known existing classpath methods/static fields when a `ReflectionUtils.getRequiredMethod(...)` or `ReflectionUtils.getRequiredField(...)` handle can describe the member safely.\n- Do not generate source text with string concatenation when a Sourcegen model construct exists.\n- Do not place multiple `JAVA` Sourcegen backends on the same annotation-processor path unless selection is explicit and tested.\n- Do not use backend-specific JavaPoet/KotlinPoet/ASM APIs from normal visitors.\n- Do not use reflection for generation metadata when Micronaut AST elements are available.\n- Do not break public Sourcegen APIs without explicit approval and compatibility checks.\n\n## Validation Checklist\n\n- [ ] Skill folder name and `name:` frontmatter are `micronaut-sourcegen`.\n- [ ] Consuming module and target backend are identified.\n- [ ] Java/Kotlin/bytecode processor dependencies are scoped correctly.\n- [ ] Only one effective `JAVA` Sourcegen backend is present for a Java compilation path.\n- [ ] Model definitions use builders/factories/helpers, not direct DSL record constructors.\n- [ ] Generated fields/methods referenced from generated bodies are referenced through their `FieldDef`/`MethodDef` instances where available.\n- [ ] Generated sources/classes are emitted through `SourceGenerator.write(...)` or backend writer APIs where appropriate.\n- [ ] Targeted and full affected tests pass, or unrun checks are reported clearly.\n\n## References\n\n- `references/sourcegen-cookbook.md`\n\n<!-- File: .agents/skills/skill-creator/references/research-synthesis.md (Tokens: ~276 | Category: anthropic-skill) -->\n# Research Synthesis\n\nThis note captures the design decisions used for `skill-creator`.\n\n## Sources\n\n- Agent Skills specification: https://agentskills.io/specification\n- Anthropic skill-creator reference:\n  https://github.com/anthropics/skills/tree/main/skills/skill-creator\n- OpenAI skill-creator reference:\n  https://github.com/openai/skills/tree/main/skills/.system/skill-creator\n- Skills CLI reference:\n  https://github.com/vercel-labs/skills\n\n## Shared patterns extracted\n\n1. Core process is iterative: scope, draft, test, refine.\n2. Trigger quality depends primarily on frontmatter description clarity.\n3. Progressive disclosure is essential for context efficiency.\n4. Optional resources should be added only when they reduce repeated work.\n\n## Vendor-specific elements intentionally avoided\n\n1. Model/provider-specific instructions and path assumptions.\n2. Dependence on platform-specific UI workflows.\n3. Tooling that only exists in one agent runtime.\n\n## Decisions in this skill\n\n1. Keep the main workflow in `SKILL.md` as a portable baseline.\n2. Move strict checklists and scaffolds into `references/` files.\n3. Include skills CLI validation guidance (`npx skills list`) and optional spec validator guidance (`skills-ref validate`).\n4. Keep language imperative and implementation-focused.\n\n<!-- File: .agents/skills/skill-creator/references/spec-checklist.md (Tokens: ~380 | Category: anthropic-skill) -->\n# Agent Skills Spec Checklist\n\nUse this checklist when creating or modifying a skill to keep it compatible with the Agent Skills specification.\n\nPrimary source: https://agentskills.io/specification\n\n## MUST requirements\n\n1. Skill is a directory containing `SKILL.md`.\n2. `SKILL.md` starts with valid YAML frontmatter.\n3. Frontmatter includes required fields:\n   - `name`\n   - `description`\n4. `name` rules:\n   - 1-64 characters\n   - lowercase letters, numbers, hyphens only\n   - does not start/end with hyphen\n   - no consecutive hyphens\n   - matches parent directory name\n5. `description` rules:\n   - 1-1024 characters\n   - non-empty\n   - states what the skill does and when to use it\n6. Markdown body exists after frontmatter.\n\n## SHOULD guidance\n\n1. Keep `SKILL.md` under ~500 lines for efficient context usage.\n2. Use progressive disclosure:\n   - keep core instructions in `SKILL.md`\n   - move detailed material to `references/`\n3. Add `scripts/` only for deterministic or repeated work.\n4. Keep file references relative to skill root.\n5. Keep references shallow and easy to discover from `SKILL.md`.\n\n## Optional frontmatter fields\n\n- `license`\n- `compatibility`\n- `metadata`\n- `allowed-tools` (experimental; support varies by agent)\n\n## Portability rules\n\n1. Avoid vendor-specific instructions unless requested by the user.\n2. Avoid agent-specific path assumptions if portable paths are possible.\n3. Avoid relying on non-standard tools without fallback guidance.\n\n## Validation commands\n\nIf available:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nFor discovery checks in a workspace using skills CLI:\n\n```bash\nnpx skills list\n```\n\n<!-- File: .agents/skills/skill-creator/references/templates.md (Tokens: ~452 | Category: anthropic-skill) -->\n# Universal Skill Templates\n\nUse these templates as starting points. Keep them concise and agent-agnostic.\n\n## 1) Minimal `SKILL.md` template\n\n```markdown\n---\nname: <skill-name>\ndescription: <what this skill does and when to use it>\nlicense: MIT\n---\n\n# <Skill Title>\n\n## Goal\n\n<one paragraph describing expected outcomes>\n\n## Procedure\n\n1. <step 1>\n2. <step 2>\n3. <step 3>\n\n## Inputs\n\n- <input 1>\n- <input 2>\n\n## Outputs\n\n- <output contract>\n\n## Edge cases\n\n- <edge case 1 and handling>\n- <edge case 2 and handling>\n\n## Validation\n\n- [ ] Frontmatter is valid YAML\n- [ ] Name matches folder\n- [ ] Description includes trigger contexts\n- [ ] Relative file references resolve\n```\n\n## 2) Expanded structure template\n\n```text\n<skill-name>/\n├── SKILL.md\n├── scripts/\n│   └── <script>.py\n├── references/\n│   ├── <domain>.md\n│   └── <schemas>.md\n└── assets/\n    └── <template-or-static-file>\n```\n\nUse this expanded layout only if those resources are truly needed.\n\n## 3) Trigger description pattern\n\nWrite descriptions that include both capability and activation cues.\n\nPattern:\n\n\"<Core capability>. Use when users ask to <intent 1>, <intent 2>, or <intent 3>, including phrasing such as <example cues>.\"\n\nExample:\n\n\"Generate release notes from Git history with categorized changes. Use when users ask to draft changelogs, summarize commits for releases, or prepare version notes from tags or commit ranges.\"\n\n## 4) Improvement loop template\n\nWhen improving an existing skill:\n\n1. Review current `SKILL.md` and user complaints.\n2. Capture 2-3 should-trigger and 2-3 should-not-trigger prompts.\n3. Revise `description` for better trigger clarity.\n4. Move long details from `SKILL.md` to `references/`.\n5. Re-validate against checklist in `references/spec-checklist.md`.\n\n<!-- File: .agents/skills/skill-creator/SKILL.md (Tokens: ~1015 | Category: anthropic-skill) -->\n---\nname: skill-creator\ndescription: Create new Agent Skills or improve existing ones in an agent-agnostic way. Use when users ask to build, refactor, validate, or package skills compatible with the Agent Skills specification and the skills CLI ecosystem.\nlicense: MIT\ncompatibility: Compatible with Agent Skills spec and skill directories such as .agents/skills or equivalent agent-specific skill paths.\nmetadata:\n  author: local\n  version: \"1.0.0\"\n---\n\n# Skill Creator\n\nCreate and refine skills that work across agents implementing the Agent Skills specification.\n\nUse imperative instructions. Keep the process deterministic where possible. Keep the skill output portable.\n\n## Objectives\n\n1. Produce a valid skill with a correct `SKILL.md` frontmatter and useful body instructions.\n2. Keep the skill agent-agnostic unless the user explicitly requests agent-specific behavior.\n3. Apply progressive disclosure so only essential content stays in `SKILL.md`.\n4. Validate structure and naming before declaring completion.\n\n## Workflow\n\n### 1) Identify intent and scope\n\nDetermine whether the user wants one of these outcomes:\n\n- New skill from scratch\n- Update an existing skill\n- Improve trigger quality (`description` tuning)\n- Add reusable resources (`scripts/`, `references/`, `assets/`)\n\nExtract known constraints from conversation context first. Only ask for missing details that materially change implementation.\n\n### 2) Gather concrete examples\n\nCollect at least 2 realistic user prompts that should trigger the target skill. Also collect at least 2 near-miss prompts that should not trigger it.\n\nUse these examples to decide:\n\n- Required workflow steps\n- Output format expectations\n- Edge cases to handle\n- Whether deterministic scripts are needed\n\n### 3) Design the skill anatomy\n\nCreate a minimal structure first:\n\n```text\n<skill-name>/\n└── SKILL.md\n```\n\nAdd optional directories only when justified:\n\n- `scripts/` for deterministic or repeated operations\n- `references/` for detailed docs, schemas, and long procedures\n- `assets/` for templates and static resources used in outputs\n\n### 4) Author `SKILL.md` frontmatter\n\nSet required fields:\n\n- `name`: lowercase, digits, hyphens; matches folder name\n- `description`: what the skill does and when to use it\n\nCommon optional fields include `license`, `compatibility`, `metadata`, and `allowed-tools`. Additional frontmatter keys (for example, MCP or tooling configuration) are allowed when supported by the Agent Skills spec/validator, and may be nested under `metadata` when appropriate.\n\nDescription guidance:\n\n- Include both capability and trigger cues\n- Avoid vague phrases like \"helps with X\"\n- Prefer concrete contexts and user-language synonyms\n\n### 5) Author `SKILL.md` body\n\nStructure the body for execution, not marketing:\n\n1. Goal and success criteria\n2. Step-by-step operating procedure\n3. Input/output expectations\n4. Error handling and edge cases\n5. Examples\n6. Validation checklist\n\nWrite in imperative style. Explain why non-obvious constraints matter.\n\n### 6) Apply progressive disclosure\n\nKeep `SKILL.md` concise. Move large or specialized content into `references/` and link to it from `SKILL.md`.\n\nIf the skill spans multiple variants, separate variant details into dedicated reference files and keep variant-selection logic in `SKILL.md`.\n\n### 7) Validate and harden\n\nRun a final compatibility pass:\n\n- Frontmatter parses as valid YAML\n- `name` complies with spec constraints and folder match\n- `description` is explicit about trigger contexts\n- Relative file references resolve\n- Optional scripts are executable and documented\n- Language is agent-neutral and avoids vendor lock-in\n\nIf `skills-ref` is available, run:\n\n```bash\nskills-ref validate ./<skill-name>\n```\n\nIf the skills CLI is available, verify discovery from the repo root:\n\n```bash\nnpx skills list\n```\n\n## Agent-Agnostic Rules\n\n- Do not require a specific model vendor or proprietary UI affordance.\n- Do not rely on agent-only file paths when portable paths exist.\n- Do not reference unavailable tools as mandatory.\n- Prefer open, portable commands and plain Markdown guidance.\n\n## Safety and integrity\n\n- Refuse to create skills intended for malware, exploitation, data exfiltration, or unauthorized access.\n- Keep behavior aligned with user intent; avoid hidden actions.\n\n## Completion criteria\n\nA skill-creation task is complete only when all are true:\n\n1. Skill folder exists in the requested location.\n2. `SKILL.md` is valid and complete.\n3. Optional resources are present only if needed.\n4. Validation checks pass or limitations are explicitly reported.\n\n## References\n\n- See `references/spec-checklist.md` for implementation rules distilled from the spec.\n- See `references/templates.md` for copy-ready scaffolds.\n- See `references/research-synthesis.md` for design rationale from cross-source research.\n</yakaai_skills>"}