algo-mfg-spclisted
Install: claude install-skill charlieviettq/awesome-agent-skill
# Statistical Process Control
## Overview
SPC uses control charts to monitor process stability over time. Upper and Lower Control Limits (UCL/LCL) are set at ±3σ from the process mean. Points within limits = common cause variation (stable). Points outside or showing patterns = special cause variation (investigate). Primary charts: X-bar/R, X-bar/S, I-MR, p-chart, c-chart.
## When to Use
**Trigger conditions:**
- Monitoring production process for stability and detecting shifts
- Setting statistically-based control limits for quality metrics
- Distinguishing normal variation from assignable causes
**When NOT to use:**
- For process capability assessment (use Cpk)
- For root cause analysis of known problems (use fishbone/5-why)
## Algorithm
```
IRON LAW: Control Limits Are NOT Specification Limits
Control limits (±3σ) describe what the process IS doing.
Specification limits describe what the process SHOULD do.
A process can be in statistical control (stable) but still produce
out-of-spec products (incapable). Conversely, a capable process may
be out of control (drifting). Monitor control FIRST, then assess capability.
```
### Phase 1: Input Validation
Collect: 25+ subgroups of measurements (5 per subgroup typical for X-bar/R). Verify: measurement system is adequate (gauge R&R < 10%), data collected in time order.
**Gate:** Sufficient subgroups, time-ordered data, measurement system verified.
### Phase 2: Core Algorithm
**X-bar/R Chart (subgroup data):**
1. Compute subgr