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
|
@@ -19,6 +19,9 @@ import json
|
|
|
19
19
|
import math
|
|
20
20
|
import sys
|
|
21
21
|
from pathlib import Path
|
|
22
|
+
from typing import Any, Dict, List
|
|
23
|
+
|
|
24
|
+
|
|
22
25
|
def _two_tailed_p_from_z(z: float) -> float:
|
|
23
26
|
"""Standard normal two-tailed p-value."""
|
|
24
27
|
return 2.0 * (1.0 - 0.5 * (1.0 + math.erf(abs(z) / math.sqrt(2.0))))
|
|
@@ -39,51 +42,40 @@ def _null_inference() -> Dict[str, Any]:
|
|
|
39
42
|
def _solve_linear_system(A: List[List[float]], b: List[float]) -> List[float]:
|
|
40
43
|
"""Gaussian elimination with partial pivoting for small OLS systems (p <= 10)."""
|
|
41
44
|
n = len(b)
|
|
42
|
-
# Augmented matrix
|
|
43
45
|
M = [A[i][:] + [b[i]] for i in range(n)]
|
|
44
|
-
|
|
45
46
|
for i in range(n):
|
|
46
|
-
# Pivot
|
|
47
47
|
max_row = max(range(i, n), key=lambda r: abs(M[r][i]))
|
|
48
48
|
if abs(M[max_row][i]) < 1e-12:
|
|
49
49
|
raise ValueError("Singular matrix in OLS estimation")
|
|
50
50
|
M[i], M[max_row] = M[max_row], M[i]
|
|
51
|
-
|
|
52
51
|
pivot = M[i][i]
|
|
53
52
|
for j in range(i, n + 1):
|
|
54
53
|
M[i][j] /= pivot
|
|
55
|
-
|
|
56
54
|
for r in range(n):
|
|
57
55
|
if r != i:
|
|
58
56
|
factor = M[r][i]
|
|
59
57
|
for c in range(i, n + 1):
|
|
60
58
|
M[r][c] -= factor * M[i][c]
|
|
61
|
-
|
|
62
59
|
return [M[i][n] for i in range(n)]
|
|
63
60
|
|
|
64
61
|
|
|
65
62
|
def _matrix_inverse(A: List[List[float]]) -> List[List[float]]:
|
|
66
63
|
"""Inverts an n x n matrix using Gauss-Jordan elimination."""
|
|
67
64
|
n = len(A)
|
|
68
|
-
# Augment with identity
|
|
69
65
|
M = [A[i][:] + [1.0 if i == j else 0.0 for j in range(n)] for i in range(n)]
|
|
70
|
-
|
|
71
66
|
for i in range(n):
|
|
72
67
|
max_row = max(range(i, n), key=lambda r: abs(M[r][i]))
|
|
73
68
|
if abs(M[max_row][i]) < 1e-12:
|
|
74
69
|
raise ValueError("Singular matrix in inversion")
|
|
75
70
|
M[i], M[max_row] = M[max_row], M[i]
|
|
76
|
-
|
|
77
71
|
pivot = M[i][i]
|
|
78
72
|
for j in range(2 * n):
|
|
79
73
|
M[i][j] /= pivot
|
|
80
|
-
|
|
81
74
|
for r in range(n):
|
|
82
75
|
if r != i:
|
|
83
76
|
factor = M[r][i]
|
|
84
77
|
for c in range(2 * n):
|
|
85
78
|
M[r][c] -= factor * M[i][c]
|
|
86
|
-
|
|
87
79
|
return [[M[i][n + j] for j in range(n)] for i in range(n)]
|
|
88
80
|
|
|
89
81
|
|
|
@@ -104,19 +96,28 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
104
96
|
return {"status": "error", "error_code": "ERR_INSUFFICIENT_ROWS",
|
|
105
97
|
"message": "Insufficient data rows (minimum 4 required)"}
|
|
106
98
|
|
|
107
|
-
# Normalize column names (+ cluster candidates; exact names only, never guessed)
|
|
108
99
|
field_map = {}
|
|
109
100
|
cluster_columns: List[str] = []
|
|
110
101
|
for col in rows[0].keys():
|
|
111
102
|
cl = col.strip().lower()
|
|
112
103
|
if cl in ("cluster_id", "class_id", "school_id", "group_id") or cl.endswith("_cluster"):
|
|
113
104
|
cluster_columns.append(col)
|
|
105
|
+
# Order matters. An outcome column is often named "post_test_score",
|
|
106
|
+
# which also contains "post": matching the period rule first stole the
|
|
107
|
+
# outcome column and the run failed with ERR_MISSING_COLUMNS. Outcome
|
|
108
|
+
# and treatment are the more specific patterns, so they are tested
|
|
109
|
+
# before the period keyword.
|
|
114
110
|
if "treat" in cl or cl in ("group", "condition", "is_treatment"):
|
|
115
111
|
field_map["treat"] = col
|
|
116
|
-
elif "post"
|
|
112
|
+
elif cl in ("post", "posttest", "pre_post", "period", "time_period"):
|
|
117
113
|
field_map["post"] = col
|
|
118
|
-
elif "score" in cl or "outcome" in cl or "grade" in cl or "result" in cl
|
|
114
|
+
elif ("score" in cl or "outcome" in cl or "grade" in cl or "result" in cl
|
|
115
|
+
or "performance" in cl or cl == "y"):
|
|
119
116
|
field_map["outcome"] = col
|
|
117
|
+
elif "post" in cl or "after" in cl or "period" in cl or "time" in cl:
|
|
118
|
+
# Generic period/phase column, only after the specific patterns
|
|
119
|
+
# above have had their chance.
|
|
120
|
+
field_map.setdefault("post", col)
|
|
120
121
|
|
|
121
122
|
if "treat" not in field_map or "post" not in field_map or "outcome" not in field_map:
|
|
122
123
|
return {
|
|
@@ -124,13 +125,10 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
124
125
|
"message": f"CSV missing required columns (need treat/post/outcome). Found: {list(rows[0].keys())}"
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
# Parse numeric arrays
|
|
128
128
|
y_vals: List[float] = []
|
|
129
129
|
treat_vals: List[float] = []
|
|
130
130
|
post_vals: List[float] = []
|
|
131
131
|
treat_post_vals: List[float] = []
|
|
132
|
-
|
|
133
|
-
# Cells for 2x2 table
|
|
134
132
|
cell_y = {(0, 0): [], (0, 1): [], (1, 0): [], (1, 1): []}
|
|
135
133
|
|
|
136
134
|
for r in rows:
|
|
@@ -138,7 +136,6 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
138
136
|
t = 1.0 if float(r[field_map["treat"]]) > 0.5 else 0.0
|
|
139
137
|
p = 1.0 if float(r[field_map["post"]]) > 0.5 else 0.0
|
|
140
138
|
y = float(r[field_map["outcome"]])
|
|
141
|
-
|
|
142
139
|
treat_vals.append(t)
|
|
143
140
|
post_vals.append(p)
|
|
144
141
|
treat_post_vals.append(t * p)
|
|
@@ -152,7 +149,6 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
152
149
|
return {"status": "error", "error_code": "ERR_PARSE",
|
|
153
150
|
"message": "Failed to parse sufficient numeric rows"}
|
|
154
151
|
|
|
155
|
-
# Cell means
|
|
156
152
|
means = {}
|
|
157
153
|
stds = {}
|
|
158
154
|
for k, v in cell_y.items():
|
|
@@ -165,7 +161,6 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
165
161
|
means[k] = 0.0
|
|
166
162
|
stds[k] = 1.0
|
|
167
163
|
|
|
168
|
-
# --- Estimability gates (fail closed; never fabricate inference) ---
|
|
169
164
|
if len(set(treat_vals)) < 2:
|
|
170
165
|
return {
|
|
171
166
|
"status": "error", "error_code": "ERR_NO_TREAT_VARIATION",
|
|
@@ -205,15 +200,12 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
205
200
|
y_t_pre = means[(1, 0)]
|
|
206
201
|
y_t_post = means[(1, 1)]
|
|
207
202
|
|
|
208
|
-
#
|
|
209
|
-
|
|
203
|
+
# Keep the simple 2x2 contrast as a diagnostic equivalence check.
|
|
204
|
+
_delta_simple = (y_t_post - y_t_pre) - (y_c_post - y_c_pre)
|
|
210
205
|
|
|
211
|
-
# OLS Estimation: Y = X * beta + e, X = [1, Treat, Post, Treat*Post]
|
|
212
|
-
# Build X^T X (4x4) and X^T Y (4x1)
|
|
213
206
|
X = [[1.0, treat_vals[i], post_vals[i], treat_post_vals[i]] for i in range(n)]
|
|
214
207
|
XtX = [[0.0] * 4 for _ in range(4)]
|
|
215
208
|
XtY = [0.0] * 4
|
|
216
|
-
|
|
217
209
|
for i in range(n):
|
|
218
210
|
row = X[i]
|
|
219
211
|
yi = y_vals[i]
|
|
@@ -232,7 +224,6 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
232
224
|
**_null_inference(),
|
|
233
225
|
}
|
|
234
226
|
|
|
235
|
-
# Residual sum of squares & Standard Error
|
|
236
227
|
rss = 0.0
|
|
237
228
|
for i in range(n):
|
|
238
229
|
y_hat = beta[0] + beta[1] * treat_vals[i] + beta[2] * post_vals[i] + beta[3] * treat_post_vals[i]
|
|
@@ -241,7 +232,6 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
241
232
|
df_resid = n - 4
|
|
242
233
|
sigma2 = rss / df_resid
|
|
243
234
|
r_squared = max(0.0, 1.0 - (rss / tss)) if tss > 0 else 0.0
|
|
244
|
-
|
|
245
235
|
if rss <= 0:
|
|
246
236
|
return {
|
|
247
237
|
"status": "error", "error_code": "ERR_ZERO_RESIDUAL",
|
|
@@ -252,16 +242,12 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
252
242
|
t_stat = beta[3] / se_delta if se_delta > 0 else 0.0
|
|
253
243
|
p_val = _two_tailed_p_from_z(t_stat)
|
|
254
244
|
|
|
255
|
-
# Standardized Effect Size: Hedges' g
|
|
256
245
|
s_pooled_pre = math.sqrt((stds[(0, 0)] ** 2 + stds[(1, 0)] ** 2) / 2.0) if stds[(0, 0)] and stds[(1, 0)] else 1.0
|
|
257
246
|
hedges_j = 1.0 - (3.0 / (4.0 * df_resid - 1.0)) if df_resid > 2 else 1.0
|
|
258
247
|
hedges_g = round(hedges_j * (beta[3] / s_pooled_pre), 3) if s_pooled_pre > 0 else 0.0
|
|
259
248
|
|
|
260
|
-
# Baseline Equivalence
|
|
261
249
|
baseline_diff = y_t_pre - y_c_pre
|
|
262
250
|
baseline_g = baseline_diff / s_pooled_pre if s_pooled_pre > 0 else 0.0
|
|
263
|
-
# QED/DID can never meet WWC 5.0 standards WITHOUT reservations; and without
|
|
264
|
-
# covariate-adjustment fields a 0.05<|g|<=0.25 baseline is not passable.
|
|
265
251
|
if abs(baseline_g) <= 0.05:
|
|
266
252
|
wwc_rating = "Meets Standards With Reservations"
|
|
267
253
|
elif abs(baseline_g) <= 0.25:
|
|
@@ -273,7 +259,6 @@ def run_did_analysis(csv_path: str) -> Dict[str, Any]:
|
|
|
273
259
|
round(beta[3] - 1.96 * se_delta, 3),
|
|
274
260
|
round(beta[3] + 1.96 * se_delta, 3)
|
|
275
261
|
]
|
|
276
|
-
|
|
277
262
|
cluster_note = (
|
|
278
263
|
f"cluster column(s) detected ({', '.join(cluster_columns)}) but cluster-robust "
|
|
279
264
|
"inference is not implemented in this build; p-value is not cluster-robust"
|
|
@@ -36,8 +36,11 @@ from evidence_semantics import claim_relation, decision_relation
|
|
|
36
36
|
DIMENSIONS = ["D1_study_design", "D2_sample_quality", "D3_measurement_validity",
|
|
37
37
|
"D4_temporal_strength", "D5_directness"]
|
|
38
38
|
|
|
39
|
-
#: Version of the deterministic confidence policy
|
|
40
|
-
|
|
39
|
+
#: Version of the deterministic confidence policy. Imported from the engine so
|
|
40
|
+
#: there is one authority: evidence_score previously hard-coded ".v2" while
|
|
41
|
+
#: engine/versions.py declared ".v3", so verdicts recorded a policy version the
|
|
42
|
+
#: engine did not recognise and nothing compared the two.
|
|
43
|
+
from engine.versions import CONFIDENCE_POLICY_VERSION # noqa: F401 (re-export)
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
def quality_score(dimensions: dict[str, int]) -> float:
|
|
@@ -10,10 +10,11 @@ Metrics:
|
|
|
10
10
|
- engine_version from engine/versions.py (the version authority)
|
|
11
11
|
- test_functions grep 'def test_' across tests/
|
|
12
12
|
- test_files number of collected test modules in tests/
|
|
13
|
-
- schema_count schemas/*.json
|
|
13
|
+
- schema_count schemas/*.json recursively
|
|
14
14
|
- reference_doc_count references/*.md
|
|
15
15
|
- gold_annotation_count benchmarks/annotations/gold-Q*.json
|
|
16
|
-
- example_packs examples/*/ directories shipping result.json
|
|
16
|
+
- example_packs real examples/*/ directories shipping result.json
|
|
17
|
+
(compatibility symlink aliases are excluded)
|
|
17
18
|
|
|
18
19
|
Usage:
|
|
19
20
|
python3 scripts/generate_metrics.py # regenerate docs/metrics.json
|
|
@@ -56,7 +57,7 @@ def collect() -> dict:
|
|
|
56
57
|
|
|
57
58
|
example_packs = sorted(
|
|
58
59
|
p.name for p in (REPO_ROOT / "examples").iterdir()
|
|
59
|
-
if p.is_dir() and (p / "result.json").exists()
|
|
60
|
+
if not p.is_symlink() and p.is_dir() and (p / "result.json").exists()
|
|
60
61
|
) if (REPO_ROOT / "examples").is_dir() else []
|
|
61
62
|
|
|
62
63
|
return {
|
|
@@ -12,7 +12,7 @@ import json
|
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
|
|
14
14
|
ROOT = Path(__file__).resolve().parent.parent
|
|
15
|
-
EXAMPLES_DIR = ROOT / "examples"
|
|
15
|
+
EXAMPLES_DIR = ROOT / "tests" / "fixtures" / "legacy-examples"
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def build_math_project():
|
|
@@ -194,7 +194,7 @@ def build_math_project():
|
|
|
194
194
|
"execution": {
|
|
195
195
|
"complexity": "L",
|
|
196
196
|
"mode": "agent_mcp_enhanced",
|
|
197
|
-
"agents": ["
|
|
197
|
+
"agents": ["research-planner", "evidence-retriever", "evidence-analyst", "skeptic", "method-reviewer", "evidence-judge", "intervention-designer", "evaluation-designer"]
|
|
198
198
|
},
|
|
199
199
|
"research_frame": {
|
|
200
200
|
"question": question_en,
|
|
@@ -266,7 +266,7 @@ def build_math_project():
|
|
|
266
266
|
"execution": {
|
|
267
267
|
"complexity": "L",
|
|
268
268
|
"mode": "agent_mcp_enhanced",
|
|
269
|
-
"agents": ["
|
|
269
|
+
"agents": ["research-planner", "evidence-retriever", "evidence-analyst", "skeptic", "method-reviewer", "evidence-judge", "intervention-designer", "evaluation-designer"]
|
|
270
270
|
},
|
|
271
271
|
"research_frame": {
|
|
272
272
|
"question": question_zh,
|
|
@@ -512,7 +512,7 @@ def build_writing_project():
|
|
|
512
512
|
"execution": {
|
|
513
513
|
"complexity": "L",
|
|
514
514
|
"mode": "agent_mcp_enhanced",
|
|
515
|
-
"agents": ["
|
|
515
|
+
"agents": ["research-planner", "evidence-retriever", "evidence-analyst", "skeptic", "method-reviewer", "evidence-judge", "intervention-designer", "evaluation-designer"]
|
|
516
516
|
},
|
|
517
517
|
"research_frame": {
|
|
518
518
|
"question": question_en,
|
|
@@ -584,7 +584,7 @@ def build_writing_project():
|
|
|
584
584
|
"execution": {
|
|
585
585
|
"complexity": "L",
|
|
586
586
|
"mode": "agent_mcp_enhanced",
|
|
587
|
-
"agents": ["
|
|
587
|
+
"agents": ["research-planner", "evidence-retriever", "evidence-analyst", "skeptic", "method-reviewer", "evidence-judge", "intervention-designer", "evaluation-designer"]
|
|
588
588
|
},
|
|
589
589
|
"research_frame": {
|
|
590
590
|
"question": question_zh,
|