Configure Spec-Driven Development + spec/plan/tasks for test-coverage ratchet (#1292)#1297
Draft
sstjean wants to merge 5 commits into
Draft
Configure Spec-Driven Development + spec/plan/tasks for test-coverage ratchet (#1292)#1297sstjean wants to merge 5 commits into
sstjean wants to merge 5 commits into
Conversation
Initialize GitHub Spec Kit for Copilot: .specify templates/scripts/memory, slash-command prompts, and agent definitions. Add Mission Landing Zone constitution v1.0.0 (adapted from EP Cube Graph) with a ratcheting no-regression coverage policy in Principle IV.
Feature #1292: establish automated test-coverage measurement and a no-regression coverage ratchet. Adds spec.md (US1-US4 -> #1293-#1296), plan.md (Pester 5 + PSRule for Azure + version-controlled baseline gate), tasks.md (30 tasks), research/data-model/quickstart/contracts. US1 tests the src/artifacts PowerShell scripts with zero production edits (mock-and-invoke).
Standardize on Pester 6.0.0 for local + CI parity. v6 runs on Windows PowerShell 5.1 and PowerShell 7.4+ (covers the Windows-majority team), JaCoCo stays the default coverage format, and the config/authoring API is unchanged from v5. Fixes the loose -MinimumVersion 5.0 in the CI task (would pull 6.x unpinned) to -RequiredVersion 6.0.0 -SkipPublisherCheck. Records 5.7.1 as the documented fallback.
Add tests/Invoke-Tests.ps1 (Pester 6 + JaCoCo) and behavioral tests for the three src/artifacts scripts, invoked under mocks with ZERO edits to the production scripts. 8 tests pass; initial real line coverage = 76.81%. Adds .github/workflows/pester-coverage.yml (PR + push to main + dispatch), gitignores coverage.xml/testResults.xml. Closes the US1 slice of #1292.
Add tests/Compare-Coverage.ps1 (ratchet gate CLI per contract) + 10 contract tests, and tests/Get-CoveragePercent.ps1 (shared JaCoCo LINE parser used by both the harness and the gate so local, CI, and baseline all agree). Record tests/coverage-baseline.json at 78.1%. Wire the gate as a failing step in pester-coverage.yml and document the required-status-check requirement. Unifies the displayed coverage number on the JaCoCo LINE counter (78.1%).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Configures Spec-Driven Development (GitHub Spec Kit) for the repository and lands the spec, plan, and tasks for the first feature: automated test-coverage measurement with a no-regression coverage ratchet.
This is a planning + scaffolding PR (draft). No product/CI behavior changes yet — implementation of the user stories will follow as commits on this branch.
Relates to Feature #1292 (does not close it — the implementation stories remain).
What's included
Spec Kit setup + constitution (
50eeb70).specify/templates, scripts, memory, and workflow.github/prompts/slash commands and.github/agents/agent definitions.specify/memory/constitution.md), adapted to a Bicep IaC / SCCA / zero-trust landing zone. Principle IV (Validation-Driven Infrastructure) uses a ratcheting "no regression on coverage %" policy toward an eventual 100% target.Feature 001 spec/plan/tasks (
877a007) underspecs/001-test-coverage-ratchet/spec.md— 4 user stories mapped to issues: US1 Measure PowerShell artifact test coverage with Pester in CI #1293 (P1, Pester coverage — MVP), US2 Enforce a no-regression coverage ratchet gate in CI #1295 (P2, ratchet gate), US3 Add rule-based validation testing for Bicep templates in CI #1294 (P3, PSRule Bicep validation), US4 Document the testing and coverage policy for contributors #1296 (P4, docs)plan.md— Pester 5 (+ JaCoCo) forsrc/artifacts/*.ps1, PSRule for Azure for Bicep, version-controlledtests/coverage-baseline.jsongate; existingsuper-linter/validate-build-bicepgates untouchedtasks.md— 30 dependency-ordered tasksresearch.md,data-model.md,quickstart.md,contracts/Notes for reviewers
src/mlz.jsonis not modified by this feature.Linked issues