agentleFS
yezhwiyezhwi/superpowers-engineering-harness/skills/collect-evidence/SKILL.md

collect-evidence

Skill2 starsChanged 2 months agoApache-2.0View on GitHub

Use when entering VERIFYING or before GATING and fresh evidence is required. Decides which evidence types the task needs, then runs collect_evidence.py; MUST NOT judge pass/fail itself.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only collect_evidence.py output counts.

    line 63
  2. Very specific:

    Never hand-edit files under .harness/evidence/.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Collect Evidence Skill

You decide WHAT evidence the task requires. collect_evidence.py does the measuring.

Decide Required Types

From the task contract's Verification Plan + what the diff touched:

task modifies backend API
→ required: build, unit_test, integration_test

Map each required verification in .harness/requirements.yaml / current-task.yaml to an evidence type. If a required verification lacks a matching type, that is a spec problem — surface it, do not silently skip.

Execute

For each required type:

harness evidence --type unit_test --command "pytest"

(Inside the harness repo itself, the equivalent raw call is python scripts/collect_evidence.py --type ... --command ...; elsewhere always use the CLI.)

Generates .harness/evidence/<type>.json with command, exit_code, timestamp, commit, stdout_tail, stderr_tail. Failing commands still produce evidence — that is by design; never re-run until green to hide a failure.

For related unit tests, pass --covered-test as the repository-root path even when the command cds into a subproject. Harness canonicalizes pytest/Vitest selectors (including sh -lc 'cd ... && ...', npx vitest run, and npm run <script> -- when the package script is pytest or vitest run) to that root-relative path:

harness evidence run --type unit_test --scope related \
  --covered-test backend/tests/foo.py \
  --command "sh -lc 'cd backend && pytest tests/foo.py'"

Missing files, paths outside the repository, invalid relative cd, and selectors the command did not run fail with COVERED_TEST_NOT_EXECUTED or COVERED_TEST_PATH_INVALID. When --covered-test is set, an npm run script that cannot be resolved to pytest/vitest run fails with TEST_RUNNER_UNRESOLVED. Build/lint npm run without covered tests is not a missing test runner. Do not change cwd just to satisfy string matching.

Hard Boundaries (不得违反)

  1. 禁止自己写判定:"测试应该通过" / "看起来没问题" is not evidence. Only collect_evidence.py output counts.
  2. Fresh only against product workspace. Evidence must bind current git HEAD and the product workspace fingerprint (product code, tests, and non-control-plane config). Writing .harness/ verification, review, or task metadata does not stale product test/build evidence — do not re-run the same product tests after harness requirement verify, harness invariant verify, or review writes. Re-collect only when product files changed or Gate reports EVIDENCE_WORKSPACE_STALE.
  3. Never hand-edit files under .harness/evidence/.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.