pdd sync command automates the complete development cycle for a single module. Understanding what each step does — and when to run steps manually — gives you precise control over generation quality.
The 8-step sync cycle
When you runpdd sync <basename>, PDD executes these steps in order, skipping steps whose outputs are already up to date:
auto-deps
Scans example and documentation files to find relevant dependencies. Inserts
<include> directives into the prompt and removes redundant inline content that duplicates what the included files already provide.generate
Creates or updates the code module from the prompt. Uses git-based change detection to decide between incremental patching and full regeneration.
example
Generates a compact usage example for the module. This example acts as a lightweight interface reference for other prompts and as the runnable program for crash and verify.
crash
Runs the example program. If it crashes, iteratively fixes runtime errors in the code and example until the program executes without errors.
verify
Runs the example program and uses an LLM to judge whether the output matches the prompt’s intent. Iteratively fixes the code if the output diverges.
test
Generates comprehensive unit tests if they don’t exist yet, or augments existing ones when coverage is below target. Tests accumulate over time — they are never overwritten.
fix
Runs the test suite. Iteratively fixes failing tests through multiple attempts, with an agentic fallback for particularly difficult bugs.
Running a full sync
Inspect state without running
Use--dry-run to see what sync would do right now, without acquiring locks or executing operations:
Running steps manually
Every step in the sync cycle is also a standalone command. Run individual steps when you need surgical control:Workflow selection by development phase
Choose the right workflow based on what you’re trying to accomplish:Creation
Initial Development workflowStart from a new prompt and run
pdd sync to generate all artifacts. Sync detects that no outputs exist and runs every step.Maintenance
Code-to-Prompt Update (
pdd update)When code changes outside of PDD (e.g., a manual edit), sync the prompt back to match. Run repository-wide or on a single file.Problem-solving
Debug workflows
| Issue type | Command |
|---|---|
| Runtime crash | pdd crash |
| Test failures | pdd fix |
| Wrong behavior | pdd verify |
| Locate bug in prompt | pdd trace |
Restructuring
Refactoring workflow (
pdd split)When a prompt grows too large, split it into a parent and sub-module with an explicit interface.System design
Multi-Prompt ArchitectureGenerate architecture, Then sync each module:
.pddrc, and prompt files for an entire project from a GitHub PRD issue:Full example: syncing basename through the cycle
This walkthrough follows a module called basename (a Python file path utility) from prompt to passing tests.
Agentic multi-module sync
Pass a GitHub issue URL instead of a basename to sync all modules affected by that issue in parallel:architecture.json dependencies, and dispatches up to 4 concurrent sync workers. Progress is posted as a live GitHub issue comment.
State is stored in a hidden GitHub comment for cross-machine resume. Use
--no-github-state to disable cloud state persistence.