Product Type Detector
Purpose: Automatically identifies the product type(s) from user requirements to trigger appropriate domain-specific architecture depth sections.
When to Use: Internally by architecture-methodology skill during blueprint generation. Never invoke directly.
Product Type Detection Rules
Analyze the user's requirements and detect ALL applicable product types. A single product can match multiple types.
1. Real-time Collaboration
Triggers:
- Keywords: "real-time", "live updates", "chat", "messaging", "presence", "collaboration", "whiteboard", "cursor sharing", "co-editing", "multiplayer"
- Features: WebSockets, Server-Sent Events, presence indicators, typing indicators, read receipts
- Examples: Slack clone, Figma clone, Google Docs alternative, team chat, collaborative whiteboard
Detection Logic:
IF (mentions "real-time" OR "live" OR "chat" OR "messaging" OR "collaboration")
AND (mentions "users see updates immediately" OR "WebSocket" OR "presence" OR "typing indicator")
THEN product_type.includes("real-time-collaboration")
Depth Sections to Add:
- Message Delivery Model (ordering, offline delivery, fanout)
- Presence & Typing Indicators (WebSocket heartbeats, last seen)
- Read Receipts & Message Status (delivery confirmation)
- Conflict Resolution (for collaborative editing)
2. Multi-tenant B2B SaaS
Triggers:
- Keywords: "multi-tenant", "workspace", "organization", "account", "B2B", "SaaS", "each company", "per customer", "tenant"
- Features: Workspace/organization model, SSO/SAML, custom domains, white-labeling, per-tenant billing
- Examples: Project management tool for agencies, CRM for sales teams, analytics platform for enterprises
Detection Logic:
IF (mentions "multi-tenant" OR "workspace" OR "each company" OR "B2B" OR "organization")
OR (mentions "SSO" OR "SAML" OR "custom domain per customer" OR "white-label")
THEN product_type.includes("multi-tenant-saas")
Depth Sections to Add:
- Tenant Isolation Design (shared DB with RLS vs separate DBs)
- Tenant Context Propagation (middleware, JWT claims)
- Per-tenant Feature Flags & Quotas
- Tenant-scoped Data Storage (S3 prefixes, database sharding)
3. File Upload/Storage
Triggers:
- Keywords: "file upload", "file sharing", "document storage", "media library", "attachments", "images", "videos", "PDFs"
- Features: File upload, virus scanning, image optimization, CDN delivery, download links
- Examples: Google Drive clone, media asset manager, document management, file sharing platform
Detection Logic:
IF (mentions "file upload" OR "file sharing" OR "document" OR "media" OR "attachment" OR "storage")
AND (mentions "users can upload" OR "file management" OR "asset library")
THEN product_type.includes("file-upload-storage")
Depth Sections to Add:
- File Upload Threat Model (malware, CSRF, size limits)
- Virus Scanning Pipeline (ClamAV, S3 quarantine bucket)
- Image Optimization (resizing, WebP conversion, thumbnails)
- Secure Download URLs (signed URLs, expiration, rate limiting)
4. E-commerce/Marketplace
Triggers:
- Keywords: "e-commerce", "marketplace", "shopping", "cart", "checkout", "payments", "products", "inventory", "orders"
- Features: Product catalog, shopping cart, payment processing, order management, inventory tracking
- Examples: Shopify clone, Etsy alternative, booking platform, subscription service
Detection Logic:
IF (mentions "e-commerce" OR "marketplace" OR "shopping" OR "cart" OR "checkout" OR "payment" OR "stripe")
OR (mentions "products" AND "buy" AND "sell")
THEN product_type.includes("ecommerce-marketplace")
Depth Sections to Add:
- Payment Flow & Idempotency (Stripe webhooks, duplicate charges)
- Inventory Management (stock tracking, race conditions)
- Order State Machine (pending → paid → fulfilled → shipped)
- Tax & Compliance (sales tax, VAT, invoicing)
5. AI Agent Application
Triggers:
- Keywords: "AI agent", "LLM", "chatbot", "Claude", "GPT", "OpenAI", "Anthropic", "tool calling", "function calling", "RAG", "embeddings"
- Features: LLM integration, tool/function calling, vector search, prompt engineering, token management
- Examples: Customer support chatbot, AI research assistant, code review agent, document Q&A
Detection Logic:
IF (mentions "AI" OR "LLM" OR "agent" OR "Claude" OR "GPT" OR "chatbot")
AND (mentions "tool calling" OR "function calling" OR "RAG" OR "embeddings" OR "knowledge base")
THEN product_type.includes("ai-agent")
Depth Sections to Add:
- Agent Orchestration Pattern (ReAct, Chain-of-Thought, multi-agent)
- Tool Definitions & Schemas (JSON schema for each tool)
- Token Cost Modeling (input + output tokens per request)
- Guardrails & Safety (content filters, PII detection, hallucination mitigation)
- Memory Strategy (conversation context, vector memory, user profiles)
6. Content Platform
Triggers:
- Keywords: "blog", "CMS", "publishing", "posts", "articles", "content management", "SEO", "social media"
- Features: Rich text editor, publishing workflow, SEO optimization, content moderation, analytics
- Examples: Medium clone, blogging platform, social network, forum, newsletter platform
Detection Logic:
IF (mentions "blog" OR "CMS" OR "publishing" OR "posts" OR "articles" OR "content")
AND (mentions "SEO" OR "rich text" OR "editor" OR "publishing workflow")
THEN product_type.includes("content-platform")
Depth Sections to Add:
- Publishing Workflow (draft → review → published)
- SEO Architecture (meta tags, sitemaps, Open Graph)
- Content Moderation (spam detection, profanity filters)
- Rich Text Storage (HTML sanitization, markdown vs structured data)
Output Format
Return detected product types as array:
{
"product_types": [
"real-time-collaboration",
"multi-tenant-saas"
],
"confidence": {
"real-time-collaboration": "high",
"multi-tenant-saas": "medium"
},
"reasoning": {
"real-time-collaboration": "User mentioned 'real-time chat' and 'WebSocket' explicitly",
"multi-tenant-saas": "Mentioned 'workspace' and 'each company gets their own account'"
}
}
Usage Example
Input:
User: "Build a team collaboration tool like Slack. Each company gets their own workspace with channels and DMs. Real-time messaging with typing indicators. File sharing. 100 companies, 10-50 users each."
Output:
{
"product_types": [
"real-time-collaboration",
"multi-tenant-saas",
"file-upload-storage"
],
"confidence": {
"real-time-collaboration": "high",
"multi-tenant-saas": "high",
"file-upload-storage": "medium"
},
"reasoning": {
"real-time-collaboration": "Explicitly mentions 'real-time messaging' and 'typing indicators'",
"multi-tenant-saas": "Each company gets workspace (multi-tenant pattern)",
"file-upload-storage": "Includes file sharing feature"
}
}
Integration with Architecture Methodology
The architecture-methodology skill will:
- Call this detector after gathering initial requirements
- Receive list of detected product types
- For each detected type, inject corresponding depth sections into blueprint
- Prioritize depth sections by confidence score
Example Flow:
User submits requirements
↓
Architecture methodology gathers info via Essential Questions
↓
Product type detector analyzes requirements
↓
Detector returns: ["real-time-collaboration", "multi-tenant-saas"]
↓
Architecture methodology injects:
- Message Delivery Model section (real-time)
- Tenant Isolation Design section (multi-tenant)
↓
Blueprint generated with domain-specific depth
Edge Cases
Case 1: No product type detected
- Action: Generate standard blueprint without specialized depth sections
- Note: Rare, most products match at least one type
Case 2: Multiple product types detected
- Action: Include depth sections for ALL detected types
- Priority: Order by confidence score (high → medium → low)
Case 3: Conflicting depth sections
- Example: AI agent + real-time collaboration (both need different WebSocket patterns)
- Action: Merge sections and note trade-offs in "Architecture Decisions" section
Version History
- 1.0.0 (2026-02-07): Initial release with 6 product types
1---2name: product-type-detector3description: Detects product type from user requirements to trigger domain-specific architecture depth sections4---56# Product Type Detector78**Purpose**: Automatically identifies the product type(s) from user requirements to trigger appropriate domain-specific architecture depth sections.910**When to Use**: Internally by architecture-methodology skill during blueprint generation. Never invoke directly.1112---1314## Product Type Detection Rules1516Analyze the user's requirements and detect ALL applicable product types. A single product can match multiple types.1718### 1. Real-time Collaboration1920**Triggers**:21- Keywords: "real-time", "live updates", "chat", "messaging", "presence", "collaboration", "whiteboard", "cursor sharing", "co-editing", "multiplayer"22- Features: WebSockets, Server-Sent Events, presence indicators, typing indicators, read receipts23- Examples: Slack clone, Figma clone, Google Docs alternative, team chat, collaborative whiteboard2425**Detection Logic**:26```27IF (mentions "real-time" OR "live" OR "chat" OR "messaging" OR "collaboration")28AND (mentions "users see updates immediately" OR "WebSocket" OR "presence" OR "typing indicator")29THEN product_type.includes("real-time-collaboration")30```3132**Depth Sections to Add**:33- Message Delivery Model (ordering, offline delivery, fanout)34- Presence & Typing Indicators (WebSocket heartbeats, last seen)35- Read Receipts & Message Status (delivery confirmation)36- Conflict Resolution (for collaborative editing)3738---3940### 2. Multi-tenant B2B SaaS4142**Triggers**:43- Keywords: "multi-tenant", "workspace", "organization", "account", "B2B", "SaaS", "each company", "per customer", "tenant"44- Features: Workspace/organization model, SSO/SAML, custom domains, white-labeling, per-tenant billing45- Examples: Project management tool for agencies, CRM for sales teams, analytics platform for enterprises4647**Detection Logic**:48```49IF (mentions "multi-tenant" OR "workspace" OR "each company" OR "B2B" OR "organization")50OR (mentions "SSO" OR "SAML" OR "custom domain per customer" OR "white-label")51THEN product_type.includes("multi-tenant-saas")52```5354**Depth Sections to Add**:55- Tenant Isolation Design (shared DB with RLS vs separate DBs)56- Tenant Context Propagation (middleware, JWT claims)57- Per-tenant Feature Flags & Quotas58- Tenant-scoped Data Storage (S3 prefixes, database sharding)5960---6162### 3. File Upload/Storage6364**Triggers**:65- Keywords: "file upload", "file sharing", "document storage", "media library", "attachments", "images", "videos", "PDFs"66- Features: File upload, virus scanning, image optimization, CDN delivery, download links67- Examples: Google Drive clone, media asset manager, document management, file sharing platform6869**Detection Logic**:70```71IF (mentions "file upload" OR "file sharing" OR "document" OR "media" OR "attachment" OR "storage")72AND (mentions "users can upload" OR "file management" OR "asset library")73THEN product_type.includes("file-upload-storage")74```7576**Depth Sections to Add**:77- File Upload Threat Model (malware, CSRF, size limits)78- Virus Scanning Pipeline (ClamAV, S3 quarantine bucket)79- Image Optimization (resizing, WebP conversion, thumbnails)80- Secure Download URLs (signed URLs, expiration, rate limiting)8182---8384### 4. E-commerce/Marketplace8586**Triggers**:87- Keywords: "e-commerce", "marketplace", "shopping", "cart", "checkout", "payments", "products", "inventory", "orders"88- Features: Product catalog, shopping cart, payment processing, order management, inventory tracking89- Examples: Shopify clone, Etsy alternative, booking platform, subscription service9091**Detection Logic**:92```93IF (mentions "e-commerce" OR "marketplace" OR "shopping" OR "cart" OR "checkout" OR "payment" OR "stripe")94OR (mentions "products" AND "buy" AND "sell")95THEN product_type.includes("ecommerce-marketplace")96```9798**Depth Sections to Add**:99- Payment Flow & Idempotency (Stripe webhooks, duplicate charges)100- Inventory Management (stock tracking, race conditions)101- Order State Machine (pending → paid → fulfilled → shipped)102- Tax & Compliance (sales tax, VAT, invoicing)103104---105106### 5. AI Agent Application107108**Triggers**:109- Keywords: "AI agent", "LLM", "chatbot", "Claude", "GPT", "OpenAI", "Anthropic", "tool calling", "function calling", "RAG", "embeddings"110- Features: LLM integration, tool/function calling, vector search, prompt engineering, token management111- Examples: Customer support chatbot, AI research assistant, code review agent, document Q&A112113**Detection Logic**:114```115IF (mentions "AI" OR "LLM" OR "agent" OR "Claude" OR "GPT" OR "chatbot")116AND (mentions "tool calling" OR "function calling" OR "RAG" OR "embeddings" OR "knowledge base")117THEN product_type.includes("ai-agent")118```119120**Depth Sections to Add**:121- Agent Orchestration Pattern (ReAct, Chain-of-Thought, multi-agent)122- Tool Definitions & Schemas (JSON schema for each tool)123- Token Cost Modeling (input + output tokens per request)124- Guardrails & Safety (content filters, PII detection, hallucination mitigation)125- Memory Strategy (conversation context, vector memory, user profiles)126127---128129### 6. Content Platform130131**Triggers**:132- Keywords: "blog", "CMS", "publishing", "posts", "articles", "content management", "SEO", "social media"133- Features: Rich text editor, publishing workflow, SEO optimization, content moderation, analytics134- Examples: Medium clone, blogging platform, social network, forum, newsletter platform135136**Detection Logic**:137```138IF (mentions "blog" OR "CMS" OR "publishing" OR "posts" OR "articles" OR "content")139AND (mentions "SEO" OR "rich text" OR "editor" OR "publishing workflow")140THEN product_type.includes("content-platform")141```142143**Depth Sections to Add**:144- Publishing Workflow (draft → review → published)145- SEO Architecture (meta tags, sitemaps, Open Graph)146- Content Moderation (spam detection, profanity filters)147- Rich Text Storage (HTML sanitization, markdown vs structured data)148149---150151## Output Format152153Return detected product types as array:154155```json156{157 "product_types": [158 "real-time-collaboration",159 "multi-tenant-saas"160 ],161 "confidence": {162 "real-time-collaboration": "high",163 "multi-tenant-saas": "medium"164 },165 "reasoning": {166 "real-time-collaboration": "User mentioned 'real-time chat' and 'WebSocket' explicitly",167 "multi-tenant-saas": "Mentioned 'workspace' and 'each company gets their own account'"168 }169}170```171172---173174## Usage Example175176**Input**:177```178User: "Build a team collaboration tool like Slack. Each company gets their own workspace with channels and DMs. Real-time messaging with typing indicators. File sharing. 100 companies, 10-50 users each."179```180181**Output**:182```json183{184 "product_types": [185 "real-time-collaboration",186 "multi-tenant-saas",187 "file-upload-storage"188 ],189 "confidence": {190 "real-time-collaboration": "high",191 "multi-tenant-saas": "high",192 "file-upload-storage": "medium"193 },194 "reasoning": {195 "real-time-collaboration": "Explicitly mentions 'real-time messaging' and 'typing indicators'",196 "multi-tenant-saas": "Each company gets workspace (multi-tenant pattern)",197 "file-upload-storage": "Includes file sharing feature"198 }199}200```201202---203204## Integration with Architecture Methodology205206The architecture-methodology skill will:2071. Call this detector after gathering initial requirements2082. Receive list of detected product types2093. For each detected type, inject corresponding depth sections into blueprint2104. Prioritize depth sections by confidence score211212**Example Flow**:213```214User submits requirements215 ↓216Architecture methodology gathers info via Essential Questions217 ↓218Product type detector analyzes requirements219 ↓220Detector returns: ["real-time-collaboration", "multi-tenant-saas"]221 ↓222Architecture methodology injects:223 - Message Delivery Model section (real-time)224 - Tenant Isolation Design section (multi-tenant)225 ↓226Blueprint generated with domain-specific depth227```228229---230231## Edge Cases232233**Case 1: No product type detected**234- Action: Generate standard blueprint without specialized depth sections235- Note: Rare, most products match at least one type236237**Case 2: Multiple product types detected**238- Action: Include depth sections for ALL detected types239- Priority: Order by confidence score (high → medium → low)240241**Case 3: Conflicting depth sections**242- Example: AI agent + real-time collaboration (both need different WebSocket patterns)243- Action: Merge sections and note trade-offs in "Architecture Decisions" section244245---246247## Version History248249- **1.0.0** (2026-02-07): Initial release with 6 product types