Skip to content

fix: point pdd-change Step 6 dependency context at <pdd-dependency>, not <include> - #2373

Closed
agarwal-ishaan wants to merge 3 commits into
promptdriven:mainfrom
agarwal-ishaan:fix/issue-1807-pdd-dependency-prompts
Closed

fix: point pdd-change Step 6 dependency context at <pdd-dependency>, not <include>#2373
agarwal-ishaan wants to merge 3 commits into
promptdriven:mainfrom
agarwal-ishaan:fix/issue-1807-pdd-dependency-prompts

Conversation

@agarwal-ishaan

@agarwal-ishaan agarwal-ishaan commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • pdd change Step 6 builds its module-dependency context by scanning <include> tags (build_dependency_graph()), but <include> tags are LLM context, not declared architectural dependencies -- so the graph both misses real <pdd-dependency>-declared dependents and fabricates false ones from stylistic includes.
  • Updates the source prompts to specify a new sync_order.build_dependency_graph_from_architecture() that reads architecture.json's dependencies field (already populated from <pdd-dependency> tags by architecture_sync.py), and wires Step 6's _build_dependency_context() to use it instead.
  • Prompts only in this PR. The corresponding code regeneration (pdd generate --incremental on pdd/sync_order.py and pdd/agentic_change_orchestrator.py) is pending in a follow-up PR -- Anthropic API access is currently blocked by a billing issue, and the fallback Gemini model hits its output-token ceiling trying to patch the ~4000-line orchestrator file. Once resolved, the code PR will implement exactly what's specified here.

Fixes #1807

Test plan

  • Follow-up PR regenerates pdd/sync_order.py and pdd/agentic_change_orchestrator.py from these prompts via pdd generate --incremental
  • Unit tests for build_dependency_graph_from_architecture() and the updated _build_dependency_context()
  • Manual repro: a module declaring <pdd-dependency> on another without <include>-ing it shows up correctly as a dependent; a module <include>-ing another purely for style context does not

…not <include>

Step 6's _build_dependency_context() currently builds its module-dependency
graph by scanning <include> tags (build_dependency_graph()), but <include>
tags are LLM context, not declared architectural dependencies. A module can
truly depend on another via <pdd-dependency> without ever <include>-ing it,
and can <include> another module's example purely for style without
depending on it at all -- so the current graph both misses real dependents
and fabricates false ones.

Updates the source prompts (not the generated code yet) to specify a new
sync_order.build_dependency_graph_from_architecture() that reads
architecture.json's `dependencies` field (already populated from
<pdd-dependency> tags by architecture_sync.py) and wires it into Step 6's
dependency context instead.

Fixes promptdriven#1807

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@agarwal-ishaan

Copy link
Copy Markdown
Author

Consolidating into a single PR per request -- superseded by #2376, which contains this PR's commits plus the rest of the fix. Closing without merging (nothing is lost; #2376's branch includes these exact commits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make prompt files properly use <pdd-dependency> tags and <include> tags so we can trust our architecture.json

1 participant