Skip to content

Latest commit

 

History

History
106 lines (83 loc) · 5.35 KB

File metadata and controls

106 lines (83 loc) · 5.35 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

This repository contains ABP Framework-specific development assistance tools for both Claude Code and Cursor.ai. It includes specialized AI assistants and rules designed to enhance productivity when working with ABP Framework projects.

Dual Environment Support

  • Claude Code: Specialized assistants in .claude/agents/ directory
  • Cursor.ai: Traditional .mdc rule files in organized directories

Architecture

Directory Structure

Claude Code Assistants (.claude/agents/)

  • abp-ddd-general.md - General ABP and Domain-Driven Design assistant
  • abp-domain-layer.md - Domain layer development specialist
  • abp-application-layer.md - Application services, DTOs, and mapping specialist
  • abp-authorization.md - Security and permissions specialist
  • abp-mvc-razor.md - MVC Razor Pages and UI specialist
  • abp-blazor-server.md - Blazor Server components, real-time features, and modern UI specialist
  • abp-angular.md - Angular frontend development with TypeScript, reactive patterns, and ABP integration specialist

Cursor.ai Rules (Legacy)

  • abp-ddd-rules/ - Core Domain-Driven Design rules for ABP projects
  • abp-fundamentals/ - Core ABP framework feature rules
  • abp-infrastructure/ - Infrastructure layer specific rules
  • abp-userinterface-mvc-razor/ - MVC Razor Pages UI layer rules
  • abp-userinterface-blazor-server/ - Blazor Server component and real-time feature rules
  • abp-userinterface-angular/ - Angular frontend development, routing, and state management rules

Specialized Assistant Format

Claude Code assistants are Markdown files with YAML frontmatter that define:

  • Name: Assistant identifier
  • Description: Purpose and specialization
  • Tools: Available tool permissions (usually "*" for full access)
  • Content: Detailed expertise, patterns, examples, and guidance

Assistant Capabilities

Each assistant provides:

  • Domain Expertise: Deep knowledge of specific ABP areas
  • Code Patterns: Examples of correct and incorrect implementations
  • Architecture Guidance: Layer separation and dependency management
  • Best Practices: ABP-specific conventions and optimizations

Key Architectural Principles

ABP Framework Patterns

  • Layered Architecture: Domain, Application, Infrastructure, and UI layers with clear boundaries
  • DDD Integration: Rich domain models inheriting from ABP base classes (AggregateRoot, FullAuditedAggregateRoot)
  • Entity Framework: Uses ABP's repository patterns and EF Core integration
  • Authorization: Leverages ABP's permission system and identity framework
  • Multi-tenancy: Built-in support for tenant isolation and management

Rule Categories

  1. Domain Layer: Entity modeling, business logic encapsulation, aggregate boundaries
  2. Application Layer: DTO design, service patterns, validation, authorization
  3. Infrastructure: Repository implementation, EF Core configuration, external service integration
  4. UI Layer: MVC/Razor patterns, Blazor Server components, Angular frontend, client-side integration, theme system
  5. Frontend Development: Angular components, services, routing, authentication, and state management
  6. Real-time Features: SignalR integration, live updates, real-time communication
  7. Testing: Unit tests, integration tests, ABP test framework usage

Development Workflow

For Claude Code Development

  1. Assistant Enhancement: Modify existing assistants in .claude/agents/ directory
  2. New Assistants: Create new specialized assistants for specific ABP areas
  3. Testing: Validate assistants by using them in actual ABP projects
  4. Documentation: Update patterns and examples based on real-world usage

For Cursor.ai Development

  1. Rule Development: Create or modify .mdc files in appropriate directories
  2. Installation: Copy rules to ~/.cursor/rules/ directory for Cursor IDE
  3. Testing: Validate rules by using them in actual ABP projects

No Build Commands Required

This repository contains guidance and rules rather than executable code, so there are no build, test, or compilation commands needed.

File Management

Claude Code Assistants

When working with assistants in .claude/agents/:

  • Use Markdown format with YAML frontmatter
  • Include comprehensive code examples (both valid and invalid)
  • Provide detailed rationale for patterns and anti-patterns
  • Maintain consistent structure across all assistants
  • Focus on practical, actionable guidance

Cursor.ai Rules (Legacy)

When working with .mdc files:

  • Preserve the existing directory structure and naming conventions
  • Maintain the .mdc file format with proper YAML frontmatter
  • Include both valid and invalid examples in rule documentation
  • Follow the established pattern of providing rationale for each rule
  • Ensure rules target specific file globs (e.g., **/Domain/**/*.cs for domain rules)

Important Notes

  • This is an experimental project with rules primarily focused on MVC Razor Pages
  • Rules are created using AI and documentation research but haven't been fully tested in major ABP projects
  • The repository serves as a community starting point for ABP-specific development assistance
  • Contributors are welcome to expand coverage for other UI platforms and enhance existing rules