--- name: wf-eval description: 'WellForge command — Score a feature''s implementation against the eval rubric (LM-judge — the non-deterministic verification half). Invoke explicitly: $wf-eval [feature] — NNN-slug / slug / NNN; omit to infer the in-progress/most-recent feature' --- > WellForge command, generated for Codex from `wellforge-plugin/commands/eval.md` — do not edit; regenerate with `adapters/codex/generate.py`. > Invoked as `$wf-eval [feature] — NNN-slug / slug / NNN; omit to infer the in-progress/most-recent feature`. **ARGUMENTS** below means the text the user wrote after `$wf-eval` in the invoking message (empty if nothing). Run the LM-judge evaluation for a feature: score the implementation against the central rubric and produce a verdict. This is the eval half of verification — tests and CI gates cover the deterministic part (`$wf-implement`'s QE step); this covers spec fidelity, test quality, code conventions, and trajectory. Conventions: the **spec-driven** skill (load it). Feature: ARGUMENTS ## Step 1 — Resolve the feature Same resolution as `$wf-implement`: leading token matched against `specs/` by number / slug / full name; if omitted, infer the `in-progress` spec, else the most recent one whose tasks are all checked. Ambiguous → list and ask. State which feature you resolved. Read spec.md, plan.md, tasks.md. ## Step 2 — Gate check - `tasks.md` must exist and the implementation be substantially done (all or nearly all tasks checked). Evaluating an unbuilt feature is meaningless — if most tasks are open, STOP and point at `$wf-implement`. - Ensure fresh test/coverage output exists; if not, run the project's test+coverage task so the evaluator has real evidence (not stale or assumed results). ## Step 3 — Evaluate Spawn the `wf-evaluator` agent with: the spec dir path, the central rubric, and any `specs/NNN-slug/eval.md` override. The agent resolves the rubric itself, in the order its prompt defines — project `gates/configs/eval-rubric.yml`, then CI's `.wellforge-gates/` checkout, then the tool-bundled copy (`/config/eval-rubric.yml` for Claude Code). **A scaffolded project has no `gates/` directory** — gates are referenced by CI, never copied — so there the bundled copy is the one that resolves. If the agent reports it found no rubric, that is a plugin-install problem, not a feature problem: stop and say so. It scores each rubric dimension 1–5 with cited evidence, computes the weighted total, and writes `specs/NNN-slug/eval-report.md` with a PASS/FAIL verdict (PASS = total ≥ pass_score AND every dimension ≥ floor). ## Step 4 — Act on the verdict - **PASS** → report the score table. The eval PASS is the gate into `done`, but this command doesn't flip the status — point the user at **`$wf-done `**, which verifies the full done gate (tasks + QE + this PASS) and records the close. - **FAIL** → relay the failing/weak dimensions with the evaluator's evidence. Route the remediation: name the specific ACs/tasks to revisit and suggest `$wf-implement `. Do NOT fix anything here — the evaluator judges, fixes go through the dev agents. After remediation, re-run `$wf-eval`. - Bounded: the evaluator is a judge, not a loop. One scored verdict per run; you don't silently re-evaluate until it passes. ## Step 5 — Record the run (observability) Write `.forge/runs/.json` per the **observability** skill: the `wf-evaluator` agent, its outcome + `score`, and `verdicts.eval`. Short trace, same audit trail as implement/ orchestrate. ## Hard rules - Read-only on code/specs, **and on status** — this command produces exactly one artifact, `eval-report.md` (via the evaluator). It never sets `status: done`, with or without the user's confirmation: an eval PASS is one input to the done gate, and `$wf-done` is the only place that gate is checked and the transition recorded (Step 4 already points there). - Never lower a rubric floor or override a FAIL. The rubric is central (`gates/configs/eval-rubric.yml`); changing it is a PR to `gates/`, which also refreshes the plugin's byte-identical mirror (`wellforge-plugin/config/eval-rubric.yml`) — CI's `rubric-sync` job fails if the two drift. - An unmet AC fails the eval regardless of the other dimensions (ac_satisfaction floor). - For a feature with no implementation yet, this is the wrong command — implement first.