@rpamis/comet 0.4.0-beta.3 → 0.4.0-beta.5
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/LICENSE +21 -21
- package/README.md +15 -1
- package/assets/manifest.json +2 -1
- package/assets/skills/comet/SKILL.md +54 -28
- package/assets/skills/comet/reference/auto-transition.md +1 -1
- package/assets/skills/comet/reference/comet-yaml-fields.md +11 -6
- package/assets/skills/comet/reference/context-recovery.md +12 -2
- package/assets/skills/comet/reference/decision-point.md +11 -0
- package/assets/skills/comet/reference/scripts.md +47 -15
- package/assets/skills/comet/reference/subagent-dispatch.md +6 -5
- package/assets/skills/comet/rules/comet-phase-guard.en.md +31 -28
- package/assets/skills/comet/rules/comet-phase-guard.md +31 -29
- package/assets/skills/comet/scripts/comet-resume-probe.mjs +3 -0
- package/assets/skills/comet/scripts/comet-runtime.mjs +1568 -476
- package/assets/skills/comet-any/SKILL.md +1 -1
- package/assets/skills/comet-any/reference/authored-zone-example.md +10 -5
- package/assets/skills/comet-any/reference/subagents/pause-points-author.md +14 -11
- package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +2 -0
- package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +5 -4
- package/assets/skills/comet-archive/SKILL.md +52 -18
- package/assets/skills/comet-build/SKILL.md +64 -45
- package/assets/skills/comet-design/SKILL.md +24 -22
- package/assets/skills/comet-hotfix/SKILL.md +37 -34
- package/assets/skills/comet-open/SKILL.md +106 -57
- package/assets/skills/comet-tweak/SKILL.md +23 -18
- package/assets/skills/comet-verify/SKILL.md +57 -72
- package/assets/skills-zh/comet/SKILL.md +54 -28
- package/assets/skills-zh/comet/reference/auto-transition.md +1 -1
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +11 -6
- package/assets/skills-zh/comet/reference/context-recovery.md +12 -2
- package/assets/skills-zh/comet/reference/decision-point.md +11 -0
- package/assets/skills-zh/comet/reference/scripts.md +47 -15
- package/assets/skills-zh/comet/reference/subagent-dispatch.md +6 -5
- package/assets/skills-zh/comet-any/SKILL.md +1 -1
- package/assets/skills-zh/comet-any/reference/authored-zone-example.md +10 -5
- package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +14 -12
- package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +2 -0
- package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +5 -4
- package/assets/skills-zh/comet-archive/SKILL.md +52 -18
- package/assets/skills-zh/comet-build/SKILL.md +64 -45
- package/assets/skills-zh/comet-design/SKILL.md +24 -22
- package/assets/skills-zh/comet-hotfix/SKILL.md +36 -33
- package/assets/skills-zh/comet-open/SKILL.md +105 -56
- package/assets/skills-zh/comet-tweak/SKILL.md +22 -17
- package/assets/skills-zh/comet-verify/SKILL.md +57 -72
- package/dist/app/cli/comet-banner.d.ts +25 -0
- package/dist/app/cli/comet-banner.d.ts.map +1 -0
- package/dist/app/cli/comet-banner.js +265 -0
- package/dist/app/cli/comet-banner.js.map +1 -0
- package/dist/app/cli/index.js +36 -2
- package/dist/app/cli/index.js.map +1 -1
- package/dist/app/commands/classic.d.ts +4 -0
- package/dist/app/commands/classic.d.ts.map +1 -0
- package/dist/app/commands/classic.js +11 -0
- package/dist/app/commands/classic.js.map +1 -0
- package/dist/app/commands/doctor.d.ts.map +1 -1
- package/dist/app/commands/doctor.js +99 -37
- package/dist/app/commands/doctor.js.map +1 -1
- package/dist/app/commands/eval.d.ts.map +1 -1
- package/dist/app/commands/eval.js +57 -20
- package/dist/app/commands/eval.js.map +1 -1
- package/dist/app/commands/i18n.d.ts +1 -1
- package/dist/app/commands/i18n.d.ts.map +1 -1
- package/dist/app/commands/i18n.js +12 -4
- package/dist/app/commands/i18n.js.map +1 -1
- package/dist/app/commands/init.d.ts +1 -1
- package/dist/app/commands/init.d.ts.map +1 -1
- package/dist/app/commands/init.js +72 -25
- package/dist/app/commands/init.js.map +1 -1
- package/dist/app/commands/project-scope-selection.d.ts +13 -0
- package/dist/app/commands/project-scope-selection.d.ts.map +1 -0
- package/dist/app/commands/project-scope-selection.js +33 -0
- package/dist/app/commands/project-scope-selection.js.map +1 -0
- package/dist/app/commands/resume-probe.d.ts +11 -0
- package/dist/app/commands/resume-probe.d.ts.map +1 -0
- package/dist/app/commands/resume-probe.js +63 -0
- package/dist/app/commands/resume-probe.js.map +1 -0
- package/dist/app/commands/status.d.ts +31 -0
- package/dist/app/commands/status.d.ts.map +1 -1
- package/dist/app/commands/status.js +109 -20
- package/dist/app/commands/status.js.map +1 -1
- package/dist/app/commands/uninstall.d.ts +5 -0
- package/dist/app/commands/uninstall.d.ts.map +1 -1
- package/dist/app/commands/uninstall.js +264 -53
- package/dist/app/commands/uninstall.js.map +1 -1
- package/dist/app/commands/update.d.ts +6 -0
- package/dist/app/commands/update.d.ts.map +1 -1
- package/dist/app/commands/update.js +558 -86
- package/dist/app/commands/update.js.map +1 -1
- package/dist/config/repository-layout.json +4 -2
- package/dist/domains/bundle/bundle-platform.d.ts +1 -0
- package/dist/domains/bundle/bundle-platform.d.ts.map +1 -1
- package/dist/domains/bundle/bundle-platform.js +9 -3
- package/dist/domains/bundle/bundle-platform.js.map +1 -1
- package/dist/domains/bundle/eval-manifest-runtime.d.ts +6 -0
- package/dist/domains/bundle/eval-manifest-runtime.d.ts.map +1 -0
- package/dist/domains/bundle/eval-manifest-runtime.js +58 -0
- package/dist/domains/bundle/eval-manifest-runtime.js.map +1 -0
- package/dist/domains/bundle/types.d.ts +1 -1
- package/dist/domains/bundle/types.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-archive.d.ts +1 -0
- package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-archive.js +35 -38
- package/dist/domains/comet-classic/classic-archive.js.map +1 -1
- package/dist/domains/comet-classic/classic-cli.d.ts +1 -1
- package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-cli.js +3 -0
- package/dist/domains/comet-classic/classic-cli.js.map +1 -1
- package/dist/domains/comet-classic/classic-command-checks.d.ts +20 -0
- package/dist/domains/comet-classic/classic-command-checks.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-command-checks.js +97 -0
- package/dist/domains/comet-classic/classic-command-checks.js.map +1 -0
- package/dist/domains/comet-classic/classic-current-change.d.ts +19 -0
- package/dist/domains/comet-classic/classic-current-change.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-current-change.js +132 -0
- package/dist/domains/comet-classic/classic-current-change.js.map +1 -0
- package/dist/domains/comet-classic/classic-diagnostics.d.ts +2 -1
- package/dist/domains/comet-classic/classic-diagnostics.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-diagnostics.js +54 -1
- package/dist/domains/comet-classic/classic-diagnostics.js.map +1 -1
- package/dist/domains/comet-classic/classic-evidence.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-evidence.js +4 -0
- package/dist/domains/comet-classic/classic-evidence.js.map +1 -1
- package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-guard.js +83 -80
- package/dist/domains/comet-classic/classic-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.js +179 -42
- package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-project-config.d.ts +16 -0
- package/dist/domains/comet-classic/classic-project-config.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-project-config.js +40 -0
- package/dist/domains/comet-classic/classic-project-config.js.map +1 -0
- package/dist/domains/comet-classic/classic-resolver.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-resolver.js +4 -4
- package/dist/domains/comet-classic/classic-resolver.js.map +1 -1
- package/dist/domains/comet-classic/classic-resume-probe-command.d.ts +3 -0
- package/dist/domains/comet-classic/classic-resume-probe-command.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe-command.js +58 -0
- package/dist/domains/comet-classic/classic-resume-probe-command.js.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.js +4 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe.d.ts +29 -0
- package/dist/domains/comet-classic/classic-resume-probe.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe.js +386 -0
- package/dist/domains/comet-classic/classic-resume-probe.js.map +1 -0
- package/dist/domains/comet-classic/classic-runtime-run.d.ts +2 -1
- package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-runtime-run.js +38 -0
- package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.js +150 -25
- package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-state.d.ts +5 -2
- package/dist/domains/comet-classic/classic-state.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state.js +17 -1
- package/dist/domains/comet-classic/classic-state.js.map +1 -1
- package/dist/domains/comet-classic/classic-store.d.ts +4 -1
- package/dist/domains/comet-classic/classic-store.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-store.js +4 -3
- package/dist/domains/comet-classic/classic-store.js.map +1 -1
- package/dist/domains/comet-classic/classic-transitions.d.ts +1 -1
- package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-transitions.js +36 -3
- package/dist/domains/comet-classic/classic-transitions.js.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.js +8 -1
- package/dist/domains/comet-classic/classic-validate-command.js.map +1 -1
- package/dist/domains/comet-classic/index.d.ts +3 -0
- package/dist/domains/comet-classic/index.d.ts.map +1 -1
- package/dist/domains/comet-classic/index.js +3 -0
- package/dist/domains/comet-classic/index.js.map +1 -1
- package/dist/domains/dashboard/collector.js +10 -2
- package/dist/domains/dashboard/collector.js.map +1 -1
- package/dist/domains/dashboard/web/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/dist/domains/dashboard/web/assets/arc-TGVUG2WN.js +1 -0
- package/dist/domains/dashboard/web/assets/architectureDiagram-3BPJPVTR-ASHmiHoP.js +36 -0
- package/dist/domains/dashboard/web/assets/blockDiagram-GPEHLZMM-CwASxBKe.js +132 -0
- package/dist/domains/dashboard/web/assets/c4Diagram-AAUBKEIU-BU8z_WNk.js +10 -0
- package/dist/domains/dashboard/web/assets/channel-kp6Ng2JJ.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-2J33WTMH-CBGlUx4_.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-4BX2VUAB-CS-iGcFz.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-55IACEB6-BUtCVJat.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-727SXJPM-C94tj_pf.js +206 -0
- package/dist/domains/dashboard/web/assets/chunk-AQP2D5EJ-BFOKcpdG.js +231 -0
- package/dist/domains/dashboard/web/assets/chunk-FMBD7UC4-Dmx8B-st.js +15 -0
- package/dist/domains/dashboard/web/assets/chunk-ND2GUHAM-DYV00CNn.js +1 -0
- package/dist/domains/dashboard/web/assets/chunk-QZHKN3VN-DMJJyQnw.js +1 -0
- package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-yBDjgMY_.js +1 -0
- package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-yBDjgMY_.js +1 -0
- package/dist/domains/dashboard/web/assets/cose-bilkent-S5V4N54A-P4nE2rea.js +1 -0
- package/dist/domains/dashboard/web/assets/cynefin-VYW2F7L2-C-R1HXDv.js +166 -0
- package/dist/domains/dashboard/web/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
- package/dist/domains/dashboard/web/assets/dagre-BM42HDAG-BH8d-C9z.js +4 -0
- package/dist/domains/dashboard/web/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/domains/dashboard/web/assets/diagram-2AECGRRQ-DpXTgQIH.js +43 -0
- package/dist/domains/dashboard/web/assets/diagram-5GNKFQAL-DSiFJzSw.js +10 -0
- package/dist/domains/dashboard/web/assets/diagram-KO2AKTUF-DULMkben.js +3 -0
- package/dist/domains/dashboard/web/assets/diagram-LMA3HP47-Pi8m_NO9.js +24 -0
- package/dist/domains/dashboard/web/assets/diagram-OG6HWLK6-BSe6bCWm.js +24 -0
- package/dist/domains/dashboard/web/assets/erDiagram-TEJ5UH35-zb-FEcbq.js +85 -0
- package/dist/domains/dashboard/web/assets/flowDiagram-I6XJVG4X-Dr-Gk0z2.js +162 -0
- package/dist/domains/dashboard/web/assets/ganttDiagram-6RSMTGT7-qs6Zb2A6.js +292 -0
- package/dist/domains/dashboard/web/assets/gitGraphDiagram-PVQCEYII-BQ314orT.js +106 -0
- package/dist/domains/dashboard/web/assets/graph--OzhPTMs.js +1 -0
- package/dist/domains/dashboard/web/assets/index-BLAfkNTu.css +1 -0
- package/dist/domains/dashboard/web/assets/index-DlSYK56b.js +139 -0
- package/dist/domains/dashboard/web/assets/index-DtLUOcAW.js +24 -0
- package/dist/domains/dashboard/web/assets/index-QO0z6F4w.js +10 -0
- package/dist/domains/dashboard/web/assets/infoDiagram-5YYISTIA-O0bQp98A.js +2 -0
- package/dist/domains/dashboard/web/assets/init-Gi6I4Gst.js +1 -0
- package/dist/domains/dashboard/web/assets/ishikawaDiagram-YF4QCWOH-BPC7wbKh.js +70 -0
- package/dist/domains/dashboard/web/assets/journeyDiagram-JHISSGLW-ohViOd4b.js +139 -0
- package/dist/domains/dashboard/web/assets/kanban-definition-UN3LZRKU-CHleNdbG.js +89 -0
- package/dist/domains/dashboard/web/assets/katex-HP8lGamR.js +257 -0
- package/dist/domains/dashboard/web/assets/layout-SsrduOYp.js +1 -0
- package/dist/domains/dashboard/web/assets/linear-CyqiW--Q.js +1 -0
- package/dist/domains/dashboard/web/assets/marked.esm-DECB3bxB.js +64 -0
- package/dist/domains/dashboard/web/assets/mermaid.core-qS9XvtaK.js +301 -0
- package/dist/domains/dashboard/web/assets/mindmap-definition-RKZ34NQL-oaGkqO9l.js +96 -0
- package/dist/domains/dashboard/web/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/domains/dashboard/web/assets/pieDiagram-4H26LBE5-CPcB-AFh.js +30 -0
- package/dist/domains/dashboard/web/assets/purify.es-VaSPOPhr.js +3 -0
- package/dist/domains/dashboard/web/assets/quadrantDiagram-W4KKPZXB-LFy52Qtj.js +7 -0
- package/dist/domains/dashboard/web/assets/requirementDiagram-4Y6WPE33-BdjeaYP_.js +84 -0
- package/dist/domains/dashboard/web/assets/sankeyDiagram-5OEKKPKP-DDJ4styL.js +40 -0
- package/dist/domains/dashboard/web/assets/sequenceDiagram-3UESZ5HK-BL5bFNoz.js +162 -0
- package/dist/domains/dashboard/web/assets/stateDiagram-AJRCARHV-BNUfikui.js +1 -0
- package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-DGrsmWts.js +1 -0
- package/dist/domains/dashboard/web/assets/timeline-definition-PNZ67QCA--ps2uu6L.js +120 -0
- package/dist/domains/dashboard/web/assets/vennDiagram-CIIHVFJN-C2q8q26c.js +34 -0
- package/dist/domains/dashboard/web/assets/wardleyDiagram-YWT4CUSO-BUH9gXqd.js +78 -0
- package/dist/domains/dashboard/web/assets/xychartDiagram-2RQKCTM6-B-DielEy.js +7 -0
- package/dist/domains/dashboard/web/index.html +16 -16
- package/dist/domains/engine/types.d.ts +1 -1
- package/dist/domains/engine/types.d.ts.map +1 -1
- package/dist/domains/factory/package.d.ts.map +1 -1
- package/dist/domains/factory/package.js +20 -6
- package/dist/domains/factory/package.js.map +1 -1
- package/dist/domains/integrations/openspec.d.ts +4 -1
- package/dist/domains/integrations/openspec.d.ts.map +1 -1
- package/dist/domains/integrations/openspec.js +62 -10
- package/dist/domains/integrations/openspec.js.map +1 -1
- package/dist/domains/skill/find.d.ts.map +1 -1
- package/dist/domains/skill/find.js +1 -6
- package/dist/domains/skill/find.js.map +1 -1
- package/dist/domains/skill/json-object.d.ts +13 -0
- package/dist/domains/skill/json-object.d.ts.map +1 -0
- package/dist/domains/skill/json-object.js +24 -0
- package/dist/domains/skill/json-object.js.map +1 -0
- package/dist/domains/skill/managed-markdown.d.ts +14 -0
- package/dist/domains/skill/managed-markdown.d.ts.map +1 -0
- package/dist/domains/skill/managed-markdown.js +126 -0
- package/dist/domains/skill/managed-markdown.js.map +1 -0
- package/dist/domains/skill/platform-inspect.d.ts +9 -0
- package/dist/domains/skill/platform-inspect.d.ts.map +1 -0
- package/dist/domains/skill/platform-inspect.js +149 -0
- package/dist/domains/skill/platform-inspect.js.map +1 -0
- package/dist/domains/skill/platform-install.d.ts +20 -9
- package/dist/domains/skill/platform-install.d.ts.map +1 -1
- package/dist/domains/skill/platform-install.js +356 -153
- package/dist/domains/skill/platform-install.js.map +1 -1
- package/dist/domains/skill/project-instructions.d.ts +22 -0
- package/dist/domains/skill/project-instructions.d.ts.map +1 -0
- package/dist/domains/skill/project-instructions.js +61 -0
- package/dist/domains/skill/project-instructions.js.map +1 -0
- package/dist/domains/skill/uninstall.d.ts +3 -1
- package/dist/domains/skill/uninstall.d.ts.map +1 -1
- package/dist/domains/skill/uninstall.js +259 -149
- package/dist/domains/skill/uninstall.js.map +1 -1
- package/dist/platform/fs/file-system.d.ts +3 -3
- package/dist/platform/fs/file-system.d.ts.map +1 -1
- package/dist/platform/fs/file-system.js +21 -11
- package/dist/platform/fs/file-system.js.map +1 -1
- package/dist/platform/install/detect.d.ts +2 -1
- package/dist/platform/install/detect.d.ts.map +1 -1
- package/dist/platform/install/detect.js +10 -1
- package/dist/platform/install/detect.js.map +1 -1
- package/dist/platform/install/platforms.d.ts +9 -1
- package/dist/platform/install/platforms.d.ts.map +1 -1
- package/dist/platform/install/platforms.js +23 -4
- package/dist/platform/install/platforms.js.map +1 -1
- package/dist/platform/install/project-registry.d.ts +38 -0
- package/dist/platform/install/project-registry.d.ts.map +1 -0
- package/dist/platform/install/project-registry.js +213 -0
- package/dist/platform/install/project-registry.js.map +1 -0
- package/dist/platform/install/skill-root-owner.d.ts +15 -0
- package/dist/platform/install/skill-root-owner.d.ts.map +1 -0
- package/dist/platform/install/skill-root-owner.js +68 -0
- package/dist/platform/install/skill-root-owner.js.map +1 -0
- package/eval/.env.example +52 -0
- package/eval/CLAUDE.md +43 -0
- package/eval/README.md +538 -0
- package/eval/langsmith/.env.example +16 -0
- package/eval/langsmith/README.md +93 -0
- package/eval/langsmith/skills/README.md +5 -0
- package/eval/langsmith/tasks/README.md +5 -0
- package/eval/langsmith/tests/conftest.py +187 -0
- package/eval/langsmith/tests/tasks/test_tasks.py +287 -0
- package/eval/langsmith/treatments/README.md +5 -0
- package/eval/local/README.md +80 -0
- package/eval/local/regression_baseline.json +13 -0
- package/eval/local/report-style-demo-assets/quality_cost.en.svg +41 -0
- package/eval/local/report-style-demo-assets/quality_cost.zh.svg +41 -0
- package/eval/local/report-style-demo-assets/rubric_delta.en.svg +56 -0
- package/eval/local/report-style-demo-assets/rubric_delta.zh.svg +56 -0
- package/eval/local/report-style-demo-assets/task_outcomes.en.svg +46 -0
- package/eval/local/report-style-demo-assets/task_outcomes.zh.svg +46 -0
- package/eval/local/report-style-demo.html +867 -0
- package/eval/local/scripts/compare_baselines.py +1018 -0
- package/eval/local/scripts/generate_report_style_demo_charts.py +322 -0
- package/eval/local/scripts/regression_check.py +171 -0
- package/eval/local/scripts/render_readme_benchmark_figures.py +416 -0
- package/eval/local/scripts/rescore_rubric.py +120 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/SKILL.md +282 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/auto-transition.md +27 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/comet-yaml-fields.md +68 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/context-recovery.md +35 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/debug-gate.md +17 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/decision-point.md +20 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/dirty-worktree.md +59 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/file-structure.md +28 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/subagent-dispatch.md +113 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/rules/comet-phase-guard.md +125 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-archive.sh +311 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-env.sh +110 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-guard.sh +778 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-handoff.sh +390 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-hook-guard.sh +336 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-state.sh +1338 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-yaml-validate.sh +225 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-archive/SKILL.md +100 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-build/SKILL.md +304 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-design/SKILL.md +263 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-hotfix/SKILL.md +204 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-open/SKILL.md +220 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-tweak/SKILL.md +180 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-verify/SKILL.md +234 -0
- package/eval/local/skills/benchmarks/040-beta/comet/SKILL.md +261 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/auto-transition.md +27 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/comet-yaml-fields.md +73 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/context-recovery.md +45 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/debug-gate.md +33 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/decision-point.md +31 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/dirty-worktree.md +59 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/file-structure.md +28 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/intent-frame.md +74 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/scripts.md +69 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/subagent-dispatch.md +169 -0
- package/eval/local/skills/benchmarks/040-beta/comet/rules/comet-phase-guard.md +130 -0
- package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/checks.yaml +6 -0
- package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/guardrails.yaml +13 -0
- package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/skill.yaml +122 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-archive.mjs +9515 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-env.mjs +15 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-guard.mjs +10173 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-handoff.mjs +9491 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-hook-guard.mjs +9175 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-intent.mjs +404 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-state.mjs +9273 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-yaml-validate.mjs +7627 -0
- package/eval/local/skills/benchmarks/040-beta/comet-archive/SKILL.md +110 -0
- package/eval/local/skills/benchmarks/040-beta/comet-build/SKILL.md +315 -0
- package/eval/local/skills/benchmarks/040-beta/comet-design/SKILL.md +260 -0
- package/eval/local/skills/benchmarks/040-beta/comet-hotfix/SKILL.md +190 -0
- package/eval/local/skills/benchmarks/040-beta/comet-open/SKILL.md +210 -0
- package/eval/local/skills/benchmarks/040-beta/comet-tweak/SKILL.md +183 -0
- package/eval/local/skills/benchmarks/040-beta/comet-verify/SKILL.md +230 -0
- package/eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md +12 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-apply-change/SKILL.md +156 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-archive-change/SKILL.md +114 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-bulk-archive-change/SKILL.md +246 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-continue-change/SKILL.md +118 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-explore/SKILL.md +288 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-ff-change/SKILL.md +101 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-new-change/SKILL.md +74 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-onboard/SKILL.md +554 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-propose/SKILL.md +110 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-sync-specs/SKILL.md +138 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-verify-change/SKILL.md +168 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/SKILL.md +159 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/frame-template.html +213 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/helper.js +167 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/server.cjs +723 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/start-server.sh +209 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/stop-server.sh +120 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/visual-companion.md +291 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/dispatching-parallel-agents/SKILL.md +185 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/executing-plans/SKILL.md +70 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/finishing-a-development-branch/SKILL.md +241 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/receiving-code-review/SKILL.md +213 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/SKILL.md +103 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/code-reviewer.md +172 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/SKILL.md +418 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/implementer-prompt.md +139 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/review-package +44 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/task-brief +40 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/SKILL.md +296 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/find-polluter.sh +63 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-academic.md +14 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/SKILL.md +371 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/using-git-worktrees/SKILL.md +202 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/verification-before-completion/SKILL.md +139 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/SKILL.md +174 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/SKILL.md +689 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/render-graphs.js +168 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
- package/eval/local/tasks/authoring-skill-smoke/environment/Dockerfile +2 -0
- package/eval/local/tasks/authoring-skill-smoke/instruction.md +4 -0
- package/eval/local/tasks/authoring-skill-smoke/task.toml +21 -0
- package/eval/local/tasks/authoring-skill-smoke/validation/test_authoring_skill_smoke.py +54 -0
- package/eval/local/tasks/comet-agent-memory-routing/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-agent-memory-routing/environment/agent_system.py +40 -0
- package/eval/local/tasks/comet-agent-memory-routing/environment/test_agent_system.py +29 -0
- package/eval/local/tasks/comet-agent-memory-routing/instruction.md +20 -0
- package/eval/local/tasks/comet-agent-memory-routing/task.toml +24 -0
- package/eval/local/tasks/comet-agent-memory-routing/validation/test_agent_memory_routing.py +24 -0
- package/eval/local/tasks/comet-api-cache-ttl/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-api-cache-ttl/environment/cache.py +39 -0
- package/eval/local/tasks/comet-api-cache-ttl/environment/test_cache.py +81 -0
- package/eval/local/tasks/comet-api-cache-ttl/instruction.md +33 -0
- package/eval/local/tasks/comet-api-cache-ttl/task.toml +24 -0
- package/eval/local/tasks/comet-api-cache-ttl/validation/test_api_cache_ttl.py +58 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/cli.py +13 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/counting.py +13 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/test_textkit.py +21 -0
- package/eval/local/tasks/comet-cross-file-refactor/instruction.md +16 -0
- package/eval/local/tasks/comet-cross-file-refactor/task.toml +20 -0
- package/eval/local/tasks/comet-cross-file-refactor/validation/test_cross_file_refactor.py +20 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/app.py +8 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/settings_loader.py +14 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/test_settings_service.py +19 -0
- package/eval/local/tasks/comet-dependency-confusion/instruction.md +18 -0
- package/eval/local/tasks/comet-dependency-confusion/task.toml +24 -0
- package/eval/local/tasks/comet-dependency-confusion/validation/test_dependency_confusion.py +24 -0
- package/eval/local/tasks/comet-fix-median/environment/Dockerfile +50 -0
- package/eval/local/tasks/comet-fix-median/environment/stats.py +54 -0
- package/eval/local/tasks/comet-fix-median/environment/test_stats.py +68 -0
- package/eval/local/tasks/comet-fix-median/instruction.md +25 -0
- package/eval/local/tasks/comet-fix-median/task.toml +24 -0
- package/eval/local/tasks/comet-fix-median/validation/test_fix_median.py +60 -0
- package/eval/local/tasks/comet-framework-selection/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-framework-selection/environment/architecture.py +12 -0
- package/eval/local/tasks/comet-framework-selection/environment/test_architecture.py +30 -0
- package/eval/local/tasks/comet-framework-selection/instruction.md +22 -0
- package/eval/local/tasks/comet-framework-selection/task.toml +24 -0
- package/eval/local/tasks/comet-framework-selection/validation/test_framework_selection.py +24 -0
- package/eval/local/tasks/comet-full-workflow/environment/Dockerfile +53 -0
- package/eval/local/tasks/comet-full-workflow/environment/test_wordcount.py +29 -0
- package/eval/local/tasks/comet-full-workflow/environment/wordcount.py +40 -0
- package/eval/local/tasks/comet-full-workflow/instruction.md +18 -0
- package/eval/local/tasks/comet-full-workflow/task.toml +24 -0
- package/eval/local/tasks/comet-full-workflow/validation/test_full_workflow.py +171 -0
- package/eval/local/tasks/comet-graph-execution-review/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-graph-execution-review/environment/pipeline.py +19 -0
- package/eval/local/tasks/comet-graph-execution-review/environment/test_pipeline.py +53 -0
- package/eval/local/tasks/comet-graph-execution-review/instruction.md +21 -0
- package/eval/local/tasks/comet-graph-execution-review/task.toml +24 -0
- package/eval/local/tasks/comet-graph-execution-review/validation/test_graph_execution_review.py +24 -0
- package/eval/local/tasks/comet-human-approval-flow/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-human-approval-flow/environment/approvals.py +17 -0
- package/eval/local/tasks/comet-human-approval-flow/environment/test_approvals.py +30 -0
- package/eval/local/tasks/comet-human-approval-flow/instruction.md +15 -0
- package/eval/local/tasks/comet-human-approval-flow/task.toml +20 -0
- package/eval/local/tasks/comet-human-approval-flow/validation/test_human_approval_flow.py +20 -0
- package/eval/local/tasks/comet-layered-streaming-fix/environment/Dockerfile +20 -0
- package/eval/local/tasks/comet-layered-streaming-fix/environment/chat_app.py +19 -0
- package/eval/local/tasks/comet-layered-streaming-fix/environment/test_chat_app.py +15 -0
- package/eval/local/tasks/comet-layered-streaming-fix/instruction.md +14 -0
- package/eval/local/tasks/comet-layered-streaming-fix/task.toml +20 -0
- package/eval/local/tasks/comet-layered-streaming-fix/validation/test_layered_streaming_fix.py +20 -0
- package/eval/local/tasks/comet-noise-distractor/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-noise-distractor/environment/distractor.md +4 -0
- package/eval/local/tasks/comet-noise-distractor/environment/invoice.py +5 -0
- package/eval/local/tasks/comet-noise-distractor/environment/test_invoice.py +18 -0
- package/eval/local/tasks/comet-noise-distractor/instruction.md +17 -0
- package/eval/local/tasks/comet-noise-distractor/task.toml +20 -0
- package/eval/local/tasks/comet-noise-distractor/validation/test_noise_distractor.py +20 -0
- package/eval/local/tasks/comet-observability-env-template/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-observability-env-template/environment/env_writer.py +17 -0
- package/eval/local/tasks/comet-observability-env-template/environment/test_env_writer.py +17 -0
- package/eval/local/tasks/comet-observability-env-template/instruction.md +20 -0
- package/eval/local/tasks/comet-observability-env-template/task.toml +20 -0
- package/eval/local/tasks/comet-observability-env-template/validation/test_observability_env_template.py +46 -0
- package/eval/local/tasks/comet-perf-dedupe/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-perf-dedupe/environment/dedupe.py +22 -0
- package/eval/local/tasks/comet-perf-dedupe/environment/test_dedupe.py +43 -0
- package/eval/local/tasks/comet-perf-dedupe/instruction.md +25 -0
- package/eval/local/tasks/comet-perf-dedupe/task.toml +24 -0
- package/eval/local/tasks/comet-perf-dedupe/validation/test_perf_dedupe.py +40 -0
- package/eval/local/tasks/comet-persistence-threading/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-persistence-threading/environment/session_store.py +15 -0
- package/eval/local/tasks/comet-persistence-threading/environment/test_session_store.py +21 -0
- package/eval/local/tasks/comet-persistence-threading/instruction.md +14 -0
- package/eval/local/tasks/comet-persistence-threading/task.toml +20 -0
- package/eval/local/tasks/comet-persistence-threading/validation/test_persistence_threading.py +20 -0
- package/eval/local/tasks/comet-refactor-counter/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-refactor-counter/environment/test_text_processor.py +57 -0
- package/eval/local/tasks/comet-refactor-counter/environment/text_processor.py +49 -0
- package/eval/local/tasks/comet-refactor-counter/instruction.md +31 -0
- package/eval/local/tasks/comet-refactor-counter/task.toml +24 -0
- package/eval/local/tasks/comet-refactor-counter/validation/test_refactor_counter.py +75 -0
- package/eval/local/tasks/comet-robust-config/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-robust-config/environment/config_loader.py +56 -0
- package/eval/local/tasks/comet-robust-config/environment/test_config_loader.py +72 -0
- package/eval/local/tasks/comet-robust-config/instruction.md +30 -0
- package/eval/local/tasks/comet-robust-config/task.toml +24 -0
- package/eval/local/tasks/comet-robust-config/validation/test_robust_config.py +37 -0
- package/eval/local/tasks/generic-skill-smoke/environment/Dockerfile +2 -0
- package/eval/local/tasks/generic-skill-smoke/instruction.md +7 -0
- package/eval/local/tasks/generic-skill-smoke/task.toml +21 -0
- package/eval/local/tasks/generic-skill-smoke/validation/test_generic_skill_smoke.py +36 -0
- package/eval/local/tasks/index.yaml +155 -0
- package/eval/local/tasks/workflow-overlay-contract/environment/Dockerfile +5 -0
- package/eval/local/tasks/workflow-overlay-contract/instruction.md +5 -0
- package/eval/local/tasks/workflow-overlay-contract/task.toml +21 -0
- package/eval/local/tasks/workflow-overlay-contract/validation/test_workflow_overlay_contract.py +235 -0
- package/eval/local/tasks/workflow-route-conformance/environment/Dockerfile +2 -0
- package/eval/local/tasks/workflow-route-conformance/instruction.md +5 -0
- package/eval/local/tasks/workflow-route-conformance/task.toml +21 -0
- package/eval/local/tasks/workflow-route-conformance/validation/test_workflow_route_conformance.py +84 -0
- package/eval/local/tests/conftest.py +1148 -0
- package/eval/local/tests/scaffold/test_attribution.py +48 -0
- package/eval/local/tests/scaffold/test_compare_baselines.py +999 -0
- package/eval/local/tests/scaffold/test_conftest_helpers.py +534 -0
- package/eval/local/tests/scaffold/test_evidence.py +15 -0
- package/eval/local/tests/scaffold/test_langsmith_conftest.py +244 -0
- package/eval/local/tests/scaffold/test_logging.py +243 -0
- package/eval/local/tests/scaffold/test_manifests.py +132 -0
- package/eval/local/tests/scaffold/test_profiles.py +866 -0
- package/eval/local/tests/scaffold/test_regression_check.py +19 -0
- package/eval/local/tests/scaffold/test_report_style_demo_charts.py +45 -0
- package/eval/local/tests/scaffold/test_sample_quality.py +211 -0
- package/eval/local/tests/scaffold/test_tasks.py +168 -0
- package/eval/local/tests/scaffold/test_treatments.py +244 -0
- package/eval/local/tests/scaffold/test_utils.py +139 -0
- package/eval/local/tests/tasks/test_tasks.py +445 -0
- package/eval/local/tests/tasks/test_validation_scripts.py +143 -0
- package/eval/local/treatments/comet/comet_full_039.yaml +141 -0
- package/eval/local/treatments/comet/comet_full_040_beta.yaml +140 -0
- package/eval/local/treatments/common/control.yaml +4 -0
- package/eval/pyproject.toml +41 -0
- package/eval/report-html-config.json +6 -0
- package/eval/scaffold/__init__.py +67 -0
- package/eval/scaffold/python/__init__.py +95 -0
- package/eval/scaffold/python/attribution.py +43 -0
- package/eval/scaffold/python/evidence.py +38 -0
- package/eval/scaffold/python/external_data_handler.py +18 -0
- package/eval/scaffold/python/generic_llm_judge.py +235 -0
- package/eval/scaffold/python/judge_config.py +168 -0
- package/eval/scaffold/python/llm_judge.py +191 -0
- package/eval/scaffold/python/logging.py +705 -0
- package/eval/scaffold/python/manifests.py +129 -0
- package/eval/scaffold/python/paper_charts.py +25 -0
- package/eval/scaffold/python/pass_at_k.py +107 -0
- package/eval/scaffold/python/paths.py +56 -0
- package/eval/scaffold/python/profiles.py +127 -0
- package/eval/scaffold/python/report_outputs.py +1391 -0
- package/eval/scaffold/python/sample_quality.py +339 -0
- package/eval/scaffold/python/schema.py +39 -0
- package/eval/scaffold/python/skill_parser.py +469 -0
- package/eval/scaffold/python/tasks.py +330 -0
- package/eval/scaffold/python/treatments.py +271 -0
- package/eval/scaffold/python/utils.py +366 -0
- package/eval/scaffold/python/validation/__init__.py +21 -0
- package/eval/scaffold/python/validation/authoring_rubric.py +326 -0
- package/eval/scaffold/python/validation/comet_workflow.py +187 -0
- package/eval/scaffold/python/validation/core.py +264 -0
- package/eval/scaffold/python/validation/dataset.py +337 -0
- package/eval/scaffold/python/validation/docker.py +106 -0
- package/eval/scaffold/python/validation/evaluator.py +549 -0
- package/eval/scaffold/python/validation/generic_rubric.py +169 -0
- package/eval/scaffold/python/validation/rubric.py +740 -0
- package/eval/scaffold/python/validation/runner.py +237 -0
- package/eval/scaffold/python/validation/scripts.py +58 -0
- package/eval/scaffold/python/validation/tracing.py +313 -0
- package/eval/scaffold/shell/common.sh +126 -0
- package/eval/scaffold/shell/docker.sh +482 -0
- package/eval/scaffold/shell/run-claude-loop.sh +181 -0
- package/eval/scaffold/shell/setup.sh +259 -0
- package/eval/simulator-instruction.md +9 -0
- package/package.json +29 -2
- package/dist/domains/dashboard/web/assets/index-BcO3_QlT.css +0 -1
- package/dist/domains/dashboard/web/assets/index-CjU3VXVu.js +0 -22
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
"""Evaluator validation utilities.
|
|
2
|
+
|
|
3
|
+
Validates evaluator files for:
|
|
4
|
+
- Existence and language correctness
|
|
5
|
+
- Syntax validity
|
|
6
|
+
- LangSmith evaluator patterns (run, example signature)
|
|
7
|
+
- Logic execution via Docker
|
|
8
|
+
- LangSmith upload verification
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import ast
|
|
12
|
+
import json
|
|
13
|
+
import re
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
from scaffold.python.utils import (
|
|
17
|
+
get_langsmith_client,
|
|
18
|
+
run_node_in_docker,
|
|
19
|
+
run_python_in_docker,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def find_evaluator_file(
|
|
24
|
+
test_dir: Path,
|
|
25
|
+
directory: str,
|
|
26
|
+
extensions: list[str],
|
|
27
|
+
) -> Path | None:
|
|
28
|
+
"""Find evaluator file in a directory.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
test_dir: Test working directory
|
|
32
|
+
directory: Subdirectory (e.g., "backend", "frontend")
|
|
33
|
+
extensions: List of file extensions to try
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
Path to evaluator file or None
|
|
37
|
+
"""
|
|
38
|
+
dir_path = test_dir / directory
|
|
39
|
+
if not dir_path.exists():
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
for ext in extensions:
|
|
43
|
+
for name in ["evaluator", "evaluators"]:
|
|
44
|
+
path = dir_path / f"{name}.{ext}"
|
|
45
|
+
if path.exists():
|
|
46
|
+
return path
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def find_evaluator_function(content: str, language: str) -> tuple[str | None, str | None]:
|
|
51
|
+
"""Find evaluator function name via AST (Python) or regex (TypeScript).
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
content: File content
|
|
55
|
+
language: "python" or "typescript"/"javascript"
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
(function_name, error_message) - one will be None
|
|
59
|
+
"""
|
|
60
|
+
if language == "python":
|
|
61
|
+
try:
|
|
62
|
+
tree = ast.parse(content)
|
|
63
|
+
for node in ast.walk(tree):
|
|
64
|
+
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
65
|
+
args = [a.arg for a in node.args.args]
|
|
66
|
+
if "run" in args and "example" in args:
|
|
67
|
+
return node.name, None
|
|
68
|
+
return None, "no (run, example) function found"
|
|
69
|
+
except SyntaxError as e:
|
|
70
|
+
return None, f"syntax error line {e.lineno}"
|
|
71
|
+
else:
|
|
72
|
+
# JavaScript/TypeScript - use regex
|
|
73
|
+
func_match = re.search(r"function\s+(\w+)\s*\(\s*run", content)
|
|
74
|
+
if func_match:
|
|
75
|
+
return func_match.group(1), None
|
|
76
|
+
# Try arrow function
|
|
77
|
+
func_match = re.search(r"const\s+(\w+)\s*=\s*(?:async\s*)?\([^)]*run", content)
|
|
78
|
+
if func_match:
|
|
79
|
+
return func_match.group(1), None
|
|
80
|
+
return None, "no (run, example) function found"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def check_evaluator_exists(
|
|
84
|
+
test_dir: Path,
|
|
85
|
+
outputs: dict,
|
|
86
|
+
python_dir: str = "backend",
|
|
87
|
+
javascript_dir: str = "frontend",
|
|
88
|
+
) -> tuple[list[str], list[str]]:
|
|
89
|
+
"""Validate that evaluator files exist for both languages.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
test_dir: Test working directory
|
|
93
|
+
outputs: Outputs dict
|
|
94
|
+
python_dir: Directory for Python evaluator
|
|
95
|
+
javascript_dir: Directory for JavaScript/TypeScript evaluator
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
(passed, failed) lists
|
|
99
|
+
"""
|
|
100
|
+
passed, failed = [], []
|
|
101
|
+
|
|
102
|
+
# Check Python evaluator
|
|
103
|
+
py_path = find_evaluator_file(test_dir, python_dir, ["py"])
|
|
104
|
+
if py_path:
|
|
105
|
+
passed.append(f"Python evaluator: {py_path.name} exists")
|
|
106
|
+
else:
|
|
107
|
+
failed.append(f"Python evaluator: not found in {python_dir}/")
|
|
108
|
+
|
|
109
|
+
# Check JavaScript/TypeScript evaluator
|
|
110
|
+
js_path = find_evaluator_file(test_dir, javascript_dir, ["ts", "js"])
|
|
111
|
+
if js_path:
|
|
112
|
+
passed.append(f"JavaScript evaluator: {js_path.name} exists")
|
|
113
|
+
else:
|
|
114
|
+
failed.append(f"JavaScript evaluator: not found in {javascript_dir}/")
|
|
115
|
+
|
|
116
|
+
return passed, failed
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def check_evaluator_syntax(
|
|
120
|
+
test_dir: Path,
|
|
121
|
+
outputs: dict,
|
|
122
|
+
python_dir: str = "backend",
|
|
123
|
+
javascript_dir: str = "frontend",
|
|
124
|
+
) -> tuple[list[str], list[str]]:
|
|
125
|
+
"""Validate evaluator code has valid syntax.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
test_dir: Test working directory
|
|
129
|
+
outputs: Outputs dict
|
|
130
|
+
python_dir: Directory for Python evaluator
|
|
131
|
+
javascript_dir: Directory for JavaScript/TypeScript evaluator
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
(passed, failed) lists
|
|
135
|
+
"""
|
|
136
|
+
passed, failed = [], []
|
|
137
|
+
|
|
138
|
+
# Check Python syntax
|
|
139
|
+
py_path = find_evaluator_file(test_dir, python_dir, ["py"])
|
|
140
|
+
if py_path:
|
|
141
|
+
content = py_path.read_text()
|
|
142
|
+
try:
|
|
143
|
+
ast.parse(content)
|
|
144
|
+
passed.append(f"Python: {py_path.name} valid syntax")
|
|
145
|
+
except SyntaxError as e:
|
|
146
|
+
failed.append(f"Python: syntax error at line {e.lineno}: {e.msg}")
|
|
147
|
+
|
|
148
|
+
# Check JavaScript/TypeScript syntax (basic check)
|
|
149
|
+
js_path = find_evaluator_file(test_dir, javascript_dir, ["ts", "js"])
|
|
150
|
+
if js_path:
|
|
151
|
+
content = js_path.read_text()
|
|
152
|
+
if _basic_js_syntax_check(content):
|
|
153
|
+
passed.append(f"JavaScript: {js_path.name} valid syntax")
|
|
154
|
+
else:
|
|
155
|
+
failed.append(f"JavaScript: {js_path.name} syntax appears invalid")
|
|
156
|
+
|
|
157
|
+
return passed, failed
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def _basic_js_syntax_check(content: str) -> bool:
|
|
161
|
+
"""Basic JavaScript syntax validation."""
|
|
162
|
+
# Check balanced braces
|
|
163
|
+
if content.count("{") != content.count("}"):
|
|
164
|
+
return False
|
|
165
|
+
if content.count("(") != content.count(")"):
|
|
166
|
+
return False
|
|
167
|
+
if content.count("[") != content.count("]"):
|
|
168
|
+
return False
|
|
169
|
+
|
|
170
|
+
# Check for common syntax elements
|
|
171
|
+
has_function = "function" in content or "=>" in content
|
|
172
|
+
has_return = "return" in content
|
|
173
|
+
|
|
174
|
+
return has_function and has_return
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def check_evaluator_patterns(
|
|
178
|
+
test_dir: Path,
|
|
179
|
+
outputs: dict,
|
|
180
|
+
python_dir: str = "backend",
|
|
181
|
+
javascript_dir: str = "frontend",
|
|
182
|
+
) -> tuple[list[str], list[str]]:
|
|
183
|
+
"""Validate that evaluators follow LangSmith patterns.
|
|
184
|
+
|
|
185
|
+
Checks for:
|
|
186
|
+
- (run, example) function signature
|
|
187
|
+
- Access to run.outputs and example.outputs
|
|
188
|
+
- Return dict with score
|
|
189
|
+
|
|
190
|
+
Args:
|
|
191
|
+
test_dir: Test working directory
|
|
192
|
+
outputs: Outputs dict
|
|
193
|
+
python_dir: Directory for Python evaluator
|
|
194
|
+
javascript_dir: Directory for JavaScript/TypeScript evaluator
|
|
195
|
+
|
|
196
|
+
Returns:
|
|
197
|
+
(passed, failed) lists
|
|
198
|
+
"""
|
|
199
|
+
passed, failed = [], []
|
|
200
|
+
|
|
201
|
+
# Python patterns
|
|
202
|
+
PY_FUNC_SIGNATURE = re.compile(
|
|
203
|
+
r"def\s+\w+\s*\(\s*run\s*(:\s*\w+)?\s*,\s*example\s*(:\s*\w+)?\s*\)"
|
|
204
|
+
)
|
|
205
|
+
PY_RETURN_SCORE = re.compile(r"return\s*\{[^}]*['\"]?\w+['\"]?\s*:")
|
|
206
|
+
|
|
207
|
+
py_path = find_evaluator_file(test_dir, python_dir, ["py"])
|
|
208
|
+
if py_path:
|
|
209
|
+
content = py_path.read_text()
|
|
210
|
+
|
|
211
|
+
# Check function signature
|
|
212
|
+
if PY_FUNC_SIGNATURE.search(content):
|
|
213
|
+
passed.append("Python: has (run, example) signature")
|
|
214
|
+
else:
|
|
215
|
+
failed.append("Python: missing (run, example) function signature")
|
|
216
|
+
|
|
217
|
+
# Check return format
|
|
218
|
+
if PY_RETURN_SCORE.search(content):
|
|
219
|
+
passed.append("Python: returns dict with score")
|
|
220
|
+
else:
|
|
221
|
+
failed.append("Python: missing return dict with score")
|
|
222
|
+
|
|
223
|
+
# Check for run outputs access
|
|
224
|
+
if re.search(r"run\[.outputs.\]|run\.outputs|run\.get\(.outputs", content):
|
|
225
|
+
passed.append("Python: accesses run outputs")
|
|
226
|
+
else:
|
|
227
|
+
failed.append("Python: missing run outputs access")
|
|
228
|
+
|
|
229
|
+
# Check for example outputs access
|
|
230
|
+
if re.search(r"example\[.outputs.\]|example\.outputs|example\.get\(.outputs", content):
|
|
231
|
+
passed.append("Python: accesses example outputs")
|
|
232
|
+
else:
|
|
233
|
+
failed.append("Python: missing example outputs access")
|
|
234
|
+
|
|
235
|
+
# JavaScript patterns
|
|
236
|
+
JS_FUNC_SIGNATURE = re.compile(
|
|
237
|
+
r"function\s+\w+\s*\(\s*run\s*(:\s*\w+)?\s*,\s*example\s*(:\s*\w+)?\s*\)"
|
|
238
|
+
)
|
|
239
|
+
JS_ARROW_SIGNATURE = re.compile(
|
|
240
|
+
r"=\s*\(\s*run\s*(:\s*\w+)?\s*,\s*example\s*(:\s*\w+)?\s*\)\s*=>"
|
|
241
|
+
)
|
|
242
|
+
JS_RETURN_SCORE = re.compile(r"return\s*\{[^}]*(?:\w+\s*:|score)")
|
|
243
|
+
|
|
244
|
+
js_path = find_evaluator_file(test_dir, javascript_dir, ["ts", "js"])
|
|
245
|
+
if js_path:
|
|
246
|
+
content = js_path.read_text()
|
|
247
|
+
|
|
248
|
+
# Check function signature
|
|
249
|
+
if JS_FUNC_SIGNATURE.search(content) or JS_ARROW_SIGNATURE.search(content):
|
|
250
|
+
passed.append("JavaScript: has (run, example) signature")
|
|
251
|
+
else:
|
|
252
|
+
failed.append("JavaScript: missing (run, example) function signature")
|
|
253
|
+
|
|
254
|
+
# Check return format
|
|
255
|
+
if JS_RETURN_SCORE.search(content):
|
|
256
|
+
passed.append("JavaScript: returns object with score")
|
|
257
|
+
else:
|
|
258
|
+
failed.append("JavaScript: missing return object with score")
|
|
259
|
+
|
|
260
|
+
# Check for outputs access (dot, optional chaining, or bracket notation)
|
|
261
|
+
if re.search(r'run[.?]+outputs|run\[["\']outputs', content):
|
|
262
|
+
passed.append("JavaScript: accesses run.outputs")
|
|
263
|
+
else:
|
|
264
|
+
failed.append("JavaScript: missing run.outputs access")
|
|
265
|
+
|
|
266
|
+
if re.search(r'example[.?]+outputs|example\[["\']outputs', content):
|
|
267
|
+
passed.append("JavaScript: accesses example.outputs")
|
|
268
|
+
else:
|
|
269
|
+
failed.append("JavaScript: missing example.outputs access")
|
|
270
|
+
|
|
271
|
+
return passed, failed
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def check_evaluator_logic(
|
|
275
|
+
test_dir: Path,
|
|
276
|
+
outputs: dict,
|
|
277
|
+
python_dir: str = "backend",
|
|
278
|
+
javascript_dir: str = "frontend",
|
|
279
|
+
py_test_cases: str = "trajectory_test_cases.json",
|
|
280
|
+
ts_test_cases: str = "single_step_test_cases.json",
|
|
281
|
+
data_dir: Path | None = None,
|
|
282
|
+
) -> tuple[list[str], list[str]]:
|
|
283
|
+
"""Validate evaluator logic by running test cases in Docker.
|
|
284
|
+
|
|
285
|
+
Args:
|
|
286
|
+
test_dir: Test working directory
|
|
287
|
+
outputs: Outputs dict
|
|
288
|
+
python_dir: Directory for Python evaluator
|
|
289
|
+
javascript_dir: Directory for JavaScript/TypeScript evaluator
|
|
290
|
+
py_test_cases: Python test cases filename
|
|
291
|
+
ts_test_cases: TypeScript test cases filename
|
|
292
|
+
data_dir: Directory containing test cases
|
|
293
|
+
|
|
294
|
+
Returns:
|
|
295
|
+
(passed, failed) lists
|
|
296
|
+
"""
|
|
297
|
+
passed, failed = [], []
|
|
298
|
+
data_dir = data_dir or (test_dir / "data")
|
|
299
|
+
validation_dir = test_dir / "validation"
|
|
300
|
+
|
|
301
|
+
# Test Python evaluator
|
|
302
|
+
py_path = find_evaluator_file(test_dir, python_dir, ["py"])
|
|
303
|
+
if py_path:
|
|
304
|
+
py_passed, py_failed = _test_python_evaluator(
|
|
305
|
+
py_path, test_dir, py_test_cases, data_dir, validation_dir, run_python_in_docker
|
|
306
|
+
)
|
|
307
|
+
passed.extend(py_passed)
|
|
308
|
+
failed.extend(py_failed)
|
|
309
|
+
|
|
310
|
+
# Test JavaScript evaluator
|
|
311
|
+
js_path = find_evaluator_file(test_dir, javascript_dir, ["ts", "js"])
|
|
312
|
+
if js_path:
|
|
313
|
+
js_passed, js_failed = _test_js_evaluator(
|
|
314
|
+
js_path, test_dir, ts_test_cases, data_dir, run_node_in_docker
|
|
315
|
+
)
|
|
316
|
+
passed.extend(js_passed)
|
|
317
|
+
failed.extend(js_failed)
|
|
318
|
+
|
|
319
|
+
return passed, failed
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
def _test_python_evaluator(
|
|
323
|
+
path: Path,
|
|
324
|
+
test_dir: Path,
|
|
325
|
+
test_cases_filename: str,
|
|
326
|
+
data_dir: Path,
|
|
327
|
+
validation_dir: Path,
|
|
328
|
+
run_python_fn,
|
|
329
|
+
) -> tuple[list[str], list[str]]:
|
|
330
|
+
"""Test Python evaluator using eval_runner.py in Docker."""
|
|
331
|
+
content = path.read_text()
|
|
332
|
+
func_name, error = find_evaluator_function(content, "python")
|
|
333
|
+
if error:
|
|
334
|
+
return [], [f"Python logic: {error}"]
|
|
335
|
+
|
|
336
|
+
# Copy test cases if not present
|
|
337
|
+
test_cases_path = path.parent / test_cases_filename
|
|
338
|
+
if not test_cases_path.exists():
|
|
339
|
+
source_path = data_dir / test_cases_filename
|
|
340
|
+
if source_path.exists():
|
|
341
|
+
test_cases_path.write_text(source_path.read_text())
|
|
342
|
+
else:
|
|
343
|
+
return ["Python logic: no test cases"], []
|
|
344
|
+
|
|
345
|
+
# Copy eval_runner.py
|
|
346
|
+
runner_src = validation_dir / "eval_runner.py"
|
|
347
|
+
runner_dst = path.parent / "_eval_runner.py"
|
|
348
|
+
if runner_src.exists():
|
|
349
|
+
runner_dst.write_text(runner_src.read_text())
|
|
350
|
+
else:
|
|
351
|
+
return ["Python logic: no eval_runner.py"], []
|
|
352
|
+
|
|
353
|
+
try:
|
|
354
|
+
module_name = path.name.replace(".py", "")
|
|
355
|
+
args = [module_name, func_name, test_cases_filename]
|
|
356
|
+
success, output = run_python_fn(
|
|
357
|
+
test_dir, f"{path.parent.name}/_eval_runner.py", timeout=60, args=args
|
|
358
|
+
)
|
|
359
|
+
return _parse_evaluator_results(output, success, "Python")
|
|
360
|
+
except Exception as e:
|
|
361
|
+
return [], [f"Python logic: {str(e)[:50]}"]
|
|
362
|
+
finally:
|
|
363
|
+
runner_dst.unlink(missing_ok=True)
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
def _strip_ts_module_syntax(content: str) -> str:
|
|
367
|
+
"""Strip import/export statements for embedding in a single-file harness.
|
|
368
|
+
|
|
369
|
+
Keeps all TypeScript type syntax (interfaces, annotations) intact
|
|
370
|
+
since tsx handles them natively.
|
|
371
|
+
"""
|
|
372
|
+
content = re.sub(r"^\s*import\s+.*?;\s*$", "", content, flags=re.MULTILINE)
|
|
373
|
+
content = re.sub(r"\bexport\s+default\s+", "", content)
|
|
374
|
+
content = re.sub(r"\bexport\s+", "", content)
|
|
375
|
+
return content
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
def _test_js_evaluator(
|
|
379
|
+
path: Path,
|
|
380
|
+
test_dir: Path,
|
|
381
|
+
test_cases_filename: str,
|
|
382
|
+
data_dir: Path,
|
|
383
|
+
run_node_fn,
|
|
384
|
+
) -> tuple[list[str], list[str]]:
|
|
385
|
+
"""Test JavaScript/TypeScript evaluator using inline test harness in Docker."""
|
|
386
|
+
content = path.read_text()
|
|
387
|
+
func_name, error = find_evaluator_function(content, "javascript")
|
|
388
|
+
if error:
|
|
389
|
+
return [], [f"JavaScript logic: {error}"]
|
|
390
|
+
|
|
391
|
+
# Load test cases
|
|
392
|
+
test_cases_path = data_dir / test_cases_filename
|
|
393
|
+
if not test_cases_path.exists():
|
|
394
|
+
return ["JavaScript logic: no test cases"], []
|
|
395
|
+
|
|
396
|
+
test_cases = json.loads(test_cases_path.read_text())
|
|
397
|
+
|
|
398
|
+
is_ts = path.suffix == ".ts"
|
|
399
|
+
|
|
400
|
+
# Build evaluator loading section
|
|
401
|
+
if is_ts:
|
|
402
|
+
# For .ts: strip module syntax and embed directly (tsx handles TS natively)
|
|
403
|
+
stripped = _strip_ts_module_syntax(content)
|
|
404
|
+
evaluator_load = stripped
|
|
405
|
+
else:
|
|
406
|
+
# For .js: use existing eval() approach
|
|
407
|
+
evaluator_load = f"""const fs = require('fs');
|
|
408
|
+
const evaluatorCode = fs.readFileSync('{path.name}', 'utf8');
|
|
409
|
+
eval(evaluatorCode);"""
|
|
410
|
+
|
|
411
|
+
# Create test harness script
|
|
412
|
+
test_script = f"""
|
|
413
|
+
{evaluator_load}
|
|
414
|
+
|
|
415
|
+
const testCases = {json.dumps(test_cases)};
|
|
416
|
+
|
|
417
|
+
function normalizeScore(score) {{
|
|
418
|
+
if (typeof score === 'boolean') return score ? 1.0 : 0.0;
|
|
419
|
+
if (typeof score === 'number') return score >= 0 && score <= 1 ? score : (score > 1 ? score / 100 : 0);
|
|
420
|
+
return 0.0;
|
|
421
|
+
}}
|
|
422
|
+
|
|
423
|
+
function extractScore(result) {{
|
|
424
|
+
if (typeof result === 'number' || typeof result === 'boolean') return result;
|
|
425
|
+
if (result && typeof result === 'object') {{
|
|
426
|
+
for (const key of ['score', 'value', 'result', 'pass', 'passed']) {{
|
|
427
|
+
if (key in result) return result[key];
|
|
428
|
+
}}
|
|
429
|
+
}}
|
|
430
|
+
return null;
|
|
431
|
+
}}
|
|
432
|
+
|
|
433
|
+
const results = testCases.map(tc => {{
|
|
434
|
+
const name = tc.name || 'unknown';
|
|
435
|
+
const expected = tc.expected_result || {{}};
|
|
436
|
+
const run = tc.run || {{}};
|
|
437
|
+
const example = tc.example || {{}};
|
|
438
|
+
|
|
439
|
+
try {{
|
|
440
|
+
const result = {func_name}(run, example);
|
|
441
|
+
if (expected.should_not_crash) {{
|
|
442
|
+
return {{ name, passed: true }};
|
|
443
|
+
}}
|
|
444
|
+
let score = extractScore(result);
|
|
445
|
+
if (score === null) {{
|
|
446
|
+
return {{ name, passed: false, error: 'no score' }};
|
|
447
|
+
}}
|
|
448
|
+
score = normalizeScore(score);
|
|
449
|
+
const minS = expected.min_score || 0;
|
|
450
|
+
const maxS = expected.max_score || 1;
|
|
451
|
+
return {{ name, passed: score >= minS && score <= maxS, score }};
|
|
452
|
+
}} catch (e) {{
|
|
453
|
+
if (expected.should_not_crash) {{
|
|
454
|
+
return {{ name, passed: false, error: e.message.slice(0, 50) }};
|
|
455
|
+
}}
|
|
456
|
+
return {{ name, passed: false, error: e.message.slice(0, 50) }};
|
|
457
|
+
}}
|
|
458
|
+
}});
|
|
459
|
+
|
|
460
|
+
console.log("EVALUATOR_RESULTS:" + JSON.stringify(results));
|
|
461
|
+
"""
|
|
462
|
+
|
|
463
|
+
harness_ext = ".ts" if is_ts else ".js"
|
|
464
|
+
test_file = path.parent / f"_test_evaluator{harness_ext}"
|
|
465
|
+
try:
|
|
466
|
+
test_file.write_text(test_script)
|
|
467
|
+
success, output = run_node_fn(
|
|
468
|
+
test_dir, f"{path.parent.name}/_test_evaluator{harness_ext}", timeout=60
|
|
469
|
+
)
|
|
470
|
+
return _parse_evaluator_results(output, success, "JavaScript")
|
|
471
|
+
except Exception as e:
|
|
472
|
+
return [], [f"JavaScript logic: {str(e)[:50]}"]
|
|
473
|
+
finally:
|
|
474
|
+
test_file.unlink(missing_ok=True)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
def _parse_evaluator_results(output: str, success: bool, lang: str) -> tuple[list[str], list[str]]:
|
|
478
|
+
"""Parse EVALUATOR_RESULTS from output."""
|
|
479
|
+
for line in output.split("\n"):
|
|
480
|
+
if line.startswith("EVALUATOR_RESULTS:"):
|
|
481
|
+
try:
|
|
482
|
+
results = json.loads(line.replace("EVALUATOR_RESULTS:", ""))
|
|
483
|
+
passed_count = sum(1 for r in results if r.get("passed"))
|
|
484
|
+
total = len(results)
|
|
485
|
+
msg = f"{lang} logic: {passed_count}/{total} tests"
|
|
486
|
+
if passed_count == total:
|
|
487
|
+
return [msg + " passed"], []
|
|
488
|
+
elif passed_count > total // 2:
|
|
489
|
+
return [msg + " (partial)"], []
|
|
490
|
+
else:
|
|
491
|
+
return [], [msg + " passed"]
|
|
492
|
+
except json.JSONDecodeError:
|
|
493
|
+
pass
|
|
494
|
+
|
|
495
|
+
return (
|
|
496
|
+
([f"{lang} logic: executed"], []) if success else ([], [f"{lang} logic: execution failed"])
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
def check_evaluator_upload(
|
|
501
|
+
test_dir: Path,
|
|
502
|
+
outputs: dict,
|
|
503
|
+
upload_prefix: str = "test-",
|
|
504
|
+
) -> tuple[list[str], list[str]]:
|
|
505
|
+
"""Validate evaluators were uploaded to LangSmith via /runs/rules API.
|
|
506
|
+
|
|
507
|
+
Args:
|
|
508
|
+
test_dir: Test working directory (unused but matches signature)
|
|
509
|
+
outputs: Outputs dict containing run_id
|
|
510
|
+
upload_prefix: Prefix for evaluator names
|
|
511
|
+
|
|
512
|
+
Returns:
|
|
513
|
+
(passed, failed) lists
|
|
514
|
+
"""
|
|
515
|
+
client, error = get_langsmith_client()
|
|
516
|
+
if not client:
|
|
517
|
+
return [f"Upload: skipped ({error})"], []
|
|
518
|
+
|
|
519
|
+
run_id = (outputs or {}).get("run_id")
|
|
520
|
+
if not run_id:
|
|
521
|
+
return ["Upload: skipped (no run_id)"], []
|
|
522
|
+
|
|
523
|
+
try:
|
|
524
|
+
response = client.session.get(
|
|
525
|
+
f"{client.api_url}/runs/rules",
|
|
526
|
+
headers={"x-api-key": client.api_key},
|
|
527
|
+
params={"limit": 100},
|
|
528
|
+
)
|
|
529
|
+
if response.status_code != 200:
|
|
530
|
+
return [f"Upload: skipped (API {response.status_code})"], []
|
|
531
|
+
|
|
532
|
+
data = response.json()
|
|
533
|
+
rules = data if isinstance(data, list) else data.get("rules", [])
|
|
534
|
+
|
|
535
|
+
# Search for evaluators attached to datasets whose name contains the run_id.
|
|
536
|
+
# The datasets (e.g. bench-be-{run_id}, bench-fe-{run_id}) are created fresh
|
|
537
|
+
# per test run, so any rule attached to them was uploaded by Claude.
|
|
538
|
+
matching = [
|
|
539
|
+
r for r in rules if run_id in (r.get("dataset_name") or r.get("display_name") or "")
|
|
540
|
+
]
|
|
541
|
+
|
|
542
|
+
if not matching:
|
|
543
|
+
return [], [f"Upload: no evaluator with run_id '{run_id}' found"]
|
|
544
|
+
|
|
545
|
+
names = ", ".join(r.get("display_name", "") for r in matching)[:80]
|
|
546
|
+
return [f"Upload: found {len(matching)} evaluator(s): {names}"], []
|
|
547
|
+
|
|
548
|
+
except Exception as e:
|
|
549
|
+
return [], [f"Upload: API error: {str(e)[:100]}"]
|