plankit-cli 1.0.1 → 1.3.0

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.
Files changed (76) hide show
  1. package/README.md +30 -7
  2. package/bin/plankit.js +1 -0
  3. package/package.json +1 -1
  4. package/src/agents.js +98 -0
  5. package/src/cli.js +180 -62
  6. package/src/commandBundles.js +50 -0
  7. package/src/config.js +31 -5
  8. package/src/templates.js +2 -0
  9. package/templates/angular-commands/codex/angular-clone-pattern.md +23 -0
  10. package/templates/angular-commands/codex/angular-component-from.md +26 -0
  11. package/templates/angular-commands/codex/angular-design-match.md +20 -0
  12. package/templates/angular-commands/codex/angular-extract-component.md +21 -0
  13. package/templates/angular-commands/codex/angular-extract-store.md +19 -0
  14. package/templates/angular-commands/codex/angular-feature.md +24 -0
  15. package/templates/angular-commands/codex/angular-fixtures.md +23 -0
  16. package/templates/angular-commands/codex/angular-form-from-model.md +22 -0
  17. package/templates/angular-commands/codex/angular-generate-tests.md +20 -0
  18. package/templates/angular-commands/codex/angular-modernize.md +20 -0
  19. package/templates/angular-commands/codex/angular-page-from-api.md +23 -0
  20. package/templates/angular-commands/codex/angular-project-discovery.md +39 -0
  21. package/templates/angular-commands/codex/angular-responsive.md +21 -0
  22. package/templates/angular-commands/codex/angular-signalize.md +20 -0
  23. package/templates/angular-commands/codex/angular-split-component.md +21 -0
  24. package/templates/angular-commands/codex/angular-table-from-model.md +22 -0
  25. package/templates/angular-commands/codex/angular-wire-api.md +24 -0
  26. package/templates/angular-commands/cursor/angular-clone-pattern.md +24 -0
  27. package/templates/angular-commands/cursor/angular-component-from.md +27 -0
  28. package/templates/angular-commands/cursor/angular-design-match.md +21 -0
  29. package/templates/angular-commands/cursor/angular-extract-component.md +22 -0
  30. package/templates/angular-commands/cursor/angular-extract-store.md +20 -0
  31. package/templates/angular-commands/cursor/angular-feature.md +25 -0
  32. package/templates/angular-commands/cursor/angular-fixtures.md +24 -0
  33. package/templates/angular-commands/cursor/angular-form-from-model.md +23 -0
  34. package/templates/angular-commands/cursor/angular-generate-tests.md +21 -0
  35. package/templates/angular-commands/cursor/angular-modernize.md +21 -0
  36. package/templates/angular-commands/cursor/angular-page-from-api.md +24 -0
  37. package/templates/angular-commands/cursor/angular-project-discovery.md +39 -0
  38. package/templates/angular-commands/cursor/angular-responsive.md +22 -0
  39. package/templates/angular-commands/cursor/angular-signalize.md +21 -0
  40. package/templates/angular-commands/cursor/angular-split-component.md +22 -0
  41. package/templates/angular-commands/cursor/angular-table-from-model.md +23 -0
  42. package/templates/angular-commands/cursor/angular-wire-api.md +25 -0
  43. package/templates/angular-commands/opencode/angular-clone-pattern.md +21 -0
  44. package/templates/angular-commands/opencode/angular-component-from.md +24 -0
  45. package/templates/angular-commands/opencode/angular-design-match.md +18 -0
  46. package/templates/angular-commands/opencode/angular-extract-component.md +19 -0
  47. package/templates/angular-commands/opencode/angular-extract-store.md +17 -0
  48. package/templates/angular-commands/opencode/angular-feature.md +22 -0
  49. package/templates/angular-commands/opencode/angular-fixtures.md +21 -0
  50. package/templates/angular-commands/opencode/angular-form-from-model.md +20 -0
  51. package/templates/angular-commands/opencode/angular-generate-tests.md +18 -0
  52. package/templates/angular-commands/opencode/angular-modernize.md +18 -0
  53. package/templates/angular-commands/opencode/angular-page-from-api.md +21 -0
  54. package/templates/angular-commands/opencode/angular-project-discovery.md +39 -0
  55. package/templates/angular-commands/opencode/angular-responsive.md +19 -0
  56. package/templates/angular-commands/opencode/angular-signalize.md +18 -0
  57. package/templates/angular-commands/opencode/angular-split-component.md +19 -0
  58. package/templates/angular-commands/opencode/angular-table-from-model.md +20 -0
  59. package/templates/angular-commands/opencode/angular-wire-api.md +22 -0
  60. package/templates/angular-skills/gemini/angular-clone-pattern/SKILL.md +24 -0
  61. package/templates/angular-skills/gemini/angular-component-from/SKILL.md +27 -0
  62. package/templates/angular-skills/gemini/angular-design-match/SKILL.md +21 -0
  63. package/templates/angular-skills/gemini/angular-extract-component/SKILL.md +22 -0
  64. package/templates/angular-skills/gemini/angular-extract-store/SKILL.md +20 -0
  65. package/templates/angular-skills/gemini/angular-feature/SKILL.md +25 -0
  66. package/templates/angular-skills/gemini/angular-fixtures/SKILL.md +24 -0
  67. package/templates/angular-skills/gemini/angular-form-from-model/SKILL.md +23 -0
  68. package/templates/angular-skills/gemini/angular-generate-tests/SKILL.md +21 -0
  69. package/templates/angular-skills/gemini/angular-modernize/SKILL.md +21 -0
  70. package/templates/angular-skills/gemini/angular-page-from-api/SKILL.md +24 -0
  71. package/templates/angular-skills/gemini/angular-project-discovery/SKILL.md +41 -0
  72. package/templates/angular-skills/gemini/angular-responsive/SKILL.md +22 -0
  73. package/templates/angular-skills/gemini/angular-signalize/SKILL.md +21 -0
  74. package/templates/angular-skills/gemini/angular-split-component/SKILL.md +22 -0
  75. package/templates/angular-skills/gemini/angular-table-from-model/SKILL.md +23 -0
  76. package/templates/angular-skills/gemini/angular-wire-api/SKILL.md +25 -0
@@ -0,0 +1,39 @@
1
+ # Angular Project Discovery
2
+ > Discover repository context before any Angular command.
3
+
4
+ # Angular Project Discovery
5
+
6
+ Before any Angular command, discover the repository context:
7
+
8
+ - Angular version
9
+ - Package manager
10
+ - Standalone vs NgModule
11
+ - Signals / RxJS usage
12
+ - State-management libraries
13
+ - Reactive Forms / Signal Forms
14
+ - UI library: Material / PrimeNG / custom
15
+ - Styling: SCSS / CSS / Tailwind / tokens
16
+ - Testing: Vitest / Jest / Karma
17
+ - Existing naming conventions
18
+ - Existing folder architecture
19
+ - Closest comparable implementation
20
+
21
+ Never modernize code merely because the framework supports it — only when it fits the repository.
22
+
23
+ ## Commands
24
+ - component-from : use an existing component as the reference
25
+ - feature : build a whole feature respecting existing architecture
26
+ - clone-pattern : clone any architectural pattern
27
+ - design-match : align a generated component with the design system
28
+ - page-from-api : scaffold a page from a typed API
29
+ - form-from-model: build a form from a domain model
30
+ - table-from-model: build a table with semantic columns
31
+ - wire-api : replace mock data with real API calls
32
+ - signalize : migrate state to Signals where appropriate
33
+ - extract-component: extract a template region into a child component
34
+ - split-component: decompose an oversized component
35
+ - extract-store : move state into a feature store
36
+ - modernize : orchestrate incremental migrations
37
+ - responsive : make a component responsive per project convention
38
+ - generate-tests : write behavior-focused tests
39
+ - fixtures : generate model fixtures
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Make a component responsive following the existing project breakpoints and patterns.
3
+ globs: **/*.ts, **/*.html, **/*.scss
4
+ ---
5
+
6
+ # angular-responsive
7
+
8
+ # /responsive
9
+
10
+ Responsive is not just media queries.
11
+
12
+ ## Workflow
13
+ 1. Discover project breakpoints, container widths, grid, mobile nav, table->card behavior, spacing/typography changes, dialog behavior.
14
+ 2. Analyze the target and transform fixed layouts (width: 900px; grid 400px 400px) per project conventions.
15
+ 3. Test important states: long translated text, empty, loading, validation errors, many actions, large values, small phone, tablet.
16
+
17
+ ## Options
18
+ - --mobile | --tablet | --all
19
+ - --like <page> follow a reference responsive page
20
+ - --visual (future) iterate on rendered screenshots
21
+
22
+ Follow this workflow whenever asked to responsive a component/feature in this Angular repository.
@@ -0,0 +1,21 @@
1
+ ---
2
+ description: Refactor Angular component state to Signals where appropriate, deriving instead of synchronizing.
3
+ globs: **/*.ts, **/*.html, **/*.scss
4
+ ---
5
+
6
+ # angular-signalize
7
+
8
+ # /signalize
9
+
10
+ Judiciously migrate toward Angular Signals.
11
+
12
+ ## Workflow
13
+ 1. Classify members: plain value, signal state, computed state, input signal, output, observable stream, resource, form state.
14
+ 2. Transform only what benefits: @Input -> input(), @Output -> output(), derived props -> computed(), async -> toSignal(), manual sync -> computed().
15
+ 3. Principle: derive instead of synchronize (replace set() effects with computed()).
16
+ 4. Keep RxJS where it is genuinely the right tool: websockets, router events, debouncing, retry, complex async orchestration.
17
+
18
+ ## Options
19
+ - --inputs | --outputs | --state | --queries | --all
20
+
21
+ Follow this workflow whenever asked to signalize a component/feature in this Angular repository.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Decompose an oversized component into focused components, controlling coupling and API surface.
3
+ globs: **/*.ts, **/*.html, **/*.scss
4
+ ---
5
+
6
+ # angular-split-component
7
+
8
+ # /split-component
9
+
10
+ Refactor a large component (e.g. 1100+ lines) into focused parts.
11
+
12
+ ## Workflow
13
+ 1. Determine why it is large: many UI sections, too much state, business logic, data orchestration, forms.
14
+ 2. Choose a decomposition plan (presentational children + orchestrating container; extract a store if state is the issue).
15
+ 3. Aim for: cohesion HIGH, coupling LOW, API SMALL, testability IMPROVED.
16
+ 4. Avoid turning one large component into 14 tiny ones with 18 inputs / 11 outputs / 6 services.
17
+
18
+ ## Options
19
+ - --plan show decomposition plan only
20
+ - --apply execute the plan
21
+
22
+ Follow this workflow whenever asked to split-component a component/feature in this Angular repository.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Generate an Angular data table from a model or API with semantic column selection and formatting.
3
+ globs: **/*.ts, **/*.html, **/*.scss
4
+ ---
5
+
6
+ # angular-table-from-model
7
+
8
+ # /table-from-model
9
+
10
+ Produce a table that shows the right columns with correct formatting.
11
+
12
+ ## Workflow
13
+ 1. Select columns semantically: show identity, primary data, status, total, created; drop raw FKs/internal fields unless project patterns say otherwise.
14
+ 2. Detect formatting: status -> badge, total -> currency, createdAt -> date.
15
+ 3. Infer capabilities from the API: paged -> pagination, sort param -> sortable, filter object -> filters, search -> search.
16
+
17
+ ## Options
18
+ - --actions <view,edit,delete>
19
+ - --selectable | --filters | --pagination | --virtual
20
+ - --responsive follow project table->card transformation
21
+ - --like <table> reference table
22
+
23
+ Follow this workflow whenever asked to table-from-model a component/feature in this Angular repository.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Replace static UI data with real API calls, choosing the dominant data-access pattern.
3
+ globs: **/*.ts, **/*.html, **/*.scss
4
+ ---
5
+
6
+ # angular-wire-api
7
+
8
+ # /wire-api
9
+
10
+ Wire a component to real data using the repository's dominant approach.
11
+
12
+ ## Workflow
13
+ 1. Derive UI requirements (collection, search, pagination, delete, refresh).
14
+ 2. Map service APIs onto those needs.
15
+ 3. Inspect existing patterns first: async pipe, toSignal, resource, feature store, NgRx, SignalStore, custom store.
16
+ 4. Choose the DOMINANT project pattern.
17
+ 5. Handle all states: initial, loading, loaded, empty, error, refreshing, mutation pending, mutation error.
18
+
19
+ ## Guardrail
20
+ Do not wire unsupported actions. If the UI has Edit but the API has no update, report unresolved functionality instead of wiring.
21
+
22
+ ## Options
23
+ - --preserve-mocks keep mocks for Storybook/dev-mode
24
+
25
+ Follow this workflow whenever asked to wire-api a component/feature in this Angular repository.
@@ -0,0 +1,21 @@
1
+ ---
2
+ description: Clone the pattern of an existing feature/page/dialog/store/form/table/service or route config to a new target.
3
+ ---
4
+
5
+ # /clone-pattern
6
+
7
+ Core primitive: clone an architectural pattern to a new target.
8
+
9
+ ## Workflow
10
+ 1. Build a PATTERN MODEL (type, architecture, state style, API style, routing, styling, testing).
11
+ 2. Apply: PATTERN + TARGET DOMAIN = IMPLEMENTATION.
12
+
13
+ ## Categories
14
+ - COPY: folder structure, naming conventions
15
+ - ADAPT: model, inputs, routes
16
+ - IGNORE: business logic, temporary workarounds, hardcoded styling
17
+
18
+ ## Guardrail
19
+ Identify and refuse to propagate suspicious patterns (e.g. manual subscriptions without teardown) when the dominant repository pattern differs. Never build /clone-tech-debt.
20
+
21
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Generate a new Angular component using an existing component as the architectural and stylistic reference.
3
+ ---
4
+
5
+ # /component-from
6
+
7
+ Generate a new component by learning from an existing one instead of blind clone-and-rename.
8
+
9
+ ## Workflow
10
+ 1. Analyze the source component and classify what is reusable vs business-specific.
11
+ 2. Identify: component structure, file layout, input/output style, inject() convention, tokens, shared components, testing style.
12
+ 3. Understand the target domain (optionally from --model).
13
+ 4. Generate the new component using the reusable pattern.
14
+
15
+ ## Guardrail
16
+ Never literal clone-and-rename (Product->User). Extract the pattern, understand the target domain, then generate.
17
+
18
+ ## Options
19
+ - --model <Type> inspect the model to derive appropriate inputs
20
+ - --no-tests skip generating a spec
21
+ - --interactive ask before writing
22
+ - --dry-run show files to create only
23
+
24
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Match the design language of a generated component to a reference and its surrounding UI.
3
+ ---
4
+
5
+ # /design-match
6
+
7
+ Align a target with a reference design system.
8
+
9
+ ## Workflow
10
+ 1. Discover design vocabulary from reference + neighbors (surfaces, spacing, typography, buttons, icons, states, breakpoints).
11
+ 2. Compare semantic regions, not raw DOM.
12
+ 3. Transform using priority: shared component -> design token -> existing utility -> existing SCSS pattern -> new style.
13
+
14
+ ## Options
15
+ - --scope <layout|styles|states|all>
16
+ - --auto-reference search for the closest visually/functionally similar component
17
+
18
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: Extract a template region into a child component, deriving the smallest sensible API.
3
+ ---
4
+
5
+ # /extract-component
6
+
7
+ Extract a child component with a clean boundary.
8
+
9
+ ## Workflow
10
+ 1. Analyze all reads/writes/uses inside the template region.
11
+ 2. Derive the smallest sensible input/output API.
12
+ 3. Prioritize strong boundaries (independent concept, repeated UI, clear I/O) over weak ones (5 lines, tight coupling, 14 inputs).
13
+ 4. If extraction makes architecture worse, reject it and recommend an alternative (e.g. a directive/field-group).
14
+
15
+ ## Options
16
+ - --selection extract a user-specified selection
17
+ - --auto detect candidate boundaries with confidence scores
18
+
19
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Extract server/user state from a component into a feature-scoped store.
3
+ ---
4
+
5
+ # /extract-store
6
+
7
+ Move state and state transitions into a store without turning it into a dumping ground.
8
+
9
+ ## Workflow
10
+ 1. Detect existing state and classify: SERVER STATE, USER STATE, DERIVED, EPHEMERAL UI.
11
+ 2. Keep ephemeral UI (e.g. dialogOpen) local; move server/user/derived state into the store.
12
+ 3. Determine provider scope from the app (component / route / feature / root) — do not default everything to root.
13
+
14
+ ## Safeguard
15
+ Keep presentation and DOM logic out of the store. Store = state + transitions + relevant orchestration only.
16
+
17
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Build an entire Angular feature while respecting the application existing architecture.
3
+ ---
4
+
5
+ # /feature
6
+
7
+ High-level feature builder that composes lower-level commands.
8
+
9
+ ## Workflow
10
+ 1. Turn the request into capabilities (pages, data, state, UI, routes).
11
+ 2. Discover the closest existing feature (e.g. --like customers).
12
+ 3. Map capabilities onto existing repository patterns.
13
+ 4. Compose: clone-pattern -> component-from -> wire-api -> form-from-model -> generate-tests.
14
+
15
+ ## Safeguard
16
+ Do not invent infrastructure. If existing features do not use stores/repositories/facades, do not introduce them here.
17
+
18
+ ## Options
19
+ - --like <feature> pattern reference
20
+ - --plan output only the plan (files, patterns, dependencies, routes, tests) without writing
21
+
22
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,21 @@
1
+ ---
2
+ description: Generate reusable fixtures from TypeScript domain models with override support.
3
+ ---
4
+
5
+ # /fixtures
6
+
7
+ Create test/dev fixtures from existing models.
8
+
9
+ ## Workflow
10
+ 1. Given a model (e.g. Order), generate a factory: createOrder(overrides = {}) with sensible defaults and nested factories.
11
+ 2. Compose states where valuable.
12
+
13
+ ## Options
14
+ - --count <n> generate an array of n fixtures
15
+ - --states generate named states (pendingOrder, completedOrder, cancelledOrder, emptyOrder, largeOrder)
16
+ - --edge-cases generate edge cases (longName, missingOptionalFields, unicodeName, inactiveUser)
17
+
18
+ ## Integration
19
+ Feeds /component-from, /table-from-model, /generate-tests.
20
+
21
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Generate an Angular form from a TypeScript model, inferring field types, controls, and validation.
3
+ ---
4
+
5
+ # /form-from-model
6
+
7
+ Build forms from domain models with semantic inference.
8
+
9
+ ## Workflow
10
+ 1. Understand field semantics (email -> email input, roleId -> select, active -> toggle, birthDate -> date).
11
+ 2. Reuse existing project form components (app-field, app-input, app-select, app-toggle).
12
+ 3. Discover validation from existing DTOs/sibling forms/schemas; separate KNOWN from INFERRED validation — never hallucinate constraints.
13
+ 4. Respect Reactive Forms vs Signal Forms based on project version.
14
+ 5. Generate a mapping layer (toCreateDto / toFormModel) instead of coupling DTOs to the UI.
15
+
16
+ ## Options
17
+ - --create | --edit | --dialog | --stepper
18
+ - --like <form> reference form
19
+
20
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Generate behavior-focused tests, deriving behaviors and filling gaps only.
3
+ ---
4
+
5
+ # /generate-tests
6
+
7
+ Test behavior, not implementation details.
8
+
9
+ ## Workflow
10
+ 1. Derive behaviors for the target (form init, validation, derived values, submit blocking, request emission, error display, disabled states).
11
+ 2. Find existing coverage and generate only missing tests.
12
+ 3. Use given/when/then behavior, not expect(component).toBeTruthy().
13
+
14
+ ## Options
15
+ - --diff generate tests around changed behaviors only
16
+ - target types: component | service | store | route (--navigation)
17
+
18
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Orchestrate incremental Angular migrations, building/testing between each stage.
3
+ ---
4
+
5
+ # /modernize
6
+
7
+ Treat this as a migration orchestrator, not an LLM rewrite.
8
+
9
+ ## Workflow
10
+ 1. Determine the Angular version and applicable migrations (standalone, built-in control flow, inject(), signal inputs, output(), signal queries).
11
+ 2. Make transformations individually selectable and apply them one at a time.
12
+ 3. Categorize: SAFE AUTOMATED (*ngIf->@if), SAFE WITH VERIFICATION (constructor DI->inject()), ARCHITECTURAL (local state->Signals), NOT RECOMMENDED (working RxJS->Signals).
13
+ 4. Build/test between every stage.
14
+
15
+ ## Options
16
+ - --control-flow | --inject | --standalone | --signal-inputs | --recommended
17
+
18
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,21 @@
1
+ ---
2
+ description: Generate an Angular page from a typed API method, deriving UI requirements from the API contract.
3
+ ---
4
+
5
+ # /page-from-api
6
+
7
+ Scaffold a page that matches the API capabilities.
8
+
9
+ ## Workflow
10
+ 1. Inspect the API method signature and return type (e.g. PagedResult<Order>).
11
+ 2. Derive likely UI requirements: list, loading, empty, error, pagination; filters/sorting only if the API supports them.
12
+ 3. Find the closest existing page pattern and reuse it.
13
+
14
+ ## Critical rule
15
+ Never invent unsupported API functionality. If the API has no sort parameter, do not generate server-side sorting. If no delete endpoint, no Delete button.
16
+
17
+ ## Options
18
+ - --like <page> reference pattern
19
+ - --crud scaffold full CRUD (list/details/create/edit/delete) from a typed service
20
+
21
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,39 @@
1
+ # Angular Project Discovery
2
+ > Discover repository context before any Angular command.
3
+
4
+ # Angular Project Discovery
5
+
6
+ Before any Angular command, discover the repository context:
7
+
8
+ - Angular version
9
+ - Package manager
10
+ - Standalone vs NgModule
11
+ - Signals / RxJS usage
12
+ - State-management libraries
13
+ - Reactive Forms / Signal Forms
14
+ - UI library: Material / PrimeNG / custom
15
+ - Styling: SCSS / CSS / Tailwind / tokens
16
+ - Testing: Vitest / Jest / Karma
17
+ - Existing naming conventions
18
+ - Existing folder architecture
19
+ - Closest comparable implementation
20
+
21
+ Never modernize code merely because the framework supports it — only when it fits the repository.
22
+
23
+ ## Commands
24
+ - component-from : use an existing component as the reference
25
+ - feature : build a whole feature respecting existing architecture
26
+ - clone-pattern : clone any architectural pattern
27
+ - design-match : align a generated component with the design system
28
+ - page-from-api : scaffold a page from a typed API
29
+ - form-from-model: build a form from a domain model
30
+ - table-from-model: build a table with semantic columns
31
+ - wire-api : replace mock data with real API calls
32
+ - signalize : migrate state to Signals where appropriate
33
+ - extract-component: extract a template region into a child component
34
+ - split-component: decompose an oversized component
35
+ - extract-store : move state into a feature store
36
+ - modernize : orchestrate incremental migrations
37
+ - responsive : make a component responsive per project convention
38
+ - generate-tests : write behavior-focused tests
39
+ - fixtures : generate model fixtures
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: Make a component responsive following the existing project breakpoints and patterns.
3
+ ---
4
+
5
+ # /responsive
6
+
7
+ Responsive is not just media queries.
8
+
9
+ ## Workflow
10
+ 1. Discover project breakpoints, container widths, grid, mobile nav, table->card behavior, spacing/typography changes, dialog behavior.
11
+ 2. Analyze the target and transform fixed layouts (width: 900px; grid 400px 400px) per project conventions.
12
+ 3. Test important states: long translated text, empty, loading, validation errors, many actions, large values, small phone, tablet.
13
+
14
+ ## Options
15
+ - --mobile | --tablet | --all
16
+ - --like <page> follow a reference responsive page
17
+ - --visual (future) iterate on rendered screenshots
18
+
19
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Refactor Angular component state to Signals where appropriate, deriving instead of synchronizing.
3
+ ---
4
+
5
+ # /signalize
6
+
7
+ Judiciously migrate toward Angular Signals.
8
+
9
+ ## Workflow
10
+ 1. Classify members: plain value, signal state, computed state, input signal, output, observable stream, resource, form state.
11
+ 2. Transform only what benefits: @Input -> input(), @Output -> output(), derived props -> computed(), async -> toSignal(), manual sync -> computed().
12
+ 3. Principle: derive instead of synchronize (replace set() effects with computed()).
13
+ 4. Keep RxJS where it is genuinely the right tool: websockets, router events, debouncing, retry, complex async orchestration.
14
+
15
+ ## Options
16
+ - --inputs | --outputs | --state | --queries | --all
17
+
18
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: Decompose an oversized component into focused components, controlling coupling and API surface.
3
+ ---
4
+
5
+ # /split-component
6
+
7
+ Refactor a large component (e.g. 1100+ lines) into focused parts.
8
+
9
+ ## Workflow
10
+ 1. Determine why it is large: many UI sections, too much state, business logic, data orchestration, forms.
11
+ 2. Choose a decomposition plan (presentational children + orchestrating container; extract a store if state is the issue).
12
+ 3. Aim for: cohesion HIGH, coupling LOW, API SMALL, testability IMPROVED.
13
+ 4. Avoid turning one large component into 14 tiny ones with 18 inputs / 11 outputs / 6 services.
14
+
15
+ ## Options
16
+ - --plan show decomposition plan only
17
+ - --apply execute the plan
18
+
19
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Generate an Angular data table from a model or API with semantic column selection and formatting.
3
+ ---
4
+
5
+ # /table-from-model
6
+
7
+ Produce a table that shows the right columns with correct formatting.
8
+
9
+ ## Workflow
10
+ 1. Select columns semantically: show identity, primary data, status, total, created; drop raw FKs/internal fields unless project patterns say otherwise.
11
+ 2. Detect formatting: status -> badge, total -> currency, createdAt -> date.
12
+ 3. Infer capabilities from the API: paged -> pagination, sort param -> sortable, filter object -> filters, search -> search.
13
+
14
+ ## Options
15
+ - --actions <view,edit,delete>
16
+ - --selectable | --filters | --pagination | --virtual
17
+ - --responsive follow project table->card transformation
18
+ - --like <table> reference table
19
+
20
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Replace static UI data with real API calls, choosing the dominant data-access pattern.
3
+ ---
4
+
5
+ # /wire-api
6
+
7
+ Wire a component to real data using the repository's dominant approach.
8
+
9
+ ## Workflow
10
+ 1. Derive UI requirements (collection, search, pagination, delete, refresh).
11
+ 2. Map service APIs onto those needs.
12
+ 3. Inspect existing patterns first: async pipe, toSignal, resource, feature store, NgRx, SignalStore, custom store.
13
+ 4. Choose the DOMINANT project pattern.
14
+ 5. Handle all states: initial, loading, loaded, empty, error, refreshing, mutation pending, mutation error.
15
+
16
+ ## Guardrail
17
+ Do not wire unsupported actions. If the UI has Edit but the API has no update, report unresolved functionality instead of wiring.
18
+
19
+ ## Options
20
+ - --preserve-mocks keep mocks for Storybook/dev-mode
21
+
22
+ Run against an Angular repository. Perform PROJECT DISCOVERY first, then apply the workflow. Use placeholders like @component or $ARG where the agent accepts a target.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: angular-clone-pattern
3
+ description: Clone the pattern of an existing feature/page/dialog/store/form/table/service or route config to a new target.
4
+ ---
5
+
6
+ # /clone-pattern
7
+
8
+ Core primitive: clone an architectural pattern to a new target.
9
+
10
+ ## Workflow
11
+ 1. Build a PATTERN MODEL (type, architecture, state style, API style, routing, styling, testing).
12
+ 2. Apply: PATTERN + TARGET DOMAIN = IMPLEMENTATION.
13
+
14
+ ## Categories
15
+ - COPY: folder structure, naming conventions
16
+ - ADAPT: model, inputs, routes
17
+ - IGNORE: business logic, temporary workarounds, hardcoded styling
18
+
19
+ ## Guardrail
20
+ Identify and refuse to propagate suspicious patterns (e.g. manual subscriptions without teardown) when the dominant repository pattern differs. Never build /clone-tech-debt.
21
+
22
+ # angular-clone-pattern
23
+
24
+ Project Discovery must run first. Execute the workflow with the target arguments from the request.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: angular-component-from
3
+ description: Generate a new Angular component using an existing component as the architectural and stylistic reference.
4
+ ---
5
+
6
+ # /component-from
7
+
8
+ Generate a new component by learning from an existing one instead of blind clone-and-rename.
9
+
10
+ ## Workflow
11
+ 1. Analyze the source component and classify what is reusable vs business-specific.
12
+ 2. Identify: component structure, file layout, input/output style, inject() convention, tokens, shared components, testing style.
13
+ 3. Understand the target domain (optionally from --model).
14
+ 4. Generate the new component using the reusable pattern.
15
+
16
+ ## Guardrail
17
+ Never literal clone-and-rename (Product->User). Extract the pattern, understand the target domain, then generate.
18
+
19
+ ## Options
20
+ - --model <Type> inspect the model to derive appropriate inputs
21
+ - --no-tests skip generating a spec
22
+ - --interactive ask before writing
23
+ - --dry-run show files to create only
24
+
25
+ # angular-component-from
26
+
27
+ Project Discovery must run first. Execute the workflow with the target arguments from the request.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: angular-design-match
3
+ description: Match the design language of a generated component to a reference and its surrounding UI.
4
+ ---
5
+
6
+ # /design-match
7
+
8
+ Align a target with a reference design system.
9
+
10
+ ## Workflow
11
+ 1. Discover design vocabulary from reference + neighbors (surfaces, spacing, typography, buttons, icons, states, breakpoints).
12
+ 2. Compare semantic regions, not raw DOM.
13
+ 3. Transform using priority: shared component -> design token -> existing utility -> existing SCSS pattern -> new style.
14
+
15
+ ## Options
16
+ - --scope <layout|styles|states|all>
17
+ - --auto-reference search for the closest visually/functionally similar component
18
+
19
+ # angular-design-match
20
+
21
+ Project Discovery must run first. Execute the workflow with the target arguments from the request.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: angular-extract-component
3
+ description: Extract a template region into a child component, deriving the smallest sensible API.
4
+ ---
5
+
6
+ # /extract-component
7
+
8
+ Extract a child component with a clean boundary.
9
+
10
+ ## Workflow
11
+ 1. Analyze all reads/writes/uses inside the template region.
12
+ 2. Derive the smallest sensible input/output API.
13
+ 3. Prioritize strong boundaries (independent concept, repeated UI, clear I/O) over weak ones (5 lines, tight coupling, 14 inputs).
14
+ 4. If extraction makes architecture worse, reject it and recommend an alternative (e.g. a directive/field-group).
15
+
16
+ ## Options
17
+ - --selection extract a user-specified selection
18
+ - --auto detect candidate boundaries with confidence scores
19
+
20
+ # angular-extract-component
21
+
22
+ Project Discovery must run first. Execute the workflow with the target arguments from the request.