neolabhq/context-engineering-kit

fix-tests

Systematically fix all failing tests after business logic changes or refactoring

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/neolabhq/context-engineering-kit --skill fix-tests

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Fix Tests

User Arguments

User can provide to focus on specific tests or modules:

$ARGUMENTS

If nothing is provided, focus on all tests.

Context

After business logic changes, refactoring, or dependency updates, tests may fail because they no longer match the current behavior or implementation. This command orchestrates automated fixing of all failing tests using specialized agents.

Goal

Fix all failing tests to match current business logic and implementation.

Important Constraints

  • Focus on fixing tests - avoid changing business logic unless absolutely necessary
  • Preserve test intent - ensure tests still validate the expected behavior
  • "Analyse complexity of changes" -
  • if there 2 or more changed files, or one file with complex logic, then Do not write tests yourself - only orchestrate agents!
  • if there is only one changed file, and it's a simple change, then you can write tests yourself.

Workflow Steps

Preparation

  1. Read sadd skill if available
  • If available, read the sadd skill to understand best practices for managing agents
  1. Discover test infrastructure
  • Read @README.md and package.json (or equivalent project config)
  • Identify commands to run tests and coverage reports
  • Understand project structure and testing conventions
  1. Run all tests
  • Execute full test suite to establish baseline
  1. Identify all failing test files
  • Parse test output to get list of failing test files
  • Group by file for parallel agent execution

Analysis

  1. Verify single test execution
  • Choose any test file
  • Launch haiku agent with instructions to find proper command to run this only test file
  • Ask him to iterate until you can reliably run individual tests
  • After he complete try running a specific test file if it exists
  • This ensures agents can run tests in isolation

Test Fixing

  1. Launch `developer` agents (parallel)
  • Launch one agent per failing test file
  • Provide each agent with clear instructions:
  • Context: Why this test needs fixing (business logic changed)
  • Target: Which specific file to fix
  • Guidance: Read TDD skill (if available) for best practices how to write tests.
  • Resources: Read README and relevant documentation
  • Command: How to run this specific test file
  • Goal: Iterate until test passes
  • Constraint: Fix test, not business logic (unless clearly broken)
  1. Verify all fixes
  • After all agents complete, run full test suite again
  • Verify all tests pass
  1. Iterate if needed
  • If any tests still fail: Return to step 5
  • Launch new agents only for remaining failures
  • Continue until 100% pass rate

Success Criteria

  • All tests pass ✅
  • Test coverage maintained
  • Test intent preserved
  • Business logic unchanged (unless bugs found)

Agent Instructions Template

When launching agents, use this template:

The business logic has changed and test file {FILE_PATH} is now failing.

Your task:
1. Read the test file and understand what it's testing
2. Read TDD skill (if available) for best practices on writing tests.
3. Read @README.md for project context
4. Run the test: {TEST_COMMAND}
5. Analyze the failure - is it:
   - Test expectations outdated? → Fix test assertions
   - Test setup broken? → Fix test setup/mocks
   - Business logic bug? → Fix logic (rare case)
6. Fix the test and verify it passes
7. Iterate until test passes

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills