Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions docs/design/promptfoo-codex-eval-pilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,20 @@ This design follows the docs for these reasons:

The implemented boundary separates generic mechanics from the consuming suite:

```text
packages/eval-kit/ # generic CLI, schemas, Promptfoo helpers, bundled prompts
evals/ # technical-design cases, adapter, rubrics, tests, results
```

Generic package name:

```text
@agentic-workflow-kit/eval-kit
evals/ # technical-design cases, adapter, rubrics, tests, results
```

This package is internal infrastructure for the `technical-design` repo. It must stay private and
must not be treated as part of the product surface shipped to users. Root `pnpm eval:*` scripts are
the consumer command surface and call the `eval-kit` binary with `evals/eval-kit.config.json`.
`@agentic-workflow-kit/eval-kit` is shared infrastructure consumed from the GitHub tag pinned in
`package.json` and `pnpm-lock.yaml`. It must stay private and must not be treated as part of the
product surface shipped to users. Root `pnpm eval:*` scripts are the consumer command surface and
call the installed `eval-kit` binary with `evals/eval-kit.config.json`.

Eval-specific material is split by ownership:

- generic runner code, portable schemas, and bundled Promptfoo prompts -> `packages/eval-kit/`;
- generic runner code, portable schemas, and bundled Promptfoo prompts -> the shared
`@agentic-workflow-kit/eval-kit` package;
- `evals/README.md` and `evals/implementation-plan.md` -> consumer docs.
- `evals/tests/**` -> `evals/tests/`.
- `evals/schemas/**` -> `evals/schemas/`.
Expand All @@ -147,7 +143,7 @@ Eval-specific material is split by ownership:

Root-level docs may still describe the evaluation strategy, because that strategy is part of how the
product is designed and governed. Executable eval assets, fixture data, generated outputs, schemas,
and eval-specific implementation docs belong in the internal package.
and eval-specific implementation docs belong in `evals/`.

The root package stays small. It keeps `check` as the public deterministic repo gate and exposes
manual eval commands that call the internal kit:
Expand Down Expand Up @@ -176,7 +172,7 @@ Add `promptfoo` as a development dependency of the eval package and add manual s

Keep `pnpm check` deterministic-only.

The Promptfoo templates live in `packages/eval-kit/promptfoo/` and suite-specific variables come
The Promptfoo templates live in the shared `@agentic-workflow-kit/eval-kit` package and suite-specific variables come
from `evals/adapter.mjs`:

- Generation suite:
Expand All @@ -196,7 +192,7 @@ from `evals/adapter.mjs`:
- Provider: `openai:codex-app-server`.
- Model: `gpt-5.4`.
- Reasoning effort: medium.
- Output schema: `packages/eval-kit/schemas/pairwise-result.schema.json`.
- Output schema: `@agentic-workflow-kit/eval-kit/schemas/pairwise-result.schema.json`.
- Test variables: case id, source facts, expected facts and boundaries, generated candidate,
reference anchor, candidate order, original order, randomization method, and seed.
- Assertions: JSON output, schema-valid output, evidence present, model/provider/rubric/prompt
Expand All @@ -206,7 +202,7 @@ from `evals/adapter.mjs`:
- Provider: `openai:codex-app-server`.
- Model: `gpt-5.4`.
- Reasoning effort: medium.
- Output schema: `packages/eval-kit/schemas/pointwise-judge-result.schema.json`.
- Output schema: `@agentic-workflow-kit/eval-kit/schemas/pointwise-judge-result.schema.json`.
- Test variables: case id, source facts, expected facts and boundaries, generated candidate, and
deterministic grades if available.
- Assertions: JSON output, schema-valid output, evidence on every covered/partial/contradicted
Expand Down Expand Up @@ -252,7 +248,8 @@ The final report command combines all run bundles and states:
- Promptfoo, not shell wrappers, owns provider execution, assertions, and JSON/HTML result exports.
- Candidate generation produces a non-empty Markdown design for `case-tiny-laundry-pickup-v1`.
- The existing deterministic grader runs against the generated candidate.
- The judge output validates against `packages/eval-kit/schemas/pairwise-result.schema.json`.
- The judge output validates against
`@agentic-workflow-kit/eval-kit/schemas/pairwise-result.schema.json`.
- The final report is written under ignored `evals/results/**`.
- Generated result files are not committed unless a human reviewer explicitly promotes a redacted
summary.
Expand Down
6 changes: 3 additions & 3 deletions evals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This directory contains the consumer-facing eval suite for the `technical-design` skills pack.

It uses [`@agentic-workflow-kit/eval-kit`](../packages/eval-kit) for all generic mechanics
(schema validation, path resolution, Promptfoo helpers, result manifests). This directory owns
only the `technical-design` domain: DDD fixtures, expected facts and boundaries, judge rubrics,
It uses `@agentic-workflow-kit/eval-kit` from the shared GitHub tag for all generic mechanics
(schema validation, path resolution, Promptfoo helpers, result manifests). This directory owns only
the `technical-design` domain: DDD fixtures, expected facts and boundaries, judge rubrics,
lessons-ledger checks, and deterministic grading policy.

The layered design-quality strategy lives in
Expand Down
6 changes: 4 additions & 2 deletions evals/adapter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,11 @@ export const validateFixtures = async ({ config, manifests }) => {
];

const expectedFactsShape = compileLocalSchema(
"packages/eval-kit/schemas/expected-facts.schema.json",
"evals/schemas/expected-facts.schema.json",
"expected facts",
);
const expectedBoundariesShape = compileLocalSchema(
"packages/eval-kit/schemas/expected-boundaries.schema.json",
"evals/schemas/expected-boundaries.schema.json",
"expected boundaries",
);

Expand Down Expand Up @@ -910,6 +910,8 @@ export const gradeTechnicalDesignCandidate = ({
};
};

export const gradeCandidate = gradeTechnicalDesignCandidate;

export const criticalBlockerCount = (findings) =>
countPolicyBlockers(findings, deterministicVerdictPolicy);

Expand Down
2 changes: 1 addition & 1 deletion evals/eval-kit.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../packages/eval-kit/schemas/eval-kit.config.schema.json",
"$schema": "../node_modules/@agentic-workflow-kit/eval-kit/schemas/eval-kit.config.schema.json",
"schema_version": "eval-kit.config.v1",
"suite_id": "technical-design",
"suite_root": ".",
Expand Down
8 changes: 4 additions & 4 deletions evals/implementation-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ Recommended OSS tools:

Implemented:

- Added the suite judge rubric at `evals/rubric.md`; bundled generic judge prompts live under
`packages/eval-kit/promptfoo/judges/`.
- Added the suite judge rubric at `evals/rubric.md`; bundled generic judge prompts live in the
shared `@agentic-workflow-kit/eval-kit` package.
- Added a pairwise comparison prompt that requires randomized candidate order to be recorded.
- Added bundled schemas for structured judge output and pairwise results under
`packages/eval-kit/schemas/`.
- Added bundled schemas for structured judge output and pairwise results in the shared
`@agentic-workflow-kit/eval-kit` package.
- Added a manual Promptfoo template outside the required PR gate.

Remaining:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://agentic-workflow-kit.local/eval-kit/expected-boundaries.schema.json",
"$id": "https://agentic-workflow-kit.local/technical-design/evals/expected-boundaries.schema.json",
"title": "ExpectedBoundaries",
"type": "object",
"required": ["case_id", "contexts"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://agentic-workflow-kit.local/eval-kit/expected-facts.schema.json",
"$id": "https://agentic-workflow-kit.local/technical-design/evals/expected-facts.schema.json",
"title": "ExpectedFacts",
"type": "object",
"required": ["case_id", "facts"],
Expand Down
29 changes: 16 additions & 13 deletions evals/tests/validate-eval-fixtures.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,7 @@ const createFixtureRepo = () => {

fs.symlinkSync(
path.join(repoRoot, "node_modules"),
path.join(tempDir, "evals/node_modules"),
);

fs.mkdirSync(path.join(tempDir, "packages"), { recursive: true });
fs.symlinkSync(
path.resolve(repoRoot, "packages/eval-kit"),
path.join(tempDir, "packages/eval-kit"),
path.join(tempDir, "node_modules"),
);

return tempDir;
Expand All @@ -70,14 +64,23 @@ const createFixtureRepo = () => {
const runValidator = (cwd) => {
const evalKitBin = path.resolve(
repoRoot,
"packages/eval-kit/bin/eval-kit.mjs",
"node_modules/@agentic-workflow-kit/eval-kit/bin/eval-kit.mjs",
);
try {
execFileSync(process.execPath, [evalKitBin, "validate-fixtures"], {
cwd: path.join(cwd, "evals"),
encoding: "utf8",
stdio: "pipe",
});
execFileSync(
process.execPath,
[
evalKitBin,
"validate-fixtures",
"--config",
path.join(cwd, "evals/eval-kit.config.json"),
],
{
cwd: path.join(cwd, "evals"),
encoding: "utf8",
stdio: "pipe",
},
);
return { ok: true, stdout: "", stderr: "" };
} catch (error) {
return {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"check:links": "node scripts/check_non_eval.mjs links",
"check:non-eval": "node scripts/check_non_eval.mjs all",
"smoke:enforce-generator": "node scripts/smoke_generate_depcruise.mjs",
"check": "pnpm lint && pnpm check:non-eval && pnpm smoke:enforce-generator && pnpm --filter @agentic-workflow-kit/eval-kit test && pnpm check:deterministic",
"check": "pnpm lint && pnpm check:non-eval && pnpm smoke:enforce-generator && pnpm check:deterministic",
"check:deterministic": "pnpm check:eval-static && pnpm eval:unit && pnpm eval:enforce",
"check:eval-static": "node scripts/check_eval_static.mjs",
"eval:unit": "vitest run evals/tests",
Expand All @@ -45,7 +45,7 @@
"eval:manual-report": "eval-kit report --config evals/eval-kit.config.json"
},
"devDependencies": {
"@agentic-workflow-kit/eval-kit": "workspace:*",
"@agentic-workflow-kit/eval-kit": "github:agentic-workflow-kit/eval-kit#v0.1.0",
"ajv": "^8.17.1",
"dependency-cruiser": "^18.0.0",
"prettier": "^3.6.2",
Expand Down
Loading