# Verification Requirements

Run `.\verify-build.bat` from `C:\dev\nt8-sdk\` after **every single file change**.  
Do not proceed to the next task until this passes.

---

## After Every File Change

### Step 1 — Build verification
```bat
cd C:\dev\nt8-sdk
.\verify-build.bat
```

Expected: `✅ All checks passed!`

If it fails:
1. Read the compiler error carefully
2. Fix it immediately
3. Re-run before continuing
4. NEVER move to the next file with a broken build

### Step 2 — Syntax check (self-audit before running)
Scan your code for forbidden patterns:
- No `$"..."` (string interpolation) → use `string.Format("...", a, b)`
- No `?.` or `?[` → use explicit null checks
- No `=>` on properties or methods → use full `{ get { return x; } }` syntax
- No `nameof(x)` → use `"x"` string literal
- No `var x; ...TryGetValue(key, out var x)` inline → declare var separately

### Step 3 — After completing a whole class
```bat
dotnet test tests\NT8.Core.Tests --verbosity minimal
```
All existing tests must still pass. Zero regressions allowed.

---

## Specific Test Commands by Area

```bat
# Test execution layer (TrailingStopManager etc.)
dotnet test tests\NT8.Core.Tests --filter "FullyQualifiedName~Execution"

# Test adapters
dotnet test tests\NT8.Core.Tests --filter "FullyQualifiedName~Adapters"

# Test all integration tests
dotnet test tests\NT8.Integration.Tests --verbosity minimal

# Full suite
dotnet test NT8-SDK.sln --verbosity minimal
```

---

## Emergency Stop Conditions

STOP and report back if:
- Build fails with errors you do not understand
- Existing tests fail after your changes
- You need to touch a file outside allowed boundaries
- You are unsure about a design decision
- You are about to modify a NinjaTrader API call signature

---

## Quality Gates (ALL must pass before task is complete)

| Gate | Check |
|---|---|
| ✅ Compilation | `verify-build.bat` outputs "All checks passed!" |
| ✅ Syntax | No C# 6+ features |
| ✅ Thread safety | All shared `Dictionary`/`List` access inside `lock (_lock)` |
| ✅ Error handling | All public methods have `try-catch` |
| ✅ Logging | All log calls use `string.Format()` not `$""` |
| ✅ XML docs | All public members have `/// <summary>` |
| ✅ No regressions | 240+ existing tests still pass |
