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