impeccable 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.repo.md +2 -4
- package/cli/bin/commands/skills.mjs +47 -226
- package/cli/engine/cli/main.mjs +13 -7
- package/package.json +2 -2
package/README.repo.md
CHANGED
|
@@ -157,16 +157,14 @@ cp -r dist/gemini/.gemini your-project/
|
|
|
157
157
|
```bash
|
|
158
158
|
# Project-local
|
|
159
159
|
cp -r dist/agents/.agents your-project/
|
|
160
|
-
mkdir -p your-project/.codex
|
|
161
|
-
cp -r dist/codex/.codex/agents your-project/.codex/
|
|
162
160
|
|
|
163
161
|
# Or user-wide
|
|
164
162
|
mkdir -p ~/.agents/skills
|
|
165
163
|
cp -r dist/agents/.agents/skills/* ~/.agents/skills/
|
|
166
|
-
mkdir -p ~/.codex
|
|
167
|
-
cp -r dist/codex/.codex/agents ~/.codex/
|
|
168
164
|
```
|
|
169
165
|
|
|
166
|
+
> The asset-producer subagent ships nested inside the skill's own `agents/` folder, which Codex auto-discovers. No separate `.codex/agents/` copy is needed.
|
|
167
|
+
|
|
170
168
|
**GitHub Copilot:**
|
|
171
169
|
```bash
|
|
172
170
|
cp -r dist/github/.github your-project/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { execSync } from 'node:child_process';
|
|
11
|
-
import { existsSync, readFileSync, readdirSync, statSync, lstatSync,
|
|
11
|
+
import { existsSync, readFileSync, readdirSync, statSync, lstatSync, unlinkSync, mkdirSync, writeFileSync, rmSync, renameSync, createWriteStream, realpathSync } from 'node:fs';
|
|
12
12
|
import { join, resolve, dirname } from 'node:path';
|
|
13
13
|
import { createInterface } from 'node:readline';
|
|
14
14
|
import { fileURLToPath } from 'node:url';
|
|
@@ -237,31 +237,6 @@ function isAlreadyInstalled(root) {
|
|
|
237
237
|
return null;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
function escapeRegex(str) {
|
|
241
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
function prefixSkillContent(content, prefix, allSkillNames) {
|
|
245
|
-
// Prefix the name in frontmatter
|
|
246
|
-
let result = content.replace(/^name:\s*(.+)$/m, (_, name) => `name: ${prefix}${name.trim()}`);
|
|
247
|
-
|
|
248
|
-
// Prefix cross-references: /skillname -> /prefix-skillname
|
|
249
|
-
const sorted = [...allSkillNames].sort((a, b) => b.length - a.length);
|
|
250
|
-
for (const name of sorted) {
|
|
251
|
-
// Command invocations: /skillname
|
|
252
|
-
result = result.replace(
|
|
253
|
-
new RegExp(`/(?=${escapeRegex(name)}(?:[^a-zA-Z0-9_-]|$))`, 'g'),
|
|
254
|
-
`/${prefix}`
|
|
255
|
-
);
|
|
256
|
-
// Prose references: "the skillname skill"
|
|
257
|
-
result = result.replace(
|
|
258
|
-
new RegExp(`(the) ${escapeRegex(name)} skill`, 'gi'),
|
|
259
|
-
(_, article) => `${article} ${prefix}${name} skill`
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
return result;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
240
|
function isSkillDir(skillsDir, name) {
|
|
266
241
|
// Skill entries can be real directories or symlinks to directories (npx skills uses symlinks)
|
|
267
242
|
const full = join(skillsDir, name);
|
|
@@ -279,63 +254,40 @@ function isRealSkillDir(skillsDir, name) {
|
|
|
279
254
|
} catch { return false; }
|
|
280
255
|
}
|
|
281
256
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
let
|
|
295
|
-
for (const d of PROVIDER_DIRS) {
|
|
296
|
-
const skillsDir = join(root, d, 'skills');
|
|
297
|
-
if (!existsSync(skillsDir)) continue;
|
|
298
|
-
try {
|
|
299
|
-
const entries = readdirSync(skillsDir);
|
|
300
|
-
for (const name of entries) {
|
|
301
|
-
if (name.startsWith(prefix)) continue;
|
|
302
|
-
if (!isRealSkillDir(skillsDir, name)) continue;
|
|
303
|
-
|
|
304
|
-
const src = join(skillsDir, name);
|
|
305
|
-
const dest = join(skillsDir, prefix + name);
|
|
306
|
-
|
|
307
|
-
renameSync(src, dest);
|
|
308
|
-
|
|
309
|
-
// Prefix frontmatter name + all cross-references in SKILL.md
|
|
310
|
-
let content = readFileSync(join(dest, 'SKILL.md'), 'utf8');
|
|
311
|
-
content = prefixSkillContent(content, prefix, allSkillNames);
|
|
312
|
-
writeFileSync(join(dest, 'SKILL.md'), content);
|
|
313
|
-
count++;
|
|
314
|
-
}
|
|
315
|
-
} catch {}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Third pass: fix symlinks that now point to renamed targets (npx skills uses these)
|
|
257
|
+
/**
|
|
258
|
+
* One-way migration for installs from the era when the CLI offered a command
|
|
259
|
+
* prefix (default `i-`), renaming the skill to e.g. `i-impeccable`. The prefix
|
|
260
|
+
* only earned its keep when every command was its own skill; with a single
|
|
261
|
+
* `impeccable` skill it does nothing, so it is no longer offered. Rename any
|
|
262
|
+
* prefixed impeccable skill back to the canonical `impeccable` (the fresh
|
|
263
|
+
* install/update content lands there next) so users aren't left with a stale,
|
|
264
|
+
* orphaned `i-impeccable` alongside the new one. Scoped to the impeccable skill
|
|
265
|
+
* by name -- never touches third-party skills that happen to start with `i-`.
|
|
266
|
+
* Returns the number of skills migrated.
|
|
267
|
+
*/
|
|
268
|
+
function migrateUnprefixImpeccable(root) {
|
|
269
|
+
let migrated = 0;
|
|
319
270
|
for (const d of PROVIDER_DIRS) {
|
|
320
271
|
const skillsDir = join(root, d, 'skills');
|
|
321
272
|
if (!existsSync(skillsDir)) continue;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
273
|
+
let entries;
|
|
274
|
+
try { entries = readdirSync(skillsDir); } catch { continue; }
|
|
275
|
+
for (const name of entries) {
|
|
276
|
+
// A prefixed impeccable skill is `<prefix>impeccable` -- not the canonical
|
|
277
|
+
// `impeccable`, and not the legacy `teach-impeccable` (cleanup handles that).
|
|
278
|
+
if (name === 'impeccable' || name === 'teach-impeccable') continue;
|
|
279
|
+
if (!name.endsWith('-impeccable')) continue;
|
|
280
|
+
if (!isRealSkillDir(skillsDir, name)) continue;
|
|
281
|
+
|
|
282
|
+
const dest = join(skillsDir, 'impeccable');
|
|
283
|
+
try {
|
|
284
|
+
rmSync(dest, { recursive: true, force: true });
|
|
285
|
+
renameSync(join(skillsDir, name), dest);
|
|
286
|
+
migrated++;
|
|
287
|
+
} catch {}
|
|
288
|
+
}
|
|
336
289
|
}
|
|
337
|
-
|
|
338
|
-
return count;
|
|
290
|
+
return migrated;
|
|
339
291
|
}
|
|
340
292
|
|
|
341
293
|
/**
|
|
@@ -398,40 +350,9 @@ function copyProviderSkills(bundleDir, root, targets) {
|
|
|
398
350
|
return written;
|
|
399
351
|
}
|
|
400
352
|
|
|
401
|
-
/**
|
|
402
|
-
* Codex reads custom subagents from `.codex/agents/*.toml`, a sibling of the
|
|
403
|
-
* skill dir that the skills/ copy never touches. Treat it as a sidecar: only
|
|
404
|
-
* write it for projects that actually use Codex, so a pure Claude project
|
|
405
|
-
* doesn't get a stray `.codex/` folder. Codex-likely = the .agents (Codex
|
|
406
|
-
* skills) variant is a target, or a global ~/.codex install exists.
|
|
407
|
-
*/
|
|
408
|
-
function isCodexLikely(targets) {
|
|
409
|
-
return targets.includes('.agents') || existsSync(join(homedir(), '.codex'));
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Copy the Codex subagent definitions from the bundle's top-level `.codex/agents`
|
|
414
|
-
* into the project's `.codex/agents`. Returns the number of files written (0 when
|
|
415
|
-
* the bundle has none).
|
|
416
|
-
*/
|
|
417
|
-
function installCodexAgents(bundleDir, root) {
|
|
418
|
-
const srcDir = join(bundleDir, '.codex', 'agents');
|
|
419
|
-
if (!existsSync(srcDir)) return 0;
|
|
420
|
-
const destDir = join(root, '.codex', 'agents');
|
|
421
|
-
let written = 0;
|
|
422
|
-
for (const entry of readdirSync(srcDir, { withFileTypes: true })) {
|
|
423
|
-
if (!entry.isFile()) continue;
|
|
424
|
-
mkdirSync(destDir, { recursive: true });
|
|
425
|
-
writeFileSync(join(destDir, entry.name), readFileSync(join(srcDir, entry.name)));
|
|
426
|
-
written++;
|
|
427
|
-
}
|
|
428
|
-
return written;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
353
|
async function install(flags) {
|
|
432
354
|
const force = flags.includes('--force');
|
|
433
355
|
const yes = flags.includes('-y') || flags.includes('--yes');
|
|
434
|
-
const prefixFlag = flags.find(f => f.startsWith('--prefix='));
|
|
435
356
|
const providersFlag = flags.find(f => f.startsWith('--providers='));
|
|
436
357
|
const root = findProjectRoot();
|
|
437
358
|
const existing = isAlreadyInstalled(root);
|
|
@@ -472,16 +393,13 @@ async function install(flags) {
|
|
|
472
393
|
process.exit(1);
|
|
473
394
|
}
|
|
474
395
|
|
|
396
|
+
// Retire any old `i-`-prefixed install so the fresh copy lands on the
|
|
397
|
+
// canonical `impeccable` dir instead of orphaning the prefixed one.
|
|
398
|
+
migrateUnprefixImpeccable(root);
|
|
399
|
+
|
|
475
400
|
let written = 0;
|
|
476
|
-
let codexAgents = 0;
|
|
477
401
|
try {
|
|
478
402
|
written = copyProviderSkills(bundleDir, root, targets);
|
|
479
|
-
// Codex users also need the asset-producer subagent, which lives in
|
|
480
|
-
// .codex/agents/ (a sibling of the skill dir, not part of skills/). Do this
|
|
481
|
-
// before the bundle is cleaned up below. Best-effort: never fail the install.
|
|
482
|
-
if (isCodexLikely(targets)) {
|
|
483
|
-
try { codexAgents = installCodexAgents(bundleDir, root); } catch {}
|
|
484
|
-
}
|
|
485
403
|
} catch (e) {
|
|
486
404
|
rmSync(bundleDir, { recursive: true, force: true });
|
|
487
405
|
console.error(`Install failed: ${e.message}`);
|
|
@@ -494,28 +412,6 @@ async function install(flags) {
|
|
|
494
412
|
process.exit(1);
|
|
495
413
|
}
|
|
496
414
|
console.log(`Installed impeccable into: ${targets.join(', ')}`);
|
|
497
|
-
if (codexAgents > 0) console.log(`Installed ${codexAgents} Codex subagent(s) into .codex/agents/`);
|
|
498
|
-
|
|
499
|
-
// Ask about prefixing (skip in CI mode unless --prefix= is set)
|
|
500
|
-
let prefix = '';
|
|
501
|
-
if (prefixFlag) {
|
|
502
|
-
prefix = prefixFlag.split('=')[1] || 'i-';
|
|
503
|
-
} else if (!yes) {
|
|
504
|
-
console.log();
|
|
505
|
-
const wantPrefix = await ask('Prefix commands to avoid conflicts? e.g. /i-audit instead of /audit (y/N) ');
|
|
506
|
-
if (wantPrefix === 'y' || wantPrefix === 'yes') {
|
|
507
|
-
const custom = await ask('Prefix (default: i-): ');
|
|
508
|
-
prefix = custom || 'i-';
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
if (prefix) {
|
|
513
|
-
const count = renameSkillsWithPrefix(root, prefix);
|
|
514
|
-
if (count > 0) {
|
|
515
|
-
console.log(`\nRenamed ${count} skills with "${prefix}" prefix.`);
|
|
516
|
-
console.log(`Commands are now available as /${prefix}<command> (e.g. /${prefix}audit).`);
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
415
|
|
|
520
416
|
// Clean up deprecated skills from previous versions
|
|
521
417
|
try {
|
|
@@ -529,71 +425,7 @@ async function install(flags) {
|
|
|
529
425
|
// Cleanup script not available -- skip
|
|
530
426
|
}
|
|
531
427
|
|
|
532
|
-
console.log(
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
/** Detect prefix by looking for the 'impeccable' skill (or legacy 'teach-impeccable') */
|
|
536
|
-
function detectPrefix(root) {
|
|
537
|
-
for (const d of PROVIDER_DIRS) {
|
|
538
|
-
const skillsDir = join(root, d, 'skills');
|
|
539
|
-
if (!existsSync(skillsDir)) continue;
|
|
540
|
-
for (const name of readdirSync(skillsDir)) {
|
|
541
|
-
if (name === 'impeccable') return '';
|
|
542
|
-
if (name.endsWith('-impeccable') && name !== 'teach-impeccable') return name.slice(0, -'impeccable'.length);
|
|
543
|
-
// Legacy fallback
|
|
544
|
-
if (name === 'teach-impeccable') return '';
|
|
545
|
-
if (name.endsWith('-teach-impeccable')) return name.slice(0, -'teach-impeccable'.length);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
return '';
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/** Undo prefixing: rename folders back and strip prefix from SKILL.md content */
|
|
552
|
-
function undoPrefix(root, prefix) {
|
|
553
|
-
if (!prefix) return;
|
|
554
|
-
// Collect the unprefixed names (strip our prefix)
|
|
555
|
-
let allPrefixedNames = [];
|
|
556
|
-
for (const d of PROVIDER_DIRS) {
|
|
557
|
-
const skillsDir = join(root, d, 'skills');
|
|
558
|
-
if (!existsSync(skillsDir)) continue;
|
|
559
|
-
allPrefixedNames = readdirSync(skillsDir).filter(n => n.startsWith(prefix) && isRealSkillDir(skillsDir, n));
|
|
560
|
-
if (allPrefixedNames.length > 0) break;
|
|
561
|
-
}
|
|
562
|
-
const unprefixedNames = allPrefixedNames.map(n => n.slice(prefix.length));
|
|
563
|
-
|
|
564
|
-
for (const d of PROVIDER_DIRS) {
|
|
565
|
-
const skillsDir = join(root, d, 'skills');
|
|
566
|
-
if (!existsSync(skillsDir)) continue;
|
|
567
|
-
for (const name of readdirSync(skillsDir)) {
|
|
568
|
-
if (!name.startsWith(prefix)) continue;
|
|
569
|
-
const unprefixed = name.slice(prefix.length);
|
|
570
|
-
const src = join(skillsDir, name);
|
|
571
|
-
const dest = join(skillsDir, unprefixed);
|
|
572
|
-
|
|
573
|
-
if (lstatSync(src).isSymbolicLink()) {
|
|
574
|
-
const target = readlinkSync(src);
|
|
575
|
-
const newTarget = target.replace(`/${name}`, `/${unprefixed}`);
|
|
576
|
-
unlinkSync(src);
|
|
577
|
-
symlinkSync(newTarget, dest);
|
|
578
|
-
} else {
|
|
579
|
-
renameSync(src, dest);
|
|
580
|
-
// Strip prefix from SKILL.md content
|
|
581
|
-
const skillMd = join(dest, 'SKILL.md');
|
|
582
|
-
if (existsSync(skillMd)) {
|
|
583
|
-
let content = readFileSync(skillMd, 'utf8');
|
|
584
|
-
// Reverse the prefixing: replace prefixed names with unprefixed
|
|
585
|
-
content = content.replace(new RegExp(`^name:\\s*${escapeRegex(prefix)}`, 'm'), 'name: ');
|
|
586
|
-
const sorted = [...allPrefixedNames].sort((a, b) => b.length - a.length);
|
|
587
|
-
for (const pName of sorted) {
|
|
588
|
-
const uName = pName.slice(prefix.length);
|
|
589
|
-
content = content.replace(new RegExp(`/${escapeRegex(pName)}(?=[^a-zA-Z0-9_-]|$)`, 'g'), `/${uName}`);
|
|
590
|
-
content = content.replace(new RegExp(`(the) ${escapeRegex(pName)} skill`, 'gi'), `$1 ${uName} skill`);
|
|
591
|
-
}
|
|
592
|
-
writeFileSync(skillMd, content);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
428
|
+
console.log('\nDone! Run /impeccable init in your AI harness to set up design context.\n');
|
|
597
429
|
}
|
|
598
430
|
|
|
599
431
|
// ─── skills update ────────────────────────────────────────────────────────────
|
|
@@ -703,18 +535,9 @@ async function update(flags = []) {
|
|
|
703
535
|
|
|
704
536
|
// Compare local vs remote -- skip if already up to date
|
|
705
537
|
if (isUpToDate(root, providers, tmpDir)) {
|
|
706
|
-
// Skills match, but the Codex subagent sidecar may still be missing (e.g.
|
|
707
|
-
// an `npx skills add` install that only carried skills/). Heal it before
|
|
708
|
-
// declaring nothing to do.
|
|
709
|
-
let healed = 0;
|
|
710
|
-
if (isCodexLikely(providers)
|
|
711
|
-
&& !existsSync(join(root, '.codex', 'agents', 'impeccable_asset_producer.toml'))) {
|
|
712
|
-
try { healed = installCodexAgents(tmpDir, root); } catch {}
|
|
713
|
-
}
|
|
714
538
|
rmSync(tmpDir, { recursive: true, force: true });
|
|
715
539
|
const v = getSkillsVersion(root);
|
|
716
|
-
|
|
717
|
-
console.log(`Skills are up to date${v ? ` (v${v})` : ''}.${healed > 0 ? '' : ' Nothing to do.'}`);
|
|
540
|
+
console.log(`Skills are up to date${v ? ` (v${v})` : ''}. Nothing to do.`);
|
|
718
541
|
process.exit(0);
|
|
719
542
|
}
|
|
720
543
|
|
|
@@ -731,6 +554,11 @@ async function update(flags = []) {
|
|
|
731
554
|
|
|
732
555
|
try {
|
|
733
556
|
|
|
557
|
+
// Retire any old `i-`-prefixed install up front so the refresh lands on the
|
|
558
|
+
// canonical `impeccable` dir rather than orphaning the prefixed copy.
|
|
559
|
+
const migrated = migrateUnprefixImpeccable(root);
|
|
560
|
+
if (migrated > 0) console.log('Migrated a prefixed install back to /impeccable (the i- prefix is no longer used).');
|
|
561
|
+
|
|
734
562
|
// Copy from the bundle to each unique provider folder.
|
|
735
563
|
// Deduplicate so symlinked dirs (e.g. .claude/skills -> .agents/skills)
|
|
736
564
|
// are only written once with the correct provider's content.
|
|
@@ -751,20 +579,8 @@ async function update(flags = []) {
|
|
|
751
579
|
}
|
|
752
580
|
}
|
|
753
581
|
|
|
754
|
-
// Refresh the Codex subagent sidecar (.codex/agents/) alongside the skills.
|
|
755
|
-
if (isCodexLikely(providers)) {
|
|
756
|
-
try { installCodexAgents(tmpDir, root); } catch {}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
582
|
rmSync(tmpDir, { recursive: true, force: true });
|
|
760
583
|
|
|
761
|
-
// Re-apply prefix if detected
|
|
762
|
-
const prefix = detectPrefix(root);
|
|
763
|
-
if (prefix) {
|
|
764
|
-
const count = renameSkillsWithPrefix(root, prefix);
|
|
765
|
-
if (count > 0) console.log(`Re-applied "${prefix}" prefix to ${count} skills.`);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
584
|
// Run cleanup to remove deprecated stubs from the fresh download
|
|
769
585
|
try {
|
|
770
586
|
const { cleanup: postCleanup } = await import('../../../skill/scripts/cleanup-deprecated.mjs');
|
|
@@ -796,6 +612,11 @@ function copyDirSync(src, dest) {
|
|
|
796
612
|
}
|
|
797
613
|
}
|
|
798
614
|
|
|
615
|
+
// ─── Test surface ───────────────────────────────────────────────────────────
|
|
616
|
+
// Exported so the test suite exercises the real implementation rather than a
|
|
617
|
+
// reimplementation in a helper script (which is how bugs slip through).
|
|
618
|
+
export { migrateUnprefixImpeccable };
|
|
619
|
+
|
|
799
620
|
// ─── Router ───────────────────────────────────────────────────────────────────
|
|
800
621
|
|
|
801
622
|
export async function run(args) {
|
package/cli/engine/cli/main.mjs
CHANGED
|
@@ -79,7 +79,6 @@ function printUsage() {
|
|
|
79
79
|
Scan files or URLs for UI anti-patterns and design quality issues.
|
|
80
80
|
|
|
81
81
|
Options:
|
|
82
|
-
--fast Regex-only mode (skip static HTML/CSS analysis, faster but misses linked stylesheets)
|
|
83
82
|
--json Output results as JSON
|
|
84
83
|
--gpt Also report GPT-specific provider tells (off by default)
|
|
85
84
|
--gemini Also report Gemini-specific provider tells (off by default)
|
|
@@ -89,13 +88,12 @@ Detection modes:
|
|
|
89
88
|
HTML files Static HTML/CSS analysis (default, catches linked CSS)
|
|
90
89
|
Non-HTML files Regex pattern matching (CSS, JSX, TSX, etc.)
|
|
91
90
|
URLs Puppeteer full browser rendering (auto-detected)
|
|
92
|
-
--fast Forces regex for all files
|
|
93
91
|
|
|
94
92
|
Examples:
|
|
95
93
|
impeccable detect src/
|
|
96
94
|
impeccable detect index.html
|
|
97
95
|
impeccable detect https://example.com
|
|
98
|
-
impeccable detect --
|
|
96
|
+
impeccable detect --json .`);
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
async function detectCli() {
|
|
@@ -107,7 +105,15 @@ async function detectCli() {
|
|
|
107
105
|
if (args[0] === 'detect') args = args.slice(1);
|
|
108
106
|
const jsonMode = args.includes('--json');
|
|
109
107
|
const helpMode = args.includes('--help');
|
|
110
|
-
|
|
108
|
+
// --fast (regex-only) is deprecated: since the jsdom removal, the static
|
|
109
|
+
// HTML/CSS analysis is fast and covers every rule, so the regex-only path
|
|
110
|
+
// only loses coverage for no real speed win. Accept the flag for back-compat
|
|
111
|
+
// but ignore it and run the full scan.
|
|
112
|
+
if (args.includes('--fast')) {
|
|
113
|
+
process.stderr.write(
|
|
114
|
+
'Note: --fast is deprecated and ignored. The full scan is fast now and runs every rule.\n',
|
|
115
|
+
);
|
|
116
|
+
}
|
|
111
117
|
const providers = [];
|
|
112
118
|
if (args.includes('--gpt')) providers.push('gpt');
|
|
113
119
|
if (args.includes('--gemini')) providers.push('gemini');
|
|
@@ -177,7 +183,7 @@ async function detectCli() {
|
|
|
177
183
|
process.stderr.write(
|
|
178
184
|
`\nFound ${files.length} files (${htmlCount} HTML) in ${target}.\n` +
|
|
179
185
|
`Scanning may take a while${htmlCount > 10 ? ' (static HTML/CSS processes each HTML file individually)' : ''}.\n` +
|
|
180
|
-
`
|
|
186
|
+
`Target a specific subdirectory to narrow scope.\n`
|
|
181
187
|
);
|
|
182
188
|
const ok = await confirm('Continue?');
|
|
183
189
|
if (!ok) { process.stderr.write('Aborted.\n'); process.exit(0); }
|
|
@@ -197,7 +203,7 @@ async function detectCli() {
|
|
|
197
203
|
for (const file of files) {
|
|
198
204
|
const ext = path.extname(file).toLowerCase();
|
|
199
205
|
let fileFindings;
|
|
200
|
-
if (
|
|
206
|
+
if (HTML_EXTENSIONS.has(ext)) {
|
|
201
207
|
fileFindings = await detectHtml(file, scanOptions);
|
|
202
208
|
} else {
|
|
203
209
|
fileFindings = detectText(fs.readFileSync(file, 'utf-8'), file, scanOptions);
|
|
@@ -214,7 +220,7 @@ async function detectCli() {
|
|
|
214
220
|
}
|
|
215
221
|
} else if (stat.isFile()) {
|
|
216
222
|
const ext = path.extname(resolved).toLowerCase();
|
|
217
|
-
if (
|
|
223
|
+
if (HTML_EXTENSIONS.has(ext)) {
|
|
218
224
|
allFindings.push(...await detectHtml(resolved, scanOptions));
|
|
219
225
|
} else {
|
|
220
226
|
allFindings.push(...detectText(fs.readFileSync(resolved, 'utf-8'), resolved, scanOptions));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impeccable",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"author": "Paul Bakaus",
|
|
5
5
|
"description": "Design skills, commands, and anti-pattern detection for AI coding agents",
|
|
6
6
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dev": "npx astro dev",
|
|
51
51
|
"preview": "bun run build && npx astro preview",
|
|
52
52
|
"deploy": "bun run build && wrangler pages deploy build/",
|
|
53
|
-
"test": "bun test tests/build.test.js tests/detect-antipatterns.test.js tests/windows-path-fix.test.js tests/lib/detector-bundle.test.js tests/lib/provider-blocks.test.js tests/lib/transformers/provider-blocks.test.js tests/lib/utils.test.js tests/lib/transformers/factory.test.js tests/lib/transformers/providers.test.js tests/skills-cli.test.js && node --test tests/critique-storage.test.mjs && node --test tests/detect-antipatterns-fixtures.test.mjs && node --test tests/detect-antipatterns-browser.test.mjs && node --test tests/cleanup-deprecated.test.mjs && node --test tests/impeccable-paths.test.mjs && node --test tests/live-wrap.test.mjs && node --test tests/live-insert.test.mjs && node --test tests/live-insert-ui.test.mjs && node --test tests/live-event-validation.test.mjs && node --test tests/live-reference.test.mjs && node --test tests/live-e2e-agent-output.test.mjs && node --test tests/live-e2e-llm-agent.test.mjs && node --test tests/live-e2e-cli-options.test.mjs && node --test tests/live-accept.test.mjs && node --test tests/live-inject.test.mjs && node --test tests/live-poll.test.mjs && node --test tests/live-poll-stream.test.mjs && node --test tests/live-server.test.mjs && node --test tests/live-browser-regression.test.mjs && node --test tests/live-session-store.test.mjs && node --test tests/live-browser-session.test.mjs && node --test tests/live-browser-source.test.mjs && node --test tests/live-completion.test.mjs && node --test tests/live-recovery-commands.test.mjs && node --test tests/framework-fixtures.test.mjs",
|
|
53
|
+
"test": "bun test tests/build.test.js tests/detect-antipatterns.test.js tests/windows-path-fix.test.js tests/lib/detector-bundle.test.js tests/lib/provider-blocks.test.js tests/lib/transformers/provider-blocks.test.js tests/lib/utils.test.js tests/lib/transformers/factory.test.js tests/lib/transformers/providers.test.js tests/skills-cli.test.js && node --test tests/critique-storage.test.mjs && node --test tests/detect-antipatterns-fixtures.test.mjs && node --test tests/detect-antipatterns-browser.test.mjs && node --test tests/cleanup-deprecated.test.mjs && node --test tests/impeccable-paths.test.mjs && node --test tests/live-wrap.test.mjs && node --test tests/live-wrap-buffer-aware.test.mjs && node --test tests/live-insert.test.mjs && node --test tests/live-insert-ui.test.mjs && node --test tests/live-event-validation.test.mjs && node --test tests/live-reference.test.mjs && node --test tests/live-e2e-agent-output.test.mjs && node --test tests/live-e2e-llm-agent.test.mjs && node --test tests/live-e2e-cli-options.test.mjs && node --test tests/live-accept.test.mjs && node --test tests/live-accept-scrub.test.mjs && node --test tests/live-commit-manual-edits.test.mjs && node --test tests/live-discard-manual-edits.test.mjs && node --test tests/live-manual-edits-buffer.test.mjs && node --test tests/live-inject.test.mjs && node --test tests/live-poll.test.mjs && node --test tests/live-poll-stream.test.mjs && node --test tests/live-server.test.mjs && node --test tests/live-copy-edit-agent.test.mjs && node --test tests/live-browser-regression.test.mjs && node --test tests/live-session-store.test.mjs && node --test tests/live-browser-session.test.mjs && node --test tests/live-browser-source.test.mjs && node --test tests/live-completion.test.mjs && node --test tests/live-recovery-commands.test.mjs && node --test tests/framework-fixtures.test.mjs",
|
|
54
54
|
"test:cli-e2e": "IMPECCABLE_CLI_E2E=1 bun test tests/skills-cli.test.js",
|
|
55
55
|
"test:live-e2e": "node --test --test-timeout=600000 tests/live-e2e.test.mjs",
|
|
56
56
|
"test:live-e2e-agent": "node --test tests/live-e2e/agent-insert.test.mjs",
|