AgentSkillsCN

05 Test Runner

05 测试运行者

SKILL.md
--- frontmatter
tags: [skill, codex-exec]
skill_id: "05_test_runner"

Skill 05 — Test Runner

Purpose: Run the repo’s tests/build/lint (as applicable) and capture results as durable artifacts.

Protocols:

  • [[docs/PROTOCOLS/VAULT_PROBE]]
  • [[docs/PROTOCOLS/EVIDENCE]]
  • [[docs/PROTOCOLS/RUN_LOGGING]]
  • [[docs/PROTOCOLS/PATCH_GATE]]

Tools:

  • [[tools/repl/README]] — patch-gated edits (generate + check + apply)

Inputs (from Orchestrator)

  • Optional: preferred command (if known), e.g. npm test, pnpm test, npm run build

Outputs (must write)

  • artifacts/test_report.md
  • artifacts/test_results.json
  • [[docs/skills/05_test_runner/SUMMARY]]

Run log (mandatory)

Create: artifacts/_runs/<timestamp>_05_test_runner/ with:

  • COMMANDS.md
  • LOG.txt

Steps

  1. Detect available commands (probe package.json, Makefile, justfile, CI config).
  2. Choose the most relevant verification commands:
    • Prefer fast checks first: lint, typecheck, unit tests, then build.
  3. Execute the chosen commands and capture full logs under the run folder.
  4. Write artifacts/test_results.json with:
    • commands (array)
    • status per command
    • start_time, end_time
    • failures (if any; include file/line pointers when possible)
  5. Write artifacts/test_report.md (human readable):
    • what ran
    • pass/fail
    • next steps
  6. Write SUMMARY.md linking to the report and run logs.

Definition of Done

  • At least one verification command was attempted, OR explicit evidence that none exist
  • Logs are captured under artifacts/_runs/...
  • Report + JSON exist
  • Summary exists