skill tdd

AI Community

Skill notes

The Iron Law

<HARD-GATE> NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST </HARD-GATE> Violating the letter of this rule is violating the spirit of this rule. Write code before the test? Delete it. Start over.

Phase 1: RED - Write Failing Test

Write ONE minimal test showing what should happen. Good Test: Clear name describing behavior Tests real code, not mocks One thing only

After writing the initial test(s) but BEFORE verifying they fail, challenge the test design with a second provider. A single-model test suite often has systematic blind spots — the same model that writes the tests will write implementation that trivially satisfies them. An adversarial review catches scenarios that would pass with a stub that doesn't actually work. If an external provider is available, dispatch the test specs for challenge:

Phase 2: VERIFY RED - Watch It Fail

MANDATORY. Never skip. Confirm: Test fails (not errors) Failure message is what you expected Fails because feature is missing (not typos)

Phase 3: GREEN - Minimal Code

Write the simplest code to pass the test. Nothing more. Good: Bad (YAGNI violation):

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@nyldn · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview skill-tdd.preview
# Bug Fix Example

test('rejects empty email', async () => {
  const result = await submitForm({ email: '' });
  expect(result.error).toBe('Email required');
});

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.