diff --git a/src/docs/Modules/Standards.md b/src/docs/Modules/Standards.md index 8b72597..0651cc5 100644 --- a/src/docs/Modules/Standards.md +++ b/src/docs/Modules/Standards.md @@ -42,6 +42,7 @@ Layout rules: - **One declaration per file.** Filename matches the declared symbol exactly, including casing. - **Group by domain.** Use resource or behaviour groups — not verb folders, not endpoint paths. - **Mirror public and private domains.** Public command under `src/functions/public/Projects/` has related private helpers under `src/functions/private/Projects/`. +- **No nested functions.** Do not define helper functions inside other functions. Extract helper logic to a separate function file and decide whether it belongs in `src/functions/private//` (internal-only) or `src/functions/public//` (part of the module API). - **Declare dependencies where they are used.** Use `#Requires -Modules ` at the top of each function file that needs an external module. Do not add `RequiredModules` to `src/manifest.psd1` — the build collects all `#Requires` declarations automatically and writes them into the compiled manifest. Entries in `src/manifest.psd1` are silently ignored for this purpose. - **Group documentation pages with source.** Place a `.md` file alongside the function files in each `src/functions/public//` folder to provide a category overview in generated documentation.