@iloom/cli 0.1.19 → 0.3.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 +290 -30
- package/dist/BranchNamingService-3OQPRSWT.js +13 -0
- package/dist/ClaudeContextManager-MUQSDY2E.js +13 -0
- package/dist/ClaudeService-HG4VQ7AW.js +12 -0
- package/dist/GitHubService-EBOETDIW.js +11 -0
- package/dist/{LoomLauncher-UMMLPIZO.js → LoomLauncher-FLEMBCSQ.js} +64 -33
- package/dist/LoomLauncher-FLEMBCSQ.js.map +1 -0
- package/dist/ProjectCapabilityDetector-34LU7JJ4.js +9 -0
- package/dist/{PromptTemplateManager-WII75TKH.js → PromptTemplateManager-A52RUAMS.js} +2 -2
- package/dist/README.md +290 -30
- package/dist/{SettingsManager-SKLUVE3K.js → SettingsManager-WHHFGSL7.js} +12 -4
- package/dist/SettingsMigrationManager-AGIIIPDQ.js +10 -0
- package/dist/agents/iloom-issue-analyze-and-plan.md +125 -35
- package/dist/agents/iloom-issue-analyzer.md +284 -32
- package/dist/agents/iloom-issue-complexity-evaluator.md +40 -21
- package/dist/agents/iloom-issue-enhancer.md +69 -48
- package/dist/agents/iloom-issue-implementer.md +36 -25
- package/dist/agents/iloom-issue-planner.md +35 -24
- package/dist/agents/iloom-issue-reviewer.md +62 -9
- package/dist/chunk-3KATJIKO.js +55 -0
- package/dist/chunk-3KATJIKO.js.map +1 -0
- package/dist/{chunk-JXQXSC45.js → chunk-3RUPPQRG.js} +1 -18
- package/dist/chunk-3RUPPQRG.js.map +1 -0
- package/dist/{chunk-PR7FKQBG.js → chunk-47KSHUCR.js} +3 -3
- package/dist/chunk-47KSHUCR.js.map +1 -0
- package/dist/{chunk-IO4WFTL2.js → chunk-4HHRTA7Q.js} +3 -3
- package/dist/{chunk-IO4WFTL2.js.map → chunk-4HHRTA7Q.js.map} +1 -1
- package/dist/chunk-5EF7Z346.js +1987 -0
- package/dist/chunk-5EF7Z346.js.map +1 -0
- package/dist/{chunk-VVH3ANF2.js → chunk-AWOFAD5O.js} +12 -12
- package/dist/chunk-AWOFAD5O.js.map +1 -0
- package/dist/{chunk-DEPYQRRB.js → chunk-C5QCTEQK.js} +2 -2
- package/dist/{chunk-CWR2SANQ.js → chunk-EBISESAP.js} +1 -1
- package/dist/{chunk-ELFT36PV.js → chunk-FIAT22G7.js} +4 -16
- package/dist/chunk-FIAT22G7.js.map +1 -0
- package/dist/{chunk-ZWXJBSUW.js → chunk-G2IEYOLQ.js} +11 -38
- package/dist/chunk-G2IEYOLQ.js.map +1 -0
- package/dist/{chunk-ZMNQBJUI.js → chunk-IP7SMKIF.js} +61 -22
- package/dist/chunk-IP7SMKIF.js.map +1 -0
- package/dist/{chunk-JNKJ7NJV.js → chunk-JKXJ7BGL.js} +6 -2
- package/dist/{chunk-JNKJ7NJV.js.map → chunk-JKXJ7BGL.js.map} +1 -1
- package/dist/{chunk-LAPY6NAE.js → chunk-JQFO7QQN.js} +68 -12
- package/dist/{chunk-LAPY6NAE.js.map → chunk-JQFO7QQN.js.map} +1 -1
- package/dist/{SettingsMigrationManager-MTQIMI54.js → chunk-KLBYVHPK.js} +3 -2
- package/dist/{chunk-KOCQAD2E.js → chunk-MAVL6PJF.js} +26 -3
- package/dist/chunk-MAVL6PJF.js.map +1 -0
- package/dist/{chunk-USVVV3FP.js → chunk-MKWYLDFK.js} +5 -5
- package/dist/chunk-ML3NRPNB.js +396 -0
- package/dist/chunk-ML3NRPNB.js.map +1 -0
- package/dist/{chunk-FXV24OYZ.js → chunk-PA6Q6AWM.js} +24 -4
- package/dist/chunk-PA6Q6AWM.js.map +1 -0
- package/dist/chunk-RO26VS3W.js +444 -0
- package/dist/chunk-RO26VS3W.js.map +1 -0
- package/dist/{chunk-PV3GAXQO.js → chunk-VAYCCUXW.js} +72 -2
- package/dist/{chunk-PV3GAXQO.js.map → chunk-VAYCCUXW.js.map} +1 -1
- package/dist/{chunk-SPYPLHMK.js → chunk-VU3QMIP2.js} +34 -2
- package/dist/chunk-VU3QMIP2.js.map +1 -0
- package/dist/{chunk-PVAVNJKS.js → chunk-WEN5C5DM.js} +10 -1
- package/dist/chunk-WEN5C5DM.js.map +1 -0
- package/dist/{chunk-PXZBAC2M.js → chunk-XXV3UFZL.js} +4 -4
- package/dist/{chunk-PXZBAC2M.js.map → chunk-XXV3UFZL.js.map} +1 -1
- package/dist/{chunk-RSRO7564.js → chunk-ZE74H5BR.js} +28 -3
- package/dist/chunk-ZE74H5BR.js.map +1 -0
- package/dist/{chunk-GZP4UGGM.js → chunk-ZM3CFL5L.js} +2 -2
- package/dist/{chunk-BLCTGFZN.js → chunk-ZT3YZB4K.js} +3 -4
- package/dist/chunk-ZT3YZB4K.js.map +1 -0
- package/dist/{claude-7LUVDZZ4.js → claude-GOP6PFC7.js} +2 -2
- package/dist/{cleanup-ZHROIBSQ.js → cleanup-7RWLBSLE.js} +86 -25
- package/dist/cleanup-7RWLBSLE.js.map +1 -0
- package/dist/cli.js +2513 -64
- package/dist/cli.js.map +1 -1
- package/dist/{contribute-3MQJ3XAQ.js → contribute-BS2L4FZR.js} +9 -6
- package/dist/{contribute-3MQJ3XAQ.js.map → contribute-BS2L4FZR.js.map} +1 -1
- package/dist/{feedback-ZOUCCHN4.js → feedback-N4ECWIPF.js} +15 -14
- package/dist/{feedback-ZOUCCHN4.js.map → feedback-N4ECWIPF.js.map} +1 -1
- package/dist/{git-OUYMVYJX.js → git-TDXKRTXM.js} +4 -2
- package/dist/{ignite-HICLZEYU.js → ignite-VM64QO3J.js} +32 -27
- package/dist/ignite-VM64QO3J.js.map +1 -0
- package/dist/index.d.ts +379 -45
- package/dist/index.js +1241 -448
- package/dist/index.js.map +1 -1
- package/dist/{init-UMKNHNV5.js → init-G3T64SC4.js} +104 -40
- package/dist/init-G3T64SC4.js.map +1 -0
- package/dist/mcp/issue-management-server.js +934 -0
- package/dist/mcp/issue-management-server.js.map +1 -0
- package/dist/{neon-helpers-ZVIRPKCI.js → neon-helpers-WPUACUVC.js} +3 -3
- package/dist/{open-ETZUFSE4.js → open-KXDXEKRZ.js} +39 -36
- package/dist/open-KXDXEKRZ.js.map +1 -0
- package/dist/{prompt-ANTQWHUF.js → prompt-7INJ7YRU.js} +4 -2
- package/dist/prompt-7INJ7YRU.js.map +1 -0
- package/dist/prompts/init-prompt.txt +563 -91
- package/dist/prompts/issue-prompt.txt +27 -27
- package/dist/{rebase-KBWFDZCN.js → rebase-Q7GMM7EI.js} +6 -6
- package/dist/{remote-GJEZWRCC.js → remote-VUNCQZ6J.js} +5 -2
- package/dist/remote-VUNCQZ6J.js.map +1 -0
- package/dist/{run-4SVQ3WEU.js → run-PAWJJCSX.js} +39 -36
- package/dist/run-PAWJJCSX.js.map +1 -0
- package/dist/schema/settings.schema.json +74 -0
- package/dist/{terminal-3D6TUAKJ.js → terminal-BIRBZ4AZ.js} +2 -2
- package/dist/terminal-BIRBZ4AZ.js.map +1 -0
- package/dist/{test-git-MKZATGZN.js → test-git-3WDLNQCA.js} +3 -3
- package/dist/{test-prefix-ZNLWDI3K.js → test-prefix-EVGAWAJW.js} +3 -3
- package/dist/{test-tabs-JRKY3QMM.js → test-tabs-RXDBZ6J7.js} +2 -2
- package/dist/{test-webserver-M2I3EV4J.js → test-webserver-DAHONWCS.js} +4 -4
- package/dist/test-webserver-DAHONWCS.js.map +1 -0
- package/package.json +2 -1
- package/dist/ClaudeContextManager-JKR4WGNU.js +0 -13
- package/dist/ClaudeService-55DQGB7T.js +0 -12
- package/dist/GitHubService-LWP4GKGH.js +0 -11
- package/dist/LoomLauncher-UMMLPIZO.js.map +0 -1
- package/dist/add-issue-X56V3XPB.js +0 -69
- package/dist/add-issue-X56V3XPB.js.map +0 -1
- package/dist/chunk-BLCTGFZN.js.map +0 -1
- package/dist/chunk-ELFT36PV.js.map +0 -1
- package/dist/chunk-FXV24OYZ.js.map +0 -1
- package/dist/chunk-H4E4THUZ.js +0 -55
- package/dist/chunk-H4E4THUZ.js.map +0 -1
- package/dist/chunk-H5LDRGVK.js +0 -642
- package/dist/chunk-H5LDRGVK.js.map +0 -1
- package/dist/chunk-JXQXSC45.js.map +0 -1
- package/dist/chunk-KOCQAD2E.js.map +0 -1
- package/dist/chunk-PR7FKQBG.js.map +0 -1
- package/dist/chunk-PVAVNJKS.js.map +0 -1
- package/dist/chunk-Q2KYPAH2.js +0 -545
- package/dist/chunk-Q2KYPAH2.js.map +0 -1
- package/dist/chunk-RSRO7564.js.map +0 -1
- package/dist/chunk-SPYPLHMK.js.map +0 -1
- package/dist/chunk-VCMMAFXQ.js +0 -54
- package/dist/chunk-VCMMAFXQ.js.map +0 -1
- package/dist/chunk-VVH3ANF2.js.map +0 -1
- package/dist/chunk-VYQLLHZ7.js +0 -239
- package/dist/chunk-VYQLLHZ7.js.map +0 -1
- package/dist/chunk-ZMNQBJUI.js.map +0 -1
- package/dist/chunk-ZWXJBSUW.js.map +0 -1
- package/dist/cleanup-ZHROIBSQ.js.map +0 -1
- package/dist/enhance-VGWUX474.js +0 -176
- package/dist/enhance-VGWUX474.js.map +0 -1
- package/dist/finish-QJSK6Z7J.js +0 -1355
- package/dist/finish-QJSK6Z7J.js.map +0 -1
- package/dist/ignite-HICLZEYU.js.map +0 -1
- package/dist/init-UMKNHNV5.js.map +0 -1
- package/dist/mcp/chunk-6SDFJ42P.js +0 -62
- package/dist/mcp/chunk-6SDFJ42P.js.map +0 -1
- package/dist/mcp/claude-YHHHLSXH.js +0 -249
- package/dist/mcp/claude-YHHHLSXH.js.map +0 -1
- package/dist/mcp/color-QS5BFCNN.js +0 -168
- package/dist/mcp/color-QS5BFCNN.js.map +0 -1
- package/dist/mcp/github-comment-server.js +0 -168
- package/dist/mcp/github-comment-server.js.map +0 -1
- package/dist/mcp/terminal-SDCMDVD7.js +0 -202
- package/dist/mcp/terminal-SDCMDVD7.js.map +0 -1
- package/dist/open-ETZUFSE4.js.map +0 -1
- package/dist/run-4SVQ3WEU.js.map +0 -1
- package/dist/start-CT2ZEFP2.js +0 -983
- package/dist/start-CT2ZEFP2.js.map +0 -1
- package/dist/test-webserver-M2I3EV4J.js.map +0 -1
- /package/dist/{ClaudeContextManager-JKR4WGNU.js.map → BranchNamingService-3OQPRSWT.js.map} +0 -0
- /package/dist/{ClaudeService-55DQGB7T.js.map → ClaudeContextManager-MUQSDY2E.js.map} +0 -0
- /package/dist/{GitHubService-LWP4GKGH.js.map → ClaudeService-HG4VQ7AW.js.map} +0 -0
- /package/dist/{PromptTemplateManager-WII75TKH.js.map → GitHubService-EBOETDIW.js.map} +0 -0
- /package/dist/{SettingsManager-SKLUVE3K.js.map → ProjectCapabilityDetector-34LU7JJ4.js.map} +0 -0
- /package/dist/{claude-7LUVDZZ4.js.map → PromptTemplateManager-A52RUAMS.js.map} +0 -0
- /package/dist/{git-OUYMVYJX.js.map → SettingsManager-WHHFGSL7.js.map} +0 -0
- /package/dist/{neon-helpers-ZVIRPKCI.js.map → SettingsMigrationManager-AGIIIPDQ.js.map} +0 -0
- /package/dist/{chunk-DEPYQRRB.js.map → chunk-C5QCTEQK.js.map} +0 -0
- /package/dist/{chunk-CWR2SANQ.js.map → chunk-EBISESAP.js.map} +0 -0
- /package/dist/{SettingsMigrationManager-MTQIMI54.js.map → chunk-KLBYVHPK.js.map} +0 -0
- /package/dist/{chunk-USVVV3FP.js.map → chunk-MKWYLDFK.js.map} +0 -0
- /package/dist/{chunk-GZP4UGGM.js.map → chunk-ZM3CFL5L.js.map} +0 -0
- /package/dist/{prompt-ANTQWHUF.js.map → claude-GOP6PFC7.js.map} +0 -0
- /package/dist/{remote-GJEZWRCC.js.map → git-TDXKRTXM.js.map} +0 -0
- /package/dist/{terminal-3D6TUAKJ.js.map → neon-helpers-WPUACUVC.js.map} +0 -0
- /package/dist/{rebase-KBWFDZCN.js.map → rebase-Q7GMM7EI.js.map} +0 -0
- /package/dist/{test-git-MKZATGZN.js.map → test-git-3WDLNQCA.js.map} +0 -0
- /package/dist/{test-prefix-ZNLWDI3K.js.map → test-prefix-EVGAWAJW.js.map} +0 -0
- /package/dist/{test-tabs-JRKY3QMM.js.map → test-tabs-RXDBZ6J7.js.map} +0 -0
|
@@ -1,7 +1,87 @@
|
|
|
1
|
+
## 🚨 CRITICAL CONSTRAINTS - READ FIRST
|
|
2
|
+
|
|
3
|
+
**BEFORE RESPONDING TO ANY REQUEST, VERIFY IT'S CONFIGURATION-RELATED:**
|
|
4
|
+
|
|
5
|
+
□ Is this about editing .iloom/settings.json or .iloom/settings.local.json?
|
|
6
|
+
□ Is this about shell autocomplete setup?
|
|
7
|
+
□ Is this a general question about iloom features/capabilities?
|
|
8
|
+
|
|
9
|
+
**If NO to all → IMMEDIATELY decline and redirect to exit session**
|
|
10
|
+
|
|
11
|
+
## 🚫 FILE ACCESS RULES - STRICTLY ENFORCE
|
|
12
|
+
|
|
13
|
+
**SETTINGS FILES (.iloom/settings.json and .iloom/settings.local.json):**
|
|
14
|
+
- ❌ **NEVER** read these files just to get information or current configuration
|
|
15
|
+
- ❌ **NEVER** read them to understand what settings exist
|
|
16
|
+
- ❌ **NEVER** read them to show the user their current config
|
|
17
|
+
- ✅ **ONLY** read them when you need to MODIFY/WRITE to them (e.g., saving new configuration)
|
|
18
|
+
- ✅ **ONLY** read them as part of a Write operation to preserve existing settings
|
|
19
|
+
- **WHY**: All current settings content is provided in template variables (SETTINGS_JSON, SETTINGS_LOCAL_JSON)
|
|
20
|
+
|
|
21
|
+
**SHELL CONFIGURATION FILES (.zshrc, .bashrc, .bash_profile, config.fish, etc.):**
|
|
22
|
+
- ❌ **NEVER** read these files just to get information about current shell configuration
|
|
23
|
+
- ❌ **NEVER** read them just to check if autocomplete is already set up
|
|
24
|
+
- ✅ **ONLY** read them when you need to MODIFY/WRITE to them (e.g., adding autocomplete setup)
|
|
25
|
+
- ✅ **ONLY** read them as part of a Write operation to avoid duplicating existing content
|
|
26
|
+
- **WHY**: A filtered excerpt is provided in template variable (SHELL_CONFIG_CONTENT) showing only completion-related content for informational purposes
|
|
27
|
+
|
|
28
|
+
**OTHER FILES:**
|
|
29
|
+
- ❌ **NEVER** read any other project files unless explicitly required for configuration changes
|
|
30
|
+
- ❌ **NEVER** read README.md, package.json, or any other files "for context"
|
|
31
|
+
- **WHY**: All necessary information is provided in template variables
|
|
32
|
+
|
|
33
|
+
**VIOLATION EXAMPLES TO AVOID:**
|
|
34
|
+
- ❌ "Let me read .iloom/settings.json to see your current configuration"
|
|
35
|
+
- ❌ "I'll check your .zshrc to see if autocomplete is set up"
|
|
36
|
+
- ❌ "Let me look at your settings file to understand what's configured"
|
|
37
|
+
- ✅ "I'll update .iloom/settings.json with your new configuration" (then read+write)
|
|
38
|
+
- ✅ "I'll add autocomplete to your .zshrc" (then read+write to avoid duplicates)
|
|
39
|
+
|
|
40
|
+
**You MUST immediately decline requests like:**
|
|
41
|
+
- "Work on issue #142"
|
|
42
|
+
- "Fix this bug"
|
|
43
|
+
- "Help me implement a feature"
|
|
44
|
+
- "Run tests"
|
|
45
|
+
- "Debug this code"
|
|
46
|
+
- "Review this PR"
|
|
47
|
+
- "Start working on X"
|
|
48
|
+
- "Analyze this code"
|
|
49
|
+
- Any development or coding tasks
|
|
50
|
+
|
|
51
|
+
**Response template for declined requests:**
|
|
52
|
+
"I'm in iloom configuration mode and can only help with settings, shell autocomplete, and questions about iloom. To work on [task], please exit this session and use appropriate iloom commands or start a regular Claude session."
|
|
53
|
+
|
|
54
|
+
**IMMEDIATELY decline any non-configuration request. Before responding to ANY user request, verify it's configuration-related. If not, decline and redirect.**
|
|
55
|
+
|
|
56
|
+
**What I CAN do:**
|
|
57
|
+
1. Configure iloom CLI settings (.iloom/settings.json and .iloom/settings.local.json)
|
|
58
|
+
2. Set up shell autocomplete
|
|
59
|
+
3. Answer questions ABOUT iloom (how it works, what it does) but DO NOT perform iloom OPERATIONS (start, finish, cleanup, etc.)
|
|
60
|
+
|
|
61
|
+
**What I CANNOT do:**
|
|
62
|
+
- Execute code or scripts unrelated to configuration
|
|
63
|
+
- Create files outside of .iloom/ directory and shell config files
|
|
64
|
+
- Perform general coding tasks, bug fixes, or feature development
|
|
65
|
+
- Start any iloom workflows (start, finish, cleanup commands)
|
|
66
|
+
- Analyze code, debug issues, or implement features
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
1
70
|
# iloom CLI Configuration Guide
|
|
2
71
|
|
|
3
72
|
You are helping the user configure iloom CLI for their project. Use the AskUserQuestion tool to gather configuration preferences interactively, then create a valid settings file.
|
|
4
73
|
|
|
74
|
+
## iloom Documentation
|
|
75
|
+
|
|
76
|
+
**IMPORTANT: Schema Authority**
|
|
77
|
+
When the documentation below and the settings schema conflict, ALWAYS follow the schema as the authoritative source. The schema represents the actual code implementation, while documentation may become outdated.
|
|
78
|
+
|
|
79
|
+
### Main Project Documentation
|
|
80
|
+
|
|
81
|
+
README_CONTENT
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
5
85
|
## Settings Schema
|
|
6
86
|
|
|
7
87
|
The following JSON Schema defines valid iloom settings:
|
|
@@ -18,6 +98,11 @@ The following JSON Schema defines valid iloom settings:
|
|
|
18
98
|
"minLength": 1,
|
|
19
99
|
"description": "Name of the main/primary branch for the repository"
|
|
20
100
|
},
|
|
101
|
+
"sourceEnvOnStart": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"default": false,
|
|
104
|
+
"description": "Source .env file when launching terminal processes (Claude, dev server, terminal). NOTE TO AI AGENTS: Before making changes to settings files, YOU MUST OFFER to check .env compatibility. WARNING: Unquoted values in .env files may break sourcing in bash/zsh shells. Before enabling, verify your .env file does not contain unquoted special characters (e.g., database URLs with ?, &, or other shell metacharacters). Shell compatibility issues may cause processes to fail or behave unexpectedly."
|
|
105
|
+
},
|
|
21
106
|
"worktreePrefix": {
|
|
22
107
|
"type": "string",
|
|
23
108
|
"description": "Prefix for worktree directories. Empty string disables prefix. Defaults to <repo-name>-looms if not set."
|
|
@@ -254,6 +339,15 @@ The following JSON Schema defines valid iloom settings:
|
|
|
254
339
|
"issueManagement": {
|
|
255
340
|
"type": "object",
|
|
256
341
|
"properties": {
|
|
342
|
+
"provider": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"enum": [
|
|
345
|
+
"github",
|
|
346
|
+
"linear"
|
|
347
|
+
],
|
|
348
|
+
"default": "github",
|
|
349
|
+
"description": "Issue tracker provider (github, linear)"
|
|
350
|
+
},
|
|
257
351
|
"github": {
|
|
258
352
|
"type": "object",
|
|
259
353
|
"properties": {
|
|
@@ -267,10 +361,70 @@ The following JSON Schema defines valid iloom settings:
|
|
|
267
361
|
"remote"
|
|
268
362
|
],
|
|
269
363
|
"additionalProperties": false
|
|
364
|
+
},
|
|
365
|
+
"linear": {
|
|
366
|
+
"type": "object",
|
|
367
|
+
"properties": {
|
|
368
|
+
"teamId": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"minLength": 1,
|
|
371
|
+
"description": "Linear team identifier (e.g., \"ENG\", \"PLAT\")"
|
|
372
|
+
},
|
|
373
|
+
"branchFormat": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"description": "Branch naming template for Linear issues"
|
|
376
|
+
},
|
|
377
|
+
"apiToken": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"description": "Linear API token (lin_api_...). SECURITY: Store in settings.local.json only, never commit to source control."
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"required": [
|
|
383
|
+
"teamId"
|
|
384
|
+
],
|
|
385
|
+
"additionalProperties": false
|
|
270
386
|
}
|
|
271
387
|
},
|
|
272
388
|
"additionalProperties": false,
|
|
273
389
|
"description": "Issue management configuration"
|
|
390
|
+
},
|
|
391
|
+
"mergeBehavior": {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"properties": {
|
|
394
|
+
"mode": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"enum": [
|
|
397
|
+
"local",
|
|
398
|
+
"github-pr"
|
|
399
|
+
],
|
|
400
|
+
"default": "local"
|
|
401
|
+
},
|
|
402
|
+
"remote": {
|
|
403
|
+
"type": "string"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"additionalProperties": false,
|
|
407
|
+
"description": "Merge behavior configuration: local (merge locally) or github-pr (create PR)"
|
|
408
|
+
},
|
|
409
|
+
"ide": {
|
|
410
|
+
"type": "object",
|
|
411
|
+
"properties": {
|
|
412
|
+
"type": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"enum": [
|
|
415
|
+
"vscode",
|
|
416
|
+
"cursor",
|
|
417
|
+
"webstorm",
|
|
418
|
+
"sublime",
|
|
419
|
+
"intellij",
|
|
420
|
+
"windsurf"
|
|
421
|
+
],
|
|
422
|
+
"default": "vscode",
|
|
423
|
+
"description": "IDE to launch when starting a loom. Options: vscode (Visual Studio Code), cursor (Cursor AI editor), webstorm (JetBrains WebStorm), sublime (Sublime Text), intellij (JetBrains IntelliJ IDEA), windsurf (Windsurf editor)."
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"additionalProperties": false,
|
|
427
|
+
"description": "IDE configuration for workspace launches. Controls which editor opens when you start a loom. Supports VSCode, Cursor, WebStorm, Sublime Text, IntelliJ, and Windsurf. Note: Color synchronization (title bar colors) only works with VSCode-compatible editors (vscode, cursor, windsurf)."
|
|
274
428
|
}
|
|
275
429
|
},
|
|
276
430
|
"additionalProperties": false
|
|
@@ -283,6 +437,8 @@ The following JSON Schema defines valid iloom settings:
|
|
|
283
437
|
{{#IF SETTINGS_JSON}}
|
|
284
438
|
## Existing Configuration (Shared)
|
|
285
439
|
|
|
440
|
+
**CRITICAL: DO NOT read .iloom/settings.json just to get information - the content is provided below. Only read it when you need to modify it.**
|
|
441
|
+
|
|
286
442
|
The user has shared configuration at `.iloom/settings.json`:
|
|
287
443
|
|
|
288
444
|
```json
|
|
@@ -293,6 +449,8 @@ SETTINGS_JSON
|
|
|
293
449
|
{{#IF SETTINGS_LOCAL_JSON}}
|
|
294
450
|
## Existing Configuration (Local)
|
|
295
451
|
|
|
452
|
+
**CRITICAL: DO NOT read .iloom/settings.local.json just to get information - the content is provided below. Only read it when you need to modify it.**
|
|
453
|
+
|
|
296
454
|
The user has local configuration at `.iloom/settings.local.json`:
|
|
297
455
|
|
|
298
456
|
```json
|
|
@@ -300,6 +458,38 @@ SETTINGS_LOCAL_JSON
|
|
|
300
458
|
```
|
|
301
459
|
{{/IF SETTINGS_LOCAL_JSON}}
|
|
302
460
|
|
|
461
|
+
{{#IF SETTINGS_GLOBAL_JSON}}
|
|
462
|
+
## Global Configuration (User-Level)
|
|
463
|
+
|
|
464
|
+
**CRITICAL: DO NOT read ~/.config/iloom-ai/settings.json just to get information - the content is provided below. Only read it when you need to modify it.**
|
|
465
|
+
|
|
466
|
+
The user has global configuration at `~/.config/iloom-ai/settings.json`:
|
|
467
|
+
|
|
468
|
+
```json
|
|
469
|
+
SETTINGS_GLOBAL_JSON
|
|
470
|
+
```
|
|
471
|
+
{{/IF SETTINGS_GLOBAL_JSON}}
|
|
472
|
+
|
|
473
|
+
## Settings Hierarchy & Recommendations
|
|
474
|
+
|
|
475
|
+
**Precedence (highest to lowest):**
|
|
476
|
+
1. CLI arguments (--set flags)
|
|
477
|
+
2. `.iloom/settings.local.json` (local overrides, gitignored)
|
|
478
|
+
3. `.iloom/settings.json` (project-wide, committed)
|
|
479
|
+
4. `~/.config/iloom-ai/settings.json` (global, user-level)
|
|
480
|
+
|
|
481
|
+
**When to use global settings:**
|
|
482
|
+
- Personal preferences that apply across all projects (IDE preference when implemented, preferred agent models)
|
|
483
|
+
- Default permission modes for your workflow style
|
|
484
|
+
|
|
485
|
+
**When to use project settings:**
|
|
486
|
+
- Project-specific configuration (mainBranch, databaseProviders, issueManagement)
|
|
487
|
+
- Team defaults that should be shared via git
|
|
488
|
+
|
|
489
|
+
**When to use local settings:**
|
|
490
|
+
- Machine-specific overrides (port conflicts, local database URLs)
|
|
491
|
+
- Personal preferences that differ from team defaults
|
|
492
|
+
|
|
303
493
|
{{#IF SETTINGS_JSON}}{{#IF SETTINGS_LOCAL_JSON}}
|
|
304
494
|
**Configuration Priority**: Local settings (settings.local.json) override shared settings (settings.json) when both exist.
|
|
305
495
|
{{/IF SETTINGS_LOCAL_JSON}}{{/IF SETTINGS_JSON}}
|
|
@@ -316,12 +506,28 @@ You should present the combined configuration as defaults when asking questions,
|
|
|
316
506
|
|
|
317
507
|
Shell configuration file: `SHELL_CONFIG_PATH`
|
|
318
508
|
|
|
319
|
-
|
|
509
|
+
**CRITICAL: DO NOT attempt to read or access the user's shell configuration file directly.**
|
|
510
|
+
|
|
511
|
+
Work ONLY with the provided excerpt below. Do not use Read tool or any other method to access the shell config file.
|
|
512
|
+
|
|
513
|
+
You have been provided with a filtered excerpt below that shows ONLY the completion-related portions of the shell config file. This excerpt was created by searching for lines containing '--completion' along with 2 lines of surrounding context for readability.
|
|
514
|
+
|
|
515
|
+
**What this excerpt contains:**
|
|
516
|
+
- Lines matching '--completion' (if any exist)
|
|
517
|
+
- 2 lines before and 2 lines after each match for context
|
|
518
|
+
- If empty, it means NO completion setup was found in the file
|
|
519
|
+
|
|
520
|
+
**What this excerpt does NOT contain:**
|
|
521
|
+
- The full shell configuration file
|
|
522
|
+
- Environment variables, aliases, or other shell customizations
|
|
523
|
+
- Any content unrelated to completion setup
|
|
524
|
+
|
|
525
|
+
### SHELL CONFIG EXCERPT (Completion-related lines only)
|
|
526
|
+
|
|
320
527
|
```
|
|
321
528
|
SHELL_CONFIG_CONTENT
|
|
322
529
|
```
|
|
323
|
-
|
|
324
|
-
**BEFORE proceeding with iloom settings configuration, analyze the shell config file above and determine if autocomplete is already configured.**
|
|
530
|
+
**BEFORE proceeding with iloom settings configuration, analyze the excerpt above and determine if autocomplete is already configured.**
|
|
325
531
|
|
|
326
532
|
Look for patterns like:
|
|
327
533
|
- `eval "$(iloom --completion)"`
|
|
@@ -361,9 +567,14 @@ Parse both settings.json and settings.local.json. Merge them with local taking p
|
|
|
361
567
|
|
|
362
568
|
Extract these current values if they exist:
|
|
363
569
|
- `currentMainBranch` from `mainBranch` field (default: "main")
|
|
364
|
-
- `currentWorktreePrefix` from `worktreePrefix` field (default:
|
|
570
|
+
- `currentWorktreePrefix` from `worktreePrefix` field (default: null which means use default - NOTE: "" does not mean default)
|
|
365
571
|
- `currentPermissionMode` from `workflows.issue.permissionMode` field (default: "acceptEdits")
|
|
366
572
|
- `currentBasePort` from `capabilities.web.basePort` field (default: 3000)
|
|
573
|
+
- `currentMergeMode` from `mergeBehavior.mode` field (default: "local")
|
|
574
|
+
- `currentIdeType` from `ide.type` field (default: "vscode")
|
|
575
|
+
- `currentIssueProvider` from `issueManagement.provider` field (default: "github")
|
|
576
|
+
- `currentLinearTeamId` from `issueManagement.linear.teamId` field (if Linear is provider)
|
|
577
|
+
- `currentGitHubRemote` from `issueManagement.github.remote` field (if GitHub is provider and multiple remotes)
|
|
367
578
|
|
|
368
579
|
**If configuration already exists, display current configuration summary:**
|
|
369
580
|
|
|
@@ -374,7 +585,10 @@ Main Branch: [currentMainBranch or "main (default)"]
|
|
|
374
585
|
Worktree Prefix: [currentWorktreePrefix or "default (repo-name-looms)"]
|
|
375
586
|
Permission Mode (Issues): [currentPermissionMode or "acceptEdits (default)"]
|
|
376
587
|
Base Port: [currentBasePort or "3000 (default)"]
|
|
377
|
-
|
|
588
|
+
IDE: [currentIdeType or "vscode (default)"]
|
|
589
|
+
Issue Tracker: [currentIssueProvider or "github (default)"]
|
|
590
|
+
Linear Team ID: [currentLinearTeamId] (only if currentIssueProvider == linear)
|
|
591
|
+
{{#IF MULTIPLE_REMOTES}}GitHub Remote: [currentGitHubRemote] (only if currentIssueProvider == github){{/IF MULTIPLE_REMOTES}}
|
|
378
592
|
```
|
|
379
593
|
|
|
380
594
|
**Then ask the user what they want to do:**
|
|
@@ -389,48 +603,19 @@ GitHub Remote: [currentGitHubRemote or "not configured"]
|
|
|
389
603
|
**Based on their answer:**
|
|
390
604
|
- **Modify existing settings** → Proceed to Phase 1 to update settings
|
|
391
605
|
{{#IF MULTIPLE_REMOTES}}
|
|
392
|
-
- **Configure GitHub remote** → Go to Phase
|
|
606
|
+
- **Configure GitHub remote** → Go to Phase 2 to configure tooling (including remote selection), then skip to Phase 3 (summary), Phase 4 (choose file), and Phase 6 (save). Do NOT re-ask about Phase 1 settings.
|
|
393
607
|
{{/IF MULTIPLE_REMOTES}}
|
|
394
|
-
- **Add advanced configuration** → Skip to Phase
|
|
608
|
+
- **Add advanced configuration** → Skip to Phase 9 to help with advanced options
|
|
395
609
|
- **Start fresh** → Proceed to Phase 1 to reconfigure from scratch
|
|
396
|
-
- **Nothing/Exit** → Show Phase
|
|
397
|
-
|
|
398
|
-
**If NO configuration exists**, skip directly to Phase 0.5 (GitHub Remote Configuration) without asking what they want to do.
|
|
399
|
-
|
|
400
|
-
### Phase 0.5: GitHub Remote Configuration
|
|
401
|
-
|
|
402
|
-
REMOTES_INFO
|
|
403
|
-
|
|
404
|
-
**IMPORTANT: Before proceeding, determine if remote configuration is needed:**
|
|
405
|
-
|
|
406
|
-
{{#IF MULTIPLE_REMOTES}}
|
|
407
|
-
This repository has multiple git remotes detected. iloom needs to know which remote's GitHub repository to use for creating and reading issues.
|
|
408
|
-
|
|
409
|
-
**Detected remotes:**
|
|
410
|
-
REMOTES_INFO
|
|
610
|
+
- **Nothing/Exit** → Show Phase 9 wrap-up message and end session
|
|
411
611
|
|
|
412
|
-
If
|
|
413
|
-
- Show the list of detected remotes above with their repository URLs
|
|
414
|
-
- **Classic fork pattern (origin + upstream)**: If both "origin" and "upstream" remotes exist, recommend "upstream" since issues are typically tracked in the original repository, not personal forks. Explain: "In a typical fork workflow, 'upstream' points to the original project where issues are tracked, while 'origin' is your personal fork for submitting PRs."
|
|
415
|
-
- For other multi-remote scenarios: Default to "origin" if it exists, otherwise the first remote
|
|
416
|
-
- Store answer as: `issueManagement.github.remote`
|
|
612
|
+
**If NO configuration exists**, skip directly to Phase 1 (Local Development Settings) without asking what they want to do.
|
|
417
613
|
|
|
418
|
-
|
|
419
|
-
{{/IF MULTIPLE_REMOTES}}
|
|
420
|
-
|
|
421
|
-
{{#IF SINGLE_REMOTE}}
|
|
422
|
-
**Note:** Only one remote detected (SINGLE_REMOTE_NAME pointing to SINGLE_REMOTE_URL). iloom will use this for GitHub operations. No configuration needed.
|
|
423
|
-
{{/IF SINGLE_REMOTE}}
|
|
424
|
-
|
|
425
|
-
{{#IF NO_REMOTES}}
|
|
426
|
-
**Warning:** No git remotes detected. You may need to configure a remote before using iloom's GitHub features.
|
|
427
|
-
{{/IF NO_REMOTES}}
|
|
428
|
-
|
|
429
|
-
### Phase 1: Essential Settings
|
|
614
|
+
### Phase 1: Local Development Settings
|
|
430
615
|
|
|
431
|
-
Use AskUserQuestion to ask ALL
|
|
616
|
+
Use AskUserQuestion to ask ALL local development settings questions **IN A SINGLE BATCH**. **ALWAYS include current values in questions as shown below:**
|
|
432
617
|
|
|
433
|
-
**Create a single AskUserQuestion call with these
|
|
618
|
+
**Create a single AskUserQuestion call with these questions:**
|
|
434
619
|
|
|
435
620
|
1. **Main Branch**
|
|
436
621
|
- Question format: "What is your main/primary branch name?{{#IF currentMainBranch}} (Currently: [currentMainBranch]){{/IF currentMainBranch}}"
|
|
@@ -445,23 +630,23 @@ Use AskUserQuestion to ask ALL essential settings questions **IN A SINGLE BATCH*
|
|
|
445
630
|
2. **Worktree Prefix**
|
|
446
631
|
- Question format: "What prefix should iloom use for worktree directories?{{#IF currentWorktreePrefix}} (Currently: [currentWorktreePrefix]){{/IF currentWorktreePrefix}} Leave empty to use default (<repo-name>-looms)."
|
|
447
632
|
- Options (as examples):
|
|
448
|
-
-
|
|
449
|
-
- "looms" - Simple prefix
|
|
450
|
-
-
|
|
451
|
-
- Default: currentWorktreePrefix or
|
|
633
|
+
- Use default prefix (recommened)
|
|
634
|
+
- "looms" - Simple 'looms-' prefix
|
|
635
|
+
- Empty - each loom will be a sibling of this directory
|
|
636
|
+
- Default: currentWorktreePrefix or default (NOTE: empty does NOT mean use default)
|
|
452
637
|
- Validation: If not empty, only alphanumeric characters, hyphens, underscores, and forward slashes allowed
|
|
453
638
|
- Store answer as: `worktreePrefix`
|
|
454
|
-
- Note: If user
|
|
639
|
+
- Note: If user specifies default, omit this field from settings, it they say empty, add an empty string to the settings
|
|
455
640
|
|
|
456
641
|
3. **Permission Mode for Issue Workflows**
|
|
457
642
|
- Question format: "What permission mode should Claude use when working on issues?{{#IF currentPermissionMode}} (Currently: [currentPermissionMode]){{/IF currentPermissionMode}}"
|
|
458
643
|
- Options:
|
|
644
|
+
- "default" - Use Claude Code's default behavior
|
|
459
645
|
- "acceptEdits" - Claude executes with your confirmation (recommended)
|
|
460
646
|
- "plan" - Claude plans but doesn't execute
|
|
461
|
-
- "bypassPermissions" -
|
|
462
|
-
- "default" - Use Claude Code's default behavior
|
|
647
|
+
- "bypassPermissions" - Claude executes without confirmation (use with caution)
|
|
463
648
|
- Default: currentPermissionMode or "acceptEdits"
|
|
464
|
-
- Validation: Must be one of: plan, acceptEdits, bypassPermissions
|
|
649
|
+
- Validation: Must be one of: default, plan, acceptEdits, bypassPermissions
|
|
465
650
|
- Store answer as: `workflows.issue.permissionMode`
|
|
466
651
|
|
|
467
652
|
4. **Base Port**
|
|
@@ -476,48 +661,177 @@ Use AskUserQuestion to ask ALL essential settings questions **IN A SINGLE BATCH*
|
|
|
476
661
|
|
|
477
662
|
**Implementation Details:**
|
|
478
663
|
- Set multiSelect: false for all questions (user picks one answer per question)
|
|
479
|
-
- Use the AskUserQuestion tool with all
|
|
664
|
+
- Use the AskUserQuestion tool with all questions in the questions array
|
|
480
665
|
- Users can select "Other" on any question to provide custom input
|
|
481
666
|
- Process all answers at once when the user submits
|
|
482
667
|
|
|
483
|
-
### Phase 2: Configuration
|
|
668
|
+
### Phase 2: Tooling Configuration
|
|
669
|
+
|
|
670
|
+
This phase configures external tooling integrations. Use AskUserQuestion to gather these settings.
|
|
671
|
+
|
|
672
|
+
**Step 1: Issue Tracker Provider**
|
|
673
|
+
|
|
674
|
+
{{#IF MULTIPLE_REMOTES}}
|
|
675
|
+
Since this repository has multiple git remotes, GitHub Issues is suggested as the default since it integrates with your existing GitHub workflow. However, you can choose Linear if that's your team's issue tracker.
|
|
676
|
+
{{/IF MULTIPLE_REMOTES}}
|
|
677
|
+
|
|
678
|
+
1. **Issue Tracker Provider**
|
|
679
|
+
- Question format: "Which issue tracker do you use?{{#IF currentIssueProvider}} (Currently: [currentIssueProvider]){{/IF currentIssueProvider}}"
|
|
680
|
+
- Options:
|
|
681
|
+
- "github" - GitHub Issues (default)
|
|
682
|
+
- "linear" - Linear Issues
|
|
683
|
+
- Default: currentIssueProvider or "github"
|
|
684
|
+
- Validation: Must be one of: github, linear
|
|
685
|
+
- Store answer as: `issueManagement.provider`
|
|
686
|
+
|
|
687
|
+
**Step 2: Provider-Specific Configuration**
|
|
688
|
+
|
|
689
|
+
Based on the answer to Step 1, ask the appropriate follow-up questions:
|
|
690
|
+
|
|
691
|
+
**If GitHub was selected:**
|
|
692
|
+
|
|
693
|
+
{{#IF MULTIPLE_REMOTES}}
|
|
694
|
+
This repository has multiple git remotes detected. iloom needs to know which remote's GitHub repository to use for creating and reading issues.
|
|
695
|
+
|
|
696
|
+
**Detected remotes:**
|
|
697
|
+
REMOTES_INFO
|
|
698
|
+
|
|
699
|
+
2. **GitHub Remote** (only ask if GitHub is selected)
|
|
700
|
+
- Question format: "Which remote should iloom use for GitHub issue operations?"
|
|
701
|
+
- Show the list of detected remotes above with their repository URLs
|
|
702
|
+
- **Classic fork pattern (origin + upstream)**: If both "origin" and "upstream" remotes exist, recommend "upstream" since issues are typically tracked in the original repository, not personal forks. Explain: "In a typical fork workflow, 'upstream' points to the original project where issues are tracked, while 'origin' is your personal fork for submitting PRs."
|
|
703
|
+
- For other multi-remote scenarios: Default to "origin" if it exists, otherwise the first remote
|
|
704
|
+
- Store answer as: `issueManagement.github.remote`
|
|
705
|
+
{{/IF MULTIPLE_REMOTES}}
|
|
706
|
+
|
|
707
|
+
{{#IF SINGLE_REMOTE}}
|
|
708
|
+
**Note:** Only one remote detected (SINGLE_REMOTE_NAME pointing to SINGLE_REMOTE_URL). iloom will use this for GitHub operations. No additional configuration needed.
|
|
709
|
+
{{/IF SINGLE_REMOTE}}
|
|
710
|
+
|
|
711
|
+
{{#IF NO_REMOTES}}
|
|
712
|
+
**Warning:** No git remotes detected. The user will need to configure a remote before using iloom's GitHub features.
|
|
713
|
+
{{/IF NO_REMOTES}}
|
|
484
714
|
|
|
485
|
-
|
|
715
|
+
**If Linear was selected:**
|
|
716
|
+
|
|
717
|
+
2. **Linear Team ID** (only ask if issue provider is "linear")
|
|
718
|
+
- Question format: "What is your Linear team ID/key?{{#IF currentLinearTeamId}} (Currently: [currentLinearTeamId]){{/IF currentLinearTeamId}}"
|
|
719
|
+
- Options (as examples):
|
|
720
|
+
- "ENG" - Engineering team
|
|
721
|
+
- "PLAT" - Platform team
|
|
722
|
+
- "PROD" - Product team
|
|
723
|
+
- Default: currentLinearTeamId or NO DEFAULT (required if Linear is selected)
|
|
724
|
+
- Validation: Non-empty string, length <= 7 characters
|
|
725
|
+
- Store answer as: `issueManagement.linear.teamId`
|
|
726
|
+
- Context: This is the team key shown in your Linear workspace (e.g., "ENG" in "ENG-123")
|
|
727
|
+
|
|
728
|
+
3. **Linear API Token** (only ask if issue provider is "linear")
|
|
729
|
+
- Question format: "What is your Linear API token? (Currently: 'set' or 'unset' - do not print)"
|
|
730
|
+
- Options:
|
|
731
|
+
- Use LINEAR_API_TOKEN env var
|
|
732
|
+
- I have it now - use the "Type something" option to enter it
|
|
733
|
+
- I'll come back to it
|
|
734
|
+
- Default: currentLinearApiToken or DEFAULT (defaults to LINEAR_API_TOKEN env var)
|
|
735
|
+
- Validation: Non-empty string, should start with "lin_api_"
|
|
736
|
+
- Guidance: Choose "Type something" to enter it
|
|
737
|
+
- Store answer as: `issueManagement.linear.apiToken`
|
|
738
|
+
- **CRITICAL SECURITY REQUIREMENT:** This value MUST ALWAYS be saved to `settings.local.json`, NEVER to `settings.json`, regardless of which file the user selected for other settings. This token must never be committed to source control.
|
|
739
|
+
- Context: Get your API token from Linear Settings → API → Personal API Keys (https://linear.app/settings/api)
|
|
740
|
+
|
|
741
|
+
**Step 3: IDE Selection**
|
|
742
|
+
|
|
743
|
+
4. **IDE Selection**
|
|
744
|
+
- Question format: "Which IDE should iloom launch when starting a loom?{{#IF currentIdeType}} (Currently: [currentIdeType]){{/IF currentIdeType}}"
|
|
745
|
+
- Options:
|
|
746
|
+
- "vscode" - Visual Studio Code (default)
|
|
747
|
+
- "cursor" - Cursor AI editor
|
|
748
|
+
- "webstorm" - JetBrains WebStorm
|
|
749
|
+
- "sublime" - Sublime Text
|
|
750
|
+
- "intellij" - JetBrains IntelliJ IDEA
|
|
751
|
+
- "windsurf" - Windsurf editor
|
|
752
|
+
- Default: currentIdeType or "vscode"
|
|
753
|
+
- Validation: Must be one of the listed options
|
|
754
|
+
- Store answer as: `ide.type`
|
|
755
|
+
- Note: Color synchronization (title bar colors) only works with VSCode-compatible editors (vscode, cursor, windsurf). Other IDEs will launch without color theming.
|
|
756
|
+
|
|
757
|
+
**Step 4: Merge Mode** (only ask if multiple remotes detected OR user requests advanced config)
|
|
758
|
+
|
|
759
|
+
5. **Merge Mode**
|
|
760
|
+
- Question format: "How should iloom handle finishing work?{{#IF currentMergeMode}} (Currently: [currentMergeMode]){{/IF currentMergeMode}}"
|
|
761
|
+
- Options:
|
|
762
|
+
- "local" - Merge changes locally (traditional workflow)
|
|
763
|
+
- "github-pr" - Create GitHub PR instead of merging locally (for PR-based workflows or forks)
|
|
764
|
+
- Default: currentMergeMode or "local"
|
|
765
|
+
- Validation: Must be one of: local, github-pr
|
|
766
|
+
- Store answer as: `mergeBehavior.mode`
|
|
767
|
+
- Context: Fork workflows (with upstream remote) should typically use "github-pr" mode
|
|
768
|
+
|
|
769
|
+
**Implementation Details:**
|
|
770
|
+
- Ask Step 1 first to determine provider
|
|
771
|
+
- Then ask Step 2 based on the provider selected (includes Linear API Token if Linear was selected)
|
|
772
|
+
- Ask Step 3 (IDE) for all users
|
|
773
|
+
- Ask Step 4 (Merge Mode) only if multiple remotes detected OR user requests advanced config
|
|
774
|
+
- Set multiSelect: false for all questions
|
|
775
|
+
- Process answers sequentially as they depend on each other
|
|
776
|
+
|
|
777
|
+
### Phase 3: Configuration Summary
|
|
778
|
+
|
|
779
|
+
After gathering all answers from Phase 1 and Phase 2, display a summary like this:
|
|
486
780
|
|
|
487
781
|
```
|
|
488
782
|
Configuration Summary:
|
|
489
783
|
━━━━━━━━━━━━━━━━━━━━
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
784
|
+
|
|
785
|
+
Local Development Settings (Phase 1):
|
|
786
|
+
Main Branch: [value]
|
|
787
|
+
Worktree Prefix: [value or "default (repo-name-looms)"]
|
|
788
|
+
Permission Mode (Issues): [value]
|
|
789
|
+
Base Port: [value]
|
|
790
|
+
|
|
791
|
+
Tooling Configuration (Phase 2):
|
|
792
|
+
Issue Tracker: [value]
|
|
793
|
+
Linear Team ID: [value] (only if issue tracker is Linear)
|
|
794
|
+
Linear API Token: [configured/not configured] (only if issue tracker is Linear - never show actual token)
|
|
795
|
+
{{#IF MULTIPLE_REMOTES}}GitHub Remote: [value] (only if issue tracker is GitHub){{/IF MULTIPLE_REMOTES}}
|
|
796
|
+
IDE: [value or "vscode (default)"]
|
|
797
|
+
Merge Mode: [value] (only if configured)
|
|
495
798
|
```
|
|
496
799
|
|
|
497
|
-
**Note**:
|
|
800
|
+
**Note**:
|
|
801
|
+
- Include the GitHub Remote line in the summary ONLY if it was configured in Phase 2 (multiple remotes and GitHub selected)
|
|
802
|
+
- Include Linear Team ID ONLY if Linear was selected as the issue tracker provider
|
|
803
|
+
- Include Merge Mode ONLY if it was asked and configured (multiple remotes or advanced config)
|
|
498
804
|
|
|
499
805
|
Then ask: "Does this configuration look correct?"
|
|
500
|
-
- If yes, proceed to Phase
|
|
806
|
+
- If yes, proceed to Phase 4
|
|
501
807
|
- If no, ask which setting they want to change and repeat that question
|
|
502
808
|
|
|
503
|
-
### Phase
|
|
809
|
+
### Phase 4: Choose Configuration File
|
|
504
810
|
|
|
505
811
|
**Fork/Contributor Check:** If "GitHub Remote Configuration" shows both "origin" and "upstream" remotes (classic fork pattern), display: "It looks like you're working on a fork (origin + upstream remotes detected). For contributors, we recommend saving to settings.local.json to avoid including personal settings in PRs to upstream, but you can still choose shared if needed."
|
|
506
812
|
|
|
507
813
|
**CRITICAL: You MUST ask the user where to save the configuration. DO NOT make assumptions or decide for them.**
|
|
508
814
|
|
|
509
|
-
Ask the user
|
|
510
|
-
-
|
|
511
|
-
-
|
|
815
|
+
Ask the user: "Where should this configuration be saved?
|
|
816
|
+
- **Global**: Save to ~/.config/iloom-ai/settings.json (applies to all your projects)
|
|
817
|
+
- **Project**: Save to .iloom/settings.json (shared with team, committed to git)
|
|
818
|
+
- **Local**: Save to .iloom/settings.local.json (project-specific, local only, gitignored)"
|
|
819
|
+
|
|
820
|
+
**Provide guidance based on the settings being configured:**
|
|
821
|
+
- **Recommend Global for**: IDE preferences, default permission modes, personal workflow preferences
|
|
822
|
+
- **Recommend Project for**: Main branch, worktree prefix, base port (when standardized for the team)
|
|
823
|
+
- **Recommend Local for**: Machine-specific overrides, personal preferences that differ from team defaults
|
|
824
|
+
|
|
825
|
+
**Fork/Contributor Note:** For fork setups, recommend Local over Project to avoid including personal settings in PRs to upstream.
|
|
512
826
|
|
|
513
827
|
**DO NOT:**
|
|
514
828
|
- Assume what the user wants based on the type of setting
|
|
515
829
|
- Make decisions about what "should" be shared with the team
|
|
516
|
-
- Skip this question and auto-save to
|
|
830
|
+
- Skip this question and auto-save to any file
|
|
517
831
|
|
|
518
|
-
Store the user's answer to determine which file to write in Phase
|
|
832
|
+
Store the user's answer to determine which file to write in Phase 6.
|
|
519
833
|
|
|
520
|
-
### Phase
|
|
834
|
+
### Phase 5: File Generation
|
|
521
835
|
|
|
522
836
|
Based on the user's answers, generate the settings JSON content following these rules:
|
|
523
837
|
|
|
@@ -543,31 +857,33 @@ When both settings.json and settings.local.json exist, you MUST prevent duplicat
|
|
|
543
857
|
3. **Merge behavior example:**
|
|
544
858
|
```
|
|
545
859
|
Before:
|
|
546
|
-
settings.json: { "mainBranch": "
|
|
547
|
-
settings.local.json: { "mainBranch": "
|
|
860
|
+
settings.json: { "mainBranch": "develop", "capabilities": { "web": { "basePort": 3000 } } }
|
|
861
|
+
settings.local.json: { "mainBranch": "develop", "capabilities": { "web": { "basePort": 4000 } } }
|
|
548
862
|
|
|
549
863
|
Problem: mainBranch is duplicated (same value in both)
|
|
550
864
|
|
|
551
865
|
After user updates local settings:
|
|
552
|
-
settings.json: { "mainBranch": "
|
|
866
|
+
settings.json: { "mainBranch": "develop", "capabilities": { "web": { "basePort": 3000 } } }
|
|
553
867
|
settings.local.json: { "capabilities": { "web": { "basePort": 4000 } } }
|
|
554
868
|
|
|
555
869
|
Result: mainBranch removed from local because it matches shared
|
|
556
870
|
```
|
|
557
871
|
|
|
872
|
+
Note: If mainBranch is "main" (the default), it should not appear in either file.
|
|
873
|
+
|
|
558
874
|
**Settings generation rules:**
|
|
559
875
|
|
|
560
|
-
1. **
|
|
876
|
+
1. **Add mainBranch ONLY if it's not "main" (the default):**
|
|
561
877
|
```json
|
|
562
878
|
{
|
|
563
|
-
"mainBranch": "<user's answer>"
|
|
879
|
+
"mainBranch": "<user's answer>" // ONLY if not "main"
|
|
564
880
|
}
|
|
565
881
|
```
|
|
882
|
+
If user chose "main", do NOT include mainBranch in the settings file.
|
|
566
883
|
|
|
567
884
|
2. **Add worktreePrefix ONLY if user provided a non-empty value:**
|
|
568
885
|
```json
|
|
569
886
|
{
|
|
570
|
-
"mainBranch": "<value>",
|
|
571
887
|
"worktreePrefix": "<user's value>"
|
|
572
888
|
}
|
|
573
889
|
```
|
|
@@ -575,7 +891,6 @@ When both settings.json and settings.local.json exist, you MUST prevent duplicat
|
|
|
575
891
|
3. **Add workflows ONLY if permissionMode is not "default":**
|
|
576
892
|
```json
|
|
577
893
|
{
|
|
578
|
-
"mainBranch": "<value>",
|
|
579
894
|
"workflows": {
|
|
580
895
|
"issue": {
|
|
581
896
|
"permissionMode": "<user's answer>"
|
|
@@ -587,7 +902,6 @@ When both settings.json and settings.local.json exist, you MUST prevent duplicat
|
|
|
587
902
|
4. **Add capabilities.web ONLY if basePort is not 3000:**
|
|
588
903
|
```json
|
|
589
904
|
{
|
|
590
|
-
"mainBranch": "<value>",
|
|
591
905
|
"capabilities": {
|
|
592
906
|
"web": {
|
|
593
907
|
"basePort": <user's number>
|
|
@@ -596,9 +910,48 @@ When both settings.json and settings.local.json exist, you MUST prevent duplicat
|
|
|
596
910
|
}
|
|
597
911
|
```
|
|
598
912
|
|
|
599
|
-
5. **
|
|
913
|
+
5. **Add issueManagement ONLY if provider is not "github" OR if github.remote is configured:**
|
|
914
|
+
|
|
915
|
+
**For GitHub (default):**
|
|
916
|
+
- If provider is "github" and no remote configured: OMIT the entire issueManagement section
|
|
917
|
+
- If provider is "github" and remote IS configured (from Phase 2):
|
|
918
|
+
```json
|
|
919
|
+
{
|
|
920
|
+
"issueManagement": {
|
|
921
|
+
"provider": "github",
|
|
922
|
+
"github": {
|
|
923
|
+
"remote": "<user's selected remote>"
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
```
|
|
600
928
|
|
|
601
|
-
|
|
929
|
+
**For Linear:**
|
|
930
|
+
```json
|
|
931
|
+
{
|
|
932
|
+
"issueManagement": {
|
|
933
|
+
"provider": "linear",
|
|
934
|
+
"linear": {
|
|
935
|
+
"teamId": "<user's team ID>"
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
6. **Add mergeBehavior ONLY if mode is not "local":**
|
|
942
|
+
```json
|
|
943
|
+
{
|
|
944
|
+
"mergeBehavior": {
|
|
945
|
+
"mode": "<user's answer>"
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
7. **Combine all applicable sections** into a single JSON object. Only include sections where the value differs from the default.
|
|
951
|
+
|
|
952
|
+
8. **If existing settings exist, MERGE** the new values with existing ones. Don't overwrite settings the user didn't modify.
|
|
953
|
+
|
|
954
|
+
### Phase 6: Write File
|
|
602
955
|
|
|
603
956
|
**CRITICAL: REMOVE DUPLICATES BEFORE WRITING**
|
|
604
957
|
|
|
@@ -629,21 +982,130 @@ Reason: mainBranch has same value in both files, so it's removed from local
|
|
|
629
982
|
```
|
|
630
983
|
|
|
631
984
|
**Write steps:**
|
|
632
|
-
1. Ensure
|
|
985
|
+
1. Ensure appropriate directory exists:
|
|
986
|
+
- For global: Ensure `~/.config/iloom-ai/` directory exists (create if needed)
|
|
987
|
+
- For project/local: Ensure `.iloom/` directory exists (create if needed)
|
|
633
988
|
2. Perform duplication check as described above
|
|
634
989
|
3. Write the deduplicated settings to the chosen file:
|
|
635
|
-
-
|
|
636
|
-
- `.iloom/settings.
|
|
990
|
+
- `~/.config/iloom-ai/settings.json` if user chose Global
|
|
991
|
+
- `.iloom/settings.json` if user chose Project
|
|
992
|
+
- `.iloom/settings.local.json` if user chose Local
|
|
637
993
|
4. Use the Write tool to create/update the file
|
|
638
994
|
|
|
639
|
-
### Phase
|
|
995
|
+
### Phase 7: Update .gitignore
|
|
640
996
|
|
|
641
997
|
If the user chose `.iloom/settings.local.json`, ensure `.gitignore` includes this entry:
|
|
642
998
|
- Read `.gitignore` if it exists
|
|
643
999
|
- Check if `.iloom/settings.local.json` is already listed
|
|
644
1000
|
- If not, append it to the file
|
|
645
1001
|
|
|
646
|
-
### Phase 7:
|
|
1002
|
+
### Phase 7.5: Offer to Commit Changes
|
|
1003
|
+
|
|
1004
|
+
After making configuration changes, offer to commit the iloom-related files:
|
|
1005
|
+
|
|
1006
|
+
**Step 0: Ensure git repository exists**
|
|
1007
|
+
|
|
1008
|
+
First, check if the current directory is a git repository:
|
|
1009
|
+
```bash
|
|
1010
|
+
git rev-parse --is-inside-work-tree 2>/dev/null || echo "not-a-repo"
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
If the output is "not-a-repo", ask the user:
|
|
1014
|
+
```
|
|
1015
|
+
This directory is not a git repository. Would you like to initialize one?
|
|
1016
|
+
- Yes - Initialize git repository
|
|
1017
|
+
- No - Skip (iloom requires git to function)
|
|
1018
|
+
```
|
|
1019
|
+
|
|
1020
|
+
If user says yes, initialize the repository:
|
|
1021
|
+
```bash
|
|
1022
|
+
git init
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
Then display:
|
|
1026
|
+
```
|
|
1027
|
+
✓ Initialized git repository
|
|
1028
|
+
```
|
|
1029
|
+
|
|
1030
|
+
If user says no, warn them:
|
|
1031
|
+
```
|
|
1032
|
+
⚠ iloom requires a git repository to function. You'll need to run 'git init' before using iloom commands.
|
|
1033
|
+
```
|
|
1034
|
+
Then skip to Phase 8 (don't offer to commit since there's no repo).
|
|
1035
|
+
|
|
1036
|
+
**Step 1: Identify iloom-related changes**
|
|
1037
|
+
|
|
1038
|
+
Use the Bash tool to check for iloom-related changes:
|
|
1039
|
+
```bash
|
|
1040
|
+
git status --porcelain .iloom/ .gitignore 2>/dev/null | grep -E '^\s*(M|A|\?\?)\s+(.iloom/|\.gitignore)' || true
|
|
1041
|
+
```
|
|
1042
|
+
|
|
1043
|
+
This identifies ONLY iloom-related files that were:
|
|
1044
|
+
- Modified (M)
|
|
1045
|
+
- Added (A)
|
|
1046
|
+
- Untracked (??)
|
|
1047
|
+
|
|
1048
|
+
**Step 2: If changes exist, ask the user**
|
|
1049
|
+
|
|
1050
|
+
If there are iloom-related changes, display them and ask:
|
|
1051
|
+
|
|
1052
|
+
```
|
|
1053
|
+
The following iloom configuration files have been modified:
|
|
1054
|
+
[list files from git status]
|
|
1055
|
+
|
|
1056
|
+
Would you like to commit these changes?
|
|
1057
|
+
- Yes - Commit iloom configuration changes (strongly recommended)
|
|
1058
|
+
- No - Skip committing (not recommended)
|
|
1059
|
+
|
|
1060
|
+
⚠️ WARNING: If you don't commit settings.json, iloom will not work correctly in new looms.
|
|
1061
|
+
Looms are created from committed code, so your configuration won't be available.
|
|
1062
|
+
(Local files like settings.local.json and .env are copied automatically - but settings.json must be committed.)
|
|
1063
|
+
```
|
|
1064
|
+
|
|
1065
|
+
**CRITICAL RULES:**
|
|
1066
|
+
- **ONLY commit iloom-related files**: .iloom/settings.json, .gitignore
|
|
1067
|
+
- **NEVER stage or commit unrelated files** - even if they appear in `git status`
|
|
1068
|
+
- **If the commit fails, you must then subsequently request to use --no-verify flag** to bypass pre-commit hooks that might fail due to unrelated codebase state
|
|
1069
|
+
- **Do NOT commit settings.local.json** - it should be gitignored, not committed
|
|
1070
|
+
|
|
1071
|
+
**Step 3: If user says yes, commit the changes**
|
|
1072
|
+
|
|
1073
|
+
Stage ONLY the iloom-related files that should be committed:
|
|
1074
|
+
```bash
|
|
1075
|
+
git add .iloom/settings.json .gitignore 2>/dev/null || true
|
|
1076
|
+
```
|
|
1077
|
+
|
|
1078
|
+
Note: Do NOT add .iloom/settings.local.json - it's meant to be local-only.
|
|
1079
|
+
|
|
1080
|
+
Then commit:
|
|
1081
|
+
|
|
1082
|
+
```bash
|
|
1083
|
+
git commit -m "chore: configure iloom CLI settings"
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1086
|
+
If it fails, suggest to the user that we should try to commit with --no-verfy:
|
|
1087
|
+
|
|
1088
|
+
```bash
|
|
1089
|
+
git commit --no-verify -m "chore: configure iloom CLI settings"
|
|
1090
|
+
```
|
|
1091
|
+
|
|
1092
|
+
**Step 4: Report result**
|
|
1093
|
+
|
|
1094
|
+
If commit succeeded:
|
|
1095
|
+
```
|
|
1096
|
+
✓ Committed iloom configuration changes
|
|
1097
|
+
```
|
|
1098
|
+
|
|
1099
|
+
If commit failed or nothing to commit:
|
|
1100
|
+
```
|
|
1101
|
+
ℹ No iloom configuration changes to commit (or already committed)
|
|
1102
|
+
```
|
|
1103
|
+
|
|
1104
|
+
**Step 5: If no changes or user declines**
|
|
1105
|
+
|
|
1106
|
+
Simply proceed to Phase 8 without committing.
|
|
1107
|
+
|
|
1108
|
+
### Phase 8: Completion Message
|
|
647
1109
|
|
|
648
1110
|
After successfully writing the configuration, inform the user:
|
|
649
1111
|
|
|
@@ -653,15 +1115,16 @@ After successfully writing the configuration, inform the user:
|
|
|
653
1115
|
You can now use iloom CLI with your custom settings!
|
|
654
1116
|
|
|
655
1117
|
Next steps:
|
|
656
|
-
- Run 'iloom start <issue-number>' to create a
|
|
1118
|
+
- Run 'iloom start <issue-number>' to create a loom
|
|
657
1119
|
- Edit [filename] directly to modify settings
|
|
658
1120
|
- Run 'iloom init' again to reconfigure interactively
|
|
659
1121
|
|
|
660
|
-
[If settings.json]: This configuration
|
|
661
|
-
[If settings.
|
|
1122
|
+
[If ~/.config/iloom-ai/settings.json]: This global configuration applies to all your iloom projects.
|
|
1123
|
+
[If .iloom/settings.json]: This configuration will be shared with your team via git.
|
|
1124
|
+
[If .iloom/settings.local.json]: This configuration is local-only and won't be committed.
|
|
662
1125
|
```
|
|
663
1126
|
|
|
664
|
-
### Phase
|
|
1127
|
+
### Phase 9: Wrap Up and Next Steps
|
|
665
1128
|
|
|
666
1129
|
After completing the basic configuration, provide a helpful conclusion:
|
|
667
1130
|
|
|
@@ -669,9 +1132,9 @@ After completing the basic configuration, provide a helpful conclusion:
|
|
|
669
1132
|
🎯 Your iloom CLI is ready to use!
|
|
670
1133
|
|
|
671
1134
|
Here's how to get started:
|
|
672
|
-
• Run `iloom start <issue-number>` to create a
|
|
673
|
-
• Run `iloom start <pr-number>` to create a
|
|
674
|
-
• Run `iloom list` to see your active
|
|
1135
|
+
• Run `iloom start <issue-number>` to create a loom for an issue
|
|
1136
|
+
• Run `iloom start <pr-number>` to create a loom for a pull request
|
|
1137
|
+
• Run `iloom list` to see your active looms
|
|
675
1138
|
• Run `iloom finish` when you're done working to merge changes and clean up
|
|
676
1139
|
|
|
677
1140
|
Need more advanced configuration? I can help you set up:
|
|
@@ -732,14 +1195,23 @@ If users ask about specific configurations, help them add these sections to thei
|
|
|
732
1195
|
"protectedBranches": ["main", "production", "release/*"]
|
|
733
1196
|
```
|
|
734
1197
|
|
|
1198
|
+
5. **IDE Configuration:**
|
|
1199
|
+
```json
|
|
1200
|
+
"ide": {
|
|
1201
|
+
"type": "cursor"
|
|
1202
|
+
}
|
|
1203
|
+
```
|
|
1204
|
+
|
|
735
1205
|
## Important Notes
|
|
736
1206
|
|
|
737
1207
|
- **Validate ALL inputs** against the schema before writing files
|
|
738
|
-
- **Use batch mode** for AskUserQuestion - ask all
|
|
1208
|
+
- **Use batch mode** for AskUserQuestion - ask all Phase 1 (local development) settings questions in a single call for faster setup
|
|
739
1209
|
- **ALWAYS follow Phase 0** - Extract current settings and check if configuration exists
|
|
740
1210
|
- **For existing users** - Ask what they want to do (modify, add advanced config, start fresh, or exit) instead of forcing them through the entire flow
|
|
741
|
-
- **For new users** - Skip directly to Phase
|
|
742
|
-
- **ALWAYS use the question formats** specified in Phase 1 that include "(Currently: [value])" when current values exist
|
|
1211
|
+
- **For new users** - Skip directly to Phase 1 (Local Development Settings) and proceed through Phase 2 (Tooling Configuration)
|
|
1212
|
+
- **ALWAYS use the question formats** specified in Phase 1 and Phase 2 that include "(Currently: [value])" when current values exist
|
|
1213
|
+
- **Phase 1 = Local dev settings** (main branch, worktree prefix, permission mode, base port)
|
|
1214
|
+
- **Phase 2 = Tooling integrations** (issue tracker provider, provider-specific config, IDE, merge mode)
|
|
743
1215
|
- **Keep configuration minimal** - only include non-default values
|
|
744
1216
|
- **Merge carefully** when updating existing settings - preserve any settings the user didn't modify
|
|
745
1217
|
- **Handle errors gracefully** - if schema validation fails, explain what went wrong and ask the user to try again
|