بنقرة واحدة
review
Cross-lens validation: consistency checks, arithmetic verification, pitfall scanning
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Cross-lens validation: consistency checks, arithmetic verification, pitfall scanning
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | review |
| description | Cross-lens validation: consistency checks, arithmetic verification, pitfall scanning |
Invoked automatically by customer-base-audit:full-audit after all lens analyses complete. Can also be invoked standalone to validate a partial audit.
Verify that numbers agree across lenses:
# Example cross-check
lens1_total = ... # from Lens 1 decomposition
c3_period_total = c3.filter(pl.col("period") == target_period)["value"].sum()
diff_pct = abs(lens1_total - c3_period_total) / abs(lens1_total)
assert diff_pct < 0.01, f"Lens 1 vs Lens 5 mismatch: {diff_pct:.2%}"
For every decomposition table produced across all lenses, verify:
n_customers * AOF * AOV = total_revenue within 1%n_customers * AOF * AOV * avg_margin = total_profit within 1%n_active * penetration * ACOF * ACOV = category_revenue within 1%# Generic cross-check
def cross_check(n, aof, aov, total, label, margin=None, profit=None):
reconstructed = n * aof * aov
assert abs(reconstructed - total) < 0.01 * abs(total), \
f"{label} revenue check failed: {reconstructed:,.2f} vs {total:,.2f}"
if margin is not None and profit is not None:
reconstructed_profit = reconstructed * margin
assert abs(reconstructed_profit - profit) < 0.01 * abs(profit), \
f"{label} profit check failed: {reconstructed_profit:,.2f} vs {profit:,.2f}"
Review outputs against expected patterns. Flag deviations for human review:
Checklist:
Read ${CLAUDE_PLUGIN_ROOT}/references/common_pitfalls.md and check each pitfall against the analysis outputs:
Verify all expected outputs exist:
| Lens | Expected Outputs |
|---|---|
| Data Prep | prepared_data.parquet, customer_summary.parquet |
| Lens 1 | Decomposition table, spend distribution, decile summary |
| Lens 2 | Segment table, migration matrix, up-down analysis |
| Lens 3 | Activity decay chart, buying patterns, time-to-nth |
| Lens 4 | Left-aligned comparison charts, 2nd purchase CDF |
| Lens 5 | C3 chart, acquisition flow, repeat rates |
| Product | Category decomposition, co-purchasing matrix (if category data exists) |
If product-dimension was skipped (no category column), note as expected.
Write a validation_report.md with sections:
${CLAUDE_PLUGIN_ROOT}/references/common_pitfalls.md${CLAUDE_PLUGIN_ROOT}/references/expected_patterns.mdTurn completed audit outputs into an executive-ready document (Word/PDF) organized by insight, not by lens -- Pyramid Principle, SCQA, action titles, embedded exhibits
Complete customer-base audit orchestrator -- runs all lenses with parallel sub-agents and review
Lens 4 -- Compare two acquisition cohorts side-by-side using left-aligned analysis
Lens 3 -- Track a single cohort's behavior over time (activity, frequency, value decay)
Lens 5 -- Assess overall customer base health via C3 chart, acquisition flow, and repeat rates
Lens 1 -- Analyze customer heterogeneity via profit decomposition, distributions, and deciles