### Initialize audit ledger with audit_ledger.py init Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/SKILL.md Run during full review setup to create the audit ledger file. Replace with the actual directory containing this SKILL.md and with your chosen output directory. The --name flag sets the project name. ```bash python3 /scripts/audit_ledger.py init /audit.json --name "" ``` -------------------------------- ### Discover frontend candidates with discover_frontend.py Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/SKILL.md Run read-only candidate discovery to enumerate potential pages and components. The tool provides heuristic clues and may miss dynamic and framework-specific cases; verify each candidate manually. Replace and as needed. ```bash python3 /scripts/discover_frontend.py --out /discovery-candidates.json ``` -------------------------------- ### 渲染画布模板调用示例 (render_map.py) Source: https://github.com/badbotai/badgoods/blob/main/skills/frontend-to-ue/SKILL.md 调用配套的 render_map.py 脚本,输入已脱敏目录并指定输出文件与项目简称,生成可缩放的 UE 页面地图。工具只负责渲染,不启动原前端或自动脱敏。 ```bash python3 scripts/render_map.py <已脱敏目录> --out <输出文件.html> --title <项目简称> ``` -------------------------------- ### 运行验证脚本(unittest、fixture 校验、台账检查) Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/README.md 在技能目录运行三条命令验证测试、示例和台账。最后一条 `scripts/audit_ledger.py check` 应返回 0;`--require-complete` 和 `--require-ready` 会返回 2,表示未满足完整验证/发布条件。 ```sh python3 -B -m unittest discover -s tests -v python3 -B examples/source-only/verify_fixture.py python3 -B scripts/audit_ledger.py check examples/source-only/audit.json --require-plan ``` -------------------------------- ### 运行验证脚本与审计检查(verify_fixture.py 和 audit_ledger.py) Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/examples/source-only/README.md 从技能根目录执行,依次运行验证脚本和两个审计检查。退出码依次为 0、0、2;静态脚本只验证标签关联、按钮类型与名称,不能证明点击、键盘、布局或安全已通过。 ```sh python3 -B examples/source-only/verify_fixture.py python3 -B scripts/audit_ledger.py check examples/source-only/audit.json --require-plan python3 -B scripts/audit_ledger.py check examples/source-only/audit.json --require-complete ``` -------------------------------- ### audit_ledger.py check --require-plan 校验台账结构 Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/SKILL.md 用于检查审计台账是否满足计划要求,退出码 0 表示满足,1 表示台账结构或关联错误。 ```bash python3 /scripts/audit_ledger.py check /audit.json --require-plan ``` -------------------------------- ### audit_ledger.py render 生成覆盖报告 Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/SKILL.md 用于渲染审计台账为覆盖报告,输出到指定文件。 ```bash python3 /scripts/audit_ledger.py render /audit.json --out /coverage.md ``` -------------------------------- ### 用只读搜索发现候选(rg 命令) Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/references/visual-accessibility-performance.md 在本地源码目录中搜索无障碍、水合、样式和性能相关的模式。运行前需将 AUDIT_SOURCE_DIR 替换为实际源码目录,并确认目录存在;结果仅作为定位线索,无匹配不代表没有问题。 ```bash AUDIT_SOURCE_DIR='src' rg -n --glob '*.{js,jsx,ts,tsx,vue,svelte,html}' 'aria-live|aria-modal|aria-hidden|tabIndex|tabindex|onKeyDown|composition' "$AUDIT_SOURCE_DIR" rg -n --glob '*.{js,jsx,ts,tsx,vue,svelte}' 'window[.]|document[.]|Date[.]now|Math[.]random|suppressHydrationWarning|setInterval|addEventListener|createObjectURL' "$AUDIT_SOURCE_DIR" rg -n --glob '*.{css,scss,less,js,jsx,ts,tsx,vue,svelte}' 'z-index|overflow|position:|100vh|prefers-reduced-motion|outline' "$AUDIT_SOURCE_DIR" ``` -------------------------------- ### audit_ledger.py check --require-complete 校验完整性 Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/SKILL.md 用于检查审计台账是否满足完整性要求,退出码 0 表示满足,1 表示台账结构或关联错误。 ```bash python3 /scripts/audit_ledger.py check /audit.json --require-complete ``` -------------------------------- ### Sync audit ledger with audit_ledger.py sync Source: https://github.com/badbotai/badgoods/blob/main/skills/review-frontend-production/SKILL.md Run after completing the minimum dimensions to update the audit ledger. sync does not perform review or generate pass/evidence; it only synchronizes the ledger. ```bash python3 /scripts/audit_ledger.py sync /audit.json ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.