sparc-refinement-red-phase-write-failing-tests

Sub-skill of sparc-refinement: Red Phase - Write Failing Tests (+2).

5 stars

Best use case

sparc-refinement-red-phase-write-failing-tests is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of sparc-refinement: Red Phase - Write Failing Tests (+2).

Teams using sparc-refinement-red-phase-write-failing-tests should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/red-phase-write-failing-tests/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/development/sparc/sparc-refinement/red-phase-write-failing-tests/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/red-phase-write-failing-tests/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sparc-refinement-red-phase-write-failing-tests Compares

Feature / Agentsparc-refinement-red-phase-write-failing-testsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of sparc-refinement: Red Phase - Write Failing Tests (+2).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Red Phase - Write Failing Tests (+2)

## Red Phase - Write Failing Tests


```typescript
// Step 1: Write test that defines desired behavior
describe('AuthenticationService', () => {
  let service: AuthenticationService;
  let mockUserRepo: jest.Mocked<UserRepository>;
  let mockCache: jest.Mocked<CacheService>;

  beforeEach(() => {
    mockUserRepo = createMockRepository();
    mockCache = createMockCache();

*See sub-skills for full details.*

## Green Phase - Make Tests Pass


```typescript
// Step 2: Implement minimum code to pass tests
export class AuthenticationService {
  private failedAttempts = new Map<string, number>();
  private readonly MAX_ATTEMPTS = 5;
  private readonly LOCK_DURATION = 15 * 60 * 1000; // 15 minutes

  constructor(
    private userRepo: UserRepository,
    private cache: CacheService,

*See sub-skills for full details.*

## Refactor Phase - Improve Code Quality


```typescript
// Step 3: Refactor while keeping tests green
export class AuthenticationService {
  constructor(
    private userRepo: UserRepository,
    private cache: CacheService,
    private logger: Logger,
    private config: AuthConfig,
    private eventBus: EventBus
  ) {}

*See sub-skills for full details.*

Related Skills

subagent-write-verification

5
from vamseeachanta/workspace-hub

Independently verify subagent-claimed file writes with filesystem and git checks before treating the artifact as real, before committing it, and before referencing the path in downstream prompts.

workspace-hub-sync-concurrent-writer-blocks

5
from vamseeachanta/workspace-hub

Handle repository_sync cleanup when workspace-hub root is being mutated by concurrent Codex/Codex/Gemini sessions.

live-writer-branch-cleanup-guard

5
from vamseeachanta/workspace-hub

Guardrails for multi-repo sync and branch cleanup when workspace-hub or another shared repo has active writer sessions, worktree-backed branches, or unrelated-history branches.

gtm-prospect-pipeline-phased-execution

5
from vamseeachanta/workspace-hub

Phased execution pattern for

sparc-specification

5
from vamseeachanta/workspace-hub

SPARC Specification phase specialist for requirements analysis, constraint identification, use case definition, and acceptance criteria creation

sparc-refinement

5
from vamseeachanta/workspace-hub

SPARC Refinement phase specialist for iterative improvement through TDD, code optimization, refactoring, performance tuning, and quality improvement

sparc-pseudocode

5
from vamseeachanta/workspace-hub

SPARC Pseudocode phase specialist for algorithm design, data structure selection, complexity analysis, and design pattern identification

sparc-architecture

5
from vamseeachanta/workspace-hub

SPARC Architecture phase specialist for system design, component architecture, interface design, scalability planning, and technology selection

discipline-refactor-phase-4-validation

5
from vamseeachanta/workspace-hub

Sub-skill of discipline-refactor: Phase 4: Validation.

discipline-refactor-phase-3-execution

5
from vamseeachanta/workspace-hub

Sub-skill of discipline-refactor: Phase 3: Execution.

discipline-refactor-phase-2-planning

5
from vamseeachanta/workspace-hub

Sub-skill of discipline-refactor: Phase 2: Planning.

discipline-refactor-phase-1-analysis

5
from vamseeachanta/workspace-hub

Sub-skill of discipline-refactor: Phase 1: Analysis.