Files
agentic-dev/docs/work/2026-05-14-library-evaluation-policy/04-evaluate-library-skill/_story.md
Danijel Martinek 90fc2853f2 feat(work): add ISO timestamps + auto-bump on staged work-doc changes
- New scripts/work/bump-updated-timestamps.mjs stamps the `updated:`
  frontmatter field to the current ISO 8601 UTC timestamp on every
  staged docs/work/**/*.md file. Idempotent; adds the field after
  `created:` if missing.
- .husky/pre-commit invokes the bump script as step 2 (before
  rebuild-state) so _state.json sees the fresh timestamp.
- Backfill all existing work docs (4 PRDs + 3 epics + 21 stories):
    * created: promoted from \`YYYY-MM-DD\` -> ISO timestamp using
      git log --diff-filter=A on each file (first-commit date for
      stories that had no \`created:\` line, midnight UTC for PRDs
      and epics that had date-only created).
    * updated: added from \`git log -1 --format=%aI\` on each file
      (last-commit timestamp); will be re-stamped to "now" by the
      pre-commit hook on this commit.

Stories that had no \`created:\` line now get one.
2026-05-14 21:10:34 +02:00

3.5 KiB

id, epic, title, type, status, feature, depends-on, blocks, created, updated
id epic title type status feature depends-on blocks created updated
04-evaluate-library-skill 2026-05-14-library-evaluation-policy evaluate-library skill (SKILL.md + supporting files) technical-story done tooling
01-trace-schema-foundation
05-human-guide
2026-05-14T06:52:02+02:00 2026-05-14T19:10:35.370Z

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 <name> --tier <feature|core|app> --target <package-path>.

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 <name> --tier <tier> --target <pkg-path>), 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

  • 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.