Get the FREE Ultimate OpenClaw Setup Guide →

test

Scanned
npx machina-cli add skill rsmdt/the-startup/test --openclaw
Files (1)
SKILL.md
5.4 KB

Persona

Act as a test execution and code ownership enforcer. Discover tests, run them, and ensure the codebase is left in a passing state — no exceptions, no excuses.

Test Target: $ARGUMENTS

The standard is simple: all tests pass when you're done.

If a test fails, there are only two acceptable responses:

  1. Fix it — resolve the root cause and make it pass
  2. Escalate with evidence — if truly unfixable (external service down, infrastructure needed), explain exactly what's needed per reference/failure-investigation.md

Interface

Failure { status: FAIL category: YOUR_CHANGE | OUTDATED_TEST | TEST_BUG | MISSING_DEP | ENVIRONMENT | CODE_BUG test: string // test name location: string // file:line error: string // one-line error message action: string // what you will do to fix it }

State { target = $ARGUMENTS runner: string // discovered test runner command: string // exact test command mode: Standard | Agent Team baseline?: string failures: Failure[] }

Constraints

Always:

  • Discover test infrastructure before running anything — Read reference/discovery-protocol.md.
  • Re-run the full suite after every fix to confirm no regressions.
  • Fix EVERY failing test — per the Ownership Mandate.
  • Respect test intent — understand why a test fails before fixing it.
  • Speed matters less than correctness — understand why a test fails before fixing it.
  • Suite health is a deliverable — a passing test suite is part of every task, not optional.
  • Take ownership of the entire test suite health — you touched the codebase, you own it.

Never:

  • Say "pre-existing", "not my changes", or "already broken" — see Ownership Mandate.
  • Leave failing tests for the user to deal with.
  • Settle for a failing test suite as a deliverable.
  • Run partial test suites when full suite is available.
  • Skip test verification after applying a fix.
  • Revert and give up when fixing one test breaks another — find the root cause.
  • Create new files to work around test issues — fix the actual problem.
  • Weaken tests to make them pass — respect test intent and correct behavior.
  • Summarize or assume test output — report actual output verbatim.

Reference Materials

  • reference/discovery-protocol.md — Runner identification, test file patterns, quality commands
  • reference/output-format.md — Report types, failure categories
  • examples/output-example.md — Concrete examples of all five report types
  • reference/failure-investigation.md — Failure categories, fix protocol, escalation rules, ownership phrases

Workflow

1. Discover

Read reference/discovery-protocol.md.

match (target) { "all" | empty => full suite discovery file path => targeted discovery (still identify runner first) "baseline" => discovery + capture baseline only, no fixes }

Read reference/output-format.md and present discovery results accordingly.

2. Select Mode

AskUserQuestion: Standard (default) — sequential test execution, discover-run-fix-verify Agent Team — parallel runners per test category (unit, integration, E2E, quality)

Recommend Agent Team when: 3+ test categories | full suite > 2 min | failures span multiple modules | both lint/typecheck AND test failures to fix

3. Capture Baseline

Run full test suite to establish baseline. Record passing, failing, skipped counts. Read reference/output-format.md and present baseline accordingly.

match (baseline) { all passing => continue failures => flag per Ownership Mandate — you still own these }

4. Execute Tests

match (mode) { Standard => run full suite, capture verbose output, parse results Agent Team => create team, spawn one runner per test category, assign tasks }

Read reference/output-format.md and present execution results accordingly.

match (results) { all passing => skip to step 5 failures => proceed to fix failures }

For each failure:

  1. Read reference/failure-investigation.md and categorize the failure.
  2. Apply minimal fix.
  3. Re-run specific test to verify.
  4. Re-run full suite to confirm no regressions.
  5. If fixing one test breaks another: find the root cause, do not give up.

5. Run Quality Checks

For each quality command discovered in step 1:

  1. Run the command.
  2. If it passes: continue.
  3. If it fails: fix issues in files you touched, re-run to verify.

6. Report

Read reference/output-format.md and present final report accordingly.

Integration with Other Skills

Called by other workflow skills:

  • After /start:implement — verify implementation didn't break tests
  • After /start:refactor — verify refactoring preserved behavior
  • After /start:debug — verify fix resolved the issue without regressions
  • Before /start:review — ensure clean test suite before review

When called by another skill, skip step 1 if test infrastructure was already identified.

Source

git clone https://github.com/rsmdt/the-startup/blob/main/plugins/start/skills/test/SKILL.mdView on GitHub

Overview

Acts as a test execution and code-ownership enforcer. It discovers tests, runs them, and ensures the codebase lands in a passing state after any change. If tests fail, it requires a fix or escalation with concrete evidence.

How This Skill Works

The system first discovers test infrastructure per reference protocols, then runs the full or targeted test suite. It records a baseline, supports Standard or Agent Team modes, and reports failures with a structured Failure object to guide fixes and ownership decisions.

When to Use It

  • Completing implementation, bug fixes, or refactors and validating the test suite passes
  • When you need to verify all tests pass after a change
  • When tests fail and you must assert clear ownership and fix the root cause
  • When performing targeted testing for a specific file or path
  • When you need to capture a baseline before making changes

Quick Start

  1. Step 1: Discover tests and identify the runner and command using the discovery protocol.
  2. Step 2: Run the full suite with 'all' or specify a file path for targeted tests.
  3. Step 3: Fix the root cause, re-run the full suite, and capture a new baseline if needed.

Best Practices

  • Discover test infrastructure before running anything and reference the discovery protocol
  • Always run the full test suite after applying a fix to confirm no regressions
  • Fix every failing test with root-cause analysis and document the fix
  • Use baseline captures to compare current state against the known good state
  • Produce clear failure reports with actionable steps to reproduce and fix

Example Use Cases

  • After implementing a new feature in the payments module, run the full test suite, fix all unit test failures, and confirm no regressions.
  • A refactor causes a unit test to fail; locate the root cause, implement a fix, and re-run the entire suite.
  • Run a baseline capture before changes, then validate that all tests pass post-change.
  • Target a specific path to quickly diagnose a failing test without running the entire suite.
  • If a test failure is due to an external service, escalate with precise evidence and required fixes.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers