You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Workflow Testing Standards (CI vs production workflow distinction)
13
+
- Product Overview (new section before Core Principles)
15
14
16
15
Removed Sections: None
17
16
18
17
Templates Status:
19
-
✅ plan-template.md - Already aligned with constitution checks
18
+
✅ plan-template.md - Updated to reference v1.1.2
20
19
✅ spec-template.md - No changes needed (no constitution-specific requirements)
21
20
✅ tasks-template.md - No changes needed (general task structure applies)
22
21
23
22
Follow-up TODOs:
24
23
- TODO(RATIFICATION_DATE): Determine original constitution adoption date
25
24
26
-
Rationale for MINOR bump:
27
-
- Added specific technical requirements (PowerShell 7.4+, action scripts over inline)
28
-
- Expanded workflow-first principle with implementation details
29
-
- Added CI validation workflow as required testing standard
30
-
- Material expansion of existing principles without breaking compatibility
25
+
Rationale for PATCH bump:
26
+
- Clarification of product nature and scope without new requirements
27
+
- Added context about opinionated flow and structure
28
+
- Explained configuration mechanism and consuming repo requirements
29
+
- Non-semantic refinement that improves understanding of product purpose
31
30
-->
32
31
33
32
# Process-PSModule Constitution
34
33
34
+
## Product Overview
35
+
36
+
**Process-PSModule** is a **reusable workflow product** that provides an **opinionated flow and structure** for building PowerShell modules using GitHub Actions. It is NOT a library or toolkit; it is a complete CI/CD workflow framework designed to be consumed by PowerShell module repositories.
37
+
38
+
### Product Characteristics
39
+
-**Opinionated Architecture**: Defines a specific workflow execution order and module structure
40
+
-**Reusable Workflows**: Consuming repositories call Process-PSModule workflows via `uses:` syntax
41
+
-**Configurable via Settings**: Behavior customized through `.github/PSModule.yml` (or JSON/PSD1) in consuming repos
42
+
-**Structure Requirements**: Consuming repos MUST follow documented structure in GitHub Actions README files
43
+
-**Not for Local Development**: Designed exclusively for GitHub Actions execution environment
44
+
45
+
### Consuming Repository Requirements
46
+
Repositories that consume Process-PSModule workflows MUST:
47
+
- Follow the module source structure documented in framework actions
48
+
- Provide configuration file (`.github/PSModule.yml`) with appropriate settings
49
+
- Adhere to the opinionated workflow execution order
50
+
- Reference Process-PSModule workflows using stable version tags
51
+
- Review action README documentation for structure and configuration requirements
52
+
35
53
## Core Principles
36
54
37
55
### I. Workflow-First Design (NON-NEGOTIABLE)
@@ -61,15 +79,18 @@ All code changes MUST follow strict TDD practices using Pester and PSScriptAnaly
61
79
**Rationale**: TDD ensures code quality, prevents regressions, and creates living documentation through tests. This is fundamental to project reliability. CI workflow validation ensures the entire framework functions correctly in real-world scenarios.
62
80
63
81
### III. Platform Independence with Modern PowerShell
64
-
All workflowsand features MUST support cross-platform execution (Linux, macOS, Windows) using **PowerShell 7.4 or newer**:
82
+
**Modules MUST be built to be cross-platform.**All workflows, features, and consuming modules MUST support cross-platform execution (Linux, macOS, Windows) using **PowerShell 7.4 or newer**:
65
83
- Use platform-agnostic PowerShell Core 7.4+ constructs exclusively
66
-
- Implement matrix testing across all supported operating systems
67
-
- Document any platform-specific behaviors or limitations
84
+
-**Modules MUST function identically** on Linux, macOS, and Windows
85
+
- Cross-platform compatibility is **verified through Test-ModuleLocal** workflow
86
+
- Test-ModuleLocal executes module tests on: `ubuntu-latest`, `windows-latest`, `macos-latest`
87
+
- Implement matrix testing across all supported operating systems for all workflow components
88
+
- Document any platform-specific behaviors or limitations explicitly
68
89
- Test failures on any platform MUST block merging
69
-
- Provide skip mechanisms for platform-specific tests when justified
90
+
- Provide skip mechanisms for platform-specific tests when justified (with clear rationale)
70
91
-**No backward compatibility** required for Windows PowerShell 5.1 or earlier PowerShell Core versions
71
92
72
-
**Rationale**: PowerShell 7.4+ provides consistent cross-platform behavior and modern language features. Focusing on a single modern version reduces complexity and maintenance burden while ensuring maximum compatibility for consuming projects on contemporary platforms.
93
+
**Rationale**: PowerShell 7.4+ provides consistent cross-platform behavior and modern language features. Focusing on a single modern version reduces complexity and maintenance burden. Modules built with Process-PSModule framework must work seamlessly across all platforms, verified through automated matrix testing in Test-ModuleLocal, ensuring maximum compatibility for consuming projects on contemporary platforms.
73
94
74
95
### IV. Quality Gates and Observability
75
96
Every workflow execution MUST produce verifiable quality metrics:
@@ -119,7 +140,11 @@ Release management MUST be automated and follow SemVer 2.0.0:
119
140
### Testing
120
141
- Source code tests MUST validate framework compliance
121
142
- Module tests MUST validate built module integrity
122
-
- Local module tests (Pester) MUST validate functional behavior
143
+
- Local module tests (Pester) MUST validate functional behavior across all platforms
144
+
-**Test-ModuleLocal workflow** verifies cross-platform module compatibility on:
145
+
-`ubuntu-latest` (Linux)
146
+
-`windows-latest` (Windows)
147
+
-`macos-latest` (macOS)
123
148
- BeforeAll/AfterAll setup and teardown scripts MUST be supported for test environments
124
149
- Test matrices MUST be configurable via repository settings
125
150
-**CI validation workflow** (`.github/workflows/ci.yml`) MUST be maintained for integration testing
@@ -142,6 +167,8 @@ The standard execution order for Process-PSModule workflows MUST be:
142
167
4.**Lint-SourceCode** - Parallel matrix linting of source code
143
168
5.**Test-Module** - Framework validation and linting of built module
144
169
6.**Test-ModuleLocal** - Runs Pester tests with BeforeAll/AfterAll support
170
+
-**Verifies cross-platform module compatibility** on ubuntu-latest, windows-latest, macos-latest
171
+
- Tests module functionality across all supported platforms
145
172
7.**Get-TestResults** - Aggregates and validates test results
9.**Build-Docs** and **Build-Site** - Generates documentation
@@ -153,15 +180,20 @@ The standard execution order for Process-PSModule workflows MUST be:
153
180
- Consuming repositories use production workflow for releases, CI workflow for nightly validation
154
181
155
182
### Configuration
156
-
- Settings MUST be stored in `.github/PSModule.yml` (or JSON/PSD1 format)
183
+
- Settings MUST be stored in `.github/PSModule.yml` (or JSON/PSD1 format) in consuming repositories
157
184
- Skip flags MUST be available for all major workflow steps
158
185
- OS-specific skip flags MUST be supported (Linux, macOS, Windows)
159
186
- Settings MUST support test configuration, build options, and publish behavior
187
+
-**Consuming repositories** configure behavior through settings file (opinionated defaults provided)
188
+
-**Structure requirements** documented in GitHub Actions README files MUST be followed by consumers
189
+
- Configuration options MUST be backward compatible within major versions
160
190
161
191
## Governance
162
192
163
193
### Constitution Authority
164
-
This constitution supersedes all other development practices. When conflicts arise between this document and other guidance, the constitution takes precedence.
194
+
This constitution supersedes all other development practices **for Process-PSModule framework development**. When conflicts arise between this document and other guidance, the constitution takes precedence.
195
+
196
+
**For Consuming Repositories**: This constitution defines how the Process-PSModule framework is built and maintained. Consuming repositories follow the opinionated structure and configuration documented in framework action README files.
165
197
166
198
### Amendments
167
199
Changes to this constitution require:
@@ -174,18 +206,22 @@ Changes to this constitution require:
**For Consuming Repositories**: Follow the opinionated structure and configuration documented in the README files of the GitHub Actions this framework provides.
0 commit comments