eduevidence 5.2.0 → 6.2.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/CONTRIBUTING.md +105 -0
- package/README.md +142 -75
- package/README.zh-CN.md +73 -30
- package/SKILL.md +397 -131
- package/agents/openai.yaml +4 -0
- package/assets/readme/controlled-execution.svg +34 -0
- package/assets/readme/landing-tour.gif +0 -0
- package/assets/readme/logo.png +0 -0
- package/assets/readme/research-workflow.svg +56 -0
- package/assets/readme/studio-graph.png +0 -0
- package/assets/readme/studio-overview.png +0 -0
- package/assets/readme/studio-reports.png +0 -0
- package/assets/readme/studio-tour.gif +0 -0
- package/autoevolve/config.yaml +17 -0
- package/autoevolve/program.md +25 -0
- package/autoevolve/protected.manifest.yaml +34 -0
- package/benchmarks/adversarial/cases.jsonl +7 -0
- package/benchmarks/evidence-library.json +5268 -0
- package/benchmarks/partitions.json +8 -0
- package/bin/eduevidence.js +2 -1
- package/docs/architecture.md +496 -0
- package/docs/autoresearch-evolution-plan.md +2903 -0
- package/docs/autoresearch-implementation-status.md +101 -0
- package/docs/demo-storyboard.md +20 -0
- package/docs/demo-workplace-ai.md +92 -0
- package/docs/demo.md +32 -0
- package/docs/install-guide.md +150 -0
- package/docs/orchestration-role-model.md +1254 -0
- package/docs/release-closeout/README.md +17 -0
- package/docs/release-closeout/frontend-acceptance.md +23 -0
- package/docs/release-closeout/issues.md +19 -0
- package/docs/release-closeout/verification.md +28 -0
- package/docs/release-contract.md +108 -0
- package/docs/research-studio-guide.zh-CN.md +166 -0
- package/docs/sciverse-api.md +125 -0
- package/eduevidence_cli.py +29 -13
- package/engine/_resources.py +13 -0
- package/engine/autoevolve/__init__.py +3 -0
- package/engine/autoevolve/agent_view.py +167 -0
- package/engine/autoevolve/core.py +357 -0
- package/engine/autoevolve/events.py +11 -0
- package/engine/autoevolve/git_workspace.py +77 -0
- package/engine/autoevolve/projection.py +23 -0
- package/engine/autoevolve/runner.py +413 -0
- package/engine/autoevolve/trust.py +146 -0
- package/engine/autoresearch/__init__.py +6 -0
- package/engine/autoresearch/commit.py +132 -0
- package/engine/autoresearch/contracts.py +126 -0
- package/engine/autoresearch/controller.py +207 -0
- package/engine/autoresearch/events.py +12 -0
- package/engine/autoresearch/gap_priority.py +168 -0
- package/engine/autoresearch/projection.py +30 -0
- package/engine/autoresearch/research_memory.py +59 -0
- package/engine/autoresearch/saturation.py +91 -0
- package/engine/briefs.py +2 -1
- package/engine/capabilities.py +1 -0
- package/engine/contracts.py +3 -1
- package/engine/decision_policy.py +96 -0
- package/engine/evidence_graph.py +14 -10
- package/engine/evidencecore.py +7 -5
- package/engine/gaps.py +132 -73
- package/engine/ids.py +2 -0
- package/engine/judge_pack.py +65 -0
- package/engine/library.py +6 -2
- package/engine/library_builtin.py +3 -1
- package/engine/living.py +36 -5
- package/engine/meta_synthesis.py +3 -1
- package/engine/migration.py +88 -3
- package/engine/orchestration.py +460 -0
- package/engine/paths.py +2 -0
- package/engine/pilot.py +36 -33
- package/engine/project.py +2 -2
- package/engine/research_service.py +113 -0
- package/engine/studio_read_model.py +400 -0
- package/engine/taxonomy.py +211 -0
- package/engine/tribunal.py +44 -33
- package/engine/update.py +1 -0
- package/engine/versions.py +1 -1
- package/engine/worker_result.py +109 -0
- package/engine/workflows.py +70 -0
- package/examples/ai-coding-assistant-evidence/EduEvidence_Report.html +2934 -0
- package/examples/ai-coding-assistant-evidence/artifact_manifest.json +15 -0
- package/examples/ai-coding-assistant-evidence/citation_check.json +79 -0
- package/examples/ai-coding-assistant-evidence/claims.jsonl +12 -0
- package/examples/ai-coding-assistant-evidence/evaluation.json +35 -0
- package/examples/ai-coding-assistant-evidence/evidence.jsonl +12 -0
- package/examples/ai-coding-assistant-evidence/final_verdict.json +107 -0
- package/examples/ai-coding-assistant-evidence/frame.json +48 -0
- package/examples/ai-coding-assistant-evidence/gate_report.json +101 -0
- package/examples/ai-coding-assistant-evidence/intervention.json +51 -0
- package/examples/ai-coding-assistant-evidence/methodology.json +36 -0
- package/examples/ai-coding-assistant-evidence/raw_verdict.json +86 -0
- package/examples/ai-coding-assistant-evidence/report_spec.json +230 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/EduEvidence_Report_academic.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/EduEvidence_Report_claude.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/EduEvidence_Report_datalab-dark.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/EduEvidence_Report_datalab.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/EduEvidence_Report_presentation.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/report_academic.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/report_claude.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/report_datalab-dark.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/report_datalab.html +2934 -0
- package/examples/ai-coding-assistant-evidence/reports-5themes/report_presentation.html +2934 -0
- package/examples/ai-coding-assistant-evidence/result.json +1457 -0
- package/examples/ai-coding-assistant-evidence/result.zh.json +1457 -0
- package/examples/ai-coding-assistant-evidence/skeptic.json +72 -0
- package/examples/ai-coding-assistant-evidence/sources.jsonl +8 -0
- package/examples/ai-coding-assistant-evidence/verdict.json +107 -0
- package/examples/spaced-retrieval-practice/applicability.json +14 -0
- package/examples/spaced-retrieval-practice/artifact_manifest.json +15 -0
- package/examples/spaced-retrieval-practice/claims.jsonl +3 -0
- package/examples/spaced-retrieval-practice/evidence.jsonl +6 -0
- package/examples/spaced-retrieval-practice/final_verdict.json +93 -0
- package/examples/spaced-retrieval-practice/frame.json +58 -0
- package/examples/spaced-retrieval-practice/gate_report.json +101 -0
- package/examples/spaced-retrieval-practice/methodology.json +78 -0
- package/examples/spaced-retrieval-practice/report_spec.json +212 -0
- package/examples/spaced-retrieval-practice/reports-5themes/EduEvidence_Report_academic.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/EduEvidence_Report_claude.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/EduEvidence_Report_datalab-dark.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/EduEvidence_Report_datalab.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/EduEvidence_Report_presentation.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/report_academic.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/report_claude.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/report_datalab-dark.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/report_datalab.html +2728 -0
- package/examples/spaced-retrieval-practice/reports-5themes/report_presentation.html +2728 -0
- package/examples/spaced-retrieval-practice/result.json +942 -0
- package/examples/spaced-retrieval-practice/result.zh.json +942 -0
- package/examples/spaced-retrieval-practice/skeptic.json +70 -0
- package/examples/spaced-retrieval-practice/sources.jsonl +7 -0
- package/examples/spaced-retrieval-practice/verdict.json +93 -0
- package/examples/workplace-ai-assistant/artifact_manifest.json +15 -0
- package/examples/workplace-ai-assistant/claims.jsonl +4 -0
- package/examples/workplace-ai-assistant/evaluation.json +19 -0
- package/examples/workplace-ai-assistant/evidence.jsonl +4 -0
- package/examples/workplace-ai-assistant/evidence_graph.json +444 -0
- package/examples/workplace-ai-assistant/final_verdict.json +78 -0
- package/examples/workplace-ai-assistant/frame.json +41 -0
- package/examples/workplace-ai-assistant/gate_report.json +101 -0
- package/examples/workplace-ai-assistant/intervention.json +27 -0
- package/examples/workplace-ai-assistant/legacy-link-check.json +16 -0
- package/examples/workplace-ai-assistant/methodology.json +60 -0
- package/examples/workplace-ai-assistant/report_spec.json +224 -0
- package/examples/workplace-ai-assistant/reports-5themes/EduEvidence_Report_academic.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/EduEvidence_Report_claude.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/EduEvidence_Report_datalab-dark.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/EduEvidence_Report_datalab.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/EduEvidence_Report_presentation.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/report_academic.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/report_claude.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/report_datalab-dark.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/report_datalab.html +2814 -0
- package/examples/workplace-ai-assistant/reports-5themes/report_presentation.html +2814 -0
- package/examples/workplace-ai-assistant/result.json +615 -0
- package/examples/workplace-ai-assistant/result.zh.json +615 -0
- package/examples/workplace-ai-assistant/search_log.json +19 -0
- package/examples/workplace-ai-assistant/skeptic.json +72 -0
- package/examples/workplace-ai-assistant/sources.jsonl +3 -0
- package/examples/workplace-ai-assistant/validation_result.json +9 -0
- package/examples/workplace-ai-assistant/verdict.json +78 -0
- package/install.sh +7 -7
- package/integrations/agent_mcp.py +2 -2
- package/integrations/orchestration_dispatch.py +146 -0
- package/package.json +46 -3
- package/pyproject.toml +14 -22
- package/references/autoresearch.md +30 -0
- package/references/evaluation-policy.md +24 -0
- package/references/orchestration.md +22 -0
- package/references/report-copy-style.md +67 -0
- package/references/retrieval-compliance.md +75 -0
- package/references/retrieval-protocol.md +20 -0
- package/references/scientific-invariants.md +19 -0
- package/retrieval/audit.py +178 -0
- package/retrieval/fetch.py +96 -0
- package/retrieval/sciverse.py +398 -0
- package/retrieval/search.py +47 -7
- package/schemas/applicability.schema.json +94 -0
- package/schemas/chart-spec.schema.json +10 -3
- package/schemas/evidence.schema.json +316 -43
- package/schemas/fetch-result.schema.json +2 -1
- package/schemas/intervention.schema.json +106 -21
- package/schemas/report-result.schema.json +12 -4
- package/schemas/report-spec.schema.json +98 -100
- package/schemas/skeptic.schema.json +86 -0
- package/schemas/source.schema.json +21 -2
- package/schemas/v2/finding.schema.json +5 -1
- package/schemas/v2/methodology-audit.schema.json +5 -1
- package/schemas/v2/outcome.schema.json +28 -5
- package/schemas/v2/project.schema.json +2 -2
- package/schemas/v2/run.schema.json +1 -1
- package/schemas/v2/study.schema.json +5 -1
- package/schemas/vNext/autoevolve-session.schema.json +34 -0
- package/schemas/vNext/eval-snapshot.schema.json +77 -0
- package/schemas/vNext/execution-plan.schema.json +50 -0
- package/schemas/vNext/gap-priority.schema.json +54 -0
- package/schemas/vNext/negative-search-record.schema.json +68 -0
- package/schemas/vNext/research-iteration.schema.json +87 -0
- package/schemas/vNext/research-strategy.schema.json +62 -0
- package/schemas/vNext/skill-experiment.schema.json +90 -0
- package/schemas/vNext/task-spec.schema.json +156 -0
- package/schemas/vNext/worker-result.schema.json +60 -0
- package/schemas/verdict.schema.json +164 -28
- package/scripts/benchmark_judge.py +2 -2
- package/scripts/benchmark_v3.py +26 -43
- package/scripts/build_esl_artifacts.py +4 -4
- package/scripts/build_evidence_library.py +2 -2
- package/scripts/build_gh_pages.py +98 -0
- package/scripts/build_readme_diagrams.py +72 -0
- package/scripts/build_report_variants.py +101 -0
- package/scripts/build_result.py +74 -9
- package/scripts/check_autoresearch_invariants.py +95 -0
- package/scripts/check_package_parity.py +85 -0
- package/scripts/check_protocol_alignment.py +375 -0
- package/scripts/check_versioned_schemas.py +254 -0
- package/scripts/claim_audit.py +13 -8
- package/scripts/compute_confidence.py +10 -0
- package/scripts/daily_evolve.py +30 -0
- package/scripts/dashboard_server.py +130 -101
- package/scripts/did_regression.py +17 -32
- package/scripts/enrich_projects_human_and_lieflat.py +1 -1
- package/scripts/evidence_score.py +5 -2
- package/scripts/generate_metrics.py +4 -3
- package/scripts/generate_new_projects.py +5 -5
- package/scripts/orchestrator.py +286 -36
- package/scripts/pre_verdict_gate.py +224 -26
- package/scripts/quickstart.py +18 -2
- package/scripts/rebake_all_5themes.py +1 -2
- package/scripts/research_auto_cli.py +475 -0
- package/scripts/run_workspace.py +24 -8
- package/scripts/search_provenance.py +64 -0
- package/scripts/serve_web.py +9 -10
- package/scripts/skill_lint.py +1 -1
- package/scripts/skill_payload.py +81 -0
- package/scripts/test_adversarial_empirical.py +26 -19
- package/scripts/validate_schema.py +46 -2
- package/scripts/vnext_cli.py +133 -0
- package/setup.py +12 -0
- package/skill/agents/evaluation-designer.md +20 -4
- package/skill/agents/evidence-analyst.md +19 -3
- package/skill/agents/evidence-judge.md +50 -2
- package/skill/agents/evidence-retriever.md +20 -3
- package/skill/agents/intervention-designer.md +20 -4
- package/skill/agents/method-reviewer.md +18 -2
- package/skill/agents/{education-planner.md → research-planner.md} +19 -3
- package/skill/agents/skeptic.md +18 -2
- package/skill/roles/registry.yaml +45 -0
- package/skill/sub-skills/aihot-trend-analysis/SKILL.md +28 -9
- package/skill/sub-skills/contradiction-analysis/SKILL.md +31 -11
- package/skill/sub-skills/data-analysis/SKILL.md +34 -15
- package/skill/sub-skills/ethics-review/SKILL.md +33 -10
- package/skill/sub-skills/evidence-extraction/SKILL.md +29 -11
- package/skill/sub-skills/evidence-review/SKILL.md +31 -12
- package/skill/sub-skills/gap-analysis/SKILL.md +31 -9
- package/skill/sub-skills/literature-review/SKILL.md +35 -14
- package/skill/sub-skills/methodology-audit/SKILL.md +29 -12
- package/skill/sub-skills/report-generation/SKILL.md +40 -6
- package/skill/sub-skills/research-planning/SKILL.md +41 -14
- package/skill/sub-skills/study-design/SKILL.md +30 -9
- package/skill/task-briefs/adjudicate.md +32 -7
- package/skill/task-briefs/applicability.md +38 -0
- package/skill/task-briefs/audit.md +32 -7
- package/skill/task-briefs/challenge.md +34 -5
- package/skill/task-briefs/evaluate.md +30 -5
- package/skill/task-briefs/extract.md +31 -8
- package/skill/task-briefs/frame.md +39 -10
- package/skill/task-briefs/intervene.md +32 -6
- package/skill/task-briefs/present.md +32 -8
- package/skill/task-briefs/projection.md +37 -0
- package/skill/task-briefs/retrieve.md +36 -6
- package/skill/workflows/decision-and-pilot.md +85 -0
- package/skill/workflows/evaluate-and-update.md +93 -0
- package/skill/workflows/evidence-review.md +117 -0
- package/visualization/eduevidence-report/assets/base.css +2 -2
- package/visualization/eduevidence-report/assets/reader.css +752 -0
- package/visualization/eduevidence-report/assets/reader.js +132 -0
- package/visualization/eduevidence-report/references/chart-selection-catalog.md +109 -0
- package/visualization/eduevidence-report/references/lieflat-composition.md +3 -1
- package/visualization/eduevidence-report/scripts/build_figures.py +25 -3
- package/visualization/eduevidence-report/scripts/build_infographics.py +5 -1
- package/visualization/eduevidence-report/scripts/build_report.py +561 -121
- package/visualization/eduevidence-report/scripts/charts_data.py +2 -0
- package/visualization/eduevidence-report/scripts/lieflat_engine.py +371 -136
- package/visualization/eduevidence-report/scripts/zh_labels.py +80 -1
- package/visualization/eduevidence-report/themes/academic.css +1 -1
- package/visualization/eduevidence-report/themes/claude.css +1 -1
- package/visualization/eduevidence-report/themes/datalab-dark.css +2 -2
- package/visualization/eduevidence-report/themes/datalab.css +2 -2
- package/visualization/eduevidence-report/themes/presentation.css +2 -2
- package/web/README.md +18 -0
- package/web/architecture.html +14885 -0
- package/web/index.html +53 -0
- package/web/studio/THIRD_PARTY_LICENSES.txt +146 -0
- package/web/studio/assets/index-B8tkF44Q.css +1 -0
- package/web/studio/assets/index-CQ6Keoyc.js +230 -0
- package/web/studio/config.json +1 -0
- package/web/studio/index.html +14 -0
- package/engine/__pycache__/__init__.cpython-312.pyc +0 -0
- package/engine/__pycache__/analysis.cpython-312.pyc +0 -0
- package/engine/__pycache__/bias.cpython-312.pyc +0 -0
- package/engine/__pycache__/briefs.cpython-312.pyc +0 -0
- package/engine/__pycache__/capabilities.cpython-312.pyc +0 -0
- package/engine/__pycache__/citation_check.cpython-312.pyc +0 -0
- package/engine/__pycache__/contracts.cpython-312.pyc +0 -0
- package/engine/__pycache__/datasets.cpython-312.pyc +0 -0
- package/engine/__pycache__/events.cpython-312.pyc +0 -0
- package/engine/__pycache__/evidence_graph.cpython-312.pyc +0 -0
- package/engine/__pycache__/evidence_review.cpython-312.pyc +0 -0
- package/engine/__pycache__/evidencecore.cpython-312.pyc +0 -0
- package/engine/__pycache__/gap_lens.cpython-312.pyc +0 -0
- package/engine/__pycache__/gaps.cpython-312.pyc +0 -0
- package/engine/__pycache__/graph_store.cpython-312.pyc +0 -0
- package/engine/__pycache__/graph_validate.cpython-312.pyc +0 -0
- package/engine/__pycache__/ids.cpython-312.pyc +0 -0
- package/engine/__pycache__/library.cpython-312.pyc +0 -0
- package/engine/__pycache__/library_builtin.cpython-312.pyc +0 -0
- package/engine/__pycache__/living.cpython-312.pyc +0 -0
- package/engine/__pycache__/log.cpython-312.pyc +0 -0
- package/engine/__pycache__/meta_analysis.cpython-312.pyc +0 -0
- package/engine/__pycache__/meta_synthesis.cpython-312.pyc +0 -0
- package/engine/__pycache__/migration.cpython-312.pyc +0 -0
- package/engine/__pycache__/mode_router.cpython-312.pyc +0 -0
- package/engine/__pycache__/paths.cpython-312.pyc +0 -0
- package/engine/__pycache__/pilot.cpython-312.pyc +0 -0
- package/engine/__pycache__/planner.cpython-312.pyc +0 -0
- package/engine/__pycache__/project.cpython-312.pyc +0 -0
- package/engine/__pycache__/projections.cpython-312.pyc +0 -0
- package/engine/__pycache__/robustness.cpython-312.pyc +0 -0
- package/engine/__pycache__/run.cpython-312.pyc +0 -0
- package/engine/__pycache__/semantics.cpython-312.pyc +0 -0
- package/engine/__pycache__/study_design.cpython-312.pyc +0 -0
- package/engine/__pycache__/synthesis.cpython-312.pyc +0 -0
- package/engine/__pycache__/tribunal.cpython-312.pyc +0 -0
- package/engine/__pycache__/update.cpython-312.pyc +0 -0
- package/engine/__pycache__/versions.cpython-312.pyc +0 -0
- package/integrations/__pycache__/__init__.cpython-312.pyc +0 -0
- package/integrations/__pycache__/agent_mcp.cpython-312.pyc +0 -0
- package/integrations/__pycache__/smart_web_fetch.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/__init__.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/corpus_store.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/dedupe.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/failures.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/fetch.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/search.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/source.cpython-312.pyc +0 -0
- package/retrieval/__pycache__/validate.cpython-312.pyc +0 -0
- package/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/scripts/__pycache__/benchmark.cpython-312.pyc +0 -0
- package/scripts/__pycache__/benchmark_evaluator.cpython-312.pyc +0 -0
- package/scripts/__pycache__/benchmark_judge.cpython-312.pyc +0 -0
- package/scripts/__pycache__/benchmark_routing.cpython-312.pyc +0 -0
- package/scripts/__pycache__/benchmark_v2.cpython-312.pyc +0 -0
- package/scripts/__pycache__/benchmark_v3.cpython-312.pyc +0 -0
- package/scripts/__pycache__/build_result.cpython-312.pyc +0 -0
- package/scripts/__pycache__/claim_audit.cpython-312.pyc +0 -0
- package/scripts/__pycache__/complexity_gate.cpython-312.pyc +0 -0
- package/scripts/__pycache__/compute_confidence.cpython-312.pyc +0 -0
- package/scripts/__pycache__/dashboard_server.cpython-312.pyc +0 -0
- package/scripts/__pycache__/did_regression.cpython-312.pyc +0 -0
- package/scripts/__pycache__/effect_calculator.cpython-312.pyc +0 -0
- package/scripts/__pycache__/evidence_matrix.cpython-312.pyc +0 -0
- package/scripts/__pycache__/evidence_score.cpython-312.pyc +0 -0
- package/scripts/__pycache__/evidence_semantics.cpython-312.pyc +0 -0
- package/scripts/__pycache__/fetch_benchmark.cpython-312.pyc +0 -0
- package/scripts/__pycache__/lint_report_layout.cpython-312.pyc +0 -0
- package/scripts/__pycache__/orchestrator.cpython-312.pyc +0 -0
- package/scripts/__pycache__/pre_verdict_gate.cpython-312.pyc +0 -0
- package/scripts/__pycache__/recompute_demo_quality.cpython-312.pyc +0 -0
- package/scripts/__pycache__/render_report.cpython-312.pyc +0 -0
- package/scripts/__pycache__/render_report_html.cpython-312.pyc +0 -0
- package/scripts/__pycache__/run_workspace.cpython-312.pyc +0 -0
- package/scripts/__pycache__/skill_lint.cpython-312.pyc +0 -0
- package/scripts/__pycache__/startup_probe.cpython-312.pyc +0 -0
- package/scripts/__pycache__/sync_killer_demo_report.cpython-312.pyc +0 -0
- package/scripts/__pycache__/test_adversarial_empirical.cpython-312-pytest-9.0.2.pyc +0 -0
- package/scripts/__pycache__/test_adversarial_empirical.cpython-312-pytest-9.1.1.pyc +0 -0
- package/scripts/__pycache__/validate_schema.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/adapter_contract.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/build_artifact_manifest.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/build_charts.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/build_figures.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/build_infographics.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/build_report.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/charts_data.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/lieflat_engine.cpython-312.pyc +0 -0
- package/visualization/eduevidence-report/scripts/__pycache__/zh_labels.cpython-312.pyc +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* Offline reader: navigation and display only; no research state mutations. */
|
|
2
|
+
(function () {
|
|
3
|
+
"use strict";
|
|
4
|
+
var root = document.documentElement;
|
|
5
|
+
var copy = {
|
|
6
|
+
zh: {
|
|
7
|
+
brief: "\u6458\u8981",
|
|
8
|
+
full: "\u5b8c\u6574\u62a5\u544a",
|
|
9
|
+
print: "\u6253\u5370",
|
|
10
|
+
matched: "\u6761\u8bc1\u636e",
|
|
11
|
+
},
|
|
12
|
+
en: {
|
|
13
|
+
brief: "Brief",
|
|
14
|
+
full: "Full report",
|
|
15
|
+
print: "Print",
|
|
16
|
+
matched: "findings",
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
function labels() {
|
|
20
|
+
var lang = root.lang.indexOf("en") === 0 ? "en" : "zh";
|
|
21
|
+
document.querySelectorAll("[data-copy]").forEach(function (el) {
|
|
22
|
+
el.textContent = copy[lang][el.dataset.copy];
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
labels();
|
|
26
|
+
new MutationObserver(labels).observe(root, {
|
|
27
|
+
attributes: true,
|
|
28
|
+
attributeFilter: ["lang"],
|
|
29
|
+
});
|
|
30
|
+
document.querySelectorAll(".reader-print").forEach(function (b) {
|
|
31
|
+
b.addEventListener("click", function () {
|
|
32
|
+
window.print();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
document.querySelectorAll(".reader-home").forEach(function (a) {
|
|
36
|
+
a.addEventListener("click", function (e) {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
window.scrollTo({ top: 0, behavior: "instant" });
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
var scheduled = false;
|
|
42
|
+
function progress() {
|
|
43
|
+
scheduled = false;
|
|
44
|
+
var max = document.documentElement.scrollHeight - window.innerHeight;
|
|
45
|
+
var fraction = max > 0 ? Math.min(1, Math.max(0, window.scrollY / max)) : 0;
|
|
46
|
+
var bar = document.querySelector(".reader-progress>span");
|
|
47
|
+
if (bar) bar.style.transform = "scaleX(" + fraction + ")";
|
|
48
|
+
var shell = Array.from(document.querySelectorAll(".report-shell")).find(
|
|
49
|
+
function (s) {
|
|
50
|
+
return getComputedStyle(s).display !== "none";
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
if (!shell) return;
|
|
54
|
+
var blocks = Array.from(shell.querySelectorAll(".brief-block[id]"));
|
|
55
|
+
var current = blocks
|
|
56
|
+
.filter(function (b) {
|
|
57
|
+
return b.getBoundingClientRect().top < 150;
|
|
58
|
+
})
|
|
59
|
+
.pop();
|
|
60
|
+
shell.querySelectorAll(".brief-navigation a").forEach(function (a) {
|
|
61
|
+
var active = current && a.hash === "#" + current.id;
|
|
62
|
+
a.classList.toggle("active", !!active);
|
|
63
|
+
if (active) a.setAttribute("aria-current", "location");
|
|
64
|
+
else a.removeAttribute("aria-current");
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function queue() {
|
|
68
|
+
if (!scheduled) {
|
|
69
|
+
scheduled = true;
|
|
70
|
+
requestAnimationFrame(progress);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
window.addEventListener("scroll", queue, { passive: true });
|
|
74
|
+
window.addEventListener("resize", queue);
|
|
75
|
+
document.addEventListener("click", queue);
|
|
76
|
+
progress();
|
|
77
|
+
document.querySelectorAll(".report-view-btn").forEach(function (btn) {
|
|
78
|
+
btn.addEventListener("click", function () {
|
|
79
|
+
window.scrollTo({ top: 0, behavior: "instant" });
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
document
|
|
83
|
+
.querySelectorAll(".table-wrap,.evidence-to-action")
|
|
84
|
+
.forEach(function (el) {
|
|
85
|
+
el.tabIndex = 0;
|
|
86
|
+
el.setAttribute("role", "region");
|
|
87
|
+
el.setAttribute(
|
|
88
|
+
"aria-label",
|
|
89
|
+
root.lang.indexOf("en") === 0
|
|
90
|
+
? "Scrollable data table"
|
|
91
|
+
: "\u53ef\u6eda\u52a8\u6570\u636e\u8868",
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
document
|
|
95
|
+
.querySelectorAll('table[id^="evidence-matrix-"]')
|
|
96
|
+
.forEach(function (table) {
|
|
97
|
+
var suffix = table.id.replace(/^evidence-matrix-/, "");
|
|
98
|
+
var counter = document.createElement("p");
|
|
99
|
+
counter.className = "reader-filter-count";
|
|
100
|
+
counter.setAttribute("role", "status");
|
|
101
|
+
counter.setAttribute("aria-live", "polite");
|
|
102
|
+
table.parentElement.insertAdjacentElement("beforebegin", counter);
|
|
103
|
+
function count() {
|
|
104
|
+
var rows = Array.from(table.querySelectorAll("tbody tr"));
|
|
105
|
+
var visible = rows.filter(function (r) {
|
|
106
|
+
return r.style.display !== "none";
|
|
107
|
+
}).length;
|
|
108
|
+
counter.textContent =
|
|
109
|
+
visible +
|
|
110
|
+
" / " +
|
|
111
|
+
rows.length +
|
|
112
|
+
" " +
|
|
113
|
+
copy[suffix.endsWith("en") ? "en" : "zh"].matched;
|
|
114
|
+
}
|
|
115
|
+
["matrix-search-", "matrix-direction-", "matrix-outcome-"].forEach(
|
|
116
|
+
function (prefix) {
|
|
117
|
+
var input = document.getElementById(prefix + suffix);
|
|
118
|
+
if (input) {
|
|
119
|
+
input.addEventListener("input", count);
|
|
120
|
+
input.addEventListener("change", count);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
);
|
|
124
|
+
count();
|
|
125
|
+
});
|
|
126
|
+
document
|
|
127
|
+
.querySelectorAll('a[href^="http:"] , a[href^="https:"]')
|
|
128
|
+
.forEach(function (a) {
|
|
129
|
+
a.target = "_blank";
|
|
130
|
+
a.rel = "noopener noreferrer";
|
|
131
|
+
});
|
|
132
|
+
})();
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Chart Selection Catalog — AI 选图与表格边界
|
|
2
|
+
|
|
3
|
+
本目录是 EduEvidence 报告生成阶段的**自包含选图控制面**。AI 可以根据 `result.json` 的数据形状自由组合图表,但只能从运行时注册表中选择;AI 负责“选什么、为什么”,确定性渲染器负责“从哪里取数、怎么画”。
|
|
4
|
+
|
|
5
|
+
> 核心原则:**图负责模式识别,表负责精确核验。** 不为了“更像数据产品”把所有表格图表化,也不了“严谨”把所有模式藏在大表里。
|
|
6
|
+
|
|
7
|
+
## 1. Table vs. chart policy
|
|
8
|
+
|
|
9
|
+
### 必须保留表格 / 展开详情的内容
|
|
10
|
+
|
|
11
|
+
- `EvidenceMatrix`:Evidence ID / Outcome / Effect / Quality / Claim / Source。
|
|
12
|
+
- `SourceList`:来源标题、年份、authority、canonical location。
|
|
13
|
+
- `MethodologyPanel` / methodology details:审计项的原始判断与备注。
|
|
14
|
+
- `ClaimTrace`:Claim → Evidence → Outcome → Effect → Quality → Source 的精确链路。
|
|
15
|
+
- 任何用户需要逐行复核、复制、引用或追溯的记录。
|
|
16
|
+
|
|
17
|
+
这些是审计面,不属于“可视化失败”。图表可以总结它们,但不能替代它们。
|
|
18
|
+
|
|
19
|
+
### 优先使用图表的内容
|
|
20
|
+
|
|
21
|
+
- 效应量及 CI 的横向比较。
|
|
22
|
+
- 研究/证据在年份、结果维度、设计簻型上的分布。
|
|
23
|
+
- 正向 / 负向 / 零效应的构成或两极差异。
|
|
24
|
+
- 干预阶段、活动数量与时间分布。
|
|
25
|
+
- 单值置信度和方法学检查构成。
|
|
26
|
+
- 多维研究特征的模式发现。
|
|
27
|
+
|
|
28
|
+
### 不画图的情况
|
|
29
|
+
|
|
30
|
+
- 数据不足以形成至少一个诚实的视觉关系。
|
|
31
|
+
- 维度单位不可比较或把不同 outcome 合并会制造假结论。
|
|
32
|
+
- 只有一条记录且图表没有比文本/表格增加信息。
|
|
33
|
+
- 缺失值会迫使渲染器填 `0`、补 CI、补趋势或推断因果方向。
|
|
34
|
+
|
|
35
|
+
此时输出 `VisualizationSuppressed` / `LieflatSuppressed` 和原因,比凑图更正确。
|
|
36
|
+
|
|
37
|
+
## 2. AI selection protocol
|
|
38
|
+
|
|
39
|
+
对每个准备表达的**独立结论**执行:
|
|
40
|
+
|
|
41
|
+
1. **识别数据形状**:g+CI、排序 g+N、年份×维度、逐条分布、100% 构成、方向计数、双极轴、阶段周区间、单值置信度、审计票数等。
|
|
42
|
+
2. **召回候选**:从下表中找语义匹配且提取器有数据的候选。通常比较至少 3 个;如果有效候选本来只有 1–2 个,不得为了满足数量硬凑不合适图型。
|
|
43
|
+
3. **逐项比较**:语义契合、单位诚实、标签容纳、阅读速度、移动端适配、与本批次图型是否重复、数据是否达到 Meaningful Visualization Gate。
|
|
44
|
+
4. **记录淘汰原因**:例如“需要 CI,但当前只有点估计”“类别名过长,不适合竖排”“与上一张同为方向计数,信息重复”。
|
|
45
|
+
5. **选择 ≤6 张**:每张图必须承担不同结论,优先轮廓多样性而非数量;同一数据形状不要堆多个近似图。
|
|
46
|
+
6. **只写计划,不写数值**:AI 只写 `type / catalog_ref / title_zh+en / subtitle_zh+en / caption_zh+en / source / params`。所有数值由 `charts_data.py` 提取。
|
|
47
|
+
7. **让渲染器最终裁决可画性**:注册表未收录、参数非法或数据不足时显式拒绝/抑制,不允许 AI 绕过。
|
|
48
|
+
|
|
49
|
+
## 3. Registered chart catalog
|
|
50
|
+
|
|
51
|
+
| `type` | `catalog_ref` | 数据形状 / extractor source | 最适合表达 | 避免使用 |
|
|
52
|
+
|---|---|---|---|---|
|
|
53
|
+
| `forest_plot` | FOREST-PLOT (publication figure) | g + 95% CI · `meta.forest` | 多研究效应与不确定性、零线关系 | 无 CI 时不要伪造区间 |
|
|
54
|
+
| `dot_cascade` | L2 Dot Cascade | 排序 g + N · `evidence.ranked_effects` | 效应量梯队、快速看排序与差距 | outcome/单位不可比时不要混排 |
|
|
55
|
+
| `bubble_almanac` | L9 Bubble Almanac | 年份 × 维度 × 研究数 · `evidence.year_x_dimension` | 时间覆盖与研究密度 | 没有年份或二维结构时不用 |
|
|
56
|
+
| `jitter_strip` | G15 Jitter Strip | 分组逐研究 g · `evidence.grouped_distribution` | 分布、离散度、异常点 | 只有聚合均值时不用 |
|
|
57
|
+
| `parallel_coordinates` | L20 Parallel Coordinates | g / N / 质量 / 年份 · `evidence.multidim_top` | 同一批研究的多维差异 | 维度单位/缩放无法解释时不用 |
|
|
58
|
+
| `hundred_field` | L14 Hundred Field | 研穵类型 100% 构成 · `evidence.study_type_composition` | 离散单位组成、研究设计结构 | 总数过大且单位点失去意义时慎用 |
|
|
59
|
+
| `tick_donut` | F4 Tick Donut | WWC 100% 构成 · `evidence.wwc_composition` | 少类别质量/等级份额 | 类别过多或精确比较更重要时不用 |
|
|
60
|
+
| `tick_rows` | F5 Tick Rows | outcome 方向计数 · `outcomes.direction_counts` | 长类目下的正/负/零分布 | 样本点太少且文本更清楚时不用 |
|
|
61
|
+
| `rung_bars` | F1 Rung Bars | outcome 方向计数 · `outcomes.direction_counts` | 紧凑方向计数比较 | 长中文类目或移动端拥挤时优先 tick_rows |
|
|
62
|
+
| `paired_rungs` | F6 Paired Rungs | 正/负成对计数 · `outcomes.paired_counts` | 每 outcome 正负直接对照 | 需要展示大量 null 时不优先 |
|
|
63
|
+
| `brand_spectrum` | L7 Brand Spectrum | 双极位置 · `outcomes.bipolar_axes` | “收益 ↔ 风险/退化”的方向张力 | 不得把 claim support 当正效应 |
|
|
64
|
+
| `barcode_lollipop` | L3 Barcode Lollipop | 周次 × 阶段 · `intervention.phase_weeks` | 干预阶段时间安排 | 没有真实周区间时不补时间点 |
|
|
65
|
+
| `launch_fan` | L1 Launch Fan | 阶段 × 活动权重 · `intervention.activity_weights` | 阶段工作量/活动构成 | “活动条数”不是强度时须在副标题说明 |
|
|
66
|
+
| `dotty_matrix` | L8 Dotty Matrix | 阶段 × 活动点阵 · `intervention.phase_groups` | 阶段结构和活动密度 | 不得把点数解释成效果大小 |
|
|
67
|
+
| `tick_gauge` | F11 Tick Gauge | 0–100% 单值 · `decision.confidence_score` | 已存在的决策置信度 | 不得从证据数量自行计算 confidence |
|
|
68
|
+
| `ballot_tally` | L15 Ballot Tally | 方法学检查计票 · `methodology.flag_rates` | 审计通过/风险项概览 | 不替代方法学原始备注 |
|
|
69
|
+
| `matrix_heat` | L16 Matrix Heat | 年份 × outcome × count · `evidence.year_x_outcome_counts` | 二维覆盖、证据空白和聚集区 | count 不代表效果强弱,标题需避免误导 |
|
|
70
|
+
|
|
71
|
+
## 4. Recommended candidate families
|
|
72
|
+
|
|
73
|
+
同一“问题”先在家族内比较,再跨家族避免重复:
|
|
74
|
+
|
|
75
|
+
- **效应与不确定性**:`forest_plot` / `dot_cascade` / `jitter_strip` / `parallel_coordinates`。
|
|
76
|
+
- **证据分布与覆盖**:`bubble_almanac` / `matrix_heat` / `hundred_field` / `tick_donut`。
|
|
77
|
+
- **结果方向**:`tick_rows` / `rung_bars` / `paired_rungs` / `brand_spectrum`。
|
|
78
|
+
- **干预结构**:`barcode_lollipop` / `launch_fan` / `dotty_matrix`。
|
|
79
|
+
- **决策与方法学摘要**:`tick_gauge` / `ballot_tally`。
|
|
80
|
+
|
|
81
|
+
示例:如果目标是“不同 outcome 的正负证据差异”,先比较 `tick_rows`、`rung_bars`、`paired_rungs`、`brand_spectrum`;如果类目长且要保留 null,通常 `tick_rows` 更合适;如果核心是两极张力,`brand_spectrum` 更快;如果只想看正负并排,`paired_rungs` 更直接。
|
|
82
|
+
|
|
83
|
+
## 5. Composition constraints
|
|
84
|
+
|
|
85
|
+
- 一份报告最多 6 张 AI-composed 图;少而准优先于填满 6 张。
|
|
86
|
+
- 每图对应一个明确问题或结论,不允许仅因“有数据”就画。
|
|
87
|
+
- 同一批次避免重复轮廓:例如已经用 `tick_rows` 讲方向分布,就不要再用 `rung_bars` 重复同一事实,除非第二张回答的是不同问题。
|
|
88
|
+
- 五种主题共享同一个 `visual_layout` 科学结构;主题只能改变版式、色板、表格密度和阅读节奏,不能改变数据、结论、图型含义或 Meaningful Visualization Gate。
|
|
89
|
+
- 报告中的 `EvidenceMatrix`、`SourceList`、方法学详情和 `ClaimTrace` 始终保留可审计入口。
|
|
90
|
+
- 图表数据必须通过 `lieflat_data_bound`;任何 AI 写入的数值都不进入渲染数据面。
|
|
91
|
+
|
|
92
|
+
## 6. Output contract example
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"type": "paired_rungs",
|
|
97
|
+
"catalog_ref": "F6 Paired Rungs",
|
|
98
|
+
"title_zh": "迁移与保持结果呈现更明显的正负分化",
|
|
99
|
+
"title_en": "Transfer and retention outcomes show the clearest directional split",
|
|
100
|
+
"subtitle_zh": "每格 = 1 条已提取证据 · 正向与负向并列",
|
|
101
|
+
"subtitle_en": "1 cell = 1 extracted finding · positive and negative shown side by side",
|
|
102
|
+
"caption_zh": "仅展示已记录的 effect_direction,不根据 claim relation 推断方向。",
|
|
103
|
+
"caption_en": "Uses recorded effect_direction only; claim relation never determines effect direction.",
|
|
104
|
+
"source": "outcomes.paired_counts",
|
|
105
|
+
"params": {}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
AI 选择图型后,仍由 `references/lieflat-composition.md`、`schemas/visual-layout.schema.json`、`charts_data.py` 与 `lieflat_engine.REGISTRY` 共同执行机械校验。
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
EduEvidence 的 Lieflat 画廊是**数据驱动的手作图表组合**:上游 AI 按数据形状自由选型(只能选注册表内图型),渲染器从 `result.json` 提取真实数据渲染成主题化内联 SVG。AI 不直接写数值——所有数字经 `scripts/charts_data.py` 提取器出数,完整性门 `lieflat_data_bound` 逐值核对溯源。
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> AI 选图规范已内置于 `chart-selection-catalog.md`;本文件记录可执行注册表、数据契约与渲染不变量。任何外部图库只可作为设计灵感,不能成为运行时依赖。
|
|
6
6
|
|
|
7
7
|
## 1. 注册表(type ↔ 目录编号 ↔ 数据形状 ↔ 提取器)
|
|
8
8
|
|
|
9
|
+
选图前先读 `chart-selection-catalog.md`:表格负责逐行审计,图表负责模式表达;AI 通常比较至少 3 个**可行**候选并记录淘汰理由,但候选不足时不得为凑数量选择错误图型。
|
|
10
|
+
|
|
9
11
|
| `type` | 目录编号 | 数据形状 | 提取器(scripts/charts_data.py) |
|
|
10
12
|
|---|---|---|---|
|
|
11
13
|
| `forest_plot` | FOREST-PLOT (publication figure) | 逐研究 Hedges' g + 95% CI(meta.forest 或 evidence.effect_size) | `meta.forest` |
|
|
@@ -32,7 +32,7 @@ from pathlib import Path
|
|
|
32
32
|
from typing import Any
|
|
33
33
|
|
|
34
34
|
from adapter_contract import load_result, write_adapter_output
|
|
35
|
-
from zh_labels import
|
|
35
|
+
from zh_labels import label
|
|
36
36
|
from build_charts import effect_outcomes
|
|
37
37
|
|
|
38
38
|
OKABE_ITO = ["#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7", "#000000"]
|
|
@@ -82,7 +82,26 @@ def _linear_ticks(maxv: int) -> list[int]:
|
|
|
82
82
|
return ticks
|
|
83
83
|
|
|
84
84
|
|
|
85
|
+
def _caption_width(caption: str, font_size: int = 11) -> int:
|
|
86
|
+
"""Conservative width of an italic caption line at the SVG font stack.
|
|
87
|
+
|
|
88
|
+
The caption is a single unwrapped line, so a long title used to run past
|
|
89
|
+
the fixed 720px canvas and get clipped. CJK glyphs are a full em wide;
|
|
90
|
+
latin is bounded by the same cap-height factor used elsewhere in this
|
|
91
|
+
module.
|
|
92
|
+
"""
|
|
93
|
+
cjk = sum(1 for ch in caption if "\u4e00" <= ch <= "\u9fff")
|
|
94
|
+
latin = len(caption) - cjk
|
|
95
|
+
# 0.75em is the measured upper bound for the latin part of the stack
|
|
96
|
+
# (Helvetica/Arial italic); ~2 full-width latin words at the start of the
|
|
97
|
+
# caption also shift the whole line right by the x=20 origin.
|
|
98
|
+
return int(cjk * font_size + latin * font_size * 0.78) + 60
|
|
99
|
+
|
|
100
|
+
|
|
85
101
|
def _figure_svg(title: str, caption: str, body: str, w: int = 720, h: int = 300) -> str:
|
|
102
|
+
# Grow (never shrink) the canvas so the unwrapped caption fits instead of
|
|
103
|
+
# being cut off at the right edge; the body keeps its designed layout.
|
|
104
|
+
w = max(w, _caption_width(caption))
|
|
86
105
|
return (f'<svg viewBox="0 0 {w} {h}" xmlns="http://www.w3.org/2000/svg" role="img" '
|
|
87
106
|
f'aria-label="{_esc(caption)}">'
|
|
88
107
|
f'<rect width="{w}" height="{h}" fill="#FFFFFF"/>'
|
|
@@ -337,8 +356,11 @@ def render_figures(figure_data: dict, theme: str = "okabe_ito", lang: str = "zh"
|
|
|
337
356
|
# 绝不把 relation_to_claim 的 support/contradict 当作 outcome 好坏;计数轴整数刻度。)
|
|
338
357
|
outcomes = figure_data.get("outcomes", [])
|
|
339
358
|
if outcomes:
|
|
340
|
-
|
|
341
|
-
|
|
359
|
+
# Both locales render a curated label. The English axis used to print
|
|
360
|
+
# the storage token ("knowledge_gain") because only zh went through
|
|
361
|
+
# OUTCOME_ZH; the English report then showed raw enum values as its
|
|
362
|
+
# headline comparison chart's axis.
|
|
363
|
+
names = [label(lang, "outcome", o["outcome_type"]) for o in outcomes]
|
|
342
364
|
series = [{"name": s["name"],
|
|
343
365
|
"data": [o.get(s["data"], 0) for o in outcomes]}
|
|
344
366
|
for s in DIR_SERIES[lang]]
|
|
@@ -160,7 +160,11 @@ def tribunal_svg(verdict: dict, lang: str = "zh") -> str:
|
|
|
160
160
|
none_text = labs["none"]
|
|
161
161
|
can = verdict.get("supported_claims") or verdict.get("what_can_be_claimed") or [none_text]
|
|
162
162
|
cannot = verdict.get("contradicted_claims") or verdict.get("what_cannot_be_claimed") or [none_text]
|
|
163
|
-
|
|
163
|
+
# The badge is a reader-facing label, so it goes through the same curated
|
|
164
|
+
# action table as the rest of the report instead of shouting the storage
|
|
165
|
+
# token. `.upper()` used to print "PILOT" on the Chinese infographic.
|
|
166
|
+
action_raw = verdict.get("recommended_action", "insufficient_evidence")
|
|
167
|
+
action = str(label(lang, "action", action_raw) or action_raw)
|
|
164
168
|
|
|
165
169
|
def col(x: int, title: str, items: list[str], color: str) -> str:
|
|
166
170
|
ids = _evidence_ids(items)
|