Skip to content

aidenlx/zotlit / skills/zotlit-query

zotlit-query

Verified

Query Zotero works, files, and reading marks through ZotLit in Obsidian. Use for literature reviews, reading plans, missing PDFs, broken linked files, duplicate PDFs, Annotation evidence, counts by paper or year, and complete exports.

evals/dispatch.test.mjs

View on GitHub
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test from "node:test";

import * as annotations from "./annotations.mjs";
import { caseFamily, validate } from "./check.mjs";
import * as items from "./items.mjs";
import * as research from "./research.mjs";
import { checkAnswer } from "./run.mjs";

const oracle = JSON.parse(
  await readFile(new URL("./oracle.json", import.meta.url), "utf8"),
);
const cases = JSON.parse(
  await readFile(new URL("./cases.json", import.meta.url), "utf8"),
);
const families = { items, annotations, research };

await test("every case has an oracle entry with a family kind", () => {
  assert.deepEqual(Object.keys(oracle.cases), Object.keys(cases));
  for (const [name, spec] of Object.entries(oracle.cases))
    assert.ok(Object.hasOwn(families, spec.kind), `${name}: ${spec.kind}`);
});

await test("each family exports its checks, prompt, schema, and evidence steps", () => {
  for (const family of Object.values(families))
    for (const name of [
      "checkEnvelope",
      "checkAnswer",
      "prompt",
      "answerSchema",
      "retainEvidence",
      "loadEvidence",
      "checkRun",
    ])
      assert.equal(typeof family[name], "function", name);
});

await test("cases dispatch to the family their kind names", () => {
  for (const [name, spec] of Object.entries(oracle.cases)) {
    const resolved = caseFamily(name);
    assert.equal(resolved.family, families[spec.kind], name);
    assert.deepEqual(resolved.spec, oracle.cases[name]);
  }
});

await test("unknown cases are rejected before any check runs", () => {
  assert.throws(
    () => validate("no_such_case", {}, { runRoot: "/run" }),
    /unknown case: no_such_case/,
  );
  assert.throws(
    () => checkAnswer("no_such_case", {}, {}),
    /unknown case: no_such_case/,
  );
});
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 115kUpdated Claude CodeCodexVerifiedInstall