New-DevEnvironment.ps1

function New-DevEnvironment {
    <#
    .SYNOPSIS
    Scaffolds a development environment at the given path.
 
    .DESCRIPTION
    Ensures the target directory exists, then scaffolds a default Python
    environment inside it via Invoke-MkVenv. Composes existing, tested
    primitives (New-DtDirectory, Invoke-MkVenv) rather than duplicating
    their logic.
 
    .PARAMETER Path
    Directory to scaffold the environment into. Created if it does not
    already exist.
 
    .EXAMPLE
    New-DevEnvironment -Path C:\projects\my-app
    #>

    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$Path
    )

    New-DtDirectory -Path $Path | Out-Null

    Push-Location $Path
    try {
        Invoke-MkVenv -Type Python | Out-Null
    }
    finally {
        Pop-Location
    }

    Write-Verbose "Development environment scaffolded at: $Path"
}