pdd-cli 0.0.32__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 +1 -1
- pdd/cli.py +16 -9
- pdd/code_generator_main.py +98 -14
- pdd/context_generator.py +0 -5
- pdd/context_generator_main.py +2 -1
- pdd/data/language_format.csv +1 -0
- pdd/install_completion.py +18 -10
- pdd/pdd_completion.fish +66 -4
- pdd/pdd_completion.sh +30 -11
- pdd/pdd_completion.zsh +35 -0
- pdd/postprocess.py +10 -5
- {pdd_cli-0.0.32.dist-info → pdd_cli-0.0.34.dist-info}/METADATA +7 -3
- {pdd_cli-0.0.32.dist-info → pdd_cli-0.0.34.dist-info}/RECORD +17 -17
- {pdd_cli-0.0.32.dist-info → pdd_cli-0.0.34.dist-info}/WHEEL +1 -1
- {pdd_cli-0.0.32.dist-info → pdd_cli-0.0.34.dist-info}/entry_points.txt +0 -0
- {pdd_cli-0.0.32.dist-info → pdd_cli-0.0.34.dist-info}/licenses/LICENSE +0 -0
- {pdd_cli-0.0.32.dist-info → pdd_cli-0.0.34.dist-info}/top_level.txt +0 -0
pdd/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
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
|
-
|
|
1075
|
-
|
|
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
|
|
1078
|
-
#
|
|
1079
|
-
|
|
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
|
-
|
|
1082
|
-
|
|
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/code_generator_main.py
CHANGED
|
@@ -27,7 +27,7 @@ PDD_APP_NAME = "PDD Code Generator"
|
|
|
27
27
|
|
|
28
28
|
# Cloud function URL
|
|
29
29
|
CLOUD_GENERATE_URL = "https://us-central1-prompt-driven-development.cloudfunctions.net/generateCode"
|
|
30
|
-
CLOUD_REQUEST_TIMEOUT =
|
|
30
|
+
CLOUD_REQUEST_TIMEOUT = 400 # seconds
|
|
31
31
|
|
|
32
32
|
console = Console()
|
|
33
33
|
|
|
@@ -59,8 +59,8 @@ def is_git_repository(path: Optional[str] = None) -> bool:
|
|
|
59
59
|
return False
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
def
|
|
63
|
-
"""Gets the content of the file as it was
|
|
62
|
+
def get_git_content_at_ref(file_path: str, git_ref: str = "HEAD") -> Optional[str]:
|
|
63
|
+
"""Gets the content of the file as it was at the specified git_ref."""
|
|
64
64
|
abs_file_path = pathlib.Path(file_path).resolve()
|
|
65
65
|
if not is_git_repository(str(abs_file_path.parent)):
|
|
66
66
|
return None
|
|
@@ -77,13 +77,13 @@ def get_git_committed_content(file_path: str) -> Optional[str]:
|
|
|
77
77
|
# console.print(f"[yellow]File {file_path} is not under git root {git_root}.[/yellow]")
|
|
78
78
|
return None
|
|
79
79
|
|
|
80
|
-
returncode, stdout, stderr = _run_git_command(["git", "show", f"
|
|
80
|
+
returncode, stdout, stderr = _run_git_command(["git", "show", f"{git_ref}:{relative_path.as_posix()}"], cwd=str(git_root))
|
|
81
81
|
if returncode == 0:
|
|
82
82
|
return stdout
|
|
83
83
|
else:
|
|
84
|
-
# File might
|
|
85
|
-
# if "does not exist" not in stderr and "exists on disk, but not in
|
|
86
|
-
# console.print(f"[yellow]Git (show) warning for {file_path}: {stderr}[/yellow]")
|
|
84
|
+
# File might not exist at that ref, or other git error.
|
|
85
|
+
# if "does not exist" not in stderr and "exists on disk, but not in" not in stderr and console.is_terminal: # Be less noisy for common cases
|
|
86
|
+
# console.print(f"[yellow]Git (show) warning for {file_path} at {git_ref}: {stderr}[/yellow]")
|
|
87
87
|
return None
|
|
88
88
|
|
|
89
89
|
def get_file_git_status(file_path: str) -> str:
|
|
@@ -192,14 +192,98 @@ def code_generator_main(
|
|
|
192
192
|
if verbose:
|
|
193
193
|
console.print(f"Using specified original prompt: [cyan]{original_prompt_file_path}[/cyan]")
|
|
194
194
|
elif is_git_repository(str(pathlib.Path(prompt_file).parent)):
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
# prompt_content is the current on-disk version
|
|
196
|
+
head_prompt_content = get_git_content_at_ref(prompt_file, git_ref="HEAD")
|
|
197
|
+
|
|
198
|
+
if head_prompt_content is not None:
|
|
199
|
+
# Compare on-disk content (prompt_content) with HEAD content
|
|
200
|
+
if prompt_content.strip() != head_prompt_content.strip():
|
|
201
|
+
# Uncommitted changes exist. Original is HEAD, new is on-disk.
|
|
202
|
+
original_prompt_content_for_incremental = head_prompt_content
|
|
203
|
+
can_attempt_incremental = True
|
|
204
|
+
if verbose:
|
|
205
|
+
console.print(f"On-disk [cyan]{prompt_file}[/cyan] has uncommitted changes. Using HEAD version as original prompt.")
|
|
206
|
+
else:
|
|
207
|
+
# On-disk is identical to HEAD. Search for a prior *different* version.
|
|
208
|
+
if verbose:
|
|
209
|
+
console.print(f"On-disk [cyan]{prompt_file}[/cyan] matches HEAD. Searching for a prior *different* version as original prompt.")
|
|
210
|
+
|
|
211
|
+
new_prompt_candidate = head_prompt_content # This is also prompt_content (on-disk)
|
|
212
|
+
found_different_prior = False
|
|
213
|
+
|
|
214
|
+
git_root_path_obj: Optional[pathlib.Path] = None
|
|
215
|
+
prompt_file_rel_to_root_str: Optional[str] = None
|
|
216
|
+
|
|
217
|
+
try:
|
|
218
|
+
abs_prompt_file_path = pathlib.Path(prompt_file).resolve()
|
|
219
|
+
temp_git_root_rc, temp_git_root_str, temp_git_root_stderr = _run_git_command(
|
|
220
|
+
["git", "rev-parse", "--show-toplevel"],
|
|
221
|
+
cwd=str(abs_prompt_file_path.parent)
|
|
222
|
+
)
|
|
223
|
+
if temp_git_root_rc == 0:
|
|
224
|
+
git_root_path_obj = pathlib.Path(temp_git_root_str)
|
|
225
|
+
prompt_file_rel_to_root_str = abs_prompt_file_path.relative_to(git_root_path_obj).as_posix()
|
|
226
|
+
elif verbose:
|
|
227
|
+
console.print(f"[yellow]Git (rev-parse) failed for {prompt_file}: {temp_git_root_stderr}. Cannot search history for prior different version.[/yellow]")
|
|
228
|
+
|
|
229
|
+
except ValueError: # If file is not under git root
|
|
230
|
+
if verbose:
|
|
231
|
+
console.print(f"[yellow]File {prompt_file} not under a detected git root. Cannot search history.[/yellow]")
|
|
232
|
+
except Exception as e_git_setup:
|
|
233
|
+
if verbose:
|
|
234
|
+
console.print(f"[yellow]Error setting up git info for {prompt_file}: {e_git_setup}. Cannot search history.[/yellow]")
|
|
235
|
+
|
|
236
|
+
if git_root_path_obj and prompt_file_rel_to_root_str:
|
|
237
|
+
MAX_COMMITS_TO_SEARCH = 10 # How far back to look
|
|
238
|
+
log_cmd = ["git", "log", f"--pretty=format:%H", f"-n{MAX_COMMITS_TO_SEARCH}", "--", prompt_file_rel_to_root_str]
|
|
239
|
+
|
|
240
|
+
log_rc, log_stdout, log_stderr = _run_git_command(log_cmd, cwd=str(git_root_path_obj))
|
|
241
|
+
|
|
242
|
+
if log_rc == 0 and log_stdout.strip():
|
|
243
|
+
shas = log_stdout.strip().split('\\n')
|
|
244
|
+
if verbose:
|
|
245
|
+
console.print(f"Found {len(shas)} commits for [cyan]{prompt_file_rel_to_root_str}[/cyan] in recent history (up to {MAX_COMMITS_TO_SEARCH}).")
|
|
246
|
+
|
|
247
|
+
if len(shas) > 1: # Need at least one commit before the one matching head_prompt_content
|
|
248
|
+
for prior_sha in shas[1:]: # Iterate starting from the commit *before* HEAD's version of the file
|
|
249
|
+
if verbose:
|
|
250
|
+
console.print(f" Checking commit {prior_sha[:7]} for content of [cyan]{prompt_file}[/cyan]...")
|
|
251
|
+
|
|
252
|
+
# get_git_content_at_ref uses the original prompt_file path,
|
|
253
|
+
# which it resolves internally relative to the git root.
|
|
254
|
+
prior_content = get_git_content_at_ref(prompt_file, prior_sha)
|
|
255
|
+
|
|
256
|
+
if prior_content is not None:
|
|
257
|
+
if prior_content.strip() != new_prompt_candidate.strip():
|
|
258
|
+
original_prompt_content_for_incremental = prior_content
|
|
259
|
+
can_attempt_incremental = True
|
|
260
|
+
found_different_prior = True
|
|
261
|
+
if verbose:
|
|
262
|
+
console.print(f" [green]Found prior different version at commit {prior_sha[:7]}. Using as original prompt.[/green]")
|
|
263
|
+
break
|
|
264
|
+
elif verbose:
|
|
265
|
+
console.print(f" Content at {prior_sha[:7]} is identical to current HEAD. Skipping.")
|
|
266
|
+
elif verbose:
|
|
267
|
+
console.print(f" Could not retrieve content for [cyan]{prompt_file}[/cyan] at commit {prior_sha[:7]}.")
|
|
268
|
+
else:
|
|
269
|
+
if verbose:
|
|
270
|
+
console.print(f" File [cyan]{prompt_file_rel_to_root_str}[/cyan] has less than 2 versions in recent history at this path.")
|
|
271
|
+
elif verbose:
|
|
272
|
+
console.print(f"[yellow]Git (log) failed for {prompt_file_rel_to_root_str} or no history found: {log_stderr}[/yellow]")
|
|
273
|
+
|
|
274
|
+
if not found_different_prior:
|
|
275
|
+
original_prompt_content_for_incremental = new_prompt_candidate
|
|
276
|
+
can_attempt_incremental = True
|
|
277
|
+
if verbose:
|
|
278
|
+
console.print(
|
|
279
|
+
f"[yellow]Warning: Could not find a prior *different* version of {prompt_file} "
|
|
280
|
+
f"within the last {MAX_COMMITS_TO_SEARCH if git_root_path_obj else 'N/A'} relevant commits. "
|
|
281
|
+
f"Using current HEAD version as original (prompts will be identical).[/yellow]"
|
|
282
|
+
)
|
|
283
|
+
else:
|
|
284
|
+
# File not in HEAD, cannot determine git-based original prompt.
|
|
199
285
|
if verbose:
|
|
200
|
-
console.print(f"
|
|
201
|
-
elif verbose:
|
|
202
|
-
console.print(f"[yellow]Warning: Could not find committed version of {prompt_file} in git for incremental generation.[/yellow]")
|
|
286
|
+
console.print(f"[yellow]Warning: Could not find committed version of {prompt_file} in git (HEAD) for incremental generation.[/yellow]")
|
|
203
287
|
|
|
204
288
|
if force_incremental_flag and existing_code_content:
|
|
205
289
|
if not (original_prompt_content_for_incremental or "original_prompt_file" in input_strings): # Check if original prompt is actually available
|
pdd/context_generator.py
CHANGED
|
@@ -33,11 +33,6 @@ def context_generator(code_module: str, prompt: str, language: str = "python", s
|
|
|
33
33
|
print("[red]Error: prompt is missing.[/red]")
|
|
34
34
|
return None, 0.0, None
|
|
35
35
|
|
|
36
|
-
supported_languages = ["python", "javascript", "java"]
|
|
37
|
-
if language not in supported_languages:
|
|
38
|
-
if verbose:
|
|
39
|
-
print(f"[red]Error: Unsupported language '{language}'.[/red]")
|
|
40
|
-
return None, 0.0, None
|
|
41
36
|
|
|
42
37
|
if not (0 <= strength <= 1):
|
|
43
38
|
if verbose:
|
pdd/context_generator_main.py
CHANGED
|
@@ -25,7 +25,7 @@ def context_generator_main(ctx: click.Context, prompt_file: str, code_file: str,
|
|
|
25
25
|
command_options = {
|
|
26
26
|
"output": output
|
|
27
27
|
}
|
|
28
|
-
input_strings, output_file_paths,
|
|
28
|
+
input_strings, output_file_paths, language = construct_paths(
|
|
29
29
|
input_file_paths=input_file_paths,
|
|
30
30
|
force=ctx.obj.get('force', False),
|
|
31
31
|
quiet=ctx.obj.get('quiet', False),
|
|
@@ -41,6 +41,7 @@ def context_generator_main(ctx: click.Context, prompt_file: str, code_file: str,
|
|
|
41
41
|
strength = ctx.obj.get('strength', 0.5)
|
|
42
42
|
temperature = ctx.obj.get('temperature', 0)
|
|
43
43
|
example_code, total_cost, model_name = context_generator(
|
|
44
|
+
language=language,
|
|
44
45
|
code_module=code_content,
|
|
45
46
|
prompt=prompt_content,
|
|
46
47
|
strength=strength,
|
pdd/data/language_format.csv
CHANGED
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
131
|
-
|
|
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
|
-
|
|
139
|
+
if not quiet:
|
|
140
|
+
rprint(f"[yellow]Shell completion already installed for {shell}.[/yellow]")
|
|
134
141
|
except OSError as exc:
|
|
135
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
pdd/postprocess.py
CHANGED
|
@@ -3,6 +3,7 @@ from rich import print
|
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
from .load_prompt_template import load_prompt_template
|
|
5
5
|
from .llm_invoke import llm_invoke
|
|
6
|
+
from . import DEFAULT_TIME
|
|
6
7
|
|
|
7
8
|
class ExtractedCode(BaseModel):
|
|
8
9
|
"""Pydantic model for the extracted code."""
|
|
@@ -18,12 +19,13 @@ def postprocess_0(text: str) -> str:
|
|
|
18
19
|
in_code_block = False
|
|
19
20
|
|
|
20
21
|
for line in lines:
|
|
21
|
-
if line.startswith('```')
|
|
22
|
+
if '```' in line: # MODIFIED: Was line.startswith('```')
|
|
22
23
|
if not in_code_block:
|
|
23
|
-
# Skip the language identifier line
|
|
24
|
+
# Skip the language identifier line / content on opening delimiter line
|
|
24
25
|
in_code_block = True
|
|
25
26
|
continue
|
|
26
27
|
else:
|
|
28
|
+
# Content on closing delimiter line is skipped
|
|
27
29
|
in_code_block = False
|
|
28
30
|
continue
|
|
29
31
|
if in_code_block:
|
|
@@ -36,6 +38,7 @@ def postprocess(
|
|
|
36
38
|
language: str,
|
|
37
39
|
strength: float = 0.9,
|
|
38
40
|
temperature: float = 0,
|
|
41
|
+
time: float = DEFAULT_TIME,
|
|
39
42
|
verbose: bool = False
|
|
40
43
|
) -> Tuple[str, float, str]:
|
|
41
44
|
"""
|
|
@@ -46,6 +49,7 @@ def postprocess(
|
|
|
46
49
|
language (str): The programming language of the code to extract
|
|
47
50
|
strength (float): The strength of the LLM model to use (0-1)
|
|
48
51
|
temperature (float): The temperature parameter for the LLM (0-1)
|
|
52
|
+
time (float): The thinking effort for the LLM model (0-1)
|
|
49
53
|
verbose (bool): Whether to print detailed processing information
|
|
50
54
|
|
|
51
55
|
Returns:
|
|
@@ -87,6 +91,7 @@ def postprocess(
|
|
|
87
91
|
input_json=input_json,
|
|
88
92
|
strength=strength,
|
|
89
93
|
temperature=temperature,
|
|
94
|
+
time=time,
|
|
90
95
|
verbose=verbose,
|
|
91
96
|
output_pydantic=ExtractedCode
|
|
92
97
|
)
|
|
@@ -94,14 +99,14 @@ def postprocess(
|
|
|
94
99
|
if not response or 'result' not in response:
|
|
95
100
|
raise ValueError("Failed to get valid response from LLM")
|
|
96
101
|
|
|
97
|
-
|
|
98
|
-
code_text =
|
|
102
|
+
extracted_code_obj: ExtractedCode = response['result'] # Renamed for clarity
|
|
103
|
+
code_text = extracted_code_obj.extracted_code
|
|
99
104
|
|
|
100
105
|
# Step 3c: Remove triple backticks and language identifier if present
|
|
101
106
|
lines = code_text.split('\n')
|
|
102
107
|
if lines and lines[0].startswith('```'):
|
|
103
108
|
lines = lines[1:]
|
|
104
|
-
if lines and lines[-1].startswith('```'):
|
|
109
|
+
if lines and lines[-1].startswith('```'): # Check if lines is not empty again after potentially removing first line
|
|
105
110
|
lines = lines[:-1]
|
|
106
111
|
|
|
107
112
|
final_code = '\n'.join(lines)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pdd-cli
|
|
3
|
-
Version: 0.0.
|
|
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.
|
|
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.
|
|
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=
|
|
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,16 +6,16 @@ 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=
|
|
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
|
-
pdd/code_generator_main.py,sha256=
|
|
12
|
+
pdd/code_generator_main.py,sha256=oCI35RqQ7gBov8mncVg1mhdDNX-0jTsoIeSzrz7WpAk,25109
|
|
13
13
|
pdd/comment_line.py,sha256=sX2hf4bG1fILi_rvI9MkkwCZ2IitgKkW7nOiw8aQKPY,1845
|
|
14
14
|
pdd/conflicts_in_prompts.py,sha256=XaEm9jIMcbENTyhphD8NXs2EmRxuPu1EI8GHrsiRwq0,4687
|
|
15
15
|
pdd/conflicts_main.py,sha256=O87s9baSa9DJMndxPIdsnYO_spoajcv9jii3XYt_-fM,3473
|
|
16
16
|
pdd/construct_paths.py,sha256=AE3vblj2v21ZdReM40pz47gvmXg-RZjuR_2FALj_9fs,17672
|
|
17
|
-
pdd/context_generator.py,sha256=
|
|
18
|
-
pdd/context_generator_main.py,sha256=
|
|
17
|
+
pdd/context_generator.py,sha256=KQAaJRwVpsPOF4y5lhP3DpIrlxhR39C0hNyTAi1Kx2U,5618
|
|
18
|
+
pdd/context_generator_main.py,sha256=WSS7uRkS2wi8HCixDA3_xzFuPqFRF_X2tGe6K3loUZc,2773
|
|
19
19
|
pdd/continue_generation.py,sha256=upZw77fKqHZ5IS8Ful7eioTi9VTqeuY1V9vzIwHeOJQ,5419
|
|
20
20
|
pdd/crash_main.py,sha256=yveWWJWxCOzRLxPk1m1rgm4tNwpAk5jYRvYyItAaU2w,7262
|
|
21
21
|
pdd/detect_change.py,sha256=t70NAgakVc2u7XiI-lZjuR2RZ8Mrd3lJwRPu8I8s_P4,5310
|
|
@@ -40,14 +40,14 @@ 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=
|
|
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=
|
|
48
|
-
pdd/pdd_completion.sh,sha256=
|
|
49
|
-
pdd/pdd_completion.zsh,sha256
|
|
50
|
-
pdd/postprocess.py,sha256=
|
|
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
|
+
pdd/postprocess.py,sha256=jWJSUPP7bDChyTEek35UOdy6fhU6c5EoDSoMypGwIdE,4402
|
|
51
51
|
pdd/postprocess_0.py,sha256=OW17GyCFLYErCyWh2tL4syuho3q2yFf2wyekQ4BLdPM,2168
|
|
52
52
|
pdd/preprocess.py,sha256=UB1rqSNscUC-JHujvGb11LJ5OadZ3GVD1Qeq1dI6HMc,9508
|
|
53
53
|
pdd/preprocess_main.py,sha256=dAgFGmjuJB1taZl31c1sY2jMGtQgjnWLbpeB7EFtojY,2977
|
|
@@ -64,7 +64,7 @@ pdd/update_main.py,sha256=5a4nsOOaAXULdk0BS9pj4blZ_QHBFeET37uaAqoJI2g,3912
|
|
|
64
64
|
pdd/update_model_costs.py,sha256=zfGqWoVIjBppKUt1Naq2ZsIdiucwfH6at2DflcwkJf8,22998
|
|
65
65
|
pdd/update_prompt.py,sha256=OdPRIAMu7OBx7E4SOU95hWgdtBY4oO8XOe1dvPChMlU,4351
|
|
66
66
|
pdd/xml_tagger.py,sha256=5AWzOboNuXMJmmIpi1hhPPAB6nxbBOkRqgoPLpoGYT8,4292
|
|
67
|
-
pdd/data/language_format.csv,sha256=
|
|
67
|
+
pdd/data/language_format.csv,sha256=X7jj_clC6dA93ij0TUPNd9oJ2tHyKUKXlWo1XVhP6zo,901
|
|
68
68
|
pdd/data/llm_model.csv,sha256=BZioMyxUlDuJdcxFCDV2BTw1ssiHKZBf4OxELIy4JGY,1487
|
|
69
69
|
pdd/prompts/auto_include_LLM.prompt,sha256=0t-Jmm5o6vVTmqsISTUiewqPT8bB389UZnJoHZvgtu4,13967
|
|
70
70
|
pdd/prompts/bug_to_unit_test_LLM.prompt,sha256=KdMkvRVnjVSf0NTYIaDXIMT93xPttXEwkMpjWx5leLs,1588
|
|
@@ -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.
|
|
105
|
-
pdd_cli-0.0.
|
|
106
|
-
pdd_cli-0.0.
|
|
107
|
-
pdd_cli-0.0.
|
|
108
|
-
pdd_cli-0.0.
|
|
109
|
-
pdd_cli-0.0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|