plankit-cli 1.2.0 → 1.3.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.
Files changed (72) hide show
  1. package/README.md +181 -30
  2. package/package.json +1 -1
  3. package/src/cli.js +20 -4
  4. package/src/commandBundles.js +2 -3
  5. package/templates/angular-commands/codex/angular-clone-pattern.md +23 -0
  6. package/templates/angular-commands/codex/angular-component-from.md +26 -0
  7. package/templates/angular-commands/codex/angular-design-match.md +20 -0
  8. package/templates/angular-commands/codex/angular-extract-component.md +21 -0
  9. package/templates/angular-commands/codex/angular-extract-store.md +19 -0
  10. package/templates/angular-commands/codex/angular-feature.md +24 -0
  11. package/templates/angular-commands/codex/angular-fixtures.md +23 -0
  12. package/templates/angular-commands/codex/angular-form-from-model.md +22 -0
  13. package/templates/angular-commands/codex/angular-generate-tests.md +20 -0
  14. package/templates/angular-commands/codex/angular-modernize.md +20 -0
  15. package/templates/angular-commands/codex/angular-page-from-api.md +23 -0
  16. package/templates/angular-commands/codex/angular-project-discovery.md +39 -0
  17. package/templates/angular-commands/codex/angular-responsive.md +21 -0
  18. package/templates/angular-commands/codex/angular-signalize.md +20 -0
  19. package/templates/angular-commands/codex/angular-split-component.md +21 -0
  20. package/templates/angular-commands/codex/angular-table-from-model.md +22 -0
  21. package/templates/angular-commands/codex/angular-wire-api.md +24 -0
  22. package/templates/angular-commands/cursor/angular-clone-pattern.md +24 -0
  23. package/templates/angular-commands/cursor/angular-component-from.md +27 -0
  24. package/templates/angular-commands/cursor/angular-design-match.md +21 -0
  25. package/templates/angular-commands/cursor/angular-extract-component.md +22 -0
  26. package/templates/angular-commands/cursor/angular-extract-store.md +20 -0
  27. package/templates/angular-commands/cursor/angular-feature.md +25 -0
  28. package/templates/angular-commands/cursor/angular-fixtures.md +24 -0
  29. package/templates/angular-commands/cursor/angular-form-from-model.md +23 -0
  30. package/templates/angular-commands/cursor/angular-generate-tests.md +21 -0
  31. package/templates/angular-commands/cursor/angular-modernize.md +21 -0
  32. package/templates/angular-commands/cursor/angular-page-from-api.md +24 -0
  33. package/templates/angular-commands/cursor/angular-project-discovery.md +39 -0
  34. package/templates/angular-commands/cursor/angular-responsive.md +22 -0
  35. package/templates/angular-commands/cursor/angular-signalize.md +21 -0
  36. package/templates/angular-commands/cursor/angular-split-component.md +22 -0
  37. package/templates/angular-commands/cursor/angular-table-from-model.md +23 -0
  38. package/templates/angular-commands/cursor/angular-wire-api.md +25 -0
  39. package/templates/angular-commands/opencode/angular-clone-pattern.md +21 -0
  40. package/templates/angular-commands/opencode/angular-component-from.md +24 -0
  41. package/templates/angular-commands/opencode/angular-design-match.md +18 -0
  42. package/templates/angular-commands/opencode/angular-extract-component.md +19 -0
  43. package/templates/angular-commands/opencode/angular-extract-store.md +17 -0
  44. package/templates/angular-commands/opencode/angular-feature.md +22 -0
  45. package/templates/angular-commands/opencode/angular-fixtures.md +21 -0
  46. package/templates/angular-commands/opencode/angular-form-from-model.md +20 -0
  47. package/templates/angular-commands/opencode/angular-generate-tests.md +18 -0
  48. package/templates/angular-commands/opencode/angular-modernize.md +18 -0
  49. package/templates/angular-commands/opencode/angular-page-from-api.md +21 -0
  50. package/templates/angular-commands/opencode/angular-project-discovery.md +39 -0
  51. package/templates/angular-commands/opencode/angular-responsive.md +19 -0
  52. package/templates/angular-commands/opencode/angular-signalize.md +18 -0
  53. package/templates/angular-commands/opencode/angular-split-component.md +19 -0
  54. package/templates/angular-commands/opencode/angular-table-from-model.md +20 -0
  55. package/templates/angular-commands/opencode/angular-wire-api.md +22 -0
  56. package/templates/angular-skills/gemini/angular-clone-pattern/SKILL.md +24 -0
  57. package/templates/angular-skills/gemini/angular-component-from/SKILL.md +27 -0
  58. package/templates/angular-skills/gemini/angular-design-match/SKILL.md +21 -0
  59. package/templates/angular-skills/gemini/angular-extract-component/SKILL.md +22 -0
  60. package/templates/angular-skills/gemini/angular-extract-store/SKILL.md +20 -0
  61. package/templates/angular-skills/gemini/angular-feature/SKILL.md +25 -0
  62. package/templates/angular-skills/gemini/angular-fixtures/SKILL.md +24 -0
  63. package/templates/angular-skills/gemini/angular-form-from-model/SKILL.md +23 -0
  64. package/templates/angular-skills/gemini/angular-generate-tests/SKILL.md +21 -0
  65. package/templates/angular-skills/gemini/angular-modernize/SKILL.md +21 -0
  66. package/templates/angular-skills/gemini/angular-page-from-api/SKILL.md +24 -0
  67. package/templates/angular-skills/gemini/angular-project-discovery/SKILL.md +41 -0
  68. package/templates/angular-skills/gemini/angular-responsive/SKILL.md +22 -0
  69. package/templates/angular-skills/gemini/angular-signalize/SKILL.md +21 -0
  70. package/templates/angular-skills/gemini/angular-split-component/SKILL.md +22 -0
  71. package/templates/angular-skills/gemini/angular-table-from-model/SKILL.md +23 -0
  72. package/templates/angular-skills/gemini/angular-wire-api/SKILL.md +25 -0
package/README.md CHANGED
@@ -1,17 +1,26 @@
1
- # `plankit` — AI Coding Agent Workflow Command Suite
1
+ # PlanKit CLI — AI Coding Agent Workflow Command Suite
2
2
 
3
- PlanKit is a lightweight, zero-dependency CLI that installs and manages a multi-phase feature workflow for AI coding assistants.
3
+ PlanKit is a lightweight, **zero-dependency** CLI (Node ≥ 18) that installs and manages a multi-phase feature workflow for AI coding assistants (OpenCode, Gemini/Antigravity, Codex, Cursor). It creates a predictable artifact structure, installs the **selected agent's** command/skill bindings, generates phase specs and output reports, and archive records — and ships with a per-agent Angular command library so your AI agent can run deterministic, repository-aware Angular workflows.
4
4
 
5
- It creates a predictable artifact structure, agent instruction files, phase specs, phase output reports, and archive records.
5
+ ```
6
+ plankit init → installs ONE agent's folders/commands + artifact scaffold
7
+ plankit plan → creates artifacts/current/<feature>/ workspace
8
+ plankit implement → executes a phase against spec + prior outputs
9
+ plankit review → verifies, validates Definition of Done, archives
10
+ ```
6
11
 
7
- ## Quick start
12
+ ---
13
+
14
+ ## Install
15
+
16
+ Use it without installing (latest published version):
8
17
 
9
18
  ```bash
10
19
  npx plankit-cli init
11
20
  npx plankit-cli plan my-feature "Add configurable templates"
12
21
  ```
13
22
 
14
- If installed globally:
23
+ Or install globally once:
15
24
 
16
25
  ```bash
17
26
  npm install -g plankit-cli
@@ -19,6 +28,32 @@ plankit init
19
28
  plankit plan my-feature
20
29
  ```
21
30
 
31
+ > **Check your version** — if behavior ever looks "old", run `plankit --version` first (see [Troubleshooting](#troubleshooting)).
32
+
33
+ ---
34
+
35
+ ## Quick start
36
+
37
+ ```bash
38
+ # 1. Initialize the workspace for your agent (you'll be prompted which one)
39
+ plankit init
40
+
41
+ # 2. Plan a feature (non-interactive agent selection, no prompt)
42
+ plankit init --agent opencode
43
+
44
+ # 3. Create a feature workspace under artifacts/current/<feature>/
45
+ plankit plan my-feature "Add configurable templates"
46
+
47
+ # 4. Prepare Phase 1, execute, then move to Phase 2...
48
+ plankit implement my-feature 1
49
+ plankit implement my-feature 2
50
+
51
+ # 5. Review, verify, and archive when done
52
+ plankit review my-feature
53
+ ```
54
+
55
+ ---
56
+
22
57
  ## Commands
23
58
 
24
59
  | Command | Action |
@@ -26,10 +61,41 @@ plankit plan my-feature
26
61
  | `plankit init [--agent <name>]` | Create PlanKit config, artifact folders, spec, and the **selected agent's** folders/commands. Prompts for the agent when none is specified. |
27
62
  | `plankit plan <feature> [requirements]` | Create `artifacts/current/<feature>/` with README, phase specs, outputs folder, and state metadata. |
28
63
  | `plankit clarify <feature> [phase]` | Create a clarification artifact for requirements and design decisions. |
29
- | `plankit implement <feature> <phase>` | Validate phase context and prepare `outputs/phase-N-output.md`. |
30
- | `plankit review <feature>` | Run verification commands, mark the README archived, and move the feature to `artifacts/archived/`. |
64
+ | `plankit implement <feature> <phase>` | Validate phase context (spec + prior outputs) and prepare `outputs/phase-N-output.md`. |
65
+ | `plankit review <feature>` | Run verification commands, mark README archived, and move the feature to `artifacts/archived/`. |
31
66
  | `plankit status [--json]` | List active and archived features. |
32
67
  | `plankit archive <feature>` | Move a feature to archived without running verification. |
68
+ | `plankit version` / `--version` / `-v` | Print the installed version (`plankit-cli vX.Y.Z`). |
69
+ | `plankit help` / `--help` / `-h` | Show usage. |
70
+
71
+ ---
72
+
73
+ ## Global options
74
+
75
+ | Option | Description |
76
+ |---|---|
77
+ | `--force` | Overwrite generated files where safe. |
78
+ | `--dry-run` | Show intended actions without writing anything. |
79
+ | `--agent <name>` | Select your coding agent during `init` (`opencode`, `gemini`, `codex`, `cursor`; default `opencode`). |
80
+
81
+ ### Plan options
82
+
83
+ | Option | Description |
84
+ |---|---|
85
+ | `--phases 3` | Generate N default phases. |
86
+ | `--phases "Design,Build,Test"` | Generate named phases. |
87
+ | `--requirements "text"` | Set feature requirements. |
88
+
89
+ ### Review options
90
+
91
+ | Option | Description |
92
+ |---|---|
93
+ | `--test-command "cmd"` | Override the review test command. |
94
+ | `--build-command "cmd"` | Override the review build command. |
95
+ | `--skip-test` | Skip the review test command. |
96
+ | `--skip-build` | Skip the review build command. |
97
+
98
+ ---
33
99
 
34
100
  ## Customization
35
101
 
@@ -58,45 +124,80 @@ plankit plan my-feature
58
124
  }
59
125
  ```
60
126
 
61
- Useful options:
127
+ | Config key | Type | Default | Purpose |
128
+ |---|---|---|---|
129
+ | `artifactsDir` | `string` | `"artifacts"` | Root folder for `current/` and `archived/` workspaces. |
130
+ | `overwrite` | `string` | `"skip"` | `"skip"` or `"force"` for regenerated files. |
131
+ | `agents.default` | `string` | `"opencode"` | The agent whose folders/commands `init` installs. |
132
+ | `defaultPhases` | `array` | 3 phases | Phases used when `--phases` isn't given. |
133
+ | `verification` | `object` | `npm test` / `npm run build` | Commands run by `plankit review`. |
134
+ | `templatesDir` | `string \| null` | `null` | Custom template overrides directory. |
62
135
 
63
- ```bash
64
- plankit init --agent opencode
65
- plankit init --agent gemini --global-gemini-skills
66
- plankit init --force
67
- plankit plan my-feature --phases 4
68
- plankit plan my-feature --phases "Design,Build,Test"
69
- plankit review my-feature --test-command "pnpm test" --build-command "pnpm build"
70
- plankit review my-feature --skip-build
71
- plankit status --json
72
- ```
136
+ ---
73
137
 
74
- ### Agent selection
138
+ ## Agent selection
75
139
 
76
140
  `plankit init` installs **only** the folders/commands for the agent you select. Supported agents:
77
141
 
78
- | Agent | What is copied |
142
+ | Agent | What gets installed |
79
143
  |---|---|
80
- | `opencode` (default) | `AGENTS.md`-style slash commands under `.opencode/commands/` |
81
- | `gemini` / `antigravity` | `.gemini/instructions.md` (plus `--global-gemini-skills` under your profile) |
82
- | `codex` | `AGENTS.md` |
83
- | `cursor` | `.cursorrules` |
144
+ | `opencode` (default) | Slash commands under `.opencode/commands/` (`plankit-*.md` + `angular-*.md`). |
145
+ | `gemini` / `antigravity` | `.gemini/instructions.md` + `angular-*` skills. `--global-gemini-skills` also installs skills under `~/.gemini/skills/`. |
146
+ | `codex` | `AGENTS.md` + Angular commands under `.codex/`. |
147
+ | `cursor` | `.cursorrules` + Angular command rules under `.cursor/rules/`. |
148
+
149
+ Selection order during `init`:
84
150
 
85
- Selection order:
86
151
  1. `--agent <name>` flag (non-interactive / CI).
87
152
  2. A previously configured `agents.default` in `plankit.config.json`.
88
153
  3. An interactive numbered menu (when run in a terminal).
89
- 4. The `opencode` default — announced explicitly so the behavior is never silent.
154
+ 4. The `opencode` default — **announced explicitly** so the behavior is never silent.
90
155
 
91
- When the Angular command/skill library ships, each agent's `commandBundles` entry installs that agent's `commands/`/`skills/` folder automatically with no CLI changes.
156
+ ```bash
157
+ plankit init --agent opencode
158
+ plankit init --agent gemini --global-gemini-skills
159
+ plankit init --agent codex
160
+ plankit init --agent cursor
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Angular command suite
166
+
167
+ Alongside the phase workflow, `init` installs a per-agent Angular command library that gives your AI assistant **16 deterministic Angular engineering workflows**, driven by repository discovery rather than generic prompts:
168
+
169
+ | Command | Purpose |
170
+ |---|---|
171
+ | `component-from` | Generate a component from an existing one as an architectural reference. |
172
+ | `feature` | Build a whole feature respecting existing architecture. |
173
+ | `clone-pattern` | Clone any architectural pattern (feature/page/dialog/store/form/table/service). |
174
+ | `design-match` | Align a generated component with the design system. |
175
+ | `page-from-api` | Scaffold a page from a typed API method, deriving UI from the contract. |
176
+ | `form-from-model` | Build a form from a domain model with inferred controls/validation. |
177
+ | `table-from-model` | Build a table with semantic columns and correct formatting. |
178
+ | `wire-api` | Replace mock data with real API calls using the dominant data-access pattern. |
179
+ | `signalize` | Migrate state to Signals only where appropriate. |
180
+ | `extract-component` | Extract a template region into a child component with a clean API. |
181
+ | `split-component` | Decompose an oversized component into focused parts. |
182
+ | `extract-store` | Move server/user state into a feature-scoped store. |
183
+ | `modernize` | Orchestrate incremental Angular migrations (build/test between stages). |
184
+ | `responsive` | Make a component responsive per project conventions. |
185
+ | `generate-tests` | Write behavior-focused tests, filling coverage gaps only. |
186
+ | `fixtures` | Generate reusable fixtures from TypeScript domain models. |
187
+
188
+ Plus a shared `angular-project-discovery` reference that every command leans on (Angular version, standalone vs NgModule, Signals/RxJS, state management, forms strategy, UI library, styling, testing, conventions, architecture).
189
+
190
+ Only your **selected agent's** folder/commands are copied. To customize the Angular command templates in your own `templatesDir`, mirror the `templates/angular-commands/` and `templates/angular-skills/` folder layout from the package.
191
+
192
+ ---
92
193
 
93
194
  ## Template overrides
94
195
 
95
- Default templates live in the package `templates/` directory. To override them in a project:
196
+ Default templates live inside the package at `templates/`. To override them in a project:
96
197
 
97
198
  1. Create a directory such as `.plankit/templates`.
98
199
  2. Set `"templatesDir": ".plankit/templates"` in `plankit.config.json`.
99
- 3. Add files matching the built-in template names, for example:
200
+ 3. Add files matching the built-in template names. For example:
100
201
 
101
202
  ```text
102
203
  .plankit/templates/
@@ -108,7 +209,57 @@ Default templates live in the package `templates/` directory. To override them i
108
209
  plankit-plan.md
109
210
  ```
110
211
 
111
- Supported placeholders use `{{name}}` syntax.
212
+ Custom template directories mirror the package `templates/` layout, including `angular-commands/` and `angular-skills/`. Supported placeholders use `{{name}}` syntax (e.g. `{{artifactsDir}}`).
213
+
214
+ ---
215
+
216
+ ## Development
217
+
218
+ ```bash
219
+ # Run the test suite (Node's built-in test runner)
220
+ npm test
221
+
222
+ # Inspect the exact tarball contents
223
+ npm pack --dry-run
224
+
225
+ # Build the per-agent Angular command/skill bundles from canonical sources
226
+ node scripts/generate-angular-bundles.mjs
227
+ ```
228
+
229
+ > The Angular command files are **generated** from the canonical definitions in [`scripts/generate-angular-bundles.mjs`](scripts/generate-angular-bundles.mjs). Edit that file (or the per-command body) and re-run the generator; don't hand-edit the four generated folders.
230
+
231
+ ---
232
+
233
+ ## Troubleshooting
234
+
235
+ **"I ran `plankit init` but I still see the old all-agents behavior / no Angular commands."**
236
+
237
+ Almost always a **stale global install**. First confirm what's really running:
238
+
239
+ ```bash
240
+ plankit --version # should be >= 1.3.1
241
+ npm view plankit-cli version # latest published version
242
+ ```
243
+
244
+ If `plankit --version` reports an old version (or an error), update:
245
+
246
+ ```bash
247
+ npm install -g plankit-cli@latest
248
+ ```
249
+
250
+ **Two-competing-global-installs (Windows/macOS PATH shadowing):** it's possible to have `plankit-cli` installed under **two** global locations — your npm prefix (e.g. `D:\node24\...`) and a separately-linked one (e.g. `%APPDATA%\npm\...`). If `npm install -g` reports success but `plankit --version` still shows old output, the `plankit` shim earlier on your `PATH` may point at the stale copy. Fix by installing into the location that actually resolves:
251
+
252
+ ```bash
253
+ # Windows PowerShell (check your APPDATA npm location)
254
+ npm install -g --prefix "$env:APPDATA\npm" plankit-cli@latest
255
+
256
+ # Or find every copy and refresh:
257
+ where.exe plankit
258
+ ```
259
+
260
+ Then restart your terminal so PATH refreshes and verify with `plankit --version`.
261
+
262
+ ---
112
263
 
113
264
  ## Verification
114
265
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plankit-cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "PlanKit Command Suite CLI for AI Coding Assistants (Antigravity, OpenCode, Codex, Cursor)",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -47,6 +47,11 @@ export async function runCli(args, context = {}) {
47
47
  case 'archive':
48
48
  archiveFeature(parsed, io);
49
49
  break;
50
+ case 'version':
51
+ case '--version':
52
+ case '-v':
53
+ showVersion(io);
54
+ break;
50
55
  case 'help':
51
56
  case '--help':
52
57
  case '-h':
@@ -114,10 +119,6 @@ function installCommandBundle(agent, bundleName, config, options, io) {
114
119
  };
115
120
  }
116
121
 
117
- if (entry.global && options.dryRun) {
118
- return { action: 'info', path: bundleName, message: 'would install to user profile (dry run)' };
119
- }
120
-
121
122
  const targetRoot = entry.global
122
123
  ? path.join(os.homedir(), ...entry.dest)
123
124
  : safeJoin(io.cwd, ...entry.dest);
@@ -636,6 +637,7 @@ Commands:
636
637
  review <feature> Run verification and archive a completed feature
637
638
  status [--json] Show active and archived features
638
639
  archive <feature> Move a feature to archived without running verification
640
+ version Show the installed PlankKit CLI version
639
641
  help Show this help message
640
642
 
641
643
  Options:
@@ -653,3 +655,17 @@ Options:
653
655
  --skip-build Skip review build command
654
656
  `);
655
657
  }
658
+
659
+ function showVersion(io) {
660
+ const version = readPackageVersion();
661
+ io.stdout(`plankit-cli v${version}`);
662
+ }
663
+
664
+ function readPackageVersion() {
665
+ try {
666
+ const pkg = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf8'));
667
+ return pkg.version || 'unknown';
668
+ } catch {
669
+ return 'unknown';
670
+ }
671
+ }
@@ -15,8 +15,7 @@ export const COMMAND_BUNDLES = {
15
15
  label: 'Angular skill suite',
16
16
  src: path.join('angular-skills', 'gemini'),
17
17
  dest: ['.gemini', 'skills'],
18
- kind: 'folder',
19
- global: true
18
+ kind: 'folder'
20
19
  },
21
20
  'codex-angular': {
22
21
  label: 'Angular command suite',
@@ -27,7 +26,7 @@ export const COMMAND_BUNDLES = {
27
26
  'cursor-angular': {
28
27
  label: 'Angular command suite',
29
28
  src: path.join('angular-commands', 'cursor'),
30
- dest: ['.cursor'],
29
+ dest: ['.cursor', 'rules'],
31
30
  kind: 'folder'
32
31
  }
33
32
  };
@@ -0,0 +1,23 @@
1
+ # angular-clone-pattern
2
+ > Clone the pattern of an existing feature/page/dialog/store/form/table/service or route config to a new target.
3
+
4
+ # /clone-pattern
5
+
6
+ Core primitive: clone an architectural pattern to a new target.
7
+
8
+ ## Workflow
9
+ 1. Build a PATTERN MODEL (type, architecture, state style, API style, routing, styling, testing).
10
+ 2. Apply: PATTERN + TARGET DOMAIN = IMPLEMENTATION.
11
+
12
+ ## Categories
13
+ - COPY: folder structure, naming conventions
14
+ - ADAPT: model, inputs, routes
15
+ - IGNORE: business logic, temporary workarounds, hardcoded styling
16
+
17
+ ## Guardrail
18
+ Identify and refuse to propagate suspicious patterns (e.g. manual subscriptions without teardown) when the dominant repository pattern differs. Never build /clone-tech-debt.
19
+
20
+ ## Execution
21
+ 1. Run Angular PROJECT DISCOVERY against the repository.
22
+ 2. Apply the workflow above with the provided target.
23
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,26 @@
1
+ # angular-component-from
2
+ > Generate a new Angular component using an existing component as the architectural and stylistic reference.
3
+
4
+ # /component-from
5
+
6
+ Generate a new component by learning from an existing one instead of blind clone-and-rename.
7
+
8
+ ## Workflow
9
+ 1. Analyze the source component and classify what is reusable vs business-specific.
10
+ 2. Identify: component structure, file layout, input/output style, inject() convention, tokens, shared components, testing style.
11
+ 3. Understand the target domain (optionally from --model).
12
+ 4. Generate the new component using the reusable pattern.
13
+
14
+ ## Guardrail
15
+ Never literal clone-and-rename (Product->User). Extract the pattern, understand the target domain, then generate.
16
+
17
+ ## Options
18
+ - --model <Type> inspect the model to derive appropriate inputs
19
+ - --no-tests skip generating a spec
20
+ - --interactive ask before writing
21
+ - --dry-run show files to create only
22
+
23
+ ## Execution
24
+ 1. Run Angular PROJECT DISCOVERY against the repository.
25
+ 2. Apply the workflow above with the provided target.
26
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,20 @@
1
+ # angular-design-match
2
+ > Match the design language of a generated component to a reference and its surrounding UI.
3
+
4
+ # /design-match
5
+
6
+ Align a target with a reference design system.
7
+
8
+ ## Workflow
9
+ 1. Discover design vocabulary from reference + neighbors (surfaces, spacing, typography, buttons, icons, states, breakpoints).
10
+ 2. Compare semantic regions, not raw DOM.
11
+ 3. Transform using priority: shared component -> design token -> existing utility -> existing SCSS pattern -> new style.
12
+
13
+ ## Options
14
+ - --scope <layout|styles|states|all>
15
+ - --auto-reference search for the closest visually/functionally similar component
16
+
17
+ ## Execution
18
+ 1. Run Angular PROJECT DISCOVERY against the repository.
19
+ 2. Apply the workflow above with the provided target.
20
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,21 @@
1
+ # angular-extract-component
2
+ > Extract a template region into a child component, deriving the smallest sensible API.
3
+
4
+ # /extract-component
5
+
6
+ Extract a child component with a clean boundary.
7
+
8
+ ## Workflow
9
+ 1. Analyze all reads/writes/uses inside the template region.
10
+ 2. Derive the smallest sensible input/output API.
11
+ 3. Prioritize strong boundaries (independent concept, repeated UI, clear I/O) over weak ones (5 lines, tight coupling, 14 inputs).
12
+ 4. If extraction makes architecture worse, reject it and recommend an alternative (e.g. a directive/field-group).
13
+
14
+ ## Options
15
+ - --selection extract a user-specified selection
16
+ - --auto detect candidate boundaries with confidence scores
17
+
18
+ ## Execution
19
+ 1. Run Angular PROJECT DISCOVERY against the repository.
20
+ 2. Apply the workflow above with the provided target.
21
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,19 @@
1
+ # angular-extract-store
2
+ > Extract server/user state from a component into a feature-scoped store.
3
+
4
+ # /extract-store
5
+
6
+ Move state and state transitions into a store without turning it into a dumping ground.
7
+
8
+ ## Workflow
9
+ 1. Detect existing state and classify: SERVER STATE, USER STATE, DERIVED, EPHEMERAL UI.
10
+ 2. Keep ephemeral UI (e.g. dialogOpen) local; move server/user/derived state into the store.
11
+ 3. Determine provider scope from the app (component / route / feature / root) — do not default everything to root.
12
+
13
+ ## Safeguard
14
+ Keep presentation and DOM logic out of the store. Store = state + transitions + relevant orchestration only.
15
+
16
+ ## Execution
17
+ 1. Run Angular PROJECT DISCOVERY against the repository.
18
+ 2. Apply the workflow above with the provided target.
19
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,24 @@
1
+ # angular-feature
2
+ > Build an entire Angular feature while respecting the application existing architecture.
3
+
4
+ # /feature
5
+
6
+ High-level feature builder that composes lower-level commands.
7
+
8
+ ## Workflow
9
+ 1. Turn the request into capabilities (pages, data, state, UI, routes).
10
+ 2. Discover the closest existing feature (e.g. --like customers).
11
+ 3. Map capabilities onto existing repository patterns.
12
+ 4. Compose: clone-pattern -> component-from -> wire-api -> form-from-model -> generate-tests.
13
+
14
+ ## Safeguard
15
+ Do not invent infrastructure. If existing features do not use stores/repositories/facades, do not introduce them here.
16
+
17
+ ## Options
18
+ - --like <feature> pattern reference
19
+ - --plan output only the plan (files, patterns, dependencies, routes, tests) without writing
20
+
21
+ ## Execution
22
+ 1. Run Angular PROJECT DISCOVERY against the repository.
23
+ 2. Apply the workflow above with the provided target.
24
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,23 @@
1
+ # angular-fixtures
2
+ > Generate reusable fixtures from TypeScript domain models with override support.
3
+
4
+ # /fixtures
5
+
6
+ Create test/dev fixtures from existing models.
7
+
8
+ ## Workflow
9
+ 1. Given a model (e.g. Order), generate a factory: createOrder(overrides = {}) with sensible defaults and nested factories.
10
+ 2. Compose states where valuable.
11
+
12
+ ## Options
13
+ - --count <n> generate an array of n fixtures
14
+ - --states generate named states (pendingOrder, completedOrder, cancelledOrder, emptyOrder, largeOrder)
15
+ - --edge-cases generate edge cases (longName, missingOptionalFields, unicodeName, inactiveUser)
16
+
17
+ ## Integration
18
+ Feeds /component-from, /table-from-model, /generate-tests.
19
+
20
+ ## Execution
21
+ 1. Run Angular PROJECT DISCOVERY against the repository.
22
+ 2. Apply the workflow above with the provided target.
23
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,22 @@
1
+ # angular-form-from-model
2
+ > Generate an Angular form from a TypeScript model, inferring field types, controls, and validation.
3
+
4
+ # /form-from-model
5
+
6
+ Build forms from domain models with semantic inference.
7
+
8
+ ## Workflow
9
+ 1. Understand field semantics (email -> email input, roleId -> select, active -> toggle, birthDate -> date).
10
+ 2. Reuse existing project form components (app-field, app-input, app-select, app-toggle).
11
+ 3. Discover validation from existing DTOs/sibling forms/schemas; separate KNOWN from INFERRED validation — never hallucinate constraints.
12
+ 4. Respect Reactive Forms vs Signal Forms based on project version.
13
+ 5. Generate a mapping layer (toCreateDto / toFormModel) instead of coupling DTOs to the UI.
14
+
15
+ ## Options
16
+ - --create | --edit | --dialog | --stepper
17
+ - --like <form> reference form
18
+
19
+ ## Execution
20
+ 1. Run Angular PROJECT DISCOVERY against the repository.
21
+ 2. Apply the workflow above with the provided target.
22
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,20 @@
1
+ # angular-generate-tests
2
+ > Generate behavior-focused tests, deriving behaviors and filling gaps only.
3
+
4
+ # /generate-tests
5
+
6
+ Test behavior, not implementation details.
7
+
8
+ ## Workflow
9
+ 1. Derive behaviors for the target (form init, validation, derived values, submit blocking, request emission, error display, disabled states).
10
+ 2. Find existing coverage and generate only missing tests.
11
+ 3. Use given/when/then behavior, not expect(component).toBeTruthy().
12
+
13
+ ## Options
14
+ - --diff generate tests around changed behaviors only
15
+ - target types: component | service | store | route (--navigation)
16
+
17
+ ## Execution
18
+ 1. Run Angular PROJECT DISCOVERY against the repository.
19
+ 2. Apply the workflow above with the provided target.
20
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,20 @@
1
+ # angular-modernize
2
+ > Orchestrate incremental Angular migrations, building/testing between each stage.
3
+
4
+ # /modernize
5
+
6
+ Treat this as a migration orchestrator, not an LLM rewrite.
7
+
8
+ ## Workflow
9
+ 1. Determine the Angular version and applicable migrations (standalone, built-in control flow, inject(), signal inputs, output(), signal queries).
10
+ 2. Make transformations individually selectable and apply them one at a time.
11
+ 3. Categorize: SAFE AUTOMATED (*ngIf->@if), SAFE WITH VERIFICATION (constructor DI->inject()), ARCHITECTURAL (local state->Signals), NOT RECOMMENDED (working RxJS->Signals).
12
+ 4. Build/test between every stage.
13
+
14
+ ## Options
15
+ - --control-flow | --inject | --standalone | --signal-inputs | --recommended
16
+
17
+ ## Execution
18
+ 1. Run Angular PROJECT DISCOVERY against the repository.
19
+ 2. Apply the workflow above with the provided target.
20
+ 3. Report files created/modified and patterns reused.
@@ -0,0 +1,23 @@
1
+ # angular-page-from-api
2
+ > Generate an Angular page from a typed API method, deriving UI requirements from the API contract.
3
+
4
+ # /page-from-api
5
+
6
+ Scaffold a page that matches the API capabilities.
7
+
8
+ ## Workflow
9
+ 1. Inspect the API method signature and return type (e.g. PagedResult<Order>).
10
+ 2. Derive likely UI requirements: list, loading, empty, error, pagination; filters/sorting only if the API supports them.
11
+ 3. Find the closest existing page pattern and reuse it.
12
+
13
+ ## Critical rule
14
+ 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.
15
+
16
+ ## Options
17
+ - --like <page> reference pattern
18
+ - --crud scaffold full CRUD (list/details/create/edit/delete) from a typed service
19
+
20
+ ## Execution
21
+ 1. Run Angular PROJECT DISCOVERY against the repository.
22
+ 2. Apply the workflow above with the provided target.
23
+ 3. Report files created/modified and patterns reused.
@@ -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,21 @@
1
+ # angular-responsive
2
+ > Make a component responsive following the existing project breakpoints and patterns.
3
+
4
+ # /responsive
5
+
6
+ Responsive is not just media queries.
7
+
8
+ ## Workflow
9
+ 1. Discover project breakpoints, container widths, grid, mobile nav, table->card behavior, spacing/typography changes, dialog behavior.
10
+ 2. Analyze the target and transform fixed layouts (width: 900px; grid 400px 400px) per project conventions.
11
+ 3. Test important states: long translated text, empty, loading, validation errors, many actions, large values, small phone, tablet.
12
+
13
+ ## Options
14
+ - --mobile | --tablet | --all
15
+ - --like <page> follow a reference responsive page
16
+ - --visual (future) iterate on rendered screenshots
17
+
18
+ ## Execution
19
+ 1. Run Angular PROJECT DISCOVERY against the repository.
20
+ 2. Apply the workflow above with the provided target.
21
+ 3. Report files created/modified and patterns reused.