APIprompt onlyIntermediate

Fix Failing Integration Endpoints

Automatically detects and resolves issues in failing API integration endpoints through iterative testing and code modifications.

← all loops
apiintegration-testingdebuggingnode.jsrest-api

Goal

Restore full functionality to all integration API endpoints

How to Run

The agent will automatically run integration tests, identify failures, and apply fixes until all tests pass or maximum iterations are reached.

  1. 01

    Initialize Environment

    Ensure Node.js, npm, and required dependencies are installed. Navigate to the project directory.

  2. 02

    Execute Loop

    Run this prompt in your preferred agent environment (Cursor, Claude Code, etc.). The agent will handle testing and fixes iteratively.

Workflow Steps

  1. 01

    Run integration test suite to identify failing endpoints

  2. 02

    Analyze test failure logs and stack traces to determine root cause

  3. 03

    Implement targeted fixes for identified API endpoint issues

  4. 04

    Re-run integration tests to verify fixes

  5. 05

    If tests still fail and iterations remain, return to step 1

Kickoff Prompt

Start the "Fix Failing Integration Endpoints" loop.

Goal: Restore full functionality to all integration API endpoints
Max iterations: 10
Between iterations run: npm run test:integration
Exit when: All integration tests pass successfully


Start by executing 'npm run test:integration' to identify failing API endpoints. For each failing test, analyze the error message and relevant API code to determine the cause. Apply minimal, focused fixes to resolve the issue, then re-run the tests. Continue this process until all integration tests pass or you've reached 10 iterations.

Self-pace this loop. After each iteration, run `npm run test:integration` and evaluate the output, and only continue if the exit condition is not met (All integration tests pass successfully). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.

Guardrails

hardcoded
  • ·Only modify files directly related to API integration endpoints
  • ·Maintain backward compatibility with existing API contracts
  • ·Ensure all changes are covered by existing or new unit tests
  • ·Do not proceed if database connections or external services are unavailable

Flow Diagram

rendering…

Related loops — API