Skip to content
Development
Command

/data-driven-feature

Build features guided by data insights, A/B testing, and continuous measurement

From plugin
wshobson-agents
39k95 skills139 agents95 commands
Install
$ npx -y skills add wshobson/agents --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/data-driven-feature

Context preview

What this command does when you run it.

Build features guided by data insights, A/B testing, and continuous measurement

Command definition

data-driven-feature.md
description: "Build features guided by data insights, A/B testing, and continuous measurement"
argument-hint: "<feature description> [--experiment-type ab|multivariate|bandit] [--confidence 0.90|0.95|0.99]"

Data-Driven Feature Development Orchestrator

CRITICAL BEHAVIORAL RULES

You MUST follow these rules exactly. Violating any of them is a failure.

1. **Execute steps in order.** Do NOT skip ahead, reorder, or merge steps. 2. **Write output files.** Each step MUST produce its output file in `.data-driven-feature/` before the next step begins. Read from prior step files — do NOT rely on context window memory. 3. **Stop at checkpoints.** When you reach a `PHASE CHECKPOINT`, you MUST stop and wait for explicit user approval before continuing. Use the AskUserQuestion tool with clear options. 4. **Halt on failure.** If any step fails (agent error, test failure, missing dependency), STOP immediately. Present the error and ask the user how to proceed. Do NOT silently continue. 5. **Use only local agents.** All `subagent_type` references use agents bundled with this plugin or `general-purpose`. No cross-plugin dependencies. 6. **Never enter plan mode autonomously.** Do NOT use EnterPlanMode. This command IS the plan — execute it.

Pre-flight Checks

Before starting, perform these checks:

1. Check for existing session

Check if `.data-driven-feature/state.json` exists:

  • If it exists and `status` is `"in_progress"`: Read it, display the current step, and ask the user:
  Found an in-progress data-driven feature session:
  Feature: [name from state]
  Current step: [step from state]

  1. Resume from where we left off
  2. Start fresh (archives existing session)
  • If it exists and `status` is `"complete"`: Ask whether to archive and start fresh.

2. Initialize state

Create `.data-driven-feature/` directory and `state.json`:

{
  "feature": "$ARGUMENTS",
  "status": "in_progress",
  "experiment_type": "ab",
  "confidence_level": 0.95,
  "current_step": 1,
  "current_phase": 1,
  "completed_steps": [],
  "files_created": [],
  "started_at": "ISO_TIMESTAMP",
  "last_updated": "ISO_TIMESTAMP"
}

Parse `$ARGUMENTS` for `--experiment-type` and `--confidence` flags. Use defaults if not specified.

3. Parse feature description

Extract the feature description from `$ARGUMENTS` (everything before the flags). This is referenced as `$FEATURE` in prompts below.

---

Phase 1: Data Analysis & Hypothesis (Steps 1–3) — Interactive

Step 1: Exploratory Data Analysis

Use the Task tool:

Task:
  subagent_type: "general-purpose"
  description: "Perform exploratory data analysis for $FEATURE"
  prompt: |
    You are a data scientist specializing in product analytics. Perform exploratory data analysis for feature: $FEATURE.

    ## Instructions
    1. Analyze existing user behavior data, identify patterns and opportunities
    2. Segment users by behavior and engagement patterns
    3. Calculate baseline metrics for key indicators
    4. Use modern analytics tools (Amplitude, Mixpanel, Segment) to understand current user journeys, conversion funnels, and engagement patterns
    5. Identify data quality issues or gaps that need addressing

    Provide an EDA report with user segments, behavioral patterns, and baseline metrics.

Save the agent's output to `.data-driven-feature/01-eda-report.md`.

Update `state.json`: set `current_step` to 2, add `"01-eda-report.md"` to `files_created`, add step 1 to `completed_steps`.

Step 2: Business Hypothesis Development

Read `.data-driven-feature/01-eda-report.md` to load EDA context.

Use the Task tool:

Task:
  subagent_type: "general-purpose"
  description: "Formulate business hypotheses for $FEATURE"
  prompt: |
    You are a business analyst specializing in data-driven product development. Formulate business hypotheses for feature: $FEATURE based on the data analysis below.

    ## EDA Findings
    [Insert full contents of .data-driven-feature/01-eda-report.md]

    ## Instructions
    1. Define clear success metrics and expected impact on key business KPIs
    2. Identify target user segments and minimum detectable effects
    3. Create measurable hypotheses using ICE or RICE prioritization frameworks
    4. Calculate expected ROI and business value

    Provide a hypothesis document with success metrics definition and expected ROI calculations.

Save the agent's output to `.data-driven-feature/02-hypotheses.md`.

Update `state.json`: set `current_step` to 3, add step 2 to `completed_steps`.

Step 3: Statistical Experiment Design

Read `.data-driven-feature/02-hypotheses.md` to load hypothesis context.

Use the Task tool:

Task:
  subagent_type: "general-purpose"
  description: "Design statistical experiment for $FEATURE"
  prompt: |
    You are a data scientist specializing in experimentation and statistical analysis. Design the statistical experiment for feature: $FEATURE.

    ## Business Hypotheses
    [Insert full contents of .data-driven-feature/02-hypotheses.md]

    ## Experiment Type: [from state.json]
    ## Confidence Level: [from state.json]

    ## Instructions
    1. Calculate required sample size for statistical power
    2. Define control and treatment groups with randomization strategy
    3. Plan for multiple testing corrections if needed
    4. Consider Bayesian A/B testing approaches for faster decision making
    5. Design for both primary and guardrail metrics
    6. Specify experiment runtime and stopping rules

    Provide an experiment design document with power analysis and statistical test plan.

Save the agent's output to `.data-driven-feature/03-experiment-design.md`.

Update `state.json`: set `current_step` to "checkpoint-1", add step 3 to `completed_steps`.

---

PHASE CHECKPOINT 1 — User Approval Required

You MUST stop here and present the analysis and experiment design for review.

Display a summary of the hypotheses from `.data-driven-featu

Read more
Ships withwshobson-agents

Production-ready agentic workflow building blocks: 94 plugins, 203 agents, 175 skills, 109 commands — built for Claude Code and consumed natively by OpenAI Codex CLI, Cursor, OpenCode, Gemini CLI, and GitHub Copilot from a single Markdown source.

Get the whole plugin, auto-invoked
Stats
38,612
Stars
7
Views
4,119
Forks
Active
Maintenance
Python
Language
MIT
License
3d ago
Last commit
1y ago
Created

Repo: wshobson/agents