@teevee98/synapse-hub 4.3.1 → 4.4.1
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/.cursor/rules/agents.mdc +11 -11
- package/.cursor/rules/katalon.mdc +11 -0
- package/.cursor/rules/perf.mdc +10 -0
- package/.cursor/rules/playwright.mdc +10 -0
- package/.cursor/rules/pytest.mdc +10 -0
- package/.cursor/rules/synapse-qa.mdc +4 -2
- package/.cursorrules +3 -10
- package/.windsurfrules +3 -10
- package/AGENTS.md +4 -3
- package/CLAUDE.md +4 -5
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/agentskills.json +15 -15
- package/{.agents/agents → ai-agents/personas}/api-engineer.md +9 -1
- package/{.agents/agents → ai-agents/personas}/failure-analyst.md +1 -1
- package/{.agents/agents → ai-agents/personas}/live-explorer.md +1 -1
- package/{.agents/agents → ai-agents/personas}/orchestrator.md +8 -15
- package/{.agents/agents → ai-agents/personas}/perf-engineer.md +11 -5
- package/{.agents/agents → ai-agents/personas}/pom-crafter.md +3 -9
- package/{.agents/agents → ai-agents/personas}/quality-gatekeeper.md +1 -1
- package/{.agents/agents → ai-agents/personas}/test-designer.md +2 -1
- package/{.agents/agents → ai-agents/personas}/test-runner.md +3 -4
- package/{.agents/rules → automation/playwright}/mandatory-playwright-live.md +5 -13
- package/{.agents/skills/01-web-automation → automation/playwright}/playwright-webapp-testing/SKILL.md +2 -0
- package/{.agents/skills/01-web-automation → automation/shared-utils}/clean-pom-crafter/SKILL.md +14 -3
- package/{.agents/skills/01-web-automation → automation/shared-utils}/e2e-testing-patterns/SKILL.md +12 -1
- package/{.agents/skills/01-web-automation → automation/shared-utils}/lam-script-generator/SKILL.md +2 -0
- package/docs/ARCHITECTURE.en.md +96 -3
- package/docs/ARCHITECTURE.md +87 -3
- package/docs/TOOL_CATALOG.md +17 -5
- package/docs/reports/AUDIT_REPORT.md +1038 -0
- package/docs/reports/PROJECT_HEALTH_REPORT.md +49 -0
- package/docs/reports/TECHNICAL_DEBT_LEDGER.md +22 -0
- package/package.json +8 -1
- package/plugin.json +1 -1
- package/{.agents/skills/02-test-design → requirement/spec-review}/review-spec/SKILL.md +8 -0
- package/scripts/install_global_plugin.ps1 +1 -1
- package/scripts/install_global_plugin.sh +1 -1
- package/skills_index.json +61 -0
- package/skills_manifest.json +88 -62
- package/{.agents/skills/08-code-quality → standards/coding-standards}/lean-code-ladder/SKILL.md +8 -1
- package/{.agents/skills/08-code-quality → standards/coding-standards}/surgical-coding-principles/SKILL.md +2 -0
- package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/mipro-prompt-compiler/SKILL.md +8 -0
- package/synapse.config.json +1 -1
- package/templates/ai_bridges/CLAUDE.md +4 -5
- package/templates/ai_bridges/copilot-instructions.md +1 -0
- package/templates/ai_bridges/cursor_synapse_qa.mdc +4 -2
- package/templates/ai_bridges/windsurfrules +3 -10
- package/templates/test-plan/performance-test-plan-template.md +106 -0
- package/{.agents/skills/02-test-design → test-design/manual-rbt}/rbt-manual-testing/SKILL.md +11 -5
- package/{.agents/skills/07-data-and-state → test-design/test-data}/file-and-report-validator/SKILL.md +8 -1
- package/{.agents/skills/07-data-and-state → test-design/test-data}/synthetic-test-data-generator/SKILL.md +4 -1
- package/testing/api-contracts/api_testing_rules.md +74 -0
- package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/agentless-qa-repair/SKILL.md +2 -0
- package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/SKILL.md +5 -11
- package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/self-healing-locator/SKILL.md +2 -0
- package/testing/manual/manual-qa-and-rtm-bridge/SKILL.md +92 -0
- package/testing/manual/manual-qa-and-rtm-bridge/examples/sample_bug_and_rtm.json +38 -0
- package/{.agents/skills/04-performance-and-load → testing/performance}/backend-load-and-stress-patterns/SKILL.md +5 -2
- package/testing/performance/backend-load-and-stress-patterns/references/performance_test_plan_29119.md +106 -0
- package/{.agents/rules → testing/performance}/performance_testing_rules.md +27 -3
- package/{.agents/skills/04-performance-and-load → testing/performance}/web-vitals-and-performance-profiler/SKILL.md +75 -14
- package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/SKILL.md +13 -2
- package/{.agents/rules → testing/security-a11y}/security_testing_rules.md +19 -0
- package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/wcag-audit-patterns/SKILL.md +4 -1
- package/tools/.infer_baseline.json +44 -3
- package/tools/TOOLS_RUNBOOK.md +246 -4
- package/tools/TOOL_CATALOG.json +199 -19
- package/tools/TOOL_INDEX.json +160 -0
- package/tools/__init__.py +1 -1
- package/tools/ai_eval_sentinel.py +403 -0
- package/tools/assertion_optimizer.py +188 -0
- package/tools/asvs_auditor.py +410 -0
- package/tools/author_integrity.py +12 -1
- package/tools/benchmark_swarm_context.py +1 -1
- package/tools/browser_helpers.js +2 -2
- package/tools/catalogs/api_contract_testing.json +107 -0
- package/tools/catalogs/auxiliary_utilities.json +1536 -0
- package/tools/catalogs/benchmarking.json +23 -0
- package/tools/catalogs/ci_cd_packaging.json +46 -0
- package/tools/catalogs/code_generation_ast.json +70 -0
- package/tools/catalogs/failure_autopsy_healing.json +41 -0
- package/tools/catalogs/manual_testing_design.json +80 -0
- package/tools/catalogs/orchestration.json +25 -0
- package/tools/catalogs/performance_testing.json +71 -0
- package/tools/catalogs/quality_gates.json +65 -0
- package/tools/catalogs/sandboxing_isolation.json +42 -0
- package/tools/catalogs/security.json +72 -0
- package/tools/catalogs/setup_onboarding.json +26 -0
- package/tools/catalogs/testing_utilities.json +111 -0
- package/tools/chaos_resilience_probe.py +362 -0
- package/tools/check_env.py +16 -3
- package/tools/check_version_sync.py +114 -63
- package/tools/cldr_l10n_verifier.py +309 -0
- package/tools/cli.py +971 -3
- package/tools/core/circuit_breaker.py +106 -0
- package/tools/core/token_estimator.py +56 -7
- package/tools/cvss_calculator.py +412 -0
- package/tools/dashboard_generator.py +12 -12
- package/tools/etl_data_reconciler.py +460 -0
- package/tools/generate_jmx_plan.py +12 -4
- package/tools/generate_tool_catalog.py +60 -2
- package/tools/jtl_analyzer.py +23 -1
- package/tools/mcp_docx_server.py +1 -1
- package/tools/mcp_excel_server.py +1 -1
- package/tools/mcp_server.py +5 -1
- package/tools/mobile_resilience_sentinel.py +273 -0
- package/tools/observability_tester.py +235 -0
- package/tools/payment_interop_simulator.py +337 -0
- package/tools/pre_push_guard.py +306 -0
- package/tools/project_state.py +17 -10
- package/tools/regulatory_compliance.py +336 -0
- package/tools/reversible_sandbox.py +7 -2
- package/tools/rules_router.py +6 -4
- package/tools/runaway_stopper.py +19 -111
- package/tools/setup_project.py +1 -1
- package/tools/skill_canonical_digest.py +2 -2
- package/tools/skillspector.py +78 -10
- package/tools/sync_agent_rules.py +15 -27
- package/tools/sync_skills_manifest.py +38 -4
- package/tools/tmmi_auditor.py +179 -0
- package/tools/ui_server.py +1 -1
- package/tools/update_sentinel.py +4 -4
- package/tools/validate_host_interop.py +3 -1
- package/tools/validate_skills_schema.py +49 -2
- package/tools/vpat_exporter.py +428 -0
- package/tools/welcome_page.py +4 -4
- package/.agents/rules/stack-auto-router.md +0 -30
- package/.agents/skills/09-ci-and-devops/github-actions-templates/SKILL.md +0 -114
- package/.agents/skills/09-ci-and-devops/github-actions-templates/examples/matrix_test_pipeline.yml +0 -9
- package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/SKILL.md +0 -123
- package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/examples/sample_gitlab_ci.yml +0 -17
- package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/SKILL.md +0 -133
- package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/examples/Jenkinsfile.example +0 -21
- package/.cursor/rules/language.mdc +0 -7
- package/templates/ci/github-actions-synapse.yml +0 -95
- package/templates/ci/gitlab-ci-synapse.yml +0 -16
- package/tools/build_consolidated_report.py +0 -1643
- package/tools/create_mock_docx.py +0 -107
- /package/{.agents → ai-agents/hooks}/hooks.json +0 -0
- /package/{.agents → ai-agents}/hooks/session_start.py +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/actor-qa-swarm/SKILL.md +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/actor-qa-swarm/examples/broker_sharding_sample.json +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/agent-orchestration-multi-agent-optimize/SKILL.md +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/agent-orchestration-multi-agent-optimize/examples/swarm_workload_config.json +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/event-stream-qa-orchestrator/SKILL.md +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/event-stream-qa-orchestrator/examples/timeline_sample.jsonl +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/persistent-planning-files/SKILL.md +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/persistent-planning-files/examples/task_plan_example.md +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/qa-memory-os/SKILL.md +0 -0
- /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/qa-memory-os/examples/archival_memory_sample.json +0 -0
- /package/{.agents → ai-agents}/workflows/graphify.md +0 -0
- /package/{.agents → ai-agents}/workflows/test-impact.md +0 -0
- /package/{.agents → ai-agents}/workflows/verify.md +0 -0
- /package/{.agents/rules → automation/cypress}/cypress_rules.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/SKILL.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/examples/headless_kre_exec.sh +0 -0
- /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/references/groovy-patterns.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/references/katalon-api.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/references/runner_commands.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/SKILL.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/examples/BaseScreen.java +0 -0
- /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/examples/LoginScreen.java +0 -0
- /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/examples/TC_MobileLogin.java +0 -0
- /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-maestro-detox-patterns/SKILL.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-maestro-detox-patterns/examples/sample_flow.yaml +0 -0
- /package/{.agents/rules → automation/mobile}/mobile_appium_rules.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/SKILL.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/examples/live_probe_script.js +0 -0
- /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/advanced_superpowers.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/compact_accessibility_snapshots.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/recipes.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/swarm_orchestration.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-webapp-testing/examples/server_lifecycle_playwright.py +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/auth-session-and-cookie-manager/SKILL.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/auth-session-and-cookie-manager/examples/multi_role_auth_matrix.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/auth-session-and-cookie-manager/examples/storage_state_sample.json +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/bats-testing-patterns/SKILL.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/bats-testing-patterns/examples/cli_runner_test.bats +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/bats-testing-patterns/resources/implementation-playbook.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/clean-pom-crafter/examples/standard_test_case.groovy +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/clean-pom-crafter/references/pom_patterns.groovy +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/e2e-testing-patterns/examples/playwright_sharded_config.ts +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/e2e-testing-patterns/resources/implementation-playbook.md +0 -0
- /package/{.agents/skills/01-web-automation → automation/shared-utils}/lam-script-generator/examples/user_story_sample.md +0 -0
- /package/{.agents/skills/03-api-and-contracts → requirement/spec-review}/api-spec-to-e2e-matrix/SKILL.md +0 -0
- /package/{.agents/skills/03-api-and-contracts → requirement/spec-review}/api-spec-to-e2e-matrix/examples/sample_openapi.json +0 -0
- /package/{.agents/skills/02-test-design → requirement/spec-review}/architecture-decision-records/SKILL.md +0 -0
- /package/{.agents/skills/02-test-design → requirement/spec-review}/architecture-decision-records/examples/0001-record-architecture-decisions.md +0 -0
- /package/{.agents/skills/02-test-design → requirement/spec-review}/review-spec/examples/pocock_grilling_decision_rubric.md +0 -0
- /package/{.agents/skills/02-test-design → requirement/spec-review}/review-spec/examples/sample_spec_review.md +0 -0
- /package/{.agents → requirement}/workflows/analyze_requirement_document.md +0 -0
- /package/{.agents → requirement}/workflows/generate_requirements_from_website.md +0 -0
- /package/{.agents/rules → standards/coding-standards}/author-integrity-guard.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/SKILL.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/examples/refactored_playwright_pom.ts +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/resources/implementation-playbook.md +0 -0
- /package/{.agents/rules → standards/coding-standards}/communication-style.md +0 -0
- /package/{.agents/rules → standards/coding-standards}/git-push-protocol.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/graphify-impact-analyzer/SKILL.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/graphify-impact-analyzer/examples/dependency_blast_radius.json +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/lean-code-ladder/examples/ladder_walkthrough.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/repo-quality-audit/SKILL.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/repo-quality-audit/examples/sample_audit_walkthrough.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/repo-quality-audit/examples/sample_repo_audit.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/senior-code-review/SKILL.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/senior-code-review/examples/sample_review_walkthrough.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/surgical-coding-principles/examples/surgical_vs_scope_creep.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/technical-debt-harvester/SKILL.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/technical-debt-harvester/examples/sample_debt_ledger.md +0 -0
- /package/{.agents/skills/08-code-quality → standards/coding-standards}/technical-debt-harvester/examples/sample_ledger_output.md +0 -0
- /package/{.agents/rules → standards/context-ai}/context-engineering.md +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/meta-prompt-crafter/SKILL.md +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/meta-prompt-crafter/examples/qa_prompt_template.md +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/mipro-prompt-compiler/examples/compiled_module_sample.json +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/mipro-prompt-compiler/examples/dspy_assertion_optimizer_case.md +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/qa-aci-interface/SKILL.md +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/qa-aci-interface/examples/surgical_code_window_walkthrough.md +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/qa-aci-interface/examples/surgical_edit_sample.json +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/token-and-context-optimizer/SKILL.md +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/token-and-context-optimizer/examples/distilled_log_sample.txt +0 -0
- /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/token-and-context-optimizer/references/context_engineering_guide.md +0 -0
- /package/{.agents/rules → standards/qa-process}/graphify.md +0 -0
- /package/{.agents/rules → standards/qa-process}/lessons-learned.md +0 -0
- /package/{.agents/rules → standards/qa-process}/skill-precedence.md +0 -0
- /package/{.agents/rules → standards/quality-gates}/systematic-debugging.md +0 -0
- /package/{.agents/templates → templates/test-report}/completion_report.md +0 -0
- /package/{.agents/skills/02-test-design → test-design/bdd-gherkin}/gherkin-to-suite/SKILL.md +0 -0
- /package/{.agents/skills/02-test-design → test-design/bdd-gherkin}/gherkin-to-suite/examples/checkout.feature +0 -0
- /package/{.agents/skills/02-test-design → test-design/bdd-gherkin}/gherkin-to-suite/examples/suite_report_sample.json +0 -0
- /package/{.agents → test-design/bdd-gherkin}/workflows/generate_cross_module_test_plan.md +0 -0
- /package/{.agents → test-design/bdd-gherkin}/workflows/generate_testcases_from_requirements.md +0 -0
- /package/{.agents/skills/02-test-design → test-design/exploratory}/tot-exploratory-testing/SKILL.md +0 -0
- /package/{.agents/skills/02-test-design → test-design/exploratory}/tot-exploratory-testing/examples/payment_gateway_tot_tree.json +0 -0
- /package/{.agents/skills/02-test-design → test-design/exploratory}/tot-exploratory-testing/examples/tot_graph_sample.json +0 -0
- /package/{.agents/skills/02-test-design → test-design/manual-rbt}/rbt-manual-testing/examples/checkout_rbt_manual_suite.md +0 -0
- /package/{.agents/skills/02-test-design → test-design/manual-rbt}/rbt-manual-testing/references/field_validation_checklist.md +0 -0
- /package/{.agents → test-design/manual-rbt}/workflows/export_testcases_excel.md +0 -0
- /package/{.agents → test-design/manual-rbt}/workflows/generate_manual_testcases_rbt.md +0 -0
- /package/{.agents/skills/07-data-and-state → test-design/test-data}/db-state-verifier-and-seeder/SKILL.md +0 -0
- /package/{.agents/skills/07-data-and-state → test-design/test-data}/db-state-verifier-and-seeder/examples/db_fixture_seed.json +0 -0
- /package/{.agents/skills/07-data-and-state → test-design/test-data}/file-and-report-validator/examples/sample_export_schema.json +0 -0
- /package/{.agents/skills/07-data-and-state → test-design/test-data}/synthetic-test-data-generator/examples/idempotent_data_recipe.json +0 -0
- /package/{.agents → test-design/test-data}/workflows/generate_combinatorial_test_data.md +0 -0
- /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/api-network-mocking-interception/SKILL.md +0 -0
- /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/api-network-mocking-interception/examples/network_route_stub.json +0 -0
- /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/consumer-driven-contract-testing/SKILL.md +0 -0
- /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/consumer-driven-contract-testing/examples/order_service_pact.json +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/agentless-qa-repair/examples/healing_report_sample.json +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/agentless-qa-repair/examples/three_phase_repair_workflow.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/antigravity-test-sentinel/SKILL.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/antigravity-test-sentinel/examples/dod_gate_policy.json +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/antigravity-test-sentinel/examples/sprint_dod_enforcement.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/examples/closed_loop_healing_walkthrough.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/examples/sample_junit_failure.xml +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/references/healing_matrix.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/references/qa_investigation_protocol.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/scripts/triage_failures.sh +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/flaky-test-sentinel-and-quarantine/SKILL.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/flaky-test-sentinel-and-quarantine/examples/quarantine_registry.json +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/self-healing-locator/examples/aom_diff_sample.json +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/systematic-debugging/SKILL.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/systematic-debugging/examples/four_phase_case.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/test-driven-development/SKILL.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/test-driven-development/examples/red_green_refactor_qa.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/verification-before-completion/SKILL.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/verification-before-completion/examples/evidence_log_example.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/visual-regression-sentinel/SKILL.md +0 -0
- /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/visual-regression-sentinel/examples/visual_mask_rules.json +0 -0
- /package/{.agents/skills/04-performance-and-load → testing/performance}/backend-load-and-stress-patterns/examples/k6_load_test_sample.js +0 -0
- /package/{.agents/skills/04-performance-and-load → testing/performance}/backend-load-and-stress-patterns/references/k6_load_template.js +0 -0
- /package/{.agents/skills/04-performance-and-load → testing/performance}/lean-impact-scoreboard/SKILL.md +0 -0
- /package/{.agents/skills/04-performance-and-load → testing/performance}/lean-impact-scoreboard/examples/sample_benchmark_gain.md +0 -0
- /package/{.agents/skills/04-performance-and-load → testing/performance}/lean-impact-scoreboard/examples/sample_scoreboard.md +0 -0
- /package/{.agents/skills/04-performance-and-load → testing/performance}/web-vitals-and-performance-profiler/examples/cwv_budget_policy.json +0 -0
- /package/{.agents/skills/04-performance-and-load → testing/performance}/web-vitals-and-performance-profiler/examples/playwright_cwv_profiler_fixture.ts +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/examples/dast_scan_config.json +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/references/AI-AND-LLM.md +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/references/ATTACK-CLASSES.md +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/references/dast_recipes.ts +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/skillspector-security-guard/SKILL.md +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/skillspector-security-guard/examples/audit_threat_vectors_report.json +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/skillspector-security-guard/examples/safe_mcp_config.json +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/wcag-audit-patterns/examples/wcag_compliance_checklist.json +0 -0
- /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/wcag-audit-patterns/resources/implementation-playbook.md +0 -0
- /package/{.agents/skills/01-web-automation → tools/benchmarks-tests}/web-agent-gym-benchmarking/SKILL.md +0 -0
- /package/{.agents/skills/01-web-automation → tools/benchmarks-tests}/web-agent-gym-benchmarking/examples/benchmark_report_sample.json +0 -0
- /package/{.agents/skills/01-web-automation → tools/benchmarks-tests}/web-agent-gym-benchmarking/examples/enterprise_tasks_suite.json +0 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright (c) 2026 Thế Vị (@TeeVee98). All rights reserved.
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
# Project: Synapse-Hub (https://github.com/TeeVee98/Synapse-Hub)
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
tools/cldr_l10n_verifier.py — Enterprise Unicode CLDR & L10n/I18n Verification Engine
|
|
8
|
+
-------------------------------------------------------------------------------------
|
|
9
|
+
Conforms to Unicode Common Locale Data Repository (CLDR) standards:
|
|
10
|
+
1. Date, Time, Number, and Currency formatting validation across world locales
|
|
11
|
+
(en-US, vi-VN, de-DE, fr-FR, ja-JP, ar-SA).
|
|
12
|
+
2. Pseudo-Localization Transformation Engine: Generates diacritic-expanded strings
|
|
13
|
+
with length padding ([!!! ... !!!]) to detect hardcoded text and UI truncation.
|
|
14
|
+
3. Locale Alphabetical Collation (sorting order) verification.
|
|
15
|
+
4. Template Hardcoded String Scanner.
|
|
16
|
+
|
|
17
|
+
Usage:
|
|
18
|
+
python tools/cldr_l10n_verifier.py --pseudo "Confirm Payment"
|
|
19
|
+
python tools/cldr_l10n_verifier.py --verify-currency "1.234.500 ₫" --locale vi-VN
|
|
20
|
+
python tools/cldr_l10n_verifier.py --verify-date "17/11/2026" --locale vi-VN
|
|
21
|
+
python tools/cldr_l10n_verifier.py --scan-html template.html
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
import os
|
|
25
|
+
import sys
|
|
26
|
+
import json
|
|
27
|
+
import re
|
|
28
|
+
import argparse
|
|
29
|
+
from typing import Dict, List, Any, Tuple
|
|
30
|
+
from html.parser import HTMLParser
|
|
31
|
+
|
|
32
|
+
# Enforce UTF-8 stdout encoding for Windows console compatibility
|
|
33
|
+
if hasattr(sys.stdout, "reconfigure"):
|
|
34
|
+
try:
|
|
35
|
+
sys.stdout.reconfigure(encoding="utf-8")
|
|
36
|
+
sys.stderr.reconfigure(encoding="utf-8")
|
|
37
|
+
except Exception:
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# ==============================================================================
|
|
42
|
+
# UNICODE CLDR LOCALE DEFINITIONS & SPECIFICATIONS
|
|
43
|
+
# ==============================================================================
|
|
44
|
+
|
|
45
|
+
CLDR_LOCALES = {
|
|
46
|
+
"en-US": {
|
|
47
|
+
"name": "English (United States)",
|
|
48
|
+
"decimal": ".",
|
|
49
|
+
"thousands": ",",
|
|
50
|
+
"currency_symbol": "$",
|
|
51
|
+
"currency_pattern": re.compile(r"^\$\s?[0-9]{1,3}(?:,[0-9]{3})*(?:\.[0-9]{2})?$"),
|
|
52
|
+
"date_pattern": re.compile(r"^(?:0?[1-9]|1[0-2])/(?:0?[1-9]|[12][0-9]|3[01])/\d{4}$"),
|
|
53
|
+
"date_format_example": "MM/DD/YYYY (e.g. 11/17/2026)",
|
|
54
|
+
"rtl": False,
|
|
55
|
+
},
|
|
56
|
+
"vi-VN": {
|
|
57
|
+
"name": "Vietnamese (Vietnam)",
|
|
58
|
+
"decimal": ",",
|
|
59
|
+
"thousands": ".",
|
|
60
|
+
"currency_symbol": "₫",
|
|
61
|
+
"currency_pattern": re.compile(r"^[0-9]{1,3}(?:\.[0-9]{3})*(?:,[0-9]{1,2})?\s?(?:₫|VND)$", re.IGNORECASE),
|
|
62
|
+
"date_pattern": re.compile(r"^(?:0?[1-9]|[12][0-9]|3[01])/(?:0?[1-9]|1[0-2])/\d{4}$"),
|
|
63
|
+
"date_format_example": "DD/MM/YYYY (e.g. 17/11/2026)",
|
|
64
|
+
"rtl": False,
|
|
65
|
+
},
|
|
66
|
+
"de-DE": {
|
|
67
|
+
"name": "German (Germany)",
|
|
68
|
+
"decimal": ",",
|
|
69
|
+
"thousands": ".",
|
|
70
|
+
"currency_symbol": "€",
|
|
71
|
+
"currency_pattern": re.compile(r"^[0-9]{1,3}(?:\.[0-9]{3})*(?:,[0-9]{2})?\s?€$"),
|
|
72
|
+
"date_pattern": re.compile(r"^(?:0?[1-9]|[12][0-9]|3[01])\.(?:0?[1-9]|1[0-2])\.\d{4}$"),
|
|
73
|
+
"date_format_example": "DD.MM.YYYY (e.g. 17.11.2026)",
|
|
74
|
+
"rtl": False,
|
|
75
|
+
},
|
|
76
|
+
"fr-FR": {
|
|
77
|
+
"name": "French (France)",
|
|
78
|
+
"decimal": ",",
|
|
79
|
+
"thousands": " ",
|
|
80
|
+
"currency_symbol": "€",
|
|
81
|
+
"currency_pattern": re.compile(r"^[0-9]{1,3}(?:[\s\u00A0\u202F][0-9]{3})*(?:,[0-9]{2})?\s?€$"),
|
|
82
|
+
"date_pattern": re.compile(r"^(?:0?[1-9]|[12][0-9]|3[01])/(?:0?[1-9]|1[0-2])/\d{4}$"),
|
|
83
|
+
"date_format_example": "DD/MM/YYYY (e.g. 17/11/2026)",
|
|
84
|
+
"rtl": False,
|
|
85
|
+
},
|
|
86
|
+
"ja-JP": {
|
|
87
|
+
"name": "Japanese (Japan)",
|
|
88
|
+
"decimal": ".",
|
|
89
|
+
"thousands": ",",
|
|
90
|
+
"currency_symbol": "¥",
|
|
91
|
+
"currency_pattern": re.compile(r"^[¥¥]\s?[0-9]{1,3}(?:,[0-9]{3})*$"),
|
|
92
|
+
"date_pattern": re.compile(r"^\d{4}/(?:0?[1-9]|1[0-2])/(?:0?[1-9]|[12][0-9]|3[01])$|^\d{4}年(?:0?[1-9]|1[0-2])月(?:0?[1-9]|[12][0-9]|3[01])日$"),
|
|
93
|
+
"date_format_example": "YYYY/MM/DD (e.g. 2026/11/17)",
|
|
94
|
+
"rtl": False,
|
|
95
|
+
},
|
|
96
|
+
"ar-SA": {
|
|
97
|
+
"name": "Arabic (Saudi Arabia)",
|
|
98
|
+
"decimal": "٫",
|
|
99
|
+
"thousands": "٬",
|
|
100
|
+
"currency_symbol": "ر.س",
|
|
101
|
+
"currency_pattern": re.compile(r"^[0-9\u0660-\u0669]+.*(?:ر\.س|SAR)"),
|
|
102
|
+
"date_pattern": re.compile(r"^(?:0?[1-9]|[12][0-9]|3[01])/(?:0?[1-9]|1[0-2])/\d{4}$"),
|
|
103
|
+
"date_format_example": "DD/MM/YYYY",
|
|
104
|
+
"rtl": True,
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
# ==============================================================================
|
|
110
|
+
# PSEUDO-LOCALIZATION ENGINE
|
|
111
|
+
# ==============================================================================
|
|
112
|
+
|
|
113
|
+
ACCENT_CHAR_MAP = {
|
|
114
|
+
"A": "Å", "B": "Ɓ", "C": "Ç", "D": "Ð", "E": "É", "F": "Ƒ", "G": "Ĝ",
|
|
115
|
+
"H": "Ĥ", "I": "Ì", "J": "Ĵ", "K": "Ķ", "L": "Ł", "M": "Ṁ", "N": "Ñ",
|
|
116
|
+
"O": "Ò", "P": "Þ", "Q": "Ǫ", "R": "Ŕ", "S": "Š", "T": "Ţ", "U": "Ù",
|
|
117
|
+
"V": "Ṽ", "W": "Ŵ", "X": "Ẋ", "Y": "Ý", "Z": "Ž",
|
|
118
|
+
"a": "à", "b": "ƀ", "c": "ç", "d": "đ", "e": "è", "f": "ƒ", "g": "ĝ",
|
|
119
|
+
"h": "ĥ", "i": "ì", "j": "ĵ", "k": "ķ", "l": "ł", "m": "ṁ", "n": "ñ",
|
|
120
|
+
"o": "ò", "p": "þ", "q": "ǫ", "r": "ŕ", "s": "š", "t": "ţ", "u": "ù",
|
|
121
|
+
"v": "ṽ", "w": "ŵ", "x": "ẋ", "y": "ý", "z": "ž",
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def pseudo_localize(text: str, expand_pct: int = 35) -> str:
|
|
126
|
+
"""
|
|
127
|
+
Transforms plain English strings into pseudo-localized test strings:
|
|
128
|
+
1. Replaces ASCII letters with accented visual equivalents.
|
|
129
|
+
2. Preserves format placeholders like {0}, %s, {name}.
|
|
130
|
+
3. Expands length by expand_pct% to detect UI layout overflow / truncation.
|
|
131
|
+
4. Wraps in [!!! ... !!!] markers.
|
|
132
|
+
"""
|
|
133
|
+
if not text:
|
|
134
|
+
return text
|
|
135
|
+
|
|
136
|
+
# Protect formatting placeholders: {variable}, %s, %d
|
|
137
|
+
placeholder_pattern = re.compile(r"(\{[a-zA-Z0-9_]+\}|%[a-zA-Z])")
|
|
138
|
+
tokens = placeholder_pattern.split(text)
|
|
139
|
+
|
|
140
|
+
transformed_tokens = []
|
|
141
|
+
for token in tokens:
|
|
142
|
+
if placeholder_pattern.match(token):
|
|
143
|
+
transformed_tokens.append(token)
|
|
144
|
+
else:
|
|
145
|
+
transformed_chars = [ACCENT_CHAR_MAP.get(c, c) for c in token]
|
|
146
|
+
transformed_tokens.append("".join(transformed_chars))
|
|
147
|
+
|
|
148
|
+
body = "".join(transformed_tokens)
|
|
149
|
+
|
|
150
|
+
# Calculate padding length for UI overflow testing
|
|
151
|
+
pad_len = max(int(len(text) * (expand_pct / 100.0)), 2)
|
|
152
|
+
padding = "~" + ("one two three four five six seven eight nine ten"[:pad_len].strip()) + "~"
|
|
153
|
+
|
|
154
|
+
return f"[!!! {body} {padding} !!!]"
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
# ==============================================================================
|
|
158
|
+
# CLDR FORMAT VERIFIER FUNCTIONS
|
|
159
|
+
# ==============================================================================
|
|
160
|
+
|
|
161
|
+
def verify_date_format(date_str: str, locale_code: str) -> Tuple[bool, str]:
|
|
162
|
+
"""Validates date string conformance against CLDR locale pattern."""
|
|
163
|
+
loc = CLDR_LOCALES.get(locale_code)
|
|
164
|
+
if not loc:
|
|
165
|
+
return False, f"Unsupported locale '{locale_code}'"
|
|
166
|
+
pat = loc["date_pattern"]
|
|
167
|
+
if pat.match(date_str.strip()):
|
|
168
|
+
return True, f"Valid {locale_code} date format ({loc['date_format_example']})"
|
|
169
|
+
return False, f"Invalid {locale_code} date format: '{date_str}'. Expected {loc['date_format_example']}."
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def verify_currency_format(currency_str: str, locale_code: str) -> Tuple[bool, str]:
|
|
173
|
+
"""Validates currency string conformance against CLDR locale rules."""
|
|
174
|
+
loc = CLDR_LOCALES.get(locale_code)
|
|
175
|
+
if not loc:
|
|
176
|
+
return False, f"Unsupported locale '{locale_code}'"
|
|
177
|
+
pat = loc["currency_pattern"]
|
|
178
|
+
if pat.match(currency_str.strip()):
|
|
179
|
+
return True, f"Valid {locale_code} currency format ({loc['name']})"
|
|
180
|
+
return False, f"Invalid {locale_code} currency format: '{currency_str}'."
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def verify_collation_order(items: List[str], locale_code: str = "vi-VN") -> Tuple[bool, List[str]]:
|
|
184
|
+
"""
|
|
185
|
+
Verifies that a list of strings is sorted in correct alphabetical collation.
|
|
186
|
+
For vi-VN, accounts for Vietnamese diacritics ordering (a, ă, â, b, c, d, đ, e, ê, ...).
|
|
187
|
+
"""
|
|
188
|
+
# Vietnamese custom alphabet weight table
|
|
189
|
+
vi_alphabet = "aàáảãạăằắẳẵặâầấẩẫậbcdđeèéẻẽẹêềếểễệghiìíỉĩịklmnoòóỏõọôồốổỗộơờớởỡợpqrstuùúủũụưừứửữựvxyỳýỷỹỵ"
|
|
190
|
+
char_weight = {c: i for i, c in enumerate(vi_alphabet)}
|
|
191
|
+
|
|
192
|
+
def vi_sort_key(s: str):
|
|
193
|
+
key = []
|
|
194
|
+
for ch in s.lower():
|
|
195
|
+
key.append(char_weight.get(ch, ord(ch) + 1000))
|
|
196
|
+
return key
|
|
197
|
+
|
|
198
|
+
if locale_code == "vi-VN":
|
|
199
|
+
sorted_expected = sorted(items, key=vi_sort_key)
|
|
200
|
+
else:
|
|
201
|
+
sorted_expected = sorted(items)
|
|
202
|
+
|
|
203
|
+
is_sorted = (items == sorted_expected)
|
|
204
|
+
return is_sorted, sorted_expected
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# ==============================================================================
|
|
208
|
+
# HTML TEMPLATE HARDCODED STRINGS AUDITOR
|
|
209
|
+
# ==============================================================================
|
|
210
|
+
|
|
211
|
+
class HTMLHardcodedStringAuditor(HTMLParser):
|
|
212
|
+
"""Scans HTML documents to find untranslated, hardcoded text nodes."""
|
|
213
|
+
|
|
214
|
+
def __init__(self):
|
|
215
|
+
super().__init__()
|
|
216
|
+
self.hardcoded_strings: List[Dict[str, Any]] = []
|
|
217
|
+
self.current_tag = ""
|
|
218
|
+
self.ignored_tags = {"script", "style", "code", "pre", "svg", "noscript"}
|
|
219
|
+
|
|
220
|
+
def handle_starttag(self, tag, attrs):
|
|
221
|
+
self.current_tag = tag.lower()
|
|
222
|
+
|
|
223
|
+
def handle_data(self, data):
|
|
224
|
+
if self.current_tag in self.ignored_tags:
|
|
225
|
+
return
|
|
226
|
+
cleaned = data.strip()
|
|
227
|
+
# Heuristic: Text with letters that is not a template placeholder like {{ ... }} or {% ... %}
|
|
228
|
+
if cleaned and len(cleaned) > 2 and re.search(r"[a-zA-Z]{2,}", cleaned):
|
|
229
|
+
if not (cleaned.startswith("{{") or cleaned.startswith("{%") or cleaned.startswith("$")):
|
|
230
|
+
self.hardcoded_strings.append({
|
|
231
|
+
"tag": self.current_tag,
|
|
232
|
+
"text": cleaned,
|
|
233
|
+
"suggestion": f"Wrap with i18n translation key (e.g. t('{cleaned}'))",
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
# ==============================================================================
|
|
238
|
+
# CLI HANDLER
|
|
239
|
+
# ==============================================================================
|
|
240
|
+
|
|
241
|
+
def main():
|
|
242
|
+
parser = argparse.ArgumentParser(
|
|
243
|
+
description="Synapse Hub Unicode CLDR & L10n/I18n Verification Engine",
|
|
244
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
245
|
+
)
|
|
246
|
+
parser.add_argument("--pseudo", help="Generate pseudo-localized string for UI truncation/encoding testing")
|
|
247
|
+
parser.add_argument("--expand", type=int, default=35, help="Expansion percentage for pseudo-localization (default: 35%%)")
|
|
248
|
+
parser.add_argument("--verify-date", help="Date string to validate against locale (e.g. '17/11/2026')")
|
|
249
|
+
parser.add_argument("--verify-currency", help="Currency string to validate (e.g. '1.500.000 ₫' or '$1,234.56')")
|
|
250
|
+
parser.add_argument("--locale", default="vi-VN", choices=list(CLDR_LOCALES.keys()), help="Target CLDR locale code")
|
|
251
|
+
parser.add_argument("--scan-html", help="Path to HTML template to detect hardcoded non-i18n strings")
|
|
252
|
+
parser.add_argument("--json", action="store_true", help="Output results in structured JSON format")
|
|
253
|
+
|
|
254
|
+
args = parser.parse_args()
|
|
255
|
+
|
|
256
|
+
if args.pseudo:
|
|
257
|
+
res = pseudo_localize(args.pseudo, expand_pct=args.expand)
|
|
258
|
+
if args.json:
|
|
259
|
+
print(json.dumps({"original": args.pseudo, "pseudo_localized": res, "expansion_pct": args.expand}, indent=2, ensure_ascii=False))
|
|
260
|
+
else:
|
|
261
|
+
print(f"Original : {args.pseudo}")
|
|
262
|
+
print(f"Pseudo : {res}")
|
|
263
|
+
print(f"Length : {len(args.pseudo)} -> {len(res)} chars (+{len(res)-len(args.pseudo)} chars for layout test)")
|
|
264
|
+
return 0
|
|
265
|
+
|
|
266
|
+
if args.verify_date:
|
|
267
|
+
valid, msg = verify_date_format(args.verify_date, args.locale)
|
|
268
|
+
status = "\033[92m[PASS]\033[0m" if valid else "\033[91m[FAIL]\033[0m"
|
|
269
|
+
print(f"{status} {msg}")
|
|
270
|
+
return 0 if valid else 1
|
|
271
|
+
|
|
272
|
+
if args.verify_currency:
|
|
273
|
+
valid, msg = verify_currency_format(args.verify_currency, args.locale)
|
|
274
|
+
status = "\033[92m[PASS]\033[0m" if valid else "\033[91m[FAIL]\033[0m"
|
|
275
|
+
print(f"{status} {msg}")
|
|
276
|
+
return 0 if valid else 1
|
|
277
|
+
|
|
278
|
+
if args.scan_html:
|
|
279
|
+
if not os.path.exists(args.scan_html):
|
|
280
|
+
print(f"❌ Error: HTML file not found: {args.scan_html}", file=sys.stderr)
|
|
281
|
+
return 2
|
|
282
|
+
with open(args.scan_html, "r", encoding="utf-8", errors="ignore") as f:
|
|
283
|
+
html = f.read()
|
|
284
|
+
auditor = HTMLHardcodedStringAuditor()
|
|
285
|
+
auditor.feed(html)
|
|
286
|
+
payload = {
|
|
287
|
+
"file": args.scan_html,
|
|
288
|
+
"total_hardcoded_strings": len(auditor.hardcoded_strings),
|
|
289
|
+
"findings": auditor.hardcoded_strings,
|
|
290
|
+
}
|
|
291
|
+
if args.json:
|
|
292
|
+
print(json.dumps(payload, indent=2, ensure_ascii=False))
|
|
293
|
+
else:
|
|
294
|
+
print("=" * 70)
|
|
295
|
+
print(" SYNAPSE HUB — L10N HARDCODED STRING AUDIT REPORT")
|
|
296
|
+
print("=" * 70)
|
|
297
|
+
print(f" Target File : {args.scan_html}")
|
|
298
|
+
print(f" Total Found : {len(auditor.hardcoded_strings)}")
|
|
299
|
+
for item in auditor.hardcoded_strings[:10]:
|
|
300
|
+
print(f" \033[93m[UNTRANSLATED]\033[0m <{item['tag']}>: '{item['text']}'")
|
|
301
|
+
print("=" * 70)
|
|
302
|
+
return 0
|
|
303
|
+
|
|
304
|
+
parser.print_help()
|
|
305
|
+
return 2
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
if __name__ == "__main__":
|
|
309
|
+
sys.exit(main())
|