This repository contains AI coding rules and patterns for PJ and Core development workflows. The CLI features have been moved to the nucli project.
.cursor/
└── rules/ # AI coding rules and patterns
├── clojure/ # Clojure language rules
│ ├── datomic/ # Datomic database rules
│ ├── diplomat_architecture/ # Diplomat Architecture patterns
│ └── testing/ # Testing guidelines
├── scala/ # Scala language rules
├── pj/ # PJ-specific rules and patterns
├── core/ # Core-specific rules and patterns
└── agents/ # AI agent definitions (MD files)
The rules in this repository are managed by the pj-core-dev-tools CLI, which is now part of the nucli project.
# The CLI is now in nucli - install from there
cd ~/dev/nu/nucli/nucli.d/pj-core-dev-tools.d
./scripts/install
# Then use it to install rules to your projects
pj-core-dev-tools rules install ~/dev/my-project- Core Language: Idiomatic Clojure development patterns, data structures, and functional programming
- Diplomat Architecture: Complete architectural patterns for layered service design
- Datomic: Database interaction patterns and best practices
- Error Handling: Robust error handling and validation patterns
- Testing: Comprehensive testing strategies and patterns
- State Management: Concurrent state management patterns
- Performance: Java interop and performance optimization
- Dataset Patterns: Function-oriented dataset generation following data engineering best practices
- Unit Testing: Comprehensive unit testing patterns
- PJ Rules: Business logic patterns specific to PJ (Pessoa Jurídica) domain
- Core Rules: Core banking patterns and best practices
- AI Agents: Individual AI agent definitions for specific use cases
All rules are organized by:
- Language (clojure, scala)
- Domain (PJ, Core, architect patterns, testing)
- Specificity (core language features vs specialized frameworks)
AI agents are defined as individual .mdc files in the .cursor/rules/agents/ directory. Each agent file should:
- Follow the
.mdcformat with frontmatter metadata - Include clear description of the agent's purpose
- Define scope using
globspatterns - Specify if always applied using
alwaysApply: true/false
---
description: "Agent description and purpose"
globs: ["**/*.clj", "**/pj/**"]
alwaysApply: false
---
# Agent Name
Agent-specific rules and guidelines...Place new AI agent files in:
.cursor/rules/agents/- For general-purpose agents.cursor/rules/pj/agents/- For PJ-specific agents.cursor/rules/core/agents/- For Core-specific agents
- Create new
.mdcfiles in the appropriate category folder - Follow the existing naming conventions and structure
- Include comprehensive documentation and examples
- Test with the pj-core-dev-tools CLI (from nucli)
Rules use .mdc (Markdown with Cursor extensions) format optimized for AI coding assistants:
- Clear, actionable patterns
- Comprehensive examples
- Business context and reasoning
- Anti-patterns to avoid
- Testing strategies
- Rules should be specific and actionable
- Include business context and reasoning
- Provide positive and negative examples
- Follow existing naming conventions
- Test rules with real projects before submitting
This project is part of the Nu PJ and Core development ecosystem. See repository license for details.
Note: The CLI features for managing these rules have been moved to the nucli project for centralized tooling management. This repository now focuses exclusively on the AI coding rules and patterns.