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

scripts/parse_errors.py

View on GitHub
#!/usr/bin/env python3
"""Parse and enrich NT8 compile errors with fix recipe metadata."""

import sys
import os
import json
import argparse

# Add lib to path
script_dir = os.path.dirname(os.path.abspath(__file__))
skill_dir = os.path.dirname(script_dir)
sys.path.insert(0, skill_dir)

from lib.diagnostics import CompileError

# Known warning codes (should NOT enter fix loop)
WARNING_CODES = {"CS0168", "CS0219", "CS0414", "CS0649", "CS0169", "CS0067"}

# Known fixable error codes (have fix recipes in fixes/)
FIXABLE_CODES = {
    "CS0103",
    "CS0246",
    "CS1061",
    "CS0019",
    "CS0101",
    "CS0535",
    "BRACE_MISMATCH",
    "MISSING_ATTRIBUTE",
}


def parse_errors(error_json: list[dict]) -> dict:
    """Parse error list, separate warnings, enrich with fix metadata."""
    errors = []
    warnings = []

    for item in error_json:
        code = item.get("code", "")
        severity = "warning" if code in WARNING_CODES else "error"

        ce = CompileError(
            code=code,
            message=item.get("message", ""),
            file=item.get("file", ""),
            line=item.get("line", 0),
            col=item.get("col", 0),
            severity=severity,
        )

        if severity == "warning":
            warnings.append(ce)
        else:
            errors.append(ce)

    # Enrich errors with fix recipe info
    enriched_errors = []
    fixable_count = 0
    unfixable_count = 0

    for err in errors:
        fix_recipe_path = os.path.join(skill_dir, "fixes", f"{err.code}.md")
        has_recipe = os.path.exists(fix_recipe_path)

        enriched = {
            "code": err.code,
            "message": err.message,
            "file": err.file,
            "line": err.line,
            "col": err.col,
            "severity": err.severity,
            "fixable": has_recipe and err.code in FIXABLE_CODES,
            "fix_recipe": f"fixes/{err.code}.md" if has_recipe else None,
        }
        enriched_errors.append(enriched)

        if enriched["fixable"]:
            fixable_count += 1
        else:
            unfixable_count += 1

    # Sort: fixable first, then unfixable
    enriched_errors.sort(key=lambda e: (not e["fixable"], e["code"]))

    # Detect cascade groups: multiple errors referencing same type/namespace
    cascade_groups = detect_cascades(enriched_errors)

    return {
        "errors": enriched_errors,
        "warnings": [
            {
                "code": w.code,
                "message": w.message,
                "file": w.file,
                "line": w.line,
                "col": w.col,
            }
            for w in warnings
        ],
        "fixable_count": fixable_count,
        "unfixable_count": unfixable_count,
        "cascade_groups": cascade_groups,
    }


def detect_cascades(errors: list[dict]) -> list[dict]:
    """Group errors that likely share a root cause."""
    # Group by: same file + same error code
    groups = {}
    for err in errors:
        key = f"{err['file']}:{err['code']}"
        if key not in groups:
            groups[key] = {
                "file": err["file"],
                "code": err["code"],
                "count": 0,
                "lines": [],
            }
        groups[key]["count"] += 1
        groups[key]["lines"].append(err["line"])

    # Only return groups with 2+ errors (actual cascades)
    return [g for g in groups.values() if g["count"] >= 2]


def main():
    parser = argparse.ArgumentParser(description="Parse and enrich NT8 compile errors")
    parser.add_argument("--file", help="JSON file path (default: stdin)")
    parser.add_argument("--test", action="store_true", help="Run with sample data")
    args = parser.parse_args()

    if args.test:
        sample = [
            {
                "file": "test.cs",
                "message": "type not found",
                "code": "CS0246",
                "line": 10,
                "col": 5,
            },
            {
                "file": "test.cs",
                "message": "type not found again",
                "code": "CS0246",
                "line": 20,
                "col": 5,
            },
            {
                "file": "b.cs",
                "message": "unused var",
                "code": "CS0168",
                "line": 5,
                "col": 1,
            },
        ]
        result = parse_errors(sample)
    elif args.file:
        with open(args.file) as f:
            data = json.load(f)
        result = parse_errors(data)
    else:
        data = json.load(sys.stdin)
        result = parse_errors(data)

    print(json.dumps(result, indent=2))


if __name__ == "__main__":
    main()
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: 197kUpdated 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