Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b1f585d
Add reference-style link, backtick, and image alt-text guidance to th…
MariusStorhaug Jul 5, 2026
cdeb3dd
Add matching-operator and read-only-constant idioms to the PowerShell…
MariusStorhaug Jul 5, 2026
c9a2a3a
Name the F#/N# bold requirement-identifier convention in Spec-Driven …
MariusStorhaug Jul 5, 2026
97e6028
Render requirement identifiers in bold in Spec-Driven Development
MariusStorhaug Jul 5, 2026
e640c27
Clarify read-only versus constant in the PowerShell constants idiom
MariusStorhaug Jul 5, 2026
cf16a05
Align spec template requirement identifiers with the no-period bold c…
MariusStorhaug Jul 5, 2026
da0de18
Adopt FR/NFR identifiers with stable {#id} anchors, BCP 14 language, …
MariusStorhaug Jul 5, 2026
ddbbc41
Recognize explicit attr_list heading ids in the documentation link ch…
MariusStorhaug Jul 5, 2026
3c6490c
Clarify the BCP 14 keyword set is not exhaustive in the spec guide
MariusStorhaug Jul 5, 2026
62e0a16
Validate reference-style link definitions in the documentation link c…
MariusStorhaug Jul 5, 2026
a775139
Add the 'prefer .NET for the actual work' principle to the PowerShell…
MariusStorhaug Jul 5, 2026
96e375c
Use native .NET for path resolution and existence checks in the link …
MariusStorhaug Jul 5, 2026
d889b58
Fully qualify [System.IO.Path]::GetFullPath in the PowerShell standard
MariusStorhaug Jul 5, 2026
033f133
Report the normalized link target in link-checker error messages
MariusStorhaug Jul 5, 2026
c000fbb
Merge branch 'main' into docs/15-style-guide-authoring-gaps
MariusStorhaug Jul 6, 2026
35334b9
Conform the documentation link checker to the PowerShell coding standard
MariusStorhaug Jul 6, 2026
4cdc775
Validate anchor fragments case-sensitively in the link checker
MariusStorhaug Jul 6, 2026
2227499
Support angle-bracketed reference-style destinations in the link checker
MariusStorhaug Jul 6, 2026
351cba4
Merge main and align the PowerShell .NET guidance with #18
MariusStorhaug Jul 6, 2026
a144b19
Require a [Parameter()] attribute and a blank line per parameter, and…
MariusStorhaug Jul 6, 2026
5ca4264
Add comment-based help and full parameter blocks to the link checker'…
MariusStorhaug Jul 6, 2026
000a7f0
Scope comment-based help to public functions and match the Markdown e…
MariusStorhaug Jul 6, 2026
41e1564
Strip single-quoted and parenthesised link titles, not just double-qu…
MariusStorhaug Jul 6, 2026
cf42bf4
Describe what [Parameter()] does without the inaccurate advanced-func…
MariusStorhaug Jul 6, 2026
04637dd
Require comment-based help on every function, private included, and o…
MariusStorhaug Jul 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/docs/Coding-Standards/Markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ These rules are disabled or widened so they do not flag valid documentation β€”
- **Use sentence-style headings.**
- **Surround headings, lists, and fenced blocks with a blank line** for readability, even though the linter no longer enforces it.
- **Prefer relative links** within a repository; use the canonical published URL for cross-repository references.
- **Give a repeated or long link a reference-style definition** (`[text][ref]`, with `[ref]: url` listed below) so the prose stays readable and one edit updates every use.
Comment thread
MariusStorhaug marked this conversation as resolved.
- **Tag every code fence with a language** (` ```bash `, ` ```yaml `) so it is highlighted and converts cleanly when published.
- **Wrap code, commands, filenames, and identifiers in backticks** rather than bold or italic, so they read as code and do not lean on the emphasis the linter now allows freely.
- **Give every image descriptive alt text** β€” `![what the image shows](diagram.png)` β€” so it serves screen readers and still says something when the image fails to load; use a relative path for images kept in the repository.

## PowerShell code samples

Expand Down
2 changes: 2 additions & 0 deletions src/docs/Coding-Standards/PowerShell/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ Beyond the basics, these language-specific habits keep PowerShell correct and fa
- **Single-quote strings unless you need expansion.** Use `'literal'` by default; reserve `"...$var..."` for interpolation or escape sequences, and here-strings (`@'...'@`, `@"..."@`) for multi-line text β€” literal-versus-interpolated intent then stays obvious.
- **Splat calls that carry many parameters.** Build a `@{}` of parameters and splat it (`Get-Thing @params`) instead of a long line of `-Param value` pairs or backtick continuations; it reads better and diffs cleanly.
- **Put `$null` on the left of a comparison** β€” `$null -eq $x`, never `$x -eq $null`. Against a collection the right-hand form *filters* rather than tests. Use `-contains` / `-in` for membership, never `-eq`.
- **Match text with the operator built for it.** Use `-like` for wildcard patterns and `-match` for regular expressions instead of hand-rolled string surgery; both default to case-insensitive, so add the `-c` prefix (`-clike`, `-cmatch`, `-ceq`) when a comparison must be case-sensitive.
- **Suppress unwanted output with `$null = ...`** (or `[void]` for method calls), not `| Out-Null` β€” the pipeline form is markedly slower on hot paths.
- **Build collections with a typed list, not `+=` in a loop.** `$a += $x` reallocates the whole array every iteration; use `[System.Collections.Generic.List[T]]` with `.Add()`, and prefer a cmdlet's `-Filter` over piping to `Where-Object` on large sets.
- **Guard a value that must not change.** Declare it with `Set-Variable -Name Pi -Value 3.14159 -Option ReadOnly` β€” or `-Option Constant` for one that can never be reassigned or removed β€” so an accidental write fails loudly instead of quietly winning.
- **Keep secrets out of source, and never `Invoke-Expression` untrusted input.** Accept credentials as a `[PSCredential]` parameter with the `[Credential()]` attribute rather than calling `Get-Credential` inside a reusable function, so a caller can pass one they already hold, and take other sensitive values as `[securestring]`. Guard state-changing commands with `ShouldProcess` (see [Functions](Functions.md)); the wider rules live in the [Security](../Security.md) baseline.

## Toolchain
Expand Down
22 changes: 11 additions & 11 deletions src/docs/Ways-of-Working/Spec-Driven-Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ The altitude test: push detail *down* into the design, and push scope *up* into

## Requirements

Requirements are testable statements of what must be true β€” never how it is built.
Requirements are testable statements of what must be true β€” never how it is built. Write them with the [BCP 14](https://www.rfc-editor.org/info/bcp14) keywords β€” **MUST**, **MUST NOT**, **SHOULD**, **SHOULD NOT**, **MAY** β€” in uppercase, where they carry their normative meaning ([RFC 2119](https://www.rfc-editor.org/rfc/rfc2119), [RFC 8174](https://www.rfc-editor.org/rfc/rfc8174)).
Comment thread
MariusStorhaug marked this conversation as resolved.
Outdated

**Functional** requirements describe what the capability does, as observable behavior. Number them so the design and the tests can trace back to each one.
**Functional** requirements describe what the capability does, as observable behavior. **Non-functional** requirements are the quality attributes the capability must hold β€” performance, security, reliability, availability, compliance, observability, and cost β€” each stated as a measurable condition with a threshold; a non-functional requirement without a number is an opinion. For platform and infrastructure work these are often the point of the change rather than an afterthought β€” latency, redaction, retention, and blast radius decide whether the thing is fit to run.

**Non-functional** requirements are the quality attributes the capability must hold β€” performance, security, reliability, availability, compliance, observability, and cost. State each as a measurable condition with a threshold; a non-functional requirement without a number is an opinion. For platform and infrastructure work these are often the point of the change rather than an afterthought β€” latency, redaction, retention, and blast radius decide whether the thing is fit to run.
Give each requirement its own heading with a stable, explicit anchor β€” `### FR1 β€” <statement> { #fr1 }` for functional, `### NFR1 β€” <statement> { #nfr1 }` for non-functional. The anchor is the identifier alone, so the heading can be reworded without breaking a single reference. Identifiers are **append-only**: assign the next unused number, never renumber, and never reuse β€” a removed requirement simply disappears, and git holds the history.

The [acceptance criteria](#acceptance-criteria) verify these requirements, and every requirement has at least one.
Reference a requirement by its anchor β€” `[FR1](#fr1)` on the same page, `[FR1](spec.md#fr1)` across pages. The [acceptance criteria](#acceptance-criteria) verify these requirements, and every requirement has at least one.
Comment thread
MariusStorhaug marked this conversation as resolved.
Comment thread
MariusStorhaug marked this conversation as resolved.
Outdated

## Acceptance criteria

Expand Down Expand Up @@ -164,17 +164,17 @@ Copy these skeletons to start a `spec.md` and its `design.md`. Every section is

- <...>

## Requirements
## Functional requirements

### FR1 β€” <what the capability does, behavioral, testable, no technology> { #fr1 }

### Functional
### FR2 β€” <...> { #fr2 }
Comment thread
MariusStorhaug marked this conversation as resolved.
Comment thread
MariusStorhaug marked this conversation as resolved.

- **F1.** <what the capability does β€” behavioral, testable, no technology>
- **F2.** <...>
## Non-functional requirements

### Non-functional
### NFR1 β€” <a quality attribute as a measurable condition, latency, availability, redaction, retention, cost> { #nfr1 }

- **N1.** <a quality attribute as a measurable condition β€” latency, availability, redaction, retention, cost>
- **N2.** <...>
### NFR2 β€” <...> { #nfr2 }
Comment thread
MariusStorhaug marked this conversation as resolved.
Comment thread
MariusStorhaug marked this conversation as resolved.
Comment thread
MariusStorhaug marked this conversation as resolved.

## Acceptance criteria

Expand Down