@iloom/cli 0.7.0 → 0.7.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 (49) hide show
  1. package/dist/{ProjectCapabilityDetector-UZYW32SY.js → ProjectCapabilityDetector-IA56AUE6.js} +3 -3
  2. package/dist/agents/iloom-framework-detector.md +78 -9
  3. package/dist/{build-O2EJHDEW.js → build-HQ5HGA3T.js} +4 -4
  4. package/dist/{chunk-3CDWFEGL.js → chunk-7GLZVDPQ.js} +2 -2
  5. package/dist/{chunk-GV5X6XUE.js → chunk-AFRICMSW.js} +3 -3
  6. package/dist/{chunk-LQBLDI47.js → chunk-DAOS6EC3.js} +4 -4
  7. package/dist/{chunk-Z6BO53V7.js → chunk-ELJKYFSH.js} +3 -3
  8. package/dist/{chunk-S7YMZQUD.js → chunk-QQFBMCAH.js} +26 -3
  9. package/dist/chunk-QQFBMCAH.js.map +1 -0
  10. package/dist/{chunk-LLWX3PCW.js → chunk-RD7I2Q2F.js} +2 -2
  11. package/dist/{chunk-ITN64ENQ.js → chunk-XPKN3QWY.js} +24 -6
  12. package/dist/chunk-XPKN3QWY.js.map +1 -0
  13. package/dist/{chunk-NTIZLX42.js → chunk-YQNSZKKT.js} +3 -3
  14. package/dist/{cleanup-ZPOMRSNN.js → cleanup-77U5ATYI.js} +5 -5
  15. package/dist/cli.js +38 -18
  16. package/dist/cli.js.map +1 -1
  17. package/dist/{commit-6S2RIA2K.js → commit-ONRXU67O.js} +4 -4
  18. package/dist/{compile-LRMAADUT.js → compile-CT7IR7O2.js} +4 -4
  19. package/dist/{dev-server-GREJUEKW.js → dev-server-UKAPBGUR.js} +5 -5
  20. package/dist/{feedback-G7G5QCY4.js → feedback-K3A4QUSG.js} +3 -3
  21. package/dist/{lint-OFVN7FT6.js → lint-HAVU4U34.js} +4 -4
  22. package/dist/{open-MCWQAPSZ.js → open-QI63XQ4F.js} +5 -5
  23. package/dist/{projects-PQOTWUII.js → projects-TWY4RT2Z.js} +3 -3
  24. package/dist/prompts/init-prompt.txt +57 -0
  25. package/dist/{rebase-RKQED567.js → rebase-QYCRF7JG.js} +5 -5
  26. package/dist/{run-CCG24PBC.js → run-YDVYORT2.js} +5 -5
  27. package/dist/{test-QZDOEUIO.js → test-75WAA6DU.js} +4 -4
  28. package/package.json +1 -1
  29. package/dist/chunk-ITN64ENQ.js.map +0 -1
  30. package/dist/chunk-S7YMZQUD.js.map +0 -1
  31. /package/dist/{ProjectCapabilityDetector-UZYW32SY.js.map → ProjectCapabilityDetector-IA56AUE6.js.map} +0 -0
  32. /package/dist/{build-O2EJHDEW.js.map → build-HQ5HGA3T.js.map} +0 -0
  33. /package/dist/{chunk-3CDWFEGL.js.map → chunk-7GLZVDPQ.js.map} +0 -0
  34. /package/dist/{chunk-GV5X6XUE.js.map → chunk-AFRICMSW.js.map} +0 -0
  35. /package/dist/{chunk-LQBLDI47.js.map → chunk-DAOS6EC3.js.map} +0 -0
  36. /package/dist/{chunk-Z6BO53V7.js.map → chunk-ELJKYFSH.js.map} +0 -0
  37. /package/dist/{chunk-LLWX3PCW.js.map → chunk-RD7I2Q2F.js.map} +0 -0
  38. /package/dist/{chunk-NTIZLX42.js.map → chunk-YQNSZKKT.js.map} +0 -0
  39. /package/dist/{cleanup-ZPOMRSNN.js.map → cleanup-77U5ATYI.js.map} +0 -0
  40. /package/dist/{commit-6S2RIA2K.js.map → commit-ONRXU67O.js.map} +0 -0
  41. /package/dist/{compile-LRMAADUT.js.map → compile-CT7IR7O2.js.map} +0 -0
  42. /package/dist/{dev-server-GREJUEKW.js.map → dev-server-UKAPBGUR.js.map} +0 -0
  43. /package/dist/{feedback-G7G5QCY4.js.map → feedback-K3A4QUSG.js.map} +0 -0
  44. /package/dist/{lint-OFVN7FT6.js.map → lint-HAVU4U34.js.map} +0 -0
  45. /package/dist/{open-MCWQAPSZ.js.map → open-QI63XQ4F.js.map} +0 -0
  46. /package/dist/{projects-PQOTWUII.js.map → projects-TWY4RT2Z.js.map} +0 -0
  47. /package/dist/{rebase-RKQED567.js.map → rebase-QYCRF7JG.js.map} +0 -0
  48. /package/dist/{run-CCG24PBC.js.map → run-YDVYORT2.js.map} +0 -0
  49. /package/dist/{test-QZDOEUIO.js.map → test-75WAA6DU.js.map} +0 -0
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ProjectCapabilityDetector
4
- } from "./chunk-3CDWFEGL.js";
5
- import "./chunk-ITN64ENQ.js";
4
+ } from "./chunk-7GLZVDPQ.js";
5
+ import "./chunk-XPKN3QWY.js";
6
6
  import "./chunk-6MLEBAYZ.js";
7
7
  import "./chunk-VT4PDUYT.js";
8
8
  export {
9
9
  ProjectCapabilityDetector
10
10
  };
11
- //# sourceMappingURL=ProjectCapabilityDetector-UZYW32SY.js.map
11
+ //# sourceMappingURL=ProjectCapabilityDetector-IA56AUE6.js.map
@@ -8,12 +8,57 @@ model: sonnet
8
8
 
9
9
  You are Claude, a framework detection specialist. Your task is to analyze a project's structure and generate appropriate install/build/test/dev scripts for iloom.
10
10
 
11
- **Your Core Mission**: Detect the project's programming language and framework, then create `.iloom/package.iloom.json` with appropriate shell commands for install, build, test, and development workflows.
11
+ **Your Core Mission**: Detect the project's programming language and framework, then create the appropriate iloom package configuration file with shell commands for install, build, test, and development workflows.
12
12
 
13
13
  **Key Distinction:**
14
14
  - `install` - Installs dependencies (runs during loom creation and post-merge)
15
15
  - `build` - Compiles/builds the project (for compiled languages or asset compilation)
16
16
 
17
+ ---
18
+
19
+ ## 🍴 FORK CHECK - DO THIS FIRST (Before Any File Decisions)
20
+
21
+ **CRITICAL: Before creating ANY configuration file, check if this is a fork.**
22
+
23
+ ### Step 0: Detect Fork Pattern
24
+
25
+ Run this check FIRST, before any other detection work:
26
+
27
+ ```bash
28
+ git remote -v 2>/dev/null | grep -E '^(origin|upstream)\s' | awk '{print $1}' | sort -u
29
+ ```
30
+
31
+ **If BOTH `origin` AND `upstream` are present → This is a FORK**
32
+
33
+ ### Fork Mode Behavior
34
+
35
+ When fork is detected:
36
+
37
+ 1. **Default to `.iloom/package.iloom.local.json`** (NOT `package.iloom.json`)
38
+ 2. **Inform the user immediately:**
39
+ ```
40
+ 🍴 Fork Detected (origin + upstream remotes)
41
+
42
+ For fork contributors, iloom configuration should be saved to LOCAL files
43
+ to prevent your personal settings from appearing in PRs to upstream.
44
+
45
+ Recommendation: Save to `.iloom/package.iloom.local.json`
46
+ - This file is globally gitignored
47
+ - Won't appear in your PRs to upstream
48
+ - Local scripts merge with package.iloom.json (local takes precedence)
49
+
50
+ If the upstream project already has package.iloom.json, your local file
51
+ will override/extend those scripts for your environment only.
52
+ ```
53
+
54
+ 3. **Proceed with detection** but write to the local file by default
55
+
56
+ ### Non-Fork Behavior
57
+
58
+ If only `origin` exists (or no upstream), proceed normally with `package.iloom.json`.
59
+
60
+ ---
61
+
17
62
  ## Core Workflow
18
63
 
19
64
  ### Step 1: Scan for Language Markers
@@ -299,18 +344,37 @@ Create `.iloom/package.iloom.json` with appropriate scripts and capabilities bas
299
344
 
300
345
  ### Step 4: Write the File
301
346
 
302
- 1. Read `.iloom/package.iloom.json` first to check if it already exists
303
- 2. **If the file exists:**
347
+ **⚠️ CHECKPOINT: Verify fork status from Step 0 before proceeding.**
348
+
349
+ If fork was detected (both `origin` and `upstream` remotes exist):
350
+ - Default target file: `.iloom/package.iloom.local.json`
351
+ - This prevents personal config from appearing in PRs to upstream
352
+
353
+ If NOT a fork:
354
+ - Default target file: `.iloom/package.iloom.json`
355
+
356
+ **Writing Process:**
357
+
358
+ 1. **Determine target file** based on fork status (see above)
359
+ 2. Read the target file first to check if it already exists
360
+ 3. **If the file exists:**
304
361
  - Compare existing configuration with detected configuration
305
362
  - Preserve existing scripts (user may have customized them)
306
363
  - Only add missing scripts that were detected
307
364
  - Preserve existing capabilities, add any missing ones
308
365
  - Preserve any other existing fields (like `_metadata`)
309
- 3. **If the file does not exist:**
366
+ 4. **If the file does not exist:**
310
367
  - Create the full detected configuration
311
- 4. Ensure `.iloom/` directory exists
312
- 5. Write the merged/new JSON to `.iloom/package.iloom.json`
313
- 6. Report what was detected and what changes were made (if any)
368
+ 5. Ensure `.iloom/` directory exists
369
+ 6. Write the merged/new JSON to the target file
370
+ 7. Report what was detected, which file was written, and what changes were made (if any)
371
+
372
+ **File Selection Summary:**
373
+ | Scenario | Target File | Reason |
374
+ |----------|-------------|--------|
375
+ | Fork detected (origin + upstream) | `package.iloom.local.json` | Keeps PRs clean, gitignored globally |
376
+ | Direct contributor (origin only) | `package.iloom.json` | Shared team configuration |
377
+ | User explicitly requests shared | `package.iloom.json` | User override (even for forks) |
314
378
 
315
379
  ## Output Format
316
380
 
@@ -324,8 +388,9 @@ Detected:
324
388
  - Framework: [framework or "None detected"]
325
389
  - Package Manager: [package manager]
326
390
  - Capabilities: [cli, web, or none]
391
+ - Fork Status: [Yes (origin + upstream) | No]
327
392
 
328
- Created: .iloom/package.iloom.json
393
+ Created: .iloom/[package.iloom.json OR package.iloom.local.json]
329
394
 
330
395
  Configuration:
331
396
  - capabilities: [list of detected capabilities]
@@ -334,7 +399,11 @@ Configuration:
334
399
  - test: [command]
335
400
  - dev: [command]
336
401
 
337
- You can customize these settings by editing .iloom/package.iloom.json.
402
+ [If fork]: This configuration was saved to the LOCAL file (package.iloom.local.json)
403
+ because you're working on a fork. This prevents your iloom settings
404
+ from appearing in PRs to upstream.
405
+
406
+ You can customize these settings by editing .iloom/[filename].
338
407
  ```
339
408
 
340
409
  ## Error Handling
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ScriptCommandBase
4
- } from "./chunk-Z6BO53V7.js";
4
+ } from "./chunk-ELJKYFSH.js";
5
5
  import "./chunk-5V74K5ZA.js";
6
- import "./chunk-LLWX3PCW.js";
6
+ import "./chunk-RD7I2Q2F.js";
7
7
  import "./chunk-UDRZY65Y.js";
8
- import "./chunk-ITN64ENQ.js";
8
+ import "./chunk-XPKN3QWY.js";
9
9
  import "./chunk-ZA575VLF.js";
10
10
  import "./chunk-WFQ5CLTR.js";
11
11
  import "./chunk-VWGKGNJP.js";
@@ -24,4 +24,4 @@ var BuildCommand = class extends ScriptCommandBase {
24
24
  export {
25
25
  BuildCommand
26
26
  };
27
- //# sourceMappingURL=build-O2EJHDEW.js.map
27
+ //# sourceMappingURL=build-HQ5HGA3T.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getPackageConfig,
5
5
  hasWebDependencies,
6
6
  parseBinField
7
- } from "./chunk-ITN64ENQ.js";
7
+ } from "./chunk-XPKN3QWY.js";
8
8
 
9
9
  // src/lib/ProjectCapabilityDetector.ts
10
10
  var ProjectCapabilityDetector = class {
@@ -46,4 +46,4 @@ var ProjectCapabilityDetector = class {
46
46
  export {
47
47
  ProjectCapabilityDetector
48
48
  };
49
- //# sourceMappingURL=chunk-3CDWFEGL.js.map
49
+ //# sourceMappingURL=chunk-7GLZVDPQ.js.map
@@ -5,10 +5,10 @@ import {
5
5
  import {
6
6
  detectPackageManager,
7
7
  runScript
8
- } from "./chunk-LLWX3PCW.js";
8
+ } from "./chunk-RD7I2Q2F.js";
9
9
  import {
10
10
  readPackageJson
11
- } from "./chunk-ITN64ENQ.js";
11
+ } from "./chunk-XPKN3QWY.js";
12
12
  import {
13
13
  logger
14
14
  } from "./chunk-VT4PDUYT.js";
@@ -212,4 +212,4 @@ var DevServerManager = class {
212
212
  export {
213
213
  DevServerManager
214
214
  };
215
- //# sourceMappingURL=chunk-GV5X6XUE.js.map
215
+ //# sourceMappingURL=chunk-AFRICMSW.js.map
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ProjectCapabilityDetector
4
- } from "./chunk-3CDWFEGL.js";
4
+ } from "./chunk-7GLZVDPQ.js";
5
5
  import {
6
6
  detectPackageManager,
7
7
  runScript
8
- } from "./chunk-LLWX3PCW.js";
8
+ } from "./chunk-RD7I2Q2F.js";
9
9
  import {
10
10
  getPackageConfig,
11
11
  hasScript
12
- } from "./chunk-ITN64ENQ.js";
12
+ } from "./chunk-XPKN3QWY.js";
13
13
  import {
14
14
  executeGitCommand,
15
15
  findMainWorktreePathWithSettings,
@@ -467,4 +467,4 @@ export {
467
467
  MergeManager,
468
468
  BuildRunner
469
469
  };
470
- //# sourceMappingURL=chunk-LQBLDI47.js.map
470
+ //# sourceMappingURL=chunk-DAOS6EC3.js.map
@@ -4,13 +4,13 @@ import {
4
4
  } from "./chunk-5V74K5ZA.js";
5
5
  import {
6
6
  runScript
7
- } from "./chunk-LLWX3PCW.js";
7
+ } from "./chunk-RD7I2Q2F.js";
8
8
  import {
9
9
  GitWorktreeManager
10
10
  } from "./chunk-UDRZY65Y.js";
11
11
  import {
12
12
  getPackageScripts
13
- } from "./chunk-ITN64ENQ.js";
13
+ } from "./chunk-XPKN3QWY.js";
14
14
  import {
15
15
  extractIssueNumber
16
16
  } from "./chunk-ZA575VLF.js";
@@ -156,4 +156,4 @@ var ScriptCommandBase = class {
156
156
  export {
157
157
  ScriptCommandBase
158
158
  };
159
- //# sourceMappingURL=chunk-Z6BO53V7.js.map
159
+ //# sourceMappingURL=chunk-ELJKYFSH.js.map
@@ -6,11 +6,11 @@ import {
6
6
  import {
7
7
  installDependencies,
8
8
  runScript
9
- } from "./chunk-LLWX3PCW.js";
9
+ } from "./chunk-RD7I2Q2F.js";
10
10
  import {
11
11
  getPackageConfig,
12
12
  hasScript
13
- } from "./chunk-ITN64ENQ.js";
13
+ } from "./chunk-XPKN3QWY.js";
14
14
  import {
15
15
  branchExists,
16
16
  checkRemoteBranchStatus,
@@ -253,6 +253,7 @@ var LoomManager = class {
253
253
  const { capabilities, binEntries } = await this.capabilityDetector.detectCapabilities(worktreePath);
254
254
  await this.copyEnvironmentFiles(worktreePath);
255
255
  await this.copyIloomSettings(worktreePath);
256
+ await this.copyIloomPackageLocal(worktreePath);
256
257
  await this.copyClaudeSettings(worktreePath);
257
258
  await this.copyGitIgnoredFiles(worktreePath);
258
259
  const settingsData = await this.settings.loadSettings();
@@ -718,6 +719,27 @@ This PR was created automatically by iloom.`;
718
719
  getLogger().warn(`Warning: Failed to copy settings.local.json: ${error instanceof Error ? error.message : "Unknown error"}`);
719
720
  }
720
721
  }
722
+ /**
723
+ * Copy iloom package local config (package.iloom.local.json) from main repo to worktree
724
+ * Always called regardless of project capabilities
725
+ * Follows the same pattern as copyIloomSettings()
726
+ * @param worktreePath Path to the worktree
727
+ */
728
+ async copyIloomPackageLocal(worktreePath) {
729
+ const mainPackageLocalPath = path2.join(process.cwd(), ".iloom", "package.iloom.local.json");
730
+ try {
731
+ const worktreeIloomDir = path2.join(worktreePath, ".iloom");
732
+ await fs2.ensureDir(worktreeIloomDir);
733
+ const worktreePackageLocalPath = path2.join(worktreeIloomDir, "package.iloom.local.json");
734
+ if (await fs2.pathExists(worktreePackageLocalPath)) {
735
+ getLogger().debug("package.iloom.local.json already exists in worktree, skipping copy");
736
+ } else {
737
+ await this.environment.copyIfExists(mainPackageLocalPath, worktreePackageLocalPath);
738
+ }
739
+ } catch (error) {
740
+ getLogger().warn(`Warning: Failed to copy package.iloom.local.json: ${error instanceof Error ? error.message : "Unknown error"}`);
741
+ }
742
+ }
721
743
  /**
722
744
  * Copy Claude settings (settings.local.json) from main repo to worktree
723
745
  * Always called regardless of project capabilities
@@ -968,6 +990,7 @@ This PR was created automatically by iloom.`;
968
990
  const { capabilities, binEntries } = await this.capabilityDetector.detectCapabilities(worktreePath);
969
991
  await this.copyEnvironmentFiles(worktreePath);
970
992
  await this.copyIloomSettings(worktreePath);
993
+ await this.copyIloomPackageLocal(worktreePath);
971
994
  await this.copyClaudeSettings(worktreePath);
972
995
  await this.copyGitIgnoredFiles(worktreePath);
973
996
  const settingsData = await this.settings.loadSettings();
@@ -2413,4 +2436,4 @@ export {
2413
2436
  DatabaseManager,
2414
2437
  ResourceCleanup
2415
2438
  };
2416
- //# sourceMappingURL=chunk-S7YMZQUD.js.map
2439
+ //# sourceMappingURL=chunk-QQFBMCAH.js.map