skills/product-primitives/SKILL.md
Break down complex products, features, or systems into fundamental primitives and building blocks from a software creator's perspective. Use when starting a new application, designing a large feature, or needing to understand a complex system's moving parts before building. Trigger phrases: "break down X", "decompose this", "what are the primitives", "building blocks of Z", "map the architecture", "what are the moving parts", "analyze this system", or any situation where you need to identify the atomic, reusable capabilities that compose a system. Complements product-thinker (user perspective) with the builder's perspective (system-level connections).
npx skillsauth add teambrilliant/dev-skills product-primitivesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Break complex systems into fundamental primitives — deep, information-hiding building blocks with clear boundaries and simple interfaces. Think from the software creator's perspective: what are the atomic capabilities this system needs, how do they connect, and where should the boundaries be?
One-off analysis for big-picture thinking — new applications, large features, or understanding existing system architecture. While /dev-skills:product-thinker thinks from the user's perspective, product primitives thinks from the builder's perspective, identifying where to draw module boundaries and what each piece should encapsulate.
Use Explore sub-agents to research the codebase if working in an existing project. Use browser (Chrome DevTools MCP) to walk through the product if it's running.
The quality of a decomposition depends on where you draw boundaries. Use these principles to guide every boundary decision:
Each primitive should have a simple interface hiding significant functionality. If a primitive's interface is as complex as what it does internally, it's not a useful building block — it's just indirection. A good primitive absorbs complexity so that anything composing it stays simple.
Each primitive should encapsulate a design decision — a piece of knowledge that nothing outside it needs to know. The data format, the algorithm, the storage mechanism, the external API quirks — these should live inside one primitive, not leak across boundaries. When you can change a primitive's internals without affecting anything else, the boundary is right.
Don't decompose by execution order ("first we ingest, then we transform, then we store"). This is temporal decomposition — it leaks information because operations that happen at different times often share the same knowledge. Instead, ask: what distinct pieces of knowledge does this system need? Each piece of knowledge becomes a primitive.
When complexity is unavoidable, push it into lower-level primitives so that higher-level composition stays simple. The primitives should suffer so that the system using them doesn't have to.
Before finalizing primitives, run them through the I/O / Function / State lens. Each primitive should clearly belong to one layer: a boundary primitive (I/O — network, files, time, webhooks), a logic primitive (Function — pure computation, decisions, orchestration), or a persistence primitive (State — DB, durable queues, caches that outlive a request). A primitive that mixes layers is a decomposition smell — split it. A primitive that owns one layer cleanly almost always passes the depth and information-hiding tests too. See references/io-function-state.md for the lens, heuristics, worked example, and limits.
## System: [Name]
[1-2 sentence description of what this system does]
## Primitives
### 1. [Primitive Name]
**Purpose**: What it does
**Encapsulates**: What knowledge/decisions it hides
**Interface**: What callers need to know (inputs → outputs)
### 2. [Next Primitive]
...
## How They Fit Together
[ASCII diagram showing relationships and data flow]
## Composition Examples
[Show how 2-3 user workflows are composed from these primitives]
Input: "Break down an e-commerce marketing automation system"
Output:
## System: E-commerce Marketing Automation
Automate marketing campaigns for online stores — segment customers, create campaigns,
schedule sends, and measure results.
## Primitives
### 1. Audience Segmentation
**Purpose**: Group customers by behavior, demographics, or purchase history
**Encapsulates**: Segment rule evaluation logic, membership caching, refresh scheduling
**Interface**: (segment rules, customer data) → named segments with member lists
### 2. Campaign Composition
**Purpose**: Assemble a campaign from template, audience, and schedule
**Encapsulates**: Campaign state machine (draft → scheduled → sent → completed),
validation rules, duplication logic
**Interface**: (template + segment + schedule) → ready-to-send campaign
### 3. Content Rendering
**Purpose**: Produce personalized email/SMS content from templates + product data
**Encapsulates**: Template engine, personalization token resolution, product data lookup
**Interface**: (template + recipient + products) → rendered content
### 4. Send Orchestration
**Purpose**: Execute campaign delivery respecting rate limits and timing
**Encapsulates**: Channel-specific delivery (email vs SMS), rate limiting, retry logic,
bounce handling
**Interface**: (campaign + recipients + content) → delivery receipts
### 5. Performance Measurement
**Purpose**: Track opens, clicks, conversions, revenue attribution
**Encapsulates**: Event aggregation, attribution models, metric computation
**Interface**: (delivery events + interactions + orders) → campaign metrics
## How They Fit Together
┌──────────────────┐
│ Audience │
│ Segmentation │──────────────────────┐
└────────┬─────────┘ │
│ segments │ segment scores
▼ │
┌──────────────────┐ ┌───────────────┐ │
│ Campaign │───▶│ Content │ │
│ Composition │ │ Rendering │ │
└────────┬─────────┘ └───────┬───────┘ │
│ campaign │ content │
▼ ▼ │
┌──────────────────────────┐ │
│ Send Orchestration │ │
└────────────┬─────────────┘ │
│ delivery events │
▼ │
┌──────────────────────────┐ │
│ Performance Measurement │──────────┘
└──────────────────────────┘
(feeds back into segmentation)
## Composition Examples
**Scheduled newsletter**: Segmentation → Composition → Rendering → Orchestration → Measurement
**Triggered welcome series**: (event) → Composition → Rendering → Orchestration
**Re-engagement**: Measurement (inactive users) → Segmentation → Composition → ...
Note: each arrow represents a simple interface — the receiving primitive doesn't need to know
how the sending primitive works internally. Orchestration doesn't know how Rendering chose
which products to feature; Measurement doesn't know how Orchestration handled rate limits.
/dev-skills:product-thinker for user-perspective analysis alongside system decomposition/dev-skills:shaping-work to shape them as work itemsdevelopment
Write a PR-FAQ to pressure-test a product idea customer-first — before committing engineering. Use when someone says "write a PR-FAQ", "press release", "working backwards", "PRFAQ", "start from the customer", "what's the press release for this", "before we build this", "is this idea clear enough to build", "draft the launch announcement", or has a fuzzy product idea and wants to force clarity on what to build and why. Amazon's Working Backwards method: define the desired customer experience as a mock press release + FAQ, iterate on the document until the thinking is clear, and kill weak ideas cheaply on paper. Sits between product-thinker (should we?) and shaping-work (what exactly?), alongside product-discovery (will it work?) — this skill answers "what is the customer-facing end-state, stated so plainly that the holes show?" NOT for validating risky assumptions with experiments (use product-discovery), NOT for breaking shaped work into a build plan (use shaping-work / implementation-planning).
development
Use for cross-domain strategic reasoning, approach selection, and systems-level analysis. Trigger when the user wants to: think through how to approach a problem, evaluate tradeoffs between architectural or technical approaches, sanity-check a plan or direction, understand second-order effects of a decision, get a holistic view across code/org/time dimensions, or pressure-test assumptions. The core signal is the user asking "what's the right approach?", "think about this", "what am I not seeing?", "sanity check", "tradeoffs", "how should we tackle this?", or any request for multi-level reasoning that spans product, architecture, and organization. Also use when the user needs help deciding which workflow skill to invoke next. NOT for: product/user/business decisions (→ product-thinker), work definition (→ shaping-work), file-level technical planning (→ implementation-planning), writing code, test authoring, or PR review.
tools
Browser-based QA verification after any implementation. Use when someone says "QA this", "test this in browser", "verify the feature", "qa test", "browser test", or after completing an /implement-change to verify acceptance criteria in a real browser. Opens Chrome via MCP, exercises each acceptance criterion, verifies via DOM snapshots, and reports pass/fail. The "closer" for every implementation — proof it works, not just that tests pass.
development
Create technical implementation plans and architecture designs. Use when someone needs a detailed technical approach before coding begins — "create a plan", "plan this ticket", "how should we implement this", "technical design", "architect this", "design the approach", "plan the migration", "refactor plan", "how should we structure this", or when shaped work or a groomed ticket needs a concrete implementation strategy with phases, file changes, and verification steps.