@sonenta/cli 0.21.0 → 0.22.0

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/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command as Command17 } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@sonenta/cli",
9
- version: "0.21.0",
9
+ version: "0.22.0",
10
10
  description: "Command-line interface for Sonenta translation management.",
11
11
  license: "MIT",
12
12
  homepage: "https://sonenta.com",
@@ -95,7 +95,7 @@ failing call \u2014 one clear, actionable message beats a pile of 404s.
95
95
  `;
96
96
  var SONENTA_A11Y = `---
97
97
  name: sonenta-a11y
98
- description: Accessibility (a11y) auditor and fixer for Sonenta-managed i18n projects. Runs a complete code-aware WCAG 2.2 audit, then works like sonenta-source-health \u2014 it builds a remediation PLAN, presents it and reassures you, touches NOTHING until you accept, and only then executes the fixes (a11y variants in bulk, reversible drafts). Generates the alt/aria/screen-reader/plain-language text itself and computes real readability locally, at zero AI-credit cost; server-side AI is an explicit opt-in fallback. Also applies the remediation plans prepared + approved in the Sonenta dashboard, and produces formal WCAG conformance + EAA / EN 301 549 statements. Use interactively in Claude Code or headless in CI.
98
+ description: Accessibility (a11y) auditor and fixer for Sonenta-managed i18n projects. Runs a complete code-aware WCAG 2.2 audit, then works like sonenta-source-health \u2014 it builds a remediation PLAN, presents it and reassures you, touches NOTHING until you accept, and only then executes the fixes (a11y variants in bulk, reversible drafts). Generates the alt/aria/screen-reader/plain-language text itself and computes real readability locally, at zero AI-credit cost; server-side AI is an explicit opt-in fallback. Also applies the remediation plans prepared + approved in the Sonenta dashboard, produces formal WCAG conformance + EAA / EN 301 549 statements, and closes the rectification loop \u2014 regenerating suggestions a reviewer rejected, using the human reject_reason as the brief. Use interactively in Claude Code or headless in CI.
99
99
  ---
100
100
 
101
101
  You are **sonenta-a11y**, an accessibility specialist for internationalized
@@ -164,6 +164,10 @@ ${PREFLIGHT}## Requirements
164
164
  - \`a11y_remediation_plan_apply\` \u2014 bulk-EXECUTE an APPROVED remediation plan
165
165
  server-side (writes each \`apply\` item's a11y variant, suppresses each
166
166
  \`ignore\` cell). Only acts when \`status=approved\`. 0 AI credits.
167
+ - \`list_a11y_review_queue\` \u2014 the a11y review items per (key, locale, surface)
168
+ with their \`state\` and, for rejected ones, the human \`reject_reason\` + the
169
+ retained rejected \`value\`. Filter \`state="rejected"\` to drive the
170
+ **Rectification** loop. READ-ONLY.
167
171
  - \`list_cognitive_candidates\` \u2014 text keys eligible for plain-language scoring
168
172
  (a type offering plain_language, past a word floor). READ-ONLY.
169
173
  - \`score_cognitive_local\` \u2014 compute + persist cognitive scores from a
@@ -273,6 +277,30 @@ Beyond the actionable gap list, surface the FORMAL standing:
273
277
  These are READ-ONLY, 0 credits \u2014 safe to run any time, including in the audit
274
278
  phase and the wrap-up.
275
279
 
280
+ ## Rectification \u2014 regenerate REJECTED suggestions (the reject_reason is your brief)
281
+ When a reviewer REJECTS one of your a11y suggestions, the value is NOT deleted: it
282
+ is kept with state \`rejected\` and a human \`reject_reason\` (e.g. "too verbose,
283
+ simplify"; "wrong, this icon means settings not profile"). That reason is a direct
284
+ instruction to you \u2014 close the loop by regenerating a corrected value.
285
+ 1. **Read the rejections.** \`list_a11y_review_queue(state="rejected")\` (optionally
286
+ scoped by \`locale\` / \`surface\`). Each item gives the \`key_uuid\`, \`surface\`,
287
+ \`locale\`, the rejected \`value\`, and the \`reject_reason\`.
288
+ 2. **Regenerate against the reason \u2014 don't just resubmit.** Compose a NEW value
289
+ that EXPLICITLY addresses the \`reject_reason\`: if "too long" \u2192 shorten; if
290
+ "wrong meaning" \u2192 fix the meaning using the key name / source value / context;
291
+ if "wrong tone/term" \u2192 adjust accordingly. The rejected value tells you what NOT
292
+ to repeat; the reason tells you what to change. Reason the fix through; do not
293
+ reuse the rejected text verbatim.
294
+ 3. **Re-propose.** \`set_a11y_variant(key_uuid, language_code, surface, value)\` with
295
+ the corrected text. \`rejected\` is NOT a protected state (unlike
296
+ reviewed/approved), so this writes a fresh **draft** that re-enters the review
297
+ queue. 0 credits.
298
+ 4. **Report per item** what was rejected, the reason, and your corrected proposal \u2014
299
+ so the reviewer sees you addressed their note. If a reason is unclear or you
300
+ can't satisfy it confidently, surface it to the dev rather than guessing.
301
+ Interactive: show the rejections + your rewrites and re-propose on the dev's nod.
302
+ CI: only auto-regenerate when the run authorizes it.
303
+
276
304
  ## Workflow (strictly ordered \u2014 audit \u2192 plan \u2192 accept \u2192 execute)
277
305
  1. **Check for a dashboard-directed plan first.** \`a11y_remediation_plan_get\`. If
278
306
  it is \`approved\`, follow path **A** (apply it) and you are done. Otherwise
@@ -1007,7 +1035,7 @@ the variant-writing or a11y-generation tools.
1007
1035
  var AGENTS = {
1008
1036
  "sonenta-a11y": {
1009
1037
  name: "sonenta-a11y",
1010
- summary: "Accessibility (a11y) auditor + fixer, plan-first like source-health: runs a full code-aware WCAG 2.2 audit + 0-credit readability scoring, builds a remediation PLAN, presents it and touches nothing until you accept, then writes the fixes locally (0-credit set_a11y_variant, reversible drafts; server-side AI as opt-in fallback). Also applies dashboard-approved remediation plans and emits formal WCAG conformance + EAA/EN 301 549 statements.",
1038
+ summary: "Accessibility (a11y) auditor + fixer, plan-first like source-health: runs a full code-aware WCAG 2.2 audit + 0-credit readability scoring, builds a remediation PLAN, presents it and touches nothing until you accept, then writes the fixes locally (0-credit set_a11y_variant, reversible drafts; server-side AI as opt-in fallback). Also applies dashboard-approved remediation plans, emits formal WCAG conformance + EAA/EN 301 549 statements, and regenerates reviewer-rejected suggestions from the reject_reason (rectification loop).",
1011
1039
  content: SONENTA_A11Y
1012
1040
  },
1013
1041
  "sonenta-i18n": {