agentleFS
max-roguemax-rogue/Stackmoss/.agents/skills/stretch-testing/SKILL.md

stretch-testing

Skill4 starsChanged 8 months agoMITView on GitHub

Adversarial QA and BRD compliance testing — write failing tests that prove bugs, edge case probing, and spec-vs-implementation mismatch detection. Use when running stretch tests, QA audits, or BRD compliance checks.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Before writing any test, read the relevant BRD section to understand expected behavior:

    line 18
  2. Distinctive:

    Proof: test file path + test name

    line 57
  3. Very specific:

    Import helpers from tests/templates/helpers.ts

    line 63
  4. Distinctive:

    Write tests without BRD reference for expected behavior

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Stretch Testing Skill

When to Use

  • Running adversarial QA against the codebase
  • Detecting BRD spec vs implementation mismatches
  • Writing edge case tests for untested code paths
  • Verifying state machine can't be bypassed
  • Checking template outputs match BRD §9 schemas exactly

Methodology

1. Read Authority First

Before writing any test, read the relevant BRD section to understand expected behavior:

  • State machine: BRD §6
  • CLI commands: BRD §7
  • Intake modes: BRD §8
  • Output schemas: BRD §9
  • Pack matrix: BRD §10
  • Patch rules: BRD §12
  • Promote criteria: BRD §13

2. Adversarial Test Categories

CategoryWhat to TestExample
BRD MismatchImplementation differs from BRD specBudget values hardcoded vs BRD §12.4
State BypassCommand runs in wrong staterun working in MIGRATING
Input InjectionDangerous names, paths, contentProject name CON, ../../../etc/passwd
Budget OverflowWord budget can be exceededPatch that inflates beyond 1800 words
Schema ViolationGenerated output missing required fieldsConfig without schemaVersion
Gate BypassPromote/completeness gate insufficientPromote with unresolved questions
Compile DriftCompile output inconsistent across targetsCursor missing role that Claude has

3. Test Output Format

it('B-XXX: <description of what should happen per BRD>', () => {
  // Arrange: set up the scenario
  // Act: trigger the behavior
  // Assert: verify BRD-expected result
});

4. Reporting Format

For each bug found:

  • Bug ID: B-001, B-002, etc.
  • Severity: CRITICAL / HIGH / MEDIUM / LOW
  • Component: which src/ module
  • Actual: what happens
  • Expected: what BRD says should happen (cite section)
  • Proof: test file path + test name

Test Files

  • Adversarial tests go in tests/adversarial/
  • Name pattern: stretch-<category>.test.ts
  • Import helpers from tests/templates/helpers.ts

Do NOT

  • Fix bugs — only find and document them
  • Write tests without BRD reference for expected behavior
  • Skip cleanup in afterEach (temp dirs, external files)
  • Assume anything works until proven with a test

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.