@danieljvdm/dev-kit 0.14.0 → 0.15.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 +83 -93
- package/dev-kit.example.jsonc +4 -3
- package/package.json +1 -1
- package/schema/dev-kit.schema.json +19 -42
- package/skills/dev-kit/SKILL.md +115 -222
- package/skills/open-pull-request/SKILL.md +62 -23
- package/src/index.ts +6 -6
- package/src/manifest.ts +28 -29
- package/src/path-digest.ts +0 -13
- package/src/project-package.ts +51 -0
- package/src/project-state.ts +3 -0
- package/src/scaffold.ts +79 -0
- package/src/sync.ts +64 -171
- package/src/vite-plus-workflow.ts +82 -0
- package/src/worktrunk-config.ts +88 -0
- package/templates/vite-plus/github-actions-check.yml +0 -2
- package/templates/worktrunk/wt.toml +27 -0
- package/src/vite-plus-quality.ts +0 -148
package/README.md
CHANGED
|
@@ -199,21 +199,14 @@ tool versions. A project-local process lock also prevents concurrent applies.
|
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
- `dev-kit` installs guidance for operating the toolkit itself.
|
|
202
|
-
- `
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
references cover Effect Atom, TanStack Start, Cloudflare Workers, child
|
|
209
|
-
processes, runtime entrypoints, and script/CLI testing.
|
|
210
|
-
- Prefer individual external skills such as `workers-best-practices` and
|
|
211
|
-
`wrangler`, selected after scanning the project for relevant technologies.
|
|
212
|
-
- `serve-sim` selects the approved Evan Bacon simulator skill directly.
|
|
202
|
+
- `effect` is a built-in family: the `effect-ts` bootstrap,
|
|
203
|
+
`effect-architecture-audit`, `build-effect-apis`, and `build-effect-clis`.
|
|
204
|
+
- External Git skills (`workers-best-practices`, `serve-sim`, …) are selected
|
|
205
|
+
individually after scanning the project for relevant technologies. An
|
|
206
|
+
approved source ID selects every skill from that source; use it only when
|
|
207
|
+
the scan confirms that every member applies.
|
|
213
208
|
- `@tanstack/ai#ai-core` explicitly selects a skill discovered in that direct
|
|
214
209
|
project dependency; discovery alone never selects it.
|
|
215
|
-
- An approved source ID is broad shorthand that selects every skill from that
|
|
216
|
-
source. Use it only when the scan confirms that every member applies.
|
|
217
210
|
|
|
218
211
|
Dev Kit reserves `.repos/<source-id>` for project-local source checkouts. Run
|
|
219
212
|
`dev-kit gitignore` to add `.repos/` and `.dev-kit/` to the project ignore file.
|
|
@@ -239,18 +232,17 @@ bridge in the manifest:
|
|
|
239
232
|
`AGENTS.md`, preserving handwritten project guidance around them. The Dev Kit
|
|
240
233
|
section contains a short description and a pointer to the installed `dev-kit`
|
|
241
234
|
skill. When the root `package.json` declares `vite-plus` directly, Dev Kit
|
|
242
|
-
renders its own repository-specific Vite+ guidance
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
owned update. Ambiguous or malformed managed markers fail closed.
|
|
235
|
+
renders its own repository-specific Vite+ guidance — toolchain overview, help
|
|
236
|
+
and documentation entry points, `vp env doctor` troubleshooting — rather than
|
|
237
|
+
importing Vite+'s generic `AGENTS.md`, which can contradict the repository's
|
|
238
|
+
exact commands; transitive installations do not opt a project in. Ambiguous or
|
|
239
|
+
malformed managed markers fail closed.
|
|
248
240
|
|
|
249
241
|
The Dev Kit section also renders an opinionated project command policy. A
|
|
250
242
|
direct Vite+ dependency makes `vp` the only supported front door: built-in
|
|
251
243
|
format, lint, and test commands use `vp`, while repository tasks and package
|
|
252
|
-
scripts use `vp run`. When
|
|
253
|
-
full validation and typecheck commands are `vp run check` and
|
|
244
|
+
scripts use `vp run`. When the manifest enables the Vite+ workflow scaffold,
|
|
245
|
+
the canonical full validation and typecheck commands are `vp run check` and
|
|
254
246
|
`vp run typecheck`; `vp check` alone is only the Vite+ static-check command.
|
|
255
247
|
Without Vite+, Bun is the required package-script runner and Dev Kit lists only
|
|
256
248
|
quality scripts the root package actually declares. The package manager named
|
|
@@ -291,7 +283,7 @@ worktree converges its own copy during install while the project-owned
|
|
|
291
283
|
## Vite+ quality setup
|
|
292
284
|
|
|
293
285
|
The repository always owns `vite.config.ts`. Compose Dev Kit's quality defaults
|
|
294
|
-
from that project-owned config, then opt into the
|
|
286
|
+
from that project-owned config, then opt into the scaffolded GitHub Actions
|
|
295
287
|
workflow independently:
|
|
296
288
|
|
|
297
289
|
```ts
|
|
@@ -321,13 +313,6 @@ Project and framework-generated paths belong in `ignorePatterns` as shown;
|
|
|
321
313
|
custom harness target paths belong there too. Dev Kit does not grow a global
|
|
322
314
|
framework ignore list.
|
|
323
315
|
|
|
324
|
-
Vite+ 0.2.6 forwards JavaScript-plugin declarations into its effective lint
|
|
325
|
-
config but its bundled native Oxlint path does not register or execute those
|
|
326
|
-
rules. Native Oxlint rules and Oxfmt settings remain active; run standalone
|
|
327
|
-
Oxlint when enforcement of Dev Kit's `effect/*` or
|
|
328
|
-
`stylistic/padding-line-between-statements` rules is required. This limitation
|
|
329
|
-
can be removed once a supported Vite+ release executes configured JS plugins.
|
|
330
|
-
|
|
331
316
|
```jsonc
|
|
332
317
|
{
|
|
333
318
|
"include": ["dev-kit", "effect"],
|
|
@@ -335,19 +320,24 @@ can be removed once a supported Vite+ release executes configured JS plugins.
|
|
|
335
320
|
"effectTsgo": { "enabled": true },
|
|
336
321
|
"vitePlus": {
|
|
337
322
|
"hooks": { "enabled": true },
|
|
338
|
-
"
|
|
339
|
-
"workflow": { "enabled": true },
|
|
340
|
-
},
|
|
323
|
+
"workflow": { "enabled": true },
|
|
341
324
|
},
|
|
342
325
|
},
|
|
343
326
|
}
|
|
344
327
|
```
|
|
345
328
|
|
|
346
|
-
`
|
|
347
|
-
rewrites, adopts, or removes `vite.config.ts`.
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
329
|
+
`setup.vitePlus.workflow` scaffolds `.github/workflows/check.yml` and never
|
|
330
|
+
reads, rewrites, adopts, or removes `vite.config.ts`. Scaffolds are
|
|
331
|
+
create-only: the file is written only when missing, never recorded in
|
|
332
|
+
`dev-kit.lock.json`, and never touched again — the repository owns it from
|
|
333
|
+
creation, and disabling the task leaves it in place. Edit the YAML directly
|
|
334
|
+
for repository-specific preparation steps or a custom typecheck command; when
|
|
335
|
+
the shipped template improves, compare against the installed copy under
|
|
336
|
+
`node_modules/@danieljvdm/dev-kit/templates/` and merge what fits.
|
|
337
|
+
Scaffolding requires direct `@danieljvdm/dev-kit`, `vite-plus`, `effect`,
|
|
338
|
+
`@effect/tsgo`, and native TypeScript dependencies with
|
|
339
|
+
`setup.effectTsgo.enabled`, and the installed Vite+ must satisfy Dev Kit's
|
|
340
|
+
peer range.
|
|
351
341
|
|
|
352
342
|
Workspaces select bounded, dependency-ordered typechecking in their config:
|
|
353
343
|
|
|
@@ -363,44 +353,51 @@ export default defineConfig(
|
|
|
363
353
|
);
|
|
364
354
|
```
|
|
365
355
|
|
|
366
|
-
Each listed package must expose a pure `typecheck` script.
|
|
367
|
-
|
|
356
|
+
Each listed package must expose a pure `typecheck` script.
|
|
357
|
+
|
|
358
|
+
The scaffolded workflow performs one frozen, script-suppressed install, runs
|
|
359
|
+
`dev-kit apply --locked`, and only then runs formatting, linting, tests, and
|
|
360
|
+
`vp run typecheck`. See the primary
|
|
361
|
+
[`setup-vp` versioning guidance](https://github.com/voidzero-dev/setup-vp#versioning),
|
|
362
|
+
[Vite+ install guide](https://viteplus.dev/guide/install), and
|
|
363
|
+
[Vite Task run guide](https://viteplus.dev/guide/run) when maintaining the
|
|
364
|
+
templates.
|
|
365
|
+
|
|
366
|
+
## Worktrunk project config
|
|
367
|
+
|
|
368
|
+
Enable a scaffolded default [Worktrunk](https://worktrunk.dev) project config
|
|
369
|
+
in the manifest:
|
|
368
370
|
|
|
369
371
|
```jsonc
|
|
370
372
|
{
|
|
373
|
+
"include": ["dev-kit"],
|
|
371
374
|
"setup": {
|
|
372
|
-
"
|
|
373
|
-
"vitePlus": {
|
|
374
|
-
"quality": {
|
|
375
|
-
"workflow": {
|
|
376
|
-
"enabled": true,
|
|
377
|
-
"beforeChecks": [
|
|
378
|
-
{
|
|
379
|
-
"name": "Install media tools",
|
|
380
|
-
"run": ["sudo apt-get update", "sudo apt-get install --yes ffmpeg"],
|
|
381
|
-
},
|
|
382
|
-
],
|
|
383
|
-
"typecheck": [
|
|
384
|
-
"vp run -F './apps/*' -F './packages/*' check",
|
|
385
|
-
"vp exec tsc --noEmit -p scripts/tsconfig.json",
|
|
386
|
-
],
|
|
387
|
-
},
|
|
388
|
-
},
|
|
389
|
-
},
|
|
375
|
+
"worktrunk": { "config": { "enabled": true } },
|
|
390
376
|
},
|
|
391
377
|
}
|
|
392
378
|
```
|
|
393
379
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
380
|
+
`setup.worktrunk.config` scaffolds `.config/wt.toml` with the portable hooks an
|
|
381
|
+
app repository wants in every worktree: a `pre-start` pipeline that copies
|
|
382
|
+
gitignored files matched by `.worktreeinclude` (a no-op without that file) and
|
|
383
|
+
then installs dependencies, plus a `pre-merge` full-validation hook. Hook
|
|
384
|
+
commands render for the repository's command runner: a direct `vite-plus`
|
|
385
|
+
dependency selects `vp install` and `vp run check`; otherwise Dev Kit requires
|
|
386
|
+
a declared root `check` package script, runs it through `bun run check`, and
|
|
387
|
+
takes the install command from the detected package manager. Repositories with
|
|
388
|
+
neither fail the plan instead of shipping a broken hook.
|
|
389
|
+
|
|
390
|
+
The config follows the same create-only scaffold semantics as the check
|
|
391
|
+
workflow above: created once, never locked or touched again, owned by the
|
|
392
|
+
repository. Edit hooks freely after creation.
|
|
393
|
+
|
|
394
|
+
The config intentionally carries no worktree-path template or other user
|
|
395
|
+
preferences—those belong in each user's `~/.config/worktrunk/config.toml`. A
|
|
396
|
+
commented `post-start` block shows how to run a per-worktree dev server on a
|
|
397
|
+
stable branch-derived port (`{{ branch | hash_port }}`) under `wt step tether`;
|
|
398
|
+
point it at the repository's dev entrypoint and uncomment to opt in. Worktrunk
|
|
399
|
+
never runs project hooks until each user approves them with
|
|
400
|
+
`wt config approvals add`.
|
|
404
401
|
|
|
405
402
|
## Effect source checkout
|
|
406
403
|
|
|
@@ -522,31 +519,20 @@ bun x dev-kit add @tanstack/ai#ai-core
|
|
|
522
519
|
That writes `@tanstack/ai#ai-core` to `dev-kit.jsonc` and, unless
|
|
523
520
|
`--no-apply` is passed, installs it through the normal ownership-safe sync
|
|
524
521
|
path. The qualifier prevents ambiguity when two dependencies publish the same
|
|
525
|
-
skill name, and the installed output carries it
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
`devDependencies`, `optionalDependencies`, or `peerDependencies` are
|
|
540
|
-
scanned;
|
|
541
|
-
- package code is never imported or executed;
|
|
542
|
-
- npm-style and pnpm/workspace symlinks under `node_modules` are supported;
|
|
543
|
-
- Yarn Plug'n'Play and transitive dependency traversal are not scanned; and
|
|
544
|
-
- immediate `skills/<name>/SKILL.md` roots are listed. Nested topic skills and
|
|
545
|
-
references remain part of that root and are copied with it.
|
|
546
|
-
|
|
547
|
-
The last rule adapts Intent's routed, nested skill trees to the immediate folder
|
|
548
|
-
and frontmatter-name invariants expected by Agent Skills targets. Dev Kit does
|
|
549
|
-
not rewrite nested names or ask Intent to manage agent configuration.
|
|
522
|
+
skill name, and the installed output carries it: the copied directory flattens
|
|
523
|
+
the package name and appends the skill name (`@tanstack/ai#ai-core` →
|
|
524
|
+
`tanstack-ai-ai-core`), and the copied `SKILL.md` frontmatter `name:` is
|
|
525
|
+
rewritten to match because harnesses identify a skill by its directory name.
|
|
526
|
+
Symlink-mode targets link straight into `node_modules`, so only the link
|
|
527
|
+
carries the qualified name. Two selections that would write the same
|
|
528
|
+
destination are rejected before any output changes.
|
|
529
|
+
|
|
530
|
+
The compatibility boundary is intentionally small and deterministic: only the
|
|
531
|
+
root project's direct dependencies are scanned, package code is never imported
|
|
532
|
+
or executed, npm-style and pnpm/workspace symlinks are supported (Yarn
|
|
533
|
+
Plug'n'Play and transitive traversal are not), and only immediate
|
|
534
|
+
`skills/<name>/SKILL.md` roots are listed — nested topic skills and references
|
|
535
|
+
are copied as part of their root.
|
|
550
536
|
|
|
551
537
|
The project `dev-kit.lock.json` records the selected package name, installed
|
|
552
538
|
version, original bare skill name, and the `node_modules` content digest.
|
|
@@ -652,7 +638,11 @@ export default defineConfig({
|
|
|
652
638
|
The Oxlint preset enables `stylistic/padding-line-between-statements`: adjacent
|
|
653
639
|
variable declarations remain grouped, while the next logical statement and
|
|
654
640
|
all `return` statements require a separating blank line. The rule is fixable,
|
|
655
|
-
so `vp lint --fix` repairs missing spacing automatically.
|
|
641
|
+
so `vp lint --fix` repairs missing spacing automatically. Vite+ 0.2.6 forwards
|
|
642
|
+
the preset's JavaScript-plugin declarations but its native Oxlint path does not
|
|
643
|
+
execute their rules — run standalone Oxlint when `effect/*` or the padding rule
|
|
644
|
+
must be enforced, until a supported Vite+ release executes configured JS
|
|
645
|
+
plugins.
|
|
656
646
|
|
|
657
647
|
The preset also registers the shared `effect` JavaScript plugin. Effect
|
|
658
648
|
projects opt into its rules in path-specific overrides, for example
|
package/dev-kit.example.jsonc
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
"effectTsgo": { "enabled": true },
|
|
9
9
|
"vitePlus": {
|
|
10
10
|
"hooks": { "enabled": true },
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
"workflow": { "enabled": true },
|
|
12
|
+
},
|
|
13
|
+
"worktrunk": {
|
|
14
|
+
"config": { "enabled": true },
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
"targets": {
|
package/package.json
CHANGED
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
},
|
|
49
49
|
"vitePlus": {
|
|
50
50
|
"$ref": "#/$defs/vitePlusSetup"
|
|
51
|
+
},
|
|
52
|
+
"worktrunk": {
|
|
53
|
+
"$ref": "#/$defs/worktrunkSetup"
|
|
51
54
|
}
|
|
52
55
|
},
|
|
53
56
|
"default": {}
|
|
@@ -144,8 +147,8 @@
|
|
|
144
147
|
"hooks": {
|
|
145
148
|
"$ref": "#/$defs/vitePlusHooksSetup"
|
|
146
149
|
},
|
|
147
|
-
"
|
|
148
|
-
"$ref": "#/$defs/
|
|
150
|
+
"workflow": {
|
|
151
|
+
"$ref": "#/$defs/vitePlusWorkflowSetup"
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
154
|
},
|
|
@@ -160,61 +163,35 @@
|
|
|
160
163
|
}
|
|
161
164
|
}
|
|
162
165
|
},
|
|
163
|
-
"
|
|
164
|
-
"description": "
|
|
166
|
+
"vitePlusWorkflowSetup": {
|
|
167
|
+
"description": "Scaffold the canonical GitHub Actions check workflow (.github/workflows/check.yml); the repository owns the file after creation.",
|
|
165
168
|
"type": "object",
|
|
166
169
|
"additionalProperties": false,
|
|
167
170
|
"properties": {
|
|
168
|
-
"
|
|
169
|
-
"
|
|
171
|
+
"enabled": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"default": false
|
|
170
174
|
}
|
|
171
175
|
}
|
|
172
176
|
},
|
|
173
|
-
"
|
|
174
|
-
"description": "Manage
|
|
177
|
+
"worktrunkSetup": {
|
|
178
|
+
"description": "Manage project-local Worktrunk setup tasks.",
|
|
175
179
|
"type": "object",
|
|
176
180
|
"additionalProperties": false,
|
|
177
181
|
"properties": {
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"default": false
|
|
181
|
-
},
|
|
182
|
-
"beforeChecks": {
|
|
183
|
-
"description": "Repository-specific preparation steps inserted after locked setup verification and before quality checks.",
|
|
184
|
-
"type": "array",
|
|
185
|
-
"items": {
|
|
186
|
-
"$ref": "#/$defs/vitePlusQualityWorkflowStep"
|
|
187
|
-
},
|
|
188
|
-
"default": []
|
|
189
|
-
},
|
|
190
|
-
"typecheck": {
|
|
191
|
-
"description": "Shell commands for the workflow's pure typecheck step.",
|
|
192
|
-
"type": "array",
|
|
193
|
-
"minItems": 1,
|
|
194
|
-
"items": {
|
|
195
|
-
"type": "string",
|
|
196
|
-
"minLength": 1
|
|
197
|
-
},
|
|
198
|
-
"default": ["vp run typecheck"]
|
|
182
|
+
"config": {
|
|
183
|
+
"$ref": "#/$defs/worktrunkConfigSetup"
|
|
199
184
|
}
|
|
200
185
|
}
|
|
201
186
|
},
|
|
202
|
-
"
|
|
187
|
+
"worktrunkConfigSetup": {
|
|
188
|
+
"description": "Scaffold the default Worktrunk project config (.config/wt.toml) with portable pre-start and pre-merge hooks rendered for the repository's command runner; the repository owns the file after creation.",
|
|
203
189
|
"type": "object",
|
|
204
190
|
"additionalProperties": false,
|
|
205
|
-
"required": ["name", "run"],
|
|
206
191
|
"properties": {
|
|
207
|
-
"
|
|
208
|
-
"type": "
|
|
209
|
-
"
|
|
210
|
-
},
|
|
211
|
-
"run": {
|
|
212
|
-
"type": "array",
|
|
213
|
-
"minItems": 1,
|
|
214
|
-
"items": {
|
|
215
|
-
"type": "string",
|
|
216
|
-
"minLength": 1
|
|
217
|
-
}
|
|
192
|
+
"enabled": {
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"default": false
|
|
218
195
|
}
|
|
219
196
|
}
|
|
220
197
|
},
|