pdd-cli 0.0.33__py3-none-any.whl → 0.0.34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pdd-cli might be problematic. Click here for more details.

pdd/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.0.33"
1
+ __version__ = "0.0.34"
2
2
 
3
3
  # Strength parameter used for LLM extraction across the codebase
4
4
  # Used in postprocessing, XML tagging, code generation, and other extraction operations. The module should have a large context window and be affordable.
pdd/cli.py CHANGED
@@ -194,6 +194,9 @@ def process_commands(ctx: click.Context, results: List[Optional[Tuple[Any, float
194
194
  # Check if it was install_completion (which normally returns None)
195
195
  if command_name == "install_completion":
196
196
  console.print(f" [info]Step {i+1} ({command_name}):[/info] Command completed.")
197
+ # If command name is unknown, and it might be install_completion which prints its own status
198
+ elif command_name.startswith("Unknown Command"):
199
+ console.print(f" [info]Step {i+1} ({command_name}):[/info] Command executed (see output above for status details).")
197
200
  # Check if it was preprocess (which returns a dummy tuple on success)
198
201
  # This case handles actual failure for preprocess
199
202
  elif command_name == "preprocess":
@@ -1070,17 +1073,21 @@ def verify(
1070
1073
  @click.pass_context
1071
1074
  # No @track_cost
1072
1075
  def install_completion_cmd(ctx: click.Context) -> None: # Return type remains None
1073
- """Install shell completion for PDD."""
1074
- quiet = ctx.obj.get("quiet", False)
1075
- command_name = "install_completion"
1076
+ """Install shell completion for the PDD CLI."""
1077
+ command_name = "install_completion" # For error handling
1078
+ quiet_mode = ctx.obj.get("quiet", False) # Get quiet from context
1079
+
1076
1080
  try:
1077
- install_completion(quiet=quiet)
1078
- # Return None on success (as intended)
1079
- return None
1081
+ # The actual install_completion function is imported from .install_completion
1082
+ install_completion(quiet=quiet_mode) # Pass quiet_mode
1083
+ # Success messages are handled within install_completion based on quiet_mode
1084
+ # No need to print additional messages here unless specifically required
1085
+ # if not quiet_mode:
1086
+ # console.print(f"[success]'{command_name}' command completed successfully.[/success]")
1080
1087
  except Exception as e:
1081
- handle_error(e, command_name, quiet)
1082
- # Explicitly return None on failure as well, consistent with other commands
1083
- return None
1088
+ # Use the centralized error handler
1089
+ handle_error(e, command_name, quiet_mode)
1090
+ # Do not return anything, as the callback expects None or a tuple
1084
1091
 
1085
1092
 
1086
1093
  # --- Entry Point ---
pdd/install_completion.py CHANGED
@@ -88,7 +88,7 @@ def get_completion_script_extension(shell: str) -> str:
88
88
  return mapping.get(shell, shell)
89
89
 
90
90
 
91
- def install_completion():
91
+ def install_completion(quiet: bool = False):
92
92
  """
93
93
  Install shell completion for the PDD CLI by detecting the user's shell,
94
94
  copying the relevant completion script, and appending a source command
@@ -97,7 +97,8 @@ def install_completion():
97
97
  shell = get_current_shell()
98
98
  rc_file = get_shell_rc_path(shell)
99
99
  if not rc_file:
100
- rprint(f"[red]Unsupported shell: {shell}[/red]")
100
+ if not quiet:
101
+ rprint(f"[red]Unsupported shell: {shell}[/red]")
101
102
  raise click.Abort()
102
103
 
103
104
  ext = get_completion_script_extension(shell)
@@ -107,7 +108,8 @@ def install_completion():
107
108
  completion_script_path = os.path.join(local_pdd_path, f"pdd_completion.{ext}")
108
109
 
109
110
  if not os.path.exists(completion_script_path):
110
- rprint(f"[red]Completion script not found: {completion_script_path}[/red]")
111
+ if not quiet:
112
+ rprint(f"[red]Completion script not found: {completion_script_path}[/red]")
111
113
  raise click.Abort()
112
114
 
113
115
  source_command = f"source {completion_script_path}"
@@ -115,9 +117,12 @@ def install_completion():
115
117
  try:
116
118
  # Ensure the RC file exists (create if missing).
117
119
  if not os.path.exists(rc_file):
118
- os.makedirs(os.path.dirname(rc_file), exist_ok=True)
120
+ # Create parent directories if they don't exist
121
+ rc_dir = os.path.dirname(rc_file)
122
+ if rc_dir: # Ensure rc_dir is not an empty string (e.g. if rc_file is in current dir)
123
+ os.makedirs(rc_dir, exist_ok=True)
119
124
  with open(rc_file, "w", encoding="utf-8") as cf:
120
- cf.write("")
125
+ cf.write("") # Create an empty file
121
126
 
122
127
  # Read existing content
123
128
  with open(rc_file, "r", encoding="utf-8") as cf:
@@ -126,11 +131,14 @@ def install_completion():
126
131
  if source_command not in content:
127
132
  with open(rc_file, "a", encoding="utf-8") as rf:
128
133
  rf.write(f"\n# PDD CLI completion\n{source_command}\n")
129
-
130
- rprint(f"[green]Shell completion installed for {shell}.[/green]")
131
- rprint(f"Please restart your shell or run 'source {rc_file}' to enable completion.")
134
+
135
+ if not quiet:
136
+ rprint(f"[green]Shell completion installed for {shell}.[/green]")
137
+ rprint(f"Please restart your shell or run 'source {rc_file}' to enable completion.")
132
138
  else:
133
- rprint(f"[yellow]Shell completion already installed for {shell}.[/yellow]")
139
+ if not quiet:
140
+ rprint(f"[yellow]Shell completion already installed for {shell}.[/yellow]")
134
141
  except OSError as exc:
135
- rprint(f"[red]Failed to install shell completion: {exc}[/red]")
142
+ if not quiet:
143
+ rprint(f"[red]Failed to install shell completion: {exc}[/red]")
136
144
  raise click.Abort()
pdd/pdd_completion.fish CHANGED
@@ -3,11 +3,13 @@
3
3
  # Global options
4
4
  complete -c pdd -n "__fish_use_subcommand" -l force -d "Overwrite existing files without confirmation"
5
5
  complete -c pdd -n "__fish_use_subcommand" -l strength -x -d "Set AI model strength (0.0 to 1.0)"
6
+ complete -c pdd -n "__fish_use_subcommand" -l time -x -d "Set AI model reasoning time (0.0 to 1.0)"
6
7
  complete -c pdd -n "__fish_use_subcommand" -l temperature -x -d "Set AI model temperature"
7
8
  complete -c pdd -n "__fish_use_subcommand" -l verbose -d "Increase output verbosity"
8
9
  complete -c pdd -n "__fish_use_subcommand" -l quiet -d "Decrease output verbosity"
9
10
  complete -c pdd -n "__fish_use_subcommand" -l output-cost -r -d "Enable cost tracking and output CSV file"
10
11
  complete -c pdd -n "__fish_use_subcommand" -l review-examples -d "Review few-shot examples before execution"
12
+ complete -c pdd -n "__fish_use_subcommand" -l local -d "Run commands locally"
11
13
  complete -c pdd -n "__fish_use_subcommand" -l help -d "Show help message"
12
14
  complete -c pdd -n "__fish_use_subcommand" -l version -d "Show version information"
13
15
 
@@ -26,9 +28,12 @@ complete -c pdd -n "__fish_use_subcommand" -a crash -d "Fix code causing program
26
28
  complete -c pdd -n "__fish_use_subcommand" -a trace -d "Trace code line to prompt"
27
29
  complete -c pdd -n "__fish_use_subcommand" -a bug -d "Generate unit test from bug report"
28
30
  complete -c pdd -n "__fish_use_subcommand" -a auto-deps -d "Analyze and insert dependencies"
31
+ complete -c pdd -n "__fish_use_subcommand" -a verify -d "Verify functional correctness using LLM judgment"
29
32
 
30
33
  # Command-specific completions
31
34
  complete -c pdd -n "__fish_seen_subcommand_from generate" -l output -r -d "Output location for generated code"
35
+ complete -c pdd -n "__fish_seen_subcommand_from generate" -l original-prompt -r -d "Original prompt file for incremental generation"
36
+ complete -c pdd -n "__fish_seen_subcommand_from generate" -l incremental -d "Force incremental patching"
32
37
  complete -c pdd -n "__fish_seen_subcommand_from generate" -a "(__fish_complete_suffix .prompt)"
33
38
 
34
39
  complete -c pdd -n "__fish_seen_subcommand_from example" -l output -r -d "Output location for example code"
@@ -63,10 +68,67 @@ complete -c pdd -n "__fish_seen_subcommand_from fix" -a "(__fish_complete_suffix
63
68
  complete -c pdd -n "__fish_seen_subcommand_from fix" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)"
64
69
  complete -c pdd -n "__fish_seen_subcommand_from fix" -a "(__fish_complete_suffix .log)"
65
70
 
71
+ complete -c pdd -n "__fish_seen_subcommand_from split" -l output-sub -r -d "Output for sub-prompt file"
72
+ complete -c pdd -n "__fish_seen_subcommand_from split" -l output-modified -r -d "Output for modified prompt file"
73
+ complete -c pdd -n "__fish_seen_subcommand_from split" -a "(__fish_complete_suffix .prompt)"
74
+ complete -c pdd -n "__fish_seen_subcommand_from split" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)" # For INPUT_CODE and EXAMPLE_CODE
75
+
76
+ complete -c pdd -n "__fish_seen_subcommand_from change" -l output -r -d "Output location for modified prompt"
77
+ complete -c pdd -n "__fish_seen_subcommand_from change" -l csv -d "Use CSV for batch changes"
78
+ complete -c pdd -n "__fish_seen_subcommand_from change" -l budget -x -d "Maximum budget for change process"
79
+ complete -c pdd -n "__fish_seen_subcommand_from change" -a "(__fish_complete_suffix .prompt)"
80
+ complete -c pdd -n "__fish_seen_subcommand_from change" -a "(__fish_complete_suffix .csv)" # For the change prompt file if it's a CSV
81
+ complete -c pdd -n "__fish_seen_subcommand_from change" -a "(__fish_complete_path)" # For INPUT_CODE directory or file
82
+
83
+ complete -c pdd -n "__fish_seen_subcommand_from update" -l output -r -d "Output for updated prompt file"
84
+ complete -c pdd -n "__fish_seen_subcommand_from update" -l git -d "Use git history for original code"
85
+ complete -c pdd -n "__fish_seen_subcommand_from update" -a "(__fish_complete_suffix .prompt)"
86
+ complete -c pdd -n "__fish_seen_subcommand_from update" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)" # For MODIFIED_CODE_FILE and INPUT_CODE_FILE
87
+
88
+ complete -c pdd -n "__fish_seen_subcommand_from detect" -l output -r -d "Output CSV for analysis results"
89
+ complete -c pdd -n "__fish_seen_subcommand_from detect" -a "(__fish_complete_suffix .prompt)" # For PROMPT_FILES and CHANGE_FILE
90
+
91
+ complete -c pdd -n "__fish_seen_subcommand_from conflicts" -l output -r -d "Output CSV for conflict analysis"
92
+ complete -c pdd -n "__fish_seen_subcommand_from conflicts" -a "(__fish_complete_suffix .prompt)" # For PROMPT1 and PROMPT2
93
+
94
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -l output -r -d "Output for fixed code file"
95
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -l output-program -r -d "Output for fixed program file"
96
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -l loop -d "Enable iterative fixing"
97
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -l max-attempts -x -d "Maximum fix attempts"
98
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -l budget -x -d "Maximum budget for fixing"
99
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -a "(__fish_complete_suffix .prompt)"
100
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)" # For CODE_FILE and PROGRAM_FILE
101
+ complete -c pdd -n "__fish_seen_subcommand_from crash" -a "(__fish_complete_suffix .log .txt)" # For ERROR_FILE
102
+
103
+ complete -c pdd -n "__fish_seen_subcommand_from trace" -l output -r -d "Output for trace analysis results"
104
+ complete -c pdd -n "__fish_seen_subcommand_from trace" -a "(__fish_complete_suffix .prompt)"
105
+ complete -c pdd -n "__fish_seen_subcommand_from trace" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)" # For CODE_FILE
106
+ # No specific completion for CODE_LINE, it's a number
107
+
108
+ complete -c pdd -n "__fish_seen_subcommand_from bug" -l output -r -d "Output for generated unit test"
109
+ complete -c pdd -n "__fish_seen_subcommand_from bug" -l language -x -d "Programming language for unit test"
110
+ complete -c pdd -n "__fish_seen_subcommand_from bug" -a "(__fish_complete_suffix .prompt)"
111
+ complete -c pdd -n "__fish_seen_subcommand_from bug" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)" # For CODE_FILE and PROGRAM_FILE
112
+ complete -c pdd -n "__fish_seen_subcommand_from bug" -a "(__fish_complete_suffix .txt .log)" # For CURRENT_OUTPUT_FILE and DESIRED_OUTPUT_FILE
113
+
114
+ complete -c pdd -n "__fish_seen_subcommand_from auto-deps" -l output -r -d "Output for modified prompt file"
115
+ complete -c pdd -n "__fish_seen_subcommand_from auto-deps" -l csv -r -d "CSV file for dependency info"
116
+ complete -c pdd -n "__fish_seen_subcommand_from auto-deps" -l force-scan -d "Force rescanning dependencies"
117
+ complete -c pdd -n "__fish_seen_subcommand_from auto-deps" -a "(__fish_complete_suffix .prompt)"
118
+ complete -c pdd -n "__fish_seen_subcommand_from auto-deps" -a "(__fish_complete_path)" # For DIRECTORY_PATH
119
+
120
+ complete -c pdd -n "__fish_seen_subcommand_from verify" -l output-results -r -d "Output for verification results log"
121
+ complete -c pdd -n "__fish_seen_subcommand_from verify" -l output-code -r -d "Output for verified code file"
122
+ complete -c pdd -n "__fish_seen_subcommand_from verify" -l output-program -r -d "Output for verified program file"
123
+ complete -c pdd -n "__fish_seen_subcommand_from verify" -l max-attempts -x -d "Max fix attempts in verification loop"
124
+ complete -c pdd -n "__fish_seen_subcommand_from verify" -l budget -x -d "Max budget for verification and fixing"
125
+ complete -c pdd -n "__fish_seen_subcommand_from verify" -a "(__fish_complete_suffix .prompt)"
126
+ complete -c pdd -n "__fish_seen_subcommand_from verify" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)" # For CODE_FILE and PROGRAM_FILE
127
+
66
128
  # File completion for all commands
67
- complete -c pdd -n "__fish_seen_subcommand_from generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps" -a "(__fish_complete_suffix .prompt)"
68
- complete -c pdd -n "__fish_seen_subcommand_from generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)"
69
- complete -c pdd -n "__fish_seen_subcommand_from generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps" -a "(__fish_complete_suffix .log .txt .csv)"
129
+ complete -c pdd -n "__fish_seen_subcommand_from generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps verify" -a "(__fish_complete_suffix .prompt)"
130
+ complete -c pdd -n "__fish_seen_subcommand_from generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps verify" -a "(__fish_complete_suffix .py .js .java .cpp .rb .go)"
131
+ complete -c pdd -n "__fish_seen_subcommand_from generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps verify" -a "(__fish_complete_suffix .log .txt .csv)"
70
132
 
71
133
  # Help completion
72
- complete -c pdd -n "__fish_seen_subcommand_from help" -a "generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps" -d "Show help for specific command"
134
+ complete -c pdd -n "__fish_seen_subcommand_from help" -a "generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps verify" -d "Show help for specific command"
pdd/pdd_completion.sh CHANGED
@@ -15,19 +15,19 @@ _pdd() {
15
15
  cword=$COMP_CWORD
16
16
 
17
17
  # Global options
18
- local global_opts="--force --strength --temperature --verbose --quiet --output-cost --review-examples --help --version"
18
+ local global_opts="--force --strength --time --temperature --verbose --quiet --output-cost --review-examples --local --help --version"
19
19
 
20
20
  # Commands
21
- local commands="generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps"
21
+ local commands="generate example test preprocess fix split change update detect conflicts crash trace bug auto-deps verify"
22
22
 
23
23
  # Command-specific options
24
- local generate_opts="--output"
24
+ local generate_opts="--output --original-prompt --incremental"
25
25
  local example_opts="--output"
26
26
  local test_opts="--output --language --coverage-report --existing-tests --target-coverage --merge"
27
27
  local preprocess_opts="--output --xml --recursive --double --exclude"
28
28
  local fix_opts="--output-test --output-code --output-results --loop --verification-program --max-attempts --budget --auto-submit"
29
29
  local split_opts="--output-sub --output-modified"
30
- local change_opts="--output --csv"
30
+ local change_opts="--output --csv --budget"
31
31
  local update_opts="--output --git"
32
32
  local detect_opts="--output"
33
33
  local conflicts_opts="--output"
@@ -35,6 +35,7 @@ _pdd() {
35
35
  local trace_opts="--output"
36
36
  local bug_opts="--output --language"
37
37
  local auto_deps_opts="--output --csv --force-scan"
38
+ local verify_opts="--output-results --output-code --output-program --max-attempts --budget"
38
39
 
39
40
  # Complete global options before command
40
41
  if [[ $cword -eq 1 ]]; then
@@ -78,23 +79,26 @@ _pdd() {
78
79
  change)
79
80
  _complete_files ".prompt"
80
81
  _complete_files
81
- _complete_files
82
+ if [[ $prev != "--csv" && ${COMP_WORDS[COMP_CWORD-2]} != "--csv" ]]; then
83
+ _complete_files ".prompt"
84
+ fi
82
85
  COMPREPLY+=($(compgen -W "$change_opts" -- "$cur"))
83
86
  ;;
84
87
  update)
85
88
  _complete_files ".prompt"
86
89
  _complete_files
87
- _complete_files
90
+ if [[ ! " ${words[@]} " =~ " --git " ]]; then
91
+ _complete_files
92
+ fi
88
93
  COMPREPLY+=($(compgen -W "$update_opts" -- "$cur"))
89
94
  ;;
90
95
  detect)
91
96
  _complete_files ".prompt"
92
- _complete_files
93
97
  COMPREPLY+=($(compgen -W "$detect_opts" -- "$cur"))
94
98
  ;;
95
99
  conflicts)
96
100
  _complete_files ".prompt"
97
- _complete_files
101
+ _complete_files ".prompt"
98
102
  COMPREPLY+=($(compgen -W "$conflicts_opts" -- "$cur"))
99
103
  ;;
100
104
  crash)
@@ -121,6 +125,12 @@ _pdd() {
121
125
  _complete_files ".prompt"
122
126
  COMPREPLY+=($(compgen -W "$auto_deps_opts" -- "$cur"))
123
127
  ;;
128
+ verify)
129
+ _complete_files ".prompt"
130
+ _complete_files
131
+ _complete_files
132
+ COMPREPLY+=($(compgen -W "$verify_opts" -- "$cur"))
133
+ ;;
124
134
  *)
125
135
  COMPREPLY=($(compgen -W "$global_opts" -- "$cur"))
126
136
  ;;
@@ -130,12 +140,21 @@ _pdd() {
130
140
  _complete_files() {
131
141
  local ext=$1
132
142
  local files
143
+ if [[ "$cur" == -* ]]; then
144
+ return
145
+ fi
146
+
133
147
  if [[ -n $ext ]]; then
134
- files=$(compgen -f -X "!*$ext" -- "$cur")
148
+ files=$(compgen -f -X "!*${ext}" -- "$cur")
149
+ COMPREPLY+=($(compgen -f -o plusdirs -X "!*${ext}" -- "$cur" | awk -v e="$ext" '$0 ~ e"$"{ COMPREPLY+=($0) }'))
150
+ files=$(echo "${files}" | awk '!seen[$0]++')
151
+
135
152
  else
136
- files=$(compgen -f -- "$cur")
153
+ files=$(compgen -f -o plusdirs -- "$cur")
154
+ fi
155
+ if [[ -n "$files" ]]; then
156
+ COMPREPLY+=($(compgen -W "$files" -- "$cur"))
137
157
  fi
138
- COMPREPLY+=($(compgen -W "$files" -- "$cur"))
139
158
  }
140
159
 
141
160
  complete -F _pdd pdd
pdd/pdd_completion.zsh CHANGED
@@ -50,11 +50,13 @@ local -a _pdd_global_opts
50
50
  _pdd_global_opts=(
51
51
  '--force[Overwrite existing files without asking for confirmation.]'
52
52
  '--strength[Set the strength of the AI model (0.0 to 1.0, default: 0.5)]:strength:(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0)'
53
+ '--time[Controls the reasoning allocation for LLM models (0.0 to 1.0, default: 0.25)]:time:(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0)'
53
54
  '--temperature[Set the temperature of the AI model (default: 0.0)]:temperature:(0.0 0.25 0.5 0.75 1.0)'
54
55
  '--verbose[Increase output verbosity for more detailed information.]'
55
56
  '--quiet[Decrease output verbosity (minimal information).]'
56
57
  '--output-cost[Enable cost tracking and output a CSV file with usage details.]:filename:_files'
57
58
  '--review-examples[Review and optionally exclude few-shot examples before command execution.]'
59
+ '--local[Run commands locally instead of in the cloud.]'
58
60
  '--help[Show help message and exit.]'
59
61
  '--version[Show version and exit.]'
60
62
  )
@@ -73,6 +75,8 @@ _pdd_generate() {
73
75
  _arguments -s \
74
76
  $_pdd_global_opts \
75
77
  '--output=[Specify where to save the generated code.]:filename:_files' \
78
+ '--original-prompt=[The original prompt file used to generate existing code.]:filename:_files' \
79
+ '--incremental[Force incremental patching even if changes are significant.]' \
76
80
  '1:prompt-file:_files' \
77
81
  '*:filename:_files'
78
82
  }
@@ -209,6 +213,7 @@ _pdd_change() {
209
213
  $_pdd_global_opts \
210
214
  '--output=[Where to save the modified prompt file.]:filename:_files' \
211
215
  '--csv[Use a CSV file for batch changes (columns: prompt_name, change_instructions).]' \
216
+ '--budget=[Maximum cost allowed for the change process (default 5.0)]:float' \
212
217
  '1:change-prompt-file:_files' \
213
218
  '2:input-code:_files' \
214
219
  '3:optional-prompt-file:_files' \
@@ -356,6 +361,32 @@ _pdd_auto_deps() {
356
361
  '*:filename:_files'
357
362
  }
358
363
 
364
+ # verify
365
+ # Usage: pdd [GLOBAL OPTIONS] verify [OPTIONS] PROMPT_FILE CODE_FILE PROGRAM_FILE
366
+ # Options:
367
+ # --output-results [LOCATION]
368
+ # --output-code [LOCATION]
369
+ # --output-program [LOCATION]
370
+ # --max-attempts [INT]
371
+ # --budget [FLOAT]
372
+ # Args:
373
+ # 1: PROMPT_FILE
374
+ # 2: CODE_FILE
375
+ # 3: PROGRAM_FILE
376
+ _pdd_verify() {
377
+ _arguments -s \
378
+ $_pdd_global_opts \
379
+ '--output-results=[Where to save verification and fixing results log.]:filename:_files' \
380
+ '--output-code=[Where to save the successfully verified code file.]:filename:_files' \
381
+ '--output-program=[Where to save the successfully verified program file.]:filename:_files' \
382
+ '--max-attempts=[Maximum fix attempts in verification loop (default 3)]:int' \
383
+ '--budget=[Maximum cost for verification and fixing (default 5.0)]:float' \
384
+ '1:prompt-file:_files' \
385
+ '2:code-file:_files' \
386
+ '3:program-file:_files' \
387
+ '*:filename:_files'
388
+ }
389
+
359
390
  ##
360
391
  # Main PDD completion dispatcher
361
392
  ##
@@ -380,6 +411,7 @@ _pdd() {
380
411
  'trace:Find the prompt file line number associated with a code line'
381
412
  'bug:Generate a unit test based on incorrect vs desired outputs'
382
413
  'auto-deps:Analyze a prompt file and directory for needed dependencies'
414
+ 'verify:Verify functional correctness using LLM judgment and iteratively fix'
383
415
  )
384
416
 
385
417
  # If there's no subcommand yet (i.e., user typed only "pdd " or "pdd -<Tab>"), offer global opts or subcommands.
@@ -436,6 +468,9 @@ _pdd() {
436
468
  auto-deps)
437
469
  _pdd_auto_deps
438
470
  ;;
471
+ verify)
472
+ _pdd_verify
473
+ ;;
439
474
  # If the subcommand is unknown or not typed yet, fall back to showing the list of subcommands.
440
475
  *)
441
476
  _describe -t subcommands 'pdd subcommand' _pdd_subcommands
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdd-cli
3
- Version: 0.0.33
3
+ Version: 0.0.34
4
4
  Summary: PDD (Prompt-Driven Development) Command Line Interface
5
5
  Author: Greg Tanaka
6
6
  Author-email: glt@alumni.caltech.edu
@@ -46,9 +46,13 @@ Requires-Dist: pytest-asyncio; extra == "dev"
46
46
  Requires-Dist: z3-solver; extra == "dev"
47
47
  Dynamic: license-file
48
48
 
49
- .. image:: https://img.shields.io/badge/pdd--cli-v0.0.33-blue
49
+ .. image:: https://img.shields.io/badge/pdd--cli-v0.0.34-blue
50
50
  :alt: PDD-CLI Version
51
51
 
52
+ .. image:: https://img.shields.io/badge/Discord-join%20chat-7289DA.svg?logo=discord&logoColor=white&link=https://discord.gg/Yp4RTh8bG7
53
+ :alt: Join us on Discord
54
+ :target: https://discord.gg/Yp4RTh8bG7
55
+
52
56
  PDD (Prompt-Driven Development) Command Line Interface
53
57
  ======================================================
54
58
 
@@ -130,7 +134,7 @@ After installation, verify:
130
134
 
131
135
  pdd --version
132
136
 
133
- You'll see the current PDD version (e.g., 0.0.33).
137
+ You'll see the current PDD version (e.g., 0.0.34).
134
138
 
135
139
  Advanced Installation Tips
136
140
  --------------------------
@@ -1,4 +1,4 @@
1
- pdd/__init__.py,sha256=Dz0E3y_UahIvzJmwRPuYlso-fufI57LqGEq8bmJDJEE,632
1
+ pdd/__init__.py,sha256=bBnNpQn3DLgqp8-jon-Ht7N0S9jfAWVFwaoxPpKzEPI,632
2
2
  pdd/auto_deps_main.py,sha256=NVLqL5FHxe2eorViXTuh8z2zH9Sb-b6MNN9aZ1hqevY,3552
3
3
  pdd/auto_include.py,sha256=aCa2QXDlOdKbh4vS3uDjWptkHB_Qv3QBNCbZe6mGWoo,6074
4
4
  pdd/auto_update.py,sha256=Pfav1hrqQIDjZIPuIvryBeM7k-Rc72feVUTJZPtigaU,2889
@@ -6,7 +6,7 @@ pdd/bug_main.py,sha256=cSGBnHmFIA8WrkGiohJFVRuM2086v-wlPvTJqTv00WQ,4631
6
6
  pdd/bug_to_unit_test.py,sha256=oejqoKomLseKknYDFlQKQ04TNT3soqOjMPghxty8Guo,6311
7
7
  pdd/change.py,sha256=EKmv7WvXNX24rjLCnrcaoo4xOVkNhCa9HLRbpMAxQSw,5036
8
8
  pdd/change_main.py,sha256=Tk0aHY8Z2d-d0m7lLfc_HqgOqs4x_dJD1IrVZSxuxIM,25580
9
- pdd/cli.py,sha256=VFoyx3iJmFeHCc4HhOc_7tiz3FY9oJjCUtS9PR1wwl0,38341
9
+ pdd/cli.py,sha256=xXj88OFD74T6Cb8ySHXwwVnFNl-oD0YNi02geyCTjf4,39072
10
10
  pdd/cmd_test_main.py,sha256=aSCxRnSurg15AvPcJDAPp9xy8p_qqnjU1oV14Hi2R54,5301
11
11
  pdd/code_generator.py,sha256=DqQNN6jCNjSJvHi0IFyqkSfak6LeDG-yQHPYnvd4AJQ,4424
12
12
  pdd/code_generator_main.py,sha256=oCI35RqQ7gBov8mncVg1mhdDNX-0jTsoIeSzrz7WpAk,25109
@@ -40,13 +40,13 @@ pdd/git_update.py,sha256=Ya7eI7YFtGIpT7FdziFJfnFkiZlj8I9Lh98lqtXfClc,2855
40
40
  pdd/increase_tests.py,sha256=dlYd9PosV3g8kpDlQh6gd8WUauClvs_-Z8ERRD-kZk4,3456
41
41
  pdd/incremental_code_generator.py,sha256=cWo3DJ0PybnrepFEAMibGjTVY3T8mLVvPt5W8cNhuxU,9402
42
42
  pdd/insert_includes.py,sha256=UASoq_46UNL6l7VGB7DW2jb4kcWlP6Hbj2EWuh7210Q,5310
43
- pdd/install_completion.py,sha256=H_FIid0eHCn7I6HHIsBqdComAxjLIu7CbD6yfMU48aw,5085
43
+ pdd/install_completion.py,sha256=bLMJuMOBDvsEnDAUpgiPesNRGhY_IvBvz8ZvmbTzP4o,5472
44
44
  pdd/llm_invoke.py,sha256=457rD3f7KQHJ3BtI4boxTurArCww2zWAl4X77TxVROs,65788
45
45
  pdd/load_prompt_template.py,sha256=4NH8_t5eon_vcyTznqtemJ_yAPkTJm_hSdTRgzj3qEQ,1907
46
46
  pdd/mcp_config.json,sha256=D3ctWHlShvltbtH37zbYb6smVE0V80_lGjDKDIqsSBE,124
47
- pdd/pdd_completion.fish,sha256=rs-43fa3kcDBN1uy4oxiofLAWmaqW0U2j5Mu4wCHh5M,6121
48
- pdd/pdd_completion.sh,sha256=qurWrEksqptjryBZszxHv6i0MqgnIqJenMBDrzMgI98,4535
49
- pdd/pdd_completion.zsh,sha256=-yz69Rs4lnJ-bRAF8H2Tzk0GuDUo-BWjytE3fv5wTS8,13458
47
+ pdd/pdd_completion.fish,sha256=XgtbuPV11pB8urYXhbpXhWuwKAVLpiAJxOMIes5CV-8,11884
48
+ pdd/pdd_completion.sh,sha256=e0K4Ai1yJRj6Fd6Qpk-brAEicW3ciPSyIuNMQkSG5mI,5342
49
+ pdd/pdd_completion.zsh,sha256=WPcz7BzvjDRmcEZfL-kFvhYmUtz2BHxJK_r3_cPa478,14966
50
50
  pdd/postprocess.py,sha256=jWJSUPP7bDChyTEek35UOdy6fhU6c5EoDSoMypGwIdE,4402
51
51
  pdd/postprocess_0.py,sha256=OW17GyCFLYErCyWh2tL4syuho3q2yFf2wyekQ4BLdPM,2168
52
52
  pdd/preprocess.py,sha256=UB1rqSNscUC-JHujvGb11LJ5OadZ3GVD1Qeq1dI6HMc,9508
@@ -101,9 +101,9 @@ pdd/prompts/trim_results_start_LLM.prompt,sha256=OKz8fAf1cYWKWgslFOHEkUpfaUDARh3
101
101
  pdd/prompts/unfinished_prompt_LLM.prompt,sha256=-JgBpiPTQZdWOAwOG1XpfpD9waynFTAT3Jo84eQ4bTw,1543
102
102
  pdd/prompts/update_prompt_LLM.prompt,sha256=prIc8uLp2jqnLTHt6JvWDZGanPZipivhhYeXe0lVaYw,1328
103
103
  pdd/prompts/xml_convertor_LLM.prompt,sha256=YGRGXJeg6EhM9690f-SKqQrKqSJjLFD51UrPOlO0Frg,2786
104
- pdd_cli-0.0.33.dist-info/licenses/LICENSE,sha256=-1bjYH-CEjGEQ8VixtnRYuu37kN6F9NxmZSDkBuUQ9o,1062
105
- pdd_cli-0.0.33.dist-info/METADATA,sha256=3YpnYiyxVO4po25BTjUXzs-ara96spnI4RSnoOMx3X0,7778
106
- pdd_cli-0.0.33.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
107
- pdd_cli-0.0.33.dist-info/entry_points.txt,sha256=Kr8HtNVb8uHZtQJNH4DnF8j7WNgWQbb7_Pw5hECSR-I,36
108
- pdd_cli-0.0.33.dist-info/top_level.txt,sha256=xjnhIACeMcMeDfVNREgQZl4EbTni2T11QkL5r7E-sbE,4
109
- pdd_cli-0.0.33.dist-info/RECORD,,
104
+ pdd_cli-0.0.34.dist-info/licenses/LICENSE,sha256=-1bjYH-CEjGEQ8VixtnRYuu37kN6F9NxmZSDkBuUQ9o,1062
105
+ pdd_cli-0.0.34.dist-info/METADATA,sha256=rU1Yu_F0B5Z0eR7ms1PPzZPlVTY6CQ2L3lLsjuvw4wY,7984
106
+ pdd_cli-0.0.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
+ pdd_cli-0.0.34.dist-info/entry_points.txt,sha256=Kr8HtNVb8uHZtQJNH4DnF8j7WNgWQbb7_Pw5hECSR-I,36
108
+ pdd_cli-0.0.34.dist-info/top_level.txt,sha256=xjnhIACeMcMeDfVNREgQZl4EbTni2T11QkL5r7E-sbE,4
109
+ pdd_cli-0.0.34.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5