A Microsoft 365 Copilot declarative agent that writes and reviews PowerShell 7 to the
Libre DevOps PowerShell Standard and the LibreDevOpsHelpers house style.
It answers two kinds of question: house style, meaning how the helper module is written and how to add to it, and enterprise PowerShell in general, meaning how to write PowerShell that is safe to run unattended, in CI, against production. Where the two disagree the house standard wins and it says so.
- Approved verbs, singular nouns, and the
Ldoprefix on every exported noun. The prefix is not decoration: it is what stops the module colliding with a built-in cmdlet on the same host. Set-StrictMode -Version Latestand an explicit$ErrorActionPreferenceat the top of every file, because strict mode turns a typo from a silent$nullinto an error.[CmdletBinding()], typed and validated parameters, andSupportsShouldProcesson anything that changes state, actually gated onShouldProcess.- Comment-based help on every exported function, with a
.PARAMETERfor each parameter and at least one.EXAMPLE. - Objects, not
Write-Host. Host writes cannot be captured or piped, so they are never a way to return data. - Structured logging with the canonical
TRACEtoFATALvocabulary and OpenTelemetry severity numbers, seeded from the environment so CI can change logging without touching code. - Terminating versus non-terminating errors, which is the distinction most scripts get wrong.
- Secrets never in a script, a parameter default or a committed file.
- PSScriptAnalyzer and Pester, named as blocking gates, with the agent stating plainly that it has not run them.
The Libre DevOps PowerShell Standard, uploaded. Scoped web search covers Microsoft Learn's PowerShell and Azure documentation and the PowerShell Gallery.
The prefix and module name are profile tokens, not literals: cmdlet_prefix and
ps_module_name. just new-profile derives both from your organisation name, so ACME gets
Invoke-AcmeTerraformPlan in AcmeHelpers without editing a fragment. Override them in the
profile if your module is named differently.
- Ask for a new function and confirm it emits strict mode, help, typed parameters and the prefix.
- Ask it to review PowerShell that uses
Write-Hostto return data and confirm it catches it. - Ask something with no house position and confirm it says so rather than inventing a rule.