Some checks failed
Build and Test / build (push) Has been cancelled
- Kilocode AI agent rules and guidelines - Setup and implementation guides - Architecture documentation - Build and verification references
4.1 KiB
4.1 KiB
Verification Requirements
You MUST verify your work at each checkpoint to ensure code quality and prevent errors.
After EVERY File Creation or Modification
Step 1: Run Build Verification
.\verify-build.bat
Expected Output:
✅ All checks passed!
If build fails:
- Read the error message carefully
- Fix the error immediately
- Re-run verify-build.bat
- DO NOT proceed to next file until build passes
Step 2: Verify File Location
Check that the file is in an allowed directory:
- ✅
src/NT8.Core/OMS/- Implementation files - ✅
tests/NT8.Core.Tests/OMS/- Test files - ✅
tests/NT8.Core.Tests/Mocks/- Mock files - ❌ Anywhere else - STOP and ask
Step 3: Check Syntax Compliance
Scan your code for forbidden patterns:
- ❌ No
$"..."- Usestring.Format() - ❌ No
?.or?[- Use explicit null checks - ❌ No
=>in properties/methods - Use full syntax - ❌ No
nameof()- Use string literals
After Completing Each Class
Step 4: Run Unit Tests (if applicable)
dotnet test tests\NT8.Core.Tests --filter "FullyQualifiedName~OMS"
Expected Output:
Passed! - Failed: 0, Passed: X
Step 5: Review Against Checklist
- All public members have XML documentation
- All dictionary access uses
lock (_lock) - All public methods have try-catch
- All logging uses
string.Format() - No C# 6+ syntax anywhere
- File compiles without warnings
After Completing Full Task
Step 6: Comprehensive Build
dotnet build NT8-SDK.sln --configuration Release
Step 7: Full Test Suite
dotnet test tests\NT8.Core.Tests --verbosity normal
Step 8: Code Coverage (Optional but Recommended)
dotnet test tests\NT8.Core.Tests --collect:"XPlat Code Coverage"
Target: >80% coverage for new code
Common Verification Failures
"Feature 'string interpolation' is not available"
Cause: Used $"text {var}"
Fix: Replace with string.Format("text {0}", var)
"Feature 'null-conditional operator' is not available"
Cause: Used obj?.Property
Fix: Replace with explicit null check
"Cannot access member before initialization"
Cause: Used auto-property initializer Fix: Move initialization to constructor
Lock-related warnings
Cause: Dictionary access outside lock
Fix: Wrap in lock (_lock) { ... }
Emergency Stop Conditions
STOP immediately and ask for help if:
- ❌ Build fails with errors you don't understand
- ❌ Tests fail unexpectedly after your changes
- ❌ You need to modify files outside allowed directories
- ❌ You're unsure about a design decision
- ❌ Performance is severely degraded
Verification Workflow Summary
Write Code
↓
Run verify-build.bat
↓
Build passes? → NO → Fix errors, repeat
↓ YES
Check syntax (no C# 6+)
↓
Check patterns (locks, try-catch, logging)
↓
Check documentation (XML docs)
↓
Run unit tests (if applicable)
↓
All pass? → NO → Fix tests, repeat
↓ YES
Mark file complete ✅
↓
Move to next file
Quality Gates
Your code MUST pass these gates before being considered complete:
Gate 1: Compilation
- ✅
verify-build.batoutputs "All checks passed!" - ✅ No compiler warnings
- ✅ All references resolve
Gate 2: Syntax Compliance
- ✅ No C# 6+ features detected
- ✅ Only .NET Framework 4.8 APIs used
- ✅ Proper using statements
Gate 3: Pattern Compliance
- ✅ Thread-safe operations
- ✅ Error handling present
- ✅ Logging at correct levels
- ✅ XML documentation complete
Gate 4: Testing
- ✅ Unit tests written and passing
- ✅ Coverage >80% (target)
- ✅ Edge cases tested
Self-Check Questions
Before marking a file complete, ask:
- Does
verify-build.batpass? - Did I use any C# 6+ syntax?
- Is all dictionary access inside locks?
- Do all public methods have try-catch?
- Does all logging use string.Format?
- Do all public members have XML docs?
- Are there unit tests for this code?
- Do the tests pass?
If any answer is "No" or "I'm not sure" → DO NOT PROCEED