xiaohongshu
xiaohongshu
cljr-feature-dev
Develop features for the Cljr Clojure-to-.NET compiler. Use when adding emitter features, expression types, analyzer support, or testing features. Guides the complete workflow from Expr.cs to C# tests to NRepl verification. Critical for REPL-oriented development.
Full skill instructions
This skill guides you through the complete workflow for adding features to the Cljr compiler, with proper testing in both C# unit tests and NRepl evaluation.
Location: src/Cljr.Compiler/Analyzer/Expr.cs
Add a new record type extending Expr:
/// <summary>
/// Description of what this expression represents
/// </summary>
public record MyFeatureExpr(
string Property1,
Expr Property2
) : Expr;
See expressions.md for all existing expression types.
Location: src/Cljr.Compiler/Analyzer/Analyzer.cs
AnalyzeForm() or AnalyzeSeq() to recognize the new formLocation: src/Cljr.Compiler/Emitter/CSharpEmitter.cs
EmitExpr() switch statementcase MyFeatureExpr e:
EmitMyFeature(e);
break;
Location: tests/Cljr.Compiler.Tests/
Test that the emitter generates correct C# code:
[Fact]
public void MyFeature_EmitsCorrectCSharp()
{
var source = "(my-feature args)";
var result = Compile(source);
Assert.Contains("expected C# output", result);
}
Location: tests/Cljr.Compiler.Tests/ReplNamespaceTests.cs
This is CRITICAL for the REPL-oriented workflow. Test via NreplSession.EvalAsync():
[Fact]
public async Task MyFeature_WorksInRepl()
{
var session = new NreplSession();
var result = await session.EvalAsync("(my-feature args)");
Assert.Null(result.Error);
Assert.Equal(expectedValue, result.Values[0]);
}
See testing-patterns.md for comprehensive test patterns including:
Start the REPL and test interactively:
./nrepl.sh
# or
dotnet run --project src/Cljr.Cli -- nrepl
Then test your feature in the REPL to verify developer experience.
| File | Purpose |
|---|---|
src/Cljr.Compiler/Analyzer/Expr.cs | Expression type definitions |
src/Cljr.Compiler/Analyzer/Analyzer.cs | Parsing and AST construction |
src/Cljr.Compiler/Emitter/CSharpEmitter.cs | C# code generation |
tests/Cljr.Compiler.Tests/ReplNamespaceTests.cs | NRepl evaluation tests |
src/Cljr.Repl/NreplSession.cs | REPL session API |
Every feature MUST have:
NreplSession.EvalAsync()The NRepl eval test is especially important because it ensures the feature works in the interactive REPL-oriented development workflow that Clojure developers expect.
# Run all compiler tests
dotnet test tests/Cljr.Compiler.Tests/
# Run specific test
dotnet test tests/Cljr.Compiler.Tests/ --filter "MyFeature"
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience