Skip to content

[Meta] PDD-CLI Generation Issues Discovered via CRM Test Case #563

@jiaminc-cmu

Description

@jiaminc-cmu

PDD-CLI Generation Issues Discovered via CRM Test Case

This meta-issue tracks 26 systematic bugs discovered in the PDD-CLI code generation tool during a CRM (Contact Relationship Management) application generation test. These issues represent fundamental gaps in PDD's generation capabilities, not domain-specific CRM problems.

Purpose

The CRM application served as a comprehensive test case to stress-test PDD-CLI's generation capabilities across:

  • Backend (Python, Cloud Functions, Firestore)
  • Frontend (React, TypeScript, Next.js)
  • Testing (pytest, Playwright E2E)
  • Infrastructure (Firebase, GitHub integration)

Every bug listed here is a PDD-CLI bug - something the tool got wrong when generating code. These issues apply to any codebase PDD generates, not just CRM applications.

Issue Categories

1. Schema Validation Failures (5 issues)

PDD generates code without validating against actual schemas/interfaces:

Pattern: PDD infers names/structures rather than parsing actual definitions.

2. E2E Test Generation Issues (6 issues)

PDD generates brittle, assumption-based E2E tests:

Pattern: PDD generates tests based on assumptions rather than actual rendered DOM.

3. Test Environment Issues (3 issues)

PDD doesn't consider test environment constraints:

Pattern: PDD assumes all environments have same capabilities.

4. API Selection & Test Performance (3 issues)

PDD chooses APIs without considering non-functional requirements:

Pattern: PDD optimizes for code simplicity over correctness/reliability.

5. Code Quality Issues (2 issues)

PDD generates code that violates language conventions:

Pattern: PDD doesn't run linters/formatters on generated code.

6. Incomplete Feature Implementation (7 issues)

PDD generates partial implementations:

Pattern: PDD implements visible code but forgets "glue" (config, wiring, tests).

Root Causes

These 26 issues stem from several fundamental gaps in PDD-CLI:

  1. No Static Analysis: PDD doesn't parse existing code to understand schemas, exports, patterns
  2. Assumption-Based Generation: PDD infers based on names/context rather than verifying facts
  3. No Validation Phase: PDD doesn't run linters, type checkers, or tests on generated code
  4. Incomplete Domain Knowledge: PDD doesn't understand API consistency models, test best practices, etc.
  5. Partial Implementation: PDD generates obvious code but misses configuration, wiring, edge cases

Impact Summary

  • P0 issues: 0
  • P1 issues: 10 (runtime failures, build breaks, high-frequency bugs)
  • P2 issues: 11 (flaky tests, partial functionality, medium-frequency bugs)
  • P3 issues: 5 (code quality, UX issues, low-frequency bugs)

For Contributors

These issues were discovered during generation of a CRM test application for the PDD Cloud project. While examples reference CRM-specific files (admin_crm_actions.py, AnalyticsDashboard.tsx, etc.), the problems are generic PDD-CLI bugs that affect any codebase.

Each issue includes:

  • Generic problem description (applicable to any domain)
  • Concrete example showing what PDD generated vs should have generated
  • Root cause in PDD's generation logic
  • Prevention strategies for fixing PDD

All issues have been fixed in the CRM codebase (commit 34a651d5 and related commits), but the underlying PDD-CLI bugs remain and will affect future generations.

Related Issues

Next Steps

  1. For PDD-CLI development: Use these issues as requirements for improving code generation
  2. For users: Be aware of these patterns when reviewing PDD-generated code
  3. For testing: The CRM test case serves as a regression suite for PDD improvements

Total Issues: 26 individual bugs across 6 categories
Test Case: CRM application generation for PDD Cloud
Branch: crm_generation
Main Fix Commit: 34a651d5 - "fix: Fix CRM analytics bugs and test failures"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions