# Kilocode Configuration Setup Script
# Auto-generated for NT8 SDK

Write-Host "=== Copying Kilocode Configuration Files ===" -ForegroundColor Cyan

# Array of files to copy: source, destination
$files = @(
    @{src="/tmp/coding_patterns.md"; dest="C:\dev\nt8-sdk\.kilocode\rules\coding_patterns.md"},
    @{src="/tmp/verification_requirements.md"; dest="C:\dev\nt8-sdk\.kilocode\rules\verification_requirements.md"},
    @{src="/tmp/project_context.md"; dest="C:\dev\nt8-sdk\.kilocode\rules\project_context.md"},
    @{src="/tmp/settings.json"; dest="C:\dev\nt8-sdk\.vscode\settings.json"},
    @{src="/tmp/tasks.json"; dest="C:\dev\nt8-sdk\.vscode\tasks.json"},
    @{src="/tmp/.editorconfig"; dest="C:\dev\nt8-sdk\.editorconfig"}
)

$success = 0
$failed = 0

foreach ($file in $files) {
    try {
        Copy-Item -Path $file.src -Destination $file.dest -Force
        Write-Host "  ✓ Copied: $($file.dest)" -ForegroundColor Green
        $success++
    } catch {
        Write-Host "  ✗ Failed: $($file.dest)" -ForegroundColor Red
        Write-Host "    Error: $_" -ForegroundColor Red
        $failed++
    }
}

Write-Host "`n=== Summary ===" -ForegroundColor Cyan
Write-Host "  Success: $success" -ForegroundColor Green
Write-Host "  Failed: $failed" -ForegroundColor $(if ($failed -eq 0) { "Green" } else { "Red" })

if ($failed -eq 0) {
    Write-Host "`n✓ All files copied successfully!" -ForegroundColor Green
    Write-Host "`nNext steps:" -ForegroundColor Cyan
    Write-Host "1. Restart VS Code"
    Write-Host "2. Open Kilocode panel"
    Write-Host "3. Click law icon (⚖️) to verify 5 rules loaded"
    Write-Host "4. Press Ctrl+Shift+B to test verify-build task"
}
