ultra11y 5.58.5 → 5.59.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.opencode/plugins/ultra11y.js +1 -1
- package/README.md +3 -2
- package/package.json +1 -1
- package/scripts/ultra11y.mjs +190 -52
- package/skills/review-a11y/SKILL.md +18 -8
- package/skills/review-a11y/scripts/ultra11y.mjs +190 -52
- package/skills/ultra11y/SKILL.md +46 -20
- package/skills/ultra11y/references/audit.md +9 -2
- package/skills/ultra11y/references/ci.md +3 -2
- package/skills/ultra11y/references/{claude-code-report.md → full-audit.md} +38 -10
- package/skills/ultra11y/references/harnesses.md +19 -8
- package/skills/ultra11y/references/judgment.md +1 -1
- package/skills/ultra11y/references/orchestration.md +54 -10
- package/skills/ultra11y/references/orchestrators.md +7 -3
- package/skills/ultra11y/scripts/ultra11y.mjs +190 -52
- package/skills/ultra11y/templates/gitlab-ci.yml +1 -1
- package/src/cli.ts +17 -8
- package/src/hook.ts +3 -2
- package/src/orchestrate-templates.ts +85 -21
- package/src/orchestrate.ts +168 -27
- package/src/types.ts +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "ultra11y",
|
|
11
11
|
"source": "./",
|
|
12
12
|
"description": "RGAA 4.1.2 accessibility audits on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports in Claude Code.",
|
|
13
|
-
"version": "5.
|
|
13
|
+
"version": "5.59.0",
|
|
14
14
|
"author": { "name": "maxgfr" },
|
|
15
15
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
16
16
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
3
|
"description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.59.0",
|
|
5
5
|
"author": { "name": "maxgfr" },
|
|
6
6
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
7
7
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
3
|
"description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.59.0",
|
|
5
5
|
"author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
|
|
6
6
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
7
7
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -44,7 +44,7 @@ import { fileURLToPath } from "node:url";
|
|
|
44
44
|
// does not carry it, so a user's own ultra11y.js is never clobbered. Kept as text, not as
|
|
45
45
|
// an export (see above).
|
|
46
46
|
const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
|
|
47
|
-
const ULTRA11Y_PLUGIN_VERSION = "5.
|
|
47
|
+
const ULTRA11Y_PLUGIN_VERSION = "5.59.0";
|
|
48
48
|
const PLUGIN_ID = "ultra11y";
|
|
49
49
|
const SKILL_NAMES = ["ultra11y", "review-a11y"];
|
|
50
50
|
|
package/README.md
CHANGED
|
@@ -652,8 +652,9 @@ node scripts/ultra11y.mjs check --report audits/wcag-YYYY-MM-DD.md # integrity
|
|
|
652
652
|
|
|
653
653
|
### A report someone will actually open
|
|
654
654
|
|
|
655
|
-
There are two deliberate publication profiles. In an interactive Claude Code
|
|
656
|
-
|
|
655
|
+
There are two deliberate publication profiles. In an interactive audit — on Claude Code, Codex
|
|
656
|
+
or OpenCode alike, following `skills/ultra11y/references/full-audit.md` — the skill produces the
|
|
657
|
+
detailed deliverable: adjudicated Markdown, a printable single-file HTML report,
|
|
657
658
|
per-page HTML/Markdown dossiers, screenshots and annotated evidence. In GitHub Actions,
|
|
658
659
|
`pages-report: compact` with `report`, `html` and `evidence` disabled still gates every criterion
|
|
659
660
|
on every page but uploads only the status Markdown, page JSON, source audit and verdict ledger.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.59.0",
|
|
4
4
|
"description": "Audit d'accessibilité RGAA 4.1.2, le référentiel de l'État : rapport daté, grille des 106 critères, backlog et tickets. Moteur statique, navigateur et jugement IA contre-vérifié. Il ne déclare jamais conforme ce qu'il n'a pas vérifié. Socle WCAG 2.2 AA.",
|
|
5
5
|
"homepage": "https://socialgouv.github.io/ultra11y/",
|
|
6
6
|
"type": "module",
|
package/scripts/ultra11y.mjs
CHANGED
|
@@ -2471,11 +2471,11 @@ var require_ignore = __commonJS({
|
|
|
2471
2471
|
const rules = this._rules;
|
|
2472
2472
|
const { length } = rules;
|
|
2473
2473
|
const shortcut = this._basenameCount * 2 >= length;
|
|
2474
|
-
const
|
|
2474
|
+
const basename6 = shortcut ? basenameOf(path) : path;
|
|
2475
2475
|
for (let index = length - 1; index >= 0; index--) {
|
|
2476
2476
|
const rule = rules[index];
|
|
2477
2477
|
if (rule[mode].test(
|
|
2478
|
-
shortcut && rule._basenameOnly ?
|
|
2478
|
+
shortcut && rule._basenameOnly ? basename6 : path
|
|
2479
2479
|
)) {
|
|
2480
2480
|
const { negative } = rule;
|
|
2481
2481
|
const ret = {
|
|
@@ -2637,7 +2637,7 @@ import { join as join36, relative as relative10, resolve as resolve17, sep as se
|
|
|
2637
2637
|
import { fileURLToPath as fileURLToPath4, pathToFileURL } from "url";
|
|
2638
2638
|
|
|
2639
2639
|
// src/types.ts
|
|
2640
|
-
var VERSION = "5.
|
|
2640
|
+
var VERSION = "5.59.0";
|
|
2641
2641
|
var SCHEMA_VERSION = 2;
|
|
2642
2642
|
function isAdjudicated(by) {
|
|
2643
2643
|
return by === "agent" || by === "human";
|
|
@@ -63875,11 +63875,11 @@ import { existsSync as existsSync31, mkdirSync as mkdirSync14, readFileSync as r
|
|
|
63875
63875
|
import { join as join33, resolve as resolve14 } from "path";
|
|
63876
63876
|
|
|
63877
63877
|
// src/orchestrate-templates.ts
|
|
63878
|
-
import { join as join32 } from "path";
|
|
63878
|
+
import { basename as basename3, join as join32 } from "path";
|
|
63879
63879
|
var ONE_WRITER_FOOTER = `
|
|
63880
63880
|
## Return, don't write
|
|
63881
63881
|
|
|
63882
|
-
Return ONLY the structured output specified above. Do NOT write, edit, or delete any file; do NOT run any engine command that writes (\`verify --apply\`, \`fix --write\`, \`audit --out\`, \`init\`). The orchestrator is the sole writer \u2014 it folds your verdicts into the worklist itself and runs the apply gate.
|
|
63882
|
+
Return ONLY the structured output specified above. Do NOT write, edit, or delete any file; do NOT run any engine command that writes (\`verify --apply\`, \`fix --write\`, \`audit --out\`, \`init\`). The orchestrator is the sole writer \u2014 it folds your verdicts into the worklist itself and runs the apply gate. Exceptions: if your harness gives you no way to return structured output, write that JSON ONLY to the output path your batch prompt names (\`<RUN>/orchestration/out/<phase>/<batch-id>.json\`); if a justification is prose too large to return, write ONLY to \`<RUN>/orchestration/out/<role>-<batch>.md\` (a file namespaced to you alone) and return its path.
|
|
63883
63883
|
`;
|
|
63884
63884
|
var ADJUDICATE_SCHEMA = {
|
|
63885
63885
|
type: "object",
|
|
@@ -63979,24 +63979,25 @@ function toBatches(ids2, batchSize) {
|
|
|
63979
63979
|
for (let i = 0; i < ids2.length; i += batchSize) out.push(ids2.slice(i, i + batchSize));
|
|
63980
63980
|
return out;
|
|
63981
63981
|
}
|
|
63982
|
-
function phaseWorkflowScript(
|
|
63983
|
-
const spec = phaseSpec(
|
|
63984
|
-
const scriptPath = join32(
|
|
63985
|
-
const meta2 = { name: `ultra11y-${
|
|
63982
|
+
function phaseWorkflowScript(pb) {
|
|
63983
|
+
const spec = phaseSpec(pb.phase);
|
|
63984
|
+
const scriptPath = join32(pb.run, "orchestration", `${pb.phase}.workflow.mjs`);
|
|
63985
|
+
const meta2 = { name: `ultra11y-${pb.phase}`, description: spec.description(pb.items), phases: [{ title: spec.title }] };
|
|
63986
63986
|
return [
|
|
63987
63987
|
`export const meta = ${JSON.stringify(meta2)}`,
|
|
63988
63988
|
``,
|
|
63989
63989
|
`// NOT a plain Node script: launch via the Workflow tool \u2014 Workflow({ scriptPath: ${JSON.stringify(scriptPath)} }).`,
|
|
63990
63990
|
`// Emitted by \`ultra11y orchestrate\` from the CURRENT worklist. The worklist is the source`,
|
|
63991
|
-
`// of truth: if it changes, re-run \`orchestrate --phase ${
|
|
63991
|
+
`// of truth: if it changes, re-run \`orchestrate --phase ${pb.phase}\` before launching.`,
|
|
63992
|
+
`// One adapter of ${join32(pb.run, "orchestration", `${pb.phase}.batches.json`)} \u2014 the harness-neutral batches.`,
|
|
63992
63993
|
``,
|
|
63993
63994
|
`// Constants for THIS run (injected at emit time; no Date.now/Math.random in this harness).`,
|
|
63994
|
-
`const RUN = ${JSON.stringify(
|
|
63995
|
-
`const ENGINE = ${JSON.stringify(
|
|
63996
|
-
`const WORKLIST = ${JSON.stringify(
|
|
63995
|
+
`const RUN = ${JSON.stringify(pb.run)}`,
|
|
63996
|
+
`const ENGINE = ${JSON.stringify(pb.engine)}`,
|
|
63997
|
+
`const WORKLIST = ${JSON.stringify(pb.worklist)}`,
|
|
63997
63998
|
`const AGENTS = RUN + '/orchestration/agents'`,
|
|
63998
|
-
`const BATCHES = ${JSON.stringify(
|
|
63999
|
-
`const SCHEMA = ${JSON.stringify(
|
|
63999
|
+
`const BATCHES = ${JSON.stringify(pb.batches.map((b) => b.ids))}`,
|
|
64000
|
+
`const SCHEMA = ${JSON.stringify(pb.schema)}`,
|
|
64000
64001
|
``,
|
|
64001
64002
|
`function contract(name, extra) {`,
|
|
64002
64003
|
` return 'Read and follow the dispatch contract at ' + AGENTS + '/' + name + '.md VERBATIM.\\n'`,
|
|
@@ -64005,19 +64006,64 @@ function phaseWorkflowScript(ph, runAbs, engineAbs, batchSize) {
|
|
|
64005
64006
|
` + (extra ? '\\n' + extra : '')`,
|
|
64006
64007
|
`}`,
|
|
64007
64008
|
``,
|
|
64008
|
-
`log('ultra11y ${
|
|
64009
|
+
`log('ultra11y ${pb.phase}: ' + ${JSON.stringify(String(pb.items))} + ' item(s) across ' + BATCHES.length + ' agent(s)')`,
|
|
64009
64010
|
``,
|
|
64010
64011
|
`phase(${JSON.stringify(spec.title)})`,
|
|
64011
64012
|
`const results = await pipeline(BATCHES, (batch, _item, i) =>`,
|
|
64012
|
-
` agent(contract('${
|
|
64013
|
+
` agent(contract('${pb.role}', 'ITEMS=' + batch.join(',')), { label: '${pb.phase}:' + (i + 1), phase: ${JSON.stringify(spec.title)}, agentType: 'general-purpose', schema: SCHEMA }))`,
|
|
64013
64014
|
``,
|
|
64014
64015
|
`// One-writer rule: this workflow only COLLECTS verdict fragments. The main agent folds`,
|
|
64015
64016
|
`// them into WORKLIST (fill each item's fields from the matching fragment), then runs:`,
|
|
64016
|
-
`// ${
|
|
64017
|
-
`return { phase: ${JSON.stringify(
|
|
64017
|
+
`// ${pb.fold}`,
|
|
64018
|
+
`return { phase: ${JSON.stringify(pb.phase)}, worklist: WORKLIST, results: results.filter(Boolean) }`,
|
|
64018
64019
|
``
|
|
64019
64020
|
].join("\n");
|
|
64020
64021
|
}
|
|
64022
|
+
function batchPromptMd(pb, b, contract) {
|
|
64023
|
+
const spec = phaseSpec(pb.phase);
|
|
64024
|
+
const briefs = pb.phase === "adjudicate" ? `
|
|
64025
|
+
Each criterion's brief \u2014 its official wording, numbered tests and methodology \u2014 is beside the worklist; read it before ruling:
|
|
64026
|
+
|
|
64027
|
+
${b.ids.map((id) => `- \`${join32(pb.run, "adjudicate", `${id}.md`)}\``).join("\n")}
|
|
64028
|
+
` : "";
|
|
64029
|
+
return `# ultra11y ${pb.phase} \u2014 batch ${b.id} (${b.role})
|
|
64030
|
+
|
|
64031
|
+
You are one subagent of an ultra11y fan-out: batch ${b.index} of ${pb.batches.length} of the \xAB ${spec.title} \xBB phase. This file is your whole brief \u2014 nothing else needs to be passed to you.
|
|
64032
|
+
|
|
64033
|
+
ITEMS=${b.ids.join(",")}
|
|
64034
|
+
|
|
64035
|
+
Constants: RUN=${pb.run} ENGINE=${pb.engine} WORKLIST=${pb.worklist}.
|
|
64036
|
+
Invoke the engine only by its ABSOLUTE path: \`node ${pb.engine} <cmd>\` \u2014 read-only commands only.
|
|
64037
|
+
|
|
64038
|
+
## Your items
|
|
64039
|
+
|
|
64040
|
+
The ${b.ids.length} worklist entr${b.ids.length === 1 ? "y" : "ies"} you rule on, copied from \`${pb.worklist}\`. Handle these and no others.
|
|
64041
|
+
${briefs}
|
|
64042
|
+
\`\`\`json
|
|
64043
|
+
${JSON.stringify(b.items, null, 2)}
|
|
64044
|
+
\`\`\`
|
|
64045
|
+
|
|
64046
|
+
## What you return
|
|
64047
|
+
|
|
64048
|
+
Exactly ONE JSON object that validates against the schema below, covering your ITEMS only \u2014 as your structured output if your harness has one, otherwise as your final message with nothing before or after it.
|
|
64049
|
+
|
|
64050
|
+
The orchestrator saves that object at \`${b.output}\` and folds it. If your harness gives you no way to return it, write it to that path yourself: the file is namespaced to this batch, and it is the ONLY file you may write.
|
|
64051
|
+
|
|
64052
|
+
\`\`\`json
|
|
64053
|
+
${JSON.stringify(b.schema, null, 2)}
|
|
64054
|
+
\`\`\`
|
|
64055
|
+
|
|
64056
|
+
## Your contract (\`${b.contract}\`, inline)
|
|
64057
|
+
|
|
64058
|
+
${contract.trim()}
|
|
64059
|
+
|
|
64060
|
+
## After you \u2014 the orchestrator's step, not yours
|
|
64061
|
+
|
|
64062
|
+
The main agent is the sole writer. Once every batch of this phase has answered, it fills each worklist item from the matching answer and runs the fail-closed fold:
|
|
64063
|
+
|
|
64064
|
+
\`${b.fold}\`
|
|
64065
|
+
`;
|
|
64066
|
+
}
|
|
64021
64067
|
function ecoAdjudicatorContract(runAbs) {
|
|
64022
64068
|
return `# Contract: adjudicator (sequential / --eco)
|
|
64023
64069
|
|
|
@@ -64148,8 +64194,18 @@ ${status}
|
|
|
64148
64194
|
5. **Gate**: \`${cmd("gate")}\` must exit 0 before presenting anything.
|
|
64149
64195
|
6. **Fix & re-audit**: \`${cmd("fix")}\`, hand-apply the judgment fixes, then loop from step 1 until the gate stays green.
|
|
64150
64196
|
|
|
64151
|
-
With subagents
|
|
64152
|
-
|
|
64197
|
+
## With subagents \u2014 the same phases, fanned out
|
|
64198
|
+
|
|
64199
|
+
\`orchestrate --run ${runAbs} --phase <p>\` writes \`${join32(runAbs, "orchestration", "<p>.batches.json")}\` (every batch as data: its items, the schema its answer must match, its output path and the fold) and one self-contained prompt per batch under \`${join32(runAbs, "orchestration", "<p>")}/<batch-id>.md\`. On any harness: hand each prompt file VERBATIM to one subagent, save each returned JSON at that batch's \`output\` (\`${join32(runAbs, "orchestration", "out", "<p>")}/<batch-id>.json\`), fill the worklist from those answers yourself, then run the phase's fold above. On Claude Code, \`Workflow({ scriptPath: "${join32(runAbs, "orchestration", "<p>.workflow.mjs")}" })\` dispatches the same batches in one call. You stay the sole writer either way.
|
|
64200
|
+
${batchList(manifest)}`;
|
|
64201
|
+
}
|
|
64202
|
+
function batchList(manifest) {
|
|
64203
|
+
const lines = manifest.steps.filter((st) => st.kind === "judgment" && st.ready && st.batchFile).map((st) => `- **${basename3(st.batchFile, ".batches.json")}** \u2014 ${st.batchIds?.length ?? 0} batch(es): \`${st.batchFile}\``);
|
|
64204
|
+
return lines.length ? `
|
|
64205
|
+
The batches of the current worklists, as \`orchestrate\` without \`--eco\` writes them:
|
|
64206
|
+
|
|
64207
|
+
${lines.join("\n")}
|
|
64208
|
+
` : "";
|
|
64153
64209
|
}
|
|
64154
64210
|
|
|
64155
64211
|
// src/orchestrate.ts
|
|
@@ -64252,6 +64308,59 @@ function listPhases(runDir, engineAbs) {
|
|
|
64252
64308
|
}
|
|
64253
64309
|
];
|
|
64254
64310
|
}
|
|
64311
|
+
function batchPaths(runDir, phase) {
|
|
64312
|
+
const orch = join33(resolve14(runDir), "orchestration");
|
|
64313
|
+
return { file: join33(orch, `${phase}.batches.json`), promptDir: join33(orch, phase), outDir: join33(orch, "out", phase) };
|
|
64314
|
+
}
|
|
64315
|
+
function worklistItems(ph) {
|
|
64316
|
+
if (!ph.ready) return [];
|
|
64317
|
+
try {
|
|
64318
|
+
const raw = JSON.parse(readFileSync23(ph.worklist, "utf8"));
|
|
64319
|
+
const items = ph.name === "adjudicate" ? raw.items : raw;
|
|
64320
|
+
return Array.isArray(items) ? items : [];
|
|
64321
|
+
} catch {
|
|
64322
|
+
return [];
|
|
64323
|
+
}
|
|
64324
|
+
}
|
|
64325
|
+
function phaseBatches(ph, runDir, engineAbs, batchSize = BATCH_SIZE2) {
|
|
64326
|
+
const run = resolve14(runDir);
|
|
64327
|
+
const spec = phaseSpec(ph.name);
|
|
64328
|
+
const role = spec.role;
|
|
64329
|
+
const items = worklistItems(ph);
|
|
64330
|
+
const chunks = toBatches(ph.ids, batchSize);
|
|
64331
|
+
const width = Math.max(2, String(chunks.length).length);
|
|
64332
|
+
const { promptDir, outDir } = batchPaths(run, ph.name);
|
|
64333
|
+
const contract = join33(run, "orchestration", "agents", `${role}.md`);
|
|
64334
|
+
return {
|
|
64335
|
+
kind: "ultra11y-orchestration-batches",
|
|
64336
|
+
schemaVersion: 1,
|
|
64337
|
+
phase: ph.name,
|
|
64338
|
+
role,
|
|
64339
|
+
run,
|
|
64340
|
+
engine: engineAbs,
|
|
64341
|
+
worklist: ph.worklist,
|
|
64342
|
+
items: ph.items,
|
|
64343
|
+
batchSize,
|
|
64344
|
+
schema: spec.schema,
|
|
64345
|
+
fold: ph.apply,
|
|
64346
|
+
batches: chunks.map((ids2, i) => {
|
|
64347
|
+
const id = `${ph.name}-${String(i + 1).padStart(width, "0")}`;
|
|
64348
|
+
return {
|
|
64349
|
+
id,
|
|
64350
|
+
phase: ph.name,
|
|
64351
|
+
role,
|
|
64352
|
+
index: i + 1,
|
|
64353
|
+
ids: ids2,
|
|
64354
|
+
items: items.slice(i * batchSize, i * batchSize + ids2.length),
|
|
64355
|
+
contract,
|
|
64356
|
+
prompt: join33(promptDir, `${id}.md`),
|
|
64357
|
+
output: join33(outDir, `${id}.json`),
|
|
64358
|
+
schema: spec.schema,
|
|
64359
|
+
fold: ph.apply
|
|
64360
|
+
};
|
|
64361
|
+
})
|
|
64362
|
+
};
|
|
64363
|
+
}
|
|
64255
64364
|
var EXIT_USAGE = "usage / bad input (missing or unreadable file, unknown flag value)";
|
|
64256
64365
|
function buildManifest(runDir, engineAbs, batchSize = BATCH_SIZE2) {
|
|
64257
64366
|
const run = resolve14(runDir);
|
|
@@ -64275,21 +64384,28 @@ function buildManifest(runDir, engineAbs, batchSize = BATCH_SIZE2) {
|
|
|
64275
64384
|
ready: ready(inputs),
|
|
64276
64385
|
next
|
|
64277
64386
|
});
|
|
64278
|
-
const judgment = (id, ph, role, title, inputs, next) =>
|
|
64279
|
-
|
|
64280
|
-
|
|
64281
|
-
|
|
64282
|
-
|
|
64283
|
-
|
|
64284
|
-
|
|
64285
|
-
|
|
64286
|
-
|
|
64287
|
-
|
|
64288
|
-
|
|
64289
|
-
|
|
64290
|
-
|
|
64291
|
-
|
|
64292
|
-
|
|
64387
|
+
const judgment = (id, ph, role, title, inputs, next) => {
|
|
64388
|
+
const pb = phaseBatches(ph, run, engineAbs, batchSize);
|
|
64389
|
+
return {
|
|
64390
|
+
id,
|
|
64391
|
+
kind: "judgment",
|
|
64392
|
+
title,
|
|
64393
|
+
role,
|
|
64394
|
+
contract: join33(run, "orchestration", "agents", `${role}.md`),
|
|
64395
|
+
worklist: ph.worklist,
|
|
64396
|
+
items: ph.items,
|
|
64397
|
+
batches: pb.batches.map((b) => b.ids),
|
|
64398
|
+
batchFile: batchPaths(run, ph.name).file,
|
|
64399
|
+
batchIds: pb.batches.map((b) => b.id),
|
|
64400
|
+
prompts: pb.batches.map((b) => b.prompt),
|
|
64401
|
+
batchOutputs: pb.batches.map((b) => b.output),
|
|
64402
|
+
schema: pb.schema,
|
|
64403
|
+
inputs,
|
|
64404
|
+
outputs: [ph.worklist],
|
|
64405
|
+
ready: ph.ready && ph.items > 0,
|
|
64406
|
+
next
|
|
64407
|
+
};
|
|
64408
|
+
};
|
|
64293
64409
|
const [adj, ver] = phases;
|
|
64294
64410
|
const verAudit = v2.flagArgs[v2.flagArgs.indexOf("--in") + 1];
|
|
64295
64411
|
return {
|
|
@@ -64436,13 +64552,16 @@ function orchestrateRun(runDir, engineAbs, opts = {}) {
|
|
|
64436
64552
|
const emitted = new Set(opts.eco ? [] : selected.filter((p2) => p2.items > 0).map((p2) => p2.name));
|
|
64437
64553
|
for (const ph of phases) {
|
|
64438
64554
|
if (emitted.has(ph.name)) continue;
|
|
64439
|
-
const
|
|
64440
|
-
|
|
64441
|
-
|
|
64442
|
-
|
|
64555
|
+
const { file, promptDir } = batchPaths(run, ph.name);
|
|
64556
|
+
const stale = [join33(orchDir, `${ph.name}.workflow.mjs`), file, promptDir].filter((f2) => existsSync31(f2));
|
|
64557
|
+
if (stale.length) {
|
|
64558
|
+
for (const f2 of stale) rmSync6(f2, { recursive: true, force: true });
|
|
64559
|
+
const why = opts.eco ? "--eco takes the sequential path" : !ph.ready ? "its worklist no longer exists" : ph.items === 0 ? "its worklist is now empty" : `--phase ${opts.phase} emits that phase only`;
|
|
64560
|
+
notices.push(`phase "${ph.name}": stale workflow and batches removed \u2014 ${why}.`);
|
|
64443
64561
|
}
|
|
64444
64562
|
}
|
|
64445
64563
|
if (!opts.eco) {
|
|
64564
|
+
const contracts = agentContracts(run, { verify: verifyRunContext(run) });
|
|
64446
64565
|
for (const ph of selected) {
|
|
64447
64566
|
if (ph.items === 0) {
|
|
64448
64567
|
notices.push(`phase "${ph.name}": worklist is empty \u2014 nothing to orchestrate.`);
|
|
@@ -64451,8 +64570,20 @@ function orchestrateRun(runDir, engineAbs, opts = {}) {
|
|
|
64451
64570
|
if (ph.items <= SMALL_WORKLIST) {
|
|
64452
64571
|
notices.push(`phase "${ph.name}": only ${ph.items} item(s) \u2014 the sequential --eco path is equivalent and cheaper.`);
|
|
64453
64572
|
}
|
|
64573
|
+
const pb = phaseBatches(ph, run, engineAbs, BATCH_SIZE2);
|
|
64574
|
+
const paths = batchPaths(run, ph.name);
|
|
64575
|
+
rmSync6(paths.promptDir, { recursive: true, force: true });
|
|
64576
|
+
mkdirSync14(paths.promptDir, { recursive: true });
|
|
64577
|
+
mkdirSync14(paths.outDir, { recursive: true });
|
|
64578
|
+
writeFileSync16(paths.file, `${JSON.stringify(pb, null, 2)}
|
|
64579
|
+
`);
|
|
64580
|
+
written.push(paths.file);
|
|
64581
|
+
for (const b of pb.batches) {
|
|
64582
|
+
writeFileSync16(b.prompt, batchPromptMd(pb, b, contracts[pb.role] ?? ""));
|
|
64583
|
+
written.push(b.prompt);
|
|
64584
|
+
}
|
|
64454
64585
|
const p2 = join33(orchDir, `${ph.name}.workflow.mjs`);
|
|
64455
|
-
writeFileSync16(p2, phaseWorkflowScript(
|
|
64586
|
+
writeFileSync16(p2, phaseWorkflowScript(pb));
|
|
64456
64587
|
written.push(p2);
|
|
64457
64588
|
}
|
|
64458
64589
|
}
|
|
@@ -64717,7 +64848,7 @@ import { createInterface } from "readline";
|
|
|
64717
64848
|
|
|
64718
64849
|
// src/mcp/handlers.ts
|
|
64719
64850
|
import { existsSync as existsSync32, lstatSync as lstatSync2, mkdirSync as mkdirSync15, readFileSync as readFileSync25, realpathSync as realpathSync7, statSync as statSync12, writeFileSync as writeFileSync17 } from "fs";
|
|
64720
|
-
import { basename as
|
|
64851
|
+
import { basename as basename4, dirname as dirname16, isAbsolute as isAbsolute5, join as join34, resolve as resolve15, sep as sep5 } from "path";
|
|
64721
64852
|
|
|
64722
64853
|
// src/criteria-view.ts
|
|
64723
64854
|
var CriteriaLookupError = class extends Error {
|
|
@@ -65603,7 +65734,7 @@ function containedPath(raw, cwd, field) {
|
|
|
65603
65734
|
} catch {
|
|
65604
65735
|
const parent = dirname16(existing);
|
|
65605
65736
|
if (parent === existing) break;
|
|
65606
|
-
rest.unshift(
|
|
65737
|
+
rest.unshift(basename4(existing));
|
|
65607
65738
|
existing = parent;
|
|
65608
65739
|
}
|
|
65609
65740
|
}
|
|
@@ -66451,7 +66582,7 @@ var DECLARED = new Set([...TOOLS, ...WRITE_TOOLS].map((t3) => t3.name));
|
|
|
66451
66582
|
|
|
66452
66583
|
// src/mcp/resources.ts
|
|
66453
66584
|
import { existsSync as existsSync33, readdirSync as readdirSync5, readFileSync as readFileSync26, realpathSync as realpathSync8, statSync as statSync13 } from "fs";
|
|
66454
|
-
import { basename as
|
|
66585
|
+
import { basename as basename5, dirname as dirname17, join as join35, resolve as resolve16, sep as sep6 } from "path";
|
|
66455
66586
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
66456
66587
|
var SKILL_NAME = "ultra11y";
|
|
66457
66588
|
var URI_SCHEME = "skill://";
|
|
@@ -66468,7 +66599,7 @@ function listResources(moduleDir) {
|
|
|
66468
66599
|
if (!existsSync33(refDir)) return out;
|
|
66469
66600
|
for (const file of readdirSync5(refDir).sort()) {
|
|
66470
66601
|
if (!file.endsWith(".md")) continue;
|
|
66471
|
-
out.push(describe(root, join35("references", file), `${SKILL_NAME} reference: ${
|
|
66602
|
+
out.push(describe(root, join35("references", file), `${SKILL_NAME} reference: ${basename5(file, ".md")}`));
|
|
66472
66603
|
}
|
|
66473
66604
|
return out;
|
|
66474
66605
|
}
|
|
@@ -67170,11 +67301,13 @@ Commands:
|
|
|
67170
67301
|
criterion, or only show its subject exists?). A refuted conformity
|
|
67171
67302
|
sends its criterion back to \xAB to assess \xBB, never to NC.
|
|
67172
67303
|
orchestrate Emit the run's multi-agent orchestration from its CURRENT worklists:
|
|
67173
|
-
|
|
67174
|
-
|
|
67175
|
-
|
|
67176
|
-
|
|
67177
|
-
|
|
67304
|
+
per ready phase (adjudicate over ADJUDICATE.todo.json, verify-report
|
|
67305
|
+
over VERIFY.todo.json) a harness-neutral <phase>.batches.json, one
|
|
67306
|
+
self-contained prompt per batch under <phase>/ (hand it verbatim to
|
|
67307
|
+
any subagent), and the Claude Code Workflow script rendered from the
|
|
67308
|
+
same batches; the agents/<role>.md dispatch contracts, and a
|
|
67309
|
+
sequential RUNBOOK.md fallback \u2014 absolute paths and the real worklist
|
|
67310
|
+
ids baked in. Subagents only RETURN verdict fragments; you (the caller) stay
|
|
67178
67311
|
the sole writer and fold them via verify --apply. --eco emits only
|
|
67179
67312
|
the RUNBOOK + contracts (the explicit low-token path); --list prints
|
|
67180
67313
|
the phases and their readiness as JSON. Re-run after a worklist
|
|
@@ -67432,7 +67565,7 @@ Options:
|
|
|
67432
67565
|
VERIFY.todo.json); artifacts land under <dir>/orchestration/
|
|
67433
67566
|
--phase <name> orchestrate: emit one phase only \u2014 adjudicate | verify-report
|
|
67434
67567
|
(exit 2 with the producing command if its worklist is missing)
|
|
67435
|
-
--eco orchestrate: emit only RUNBOOK.md + agents/*.md \u2014 the explicit
|
|
67568
|
+
--eco orchestrate: emit only RUNBOOK.md + agents/*.md (no batches, no workflow) \u2014 the explicit
|
|
67436
67569
|
sequential low-token path (also what a no-subagent harness follows)
|
|
67437
67570
|
--merge <file> scan: fold dynamic findings into this AuditResult JSON. With --json the
|
|
67438
67571
|
printed document opens with a 'pages' summary of the run \u2014
|
|
@@ -71076,11 +71209,16 @@ function cmdOrchestrate(p2) {
|
|
|
71076
71209
|
for (const w2 of res.written) console.log(` ${w2}`);
|
|
71077
71210
|
for (const n of res.notices) console.error(`ultra11y orchestrate: note \u2014 ${n}`);
|
|
71078
71211
|
const workflows = res.written.filter((w2) => w2.endsWith(".workflow.mjs"));
|
|
71212
|
+
const batchFiles = res.written.filter((w2) => w2.endsWith(".batches.json"));
|
|
71079
71213
|
if (workflows.length) {
|
|
71080
71214
|
console.log("");
|
|
71215
|
+
for (const b of batchFiles)
|
|
71216
|
+
console.log(
|
|
71217
|
+
lang === "fr" ? `Lots : ${b} \u2014 tout harness : confiez chaque prompt de ${b.replace(/\.batches\.json$/, "")}/ tel quel \xE0 un sous-agent, et enregistrez son JSON au chemin \`output\` du lot.` : `Batches: ${b} \u2014 any harness: hand each prompt in ${b.replace(/\.batches\.json$/, "")}/ verbatim to one subagent, and save its JSON at the batch's \`output\` path.`
|
|
71218
|
+
);
|
|
71081
71219
|
for (const w2 of workflows) console.log(`Launch: Workflow({ scriptPath: ${JSON.stringify(w2)} })`);
|
|
71082
71220
|
console.log(
|
|
71083
|
-
lang === "fr" ? "Puis fusionnez les fragments retourn\xE9s dans la worklist et lancez le `verify --apply` indiqu\xE9 en fin de workflow (vous restez le seul \xE9crivain)." : "Then fold the returned fragments into the worklist and run the `verify --apply` shown at the end of each workflow (you stay the sole writer)."
|
|
71221
|
+
lang === "fr" ? "Puis fusionnez les fragments retourn\xE9s dans la worklist et lancez le `verify --apply` indiqu\xE9 en fin de prompt ou de workflow (vous restez le seul \xE9crivain)." : "Then fold the returned fragments into the worklist and run the `verify --apply` shown at the end of each prompt or workflow (you stay the sole writer)."
|
|
71084
71222
|
);
|
|
71085
71223
|
} else {
|
|
71086
71224
|
console.log(
|
|
@@ -3,7 +3,7 @@ name: review-a11y
|
|
|
3
3
|
description: "Use to REVIEW changed frontend code for accessibility: staged files, a working diff, branch, or PR; prompts such as 'review a11y', 'is this accessible?', or 'anything to fix before merge?'; and hook or CI findings on a change. Run the bundled install-free engine with cross-file JSX/TSX analysis, then adjudicate candidates and return a severity-ranked WCAG 2.2 AA review with file:line fixes, residual rendering risks, and a verdict. Use `ultra11y` instead for whole-repo audits, dated conformance reports, country standards, PRD backlogs, or authoring accessible markup."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: 5.
|
|
6
|
+
version: 5.59.0
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# review-a11y — accessibility review of changed code
|
|
@@ -21,10 +21,18 @@ DOM to `scan`. A human is at most optional oversight.
|
|
|
21
21
|
`scripts/ultra11y.mjs` lives **next to this SKILL.md** (the engine ships inside the skill;
|
|
22
22
|
no install, no key). Run it with the reviewed project as the working directory. In the
|
|
23
23
|
ultra11y repository itself, the repo root's `scripts/ultra11y.mjs` is the same file.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
Resolve that path per harness:
|
|
25
|
+
- **Claude Code**: `${CLAUDE_SKILL_DIR}/scripts/ultra11y.mjs`.
|
|
26
|
+
- **Codex**: the installed skill directory — the plugin's copy, or
|
|
27
|
+
`~/.codex/skills/review-a11y/scripts/ultra11y.mjs` (under `$CODEX_HOME` when set) after
|
|
28
|
+
`ultra11y install --codex`.
|
|
29
|
+
- **OpenCode**: `~/.config/opencode/skills/review-a11y/scripts/ultra11y.mjs` (under
|
|
30
|
+
`$XDG_CONFIG_HOME` when set) after `ultra11y install --opencode`, or the npm package's
|
|
31
|
+
`skills/review-a11y/` when the plugin is pinned in `opencode.json`.
|
|
32
|
+
- **Anywhere else**, or when no skill directory resolves: `npx -y ultra11y <command>` is the
|
|
33
|
+
same engine.
|
|
34
|
+
|
|
35
|
+
Per-harness deltas: `references/harnesses.md` in the `ultra11y` skill.
|
|
28
36
|
|
|
29
37
|
> **Core rules** (shared with `ultra11y`):
|
|
30
38
|
> 1. **Never invent a non-conformity**: report only what the engine found or what you can
|
|
@@ -124,9 +132,11 @@ stop. Everything in §4 stays opt-in and belongs to the caller, not to you.
|
|
|
124
132
|
- **Formal deliverables** (dated report, auditor conformance blocks, PRD backlog, GitHub
|
|
125
133
|
issues, RGAA/country-standard vocabulary): that is the `ultra11y` skill — same engine,
|
|
126
134
|
same findings (`report`, `prd`, `check`/`verify` gates).
|
|
127
|
-
- **Make it automatic**: installed as a **Claude Code plugin**, a
|
|
128
|
-
pending `git commit` / `git push` / `gh pr create` that carries
|
|
129
|
-
|
|
135
|
+
- **Make it automatic**: installed as a **Claude Code, Codex or OpenCode plugin**, a hook on
|
|
136
|
+
the shell tool stops a pending `git commit` / `git push` / `gh pr create` that carries
|
|
137
|
+
findings and hands them over — a `PreToolUse` deny on Claude Code and Codex, a failed shell
|
|
138
|
+
call carrying the findings on OpenCode — and that is what invokes this skill without anyone
|
|
139
|
+
asking. It never fires twice for the
|
|
130
140
|
same findings, so a retry lands. For a gate that does not need an agent at all, the
|
|
131
141
|
`ultra11y` skill's `init --hook` installs a mechanical pre-commit run of this same staged
|
|
132
142
|
audit.
|