I'd like to propose a documentation-first approach that preserves the current defaults.
An AI-assisted investigation using the current CJS template (main at 1fb1f49, CLI package 8.0.3) reproduced an option collision: server-level ajv.customOptions.coerceTypes: false reached an autoloaded @fastify/env plugin, so PORT: '3000' failed integer validation. This was a template-based minimal reproduction, not a full CLI integration test, using Fastify 5.12.8, autoload 6.5.1, env 5.0.3 and env-schema 6.1.0. The historical ajv.validate is not a function error in demo#119 did not reproduce with these versions.
Removing all autoload options avoided the collision, but also stopped application-specific options from reaching routes. Passing only selected application options, or wrapping the external plugin and supplying its options explicitly, preserved those values without the collision.
Would you welcome a small documentation/template-comment change that:
- explains the server/app/autoload option propagation and possible name collisions;
- shows selective forwarding or an explicit wrapper for third-party plugins;
- keeps the existing default behavior for compatibility, with consistent guidance across the templates?
Or would you prefer changing the default forwarding in newly generated applications? I wanted to check the intended direction before preparing a PR.