pdd-cli 0.0.59__py3-none-any.whl → 0.0.61__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.

@@ -0,0 +1,142 @@
1
+ ---
2
+ name: generic/generate_prompt
3
+ description: Generate a module prompt (.prompt) for any stack (backend, frontend, CLI, jobs) using project docs and context
4
+ version: 1.0.0
5
+ tags: [template, prompt, generic]
6
+ language: prompt
7
+ output: prompts/${MODULE}_${LANG_OR_FRAMEWORK}.prompt
8
+ variables:
9
+ MODULE:
10
+ required: true
11
+ type: string
12
+ description: Module/component basename to generate a prompt for.
13
+ examples: [orders, auth, users]
14
+ LANG_OR_FRAMEWORK:
15
+ required: false
16
+ type: string
17
+ description: Target language or framework suffix used in prompt naming (matches your stack conventions).
18
+ examples: [Python, TypeScriptReact, Go, Java, Ruby]
19
+ default: Python
20
+ LAYER:
21
+ required: false
22
+ type: string
23
+ description: System layer or interface type for context.
24
+ examples: [backend, frontend, api, graphql, cli, job, message, config, module, component, page]
25
+ README_FILE:
26
+ required: false
27
+ type: path
28
+ description: Project README to provide overall context.
29
+ example_paths: [README.md, docs/README.md]
30
+ API_DOC_FILE:
31
+ required: false
32
+ type: path
33
+ description: API documentation describing endpoints and conventions.
34
+ example_paths: [docs/api-documentation.md, docs/api.md]
35
+ DB_SCHEMA_FILE:
36
+ required: false
37
+ type: path
38
+ description: Database schema or ERD for backend data models.
39
+ example_paths: [context/database-schema.md, docs/db/schema.md]
40
+ BACKEND_FILES_CSV:
41
+ required: false
42
+ type: path
43
+ description: CSV listing backend Python files/modules (for context/reference).
44
+ example_paths: [prompts/backend/python_architecture.csv]
45
+ IO_DEPENDENCIES_CSV:
46
+ required: false
47
+ type: path
48
+ description: CSV of function inputs/outputs and dependencies for backend modules.
49
+ example_paths: [prompts/backend/io_dependencies.csv]
50
+ ARCHITECTURE_FILE:
51
+ required: false
52
+ type: path
53
+ description: Architecture JSON (from architecture/architecture_json) to drive module scope, dependencies, and interface.
54
+ example_paths: [architecture.json]
55
+ TECH_STACK_FILE:
56
+ required: false
57
+ type: path
58
+ description: Tech stack overview (languages, frameworks, infrastructure, tools) for shaping conventions.
59
+ example_paths: [docs/tech_stack.md, docs/architecture/stack.md]
60
+ CODE_GENERATOR_PROMPT:
61
+ required: false
62
+ type: path
63
+ description: Reference code generator prompt to mirror style and expectations.
64
+ example_paths: [prompts/code_generator_python.prompt, prompts/code_generator_main_python.prompt]
65
+ EXISTING_PROMPTS:
66
+ required: false
67
+ type: list
68
+ description: Existing prompt files to use as reference (comma/newline-separated).
69
+ example_paths: [prompts/orders_python.prompt, prompts/auth_python.prompt]
70
+ DEP_EXAMPLE_EXT:
71
+ required: false
72
+ type: string
73
+ description: File extension for dependency examples under context/ (for non-Python stacks).
74
+ examples: [py, ts, tsx, go, java]
75
+ default: py
76
+ usage:
77
+ generate:
78
+ - name: Minimal (module only)
79
+ command: pdd generate -e MODULE=orders -e LANG_OR_FRAMEWORK=Python --output 'prompts/${MODULE}_${LANG_OR_FRAMEWORK}.prompt' pdd/templates/generic/generate_prompt.prompt
80
+ - name: With project docs
81
+ command: pdd generate -e MODULE=orders -e LANG_OR_FRAMEWORK=Python -e README_FILE=README.md -e API_DOC_FILE=docs/api-documentation.md -e DB_SCHEMA_FILE=context/database-schema.md --output 'prompts/${MODULE}_${LANG_OR_FRAMEWORK}.prompt' pdd/templates/generic/generate_prompt.prompt
82
+ - name: With CSVs and references (backend/Python)
83
+ command: pdd generate -e MODULE=orders -e LANG_OR_FRAMEWORK=Python -e README_FILE=README.md -e API_DOC_FILE=docs/api-documentation.md -e DB_SCHEMA_FILE=context/database-schema.md -e BACKEND_FILES_CSV=prompts/backend/python_architecture.csv -e IO_DEPENDENCIES_CSV=prompts/backend/io_dependencies.csv -e CODE_GENERATOR_PROMPT=prompts/code_generator_python.prompt --output 'prompts/${MODULE}_${LANG_OR_FRAMEWORK}.prompt' pdd/templates/generic/generate_prompt.prompt
84
+ - name: Frontend (TypeScriptReact) variant
85
+ command: pdd generate -e MODULE=profile_page -e LANG_OR_FRAMEWORK=TypeScriptReact -e LAYER=frontend -e README_FILE=README.md --output 'prompts/${MODULE}_${LANG_OR_FRAMEWORK}.prompt' pdd/templates/generic/generate_prompt.prompt
86
+ - name: From architecture.json
87
+ command: pdd generate -e MODULE=orders_api -e LANG_OR_FRAMEWORK=Python -e LAYER=api -e ARCHITECTURE_FILE=architecture.json --output 'prompts/${MODULE}_${LANG_OR_FRAMEWORK}.prompt' pdd/templates/generic/generate_prompt.prompt
88
+
89
+ discover:
90
+ enabled: false
91
+ max_per_pattern: 5
92
+ max_total: 10
93
+ ---
94
+
95
+ % You are an expert prompt writer and software architect for PDD. Your goal is to write a high-quality prompt that will generate the code for the ${MODULE} module/component. The prompt you create will be used to produce a detailed implementation specification in a file named ${MODULE}_${LANG_OR_FRAMEWORK}.prompt, suitable for the specified stack and layer.
96
+
97
+ % Project context (optional but recommended):
98
+ <readme><include>${README_FILE}</include></readme>
99
+ <api><include>${API_DOC_FILE}</include></api>
100
+ <database><include>${DB_SCHEMA_FILE}</include></database>
101
+ <backend_files_csv><include>${BACKEND_FILES_CSV}</include></backend_files_csv>
102
+ <io_dependencies_csv><include>${IO_DEPENDENCIES_CSV}</include></io_dependencies_csv>
103
+ <architecture><include>${ARCHITECTURE_FILE}</include></architecture>
104
+ <tech_stack><include>${TECH_STACK_FILE}</include></tech_stack>
105
+ <generate_code_cli_example><include>${CODE_GENERATOR_PROMPT}</include></generate_code_cli_example>
106
+
107
+ % Existing prompt references (optional):
108
+ <existing_backend_prompts><include-many>${EXISTING_PROMPTS}</include-many></existing_backend_prompts>
109
+
110
+ % Do the following:
111
+ - Explain concisely what you are going to do (create a prompt for the ${MODULE} module/component for the specified layer and stack).
112
+ - Analyze any difficulties this prompt might encounter for ${MODULE} (e.g., data modeling, API or UI contracts, transactions, idempotency, auth, state management, error handling) and briefly state mitigation strategies tailored to the given LAYER and LANG_OR_FRAMEWORK.
113
+ - If ARCHITECTURE_FILE is provided, identify the item that corresponds to this prompt by matching `filename` to `${MODULE}_${LANG_OR_FRAMEWORK}.prompt` (or best match by basename and layer). Use that item’s `reason`, `description`, `dependencies`, `interface`, and `tags` to shape the sections below.
114
+ - Then create the prompt content for ${MODULE} inside XML tags named prompt, ensuring conventions fit the stack and layer.
115
+
116
+ % The prompt you generate must follow this structure:
117
+ 1) First paragraph: describe the role and responsibility of the ${MODULE} module/component within the system (consider the LAYER if provided).
118
+ 2) A "Requirements" section with numbered points covering functionality, contracts, error handling, validation, logging, performance, and security.
119
+ 3) A "Dependencies" section using XML include tags for each dependency (see format below).
120
+ 4) An "Instructions" section with precise implementation guidance (clarify inputs/outputs, function/class responsibilities, edge cases, and testing notes).
121
+ 5) A clear "Deliverable" section describing the expected code artifacts and entry points.
122
+
123
+ % Dependencies format and conventions:
124
+ - Represent each dependency using an XML tag with the dependency name, and put the file path inside an <include> tag, e.g.:
125
+ <orders_service>
126
+ <include>context/orders_service_example.${DEP_EXAMPLE_EXT}</include>
127
+ </orders_service>
128
+ - Prefer real example files available in the provided context (use <include-many> when listing multiple). If examples are not provided, assume dependency examples live under context/ using the pattern context/[dependency_name]_example.${DEP_EXAMPLE_EXT}.
129
+ - Include all necessary dependencies for the module/component (based on the provided context and references).
130
+ - When using ARCHITECTURE_FILE, its `dependencies` reference other prompt filenames. Convert each dependency prompt filename into a sensible dependency name (strip language suffix and `_prompt`), and map to context files with the `${DEP_EXAMPLE_EXT}` extension if present; otherwise, list the prompt filename explicitly in a "Prompt Dependencies" subsection.
131
+
132
+ % Architecture awareness (when ARCHITECTURE_FILE provided):
133
+ - Align the "Requirements" and "Instructions" with the selected item’s `interface.type` (e.g., page, component, module, api, graphql, cli, job, message, config).
134
+ - For `api`, outline endpoints (method, path, auth) consistent with the architecture description; for `page`/`component`, describe route/props/data sources; for `job`, include trigger and retry policy; for `config`, list keys and sources.
135
+
136
+ % Style and quality requirements:
137
+ - The generated prompt must be detailed enough to yield production-ready code.
138
+ - Match the style and patterns of existing *_${LANG_OR_FRAMEWORK}.prompt files when present.
139
+ - Do not invent technologies or files; rely on the included context. If assumptions are necessary, state them explicitly and conservatively.
140
+
141
+ % Output contract:
142
+ - Return free-form text containing a single <prompt>...</prompt> XML section with the complete prompt content described above. Do not include additional commentary after the <prompt> block.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdd-cli
3
- Version: 0.0.59
3
+ Version: 0.0.61
4
4
  Summary: PDD (Prompt-Driven Development) Command Line Interface
5
5
  Author: Greg Tanaka
6
6
  Author-email: glt@alumni.caltech.edu
@@ -53,7 +53,7 @@ Requires-Dist: build; extra == "dev"
53
53
  Requires-Dist: twine; extra == "dev"
54
54
  Dynamic: license-file
55
55
 
56
- .. image:: https://img.shields.io/badge/pdd--cli-v0.0.59-blue
56
+ .. image:: https://img.shields.io/badge/pdd--cli-v0.0.61-blue
57
57
  :alt: PDD-CLI Version
58
58
 
59
59
  .. image:: https://img.shields.io/badge/Discord-join%20chat-7289DA.svg?logo=discord&logoColor=white&link=https://discord.gg/Yp4RTh8bG7
@@ -130,7 +130,7 @@ After installation, verify:
130
130
 
131
131
  pdd --version
132
132
 
133
- You'll see the current PDD version (e.g., 0.0.59).
133
+ You'll see the current PDD version (e.g., 0.0.61).
134
134
 
135
135
  Getting Started with Examples
136
136
  -----------------------------
@@ -1,4 +1,4 @@
1
- pdd/__init__.py,sha256=6ca93PkB5BfPH4LcpAo6xz5hCmdLn8B0P6cgmY8IqyY,633
1
+ pdd/__init__.py,sha256=60zr1ZNOzlSl4emQ4nH962OEwIZiUFC4jsFk1CrMMHc,633
2
2
  pdd/auto_deps_main.py,sha256=cpP3bbzVL3jomrGinpzTxzIDIC8tmDDYOwUAC1TKRaw,3970
3
3
  pdd/auto_include.py,sha256=OJcdcwTwJNqHPHKG9P4m9Ij-PiLex0EbuwJP0uiQi_Y,7484
4
4
  pdd/auto_update.py,sha256=w6jzTnMiYRNpwQHQxWNiIAwQ0d6xh1iOB3xgDsabWtc,5236
@@ -6,7 +6,7 @@ pdd/bug_main.py,sha256=EtaGTuucQ7VgqOhyg4o6GFG7_QtTsDPTrRdGJWT648M,4841
6
6
  pdd/bug_to_unit_test.py,sha256=BoQqNyKQpBQDW8-JwBH_RX4RHRSiU8Kk3EplFrkECt0,6665
7
7
  pdd/change.py,sha256=Hg_x0pa370-e6oDiczaTgFAy3Am9ReCPkqFrvqv4U38,6114
8
8
  pdd/change_main.py,sha256=04VHiO_D-jlfeRn6rrVH7ZTA5agXPoJGm1StGI8--XY,27804
9
- pdd/cli.py,sha256=c5Gco_Ra1ZCZf1MtxrNZdySDhZqICHBQMSH5VBqVPEw,55162
9
+ pdd/cli.py,sha256=phCEbNXjK-3Orjg7N-yhKb5DeXAhX9s1q7sWpqPlDps,55747
10
10
  pdd/cmd_test_main.py,sha256=M-i5x26ORXurt_pu8x1sgLAyVIItbuRThiux4wBg3Ls,7768
11
11
  pdd/code_generator.py,sha256=AxMRZKGIlLh9xWdn2FA6b3zSoZ-5TIZNIAzqjFboAQs,4718
12
12
  pdd/code_generator_main.py,sha256=UtoskalEPpMAvCO-zd6xmr1lbQqSWQ7BvYgNJCybqok,35151
@@ -45,9 +45,9 @@ pdd/llm_invoke.py,sha256=US8J9oZZdVgLIjcmOI-YyHu6z2un43ZN811IcQBmAIA,96728
45
45
  pdd/load_prompt_template.py,sha256=stt42Og0PzXy0N_bsaivk5e2l5z_BnHiXIJZM14oVWw,2673
46
46
  pdd/logo_animation.py,sha256=n6HJWzuFze2csAAW2-zbxfjvWFYRI4hIdwVBtHBOkj4,20782
47
47
  pdd/mcp_config.json,sha256=D3ctWHlShvltbtH37zbYb6smVE0V80_lGjDKDIqsSBE,124
48
- pdd/pdd_completion.fish,sha256=K4qT52-9LG6apKVH0Bgfqk1Kqfketb47ge_6mcacVFE,12089
49
- pdd/pdd_completion.sh,sha256=DI2gJc7IxqjgKyEgjmoi8ev3f9Gs3LJrRgSQ-u2T6ms,5844
50
- pdd/pdd_completion.zsh,sha256=f4BxXrLZUEcFeIUmXWdnFOTnTpJBFZ8KGpnIdjDdKFo,15353
48
+ pdd/pdd_completion.fish,sha256=pfEyBWzFp3matC_SW2BTDNaBJybYKUEi3YpPE-D6AKU,13776
49
+ pdd/pdd_completion.sh,sha256=xgx-g6aeCCrlh6loeLyJN5jCsX15YXrWyT1U499p3C0,6490
50
+ pdd/pdd_completion.zsh,sha256=V9-V8jqw3osjlXNOvjYMJf0E771-_EQe-Cboo1xzPvY,17090
51
51
  pdd/postprocess.py,sha256=mNw3iSDxE-eTYo3QwJCj_EmdEnnB5ysUN62YPapC_IM,4433
52
52
  pdd/postprocess_0.py,sha256=OW17GyCFLYErCyWh2tL4syuho3q2yFf2wyekQ4BLdPM,2168
53
53
  pdd/preprocess.py,sha256=75-J1smdi1Uq7gRQRLtVdkIfwltkeIvIZE-TkxxxCz0,12326
@@ -55,7 +55,7 @@ pdd/preprocess_main.py,sha256=WGhOB9qEu7MmFoyXNml_AmqGii73LJWngx4kTlZ526k,3262
55
55
  pdd/process_csv_change.py,sha256=ckNqVPRooWVyIvmqjdEgo2PDLnpoQ6Taa2dUaWGRlzU,27926
56
56
  pdd/pytest_output.py,sha256=IrRKYneW_F6zv9WaJwKFGnOBLFBFjk1CnhO_EVAjb9E,6612
57
57
  pdd/python_env_detector.py,sha256=y-QESoPNiKaD821uz8okX-9qA-oqvH9cQHY2_MwFHzU,5194
58
- pdd/setup_tool.py,sha256=sksHVgSLSzlMVSX-WoAZwLRqQhKYPhuCBoq6XbOLhTI,18171
58
+ pdd/setup_tool.py,sha256=h3MW7yr5tSlreq3u26aUfQqFTneQ-wNCoq0vwIYxqMY,24087
59
59
  pdd/split.py,sha256=9lWrh-JOjOpxRp4-s1VL7bqJMVWlsmY5LxONT7sYM8A,5288
60
60
  pdd/split_main.py,sha256=52rcZoeS_wpYRiqbqMUgr_hUY7GS62otwzDfuAGi6YA,4845
61
61
  pdd/summarize_directory.py,sha256=BR3-yGcmUdDT26vWLGokBo6mAZzaT7PzoY_qZriH3cc,10061
@@ -111,9 +111,10 @@ pdd/prompts/unfinished_prompt_LLM.prompt,sha256=vud_G9PlVv9Ig64uBC-hPEVFRk5lwpc8
111
111
  pdd/prompts/update_prompt_LLM.prompt,sha256=prIc8uLp2jqnLTHt6JvWDZGanPZipivhhYeXe0lVaYw,1328
112
112
  pdd/prompts/xml_convertor_LLM.prompt,sha256=YGRGXJeg6EhM9690f-SKqQrKqSJjLFD51UrPOlO0Frg,2786
113
113
  pdd/templates/architecture/architecture_json.prompt,sha256=uSNSsKTL-cuMMhi5a4GSpC94DKkOFAlXh7R0CUlo-hg,8126
114
- pdd_cli-0.0.59.dist-info/licenses/LICENSE,sha256=kvTJnnxPVTYlGKSY4ZN1kzdmJ0lxRdNWxgupaB27zsU,1066
115
- pdd_cli-0.0.59.dist-info/METADATA,sha256=wiXNwvDbviSCgnEaJwSbfWDv-BgkaZEjm3lpfHudbcM,12687
116
- pdd_cli-0.0.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
117
- pdd_cli-0.0.59.dist-info/entry_points.txt,sha256=Kr8HtNVb8uHZtQJNH4DnF8j7WNgWQbb7_Pw5hECSR-I,36
118
- pdd_cli-0.0.59.dist-info/top_level.txt,sha256=xjnhIACeMcMeDfVNREgQZl4EbTni2T11QkL5r7E-sbE,4
119
- pdd_cli-0.0.59.dist-info/RECORD,,
114
+ pdd/templates/generic/generate_prompt.prompt,sha256=EIE4vCEauJglLxS8OxuMx1S4JnPexi-yXxEOpIwaRW4,9276
115
+ pdd_cli-0.0.61.dist-info/licenses/LICENSE,sha256=kvTJnnxPVTYlGKSY4ZN1kzdmJ0lxRdNWxgupaB27zsU,1066
116
+ pdd_cli-0.0.61.dist-info/METADATA,sha256=iS6Mds35DEHVnnWEfrKI0tDsInfBj7V49NUFd8UWhdI,12687
117
+ pdd_cli-0.0.61.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
118
+ pdd_cli-0.0.61.dist-info/entry_points.txt,sha256=Kr8HtNVb8uHZtQJNH4DnF8j7WNgWQbb7_Pw5hECSR-I,36
119
+ pdd_cli-0.0.61.dist-info/top_level.txt,sha256=xjnhIACeMcMeDfVNREgQZl4EbTni2T11QkL5r7E-sbE,4
120
+ pdd_cli-0.0.61.dist-info/RECORD,,