PowerForge Library Builder
Use this skill for repository/package pipelines (Invoke-ProjectBuild), including NuGet + GitHub release workflows.
Prefer one entrypoint script: Build/Build-Project.ps1.
Golden Path (Do This In Order)
- Confirm repository scope and branch hygiene.
- Prefer feature branch/worktree.
- Validate
project.build.json.- Discovery filters (
IncludeProjects,ExcludeProjects, expected map include mode). - Version expectations and version sources.
- Discovery filters (
- Generate plan before publishing.
- Use
PlanOnlyor cmdlet-Planfirst.
- Use
- Execute build/pack/sign path.
- Ensure staging/output paths are deterministic.
- Treat
CleanStagingas artifact cleanup only; release compilation freshness is enforced by PowerForge. - Require primary managed package assemblies to match the fresh release build before signing or publishing; do not treat native runtime assets or metadata-only packages as managed assembly payloads.
- Keep
Build-Project.ps1minimal (param pass-through +Invoke-ProjectBuildcall). - Do not keep legacy wrapper scripts (
Build-AllPackages.ps1,Publish-*.ps1,Update-Version.ps1) unless explicitly required.
- Publish NuGet with explicit fail-fast and duplicate policy.
- Publish GitHub release with explicit tag policy.
- Choose
SingleorPerProjectintentionally. - Set
GitHubPrimaryProjectfor single-mode version source.
- Choose
- Handle tag conflicts intentionally.
- Prefer configurable conflict policy instead of ad-hoc retries.
- Verify final release state.
- Confirm release/tag and attached asset set match plan.
- Inspect the published package content when the release adds or changes public APIs; version visibility and a valid signature alone do not prove the payload is current.
- If an immutable feed already contains a stale package, publish a corrected higher version and keep consumers off the bad version.
- Update docs/schema/help for any new config fields.
- Keep engine boundaries explicit.
- Use
Invoke-ProjectBuildfor package/release pipelines. - Use DotNet publish engine (
Invoke-DotNetPublish,New-ConfigurationDotNet*) for service/app publish packaging.
High-Value Commands
# Plan-only
Invoke-ProjectBuild -ConfigFilePath .\Build\project.build.json -Plan
# Full run
Invoke-ProjectBuild -ConfigFilePath .\Build\project.build.json
# Validate core tests after engine changes
dotnet test .\PowerForge.Tests\PowerForge.Tests.csproj -c Release
Decision Rules
Standard script surface for repos:
- Keep
Build/Build-Project.ps1andBuild/project.build.json. - Remove obsolete wrapper scripts once migration is complete.
- Keep
Keep
Build-Project.ps1simple:- avoid custom coercion/helper blocks when normal nullable bool parameters and splatting are enough.
If projects have mixed versions in
Singlerelease mode:- set
GitHubPrimaryProjector use date/timestamp tags by template.
- set
Prefer template-based tags over hardcoded tags:
- tokens include
{Project},{Version},{PrimaryProject},{PrimaryVersion},{Repo},{Date},{UtcDate},{DateTime},{UtcDateTime},{Timestamp},{UtcTimestamp}.
- tokens include
Use explicit conflict policy for existing tags:
Reuse,Fail, orAppendUtcTimestamp.
In plan/what-if mode, avoid hard failures that require produced artefacts on disk.
Never use
CleanStagingas evidence that projectbin/objoutputs were rebuilt.Do not publish when PowerForge reports a package payload provenance mismatch.
Reference Files (Read As Needed)
references/checklist.mdfor quick release-mode and tag-policy decisions.Docs/PSPublishModule.ProjectBuild.mdfor JSON behavior.Docs/PSPublishModule.DotNetPublish.Quickstart.mdwhen release work also needs app/service publish flows.schemas/project.build.schema.jsonfor allowed fields and enums.Module/Docs/Invoke-ProjectBuild.mdfor cmdlet behavior.