AI-powered coding assistants for Nu's cross-segment development workflows. This repository contains Cursor rules and commands that automate repetitive tasks, enforce best practices, and accelerate development across Core, PJ, and other data domains.
Install commands or rules to your project using the nu CLI:
# Install commands to a project
nu cross-segment-ai-tools commands install <repo>
nu cross-segment-ai-tools commands install itaipu
nu cross-segment-ai-tools commands install ~/dev/nu/my-project
# Install rules to a project
nu cross-segment-ai-tools rules install <repo>
nu cross-segment-ai-tools rules install itaipu
nu cross-segment-ai-tools rules install ~/dev/nu/my-projectKeep your tools up to date:
# Update all projects that have commands installed
nu cross-segment-ai-tools commands update
# Update a specific project
nu cross-segment-ai-tools commands update ~/dev/nu/itaipu
# Update all projects that have rules installed
nu cross-segment-ai-tools rules update
# Update a specific project
nu cross-segment-ai-tools rules update ~/dev/nu/itaipuRemove tools from a project:
# Remove commands from a project
nu cross-segment-ai-tools commands remove <repo>
nu cross-segment-ai-tools commands remove itaipu
# Remove rules from a project
nu cross-segment-ai-tools rules remove <repo>
nu cross-segment-ai-tools rules remove itaipunu cross-segment-ai-tools commands --help
nu cross-segment-ai-tools rules --help.cursor/
βββ commands/ # AI commands (executable prompts & agents)
βββ core/ # Core-specific commands
β βββ pe-de-pano-v2.md # Purple Loop campaign automation
β βββ clm_doc_creator.md # CLM business rules documentation automation
βββ pj/ # PJ-specific commands
β βββ Papa-LΓ©guas - Campaign Updater - v1.1.md # Ranking strategy synchronizer
βββ cross-segments/ # Cross-segment commands
βββ rapidash.md # Audience Manager attribute generator
βββ edwiges-cockpit-metric-creator.md # Cockpit metric creation assistant
docs/
βββ agents/
βββ clm_doc_creator.md # CLM Doc Creator Agent documentation
Domain: Cross-segment (Core, PJ, High-Income)
Rapidash automates the entire process of creating audience manager attributesβfrom requirements gathering to production-ready code. In ~10 minutes, it can:
- β Generate complete Scala attribute code
- β Detect duplicates with comprehensive validation
- β Suggest attribute generators for parameter variations
- β Handle git workflows automatically
- β Deliver a ready-to-review pull request
How to use:
- Open your Itaipu project in Cursor
- Use the command:
/rapidash - Follow the conversational prompts
Supported domains: core-brazil, high-income, pj-brazil, and more
Documentation: Included in agent file
Domain: Core (PF segment)
PΓ© de Pano automates three Purple Loop-related tasks:
- Campaign Updater β Add campaign vals to product config files
- Templates Updater β Insert templates into product template lists
- Ranking Strategy Updater β Include campaigns in ranking strategy lists
How to use:
- Open your Itaipu project in Cursor
- Use the command:
/pe-de-pano-v2 - Provide campaign/template data as tables
- Review dry-run plan before applying changes
Supported products: Money Boxes, Caixinha Turbo, Insurance, Lending, and 30+ more
Documentation: Included in command file
Domain: Core (PF segment)
CLM Doc Creator Agent automates the creation and maintenance of technical documentation for Customer Lifecycle Management (CLM) business rules in Confluence. It analyzes Scala code files for product eligibility, activity, and conversion logic, then creates human-readable documentation that non-technical stakeholders (PMs, business analysts) can understand.
Key Features:
- π Analyzes Scala code to extract business rules from activity, eligibility, and conversion datasets
- π Queries metadata from Data Discovery to enrich documentation
- π Generates structured documentation in clear, accessible language
- π€ Publishes to Confluence automatically with proper hierarchy and navigation
- π Detects changes and provides intelligent diff comparisons before updating
- π Maintains version history with semantic versioning
How to use:
- Open your Itaipu project in Cursor
- Use the command:
/clm-doc-creator - Specify a product (e.g., "document nucel") or let it detect from context
- Review the generated documentation before publishing
Requirements:
- Atlassian MCP Server (for Confluence integration)
- Data Discovery MCP Server (for dataset metadata)
Documentation: docs/agents/clm_doc_creator_agent.md
Domain: Cross-segment (Experimentation)
Edwiges is an AI assistant that guides developers through creating simple metrics in Cockpit (Nu's experimentation platform) in a friendly, step-by-step manner. It helps create User-level Base Metrics (-users, -volume, -value) and ensures Event Logs and necessary records are created following established patterns.
Key Features:
- π― Guided workflow - Step-by-step interactive process
- π Multiple metric types - Supports users, volume, and value metrics
- ποΈ Event Log creation - Automatically creates Event Logs when needed
- β Validations - Alerts about potential issues before proceeding
- π Dataset validation - Checks dataset sharing and visibility requirements
- π Code generation - Creates production-ready Scala code
- π¨ Formatting - Runs code formatting automatically
- π Multiple metrics - Create multiple metrics in the same session
How to use:
- Open your Itaipu project in Cursor
- Use the command:
/edwiges-cockpit-metric-creator - Follow the interactive prompts step by step
- Review the generated code before committing
Supported metric types:
- Users metrics (
-users) - Customer proportion metrics - Volume metrics (
-volume) - Average frequency metrics - Value metrics (
-value) - Average value metrics
Documentation: Included in command file
Domain: PJ (Pessoa JurΓdica)
Papa-LΓ©guas synchronizes campaign strategies between Scala source files and CSV files. It helps manage Journey Moments, Narratives, and Campaigns across different ranking strategies (Heuristics, Random, and Projota) in a guided and safe manner.
Key Features:
- π Consultar (Read) - Export campaign configurations to CSV files
- β Adicionar (Add) - Add new campaigns to ranking strategies
- π Modificar (Modify) - Update existing campaign configurations
- β Deletar (Delete) - Remove campaigns from ranking strategies
- β Validations - Ensures consistency across all ranking strategies
- π Safe modifications - Preserves code formatting and comments
- π PR creation - Automatically creates pull requests with proper approvals
How to use:
- Open your Itaipu project in Cursor
- Use the command:
/papa-leguas-campaign-updater(or invoke the file directly) - Follow the interactive menu in Portuguese
- Review changes before confirmation
Supported ranking strategies:
- Heuristics - Constant scoring strategy
- Random - Random distribution strategy
- Projota - Model-based ranking strategy
Documentation: Included in command file
| Feature | Commands | Rules |
|---|---|---|
| Purpose | Executable prompts for specific tasks | Context & guidelines for AI behavior |
| Usage | Invoke with /command-name |
Applied automatically or by glob pattern |
| Scope | Task-specific (e.g., create attribute) | Domain-wide (e.g., Scala best practices) |
| Output | Code, PRs, changes | AI behavior modification |
-
Create a new
.mdfile in the appropriate folder:.cursor/commands/core/β Core-specific.cursor/commands/pj/β PJ-specific.cursor/commands/cross-segments/β Cross-segment
-
Include clear step-by-step instructions for the AI
-
Test with a real project before committing
-
Create a new
.mdor.mdcfile in the appropriate folder:.cursor/commands/core/β Core-specific agents.cursor/commands/pj/β PJ-specific agents.cursor/commands/cross-segments/β Cross-segment agents
-
For
.mdcfiles, use frontmatter:
---
description: "Brief description of the agent"
globs: ["**/*.scala", "**/pj/**"]
alwaysApply: false
---
# Agent Name
Your agent rules and guidelines...- Test the rule with real projects
- Cursor IDE with AI features enabled
- Access to Nu's internal repositories
nuCLI installed
- Make your changes to commands/rules
- Install to a test project:
nu cross-segment-ai-tools commands install ~/dev/nu/test-project - Test the AI assistant behavior
- Update if needed
- Keep it focused β Each command/rule should have a clear, single purpose
- Document thoroughly β Include examples and expected behavior
- Test before submitting β Verify with real projects
- Follow conventions β Match existing naming and structure
- Itaipu Repository β Main data domains repository
- Nu CLI Documentation β CLI tooling
This project is part of Nu's internal development ecosystem.