@kosdev-code/kos-ddk-cli 0.0.0-stage → 0.1.0-dev.107
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 +181 -2
- package/agent-plugin/.claude-plugin/marketplace.json +13 -0
- package/agent-plugin/kos-ddk-tools/.claude-plugin/plugin.json +8 -0
- package/agent-plugin/kos-ddk-tools/.mcp.json +11 -0
- package/agent-plugin/kos-ddk-tools/agents/kos-ddk-plugin-planner.md +45 -0
- package/agent-plugin/kos-ddk-tools/agents/kos-ddk-plugin-reviewer.md +43 -0
- package/agent-plugin/kos-ddk-tools/catalog/contributions.json +965 -0
- package/agent-plugin/kos-ddk-tools/mcp.json +12 -0
- package/agent-plugin/kos-ddk-tools/plugin.json +7 -0
- package/agent-plugin/kos-ddk-tools/reference/reference.json +21161 -0
- package/agent-plugin/kos-ddk-tools/servers/kos-ddk.mjs +48656 -0
- package/agent-plugin/kos-ddk-tools/skills/build-ddk-plugin/SKILL.md +110 -0
- package/agent-plugin/kos-ddk-tools/skills/ddk-config-page/SKILL.md +130 -0
- package/agent-plugin/kos-ddk-tools/skills/ddk-content-component/SKILL.md +59 -0
- package/agent-plugin/kos-ddk-tools/skills/ddk-storybook/SKILL.md +45 -0
- package/agent-plugin/kos-ddk-tools/templates/cui/__nameDashCase__.stories.tsx__template__ +32 -0
- package/agent-plugin/kos-ddk-tools/templates/cui/__nameDashCase__.tsx__template__ +35 -0
- package/agent-plugin/kos-ddk-tools/templates/cui/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-detail/detail/__nameDashCase__.stories.tsx__template__ +34 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-detail/detail/__nameDashCase__.tsx__template__ +52 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-detail/detail/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-region/__nameDashCase__.stories.tsx__template__ +38 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-region/__nameDashCase__.tsx__template__ +28 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-region/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-summary/summary/__nameDashCase__.stories.tsx__template__ +34 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-summary/summary/__nameDashCase__.tsx__template__ +41 -0
- package/agent-plugin/kos-ddk-tools/templates/dashboard-summary/summary/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/macro-summary/__nameDashCase__.stories.tsx__template__ +34 -0
- package/agent-plugin/kos-ddk-tools/templates/macro-summary/__nameDashCase__.tsx__template__ +24 -0
- package/agent-plugin/kos-ddk-tools/templates/macro-summary/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/nav/__nameDashCase__.stories.tsx__template__ +32 -0
- package/agent-plugin/kos-ddk-tools/templates/nav/__nameDashCase__.tsx__template__ +27 -0
- package/agent-plugin/kos-ddk-tools/templates/nav/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/plugin-project/.storybook/preview.tsx.template +113 -0
- package/agent-plugin/kos-ddk-tools/templates/plugin-project/.storybook/registration.ts.template +6 -0
- package/agent-plugin/kos-ddk-tools/templates/pump-detail/__nameDashCase__.stories.tsx__template__ +34 -0
- package/agent-plugin/kos-ddk-tools/templates/pump-detail/__nameDashCase__.tsx__template__ +38 -0
- package/agent-plugin/kos-ddk-tools/templates/pump-detail/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/pump-summary/__nameDashCase__.stories.tsx__template__ +34 -0
- package/agent-plugin/kos-ddk-tools/templates/pump-summary/__nameDashCase__.tsx__template__ +25 -0
- package/agent-plugin/kos-ddk-tools/templates/pump-summary/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/setup/__nameDashCase__.stories.tsx__template__ +32 -0
- package/agent-plugin/kos-ddk-tools/templates/setup/__nameDashCase__.tsx__template__ +33 -0
- package/agent-plugin/kos-ddk-tools/templates/setup/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/component.css.template +2 -0
- package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/generic.css.template +2 -0
- package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/semantic.css.template +2 -0
- package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/theme-overlay.css.template +7 -0
- package/agent-plugin/kos-ddk-tools/templates/trouble-action/__nameDashCase__.stories.tsx__template__ +31 -0
- package/agent-plugin/kos-ddk-tools/templates/trouble-action/__nameDashCase__.tsx__template__ +57 -0
- package/agent-plugin/kos-ddk-tools/templates/trouble-action/index.ts__template__ +1 -0
- package/agent-plugin/kos-ddk-tools/templates/utility/__nameDashCase__.stories.tsx__template__ +60 -0
- package/agent-plugin/kos-ddk-tools/templates/utility/__nameDashCase__.tsx__template__ +88 -0
- package/agent-plugin/kos-ddk-tools/templates/utility/index.ts__template__ +1 -0
- package/catalog/contributions.json +965 -0
- package/guides/config-property-cards.md +77 -0
- package/guides/ddk-dev.md +59 -0
- package/guides/getting-started.md +126 -0
- package/guides/storybook.md +127 -0
- package/package.json +33 -3
- package/reference/reference.json +21161 -0
- package/src/build-paths.mjs +20 -0
- package/src/codegen/contribution.mjs +530 -0
- package/src/codegen/descriptor.mjs +422 -0
- package/src/codegen/json-preserve.mjs +137 -0
- package/src/codegen/ncui-descriptor.mjs +167 -0
- package/src/codegen/overrides.mjs +263 -0
- package/src/codegen/project.mjs +271 -0
- package/src/extension.mjs +32 -0
- package/src/generators/agent-install.mjs +80 -0
- package/src/generators/catalog.mjs +81 -0
- package/src/generators/contributions.mjs +164 -0
- package/src/generators/dashboard.mjs +282 -0
- package/src/generators/descriptor-entries.mjs +53 -0
- package/src/generators/descriptor-project.mjs +84 -0
- package/src/generators/dev.mjs +231 -0
- package/src/generators/override-prompts.mjs +27 -0
- package/src/generators/plugin-project.mjs +71 -0
- package/src/generators/theme-project.mjs +53 -0
- package/src/handlers.mjs +335 -0
- package/src/mcp/pkg-info.mjs +7 -0
- package/src/mcp/plugin-inspect.mjs +328 -0
- package/src/mcp/reference.mjs +315 -0
- package/src/mcp/server.mjs +12 -0
- package/src/mcp/tools.mjs +619 -0
- package/templates/cui/__nameDashCase__.stories.tsx__template__ +32 -0
- package/templates/cui/__nameDashCase__.tsx__template__ +35 -0
- package/templates/cui/index.ts__template__ +1 -0
- package/templates/dashboard-detail/detail/__nameDashCase__.stories.tsx__template__ +34 -0
- package/templates/dashboard-detail/detail/__nameDashCase__.tsx__template__ +52 -0
- package/templates/dashboard-detail/detail/index.ts__template__ +1 -0
- package/templates/dashboard-region/__nameDashCase__.stories.tsx__template__ +38 -0
- package/templates/dashboard-region/__nameDashCase__.tsx__template__ +28 -0
- package/templates/dashboard-region/index.ts__template__ +1 -0
- package/templates/dashboard-summary/summary/__nameDashCase__.stories.tsx__template__ +34 -0
- package/templates/dashboard-summary/summary/__nameDashCase__.tsx__template__ +41 -0
- package/templates/dashboard-summary/summary/index.ts__template__ +1 -0
- package/templates/macro-summary/__nameDashCase__.stories.tsx__template__ +34 -0
- package/templates/macro-summary/__nameDashCase__.tsx__template__ +24 -0
- package/templates/macro-summary/index.ts__template__ +1 -0
- package/templates/nav/__nameDashCase__.stories.tsx__template__ +32 -0
- package/templates/nav/__nameDashCase__.tsx__template__ +27 -0
- package/templates/nav/index.ts__template__ +1 -0
- package/templates/plugin-project/.storybook/preview.tsx.template +113 -0
- package/templates/plugin-project/.storybook/registration.ts.template +6 -0
- package/templates/pump-detail/__nameDashCase__.stories.tsx__template__ +34 -0
- package/templates/pump-detail/__nameDashCase__.tsx__template__ +38 -0
- package/templates/pump-detail/index.ts__template__ +1 -0
- package/templates/pump-summary/__nameDashCase__.stories.tsx__template__ +34 -0
- package/templates/pump-summary/__nameDashCase__.tsx__template__ +25 -0
- package/templates/pump-summary/index.ts__template__ +1 -0
- package/templates/setup/__nameDashCase__.stories.tsx__template__ +32 -0
- package/templates/setup/__nameDashCase__.tsx__template__ +33 -0
- package/templates/setup/index.ts__template__ +1 -0
- package/templates/theme-project/theme/assets/component.css.template +2 -0
- package/templates/theme-project/theme/assets/generic.css.template +2 -0
- package/templates/theme-project/theme/assets/semantic.css.template +2 -0
- package/templates/theme-project/theme/assets/theme-overlay.css.template +7 -0
- package/templates/trouble-action/__nameDashCase__.stories.tsx__template__ +31 -0
- package/templates/trouble-action/__nameDashCase__.tsx__template__ +57 -0
- package/templates/trouble-action/index.ts__template__ +1 -0
- package/templates/utility/__nameDashCase__.stories.tsx__template__ +60 -0
- package/templates/utility/__nameDashCase__.tsx__template__ +88 -0
- package/templates/utility/index.ts__template__ +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,182 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kosdev-code/kos-ddk-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DDK commands for `kosui`. Installing this package in a KOS workspace adds the
|
|
4
|
+
`ddk:*` commands to the CLI; it is not a standalone CLI.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
npm install -D @kosdev-code/kos-ddk-cli
|
|
8
|
+
kosui extensions
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`kosui extensions` lists the extension and the commands it adds.
|
|
12
|
+
[`guides/getting-started.md`](guides/getting-started.md) covers installing it in a
|
|
13
|
+
workspace or globally, repo roots, and installing the agent plugin and MCP server.
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
| Command | Writes |
|
|
18
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| `ddk:utility` | a utility in a modal (`utilities` contribution, `utilDescriptor`); `--layout maximized` (default) or `fullscreen` |
|
|
20
|
+
| `ddk:setup` | a setup step (`setupStep` contribution, `setupDescriptor`) |
|
|
21
|
+
| `ddk:dashboard-card` | a dashboard summary card and its detail, sharing `--dashboardKey` |
|
|
22
|
+
| `ddk:pump-detail` | a pump detail for holders with `--dashboardKey` |
|
|
23
|
+
| `ddk:pump-card` | a pump card body and its pump detail, sharing `--dashboardKey` |
|
|
24
|
+
| `ddk:macro-summary` | a macro holder card body for `--dashboardKey` |
|
|
25
|
+
| `ddk:dashboard-region` | a component rendering a whole dashboard region for `--regionKey`; `--descriptorProject` adds the region |
|
|
26
|
+
| `ddk:trouble-action` | the experience shown while a `--troubleType` trouble is active |
|
|
27
|
+
| `ddk:cui` | a CUI configuration (`cui` contribution) |
|
|
28
|
+
| `ddk:nav` | a navigation view (`navViews` contribution, `navDescriptor`); a Settings tab is `--descriptor settings.<name>` |
|
|
29
|
+
| `ddk:contributions` | lists the standard contributions an `--override` can replace |
|
|
30
|
+
| `ddk:plugin-project` | a DDK plugin project; `--directory` (default `plugins`), `--host` |
|
|
31
|
+
| `ddk:theme-project` | a DDK theme project, whose `theme-overlay.css` overrides tokens |
|
|
32
|
+
| `ddk:descriptor-project` | an NCUI descriptor project (`ddk.ncui.descriptor` KAB): `--layout standard` or `compact`; `--carb`, `--ice`, `--beveragePourTest` |
|
|
33
|
+
| `ddk:dev` | serves DDK plugin projects for a device to load (see below) |
|
|
34
|
+
| `ddk:agent-install` | installs the kos-ddk-tools agent plugin (see below) |
|
|
35
|
+
|
|
36
|
+
Each contribution command writes the component, its story and `index.ts`, the
|
|
37
|
+
`.kos.json` contribution and experience, and the i18n title key. Add `--dryRun` to
|
|
38
|
+
list the files without writing them.
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
kosui ddk:utility --name fuel-level --project demo-plugin
|
|
42
|
+
kosui ddk:nav --name water --project demo-plugin --descriptor settings.water --dryRun
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Listing a new slot in the NCUI descriptor
|
|
46
|
+
|
|
47
|
+
The NCUI shows a utility, setup step or navigation view only if its descriptor lists it
|
|
48
|
+
(`kondra.ncui` `utilities`, `setup.steps`, `navigations`). The DDK app uses an installed
|
|
49
|
+
NCUI descriptor KAB in place of the system app's descriptor, so a descriptor project is
|
|
50
|
+
where new slots go:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
kosui ddk:descriptor-project --name my-ncui --layout standard --ice true
|
|
54
|
+
kosui ddk:utility --name fuel-level --project demo-plugin --descriptorProject my-ncui --roles technician
|
|
55
|
+
kosui ddk:nav --name fuel --project demo-plugin --descriptor settings.fuel --descriptorProject my-ncui
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`--descriptorProject` lists the slot in that project: a utility in the last column (or
|
|
59
|
+
`--column <n>`) with `--roles`, a setup step last, a navigation view under its parent with
|
|
60
|
+
the parent's roles. For contributions written before the descriptor project,
|
|
61
|
+
`kosui ddk:descriptor-entries --project <plugin> --descriptorProject <name>` lists their slots. Without it, a command whose slot no descriptor lists says so, and
|
|
62
|
+
`validate_ddk_plugin` warns. An override fills a slot that is already listed and needs no
|
|
63
|
+
entry. Build and install the descriptor project's KAB (`nx run my-ncui:kab`) beside the DDK
|
|
64
|
+
app.
|
|
65
|
+
|
|
66
|
+
To try a descriptor project without installing it, serve it with KosMock. Each
|
|
67
|
+
descriptor project has a generated setup module, `fixtures/setups/<name>.mjs`, rewritten
|
|
68
|
+
whenever a command lists an entry there; it calls `kosMock.ddk.useDescriptor`, which
|
|
69
|
+
answers the DDK's descriptor reads from the project and lists its setup steps:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
kosui fixtures serve
|
|
73
|
+
# open the DDK app (or ddk:dev) with ?kosMock=on&kosFixtureServer&kosSetup=my-ncui
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
For mocking beyond the descriptor, a setup of your own can call `kosMock.ddk.addUtility`,
|
|
77
|
+
`addNavigation` and `addSetupStep`.
|
|
78
|
+
|
|
79
|
+
## Overriding a standard contribution
|
|
80
|
+
|
|
81
|
+
Utilities, setup steps, navigation views, dashboard cards, pump details, macro
|
|
82
|
+
summaries and trouble actions are ranked: when two contributions fill the same slot
|
|
83
|
+
(the same `utilDescriptor`, `setupDescriptor`, `navDescriptor`, `dashboardKey` or
|
|
84
|
+
`troubleType`), the DDK hosts use the one with the lower `rank`, and an unranked
|
|
85
|
+
contribution loses to any ranked one. An override is a new contribution in your
|
|
86
|
+
plugin, with its own id, that fills the slot of an existing one with a better rank.
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
kosui ddk:contributions --point utility
|
|
90
|
+
kosui ddk:utility --name my-logs --project demo-plugin --override kos-ddk-standard-plugin.copyLogs.util
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`--override <id>` copies the slot from the named contribution and, without
|
|
94
|
+
`--rank`, ranks the override `100` against an unranked contribution, or one better
|
|
95
|
+
than a ranked one. `--rank <n>` (0 to 1000) sets the rank, and is refused if it does
|
|
96
|
+
not beat the overridden contribution. Without `--override`, `--rank` ranks a new
|
|
97
|
+
contribution, and `--descriptor` sets a utility's, setup step's or navigation
|
|
98
|
+
view's slot when it is not derived from the component name.
|
|
99
|
+
|
|
100
|
+
The generated story renders the override on its own, so it can be developed in
|
|
101
|
+
Storybook before the plugin is loaded beside the standard one.
|
|
102
|
+
|
|
103
|
+
[`guides/storybook.md`](guides/storybook.md) covers running Storybook, where model data
|
|
104
|
+
comes from and the story containers.
|
|
105
|
+
|
|
106
|
+
## Testing plugins against a running DDK
|
|
107
|
+
|
|
108
|
+
`ddk:dev` serves the workspace's DDK plugin projects for a running DDK to load, without
|
|
109
|
+
access to the DDK host source. [`guides/ddk-dev.md`](guides/ddk-dev.md) covers choosing
|
|
110
|
+
plugins and scenarios and the URL it prints.
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
kosui ddk:dev --device http://192.168.1.50:8081
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Agent plugin
|
|
117
|
+
|
|
118
|
+
The package ships `kos-ddk-tools`, an agent plugin running the `kos-ddk` MCP server: one
|
|
119
|
+
tool per contribution command, `scaffold_ddk_plugin_project` and `list_ddk_contributions`. Its
|
|
120
|
+
writing tools preview by default and write with `dryRun: false`.
|
|
121
|
+
|
|
122
|
+
Its reference is extracted from DDK source at build time:
|
|
123
|
+
|
|
124
|
+
- `ddk://index`, and `ddk://extension-point/{id}` for each `defineExtensionPoint` in
|
|
125
|
+
kos-ddk-model-components: contribution fields, component props, standard
|
|
126
|
+
contributions and the tool that writes it.
|
|
127
|
+
- `ddk://design/{base,flex-eu,compact}`: a DESIGN.md per theme `getStyles()` builds, from
|
|
128
|
+
the kos-ddk-styles tokens and the typography components.
|
|
129
|
+
- `list_ddk_components` and `describe_ddk_component` for the kos-ddk-components and
|
|
130
|
+
kos-ddk-model-components exports: props as typed, the components and hooks each uses,
|
|
131
|
+
and every token it reads with its value per theme.
|
|
132
|
+
- `find_ddk_capability` maps a plain-language need to extension points, standard
|
|
133
|
+
contributions and components.
|
|
134
|
+
- `ddk://guide/*`, from [`guides/`](guides).
|
|
135
|
+
|
|
136
|
+
`describe_ddk_plugin` and `validate_ddk_plugin` read a plugin project's `.kos.json`: its
|
|
137
|
+
contributions, the standard ones they share a slot with, and checks of fields, ranks,
|
|
138
|
+
experiences and tokens set in plugin code. The skills `build-ddk-plugin`,
|
|
139
|
+
`ddk-config-page`, `ddk-content-component` and `ddk-storybook` give the workflow, and the
|
|
140
|
+
`kos-ddk-plugin-planner` and `kos-ddk-plugin-reviewer` subagents plan and review
|
|
141
|
+
read-only.
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
kosui plugin install --client claude --scope user
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
`kosui plugin install` installs it beside the SDK's `kos-tools` plugin, from the
|
|
148
|
+
package's `agent-plugin/` folder. `kosui ddk:agent-install` installs it alone.
|
|
149
|
+
`--scope repo` installs for the current checkout only.
|
|
150
|
+
|
|
151
|
+
## Tests
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
npx nx run kos-ddk-cli:test
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The suite builds and packs this package and installs it with
|
|
158
|
+
`@kosdev-code/kos-ui-cli` from the registry, so during local development the local
|
|
159
|
+
registry must be running with the SDK published to it. It checks the handlers'
|
|
160
|
+
output against the SDK built-ins and drives every command through the installed
|
|
161
|
+
`kosui`.
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
npx nx run kos-ddk-cli:test:slow
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The slow suite also installs the published DDK libraries, the SDKs, React, Emotion
|
|
168
|
+
and Storybook, runs every contribution command into one plugin, and type-checks the
|
|
169
|
+
result with a KOS plugin workspace's compiler options.
|
|
170
|
+
|
|
171
|
+
```sh
|
|
172
|
+
npx nx run kos-ddk-cli:acceptance
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The acceptance run is a plugin developer's whole path on the packages the registry serves:
|
|
176
|
+
a new workspace with `kosui workspace` and `kosui repo`, every `ddk:*` command from the repo
|
|
177
|
+
root, `validate_ddk_plugin`, the typecheck, every generated story rendered in Chromium (no
|
|
178
|
+
errors, no untranslated keys), `ddk:dev` loading the plugin into the NCUI, and the KAB. It
|
|
179
|
+
needs `kosui` with `kos-ddk-cli` on the `PATH` (`KOS_DDK_ACCEPTANCE_INSTALL=workspace`
|
|
180
|
+
installs it into the workspace instead) and a simulator at `KOS_DEVICE` (default
|
|
181
|
+
`http://localhost:8081`). Run it against the local registry with the DDK published at the
|
|
182
|
+
next release version before a release, and against npm after.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kos-ddk",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "kosdev-code"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "kos-ddk-tools",
|
|
9
|
+
"source": "./kos-ddk-tools",
|
|
10
|
+
"description": "KOS DDK plugin authoring (kos-ddk) MCP server: plugin projects, extension-point contributions and overrides of the standard ones."
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kos-ddk-plugin-planner
|
|
3
|
+
description: Turn a DDK plugin feature into a plan before anything is written. Finds the extension points and standard contributions that cover the need, what the plugin already contributes, and the DDK components each contribution should render. Use when starting a DDK plugin feature or an override and the shape is not yet decided. Read-only; returns the tool calls for the main thread to run with the build-ddk-plugin skill.
|
|
4
|
+
tools: Read, Grep, Glob, ReadMcpResourceTool, ListMcpResourcesTool, mcp__plugin_kos-ddk-tools_kos-ddk__read_resource, mcp__plugin_kos-ddk-tools_kos-ddk__find_ddk_capability, mcp__plugin_kos-ddk-tools_kos-ddk__list_ddk_contributions, mcp__plugin_kos-ddk-tools_kos-ddk__list_ddk_components, mcp__plugin_kos-ddk-tools_kos-ddk__describe_ddk_component, mcp__plugin_kos-ddk-tools_kos-ddk__describe_ddk_plugin
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You plan DDK plugin work; you do not build it. You cannot write. The main thread
|
|
9
|
+
runs the `build-ddk-plugin` skill from your plan.
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
What the plugin should do or replace, and the plugin project if one exists. Pass
|
|
14
|
+
`workspaceRoot` on every call that takes it when the session cwd is not the workspace.
|
|
15
|
+
Read `ddk://` resources with `read_resource` (`uri`), or the MCP resource reader when
|
|
16
|
+
you have it.
|
|
17
|
+
|
|
18
|
+
## Procedure
|
|
19
|
+
|
|
20
|
+
1. `find_ddk_capability` with the need in plain words. Read `ddk://index` and the
|
|
21
|
+
`ddk://extension-point/{id}` resource of each candidate point.
|
|
22
|
+
2. Replacing something standard: `list_ddk_contributions` for the point, and name the
|
|
23
|
+
id to pass as `override`. Say whether the slot is one the NCUI descriptor must list
|
|
24
|
+
(utilities, setup steps, nav views).
|
|
25
|
+
3. Existing project: `describe_ddk_plugin`, so the plan extends what it contributes and
|
|
26
|
+
does not take a slot it already fills.
|
|
27
|
+
4. Components: `list_ddk_components` and `describe_ddk_component` for what each
|
|
28
|
+
contribution renders. Prefer a kos-ddk-model-components component bound to the
|
|
29
|
+
model over composing one from kos-ddk-components.
|
|
30
|
+
5. Models of the plugin's own: plan them with the `ddk-config-page` skill's order
|
|
31
|
+
(`scaffold_model` without `autoRegister`, `add_config_property`, `register_model`
|
|
32
|
+
with the plugin as `app`, `create_hook`).
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
|
|
36
|
+
Under 30 lines:
|
|
37
|
+
|
|
38
|
+
- **Project**: the existing plugin, or the `scaffold_ddk_plugin_project` arguments.
|
|
39
|
+
- **Contributions**: ordered tool calls (`add_*`) with their key arguments (`name`,
|
|
40
|
+
`project`, `override`, `rank`, `dashboardKey`, `troubleType`, `group`), each with the
|
|
41
|
+
extension point resource it rests on.
|
|
42
|
+
- **Components**: per contribution, the DDK components to render and the props they take
|
|
43
|
+
from the extension point's props.
|
|
44
|
+
- **Descriptor**: NCUI descriptor entries a new utility, setup step or nav view slot needs.
|
|
45
|
+
- **Open questions**: anything the developer must rule on.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kos-ddk-plugin-reviewer
|
|
3
|
+
description: Read-only review of a DDK plugin project: its contributions against the extension points, its overrides, and its components against the rule that plugins compose DDK components and leave tokens to the DDK app. Use after writing or changing contributions, before a commit, or when asked to check a DDK plugin. Returns findings with the tool or resource that fixes each; never edits.
|
|
4
|
+
tools: Read, Grep, Glob, ReadMcpResourceTool, ListMcpResourcesTool, mcp__plugin_kos-ddk-tools_kos-ddk__read_resource, mcp__plugin_kos-ddk-tools_kos-ddk__validate_ddk_plugin, mcp__plugin_kos-ddk-tools_kos-ddk__describe_ddk_plugin, mcp__plugin_kos-ddk-tools_kos-ddk__list_ddk_contributions, mcp__plugin_kos-ddk-tools_kos-ddk__list_ddk_components, mcp__plugin_kos-ddk-tools_kos-ddk__describe_ddk_component
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You review DDK plugins. You cannot edit anything: report and stop. If a tool you
|
|
9
|
+
need is unavailable, say which one and stop; never fall back to judging by eye.
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
The plugin project, or a description of what changed. Pass `workspaceRoot` on every
|
|
14
|
+
call that takes it when the session cwd is not the workspace being reviewed.
|
|
15
|
+
|
|
16
|
+
Read `ddk://` resources with `read_resource` (`uri`), or the MCP resource reader when
|
|
17
|
+
you have it. Never read a plugin cache directory instead.
|
|
18
|
+
|
|
19
|
+
## Procedure
|
|
20
|
+
|
|
21
|
+
1. `validate_ddk_plugin` for the static findings; every error is a finding.
|
|
22
|
+
2. `describe_ddk_plugin` for each contribution's point, slot, rank and component. For
|
|
23
|
+
each override, confirm it beats every standard contribution it shares a slot with.
|
|
24
|
+
3. Read each contribution's component file. For the props it uses, check them against
|
|
25
|
+
the extension point resource (`ddk://extension-point/{id}`) and, for each DDK
|
|
26
|
+
component it renders, `describe_ddk_component`.
|
|
27
|
+
4. Composition: flag markup or styled elements that re-create a component
|
|
28
|
+
`list_ddk_components` already has, text styled by hand instead of the typography
|
|
29
|
+
components, and any `--ddk-*` token set or overridden in plugin code.
|
|
30
|
+
5. Utilities, setup steps and nav views: name the NCUI descriptor entry each slot
|
|
31
|
+
needs; you cannot see the device's descriptor, so say it must be confirmed there.
|
|
32
|
+
6. Model registration: follow the plugin's imports in `src/` (hooks and HOCs included)
|
|
33
|
+
to each model file it uses. Flag any such model whose `@kosModel` config sets
|
|
34
|
+
`autoRegister: true`, and a plugin that uses a model without `init: true` in
|
|
35
|
+
`kos.ui.plugin` and a `src/app/init.ts` whose `register()` registers it. Both are
|
|
36
|
+
fixed by `register_model` with the plugin as `app`. Flag a
|
|
37
|
+
`.storybook/registration.ts` that does not run the plugin's init before
|
|
38
|
+
`initDDKRegistration()`.
|
|
39
|
+
|
|
40
|
+
## Output
|
|
41
|
+
|
|
42
|
+
Findings, most severe first, each with the file, what is wrong and the tool or
|
|
43
|
+
resource that fixes it. "No findings" when there are none.
|