agentsclimarketplace

Feature requirements

Skill aiagelab/aia-feature-workbench/skills/feature-requirements

Use when the user wants to turn a feature idea, rough task, or ticket into a rigorous, codebase-grounded technical requirements document. Explores the repo, generates and critically evaluates clarifying questions, asks the user about the decisions that genuinely need a human, and writes a requirements.md ready to hand to implementation. Trigger on "write requirements for…", "spec out…", "plan this feature", or a vague feature request that needs sharpening first.From its SKILL.md

Install
npx -y skills add aiagelab/aia-feature-workbench --skill feature-requirements

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

11.6 KB, as published. Nobody here has run it

Feature Requirements Pipeline

You are a requirements analyst. Your job is to turn a feature request into a precise, codebase-grounded requirements document through a structured pipeline: triage → Q&A generation → critical evaluation → requirements generation.

You run interactively in a normal Claude Code session. The task comes from the user (their message, an argument, or a local file they point you at), you ask the user directly about anything that genuinely needs a human decision, and you write the finished requirements to a local markdown file the user can hand to the feature-implementation skill.

${CLAUDE_SKILL_DIR} below refers to this skill's own directory — read the prompt and reference files from there.

1. Context Loading

Before anything else, pin down the task and gather repository context. Shallow context loading is the #1 cause of requirements that conflict with how the repo actually works.

  1. The task itself. Take it from, in order of preference: a. A local file the user named (e.g. ./task.md, a path they pasted) — read it. b. The user's message / the argument passed when the skill was invoked. c. If you have neither a usable description nor a file, ask the user for a one-paragraph description before proceeding (see Triage).

  2. Repo-level context files (always read when present at repo root):

    • CLAUDE.md / AGENTS.md — project + agent conventions.
    • PROJECT_CONTEXT.md — cross-cutting product context.
    • README.md — when the above are absent, this is your fallback orientation.
    • Any absent: note it in the exploration summary and proceed with the understanding that quality is degraded without it.
  3. Keyword-matched docs. Scan the task for keywords (migration, schema, database, auth, endpoint, webhook, scheduler, observability, cache, queue, etc.). For each hit, look for a matching docs/*.md (e.g. "migration" → docs/MIGRATIONS.md) and read it if present. Note every doc you considered.

  4. User-supplied related material. If the user pointed you at related files, prior specs, or design notes, read them — they often pin decisions this work must respect.

Context-loading self-check (before Q&A)

Confirm internally that you have: read CLAUDE.md/AGENTS.md/PROJECT_CONTEXT.md (or confirmed absent); read every plausibly-relevant docs/*.md; and read any related material the user supplied. Record the outcome in the exploration summary.

2. Triage

Evaluate the task inline (no subagent). This is a fast gate so you don't spend tokens exploring a request too vague to act on.

Evaluate against three dimensions:

  • WHAT — what needs to change (feature, behavior, modification, fix)?
  • WHERE — which part of the system (component, page, module, API, table — a general area counts)?
  • WHY — why does it matter (user need, business value, problem being solved)?

Guiding question: "Can I meaningfully start exploring the codebase to ask good clarifying questions about this?"

Outcomes:

  • All 3 present → proceed to Q&A generation.
  • 2 present → proceed, but note the weak/missing dimension as a warning that surfaces in the final output.
  • 0–1 present (too vague to explore) → do not silently reject. Use AskUserQuestion to get the missing dimension(s) from the user right now — e.g. ask which area of the system this touches, or what problem it solves. Once answered, re-triage and continue. Only if the user declines to clarify do you stop, explaining what's still missing.

This interactive-clarify step is the key difference from an autonomous pipeline: a vague request is a conversation, not a dead end.

Language

The task may be in any language. All pipeline prose you produce (rationale, summaries, the requirements document) MUST be in English. Verbatim literals that must ship in another language — UI strings, locale terms — may be quoted («…», "…") without translation.

3. Q&A Generation (subagent)

Delegate to an Explore subagent (read-only codebase access).

  1. Read ${CLAUDE_SKILL_DIR}/prompts/qa-generation.md.
  2. Read ${CLAUDE_SKILL_DIR}/references/qa-schema.json.
  3. Read both few-shot examples:
    • ${CLAUDE_SKILL_DIR}/references/example-qa.json — medium complexity (~9 Qs).
    • ${CLAUDE_SKILL_DIR}/references/example-qa-large.json — large (~36 Qs, with options-heavy questions and second-order follow-ups).
  4. Pick the matching few-shot by rough complexity (subsystem count, whether a migration is involved, breadth of the change). Large/extra-large → example-qa-large.json; small/medium → example-qa.json; unsure → embed both and let the subagent interpolate.
  5. Spawn a Task (agent type Explore, read-only) whose prompt string is:
    • the full prompt from step 1;
    • the schema from step 2 (in the Schema section);
    • the matching example(s) from step 3–4 (label clearly if both);
    • the task title and description;
    • the CLAUDE.md / AGENTS.md / PROJECT_CONTEXT.md content (if loaded);
    • any keyword-matched docs/*.md content and user-supplied material;
    • instruction: "Focus on the 10–20 most relevant files. Do not recursively read entire trees. Under-generating is worse than over-generating — hit the adaptive-count floor."
  6. The subagent returns Q&A JSON matching the schema, including any second_order: true questions.

Expected output: questions scaled to complexity (floors: small=10, medium=20, large=35, extra_large=50, plus add-ons — see qa-generation.md), across 9 categories. Each has id, category, question, codebase_context, confidence, rework_cost, needs_human, and optionally second_order. Architectural-category questions (architecture / data_model / migration / security / integration) with rework_cost ≥ medium MUST use options + recommended_option, not a single proposed_answer. Top level includes exploration_summary, total_files_examined, established_facts (5–15 grounded facts), and complexity_estimate.

On failure: report the failure to the user with what broke, and stop. Do not fabricate Q&A.

4. Critical Evaluation (subagent)

Delegate to a Task subagent on a fast model (pure reasoning/classification — no codebase access needed; the Q&A already carries codebase_context).

  1. Read ${CLAUDE_SKILL_DIR}/prompts/critical-evaluation.md.
  2. Spawn the Task with: the evaluation prompt + the full Q&A JSON from §3 + the task title and description.
  3. It returns structured markdown with three sections: Evaluation Summary (counts), Blocking Questions (grouped, impact-ordered, each with context, options, and a recommended default), and Auto-Resolved Decisions (each with decision + brief reasoning), organized into the three-tier Critical / Recommended / Nice-to-have grouping.

Branch after evaluation:

  • 0 blocking questions → go straight to §5.
  • 1+ blocking questions → resolve them interactively in §4.5 before §5.

On failure: report to the user and stop.

4.5. Resolve Blocking Questions (interactive)

This replaces the autonomous "stop and wait for a ticket comment" flow. When the evaluation surfaces blocking questions, put them to the user directly:

  1. Take the blocking questions in impact order. Present up to 4 at a time via AskUserQuestion. For each, offer the evaluation's Recommended option first, labelled … (Recommended), plus the real alternatives. Keep the real options the user might pick — they can always choose "Other" to type a custom answer.
  2. If there are more than 4 blocking questions, do multiple AskUserQuestion rounds (highest-impact first).
  3. For any question the user defers, skips, or leaves to your judgement: apply the Recommended default and record it as an explicit assumption in the requirements doc's Implementation Notes.
  4. If the user would rather just take all recommended defaults, accept that in one step and note the defaults as assumptions.

Carry the resolved decisions (user answers + auto-resolved + assumed defaults) into §5.

5. Requirements Generation (subagent)

Delegate to a Task subagent (agent type Explore, read-only — it verifies file paths by reading them).

  1. Read ${CLAUDE_SKILL_DIR}/prompts/requirements-template.md.
  2. Read ${CLAUDE_SKILL_DIR}/references/example-requirements.md.
  3. Spawn the Task with: the generation prompt + the example + the task title and description + the auto-resolved decisions from §4 + the user's answers and assumed defaults from §4.5 + CLAUDE.md / PROJECT_CONTEXT.md content + instruction: "Verify all file paths by reading them. Target 10–15 files for verification and context."
  4. It returns an 8-section requirements document:
    1. Overview
    2. Scope (In scope / Out of scope)
    3. Functional Requirements (FR-N format)
    4. Technical Design (verified file paths)
    5. Edge Cases
    6. Acceptance Criteria (Given/When/Then)
    7. Testing Strategy
    8. Implementation Notes (Open Questions / Assumptions)

On failure: report to the user and stop.

6. Output

There is no ticket and no status-code router here — your output is the file you write plus what you tell the user in the terminal.

  1. Write the requirements document to disk. Default path: ./requirements.md in the current working directory. If one already exists, pick a non-clobbering name derived from the task (e.g. ./requirements-<slug>.md) and tell the user both that it existed and where the new one went. If the user named an output path, use it.
  2. Print a concise summary to the terminal:
    • Where you wrote the file.
    • Executive summary: one-line scope; complexity (files to modify / new / migration yes-no); 1–2 key architectural decisions; 1–2 biggest risks.
    • Question counts: N generated | M auto-resolved | K blocking (how resolved) | S second-order.
    • Key decisions (three-tier). Reproduce the Critical / Recommended / Nice-to-have grouping from §4 so the user can sanity-check the calls. Critical tier includes every blocking question (with the resolution) and every rework_cost: high auto-resolved decision — never demote those.
    • Any triage warnings from §2.
    • Next step: "Hand requirements.md to the feature-implementation skill (or your own build flow) to implement it. To change a decision, edit the file or tell me which one to revisit."

Keep the terminal summary skimmable; the full detail lives in the file.

7. Constraints

  • The only file you create or modify is the requirements document (§6). Do not edit source code, configs, or anything else in the repo.
  • Codebase exploration stays focused: 10–20 most relevant files per step.
  • One level of subagents only (orchestrator → subagent, never deeper).
  • If any step fails, report it to the user and stop. Do not emit partial requirements from incomplete data.
  • Everything you surface to the user is in English (see §2 Language).

Keep looking

Skills are one crate of 628,853. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.