@eltonssouza/development-utility-kit 0.10.1 → 0.11.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 (3) hide show
  1. package/README.md +23 -0
  2. package/bin/cli.js +16 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -14,6 +14,15 @@
14
14
 
15
15
  CLI binary: `duk` · Node `>=18` · License: MIT
16
16
 
17
+ **Install as a Claude Code plugin** (recommended — global, works in every project):
18
+
19
+ ```
20
+ /plugin marketplace add eltonssouza/development-utility-kit
21
+ /plugin install development-utility-kit
22
+ ```
23
+
24
+ **Or inject per-project via npx** (writes `.claude/` + `CLAUDE.md` into the current project):
25
+
17
26
  ```bash
18
27
  npx @eltonssouza/development-utility-kit install
19
28
  ```
@@ -138,6 +147,20 @@ Polling every 5s. Click a project → **Processes panel** shows recent orchestra
138
147
 
139
148
  ## Quickstart
140
149
 
150
+ ### Two ways to install
151
+
152
+ | | **Plugin** (recommended) | **npx injection** |
153
+ |---|---|---|
154
+ | Command | `/plugin marketplace add eltonssouza/development-utility-kit` then `/plugin install development-utility-kit` | `npx @eltonssouza/development-utility-kit install` |
155
+ | Scope | Global — every project, every session | Per-project (writes `.claude/` + `CLAUDE.md`) |
156
+ | Lands in | `~/.claude/plugins/` | the project directory |
157
+ | Updates | `/plugin update` (or auto on version bump) | re-run `npx … install` |
158
+ | Per-project stack | declare in a small `CLAUDE.md` `## Project Identity` (or let agents auto-detect) | written into the injected `CLAUDE.md` |
159
+
160
+ Both deliver the same 19 skills + 21 agents + stack packs. The plugin keeps them global and out of your repo; the npx path injects them into the project (and self-installs `duk` globally). Skills, agents and the flow-governance hook load identically either way.
161
+
162
+ > **Note on `## Project Identity`:** Claude Code plugins cannot ship a project `CLAUDE.md` (plugin context arrives via skills/agents/hooks, not CLAUDE.md). When you install via the plugin, declare your stack in a short per-project `CLAUDE.md` block so `stack-resolver` picks the right pack — or rely on `detect-stack.js` auto-detection. The npx path still writes the full `CLAUDE.md` for you.
163
+
141
164
  ### Brand-new project
142
165
 
143
166
  ```bash
package/bin/cli.js CHANGED
@@ -304,12 +304,27 @@ function adoptProject(opts) {
304
304
  const destClaude = path.join(subDir, '.claude');
305
305
  const destClaudeMd = path.join(subDir, 'CLAUDE.md');
306
306
 
307
+ // Drive-root / system-directory guard.
308
+ // Prevents EPERM crashes when the user accidentally runs from C:\, D:\, etc.
309
+ const targetResolved = path.resolve(subDir);
310
+ const parsed = path.parse(targetResolved);
311
+ const isDriveRoot = parsed.root === targetResolved + path.sep || parsed.root === targetResolved;
312
+ const WIN_SYSTEM_PREFIXES = ['\\Windows', '\\Program Files', '\\Program Files (x86)', '\\Users\\Default'];
313
+ const isSystemDir = process.platform === 'win32' &&
314
+ WIN_SYSTEM_PREFIXES.some((p) => targetResolved.toLowerCase().startsWith((parsed.root + p.slice(1)).toLowerCase()));
315
+ if (isDriveRoot || isSystemDir) {
316
+ process.stderr.write('Error: unsafe install target — cannot install into a drive root or system directory.\n');
317
+ process.stderr.write(`Target: ${targetResolved}\n`);
318
+ process.stderr.write('cd into your project folder first, then run:\n');
319
+ process.stderr.write(' npx @eltonssouza/development-utility-kit install\n');
320
+ process.exit(1);
321
+ }
322
+
307
323
  // Item 21 — self-destruction guard.
308
324
  // If install runs inside the harness source tree, the backup step would
309
325
  // `mv srcClaude → srcClaude.bak`, removing the very source about to be
310
326
  // copied. Abort early with a clear message before any destructive op.
311
327
  const pkgRootResolved = path.resolve(pkgRoot);
312
- const targetResolved = path.resolve(subDir);
313
328
  if (targetResolved === pkgRootResolved) {
314
329
  process.stderr.write('Error: cannot install harness into its own source tree.\n');
315
330
  process.stderr.write(`Target directory equals the harness package root:\n ${pkgRootResolved}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eltonssouza/development-utility-kit",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "npx installer for the development-utility-kit harness",
5
5
  "bin": {
6
6
  "duk": "bin/cli.js"