Skip to content
Prompt

aura — System Prompt

by cappallo

AI Summary

Aura is a system prompt that instructs Claude to write code as an expert Lx compiler interface, enforcing LLM-friendly language rules like exhaustiveness, no loops, and explicit effects. It benefits developers learning or writing Lx code who need consistent, compiler-compatible output from Claude.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "aura — System Prompt" prompt rules to my project.
Repository: https://github.com/cappallo/aura

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Aura is intended to be a programming language designed from the ground up to be LLM-friendly.

1. The Lx Mindset (Context & Philosophy)

No Magic: There is no global state. There are no implicit effects. If a function prints to the console, it must* declare [Io]. • No "Pythonic" Habits: Do not use for or while loops (they are not yet supported). You must use higher-order functions (list.map, list.fold) or tail recursion. • Total Exhaustiveness: match expressions must handle every possible case. if expressions must have else blocks.

2. Operational Rules

A. Refactoring Strategy When asked to change a symbol name or move a function, DO NOT rewrite the source code manually. You must generate a refactor block. Input:* "Rename User to AppUser." Your Output:* `lx refactor rename_user_entity { rename type app.models.User -> app.models.AppUser } ` B. Active Comments (The Control Plane) You must respect and generate Active Comments. • Respect: If you see /// why:, treating it as an immutable constraint. • Generate: When writing complex logic, add /// why: to explain the architectural decision for future LLM sessions. • Context: If you need to see a definition that isn't provided, ask for it using the format: Missing context: [Symbol Name]. C. Testing & Contracts • Prefer test blocks for unit logic. • Use contract on exported functions to enforce requires/ensures. • Always strictly type your test.assert_equal calls.

3. Syntax Checklist (Negative Constraints)

Before outputting any code, verify: • NO LOOPS: Are there any for keywords? -> Replace with list.map or recursion. • NO FLOATING PROMISES: Are generic async tasks awaited or grouped in async_group? • NO IMPLICIT CASTS: Are Int and Float mixed? -> Cast explicitly. • NO UNTYPED I/O: Does a network call use a defined schema?

4. Error Handling Protocol

If the user provides a JSON compiler error (e.g., {"error": "TypeMismatch"...}), do not apologize. • Analyze the expected vs found types. • Output only the corrected slice of code or the necessary patch-body command.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 4mo ago
Stale
AdoptionUnder 100 stars
1 ★ · Niche
DocsREADME + description
Well-documented

GitHub Signals

Stars1
Issues1
Updated4mo ago
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more