Skip to content

Conversation

@Frostday
Copy link
Contributor

@Frostday Frostday commented Jan 2, 2026

Issue - #135 and #244

@Frostday Frostday marked this pull request as draft January 2, 2026 19:36
@Frostday Frostday changed the title New example for onboarding people New example for onboarding people + template for generating pddrc file Jan 3, 2026
@Frostday
Copy link
Contributor Author

Frostday commented Jan 3, 2026

Added the pddrc generation template (works based on the architecture json file)

@Frostday
Copy link
Contributor Author

Frostday commented Jan 4, 2026

Some screenshots of the new example working:

CLI:

image
image
image
image

Streamlit UI:

image
image
image

@Frostday Frostday marked this pull request as ready for review January 4, 2026 05:52
@jamesdlevine
Copy link
Contributor

Some initial quick thoughts (without hands-on with the example):

  • looks great as an example that will help people get up to speed with a substantial project
  • the prompts look well formed
  • maybe add requirements.txt for prereq packages?
  • it's also valuable for actual everyday use, so why not also:
    • generate a Makefile which can handle the build & help development
    • ensure the built example is itself installable with pip -e .
    • give it a simple commandline frontend that can initiate any of parts (cli, backend, frontend)

@Frostday
Copy link
Contributor Author

Frostday commented Jan 5, 2026

Thanks for the suggestions, James! I’ll try to implement these.

@gltanaka gltanaka requested a review from Copilot January 7, 2026 04:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a comprehensive template system for the PDD (Prompt Driven Development) linter project, providing both an example onboarding workflow and a generic template for generating .pddrc configuration files. The additions enhance the developer experience by providing clear documentation patterns and automated configuration generation capabilities.

Key Changes:

  • Added generic .pddrc generation template to help projects adopt PDD practices
  • Introduced extensive test suite for the prompts_linter example application
  • Added core implementation files for the linter (rules, models, pipeline, report, llm, helpers, fix modules)
  • Created CLI and frontend interfaces for the linter application

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pdd/templates/generic/generate_pddrc_YAML.prompt Template for generating PDD configuration files from architecture.json
examples/prompts_linter/tests/*.py Comprehensive test suite covering models, rules, pipeline, report, llm, helpers, fix, cli, and frontend
examples/prompts_linter/src/utils/*.py Core utility modules implementing linting logic, LLM integration, models, and reporting
examples/prompts_linter/src/cli/cli.py Command-line interface implementation
examples/prompts_linter/src/frontend/frontend_streamlit.py Streamlit web interface
examples/prompts_linter/src/backend/backend_api.py FastAPI backend service
examples/prompts_linter/prompts/*.prompt Prompt definitions for generating each module
Comments suppressed due to low confidence (1)

examples/prompts_linter/src/utils/llm.py:1

  • The key "gemini" should be "google" to match the provider name used in get_provider_and_model function (lines 96-105) where it checks for "google" and references DEFAULT_MODELS["google"].
import os

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@gltanaka gltanaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job!!
The prompts can be more compact but this might be a more of a function of the generate prompt template needing to be improved

You are an expert Python developer specializing in CLI tools using Typer and Rich. Your task is to implement the Command Line Interface (CLI) for the PDD Prompt Linter. This module, located at `src/cli/cli.py`, serves as the primary entry point for users interacting with the tool via the terminal. It is responsible for parsing arguments, configuring the runtime environment based on flags, invoking the central pipeline orchestrator, rendering the final report to the user, and handling fixed prompt output.

Requirements
1. **Argument Parsing**: Use `Typer` to define the CLI application. The main command must accept a mandatory `PROMPT_FILE` argument (path to the file to lint).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe including the spec would have made the list of args unnecessary and prompt more compact?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have increased the tokens, so decided not to include it for now - should the PDD prompt generation template have included the spec automatically? Or can it only include files from prompts, contexts/examples, code, and tests?

@@ -0,0 +1,108 @@
<prompt>
You are an expert Python developer architecting the `src/utils/fix.py` module for the PDD Prompt Linter. This module is the remediation engine responsible for transforming an original prompt text into a compliant version based on the analysis provided in a `Report` object. It operates in two modes: applying specific text replacements suggested by the LLM (patching) and enforcing structural integrity when critical PDD elements are missing (scaffolding).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a preamble might eliminate redundancies between prompts

Copy link
Contributor Author

@Frostday Frostday Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A preamble generated by PDD? - could be a new template in the future maybe?

@Frostday
Copy link
Contributor Author

Frostday commented Jan 8, 2026

Updates:

  • Fixed the issue in pddrc generation
  • Added requirements.txt and Makefile in the example
  • Fixed project_dependencies.csv
  • Fixed some other bugs too

Note: Fixing the project dependency bug improved both project generation time and output quality

@gltanaka gltanaka requested a review from Copilot January 8, 2026 02:04
@gltanaka
Copy link
Contributor

gltanaka commented Jan 8, 2026

thanks for your, can you address the copilot comments?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 52 out of 52 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Frostday
Copy link
Contributor Author

Frostday commented Jan 8, 2026

Addressed the comments

@jamesdlevine
Copy link
Contributor

I'm unable to file an issue against your fork so I'll comment bugs here...

The requirements.txt includes a clone of your personal pdd fork. That should not be a dependency (& also contradicts the installation steps in the README.) Like this-

-e git+https://github.com/Frostday/pdd.git@8df53aa2da1bc000832ad8038c2c092d99135bf1#egg=pdd_cli

@jamesdlevine
Copy link
Contributor

Bug: linter cli exits with error and warning.

pwd

/home/james/dhrub-example/pdd/examples/prompts_linter

pdd --version

pdd, version 0.0.105

cat /etc/issue

Ubuntu 24.04.3 LTS \n \l

python -m src.cli.cli prompts/backend_api_python.prompt

Unexpected error during pipeline execution: 1 validation error for Issue
rule_id
String should have at least 2 characters
For further information visit https://errors.pydantic.dev/2.11/v/string_too_short
/home/james/miniconda3/envs/pdd-released/lib/python3.12/site-packages/pydantic/main.py:463: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Expected 10 fields but got 6: Expected Message - serialized value may not be as expected [input_value=Message(content='{\n "gu...: None}, annotations=[]), input_type=Message])
PydanticSerializationUnexpectedValue(Expected StreamingChoices - serialized value may not be as expected [input_value=Choices(finish_reason='st...ider_specific_fields={}), input_type=Choices])
return self.pydantic_serializer.to_python(

@Frostday
Copy link
Contributor Author

Frostday commented Jan 8, 2026

Thanks for raising the issue, James.

I've updated the requirements and README to install pdd separately for now.

Also, the issue was caused by a rare edge case where the LLM returned an empty rule. This has now been addressed by adding a test and regenerating. One additional point to note is that I’ve only been able to use this tool with Vertex models, as those are the only ones I currently have access to.

Noticed a potential issue: when I run pdd sync, it always extends the test cases first - even when the current tests are failing (maybe it should only extend if the current tests are passing?)

@jamesdlevine
Copy link
Contributor

Installation fails on dependency versions - when pdd-cli is installed with pip. Pdd 0.0.106.

Try creating a clean environment from scratch, install pdd-cli with pip, then install the example according to the README instructions. Dependency installation (pip install -r ...) will fail on version issues. I hand edited requirements.text multiple times to loosen version restrictions, but there's a bit of a cascade of dependency issues I ran into.

@Frostday
Copy link
Contributor Author

Frostday commented Jan 9, 2026

Did you try the alternate installation method?

@Frostday
Copy link
Contributor Author

Frostday commented Jan 9, 2026

Cleaned up the requirements so that file should also work now.

@jamesdlevine
Copy link
Contributor

Cleaned up the requirements so that file should also work now.

Did you test this fix in a clean environment?

@Frostday
Copy link
Contributor Author

Frostday commented Jan 9, 2026

Cleaned up the requirements so that file should also work now.

Did you test this fix in a clean environment?

Yeah - Python 3.12

@jamesdlevine
Copy link
Contributor

still seeing some conflicts (boldfaced)

[stuff removed]
...
Installing collected packages: watchdog, uvicorn, tornado, toml, pydantic-core, pyarrow, narwhals, cachetools, blinker, annotated-doc, starlette, rich, pydeck, pydantic, typer, fastapi, altair, streamlit, litellm
Attempting uninstall: pydantic-core
Found existing installation: pydantic_core 2.33.1
Uninstalling pydantic_core-2.33.1:
Successfully uninstalled pydantic_core-2.33.1
Attempting uninstall: rich
Found existing installation: rich 14.0.0
Uninstalling rich-14.0.0:
Successfully uninstalled rich-14.0.0
Attempting uninstall: pydantic
Found existing installation: pydantic 2.11.2
Uninstalling pydantic-2.11.2:
Successfully uninstalled pydantic-2.11.2
Attempting uninstall: litellm
Found existing installation: litellm 1.80.13
Uninstalling litellm-1.80.13:
Successfully uninstalled litellm-1.80.13
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pdd-cli 0.0.107 requires pydantic==2.11.2, but you have pydantic 2.12.5 which is incompatible.
pdd-cli 0.0.107 requires rich==14.0.0, but you have rich 14.2.0 which is incompatible.

Successfully installed altair-6.0.0 annotated-doc-0.0.4 blinker-1.9.0 cachetools-6.2.4 fastapi-0.128.0 litellm-1.80.12 narwhals-2.15.0 pyarrow-22.0.0 pydantic-2.12.5 pydantic-core-2.41.5 pydeck-0.9.1 rich-14.2.0 starlette-0.50.0 streamlit-1.52.2 toml-0.10.2 tornado-6.5.4 typer-0.21.1 uvicorn-0.40.0 watchdog-6.0.0

@jamesdlevine
Copy link
Contributor

Another thing the --fix option doesn't seem to do much. Other than that, I was able to test cli and web UIs (after working around the requiements.txt issue).

@Frostday
Copy link
Contributor Author

Frostday commented Jan 10, 2026

still seeing some conflicts (boldfaced)

[stuff removed] ... Installing collected packages: watchdog, uvicorn, tornado, toml, pydantic-core, pyarrow, narwhals, cachetools, blinker, annotated-doc, starlette, rich, pydeck, pydantic, typer, fastapi, altair, streamlit, litellm Attempting uninstall: pydantic-core Found existing installation: pydantic_core 2.33.1 Uninstalling pydantic_core-2.33.1: Successfully uninstalled pydantic_core-2.33.1 Attempting uninstall: rich Found existing installation: rich 14.0.0 Uninstalling rich-14.0.0: Successfully uninstalled rich-14.0.0 Attempting uninstall: pydantic Found existing installation: pydantic 2.11.2 Uninstalling pydantic-2.11.2: Successfully uninstalled pydantic-2.11.2 Attempting uninstall: litellm Found existing installation: litellm 1.80.13 Uninstalling litellm-1.80.13: Successfully uninstalled litellm-1.80.13 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. pdd-cli 0.0.107 requires pydantic==2.11.2, but you have pydantic 2.12.5 which is incompatible. pdd-cli 0.0.107 requires rich==14.0.0, but you have rich 14.2.0 which is incompatible. Successfully installed altair-6.0.0 annotated-doc-0.0.4 blinker-1.9.0 cachetools-6.2.4 fastapi-0.128.0 litellm-1.80.12 narwhals-2.15.0 pyarrow-22.0.0 pydantic-2.12.5 pydantic-core-2.41.5 pydeck-0.9.1 rich-14.2.0 starlette-0.50.0 streamlit-1.52.2 toml-0.10.2 tornado-6.5.4 typer-0.21.1 uvicorn-0.40.0 watchdog-6.0.0

I built this tool using PDD v0.0.104 I think. I recommend using that version, as I don’t have control over dependency updates in future versions of the PDD package. It should work reliably with v0.0.104 or v0.0.100.

Also, the pydantic and rich packages should generally be compatible even if you’re using different versions. Could you share what changes you had to make to your environment to get the tool running?

@Frostday
Copy link
Contributor Author

Frostday commented Jan 10, 2026

Another thing the --fix option doesn't seem to do much. Other than that, I was able to test cli and web UIs (after working around the requiements.txt issue).

Yes, I’m planning further model optimization and prompt refinements to improve the --fix functionality in v2. For now, the primary purpose of this example is to help with onboarding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants