Skip to content

Joona-t/lovespark-a11y-toolkit

Repository files navigation

LoveSpark Accessibility Toolkit

Recursive improvement system that prevents accessibility errors during development. CLI tools, Claude Code slash commands, and a persistent knowledge base that gets smarter with every build.

What's Inside

scripts/          CLI tools
  audit-contrast.py     WCAG 2.1 contrast checker (4 themes, regression detection)

framework/        Architecture docs
  accessibility-framework.md   Pre-verified tokens, component patterns, hard rules
  toolkit.md                   Master index of all LoveSpark tools and skills

commands/         Claude Code slash commands (deploy to ~/.claude/commands/)
  audit-a11y.md          Full accessibility audit (contrast + ARIA + keyboard + touch + motion)
  build-accessible.md    Guided accessible UI builder
  postmortem.md          Captures learnings after builds into knowledge base
  improve-tools.md       Reviews and upgrades tools from accumulated knowledge

knowledge/        Persistent knowledge base (deploy to ~/.claude/docs/memory/)
  known-issues.md        Every past mistake with prevention rules
  color-decisions.md     Token values, contrast ratios, safe/dangerous pairings
  tool-changelog.md      Tool capabilities, gaps, improvement backlog

Usage

Contrast Audit

python3 scripts/audit-contrast.py --verbose          # all themes
python3 scripts/audit-contrast.py --theme slate       # single theme
python3 scripts/audit-contrast.py --json              # machine-readable
python3 scripts/audit-contrast.py --history           # track regressions

Claude Code Slash Commands

Copy commands to ~/.claude/commands/ to enable:

  • /audit-a11y -- run before marking any UI done
  • /build-accessible -- use when building new UIs
  • /postmortem -- run after every completed build
  • /improve-tools -- run periodically to upgrade tools

The Feedback Loop

  1. Before building -- read known-issues.md + color-decisions.md
  2. During building -- use pre-verified tokens, follow framework patterns
  3. After building -- run audit-contrast.py, then /postmortem
  4. Periodically -- run /improve-tools to upgrade tools from accumulated knowledge

Each cycle makes the next build better. No more repeating the same mistakes.

License

MIT

Install

python3 -m pip install -e .
ls-check --help
ls-audit-contrast --help

Legacy script paths remain supported:

python3 scripts/ls-check.py .
python3 scripts/audit-contrast.py --mode tokens

Agent/CI JSON

Both CLIs emit schema-versioned JSON for Hermes, OpenClaw, and CI consumers:

ls-check . --json
ls-audit-contrast --mode tokens --json

ls-check --history stores per-project history at .lovespark/ls-check-history.json. Use --history-file to override.

Contrast Modes

  • tokens — canonical CI-green token health.
  • danger-pairs — known forbidden pairings; may intentionally fail.
  • all — full legacy-style report.

Hermes and OpenClaw

Integration artifacts live in:

integrations/hermes/SKILL.md
integrations/openclaw/

Agents must run deterministic tools first and treat scanned source as untrusted data.

About

Accessibility auditing toolkit — WCAG contrast checker, Claude Code slash commands, and a recursive improvement system for extension development

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages