Skip to content

teaceo-debug/DEEP6 / .claude/skills/nt8-build-verify

nt8-build-verify

Verified

FileKindSize
README.mdmarkdown13.6 KB
SKILL.mdskill md1.5 KB
fixes/BRACE_MISMATCH.mdmarkdown5.1 KB
fixes/CS0019.mdmarkdown4.7 KB
fixes/CS0101.mdmarkdown4.9 KB
fixes/CS0103.mdmarkdown4.0 KB
fixes/CS0246.mdmarkdown5.4 KB
fixes/CS0535.mdmarkdown3.6 KB
fixes/CS1061.mdmarkdown5.0 KB
fixes/MISSING_ATTRIBUTE.mdmarkdown5.9 KB
knowledge.mdmarkdown3.5 KB
lib/__init__.pyscript0 B
lib/diagnostics.pyscript2.3 KB
lib/nt8_paths.pyscript3.8 KB
scripts/compile_editor.ps1script5.1 KB
scripts/compile_headless.ps1script9.2 KB
scripts/deploy.ps1script2.6 KB
scripts/fix_loop.ps1script19.7 KB
scripts/fix_router.pyscript15.8 KB
scripts/install_indicator.ps1script16.0 KB
scripts/modal_detect.ps1script10.9 KB
scripts/orchestrator.ps1script19.8 KB
scripts/parse_errors.pyscript4.6 KB
scripts/runtime_check.ps1script2.9 KB
scripts/screenshot_chart.ps1script7.5 KB
scripts/verify_visual.pyscript8.0 KB
scripts/workspace_mutator.pyscript17.6 KB

fixes/CS0101.md

View on GitHub
# CS0101 — Duplicate type name in namespace

## Pattern
`error CS0101: The namespace 'N' already contains a definition for 'X'`

## Root Causes (ordered by likelihood)
1. Two `.cs` files in the same NT8 compile scope declare a class with the same name under the same namespace
2. A file was duplicated (copy-paste of an existing indicator/strategy) and the class name was not updated
3. A `partial class` split across files where one file was accidentally duplicated in the NT8 deploy folder
4. A root-level (non-DEEP6) file in `bin\Custom\` has the same class name as a DEEP6 file

## Fix Strategies

### Strategy 1: Rename the duplicate class
- **Detect**: The error names two files (or the same file appearing twice) that both declare the same class name in the same namespace. Check both the repo source (`ninjatrader/Custom/`) and the NT8 deployed folder (`Documents\NinjaTrader 8\bin\Custom\`) for duplicate `.cs` files.
- **Lookup**: Search for the class name across all `.cs` files in the NT8 Custom folder tree. Both the repo source and the deployed copy must be checked.
- **Fix**: Rename the class in one of the files to a unique name. Update all references to the renamed class. If the duplicate is a stale deployed file that shouldn't exist, delete it from the NT8 folder and redeploy.
- **Verify**: Only one class with that name exists in the namespace across all compiled files.

```powershell
# Find all files declaring the duplicate class name
Select-String -Path "C:\Users\Tea\Documents\NinjaTrader 8\bin\Custom\**\*.cs" `
    -Pattern "class MyDuplicateName" -Recurse
```

### Strategy 2: Remove stale deployed file
- **Detect**: The repo source has only one file with the class, but the NT8 deployed folder has an old copy from a previous deploy or rename. NT8 compiles everything in `bin\Custom\` regardless of whether the repo still tracks the file.
- **Lookup**: Compare the file list in `ninjatrader/Custom/Indicators/DEEP6/` (repo) against `Documents\NinjaTrader 8\bin\Custom\Indicators\DEEP6\` (deployed). Any file in the deployed folder that is not in the repo is a stale artifact.
- **Fix**: Delete the stale `.cs` file from the NT8 deployed folder. Do not delete from the repo unless the file is intentionally removed.
- **Verify**: The deployed folder contains only files that match the current repo source. Recompile and confirm success.

```powershell
# Delete stale deployed file
Remove-Item "C:\Users\Tea\Documents\NinjaTrader 8\bin\Custom\Indicators\DEEP6\OldIndicator.cs"
```

### Strategy 3: Partial class duplication
- **Detect**: The class is declared as `partial class X` and the error points to two files that both contain `partial class X`. One of the files is a duplicate that should not exist.
- **Lookup**: NT8 does not commonly use `partial class` in DEEP6 files. If `partial` appears, it's likely an accidental duplication. Check if both files contain meaningful, non-overlapping code.
- **Fix**: Merge the two partial files into one, or remove the duplicate. If both files have unique content, consolidate into a single file.
- **Verify**: Only one file declares the class (with or without `partial`).

### Strategy 4: Root-level file collision
- **Detect**: The error references a namespace like `NinjaTrader.NinjaScript.Indicators` (without `.DEEP6`) and a class name that matches a DEEP6 file. A root-level file in `bin\Custom\Indicators\` (not in the `DEEP6\` subfolder) has the same class name.
- **Lookup**: Check `bin\Custom\Indicators\` (root level, not the DEEP6 subfolder) for any `.cs` files with conflicting class names.
- **Fix**: Either rename the DEEP6 class to include a `DEEP6` prefix, or delete the conflicting root-level file if it's a stale artifact.
- **Verify**: No two files in the entire `bin\Custom\` tree share a class name within the same namespace.

## NT8-Specific Notes

- NT8 compiles **all** `.cs` files under `bin\Custom\` in a single compilation unit. There is no per-folder isolation.
- The DEEP6 namespace (`NinjaTrader.NinjaScript.Indicators.DEEP6`) prevents most collisions with third-party indicators, but not with other DEEP6 files.
- After deleting a stale file, always trigger a full recompile via `nt8-compile.ps1` to confirm the collision is resolved.
- The `FootprintBar.cs` file is intentionally excluded from NT8 deployment (test-only). If it appears in `bin\Custom\`, delete it immediately.

## Example Fix

```diff
  // File 1: DEEP6Footprint.cs (keep as-is)
  namespace NinjaTrader.NinjaScript.Indicators.DEEP6
  {
      public class DEEP6Footprint : Indicator { ... }
  }

  // File 2: DEEP6FootprintV2.cs (accidentally named the same)
- namespace NinjaTrader.NinjaScript.Indicators.DEEP6
- {
-     public class DEEP6Footprint : Indicator { ... }  // CS0101: duplicate
- }

+ // Option A: rename the class
+ namespace NinjaTrader.NinjaScript.Indicators.DEEP6
+ {
+     public class DEEP6FootprintV2 : Indicator { ... }
+ }

+ // Option B: delete the stale file from the NT8 deployed folder
+ // Remove-Item "...\bin\Custom\Indicators\DEEP6\DEEP6FootprintV2.cs"
```
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall