Skip to content

Commit c9fd2fd

Browse files
Chore/constitution 1.0.1 (#10)
Amend constitution to add enforcing PSScriptAnalyzer and Microsoft PowerShell scripting best practices.
1 parent 954e57d commit c9fd2fd

2 files changed

Lines changed: 36 additions & 14 deletions

File tree

‎.specify/memory/constitution.md‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
<!--
22
Sync Impact Report
3-
Version change: none → 1.0.0
3+
Version change: 1.0.0 → 1.0.1
44
Modified principles:
5-
- NEW: Code Quality & Style (PowerShell-centric)
6-
- NEW: Testing Standards (Pester & CI gates)
5+
- UPDATED: Code Quality & Style (explicit PSScriptAnalyzer enforcement & Microsoft PowerShell scripting best practices)
6+
- NEW/CLARIFY: Testing Standards (Pester & CI gates clarified to include static analysis gating)
77
- NEW: User Experience Consistency (cmdlet UX, help, output contracts)
88
- NEW: Performance Requirements (benchmarks, memory/latency goals)
9-
Added sections:
9+
Added/clarified sections:
1010
- Development Constraints (PowerShell module rules, compatibility targets)
11-
- Development Workflow (TDD, PR review checklist, PSScriptAnalyzer gating)
11+
- Development Workflow (TDD, PR review checklist, explicit PSScriptAnalyzer gating)
1212
Removed sections: none
13-
Templates requiring updates:
14-
- .specify/templates/plan-template.md ✅ inspected (Constitution Check placeholder present; aligns with new principles)
13+
Templates requiring updates / inspection:
14+
- .specify/templates/plan-template.md ✅ inspected (Constitution Check placeholder present; aligns with updated principles)
1515
- .specify/templates/spec-template.md ✅ inspected (requirements gating aligns)
1616
- .specify/templates/tasks-template.md ✅ inspected (task rules align)
1717
Follow-up TODOs:
18-
- TODO(RATIFICATION_DATE): Confirm historical ratification date if this is not the first adoption (left as ratified today)
18+
- None deferred. RATIFICATION_DATE retained as original adoption date.
1919
-->
2020

2121
# PSSpecKit Constitution
2222

2323
## Core Principles
2424

2525
### I. Code Quality & Style (PowerShell-centric)
26-
All authored PowerShell code MUST follow Microsoft PowerShell best practices. This includes:
27-
- Consistent, discoverable names following Verb-Noun cmdlet conventions (approved verbs from Microsoft). Module, function, and parameter names MUST be clear and purpose-driven.
28-
- Script and module layout MUST follow common PowerShell module structure (ExportedFunctions, Public/Private separation, module manifest when applicable).
29-
- Static analysis using PSScriptAnalyzer with a project baseline is REQUIRED; rules MAY be tightened per-module. Violations MUST be addressed before merging.
30-
- Code MUST be idempotent where applicable and avoid implicit global state; side-effects MUST be explicit and documented.
26+
All authored PowerShell code MUST meet Microsoft PowerShell scripting best practices and pass the project's PSScriptAnalyzer quality checks. This is a mandatory, CI-enforced gate. Specifically:
27+
- All code MUST adhere to Microsoft-approved naming conventions (Verb-Noun) and use discoverable, purpose-driven names for modules, functions and parameters.
28+
- Script and module layouts MUST follow common PowerShell module structure (ExportedFunctions, Public/Private separation, and a module manifest when applicable).
29+
- Static analysis using PSScriptAnalyzer against a project baseline configuration is REQUIRED; module-level rules MAY be tightened. CI MUST fail if PSScriptAnalyzer violations are present and violations MUST be addressed before merging.
30+
- All scripts and modules MUST document any accepted deviations from the baseline (with rationale) in the PR; exceptions are time-limited and require maintainer approval.
31+
- Code MUST be idempotent where applicable, avoid implicit global state, and make side-effects explicit and documented.
3132

3233
Path usage policy: NO absolute filesystem paths are permitted inside committed scripts or modules. All filesystem paths referenced by scripts MUST be relative to the script/module root and must be resolved at runtime using the script's location (for example, $PSScriptRoot) or a small, documented repository-root resolution helper called from the script root. Hard-coded absolute paths will fail review and MUST be removed before merge.
3334

@@ -73,4 +74,4 @@ The Constitution defines mandatory practices for development and review. Amendme
7374
- Versioning Policy: The Constitution uses semantic versioning: MAJOR for breaking governance changes (removals or redefinitions), MINOR for new principles or material expansions, PATCH for wording/clarity fixes. The author of the PR MUST indicate the expected bump and rationale.
7475
- Compliance: The `Constitution Check` step in `.specify/templates/plan-template.md` and related templates MUST be evaluated during planning. CI tooling and reviewers are responsible for enforcing gates.
7576

76-
**Version**: 1.0.0 | **Ratified**: 2025-10-01 | **Last Amended**: 2025-10-01
77+
**Version**: 1.0.1 | **Ratified**: 2025-10-01 | **Last Amended**: 2025-10-02
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Title: docs: constitution v1.0.1 — require PSScriptAnalyzer & clarify PowerShell best practices
2+
3+
Body:
4+
Clarify Code Quality & Style to explicitly require PSScriptAnalyzer checks and adherence to Microsoft
5+
PowerShell scripting best practices.
6+
7+
- Bump constitution version 1.0.0 → 1.0.1 (patch: clarifications).
8+
- Update Sync Impact Report and Last Amended date (2025-10-02).
9+
- Confirmed related specify templates align with the new gating rules.
10+
11+
Suggested follow-ups:
12+
- Ensure CI installs and runs PSScriptAnalyzer (add to `.github/workflows/powershell-ci.yml` if missing).
13+
- Optionally add a PSScriptAnalyzer baseline ruleset and wire into CI.
14+
15+
Files changed:
16+
- .specify/memory/constitution.md
17+
18+
PR checklist:
19+
- [ ] CI passes (Pester + PSScriptAnalyzer)
20+
- [ ] Reviewers: at least two maintainers for non-breaking updates
21+
- [ ] If adding PSScriptAnalyzer baseline, include ruleset path in PR

0 commit comments

Comments
 (0)