compiler-internals

Analyze Kukicha's compiler pipeline from .kuki source to generated Go code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kukichalang/kukicha --skill compiler-internals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compiler-internals
Source: https://github.com/kukichalang/kukicha/tree/main/.claude/skills/compiler-internals
Command: npx skills add https://github.com/kukichalang/kukicha --skill compiler-internals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps developers understand Kukicha's compiler internals to facilitate adding language features, debugging compiler bugs, or modifying internal packages.

Core Features & Use Cases

  • Understand the end-to-end compilation pipeline: lexer, parser, AST, semantic analysis, IR, and codegen, plus the LSP and diagnostics integration.
  • Identify responsibilities and data flow across stages to reason about changes, performance, and correctness.
  • Use it as a reference when extending the compiler or validating internal changes in a production-like environment.

Quick Start

Review the internal/ package documentation and run the compiler tests to validate your changes.

Frequently Asked Questions about compiler-internals

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

FAQPage Schema
How does the Kukicha compiler pipeline work from source code to Go codegen?

The Kukicha compiler pipeline processes .kuki source files sequentially through the lexer, parser, AST, semantic analysis, IR, and codegen stages to generate final Go code. Each stage passes specific data structures to the next.

What is the best way to debug compiler bugs in the semantic analysis or IR stages?

To debug compiler bugs in semantic analysis or IR stages, review the internal/ package documentation to understand module responsibilities and data flow, then run the compiler tests to validate and isolate your internal changes.

Can I extend the Kukicha compiler by adding new language features to the AST?

Yes, you can extend the Kukicha compiler by adding new language features to the AST. Use the component map to identify module responsibilities and reason about how changes across the parser and codegen interact.

What are the known fragility risks when modifying the Kukicha compiler internal packages?

Known fragility risks when modifying Kukicha compiler internal packages involve integration points between the lexer, parser, and codegen. Reviewing the component map helps identify these risks and validate changes against error handling and security checks.

Do I need Go installed to run the Kukicha compiler and generate code?

Yes, you need Go installed because the Kukicha compiler's codegen stage outputs generated Go code. Reviewing the internal package documentation and running compiler tests requires the Go environment to validate modifications.

Why does the Kukicha compiler include LSP and diagnostics integration in its architecture?

The Kukicha compiler includes LSP and diagnostics integration to provide real-time error handling and feedback during development. This architecture helps developers identify issues across the lexer, parser, and semantic analysis stages efficiently.