Skip to content
Product
Command

/pm-setup

Initialize product context files for PM agents

BOOST
From plugin
slgoodrich-agents
1414 skills15 agents4 commands
Install
> /plugin marketplace add slgoodrich/agents

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/pm-setup

Context preview

What this command does when you run it.

Initialize product context files for PM agents

Command definition

pm-setup.md
description: "Initialize product context files for PM agents"
argument-hint: "[--update]"
allowed-tools: Read, Glob, Grep, Write, Task, AskUserQuestion
disable-model-invocation: true

PM Context Setup

Quick setup wizard to initialize `.claude/product-context/` with essential product information. Takes 5-10 minutes and enables all PM agents, commands, and workflows to work with your product context.

Usage

/ai-pm-copilot:pm-setup

Or update existing context:

/ai-pm-copilot:pm-setup --update

---

Overview

This command sets up the foundational context that powers the entire PM Toolkit. Instead of asking for everything upfront, **we create the essentials now and let the journey build additional context progressively**.

**What it does:**

  • Creates `.claude/product-context/` directory
  • Guides you through 2 required files (product basics, tech stack)
  • Offers optional files if applicable (goals, metrics, team)
  • Explains how agents will create additional context as you progress

**What you get:**

  • Context reused across 1 orchestrator + 7 specialists
  • Agents work with YOUR product specifics
  • No repeated questions across tools
  • Progressive context building through your journey

---

Mode

Arguments: $ARGUMENTS

If arguments contain `--update`, run in update mode. Otherwise run initial setup.

---

Instructions

Introduction

Display introduction message:

╔═══════════════════════════════════════════════════════════╗
║   Product Management Context Setup                        ║
╔═══════════════════════════════════════════════════════════╝

Quick setup to get your PM agents working with your product context.

**How it works:**
We'll create the essential INPUT files now (5-10 minutes). As you progress
through your product journey, agents will create additional context files:

- Stage 1 (Validation) → competitive-landscape.md
- Stage 2 (Understanding) → customer-segments.md
- Stage 5 (Planning) → current-roadmap.md

Your context grows as your product develops!

**What we'll create now:**

Required:
1. product-info.md - Product basics (name, description, stage, market, value prop)
2. tech-stack.md - Tech stack, architecture, constraints

Optional (if applicable):
3. strategic-goals.md - Vision, goals, priorities (we can help with product-strategist)
4. business-metrics.md - Current metrics (only if post-launch)
5. team-info.md - Team size, velocity (only if team > 1)

Ready to begin? (yes/no)

If user says "no", exit. If "yes", continue.

---

Step 0: Check Existing Context

Check if `.claude/product-context/` directory exists:

ls .claude/product-context/ 2>/dev/null

**If directory exists** with files:

I found existing context files:
✓ product-info.md
✓ tech-stack.md
✓ competitive-landscape.md (created by market-analyst in Stage 1)
❌ strategic-goals.md (missing)
...

Would you like to:
1. Update existing files
2. Start fresh (overwrite all)
3. Cancel

Your choice (1/2/3):

**If directory doesn't exist:**

mkdir -p .claude/product-context
Creating .claude/product-context/ directory...
✓ Directory created

---

Step 0.5: Detect Codebase (NEW)

Before asking manual questions, check if we can auto-discover context from an existing codebase.

**Check for codebase indicators:**

# Check for common source directories and manifests
ls src/ pages/ routes/ api/ app/ package.json requirements.txt go.mod Gemfile composer.json 2>/dev/null

**Codebase detected if any of these exist:**

  • Source directories: `src/`, `pages/`, `routes/`, `api/`, `app/`, `lib/`
  • Package manifests: `package.json`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Gemfile`, `composer.json`, `Cargo.toml`

**If codebase detected:**

  • Proceed to Step 0.6 (Optional Codebase Scanning)

**If NOT detected:**

  • Skip scanning
  • Proceed to Step 1 (Product Information - manual entry)
  • Display: "No existing codebase detected. Let's set up your context manually."

---

Step 0.6: Optional Codebase Scanning (NEW)

**If codebase was detected in Step 0.5:**

Display scanning offer:

═══════════════════════════════════════════════════════════
Codebase Detected!
═══════════════════════════════════════════════════════════

I've detected an existing codebase in this project.

I can scan your codebase to automatically discover:
- Features (from routes, pages, API endpoints)
- Tech stack (from package.json, requirements.txt, etc.)
- Integrations (from 3rd party packages)
- Project scale (files, lines of code, complexity)

This takes about 30-60 seconds and saves you 10-15 minutes of manual entry.

**What gets scanned:**
- File structure and routes
- Package manifests (package.json, requirements.txt, etc.)
- Tech dependencies
- Project size indicators

**What does NOT get scanned:**
- Code quality or architecture
- Performance or security issues
- Your code implementation details

All findings will be presented for your validation before saving.

Scan codebase now? (yes/no)

If User Says YES (Accept Scanning)

**Step 1: Invoke context-scanner**

Use Task tool to invoke context-scanner agent:

subagent_type: "ai-pm-copilot:context-scanner"
description: "Scan codebase for strategic context"
prompt: "Scan the current codebase and return structured discovery of features, tech stack, integrations, and scale. Include evidence and confidence scores for all findings."

**Step 2: Receive and Parse JSON**

context-scanner returns JSON with:

  • features (array of discoveries with evidence)
  • tech_stack (frontend, backend, database, infrastructure)
  • integrations (3rd party services)
  • scale (files, LOC, complexity, maturity)
  • confidence_notes (explanations)
  • scan_limitations (what couldn't be scanned)

**Step 3: Present Findings to User**

Display findings in readable format:

═══════════════════════════════════════════════════════════
Scan Complete! Here's what I discovered:
════════════════════════════
Read more
Ships withslgoodrich-agents

Answer product management's hardest questions in minutes, not days Expert product management guidance powered by frameworks from Teresa Torres, Marty Cagan, April Dunford, and more - without hiring a product manager. Right feature. Right users. Right time.

Get the whole plugin

Other commands on slgoodrich-agents.