Skip to content

Extensionless dev units: update and checkup drift ignore existing Makefile pairing #2000

Description

@Serhan-Asad

Summary

PDD does not consistently resolve extensionless generated artifacts that already have a valid prompt/metadata pairing. A root Makefile paired with prompts/Makefile_makefile.prompt and .pdd/meta/Makefile_makefile.json is treated as an unknown new dev unit by pdd update, while pdd checkup drift cannot locate it even when --code-file Makefile is supplied.

Environment

  • pdd-cli==0.0.290
  • macOS
  • Existing files: Makefile, prompts/Makefile_makefile.prompt, and .pdd/meta/Makefile_makefile.json
  • .pddrc default context is present.

Reproduction 1: update

pdd --force --local update Makefile --git --sync-metadata

Observed:

Regeneration mode: Creating or overwriting prompt from code file.
Created missing prompt file: .../prompts/Makefile_unknown.prompt
Starting agentic update for Makefile_unknown.prompt...

The existing Makefile_makefile.prompt and metadata are not reused.

The explicit two-file form correctly detects the pairing and language:

pdd --force --local update --git --simple --sync-metadata \
  prompts/Makefile_makefile.prompt Makefile
Detected language: makefile
Basename: Makefile

Reproduction 2: checkup drift

pdd checkup drift Makefile --code-file Makefile --dry-run --json

Observed: exit 1 with no JSON report.

Trying the prompt-derived dev-unit name also fails:

pdd --verbose checkup drift Makefile_makefile --code-file Makefile --dry-run
Could not locate generated code for Makefile_makefile.prompt; pass --code-file

The command reports that instruction even though --code-file Makefile was provided.

Expected behavior

  • Single-file commands should consult the existing prompt and .pdd/meta pairing before deriving a language from a filename extension.
  • A root Makefile should resolve to basename Makefile, language makefile, and prompts/Makefile_makefile.prompt.
  • pdd checkup drift ... --code-file Makefile should honor the explicit code path for an extensionless artifact.
  • No orphan Makefile_unknown.prompt should be created.
  • Add deterministic tests for extensionless artifacts and a neighboring normal-extension control.

Duplicate search

Searched open and closed issues for extensionless, Makefile update language, Makefile drift, unknown.prompt, and Could not locate generated code. No issue covering this behavior was found. Issue #436 concerns Makefile generation for pdd connect, not single-file pairing/drift resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions