Skip to content

Commit fe0fa0a

Browse files
Preserve unique content in the README default
Trimming a module README must not delete unique information. Adds a content-preservation rule (keep/trim/relocate, never drop), makes the capabilities showcase mandatory for implemented modules, carves out an upstream attribution and licensing exception, fixes the copy/paste-hostile Get-Help example, and extends README validation.
1 parent a5d55eb commit fe0fa0a

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

src/docs/PowerShell/Modules/Repository-Defaults.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ Dependabot PRs still go through normal review. Automated dependency updates are
171171
172172
A module README is a start page, not the command reference or full manual. It brings a reader in, answers the first questions, and sends them to the right documentation surface.
173173
174+
Making the README shorter must not delete unique information. The README is often the only place that carries certain content: prerequisites, platform and dependency notes, authentication and setup guidance, operational behavior such as caching, state, or update and versioning semantics, and upstream attribution. None of that is generated from comment-based help, so trimming the README must preserve it — keep it on the landing page when it belongs there, or relocate it to `docs/`, `examples/`, or comment-based help. Only remove content that is genuinely duplicated by generated command documentation.
175+
174176
The README answers these questions, in this order:
175177

176178
| Question | Module README responsibility |
@@ -224,15 +226,25 @@ Use PowerShell help and command discovery for module details:
224226

225227
```powershell
226228
Get-Command -Module <ModuleName>
227-
Get-Help -Name 'CommandName' -Examples
229+
Get-Help -Name <Command> -Examples
228230
```
229231
````
230232

231-
README pages should include a short capabilities or usage showcase before the documentation link when the module has working capabilities. Keep that section focused on discovery and marketing: show representative outcomes, not every command, parameter, or edge case.
233+
In the documentation examples, replace `<Command>` with a real command exported by the module, for example `Get-Help -Name Get-GitHubRepository -Examples`, so the snippet runs as written. Do not ship placeholder tokens such as `'CommandName'` or `<CommandName>` as if they were runnable commands.
234+
235+
Implemented modules must include the capabilities or usage showcase before the documentation link. Keep it focused on discovery: show one to three representative outcomes, not every command, parameter, or edge case. A landing page with only an installation snippet and a documentation link is not enough for a module that has working commands.
236+
237+
Keep, trim, or relocate content — do not delete it:
238+
239+
- **Keep on the landing page:** the overview, prerequisites and requirements (PowerShell version, supported platforms, module or native dependencies), installation, the capabilities showcase, and the short operational notes a reader needs before first use.
240+
- **Trim:** exhaustive command inventories, parameter tables, and repetitive examples that differ only by a parameter. These come from comment-based help — point to `Get-Help` and the documentation site instead of restating them.
241+
- **Relocate, never drop:** long-form guides and unique conceptual content that is too detailed for a landing page, such as authentication and setup walkthroughs, deep operational detail, and end-to-end scenarios. Move them to `docs/` or `examples/`, or into comment-based help, and link to them. If there is no other home for the content yet, keep a condensed version in the README rather than deleting it.
242+
243+
Retain upstream attribution and licensing context. Credit, acknowledgements, donation notes, and third-party license notices for wrapped or bundled work must stay in the README, or move to a clearly linked place. The rule below about community and policy sections does not apply to attribution the project is expected to carry.
232244

233245
README pages should not duplicate generated command documentation. Do not add full command inventories, parameter tables, or long reference sections when those details are already produced from comment-based help.
234246

235-
Do not add a community-file or policy link section by default. Readers can find standard repository files such as `LICENSE`, `CONTRIBUTING.md`, `SECURITY.md`, and `CODE_OF_CONDUCT.md` through GitHub conventions and the repository file tree. Link them only when the module has an unusual rule the user must know before using it.
247+
Do not add a community-file or policy link section by default. Readers can find standard repository files such as `LICENSE`, `CONTRIBUTING.md`, `SECURITY.md`, and `CODE_OF_CONDUCT.md` through GitHub conventions and the repository file tree. Link them only when the module has an unusual rule the user must know before using it, or when it carries required upstream attribution.
236248

237249
## Placeholder and in-progress repositories
238250

@@ -267,12 +279,15 @@ Before opening a README-only PR, check that the README follows the default and d
267279
```powershell
268280
Select-String -Path README.md -SimpleMatch -Pattern 'Greet-Entity', 'PSModuleTemplate', 'YourModuleName'
269281
Select-String -Path README.md -SimpleMatch -Pattern '{{ NAME }}', '{{ DESCRIPTION }}'
282+
Select-String -Path README.md -SimpleMatch -Pattern "-Name 'CommandName'", '<CommandName>'
270283
Select-String -Path README.md -Pattern '^## Commands$'
271284
git diff --check -- README.md
272285
```
273286

274287
`Template-PSModule` is the exception: it intentionally keeps `{{ NAME }}` and `{{ DESCRIPTION }}` tokens because those are template inputs.
275288

289+
For an implemented module, also confirm the README keeps a capabilities or usage showcase and that any unique content removed from the previous version — prerequisites, setup or authentication guidance, operational notes, or upstream attribution — was relocated to `docs/`, `examples/`, or comment-based help rather than deleted.
290+
276291
## Documentation ownership
277292

278293
Command details belong in comment-based help and generated documentation. The README can showcase capability, then points to those sources for reference detail.

0 commit comments

Comments
 (0)