This document captures the current working agreement for Skunk development.
Skunk language behavior should be derived from these sources:
src/syntax/grammar.pestandsrc/syntax/parser.rsfor syntax- Semantic and native compiler tests in
src/analysis/check.rsandsrc/backend/tests.rsfor executable behavior README.mdfor language-facing examples and intent- Focused design notes in
docs/for agreed future language directions such as pointers and allocators
If these disagree:
- Grammar and tests win over prose
- README should be updated to match implemented behavior
- New language decisions should add or update tests
- The user is the language designer
- The implementation agent owns development, refactoring, testing, and architecture decisions
The preferred input format for new features is:
- syntax
- semantics
- 1-2 valid example programs
- expected invalid cases or errors
We are keeping this repository and evolving it in place rather than restarting from scratch.
Why:
- The repo already has a parser, AST, type checker, and LLVM compiler/runtime path
- The language is still evolving, so preserving iteration speed is more valuable than a clean-slate rewrite
- Existing tests provide a growing language contract
Aggressive refactoring is allowed when it improves the long-term language implementation.
Skunk should move toward a clearer compiler pipeline over time:
- Parse source into syntax-level AST
- Perform semantic analysis and type checking
- Lower into a simpler typed IR
- Lower to LLVM IR and link a native executable with the runtime
- Keep tests covering syntax, typing, and runtime behavior at each layer
The native compiler and runtime are the authoritative execution model.
- Separate language front-end concerns from runtime concerns
- Reduce coupling between parsing, type checking, evaluation, and codegen
- Continue expanding LLVM support feature by feature
- Prefer adding targeted tests before or alongside new language features
- Keep unsupported compiler features failing clearly rather than silently degrading behavior