agent-directives 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -388,7 +388,7 @@
388
388
  "type": "rule",
389
389
  "path": "rules/angular/coding-style.md",
390
390
  "description": "Concrete Angular coding-style patterns — signals, dependency injection with inject(), change detection, RxJS usage, and TypeScript strictness for Angular code.",
391
- "version": "1.0.0",
391
+ "version": "1.1.0",
392
392
  "required": false,
393
393
  "category": "angular",
394
394
  "tools": [
@@ -407,7 +407,7 @@
407
407
  "type": "rule",
408
408
  "path": "rules/angular/components-and-templates.md",
409
409
  "description": "Concrete patterns for building modern Angular components, signal-based inputs/outputs, OnPush change detection, and v17+ control-flow templates.",
410
- "version": "1.1.0",
410
+ "version": "1.2.0",
411
411
  "required": false,
412
412
  "category": "angular",
413
413
  "tools": [
@@ -428,7 +428,7 @@
428
428
  "type": "rule",
429
429
  "path": "rules/angular/patterns.md",
430
430
  "description": "Concrete Angular application patterns — smart/dumb component split, service-layer ownership, routing/guards/resolvers, HTTP interceptors, and reactive state with signals or RxJS.",
431
- "version": "1.0.0",
431
+ "version": "1.1.0",
432
432
  "required": false,
433
433
  "category": "angular",
434
434
  "tools": [
@@ -453,7 +453,7 @@
453
453
  "type": "rule",
454
454
  "path": "rules/angular/project-structure.md",
455
455
  "description": "Concrete Angular workspace, file-naming, feature-folder, and provider-bootstrapping standards for agents working in Angular applications.",
456
- "version": "1.1.0",
456
+ "version": "1.2.0",
457
457
  "required": false,
458
458
  "category": "angular",
459
459
  "tools": [
@@ -475,7 +475,7 @@
475
475
  "type": "rule",
476
476
  "path": "rules/angular/security.md",
477
477
  "description": "Concrete Angular security rules — XSS prevention, HttpClient discipline, secret handling, route guards, and SSR safety.",
478
- "version": "1.0.0",
478
+ "version": "1.1.0",
479
479
  "required": false,
480
480
  "category": "angular",
481
481
  "tools": [
@@ -501,7 +501,7 @@
501
501
  "type": "rule",
502
502
  "path": "rules/angular/testing.md",
503
503
  "description": "Concrete Angular testing patterns — TestBed configuration, signal-input harnesses, router and HTTP testing utilities, and behavior-first test design.",
504
- "version": "1.1.0",
504
+ "version": "1.2.0",
505
505
  "required": false,
506
506
  "category": "angular",
507
507
  "tools": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-directives",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Reusable agent directives, skills, and CLI tooling for AI coding workflows",
5
5
  "license": "MIT",
6
6
  "author": "Rob Simpson <rsimpson2@me.com>",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: angular-coding-style
3
3
  description: Concrete Angular coding-style patterns — signals, dependency injection with inject(), change detection, RxJS usage, and TypeScript strictness for Angular code.
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  required: false
6
6
  category: angular
7
7
  tools:
@@ -15,6 +15,7 @@ source_urls:
15
15
  - https://angular.dev/guide/di
16
16
  - https://angular.dev/guide/components/dependency-injection
17
17
  - https://rxjs.dev/guide/operators
18
+ - https://github.com/angular/angular/tree/main/skills/dev-skills/angular-developer/references
18
19
  applies_to:
19
20
  - src/app/**/*.ts
20
21
  - src/**/*.ts
@@ -147,6 +148,17 @@ search$ = this.query$.pipe(
147
148
  - Imports ordered: Angular core/common, third-party, project absolute (`@/...`), project relative (`./...`). Match the project's existing convention if it differs.
148
149
  - Member order inside a class: signal fields → injected dependencies → inputs/outputs → other state → constructor (if any) → lifecycle hooks → public methods → private methods. Adjust to project style if it has a stronger local convention.
149
150
 
151
+ ## Deep-Dive Reference Materials
152
+
153
+ Coding agents should fetch the raw text of these references programmatically when writing or modifying reactivity, dependency injection, and general code style:
154
+
155
+ - **Signals Overview:** Core signal concepts (`signal`, `computed`), reactive contexts, `untracked`, and async boundaries. Read [signals-overview.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/signals-overview.md)
156
+ - **Dependent State (`linkedSignal`):** Creating writable state linked to source signals. Read [linked-signal.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/linked-signal.md)
157
+ - **Async Reactivity (`resource`):** Fetching asynchronous data directly into signal state. Read [resource.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/resource.md)
158
+ - **Side Effects (`effect`):** Syncing signals to imperative APIs, cleanup, and `afterRenderEffect`. Read [effects.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/effects.md)
159
+ - **DI Fundamentals:** Dependency injection overview, services, and the `inject()` function. Read [di-fundamentals.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/di-fundamentals.md)
160
+ - **Injection Context:** Allowed execution contexts for `inject()` and `runInInjectionContext`. Read [injection-context.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/injection-context.md)
161
+
150
162
  ## Anti-patterns to refuse
151
163
 
152
164
  - Constructor-injected dependencies on a project that has already adopted `inject()`.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: angular-components-and-templates
3
3
  description: Concrete patterns for building modern Angular components, signal-based inputs/outputs, OnPush change detection, and v17+ control-flow templates.
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  required: false
6
6
  category: angular
7
7
  tools:
@@ -16,6 +16,7 @@ source_urls:
16
16
  - https://angular.dev/guide/signals
17
17
  - https://angular.dev/guide/components/inputs
18
18
  - https://angular.dev/guide/components/outputs
19
+ - https://github.com/angular/angular/tree/main/skills/dev-skills/angular-developer/references
19
20
  applies_to:
20
21
  - src/app/**/*.component.ts
21
22
  - src/app/**/*.component.html
@@ -121,6 +122,17 @@ Use the built-in block syntax. Always provide `track` in `@for`.
121
122
  - Signals and the `async` pipe drive change detection on `OnPush` components automatically. Do not reach for `ChangeDetectorRef.markForCheck()` or `detectChanges()` unless you have a documented, narrow reason.
122
123
  - Do not mutate input objects in place when `OnPush` is in effect — produce new references.
123
124
 
125
+ ## Deep-Dive Reference Materials
126
+
127
+ Coding agents should fetch the raw text of these references programmatically when editing related UI and components:
128
+
129
+ - **Component Fundamentals:** Standalone anatomy, template control flow (`@if`, `@for`). Read [components.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/components.md)
130
+ - **Inputs:** Signal-based inputs, transforms, and model inputs. Read [inputs.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/inputs.md)
131
+ - **Outputs:** Signal-based outputs and custom event best practices. Read [outputs.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/outputs.md)
132
+ - **Host Elements:** Host bindings and attribute injection. Read [host-elements.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/host-elements.md)
133
+ - **Component Styling:** Reusable component styles and encapsulation. Read [component-styling.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/component-styling.md)
134
+ - **Tailwind CSS:** Integrating and styling components with Tailwind. Read [tailwind-css.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/tailwind-css.md)
135
+
124
136
  ## Anti-patterns to refuse
125
137
 
126
138
  - `@Component({ standalone: false })` on new components without an NgModule that already owns it.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: angular-patterns
3
3
  description: Concrete Angular application patterns — smart/dumb component split, service-layer ownership, routing/guards/resolvers, HTTP interceptors, and reactive state with signals or RxJS.
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  required: false
6
6
  category: angular
7
7
  tools:
@@ -15,6 +15,7 @@ source_urls:
15
15
  - https://angular.dev/guide/http
16
16
  - https://angular.dev/guide/di
17
17
  - https://angular.dev/guide/signals
18
+ - https://github.com/angular/angular/tree/main/skills/dev-skills/angular-developer/references
18
19
  applies_to:
19
20
  - src/app/**/*.component.ts
20
21
  - src/app/**/*.component.html
@@ -272,6 +273,18 @@ Under SSR, never touch `window`, `document`, `localStorage`, or `navigator` dire
272
273
  [aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
273
274
  ```
274
275
 
276
+ ## Deep-Dive Reference Materials
277
+
278
+ Coding agents should fetch the raw text of these references programmatically when writing or modifying general architectural patterns, forms, routing, or HTTP mechanics:
279
+
280
+ - **Form Management:** Signal-based forms (v21+), template-driven, and reactive forms. Read [signal-forms.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/signal-forms.md), [template-driven-forms.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/template-driven-forms.md), and [reactive-forms.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/reactive-forms.md)
281
+ - **Route Definitions:** URL paths, static vs dynamic segments, wildcards, and redirects. Read [define-routes.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/define-routes.md)
282
+ - **Route Loading & Outlets:** Lazy loading strategies and named `<router-outlet>` routing. Read [loading-strategies.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/loading-strategies.md) and [show-routes-with-outlets.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/show-routes-with-outlets.md)
283
+ - **Navigation & Access Control:** Declarative or programmatic routing, and route security with guards. Read [navigate-to-routes.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/navigate-to-routes.md) and [route-guards.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/route-guards.md)
284
+ - **Pre-fetching & Lifecycle:** Route resolvers (`ResolveFn`) and navigation lifecycle stages. Read [data-resolvers.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/data-resolvers.md) and [router-lifecycle.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/router-lifecycle.md)
285
+ - **Rendering Strategies:** SSR with hydration, SSG (prerendering), and CSR. Read [rendering-strategies.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/rendering-strategies.md)
286
+ - **Transition Animations:** Customizing View Transitions API routes. Read [route-animations.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/route-animations.md)
287
+
275
288
  ## Anti-patterns to refuse
276
289
 
277
290
  - `HttpClient` injected into a presentational component.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: angular-project-structure
3
3
  description: Concrete Angular workspace, file-naming, feature-folder, and provider-bootstrapping standards for agents working in Angular applications.
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  required: false
6
6
  category: angular
7
7
  tools:
@@ -14,6 +14,7 @@ source_urls:
14
14
  - https://angular.dev/tools/cli
15
15
  - https://angular.dev/reference/configs/workspace-config
16
16
  - https://angular.dev/guide/ngmodules/standalone
17
+ - https://github.com/angular/angular/tree/main/skills/dev-skills/angular-developer/references
17
18
  applies_to:
18
19
  - angular.json
19
20
  - package.json
@@ -126,6 +127,17 @@ export const routes: Routes = [
126
127
  - Do not add React, Vue, or other-framework conventions to an Angular project. If shared code must straddle frameworks, isolate it behind a framework-neutral library.
127
128
  - Match the project's existing module system (ESM vs CommonJS) and import style. Use path aliases from `tsconfig.json` where the project already defines them.
128
129
 
130
+ ## Deep-Dive Reference Materials
131
+
132
+ Coding agents should fetch the raw text of these references programmatically when planning workspace boundaries, scaffolding, dependency injection structures, or upgrades:
133
+
134
+ - **CLI Scaffolding:** CLI command syntax and scaffolding options. Read [cli.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/cli.md)
135
+ - **Creating Services:** Generating services, the `providedIn: 'root'` option, and injection guidelines. Read [creating-services.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/creating-services.md)
136
+ - **Defining Providers:** Token definition patterns (`InjectionToken`, `useValue`, `useFactory`). Read [defining-providers.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/defining-providers.md)
137
+ - **Hierarchical Injectors:** Understanding injector layers (`EnvironmentInjector`, `ElementInjector`), resolution rules, and `viewProviders`. Read [hierarchical-injectors.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/hierarchical-injectors.md)
138
+ - **Migrations & Upgrades:** Modernizing older code bases via automated migrations. Read [migrations.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/migrations.md)
139
+ - **Angular MCP Server:** Supported features and configuration of the Model Context Protocol language tools. Read [mcp.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/mcp.md)
140
+
129
141
  ## Anti-patterns to refuse
130
142
 
131
143
  - A single `shared/` directory accumulating unrelated services, pipes, components, and constants.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: angular-security
3
3
  description: Concrete Angular security rules — XSS prevention, HttpClient discipline, secret handling, route guards, and SSR safety.
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  required: false
6
6
  category: angular
7
7
  tools:
@@ -14,6 +14,7 @@ source_urls:
14
14
  - https://angular.dev/api/platform-browser/DomSanitizer
15
15
  - https://angular.dev/guide/http/security
16
16
  - https://angular.dev/guide/ssr
17
+ - https://github.com/angular/angular/tree/main/skills/dev-skills/angular-developer/references
17
18
  applies_to:
18
19
  - src/app/**/*.component.ts
19
20
  - src/app/**/*.component.html
@@ -136,6 +137,12 @@ Configure CSP headers server-side. Specifically:
136
137
  - Treat `npm audit` / `pnpm audit` / `yarn audit` findings as real signals. Resolve high-severity issues before shipping touched code paths.
137
138
  - Do not pin to versions with known active CVEs as a workaround for a feature change.
138
139
 
140
+ ## Deep-Dive Reference Materials
141
+
142
+ Coding agents should fetch the raw text of these references programmatically when verifying accessibility standards and headless component configurations:
143
+
144
+ - **Angular Aria Components:** Building headless, accessible components (Accordion, Listbox, Combobox, Menu, Tabs, Toolbar, Tree, Grid) and styling ARIA attributes. Read [angular-aria.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/angular-aria.md)
145
+
139
146
  ## Anti-patterns to refuse
140
147
 
141
148
  - `bypassSecurityTrust*` on a value derived in any way from user input.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: angular-testing
3
3
  description: Concrete Angular testing patterns — TestBed configuration, signal-input harnesses, router and HTTP testing utilities, and behavior-first test design.
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  required: false
6
6
  category: angular
7
7
  tools:
@@ -15,6 +15,7 @@ source_urls:
15
15
  - https://angular.dev/guide/testing/services
16
16
  - https://angular.dev/guide/testing/http
17
17
  - https://material.angular.io/cdk/test-harnesses/overview
18
+ - https://github.com/angular/angular/tree/main/skills/dev-skills/angular-developer/references
18
19
  applies_to:
19
20
  - src/app/**/*.spec.ts
20
21
  - src/app/**/*.test.ts
@@ -199,6 +200,15 @@ describe('UserService', () => {
199
200
  - Avoid brittle template snapshots unless the project already uses them and the assertion is intentionally structural.
200
201
  - Do not migrate the project's test runner, assertion library, or harness choices as part of a feature change.
201
202
 
203
+ ## Deep-Dive Reference Materials
204
+
205
+ Coding agents should fetch the raw text of these references programmatically when writing or modifying tests:
206
+
207
+ - **Testing Fundamentals:** Best practices for unit testing, async patterns, and `TestBed`. Read [testing-fundamentals.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/testing-fundamentals.md)
208
+ - **Component Harnesses:** CDK component harnesses for robust, layout-insulated test assertions. Read [component-harnesses.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/component-harnesses.md)
209
+ - **Router Testing:** Testing navigation scenarios via `RouterTestingHarness`. Read [router-testing.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/router-testing.md)
210
+ - **End-to-End Testing:** Cypress-based browser/integration test structures. Read [e2e-testing.md](https://raw.githubusercontent.com/angular/angular/main/skills/dev-skills/angular-developer/references/e2e-testing.md)
211
+
202
212
  ## Anti-patterns to refuse
203
213
 
204
214
  - Setting signal inputs by assignment (`component.user = ...`) instead of `componentRef.setInput()`.