Skip to content

Test the executable code that lives inside skills [find-inspiration:skill-script-tests] #39

Description

@nonreagent

Kind: leaf
Effort: S · Risk: low
Source: paulirish/dotfiles (run 2026-08-23)
Decision: adopt

Problem

A skill stops being unverifiable prose the moment it contains code, and this repo's one piece of skill code has no tests.

Current state (this repo)

home/.agents/skills/find-inspiration/bin/triage-issues.py is 255 lines that parse a run JSON, validate it, dedup GitHub issues on a [find-inspiration:<id>] title marker, and append to decisions.jsonl — the durable memory of the whole triage workflow. make check-skill-frontmatter proves the frontmatter parses and make check-skills proves the symlinks resolve; neither executes a line of that script. A regression in load_decisions() or validate() surfaces as a mis-filed issue or a corrupted log, discovered by hand.

Their approach

agents/ is a pnpm workspace where each script sits beside a *.test.ts run by node --test, with checked-in fixtures. gather-reviews.test.ts imports the real renderThread/convertToMarkdown and asserts on rendered output; fixture.test.ts replays a captured JSON payload through the converter and asserts on the result.

Difference that matters

They treat skill scripts as code with a test suite; we treat them as content. The gap is not conceptual — validate(), load_decisions() and the marker dedup are pure functions over a JSON file, and --dry-run already makes the whole path network-free, so this is testable today with no refactor.

Translation into this repo

Add test/test_skills.sh following the existing bespoke-harness shape: run triage-issues.py --summarize-decisions against a fixture decisions log and --run <fixture> --dry-run against a fixture run JSON, asserting the CREATE/LOG lines and the exit codes for malformed input (duplicate id, reject without rationale). Keep fixtures under test/fixtures/. Wire into make test.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    adoptDecided: adopt into this repofind-inspirationIdea triaged via the find-inspiration skill

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions