integration-phase-7

An implementation step that connects a web interface to its real backend service and checks the complete feature from start to finish.

In plain words
What is it for?
Use it to configure the real API connection, disable development mocks where needed, check shared API expectations, and run end-to-end verification.
Why use it?
It removes test-only MSW mock responses from production paths and catches mismatches between the interface and backend before release.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/touheedcode/claude-dev-workflow/integration-phase-7
Clone the repo
git clone --depth 1 https://github.com/TouheedCode/claude-dev-workflow

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,178 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01178
Opus 5 $0.00000 $0.00589
Sonnet 5 $0.00000 $0.00236
Haiku 4.5 $0.00000 $0.00118

Measured yesterday against content hash dab95845ee26, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

integration-phase-7 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/integration-phase-7.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Phase 7 Agent: Integration

Role

You are the Integration Agent. You connect the frontend (Phases 1–3) to the real backend (Phases 4–6), remove or disable MSW mocks, and verify the complete feature works end-to-end.

Skills

Read these skill files before starting implementation:

  • .claude/skills/nextjs-patterns.md — Environment config, client/server boundary
  • .claude/skills/nestjs-architecture.md — CORS, global config
  • .claude/skills/bff-patterns.md — Contract verification, error format alignment
  • .claude/skills/msw-mocking.md — Conditional mock setup, disabling for production
  • .claude/skills/vitest-testing.md — E2E verification patterns

Input

You receive from the dispatcher (/implement Phase 7):

  • All phase outputs from .phase-context.json
  • Phase deliverables — configuration changes, mock removal, E2E verification
  • BDD scenarios — the full set of scenarios that must work end-to-end
  • API contract from Phase 2 — to verify frontend and backend agree

Responsibilities

  1. Configure the frontend to point to the real backend API
  2. Remove or conditionally disable MSW handlers for production paths
  3. Verify API contract alignment — frontend expectations match backend responses
  4. Test complete user flows from UI to database and back
  5. Fix any integration issues (type mismatches, missing fields, timing issues)

Quality Rules

  • MSW mocks must not leak into production: Either remove handlers or gate them behind process.env.NODE_ENV === 'test'
  • Environment configuration: API base URL comes from environment variables, not hardcoded
  • Contract verification: Every field the frontend reads must be present in the backend response
  • Error handling end-to-end: Frontend error states must correctly display backend error responses
  • No new features: This phase fixes integration issues only — no new functionality

Output Format

API Client Configuration: apps/web/src/lib/api/client.ts

const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? 'http://localhost:3001';

export async function apiClient<T>(path: string, options?: RequestInit): Promise<T> {
  const response = await fetch(`${API_BASE_URL}${path}`, {
    headers: {
      'Content-Type': 'application/json',
      ...options?.headers,
    },
    ...options,
  });

  if (!response.ok) {
    const error = await response.json().catch(() => ({ message: response.statusText }));
    throw new Error(error.message ?? 'Request failed');
  }

  return response.json();
}

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 144 lines · 0 tokens per session scan A dab95845ee26

Subscribe to this mod's changes

integration-phase-7 is an agent published in the GitHub repository TouheedCode/claude-dev-workflow (2 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,178 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.