@danieljvdm/dev-kit 0.18.0 → 1.0.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 (45) hide show
  1. package/README.md +148 -659
  2. package/package.json +8 -62
  3. package/skill-sources.jsonc +1 -0
  4. package/skill-sources.lock.json +5 -1
  5. package/skills/dev-kit/SKILL.md +42 -212
  6. package/skills/dev-kit/agents/openai.yaml +2 -2
  7. package/skills/dev-kit/references/cloudflare-worker-api.md +37 -0
  8. package/skills/dev-kit/references/default-typescript-repository.md +43 -0
  9. package/skills/dev-kit/references/legacy-eject.md +46 -0
  10. package/skills/dev-kit/references/repository-setup.md +53 -0
  11. package/skills/dev-kit/references/skills.md +35 -0
  12. package/src/bin/dev-kit.ts +142 -127
  13. package/src/eject.ts +715 -0
  14. package/src/legacy-project.ts +67 -0
  15. package/src/oxfmt.ts +1 -4
  16. package/src/oxlint.ts +5 -10
  17. package/src/path-digest.ts +60 -0
  18. package/src/project-skills.ts +722 -0
  19. package/src/tool-metadata.ts +0 -2
  20. package/src/vendor.ts +0 -5
  21. package/src/vite-plus.ts +1 -3
  22. package/dev-kit.example.jsonc +0 -22
  23. package/schema/dev-kit.schema.json +0 -218
  24. package/schema/skill-sources.schema.json +0 -83
  25. package/scripts/sync-anti-slop-runtime.mjs +0 -19
  26. package/src/index.ts +0 -125
  27. package/src/manifest.ts +0 -224
  28. package/src/oxfmt.js +0 -23
  29. package/src/oxlint-plugin-anti-slop/runtime.d.ts +0 -22
  30. package/src/oxlint-plugin-effect.d.ts +0 -19
  31. package/src/oxlint-plugin-style.d.ts +0 -8
  32. package/src/oxlint.js +0 -113
  33. package/src/project-state.ts +0 -122
  34. package/src/scaffold.ts +0 -79
  35. package/src/skill-manager.ts +0 -527
  36. package/src/sync.ts +0 -1935
  37. package/src/tool-ignore-patterns.js +0 -9
  38. package/src/vite-plus-dependency.ts +0 -69
  39. package/src/vite-plus-hooks.ts +0 -175
  40. package/src/vite-plus-workflow.ts +0 -82
  41. package/src/vite-plus.js +0 -88
  42. package/src/worktrunk-config.ts +0 -88
  43. package/templates/AGENTS.md +0 -11
  44. package/templates/vite-plus/github-actions-check.yml +0 -51
  45. package/templates/worktrunk/wt.toml +0 -27
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@danieljvdm/dev-kit",
3
- "version": "0.18.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
- "description": "Declarative project development toolkit with portable agent skills.",
5
+ "description": "Agent-led TypeScript repository setup and curated portable skills.",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -12,59 +12,21 @@
12
12
  "dev-kit": "bin/dev-kit.mjs"
13
13
  },
14
14
  "files": [
15
- "dev-kit.example.jsonc",
16
15
  "bin/",
17
- "schema/",
18
16
  "skills/",
19
17
  "skill-sources.jsonc",
20
18
  "skill-sources.lock.json",
21
- "src/",
22
- "scripts/",
23
- "templates/"
19
+ "src/"
24
20
  ],
25
21
  "type": "module",
26
- "exports": {
27
- ".": {
28
- "types": "./src/index.ts",
29
- "default": "./src/index.ts"
30
- },
31
- "./schema": "./schema/dev-kit.schema.json",
32
- "./schema/dev-kit.schema.json": "./schema/dev-kit.schema.json",
33
- "./schema/skill-sources.schema.json": "./schema/skill-sources.schema.json",
34
- "./oxlint": {
35
- "types": "./src/oxlint.ts",
36
- "default": "./src/oxlint.js"
37
- },
38
- "./oxfmt": {
39
- "types": "./src/oxfmt.ts",
40
- "default": "./src/oxfmt.js"
41
- },
42
- "./vite-plus": {
43
- "types": "./src/vite-plus.ts",
44
- "default": "./src/vite-plus.js"
45
- },
46
- "./oxlint-plugin-effect": {
47
- "types": "./src/oxlint-plugin-effect.d.ts",
48
- "default": "./src/oxlint-plugin-effect.js"
49
- },
50
- "./oxlint-plugin-anti-slop": {
51
- "types": "./src/oxlint-plugin-anti-slop/runtime.d.ts",
52
- "default": "./src/oxlint-plugin-anti-slop/runtime.js"
53
- },
54
- "./oxlint-plugin-style": {
55
- "types": "./src/oxlint-plugin-style.d.ts",
56
- "default": "./src/oxlint-plugin-style.js"
57
- }
58
- },
22
+ "exports": {},
59
23
  "scripts": {
60
- "prepare": "./bin/dev-kit.mjs apply --locked",
24
+ "prepare": "./bin/dev-kit.mjs effect sync && ./bin/dev-kit.mjs tsgo patch && vp config --no-agent",
61
25
  "dev-kit": "./bin/dev-kit.mjs",
62
26
  "changeset": "changeset",
63
- "version-packages": "changeset version && ./bin/dev-kit.mjs apply",
27
+ "version-packages": "changeset version",
64
28
  "release": "changeset publish",
65
29
  "lint": "vp lint",
66
- "plan": "./bin/dev-kit.mjs plan",
67
- "apply": "./bin/dev-kit.mjs apply",
68
30
  "gitignore": "./bin/dev-kit.mjs gitignore",
69
31
  "effect:sync": "./bin/dev-kit.mjs effect sync",
70
32
  "test": "vp test",
@@ -77,8 +39,6 @@
77
39
  },
78
40
  "dependencies": {
79
41
  "@effect/platform-bun": "4.0.0-beta.107",
80
- "@oxlint/plugins": "1.78.0",
81
- "@stylistic/eslint-plugin": "5.10.0",
82
42
  "effect": "4.0.0-beta.107",
83
43
  "jsonc-parser": "3.3.1",
84
44
  "semver": "7.8.5"
@@ -88,6 +48,8 @@
88
48
  "@effect/platform-node": "4.0.0-beta.107",
89
49
  "@effect/tsgo": "0.36.4",
90
50
  "@effect/vitest": "4.0.0-beta.107",
51
+ "@oxlint/plugins": "1.78.0",
52
+ "@stylistic/eslint-plugin": "5.10.0",
91
53
  "@types/node": "25.9.1",
92
54
  "@types/semver": "7.8.0",
93
55
  "oxfmt": "0.60.0",
@@ -96,22 +58,6 @@
96
58
  "vite-plus": "0.2.6",
97
59
  "vitest": "4.1.10"
98
60
  },
99
- "peerDependencies": {
100
- "oxfmt": ">=0.60.0 <0.61.0",
101
- "oxlint": ">=1.78.0 <2.0.0",
102
- "vite-plus": ">=0.2.6 <0.3.0"
103
- },
104
- "peerDependenciesMeta": {
105
- "oxfmt": {
106
- "optional": true
107
- },
108
- "oxlint": {
109
- "optional": true
110
- },
111
- "vite-plus": {
112
- "optional": true
113
- }
114
- },
115
61
  "overrides": {
116
62
  "@effect/platform-node-shared": "4.0.0-beta.107"
117
63
  },
@@ -7,6 +7,7 @@
7
7
  "ref": "main",
8
8
  "skillsPath": "skills",
9
9
  "include": [
10
+ "animate-expo",
10
11
  "animation-vocabulary",
11
12
  "apple-design",
12
13
  "emil-design-eng",
@@ -5,9 +5,10 @@
5
5
  "id": "emilkowalski-skills",
6
6
  "repository": "https://github.com/emilkowalski/skills.git",
7
7
  "ref": "main",
8
- "resolved": "70744e3816f1d93eafb697161a8b880a7384c5ff",
8
+ "resolved": "e879241fab3cdb22e8d95587cdbf40b57a88d7da",
9
9
  "skillsPath": "skills",
10
10
  "include": [
11
+ "animate-expo",
11
12
  "animation-vocabulary",
12
13
  "apple-design",
13
14
  "emil-design-eng",
@@ -18,6 +19,7 @@
18
19
  "review-animations"
19
20
  ],
20
21
  "skills": [
22
+ "animate-expo",
21
23
  "animation-vocabulary",
22
24
  "apple-design",
23
25
  "emil-design-eng",
@@ -28,6 +30,7 @@
28
30
  "review-animations"
29
31
  ],
30
32
  "descriptions": {
33
+ "animate-expo": "Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.",
31
34
  "animation-vocabulary": "Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term (\"the bouncy thing when a popover opens\" → Pop in; \"the iOS rubber-band scroll\" → Rubber-banding). Use when the user asks \"what's it called when…\", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.",
32
35
  "apple-design": "Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.",
33
36
  "emil-design-eng": "This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.",
@@ -38,6 +41,7 @@
38
41
  "review-animations": "Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned."
39
42
  },
40
43
  "digests": {
44
+ "animate-expo": "sha256:c9ad6c07908409ed2fa9fecf288196e77325be2cf29e5a03b8aaaecb451709a2",
41
45
  "animation-vocabulary": "sha256:d270769a8a19c8ff48489c118e19d5f86113c6acfdd0e981116ffd74b01b9e6b",
42
46
  "apple-design": "sha256:dabc421a391bd6b2ba0d004a8f4d4a1b632fc003a45d4676ab9f2ade8099fc7b",
43
47
  "emil-design-eng": "sha256:cedac6e0b7ff8ca471d5d2b35dc7d91f13b57ff57c4395822e677f0df7ecebc8",
@@ -1,218 +1,48 @@
1
1
  ---
2
2
  name: dev-kit
3
- description: Dev-kit operations for projects that configure dev-kit.jsonc, sync portable skills, run plan/apply or automatic postinstalls, perform locked CI checks, maintain dev-kit.lock.json, resolve ownership conflicts, or enable Effect TypeScript-Go.
3
+ description: Set up or reshape TypeScript repositories through agent-led, repo-owned changes. Use when scaffolding a new repository, establishing or modernizing project tooling, adding an application or package, composing a Cloudflare Worker API, ejecting legacy dev-kit.jsonc and dev-kit.lock.json management, or copying and updating curated agent skills with the transient Dev Kit CLI.
4
4
  ---
5
5
 
6
6
  # Dev Kit
7
7
 
8
- Treat `dev-kit.jsonc` as desired state, `dev-kit.lock.json` as the committed
9
- resolution, and `.dev-kit/state.json` as local ownership receipts. Deep
10
- reference catalog maintenance, package-skill discovery rules, preset
11
- internals — lives in the package README
12
- (`node_modules/@danieljvdm/dev-kit/README.md`).
13
-
14
- Use the high-level commands for routine changes: `dev-kit init`, `dev-kit add
15
- <skill...>`, `dev-kit remove <skill...>`, `dev-kit list --all`, `dev-kit search
16
- <words...>`, and `dev-kit info <skill>`. Add and remove apply immediately unless
17
- passed `--no-apply`; `dev-kit sync` applies an already-edited manifest.
18
-
19
- ## Apply loop
20
-
21
- 1. Establish the Git root. Read project agent instructions, the current
22
- manifest and lock, package and workspace manifests, framework and tool
23
- configuration, representative source boundaries, and CI workflows. Build a
24
- concrete inventory of the platforms, frameworks, tools, and workflows the
25
- repository actually uses; do not infer capabilities from a product or
26
- company name alone.
27
- 2. Run `dev-kit list --all`, then use `dev-kit search <terms>` and `dev-kit info
28
- <skill>` for each capability in the inventory. Compare every candidate's
29
- trigger description with concrete repository evidence. Keep explicitly
30
- requested creative or advisory skills even when they have no mechanical
31
- dependency signal.
32
- 3. Choose the narrowest useful set. Prefer focused external skills over a
33
- generic umbrella; select an umbrella or source family only when its full
34
- breadth is intentionally useful, never because one member matches. Explain
35
- any uncertain inclusion before applying it. Unused `references/` folders
36
- inside a selected skill cost repository space, not agent context, so a
37
- multi-product repository can justify an umbrella while still excluding
38
- unrelated top-level skills.
39
- 4. Update `dev-kit.jsonc`. Preserve JSONC comments and validate against the
40
- package schema. Finish with each desired resource represented once and every
41
- external selection supported by repository evidence or an explicit request.
42
- 5. Run `dev-kit plan`. Use `--manifest`, `--project-dir`, or `--lockfile` when
43
- the project overrides their defaults. Planning is read-only; inspect every
44
- create, update, remove, adoption, and conflict before proceeding. Finish
45
- when the plan contains only intended actions and understood conflicts.
46
- 6. Resolve conflicts, then run `dev-kit apply`. Commit the manifest and
47
- regenerated `dev-kit.lock.json`; keep `.dev-kit/` local. Finish when a second
48
- plan reports only unchanged resources and setup tasks.
49
-
50
- ## Manifest
51
-
52
- Use skill names or family names in `include`; subtract selections with
53
- `exclude`. Built-in families such as `effect` are intentional bundles. Include
54
- this skill as `dev-kit` when project agents should carry the toolkit
55
- procedure. Skills bundled inside installed packages need the exact
56
- `<package>#<skill>` selector; the copied output flattens that identity into
57
- one directory name (`@tanstack/table-core#core` → `tanstack-table-core-core`)
58
- and rewrites the copied frontmatter `name:` to match.
59
-
60
- ```jsonc
61
- {
62
- "$schema": "./node_modules/@danieljvdm/dev-kit/schema/dev-kit.schema.json",
63
- "include": ["dev-kit", "effect"],
64
- "setup": {
65
- "agentInstructions": { "enabled": true },
66
- "claudeInstructions": { "enabled": true },
67
- "vitePlus": {
68
- "hooks": { "enabled": true },
69
- "workflow": { "enabled": true },
70
- },
71
- "worktrunk": {
72
- "config": { "enabled": true },
73
- },
74
- },
75
- "targets": {
76
- "agents": { "enabled": true, "mode": "copy" },
77
- "claude": { "enabled": true, "mode": "symlink" },
78
- },
79
- }
80
- ```
81
-
82
- Prefer a copied `.agents/skills` target as the project-local source of truth;
83
- use symlinks for additional harness discovery paths. Keep every target path
84
- project-relative and separate from the manifest, lock, and state paths.
85
-
86
- ## Managed instructions
87
-
88
- `setup.agentInstructions` manages marked sections in the project-root
89
- `AGENTS.md` and preserves handwritten content around them; edit only outside
90
- the markers. The section points agents at this skill, renders the repository's
91
- command policy from live evidence (a direct `vite-plus` dependency makes `vp`
92
- the only front door; otherwise Bun runs declared root scripts), and adds the
93
- Effect guide pointer when the installed `effect` package ships one. Treat
94
- duplicate, overlapping, reversed, or unmatched managed markers as a conflict
95
- rather than guessing which content Dev Kit owns. Never substitute another
96
- script runner or call raw `tsc`, test, lint, or format binaries when a project
97
- command exists.
98
-
99
- `setup.claudeInstructions` manages `CLAUDE.md` as a relative symlink to
100
- `AGENTS.md`. Disabling either task removes only unchanged managed content and
101
- leaves handwritten content in place.
102
-
103
- ## Vite+ setup
104
-
105
- The repository always owns `vite.config.ts`. Compose
106
- `createRecommendedVitePlusConfig` from `@danieljvdm/dev-kit/vite-plus` there,
107
- adding repository/framework-generated paths (and any overridden harness target
108
- paths) through `ignorePatterns`. Spread the returned top-level config before
109
- local options, spread a returned nested block before overriding it, and merge
110
- nested collections such as `lint.rules` so the recommended rules stay active.
111
- The factory provides matching Oxlint/Oxfmt ignores, staged checks, and
112
- separate `check` and pure `typecheck` tasks; standalone Oxc projects import
113
- `recommendedOxlintConfig`/`recommendedOxfmtConfig` directly.
114
-
115
- Run the Effect-patched compiler separately with `vp run typecheck`; neither
116
- Oxlint's bundled `tsgolint` nor Vite+'s native lint path uses the Effect patch.
117
- Keep Oxlint and `@oxlint/plugins` on the matching version expected by the
118
- preset so Vite+ can execute its JavaScript plugins. The `effect` plugin's
119
- scope-sensitive rules stay consumer-scoped: enable them per path in
120
- Effect-owned code, with exceptions for tests and host boundaries.
121
-
122
- `setup.vitePlus.hooks` converges the Git-ignored `.vite-hooks/_` dispatcher by
123
- running the project-local `vp config --no-agent`, recreating it in linked
124
- worktrees. It requires a direct `vite-plus` dependency, refuses to replace an
125
- unrelated `core.hooksPath`, and is skipped per invocation with
126
- `VITE_GIT_HOOKS=0` or `HUSKY=0`.
127
-
128
- ## Scaffolds
129
-
130
- `setup.vitePlus.workflow` and `setup.worktrunk.config` are create-only
131
- scaffolds: apply writes the file only when it is missing, records nothing in
132
- the lock, and never reads, updates, or removes an existing file — the
133
- repository owns it from creation and edits it directly. When the shipped
134
- template improves, diff the repository's file against the installed template
135
- under `node_modules/@danieljvdm/dev-kit/templates/` and merge what fits.
136
-
137
- - `setup.vitePlus.workflow` scaffolds `.github/workflows/check.yml`. It
138
- requires direct Dev Kit, compatible Vite+, Effect, Effect TypeScript-Go, and
139
- native TypeScript dependencies with `setup.effectTsgo.enabled`. Add
140
- preparation steps or a custom typecheck command by editing the YAML.
141
- - `setup.worktrunk.config` scaffolds `.config/wt.toml`: a
142
- copy-ignored-then-install pre-start pipeline, a full-validation pre-merge
143
- hook, and a commented per-worktree dev-server block to enable deliberately.
144
- Hook commands render for the repository's runner — `vp` with a direct
145
- `vite-plus` dependency, otherwise the detected package manager's install
146
- command with `bun run check` from a declared root `check` script. Keep
147
- user-level Worktrunk settings such as worktree-path templates out of the
148
- project config; each user approves the hooks once with
149
- `wt config approvals add`.
150
-
151
- ## Ownership and conflicts
152
-
153
- Dev-kit adopts an existing destination only when its digest exactly matches a
154
- committed lock entry. Local receipts authorize later updates and cleanup only
155
- while the managed output still matches its recorded digest.
156
-
157
- Preserve a conflicting path and inspect it:
158
-
159
- - For an unknown destination, choose a different target or deliberately move
160
- the user-owned content before applying.
161
- - For a modified managed destination, reconcile the local edits or restore its
162
- recorded content before applying.
163
- - For a locked-plan mismatch, run an unlocked apply only when intentionally
164
- updating desired state, review the new lock, and commit it.
165
-
166
- Retain `.dev-kit/state.json` across routine applies and branch changes so its
167
- receipts can update or remove previously applied outputs safely.
168
-
169
- ## Lifecycle
170
-
171
- Run `dev-kit gitignore` to add `.repos/` and `.dev-kit/` additively
172
- (`--dry-run` to preview). For one lifecycle entry point, configure:
173
-
174
- ```jsonc
175
- {
176
- "scripts": {
177
- "postinstall": "dev-kit apply",
178
- },
179
- }
180
- ```
181
-
182
- This intentionally refreshes the committed lock and owned outputs when an
183
- installed Dev Kit or selected package-skill version changes; review and commit
184
- those changes with the dependency update. Keep `dev-kit apply --locked` as a
185
- verification command, never the local lifecycle, and never run an unlocked
186
- apply before locked verification. Invoke locked consumer verification as
187
- `bun ./node_modules/@danieljvdm/dev-kit/bin/dev-kit.mjs apply --locked` so a
188
- package script named `dev-kit` cannot shadow the executable.
189
-
190
- ## Effect setup tasks
191
-
192
- `setup.effectSource` converges the ignored `.repos/effect` checkout on the
193
- `effect@<version>` tag matching the installed package. It skips CI, preserves
194
- a dirty or unrelated destination, and never deletes the checkout when
195
- disabled. Diagnose with `dev-kit effect sync --dry-run`; override
196
- `packageName`, `path`, or `repository` only for a compatible Effect
197
- distribution.
198
-
199
- `setup.effectTsgo` validates and patches the project-local native TypeScript
200
- compiler. Install the exact `@effect/tsgo` and `typescript` versions required
201
- by the installed dev-kit, point `tsconfig.json` at
202
- `./node_modules/@effect/tsgo/schema.json`, and configure the
203
- `@effect/language-service` plugin with the `recommendedEffectTsgoPlugin`
204
- profile — copy the exact JSON from the package README. In monorepos, child
205
- `compilerOptions.plugins` arrays replace rather than merge the root array, so
206
- workspace configs must inherit the root plugin without redeclaring it, and the
207
- `src/**/*.ts` override must be relative to the config that contains it.
208
- Diagnose with `dev-kit tsgo patch --dry-run`; use `--force` only after the
209
- user accepts a potentially commit-incompatible TypeScript binary.
210
-
211
- ## Current boundary
212
-
213
- Manage skill outputs, the `setup.agentInstructions` marked sections, the
214
- `setup.claudeInstructions` link, the `setup.vitePlus.hooks` dispatcher, the
215
- `setup.effectSource` checkout, and the explicit `setup.effectTsgo` task. The
216
- `setup.vitePlus.workflow` and `setup.worktrunk.config` scaffolds belong to the
217
- repository once created. `vite.config.ts`, dependency, and `tsconfig.json`
218
- contributions remain deliberate user-owned edits.
8
+ Build repositories from intent, then leave every output under normal repository
9
+ ownership. Use the transient CLI for catalog and migration mechanics; use agent
10
+ judgment for architecture and configuration.
11
+
12
+ ## Route
13
+
14
+ Read every reference whose branch applies before editing:
15
+
16
+ - Read [repository-setup.md](references/repository-setup.md) for every new,
17
+ existing, or expanded repository.
18
+ - Read [default-typescript-repository.md](references/default-typescript-repository.md)
19
+ when the user wants the Dev Kit default or a Vite+ TypeScript foundation.
20
+ - Read [cloudflare-worker-api.md](references/cloudflare-worker-api.md) when adding
21
+ a Cloudflare Worker, Worker API, bindings, Durable Objects, or Wrangler.
22
+ - Read [legacy-eject.md](references/legacy-eject.md) when `dev-kit.jsonc`,
23
+ `dev-kit.lock.json`, `.dev-kit/state.json`, managed markers, or Dev Kit config
24
+ imports exist.
25
+ - Read [skills.md](references/skills.md) when discovering, adding, refreshing,
26
+ merging, or detaching repository skills.
27
+
28
+ ## Workflow
29
+
30
+ 1. Establish the Git root and read repository instructions. Inventory package
31
+ manifests, workspaces, tool configuration, source boundaries, CI, and current
32
+ validation commands. Finish with every existing convention that constrains
33
+ the change accounted for.
34
+ 2. Translate the request into outcomes and invariants. Resolve consequential
35
+ choices with the user; infer naming and file placement from repository
36
+ evidence. Finish with a coherent target architecture rather than a list of
37
+ templates.
38
+ 3. Present the material file, dependency, and command changes before broad or
39
+ destructive work. Treat existing files as repository-owned and reconcile
40
+ them in place.
41
+ 4. Implement against current installed APIs and local documentation. When the
42
+ repository uses Effect, read `node_modules/effect/AGENTS.md` completely before
43
+ writing Effect code and follow its relevant references.
44
+ 5. Run the repository's command authority and exercise the changed behavior.
45
+ Finish when validation passes and the generated setup works from the same
46
+ entry points future contributors will use.
47
+ 6. Hand off the architecture and any deliberate choices. The finished repository
48
+ has no Dev Kit dependency, manifest, lock, lifecycle hook, or managed output.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Dev Kit"
3
- short_description: "Configure and apply portable project tooling"
4
- default_prompt: "Use $dev-kit to configure and safely apply this project's development toolkit."
3
+ short_description: "Build an agent-ready TypeScript repository"
4
+ default_prompt: "Use $dev-kit to set up this repository from my requirements and leave every result repo-owned."
@@ -0,0 +1,37 @@
1
+ # Cloudflare Worker API
2
+
3
+ Use the `build-effect-apis`, `workers-best-practices`, and `wrangler` skills when
4
+ they are available. Read current installed or primary Cloudflare documentation
5
+ before choosing Wrangler configuration, compatibility dates, bindings, or local
6
+ development commands.
7
+
8
+ ## Boundary
9
+
10
+ Model the Worker as a deployable package with an explicit host boundary. Keep
11
+ contracts and application services independent of Worker globals. Translate
12
+ bindings, requests, execution context, and platform failures at the entry point,
13
+ then assemble the application layer once.
14
+
15
+ When the repository uses Effect, define shared HTTP contracts before handlers,
16
+ keep failures typed through the application, and connect the final handler to
17
+ the Worker adapter. Generate clients or OpenAPI from the same contract when the
18
+ product needs them.
19
+
20
+ ## Configuration
21
+
22
+ Derive binding types from Wrangler configuration and include the generated file
23
+ in the package's typecheck without hand-maintained ambient duplicates. Separate
24
+ secret names from secret values. Scope environment-specific resources in
25
+ Wrangler rather than branching through application code.
26
+
27
+ Integrate Worker development, type generation, deployment, and dry-run commands
28
+ into the repository's existing command authority. Add the narrow Cloudflare
29
+ skills that match the selected products; a Worker alone does not justify every
30
+ Cloudflare skill.
31
+
32
+ ## Completion
33
+
34
+ Generate bindings, run repository validation, build or dry-run the Worker, and
35
+ exercise one request through the actual Worker entry point. Account for streaming,
36
+ request cancellation, background work, observability, and binding failures before
37
+ declaring the API ready.
@@ -0,0 +1,43 @@
1
+ # Default TypeScript repository
2
+
3
+ Use this branch when the user requests the Dev Kit default or chooses Vite+ as
4
+ the repository toolchain. Adapt package boundaries to the requested product;
5
+ the defaults below are invariants, not a fixed directory template.
6
+
7
+ ## Foundation
8
+
9
+ - Use Bun as the package manager and declare its version through `packageManager`.
10
+ - Use Vite+ as the command authority for install, format, lint, tests, typecheck,
11
+ builds, and repository tasks. Read its installed documentation before choosing
12
+ config keys or commands.
13
+ - Keep `vite.config.ts`, TypeScript configs, lint plugins, ignore patterns, and
14
+ task composition local and repository-owned.
15
+ - Give formatting, linting, tests, and pure typechecking distinct commands, then
16
+ compose them into one full validation task.
17
+ - Make CI invoke the same repository commands developers use.
18
+ - Keep generated files and vendored source in explicit tool ignores.
19
+
20
+ ## TypeScript
21
+
22
+ Build a root configuration around the repository's actual runtime targets and
23
+ workspace graph. Let child packages inherit shared strictness while declaring
24
+ only their environment-specific libraries, paths, and emitted output. Keep
25
+ compiler plugins at the configuration level where their file globs are correct.
26
+
27
+ When Effect TypeScript-Go is selected, install its commit-matched compiler and
28
+ language service according to the installed Effect guidance. Materialize any
29
+ required patch helper into a repository-owned script so installs never depend on
30
+ Dev Kit.
31
+
32
+ ## Workspaces
33
+
34
+ Create a package only for a real deployable, reusable boundary, or independently
35
+ validated unit. Give every package a narrow public surface and a pure typecheck
36
+ task. Configure the root validation task to cover every workspace without hiding
37
+ package failures behind a root-only compiler invocation.
38
+
39
+ ## Completion
40
+
41
+ Run the full Vite+ validation and at least one real build or startup path. The
42
+ result must contain no import from `@danieljvdm/dev-kit` and no command that needs
43
+ the Dev Kit executable after setup.
@@ -0,0 +1,46 @@
1
+ # Legacy ejection
2
+
3
+ Treat ejection as a migration of ongoing behavior, followed by deterministic
4
+ release of Dev Kit ownership.
5
+
6
+ ## Inventory
7
+
8
+ Read `dev-kit.jsonc`, `dev-kit.lock.json`, `.dev-kit/state.json` when present,
9
+ `package.json`, agent instructions, CI, Vite+/Oxlint/Oxfmt configuration, Git
10
+ hooks, Effect setup, and every `@danieljvdm/dev-kit` import or executable call.
11
+ Run:
12
+
13
+ ```bash
14
+ bunx @danieljvdm/dev-kit@latest eject --dry-run
15
+ ```
16
+
17
+ Finish the inventory with every managed skill, modified managed output, runtime
18
+ config import, lifecycle command, and enabled setup task accounted for.
19
+
20
+ ## Materialize
21
+
22
+ Replace Dev Kit config imports with local repository-owned configuration. Copy
23
+ small custom plugins or helpers locally; keep a focused package dependency only
24
+ when the repository intentionally consumes that package at runtime.
25
+
26
+ Translate recurring setup tasks into repository-owned mechanisms before removing
27
+ the dependency. Effect compiler patching, source checkouts, Git hook generation,
28
+ and CI preparation must continue to work after a fresh clone and install.
29
+
30
+ Preserve agent instructions while removing the managed wrapper and obsolete
31
+ claims that Dev Kit owns the repository. Preserve local skill edits. The eject
32
+ command converts safe legacy skill outputs into tracked repo-owned skills and
33
+ adds origin receipts for optional future updates.
34
+
35
+ ## Release ownership
36
+
37
+ Resolve every conflict reported by dry-run, then run:
38
+
39
+ ```bash
40
+ bunx @danieljvdm/dev-kit@latest eject
41
+ ```
42
+
43
+ Inspect the diff and run a fresh install plus the full repository validation.
44
+ Search again for Dev Kit imports, lifecycle calls, the manifest, the lock, and
45
+ managed markers. Finish when Dev Kit is absent from dependency resolution and
46
+ the repository retains all intended behavior.
@@ -0,0 +1,53 @@
1
+ # Repository setup
2
+
3
+ ## Inspect
4
+
5
+ Classify the work as an empty repository, an established repository, or a new
6
+ package inside an established workspace. Read the files that reveal:
7
+
8
+ - package manager and workspace topology;
9
+ - runtime and deployment targets;
10
+ - TypeScript inheritance and module boundaries;
11
+ - formatting, linting, typechecking, tests, builds, and Git hooks;
12
+ - CI and release expectations;
13
+ - existing agent instructions and skills.
14
+
15
+ For an empty repository, establish Git and package metadata first, install the
16
+ chosen toolchain, then read documentation shipped by those dependencies before
17
+ writing framework-specific source.
18
+
19
+ ## Model
20
+
21
+ Turn requested capabilities into one repository model. Let features contribute
22
+ requirements, while shared configuration receives one coherent implementation.
23
+ For example, Worker bindings, Effect compiler settings, generated source ignores,
24
+ and workspace typechecking should converge in the same TypeScript and Vite+
25
+ design instead of being patched by isolated recipes.
26
+
27
+ Keep architectural choices proportional to evidence. Ask about product or
28
+ deployment decisions that change package boundaries. Derive routine names,
29
+ paths, and scripts from nearby conventions.
30
+
31
+ ## Apply
32
+
33
+ Write ordinary project files without generated ownership markers. Prefer local,
34
+ readable configuration over a persistent preset dependency. Add focused runtime
35
+ or tooling dependencies only when the repository actually executes their code.
36
+
37
+ For an established repository, preserve working conventions and integrate the
38
+ requested capability at their natural seams. For an empty repository, create
39
+ the smallest runnable vertical slice before filling out auxiliary tooling.
40
+
41
+ Generate agent instructions from live project evidence. Record command authority,
42
+ Effect documentation routing when applicable, and non-obvious boundaries; leave
43
+ discoverable script names and directory listings to the repository itself.
44
+
45
+ ## Verify
46
+
47
+ Install through the selected package manager, run the repository's full command
48
+ authority, and exercise a runtime or build entry point for each new application.
49
+ Inspect the final diff for placeholder text, unused dependencies, stale generated
50
+ paths, accidental Dev Kit imports, and configuration that only works in the
51
+ creating worktree.
52
+
53
+ Finish with a repository that can be cloned and operated without Dev Kit.
@@ -0,0 +1,35 @@
1
+ # Repository skills
2
+
3
+ The transient CLI copies skills directly into `.agents/skills`. Each copied
4
+ skill is repository-owned. A `.dev-kit-origin.json` file inside that skill records
5
+ only its selector, approved source, and base digest; it is not desired state and
6
+ runs no lifecycle.
7
+
8
+ ## Discover and add
9
+
10
+ Inspect repository capabilities before selecting skills. Search descriptions and
11
+ prefer the narrowest matching skills:
12
+
13
+ ```bash
14
+ bunx @danieljvdm/dev-kit@latest skills search cloudflare
15
+ bunx @danieljvdm/dev-kit@latest skills info workers-best-practices
16
+ bunx @danieljvdm/dev-kit@latest skills add workers-best-practices wrangler
17
+ ```
18
+
19
+ Treat source families as broad selections: add one only when every member applies.
20
+
21
+ ## Refresh
22
+
23
+ Run `skills status` before updates. `skills update` fast-forwards a skill only
24
+ when its repository copy still matches the recorded base. For a locally modified
25
+ skill whose upstream also changed, inspect `skills diff`, merge the relevant
26
+ upstream intent into the repository copy, and preserve local policy deliberately.
27
+
28
+ After a manual merge, preserve the merged content and advance its base with
29
+ `skills update <name> --accept-local`. A future CLI may automate three-way
30
+ merges; current conflicts remain agent-owned rather than being overwritten.
31
+
32
+ ## Detach
33
+
34
+ Run `skills detach <name>` to remove only the origin receipt. The skill content
35
+ stays in place as an ordinary local skill and future Dev Kit updates ignore it.