plankit-cli 1.3.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.
- package/README.md +178 -33
- package/package.json +1 -1
- package/src/cli.js +20 -0
package/README.md
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,51 +124,80 @@ plankit plan my-feature
|
|
|
58
124
|
}
|
|
59
125
|
```
|
|
60
126
|
|
|
61
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
142
|
+
| Agent | What gets installed |
|
|
79
143
|
|---|---|
|
|
80
|
-
| `opencode` (default) | Slash commands under `.opencode/commands/` |
|
|
81
|
-
| `gemini` / `antigravity` | `.gemini/instructions.md` + `angular-*` skills
|
|
82
|
-
| `codex` | `AGENTS.md` + Angular commands under `.codex
|
|
83
|
-
| `cursor` | `.cursorrules` + Angular command rules under `.cursor/rules
|
|
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.
|
|
155
|
+
|
|
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
|
+
```
|
|
90
162
|
|
|
91
|
-
|
|
163
|
+
---
|
|
92
164
|
|
|
93
|
-
|
|
165
|
+
## Angular command suite
|
|
94
166
|
|
|
95
|
-
|
|
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:
|
|
96
168
|
|
|
97
|
-
|
|
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
|
+
---
|
|
98
193
|
|
|
99
194
|
## Template overrides
|
|
100
195
|
|
|
101
|
-
Default templates live
|
|
196
|
+
Default templates live inside the package at `templates/`. To override them in a project:
|
|
102
197
|
|
|
103
198
|
1. Create a directory such as `.plankit/templates`.
|
|
104
199
|
2. Set `"templatesDir": ".plankit/templates"` in `plankit.config.json`.
|
|
105
|
-
3. Add files matching the built-in template names
|
|
200
|
+
3. Add files matching the built-in template names. For example:
|
|
106
201
|
|
|
107
202
|
```text
|
|
108
203
|
.plankit/templates/
|
|
@@ -114,7 +209,57 @@ Default templates live in the package `templates/` directory. To override them i
|
|
|
114
209
|
plankit-plan.md
|
|
115
210
|
```
|
|
116
211
|
|
|
117
|
-
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
|
+
---
|
|
118
263
|
|
|
119
264
|
## Verification
|
|
120
265
|
|
package/package.json
CHANGED
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':
|
|
@@ -632,6 +637,7 @@ Commands:
|
|
|
632
637
|
review <feature> Run verification and archive a completed feature
|
|
633
638
|
status [--json] Show active and archived features
|
|
634
639
|
archive <feature> Move a feature to archived without running verification
|
|
640
|
+
version Show the installed PlankKit CLI version
|
|
635
641
|
help Show this help message
|
|
636
642
|
|
|
637
643
|
Options:
|
|
@@ -649,3 +655,17 @@ Options:
|
|
|
649
655
|
--skip-build Skip review build command
|
|
650
656
|
`);
|
|
651
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
|
+
}
|