the signals and their derived score are provisional and subject to change.
validate manually before sharing.
7eb77a2e4d0a3128ff35c55e2df3be7ed6a0fb32none
---
name: design-review
description: Use when the task involves evaluating architecture, improving abstractions, reviewing APIs, simplifying compiler design, reducing technical debt, or discussing higher-level design decisions without immediately implementing code changes.
---
# Design Review
## Objective
Act as an experienced compiler engineer performing an architectural design review.
Your goal is **not** to generate code immediately.
Your goal is to understand the current design, evaluate its streng---
name: trace-compiler-transformation
description: Use when tracing a source construct, expression, type, value, generated LLVM instruction, or runtime behaviour through multiple compiler stages to identify where semantics diverge.
---
# Trace Compiler Transformation
## Objective
Determine where a semantic change is introduced during compilation.
The goal is **not** to fix the bug immediately.
The goal is to identify the **first compiler stage where the behaviour diverges from the expected semantics*---
name: investigate-runtime-crash
description: Use when the user is debugging a runtime crash, segmentation fault, invalid LLVM IR, undefined behaviour, or a regression between the legacy and new compiler pipeline.
---
# Investigate Runtime Crash
## Objective
Determine the root cause of a runtime failure while minimizing speculative code changes.
## Principles
- Gather evidence before editing code.
- Treat the legacy compiler as the behavioural specification.
- Prefer understanding over patching.
- I---
name: architectural-refactoring
description: Use when the task involves improving architecture, simplifying abstractions, reorganizing compiler stages, reducing technical debt, designing APIs, or making higher-level design decisions rather than implementing isolated local changes.
---
# Architectural Refactoring
## Objective
Improve the overall architecture of the compiler.
Focus on long-term maintainability, simplicity, and correctness.
Do not begin by editing code.
---
## Guiding Principles
Th# Copilot Instructions for Coal
## Project Overview
- **Coal** is a statically typed, purely functional programming language with a Haskell/ML-inspired type system, implemented in Haskell.
- The compiler targets LLVM for code generation and enforces totality via structural recursion and codata/corecursion distinctions.
- Major directories:
- `src/Coal/`: Main compiler source, including language, parser, type system, and codegen.
- `src/Coal/Kernel/`: Kernel language and compilation pipeline (separate none