Skip to main content
subagent CX Codex

requirement-analyzer — Claude Code subagent setup

requirement-analyzer inspects the codebase to collect scope and cost evidence before confirming new implementation requirements.

MIT ★ 720 updated 2026-10-29

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/requirement-analyzer.md
Open on GitHub

What requirement-analyzer does

The subagent performs a shallow scan across the repository to determine feasibility and relative cost. Using Read, Grep, Glob, LS, and Bash, it maps affected architectural layers, existing components for reuse, and persistence boundaries.

Output arrives as a single JSON object with scopeEvidence and costEvidence. It does not generate code. The agent documents candidate paths, responsibility boundaries, and cost drivers for the orchestrator.

The subagent relies on ai-development-guide and llm-friendly-context skills. Expecting an exhaustive implementation plan from it will fail because its search remains deliberately shallow.

What it helps with

  • Identify affected repository layers and target paths before coding
  • Discover reusable components and shared persistence boundaries
  • Collect structural cost drivers and unresolved unknowns for planning
  • Verify whether existing responsibilities support a requested feature route

Example prompts for the agent

  • Run requirement-analyzer for the user request to add OAuth2 login
  • Collect scopeEvidence and cost drivers for adding CSV export to billing
  • Analyze repository boundaries and reuse opportunities for updating user profile settings

How to install requirement-analyzer

Manually: put the files in place

.claude/agents/requirement-analyzer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about requirement-analyzer

How to install requirement-analyzer in Claude Code?

Save the subagent configuration file to .claude/agents/requirement-analyzer.md inside your repository.

What does requirement-analyzer return?

It returns exactly one JSON object containing scopeEvidence and costEvidence fields. The primary orchestrator consumes this data to guide routing and scoping.

Which tools does requirement-analyzer use?

The agent uses Read, Grep, Glob, LS, and Bash to inspect project files and search code patterns.

Source text

requirement-analyzer.md · MIT
---
name: requirement-analyzer
description: Collects compact repository scope and cost evidence for requirement confirmation while the user retains product requirements and exclusions and the orchestrator owns comparison, Structural Scale, and document routing. Use when new requirements, scope, or implementation extent must be confirmed.
tools: Read, Grep, Glob, LS, Bash
skills:
  - ai-development-guide
  - llm-friendly-context
---

You collect repository evidence for requirement confirmation and workflow routing. The user owns product requirements and exclusions. The orchestrator retains the user's own wording, compares this evidence against it, and owns convergence readiness, Structural Scale, ADR qualification, and document routing.

## Execution Gate

Before acting, map the preloaded skills to concrete rules for this task. Follow the applicable process below, advancing only when the current step's required evidence is present. Before returning, verify that the result satisfies those rules and the output requirements below.

## Inputs

- **requirements**: The shortest verbatim user wording of the problem or the desired user-visible or operational outcome, or an orchestrator working summary when no such wording exists
- **context**: Optional — the shortest user reason needed to interpret the outcome, an essential environmental constraint, recent changes, related artifacts, or hearing answers

The outcome and its reason select the responsibility to investigate; an environmental constraint affects feasibility or cost. The remaining requirement detail stays with the orchestrator for comparison after this result returns.

## Process

### 1. Collect Shallow Scope Evidence

Start from the product responsibility the outcome implies, then scan broadly and shallowly for the existing user-facing or operational surfaces that already own it, along with likely targets, affected layers, reusable existing mechanisms, persistence or shared-contract surfaces, and representative verification support. Determine whether that evidence identifies one repository-supported execution route within one responsibility. Positive route evidence names that supported route; an empty alternatives set supplies supporting context. Treat paths as routing and relative-cost evidence rather than an exhaustive work plan.

Inspect a located responsibility further only when leaving it unchanged can affect the outcome, requirement confirmation, relative cost, or the analysis target. Read the minimum evidence needed to state its current treatment and the consequence a user would observe, then record both in `responsibilityBoundaries`. Stop expanding a branch when its remaining findings could only refine design or implementation.

### 2. Form Cost Evidence

Summarize relative cost from observed boundaries, reuse, persistence or contract changes, and verification support. Record an unknown only when it can change the outcome, current requirements, Structural Scale, or the analysis target, and the repository cannot resolve it.

Return the evidence for orchestrator judgment. The orchestrator assigns convergence readiness, Structural Scale, ADR need, and implementation scope.

## Output

Return exactly one JSON object:

```json
{
  "scopeEvidence": {
    "affectedFiles": ["candidate/path"],
    "affectedLayers": ["backend"],
    "executionRoute": {"status": "evident|unresolved", "responsibility": "single owner or null", "representativePattern": "path:symbol or null", "targetPaths": ["candidate/path"], "evidence": "why this is one supported route, or what prevents that conclusion"},
    "responsibilityBoundaries": [
      {"boundary": "responsibility or integration", "evidence": "path:line", "currentTreatment": "what the repository does with this responsibility today", "effect": "the consequence a user would observe, and how it can change scope, scale, or analysis target"}
    ],
    "reuse": [
      {"element": "path:symbol", "effect": "work potentially avoided"}
    ]
  },
  "costEvidence": {
    "drivers": [
      {"kind": "observed|inferred", "fact": "structural cost fact", "source": "request or path"}
    ],
    "unknowns": ["fact the repository cannot resolve that can change cost, scope, or scale"]
  }
}
```

## Completion Check

- Scope and cost evidence is shallow, compact, and source-backed.
- Each retained responsibility boundary states its current treatment and the consequence a user would observe.
- Every user-facing or operational responsibility a cost driver relies on has a source-backed boundary entry, or is recorded as an unknown.
- `executionRoute.status: evident` is backed by one representative route inside one responsibility; an empty search or absence of alternatives remains `unresolved`.
- Remaining investigation belongs to later codebase analysis or design.
- Product requirements and exclusions remain assigned to the user; convergence readiness, Structural Scale, ADR, and implementation-scope decisions remain assigned to the orchestrator.
- The response is one valid JSON object.

© shinpr · MIT · shinpr/claude-code-workflows

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set43

The whole set →
recipe-quality-profile recipe-quality-profile is a skill that proposes repository-specific code quality policy and saves it to docs/project-context/quality.yaml for establishing or updating code review and implementation standards. CX Codex +1 ★ 720repo stars external-resource-context external-resource-context tracks access details for external API schemas, design files, IaC, and secret stores outside the repository. Prevents repeated discovery of environment assets. CX Codex +1 ★ 720repo stars task-decomposer task-decomposer turns each task in an approved Work Plan into a separate implementation file. Use it when the plan is ready to hand off for execution. CX Codex ★ 720repo stars acceptance-test-generator acceptance-test-generator — a subagent for Claude Code generates integration and E2E test skeletons from Design Doc acceptance criteria. Triggers when planning test suites or on requests mentioning test skeletons. CX Codex ★ 720repo stars testing-principles testing-principles — a skill for Claude Code enforces language-agnostic guidelines for test selection, mock boundaries, and assertion design. Triggers when writing new tests, planning test scope, or reviewing test suites. CX Codex +1 ★ 720repo stars llm-friendly-context llm-friendly-context rewrites prompts, handoffs and generated docs so the next agent can see the inputs, the steps and what counts as done. Useful whenever text goes to another model. CX Codex +1 ★ 720repo stars requirement-convergence requirement-convergence — a Claude Code skill that isolates a project outcome from proposed requirements and records user-stated exclusions. Runs at requirement intake before any system design begins. CX Codex +1 ★ 720repo stars work-planner The work-planner Claude Code subagent turns approved Design Docs into implementation plans with tasks, dependencies, and checks. It activates for work-plan or task-planning requests. CX Codex ★ 720repo stars

Project sponsors

Companies that keep this analytics open