@danieljvdm/dev-kit 0.18.0 → 1.0.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.
Files changed (43) hide show
  1. package/README.md +148 -659
  2. package/package.json +8 -62
  3. package/skills/dev-kit/SKILL.md +42 -212
  4. package/skills/dev-kit/agents/openai.yaml +2 -2
  5. package/skills/dev-kit/references/cloudflare-worker-api.md +37 -0
  6. package/skills/dev-kit/references/default-typescript-repository.md +43 -0
  7. package/skills/dev-kit/references/legacy-eject.md +46 -0
  8. package/skills/dev-kit/references/repository-setup.md +53 -0
  9. package/skills/dev-kit/references/skills.md +35 -0
  10. package/src/bin/dev-kit.ts +142 -127
  11. package/src/eject.ts +715 -0
  12. package/src/legacy-project.ts +67 -0
  13. package/src/oxfmt.ts +1 -4
  14. package/src/oxlint.ts +5 -10
  15. package/src/path-digest.ts +60 -0
  16. package/src/project-skills.ts +722 -0
  17. package/src/tool-metadata.ts +0 -2
  18. package/src/vendor.ts +0 -5
  19. package/src/vite-plus.ts +1 -3
  20. package/dev-kit.example.jsonc +0 -22
  21. package/schema/dev-kit.schema.json +0 -218
  22. package/schema/skill-sources.schema.json +0 -83
  23. package/scripts/sync-anti-slop-runtime.mjs +0 -19
  24. package/src/index.ts +0 -125
  25. package/src/manifest.ts +0 -224
  26. package/src/oxfmt.js +0 -23
  27. package/src/oxlint-plugin-anti-slop/runtime.d.ts +0 -22
  28. package/src/oxlint-plugin-effect.d.ts +0 -19
  29. package/src/oxlint-plugin-style.d.ts +0 -8
  30. package/src/oxlint.js +0 -113
  31. package/src/project-state.ts +0 -122
  32. package/src/scaffold.ts +0 -79
  33. package/src/skill-manager.ts +0 -527
  34. package/src/sync.ts +0 -1935
  35. package/src/tool-ignore-patterns.js +0 -9
  36. package/src/vite-plus-dependency.ts +0 -69
  37. package/src/vite-plus-hooks.ts +0 -175
  38. package/src/vite-plus-workflow.ts +0 -82
  39. package/src/vite-plus.js +0 -88
  40. package/src/worktrunk-config.ts +0 -88
  41. package/templates/AGENTS.md +0 -11
  42. package/templates/vite-plus/github-actions-check.yml +0 -51
  43. package/templates/worktrunk/wt.toml +0 -27
@@ -1,5 +1,3 @@
1
1
  import packageMetadata from "../package.json" with { type: "json" };
2
2
 
3
3
  export const DEV_KIT_VERSION = packageMetadata.version;
4
- export const VITE_PLUS_TESTED_VERSION = packageMetadata.devDependencies["vite-plus"];
5
- export const VITE_PLUS_SUPPORTED_RANGE = packageMetadata.peerDependencies["vite-plus"];
package/src/vendor.ts CHANGED
@@ -22,8 +22,6 @@ export type CatalogRefreshOptions = {
22
22
  readonly updateSourceIds?: ReadonlyArray<string>;
23
23
  readonly pinSourceIds?: ReadonlyArray<string>;
24
24
  };
25
- /** @deprecated Use CatalogRefreshOptions. */
26
- export type VendorOptions = CatalogRefreshOptions;
27
25
 
28
26
  export type CatalogInspection = {
29
27
  readonly id: string;
@@ -955,6 +953,3 @@ export const refreshSkillCatalog = Effect.fn("refreshSkillCatalog")(function* (
955
953
  yield* fs.rename(nextLockPath, lockfilePath);
956
954
  yield* printStatus("success", "Catalog refreshed", summary);
957
955
  });
958
-
959
- /** @deprecated Use refreshSkillCatalog. */
960
- export const vendorExternalSkills = refreshSkillCatalog;
package/src/vite-plus.ts CHANGED
@@ -80,9 +80,7 @@ const createTypecheckTask = (options: VitePlusTypecheckOptions | undefined) => {
80
80
  };
81
81
 
82
82
  /**
83
- * Build Dev Kit's recommended Vite+ quality defaults without owning the
84
- * consuming repository's `vite.config.ts`. Spread the result before local
85
- * project configuration.
83
+ * Build this repository's Vite+ quality defaults.
86
84
  */
87
85
  export const createRecommendedVitePlusConfig = (options: RecommendedVitePlusConfigOptions = {}) => {
88
86
  const ignorePatterns = [...devKitToolIgnorePatterns, ...(options.ignorePatterns ?? [])];
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "./schema/dev-kit.schema.json",
3
- "include": ["dev-kit", "effect"],
4
- "setup": {
5
- "agentInstructions": { "enabled": true },
6
- "claudeInstructions": { "enabled": true },
7
- "effectSource": { "enabled": true },
8
- "effectTsgo": { "enabled": true },
9
- "vitePlus": {
10
- "hooks": { "enabled": true },
11
- "workflow": { "enabled": true },
12
- },
13
- "worktrunk": {
14
- "config": { "enabled": true },
15
- },
16
- },
17
- "targets": {
18
- "agents": { "enabled": true, "mode": "copy" },
19
- "claude": { "enabled": true, "mode": "symlink" },
20
- "opencode": { "enabled": false, "mode": "symlink" },
21
- },
22
- }
@@ -1,218 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://raw.githubusercontent.com/danieljvdm/dev-kit/main/schema/dev-kit.schema.json",
4
- "title": "Dev Kit Manifest",
5
- "description": "Project-local desired state for portable skills and explicit dev-kit setup tasks.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "$schema": {
10
- "type": "string"
11
- },
12
- "include": {
13
- "description": "Static skill names, family names, or exact <package>#<skill> selectors to sync. Installed package skills are discovered for browsing but selected only when explicitly included.",
14
- "type": "array",
15
- "items": {
16
- "type": "string",
17
- "pattern": "^(?:[a-z0-9]+(?:-[a-z0-9]+)*|(?:[a-z0-9][a-z0-9._-]*|@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*)#[a-z0-9]+(?:-[a-z0-9]+)*)$"
18
- },
19
- "uniqueItems": true,
20
- "minItems": 0
21
- },
22
- "exclude": {
23
- "description": "Static skill names, family names, or exact <package>#<skill> selectors to remove after expanding includes.",
24
- "type": "array",
25
- "items": {
26
- "type": "string",
27
- "pattern": "^(?:[a-z0-9]+(?:-[a-z0-9]+)*|(?:[a-z0-9][a-z0-9._-]*|@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*)#[a-z0-9]+(?:-[a-z0-9]+)*)$"
28
- },
29
- "uniqueItems": true,
30
- "default": []
31
- },
32
- "setup": {
33
- "description": "Explicit setup tasks executed by dev-kit apply after dependencies are installed.",
34
- "type": "object",
35
- "additionalProperties": false,
36
- "properties": {
37
- "agentInstructions": {
38
- "$ref": "#/$defs/agentInstructionsSetup"
39
- },
40
- "claudeInstructions": {
41
- "$ref": "#/$defs/claudeInstructionsSetup"
42
- },
43
- "effectSource": {
44
- "$ref": "#/$defs/effectSourceSetup"
45
- },
46
- "effectTsgo": {
47
- "$ref": "#/$defs/effectTsgoSetup"
48
- },
49
- "vitePlus": {
50
- "$ref": "#/$defs/vitePlusSetup"
51
- },
52
- "worktrunk": {
53
- "$ref": "#/$defs/worktrunkSetup"
54
- }
55
- },
56
- "default": {}
57
- },
58
- "targets": {
59
- "type": "object",
60
- "additionalProperties": false,
61
- "properties": {
62
- "agents": { "$ref": "#/$defs/target" },
63
- "claude": { "$ref": "#/$defs/target" },
64
- "opencode": { "$ref": "#/$defs/target" }
65
- },
66
- "default": {
67
- "agents": { "enabled": true, "mode": "copy" }
68
- }
69
- }
70
- },
71
- "required": ["include"],
72
- "$defs": {
73
- "agentInstructionsSetup": {
74
- "description": "Manage marked sections in project-root AGENTS.md with dev-kit guidance and conditional tool instructions while preserving handwritten content.",
75
- "type": "object",
76
- "additionalProperties": false,
77
- "properties": {
78
- "enabled": {
79
- "type": "boolean",
80
- "default": false
81
- }
82
- }
83
- },
84
- "claudeInstructionsSetup": {
85
- "description": "Manage CLAUDE.md as a relative symlink to the project-root AGENTS.md file.",
86
- "type": "object",
87
- "additionalProperties": false,
88
- "properties": {
89
- "enabled": {
90
- "type": "boolean",
91
- "default": false
92
- }
93
- }
94
- },
95
- "effectSourceSetup": {
96
- "type": "object",
97
- "additionalProperties": false,
98
- "properties": {
99
- "enabled": {
100
- "type": "boolean",
101
- "default": false
102
- },
103
- "packageName": {
104
- "description": "Installed package whose exact version selects the Effect source tag.",
105
- "type": "string",
106
- "pattern": "^(?:[a-z0-9][a-z0-9._-]*|@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*)$",
107
- "default": "effect"
108
- },
109
- "path": {
110
- "description": "Project-relative checkout destination.",
111
- "type": "string",
112
- "default": ".repos/effect"
113
- },
114
- "repository": {
115
- "description": "Git repository containing effect@<version> tags.",
116
- "type": "string",
117
- "default": "https://github.com/Effect-TS/effect.git"
118
- }
119
- }
120
- },
121
- "effectTsgoSetup": {
122
- "type": "object",
123
- "additionalProperties": false,
124
- "properties": {
125
- "enabled": {
126
- "type": "boolean",
127
- "default": false
128
- },
129
- "force": {
130
- "description": "Pass the unsafe upstream --force escape hatch when no commit-exact binary matches.",
131
- "type": "boolean",
132
- "default": false
133
- },
134
- "typescriptPackage": {
135
- "description": "Project-local native TypeScript package or alias for effect-tsgo to patch.",
136
- "type": "string",
137
- "pattern": "^(?:[a-z0-9][a-z0-9._-]*|@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*)$",
138
- "default": "typescript"
139
- }
140
- }
141
- },
142
- "vitePlusSetup": {
143
- "description": "Manage project-local Vite+ setup tasks.",
144
- "type": "object",
145
- "additionalProperties": false,
146
- "properties": {
147
- "hooks": {
148
- "$ref": "#/$defs/vitePlusHooksSetup"
149
- },
150
- "workflow": {
151
- "$ref": "#/$defs/vitePlusWorkflowSetup"
152
- }
153
- }
154
- },
155
- "vitePlusHooksSetup": {
156
- "description": "Run the installed Vite+ configurator to converge Git hook dispatchers in each worktree.",
157
- "type": "object",
158
- "additionalProperties": false,
159
- "properties": {
160
- "enabled": {
161
- "type": "boolean",
162
- "default": false
163
- }
164
- }
165
- },
166
- "vitePlusWorkflowSetup": {
167
- "description": "Scaffold the canonical GitHub Actions check workflow (.github/workflows/check.yml); the repository owns the file after creation.",
168
- "type": "object",
169
- "additionalProperties": false,
170
- "properties": {
171
- "enabled": {
172
- "type": "boolean",
173
- "default": false
174
- }
175
- }
176
- },
177
- "worktrunkSetup": {
178
- "description": "Manage project-local Worktrunk setup tasks.",
179
- "type": "object",
180
- "additionalProperties": false,
181
- "properties": {
182
- "config": {
183
- "$ref": "#/$defs/worktrunkConfigSetup"
184
- }
185
- }
186
- },
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.",
189
- "type": "object",
190
- "additionalProperties": false,
191
- "properties": {
192
- "enabled": {
193
- "type": "boolean",
194
- "default": false
195
- }
196
- }
197
- },
198
- "target": {
199
- "type": "object",
200
- "additionalProperties": false,
201
- "properties": {
202
- "enabled": {
203
- "type": "boolean",
204
- "default": true
205
- },
206
- "mode": {
207
- "description": "copy copies from the package source; symlink links to the primary agents target when possible.",
208
- "enum": ["copy", "symlink"],
209
- "default": "copy"
210
- },
211
- "path": {
212
- "type": "string",
213
- "description": "Project-relative destination directory for skill folders."
214
- }
215
- }
216
- }
217
- }
218
- }
@@ -1,83 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://raw.githubusercontent.com/danieljvdm/dev-kit/main/schema/skill-sources.schema.json",
4
- "title": "External Agent Skill Sources",
5
- "description": "Repository-level sources approved for the skill catalog.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "$schema": {
10
- "type": "string"
11
- },
12
- "sources": {
13
- "type": "array",
14
- "items": {
15
- "$ref": "#/$defs/source"
16
- }
17
- }
18
- },
19
- "required": ["sources"],
20
- "$defs": {
21
- "source": {
22
- "type": "object",
23
- "additionalProperties": false,
24
- "properties": {
25
- "id": {
26
- "description": "Unique source id. It also becomes broad family shorthand that selects every approved source skill in project manifests.",
27
- "type": "string",
28
- "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
29
- },
30
- "repository": {
31
- "description": "Git clone URL.",
32
- "type": "string",
33
- "minLength": 1
34
- },
35
- "ref": {
36
- "description": "Git branch, tag, or commit to resolve when updating.",
37
- "type": "string",
38
- "minLength": 1
39
- },
40
- "skillsPath": {
41
- "description": "Repository-relative directory containing skill folders.",
42
- "type": "string",
43
- "minLength": 1
44
- },
45
- "include": {
46
- "description": "Explicit skill names, or [\"*\"] to approve every skill found under skillsPath.",
47
- "type": "array",
48
- "items": {
49
- "type": "string",
50
- "pattern": "^(\\*|[a-z0-9]+(-[a-z0-9]+)*)$"
51
- },
52
- "uniqueItems": true,
53
- "minItems": 1
54
- },
55
- "exclude": {
56
- "description": "Skills to subtract after expanding include, primarily for [\"*\"] sources.",
57
- "type": "array",
58
- "items": {
59
- "type": "string",
60
- "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
61
- },
62
- "uniqueItems": true,
63
- "default": []
64
- },
65
- "licensePath": {
66
- "description": "Optional repository-relative license file validated during catalog refresh.",
67
- "type": "string",
68
- "minLength": 1
69
- },
70
- "stripFrontmatter": {
71
- "description": "Optional upstream frontmatter keys to remove for local harness compatibility.",
72
- "type": "array",
73
- "items": {
74
- "type": "string",
75
- "pattern": "^[A-Za-z0-9_-]+$"
76
- },
77
- "uniqueItems": true
78
- }
79
- },
80
- "required": ["id", "repository", "ref", "skillsPath", "include"]
81
- }
82
- }
83
- }
@@ -1,19 +0,0 @@
1
- import { readFile, writeFile } from "node:fs/promises";
2
-
3
- const generatedUrl = new URL("../.dev-kit/anti-slop-build/index.mjs", import.meta.url);
4
- const runtimeUrl = new URL("../src/oxlint-plugin-anti-slop/runtime.js", import.meta.url);
5
- const generated = await readFile(generatedUrl, "utf8");
6
- const header =
7
- "// Bundled from the vendored anti-slop source at commit 9b80d9a5c317d3af94d88a577bdbde4d9a45f7be.\n";
8
- const runtime = generated.replace(/^\/\/[#](?:end)?region.*\n/gmu, "");
9
- const expected = `${header}${runtime}`;
10
-
11
- if (process.argv.includes("--check")) {
12
- const current = await readFile(runtimeUrl, "utf8");
13
-
14
- if (current !== expected) {
15
- throw new Error("anti-slop runtime is stale; run `vp run anti-slop:bundle`");
16
- }
17
- } else {
18
- await writeFile(runtimeUrl, expected);
19
- }
package/src/index.ts DELETED
@@ -1,125 +0,0 @@
1
- export {
2
- type AgentInstructionsSetup,
3
- AgentInstructionsSetupSchema,
4
- type ClaudeInstructionsSetup,
5
- ClaudeInstructionsSetupSchema,
6
- type DevKitManifest,
7
- DevKitManifestSchema,
8
- type EffectSourceSetup,
9
- EffectSourceSetupSchema,
10
- type EffectTsgoSetup,
11
- EffectTsgoSetupSchema,
12
- type HarnessTarget,
13
- TargetConfigSchema,
14
- type VitePlusSetup,
15
- VitePlusSetupSchema,
16
- type VitePlusWorkflowSetup,
17
- VitePlusWorkflowSetupSchema,
18
- type WorktrunkConfigSetup,
19
- WorktrunkConfigSetupSchema,
20
- type WorktrunkSetup,
21
- WorktrunkSetupSchema,
22
- } from "./manifest.ts";
23
- export {
24
- applyEffectSourcePlan,
25
- EffectSourceCheckoutError,
26
- EffectSourceDependencyError,
27
- type EffectSourceOptions,
28
- type EffectSourcePlan,
29
- planEffectSource,
30
- syncEffectSource,
31
- } from "./effect-source.ts";
32
- export {
33
- CANONICAL_REPOSITORIES_DIRECTORY,
34
- DEV_KIT_GITIGNORE_ENTRIES,
35
- GitignoreConflictError,
36
- patchGitignoreContents,
37
- patchProjectGitignore,
38
- type GitignoreOptions,
39
- type GitignorePatch,
40
- UnsafeGitignorePathError,
41
- } from "./gitignore.ts";
42
- export {
43
- EFFECT_TSGO_PLUGIN_NAME,
44
- EFFECT_TSGO_TYPESCRIPT_VERSION,
45
- EFFECT_TSGO_VERSION,
46
- type EffectTsgoDiagnosticSeverity,
47
- EffectTsgoDependencyError,
48
- InvalidEffectTsgoPackageNameError,
49
- type EffectTsgoPatchOptions,
50
- type EffectTsgoPatchPlan,
51
- type EffectTsgoPluginConfig,
52
- EffectTsgoPatchCommandError,
53
- patchEffectTsgo,
54
- planEffectTsgoPatch,
55
- recommendedEffectTsgoPlugin,
56
- } from "./effect-tsgo.ts";
57
- export {
58
- ExternalSkillSourceSchema,
59
- type ExternalSkillSource,
60
- LockedSkillSourceSchema,
61
- type LockedSkillSource,
62
- SkillSourcesLockSchema,
63
- type SkillSourcesLock,
64
- SkillSourcesManifestSchema,
65
- type SkillSourcesManifest,
66
- } from "./source-manifest.ts";
67
- export {
68
- planProjectSkills,
69
- printSkillPlan,
70
- runProjectSkillPlan,
71
- type SkillPlan,
72
- type SyncOptions,
73
- } from "./sync.ts";
74
- export {
75
- AppliedStateSchema,
76
- CatalogProvenanceSchema,
77
- DevKitLockSchema,
78
- EffectSourceLockSchema,
79
- EffectTsgoLockSchema,
80
- ManagedAgentInstructionsOutputSchema,
81
- ManagedClaudeInstructionsOutputSchema,
82
- ManagedGeneratedFileOutputSchema,
83
- ManagedInstructionOutputSchema,
84
- ManagedOutputSchema,
85
- ManagedSkillOutputSchema,
86
- OwnershipReceiptSchema,
87
- type AppliedState,
88
- type CatalogProvenance,
89
- type DevKitLock,
90
- type EffectSourceLock,
91
- type EffectTsgoLock,
92
- type ManagedAgentInstructionsOutput,
93
- type ManagedClaudeInstructionsOutput,
94
- type ManagedGeneratedFileOutput,
95
- type ManagedInstructionOutput,
96
- type ManagedOutput,
97
- type ManagedSkillOutput,
98
- type OwnershipReceipt,
99
- } from "./project-state.ts";
100
- export {
101
- refreshSkillCatalog,
102
- vendorExternalSkills,
103
- type CatalogRefreshOptions,
104
- type VendorOptions,
105
- } from "./vendor.ts";
106
- export {
107
- loadSkillCatalog,
108
- resolveSkillSources,
109
- type CatalogSkill,
110
- type ResolvedSkillSource,
111
- type SkillCatalog,
112
- } from "./catalog.ts";
113
- export {
114
- addCatalogSource,
115
- listCatalogSources,
116
- removeCatalogEntry,
117
- showCatalogSource,
118
- type CatalogAddOptions,
119
- type CatalogCommandOptions,
120
- } from "./catalog-manager.ts";
121
- export {
122
- inspectCatalogRepository,
123
- type CatalogInspection,
124
- type CatalogInspectOptions,
125
- } from "./vendor.ts";