Skip to content

pdd sync auto-deps fails to include TypeScript type definition files #191

@Serhan-Asad

Description

@Serhan-Asad

Problem

When running pdd sync on TypeScript/React files, the auto-deps step never includes type definition files (e.g., @/types/hackathon.ts) as dependencies, even when the generated code directly depends on interfaces defined there.

This causes the LLM to guess field names instead of reading the actual type definitions, producing code with wrong property names.

Evidence

Synced 14 hackathon frontend pages. Every single file had field name bugs because the LLM never saw the type definitions:

Wrong (guessed) Correct (in types) File
t.memberIds t.members participants/page.tsx
criteriaScores breakdown results/page.tsx
submission.scores submission.aggregatedScore project/page.tsx
startTime / endTime startAt / endAt volunteer/dashboard/page.tsx
completed: boolean completedAt: string | null volunteer/dashboard/page.tsx
event.name event.title schedule/page.tsx
registrationStart registrationOpenAt event detail page
me.status me.applicationStatus volunteer/page.tsx

All of these would have been correct if auto-deps had included frontend/src/types/hackathon.ts.

Expected Behavior

For TypeScript/React projects, auto-deps should:

  1. Detect import ... from '@/types/...' in existing code or prompt
  2. Automatically include type definition files as dependencies
  3. Prioritize type/interface files over random example files

Environment

  • pdd version: latest (cloud mode)
  • Language: TypeScript/React (Next.js)
  • Cost impact: ~$26 for 14 syncs, then manual fix pass to correct all field names

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions