defprod-analyze-discrepancies

Detects drift between product definitions and codebase implementation, producing a structured discrepancy report.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/defprod1/defprod-skills --skill defprod-analyze-discrepancies-defprod1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defprod-analyze-discrepancies
Source: https://github.com/defprod1/defprod-skills/tree/main/skills/defprod-analyze-discrepancies
Command: npx skills add https://github.com/defprod1/defprod-skills --skill defprod-analyze-discrepancies-defprod1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Product definitions and codebases drift apart over time: features get built without user stories, stories describe behavior the code no longer implements, and acceptance criteria silently diverge from reality. This Skill systematically compares a DefProd product area's user stories and acceptance criteria against the actual code, surfacing drift in both directions. ## Core Features & Use Cases - Bidirectional drift detection: Finds stories with no implementation, partially implemented acceptance criteria, implemented features with no story, and stories that diverge from the code. - Structured four-table report: Saves a dated discrepancy report into your e2e or docs directory, with per-row recommendations (update definition, fix code, remove, or create story). - Mandatory walkthrough workflow: Walks every report row with the user via confirmation prompts, updating the saved file row-by-row and appending a walkthrough log. - Use Case: After a sprint of rapid feature work, run the analysis on your BILLING area to discover that two new endpoints lack user stories and one acceptance criterion's validation rule no longer matches the code, then confirm each recommended fix before handing off to the fix workflow. ## Quick Start Ask the agent to run /defprod-analyze-discrepancies for your product name and area key, for example "analyze discrepancies for the AUTH area of my product".

Frequently Asked Questions about defprod-analyze-discrepancies

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

FAQPage Schema
How do I check if my product definition matches my codebase?

Run the analysis with a product name and area key, and it fetches user stories and acceptance criteria from the DefProd MCP server, explores the relevant frontend and backend code, then produces a four-table discrepancy report covering both directions of drift.

What kinds of discrepancies does drift detection find?

It finds four categories: stories or acceptance criteria with no implementation, partially implemented acceptance criteria, implemented features with no corresponding story, and stories whose details diverge from the actual code behavior.

Does this skill fix the discrepancies it finds?

No, it only analyzes and reports. After you confirm each row's recommendation in the mandatory walkthrough, you run /defprod-fix-discrepancies with the report path to apply the confirmed actions.

Where is the discrepancy report saved?

The report is saved as a dated Markdown file, preferring the app's e2e area directory first, then an area-specific docs directory, then a general docs location. The skill tells you the exact path after saving.

What happens if my product area has no user stories?

The skill informs you there is nothing to analyze and suggests running /defprod-create-area-stories first, since discrepancy analysis requires existing stories and acceptance criteria to compare against the code.