Flag compiler bug

From dannys-code-corner/incan · View interactive version

Flag compiler bug is an AI agent skill from the GitHub repository dannys-code-corner/incan. Detect, triage, de-duplicate, and raise compiler bug reports when an agent encounters a likely compiler defect during implementation, review, testing, or issue work. Use when a task surfaces an ICE, panic, wrong accept/reject behavior, miscompile, lowering/emission bug, diagnostic bug, formatter/LSP

How to use this skill

Skill file

Flag Compiler Bug

This skill exists so agents self-discover the behavior. Do not wait for the user to explicitly say "file a compiler bug" if the evidence is strong enough.

Core rule

If you encounter a likely compiler bug:

  1. pause and verify the observation
  2. reduce it to the smallest honest repro you can
  3. decide whether it blocks the current task or can be worked around without lying to yourself
  4. check whether the bug is already filed
  5. raise or draft the bug with create-github-issue
  6. resume the original task only if the workaround is real and the remaining scope still makes sense

Minimal repro is the most important artifact. If the repro is weak, the report is weak.

What counts as a compiler bug

Treat these as likely compiler bugs unless evidence shows otherwise:

Do not flag a compiler bug when the issue is more likely:

Workflow

1. Verify and localize

Capture:

If you are not confident it is a compiler bug, say so explicitly and explain the uncertainty.

2. Minimize the repro

Reduce the case aggressively:

Prefer a tiny repro over a "realistic" one. If minimization changes the bug surface, keep both and say why.

3. Judge blocking vs workaround

Decide which of these is true:

Do not call something a workaround if it quietly changes semantics, dodges test coverage, or narrows the task in a way the user did not ask for.

4. Check for duplicates

Before raising a new issue, search existing issues in the relevant tracker using:

Search open issues first, then recent closed issues if the match looks plausible.

If a likely duplicate exists:

5. Raise the bug

Use create-github-issue with the bug template in the correct repository.

For compiler/tooling defects in this workspace, that is usually the incan/ repository even if the bug surfaced while working in IncQL/.

Include:

Before creating the issue, run the create-github-issue public text safety gate on the exact title/body you will publish. Do not publish absolute local paths such as /Users/..., /home/..., /private/..., /tmp/..., or commands that expose a local checkout path. If the private reproduction used a local compiler binary, publish a generic equivalent such as incan run path/to/repro.incn and keep commit/version information in the Environment section.

If the current workflow permits creating the GitHub issue directly, do that after the duplicate check. Otherwise return the ready-to-file draft.

6. Return to the original task

If the bug is blocking, stop the original task and report that clearly.

If a real workaround exists, continue the task and explicitly record:

Output format

## Compiler bug triage
- Likely bug: yes | no | uncertain
- Stage:
- Blocking status:
- Workaround:
- Repro:
- Existing issue:
- New issue draft or link:
- Next action on original task:

Quality bar

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.