import-bug-investigation

Diagnose Excel import bugs by tracing saved parses against landed profiles and pools.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/ravenslight2010/Production-run-calculator --skill import-bug-investigation-ravenslight2010
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: import-bug-investigation
Source: https://github.com/ravenslight2010/Production-run-calculator/tree/main/.agents/skills/import-bug-investigation
Command: npx skills add https://github.com/ravenslight2010/Production-run-calculator --skill import-bug-investigation-ravenslight2010

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a spec, premix, cheese, or shipping Excel import produces wrong, mislinked, misnamed, duplicated, or skipped data, it is hard to know which layer failed. This Skill provides a standard drill to isolate whether the fault lies in the AI parse, the apply/tie logic, the pool, or the profile before any code is changed. ## Core Features & Use Cases - Layered Diagnosis: Inspect saved parse sheets (saved_spec_sheets, saved_premix_sheets, saved_shipping_guides) via SQL, then compare against brand_profiles, recipe pools, and learned aliases to classify the failure layer. - Targeted Fix Routing: Route parse errors to lib/spec-import prompt/pipeline fixes (with SPEC_PARSE_VERSION bumps), apply/tie bugs to applySpecImport in storage.ts, and pool errors to link/dedupe passes. - Sharp-Edge Awareness: Encodes domain rules such as dough family collapse, blank-fill-only relinked ties, import order and dedup keys, and alias priority (alias > AI > fuzzy). - Use Case: A user reports that a dough spec import created duplicate recipes with wrong batch yields. The Skill guides checking the saved parse JSON first, confirming the parse was correct, then tracing the bug to the tie logic and following the data-heal-playbook for already-landed bad data. ## Quick Start Ask the assistant to investigate why the latest cheese spec import linked the wrong brand profile, and have it trace the saved parse against what landed in the database.

Frequently Asked Questions about import-bug-investigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug an Excel import that imported wrong data?

Start by querying the saved parse sheet (saved_spec_sheets, saved_premix_sheets, or saved_shipping_guides) to see exactly what the parser produced. Then compare those values against brand_profiles and recipe pools to identify which layer introduced the error.

Why does re-importing the same spreadsheet not fix the data?

Imports reuse saved parses via hash matching, so a stale or wrong parse is resurrected on re-import. Bump SPEC_PARSE_VERSION after fixing the parse pipeline, otherwise the old saved parse keeps being applied.

How do I tell if an import bug is in the parser or the apply logic?

If the saved parse sheet contains wrong values, the bug is in the AI parse pipeline in lib/spec-import. If the parse is correct but brand_profiles or pools hold wrong values, the bug is in the apply/tie logic in applySpecImport.

Why do dough imports collapse multiple variants into one recipe?

The system keeps one recipe per dough family, and variant names snap onto the base recipe. Relinked ties are blank-fill-only for weight, per-tray, and batch-yield fields; only anchored ties write values verbatim.

What should I do when bad imported data is already stored?

A code fix alone will not clear values already written to profiles or pools. Follow the data-heal-playbook skill to repair the stored data after the underlying code fix is in place.