teaceo-debug/DEEP6 / .claude/skills/nt8-build-verify
nt8-build-verify
Verified| File | Kind | Size |
|---|---|---|
| README.md | markdown | 13.6 KB |
| SKILL.md | skill md | 1.5 KB |
| fixes/BRACE_MISMATCH.md | markdown | 5.1 KB |
| fixes/CS0019.md | markdown | 4.7 KB |
| fixes/CS0101.md | markdown | 4.9 KB |
| fixes/CS0103.md | markdown | 4.0 KB |
| fixes/CS0246.md | markdown | 5.4 KB |
| fixes/CS0535.md | markdown | 3.6 KB |
| fixes/CS1061.md | markdown | 5.0 KB |
| fixes/MISSING_ATTRIBUTE.md | markdown | 5.9 KB |
| knowledge.md | markdown | 3.5 KB |
| lib/__init__.py | script | 0 B |
| lib/diagnostics.py | script | 2.3 KB |
| lib/nt8_paths.py | script | 3.8 KB |
| scripts/compile_editor.ps1 | script | 5.1 KB |
| scripts/compile_headless.ps1 | script | 9.2 KB |
| scripts/deploy.ps1 | script | 2.6 KB |
| scripts/fix_loop.ps1 | script | 19.7 KB |
| scripts/fix_router.py | script | 15.8 KB |
| scripts/install_indicator.ps1 | script | 16.0 KB |
| scripts/modal_detect.ps1 | script | 10.9 KB |
| scripts/orchestrator.ps1 | script | 19.8 KB |
| scripts/parse_errors.py | script | 4.6 KB |
| scripts/runtime_check.ps1 | script | 2.9 KB |
| scripts/screenshot_chart.ps1 | script | 7.5 KB |
| scripts/verify_visual.py | script | 8.0 KB |
| scripts/workspace_mutator.py | script | 17.6 KB |
scripts/compile_editor.ps1
View on GitHub[CmdletBinding()]
param(
[int]$TimeoutSeconds = 60,
[switch]$AutoReload
)
$ErrorActionPreference = "Stop"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
$repoRoot = (Resolve-Path (Join-Path $scriptDir "..\..\..\..")).Path
$stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
function Invoke-PowerShellScriptCapture {
param(
[Parameter(Mandatory = $true)]
[string]$ScriptPath,
[Parameter(Mandatory = $false)]
[string[]]$Arguments = @()
)
$psArgs = @(
"-NoProfile"
"-ExecutionPolicy"
"Bypass"
"-File"
$ScriptPath
) + @($Arguments)
$rawOutput = & powershell.exe @psArgs 2>&1
$exitCode = $LASTEXITCODE
$textOutput = @($rawOutput | ForEach-Object { $_.ToString() }) -join [Environment]::NewLine
[PSCustomObject]@{
Output = $textOutput
ExitCode = $exitCode
}
}
function Convert-JsonSafely {
param([string]$Text)
if ([string]::IsNullOrWhiteSpace($Text)) {
return $null
}
try {
return $Text | ConvertFrom-Json
}
catch {
return $null
}
}
# Step 1: Modal detection — abort if BLOCKED
$modalScript = Join-Path $scriptDir "modal_detect.ps1"
$modalRun = Invoke-PowerShellScriptCapture -ScriptPath $modalScript -Arguments @("-TimeoutSeconds", "5")
$modalResult = Convert-JsonSafely -Text $modalRun.Output
if ($null -eq $modalResult -or $modalRun.ExitCode -ne 0 -or $modalResult.blocked) {
Write-Output "[COMPILE-RESULT] FAILED modal_blocked"
$result = @{
success = $false
error_count = 0
errors = @()
dll_reloaded = $false
elapsed_ms = 0
blocked_by_modal = $true
}
Write-Output ($result | ConvertTo-Json -Depth 5 -Compress)
exit 2
}
# Step 2: Record DLL timestamp before compile
$dllPath = Join-Path $env:USERPROFILE "Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll"
$dllBefore = if (Test-Path $dllPath) { (Get-Item $dllPath).LastWriteTime } else { $null }
# Step 3: Trigger compile via nt8-compile.ps1
$compileScript = Join-Path $repoRoot "ninjatrader\scripts\nt8-compile.ps1"
$compileArgs = @("-TimeoutSeconds", "$TimeoutSeconds")
if ($AutoReload) { $compileArgs += "-AutoReload" }
$compileRun = Invoke-PowerShellScriptCapture -ScriptPath $compileScript -Arguments $compileArgs
# Step 4: Check DLL timestamp after compile
$dllAfter = if (Test-Path $dllPath) { (Get-Item $dllPath).LastWriteTime } else { $null }
$dllReloaded = ($null -ne $dllBefore -and $null -ne $dllAfter -and $dllAfter -gt $dllBefore)
# Step 5: Parse compile result from sentinel
$compileSuccess = $false
$compileSentinel = $null
if (-not [string]::IsNullOrWhiteSpace($compileRun.Output)) {
foreach ($line in ($compileRun.Output -split "`r?`n")) {
if ($line -match '\[COMPILE-RESULT\]\s+SUCCESS') {
$compileSuccess = $true
$compileSentinel = $line.Trim()
break
}
if ($line -match '\[COMPILE-RESULT\]\s+FAILED') {
$compileSentinel = $line.Trim()
}
}
}
# BUG FIX: Only override success if exit code is 0 AND no errors were found
# Previously this would mark success=true even when compile errors exist
if (-not $compileSuccess -and $compileRun.ExitCode -eq 0) {
# Don't override yet — wait until we check error count below
$exitCodeWasZero = $true
} else {
$exitCodeWasZero = $false
}
# Step 6: Collect errors via nt8-errors-full.ps1
$errors = @()
$errorCount = 0
$errorsScript = Join-Path $repoRoot "ninjatrader\scripts\nt8-errors-full.ps1"
if (Test-Path $errorsScript) {
try {
$errorsRun = Invoke-PowerShellScriptCapture -ScriptPath $errorsScript -Arguments @()
$errorsResult = Convert-JsonSafely -Text $errorsRun.Output
if ($null -ne $errorsResult) {
if ($errorsResult -is [System.Array]) {
$errors = @($errorsResult)
}
elseif ($errorsResult.PSObject.Properties.Name -contains "error") {
$errors = @()
}
else {
$errors = @($errorsResult)
}
}
$errorCount = @($errors).Count
}
catch {
$errors = @()
$errorCount = 0
}
}
# Step 7: Emit sentinel
if ($compileSuccess) {
if (-not $compileSentinel) {
$compileSentinel = "[COMPILE-RESULT] SUCCESS $(Get-Date -Format 'o')"
}
Write-Output $compileSentinel
} else {
Write-Output "[COMPILE-RESULT] FAILED $errorCount"
}
# Step 8: Return JSON
$stopwatch.Stop()
# BUG FIX: success depends on BOTH compile process AND zero errors
if (-not $compileSuccess -and $exitCodeWasZero -and $errorCount -eq 0) {
$compileSuccess = $true
}
# If errors exist, success must be false regardless of exit code
if ($errorCount -gt 0) {
$compileSuccess = $false
}
$result = @{
success = $compileSuccess
error_count = $errorCount
errors = $errors
dll_reloaded = $dllReloaded
elapsed_ms = $stopwatch.ElapsedMilliseconds
blocked_by_modal = $false
path_used = "editor_uia"
}
Write-Output ($result | ConvertTo-Json -Depth 5 -Compress)
exit $(if ($compileSuccess) { 0 } else { 1 })
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |