run-pdt 0.1.0__tar.gz
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.
- run_pdt-0.1.0/.gitignore +225 -0
- run_pdt-0.1.0/LICENSE +21 -0
- run_pdt-0.1.0/PKG-INFO +157 -0
- run_pdt-0.1.0/README.md +133 -0
- run_pdt-0.1.0/VISION.md +456 -0
- run_pdt-0.1.0/pyproject.toml +36 -0
- run_pdt-0.1.0/src/pdt_cli/__init__.py +1 -0
- run_pdt-0.1.0/src/pdt_cli/adapter.py +206 -0
- run_pdt-0.1.0/src/pdt_cli/engine.py +312 -0
- run_pdt-0.1.0/src/pdt_cli/main.py +298 -0
- run_pdt-0.1.0/src/pdt_cli/parser.py +106 -0
- run_pdt-0.1.0/src/pdt_cli/resolver.py +55 -0
- run_pdt-0.1.0/src/pdt_cli/server.py +110 -0
- run_pdt-0.1.0/src/pdt_cli/state.py +114 -0
- run_pdt-0.1.0/src/pdt_cli/workspace.py +107 -0
- run_pdt-0.1.0/uv.lock +792 -0
run_pdt-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
.planning/
|
|
220
|
+
|
|
221
|
+
# PDT runtime and test files
|
|
222
|
+
.pdt/
|
|
223
|
+
test_workspace/
|
|
224
|
+
mock_llm.py
|
|
225
|
+
scratch/pdt_dev_deprecation/
|
run_pdt-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 pdtdotdev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
run_pdt-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: run-pdt
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Process Deploy Tool: Git-native runtime for state-bounded operational AI workflows.
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: ai-agents,cli,dev-tools,infrastructure,workflow-automation
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Requires-Python: >=3.11
|
|
14
|
+
Requires-Dist: click>=8.0.0
|
|
15
|
+
Requires-Dist: fastapi>=0.136.3
|
|
16
|
+
Requires-Dist: google-genai>=2.8.0
|
|
17
|
+
Requires-Dist: markdown-it-py>=4.2.0
|
|
18
|
+
Requires-Dist: pydantic>=2.13.4
|
|
19
|
+
Requires-Dist: rich>=15.0.0
|
|
20
|
+
Requires-Dist: ruamel-yaml>=0.19.1
|
|
21
|
+
Requires-Dist: typer>=0.26.7
|
|
22
|
+
Requires-Dist: uvicorn>=0.49.0
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# PDT (Process Deploy Tool)
|
|
26
|
+
|
|
27
|
+
> **Git-native runtime for state-bounded operational AI workflows.**
|
|
28
|
+
|
|
29
|
+
`pdt` is a developer-focused Command Line Interface (CLI) and runtime engine designed to govern, parse, lint, and execute standard-conforming **`PROCESS.md`** files.
|
|
30
|
+
|
|
31
|
+
Inspired by analytics engineering tools like `dbt`, `pdt` decouples general-purpose LLM capabilities (**skills**) from operational business logic and policies (**processes**). It provides deterministic execution boundaries, step-by-step state preservation, and human-in-the-loop (HITL) gates.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Core Philosophy: Workflow Engineering
|
|
36
|
+
|
|
37
|
+
Most operational teams do not need another open-ended autonomous agent. They require a reliable framework to transform recurring, high-stakes business processes into structured, version-controlled workflows.
|
|
38
|
+
|
|
39
|
+
PDT establishes this via **Workflow Engineering**—pairing deterministic execution structures with bounded model reasoning:
|
|
40
|
+
* **Decoupled Skills & Processes**: Skills describe *how* to perform a reusable task (general/mechanical); processes describe *what* should happen, in what order, and under what constraints (contextual/governing).
|
|
41
|
+
* **Markdown as Code**: `PROCESS.md` files are the "SQL of operations"—readable by non-developer process owners, versioned in Git, and executable by a computer.
|
|
42
|
+
* **Deterministic Bounding**: Instead of letting an LLM navigate a workflow in an open-ended loop (resulting in unpredictable execution costs and loops), the PDT runtime runs one isolated step at a time, enforcing boundaries and security.
|
|
43
|
+
* **Human-Centered Exceptions**: When exceptions or gates are hit, the runtime halts, saves state, and alerts humans to verify or approve the execution.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Workspace Layout
|
|
48
|
+
|
|
49
|
+
A conforming PDT workspace is organized as follows:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
/workspace
|
|
53
|
+
├── pdt.yaml # Workspace configuration
|
|
54
|
+
├── processes/ # Executable workflows
|
|
55
|
+
│ └── growth_experiment_review/
|
|
56
|
+
│ └── PROCESS.md
|
|
57
|
+
├── skills/ # Capability guides
|
|
58
|
+
│ └── experiment-analysis/
|
|
59
|
+
│ └── SKILL.md
|
|
60
|
+
├── tools/ # Code execution units
|
|
61
|
+
│ └── experiment_lookup/
|
|
62
|
+
│ ├── tool.yaml
|
|
63
|
+
│ └── main.py
|
|
64
|
+
└── schemas/ # Data validation contracts
|
|
65
|
+
└── experiment-summary.schema.json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Anatomy of `PROCESS.md`
|
|
71
|
+
|
|
72
|
+
An executable SOP contains three main components:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
---
|
|
76
|
+
id: growth_experiment_review
|
|
77
|
+
name: Growth Experiment Review
|
|
78
|
+
version: 0.1.0
|
|
79
|
+
owner: growth-team
|
|
80
|
+
status: active
|
|
81
|
+
runtime: pdt.process.v0
|
|
82
|
+
---
|
|
83
|
+
# Description
|
|
84
|
+
A workflow to review growth experiments, aggregate conversions, and perform high-level evaluation before approval.
|
|
85
|
+
|
|
86
|
+
# Workflow
|
|
87
|
+
## Step 1: Load active experiments
|
|
88
|
+
Lookup all active experiments using the tool `tool/experiment_lookup`.
|
|
89
|
+
|
|
90
|
+
## Step 2: Assess statistical performance
|
|
91
|
+
Evaluate the total conversion metrics using `skill/experiment-analysis` and construct a structured JSON summary matching `schema/experiment-summary`.
|
|
92
|
+
|
|
93
|
+
## Step 3: Approve experiment
|
|
94
|
+
Review the assessment and request final business approval before closing.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## CLI Commands & Usage
|
|
100
|
+
|
|
101
|
+
Install the PDT package:
|
|
102
|
+
```bash
|
|
103
|
+
pip install run-pdt
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 1. `pdt init`
|
|
107
|
+
Initialize a new standard workspace directory layout with default configuration:
|
|
108
|
+
```bash
|
|
109
|
+
pdt init [workspace_path]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 2. `pdt lint`
|
|
113
|
+
Validate workspace config, verify step index ordering, and resolve all inline reference links to confirm they point to valid skills, tools, processes, and schemas:
|
|
114
|
+
```bash
|
|
115
|
+
pdt lint processes/growth_experiment_review/PROCESS.md
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 3. `pdt parse`
|
|
119
|
+
Parse a `PROCESS.md` file and output a clean Abstract Syntax Tree (AST) in JSON format:
|
|
120
|
+
```bash
|
|
121
|
+
pdt parse processes/growth_experiment_review/PROCESS.md
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 4. `pdt run`
|
|
125
|
+
Execute the workflow steps sequentially. PDT automatically runs local tools, saves evidence, compiles bounded prompts, and pauses when a human gate (e.g. "approval") is encountered.
|
|
126
|
+
|
|
127
|
+
* **Execute workflow fully:**
|
|
128
|
+
```bash
|
|
129
|
+
pdt run processes/growth_experiment_review/PROCESS.md --input metrics.json
|
|
130
|
+
```
|
|
131
|
+
* **Run a single step only:**
|
|
132
|
+
```bash
|
|
133
|
+
pdt run processes/growth_experiment_review/PROCESS.md --step 2
|
|
134
|
+
```
|
|
135
|
+
* **Resume a paused workflow:**
|
|
136
|
+
```bash
|
|
137
|
+
pdt run --resume run_98a72f1c
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 5. `pdt deploy`
|
|
141
|
+
Package the workspace and generate container/deployment configurations:
|
|
142
|
+
```bash
|
|
143
|
+
pdt deploy --target docker --dry-run
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Webhook Server Daemon
|
|
149
|
+
|
|
150
|
+
Deploy the workspace as a serverless runtime using the built-in FastAPI daemon:
|
|
151
|
+
```bash
|
|
152
|
+
uvicorn pdt_cli.server:app --port 8080
|
|
153
|
+
```
|
|
154
|
+
This exposes REST API endpoints to trigger and manage workflows remotely:
|
|
155
|
+
* `POST /run/{process_id}`: Trigger step execution with input payload.
|
|
156
|
+
* `GET /status/{run_id}`: Check status and inspect run evidence.
|
|
157
|
+
* `POST /approve/{run_id}`: Submit approval inputs to resume paused states.
|
run_pdt-0.1.0/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# PDT (Process Deploy Tool)
|
|
2
|
+
|
|
3
|
+
> **Git-native runtime for state-bounded operational AI workflows.**
|
|
4
|
+
|
|
5
|
+
`pdt` is a developer-focused Command Line Interface (CLI) and runtime engine designed to govern, parse, lint, and execute standard-conforming **`PROCESS.md`** files.
|
|
6
|
+
|
|
7
|
+
Inspired by analytics engineering tools like `dbt`, `pdt` decouples general-purpose LLM capabilities (**skills**) from operational business logic and policies (**processes**). It provides deterministic execution boundaries, step-by-step state preservation, and human-in-the-loop (HITL) gates.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Core Philosophy: Workflow Engineering
|
|
12
|
+
|
|
13
|
+
Most operational teams do not need another open-ended autonomous agent. They require a reliable framework to transform recurring, high-stakes business processes into structured, version-controlled workflows.
|
|
14
|
+
|
|
15
|
+
PDT establishes this via **Workflow Engineering**—pairing deterministic execution structures with bounded model reasoning:
|
|
16
|
+
* **Decoupled Skills & Processes**: Skills describe *how* to perform a reusable task (general/mechanical); processes describe *what* should happen, in what order, and under what constraints (contextual/governing).
|
|
17
|
+
* **Markdown as Code**: `PROCESS.md` files are the "SQL of operations"—readable by non-developer process owners, versioned in Git, and executable by a computer.
|
|
18
|
+
* **Deterministic Bounding**: Instead of letting an LLM navigate a workflow in an open-ended loop (resulting in unpredictable execution costs and loops), the PDT runtime runs one isolated step at a time, enforcing boundaries and security.
|
|
19
|
+
* **Human-Centered Exceptions**: When exceptions or gates are hit, the runtime halts, saves state, and alerts humans to verify or approve the execution.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Workspace Layout
|
|
24
|
+
|
|
25
|
+
A conforming PDT workspace is organized as follows:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
/workspace
|
|
29
|
+
├── pdt.yaml # Workspace configuration
|
|
30
|
+
├── processes/ # Executable workflows
|
|
31
|
+
│ └── growth_experiment_review/
|
|
32
|
+
│ └── PROCESS.md
|
|
33
|
+
├── skills/ # Capability guides
|
|
34
|
+
│ └── experiment-analysis/
|
|
35
|
+
│ └── SKILL.md
|
|
36
|
+
├── tools/ # Code execution units
|
|
37
|
+
│ └── experiment_lookup/
|
|
38
|
+
│ ├── tool.yaml
|
|
39
|
+
│ └── main.py
|
|
40
|
+
└── schemas/ # Data validation contracts
|
|
41
|
+
└── experiment-summary.schema.json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Anatomy of `PROCESS.md`
|
|
47
|
+
|
|
48
|
+
An executable SOP contains three main components:
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
---
|
|
52
|
+
id: growth_experiment_review
|
|
53
|
+
name: Growth Experiment Review
|
|
54
|
+
version: 0.1.0
|
|
55
|
+
owner: growth-team
|
|
56
|
+
status: active
|
|
57
|
+
runtime: pdt.process.v0
|
|
58
|
+
---
|
|
59
|
+
# Description
|
|
60
|
+
A workflow to review growth experiments, aggregate conversions, and perform high-level evaluation before approval.
|
|
61
|
+
|
|
62
|
+
# Workflow
|
|
63
|
+
## Step 1: Load active experiments
|
|
64
|
+
Lookup all active experiments using the tool `tool/experiment_lookup`.
|
|
65
|
+
|
|
66
|
+
## Step 2: Assess statistical performance
|
|
67
|
+
Evaluate the total conversion metrics using `skill/experiment-analysis` and construct a structured JSON summary matching `schema/experiment-summary`.
|
|
68
|
+
|
|
69
|
+
## Step 3: Approve experiment
|
|
70
|
+
Review the assessment and request final business approval before closing.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## CLI Commands & Usage
|
|
76
|
+
|
|
77
|
+
Install the PDT package:
|
|
78
|
+
```bash
|
|
79
|
+
pip install run-pdt
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 1. `pdt init`
|
|
83
|
+
Initialize a new standard workspace directory layout with default configuration:
|
|
84
|
+
```bash
|
|
85
|
+
pdt init [workspace_path]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 2. `pdt lint`
|
|
89
|
+
Validate workspace config, verify step index ordering, and resolve all inline reference links to confirm they point to valid skills, tools, processes, and schemas:
|
|
90
|
+
```bash
|
|
91
|
+
pdt lint processes/growth_experiment_review/PROCESS.md
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 3. `pdt parse`
|
|
95
|
+
Parse a `PROCESS.md` file and output a clean Abstract Syntax Tree (AST) in JSON format:
|
|
96
|
+
```bash
|
|
97
|
+
pdt parse processes/growth_experiment_review/PROCESS.md
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 4. `pdt run`
|
|
101
|
+
Execute the workflow steps sequentially. PDT automatically runs local tools, saves evidence, compiles bounded prompts, and pauses when a human gate (e.g. "approval") is encountered.
|
|
102
|
+
|
|
103
|
+
* **Execute workflow fully:**
|
|
104
|
+
```bash
|
|
105
|
+
pdt run processes/growth_experiment_review/PROCESS.md --input metrics.json
|
|
106
|
+
```
|
|
107
|
+
* **Run a single step only:**
|
|
108
|
+
```bash
|
|
109
|
+
pdt run processes/growth_experiment_review/PROCESS.md --step 2
|
|
110
|
+
```
|
|
111
|
+
* **Resume a paused workflow:**
|
|
112
|
+
```bash
|
|
113
|
+
pdt run --resume run_98a72f1c
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 5. `pdt deploy`
|
|
117
|
+
Package the workspace and generate container/deployment configurations:
|
|
118
|
+
```bash
|
|
119
|
+
pdt deploy --target docker --dry-run
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Webhook Server Daemon
|
|
125
|
+
|
|
126
|
+
Deploy the workspace as a serverless runtime using the built-in FastAPI daemon:
|
|
127
|
+
```bash
|
|
128
|
+
uvicorn pdt_cli.server:app --port 8080
|
|
129
|
+
```
|
|
130
|
+
This exposes REST API endpoints to trigger and manage workflows remotely:
|
|
131
|
+
* `POST /run/{process_id}`: Trigger step execution with input payload.
|
|
132
|
+
* `GET /status/{run_id}`: Check status and inspect run evidence.
|
|
133
|
+
* `POST /approve/{run_id}`: Submit approval inputs to resume paused states.
|