--- id: 04-evaluate-library-skill epic: library-evaluation-policy title: evaluate-library skill (SKILL.md + supporting files) type: technical-story status: done feature: tooling depends-on: [01-trace-schema-foundation] blocks: [05-human-guide] created: 2026-05-14T06:52:02+02:00 updated: 2026-05-14T19:16:52.691Z --- ## Goal Create the `.claude/skills/evaluate-library/` directory with `SKILL.md` (the authoritative agent runbook), `POLICY.md` (ADR-022 mirror for quick reference), `TRACE-TEMPLATE.md` (showing the YAML frontmatter + heading shape the skill must emit), and an `EXAMPLES/` directory with two worked cases (one approved, one rejected). The skill must be invocable as `/evaluate-library --tier --target `. ## Why Without a deterministic skill runbook, every agent evaluating a library does so ad hoc — different filters, different order, inconsistent trace format. The skill is the single source of truth for the 8-filter + 3-prompt sequence, the collect-cheap-skip-expensive ordering, and the trace write step. It also provides the canonical invocation the Claude hook emits. ## Done when - `.claude/skills/evaluate-library/SKILL.md` exists and covers: invocation signature (`/evaluate-library --tier --target `), the 8 filters in collect-cheap-skip-expensive order (license, types, shadow-check, boundary-fit run to completion; maintenance, CVE scan, EU residency, named-consumer short-circuit after first reject), the 3 prompts, trace-write step (unconditional at evaluation end, including rejections), and the fail/skip sentinel for skipped expensive filters. - `.claude/skills/evaluate-library/POLICY.md` summarises ADR-022 in ≤2 pages — the filters, the tier trigger, the trace schema fields, the four enforcement layers. - `.claude/skills/evaluate-library/TRACE-TEMPLATE.md` shows the complete YAML frontmatter (all fields, real sentinel values for skipped filters) + all 11 required headings in order. - `.claude/skills/evaluate-library/EXAMPLES/` contains at least two worked trace files: one `decision: approved` trace and one `decision: rejected` trace (use `trpc-to-openapi` as the rejected example per the PRD, with `named-consumer: fail` and prose citing the grill-session conversation as provenance). - The skill is listed in `.claude/settings.json` (or wherever skills are registered) so `/evaluate-library` resolves to the SKILL.md via the Skill tool. - `pnpm lint && pnpm fallow:audit` pass. ## In scope - `.claude/skills/evaluate-library/SKILL.md` - `.claude/skills/evaluate-library/POLICY.md` - `.claude/skills/evaluate-library/TRACE-TEMPLATE.md` - `.claude/skills/evaluate-library/EXAMPLES/approved-example.md` - `.claude/skills/evaluate-library/EXAMPLES/rejected-trpc-to-openapi.md` - Skill registration in `.claude/settings.json` (match existing skill registration pattern). ## Out of scope - Automated tests for the skill (it is a prose runbook; correctness is verified by the success criterion in the PRD — running it against `trpc-to-openapi` produces the documented trace). - The schema module (Story 01) — already landed. - The human guide with worked examples for non-agent readers (Story 05). ## Tasks - [x] Investigate the existing skill registration pattern (read `.claude/settings.json` and one existing skill's SKILL.md to confirm format and registration key); then write all five skill files (`SKILL.md`, `POLICY.md`, `TRACE-TEMPLATE.md`, `EXAMPLES/approved-example.md`, `EXAMPLES/rejected-trpc-to-openapi.md`) and register the skill; all gates pass on this single commit.