feature-research
Researches features with seven specialists and consolidates a feature spec. Use when investigating APIs, assessing feature risks, or researching UX before planning.
SKILL.mdycc/skills/feature-research/SKILL.md
GitHubFeature Research
Deep research skill for application features. Goes beyond codebase analysis to research external APIs, business logic, technical specifications, UX considerations, and generate actionable recommendations. Dispatches 7 researchers in parallel — standalone sub-agents by default, or an agent team with --team (Claude Code only) where teammates share findings with each other.
Operational context: Dispatch api-researcher, business-analyzer, tech-designer, ux-researcher, security-researcher, practices-researcher, and recommendations-agent; write seven research-*.md files plus feature-spec.md at paths resolved through the artifact store, never docs/prps/. Linear mode (default) uses .ycc/artifacts/[feature-name]/; local mode keeps docs/plans/[feature-name]/. Use /ycc:prp-spec for lightweight single-pass PRP specs.
Workflow Integration
feature-research --> plan-workflow --> implement-plan
(this skill) (Step 2) (Step 3)
Creates: Uses: Executes:
feature-spec.md feature-spec.md parallel-plan.md
Key Distinctions — This skill vs. other planning/research skills:
| Skill | Agents | Output Dir | Output Files | Use When |
|---|---|---|---|---|
feature-research (THIS) |
7 parallel agents | Resolved feature dir | 7 research-*.md + feature-spec.md |
Deep multi-agent research before plan-workflow |
shared-context |
Agent team | Resolved feature dir | shared.md |
Codebase-focused context for parallel-plan |
prp-spec |
Single pass (optional researcher) | docs/prps/specs/ |
{name}.spec.md |
Lightweight spec for PRP workflow |
prp-prd |
Interactive + researcher | docs/prps/prds/ |
{name}.prd.md |
Full PRD with hypothesis-driven questioning |
prp-plan |
Single pass + researcher | docs/prps/plans/ |
{name}.plan.md |
Implementation plan from PRD or description |
This skill ALWAYS:
- Deploys all 7 researchers in parallel (never skips agents)
- Creates 7
research-*.mdfiles + 1feature-spec.md - Outputs only to the artifact-store feature directory (
docs/plans/[feature-name]/in local mode) - Uses
research-<lens>paths, including the linearresearch/subdirectory - Dispatches via sub-agents by default; via an agent team only when
--teamis passed
This skill NEVER:
- Writes to
docs/prps/(that is the PRP workflow directory) - Generates a single-file spec without the research pipeline
- Skips the multi-agent research pipeline to produce output directly
- Acts as a lightweight spec generator
Arguments
Target: $ARGUMENTS
Parse arguments (flags first, then the feature name):
- --team: Optional. (Claude Code only) Deploy the 7 researchers as teammates under the implicit session team with
TaskListand coordinated shutdown. Default is standalone parallel sub-agents via theAgenttool. Cursor and Codex bundles lack team tools — do not pass--teamthere. - --description "...": Brief description of the feature (guides research agents)
- --dry-run: Show execution plan without running. With
--team, also prints the team name and 7-teammate roster. - feature-name: Required. Feature slug passed to the artifact-store resolver
- --store=local|linear: Optional artifact-store override. Forward it to every helper call. Linear is the default;
localopts out.
If no feature name provided, abort with usage instructions:
Usage: /feature-research [--team] [--description "..."] [--dry-run] [--store=local|linear] [feature-name]
Examples:
/feature-research plex-integration --description "Advanced Plex media library integration with filters and playlists"
/feature-research payment-system --description "Stripe payment integration for subscriptions"
/feature-research user-dashboard --dry-run
/feature-research --team plex-integration --description "Advanced Plex media library integration with filters and playlists"
/feature-research --team --dry-run payment-system
Questions: class choose-path (regenerate or enhance an existing spec); headless (no question tool or chat turn): enhance. See ${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/question-policy.md.
Phase 0: Initialize
Step 1: Parse Arguments
Extract from $ARGUMENTS:
- --team: Boolean flag. Set
AGENT_TEAM_MODE=trueif present, elsefalse. - --description: Quoted string after flag (optional but recommended)
- --dry-run: Boolean flag. Set
DRY_RUN=trueif present, elsefalse. - feature-name: First non-flag argument (required)
- --store=local|linear: Parse and strip before selecting feature-name. Retain the exact override as
STORE_FLAG(empty if absent), reject invalid/conflicting overrides, and pass it to every helper call and validator.
Validate the feature name: must be kebab-case, no special characters except hyphens.
Compatibility note: When this skill is invoked from a Cursor or Codex bundle, --team must not be used (those bundles ship without team tools).
Team opt-in note: If --team is passed and CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is not set to 1 in the environment, abort with: --team requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Use --parallel instead, or set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in your Claude Code settings if you intentionally want agent-team dispatch.
Step 2: Resolve Artifact Paths and Create Directories
CRITICAL: Write only to paths returned by the artifact-store resolver — NEVER to docs/prps/ or another directory, regardless of the current working directory. Linear mode (default) resolves under .ycc/artifacts/[feature-name]/; local mode preserves docs/plans/[feature-name]/.
Print the mode and read
ARTIFACT_STORE=from stdout; resolve paths without writes:bash "${CLAUDE_PLUGIN_ROOT}/skills/_shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --shell feature_dir="$(bash "${CLAUDE_PLUGIN_ROOT}/skills/_shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --kind=feature-dir --slug="[feature-name]")" research_dir="$(bash "${CLAUDE_PLUGIN_ROOT}/skills/_shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --kind=research-dir --slug="[feature-name]")" spec_file="$(bash "${CLAUDE_PLUGIN_ROOT}/skills/_shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --kind=feature-spec --slug="[feature-name]")"For a non-dry linear run only, apply the Linear call gate from
${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/artifact-store.mdbefore any write or pull.Once writing is permitted, establish the safe cache and gitignore rule before Lookup/Load:
feature_dir="$(bash "${CLAUDE_PLUGIN_ROOT}/skills/_shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --ensure --kind=feature-dir --slug="[feature-name]")" mkdir -p "$feature_dir" "$research_dir"
Dry runs only resolve paths, never ensure or Load. In local mode research_dir equals feature_dir. In a real linear run, populate missing inputs via Lookup/Load before checking research. For every research/spec document to be written, if linear.document identity is missing, follow artifact-store.md Planning skills Lookup steps 3–6 and Load any hit before dispatch/writing; preserve identity and use Conflict for replacement, then Save. Retain the printed mode and absolute paths across tool calls.
Step 3: Check Existing Research
List any existing files. If ${spec_file} exists, read it and ask user if they want to regenerate or enhance.
Step 4: Handle Dry Run
If --dry-run is present:
Display:
# Dry Run: Feature Research for [feature-name]
## Research Pipeline
Dispatch Mode: [standalone sub-agents | agent team]
Researchers: 7 (api-researcher, business-analyzer, tech-designer, ux-researcher, security-researcher, practices-researcher, recommendations-agent)
1. api-researcher - External APIs, libraries, integration patterns
2. business-analyzer - Requirements, user stories, business rules
3. tech-designer - Architecture, data models, API design
4. ux-researcher - User experience, workflows, best practices
5. security-researcher - Security analysis, dependency risks, secure coding (severity-leveled)
6. practices-researcher - Modularity, code reuse, KISS, engineering best practices
7. recommendations-agent - Ideas, improvements, risks
## Files That Would Be Created
- ${research_dir}/research-external.md
- ${research_dir}/research-business.md
- ${research_dir}/research-technical.md
- ${research_dir}/research-ux.md
- ${research_dir}/research-security.md
- ${research_dir}/research-practices.md
- ${research_dir}/research-recommendations.md
- ${spec_file}
## Execution Model
- Default (`AGENT_TEAM_MODE=false`): deploy 7 researchers as standalone sub-agents in a single message with multiple `Agent` calls. No team coordination; each sub-agent writes its assigned `research-*.md`. Orchestrator validates and synthesizes `feature-spec.md`.
- With `--team` (`AGENT_TEAM_MODE=true`): use the implicit session team (run label `fr-[sanitized-feature-name]`), register 7 tasks, spawn 7 teammates with shared task state and inter-teammate `SendMessage`, then shut down all teammates via `SendMessage` before synthesis.
If AGENT_TEAM_MODE=true, additionally print the team roster block:
Team name: fr-<sanitized-feature-name>
Teammates: 7
- api-researcher subagent_type=research-specialist task=External APIs, libraries, integration patterns
- business-analyzer subagent_type=codebase-research-analyst task=Requirements, user stories, business rules
- tech-designer subagent_type=codebase-research-analyst task=Architecture, data models, API design
- ux-researcher subagent_type=research-specialist task=User experience, workflows, accessibility
- security-researcher subagent_type=research-specialist task=Security analysis, dependency risks, secure coding
- practices-researcher subagent_type=codebase-research-analyst task=Modularity, code reuse, KISS, engineering best practices
- recommendations-agent subagent_type=codebase-research-analyst task=Ideas, improvements, risks
Do not call TaskCreate, Agent, or SendMessage in dry-run mode.
STOP without creating files or deploying agents.
Phase 1: Research Pipeline
Step 5: Team Setup (if --team)
If AGENT_TEAM_MODE=false, skip this step entirely — the default path dispatches standalone sub-agents in Step 8.
If AGENT_TEAM_MODE=true, follow the universal lifecycle contract at
${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/agent-team-dispatch.md.
Team name sanitization — apply the rules from the shared reference:
- Lowercase the feature name.
- Replace any character matching
[^a-z0-9-]with-. - Collapse runs of
-to a single-. - Trim leading/trailing
-. - Truncate the sanitized context to 20 chars max.
- If empty, fall back to
untitled.
Team name: fr-<sanitized-feature-name>.
Use the implicit session team: with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1,
no setup call is needed. fr-<sanitized-feature-name> is a display-only run label.
Spawn teammates via Agent with each member's name; omit team_name (ignored).
If the experimental flag is absent, abort the skill with guidance to use --parallel.
Do NOT silently fall back to sub-agent mode.
Step 6: Create Research Tasks (if --team)
If AGENT_TEAM_MODE=false, skip this step entirely — standalone Agent dispatch does not use the shared task list.
If AGENT_TEAM_MODE=true, register all 7 tasks up front (flat — all 7 run in a single batch, no blockedBy):
- "Research external APIs for [feature-name]" — APIs, libraries, integration patterns
- "Analyze business logic for [feature-name]" — Requirements, user stories, business rules
- "Design technical specs for [feature-name]" — Architecture, data models, API design
- "Research UX patterns for [feature-name]" — User experience, workflows, accessibility
- "Evaluate security for [feature-name]" — Security implications, dependency risks, secure coding
- "Evaluate engineering practices for [feature-name]" — Modularity, code reuse, KISS, testability
- "Generate recommendations for [feature-name]" — Ideas, improvements, risks
If TaskCreate fails for any task, shut down any spawned teammates via SendMessage and abort.
Step 7: Read Research Prompts
Read the research prompts template:
cat ${CLAUDE_PLUGIN_ROOT}/skills/feature-research/templates/research-agents.md
Step 8: Deploy the 7 Researchers
Name / Teammate name |
Subagent Type | Output File | Model | Focus |
|---|---|---|---|---|
api-researcher |
research-specialist |
research-external.md |
sonnet | External APIs, libraries, documentation, integration patterns |
business-analyzer |
codebase-research-analyst |
research-business.md |
sonnet | Requirements, user stories, business rules, domain logic |
tech-designer |
codebase-research-analyst |
research-technical.md |
Default | Architecture, data models, API design, system constraints |
ux-researcher |
research-specialist |
research-ux.md |
sonnet | User experience, workflows, best practices, accessibility |
security-researcher |
research-specialist |
research-security.md |
sonnet | Security analysis, dependency risks, secure coding (severity-leveled) |
practices-researcher |
codebase-research-analyst |
research-practices.md |
sonnet | Modularity, code reuse, KISS, engineering best practices |
recommendations-agent |
codebase-research-analyst |
research-recommendations.md |
Default | Ideas, improvements, related features, risks |
Model Assignment: Pass the model parameter when spawning each researcher. Use model: "sonnet" for api-researcher, business-analyzer, ux-researcher, security-researcher, practices-researcher. Omit model (inherit default) for tech-designer and recommendations-agent.
Use the prompts from research-agents.md with variables substituted:
{{FEATURE_NAME}}- The feature directory name{{FEATURE_DIR}}- Resolved feature directory (${feature_dir}){{RESEARCH_<LENS>_FILE}}- Absolute path from the executed resolver with kindresearch-<lens>and the same store override; in local mode these are${feature_dir}/research-<lens>.md, in linear mode${feature_dir}/research/research-<lens>.md{{FEATURE_DESCRIPTION}}- The description provided (or feature name if none)
Path A — Standalone sub-agents (AGENT_TEAM_MODE=false, default)
CRITICAL: Deploy all 7 researchers in a SINGLE message with MULTIPLE Agent tool calls. No name — standalone dispatch. Each Agent call uses the subagent_type and model from the table above and the corresponding prompt from research-agents.md.
In this mode there is no shared task list; rely on each Agent's return value plus the artifact check in Step 10 to confirm completion. Inter-teammate SendMessage coordination (Step 9) is not available — each sub-agent works independently from the prompt alone.
Path B — Agent team (AGENT_TEAM_MODE=true)
MANDATORY — AGENT TEAMS REQUIRED
In Path B you MUST follow the agent-team lifecycle at
${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/agent-team-dispatch.md. Do NOT mix standaloneAgentcalls with team dispatch.
All 7 TaskCreate entries were registered up front in Step 6 — do not re-create them here.
Spawn all 7 teammates in ONE message with SEVEN Agent tool calls. Every call MUST include:
name = "<teammate-name>"(from the table above — must match theTaskCreatesubject prefix)subagent_typeandmodelfrom the table above- The researcher-specific prompt from
research-agents.md
After spawning, use TaskList to confirm all 7 tasks are completed before proceeding to Step 10. Do not rely on agent return values alone — check the shared task state.
Step 9: Monitor Research Progress
Wait for all 7 researchers to complete their work.
Path A (standalone, default): rely on
Agentreturn values; each sub-agent writes itsresearch-*.mdartifact before returning.Path B (
--team): useTaskListto check progress. Teammates will share findings with each other viaSendMessage:api-researchertellstech-designerabout discovered API endpoints and auth patternsapi-researchertellssecurity-researcherabout dependency versions and auth methodsapi-researchertellspractices-researcherabout discovered libraries for build-vs-depend analysistech-designertellsbusiness-analyzerabout data model constraintstech-designertellssecurity-researcherabout proposed architecture for reviewtech-designertellspractices-researcherabout proposed component structure for modularity reviewux-researchertellsbusiness-analyzerabout user workflow requirementssecurity-researchertellstech-designerabout security constraints (with severity levels)security-researchertellsrecommendations-agentabout full risk summary by severitypractices-researchertellstech-designerabout reusable code discoveries and simplification opportunitiespractices-researchertellsrecommendations-agentabout modularity and reuse findingsrecommendations-agentsynthesizes insights from all teammates including security and practices findings
If a teammate gets stuck, send them guidance via
SendMessage.
Failure policy for Path B (mirrors deep-research):
- Single teammate failure: record the gap in the corresponding
research-*.md(stub note) and continue — downstream synthesis will adapt. - Majority failure (≥4 of 7 failed):
SendMessage(shutdown)to any still-active teammates, shut down all active teammates viaSendMessage, and abort with "retry without--team(standalone sub-agent fallback)". - Mid-run user abort:
SendMessage(shutdown)to every active teammate, then confirm all teammates have shut down. Never exit with teammates still live.
Phase 2: Consolidate Research
Step 10: Validate Research Artifacts
After all 7 teammates complete, validate all research-*.md files:
${CLAUDE_PLUGIN_ROOT}/skills/feature-research/scripts/validate-research.sh "${feature_dir}" ${STORE_FLAG}
If validation fails: message the relevant teammate to fix their output, wait for correction, rerun validation until pass.
In linear mode, after validation and fixes, follow artifact-store.md section Planning skills to Save each of the seven research-<lens> documents.
Step 11: Shut Down Research Teammates (if --team)
If AGENT_TEAM_MODE=false, skip this step — standalone sub-agents return on their own.
Otherwise, send shutdown requests to all 7 teammates:
SendMessage(to="api-researcher", message={type:"shutdown_request"})
SendMessage(to="business-analyzer", message={type:"shutdown_request"})
SendMessage(to="tech-designer", message={type:"shutdown_request"})
SendMessage(to="ux-researcher", message={type:"shutdown_request"})
SendMessage(to="security-researcher", message={type:"shutdown_request"})
SendMessage(to="practices-researcher", message={type:"shutdown_request"})
SendMessage(to="recommendations-agent", message={type:"shutdown_request"})
Do NOT shut down teammates yet — that runs in Step 16 after spec validation.
Step 12: Read Research Results
Read all 7 research files from ${research_dir}/.
Step 13: Read Spec Template
cat ${CLAUDE_PLUGIN_ROOT}/skills/feature-research/templates/spec-structure.md
Step 14: Generate feature-spec.md
Create ${spec_file} following the template. In linear mode use ./research/research-<lens>.md research links; in local mode use ./research-<lens>.md. When replacing an existing spec, preserve its identity frontmatter in linear mode and replace only the body; local mode writes the body without frontmatter.
Key Consolidation Principles:
- Organize by section, not by agent - Synthesize related findings
- Be information-dense - Every sentence should add value
- Include actionable details - Links, code examples, specific APIs
- Highlight decisions needed - Call out areas requiring user input
- Preserve source references - Link to original research files for details
- Surface security findings by severity - CRITICAL items must appear in Risk Assessment; WARNING items in relevant technical sections; ADVISORY items in Recommendations
Phase 3: Validate and Complete
Step 15: Validate Spec
Run after Step 14 creates feature-spec.md:
${CLAUDE_PLUGIN_ROOT}/skills/feature-research/scripts/validate-spec.sh "${spec_file}" ${STORE_FLAG}
Fix any issues reported (missing sections, empty content, formatting).
In linear mode, follow artifact-store.md section Planning skills to Save the validated feature-spec document. Local mode writes no identity frontmatter and makes no Linear calls.
Step 16: Clean Up Team (if --team)
If AGENT_TEAM_MODE=false, skip this step — there is no team to tear down.
Otherwise, confirm all 7 teammates have received shutdown requests and stopped.
Step 17: Display Summary
Provide completion summary with: feature name, description, dispatch mode (standalone sub-agents or agent team fr-<sanitized>), files created, research summary counts, key findings, decisions needed, and next steps (review spec, proceed to /plan-workflow, or add requirements).
Quality Standards
feature-spec.md Quality Checklist
- Executive summary is information-dense (3-5 sentences)
- External dependencies include documentation links
- Business requirements are specific and testable
- Technical specs include data models/schemas
- UX considerations address error states
- Recommendations are actionable
- Task breakdown preview is realistic
Research Quality Checklist
Each research file should: focus on its specific domain, include concrete examples and links, identify gaps and uncertainties, provide actionable recommendations, and avoid duplication with other research files.
Anti-patterns — Do NOT Do These
Do NOT skip the multi-agent pipeline: Never generate
feature-spec.mddirectly without first deploying all 7 researchers (standalone sub-agents or teammates, depending on--team) and collecting theirresearch-*.mdfiles. The spec is a synthesis of research, not a standalone generation. If about to writefeature-spec.mdwithout the 7 research files already on disk, STOP — the pipeline is off-rails.Do NOT output to
docs/prps/: Write only to the resolved feature directory (docs/plans/[feature-name]/in local mode,.ycc/artifacts/[feature-name]/in linear mode). Thedocs/prps/tree belongs to the PRP workflow (prp-prd,prp-spec,prp-plan,prp-implement). Even if the user's working directory isdocs/prps/or any subdirectory, always use the resolver-selected output path.Do NOT generate a single file: The minimum correct output is 8 files (7 research + 1 spec). If about to write only one file, STOP — the user likely wants the lightweight PRP spec skill. Redirect them to
/ycc:prp-spec.Do NOT conflate with PRP spec generation: If the user wants a lightweight single-pass spec without the 7-researcher pipeline, they want
/ycc:prp-spec, not this skill. This skill is the heavyweight multi-agent research track regardless of dispatch mode.
Important Notes
- You are the research orchestrator — coordinate the 7 researchers and synthesize the spec
- Choose dispatch mode from
$ARGUMENTS— default is standalone sub-agents viaAgent;--teamswitches to teammates under the implicit session team withTaskList - Team setup first (Path B only) — register all 7 tasks before spawning teammates
- Spawn in parallel — a single message with 7
Agentcalls (Path A) or 7Agentcalls withname=(Path B) - Teammates share findings (Path B only) — inter-teammate
SendMessagecoordination is unavailable to standalone sub-agents - Single-owner research files — each researcher writes only its assigned artifact
- Gate synthesis with validation — do not generate
feature-spec.mdbefore validator pass - Use web search — external APIs require current documentation
- Be thorough but focused — quality over quantity
- Enable plan-workflow — this spec is the foundation for implementation planning
- Preserve uncertainty — mark areas needing clarification rather than guessing
- Clean up team (Path B only) — always shut down teammates before completing when team mode was used