design-insufficiency — a stack-agnostic Claude Code skill: find where a feature is badly designed for the human using it (Nielsen smell scan + handicapped-persona walkthrough + archetype completeness… A developer released design-insufficiency, a stack-agnostic Claude Code skill that audits features for usability flaws by combining a Nielsen heuristic scan, handicapped-persona walkthroughs, and an archetype completeness diff, with Skeptic and Referee agents verifying findings. The skill is designed for multi-agent orchestration runtimes and includes safeguards to prevent empty-scope runs that could audit the wrong code. | // design-insufficiency pipeline: three tracks - Skeptic - Referee - cross-link. | | // Track A static smell / heuristic evaluation : one Scanner per Nielsen heuristic cluster detectors.md . | | // Track B role-play / cognitive walkthrough : one Walker per handicapped persona cluster personas.md . | | // Track C capability completeness : classify the archetype, diff expected capabilities vs code archetypes.md . | | // All tracks feed the same Skeptic - Referee verdict pipeline, then findings are cross-linked. | | // | | // Written for a multi-agent orchestration runtime that provides agent prompt, opts , parallel thunks | | // and an injected args global e.g. Claude Code's Workflow tool . If your harness has no such runtime, | | // treat this file as the spec: dispatch one read-only subagent per HEURISTICS/PERSONAS entry with the | | // same prompts, then one Skeptic + one Referee per finding, and apply the same scope-fence and | | // cross-link logic by hand. | | // | | // TEMPLATE — before running: | | // 1. Fill SCOPE FILES + ROUTE CONTRACT MAP from SKILL.md Step 1 routes, components, request/error contracts . | | // 2. Set STACK CONTEXT to your stack framework, design-system component set + prefix, token source, | | // where the typed API contracts live . | | // 3. Trim HEURISTICS / PERSONAS to what applies drop e.g. bulk personas if it's not a list screen . | | // 4. Paste the relevant detectors.md rows into DETECTOR GUIDANCE and the persona rows into PERSONA GUIDANCE. | | | | export const meta = { | | name: 'design-insufficiency', | | description: 'Static usability-smell scan + handicapped-persona walkthrough + archetype completeness diff - Skeptic - Referee - cross-link, over one feature scope', | | phases: | | { title: 'Scan', detail: 'static usability-smell scanner per Nielsen heuristic cluster' }, | | { title: 'Walk', detail: 'cognitive walkthrough per handicapped persona cluster' }, | | { title: 'Complete', detail: 'classify archetype + diff expected capabilities research-backed vs code' }, | | { title: 'Skeptic', detail: 'try to disprove each smell/wall/gap find the path/affordance/capability missed ' }, | | { title: 'Referee', detail: 'binding REAL GAP / HAS PATH / MANUAL REVIEW verdict' }, | | , | | } | | | | // ---- ARGS NORMALISATION do not skip ---- | | // If the caller passes args as a JSON string easy mistake , args?.files reads undefined and EVERY | | // field silently falls back to its default — an EMPTY SCOPE FILES, which makes every scanner roam the | | // whole repo and audit the WRONG feature this actually happened: a 163-agent run scanned an unrelated | | // module while the target was an import wizard . Coerce string- object so args.files/args.map are read. | | const A = typeof args === 'string' ? JSON.parse args : args || {} | | | | // ---- FILL THESE IN or supply via args ---- | | const SCOPE FILES = A.files || | | // 'src/app/orders/order-form/order-form.component.ts', | | // 'src/api/generated/CreateOrder.ts', | | | | // FAIL LOUD, never scan nothing: an empty scope is always a caller error, not a valid "scan everything". | | // A silent empty-scope run wastes a full fan-out on the wrong code and looks like it worked. | | if Array.isArray SCOPE FILES || SCOPE FILES.length === 0 { | | throw new Error 'design-insufficiency: SCOPE FILES is empty. Pass args as a JSON OBJECT not a stringified JSON with a non-empty files array from SKILL Step 1. An empty scope makes every scanner roam the whole repo and audit the wrong feature.' | | } | | // The route/contract map from SKILL Step 1 — routes, nav depth, request-field TYPES, error outcomes. | | const ROUTE CONTRACT MAP = A.map || '