Skip to content

chore(ai): configure angular agent skills#1800

Draft
chintankavathia wants to merge 1 commit intomainfrom
ai/add/angular/skills
Draft

chore(ai): configure angular agent skills#1800
chintankavathia wants to merge 1 commit intomainfrom
ai/add/angular/skills

Conversation

@chintankavathia
Copy link
Copy Markdown
Member

@chintankavathia chintankavathia commented Apr 2, 2026

Agent Skills are specialized, domain-specific instructions and capabilities designed for AI agents.

Read more about angular skills here https://angular.dev/ai/agent-skills


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

Agent Skills are specialized, domain-specific instructions and capabilities designed for AI agents.

Read more about angular skills here https://angular.dev/ai/agent-skills
@chintankavathia
Copy link
Copy Markdown
Member Author

@siemens/siemens-element-members Angular is now shipping agent skills https://angular.dev/ai/agent-skills. Shall we add them? Any opinion

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive set of Angular developer guidelines and reference documentation designed for AI agents, covering topics from core components to advanced reactivity and testing. The review feedback focuses on correcting technical inaccuracies, such as the false claim that the @angular/animations package is deprecated and errors in the Signal Forms API examples. Additionally, the feedback addresses grammatical errors, typos, and adherence to Siemens UX writing guidelines regarding capitalization and list formatting.

If no guidelines are provided by the user, here are same default rules to follow when creating a new Angular project:

1. Use the latest stable version of Angular unless the user specifies otherwise.
2. Use Signals Forms for form management in new projects (available in Angular v21 and newer) [Find out more](references/signal-forms.md).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

According to the Siemens UX writing guidelines (Capitalization, rule 81), only the first letter of the first word in titles and list items should be capitalized. "Signals Forms" should be "Signal forms".

Suggested change
2. Use Signals Forms for form management in new projects (available in Angular v21 and newer) [Find out more](references/signal-forms.md).
2. Use Signal forms for form management in new projects (available in Angular v21 and newer) (references/signal-forms.md).
References
  1. Capitalize only the first letter of the first word in titles, tooltips, menu items, list items, and buttons (link)

In most cases for new apps, **prefer signal forms**. When making a forms decision, analyze the project and consider the following guidelines:

- if the application is using v21 or newer and this is a new form, **prefer signal forms**.
-For older applications or when working with existing forms, use the appropriate form type that matches the applications current form strategy.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a missing space after the hyphen in the list item.

Suggested change
-For older applications or when working with existing forms, use the appropriate form type that matches the applications current form strategy.
- For older applications or when working with existing forms, use the appropriate form type that matches the applications current form strategy.

# Angular Animations

When animating elements in Angular, **first analyze the project's Angular version** in `package.json`.
For modern applications (**Angular v20.2 and above**), prefer using native CSS with `animate.enter` and `animate.leave`. For older applications, you may need to use the deprecated `@angular/animations` package.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The @angular/animations package is not deprecated. While native CSS animations are recommended for simple enter/leave transitions in modern Angular versions, the package remains the standard for complex animation sequences and is fully supported.

- **View**: The DOM rendered by the component's template inside the host element.
- **Standalone**: By default, components are standalone (since Angular 19, `standalone: true` is default). For older versions, `standalone: true` must be explicit or the component must be part of an `NgModule`.
- **Component Tree**: Angular applications are structured as a tree of components, where each component can host child components.
- **Component Naming**: Do not add suffixes the `Component` suffix for Component classes (e.g., AppComponent) unless the project has been configured to use that naming configuration.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a grammatical error in this sentence: "Do not add suffixes the Component suffix". It should be "Do not add the Component suffix".

Suggested change
- **Component Naming**: Do not add suffixes the `Component` suffix for Component classes (e.g., AppComponent) unless the project has been configured to use that naming configuration.
- Component Naming: Do not add the Component suffix for Component classes (e.g., AppComponent) unless the project has been configured to use that naming configuration.

const isReadonly = this.userForm().readonly();
```

IMPORTANT!: Make sure to call the field to get it state.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Typo: "get it state" should be "get its state".

Suggested change
IMPORTANT!: Make sure to call the field to get it state.
IMPORTANT!: Make sure to call the field to get its state.

form().reset()

// The only exception is length:
form.children.length
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The FormField proxy in Signal Forms does not have a children property. To access the length of an array field, use form.field.length directly.

Suggested change
form.children.length
form.length // NOTE: no parenthesis!

Comment on lines +472 to +505
form(
data,
(path) => {
applyWhen(
name,
({value}) => value() !== 'admin',
(namePath) => {
validate(namePath.last /* ... */);
disable(namePath.last /* ... */);
},
);
},
{injector: TestBed.inject(Injector)},
);
```

`applyWhen` passes the path mapped to the first argument.
If you need parent field, just pass it to `applyWhen`:

```ts
form(
data,
(path) => {
applyWhen(
cat,
({value}) => value().name !== 'admin',
(catPath) => {
require(cat.catPath /* ... */);
},
);
},
{injector: TestBed.inject(Injector)},
);
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The "Conditional Validation" section contains several errors:

  1. name and cat are used but not defined in the callback scope (should be path.name and path.cat).
  2. require should be required.
  3. disable should be disabled.
  4. TestBed.inject(Injector) is for unit tests and should not be part of a general application code guideline.
Suggested change
form(
data,
(path) => {
applyWhen(
name,
({value}) => value() !== 'admin',
(namePath) => {
validate(namePath.last /* ... */);
disable(namePath.last /* ... */);
},
);
},
{injector: TestBed.inject(Injector)},
);
```
`applyWhen` passes the path mapped to the first argument.
If you need parent field, just pass it to `applyWhen`:
```ts
form(
data,
(path) => {
applyWhen(
cat,
({value}) => value().name !== 'admin',
(catPath) => {
require(cat.catPath /* ... */);
},
);
},
{injector: TestBed.inject(Injector)},
);
```
form(
data,
(path) => {
applyWhen(
path.name,
({value}) => value() !== 'admin',
(namePath) => {
validate(namePath.last /* ... */);
disabled(namePath.last /* ... */);
},
);
}
);
References
  1. In README documentation, code examples do not need to be fully complete or runnable; a minimal example demonstrating basic usage is sufficient.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant