Skip to content

krusty93/relego / .agents/skills/impeccable

impeccable

Flagged

Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.

FileKindSize
SKILL.mdskill md10.4 KB
agents/impeccable_asset_producer.tomlconfig9.7 KB
agents/impeccable_documenter.tomlconfig3.2 KB
agents/impeccable_finish_reviewer.tomlconfig13.5 KB
agents/impeccable_manual_edit_applier.tomlconfig6.9 KB
agents/openai.yamlconfig235 B
reference/adapt.mdmarkdown10.1 KB
reference/adapt.native.mdmarkdown3.8 KB
reference/android.mdmarkdown4.0 KB
reference/animate.mdmarkdown5.1 KB
reference/audit.mdmarkdown7.7 KB
reference/audit.native.mdmarkdown8.2 KB
reference/bolder.mdmarkdown3.5 KB
reference/clarify.mdmarkdown4.5 KB
reference/colorize.mdmarkdown4.4 KB
reference/craft-floor.mdmarkdown5.4 KB
reference/craft.mdmarkdown555 B
reference/critique.mdmarkdown44.6 KB
reference/degraded/asset-producer.mdmarkdown9.9 KB
reference/degraded/documenter.mdmarkdown3.3 KB
reference/degraded/finish-reviewer.mdmarkdown13.6 KB
reference/degraded/manual-edit-applier.mdmarkdown7.0 KB
reference/delight.mdmarkdown3.6 KB
reference/distill.mdmarkdown5.6 KB
reference/doctor.mdmarkdown5.3 KB
reference/document.mdmarkdown26.9 KB
reference/extract.mdmarkdown3.4 KB
reference/harden.mdmarkdown8.3 KB
reference/hooks.mdmarkdown12.8 KB
reference/init.mdmarkdown11.2 KB
reference/ios.mdmarkdown3.7 KB
reference/layout.mdmarkdown5.0 KB
reference/live-setup.mdmarkdown7.2 KB
reference/live.mdmarkdown35.0 KB
reference/new-work.mdmarkdown43.1 KB
reference/onboard.mdmarkdown7.6 KB
reference/operate.mdmarkdown4.0 KB
reference/optimize.mdmarkdown7.4 KB
reference/overdrive.mdmarkdown9.0 KB
reference/polish.mdmarkdown5.5 KB
reference/quieter.mdmarkdown4.8 KB
reference/routing.mdmarkdown2.8 KB
reference/shape.mdmarkdown3.5 KB
reference/typeset.mdmarkdown5.1 KB
reference/visualize.mdmarkdown16.3 KB
scripts/command-metadata.jsonconfig7.7 KB
scripts/concept-seed.mjsscript38.7 KB
scripts/context-signals.mjsscript13.7 KB
scripts/context.mjsscript63.6 KB
scripts/critique-storage.mjsscript8.3 KB
scripts/detect-csp.mjsscript6.6 KB
scripts/detect.mjsscript620 B
scripts/detector/browser/injected/index.mjsscript89.0 KB
scripts/detector/cli/main.mjsscript18.5 KB
scripts/detector/design-system.mjsscript48.5 KB
scripts/detector/detect-antipatterns-browser.jsscript388.1 KB
scripts/detector/detect-antipatterns.mjsscript1.8 KB
scripts/detector/engines/browser/detect-url.mjsscript15.8 KB
scripts/detector/engines/regex/detect-text.mjsscript52.1 KB
scripts/detector/engines/static-html/css-cascade.mjsscript44.9 KB
scripts/detector/engines/static-html/detect-html.mjsscript13.0 KB
scripts/detector/engines/visual/screenshot-contrast.mjsscript6.4 KB
scripts/detector/findings.mjsscript766 B
scripts/detector/node/file-system.mjsscript7.6 KB
scripts/detector/profile/profiler.mjsscript4.4 KB
scripts/detector/registry/antipatterns.mjsscript27.2 KB
scripts/detector/rules/checks.mjsscript248.7 KB
scripts/detector/shared/color.mjsscript23.0 KB
scripts/detector/shared/constants.mjsscript4.6 KB
scripts/detector/shared/fonts.mjsscript852 B
scripts/detector/shared/inline-ignores.mjsscript6.0 KB
scripts/detector/shared/page.mjsscript252 B
scripts/doctor.mjsscript11.3 KB
scripts/embed-prompt.mjsscript7.7 KB
scripts/generate-image.mjsscript11.2 KB
scripts/hook-admin.mjsscript30.9 KB
scripts/hook-before-edit.mjsscript19.6 KB
scripts/hook-lib.mjsscript100.5 KB
scripts/hook.mjsscript2.7 KB
scripts/lib/artifact-schema.mjsscript3.8 KB
scripts/lib/composition-catalog.mjsscript10.0 KB
scripts/lib/concept-catalog.mjsscript19.4 KB
scripts/lib/design-parser.mjsscript26.8 KB
scripts/lib/impeccable-config.mjsscript21.8 KB
scripts/lib/impeccable-paths.mjsscript4.9 KB
scripts/lib/is-generated.mjsscript2.4 KB
scripts/lib/live-path-globs.mjsscript847 B
scripts/lib/open-system-browser.mjsscript848 B
scripts/lib/provider.mjsscript327 B
scripts/lib/roll-selection.mjsscript17.4 KB
scripts/lib/staleness-deep.mjsscript20.9 KB
scripts/lib/staleness-notice.mjsscript6.5 KB
scripts/lib/staleness.mjsscript22.9 KB
scripts/lib/surface-briefs.mjsscript6.0 KB
scripts/lib/target-args.mjsscript1.1 KB
scripts/lib/target-slug.mjsscript1.0 KB
scripts/lib/template-extensions.mjsscript5.3 KB
scripts/live-accept.mjsscript35.0 KB
scripts/live-browser-dom.jsscript4.2 KB
scripts/live-browser-ignores.jsscript10.1 KB
scripts/live-browser-session.jsscript3.2 KB
scripts/live-browser.jsscript490.4 KB
scripts/live-commit-manual-edits.mjsscript39.9 KB
scripts/live-complete.mjsscript4.7 KB
scripts/live-copy-edit-agent.mjsscript32.7 KB
scripts/live-discard-manual-edits.mjsscript1.6 KB
scripts/live-inject.mjsscript17.2 KB
scripts/live-insert.mjsscript9.8 KB
scripts/live-manual-edit-evidence.mjsscript11.6 KB
scripts/live-poll.mjsscript15.8 KB
scripts/live-resume.mjsscript6.0 KB
scripts/live-server.mjsscript67.9 KB
scripts/live-status.mjsscript2.6 KB
scripts/live-target.mjsscript934 B
scripts/live-wrap.mjsscript38.2 KB
scripts/live.mjsscript12.6 KB
scripts/live/accept-css.mjsscript22.0 KB
scripts/live/accept-verify.mjsscript2.7 KB
scripts/live/browser-script-parts.mjsscript3.6 KB
scripts/live/completion.mjsscript1.4 KB
scripts/live/event-validation.mjsscript9.4 KB
scripts/live/frameworks/astro.mjsscript1.7 KB
scripts/live/frameworks/detect-utils.mjsscript2.1 KB
scripts/live/frameworks/index.mjsscript5.7 KB
scripts/live/frameworks/journal.mjsscript7.0 KB
scripts/live/frameworks/nextjs.mjsscript1.7 KB
scripts/live/frameworks/nuxt.mjsscript5.1 KB
scripts/live/frameworks/script-src.mjsscript699 B
scripts/live/frameworks/static-html.mjsscript656 B
scripts/live/frameworks/sveltekit.mjsscript1.8 KB
scripts/live/frameworks/tag-strategy.mjsscript10.6 KB
scripts/live/frameworks/tanstack-start.mjsscript1.6 KB
scripts/live/frameworks/vite-generic.mjsscript1.3 KB
scripts/live/generation-preflight.mjsscript5.8 KB
scripts/live/insert-ui.mjsscript15.3 KB
scripts/live/instructions.mjsscript12.9 KB
scripts/live/manual-apply.mjsscript34.1 KB
scripts/live/manual-edit-routes.mjsscript14.6 KB
scripts/live/manual-edits-buffer.mjsscript5.0 KB
scripts/live/poll-lanes.mjsscript759 B
scripts/live/project-ignores.mjsscript6.3 KB
scripts/live/roots.mjsscript20.4 KB
scripts/live/session-store.mjsscript22.4 KB
scripts/live/source-lock.mjsscript3.6 KB
scripts/live/source-search.mjsscript4.2 KB
scripts/live/svelte-ast.mjsscript38.2 KB
scripts/live/svelte-component.mjsscript51.1 KB
scripts/live/sveltekit-adapter.mjsscript10.7 KB
scripts/live/tanstack-adapter.mjsscript9.1 KB
scripts/live/ui-surfaces.mjsscript3.5 KB
scripts/live/vocabulary.mjsscript7.0 KB
scripts/modern-screenshot.umd.jsscript28.6 KB
scripts/palette.mjsscript55.5 KB
scripts/pin.mjsscript6.5 KB
scripts/serve-question.mjsscript118.9 KB
scripts/surface-brief.mjsscript2.5 KB

scripts/lib/template-extensions.mjs

View on GitHub
/**
 * One owner for "which file extensions hold UI markup".
 *
 * Before this module the answer was spelled out separately in hook-lib.mjs
 * (`detector.extensions` config, issue #316) and in live-wrap.mjs /
 * live-accept.mjs (a hardcoded `EXTENSIONS` array, duplicated verbatim in both).
 * The lists drifted: the hook learned configurable server-template extensions
 * while Live kept its six frontend defaults, so a Phoenix project got design
 * findings on `.heex` files but `Session markers not found` on Accept (#374).
 *
 * Extensions are matched against the END OF THE FILENAME, not `path.extname`,
 * so double extensions like `.blade.php`, `.html.erb`, and `.html.heex` work.
 */

import fs from 'node:fs';
import path from 'node:path';

/**
 * Built-in markup extensions for Live's wrap/accept source search.
 *
 * Elixir's `.ex` is here because Phoenix function components put `~H"""`
 * templates directly in `lib/**\/*.ex`; `.heex` and `.eex` cover standalone
 * templates. `.exs` is deliberately absent: those are Elixir *scripts*
 * (`mix.exs`, `config/*.exs`, tests) and never hold markup, so including them
 * only gives the wrap query a chance to match build config by accident.
 */
export const LIVE_TEMPLATE_EXTENSIONS = Object.freeze([
  '.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro',
  '.ex', '.heex', '.eex',
]);

/**
 * Normalize `detector.extensions` entries to `{ ext, engine }`.
 *
 * Accepts `{ ext, engine }` objects (engine 'html' | 'text', default 'html' —
 * the common case for server-side templates) or bare strings as shorthand.
 */
export function normalizeExtensionEntries(entries) {
  if (!Array.isArray(entries)) return [];
  const out = [];
  for (const entry of entries) {
    const raw = typeof entry === 'string' ? entry : entry?.ext;
    if (typeof raw !== 'string') continue;
    let ext = raw.trim().toLowerCase();
    if (!ext) continue;
    if (!ext.startsWith('.')) ext = `.${ext}`;
    const engine = (!(typeof entry === 'string') && entry?.engine === 'text') ? 'text' : 'html';
    out.push({ ext, engine });
  }
  return out;
}

export function mergeExtensions(existing, incoming) {
  const map = new Map();
  for (const entry of normalizeExtensionEntries(existing)) map.set(entry.ext, entry);
  for (const entry of normalizeExtensionEntries(incoming)) map.set(entry.ext, entry);
  return Array.from(map.values());
}

export function matchConfiguredExtension(filePath, extensions) {
  if (!Array.isArray(extensions) || extensions.length === 0) return null;
  const name = path.basename(String(filePath || '')).toLowerCase();
  if (!name) return null;
  // The longest matching suffix wins, so `.blade.php` beats a broader `.php`
  // entry regardless of config order.
  let best = null;
  for (const entry of normalizeExtensionEntries(extensions)) {
    if (name.length > entry.ext.length && name.endsWith(entry.ext)
      && (!best || entry.ext.length > best.ext.length)) {
      best = entry;
    }
  }
  return best;
}

/**
 * Does this filename end in one of `extensions`?
 *
 * Suffix matching rather than `path.extname` equality, so a configured
 * `.html.erb` matches `show.html.erb` (whose extname is only `.erb`). The
 * `name.length > ext.length` guard keeps a file literally named `.heex` from
 * counting as a template.
 */
export function matchesTemplateExtension(filePath, extensions) {
  const name = path.basename(String(filePath || '')).toLowerCase();
  if (!name) return false;
  for (const ext of extensions) {
    if (name.length > ext.length && name.endsWith(ext)) return true;
  }
  return false;
}

/**
 * Built-in Live extensions plus any the project configured for the detector.
 *
 * Reading `detector.extensions` here is the point: a user who taught the design
 * hook about `.blade.php` should not have to teach Live separately. Config
 * parsing is intentionally minimal (own the shape, not the whole hook config)
 * so this module stays importable from the Live CLI without pulling in
 * hook-lib.mjs.
 */
export function resolveLiveTemplateExtensions(cwd = process.cwd()) {
  const cached = extensionCache.get(cwd);
  if (cached) return cached;
  const resolved = readLiveTemplateExtensions(cwd);
  extensionCache.set(cwd, resolved);
  return resolved;
}

// live-wrap calls the resolver once per candidate query per pass (up to eight
// times in one CLI run), and every call would otherwise re-read and re-parse
// both config files. Keyed by cwd; a single CLI process never rewrites its own
// config mid-run.
const extensionCache = new Map();

/** Test seam: drop the memoized config so a fixture can rewrite config.json. */
export function clearTemplateExtensionCache() {
  extensionCache.clear();
}

function readLiveTemplateExtensions(cwd) {
  const configured = [];
  for (const name of ['config.json', 'config.local.json']) {
    const raw = safeReadJson(path.join(cwd, '.impeccable', name));
    const detector = raw?.detector;
    if (detector && typeof detector === 'object' && !Array.isArray(detector)) {
      configured.push(...normalizeExtensionEntries(detector.extensions));
    }
  }
  const seen = new Set(LIVE_TEMPLATE_EXTENSIONS);
  const out = [...LIVE_TEMPLATE_EXTENSIONS];
  for (const { ext } of configured) {
    if (seen.has(ext)) continue;
    seen.add(ext);
    out.push(ext);
  }
  return out;
}

function safeReadJson(filePath) {
  try {
    return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
  } catch {
    return null;
  }
}
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall