From marvin
Write failing tests from user stories and architecture docs. Behavioral tests verify WHAT (acceptance criteria), conformance tests verify HOW (architecture compliance). All tests must fail (RED state). Standalone or pipeline-aware via env vars. Triggers: test-writer, write tests, TDD, red phase, failing tests.
npx claudepluginhub ondrej-svec/heart-of-gold-toolkit --plugin marvinThis skill is limited to using the following tools:
Write failing tests that define what "done" means. Behavioral tests verify acceptance criteria. Conformance tests verify the architecture is followed — not faked.
Adversarial review — find weaknesses and expose them with failing tests. Checks architecture conformance, stub detection, security, and story completeness. Never modifies implementation. Standalone or pipeline-aware via env vars. Triggers: redteam, adversarial review, attack, probe, find weaknesses.
Writes failing tests from feature specs for TDD RED phase, parsing acceptance criteria and user test cases to match project test framework and conventions.
Share bugs, ideas, or general feedback.
Write failing tests that define what "done" means. Behavioral tests verify acceptance criteria. Conformance tests verify the architecture is followed — not faked.
This skill MAY: read stories and architecture docs, write test files, run the test suite. This skill MAY NOT: write implementation code, modify existing source files, fix failing tests by changing expectations.
ALL tests must FAIL when this skill completes. That's the point — RED state.
| Shortcut | Why It Fails | The Cost |
|---|---|---|
| "Write tests that pass with mocks" | Tests that pass with mocks prove nothing about real behavior | False confidence → bugs in production |
| "Skip conformance tests — unit tests are enough" | Unit tests don't verify architecture compliance | Stubs pass tests, real deps aren't wired |
| "Relax assertions — they're too strict" | Loose assertions let wrong implementations pass | Tests are decoration, not verification |
| "Test the happy path only" | Edge cases are where bugs hide | Happy path works, edge cases crash |
If $STORIES_PATH is set (pipeline mode):
$STORIES_PATHIf no env var (standalone mode):
docs/stories/ for recent story filesExit: Stories loaded, acceptance criteria extracted.
If $ARCH_PATH is set (pipeline mode):
$ARCH_PATHIf no env var (standalone mode):
*.architecture.md near the stories fileExit: Architecture context loaded (or skipped for standalone behavioral-only mode).
For each story, write tests that verify acceptance criteria:
Test naming convention: Match project conventions (from CLAUDE.md or existing tests).
Rules:
// STORY-001: criterion descriptionAnti-patterns to avoid (see anti-patterns.md):
Exit: Behavioral test files written.
Skip this step if no architecture doc is available.
For each dependency and integration point in the architecture doc, write tests that verify compliance:
Rules:
Conformance test patterns (see conformance-patterns.md):
Exit: Conformance test files written.
Run the full test suite:
# Use project's test command
npm test 2>&1 || true
ALL tests must fail. This is the executable self-check.
If any tests pass:
Retry up to 3 times. If tests still pass after 3 attempts, report the issue:
INCOMPLETE: {N} tests are passing when they should fail.
Passing tests: {list}
Reason: {why they pass — likely testing something that already exists}
Exit: All tests fail (RED state confirmed) or INCOMPLETE reported.
Before completing, verify:
./anti-patterns.md — Weak test patterns that pass with stubs./conformance-patterns.md — How to write tests that verify architecture compliance