# /research-competitors — Competitor Discovery & Intelligence

## Usage
```
/research-competitors                  # Discover + deep-research all (default)
/research-competitors discover         # Only discover new competitors
/research-competitors refresh          # Re-research all existing competitors
/research-competitors "CompetitorName" # Deep-dive on a single competitor
```

## Input
- `$ARGUMENTS` — optional: "discover", "refresh", or a competitor name

## Process

### Step 1: Load Context
1. Read `data/business-context.json` — extract `product.name`, `product.summary`, and `competitors[]`
2. Read `data/competitors.json` — check existing competitor profiles
3. Determine mode from `$ARGUMENTS`:
   - Empty or no args → full discovery + research
   - `"discover"` → discovery only, skip deep research
   - `"refresh"` → re-research all existing competitors
   - Any other string → treat as competitor name for single deep-dive

### Step 2: Discovery Phase
**Skip if mode is "refresh" or single competitor.**

Use WebSearch to discover competitors. Run these searches:
1. `"[product category] competitors [year]"` — e.g., "legal tech platform competitors 2026"
2. `"[product category] alternatives"` — e.g., "legal tech platform alternatives"
3. `"best [product category] tools"` — e.g., "best legal tech tools"
4. Product-specific queries based on `product.summary` — e.g., "AI lawyer tools brazil", "legal tech SaaS"

From search results, identify 5-10 relevant competitors. For each, extract:
- Company name
- URL
- Brief description of what they do

Merge with any competitors already listed in `business-context.json` or `competitors.json`.

### Step 3: Deep Research Phase
For each competitor (or just the specified one in single mode):

1. **WebFetch** their homepage → extract:
   - Headline / tagline
   - Value proposition
   - CTA texts
   - Social proof (testimonials, logos, stats)
   - Target audience signals

2. **WebSearch** for:
   - `"[competitor name] pricing"` → pricing tiers, free tier
   - `"[competitor name] reviews"` → strengths/weaknesses from users
   - `"[competitor name] vs"` → how they position against alternatives

3. **Analyze** and structure:
   - Positioning: tagline, value proposition, target audience, differentiators
   - Copy: homepage headline, CTAs, social proof, objection handling
   - Growth: channels used (SEO, paid, content, social), content types
   - Product: key features, pricing tiers, free tier details
   - SWOT: strengths, weaknesses, opportunities for us

### Step 4: Comparative Analysis
After researching all competitors:
1. Build a strengths/weaknesses comparison matrix
2. Identify positioning gaps — where is no competitor strong?
3. Identify underserved audience segments
4. Note opportunities for differentiation

### Step 5: Write Output
Write structured profiles to `data/competitors.json`. Use this schema:
```json
{
  "last_updated": "YYYY-MM-DD",
  "competitors": [
    {
      "id": "comp-001",
      "name": "CompetitorX",
      "url": "https://competitorx.com",
      "last_researched": "YYYY-MM-DD",
      "positioning": {
        "tagline": "...",
        "value_proposition": "...",
        "target_audience": "...",
        "differentiators": ["..."]
      },
      "copy": {
        "homepage_headline": "...",
        "cta_texts": ["..."],
        "social_proof": ["..."],
        "objection_handling": ["..."]
      },
      "growth": {
        "channels": ["seo", "paid_search", "content"],
        "content_types": ["blog", "ebook"],
        "seo_keywords": ["..."]
      },
      "product": {
        "features": ["..."],
        "pricing_tiers": [{ "name": "...", "price": "...", "features": ["..."] }],
        "free_tier": "..."
      },
      "strengths": ["..."],
      "weaknesses": ["..."],
      "opportunities_for_us": ["..."]
    }
  ]
}
```

**Merge rules:**
- If a competitor already exists (match by name, case-insensitive), UPDATE their profile but preserve any manually added notes
- Generate sequential IDs: `comp-001`, `comp-002`, etc.
- Set `last_researched` to today's date

### Step 6: Print Summary
Print a competitive landscape summary:
- Number of competitors discovered/updated
- Key findings: who's strongest, where the gaps are
- Top 3 opportunities for differentiation
- Recommendation for next step (usually: run `/positioning`)

## Output Files
- `data/competitors.json` — structured competitor profiles
