$npx -y skills add NeoLabHQ/context-engineering-kit --skill plan-do-check-actIterative PDCA cycle for systematic experimentation and continuous improvement
| 1 | # Plan-Do-Check-Act (PDCA) |
| 2 | |
| 3 | Apply PDCA cycle for continuous improvement through iterative problem-solving and process optimization. |
| 4 | |
| 5 | ## Description |
| 6 | |
| 7 | Four-phase iterative cycle: Plan (identify and analyze), Do (implement changes), Check (measure results), Act (standardize or adjust). Enables systematic experimentation and improvement. |
| 8 | |
| 9 | ## Usage |
| 10 | |
| 11 | `/plan-do-check-act [improvement_goal]` |
| 12 | |
| 13 | ## Variables |
| 14 | |
| 15 | - GOAL: Improvement target or problem to address (default: prompt for input) |
| 16 | - CYCLE_NUMBER: Which PDCA iteration (default: 1) |
| 17 | |
| 18 | ## Steps |
| 19 | |
| 20 | ### Phase 1: PLAN |
| 21 | |
| 22 | 1. Define the problem or improvement goal |
| 23 | 2. Analyze current state (baseline metrics) |
| 24 | 3. Identify root causes (use `/why` or `/cause-and-effect`) |
| 25 | 4. Develop hypothesis: "If we change X, Y will improve" |
| 26 | 5. Design experiment: what to change, how to measure success |
| 27 | 6. Set success criteria (measurable targets) |
| 28 | |
| 29 | ### Phase 2: DO |
| 30 | |
| 31 | 1. Implement the planned change (small scale first) |
| 32 | 2. Document what was actually done |
| 33 | 3. Record any deviations from plan |
| 34 | 4. Collect data throughout implementation |
| 35 | 5. Note unexpected observations |
| 36 | |
| 37 | ### Phase 3: CHECK |
| 38 | |
| 39 | 1. Measure results against success criteria |
| 40 | 2. Compare to baseline (before vs. after) |
| 41 | 3. Analyze data: did hypothesis hold? |
| 42 | 4. Identify what worked and what didn't |
| 43 | 5. Document learnings and insights |
| 44 | |
| 45 | ### Phase 4: ACT |
| 46 | |
| 47 | 1. **If successful**: Standardize the change |
| 48 | - Update documentation |
| 49 | - Train team |
| 50 | - Create checklist/automation |
| 51 | - Monitor for regression |
| 52 | 2. **If unsuccessful**: Learn and adjust |
| 53 | - Understand why it failed |
| 54 | - Refine hypothesis |
| 55 | - Start new PDCA cycle with adjusted plan |
| 56 | 3. **If partially successful**: |
| 57 | - Standardize what worked |
| 58 | - Plan next cycle for remaining issues |
| 59 | |
| 60 | ## Examples |
| 61 | |
| 62 | ### Example 1: Reducing Build Time |
| 63 | |
| 64 | ``` |
| 65 | CYCLE 1 |
| 66 | ─────── |
| 67 | PLAN: |
| 68 | Problem: Docker build takes 45 minutes |
| 69 | Current State: Full rebuild every time, no layer caching |
| 70 | Root Cause: Package manager cache not preserved between builds |
| 71 | Hypothesis: Caching dependencies will reduce build to <10 minutes |
| 72 | Change: Add layer caching for package.json + node_modules |
| 73 | Success Criteria: Build time <10 minutes on unchanged dependencies |
| 74 | |
| 75 | DO: |
| 76 | - Restructured Dockerfile: COPY package*.json before src files |
| 77 | - Added .dockerignore for node_modules |
| 78 | - Configured CI cache for Docker layers |
| 79 | - Tested on 3 builds |
| 80 | |
| 81 | CHECK: |
| 82 | Results: |
| 83 | - Unchanged dependencies: 8 minutes ✓ (was 45) |
| 84 | - Changed dependencies: 12 minutes (was 45) |
| 85 | - Fresh builds: 45 minutes (same, expected) |
| 86 | Analysis: 82% reduction on cached builds, hypothesis confirmed |
| 87 | |
| 88 | ACT: |
| 89 | Standardize: |
| 90 | ✓ Merged Dockerfile changes |
| 91 | ✓ Updated CI pipeline config |
| 92 | ✓ Documented in README |
| 93 | ✓ Added build time monitoring |
| 94 | |
| 95 | New Problem: 12 minutes still slow when deps change |
| 96 | → Start CYCLE 2 |
| 97 | |
| 98 | |
| 99 | CYCLE 2 |
| 100 | ─────── |
| 101 | PLAN: |
| 102 | Problem: Build still 12 min when dependencies change |
| 103 | Current State: npm install rebuilds all packages |
| 104 | Root Cause: Some packages compile from source |
| 105 | Hypothesis: Pre-built binaries will reduce to <5 minutes |
| 106 | Change: Use npm ci instead of install, configure binary mirrors |
| 107 | Success Criteria: Build <5 minutes on dependency changes |
| 108 | |
| 109 | DO: |
| 110 | - Changed to npm ci (uses package-lock.json) |
| 111 | - Added .npmrc with binary mirror configs |
| 112 | - Tested across 5 dependency updates |
| 113 | |
| 114 | CHECK: |
| 115 | Results: |
| 116 | - Dependency changes: 4.5 minutes ✓ (was 12) |
| 117 | - Compilation errors reduced to 0 (was 3) |
| 118 | Analysis: npm ci faster + more reliable, hypothesis confirmed |
| 119 | |
| 120 | ACT: |
| 121 | Standardize: |
| 122 | ✓ Use npm ci everywhere (local + CI) |
| 123 | ✓ Committed .npmrc |
| 124 | ✓ Updated developer onboarding docs |
| 125 | |
| 126 | Total improvement: 45min → 4.5min (90% reduction) |
| 127 | ✓ PDCA complete, monitor for 2 weeks |
| 128 | ``` |
| 129 | |
| 130 | ### Example 2: Reducing Production Bugs |
| 131 | |
| 132 | ``` |
| 133 | CYCLE 1 |
| 134 | ─────── |
| 135 | PLAN: |
| 136 | Problem: 8 production bugs per month |
| 137 | Current State: Manual testing only, no automated tests |
| 138 | Root Cause: Regressions not caught before release |
| 139 | Hypothesis: Adding integration tests will reduce bugs by 50% |
| 140 | Change: Implement integration test suite for critical paths |
| 141 | Success Criteria: <4 bugs per month after 1 month |
| 142 | |
| 143 | DO: |
| 144 | Week 1-2: Wrote integration tests for: |
| 145 | - User authentication flow |
| 146 | - Payment processing |
| 147 | - Data export |
| 148 | Week 3: Set up CI to run tests |
| 149 | Week 4: Team training on test writing |
| 150 | Coverage: 3 critical paths (was 0) |
| 151 | |
| 152 | CHECK: |
| 153 | Results after 1 month: |
| 154 | - Production bugs: 6 (was 8) |
| 155 | - Bugs caught in CI: 4 |
| 156 | - Test failures (false positives): 2 |
| 157 | Analysis: 25% reduction, not 50% target |
| 158 | Insight: Bugs are in areas without tests yet |
| 159 | |
| 160 | ACT: |
| 161 | Partially successful: |
| 162 | ✓ Keep existing tests (prevented 4 bugs) |
| 163 | ✓ Fix flaky tests |
| 164 | |
| 165 | Adjust for CYCLE 2: |
| 166 | - Expand test coverage to all user flows |
| 167 | - Add tests for bug-prone areas |
| 168 | → Start CYCLE 2 |
| 169 | |
| 170 | |
| 171 | CYCLE 2 |
| 172 | ─────── |
| 173 | PLAN: |
| 174 | Problem: Still 6 bugs/month, need <4 |
| 175 | Cur |