Skip to content

Conversation

fahrigedik
Copy link
Member

@fahrigedik fahrigedik commented Oct 8, 2025

Resolves #23871

AI Configuration Schematic

Overview

The ai-config schematic automatically generates AI tool configuration files for ABP Framework Angular projects. These configurations help AI tools (Claude, Copilot, Cursor, etc.) follow Angular and ABP best practices.


Quick Start

# Single tool
ng g @abp/ng.schematics:ai-config --tool=cursor

# Multiple tools
ng g @abp/ng.schematics:ai-config --tool=claude --tool=copilot --tool=cursor

Supported AI Tools

Tool Configuration File
Claude .claude/CLAUDE.md
GitHub Copilot .github/copilot-instructions.md
Cursor .cursor/rules/cursor.mdc
Google Gemini .gemini/GEMINI.md
Junie AI .junie/guidelines.md
Windsurf .windsurf/rules/guidelines.md

Command Options

--tool (required)

AI tools to generate configuration for.

Values: claude, copilot, cursor, gemini, junie, windsurf

ng g @abp/ng.schematics:ai-config --tool=cursor --tool=claude

--targetProject (optional)

Target project name. Defaults to workspace root.

ng g @abp/ng.schematics:ai-config --tool=cursor --targetProject=my-app

--overwrite (optional)

Overwrite existing files. Default: false

ng g @abp/ng.schematics:ai-config --tool=cursor --overwrite

--dry-run (optional)

Preview changes without creating files.

ng g @abp/ng.schematics:ai-config --tool=cursor --dry-run

Usage Examples

First-Time Setup

ng g @abp/ng.schematics:ai-config --tool=cursor --tool=copilot

Update Existing Configuration

ng g @abp/ng.schematics:ai-config --tool=cursor --overwrite

Team Setup (package.json)

{
  "scripts": {
    "setup:ai": "ng g @abp/ng.schematics:ai-config --tool=claude --tool=copilot --tool=cursor --overwrite"
  }
}

Generated Configuration Includes

All configuration files include guidelines for:

  • ✅ Angular best practices (OnPush, RxJS, lifecycle hooks)
  • ✅ ABP Framework integration (localization, permissions, API proxies)
  • ✅ TypeScript strict mode and proper typing
  • ✅ State management with NGXS
  • ✅ Testing strategies (Jest)
  • ✅ Security and accessibility standards
  • ✅ Performance optimization

Troubleshooting

Configuration Not Recognized

Restart your IDE/editor to load the new configuration.

File Already Exists

Use --overwrite flag to replace existing files:

ng g @abp/ng.schematics:ai-config --tool=cursor --overwrite

Schematic Not Found

Update to the latest version:

npm update @abp/ng.schematics

FAQ

Q: Should I commit these files to Git?
A: Yes! This ensures team consistency and helps new members.

Q: Can I customize the generated files?
A: Yes, but use --overwrite carefully as it will replace customizations.

Q: Does this affect build or runtime?
A: No. These are development-only files not included in the bundle.

Q: Can I use multiple AI tools?
A: Yes! Generate configurations for all tools you use.

Q: How often should I update?
A: After major ABP/Angular updates or when team standards change.


Introduces a new 'ai-config' schematic that generates configuration files for various AI tools (Claude, Copilot, Cursor, Gemini, Junie, Windsurf) to guide code generation and best practices in Angular and ABP Framework projects. Includes schematic implementation, schema, templates for each tool, and updates to collection.json and build scripts.
Replaces individual AI-specific Angular and ABP Framework rules with a single, comprehensive set of full-stack development guidelines. The new rules emphasize modular architecture, strict typing, best practices for both .NET (ABP) and Angular, and ensure consistency, maintainability, and performance across backend and frontend. This change standardizes expectations and coding conventions for all AI assistants in the project.
Copy link
Contributor

@sumeyyeKurtulus sumeyyeKurtulus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @fahrigedik thank you for putting an effort to add such important feature 🙌🏻
We could consider the points I mention below before proceeding the tests:

Screenshot 2025-10-09 at 14 23 06 Screenshot 2025-10-09 at 14 23 36
  • That would be the best if we could make the users select multiple options by using such commands. It works fine if we provide them one by one, however we can enhance the usage to be accepting an array if possible.
Screenshot 2025-10-09 at 14 26 35

Updated the ai-config schematic to accept a comma-separated string for the 'tool' option instead of an array. Adjusted validation, parsing, and schema prompts accordingly for improved CLI usability and flexibility.
Expanded guidelines in multiple AI config instruction files to include details and examples for using ABP Angular's ReplaceableComponentsService. This addition covers key features, usage, important notes, and links to full documentation for customizing and replacing default components, layouts, and UI elements.
Copy link
Contributor

@sumeyyeKurtulus sumeyyeKurtulus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for checking the points and making enhancements along with that. I just can comment on how we accept the tool list parameter.

It works fine once we do not give any space. However, it is better if we trim the spaces while executing the command since the user may specify a space as I did.

Image 17 10 2025 at 13 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research and evaluate Angular AI integration options

2 participants