@meltstudio/meltctl 4.27.0 → 4.28.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.
@@ -4,7 +4,12 @@ import path from 'path';
4
4
  import { getToken, tokenFetch } from '../utils/api.js';
5
5
  import { getGitBranch, getGitCommit, getGitRepository, getProjectName, findMdFiles, } from '../utils/git.js';
6
6
  function detectAuditType(filename) {
7
- return filename.toLowerCase().includes('ux-audit') ? 'ux-audit' : 'audit';
7
+ const lower = filename.toLowerCase();
8
+ if (lower.includes('security-audit'))
9
+ return 'security-audit';
10
+ if (lower.includes('ux-audit'))
11
+ return 'ux-audit';
12
+ return 'audit';
8
13
  }
9
14
  async function autoDetectAuditFile() {
10
15
  const cwd = process.cwd();
@@ -13,7 +18,7 @@ async function autoDetectAuditFile() {
13
18
  if (auditFiles.length > 0) {
14
19
  return auditFiles[0] ?? null;
15
20
  }
16
- const candidates = ['AUDIT.md', 'UX-AUDIT.md'];
21
+ const candidates = ['AUDIT.md', 'UX-AUDIT.md', 'SECURITY-AUDIT.md'];
17
22
  for (const name of candidates) {
18
23
  const filePath = path.join(cwd, name);
19
24
  if (await fs.pathExists(filePath)) {
@@ -111,6 +116,7 @@ export async function auditListCommand(options) {
111
116
  const typeLabels = {
112
117
  audit: 'Tech Audit',
113
118
  'ux-audit': 'UX Audit',
119
+ 'security-audit': 'Security',
114
120
  };
115
121
  if (options.latest) {
116
122
  console.log(chalk.bold(`\n Latest Audits (${body.count}):\n`));
@@ -126,9 +132,24 @@ export async function auditListCommand(options) {
126
132
  });
127
133
  const repo = r.repository ?? r.project;
128
134
  const label = typeLabels[r.type] ?? r.type;
129
- const typeColor = r.type === 'ux-audit' ? chalk.yellow : chalk.magenta;
135
+ const typeColor = r.type === 'ux-audit'
136
+ ? chalk.yellow
137
+ : r.type === 'security-audit'
138
+ ? chalk.red
139
+ : chalk.magenta;
130
140
  const ageText = daysAgo === 0 ? 'today' : `${daysAgo}d ago`;
131
- const ageColor = daysAgo <= 7 ? chalk.green : daysAgo <= 30 ? chalk.yellow : chalk.red;
141
+ const isSecurityAudit = r.type === 'security-audit';
142
+ const ageColor = isSecurityAudit
143
+ ? daysAgo <= 30
144
+ ? chalk.green
145
+ : daysAgo <= 90
146
+ ? chalk.yellow
147
+ : chalk.red
148
+ : daysAgo <= 7
149
+ ? chalk.green
150
+ : daysAgo <= 30
151
+ ? chalk.yellow
152
+ : chalk.red;
132
153
  console.log(` ${typeColor(label.padEnd(12))} ${chalk.white(repo.padEnd(40))} ${ageColor(ageText.padEnd(10))} ${chalk.dim(r.author.padEnd(30))} ${chalk.dim(date)}`);
133
154
  }
134
155
  }
@@ -147,7 +168,11 @@ export async function auditListCommand(options) {
147
168
  });
148
169
  const repo = r.repository ?? r.project;
149
170
  const label = typeLabels[r.type] ?? r.type;
150
- const typeColor = r.type === 'ux-audit' ? chalk.yellow : chalk.magenta;
171
+ const typeColor = r.type === 'ux-audit'
172
+ ? chalk.yellow
173
+ : r.type === 'security-audit'
174
+ ? chalk.red
175
+ : chalk.magenta;
151
176
  console.log(` ${typeColor(label.padEnd(12))} ${chalk.white(repo.padEnd(40))} ${chalk.dim(r.author.padEnd(30))} ${chalk.dim(date)}`);
152
177
  if (r.branch && r.branch !== 'main') {
153
178
  console.log(` ${' '.padEnd(12)} ${chalk.dim(`branch: ${r.branch} commit: ${r.commit ?? 'N/A'}`)}`);
@@ -75,6 +75,17 @@ description: >-
75
75
  plan, scopes to the current feature and appends results to the plan file.
76
76
  ---
77
77
 
78
+ `,
79
+ 'security-audit': `---
80
+ user-invocable: true
81
+ description: >-
82
+ Run a comprehensive security posture audit across the entire platform.
83
+ Use when the developer wants to assess security, says "security audit",
84
+ or "check our security posture". Covers infrastructure, encryption, auth,
85
+ application security, data protection, CI/CD, and compliance readiness.
86
+ Investigates all platform repositories for a holistic view.
87
+ ---
88
+
78
89
  `,
79
90
  validate: `---
80
91
  user-invocable: true
@@ -143,6 +154,11 @@ description: Run a comprehensive project compliance audit against team standards
143
154
  description: Review the project's UI against usability heuristics using Chrome DevTools MCP.
144
155
  ---
145
156
 
157
+ `,
158
+ 'security-audit': `---
159
+ description: Run a comprehensive security posture audit across the entire platform.
160
+ ---
161
+
146
162
  `,
147
163
  validate: `---
148
164
  description: Run the validation plan from the plan document after implementation.
@@ -302,6 +318,7 @@ export async function initCommand(options) {
302
318
  'debug',
303
319
  'audit',
304
320
  'ux-audit',
321
+ 'security-audit',
305
322
  'update',
306
323
  'help',
307
324
  ];
@@ -336,7 +353,7 @@ export async function initCommand(options) {
336
353
  await fs.writeFile(path.join(skillDir, 'SKILL.md'), skillContent, 'utf-8');
337
354
  }
338
355
  }
339
- createdFiles.push('.claude/skills/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,update,help}/SKILL.md');
356
+ createdFiles.push('.claude/skills/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,security-audit,update,help}/SKILL.md');
340
357
  }
341
358
  // Cursor files
342
359
  if (tools.cursor) {
@@ -347,7 +364,7 @@ export async function initCommand(options) {
347
364
  await fs.writeFile(path.join(cwd, `.cursor/commands/melt-${name}.md`), workflowContent, 'utf-8');
348
365
  }
349
366
  }
350
- createdFiles.push('.cursor/commands/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,update,help}.md');
367
+ createdFiles.push('.cursor/commands/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,security-audit,update,help}.md');
351
368
  }
352
369
  // OpenCode files
353
370
  if (tools.opencode) {
@@ -359,7 +376,7 @@ export async function initCommand(options) {
359
376
  await fs.writeFile(path.join(cwd, `.opencode/commands/melt-${name}.md`), commandContent, 'utf-8');
360
377
  }
361
378
  }
362
- createdFiles.push('.opencode/commands/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,update,help}.md');
379
+ createdFiles.push('.opencode/commands/melt-{setup,plan,validate,review,pr,debug,audit,ux-audit,security-audit,update,help}.md');
363
380
  }
364
381
  // Print summary
365
382
  console.log(chalk.green('Created files:'));
@@ -371,7 +388,7 @@ export async function initCommand(options) {
371
388
  console.log(chalk.cyan('Want support for your tool? Let us know in #dev on Slack'));
372
389
  console.log();
373
390
  }
374
- const commandNames = 'melt-setup, melt-plan, melt-validate, melt-review, melt-pr, melt-debug, melt-audit, melt-ux-audit, melt-update, melt-help';
391
+ 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';
375
392
  if (tools.claude) {
376
393
  console.log(chalk.dim(`Available skills: /${commandNames.replace(/, /g, ', /')}`));
377
394
  }
package/dist/index.js CHANGED
@@ -102,7 +102,7 @@ audit
102
102
  audit
103
103
  .command('list')
104
104
  .description('list submitted audits (Team Managers only)')
105
- .option('--type <type>', 'filter by type (audit, ux-audit)')
105
+ .option('--type <type>', 'filter by type (audit, ux-audit, security-audit)')
106
106
  .option('--repository <repo>', 'filter by repository (owner/repo)')
107
107
  .option('--latest', 'show only the latest audit per project and type')
108
108
  .option('--limit <n>', 'max results (default 50, max 200)')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.27.0",
3
+ "version": "4.28.0",
4
4
  "description": "AI-first development tools for teams - set up AGENTS.md, Claude Code, Cursor, and OpenCode standards",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",