pdd-cli 0.0.90__py3-none-any.whl → 0.0.121__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.
- pdd/__init__.py +38 -6
- pdd/agentic_bug.py +323 -0
- pdd/agentic_bug_orchestrator.py +506 -0
- pdd/agentic_change.py +231 -0
- pdd/agentic_change_orchestrator.py +537 -0
- pdd/agentic_common.py +533 -770
- pdd/agentic_crash.py +2 -1
- pdd/agentic_e2e_fix.py +319 -0
- pdd/agentic_e2e_fix_orchestrator.py +582 -0
- pdd/agentic_fix.py +118 -3
- pdd/agentic_update.py +27 -9
- pdd/agentic_verify.py +3 -2
- pdd/architecture_sync.py +565 -0
- pdd/auth_service.py +210 -0
- pdd/auto_deps_main.py +63 -53
- pdd/auto_include.py +236 -3
- pdd/auto_update.py +125 -47
- pdd/bug_main.py +195 -23
- pdd/cmd_test_main.py +345 -197
- pdd/code_generator.py +4 -2
- pdd/code_generator_main.py +118 -32
- pdd/commands/__init__.py +6 -0
- pdd/commands/analysis.py +113 -48
- pdd/commands/auth.py +309 -0
- pdd/commands/connect.py +358 -0
- pdd/commands/fix.py +155 -114
- pdd/commands/generate.py +5 -0
- pdd/commands/maintenance.py +3 -2
- pdd/commands/misc.py +8 -0
- pdd/commands/modify.py +225 -163
- pdd/commands/sessions.py +284 -0
- pdd/commands/utility.py +12 -7
- pdd/construct_paths.py +334 -32
- pdd/context_generator_main.py +167 -170
- pdd/continue_generation.py +6 -3
- pdd/core/__init__.py +33 -0
- pdd/core/cli.py +44 -7
- pdd/core/cloud.py +237 -0
- pdd/core/dump.py +68 -20
- pdd/core/errors.py +4 -0
- pdd/core/remote_session.py +61 -0
- pdd/crash_main.py +219 -23
- pdd/data/llm_model.csv +4 -4
- pdd/docs/prompting_guide.md +864 -0
- pdd/docs/whitepaper_with_benchmarks/data_and_functions/benchmark_analysis.py +495 -0
- pdd/docs/whitepaper_with_benchmarks/data_and_functions/creation_compare.py +528 -0
- pdd/fix_code_loop.py +208 -34
- pdd/fix_code_module_errors.py +6 -2
- pdd/fix_error_loop.py +291 -38
- pdd/fix_main.py +208 -6
- pdd/fix_verification_errors_loop.py +235 -26
- pdd/fix_verification_main.py +269 -83
- pdd/frontend/dist/assets/index-B5DZHykP.css +1 -0
- pdd/frontend/dist/assets/index-CUWd8al1.js +450 -0
- pdd/frontend/dist/index.html +376 -0
- pdd/frontend/dist/logo.svg +33 -0
- pdd/generate_output_paths.py +46 -5
- pdd/generate_test.py +212 -151
- pdd/get_comment.py +19 -44
- pdd/get_extension.py +8 -9
- pdd/get_jwt_token.py +309 -20
- pdd/get_language.py +8 -7
- pdd/get_run_command.py +7 -5
- pdd/insert_includes.py +2 -1
- pdd/llm_invoke.py +531 -97
- pdd/load_prompt_template.py +15 -34
- pdd/operation_log.py +342 -0
- pdd/path_resolution.py +140 -0
- pdd/postprocess.py +122 -97
- pdd/preprocess.py +68 -12
- pdd/preprocess_main.py +33 -1
- pdd/prompts/agentic_bug_step10_pr_LLM.prompt +182 -0
- pdd/prompts/agentic_bug_step1_duplicate_LLM.prompt +73 -0
- pdd/prompts/agentic_bug_step2_docs_LLM.prompt +129 -0
- pdd/prompts/agentic_bug_step3_triage_LLM.prompt +95 -0
- pdd/prompts/agentic_bug_step4_reproduce_LLM.prompt +97 -0
- pdd/prompts/agentic_bug_step5_root_cause_LLM.prompt +123 -0
- pdd/prompts/agentic_bug_step6_test_plan_LLM.prompt +107 -0
- pdd/prompts/agentic_bug_step7_generate_LLM.prompt +172 -0
- pdd/prompts/agentic_bug_step8_verify_LLM.prompt +119 -0
- pdd/prompts/agentic_bug_step9_e2e_test_LLM.prompt +289 -0
- pdd/prompts/agentic_change_step10_identify_issues_LLM.prompt +1006 -0
- pdd/prompts/agentic_change_step11_fix_issues_LLM.prompt +984 -0
- pdd/prompts/agentic_change_step12_create_pr_LLM.prompt +140 -0
- pdd/prompts/agentic_change_step1_duplicate_LLM.prompt +73 -0
- pdd/prompts/agentic_change_step2_docs_LLM.prompt +101 -0
- pdd/prompts/agentic_change_step3_research_LLM.prompt +126 -0
- pdd/prompts/agentic_change_step4_clarify_LLM.prompt +164 -0
- pdd/prompts/agentic_change_step5_docs_change_LLM.prompt +981 -0
- pdd/prompts/agentic_change_step6_devunits_LLM.prompt +1005 -0
- pdd/prompts/agentic_change_step7_architecture_LLM.prompt +1044 -0
- pdd/prompts/agentic_change_step8_analyze_LLM.prompt +1027 -0
- pdd/prompts/agentic_change_step9_implement_LLM.prompt +1077 -0
- pdd/prompts/agentic_e2e_fix_step1_unit_tests_LLM.prompt +90 -0
- pdd/prompts/agentic_e2e_fix_step2_e2e_tests_LLM.prompt +91 -0
- pdd/prompts/agentic_e2e_fix_step3_root_cause_LLM.prompt +89 -0
- pdd/prompts/agentic_e2e_fix_step4_fix_e2e_tests_LLM.prompt +96 -0
- pdd/prompts/agentic_e2e_fix_step5_identify_devunits_LLM.prompt +91 -0
- pdd/prompts/agentic_e2e_fix_step6_create_unit_tests_LLM.prompt +106 -0
- pdd/prompts/agentic_e2e_fix_step7_verify_tests_LLM.prompt +116 -0
- pdd/prompts/agentic_e2e_fix_step8_run_pdd_fix_LLM.prompt +120 -0
- pdd/prompts/agentic_e2e_fix_step9_verify_all_LLM.prompt +146 -0
- pdd/prompts/agentic_fix_primary_LLM.prompt +2 -2
- pdd/prompts/agentic_update_LLM.prompt +192 -338
- pdd/prompts/auto_include_LLM.prompt +22 -0
- pdd/prompts/change_LLM.prompt +3093 -1
- pdd/prompts/detect_change_LLM.prompt +571 -14
- pdd/prompts/fix_code_module_errors_LLM.prompt +8 -0
- pdd/prompts/fix_errors_from_unit_tests_LLM.prompt +1 -0
- pdd/prompts/generate_test_LLM.prompt +19 -1
- pdd/prompts/generate_test_from_example_LLM.prompt +366 -0
- pdd/prompts/insert_includes_LLM.prompt +262 -252
- pdd/prompts/prompt_code_diff_LLM.prompt +123 -0
- pdd/prompts/prompt_diff_LLM.prompt +82 -0
- pdd/remote_session.py +876 -0
- pdd/server/__init__.py +52 -0
- pdd/server/app.py +335 -0
- pdd/server/click_executor.py +587 -0
- pdd/server/executor.py +338 -0
- pdd/server/jobs.py +661 -0
- pdd/server/models.py +241 -0
- pdd/server/routes/__init__.py +31 -0
- pdd/server/routes/architecture.py +451 -0
- pdd/server/routes/auth.py +364 -0
- pdd/server/routes/commands.py +929 -0
- pdd/server/routes/config.py +42 -0
- pdd/server/routes/files.py +603 -0
- pdd/server/routes/prompts.py +1347 -0
- pdd/server/routes/websocket.py +473 -0
- pdd/server/security.py +243 -0
- pdd/server/terminal_spawner.py +217 -0
- pdd/server/token_counter.py +222 -0
- pdd/summarize_directory.py +236 -237
- pdd/sync_animation.py +8 -4
- pdd/sync_determine_operation.py +329 -47
- pdd/sync_main.py +272 -28
- pdd/sync_orchestration.py +289 -211
- pdd/sync_order.py +304 -0
- pdd/template_expander.py +161 -0
- pdd/templates/architecture/architecture_json.prompt +41 -46
- pdd/trace.py +1 -1
- pdd/track_cost.py +0 -13
- pdd/unfinished_prompt.py +2 -1
- pdd/update_main.py +68 -26
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.121.dist-info}/METADATA +15 -10
- pdd_cli-0.0.121.dist-info/RECORD +229 -0
- pdd_cli-0.0.90.dist-info/RECORD +0 -153
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.121.dist-info}/WHEEL +0 -0
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.121.dist-info}/entry_points.txt +0 -0
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.121.dist-info}/licenses/LICENSE +0 -0
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.121.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
% You are an expert software engineer. Your task is to create a pull request from the worktree branch and link it to the original GitHub issue.
|
|
2
|
+
|
|
3
|
+
% Context
|
|
4
|
+
|
|
5
|
+
You are working on step 12 of 12 in an agentic change workflow. This is the final step. All prompt changes have been made and verified. Now you create a PR for review.
|
|
6
|
+
|
|
7
|
+
% Inputs
|
|
8
|
+
|
|
9
|
+
- GitHub Issue URL: {issue_url}
|
|
10
|
+
- Repository: {repo_owner}/{repo_name}
|
|
11
|
+
- Issue Number: {issue_number}
|
|
12
|
+
- Issue Title: {issue_title}
|
|
13
|
+
- Worktree Path: {worktree_path}
|
|
14
|
+
- Branch Name: change/issue-{issue_number}
|
|
15
|
+
- Files Changed: {files_to_stage}
|
|
16
|
+
- Sync Order Script: {sync_order_script}
|
|
17
|
+
- Sync Order Commands: {sync_order_list}
|
|
18
|
+
|
|
19
|
+
% Issue Content
|
|
20
|
+
<issue_content>
|
|
21
|
+
{issue_content}
|
|
22
|
+
</issue_content>
|
|
23
|
+
|
|
24
|
+
% Change Summary (from previous steps)
|
|
25
|
+
<step8_output>
|
|
26
|
+
{step8_output}
|
|
27
|
+
</step8_output>
|
|
28
|
+
|
|
29
|
+
% Your Task
|
|
30
|
+
|
|
31
|
+
1. **Stage all changes**
|
|
32
|
+
```bash
|
|
33
|
+
cd {worktree_path}
|
|
34
|
+
git add -A
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. **Create commit**
|
|
38
|
+
- Use a clear commit message referencing the issue
|
|
39
|
+
- Format: `feat: [brief description] (#{issue_number})`
|
|
40
|
+
|
|
41
|
+
3. **Push branch**
|
|
42
|
+
```bash
|
|
43
|
+
git push -u origin change/issue-{issue_number}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. **Create pull request**
|
|
47
|
+
Use `gh pr create` to create a PR that:
|
|
48
|
+
- References the original issue
|
|
49
|
+
- Summarizes the prompt changes made
|
|
50
|
+
- Lists files modified
|
|
51
|
+
- Includes next steps for reviewer
|
|
52
|
+
|
|
53
|
+
5. **Link PR to issue**
|
|
54
|
+
- The PR body should include `Closes #{issue_number}` or `Fixes #{issue_number}`
|
|
55
|
+
- This ensures the issue is automatically closed when PR is merged
|
|
56
|
+
|
|
57
|
+
% Output
|
|
58
|
+
|
|
59
|
+
Create the PR using the gh CLI:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
gh pr create --title "feat: [description] (#{issue_number})" --body "..." --base main --head change/issue-{issue_number}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then post a final comment to the issue:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
gh issue comment {issue_number} --repo {repo_owner}/{repo_name} --body "..."
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**PR Body Format:**
|
|
72
|
+
```markdown
|
|
73
|
+
## Summary
|
|
74
|
+
|
|
75
|
+
[1-2 sentence description of what this PR does]
|
|
76
|
+
|
|
77
|
+
Closes #{issue_number}
|
|
78
|
+
|
|
79
|
+
## Changes Made
|
|
80
|
+
|
|
81
|
+
### Prompts Modified
|
|
82
|
+
- `prompts/xxx_python.prompt` - [brief description]
|
|
83
|
+
- `prompts/yyy_python.prompt` - [brief description]
|
|
84
|
+
|
|
85
|
+
### Documentation Updated
|
|
86
|
+
- `README.md` - [brief description]
|
|
87
|
+
|
|
88
|
+
## Review Checklist
|
|
89
|
+
|
|
90
|
+
- [ ] Prompt syntax is valid
|
|
91
|
+
- [ ] PDD conventions followed
|
|
92
|
+
- [ ] Documentation is up to date
|
|
93
|
+
|
|
94
|
+
## Next Steps After Merge
|
|
95
|
+
|
|
96
|
+
1. Regenerate code from modified prompts in dependency order:
|
|
97
|
+
```bash
|
|
98
|
+
./sync_order.sh
|
|
99
|
+
```
|
|
100
|
+
Or manually:
|
|
101
|
+
```
|
|
102
|
+
{sync_order_list}
|
|
103
|
+
```
|
|
104
|
+
2. Run tests to verify functionality
|
|
105
|
+
3. Deploy if applicable
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
*Created by pdd change workflow*
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Issue Comment Format:**
|
|
112
|
+
```markdown
|
|
113
|
+
## Step 12: Pull Request Created
|
|
114
|
+
|
|
115
|
+
**Status:** PR Ready for Review
|
|
116
|
+
|
|
117
|
+
### Pull Request
|
|
118
|
+
[PR #{{pr_number}}]({{pr_url}})
|
|
119
|
+
|
|
120
|
+
### Summary
|
|
121
|
+
- Branch: `change/issue-{issue_number}`
|
|
122
|
+
- Files changed: {{N}}
|
|
123
|
+
- Ready for review
|
|
124
|
+
|
|
125
|
+
### What's Next
|
|
126
|
+
1. Review the PR
|
|
127
|
+
2. Run `./sync_order.sh` after merge to regenerate code in dependency order
|
|
128
|
+
3. Run tests to verify
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
*Agentic change workflow complete. Total cost: ${{total_cost:.4f}}*
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
% Important
|
|
135
|
+
|
|
136
|
+
- Always link the PR to the issue using "Closes #N" or "Fixes #N"
|
|
137
|
+
- Push to origin before creating PR
|
|
138
|
+
- Include clear next steps for the reviewer
|
|
139
|
+
- Report the PR URL in the issue comment
|
|
140
|
+
- This is the final step - workflow is complete after this
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
% You are an expert software engineer investigating a change request. Your task is to check if this issue is a duplicate of an existing issue.
|
|
2
|
+
|
|
3
|
+
% Context
|
|
4
|
+
|
|
5
|
+
You are working on step 1 of 12 in an agentic change workflow. Your findings will be posted as a comment on the GitHub issue.
|
|
6
|
+
|
|
7
|
+
% Inputs
|
|
8
|
+
|
|
9
|
+
- GitHub Issue URL: {issue_url}
|
|
10
|
+
- Repository: {repo_owner}/{repo_name}
|
|
11
|
+
- Issue Number: {issue_number}
|
|
12
|
+
|
|
13
|
+
% Issue Content
|
|
14
|
+
<issue_content>
|
|
15
|
+
{issue_content}
|
|
16
|
+
</issue_content>
|
|
17
|
+
|
|
18
|
+
% Your Task
|
|
19
|
+
|
|
20
|
+
1. **Search for duplicates**
|
|
21
|
+
- Use `gh issue list` to search for similar issues in this repository
|
|
22
|
+
- Look for issues with similar feature requests, enhancement descriptions, or change proposals
|
|
23
|
+
- Consider both open and closed issues
|
|
24
|
+
- Search using key terms from the request (feature names, affected modules, desired behavior)
|
|
25
|
+
|
|
26
|
+
2. **Evaluate matches**
|
|
27
|
+
- For each potential duplicate, read the issue to verify similarity
|
|
28
|
+
- Consider: same feature request? same affected modules? same desired outcome?
|
|
29
|
+
- A true duplicate requests the same change, not just uses similar keywords
|
|
30
|
+
|
|
31
|
+
3. **Handle duplicates**
|
|
32
|
+
If duplicates are found:
|
|
33
|
+
- Merge any unique information from this issue into the original
|
|
34
|
+
- Add a comment to the original issue noting the additional context
|
|
35
|
+
- Close this issue with a comment linking to the original
|
|
36
|
+
- Report which issue is the canonical one
|
|
37
|
+
|
|
38
|
+
If no duplicates:
|
|
39
|
+
- Report that this appears to be a new change request
|
|
40
|
+
- Proceed with investigation
|
|
41
|
+
|
|
42
|
+
% Output
|
|
43
|
+
|
|
44
|
+
After completing your analysis, use `gh issue comment` to post your findings to issue #{issue_number}:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
gh issue comment {issue_number} --repo {repo_owner}/{repo_name} --body "..."
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Your comment should follow this format:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## Step 1: Duplicate Check
|
|
54
|
+
|
|
55
|
+
**Status:** [No duplicates found | Duplicate of #XXX]
|
|
56
|
+
|
|
57
|
+
### Search Performed
|
|
58
|
+
- Searched for: [key terms used]
|
|
59
|
+
- Issues reviewed: [count]
|
|
60
|
+
|
|
61
|
+
### Findings
|
|
62
|
+
[If duplicates found: explanation of why they match and what action was taken]
|
|
63
|
+
[If no duplicates: brief confirmation this is a new change request]
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
*Proceeding to Step 2: Documentation Check*
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
% Important
|
|
70
|
+
|
|
71
|
+
- Always post your findings as a GitHub comment before completing
|
|
72
|
+
- If this is a duplicate, still post a comment explaining the closure
|
|
73
|
+
- Be thorough but efficient in your search
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
% You are an expert software engineer investigating a change request. Your task is to check if the requested change is already implemented or documented.
|
|
2
|
+
|
|
3
|
+
% Context
|
|
4
|
+
|
|
5
|
+
You are working on step 2 of 12 in an agentic change workflow. Previous step checked for duplicate issues.
|
|
6
|
+
|
|
7
|
+
**This step may terminate the workflow** if the feature is already implemented.
|
|
8
|
+
|
|
9
|
+
% Inputs
|
|
10
|
+
|
|
11
|
+
- GitHub Issue URL: {issue_url}
|
|
12
|
+
- Repository: {repo_owner}/{repo_name}
|
|
13
|
+
- Issue Number: {issue_number}
|
|
14
|
+
- Issue Author: @{issue_author}
|
|
15
|
+
|
|
16
|
+
% Issue Content
|
|
17
|
+
<issue_content>
|
|
18
|
+
{issue_content}
|
|
19
|
+
</issue_content>
|
|
20
|
+
|
|
21
|
+
% Previous Step Output
|
|
22
|
+
<step1_output>
|
|
23
|
+
{step1_output}
|
|
24
|
+
</step1_output>
|
|
25
|
+
|
|
26
|
+
% Your Task
|
|
27
|
+
|
|
28
|
+
1. **Locate documentation**
|
|
29
|
+
- Find README.md, docs/, CONTRIBUTING.md, and any relevant documentation
|
|
30
|
+
- Look for API documentation, usage guides, or configuration docs
|
|
31
|
+
- Check for inline documentation in relevant code files
|
|
32
|
+
|
|
33
|
+
2. **Check for existing implementation**
|
|
34
|
+
- Is the requested feature already implemented?
|
|
35
|
+
- Are there documented ways to achieve the same outcome?
|
|
36
|
+
- Does the documentation describe how to do what the user wants?
|
|
37
|
+
|
|
38
|
+
3. **Evaluate**
|
|
39
|
+
- **Already Implemented**: Feature exists and is documented → STOP workflow
|
|
40
|
+
- **Partially Implemented**: Feature exists but needs enhancement → Continue workflow
|
|
41
|
+
- **Not Implemented**: Feature doesn't exist → Continue workflow
|
|
42
|
+
- **Documentation Gap**: Feature exists but isn't documented → Continue (fix docs)
|
|
43
|
+
|
|
44
|
+
% Output
|
|
45
|
+
|
|
46
|
+
After completing your analysis, use `gh issue comment` to post your findings to issue #{issue_number}:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
gh issue comment {issue_number} --repo {repo_owner}/{repo_name} --body "..."
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Your comment should follow this format:
|
|
53
|
+
|
|
54
|
+
**If Not Implemented or Needs Enhancement:**
|
|
55
|
+
```markdown
|
|
56
|
+
## Step 2: Documentation Check
|
|
57
|
+
|
|
58
|
+
**Status:** [Not Implemented | Partially Implemented | Documentation Gap]
|
|
59
|
+
|
|
60
|
+
### Documentation Reviewed
|
|
61
|
+
- [List of files/sections checked]
|
|
62
|
+
|
|
63
|
+
### Findings
|
|
64
|
+
[Explanation of current state vs. what the user requests]
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
*Proceeding to Step 3: Identify Dev Units*
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**If Already Implemented (STOP workflow):**
|
|
71
|
+
```markdown
|
|
72
|
+
## Step 2: Documentation Check
|
|
73
|
+
|
|
74
|
+
**Status:** Already Implemented
|
|
75
|
+
|
|
76
|
+
### Documentation Reviewed
|
|
77
|
+
- [List of files/sections checked]
|
|
78
|
+
|
|
79
|
+
### Findings
|
|
80
|
+
The requested feature is already available. Here's how to use it:
|
|
81
|
+
|
|
82
|
+
**Current implementation:**
|
|
83
|
+
[Quote or summarize relevant documentation]
|
|
84
|
+
|
|
85
|
+
**How to achieve your goal:**
|
|
86
|
+
[Step-by-step instructions for the user]
|
|
87
|
+
|
|
88
|
+
### Recommendation
|
|
89
|
+
The feature you requested already exists. Please try the approach above. If this doesn't meet your needs, please reopen this issue with more specific requirements.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
*Investigation paused - feature already exists.*
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
% Important
|
|
96
|
+
|
|
97
|
+
- **STOP the workflow** if status is "Already Implemented"
|
|
98
|
+
- **CONTINUE the workflow** if status is "Not Implemented", "Partially Implemented", or "Documentation Gap"
|
|
99
|
+
- Tag the issue author when providing guidance
|
|
100
|
+
- Be helpful and provide clear instructions if feature exists
|
|
101
|
+
- Always post your findings as a GitHub comment before completing
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
% You are an expert software engineer using Prompt-Driven Development (PDD). Your task is to research and clarify the feature change request using web search.
|
|
2
|
+
|
|
3
|
+
% Context
|
|
4
|
+
|
|
5
|
+
You are working on step 3 of 12 in an agentic change workflow. Previous steps confirmed this is not a duplicate and the feature is not already implemented. Now you need to research the topic to better understand the requirements.
|
|
6
|
+
|
|
7
|
+
% Inputs
|
|
8
|
+
|
|
9
|
+
- GitHub Issue URL: {issue_url}
|
|
10
|
+
- Repository: {repo_owner}/{repo_name}
|
|
11
|
+
- Issue Number: {issue_number}
|
|
12
|
+
|
|
13
|
+
% Issue Content
|
|
14
|
+
<issue_content>
|
|
15
|
+
{issue_content}
|
|
16
|
+
</issue_content>
|
|
17
|
+
|
|
18
|
+
% Previous Step Outputs
|
|
19
|
+
<step1_output>
|
|
20
|
+
{step1_output}
|
|
21
|
+
</step1_output>
|
|
22
|
+
|
|
23
|
+
<step2_output>
|
|
24
|
+
{step2_output}
|
|
25
|
+
</step2_output>
|
|
26
|
+
|
|
27
|
+
% Your Task
|
|
28
|
+
|
|
29
|
+
1. **Identify knowledge gaps**
|
|
30
|
+
- What technical concepts in the issue need clarification?
|
|
31
|
+
- Are there industry standards or best practices to consider?
|
|
32
|
+
- Are there existing libraries, tools, or patterns that could inform the implementation?
|
|
33
|
+
|
|
34
|
+
2. **Conduct web research**
|
|
35
|
+
- Search for relevant documentation, tutorials, or examples
|
|
36
|
+
- Look for similar implementations in other projects
|
|
37
|
+
- Find best practices for the type of feature being requested
|
|
38
|
+
- Check for any security considerations or common pitfalls
|
|
39
|
+
|
|
40
|
+
3. **Synthesize findings**
|
|
41
|
+
- Summarize the key insights from your research
|
|
42
|
+
- Identify how these findings affect the implementation approach
|
|
43
|
+
- Note any constraints or requirements discovered during research
|
|
44
|
+
- Highlight any alternative approaches worth considering
|
|
45
|
+
|
|
46
|
+
4. **Refine specifications**
|
|
47
|
+
- Based on research, clarify any ambiguous requirements
|
|
48
|
+
- Suggest specific implementation details informed by best practices
|
|
49
|
+
- Identify edge cases or considerations the original issue may have missed
|
|
50
|
+
|
|
51
|
+
% Output
|
|
52
|
+
|
|
53
|
+
After completing your research, use `gh issue comment` to post your findings to issue #{issue_number}:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
gh issue comment {issue_number} --repo {repo_owner}/{repo_name} --body "..."
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Your comment should follow this format:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
## Step 3: Research & Clarification
|
|
63
|
+
|
|
64
|
+
**Status:** [Research Complete | Additional Clarification Needed]
|
|
65
|
+
|
|
66
|
+
### Summary
|
|
67
|
+
[1-2 sentence summary of the research focus and key findings]
|
|
68
|
+
|
|
69
|
+
### Research Findings
|
|
70
|
+
|
|
71
|
+
#### Technical Background
|
|
72
|
+
[Key concepts, standards, or patterns relevant to this feature]
|
|
73
|
+
|
|
74
|
+
#### Best Practices
|
|
75
|
+
[Industry best practices or patterns that should inform the implementation]
|
|
76
|
+
|
|
77
|
+
#### Similar Implementations
|
|
78
|
+
[Examples from other projects or libraries, if found]
|
|
79
|
+
|
|
80
|
+
#### Security/Edge Cases
|
|
81
|
+
[Any security considerations or edge cases discovered]
|
|
82
|
+
|
|
83
|
+
### Refined Specifications
|
|
84
|
+
Based on the research, here are clarified requirements:
|
|
85
|
+
1. [Clarified requirement or specification]
|
|
86
|
+
2. [Additional consideration from research]
|
|
87
|
+
3. [Edge case to handle]
|
|
88
|
+
|
|
89
|
+
### Alternative Approaches Considered
|
|
90
|
+
- [Alternative 1]: [pros/cons]
|
|
91
|
+
- [Alternative 2]: [pros/cons]
|
|
92
|
+
|
|
93
|
+
### Recommended Approach
|
|
94
|
+
[Brief recommendation based on research]
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
*Proceeding to Step 4: Documentation Changes*
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**If additional user input is needed (PAUSE workflow):**
|
|
101
|
+
```markdown
|
|
102
|
+
## Step 3: Research & Clarification
|
|
103
|
+
|
|
104
|
+
**Status:** Additional Clarification Needed
|
|
105
|
+
|
|
106
|
+
### Research Summary
|
|
107
|
+
[What was researched and found]
|
|
108
|
+
|
|
109
|
+
### Questions for Clarification
|
|
110
|
+
1. [Specific question that needs user input]
|
|
111
|
+
2. [Another question if applicable]
|
|
112
|
+
|
|
113
|
+
### Why This Matters
|
|
114
|
+
[Brief explanation of how the answer affects implementation]
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
*Awaiting user response before proceeding.*
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
% Important
|
|
121
|
+
|
|
122
|
+
- Focus on research that directly informs the implementation
|
|
123
|
+
- Be thorough but concise in summarizing findings
|
|
124
|
+
- Prioritize authoritative sources (official docs, established libraries)
|
|
125
|
+
- If the issue is already well-specified, acknowledge this and proceed
|
|
126
|
+
- Always post your findings as a GitHub comment before completing
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
% You are an expert software engineer using Prompt-Driven Development (PDD). Your task is to determine if the feature change request is clear enough to proceed with implementation.
|
|
2
|
+
|
|
3
|
+
% Context
|
|
4
|
+
|
|
5
|
+
You are working on step 4 of 12 in an agentic change workflow. Previous steps confirmed this is not a duplicate, is not already implemented, and conducted research. Now you must determine if the requirements are sufficiently clear.
|
|
6
|
+
|
|
7
|
+
**This step may STOP the workflow** if clarifying questions are needed. When the user answers and runs `pdd change` again, this step will re-evaluate.
|
|
8
|
+
|
|
9
|
+
% Inputs
|
|
10
|
+
|
|
11
|
+
- GitHub Issue URL: {issue_url}
|
|
12
|
+
- Repository: {repo_owner}/{repo_name}
|
|
13
|
+
- Issue Number: {issue_number}
|
|
14
|
+
- Issue Author: {issue_author}
|
|
15
|
+
|
|
16
|
+
% Issue Content
|
|
17
|
+
<issue_content>
|
|
18
|
+
{issue_content}
|
|
19
|
+
</issue_content>
|
|
20
|
+
|
|
21
|
+
% Previous Step Outputs
|
|
22
|
+
<step1_output>
|
|
23
|
+
{step1_output}
|
|
24
|
+
</step1_output>
|
|
25
|
+
|
|
26
|
+
<step2_output>
|
|
27
|
+
{step2_output}
|
|
28
|
+
</step2_output>
|
|
29
|
+
|
|
30
|
+
<step3_output>
|
|
31
|
+
{step3_output}
|
|
32
|
+
</step3_output>
|
|
33
|
+
|
|
34
|
+
% Your Task
|
|
35
|
+
|
|
36
|
+
1. **Analyze clarity of requirements**
|
|
37
|
+
Review the issue content and research findings to assess:
|
|
38
|
+
- Is the problem statement clear and unambiguous?
|
|
39
|
+
- Are the expected outcomes/behaviors well-defined?
|
|
40
|
+
- Are there conflicting or vague requirements?
|
|
41
|
+
- Are edge cases and error handling addressed?
|
|
42
|
+
- Is the scope bounded (not too broad)?
|
|
43
|
+
|
|
44
|
+
2. **Check for missing information**
|
|
45
|
+
Identify gaps that would block implementation:
|
|
46
|
+
- Missing input/output specifications
|
|
47
|
+
- Undefined behavior for edge cases
|
|
48
|
+
- Unclear integration points with existing code
|
|
49
|
+
- Ambiguous terminology or concepts
|
|
50
|
+
- Missing acceptance criteria
|
|
51
|
+
|
|
52
|
+
3. **Decide: Clear or Needs Clarification**
|
|
53
|
+
|
|
54
|
+
**CLEAR ENOUGH** if:
|
|
55
|
+
- Core functionality is well-defined
|
|
56
|
+
- Implementation approach can be determined
|
|
57
|
+
- Edge cases can be reasonably inferred
|
|
58
|
+
- Minor ambiguities can be resolved during implementation
|
|
59
|
+
|
|
60
|
+
**NEEDS CLARIFICATION** if:
|
|
61
|
+
- Core requirements are ambiguous
|
|
62
|
+
- Multiple valid interpretations exist
|
|
63
|
+
- Critical edge cases are undefined
|
|
64
|
+
- Implementation would require guessing user intent
|
|
65
|
+
|
|
66
|
+
4. **If clarification needed, formulate questions with options**
|
|
67
|
+
- Ask specific, actionable questions
|
|
68
|
+
- Provide context for why the answer matters
|
|
69
|
+
- **Always provide 2-3 possible answers** with explanations
|
|
70
|
+
- Explain the implications of each option
|
|
71
|
+
- Make a recommendation if you have a preference
|
|
72
|
+
- Limit to 2-4 most critical questions
|
|
73
|
+
|
|
74
|
+
% Output
|
|
75
|
+
|
|
76
|
+
After completing your analysis, use `gh issue comment` to post your findings to issue #{issue_number}:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
gh issue comment {issue_number} --repo {repo_owner}/{repo_name} --body "..."
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**If requirements are CLEAR ENOUGH:**
|
|
83
|
+
```markdown
|
|
84
|
+
## Step 4: Requirements Clarity Check
|
|
85
|
+
|
|
86
|
+
**Status:** Requirements Clear
|
|
87
|
+
|
|
88
|
+
### Clarity Assessment
|
|
89
|
+
| Aspect | Status |
|
|
90
|
+
|--------|--------|
|
|
91
|
+
| Problem statement | :white_check_mark: Clear |
|
|
92
|
+
| Expected outcomes | :white_check_mark: Defined |
|
|
93
|
+
| Scope | :white_check_mark: Bounded |
|
|
94
|
+
| Edge cases | :white_check_mark: Addressable |
|
|
95
|
+
|
|
96
|
+
### Understanding Summary
|
|
97
|
+
[1-2 sentence summary of what will be implemented]
|
|
98
|
+
|
|
99
|
+
### Assumptions Made
|
|
100
|
+
- [Any reasonable assumptions for minor ambiguities]
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
*Proceeding to Step 5: Documentation Changes*
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**If CLARIFICATION NEEDED (STOP workflow):**
|
|
107
|
+
```markdown
|
|
108
|
+
## Step 4: Requirements Clarity Check
|
|
109
|
+
|
|
110
|
+
**Status:** Clarification Needed
|
|
111
|
+
|
|
112
|
+
### Clarity Assessment
|
|
113
|
+
| Aspect | Status |
|
|
114
|
+
|--------|--------|
|
|
115
|
+
| Problem statement | :white_check_mark: Clear |
|
|
116
|
+
| Expected outcomes | :x: Unclear |
|
|
117
|
+
| Scope | :warning: Partially defined |
|
|
118
|
+
| Edge cases | :x: Not addressed |
|
|
119
|
+
|
|
120
|
+
### What's Clear
|
|
121
|
+
[Summary of well-defined aspects]
|
|
122
|
+
|
|
123
|
+
### Questions for @{issue_author}
|
|
124
|
+
|
|
125
|
+
To proceed with implementation, I need clarification on the following:
|
|
126
|
+
|
|
127
|
+
1. **[Topic - e.g., "Input Validation"]**
|
|
128
|
+
|
|
129
|
+
[Brief context explaining why this matters for implementation]
|
|
130
|
+
|
|
131
|
+
**Options:**
|
|
132
|
+
- **A) [Option name]**: [Description of this approach]
|
|
133
|
+
- Implications: [What this means for the implementation]
|
|
134
|
+
- **B) [Option name]**: [Description of this approach]
|
|
135
|
+
- Implications: [What this means for the implementation]
|
|
136
|
+
- **C) [Option name]**: [Description of this approach]
|
|
137
|
+
- Implications: [What this means for the implementation]
|
|
138
|
+
|
|
139
|
+
**Recommendation:** [Your suggestion if you have one, and why]
|
|
140
|
+
|
|
141
|
+
2. **[Topic]**
|
|
142
|
+
|
|
143
|
+
[Context]
|
|
144
|
+
|
|
145
|
+
**Options:**
|
|
146
|
+
- **A)** [Option and implications]
|
|
147
|
+
- **B)** [Option and implications]
|
|
148
|
+
|
|
149
|
+
### Next Steps
|
|
150
|
+
Please reply with your preferred options (e.g., "1A, 2B"). Then run `pdd change {issue_url}` again to continue.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
*Workflow paused - awaiting clarification from @{issue_author}*
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
% Important
|
|
157
|
+
|
|
158
|
+
- Be pragmatic: don't block on minor details that can be reasonably inferred
|
|
159
|
+
- Focus on questions that would significantly impact implementation approach
|
|
160
|
+
- If requirements are 80%+ clear, proceed rather than block
|
|
161
|
+
- Consider that the issue author may not be technical - phrase questions accessibly
|
|
162
|
+
- Always tag the issue author (@{issue_author}) in clarification requests
|
|
163
|
+
- This is a HARD STOP - if clarification is needed, the workflow terminates here
|
|
164
|
+
- When `pdd change` is run again, this step will re-evaluate based on new comments
|