impeccable 2.3.0 → 2.3.1

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 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/
@@ -398,36 +398,6 @@ function copyProviderSkills(bundleDir, root, targets) {
398
398
  return written;
399
399
  }
400
400
 
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
401
  async function install(flags) {
432
402
  const force = flags.includes('--force');
433
403
  const yes = flags.includes('-y') || flags.includes('--yes');
@@ -473,15 +443,8 @@ async function install(flags) {
473
443
  }
474
444
 
475
445
  let written = 0;
476
- let codexAgents = 0;
477
446
  try {
478
447
  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
448
  } catch (e) {
486
449
  rmSync(bundleDir, { recursive: true, force: true });
487
450
  console.error(`Install failed: ${e.message}`);
@@ -494,7 +457,6 @@ async function install(flags) {
494
457
  process.exit(1);
495
458
  }
496
459
  console.log(`Installed impeccable into: ${targets.join(', ')}`);
497
- if (codexAgents > 0) console.log(`Installed ${codexAgents} Codex subagent(s) into .codex/agents/`);
498
460
 
499
461
  // Ask about prefixing (skip in CI mode unless --prefix= is set)
500
462
  let prefix = '';
@@ -703,18 +665,9 @@ async function update(flags = []) {
703
665
 
704
666
  // Compare local vs remote -- skip if already up to date
705
667
  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
668
  rmSync(tmpDir, { recursive: true, force: true });
715
669
  const v = getSkillsVersion(root);
716
- if (healed > 0) console.log(`Installed ${healed} Codex subagent(s) into .codex/agents/`);
717
- console.log(`Skills are up to date${v ? ` (v${v})` : ''}.${healed > 0 ? '' : ' Nothing to do.'}`);
670
+ console.log(`Skills are up to date${v ? ` (v${v})` : ''}. Nothing to do.`);
718
671
  process.exit(0);
719
672
  }
720
673
 
@@ -751,11 +704,6 @@ async function update(flags = []) {
751
704
  }
752
705
  }
753
706
 
754
- // Refresh the Codex subagent sidecar (.codex/agents/) alongside the skills.
755
- if (isCodexLikely(providers)) {
756
- try { installCodexAgents(tmpDir, root); } catch {}
757
- }
758
-
759
707
  rmSync(tmpDir, { recursive: true, force: true });
760
708
 
761
709
  // Re-apply prefix if detected
@@ -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 --fast --json .`);
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
- const fastMode = args.includes('--fast');
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
- `Use --fast to skip static HTML/CSS analysis, or target a specific subdirectory.\n`
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 (!fastMode && HTML_EXTENSIONS.has(ext)) {
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 (!fastMode && HTML_EXTENSIONS.has(ext)) {
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.0",
3
+ "version": "2.3.1",
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",