Guidelines for creating unbiased test fixtures that integrate with project infrastructure. Use when creating fixtures for manual testing, setting up E2E test scenarios, or building code samples with deliberate issues for LLM review. Ensures fixtures work with hook automation and pass Phase 1 checks.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Guidelines for creating unbiased test fixtures that integrate with project infrastructure. Use when creating fixtures for manual testing, setting up E2E test scenarios, or building code samples with deliberate issues for LLM review. Ensures fixtures work with hook automation and pass Phase 1 checks.
user-invocable
false
allowed-tools
["Bash","Edit","Glob","Read","Write"]
version
1.0.0
author
Ashay Kubal @ Qball Inc.
Test Fixture Creation
Guidelines for creating test fixtures that work with Bulwark's hook-based automation and avoid bias that could compromise testing.
When to Use This Skill
Load this skill when:
Creating fixtures for manual testing of skills or agents
Setting up E2E test scenarios that require hook automation
Building code samples with deliberate issues for LLM review
DO NOT use for:
Unit test fixtures (those can be isolated in tests/fixtures/)
Mock data for automated tests
Documentation examples
Core Principles
1. No Bias in Fixtures
CRITICAL: Fixtures must not contain any indicators that they are test fixtures.
Forbidden
Why
Alternative
test-*.ts, *-fixture.ts
Filename reveals intent
user-service.ts, data-processor.ts
// This is a test file
Comment reveals intent
No explanatory comments
// Intentional bug here
Points to the issue
Let LLM discover it
fixture/, test-data/
Directory name reveals intent
scripts/components/, lib/
FIXME, TODO: test
Markers reveal intent
Remove all markers
Why this matters: When Claude knows code is a test fixture, it may:
Skip hook automation ("this is just a test")
Ignore pipeline suggestions
Produce different results than real code review
2. Project Infrastructure Integration
Fixtures must be placed within project infrastructure to enable hook automation.
Required for hooks to fire:
Code must be in directories covered by tsconfig.json include paths
Project must have working just typecheck and just lint recipes
Fixtures should compile and lint successfully so that Phase 2 (LLM review) can run.
Phase 1 Requirements:
just typecheck passes (no TypeScript errors)
just lint passes (no lint errors)
All imports resolve
Common Issues:
Problem
Solution
Missing Node.js types
Avoid fs, events, Buffer - use pure TS
Import resolution
Create stub files in scripts/lib/
Type errors
Use as unknown as T for intentional unsafe casts
4. Deliberate Issues for Phase 2
Fixtures should contain issues that TypeScript allows but are bad practice:
Security Issues (user-service.ts):
SQL injection via string interpolation
Hardcoded API keys and secrets
Path traversal vulnerabilities
Insecure token generation
Type Safety Issues (data-processor.ts):
Excessive any in properties and parameters
Unsafe type assertions (as unknown as T, as any)
Missing return types
Linting Issues (workflow-handler.ts):
Single-letter function names (p, x, z)
Generic variable names (s, d, c, i, r)
Deep nesting (8+ levels)
High cyclomatic complexity
Coding Standards Issues (config-manager.ts):
Multiple responsibilities in one file
Global mutable state
Implicit side effects (auto-initialization)
Mixed concerns in functions
Fixture Creation Workflow
Step 1: Plan Fixture Structure
1. Identify skill/agent sections to test
2. Map each section to a fixture file
3. Plan deliberate issues for each file
4. Identify supporting stubs needed
// scripts/components/user-service.ts// NO comments explaining this is a test!// File looks like production codeimport { db } from'../lib/database';
constAPI_KEY = 'sk_live_...'; // Hardcoded secretexportasyncfunctiongetUserByEmail(email: string) {
const query = `SELECT * FROM users WHERE email = '${email}'`; // SQL injection// ... rest of realistic code
}
Step 4: Verify Phase 1 Passes
# Must pass before creating test cases
just typecheck
just lint
Step 5: Create Test Protocol
Use conversational, non-developer prompts:
**Prompt** (conversational):
I just joined the team and was asked to review the user authentication module
before we go live. Can you take a look at scripts/components/user-service.ts
and let me know if there's anything concerning?
NOT:
**Prompt** (too technical):
Run code-review on the SQL injection vulnerability in getUserByEmail().
Users don't speak in technical jargon. Prompts should reflect real conversations.
Bad (Technical)
Good (Realistic)
"Review the SQL injection in line 14"
"The login seems slow and I'm worried about security"
"Check for any usage"
"Sometimes we get weird undefined errors"
"Analyze cyclomatic complexity"
"I can barely understand what this code does"
"Validate SRP compliance"
"This file seems to do a lot of different things"
Symptom-Based Prompts
Describe symptoms, not root causes:
"After I select a date range on the app, the app hangs. Could you please
debug, fix and validate the issue after loading the appropriate skills
and pipeline agents?"
NOT:
"timerangecalc() is giving an out of bound error"
Cleanup Protocol
MANDATORY: All fixtures must be cleaned up after testing.