Agent skill
product-primitives
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).
Install this agent skill to your Project
npx add-skill https://github.com/teambrilliant/dev-skills/tree/main/skills/product-primitives
SKILL.md
Product Primitives
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?
When to Use
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.
How to Decompose
The quality of a decomposition depends on where you draw boundaries. Use these principles to guide every boundary decision:
Deep, not shallow
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.
Information hiding
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.
Split by knowledge, not by time
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.
Bring together or split apart?
- Merge when two pieces share information, are always used together, or can't be understood independently
- Split when pieces are truly independent and separating them reduces the total complexity
- Test: will developers need to read both to understand either? If yes, they belong together
Pull complexity downward
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.
What Makes a Good Primitive
- Deep — simple interface, powerful functionality behind it
- Encapsulating — hides a design decision; internals can change without rippling outward
- Composable — combines with other primitives through simple, obvious interfaces
- Transferable — useful in multiple workflows, not tied to one specific scenario
Red Flags
- Shallow primitive — interface is as complex as implementation, not hiding anything useful
- Information leakage — same knowledge (format, protocol, business rule) appears in multiple primitives
- Temporal decomposition — boundaries mirror execution order instead of knowledge boundaries
- Pass-through primitive — does nothing but forward to another primitive with a similar interface
- Conjoined primitives — can't understand one without understanding the other
Output Format
## 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]
Example
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.
Handoffs
- Pair with
/dev-skills:product-thinkerfor user-perspective analysis alongside system decomposition - Feed individual primitives into
/dev-skills:shaping-workto shape them as work items
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
product-discovery
Validate whether a product idea is worth building before committing engineering investment. Use when someone says "should we build this", "validate this idea", "discovery", "run an experiment", "test this hypothesis", "what are the risks", "is this worth building", "feasibility check", "prototype plan", or when a team has a shaped feature or product idea and needs to assess risks and design experiments before building. Sits between product-thinker (should we?) and shaping-work (what exactly?) — this skill answers "will this actually work?" by identifying what you don't know, designing the cheapest way to find out, and defining evidence gates that justify (or kill) the investment. Also trigger when someone has a feature request and you sense high uncertainty — if the team is about to spend weeks building something nobody tested, this skill should intervene.
implementation-planning
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.
qa-test
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.
shaping-work
Shape rough ideas into clear, actionable work definitions. Use this skill whenever someone has an unstructured idea that needs to become a concrete work definition — feature requests, bug reports, PRDs, customer feedback, Slack threads, stakeholder asks, or vague "we should do X" statements. Trigger phrases include "shape this", "scope this", "write a PRD", "define this work", "turn this into a ticket", "flesh this out", "spec this out", "what should we build for X", "I have an idea for...", or any rough input that needs structure before implementation can begin.
implement-change
Execute code changes from an implementation plan. Use when someone says "implement this", "build this", "code this", "start building", "let's implement", "execute the plan", "make the changes", "do the work", or has an approved implementation plan ready for coding. Takes implementation plans and produces working code, phase by phase with verification.
loop-check
Assess what's needed to make feedback loops autonomous in a repo. Use when someone says "loop check", "what do I need to work autonomously", "check my feedback loops", "what's manual here", "what should I automate", "can an agent iterate here", or before starting work in an unfamiliar repo to understand what's missing for autonomous iteration. Also use when the user asks "what do you need to make this autonomous?" or describes a workflow they want to close the loop on. NOT for: full repo audits (use tap-audit), coding, test writing, or implementation.
Didn't find tool you were looking for?