36 lines
1.5 KiB
Markdown
36 lines
1.5 KiB
Markdown
# Compile Error Guidance - Reusable Protocol
|
|
**Last Updated:** 2026-04-05
|
|
|
|
Apply this protocol for all compile issues.
|
|
|
|
## 1) Verify First
|
|
- [ ] Verify exact NinjaScript/API signature against official NT8 docs before editing: `https://developer.ninjatrader.com/docs/desktop`.
|
|
- [ ] Confirm file is in scope before making any change.
|
|
|
|
## 2) Classify the Error
|
|
- [ ] Missing type/namespace (e.g., `CS0246`).
|
|
- [ ] Invalid override/signature/access modifier (e.g., `CS0115`, `CS0507`).
|
|
- [ ] Argument mismatch or wrong overload (e.g., `CS1503`).
|
|
- [ ] C# language version incompatibility (C# 6+ syntax in C# 5 project).
|
|
|
|
## 3) Apply Smallest Safe Fix
|
|
- [ ] Prefer minimal edits in scoped files only.
|
|
- [ ] Fix root cause, not symptom chaining.
|
|
- [ ] Preserve existing architecture/contracts unless task explicitly requires change.
|
|
|
|
## 4) Re-Run Verification
|
|
- [ ] Run `.\verify-build.bat`.
|
|
- [ ] Run required tests for changed area.
|
|
- [ ] If NinjaScript touched, run NT8 compile check in NinjaScript Editor.
|
|
|
|
## 5) Capture Durable Learning
|
|
For non-trivial compile failures, add concise entries to:
|
|
- [ ] `docs/00-governance/common_failures.md` (error fingerprint + fix).
|
|
- [ ] `docs/00-governance/compile_guardrails.md` (prevention rule).
|
|
- [ ] `docs/00-governance/patterns_and_antipatterns.md` (good vs bad pattern).
|
|
|
|
## Do Not
|
|
- [ ] Do not guess signatures, overloads, enums, or attributes.
|
|
- [ ] Do not invent placeholder enums/types unless confirmed by domain/task requirements.
|
|
- [ ] Do not keep one-off incident dumps in this rule file; store incidents in `common_failures.md`.
|