planflow-plugin 0.1.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/LICENSE +21 -0
- package/README.md +93 -0
- package/bin/cli.js +169 -0
- package/bin/postinstall.js +87 -0
- package/commands/pfActivity/SKILL.md +725 -0
- package/commands/pfAssign/SKILL.md +623 -0
- package/commands/pfCloudLink/SKILL.md +192 -0
- package/commands/pfCloudList/SKILL.md +222 -0
- package/commands/pfCloudNew/SKILL.md +187 -0
- package/commands/pfCloudUnlink/SKILL.md +152 -0
- package/commands/pfComment/SKILL.md +227 -0
- package/commands/pfComments/SKILL.md +159 -0
- package/commands/pfConnectionStatus/SKILL.md +433 -0
- package/commands/pfDiscord/SKILL.md +740 -0
- package/commands/pfGithubBranch/SKILL.md +672 -0
- package/commands/pfGithubIssue/SKILL.md +963 -0
- package/commands/pfGithubLink/SKILL.md +859 -0
- package/commands/pfGithubPr/SKILL.md +1335 -0
- package/commands/pfGithubUnlink/SKILL.md +401 -0
- package/commands/pfLive/SKILL.md +185 -0
- package/commands/pfLogin/SKILL.md +249 -0
- package/commands/pfLogout/SKILL.md +155 -0
- package/commands/pfMyTasks/SKILL.md +198 -0
- package/commands/pfNotificationSettings/SKILL.md +619 -0
- package/commands/pfNotifications/SKILL.md +420 -0
- package/commands/pfNotificationsClear/SKILL.md +421 -0
- package/commands/pfReact/SKILL.md +232 -0
- package/commands/pfSlack/SKILL.md +659 -0
- package/commands/pfSyncPull/SKILL.md +210 -0
- package/commands/pfSyncPush/SKILL.md +299 -0
- package/commands/pfSyncStatus/SKILL.md +212 -0
- package/commands/pfTeamInvite/SKILL.md +161 -0
- package/commands/pfTeamList/SKILL.md +253 -0
- package/commands/pfTeamRemove/SKILL.md +115 -0
- package/commands/pfTeamRole/SKILL.md +160 -0
- package/commands/pfTestWebhooks/SKILL.md +722 -0
- package/commands/pfUnassign/SKILL.md +134 -0
- package/commands/pfWhoami/SKILL.md +258 -0
- package/commands/pfWorkload/SKILL.md +219 -0
- package/commands/planExportCsv/SKILL.md +106 -0
- package/commands/planExportGithub/SKILL.md +222 -0
- package/commands/planExportJson/SKILL.md +159 -0
- package/commands/planExportSummary/SKILL.md +158 -0
- package/commands/planNew/SKILL.md +641 -0
- package/commands/planNext/SKILL.md +1200 -0
- package/commands/planSettingsAutoSync/SKILL.md +199 -0
- package/commands/planSettingsLanguage/SKILL.md +201 -0
- package/commands/planSettingsReset/SKILL.md +237 -0
- package/commands/planSettingsShow/SKILL.md +482 -0
- package/commands/planSpec/SKILL.md +929 -0
- package/commands/planUpdate/SKILL.md +2518 -0
- package/commands/team/SKILL.md +740 -0
- package/locales/en.json +1499 -0
- package/locales/ka.json +1499 -0
- package/package.json +48 -0
- package/templates/PROJECT_PLAN.template.md +157 -0
- package/templates/backend-api.template.md +562 -0
- package/templates/frontend-spa.template.md +610 -0
- package/templates/fullstack.template.md +397 -0
- package/templates/ka/backend-api.template.md +562 -0
- package/templates/ka/frontend-spa.template.md +610 -0
- package/templates/ka/fullstack.template.md +397 -0
- package/templates/sections/architecture.md +21 -0
- package/templates/sections/overview.md +15 -0
- package/templates/sections/tasks.md +22 -0
- package/templates/sections/tech-stack.md +19 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planSettingsAutoSync
|
|
3
|
+
description: Manage automatic synchronization after planUpdate commands
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan Settings Auto-Sync
|
|
7
|
+
|
|
8
|
+
Manage automatic synchronization after /planUpdate commands with toggle card.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/planSettingsAutoSync # Show auto-sync status
|
|
14
|
+
/planSettingsAutoSync on # Enable auto-sync
|
|
15
|
+
/planSettingsAutoSync off # Disable auto-sync
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Step 0: Load Configuration
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
function getConfig() {
|
|
22
|
+
const localConfigPath = "./.plan-config.json"
|
|
23
|
+
let localConfig = {}
|
|
24
|
+
if (fileExists(localConfigPath)) {
|
|
25
|
+
try { localConfig = JSON.parse(readFile(localConfigPath)) } catch {}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const globalConfigPath = expandPath("~/.config/claude/plan-plugin-config.json")
|
|
29
|
+
let globalConfig = {}
|
|
30
|
+
if (fileExists(globalConfigPath)) {
|
|
31
|
+
try { globalConfig = JSON.parse(readFile(globalConfigPath)) } catch {}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return { ...globalConfig, ...localConfig }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const config = getConfig()
|
|
38
|
+
const language = config.language || "en"
|
|
39
|
+
const cloudConfig = config.cloud || {}
|
|
40
|
+
const isAuthenticated = !!cloudConfig.apiToken
|
|
41
|
+
const autoSync = cloudConfig.autoSync || false
|
|
42
|
+
|
|
43
|
+
const t = JSON.parse(readFile(`locales/${language}.json`))
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Step 1: Parse Arguments
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
const autoSyncValue = commandArgs.trim().toLowerCase() || null // "on", "off", or null
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Step 2: Check Authentication
|
|
53
|
+
|
|
54
|
+
**If not authenticated, display error card:**
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
58
|
+
│ ❌ ERROR │
|
|
59
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
60
|
+
│ │
|
|
61
|
+
│ {t.commands.settings.autoSyncNotAuthenticated} │
|
|
62
|
+
│ │
|
|
63
|
+
│ Auto-sync requires a cloud connection. │
|
|
64
|
+
│ │
|
|
65
|
+
│ 💡 {t.ui.labels.nextSteps} │
|
|
66
|
+
│ • /pfLogin Sign in first │
|
|
67
|
+
│ │
|
|
68
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Step 3: Handle Based on Value
|
|
72
|
+
|
|
73
|
+
### If null (show status)
|
|
74
|
+
|
|
75
|
+
Display status card:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
79
|
+
│ 🔄 {t.commands.settings.autoSyncTitle} │
|
|
80
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
81
|
+
│ │
|
|
82
|
+
│ ── Current Status ────────────────────────────────────────────────────── │
|
|
83
|
+
│ │
|
|
84
|
+
│ ╭─────────────────────╮ │
|
|
85
|
+
│ │ {autoSync ? "✓ Enabled" : "✕ Disabled"} │ │
|
|
86
|
+
│ ╰─────────────────────╯ │
|
|
87
|
+
│ │
|
|
88
|
+
│ ── What is Auto-Sync? ────────────────────────────────────────────────── │
|
|
89
|
+
│ │
|
|
90
|
+
│ When enabled, changes from /planUpdate commands are automatically │
|
|
91
|
+
│ synced to cloud without running /pfSyncPush. │
|
|
92
|
+
│ │
|
|
93
|
+
│ Example: │
|
|
94
|
+
│ /planUpdate T1.1 done → Updates cloud automatically │
|
|
95
|
+
│ │
|
|
96
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
97
|
+
│ │
|
|
98
|
+
│ 💡 {t.ui.labels.commands} │
|
|
99
|
+
│ • /planSettingsAutoSync on Enable auto-sync │
|
|
100
|
+
│ • /planSettingsAutoSync off Disable auto-sync │
|
|
101
|
+
│ │
|
|
102
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### If "on" (enable)
|
|
106
|
+
|
|
107
|
+
1. Read `./.plan-config.json`
|
|
108
|
+
2. Set `cloud.autoSync = true`
|
|
109
|
+
3. Update `lastUsed`
|
|
110
|
+
4. Write back
|
|
111
|
+
|
|
112
|
+
**Success Card:**
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
116
|
+
│ ✅ SUCCESS │
|
|
117
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
118
|
+
│ │
|
|
119
|
+
│ {t.commands.settings.autoSyncEnabledSuccess} │
|
|
120
|
+
│ │
|
|
121
|
+
│ ── Auto-Sync Status ──────────────────────────────────────────────────── │
|
|
122
|
+
│ │
|
|
123
|
+
│ ╭─────────────────╮ │
|
|
124
|
+
│ │ ✓ Enabled │ │
|
|
125
|
+
│ ╰─────────────────╯ │
|
|
126
|
+
│ │
|
|
127
|
+
│ ── What Happens Now ──────────────────────────────────────────────────── │
|
|
128
|
+
│ │
|
|
129
|
+
│ /planUpdate commands will automatically sync to cloud: │
|
|
130
|
+
│ │
|
|
131
|
+
│ /planUpdate T1.1 done │
|
|
132
|
+
│ ↓ │
|
|
133
|
+
│ ✓ Local PROJECT_PLAN.md updated │
|
|
134
|
+
│ ✓ Cloud synced automatically │
|
|
135
|
+
│ │
|
|
136
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
137
|
+
│ │
|
|
138
|
+
│ 💡 To disable: /planSettingsAutoSync off │
|
|
139
|
+
│ │
|
|
140
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
141
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### If "off" (disable)
|
|
145
|
+
|
|
146
|
+
1. Read `./.plan-config.json`
|
|
147
|
+
2. Set `cloud.autoSync = false`
|
|
148
|
+
3. Update `lastUsed`
|
|
149
|
+
4. Write back
|
|
150
|
+
|
|
151
|
+
**Success Card:**
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
155
|
+
│ ✅ SUCCESS │
|
|
156
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
157
|
+
│ │
|
|
158
|
+
│ {t.commands.settings.autoSyncDisabledSuccess} │
|
|
159
|
+
│ │
|
|
160
|
+
│ ── Auto-Sync Status ──────────────────────────────────────────────────── │
|
|
161
|
+
│ │
|
|
162
|
+
│ ╭──────────────────╮ │
|
|
163
|
+
│ │ ✕ Disabled │ │
|
|
164
|
+
│ ╰──────────────────╯ │
|
|
165
|
+
│ │
|
|
166
|
+
│ ── Manual Sync Required ──────────────────────────────────────────────── │
|
|
167
|
+
│ │
|
|
168
|
+
│ Changes will only be saved locally. │
|
|
169
|
+
│ To sync to cloud, run: │
|
|
170
|
+
│ │
|
|
171
|
+
│ /pfSyncPush │
|
|
172
|
+
│ │
|
|
173
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
174
|
+
│ │
|
|
175
|
+
│ 💡 To enable: /planSettingsAutoSync on │
|
|
176
|
+
│ │
|
|
177
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
178
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### If invalid value
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
185
|
+
│ ❌ ERROR │
|
|
186
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
187
|
+
│ │
|
|
188
|
+
│ {t.commands.settings.autoSyncInvalidValue} │
|
|
189
|
+
│ │
|
|
190
|
+
│ Invalid value: "{autoSyncValue}" │
|
|
191
|
+
│ │
|
|
192
|
+
│ Valid options: on, off │
|
|
193
|
+
│ │
|
|
194
|
+
│ 💡 {t.ui.labels.commands} │
|
|
195
|
+
│ • /planSettingsAutoSync on │
|
|
196
|
+
│ • /planSettingsAutoSync off │
|
|
197
|
+
│ │
|
|
198
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
199
|
+
```
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planSettingsLanguage
|
|
3
|
+
description: Change language preference for the plugin
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan Settings Language
|
|
7
|
+
|
|
8
|
+
Change language preference for the plugin with language selector card.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/planSettingsLanguage # Change global language
|
|
14
|
+
/planSettingsLanguage --local # Change language for this project only
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Step 0: Load Configuration
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
function getConfig() {
|
|
21
|
+
const localConfigPath = "./.plan-config.json"
|
|
22
|
+
if (fileExists(localConfigPath)) {
|
|
23
|
+
try {
|
|
24
|
+
const config = JSON.parse(readFile(localConfigPath))
|
|
25
|
+
config._source = "local"
|
|
26
|
+
return config
|
|
27
|
+
} catch {}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const globalConfigPath = expandPath("~/.config/claude/plan-plugin-config.json")
|
|
31
|
+
if (fileExists(globalConfigPath)) {
|
|
32
|
+
try {
|
|
33
|
+
const config = JSON.parse(readFile(globalConfigPath))
|
|
34
|
+
config._source = "global"
|
|
35
|
+
return config
|
|
36
|
+
} catch {}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return { "language": "en", "_source": "default" }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const config = getConfig()
|
|
43
|
+
const language = config.language || "en"
|
|
44
|
+
const t = JSON.parse(readFile(`locales/${language}.json`))
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Step 1: Parse Arguments
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
const isLocal = commandArgs.includes("--local")
|
|
51
|
+
const scope = isLocal ? "local" : "global"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Step 2: Show Language Selection Card
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
58
|
+
│ 🌍 Language Settings │
|
|
59
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
60
|
+
│ │
|
|
61
|
+
│ Select your preferred language: │
|
|
62
|
+
│ │
|
|
63
|
+
│ ── Available Languages ───────────────────────────────────────────────── │
|
|
64
|
+
│ │
|
|
65
|
+
│ [1] English {currentLang === "en" ? "✓ Current" : ""} │
|
|
66
|
+
│ Full support for all features │
|
|
67
|
+
│ │
|
|
68
|
+
│ [2] ქართული (Georgian) {currentLang === "ka" ? "✓ Current" : ""} │
|
|
69
|
+
│ სრული მხარდაჭერა │
|
|
70
|
+
│ │
|
|
71
|
+
│ [3] Русский (Russian) {currentLang === "ru" ? "✓ Current" : ""} │
|
|
72
|
+
│ Полная поддержка │
|
|
73
|
+
│ │
|
|
74
|
+
│ ── Scope ─────────────────────────────────────────────────────────────── │
|
|
75
|
+
│ │
|
|
76
|
+
│ {scope === "local" ? "📁 Project-specific" : "🌐 Global"} │
|
|
77
|
+
│ │
|
|
78
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Use AskUserQuestion to present language options:
|
|
82
|
+
|
|
83
|
+
```javascript
|
|
84
|
+
const currentLang = config.language || "en"
|
|
85
|
+
|
|
86
|
+
AskUserQuestion({
|
|
87
|
+
questions: [{
|
|
88
|
+
question: t.commands.settings.selectLanguage,
|
|
89
|
+
header: t.commands.settings.languageHeader,
|
|
90
|
+
multiSelect: false,
|
|
91
|
+
options: [
|
|
92
|
+
{
|
|
93
|
+
label: t.commands.settings.englishOption + (currentLang === "en" ? " ✓" : ""),
|
|
94
|
+
description: t.commands.settings.englishDesc
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: t.commands.settings.georgianOption + (currentLang === "ka" ? " ✓" : ""),
|
|
98
|
+
description: t.commands.settings.georgianDesc
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: t.commands.settings.russianOption + (currentLang === "ru" ? " ✓" : ""),
|
|
102
|
+
description: t.commands.settings.russianDesc
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}]
|
|
106
|
+
})
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Step 3: Map Selection to Language Code
|
|
110
|
+
|
|
111
|
+
```javascript
|
|
112
|
+
let newLanguage = "en"
|
|
113
|
+
if (userSelection.includes("English")) newLanguage = "en"
|
|
114
|
+
else if (userSelection.includes("Georgian") || userSelection.includes("ქართული")) newLanguage = "ka"
|
|
115
|
+
else if (userSelection.includes("Russian") || userSelection.includes("Русский")) newLanguage = "ru"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Step 4: Save to Config
|
|
119
|
+
|
|
120
|
+
**For local scope:**
|
|
121
|
+
- Path: `./.plan-config.json`
|
|
122
|
+
- Read existing, update language, write back
|
|
123
|
+
|
|
124
|
+
**For global scope:**
|
|
125
|
+
- Path: `~/.config/claude/plan-plugin-config.json`
|
|
126
|
+
- Ensure directory exists: `mkdir -p ~/.config/claude`
|
|
127
|
+
- Read existing, update language, write back
|
|
128
|
+
|
|
129
|
+
**IMPORTANT:** Preserve existing fields! Only update `language` and `lastUsed`.
|
|
130
|
+
|
|
131
|
+
## Step 5: Show Success Card
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
135
|
+
│ ✅ SUCCESS │
|
|
136
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
137
|
+
│ │
|
|
138
|
+
│ {t_new.commands.settings.settingsUpdated} │
|
|
139
|
+
│ │
|
|
140
|
+
│ ── Language Changed ──────────────────────────────────────────────────── │
|
|
141
|
+
│ │
|
|
142
|
+
│ {fromName} → {toName} │
|
|
143
|
+
│ │
|
|
144
|
+
│ ╭─────────────────────────────╮ │
|
|
145
|
+
│ │ ✓ {toName} │ │
|
|
146
|
+
│ ╰─────────────────────────────╯ │
|
|
147
|
+
│ │
|
|
148
|
+
│ Scope: {scope === "local" ? "📁 Project-specific" : "🌐 Global"} │
|
|
149
|
+
│ │
|
|
150
|
+
│ ── What's Affected ───────────────────────────────────────────────────── │
|
|
151
|
+
│ │
|
|
152
|
+
│ {t_new.commands.settings.newLanguageUsedFor} │
|
|
153
|
+
│ • {t_new.commands.settings.commandOutputs} │
|
|
154
|
+
│ • {t_new.commands.settings.wizardQuestions} │
|
|
155
|
+
│ • {t_new.commands.settings.generatedPlans} │
|
|
156
|
+
│ │
|
|
157
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
158
|
+
│ │
|
|
159
|
+
│ 💡 {t_new.commands.settings.tryIt} │
|
|
160
|
+
│ • /planNext See the new language in action │
|
|
161
|
+
│ │
|
|
162
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
163
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Example Output (Switching to Georgian):**
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
170
|
+
│ ✅ წარმატება │
|
|
171
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
172
|
+
│ │
|
|
173
|
+
│ პარამეტრები განახლდა! │
|
|
174
|
+
│ │
|
|
175
|
+
│ ── ენა შეიცვალა ──────────────────────────────────────────────────────── │
|
|
176
|
+
│ │
|
|
177
|
+
│ English → ქართული │
|
|
178
|
+
│ │
|
|
179
|
+
│ ╭─────────────────────────────╮ │
|
|
180
|
+
│ │ ✓ ქართული │ │
|
|
181
|
+
│ ╰─────────────────────────────╯ │
|
|
182
|
+
│ │
|
|
183
|
+
│ ფარგლები: 🌐 გლობალური │
|
|
184
|
+
│ │
|
|
185
|
+
│ ── რა იცვლება ────────────────────────────────────────────────────────── │
|
|
186
|
+
│ │
|
|
187
|
+
│ ახალი ენა გამოიყენება: │
|
|
188
|
+
│ • ბრძანებების გამოსავალში │
|
|
189
|
+
│ • ვიზარდის კითხვებში │
|
|
190
|
+
│ • გენერირებულ გეგმებში │
|
|
191
|
+
│ │
|
|
192
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
193
|
+
│ │
|
|
194
|
+
│ 💡 სცადეთ ახლავე: │
|
|
195
|
+
│ • /planNext ნახეთ ახალი ენა მოქმედებაში │
|
|
196
|
+
│ │
|
|
197
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
198
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**IMPORTANT:** Use NEW language translations (t_new) for the success message!
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planSettingsReset
|
|
3
|
+
description: Reset plugin settings to defaults
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan Settings Reset
|
|
7
|
+
|
|
8
|
+
Reset plugin settings to defaults with confirmation card.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/planSettingsReset # Reset global settings to defaults
|
|
14
|
+
/planSettingsReset --local # Remove project-specific settings
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Step 0: Load Configuration
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
function getConfig() {
|
|
21
|
+
const localConfigPath = "./.plan-config.json"
|
|
22
|
+
if (fileExists(localConfigPath)) {
|
|
23
|
+
try {
|
|
24
|
+
const config = JSON.parse(readFile(localConfigPath))
|
|
25
|
+
config._source = "local"
|
|
26
|
+
return config
|
|
27
|
+
} catch {}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const globalConfigPath = expandPath("~/.config/claude/plan-plugin-config.json")
|
|
31
|
+
if (fileExists(globalConfigPath)) {
|
|
32
|
+
try {
|
|
33
|
+
const config = JSON.parse(readFile(globalConfigPath))
|
|
34
|
+
config._source = "global"
|
|
35
|
+
return config
|
|
36
|
+
} catch {}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return { "language": "en", "_source": "default" }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const config = getConfig()
|
|
43
|
+
const language = config.language || "en"
|
|
44
|
+
const t = JSON.parse(readFile(`locales/${language}.json`))
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Step 1: Parse Arguments
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
const isLocal = commandArgs.includes("--local")
|
|
51
|
+
const scope = isLocal ? "local" : "global"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Step 2: Execute Reset
|
|
55
|
+
|
|
56
|
+
### For local scope (--local)
|
|
57
|
+
|
|
58
|
+
1. Check if `./.plan-config.json` exists
|
|
59
|
+
2. If exists, remove it: `rm ./.plan-config.json`
|
|
60
|
+
3. Re-read config with hierarchy (will fall back to global or default)
|
|
61
|
+
4. Load new effective language translations
|
|
62
|
+
|
|
63
|
+
**Success Card:**
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
67
|
+
│ ✅ SUCCESS │
|
|
68
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
69
|
+
│ │
|
|
70
|
+
│ {t_new.commands.settings.settingsUpdated} │
|
|
71
|
+
│ │
|
|
72
|
+
│ 📁 {t_new.commands.settings.projectSettingsRemoved} │
|
|
73
|
+
│ │
|
|
74
|
+
│ ── What's Changed ────────────────────────────────────────────────────── │
|
|
75
|
+
│ │
|
|
76
|
+
│ • Removed: ./.plan-config.json │
|
|
77
|
+
│ • Now using: {newConfig._source === "global" ? "Global settings" : "Defaults"} │
|
|
78
|
+
│ │
|
|
79
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
80
|
+
│ │
|
|
81
|
+
│ 💡 {t.ui.labels.nextSteps} │
|
|
82
|
+
│ • /planSettingsShow View current settings │
|
|
83
|
+
│ │
|
|
84
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
85
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**If no local config exists:**
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
92
|
+
│ ℹ️ INFO │
|
|
93
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
94
|
+
│ │
|
|
95
|
+
│ No project-specific settings found. │
|
|
96
|
+
│ │
|
|
97
|
+
│ The file ./.plan-config.json does not exist in this directory. │
|
|
98
|
+
│ │
|
|
99
|
+
│ 💡 {t.ui.labels.tips} │
|
|
100
|
+
│ • Use /planSettingsReset (without --local) to reset global settings │
|
|
101
|
+
│ │
|
|
102
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### For global scope (no flag)
|
|
106
|
+
|
|
107
|
+
1. Create default config:
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"language": "en",
|
|
111
|
+
"lastUsed": "2026-01-27T15:30:00Z"
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
2. Ensure directory exists: `mkdir -p ~/.config/claude`
|
|
116
|
+
3. Write default config to `~/.config/claude/plan-plugin-config.json`
|
|
117
|
+
4. Load English translations
|
|
118
|
+
|
|
119
|
+
**Success Card:**
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
123
|
+
│ ✅ SUCCESS │
|
|
124
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
125
|
+
│ │
|
|
126
|
+
│ {t_en.commands.settings.settingsUpdated} │
|
|
127
|
+
│ │
|
|
128
|
+
│ 🌐 {t_en.commands.settings.globalSettingsReset} │
|
|
129
|
+
│ │
|
|
130
|
+
│ ── Reset to Defaults ─────────────────────────────────────────────────── │
|
|
131
|
+
│ │
|
|
132
|
+
│ 🌍 Language: English │
|
|
133
|
+
│ ☁️ Cloud: Disconnected │
|
|
134
|
+
│ 🔄 Auto-sync: Disabled │
|
|
135
|
+
│ │
|
|
136
|
+
│ ── What's Changed ────────────────────────────────────────────────────── │
|
|
137
|
+
│ │
|
|
138
|
+
│ • Reset: ~/.config/claude/plan-plugin-config.json │
|
|
139
|
+
│ • Cleared: Cloud credentials (if any) │
|
|
140
|
+
│ • Preserved: Local project settings (if any) │
|
|
141
|
+
│ │
|
|
142
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
143
|
+
│ │
|
|
144
|
+
│ 💡 Next Steps: │
|
|
145
|
+
│ • /planSettingsShow View current settings │
|
|
146
|
+
│ • /pfLogin Connect to cloud │
|
|
147
|
+
│ │
|
|
148
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
149
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Example Output (English - Global Reset):**
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
156
|
+
│ ✅ SUCCESS │
|
|
157
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
158
|
+
│ │
|
|
159
|
+
│ Settings updated! │
|
|
160
|
+
│ │
|
|
161
|
+
│ 🌐 Global settings reset to defaults │
|
|
162
|
+
│ │
|
|
163
|
+
│ ── Reset to Defaults ─────────────────────────────────────────────────── │
|
|
164
|
+
│ │
|
|
165
|
+
│ 🌍 Language: English │
|
|
166
|
+
│ ☁️ Cloud: Disconnected │
|
|
167
|
+
│ 🔄 Auto-sync: Disabled │
|
|
168
|
+
│ │
|
|
169
|
+
│ ── What's Changed ────────────────────────────────────────────────────── │
|
|
170
|
+
│ │
|
|
171
|
+
│ • Reset: ~/.config/claude/plan-plugin-config.json │
|
|
172
|
+
│ • Cleared: Cloud credentials (if any) │
|
|
173
|
+
│ • Preserved: Local project settings (if any) │
|
|
174
|
+
│ │
|
|
175
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
176
|
+
│ │
|
|
177
|
+
│ 💡 Next Steps: │
|
|
178
|
+
│ • /planSettingsShow View current settings │
|
|
179
|
+
│ • /pfLogin Connect to cloud │
|
|
180
|
+
│ │
|
|
181
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
182
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Example Output (Georgian):**
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
189
|
+
│ ✅ წარმატება │
|
|
190
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
191
|
+
│ │
|
|
192
|
+
│ პარამეტრები განახლდა! │
|
|
193
|
+
│ │
|
|
194
|
+
│ 🌐 გლობალური პარამეტრები საწყის მნიშვნელობებზე დაბრუნდა │
|
|
195
|
+
│ │
|
|
196
|
+
│ ── საწყისი პარამეტრები ───────────────────────────────────────────────── │
|
|
197
|
+
│ │
|
|
198
|
+
│ 🌍 ენა: English │
|
|
199
|
+
│ ☁️ Cloud: გათიშული │
|
|
200
|
+
│ 🔄 ავტო-სინქრონიზაცია: გამორთული │
|
|
201
|
+
│ │
|
|
202
|
+
│ ── რა შეიცვალა ───────────────────────────────────────────────────────── │
|
|
203
|
+
│ │
|
|
204
|
+
│ • დაბრუნდა: ~/.config/claude/plan-plugin-config.json │
|
|
205
|
+
│ • წაიშალა: Cloud კრედენციალები (თუ იყო) │
|
|
206
|
+
│ • შენარჩუნდა: ლოკალური პროექტის პარამეტრები (თუ იყო) │
|
|
207
|
+
│ │
|
|
208
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
209
|
+
│ │
|
|
210
|
+
│ 💡 შემდეგი ნაბიჯები: │
|
|
211
|
+
│ • /planSettingsShow მიმდინარე პარამეტრების ნახვა │
|
|
212
|
+
│ • /pfLogin Cloud-თან დაკავშირება │
|
|
213
|
+
│ │
|
|
214
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
215
|
+
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Error Handling
|
|
219
|
+
|
|
220
|
+
**Cannot delete/write file:**
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
224
|
+
│ ⚠️ WARNING │
|
|
225
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
226
|
+
│ │
|
|
227
|
+
│ Couldn't save settings. │
|
|
228
|
+
│ │
|
|
229
|
+
│ Settings will apply for this session only. │
|
|
230
|
+
│ │
|
|
231
|
+
│ Possible causes: │
|
|
232
|
+
│ • Insufficient permissions │
|
|
233
|
+
│ • Disk full │
|
|
234
|
+
│ • Directory doesn't exist │
|
|
235
|
+
│ │
|
|
236
|
+
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
237
|
+
```
|