agentleFS
shiwenwenshiwenwen/hope-agent/skills/ha-test-strategy/SKILL.md

ha-test-strategy

Skill1.7k starsChanged 8 months agoMITView on GitHub

Hope-native test strategy for features, fixes, and refactors: select test-first, regression-first, characterization, integration, E2E, or manual evidence according to risk and repository rules.

Trending

Quiet since October.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 4 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the shiwenwen/hope-agent repository that our weekly crawl found: only 5 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the user's request and repository instructions.

    line 14
  2. Distinctive:

    Prefer a failing test before implementation when the new contract is clear, the test seam is stable, and observing the failure proves the …

    line 22
  3. Distinctive:

    Use the lowest layer that proves the contract.

    line 57
  4. Distinctive:

    Keep fixtures deterministic and failures diagnostic.

    line 63
  5. Distinctive:

    Avoid mocks that erase the boundary being tested.

    line 66
  6. Distinctive:

    Do not weaken existing assertions merely to make a change pass.

    line 67
  7. Distinctive:

    Run the narrowest new or failing test.

    line 71
  8. Distinctive:

    Run the nearest affected suite when justified.

    line 72
  9. Very specific:

    Use ha-verify to decide whether broader gates are needed at closeout.

    line 73
  10. Distinctive:

    If a test is flaky or environment-blocked, investigate the cause.

    line 75

≈ “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

Hope Test Strategy

Choose tests that reduce uncertainty about the requested behavior. Test-first is a valuable technique, not an unconditional law.

Precedence

Follow the user's request and repository instructions. Do not run broad suites, install dependencies, or rewrite test infrastructure when the project forbids or does not require it.

Select The Strategy

Test-first

Prefer a failing test before implementation when the new contract is clear, the test seam is stable, and observing the failure proves the test is meaningful.

Regression-first

For a bug, reproduce the original failure in the narrowest credible automated test before or alongside the fix. Confirm it fails for the right reason, then passes after the root-cause change.

Characterization-first

For legacy, poorly documented, or risky refactors, capture current intentional behavior before changing structure. Do not freeze a known bug as desired behavior.

Implementation-first with immediate coverage

Reasonable for exploratory seams, generated code, mechanical migrations, or UI work where the correct test boundary becomes clear only after a small reversible implementation. Add the relevant proof before claiming completion.

No new automated test

Reasonable for pure docs, trivial metadata, generated outputs, or low-risk mechanical changes when existing checks directly cover the risk. Explain the decision rather than adding a meaningless test.

Choose The Layer

  • Unit: pure logic, state transition, parser, policy, or failure classification.
  • Integration: persistence, adapter, protocol, or cross-module contract.
  • E2E: a user-critical path that only becomes true across the full stack.
  • Manual smoke: visual layout, OS integration, credentials, or external state that cannot be honestly simulated.

Use the lowest layer that proves the contract. Add a higher layer only for a boundary the lower layer cannot cover.

Test Quality

  • Assert observable behavior, not incidental implementation details.
  • Keep fixtures deterministic and failures diagnostic.
  • Cover the demonstrated edge, including cancellation, retry, stale state, or partial failure when relevant.
  • Avoid mocks that erase the boundary being tested.
  • Do not weaken existing assertions merely to make a change pass.

Execute Efficiently

  1. Run the narrowest new or failing test.
  2. Run the nearest affected suite when justified.
  3. Use ha-verify to decide whether broader gates are needed at closeout.

If a test is flaky or environment-blocked, investigate the cause. Do not rerun until green and call that proof.

Smoke Prompts

  • "Choose and add the right regression test for this bug."
  • "Refactor this legacy parser without freezing the broken behavior."
  • "Decide whether this UI change needs unit, E2E, or manual 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.