@diegovelasquezweb/a11y-engine 0.11.29 → 0.11.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegovelasquezweb/a11y-engine",
3
- "version": "0.11.29",
3
+ "version": "0.11.30",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -316,22 +316,16 @@ function parseJsonBlock(text) {
316
316
  }
317
317
 
318
318
  async function callClaudeForPatch({ apiKey, model, aiInput }) {
319
- const isMulti = Array.isArray(aiInput.findings);
320
319
  const system = [
321
320
  "You are an accessibility fix engine.",
322
321
  "Return JSON only.",
323
322
  "Generate deterministic text replacements for provided files.",
324
- "Use finding.fixDescription and constraints.must as guidance for what to fix and how.",
323
+ "Use finding.fixDescription and execution.constraints.must as guidance for what to fix and how.",
325
324
  "For insertions (new element that does not yet exist in the file), use the nearest existing parent element as the search anchor. The replace value must include that anchor plus the new content.",
326
325
  "Do not create files. Do not modify paths outside provided filePath values.",
327
- isMulti
328
- ? "You are fixing MULTIPLE findings at once. Generate at least one change per finding. Set findingId on each change to the exact finding ID it addresses."
329
- : "",
330
326
  "Schema:",
331
- isMulti
332
- ? "{\"changes\":[{\"findingId\":\"...(required: exact finding id)\",\"filePath\":\"...\",\"search\":\"...\",\"replace\":\"...\"}],\"notes\":\"...\"}"
333
- : "{\"changes\":[{\"filePath\":\"...\",\"search\":\"...\",\"replace\":\"...\"}],\"notes\":\"...\"}",
334
- ].filter(Boolean).join("\n");
327
+ "{\"changes\":[{\"filePath\":\"...\",\"search\":\"...\",\"replace\":\"...\"}],\"verifyRule\":\"...\",\"verifyRoute\":\"...\",\"notes\":\"...\"}",
328
+ ].join("\n");
335
329
 
336
330
  const userMessage = JSON.stringify(aiInput, null, 2);
337
331