@meltstudio/meltctl 4.199.0 → 4.201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +18 -21
  2. package/dist/index.js +231 -755
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var CLI_VERSION;
14
14
  var init_version = __esm({
15
15
  "src/utils/version.ts"() {
16
16
  "use strict";
17
- CLI_VERSION = "4.199.0";
17
+ CLI_VERSION = "4.201.0";
18
18
  }
19
19
  });
20
20
 
@@ -24,12 +24,12 @@ __export(update_exports, {
24
24
  detectPackageManager: () => detectPackageManager,
25
25
  updateCommand: () => updateCommand
26
26
  });
27
- import chalk7 from "chalk";
27
+ import chalk6 from "chalk";
28
28
  import { execSync } from "child_process";
29
- import path4 from "path";
29
+ import path3 from "path";
30
30
  import { fileURLToPath } from "url";
31
31
  function detectPackageManager() {
32
- const installPath = path4.resolve(__dirname, "../..");
32
+ const installPath = path3.resolve(__dirname, "../..");
33
33
  try {
34
34
  const npmGlobalPrefix = execSync("npm prefix -g", { encoding: "utf-8", stdio: "pipe" }).trim();
35
35
  if (installPath.startsWith(npmGlobalPrefix)) {
@@ -52,15 +52,15 @@ async function updateCommand() {
52
52
  const currentVersion = await getCurrentCliVersion();
53
53
  const latestVersion = await getLatestCliVersion();
54
54
  if (!latestVersion) {
55
- console.error(chalk7.red("Could not check for updates. Check your network connection."));
55
+ console.error(chalk6.red("Could not check for updates. Check your network connection."));
56
56
  process.exit(1);
57
57
  }
58
58
  const severity = getUpdateSeverity(currentVersion, latestVersion);
59
59
  if (severity === "none") {
60
- console.log(chalk7.green(` \u2713 Already on the latest version (${currentVersion})`));
60
+ console.log(chalk6.green(` \u2713 Already on the latest version (${currentVersion})`));
61
61
  return;
62
62
  }
63
- console.log(chalk7.dim(` ${currentVersion} \u2192 ${latestVersion}`));
63
+ console.log(chalk6.dim(` ${currentVersion} \u2192 ${latestVersion}`));
64
64
  console.log();
65
65
  const pm = detectPackageManager();
66
66
  let cmd;
@@ -69,19 +69,19 @@ async function updateCommand() {
69
69
  } else if (pm === "npm") {
70
70
  cmd = "npm install -g @meltstudio/meltctl@latest";
71
71
  } else {
72
- console.log(chalk7.dim(" Could not detect package manager, trying npm..."));
72
+ console.log(chalk6.dim(" Could not detect package manager, trying npm..."));
73
73
  cmd = "npm install -g @meltstudio/meltctl@latest";
74
74
  }
75
- console.log(chalk7.dim(` Running: ${cmd}`));
75
+ console.log(chalk6.dim(` Running: ${cmd}`));
76
76
  console.log();
77
77
  try {
78
78
  execSync(cmd, { stdio: "inherit" });
79
79
  console.log();
80
- console.log(chalk7.green(` \u2713 Updated to ${latestVersion}`));
80
+ console.log(chalk6.green(` \u2713 Updated to ${latestVersion}`));
81
81
  } catch {
82
82
  console.error();
83
- console.error(chalk7.red(" Update failed. Try running manually:"));
84
- console.error(chalk7.cyan(` ${cmd}`));
83
+ console.error(chalk6.red(" Update failed. Try running manually:"));
84
+ console.error(chalk6.cyan(` ${cmd}`));
85
85
  process.exit(1);
86
86
  }
87
87
  }
@@ -90,13 +90,13 @@ var init_update = __esm({
90
90
  "src/commands/update.ts"() {
91
91
  "use strict";
92
92
  init_version_check();
93
- __dirname = path4.dirname(fileURLToPath(import.meta.url));
93
+ __dirname = path3.dirname(fileURLToPath(import.meta.url));
94
94
  }
95
95
  });
96
96
 
97
97
  // src/utils/version-check.ts
98
- import chalk8 from "chalk";
99
- import { confirm as confirm2 } from "@inquirer/prompts";
98
+ import chalk7 from "chalk";
99
+ import { confirm } from "@inquirer/prompts";
100
100
  import { execSync as execSync2 } from "child_process";
101
101
  async function getCurrentCliVersion() {
102
102
  return CLI_VERSION;
@@ -187,7 +187,7 @@ async function checkAndEnforceUpdate(commandName) {
187
187
  if (severity === "patch") {
188
188
  console.log();
189
189
  console.log(
190
- chalk8.yellow(
190
+ chalk7.yellow(
191
191
  ` Update available: ${currentVersion} \u2192 ${latestVersion} (run: meltctl update)`
192
192
  )
193
193
  );
@@ -195,9 +195,9 @@ async function checkAndEnforceUpdate(commandName) {
195
195
  return;
196
196
  }
197
197
  console.log();
198
- console.log(chalk8.yellow(` Update required: ${currentVersion} \u2192 ${latestVersion}`));
198
+ console.log(chalk7.yellow(` Update required: ${currentVersion} \u2192 ${latestVersion}`));
199
199
  console.log();
200
- const shouldUpdate = await confirm2({
200
+ const shouldUpdate = await confirm({
201
201
  message: "Update now?",
202
202
  default: true
203
203
  });
@@ -205,12 +205,12 @@ async function checkAndEnforceUpdate(commandName) {
205
205
  const { updateCommand: updateCommand2 } = await Promise.resolve().then(() => (init_update(), update_exports));
206
206
  await updateCommand2();
207
207
  console.log();
208
- console.log(chalk8.dim(" Please re-run your command."));
208
+ console.log(chalk7.dim(" Please re-run your command."));
209
209
  console.log();
210
210
  process.exit(0);
211
211
  }
212
212
  console.log();
213
- console.log(chalk8.gray("To skip this check (CI/CD), set MELTCTL_SKIP_UPDATE_CHECK=1"));
213
+ console.log(chalk7.gray("To skip this check (CI/CD), set MELTCTL_SKIP_UPDATE_CHECK=1"));
214
214
  console.log();
215
215
  process.exit(1);
216
216
  } catch {
@@ -227,14 +227,14 @@ var init_version_check = __esm({
227
227
  });
228
228
 
229
229
  // src/index.ts
230
- import chalk16 from "chalk";
230
+ import chalk15 from "chalk";
231
231
  import { Command, Option } from "@commander-js/extra-typings";
232
232
 
233
- // src/commands/init.ts
233
+ // src/commands/templates.ts
234
234
  import chalk2 from "chalk";
235
- import { checkbox, confirm } from "@inquirer/prompts";
236
235
  import fs2 from "fs-extra";
237
236
  import path2 from "path";
237
+ import os2 from "os";
238
238
 
239
239
  // src/utils/auth.ts
240
240
  import fs from "fs-extra";
@@ -242,7 +242,7 @@ import path from "path";
242
242
  import os from "os";
243
243
  var AUTH_DIR = path.join(os.homedir(), ".meltctl");
244
244
  var AUTH_FILE = path.join(AUTH_DIR, "auth.json");
245
- var API_BASE = process.env["MELTCTL_API_URL"] ?? "https://meltctl-api.meltstudio.co";
245
+ var API_BASE = process.env["MELTCTL_API_URL"] ?? "https://api.meltctl.meltstudio.co";
246
246
  async function getStoredAuth() {
247
247
  if (!await fs.pathExists(AUTH_FILE)) {
248
248
  return void 0;
@@ -300,8 +300,8 @@ function createAuditsResource(config) {
300
300
  if (filters?.projectId)
301
301
  params.set("projectId", String(filters.projectId));
302
302
  const query = params.toString();
303
- const path9 = `/audits${query ? `?${query}` : ""}`;
304
- const { data, status } = await apiFetch(config, path9);
303
+ const path8 = `/audits${query ? `?${query}` : ""}`;
304
+ const { data, status } = await apiFetch(config, path8);
305
305
  if (status === 403)
306
306
  throw new Error("Access denied. Only Team Managers can list audits.");
307
307
  if (status !== 200)
@@ -348,8 +348,8 @@ function createPlansResource(config) {
348
348
  if (filters?.projectId)
349
349
  params.set("projectId", String(filters.projectId));
350
350
  const query = params.toString();
351
- const path9 = `/plans${query ? `?${query}` : ""}`;
352
- const { data, status } = await apiFetch(config, path9);
351
+ const path8 = `/plans${query ? `?${query}` : ""}`;
352
+ const { data, status } = await apiFetch(config, path8);
353
353
  if (status === 403)
354
354
  throw new Error("Access denied. Only Team Managers can list plans.");
355
355
  if (status !== 200)
@@ -391,8 +391,8 @@ function createPlansResource(config) {
391
391
  if (filters?.author)
392
392
  params.set("author", filters.author);
393
393
  const query = params.toString();
394
- const path9 = `/plans/stats${query ? `?${query}` : ""}`;
395
- const { data, status } = await apiFetch(config, path9);
394
+ const path8 = `/plans/stats${query ? `?${query}` : ""}`;
395
+ const { data, status } = await apiFetch(config, path8);
396
396
  if (status === 403)
397
397
  throw new Error("Access denied. Only Team Managers can view plan stats.");
398
398
  if (status !== 200)
@@ -431,8 +431,8 @@ function createEventsResource(config) {
431
431
  if (filters?.projectId)
432
432
  params.set("projectId", String(filters.projectId));
433
433
  const query = params.toString();
434
- const path9 = `/events${query ? `?${query}` : ""}`;
435
- const { data, status } = await apiFetch(config, path9);
434
+ const path8 = `/events${query ? `?${query}` : ""}`;
435
+ const { data, status } = await apiFetch(config, path8);
436
436
  if (status === 403)
437
437
  throw new Error("Access denied. Only Team Managers can view analytics.");
438
438
  if (status !== 200)
@@ -448,8 +448,8 @@ function createEventsResource(config) {
448
448
  if (filters?.projectId)
449
449
  params.set("projectId", String(filters.projectId));
450
450
  const query = params.toString();
451
- const path9 = `/events/stats${query ? `?${query}` : ""}`;
452
- const { data, status } = await apiFetch(config, path9);
451
+ const path8 = `/events/stats${query ? `?${query}` : ""}`;
452
+ const { data, status } = await apiFetch(config, path8);
453
453
  if (status === 403)
454
454
  throw new Error("Access denied. Only Team Managers can view analytics.");
455
455
  if (status !== 200)
@@ -483,8 +483,8 @@ function createStandupsResource(config) {
483
483
  const params = new URLSearchParams();
484
484
  if (filters?.projectId)
485
485
  params.set("projectId", String(filters.projectId));
486
- const path9 = `/standups/stats${params.toString() ? `?${params}` : ""}`;
487
- const { data, status } = await apiFetch(config, path9);
486
+ const path8 = `/standups/stats${params.toString() ? `?${params}` : ""}`;
487
+ const { data, status } = await apiFetch(config, path8);
488
488
  if (status === 403)
489
489
  throw new Error("Access denied. Only Team Managers can view standup stats.");
490
490
  if (status !== 200)
@@ -509,8 +509,8 @@ function createStandupsResource(config) {
509
509
  const params = new URLSearchParams();
510
510
  if (opts?.windowDays)
511
511
  params.set("windowDays", String(opts.windowDays));
512
- const path9 = `/standups/per-person-stats${params.toString() ? `?${params}` : ""}`;
513
- const { data, status } = await apiFetch(config, path9);
512
+ const path8 = `/standups/per-person-stats${params.toString() ? `?${params}` : ""}`;
513
+ const { data, status } = await apiFetch(config, path8);
514
514
  if (status === 403)
515
515
  throw new Error("Access denied. Only Team Managers can view standup stats.");
516
516
  if (status !== 200)
@@ -568,8 +568,8 @@ function createFeedbackResource(config) {
568
568
  if (filters.limit !== void 0)
569
569
  params.set("limit", String(filters.limit));
570
570
  const qs = params.toString();
571
- const path9 = qs ? `/feedback/dashboard?${qs}` : "/feedback/dashboard";
572
- const { data, status } = await apiFetch(config, path9);
571
+ const path8 = qs ? `/feedback/dashboard?${qs}` : "/feedback/dashboard";
572
+ const { data, status } = await apiFetch(config, path8);
573
573
  if (status !== 200) {
574
574
  const err = data.error;
575
575
  throw new Error(err ?? `Failed to load dashboard feedback (${status})`);
@@ -665,8 +665,8 @@ function createProjectsResource(config) {
665
665
  params.set("activeOnly", "true");
666
666
  if (opts?.includeInternal)
667
667
  params.set("includeInternal", "true");
668
- const path9 = `/projects${params.toString() ? `?${params}` : ""}`;
669
- const { data, status } = await apiFetch(config, path9);
668
+ const path8 = `/projects${params.toString() ? `?${params}` : ""}`;
669
+ const { data, status } = await apiFetch(config, path8);
670
670
  if (status === 403)
671
671
  throw new Error("Access denied. Only Team Managers can view projects.");
672
672
  if (status !== 200)
@@ -736,8 +736,8 @@ function createFindingsResource(config) {
736
736
  if (filters?.limit)
737
737
  params.set("limit", String(filters.limit));
738
738
  const query = params.toString();
739
- const path9 = `/findings${query ? `?${query}` : ""}`;
740
- const { data, status } = await apiFetch(config, path9);
739
+ const path8 = `/findings${query ? `?${query}` : ""}`;
740
+ const { data, status } = await apiFetch(config, path8);
741
741
  if (status === 403)
742
742
  throw new Error("Access denied. Only Team Managers can list findings.");
743
743
  if (status !== 200)
@@ -759,8 +759,8 @@ function createFindingsResource(config) {
759
759
  if (filters?.auditId)
760
760
  params.set("auditId", filters.auditId);
761
761
  const query = params.toString();
762
- const path9 = `/findings/stats${query ? `?${query}` : ""}`;
763
- const { data, status } = await apiFetch(config, path9);
762
+ const path8 = `/findings/stats${query ? `?${query}` : ""}`;
763
+ const { data, status } = await apiFetch(config, path8);
764
764
  if (status === 403)
765
765
  throw new Error("Access denied. Only Team Managers can view findings stats.");
766
766
  if (status !== 200)
@@ -891,8 +891,8 @@ function createBoardAuditsResource(config) {
891
891
  params.set("projectId", String(filters.projectId));
892
892
  if (filters?.limit)
893
893
  params.set("limit", String(filters.limit));
894
- const path9 = `/board-audits${params.toString() ? `?${params}` : ""}`;
895
- const { data, status } = await apiFetch(config, path9);
894
+ const path8 = `/board-audits${params.toString() ? `?${params}` : ""}`;
895
+ const { data, status } = await apiFetch(config, path8);
896
896
  if (status === 403)
897
897
  throw new Error("Access denied. Only Team Managers can view board audits.");
898
898
  if (status !== 200)
@@ -1368,8 +1368,8 @@ function createSlackResource(config) {
1368
1368
  if (opts?.limit !== void 0)
1369
1369
  params.set("limit", String(opts.limit));
1370
1370
  const qs = params.toString();
1371
- const path9 = `/slack/notifications${qs ? `?${qs}` : ""}`;
1372
- const { data, status } = await apiFetch(config, path9);
1371
+ const path8 = `/slack/notifications${qs ? `?${qs}` : ""}`;
1372
+ const { data, status } = await apiFetch(config, path8);
1373
1373
  if (status === 403)
1374
1374
  throw new Error("Access denied. Only Team Managers can view this.");
1375
1375
  if (status !== 200)
@@ -1415,8 +1415,8 @@ function createJobsResource(config) {
1415
1415
  if (filters?.limit)
1416
1416
  params.set("limit", String(filters.limit));
1417
1417
  const query = params.toString();
1418
- const path9 = `/jobs${query ? `?${query}` : ""}`;
1419
- const { data, status } = await apiFetch(config, path9);
1418
+ const path8 = `/jobs${query ? `?${query}` : ""}`;
1419
+ const { data, status } = await apiFetch(config, path8);
1420
1420
  if (status === 403)
1421
1421
  throw new Error("Access denied. Only Team Managers can list jobs.");
1422
1422
  if (status !== 200)
@@ -1566,8 +1566,8 @@ function createProfileAuditsResource(config) {
1566
1566
  if (filters?.limit)
1567
1567
  params.set("limit", String(filters.limit));
1568
1568
  const query = params.toString();
1569
- const path9 = `/profile-audits${query ? `?${query}` : ""}`;
1570
- const { data, status } = await apiFetch(config, path9);
1569
+ const path8 = `/profile-audits${query ? `?${query}` : ""}`;
1570
+ const { data, status } = await apiFetch(config, path8);
1571
1571
  if (status === 403)
1572
1572
  throw new Error("Access denied. Only Team Managers can list profile audits.");
1573
1573
  if (status !== 200)
@@ -1612,8 +1612,8 @@ function createProfileAuditsResource(config) {
1612
1612
  }
1613
1613
 
1614
1614
  // ../sdk/dist/client.js
1615
- async function apiFetch(config, path9, options = {}) {
1616
- const response = await fetch(`${config.baseUrl}${path9}`, {
1615
+ async function apiFetch(config, path8, options = {}) {
1616
+ const response = await fetch(`${config.baseUrl}${path8}`, {
1617
1617
  ...options,
1618
1618
  headers: {
1619
1619
  Authorization: `Bearer ${config.token}`,
@@ -2135,280 +2135,12 @@ async function fetchTemplates() {
2135
2135
  return client.templates.fetch();
2136
2136
  }
2137
2137
 
2138
- // src/commands/init.ts
2139
- var SKILL_FRONTMATTER = {
2140
- setup: `---
2141
- user-invocable: true
2142
- description: >-
2143
- Analyze the project and customize AGENTS.md for this codebase. Use when
2144
- setting up a new project, after meltctl init, or when AGENTS.md has
2145
- placeholder markers.
2146
- ---
2147
-
2148
- `,
2149
- plan: `---
2150
- user-invocable: true
2151
- description: >-
2152
- Design an implementation approach before writing code. Use when starting
2153
- a feature, tackling a complex task, or the developer says "plan this".
2154
- ---
2155
-
2156
- `,
2157
- review: `---
2158
- user-invocable: true
2159
- description: >-
2160
- Review code changes against project standards and address PR feedback.
2161
- Use when the developer asks to review changes or respond to PR reviewer
2162
- comments.
2163
- ---
2164
-
2165
- `,
2166
- pr: `---
2167
- user-invocable: true
2168
- description: >-
2169
- Create a well-structured pull request from current changes. Use when the
2170
- developer says "create a PR" or is ready to submit work.
2171
- ---
2172
-
2173
- `,
2174
- debug: `---
2175
- user-invocable: true
2176
- description: >-
2177
- Systematically investigate and fix bugs. Use when the developer reports
2178
- a bug, hits an error, or says "debug this".
2179
- ---
2180
-
2181
- `,
2182
- audit: `---
2183
- user-invocable: true
2184
- description: >-
2185
- Run a comprehensive project compliance audit against team standards. Use
2186
- when the developer wants to assess project health or says "audit this
2187
- project".
2188
- ---
2189
-
2190
- `,
2191
- "ux-audit": `---
2192
- user-invocable: true
2193
- description: >-
2194
- Review the project's UI against usability heuristics using Chrome DevTools
2195
- MCP. Use when the developer says "review the UI" or "UX audit".
2196
- ---
2197
-
2198
- `,
2199
- "security-audit": `---
2200
- user-invocable: true
2201
- description: >-
2202
- Run a comprehensive security posture audit across all platform
2203
- repositories. Use when the developer says "security audit" or wants to
2204
- assess security posture.
2205
- ---
2206
-
2207
- `,
2208
- validate: `---
2209
- user-invocable: true
2210
- description: >-
2211
- Run the validation plan from the plan document after implementation. Use
2212
- when the developer says "validate this" or "test the feature", or after
2213
- finishing implementation.
2214
- ---
2215
-
2216
- `,
2217
- update: `---
2218
- user-invocable: true
2219
- description: >-
2220
- Update Melt skills and standards to the latest version. Use when the
2221
- developer says "update melt" or wants the latest skill templates.
2222
- ---
2223
-
2224
- `,
2225
- help: `---
2226
- user-invocable: true
2227
- description: >-
2228
- Answer questions about the AI-First Development Playbook and team
2229
- workflow. Use when the developer asks about the development process or
2230
- how a step works. Reference skill \u2014 explains, doesn't execute.
2231
- ---
2232
-
2233
- `,
2234
- link: `---
2235
- user-invocable: true
2236
- description: >-
2237
- Connect and verify required integrations (ticket tracker, browser
2238
- testing). Use after melt-setup, when tools aren't working, or when a
2239
- skill reports missing MCP connections.
2240
- ---
2241
-
2242
- `
2243
- };
2244
- var OPENCODE_COMMAND_FRONTMATTER = {
2245
- setup: `---
2246
- description: Analyze the project and customize AGENTS.md for this codebase.
2247
- ---
2248
-
2249
- `,
2250
- plan: `---
2251
- description: Design an implementation approach before writing code.
2252
- ---
2253
-
2254
- `,
2255
- review: `---
2256
- description: Review code changes against project standards and address PR feedback.
2257
- ---
2258
-
2259
- `,
2260
- pr: `---
2261
- description: Create a well-structured pull request from current changes.
2262
- ---
2263
-
2264
- `,
2265
- debug: `---
2266
- description: Systematically investigate and fix bugs.
2267
- ---
2268
-
2269
- `,
2270
- audit: `---
2271
- description: Run a comprehensive project compliance audit against team standards.
2272
- ---
2273
-
2274
- `,
2275
- "ux-audit": `---
2276
- description: Review the project's UI against usability heuristics using Chrome DevTools MCP.
2277
- ---
2278
-
2279
- `,
2280
- "security-audit": `---
2281
- description: Run a comprehensive security posture audit across the entire platform.
2282
- ---
2283
-
2284
- `,
2285
- validate: `---
2286
- description: Run the validation plan from the plan document after implementation.
2287
- ---
2288
-
2289
- `,
2290
- update: `---
2291
- description: Update Melt skills and standards to the latest version.
2292
- ---
2293
-
2294
- `,
2295
- help: `---
2296
- description: Answer questions about the AI-First Development Playbook and team workflow.
2297
- ---
2298
-
2299
- `,
2300
- link: `---
2301
- description: Connect and verify required integrations (ticket tracker, browser testing).
2302
- ---
2303
-
2304
- `
2305
- };
2306
- var GITIGNORE_ENTRIES = [".env.local", ".claude/settings.local.json"];
2307
- function detectExistingTools(cwd) {
2308
- return {
2309
- claude: fs2.pathExistsSync(path2.join(cwd, ".claude/skills/melt-setup/SKILL.md")),
2310
- cursor: fs2.pathExistsSync(path2.join(cwd, ".cursor/commands/melt-setup.md")),
2311
- opencode: fs2.pathExistsSync(path2.join(cwd, ".opencode/commands/melt-setup.md"))
2312
- };
2313
- }
2314
- async function promptToolSelection(existingTools) {
2315
- const choices = [];
2316
- if (!existingTools?.claude) {
2317
- choices.push({ name: "Claude Code", value: "claude", checked: true });
2318
- }
2319
- if (!existingTools?.cursor) {
2320
- choices.push({ name: "Cursor", value: "cursor", checked: true });
2321
- }
2322
- if (!existingTools?.opencode) {
2323
- choices.push({ name: "OpenCode", value: "opencode", checked: true });
2324
- }
2325
- choices.push({
2326
- name: "Other \u2014 contact us in #dev on Slack to request support",
2327
- value: "other"
2328
- });
2329
- const selected = await checkbox({
2330
- message: "Which AI coding tools do you use?",
2331
- choices
2332
- });
2333
- return {
2334
- claude: selected.includes("claude"),
2335
- cursor: selected.includes("cursor"),
2336
- opencode: selected.includes("opencode"),
2337
- other: selected.includes("other")
2338
- };
2339
- }
2340
- async function initCommand(options) {
2138
+ // src/commands/templates.ts
2139
+ async function templatesCommand() {
2341
2140
  if (!await isAuthenticated()) {
2342
2141
  console.error(chalk2.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
2343
2142
  process.exit(1);
2344
2143
  }
2345
- const cwd = process.cwd();
2346
- const isGitRepo = await fs2.pathExists(path2.join(cwd, ".git"));
2347
- if (!isGitRepo) {
2348
- console.log(chalk2.yellow(`Warning: ${cwd} is not a git repository.`));
2349
- console.log(chalk2.dim("meltctl init should be run from the root of your project."));
2350
- console.log();
2351
- const proceed = await confirm({
2352
- message: "Continue initializing here anyway?",
2353
- default: false
2354
- });
2355
- if (!proceed) {
2356
- console.log(chalk2.dim("Aborted. cd into your project root and try again."));
2357
- return;
2358
- }
2359
- console.log();
2360
- }
2361
- const existing = detectExistingTools(cwd);
2362
- const alreadyInitialized = existing.claude || existing.cursor || existing.opencode;
2363
- let tools;
2364
- if (alreadyInitialized && !options.force) {
2365
- const existingNames = [
2366
- existing.claude ? "Claude Code" : "",
2367
- existing.cursor ? "Cursor" : "",
2368
- existing.opencode ? "OpenCode" : ""
2369
- ].filter(Boolean).join(", ");
2370
- if (existing.claude && existing.cursor && existing.opencode) {
2371
- console.log(
2372
- chalk2.yellow("Project already initialized with all tools. Use --force to overwrite.")
2373
- );
2374
- process.exit(1);
2375
- }
2376
- console.log(
2377
- chalk2.dim(`Project already initialized${existingNames ? ` with ${existingNames}` : ""}.`)
2378
- );
2379
- if (options.claude || options.cursor || options.opencode) {
2380
- tools = {
2381
- claude: !!options.claude,
2382
- cursor: !!options.cursor,
2383
- opencode: !!options.opencode,
2384
- other: false
2385
- };
2386
- } else {
2387
- const addMore = await confirm({
2388
- message: "Add configuration for another tool?",
2389
- default: true
2390
- });
2391
- if (!addMore) {
2392
- process.exit(0);
2393
- }
2394
- tools = await promptToolSelection(existing);
2395
- }
2396
- } else {
2397
- if (options.claude || options.cursor || options.opencode) {
2398
- tools = {
2399
- claude: !!options.claude,
2400
- cursor: !!options.cursor,
2401
- opencode: !!options.opencode,
2402
- other: false
2403
- };
2404
- } else {
2405
- tools = await promptToolSelection();
2406
- }
2407
- }
2408
- if (!tools.claude && !tools.cursor && !tools.opencode && !tools.other) {
2409
- console.log(chalk2.yellow("No tools selected. Nothing to do."));
2410
- process.exit(0);
2411
- }
2412
2144
  let templates;
2413
2145
  try {
2414
2146
  templates = await fetchTemplates();
@@ -2428,268 +2160,25 @@ async function initCommand(options) {
2428
2160
  }
2429
2161
  process.exit(1);
2430
2162
  }
2431
- console.log(chalk2.bold("Initializing Melt development tools..."));
2432
- console.log();
2433
- const createdFiles = [];
2434
- const workflows = [
2435
- "setup",
2436
- "plan",
2437
- "validate",
2438
- "review",
2439
- "pr",
2440
- "debug",
2441
- "audit",
2442
- "ux-audit",
2443
- "security-audit",
2444
- "update",
2445
- "help",
2446
- "link"
2447
- ];
2448
- const agentsMdPath = path2.join(cwd, "AGENTS.md");
2449
- const agentsMdExists = await fs2.pathExists(agentsMdPath);
2450
- const agentsMd = templates["agents-md.md"];
2451
- if (agentsMd) {
2452
- if (!agentsMdExists) {
2453
- await fs2.writeFile(agentsMdPath, agentsMd, "utf-8");
2454
- createdFiles.push("AGENTS.md");
2455
- } else if (options.resetAgents) {
2456
- await fs2.writeFile(agentsMdPath, agentsMd, "utf-8");
2457
- createdFiles.push("AGENTS.md (reset)");
2458
- }
2459
- }
2460
- const mcpConfig = templates["mcp-configs/base.json"];
2461
- if (mcpConfig) {
2462
- const wroteNew = !await fs2.pathExists(path2.join(cwd, ".mcp.json"));
2463
- await mergeMcpConfig(cwd, mcpConfig);
2464
- if (wroteNew) createdFiles.push(".mcp.json");
2465
- }
2466
- await updateGitignore(cwd);
2467
- if (tools.claude) {
2468
- const claudeSettings = templates["claude-settings.json"];
2469
- if (claudeSettings) {
2470
- await fs2.ensureDir(path2.join(cwd, ".claude"));
2471
- await mergeClaudeSettings(cwd, claudeSettings);
2472
- createdFiles.push(".claude/settings.json");
2473
- }
2474
- for (const name of workflows) {
2475
- const workflowContent = templates[`workflows/${name}.md`];
2476
- if (workflowContent) {
2477
- const skillDir = path2.join(cwd, `.claude/skills/melt-${name}`);
2478
- await fs2.ensureDir(skillDir);
2479
- const skillContent = SKILL_FRONTMATTER[name] + workflowContent;
2480
- await fs2.writeFile(path2.join(skillDir, "SKILL.md"), skillContent, "utf-8");
2481
- }
2482
- }
2483
- createdFiles.push(
2484
- ".claude/skills/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,security-audit,update,help}/SKILL.md"
2485
- );
2486
- }
2487
- if (tools.cursor) {
2488
- await fs2.ensureDir(path2.join(cwd, ".cursor/commands"));
2489
- for (const name of workflows) {
2490
- const workflowContent = templates[`workflows/${name}.md`];
2491
- if (workflowContent) {
2492
- await fs2.writeFile(
2493
- path2.join(cwd, `.cursor/commands/melt-${name}.md`),
2494
- workflowContent,
2495
- "utf-8"
2496
- );
2497
- }
2498
- }
2499
- createdFiles.push(
2500
- ".cursor/commands/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,security-audit,update,help}.md"
2501
- );
2502
- }
2503
- if (tools.opencode) {
2504
- await fs2.ensureDir(path2.join(cwd, ".opencode/commands"));
2505
- for (const name of workflows) {
2506
- const workflowContent = templates[`workflows/${name}.md`];
2507
- if (workflowContent) {
2508
- const commandContent = OPENCODE_COMMAND_FRONTMATTER[name] + workflowContent;
2509
- await fs2.writeFile(
2510
- path2.join(cwd, `.opencode/commands/melt-${name}.md`),
2511
- commandContent,
2512
- "utf-8"
2513
- );
2514
- }
2515
- }
2516
- createdFiles.push(
2517
- ".opencode/commands/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,security-audit,update,help}.md"
2518
- );
2519
- }
2520
- console.log(chalk2.green("Created files:"));
2521
- for (const file of createdFiles) {
2522
- console.log(chalk2.dim(` ${file}`));
2523
- }
2524
- console.log();
2525
- if (tools.other) {
2526
- console.log(chalk2.cyan("Want support for your tool? Let us know in #dev on Slack"));
2527
- console.log();
2528
- }
2529
- const commandNames = "melt-setup, melt-plan, melt-validate, melt-review, melt-pr, melt-debug, melt-audit, melt-ux-audit, melt-security-audit, melt-update, melt-help";
2530
- if (tools.claude) {
2531
- console.log(chalk2.dim(`Available skills: /${commandNames.replace(/, /g, ", /")}`));
2532
- }
2533
- if (tools.cursor) {
2534
- console.log(chalk2.dim(`Available Cursor commands: ${commandNames}`));
2535
- }
2536
- if (tools.opencode) {
2537
- console.log(chalk2.dim(`Available OpenCode commands: /${commandNames.replace(/, /g, ", /")}`));
2538
- }
2539
- if (tools.claude || tools.cursor || tools.opencode) {
2540
- console.log();
2541
- }
2542
- const wroteFreshAgentsMd = !agentsMdExists || options.resetAgents;
2543
- if (wroteFreshAgentsMd) {
2544
- console.log(
2545
- chalk2.bold.cyan(" Next step: run /melt-setup to customize AGENTS.md for your project")
2546
- );
2547
- console.log();
2548
- const toolInstructions = [];
2549
- if (tools.claude) {
2550
- toolInstructions.push({
2551
- name: "Claude Code",
2552
- steps: [
2553
- "Type /melt-setup in the chat prompt, or",
2554
- "Open the skills menu and select melt-setup"
2555
- ]
2556
- });
2557
- }
2558
- if (tools.cursor) {
2559
- toolInstructions.push({
2560
- name: "Cursor",
2561
- steps: ["Open the command menu (Cmd+K) and search for melt-setup"]
2562
- });
2563
- }
2564
- if (tools.opencode) {
2565
- toolInstructions.push({
2566
- name: "OpenCode",
2567
- steps: ["Type /melt-setup in the chat prompt"]
2568
- });
2569
- }
2570
- if (toolInstructions.length === 1 && toolInstructions[0]) {
2571
- console.log(chalk2.dim(` In ${toolInstructions[0].name}:`));
2572
- for (const step of toolInstructions[0].steps) {
2573
- console.log(chalk2.dim(` - ${step}`));
2574
- }
2575
- } else {
2576
- for (const tool of toolInstructions) {
2577
- console.log(chalk2.dim(` ${tool.name}:`));
2578
- for (const step of tool.steps) {
2579
- console.log(chalk2.dim(` - ${step}`));
2580
- }
2581
- console.log();
2582
- }
2583
- }
2584
- console.log();
2585
- console.log(chalk2.dim(" The setup skill will analyze your project and fill in AGENTS.md."));
2586
- console.log(
2587
- chalk2.dim(" Then run /melt-link to connect your ticket tracker and browser testing tools.")
2588
- );
2589
- console.log();
2590
- }
2591
- console.log(chalk2.green("Done!"));
2592
- }
2593
- async function mergeMcpConfig(cwd, templateContent) {
2594
- const mcpPath = path2.join(cwd, ".mcp.json");
2595
- const templateConfig = JSON.parse(templateContent);
2596
- if (await fs2.pathExists(mcpPath)) {
2597
- const existingContent = await fs2.readFile(mcpPath, "utf-8");
2598
- const existingConfig = JSON.parse(existingContent);
2599
- existingConfig.mcpServers = {
2600
- ...existingConfig.mcpServers,
2601
- ...templateConfig.mcpServers
2602
- };
2603
- await fs2.writeFile(mcpPath, JSON.stringify(existingConfig, null, 2) + "\n", "utf-8");
2604
- } else {
2605
- await fs2.writeFile(mcpPath, templateContent, "utf-8");
2606
- }
2607
- }
2608
- async function mergeClaudeSettings(cwd, templateContent) {
2609
- const settingsPath = path2.join(cwd, ".claude/settings.json");
2610
- const templateConfig = JSON.parse(templateContent);
2611
- if (await fs2.pathExists(settingsPath)) {
2612
- const existingContent = await fs2.readFile(settingsPath, "utf-8");
2613
- const existingConfig = JSON.parse(existingContent);
2614
- const existingAllow = existingConfig.permissions?.allow ?? [];
2615
- const existingDeny = existingConfig.permissions?.deny ?? [];
2616
- const templateAllow = templateConfig.permissions?.allow ?? [];
2617
- const templateDeny = templateConfig.permissions?.deny ?? [];
2618
- existingConfig.permissions = {
2619
- ...existingConfig.permissions,
2620
- allow: [.../* @__PURE__ */ new Set([...existingAllow, ...templateAllow])],
2621
- deny: [.../* @__PURE__ */ new Set([...existingDeny, ...templateDeny])]
2622
- };
2623
- await fs2.writeFile(settingsPath, JSON.stringify(existingConfig, null, 2) + "\n", "utf-8");
2624
- } else {
2625
- await fs2.writeFile(settingsPath, templateContent, "utf-8");
2626
- }
2627
- }
2628
- async function updateGitignore(cwd) {
2629
- const gitignorePath = path2.join(cwd, ".gitignore");
2630
- let content = "";
2631
- if (await fs2.pathExists(gitignorePath)) {
2632
- content = await fs2.readFile(gitignorePath, "utf-8");
2633
- }
2634
- const missingEntries = GITIGNORE_ENTRIES.filter((entry) => !content.includes(entry));
2635
- if (missingEntries.length > 0) {
2636
- const suffix = content.endsWith("\n") || content === "" ? "" : "\n";
2637
- const section = missingEntries.length > 0 ? `${suffix}
2638
- # Melt - local settings
2639
- ${missingEntries.join("\n")}
2640
- ` : "";
2641
- await fs2.writeFile(gitignorePath, content + section, "utf-8");
2642
- }
2643
- }
2644
-
2645
- // src/commands/templates.ts
2646
- import chalk3 from "chalk";
2647
- import fs3 from "fs-extra";
2648
- import path3 from "path";
2649
- import os2 from "os";
2650
- async function templatesCommand() {
2651
- if (!await isAuthenticated()) {
2652
- console.error(chalk3.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
2653
- process.exit(1);
2654
- }
2655
- let templates;
2656
- try {
2657
- templates = await fetchTemplates();
2658
- } catch (error) {
2659
- if (error instanceof Error && error.message.includes("expired")) {
2660
- console.error(
2661
- chalk3.red("Session expired. Run `npx @meltstudio/meltctl@latest login` to re-authenticate.")
2662
- );
2663
- } else if (error instanceof Error && error.message.includes("fetch")) {
2664
- console.error(chalk3.red("Could not reach Melt API. Check your connection."));
2665
- } else {
2666
- console.error(
2667
- chalk3.red(
2668
- `Failed to fetch templates: ${error instanceof Error ? error.message : "Unknown error"}`
2669
- )
2670
- );
2671
- }
2672
- process.exit(1);
2673
- }
2674
- const tmpDir = path3.join(os2.tmpdir(), `melt-templates-${Date.now()}`);
2675
- await fs3.ensureDir(tmpDir);
2163
+ const tmpDir = path2.join(os2.tmpdir(), `melt-templates-${Date.now()}`);
2164
+ await fs2.ensureDir(tmpDir);
2676
2165
  for (const [filePath, content] of Object.entries(templates)) {
2677
- const fullPath = path3.join(tmpDir, filePath);
2678
- await fs3.ensureDir(path3.dirname(fullPath));
2679
- await fs3.writeFile(fullPath, content, "utf-8");
2166
+ const fullPath = path2.join(tmpDir, filePath);
2167
+ await fs2.ensureDir(path2.dirname(fullPath));
2168
+ await fs2.writeFile(fullPath, content, "utf-8");
2680
2169
  }
2681
2170
  console.log(tmpDir);
2682
2171
  }
2683
2172
 
2684
2173
  // src/commands/login.ts
2685
- import chalk5 from "chalk";
2174
+ import chalk4 from "chalk";
2686
2175
  import http from "http";
2687
2176
  import { URL } from "url";
2688
2177
  import { exec } from "child_process";
2689
2178
 
2690
2179
  // src/utils/banner.ts
2691
2180
  init_version();
2692
- import chalk4 from "chalk";
2181
+ import chalk3 from "chalk";
2693
2182
  import gradient from "gradient-string";
2694
2183
  var meltGradient = gradient(["#FFC107", "#E91E63", "#00BCD4", "#FF5722"]);
2695
2184
  var LOGO = `
@@ -2703,7 +2192,7 @@ function printBanner() {
2703
2192
  console.log(meltGradient(LOGO));
2704
2193
  console.log();
2705
2194
  console.log(
2706
- ` ${chalk4.dim("v" + CLI_VERSION)} ${chalk4.dim("\xB7")} ${chalk4.dim("AI-first development tools for teams")}`
2195
+ ` ${chalk3.dim("v" + CLI_VERSION)} ${chalk3.dim("\xB7")} ${chalk3.dim("AI-first development tools for teams")}`
2707
2196
  );
2708
2197
  console.log();
2709
2198
  }
@@ -2721,7 +2210,7 @@ function openBrowser(url) {
2721
2210
  }
2722
2211
  exec(command, (err) => {
2723
2212
  if (err) {
2724
- console.log(chalk5.dim(` Couldn't auto-open browser: ${err.message}`));
2213
+ console.log(chalk4.dim(` Couldn't auto-open browser: ${err.message}`));
2725
2214
  }
2726
2215
  });
2727
2216
  }
@@ -2741,7 +2230,7 @@ function findFreePort() {
2741
2230
  }
2742
2231
  async function loginCommand() {
2743
2232
  printBanner();
2744
- console.log(chalk5.bold(" Logging in to Melt..."));
2233
+ console.log(chalk4.bold(" Logging in to Melt..."));
2745
2234
  const port = await findFreePort();
2746
2235
  const redirectUri = `http://localhost:${port.toString()}`;
2747
2236
  const authCode = await new Promise((resolve, reject) => {
@@ -2779,16 +2268,16 @@ async function loginCommand() {
2779
2268
  server.listen(port, () => {
2780
2269
  const authUrl = `${API_BASE}/auth/google?redirect_uri=${encodeURIComponent(redirectUri)}`;
2781
2270
  console.log();
2782
- console.log(chalk5.bold(" Open this URL to log in (or wait for your browser to open):"));
2271
+ console.log(chalk4.bold(" Open this URL to log in (or wait for your browser to open):"));
2783
2272
  console.log();
2784
- console.log(` ${chalk5.cyan(authUrl)}`);
2273
+ console.log(` ${chalk4.cyan(authUrl)}`);
2785
2274
  console.log();
2786
- console.log(chalk5.dim(" Sign in with your @meltstudio.co Google Workspace account."));
2275
+ console.log(chalk4.dim(" Sign in with your @meltstudio.co Google Workspace account."));
2787
2276
  console.log();
2788
2277
  openBrowser(authUrl);
2789
2278
  });
2790
2279
  });
2791
- console.log(chalk5.dim("Exchanging authorization code..."));
2280
+ console.log(chalk4.dim("Exchanging authorization code..."));
2792
2281
  const client = createMeltClient({ baseUrl: API_BASE, token: "" });
2793
2282
  try {
2794
2283
  const data = await client.auth.exchangeToken(authCode, redirectUri);
@@ -2798,10 +2287,10 @@ async function loginCommand() {
2798
2287
  expiresAt: data.expiresAt
2799
2288
  });
2800
2289
  console.log();
2801
- console.log(chalk5.green(`Logged in as ${data.email}`));
2290
+ console.log(chalk4.green(`Logged in as ${data.email}`));
2802
2291
  } catch (error) {
2803
2292
  console.error(
2804
- chalk5.red(
2293
+ chalk4.red(
2805
2294
  `Authentication failed: ${error instanceof Error ? error.message : "Unknown error"}`
2806
2295
  )
2807
2296
  );
@@ -2810,14 +2299,14 @@ async function loginCommand() {
2810
2299
  }
2811
2300
 
2812
2301
  // src/commands/logout.ts
2813
- import chalk6 from "chalk";
2302
+ import chalk5 from "chalk";
2814
2303
  async function logoutCommand() {
2815
2304
  const auth = await getStoredAuth();
2816
2305
  await clearAuth();
2817
2306
  if (auth) {
2818
- console.log(chalk6.green(`Logged out (was ${auth.email})`));
2307
+ console.log(chalk5.green(`Logged out (was ${auth.email})`));
2819
2308
  } else {
2820
- console.log(chalk6.dim("No active session found."));
2309
+ console.log(chalk5.dim("No active session found."));
2821
2310
  }
2822
2311
  }
2823
2312
 
@@ -2826,7 +2315,7 @@ init_version_check();
2826
2315
 
2827
2316
  // src/commands/version.ts
2828
2317
  init_version_check();
2829
- import chalk9 from "chalk";
2318
+ import chalk8 from "chalk";
2830
2319
 
2831
2320
  // src/utils/package-manager.ts
2832
2321
  import { execSync as execSync3 } from "child_process";
@@ -2880,32 +2369,32 @@ async function versionCheckCommand() {
2880
2369
  const currentVersion = await getCurrentCliVersion();
2881
2370
  const latestVersion = await getLatestCliVersion();
2882
2371
  if (!latestVersion) {
2883
- console.log(chalk9.yellow("\u26A0\uFE0F Unable to check for updates (network error)"));
2884
- console.log(chalk9.gray(`Current version: ${currentVersion}`));
2372
+ console.log(chalk8.yellow("\u26A0\uFE0F Unable to check for updates (network error)"));
2373
+ console.log(chalk8.gray(`Current version: ${currentVersion}`));
2885
2374
  return;
2886
2375
  }
2887
2376
  if (compareVersions(currentVersion, latestVersion)) {
2888
- console.log(chalk9.yellow(`\u26A0 Update available: ${currentVersion} \u2192 ${latestVersion}`));
2377
+ console.log(chalk8.yellow(`\u26A0 Update available: ${currentVersion} \u2192 ${latestVersion}`));
2889
2378
  console.log();
2890
- console.log(chalk9.white("To update, run:"));
2379
+ console.log(chalk8.white("To update, run:"));
2891
2380
  const instructions = getUpdateInstructions();
2892
2381
  instructions.forEach((instruction, index) => {
2893
2382
  if (index === 0) {
2894
- console.log(chalk9.cyan(` ${instruction}`));
2383
+ console.log(chalk8.cyan(` ${instruction}`));
2895
2384
  } else if (instruction === "") {
2896
2385
  console.log();
2897
2386
  } else if (instruction.startsWith("Or with")) {
2898
- console.log(chalk9.gray(instruction));
2387
+ console.log(chalk8.gray(instruction));
2899
2388
  } else {
2900
- console.log(chalk9.cyan(instruction));
2389
+ console.log(chalk8.cyan(instruction));
2901
2390
  }
2902
2391
  });
2903
2392
  } else {
2904
- console.log(chalk9.green(`\u2713 meltctl ${currentVersion} is up to date`));
2393
+ console.log(chalk8.green(`\u2713 meltctl ${currentVersion} is up to date`));
2905
2394
  }
2906
2395
  } catch (error) {
2907
2396
  console.error(
2908
- chalk9.red("Failed to check for updates:"),
2397
+ chalk8.red("Failed to check for updates:"),
2909
2398
  error instanceof Error ? error.message : String(error)
2910
2399
  );
2911
2400
  process.exit(1);
@@ -2913,41 +2402,41 @@ async function versionCheckCommand() {
2913
2402
  }
2914
2403
 
2915
2404
  // src/commands/standup.ts
2916
- import chalk10 from "chalk";
2405
+ import chalk9 from "chalk";
2917
2406
  import { input, editor } from "@inquirer/prompts";
2918
- var EDITOR_HINT = chalk10.dim("(type \\e to open your editor)");
2407
+ var EDITOR_HINT = chalk9.dim("(type \\e to open your editor)");
2919
2408
  async function promptField(message, required) {
2920
2409
  const value = await input({ message: `${message} ${EDITOR_HINT}` });
2921
2410
  if (value === "\\e") {
2922
2411
  try {
2923
2412
  return await editor({ message });
2924
2413
  } catch {
2925
- console.log(chalk10.yellow("Editor failed to open. Falling back to inline input."));
2414
+ console.log(chalk9.yellow("Editor failed to open. Falling back to inline input."));
2926
2415
  return promptField(message, required);
2927
2416
  }
2928
2417
  }
2929
2418
  if (required && !value.trim()) {
2930
- console.log(chalk10.yellow("This field is required."));
2419
+ console.log(chalk9.yellow("This field is required."));
2931
2420
  return promptField(message, required);
2932
2421
  }
2933
2422
  return value;
2934
2423
  }
2935
2424
  async function standupCommand(options) {
2936
2425
  if (!await isAuthenticated()) {
2937
- console.error(chalk10.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
2426
+ console.error(chalk9.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
2938
2427
  process.exit(1);
2939
2428
  }
2940
2429
  const client = await getClient();
2941
2430
  try {
2942
2431
  const existing = await client.standups.getStatus();
2943
2432
  if (existing) {
2944
- console.log(chalk10.yellow("\nYou already submitted a standup today:\n"));
2945
- console.log(chalk10.bold("Yesterday:"), existing.yesterday);
2946
- console.log(chalk10.bold("Today:"), existing.today);
2433
+ console.log(chalk9.yellow("\nYou already submitted a standup today:\n"));
2434
+ console.log(chalk9.bold("Yesterday:"), existing.yesterday);
2435
+ console.log(chalk9.bold("Today:"), existing.today);
2947
2436
  if (existing.blockers) {
2948
- console.log(chalk10.bold("Blockers:"), existing.blockers);
2437
+ console.log(chalk9.bold("Blockers:"), existing.blockers);
2949
2438
  }
2950
- console.log(chalk10.dim("\nTo edit your standup, use the Melt Connect frontend."));
2439
+ console.log(chalk9.dim("\nTo edit your standup, use the Melt Connect frontend."));
2951
2440
  return;
2952
2441
  }
2953
2442
  } catch {
@@ -2960,8 +2449,8 @@ async function standupCommand(options) {
2960
2449
  today = options.today;
2961
2450
  blockers = options.blockers ?? "";
2962
2451
  } else {
2963
- console.log(chalk10.bold.cyan("\n Daily Standup Report\n"));
2964
- console.log(chalk10.dim(" Tip: Mention tickets, PRs, or features by name.\n"));
2452
+ console.log(chalk9.bold.cyan("\n Daily Standup Report\n"));
2453
+ console.log(chalk9.dim(" Tip: Mention tickets, PRs, or features by name.\n"));
2965
2454
  yesterday = await promptField("What did you work on yesterday?", true);
2966
2455
  today = await promptField("What are you going to work on today?", true);
2967
2456
  blockers = await promptField("Any blockers? (leave empty if none)", false);
@@ -2972,10 +2461,10 @@ async function standupCommand(options) {
2972
2461
  today,
2973
2462
  blockers: blockers || void 0
2974
2463
  });
2975
- console.log(chalk10.green("\n \u2713 Standup submitted!\n"));
2464
+ console.log(chalk9.green("\n \u2713 Standup submitted!\n"));
2976
2465
  } catch (error) {
2977
2466
  console.error(
2978
- chalk10.red(
2467
+ chalk9.red(
2979
2468
  `
2980
2469
  Failed to submit standup: ${error instanceof Error ? error.message : "Unknown error"}`
2981
2470
  )
@@ -2985,9 +2474,9 @@ Failed to submit standup: ${error instanceof Error ? error.message : "Unknown er
2985
2474
  }
2986
2475
 
2987
2476
  // src/commands/feedback.ts
2988
- import chalk11 from "chalk";
2477
+ import chalk10 from "chalk";
2989
2478
  import { input as input2, select, editor as editor2 } from "@inquirer/prompts";
2990
- var EDITOR_HINT2 = chalk11.dim("(type \\\\e to open your editor)");
2479
+ var EDITOR_HINT2 = chalk10.dim("(type \\\\e to open your editor)");
2991
2480
  async function promptDescription() {
2992
2481
  const value = await input2({
2993
2482
  message: `Write your feedback (50\u2013500 chars): ${EDITOR_HINT2}`
@@ -2997,7 +2486,7 @@ async function promptDescription() {
2997
2486
  const editorValue = await editor2({ message: "Write your feedback:" });
2998
2487
  return validateDescription(editorValue);
2999
2488
  } catch {
3000
- console.log(chalk11.yellow("Editor failed to open. Falling back to inline input."));
2489
+ console.log(chalk10.yellow("Editor failed to open. Falling back to inline input."));
3001
2490
  return promptDescription();
3002
2491
  }
3003
2492
  }
@@ -3006,18 +2495,18 @@ async function promptDescription() {
3006
2495
  function validateDescription(value) {
3007
2496
  const trimmed = value.trim();
3008
2497
  if (trimmed.length < 50) {
3009
- console.log(chalk11.yellow(`Too short (${trimmed.length}/50 min). Please write more.`));
2498
+ console.log(chalk10.yellow(`Too short (${trimmed.length}/50 min). Please write more.`));
3010
2499
  return promptDescription();
3011
2500
  }
3012
2501
  if (trimmed.length > 500) {
3013
- console.log(chalk11.yellow(`Too long (${trimmed.length}/500 max). Please shorten it.`));
2502
+ console.log(chalk10.yellow(`Too long (${trimmed.length}/500 max). Please shorten it.`));
3014
2503
  return promptDescription();
3015
2504
  }
3016
2505
  return trimmed;
3017
2506
  }
3018
2507
  async function feedbackCommand(options) {
3019
2508
  if (!await isAuthenticated()) {
3020
- console.error(chalk11.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
2509
+ console.error(chalk10.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
3021
2510
  process.exit(1);
3022
2511
  }
3023
2512
  const client = await getClient();
@@ -3029,16 +2518,16 @@ async function feedbackCommand(options) {
3029
2518
  coins = parseInt(options.coins, 10);
3030
2519
  description = options.description;
3031
2520
  } else {
3032
- console.log(chalk11.bold.cyan("\n Send Feedback\n"));
2521
+ console.log(chalk10.bold.cyan("\n Send Feedback\n"));
3033
2522
  let recipients;
3034
2523
  try {
3035
2524
  recipients = await client.feedback.getRecipients();
3036
2525
  } catch {
3037
- console.error(chalk11.red("Failed to connect to the server."));
2526
+ console.error(chalk10.red("Failed to connect to the server."));
3038
2527
  process.exit(1);
3039
2528
  }
3040
2529
  if (recipients.length === 0) {
3041
- console.log(chalk11.yellow("No recipients available."));
2530
+ console.log(chalk10.yellow("No recipients available."));
3042
2531
  return;
3043
2532
  }
3044
2533
  const selectedRecipient = await select({
@@ -3062,13 +2551,13 @@ async function feedbackCommand(options) {
3062
2551
  try {
3063
2552
  await client.feedback.submit({ toUserId, coins, description });
3064
2553
  console.log(
3065
- chalk11.green(`
2554
+ chalk10.green(`
3066
2555
  \u2713 Feedback sent! You gave ${coins} coin${coins > 1 ? "s" : ""}.
3067
2556
  `)
3068
2557
  );
3069
2558
  } catch (error) {
3070
2559
  console.error(
3071
- chalk11.red(
2560
+ chalk10.red(
3072
2561
  `
3073
2562
  Failed to send feedback: ${error instanceof Error ? error.message : "Unknown error"}`
3074
2563
  )
@@ -3078,10 +2567,10 @@ Failed to send feedback: ${error instanceof Error ? error.message : "Unknown err
3078
2567
  }
3079
2568
 
3080
2569
  // src/commands/coins.ts
3081
- import chalk12 from "chalk";
2570
+ import chalk11 from "chalk";
3082
2571
  async function coinsCommand(options) {
3083
2572
  if (!await isAuthenticated()) {
3084
- console.error(chalk12.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
2573
+ console.error(chalk11.red("Not authenticated. Run `npx @meltstudio/meltctl@latest login` first."));
3085
2574
  process.exit(1);
3086
2575
  }
3087
2576
  if (options.leaderboard) {
@@ -3094,12 +2583,12 @@ async function showBalance() {
3094
2583
  const client = await getClient();
3095
2584
  try {
3096
2585
  const data = await client.coins.getBalance();
3097
- console.log(chalk12.bold.cyan("\n Your Coins (last 28 days)"));
3098
- console.log(` ${chalk12.bold(String(data.coins))} coin${data.coins !== 1 ? "s" : ""} received
2586
+ console.log(chalk11.bold.cyan("\n Your Coins (last 28 days)"));
2587
+ console.log(` ${chalk11.bold(String(data.coins))} coin${data.coins !== 1 ? "s" : ""} received
3099
2588
  `);
3100
2589
  } catch (error) {
3101
2590
  console.error(
3102
- chalk12.red(
2591
+ chalk11.red(
3103
2592
  `Failed to fetch coins: ${error instanceof Error ? error.message : "Unknown error"}`
3104
2593
  )
3105
2594
  );
@@ -3111,12 +2600,12 @@ async function showLeaderboard() {
3111
2600
  try {
3112
2601
  const entries = await client.coins.getLeaderboard();
3113
2602
  if (entries.length === 0) {
3114
- console.log(chalk12.yellow("\n No coins have been sent in the last 28 days.\n"));
2603
+ console.log(chalk11.yellow("\n No coins have been sent in the last 28 days.\n"));
3115
2604
  return;
3116
2605
  }
3117
- console.log(chalk12.bold.cyan("\n Leaderboard (last 28 days)\n"));
2606
+ console.log(chalk11.bold.cyan("\n Leaderboard (last 28 days)\n"));
3118
2607
  const maxNameLen = Math.max(...entries.map((e) => e.name.length), 4);
3119
- console.log(chalk12.dim(` ${"#".padEnd(4)} ${"Name".padEnd(maxNameLen)} Coins`));
2608
+ console.log(chalk11.dim(` ${"#".padEnd(4)} ${"Name".padEnd(maxNameLen)} Coins`));
3120
2609
  entries.forEach((entry, i) => {
3121
2610
  const rank = String(i + 1).padEnd(4);
3122
2611
  const name = entry.name.padEnd(maxNameLen);
@@ -3126,7 +2615,7 @@ async function showLeaderboard() {
3126
2615
  console.log();
3127
2616
  } catch (error) {
3128
2617
  console.error(
3129
- chalk12.red(
2618
+ chalk11.red(
3130
2619
  `Failed to fetch leaderboard: ${error instanceof Error ? error.message : "Unknown error"}`
3131
2620
  )
3132
2621
  );
@@ -3135,13 +2624,13 @@ async function showLeaderboard() {
3135
2624
  }
3136
2625
 
3137
2626
  // src/commands/audit.ts
3138
- import chalk13 from "chalk";
3139
- import fs5 from "fs-extra";
3140
- import path6 from "path";
3141
-
3142
- // src/utils/git.ts
2627
+ import chalk12 from "chalk";
3143
2628
  import fs4 from "fs-extra";
3144
2629
  import path5 from "path";
2630
+
2631
+ // src/utils/git.ts
2632
+ import fs3 from "fs-extra";
2633
+ import path4 from "path";
3145
2634
  import { execSync as execSync4 } from "child_process";
3146
2635
  function getGitBranch() {
3147
2636
  try {
@@ -3179,34 +2668,34 @@ function getGitRepository() {
3179
2668
  function getProjectName() {
3180
2669
  const cwd = process.cwd();
3181
2670
  try {
3182
- const pkgPath = path5.join(cwd, "package.json");
3183
- if (fs4.pathExistsSync(pkgPath)) {
3184
- const pkg = fs4.readJsonSync(pkgPath);
2671
+ const pkgPath = path4.join(cwd, "package.json");
2672
+ if (fs3.pathExistsSync(pkgPath)) {
2673
+ const pkg = fs3.readJsonSync(pkgPath);
3185
2674
  if (pkg.name) {
3186
2675
  return pkg.name;
3187
2676
  }
3188
2677
  }
3189
2678
  } catch {
3190
2679
  }
3191
- return path5.basename(cwd);
2680
+ return path4.basename(cwd);
3192
2681
  }
3193
2682
  function extractTicketId(branch) {
3194
2683
  const match = branch.match(/([A-Z]+-\d+)/i);
3195
2684
  return match ? match[1] : null;
3196
2685
  }
3197
2686
  async function findMdFiles(dir) {
3198
- if (!await fs4.pathExists(dir)) {
2687
+ if (!await fs3.pathExists(dir)) {
3199
2688
  return [];
3200
2689
  }
3201
2690
  const results = [];
3202
2691
  async function walk(current) {
3203
- const entries = await fs4.readdir(current, { withFileTypes: true });
2692
+ const entries = await fs3.readdir(current, { withFileTypes: true });
3204
2693
  for (const entry of entries) {
3205
- const fullPath = path5.join(current, entry.name);
2694
+ const fullPath = path4.join(current, entry.name);
3206
2695
  if (entry.isDirectory()) {
3207
2696
  await walk(fullPath);
3208
2697
  } else if (entry.isFile() && entry.name.endsWith(".md")) {
3209
- const stat = await fs4.stat(fullPath);
2698
+ const stat = await fs3.stat(fullPath);
3210
2699
  results.push({ path: fullPath, mtime: stat.mtimeMs });
3211
2700
  }
3212
2701
  }
@@ -3225,15 +2714,15 @@ function detectAuditType(filename) {
3225
2714
  }
3226
2715
  async function autoDetectAuditFile() {
3227
2716
  const cwd = process.cwd();
3228
- const auditsDir = path6.join(cwd, ".audits");
2717
+ const auditsDir = path5.join(cwd, ".audits");
3229
2718
  const auditFiles = await findMdFiles(auditsDir);
3230
2719
  if (auditFiles.length > 0) {
3231
2720
  return auditFiles[0] ?? null;
3232
2721
  }
3233
2722
  const candidates = ["AUDIT.md", "UX-AUDIT.md", "SECURITY-AUDIT.md"];
3234
2723
  for (const name of candidates) {
3235
- const filePath = path6.join(cwd, name);
3236
- if (await fs5.pathExists(filePath)) {
2724
+ const filePath = path5.join(cwd, name);
2725
+ if (await fs4.pathExists(filePath)) {
3237
2726
  return filePath;
3238
2727
  }
3239
2728
  }
@@ -3243,26 +2732,26 @@ async function auditSubmitCommand(file) {
3243
2732
  const client = await getClient();
3244
2733
  let filePath;
3245
2734
  if (file) {
3246
- filePath = path6.resolve(file);
2735
+ filePath = path5.resolve(file);
3247
2736
  } else {
3248
2737
  const detected = await autoDetectAuditFile();
3249
2738
  if (!detected) {
3250
2739
  console.error(
3251
- chalk13.red(
2740
+ chalk12.red(
3252
2741
  "No audit file found. Provide a file path or create an audit in the .audits/ directory."
3253
2742
  )
3254
2743
  );
3255
2744
  process.exit(1);
3256
2745
  }
3257
2746
  filePath = detected;
3258
- console.log(chalk13.dim(`Auto-detected audit file: ${path6.relative(process.cwd(), filePath)}`));
2747
+ console.log(chalk12.dim(`Auto-detected audit file: ${path5.relative(process.cwd(), filePath)}`));
3259
2748
  }
3260
- if (!await fs5.pathExists(filePath)) {
3261
- console.error(chalk13.red(`File not found: ${filePath}`));
2749
+ if (!await fs4.pathExists(filePath)) {
2750
+ console.error(chalk12.red(`File not found: ${filePath}`));
3262
2751
  process.exit(1);
3263
2752
  }
3264
- const content = await fs5.readFile(filePath, "utf-8");
3265
- const filename = path6.basename(filePath);
2753
+ const content = await fs4.readFile(filePath, "utf-8");
2754
+ const filename = path5.basename(filePath);
3266
2755
  const auditType = detectAuditType(filename);
3267
2756
  const project2 = getProjectName();
3268
2757
  const branch = getGitBranch();
@@ -3279,12 +2768,12 @@ async function auditSubmitCommand(file) {
3279
2768
  content,
3280
2769
  metadata: { filename }
3281
2770
  });
3282
- console.log(chalk13.green(`
2771
+ console.log(chalk12.green(`
3283
2772
  \u2713 Audit submitted! ID: ${result.id}
3284
2773
  `));
3285
2774
  } catch (error) {
3286
2775
  console.error(
3287
- chalk13.red(
2776
+ chalk12.red(
3288
2777
  `
3289
2778
  Failed to submit audit: ${error instanceof Error ? error.message : "Unknown error"}`
3290
2779
  )
@@ -3302,7 +2791,7 @@ async function auditListCommand(options) {
3302
2791
  limit: options.limit ? parseInt(options.limit, 10) : void 0
3303
2792
  });
3304
2793
  if (body.audits.length === 0) {
3305
- console.log(chalk13.dim("\n No audits found.\n"));
2794
+ console.log(chalk12.dim("\n No audits found.\n"));
3306
2795
  return;
3307
2796
  }
3308
2797
  const typeLabels = {
@@ -3311,11 +2800,11 @@ async function auditListCommand(options) {
3311
2800
  "security-audit": "Security"
3312
2801
  };
3313
2802
  if (options.latest) {
3314
- console.log(chalk13.bold(`
2803
+ console.log(chalk12.bold(`
3315
2804
  Latest Audits (${body.count}):
3316
2805
  `));
3317
2806
  console.log(
3318
- chalk13.dim(
2807
+ chalk12.dim(
3319
2808
  ` ${"ID".padEnd(10)} ${"TYPE".padEnd(12)} ${"REPOSITORY".padEnd(40)} ${"AGE".padEnd(10)} ${"AUTHOR".padEnd(30)} DATE`
3320
2809
  )
3321
2810
  );
@@ -3324,11 +2813,11 @@ async function auditListCommand(options) {
3324
2813
  printLatestAuditRow(r, typeLabels);
3325
2814
  }
3326
2815
  } else {
3327
- console.log(chalk13.bold(`
2816
+ console.log(chalk12.bold(`
3328
2817
  Audits (${body.count}):
3329
2818
  `));
3330
2819
  const hdr = ` ${"ID".padEnd(10)} ${"TYPE".padEnd(12)} ${"REPOSITORY".padEnd(40)} ${"AUTHOR".padEnd(30)} DATE`;
3331
- console.log(chalk13.dim(hdr));
2820
+ console.log(chalk12.dim(hdr));
3332
2821
  console.log();
3333
2822
  for (const r of body.audits) {
3334
2823
  printAuditRow(r, typeLabels);
@@ -3337,7 +2826,7 @@ async function auditListCommand(options) {
3337
2826
  console.log();
3338
2827
  } catch (error) {
3339
2828
  console.error(
3340
- chalk13.red(
2829
+ chalk12.red(
3341
2830
  `Failed to list audits: ${error instanceof Error ? error.message : "Unknown error"}`
3342
2831
  )
3343
2832
  );
@@ -3354,12 +2843,12 @@ function printLatestAuditRow(r, typeLabels) {
3354
2843
  });
3355
2844
  const repo = r.repository ?? r.project;
3356
2845
  const label = typeLabels[r.type] ?? r.type;
3357
- const typeColor = r.type === "ux-audit" ? chalk13.yellow : r.type === "security-audit" ? chalk13.red : chalk13.magenta;
2846
+ const typeColor = r.type === "ux-audit" ? chalk12.yellow : r.type === "security-audit" ? chalk12.red : chalk12.magenta;
3358
2847
  const ageText = daysAgo === 0 ? "today" : `${daysAgo}d ago`;
3359
2848
  const isSecurityAudit = r.type === "security-audit";
3360
- const ageColor = isSecurityAudit ? daysAgo <= 30 ? chalk13.green : daysAgo <= 90 ? chalk13.yellow : chalk13.red : daysAgo <= 7 ? chalk13.green : daysAgo <= 30 ? chalk13.yellow : chalk13.red;
2849
+ const ageColor = isSecurityAudit ? daysAgo <= 30 ? chalk12.green : daysAgo <= 90 ? chalk12.yellow : chalk12.red : daysAgo <= 7 ? chalk12.green : daysAgo <= 30 ? chalk12.yellow : chalk12.red;
3361
2850
  console.log(
3362
- ` ${chalk13.dim(r.id.slice(0, 8).padEnd(10))} ${typeColor(label.padEnd(12))} ${chalk13.white(repo.padEnd(40))} ${ageColor(ageText.padEnd(10))} ${chalk13.dim(r.author.padEnd(30))} ${chalk13.dim(date)}`
2851
+ ` ${chalk12.dim(r.id.slice(0, 8).padEnd(10))} ${typeColor(label.padEnd(12))} ${chalk12.white(repo.padEnd(40))} ${ageColor(ageText.padEnd(10))} ${chalk12.dim(r.author.padEnd(30))} ${chalk12.dim(date)}`
3363
2852
  );
3364
2853
  }
3365
2854
  function printAuditRow(r, typeLabels) {
@@ -3372,13 +2861,13 @@ function printAuditRow(r, typeLabels) {
3372
2861
  });
3373
2862
  const repo = r.repository ?? r.project;
3374
2863
  const label = typeLabels[r.type] ?? r.type;
3375
- const typeColor = r.type === "ux-audit" ? chalk13.yellow : r.type === "security-audit" ? chalk13.red : chalk13.magenta;
2864
+ const typeColor = r.type === "ux-audit" ? chalk12.yellow : r.type === "security-audit" ? chalk12.red : chalk12.magenta;
3376
2865
  console.log(
3377
- ` ${chalk13.dim(r.id.slice(0, 8).padEnd(10))} ${typeColor(label.padEnd(12))} ${chalk13.white(repo.padEnd(40))} ${chalk13.dim(r.author.padEnd(30))} ${chalk13.dim(date)}`
2866
+ ` ${chalk12.dim(r.id.slice(0, 8).padEnd(10))} ${typeColor(label.padEnd(12))} ${chalk12.white(repo.padEnd(40))} ${chalk12.dim(r.author.padEnd(30))} ${chalk12.dim(date)}`
3378
2867
  );
3379
2868
  if (r.branch && r.branch !== "main") {
3380
2869
  console.log(
3381
- ` ${" ".padEnd(10)} ${" ".padEnd(12)} ${chalk13.dim(`branch: ${r.branch} commit: ${r.commit ?? "N/A"}`)}`
2870
+ ` ${" ".padEnd(10)} ${" ".padEnd(12)} ${chalk12.dim(`branch: ${r.branch} commit: ${r.commit ?? "N/A"}`)}`
3382
2871
  );
3383
2872
  }
3384
2873
  }
@@ -3387,11 +2876,11 @@ async function auditViewCommand(id, options) {
3387
2876
  try {
3388
2877
  const audit2 = await client.audits.get(id);
3389
2878
  if (options.output) {
3390
- const outputPath = path6.resolve(options.output);
3391
- await fs5.ensureDir(path6.dirname(outputPath));
3392
- await fs5.writeFile(outputPath, audit2.content, "utf-8");
3393
- console.log(chalk13.green(`
3394
- \u2713 Audit saved to ${path6.relative(process.cwd(), outputPath)}
2879
+ const outputPath = path5.resolve(options.output);
2880
+ await fs4.ensureDir(path5.dirname(outputPath));
2881
+ await fs4.writeFile(outputPath, audit2.content, "utf-8");
2882
+ console.log(chalk12.green(`
2883
+ \u2713 Audit saved to ${path5.relative(process.cwd(), outputPath)}
3395
2884
  `));
3396
2885
  } else {
3397
2886
  const typeLabels = {
@@ -3407,13 +2896,13 @@ async function auditViewCommand(id, options) {
3407
2896
  });
3408
2897
  const repo = audit2.repository ?? audit2.project;
3409
2898
  console.log();
3410
- console.log(chalk13.dim(` ${label} \xB7 ${repo} \xB7 ${audit2.author} \xB7 ${date}`));
2899
+ console.log(chalk12.dim(` ${label} \xB7 ${repo} \xB7 ${audit2.author} \xB7 ${date}`));
3411
2900
  console.log();
3412
2901
  console.log(audit2.content);
3413
2902
  }
3414
2903
  } catch (error) {
3415
2904
  console.error(
3416
- chalk13.red(
2905
+ chalk12.red(
3417
2906
  `Failed to fetch audit: ${error instanceof Error ? error.message : "Unknown error"}`
3418
2907
  )
3419
2908
  );
@@ -3422,9 +2911,9 @@ async function auditViewCommand(id, options) {
3422
2911
  }
3423
2912
 
3424
2913
  // src/commands/plan.ts
3425
- import chalk14 from "chalk";
3426
- import fs6 from "fs-extra";
3427
- import path7 from "path";
2914
+ import chalk13 from "chalk";
2915
+ import fs5 from "fs-extra";
2916
+ import path6 from "path";
3428
2917
  function extractFrontmatterStatus(content) {
3429
2918
  const match = content.match(/^---\n([\s\S]*?)\n---/);
3430
2919
  if (!match) return null;
@@ -3433,7 +2922,7 @@ function extractFrontmatterStatus(content) {
3433
2922
  }
3434
2923
  async function autoDetectPlanFile() {
3435
2924
  const cwd = process.cwd();
3436
- const plansDir = path7.join(cwd, ".plans");
2925
+ const plansDir = path6.join(cwd, ".plans");
3437
2926
  const mdFiles = await findMdFiles(plansDir);
3438
2927
  if (mdFiles.length === 0) {
3439
2928
  return null;
@@ -3442,7 +2931,7 @@ async function autoDetectPlanFile() {
3442
2931
  const ticketId = extractTicketId(branch);
3443
2932
  if (ticketId) {
3444
2933
  const ticketLower = ticketId.toLowerCase();
3445
- const match = mdFiles.find((f) => path7.basename(f).toLowerCase().includes(ticketLower));
2934
+ const match = mdFiles.find((f) => path6.basename(f).toLowerCase().includes(ticketLower));
3446
2935
  if (match) {
3447
2936
  return match;
3448
2937
  }
@@ -3453,26 +2942,26 @@ async function planSubmitCommand(file) {
3453
2942
  const client = await getClient();
3454
2943
  let filePath;
3455
2944
  if (file) {
3456
- filePath = path7.resolve(file);
2945
+ filePath = path6.resolve(file);
3457
2946
  } else {
3458
2947
  const detected = await autoDetectPlanFile();
3459
2948
  if (!detected) {
3460
2949
  console.error(
3461
- chalk14.red(
2950
+ chalk13.red(
3462
2951
  "No plan file found. Provide a file path or create a plan in the .plans/ directory."
3463
2952
  )
3464
2953
  );
3465
2954
  process.exit(1);
3466
2955
  }
3467
2956
  filePath = detected;
3468
- console.log(chalk14.dim(`Auto-detected plan file: ${path7.relative(process.cwd(), filePath)}`));
2957
+ console.log(chalk13.dim(`Auto-detected plan file: ${path6.relative(process.cwd(), filePath)}`));
3469
2958
  }
3470
- if (!await fs6.pathExists(filePath)) {
3471
- console.error(chalk14.red(`File not found: ${filePath}`));
2959
+ if (!await fs5.pathExists(filePath)) {
2960
+ console.error(chalk13.red(`File not found: ${filePath}`));
3472
2961
  process.exit(1);
3473
2962
  }
3474
- const content = await fs6.readFile(filePath, "utf-8");
3475
- const filename = path7.basename(filePath);
2963
+ const content = await fs5.readFile(filePath, "utf-8");
2964
+ const filename = path6.basename(filePath);
3476
2965
  const project2 = getProjectName();
3477
2966
  const branch = getGitBranch();
3478
2967
  const commit = getGitCommit();
@@ -3492,17 +2981,17 @@ async function planSubmitCommand(file) {
3492
2981
  metadata: { filename }
3493
2982
  });
3494
2983
  if (result.created) {
3495
- console.log(chalk14.green(`
2984
+ console.log(chalk13.green(`
3496
2985
  \u2713 Plan submitted! ID: ${result.id}
3497
2986
  `));
3498
2987
  } else {
3499
- console.log(chalk14.green(`
2988
+ console.log(chalk13.green(`
3500
2989
  \u2713 Plan updated! ID: ${result.id}
3501
2990
  `));
3502
2991
  }
3503
2992
  } catch (error) {
3504
2993
  console.error(
3505
- chalk14.red(
2994
+ chalk13.red(
3506
2995
  `Failed to submit plan: ${error instanceof Error ? error.message : "Unknown error"}`
3507
2996
  )
3508
2997
  );
@@ -3518,23 +3007,23 @@ async function planListCommand(options) {
3518
3007
  limit: options.limit ? parseInt(options.limit, 10) : void 0
3519
3008
  });
3520
3009
  if (body.plans.length === 0) {
3521
- console.log(chalk14.dim("\n No plans found.\n"));
3010
+ console.log(chalk13.dim("\n No plans found.\n"));
3522
3011
  return;
3523
3012
  }
3524
- console.log(chalk14.bold(`
3013
+ console.log(chalk13.bold(`
3525
3014
  Plans (${body.count}):
3526
3015
  `));
3527
3016
  console.log(
3528
- chalk14.dim(
3017
+ chalk13.dim(
3529
3018
  ` ${"TICKET".padEnd(14)} ${"STATUS".padEnd(12)} ${"REPOSITORY".padEnd(36)} ${"AUTHOR".padEnd(30)} UPDATED`
3530
3019
  )
3531
3020
  );
3532
3021
  console.log();
3533
3022
  const statusColors = {
3534
- submitted: chalk14.dim,
3535
- approved: chalk14.cyan,
3536
- validated: chalk14.green,
3537
- reviewed: chalk14.magenta
3023
+ submitted: chalk13.dim,
3024
+ approved: chalk13.cyan,
3025
+ validated: chalk13.green,
3026
+ reviewed: chalk13.magenta
3538
3027
  };
3539
3028
  for (const p of body.plans) {
3540
3029
  const date = new Date(p.updatedAt).toLocaleDateString("en-US", {
@@ -3546,15 +3035,15 @@ async function planListCommand(options) {
3546
3035
  });
3547
3036
  const repo = p.repository ?? p.project;
3548
3037
  const ticket = p.ticket ?? "-";
3549
- const colorFn = statusColors[p.status] ?? chalk14.dim;
3038
+ const colorFn = statusColors[p.status] ?? chalk13.dim;
3550
3039
  console.log(
3551
- ` ${chalk14.white(ticket.padEnd(14))} ${colorFn(p.status.padEnd(12))} ${chalk14.white(repo.padEnd(36))} ${chalk14.dim(p.author.padEnd(30))} ${chalk14.dim(date)}`
3040
+ ` ${chalk13.white(ticket.padEnd(14))} ${colorFn(p.status.padEnd(12))} ${chalk13.white(repo.padEnd(36))} ${chalk13.dim(p.author.padEnd(30))} ${chalk13.dim(date)}`
3552
3041
  );
3553
3042
  }
3554
3043
  console.log();
3555
3044
  } catch (error) {
3556
3045
  const msg = error instanceof Error ? error.message : "Unknown error";
3557
- console.error(chalk14.red(`Failed to list plans: ${msg}`));
3046
+ console.error(chalk13.red(`Failed to list plans: ${msg}`));
3558
3047
  process.exit(1);
3559
3048
  }
3560
3049
  }
@@ -3563,10 +3052,10 @@ async function planListCommand(options) {
3563
3052
  init_update();
3564
3053
 
3565
3054
  // src/utils/debug.ts
3566
- import chalk15 from "chalk";
3055
+ import chalk14 from "chalk";
3567
3056
  function debugLog(message) {
3568
3057
  if (process.env["MELTCTL_DEBUG"]) {
3569
- console.error(chalk15.dim(`[debug] ${message}`));
3058
+ console.error(chalk14.dim(`[debug] ${message}`));
3570
3059
  }
3571
3060
  }
3572
3061
 
@@ -3622,7 +3111,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
3622
3111
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3623
3112
  import { z as z2 } from "zod";
3624
3113
  import { readFile } from "fs/promises";
3625
- import path8 from "path";
3114
+ import path7 from "path";
3626
3115
  import os3 from "os";
3627
3116
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3628
3117
  import { z as z22 } from "zod";
@@ -5411,9 +4900,9 @@ var ISSUE_RULES2 = [
5411
4900
  ];
5412
4901
  var RULE_BY_ID2 = new Map(ISSUE_RULES2.map((r) => [r.id, r]));
5413
4902
  var FOURTEEN_DAYS_MS2 = 14 * 24 * 60 * 60 * 1e3;
5414
- var AUTH_DIR2 = path8.join(os3.homedir(), ".meltctl");
5415
- var AUTH_FILE2 = path8.join(AUTH_DIR2, "auth.json");
5416
- var API_BASE2 = process.env["MELTCTL_API_URL"] ?? "https://meltctl-api.meltstudio.co";
4903
+ var AUTH_DIR2 = path7.join(os3.homedir(), ".meltctl");
4904
+ var AUTH_FILE2 = path7.join(AUTH_DIR2, "auth.json");
4905
+ var API_BASE2 = process.env["MELTCTL_API_URL"] ?? "https://api.meltctl.meltstudio.co";
5417
4906
  var AuthError = class extends Error {
5418
4907
  constructor(message) {
5419
4908
  super(message);
@@ -6273,34 +5762,34 @@ async function mcpCommand() {
6273
5762
  init_version();
6274
5763
  var program = new Command();
6275
5764
  program.name("meltctl").description(
6276
- "Set up AI-first development standards (AGENTS.md, Claude skills, Cursor commands, OpenCode commands, MCP config) in your project.\n\nRequires a @meltstudio.co Google Workspace account. Run `npx @meltstudio/meltctl@latest login` first, then `npx @meltstudio/meltctl@latest project init` in your repo."
5765
+ "Companion CLI for the Melt AI-first development workflow.\n\nThe Melt dev skills (/melt-dev-*) are distributed centrally via the Anthropic org Skills registry and auto-update in Claude Code \u2014 no per-repo install. Run /melt-dev-setup in Claude Code to scaffold AGENTS.md + MCP config in a repo.\n\nRequires a @meltstudio.co Google Workspace account. Run `npx @meltstudio/meltctl@latest login` first."
6277
5766
  ).version(CLI_VERSION).addHelpText("beforeAll", () => {
6278
5767
  printBanner();
6279
5768
  return "";
6280
5769
  }).addHelpText(
6281
5770
  "after",
6282
5771
  `
6283
- ${chalk16.bold("AI Skills")} ${chalk16.dim("(run these in your AI coding tool, not the CLI):")}
6284
- ${chalk16.dim(" /melt-setup Analyze the project and customize AGENTS.md")}
6285
- ${chalk16.dim(" /melt-link Connect and verify ticket tracker + browser testing")}
6286
- ${chalk16.dim(" /melt-plan Design an implementation approach before writing code")}
6287
- ${chalk16.dim(" /melt-validate Run the validation plan and verify end-to-end")}
6288
- ${chalk16.dim(" /melt-review Review changes against project standards")}
6289
- ${chalk16.dim(" /melt-pr Create a well-structured pull request")}
6290
- ${chalk16.dim(" /melt-debug Systematically investigate and fix bugs")}
6291
- ${chalk16.dim(" /melt-audit Run a project compliance audit")}
6292
- ${chalk16.dim(" /melt-ux-audit Review UI against usability heuristics")}
6293
- ${chalk16.dim(" /melt-security-audit Run a security posture audit across the platform")}
6294
- ${chalk16.dim(" /melt-update Update Melt skills to the latest version")}
6295
- ${chalk16.dim(" /melt-help Answer questions about the development playbook")}
5772
+ ${chalk15.bold("AI Skills")} ${chalk15.dim("(run these in Claude Code, not the CLI \u2014 auto-distributed via the org Skills registry):")}
5773
+ ${chalk15.dim(" /melt-dev-setup Analyze the project and customize AGENTS.md")}
5774
+ ${chalk15.dim(" /melt-dev-link Connect and verify ticket tracker + browser testing")}
5775
+ ${chalk15.dim(" /melt-dev-plan Design an implementation approach before writing code")}
5776
+ ${chalk15.dim(" /melt-dev-validate Run the validation plan and verify end-to-end")}
5777
+ ${chalk15.dim(" /melt-dev-review Review changes against project standards")}
5778
+ ${chalk15.dim(" /melt-dev-pr Create a well-structured pull request")}
5779
+ ${chalk15.dim(" /melt-dev-debug Systematically investigate and fix bugs")}
5780
+ ${chalk15.dim(" /melt-dev-audit Run a project compliance audit")}
5781
+ ${chalk15.dim(" /melt-dev-ux-audit Review UI against usability heuristics")}
5782
+ ${chalk15.dim(" /melt-dev-security-audit Run a security posture audit across the platform")}
5783
+ ${chalk15.dim(" /melt-dev-update Refresh AGENTS.md + MCP config to the latest")}
5784
+ ${chalk15.dim(" /melt-dev-help Answer questions about the development playbook")}
6296
5785
 
6297
- ${chalk16.bold("Admin Commands")} ${chalk16.dim("(used by skills and team managers):")}
6298
- ${chalk16.dim(" audit submit [file] Submit an audit report")}
6299
- ${chalk16.dim(" audit list List audits (managers only)")}
6300
- ${chalk16.dim(" audit view <id> View a specific audit (managers only)")}
6301
- ${chalk16.dim(" plan submit [file] Submit or update a plan")}
6302
- ${chalk16.dim(" plan list List plans (managers only)")}
6303
- ${chalk16.dim(" event track --skill Track skill usage (called by skills automatically)")}
5786
+ ${chalk15.bold("Admin Commands")} ${chalk15.dim("(used by skills and team managers):")}
5787
+ ${chalk15.dim(" audit submit [file] Submit an audit report")}
5788
+ ${chalk15.dim(" audit list List audits (managers only)")}
5789
+ ${chalk15.dim(" audit view <id> View a specific audit (managers only)")}
5790
+ ${chalk15.dim(" plan submit [file] Submit or update a plan")}
5791
+ ${chalk15.dim(" plan list List plans (managers only)")}
5792
+ ${chalk15.dim(" event track --skill Track skill usage (called by skills automatically)")}
6304
5793
  `
6305
5794
  ).hook("preAction", async (_thisCommand, actionCommand) => {
6306
5795
  let cmd = actionCommand;
@@ -6327,34 +5816,21 @@ program.command("logout").description("clear stored credentials from ~/.meltctl/
6327
5816
  await logoutCommand();
6328
5817
  });
6329
5818
  program.command("mcp").description(
6330
- "start the stdio MCP server (for Claude Code / Cursor / OpenCode MCP configs). Requires `meltctl login` first."
5819
+ "start the stdio MCP server (for Claude Code MCP config). Requires `meltctl login` first."
6331
5820
  ).action(async () => {
6332
5821
  await mcpCommand();
6333
5822
  });
6334
5823
  var project = program.command("project").description("manage project configuration").addHelpText(
6335
5824
  "after",
6336
5825
  `
6337
- ${chalk16.dim("Related skills (run in your AI coding tool after init):")}
6338
- ${chalk16.dim(" /melt-setup Analyze the project and customize AGENTS.md")}
6339
- ${chalk16.dim(" /melt-link Connect and verify ticket tracker + browser testing")}
6340
- ${chalk16.dim(" /melt-update Update Melt skills to the latest version")}
5826
+ ${chalk15.dim("Project scaffolding now lives in the Melt dev skills (run these in Claude Code,")}
5827
+ ${chalk15.dim("auto-distributed via the Anthropic org Skills registry):")}
5828
+ ${chalk15.dim(" /melt-dev-setup Analyze the project, write AGENTS.md, and propose MCP config")}
5829
+ ${chalk15.dim(" /melt-dev-link Connect and verify ticket tracker + browser testing")}
5830
+ ${chalk15.dim(" /melt-dev-update Refresh AGENTS.md + MCP config to the latest")}
6341
5831
  `
6342
5832
  );
6343
- project.command("init").description(
6344
- "scaffold Melt development tools into the current directory (AGENTS.md, .claude/, .cursor/, .opencode/, .mcp.json)"
6345
- ).option("--force", 'rewrite Melt tool files and bypass the "already initialized" prompt').option(
6346
- "--reset-agents",
6347
- "also overwrite AGENTS.md with the template (destructive \u2014 wipes any customizations)"
6348
- ).option("--claude", "generate Claude Code configuration").option("--cursor", "generate Cursor configuration").option("--opencode", "generate OpenCode configuration").action((options) => {
6349
- return initCommand({
6350
- force: options.force,
6351
- resetAgents: options.resetAgents,
6352
- claude: options.claude,
6353
- cursor: options.cursor,
6354
- opencode: options.opencode
6355
- });
6356
- });
6357
- project.command("templates").description("fetch latest templates to a temp directory (for /melt-update)").action(async () => {
5833
+ project.command("templates").description("fetch latest templates to a temp directory (for /melt-dev-update)").action(async () => {
6358
5834
  await templatesCommand();
6359
5835
  });
6360
5836
  program.command("standup").description("submit your daily standup report").addOption(new Option("--yesterday <text>").hideHelp()).addOption(new Option("--today <text>").hideHelp()).addOption(new Option("--blockers <text>").hideHelp()).action(async (options) => {
@@ -6369,10 +5845,10 @@ program.command("coins").description("check your coin balance or the team leader
6369
5845
  var audit = program.command("audit", { hidden: true }).description("submit and list audits").addHelpText(
6370
5846
  "after",
6371
5847
  `
6372
- ${chalk16.dim("Related skills (run in your AI coding tool):")}
6373
- ${chalk16.dim(" /melt-audit Run a project compliance audit")}
6374
- ${chalk16.dim(" /melt-ux-audit Review UI against usability heuristics")}
6375
- ${chalk16.dim(" /melt-security-audit Run a security posture audit across the platform")}
5848
+ ${chalk15.dim("Related skills (run in your AI coding tool):")}
5849
+ ${chalk15.dim(" /melt-audit Run a project compliance audit")}
5850
+ ${chalk15.dim(" /melt-ux-audit Review UI against usability heuristics")}
5851
+ ${chalk15.dim(" /melt-security-audit Run a security posture audit across the platform")}
6376
5852
  `
6377
5853
  );
6378
5854
  audit.command("submit").description("submit an audit report from a markdown file").argument("[file]", "path to the audit file (auto-detects from .audits/ if omitted)").action(async (file) => {
@@ -6387,8 +5863,8 @@ audit.command("view").description("view a submitted audit by ID (Team Managers o
6387
5863
  var plan = program.command("plan", { hidden: true }).description("submit and list plans").addHelpText(
6388
5864
  "after",
6389
5865
  `
6390
- ${chalk16.dim("Related skill (run in your AI coding tool):")}
6391
- ${chalk16.dim(" /melt-plan Design an implementation approach before writing code")}
5866
+ ${chalk15.dim("Related skill (run in Claude Code):")}
5867
+ ${chalk15.dim(" /melt-dev-plan Design an implementation approach before writing code")}
6392
5868
  `
6393
5869
  );
6394
5870
  plan.command("submit").description("submit or update a plan from a markdown file").argument("[file]", "path to the plan file (auto-detects from .plans/ if omitted)").action(async (file) => {
@@ -6415,6 +5891,6 @@ program.parseAsync(process.argv).catch((error) => {
6415
5891
  const message = error instanceof Error ? error.message : "An unexpected error occurred";
6416
5892
  const commandName = process.argv.slice(2).filter((a) => !a.startsWith("-")).join(" ") || "unknown";
6417
5893
  trackCommand(commandName, false, message);
6418
- console.error(chalk16.red(message));
5894
+ console.error(chalk15.red(message));
6419
5895
  process.exit(1);
6420
5896
  });