claude/tasks/TODO.md
bastien fffc222005 feat(validate): add W3C HTML/CSS validity + WCAG a11y audit skill
New /validate skill runs a narrow-scope web standards audit covering
W3C HTML validity (validator.nu API in FULL, html-validate / vnu.jar
in LOCAL), W3C CSS validity (jigsaw.w3.org/css-validator in FULL,
stylelint / css-tree in LOCAL), and WCAG 2.1 accessibility (pa11y,
@axe-core/cli, WAVE API, or static checklist fallback).

Dedicated validator-analyzer agent with a strict IN/OUT scope filter
so the report stays focused on conformance — no meta/OG/JSON-LD/
sitemap/CSP/cookie/CWV noise. Those remain owned by /seo, /geo, and
/harden respectively.

LOCAL mode degrades gracefully: tries local npm tools first, falls
back to static analysis if none present (same 12-point a11y checklist
as /onboard a11y dispatch). Never fails hard.

Framework awareness: validates built output (dist/, _site/, build/,
out/) for SPA/JS frameworks, not JSX/TSX source. Warns if no build
dir found.

Fix mode (--fix) produces a conservative auto-fix bundle: missing
lang attr, alt="" on decorative images, unclosed void tags, duplicate
IDs, unambiguous heading level skips. Content decisions (form labels,
color contrast, landmark restructure, alt text on content images)
always go to User actions, never auto-applied.

Flags: --local, --full, --fix, --no-external.

Routing updated in CLAUDE.md. /harden and /seo cross-refs narrowed
to redirect W3C / WCAG concerns to /validate (was previously routed
to /onboard a11y dispatch, which only runs at setup).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 22:39:30 +02:00

4.9 KiB

TODO

README.md overhaul

  • Plan
  • Corriger section install ctx7 (retirer MCP, clarifier CLI + API key)
  • Marquer ruflo comme désactivé
  • Supprimer section Troubleshooting/bugs courants
  • Simplifier stacks tierces (gstack, ruflo, ctx7, GSD) — juste description + lien
  • Ajouter section skills personnels (skills-perso)
  • Ajouter section système d'autogestion (plugin-advisor, tokens, synergies)
  • Nettoyer section Updating (retirer instructions manuelles par outil)
  • Nettoyer section Maintenance (retirer doublon updating)
  • Mettre à jour table Plugins reference (ctx7 row, ruflo OFF)
  • Corriger lien USAGE.md dans l'intro (retirer mention cas/erreurs)

USAGE.md cleanup

  • Supprimer tous les "Cas de figure — corrections vX.X.X validées"
  • Supprimer table "Erreurs fréquentes"
  • Corriger /readme/doc dans bonnes pratiques
  • Supprimer séparateurs orphelins

Skill /doc

  • Mettre à jour doc-syncer.md pour gérer ajouts/suppressions de features
  • Mettre à jour SKILL.md description pour mentionner feature delta

Auto-activation ui-ux-pro-max sur détection design

  • Créer lib/design-gate.md — snippet réutilisable (detect design signals + ask to activate ui-ux-pro-max)
  • Intégrer dans feater.md — STEP 0.5 entre scope check et mini-plan
  • Intégrer dans hotfixer.md — STEP 1.5 (si CSS/style/animation)
  • Intégrer dans bugfixer.md — STEP 1.5 (si bug UI/style)
  • Mettre à jour plugin-advisor.md — PHASE 4 : cohérence avec le design gate
  • Mettre à jour CLAUDE.md skill routing — documenter le comportement auto

Refonte agents/seo-analyzer.md

  • Lire agent actuel + plugin-advisor + interviewer + feater + hotfixer + analyzer
  • Réécrire l'agent complet v1 (11 étapes)
  • Ajouter orchestration sub-agents (hotfixer/feater) + triage par batches
  • Déplacer plugin-advisor après détection stack (STEP 3 au lieu de STEP 0)
  • Ajouter 2 niveaux d'audit (LOCAL code-only / FULL live+externe)
  • Adapter scoring, legal, GEO aux deux niveaux
  • Renumeroter proprement (0-14) + corriger toutes les refs internes
  • Commit

/onboard — cso archetype-aware

Problème : prompt cso fallback est non-adaptatif — cherche XSS/SQLi/CORS même sur firmware. Objectif : charger ## Typical pain points + Surface sécurité de l'archétype et les injecter dans le prompt cso.

  • STEP 4.5 → ajouter extraction de archetype-context.md (pain points + Surface sécurité + category) — validé sur firmware-embedded / nextjs-app-router / library
  • STEP 6 dispatch cso fallback → re-écrire prompt : universal checks + sections conditionnelles par category (web / embedded / library / cli / infra / data / desktop)
  • STEP 6 dispatch cso gstack ON → passer --archetype <name> --context-file .onboard-audit/archetype-context.md dans args
  • OUT-OF-SCOPE ce fix : étendre le pattern à analyze/code-clean/doc (déjà reçoivent ARCHETYPE: <name>, juste pas le context-file). À faire dans un 2e passage si besoin.

/validate — nouveau skill W3C + WCAG (option A)

Scope : W3C HTML validity (validator.nu API) + W3C CSS validity (jigsaw API) + WCAG a11y (axe-core CLI / pa11y / WAVE API / fallback statique). Même pattern que /harden (audit par défaut, --fix avec confirmation A/B/C/D). Rapport = VALIDATE.md racine. Complémentaire à /onboard (qui audite a11y au setup initial — /validate est l'outil on-demand réutilisable).

Design décisions :

  • Agent dédié : agents/validator-analyzer.md (nouveau). Pas de réutilisation de seo-analyzer — scope différent (validité syntaxique vs indexabilité).
  • Depth : LOCAL (fichiers HTML/CSS statiques, tools npm locaux si dispo) | FULL (URL live + APIs distantes W3C/WAVE).
  • External validators : validator.nu/?out=json (HTML), jigsaw.w3.org/css-validator (CSS), WAVE API optionnelle (quota gratuit ~100/mois), axe-cli local, pa11y-cli local.
  • Tools fallback order : npm tools locaux → APIs distantes → agent général statique (cas onboard). Aucun install forcé.
  • --fix conservateur : alt="" sur images décoratives évidentes, lang sur <html>, fermetures de tags manquantes, sauts de niveau heading renumérotés. PAS : labels forms, contraste couleurs, landmarks (demandent décision humaine).
  • Out of scope : meta tags/SEO → /seo ; JSON-LD → /geo ; security headers → /harden ; code linting générique (ESLint/Prettier) → hors scope web standards.

Subtasks :

  • Créer agents/validator-analyzer.md — spec 6 étapes (478 lignes)
  • Créer skills/validate/SKILL.md — dispatcher (378 lignes)
  • Ajouter routage /validate dans ~/.claude/CLAUDE.md section "Skill routing"
  • Mettre à jour skills/harden/SKILL.md — W3C/a11y redirigé vers /validate
  • Mettre à jour skills/seo/SKILL.md — cross-ref /validate pour W3C/WCAG
  • Grep cohérence : refs /validate correctes, skill détecté par la harness