Enhance NovaModule initialization, testing, and documentation#210
Merged
Conversation
Add explicit readiness-check guidance for architect/design flows so unresolved questions are surfaced before finalization. Support design-package-only handoff, clarify how to use design notes versus GitHub issue drafts, and update the related repository guidance.
- Removed unnecessary blank lines in ReadAwesomeHost.ps1 - Adjusted spacing in GetNovaResolvedProjectPackageSettings.ps1 - Standardized spacing in SKILL.md and other markdown files
- Updated multiple HTML files to remove links to the MIT License - Ensured that the standalone license page remains accessible
…le nova init (#209) * feat(#194): add optional Agentic Copilot starter package to NovaModule initialization - Introduced an optional Agentic Copilot setup during module initialization. - Updated documentation to reflect the new starter package options. - Enhanced interactive prompts to include Agentic Copilot configuration. * feat(#194): add Agentic Copilot scaffold files for NovaModule initialization - Implement Get-NovaModuleAgenticCopilotTemplateRoot function - Create AGENTS.md for Agentic Copilot workflow documentation - Add CHANGELOG.md and RELEASE_NOTE.md for version tracking - Introduce initial test coverage for Agentic Copilot scaffold sync * fix(#194): update release policy documentation for clarity * fix(#194): update Sync-AgenticCopilotScaffold.psd1 and testing-policy.instructions.md - remove outdated command from Sync-AgenticCopilotScaffold.psd1 - clarify testing policy instructions for script invocation * fix(#194): standardize catch block formatting across multiple scripts - Adjusted catch blocks to maintain consistent formatting - Improved readability by aligning else statements * fix(#194): standardize formatting of try-catch-finally blocks across multiple scripts * fix(#194): keep agentic scaffold guidance provider-neutral Update generated architect/design guidance to use provider-neutral issue/work item wording and rely on the markdown-authoring skill instead of duplicating copy-safe fence rules. * feat(#194): enhance Nova project guidance and testing expectations - Add documentation for Nova-managed project expectations in starter guidance - Update contributing guidelines to reflect Nova build model and testing practices - Improve README with Nova project expectations and testing structure * feat(#194): strengthen agentic scaffold guidance Clarify Agentic Copilot starter guidance so generated projects stay on Nova workflows, generated dist output, PlatyPS help, source-mirrored tests, and strict ScriptAnalyzer behavior. * feat(#194): honor PowerShellHostVersion in agentic guidance Require Agentic Copilot guidance and the generated starter scaffold to treat project.json Manifest.PowerShellHostVersion as the compatibility target for PowerShell code, tests, and examples. * feat(#194): add short-name prompt for agentic scaffolds Prompt for a project short name when Agentic Copilot is enabled so generated scaffold guidance can replace placeholders such as Invoke-<ShortName>*. * feat(#194): update guidance and documentation for agentic scaffolds - Refine conversational flow for architect and design change prompts. - Clarify instructions for handling unresolved questions in design packages. - Adjust release notes and changelog formatting for consistency. * feat(#194): refine documentation for agentic scaffolds - Clarify conversational flow for new or not-yet-scoped work - Improve instructions for handling unresolved questions - Streamline guidance on implementing issues and design packages * feat(#194): update documentation and constraints for agentic scaffolds - Add `/github-actions` to the list of directories - Clarify distinction between public PowerShell cmdlets and `% nova` CLI behavior * feat(#194): enhance documentation and guidance for ScriptAnalyzer findings - add instructions to fix ScriptAnalyzer findings before review or handoff - update README and contributing guidelines to reflect new requirements - clarify quality loop expectations in various documentation files * feat(#194): enhance guidance for file formatting and review processes - Update documentation to require every changed or generated text file to end with exactly one trailing newline and no extra blank lines at the bottom. - Add instructions for reviewing file endings before handoff in multiple documentation files. * feat(#194): enhance agentic guidance and documentation - Add reviewer agent content to improve review processes - Include implement prompt content for better implementation guidance - Update coding standards to clarify file and function ownership rules * feat(#194): remove deprecated thresholds from code health rules - cleared all threshold definitions for improved clarity * feat(#194): add code quality matrix for src and tests - Introduce a best-effort code quality matrix for source and test files. - Define warning and alert thresholds to guide maintainability. - Provide authoring guidance to help shape code quality from the start. * feat(#194): update documentation and guidance for PlatyPS help generation - Remove deprecated placeholders in command help paths - Enhance instructions for generating valid PlatyPS help - Clarify requirements for command help structure and validation * feat(#194): enhance PSScriptAnalyzer workflow guidance - Add detailed instructions for using PSScriptAnalyzer in the repository - Specify preferred entry points for analyzer runs - Emphasize the importance of fixing analyzer findings before handoff * feat(#194): update command help paths and instructions for NovaModuleTools - Adjust command help source paths in documentation and tests to reflect NovaModuleTools - Ensure consistency in PlatyPS help generation instructions * feat(#194): update pull request template to remove CLI behavior checkbox * feat(#194): update guidance for PlatyPS help generation - Require matching help files for every new public entry point in the same change - Enhance instructions for generating valid PlatyPS help - Update documentation to reflect changes in help file requirements * feat(#194): update guidance for Test-NovaBuild usage - Add documentation for using Test-NovaBuild as the authoritative test entrypoint - Update instructions to prohibit direct Invoke-Pester calls in Nova-managed projects - Revise various documentation files to reflect the new testing policy * feat(#194): update application paths for code quality and help generation - include scripts/**/*.ps1 in code quality matrix - refine PlatyPS help application path to docs/NovaModuleTools/**/*.md - add PSScriptAnalyzer module version to project.json * feat(#194): update versioning to 0.1.0-preview across multiple files - Change default version from 0.0.1 to 0.1.0-preview in project files - Update expected version checks in tests to reflect new versioning * feat(#194): update versioning to 0.1.0-preview across multiple files - Change default version from 0.0.1 to 0.1.0-preview in project files - Update expected version checks in tests to reflect new versioning * feat(#194): update guidance for source/helper-script maintainability and test design - Refactor maintainability guidance to emphasize source/helper-script quality - Update test design instructions to enhance clarity and coverage expectations * feat(#194): enhance Nova scaffolding with .gitignore management - create or update default .gitignore in generated project root when Git is enabled - append missing Nova-managed artifact entries without overwriting existing rules - update documentation to reflect .gitignore functionality in scaffold flows * feat(#194): clean up whitespace in UpdateNovaGitIgnore scripts * feat(#194): enhance coding standards and guidance documentation - Add new coding standards for private helper naming conventions - Update guidance to clarify public command naming and file structure rules - Refine generated guidance for project scaffolding and maintainability * feat(#194): update coding standards in documentation - Clarify rules for function declarations in PowerShell files - Specify that private helpers should not declare nested functions - Enhance guidance on file/function ownership and support helpers * feat(#194): enhance NovaModule initialization with update notifications - Add non-blocking update warning for newer NovaModuleTools releases before interactive scaffold questions - Ensure existing .gitignore rules are preserved while adding Nova-managed entries - Update documentation to reflect new behavior in initialization workflows * feat(#194): update coding standards in documentation - Refine private helper naming guidance to avoid public-style names - Clarify implementation-focused naming for private helpers * feat(#194): enhance text file formatting rules and add guardrails - update documentation to specify newline and blank line requirements - introduce Test-TextFileFormatting script to enforce formatting rules - add tests to validate text file formatting compliance * feat(#194): enhance NovaModule test workflow with code coverage validation - Add coverage target checks in Invoke-NovaTestWorkflow - Introduce functions for retrieving coverage settings from project configuration - Update project templates to include default Pester code coverage settings * feat(#194): improve NovaModule test workflow context with enhanced configuration - Refactor variable assignments for consistency - Update Pester configuration to ensure code coverage targets are applied correctly * feat(#194): frame ten PowerShell maintainability guidelines and add building-maintainable-code skill * fix(#194): slim agentic Copilot workflow and add wire-up integrity test - Move cross-cutting rules into .github/instructions/repository-conventions.instructions.md and slim copilot-instructions.md to a thin index with a task → prompt → agent → skills → instructions table - Generate AGENTS.md from copilot-instructions.md via Sync-AgenticCopilotScaffold.ps1 with a do-not-edit banner; remove AGENTS.md from scaffold-owned paths - Make scaffold TextReplacements code-fence-aware (skip fenced blocks and inline backticks) via new Split-AgenticContentByCodeFence and Invoke-AgenticInlineCodeAwareReplace helpers - Rename .github/skills/docs-site-html → docs-site to match the agent name and update references - Delete .github/prompts/markdown.prompt.md and fold its wrapper rules and example into the markdown-authoring skill - Normalize prompt headers and add an explicit "Invoke with @.github/prompts/<name>.prompt.md" line that names the delegated agent - Add "When unclear, ask before proceeding" clause to reviewer and release-manager agents - Replace the anchorless one-liner in code-quality-matrix.instructions.md with the ten concrete maintainability dimensions - Add tests/AgenticCopilotWiring.Tests.ps1 asserting /skill references, prompt → agent references, instruction applyTo: globs, and skill name/folder parity - Update scaffold-sync tests for the slim structure (new RepositoryConventions field, AGENTS.md banner assertion) and drop markdown.prompt.md from CoverageGaps expectations * fix(#194): slim agentic Copilot workflow and add wire-up integrity test - Move cross-cutting rules into .github/instructions/repository-conventions.instructions.md and slim copilot-instructions.md to a thin index with a task → prompt → agent → skills → instructions table - Generate AGENTS.md from copilot-instructions.md via Sync-AgenticCopilotScaffold.ps1 with a do-not-edit banner; remove AGENTS.md from scaffold-owned paths - Make scaffold TextReplacements code-fence-aware (skip fenced blocks and inline backticks) via new Split-AgenticContentByCodeFence and Invoke-AgenticInlineCodeAwareReplace helpers - Rename .github/skills/docs-site-html → docs-site to match the agent name and update references - Delete .github/prompts/markdown.prompt.md and fold its wrapper rules and example into the markdown-authoring skill - Normalize prompt headers and add an explicit "Invoke with @.github/prompts/<name>.prompt.md" line that names the delegated agent - Add "When unclear, ask before proceeding" clause to reviewer and release-manager agents - Replace the anchorless one-liner in code-quality-matrix.instructions.md with the ten concrete maintainability dimensions - Add tests/AgenticCopilotWiring.Tests.ps1 asserting /skill references, prompt → agent references, instruction applyTo: globs, and skill name/folder parity - Update scaffold-sync tests for the slim structure (new RepositoryConventions field, AGENTS.md banner assertion) and drop markdown.prompt.md from CoverageGaps expectations * #194 fix: Update release notes. * feat(#194): enhance agentic Copilot scaffold with identifier replacements and documentation updates - Update design and review prompts for consistency in section naming - Introduce identifier replacement lists in scaffold content functions - Adjust documentation references to use project-specific naming conventions * feat(#194): update documentation for clarity and consistency - Refine instructions for step-by-step refactoring of unhealthy files - Remove redundant references to skills in various sections - Simplify language for better understanding in the guidelines * feat(#194): update help documentation for PlatyPS compatibility - Clarify workflow for generating help files by emphasizing the need to build and import the dist module first. - Update instructions to ensure correct metadata fields are populated in help files. - Add guidance on maintaining consistent naming conventions for external help files. * feat(#194): enhance Nova testing workflow and coverage configuration - Suppress progress output during Pester runs for cleaner logs - Update CodeCoverage settings in project.json for improved reporting - Refactor coverage configuration logic in GetNovaTestWorkflowContext * feat(#194): update code coverage target and improve test configuration - increase coverage percent target from 75 to 80 - streamline parameter usage in test configuration * feat(#194): update code coverage target and improve test cases - change coverage percent target from 80 to 75 - refactor test cases for clarity and consistency * feat(#194): update code coverage target and improve test cases - change coverage percent target from 80 to 75 - refactor test cases for clarity and consistency * feat(#194): update code coverage target to 80% * feat(#194): simplify CI to single test run with JaCoCo coverage upload - Remove second Invoke-Pester run from Invoke-NovaModuleToolsCI.ps1; Test-NovaBuild now runs once and produces artifacts/coverage.xml - Remove Cobertura conversion helpers, SetSourcePath guard, and Get-CiPesterConfiguration/Get-CiTestPath functions from CI script - Update Invoke-CodeSceneAnalysis.ps1 to resolve artifacts/coverage.xml as the default JaCoCo coverage path instead of *.cobertura.xml - Upload coverage twice: --format jacoco --metric line-coverage and --metric branch-coverage - Add --format jacoco to cs-coverage check in check-coverage action - Update Tests.yml coverage-files glob to **/coverage.xml - Update CodeSceneAnalysis tests for JaCoCo double-upload behaviour - Update testing-policy instructions to document single-run JaCoCo flow * #194 fix: update message. * feat(#194): refactor Invoke-NovaTestWorkflow tests and improve README clarity - Simplify test setup in InvokeNovaTestWorkflow.Tests.ps1 - Enhance error reporting for coverage target failures - Update README to clarify purpose of NovaModuleTools - Refactor AgenticCopilot scaffold functions for better readability
- Document the source-mirrored, dot-source-first test loading pattern in the testing-policy instruction and pester-testing skill (mirrored into the agentic-copilot scaffold), add a non-blocking scripts/build/Get-TestMirrorStatus.ps1 helper that reports src files without a mirrored test, add proof-of-concept mirrored tests for - Format-ProjectJsonValue and Get-ProjectJsonValueTypeName, remove the dist-psm1 coverage Path override so project.json owns the coverage Path, and temporarily disable the Pester coverage gate while the existing suite migrates to the new pattern.
Add source-mirrored, dot-source-first Pester test files for the small and well-isolated helpers under src/private/scaffold and src/private/update so each unit-level helper has a focused test file under tests/private/scaffold or tests/private/update instead of being covered only through broad legacy coverage files. The remaining workflow-level scaffold and update helpers stay covered by the existing broad tests for now.
- Closes Migrate build and shared domain tests (3) Fixes #202
Closes Migrate CLI domain tests (4) Fixes #203
Closes Migrate release domain tests (5) Fixes #204
Add focused, dot-source-first Pester tests under tests/private/package/ for unit-level package helpers (metadata, content, NuGet/Zip artifacts, upload option/target/headers/auth, file resolution, request, and per-type upload helpers). Multi-step package workflow orchestrators stay covered by the existing cross-cutting package tests. closes Migrate package domain tests (6) Fixes #205
Add focused, dot-source-first Pester tests under tests/public/ for every public command (Invoke-NovaBuild, Test-NovaBuild, New-NovaModulePackage, Initialize-NovaModule, Get-NovaProjectInfo, Get-/Set-NovaUpdateNotificationPreference, Install-NovaCli, Invoke-NovaCli, Update-NovaModuleTool, Update-NovaModuleVersion, Deploy-NovaPackage, Publish-NovaModule, Invoke-NovaRelease). Tests stay command-focused: parameter forwarding, delegation to context/workflow helpers, and ShouldProcess / -WhatIf behavior, without duplicating private helper coverage. Closes Migrate public command tests (7) Fixes #206
Move the pre-migration broad coverage-bucket suites (CoverageGaps*, CoverageCompletion*, Remaining*Coverage*, broad NovaCommandModel*) and their legacy-only support sidecars to tests/_legacy/ and rename the .Tests.ps1 suffix to .LegacyReference.ps1 so Pester discovery no longer runs them. The mirrored tests/public/ and tests/private/<domain>/ suites added in #200 – #206 now own that coverage. The retired files stay readable as a reference until coverage measurement is re-enabled and confirms no regression. Active tests that still consume RemainingHelperCoverage.TestSupport.ps1 and CoverageGaps.Cli.TestSupport.ps1 keep their existing support files in place. closes Retire legacy coverage bucket tests after migration (8) Fixes #207
Move the pre-migration broad coverage-bucket suites (CoverageGaps*, CoverageCompletion*, Remaining*Coverage*, broad NovaCommandModel*) and their legacy-only support sidecars to tests/_legacy/ and rename the .Tests.ps1 suffix to .LegacyReference.ps1 so Pester discovery no longer runs them. The mirrored tests/public/ and tests/private/<domain>/ suites added in #200 – #206 now own that coverage. The retired files stay readable as a reference until coverage measurement is re-enabled and confirms no regression. Active tests that still consume RemainingHelperCoverage.TestSupport.ps1 and CoverageGaps.Cli.TestSupport.ps1 keep their existing support files in place.
…-requiring integration tests Convert the last 11 mirrored private-helper tests (scaffold, quality, build, update) to the dot-source-first pattern so `nova test` no longer requires a prior `Invoke-NovaBuild`. Retire nine legacy integration and guardrail tests (Module, OutputFiles, BuildOptions, CiCoverage, CliHelperCoverage, CliSharedParser, PackageLatestPolicy, PreambleBuild, UpdateNotification) and their TestSupport sidecars to `tests/_legacy/` with the `.LegacyReference.ps1` suffix so Pester discovery skips them. Their behavior is now covered by the mirrored source-file tests added in #200 – #207. closes Pester redesign for NovaModuleTools Fixes #208
…-requiring integration tests Convert the last 11 mirrored private-helper tests (scaffold, quality, build, update) to the dot-source-first pattern so `nova test` no longer requires a prior `Invoke-NovaBuild`. Retire nine legacy integration and guardrail tests (Module, OutputFiles, BuildOptions, CiCoverage, CliHelperCoverage, CliSharedParser, PackageLatestPolicy, PreambleBuild, UpdateNotification) and their TestSupport sidecars to `tests/_legacy/` with the `.LegacyReference.ps1` suffix so Pester discovery skips them. Their behavior is now covered by the mirrored source-file tests added in #200 – #207.
Add and extend source-mirrored, dot-source Pester tests across
src/private/{quality,package,release,scaffold,build,shared,cli} to
close the gaps remaining after the test-layout migration (#200-#207)
and bring measured line coverage from 96.37% back to 99.28%, above
the configured Pester.CodeCoverage.Enabled gate of 99%.
- Removed pre-migration broad coverage-bucket suites and their reference copies - Removed dist-requiring integration and guardrail tests as mirrored suites cover the same behavior - Updated test-loading guidance to follow a source-mirrored, dot-source-first pattern - Finalized Pester coverage target at 99% with migrated test suite - Enhanced architect/design flow for finalization processes
Pester's JaCoCo output (after the source-mirrored coverage migration) emits package + sourcefilename pairs that double the relative path (package="src/private/build" + sourcefilename="private/build/Foo.ps1"), so CodeScene's cs-coverage rejects the upload with "The coverage data does not contains any records related to the current repo". Invoke-CodeSceneAnalysis.ps1 now normalizes <class sourcefilename> and <sourcefile name> attributes to bare filenames before upload so package + sourcefile resolves to real repository paths.
- skip branch-coverage upload if no BRANCH counters are present in JaCoCo report - update tests to validate branch-coverage upload behavior
Refactor the migrated mirrored Pester suite into per-file `*.TestSupport.ps1` sidecars and data-driven assertions so the current branch change set returns to Code Health 10 without reintroducing legacy coverage buckets or dist-module test loading. Also harden `Invoke-CodeSceneAnalysis.ps1` so JaCoCo path normalization and conditional branch-coverage upload stay maintainable and CI-safe.
- split zip and NuGet test support setup into smaller mock registration helpers - simplify package settings support helper lookups - fix CLI invocation test support argument parsing for forwarded switch-style values - keep mirrored tests and CodeScene safeguards green
- expand Pester CodeCoverage paths so nested src/private folders are included in artifacts/coverage.xml - stop build test support files from shadowing manifest helper coverage - add mirrored duplicate-validation tests for quality/duplicates helpers
- expand Pester CodeCoverage paths so nested src/private folders are included in artifacts/coverage.xml - stop build test support files from shadowing manifest helper coverage and add mirrored duplicate-validation tests - update the public site for scaffold version defaults, explicit coverage paths, and corrected versioning examples
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Absence of Expected Change Pattern
- NovaModuleTools/src/public/InvokeNovaRelease.ps1 is usually changed with: NovaModuleTools/src/public/PublishNovaModule.ps1
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Coverage Gates Passed
Overall Coverage: 99.2%
(required = 95%)
New & Changed Code Coverage: 100%
(required = 99%)
Review details by gate
-
Overall Coverage
- Pass/Fail Reason:
The overall coverage gate was checked for all code and meets the goal: 99.2% covered >= threshold = 95% - Action:
You have 285 files with a sum of 3079 covered and 24 uncovered lines of code.
- Pass/Fail Reason:
-
New & Changed Code Coverage
- Pass/Fail Reason:
New or changed code meets coverage goal: 100% covered >= threshold = 99% - Action:
You modified 60 files, and covered 282 added/modified lines of code.
- Pass/Fail Reason:
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
develop -> mainrelease candidate for the next stable cut after2.4.0, withdevelopcurrently at2.4.1-preview.developmainpromotes it into the next stable releasePublish.ymlbranch roles remain unchanged (main= stable publish/release,develop= prerelease publish)Initialize-NovaModule/% nova initPester.CodeCoverage.CoveragePercentTargetartifacts/coverage.xml.github/agent/prompt/skill guidance plus README/CONTRIBUTING/help/site docs to match the new workflowAffected area
novaCLI or command routingproject.jsonhandlingREADME.md,CONTRIBUTING.md, repository workflow docs)docs/*.html)docs/NovaModuleTools/en-US/*.md)src/resources/example/project.json, workflow dependencies, release tooling)Review guidance
src/private/scaffold/,src/resources/agentic-copilot/, andsrc/resources/ProjectTemplate.jsonsrc/private/quality/,scripts/build/ci/Invoke-NovaModuleToolsCI.ps1,scripts/build/ci/Invoke-CodeSceneAnalysis.ps1, and.github/workflows/Tests.ymlCHANGELOG.md,RELEASE_NOTE.md,README.md, andCONTRIBUTING.md.github/,src/resources/agentic-copilot/, andsrc/private/scaffold/tests/public/,tests/private/**, andproject.json.github/workflows/Tests.ymlandscripts/build/ci/Publish.ymlsemantics were reviewed but are not materially changed by this diff; release risk is in the changed inputs to that pipeline, not in branch-role policyValidation
Invoke-NovaBuildTest-NovaBuild./scripts/build/Invoke-ScriptAnalyzerCI.ps1./scripts/build/ci/Invoke-NovaModuleToolsCI.ps1% nova build,% nova test,% nova merge,% nova deploy,% nova publish,% nova release,% nova update,% nova notification, or% nova initas relevant)Validation notes:
Documentation and release follow-up
README.mdreviewed and updated if contributor workflow, architecture, CI, release, or automation changedCONTRIBUTING.mdreviewed and updated if contribution expectations or review guidance changedCHANGELOG.mdreviewed and updated if the change matters to users, maintainers, or contributorsRELEASE_NOTE.mdreviewed and updated if the change affects public cmdlet usage, CLI usage, configuration semantics, or migration expectationsdocs/NovaModuleTools/en-US/help updated if a public command or CLI behavior changeddocs/*.htmlupdated if end-user workflows or examples changedsrc/resources/example/reviewed and updated if the real-world project layout, package model, or upload workflow changedMaintainability, compatibility, and risk
Risk, rollout, or rollback notes:
Important
Do not use a public pull request to disclose a vulnerability before coordinated handling.
Use the private reporting path in
SECURITY.mdfor new security issues.