3daad86db8
Wires the .agents/scripts/audit-translations.mjs script into the
existing pnpm run verify chain as the first gate. A `pt` field
identical to its `en` counterpart is how a bilingual site quietly
becomes monolingual — this script catches that before any other
check runs.
Added an allowlist mechanism: the script now reads a sibling
`.agents/scripts/audit-translations.allowlist.json` file. Entries
in the allowlist are listed in the output under "ALLOWED" and do
not fail the gate. Currently 18 entries: numeric card labels
("01"–"06") in chapters/landing.json and chapters/summary.json, the
"Skills" product noun on both, the "Brief" handoff step label in
chapters/agents.json, and the three model-tier series names in
providers/{claude,gemini,openai}.json.
Adding to the allowlist requires a deliberate edit + commit; future
translators can see the allowlist and understand which identicals
are intentional.
The verify chain order is now:
1. audit-translations.mjs — fail-fast on translation regressions
2. verify.mjs — content + interaction contracts
3. audit-ui.mjs — responsive / no-external-dep audit
4. check-tokens.mjs — design-token enforcement
Ownership notes:
- package.json is owned by the astro-architect agent per
.agents/rules/git-worktrees.md. The wiring in this commit is the
change the user explicitly asked for; the architect should review
the format on merge.
- scripts/verify.mjs is owned by the verification-engineer agent
per the same table. The pre-existing assertion that `package.json`
contains the literal verify-script string no longer matches once
`audit-translations.mjs &&` is prepended. This commit updates the
assertion from a strict `.includes()` substring check to a regex
that allows the optional translation-audit prefix while still
requiring the three core scripts (verify.mjs, audit-ui.mjs,
check-tokens.mjs) to run in order. The regex still rejects any
chain that drops one of them.
Verified by running pnpm run verify from the worktree — all four
checks pass with the translations from the prior five commits.
39 lines
1.1 KiB
JSON
39 lines
1.1 KiB
JSON
{
|
|
"name": "ai-for-dummies",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "astro dev",
|
|
"build": "astro build",
|
|
"preview": "astro preview",
|
|
"check": "astro check",
|
|
"lint": "eslint . --max-warnings=0 && stylelint --allow-empty-input 'src/**/*.css' --max-warnings=0",
|
|
"format": "prettier --write .",
|
|
"verify": "node .agents/scripts/audit-translations.mjs && node scripts/verify.mjs && node scripts/audit-ui.mjs && node .agents/scripts/check-tokens.mjs",
|
|
"gate": "./.agents/scripts/gate.sh",
|
|
"snapshot": "node .agents/scripts/snapshot-route.mjs",
|
|
"prepare": "husky"
|
|
},
|
|
"devDependencies": {
|
|
"@astrojs/check": "0.9.4",
|
|
"@eslint/js": "^9",
|
|
"@typescript-eslint/parser": "^8",
|
|
"astro": "5.5.0",
|
|
"eslint": "^9",
|
|
"eslint-plugin-astro": "^1",
|
|
"husky": "^9",
|
|
"lint-staged": "^16",
|
|
"playwright": "^1.62.1",
|
|
"prettier": "^3",
|
|
"prettier-plugin-astro": "^0.14",
|
|
"stylelint": "^16",
|
|
"stylelint-config-standard": "^39",
|
|
"typescript": "^5.8.3"
|
|
},
|
|
"packageManager": "pnpm@11.25.0",
|
|
"engines": {
|
|
"node": ">=22.13",
|
|
"pnpm": ">=11"
|
|
}
|
|
}
|