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 sections4version: 1.0.05author: Navraj Singh6tags: [architecture, detection, classification]7---89# Product Type Detector1011**Purpose**: Automatically identifies the product type(s) from user requirements to trigger appropriate domain-specific architecture depth sections.1213**When to Use**: Internally by architecture-methodology skill during blueprint generation. Never invoke directly.1415---1617## Product Type Detection Rules1819Analyze the user's requirements and detect ALL applicable product types. A single product can match multiple types.2021### 1. Real-time Collaboration2223**Triggers**:24- Keywords: "real-time", "live updates", "chat", "messaging", "presence", "collaboration", "whiteboard", "cursor sharing", "co-editing", "multiplayer"25- Features: WebSockets, Server-Sent Events, presence indicators, typing indicators, read receipts26- Examples: Slack clone, Figma clone, Google Docs alternative, team chat, collaborative whiteboard2728**Detection Logic**:29```30IF (mentions "real-time" OR "live" OR "chat" OR "messaging" OR "collaboration")31AND (mentions "users see updates immediately" OR "WebSocket" OR "presence" OR "typing indicator")32THEN product_type.includes("real-time-collaboration")33```3435**Depth Sections to Add**:36- Message Delivery Model (ordering, offline delivery, fanout)37- Presence & Typing Indicators (WebSocket heartbeats, last seen)38- Read Receipts & Message Status (delivery confirmation)39- Conflict Resolution (for collaborative editing)4041---4243### 2. Multi-tenant B2B SaaS4445**Triggers**:46- Keywords: "multi-tenant", "workspace", "organization", "account", "B2B", "SaaS", "each company", "per customer", "tenant"47- Features: Workspace/organization model, SSO/SAML, custom domains, white-labeling, per-tenant billing48- Examples: Project management tool for agencies, CRM for sales teams, analytics platform for enterprises4950**Detection Logic**:51```52IF (mentions "multi-tenant" OR "workspace" OR "each company" OR "B2B" OR "organization")53OR (mentions "SSO" OR "SAML" OR "custom domain per customer" OR "white-label")54THEN product_type.includes("multi-tenant-saas")55```5657**Depth Sections to Add**:58- Tenant Isolation Design (shared DB with RLS vs separate DBs)59- Tenant Context Propagation (middleware, JWT claims)60- Per-tenant Feature Flags & Quotas61- Tenant-scoped Data Storage (S3 prefixes, database sharding)6263---6465### 3. File Upload/Storage6667**Triggers**:68- Keywords: "file upload", "file sharing", "document storage", "media library", "attachments", "images", "videos", "PDFs"69- Features: File upload, virus scanning, image optimization, CDN delivery, download links70- Examples: Google Drive clone, media asset manager, document management, file sharing platform7172**Detection Logic**:73```74IF (mentions "file upload" OR "file sharing" OR "document" OR "media" OR "attachment" OR "storage")75AND (mentions "users can upload" OR "file management" OR "asset library")76THEN product_type.includes("file-upload-storage")77```7879**Depth Sections to Add**:80- File Upload Threat Model (malware, CSRF, size limits)81- Virus Scanning Pipeline (ClamAV, S3 quarantine bucket)82- Image Optimization (resizing, WebP conversion, thumbnails)83- Secure Download URLs (signed URLs, expiration, rate limiting)8485---8687### 4. E-commerce/Marketplace8889**Triggers**:90- Keywords: "e-commerce", "marketplace", "shopping", "cart", "checkout", "payments", "products", "inventory", "orders"91- Features: Product catalog, shopping cart, payment processing, order management, inventory tracking92- Examples: Shopify clone, Etsy alternative, booking platform, subscription service9394**Detection Logic**:95```96IF (mentions "e-commerce" OR "marketplace" OR "shopping" OR "cart" OR "checkout" OR "payment" OR "stripe")97OR (mentions "products" AND "buy" AND "sell")98THEN product_type.includes("ecommerce-marketplace")99```100101**Depth Sections to Add**:102- Payment Flow & Idempotency (Stripe webhooks, duplicate charges)103- Inventory Management (stock tracking, race conditions)104- Order State Machine (pending → paid → fulfilled → shipped)105- Tax & Compliance (sales tax, VAT, invoicing)106107---108109### 5. AI Agent Application110111**Triggers**:112- Keywords: "AI agent", "LLM", "chatbot", "Claude", "GPT", "OpenAI", "Anthropic", "tool calling", "function calling", "RAG", "embeddings"113- Features: LLM integration, tool/function calling, vector search, prompt engineering, token management114- Examples: Customer support chatbot, AI research assistant, code review agent, document Q&A115116**Detection Logic**:117```118IF (mentions "AI" OR "LLM" OR "agent" OR "Claude" OR "GPT" OR "chatbot")119AND (mentions "tool calling" OR "function calling" OR "RAG" OR "embeddings" OR "knowledge base")120THEN product_type.includes("ai-agent")121```122123**Depth Sections to Add**:124- Agent Orchestration Pattern (ReAct, Chain-of-Thought, multi-agent)125- Tool Definitions & Schemas (JSON schema for each tool)126- Token Cost Modeling (input + output tokens per request)127- Guardrails & Safety (content filters, PII detection, hallucination mitigation)128- Memory Strategy (conversation context, vector memory, user profiles)129130---131132### 6. Content Platform133134**Triggers**:135- Keywords: "blog", "CMS", "publishing", "posts", "articles", "content management", "SEO", "social media"136- Features: Rich text editor, publishing workflow, SEO optimization, content moderation, analytics137- Examples: Medium clone, blogging platform, social network, forum, newsletter platform138139**Detection Logic**:140```141IF (mentions "blog" OR "CMS" OR "publishing" OR "posts" OR "articles" OR "content")142AND (mentions "SEO" OR "rich text" OR "editor" OR "publishing workflow")143THEN product_type.includes("content-platform")144```145146**Depth Sections to Add**:147- Publishing Workflow (draft → review → published)148- SEO Architecture (meta tags, sitemaps, Open Graph)149- Content Moderation (spam detection, profanity filters)150- Rich Text Storage (HTML sanitization, markdown vs structured data)151152---153154## Output Format155156Return detected product types as array:157158```json159{160 "product_types": [161 "real-time-collaboration",162 "multi-tenant-saas"163 ],164 "confidence": {165 "real-time-collaboration": "high",166 "multi-tenant-saas": "medium"167 },168 "reasoning": {169 "real-time-collaboration": "User mentioned 'real-time chat' and 'WebSocket' explicitly",170 "multi-tenant-saas": "Mentioned 'workspace' and 'each company gets their own account'"171 }172}173```174175---176177## Usage Example178179**Input**:180```181User: "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."182```183184**Output**:185```json186{187 "product_types": [188 "real-time-collaboration",189 "multi-tenant-saas",190 "file-upload-storage"191 ],192 "confidence": {193 "real-time-collaboration": "high",194 "multi-tenant-saas": "high",195 "file-upload-storage": "medium"196 },197 "reasoning": {198 "real-time-collaboration": "Explicitly mentions 'real-time messaging' and 'typing indicators'",199 "multi-tenant-saas": "Each company gets workspace (multi-tenant pattern)",200 "file-upload-storage": "Includes file sharing feature"201 }202}203```204205---206207## Integration with Architecture Methodology208209The architecture-methodology skill will:2101. Call this detector after gathering initial requirements2112. Receive list of detected product types2123. For each detected type, inject corresponding depth sections into blueprint2134. Prioritize depth sections by confidence score214215**Example Flow**:216```217User submits requirements218 ↓219Architecture methodology gathers info via Essential Questions220 ↓221Product type detector analyzes requirements222 ↓223Detector returns: ["real-time-collaboration", "multi-tenant-saas"]224 ↓225Architecture methodology injects:226 - Message Delivery Model section (real-time)227 - Tenant Isolation Design section (multi-tenant)228 ↓229Blueprint generated with domain-specific depth230```231232---233234## Edge Cases235236**Case 1: No product type detected**237- Action: Generate standard blueprint without specialized depth sections238- Note: Rare, most products match at least one type239240**Case 2: Multiple product types detected**241- Action: Include depth sections for ALL detected types242- Priority: Order by confidence score (high → medium → low)243244**Case 3: Conflicting depth sections**245- Example: AI agent + real-time collaboration (both need different WebSocket patterns)246- Action: Merge sections and note trade-offs in "Architecture Decisions" section247248---249250## Version History251252- **1.0.0** (2026-02-07): Initial release with 6 product types