jac-debugging

Diagnose Jac compiler errors, stale caches, and client-server contract drift.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/PMN123/trapdoor --skill jac-debugging-pmn123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jac-debugging
Source: https://github.com/PMN123/trapdoor/tree/main/.agents/skills/jac-debugging
Command: npx skills add https://github.com/PMN123/trapdoor --skill jac-debugging-pmn123

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Jac builds fail or behave inexplicably for reasons that are hard to trace: cryptic jac check diagnostics, stale compiled bytecode or persisted graph data, and client code that silently drifts after a server contract changes. This Skill provides a systematic fix loop so you resolve the real cause instead of guessing. ## Core Features & Use Cases - Diagnostic decoding: Read jac check output by severity letter and category digit, follow jac guide pointers, and suppress codes with # jac:ignore[CODE] only as a last resort. - Stale-cache triage: Match symptoms like NodeAnchor is not a valid reference or ignored edits to the right fix — jac clean --cache, jac purge, jac clean --all --force, or deleting .jac/data. - Contract drift detection: After renaming a server endpoint or retyping a param, interpret W1101/W1051 warnings in client files as pointers to stale callers. - Use Case: Your served Jac app starts returning 500s with anchor errors after a model change. The triage table tells you to stop the server, remove .jac/data/, and restart — then verify with jac dot graph inspection. ## Quick Start Ask the assistant to debug why my Jac build is failing and walk through the jac check diagnostics and cache triage steps.

Frequently Asked Questions about jac-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and fix jac check error diagnostics?

Read the severity letter (E for error, W for warning) and the first digit of the code, which indicates the category: 0 syntax, 1 type, 2 semantic, 3 lint, 4 import, 5 codegen. When the output includes a 'run jac guide <name>' pointer, run it to get the exact reference for that error class.

Why does Jac report errors on code I know is correct?

Correct-looking code flagged by jac check usually means stale state, not a real bug. Run jac clean --cache to clear project bytecode, or jac purge for the global cache, especially after upgrading Jaseci packages. Persisted graph data can also outlive source edits.

How do I fix 'NodeAnchor is not a valid reference' in Jac?

This error means persisted graph data no longer matches recompiled types. Run jac clean --all --force to clear data, cache, venv, and client artifacts, then re-run. For a served app, stop the server, delete .jac/data, and restart.

What is the difference between jac fmt and jac check --lint --fix?

jac fmt only adjusts whitespace and layout, and refuses to save if formatting would displace comments. jac check --lint reports rule violations with kebab-case names, and adding --fix applies the auto-fixable ones. Use jac fmt -l to do both in one pass.

How do I detect stale client code after changing a Jac server contract?

Run jac check project-wide after renaming or retyping a server endpoint, walker field, or report shape. W1101 warnings at client sv import lines and W1051 at call sites point to stale callers, while a retyped param escalates to a hard E1053 at the client call line.

When should I use jac:ignore to suppress a diagnostic?

Use same-line suppression like # jac:ignore[E1030,W2003] only as a last resort, since it hides real regressions later. Prefer fixing the root cause, and configure project-wide lint selection in [check.lint] in jac.toml instead of scattering suppressions.