/sdlc-documentation:04-ai-eval-harness-specfrom sdlc-documentation
Specifies reusable AI feature evaluation harnesses with datasets, graders, thresholds, calibration, regression gates, and run evidence. Use for AI eval spec creation or updates; route multi-step tool-using agent evaluation to ai-agent-eval-spec.
Ships in sdlc-documentation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Artefact | Source/provider | Required? | Behaviour when absent |
|---|---|---|---|
| Project _context/, approved requirements, and relevant architecture | Project owner and upstream phase skills | Required | Stop at a gap register; do not invent scope, thresholds, integrations, or owners. |
| Existing artefact, implementation, configuration, and evidence named below | Repository, delivery team, or service owner | Required when updating or assessing | Mark inaccessible items not assessed; do not treat them as passed. |
| Target audience, environment, risk tolerance, and authority | Requester and accountable owner | Required | Produce a read-only outline with explicit assumptions; do not mutate project or production state. |
| Artefact | Consumer | Observable acceptance condition |
|---|---|---|
| AI Evaluation Specification | AI engineering and release teams | Each evaluated behaviour has a representative dataset, deterministic scoring rule, threshold rationale, and retained run evidence. |
| Decision and gap register | Reviewer and downstream phase owner | Every assumption, rejected option, unresolved dependency, waiver, and owner is explicit. |
| Validation evidence | Release or governance reviewer | Checks identify command or method, date, result, evidence location, and all unassessed items. |
| Evidence | Minimum content | Acceptance |
|---|---|---|
| Traceability record | Source artefact, decision, output section, owner | No mandatory decision is source-free. |
| Quality-gate result | Check, expected result, observed result, evidence path | Failures and unavailable checks cannot appear as passes. |
| Review record | Reviewer, date, disposition, open actions | The consumer can reproduce the acceptance decision. |
If files, execution, network, rendering, environment access, fonts, or current evidence are unavailable, return the narrowest useful draft plus a gap register. Label affected checks not assessed, retain the intended acceptance oracle, and state who must supply or verify the missing evidence. Never convert an unavailable check into a pass.
| Choice | Action | Failure or risk avoided |
|---|---|---|
| Evidence is complete and authority is explicit | Choose evaluators and thresholds from the stated product risk and produce the full artefact. | A benchmark score without a release oracle. |
| A required source or approval is missing | Stop the affected branch; record the gap, owner, and unblock condition. | Fabricated requirements or unauthorised action. |
| Evidence conflicts across sources | Preserve both claims, identify the controlling owner, and request a recorded decision. | Silent selection of a convenient but wrong source. |
| A check cannot run in the available environment | Keep its oracle and mark it not assessed; require later execution evidence. | False assurance from capability limits. |
not assessed, preserve the oracle, and name the verifier.Given an approved project source and a conflicting implementation detail, record both with provenance, stop the affected branch, and obtain the accountable owner's decision. Then update the relevant contract, define a reproducible acceptance check, and retain its observed result. The artefact is accepted only when each evaluated behaviour has a representative dataset, deterministic scoring rule, threshold rationale, and retained run evidence.
logic.prompt - load only when its template, logic, or detail is needed.
README.md - load only when its template, logic, or detail is needed.
The eval harness is to AI features what unit + integration + load tests are to deterministic software: the test layer the team owns and the CI runs. This skill produces the spec.
For every AI FR, declare:
Provenance rule: golden examples come from production traffic snapshots, design-partner samples, or expert authorship. Each example is labelled by a named labeller. Class balance is documented. Sets are versioned.
For each example: input, expected output (or expected shape + acceptance rubric), category tag, locale, sensitivity flag.
Per feature, choose metrics from:
| Metric | Formula | Typical threshold |
|---|---|---|
| Pass rate | passed / total | >= 90% |
| Factuality | judge-graded factual claims correct / total | >= 0.92 |
| Citation rate (RAG) | cited claims / claims | >= 0.90 |
| Citation accuracy | cited spans matching source / cited | >= 0.95 |
| Abstention precision | correct abstains / abstains | >= 0.80 |
| Abstention recall | correct abstains / should-abstain | >= 0.70 |
| Toxicity / safety violation rate | violations / total | 0 (zero-tolerance) |
| Latency P95 | telemetry | per AI FR clause |
| Cost / call | telemetry | per AI FR clause |
The judge is a different model from the system under test. Rubric is short and discrete; pairwise judging beats absolute judging for noisy criteria. The judge is itself calibrated against human labels on a small set; drift in judge scoring triggers re-calibration.
State the gate rule: a PR cannot merge if the regression on the affected feature's golden set drops > N percentage points (typical N = 2 pp) or if any toxicity / safety metric becomes non-zero.
Nightly golden run; weekly full red-team run. Score history is plotted; drops trigger SEV3.
For prompt changes that pass CI, run side-by-side eval across both prompts on the golden + production-snapshot set; require the new prompt to win on the primary metric without regressing the safety metric.
The eval harness is owned by the AI lead with a named back-up. Dataset versioning, judge model + version, and rubric versions are tracked. Eval-set changes go through PR with sign-off.
AI_Eval_Harness_Spec.md sections: 1) Per-feature Suite Inventory, 2) Golden Set Construction, 3) Metrics & Thresholds, 4) Judge-LLM Patterns, 5) CI Gate, 6) Scheduled Regression, 7) A/B Prompt Eval, 8) Operational Ownership, 9) Traceability.
README.md (opens in a new tab)logic.prompt (opens in a new tab)references/ai-agent-eval-crosslink.md (opens in a new tab)references/ai-eval-harness-spec-template.md (opens in a new tab)references/ai-evaluation-release-evidence.md (opens in a new tab)references/judge-llm-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub peterbamuhigire/chwezi-sdlc-documentation --plugin sdlc-documentation160 skills in this plugin
/01-deployment-guideUse when producing or updating deployment guide for release prerequisites, migration choreography, verification, rollback, and ownership. Use runbook for the neighbouring concern; this skill owns the named document contract and its acceptance evidence./01-high-level-designUse when approved requirements need a system-level architecture with boundaries, components, critical flows, deployment topology and ADRs, or an as-built design must be recovered from existing code; use system-overview for orientation, low-level-design for module internals, and infrastructure-design for infrastructure depth./01-initialize-srsUse when writing a new SRS (software requirements specification) for a business system or module: create the Waterfall SRS workspace, IEEE structure, identifiers and source context; use context-engineering next for boundaries and actors.Other plugins' skills for the same job