prodpilot 1.0.0rc1__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.
Files changed (197) hide show
  1. prodpilot-1.0.0rc1/.cursor/mcp.json +9 -0
  2. prodpilot-1.0.0rc1/.github/workflows/release.yml +52 -0
  3. prodpilot-1.0.0rc1/.github/workflows/tests.yml +67 -0
  4. prodpilot-1.0.0rc1/.gitignore +35 -0
  5. prodpilot-1.0.0rc1/.vscode/mcp.json +9 -0
  6. prodpilot-1.0.0rc1/CHANGELOG.md +48 -0
  7. prodpilot-1.0.0rc1/LICENSE +21 -0
  8. prodpilot-1.0.0rc1/PKG-INFO +301 -0
  9. prodpilot-1.0.0rc1/README.md +265 -0
  10. prodpilot-1.0.0rc1/SECURITY.md +42 -0
  11. prodpilot-1.0.0rc1/THIRD_PARTY_NOTICES.md +14 -0
  12. prodpilot-1.0.0rc1/docs/architecture.md +248 -0
  13. prodpilot-1.0.0rc1/docs/compatibility.md +351 -0
  14. prodpilot-1.0.0rc1/docs/corrections.md +68 -0
  15. prodpilot-1.0.0rc1/docs/evaluation.md +245 -0
  16. prodpilot-1.0.0rc1/docs/metrics.md +190 -0
  17. prodpilot-1.0.0rc1/docs/phase1-verification.md +96 -0
  18. prodpilot-1.0.0rc1/docs/pipeline.md +556 -0
  19. prodpilot-1.0.0rc1/docs/quickstart.md +126 -0
  20. prodpilot-1.0.0rc1/pyproject.toml +66 -0
  21. prodpilot-1.0.0rc1/src/prodpilot/__init__.py +9 -0
  22. prodpilot-1.0.0rc1/src/prodpilot/__main__.py +10 -0
  23. prodpilot-1.0.0rc1/src/prodpilot/astchecks.py +1019 -0
  24. prodpilot-1.0.0rc1/src/prodpilot/audit.py +343 -0
  25. prodpilot-1.0.0rc1/src/prodpilot/blueprint.py +227 -0
  26. prodpilot-1.0.0rc1/src/prodpilot/builds.py +348 -0
  27. prodpilot-1.0.0rc1/src/prodpilot/buildtest.py +518 -0
  28. prodpilot-1.0.0rc1/src/prodpilot/cicd.py +506 -0
  29. prodpilot-1.0.0rc1/src/prodpilot/cli.py +302 -0
  30. prodpilot-1.0.0rc1/src/prodpilot/config.py +319 -0
  31. prodpilot-1.0.0rc1/src/prodpilot/connect.py +213 -0
  32. prodpilot-1.0.0rc1/src/prodpilot/constraints.py +390 -0
  33. prodpilot-1.0.0rc1/src/prodpilot/dataset.py +461 -0
  34. prodpilot-1.0.0rc1/src/prodpilot/detection.py +269 -0
  35. prodpilot-1.0.0rc1/src/prodpilot/dispatch.py +408 -0
  36. prodpilot-1.0.0rc1/src/prodpilot/entropy.py +321 -0
  37. prodpilot-1.0.0rc1/src/prodpilot/extraction.py +1007 -0
  38. prodpilot-1.0.0rc1/src/prodpilot/features.py +355 -0
  39. prodpilot-1.0.0rc1/src/prodpilot/filechecks.py +498 -0
  40. prodpilot-1.0.0rc1/src/prodpilot/findings.py +59 -0
  41. prodpilot-1.0.0rc1/src/prodpilot/gate.py +314 -0
  42. prodpilot-1.0.0rc1/src/prodpilot/gh.py +342 -0
  43. prodpilot-1.0.0rc1/src/prodpilot/jsparse.py +262 -0
  44. prodpilot-1.0.0rc1/src/prodpilot/labels.py +803 -0
  45. prodpilot-1.0.0rc1/src/prodpilot/loop.py +395 -0
  46. prodpilot-1.0.0rc1/src/prodpilot/model/model.joblib +0 -0
  47. prodpilot-1.0.0rc1/src/prodpilot/monitor.py +178 -0
  48. prodpilot-1.0.0rc1/src/prodpilot/negatives.py +359 -0
  49. prodpilot-1.0.0rc1/src/prodpilot/preflight.py +240 -0
  50. prodpilot-1.0.0rc1/src/prodpilot/prereqs.py +76 -0
  51. prodpilot-1.0.0rc1/src/prodpilot/prodpush.py +303 -0
  52. prodpilot-1.0.0rc1/src/prodpilot/projectstate.py +228 -0
  53. prodpilot-1.0.0rc1/src/prodpilot/provider.py +132 -0
  54. prodpilot-1.0.0rc1/src/prodpilot/push.py +300 -0
  55. prodpilot-1.0.0rc1/src/prodpilot/reaudit.py +149 -0
  56. prodpilot-1.0.0rc1/src/prodpilot/render.py +376 -0
  57. prodpilot-1.0.0rc1/src/prodpilot/rules.py +437 -0
  58. prodpilot-1.0.0rc1/src/prodpilot/scoring.py +209 -0
  59. prodpilot-1.0.0rc1/src/prodpilot/sealing.py +380 -0
  60. prodpilot-1.0.0rc1/src/prodpilot/server.py +316 -0
  61. prodpilot-1.0.0rc1/src/prodpilot/smoke.py +350 -0
  62. prodpilot-1.0.0rc1/src/prodpilot/templates.py +647 -0
  63. prodpilot-1.0.0rc1/src/prodpilot/training.py +651 -0
  64. prodpilot-1.0.0rc1/src/prodpilot/vendor/node_modules/acorn/LICENSE +21 -0
  65. prodpilot-1.0.0rc1/src/prodpilot/vendor/node_modules/acorn/dist/acorn.mjs +6313 -0
  66. prodpilot-1.0.0rc1/src/prodpilot/vendor/node_modules/acorn/package.json +50 -0
  67. prodpilot-1.0.0rc1/src/prodpilot/vendor/node_modules/acorn-jsx/LICENSE +19 -0
  68. prodpilot-1.0.0rc1/src/prodpilot/vendor/node_modules/acorn-jsx/index.js +488 -0
  69. prodpilot-1.0.0rc1/src/prodpilot/vendor/node_modules/acorn-jsx/package.json +27 -0
  70. prodpilot-1.0.0rc1/src/prodpilot/vendor/node_modules/acorn-jsx/xhtml.js +255 -0
  71. prodpilot-1.0.0rc1/src/prodpilot/vendor/parse.mjs +68 -0
  72. prodpilot-1.0.0rc1/src/prodpilot/verify.py +212 -0
  73. prodpilot-1.0.0rc1/tests/apply.py +242 -0
  74. prodpilot-1.0.0rc1/tests/conftest.py +13 -0
  75. prodpilot-1.0.0rc1/tests/pipeline.py +427 -0
  76. prodpilot-1.0.0rc1/tests/samples/amb_two_drivers/package.json +8 -0
  77. prodpilot-1.0.0rc1/tests/samples/amb_two_drivers/src/server.js +9 -0
  78. prodpilot-1.0.0rc1/tests/samples/amb_two_entries/package.json +6 -0
  79. prodpilot-1.0.0rc1/tests/samples/amb_two_entries/src/app.js +2 -0
  80. prodpilot-1.0.0rc1/tests/samples/amb_two_entries/src/index.js +2 -0
  81. prodpilot-1.0.0rc1/tests/samples/amb_two_entries/src/server.js +2 -0
  82. prodpilot-1.0.0rc1/tests/samples/amb_two_lockfiles/package-lock.json +1 -0
  83. prodpilot-1.0.0rc1/tests/samples/amb_two_lockfiles/package.json +8 -0
  84. prodpilot-1.0.0rc1/tests/samples/amb_two_lockfiles/src/server.js +3 -0
  85. prodpilot-1.0.0rc1/tests/samples/amb_two_lockfiles/yarn.lock +1 -0
  86. prodpilot-1.0.0rc1/tests/samples/amb_two_roots/package.json +8 -0
  87. prodpilot-1.0.0rc1/tests/samples/amb_two_roots/src/server.js +7 -0
  88. prodpilot-1.0.0rc1/tests/samples/amb_unnamed_secret/package.json +8 -0
  89. prodpilot-1.0.0rc1/tests/samples/amb_unnamed_secret/src/server.js +11 -0
  90. prodpilot-1.0.0rc1/tests/samples/ambiguous_fullstack/package.json +17 -0
  91. prodpilot-1.0.0rc1/tests/samples/ambiguous_fullstack/server.js +4 -0
  92. prodpilot-1.0.0rc1/tests/samples/docker_ok/Dockerfile +6 -0
  93. prodpilot-1.0.0rc1/tests/samples/docker_ok/package.json +9 -0
  94. prodpilot-1.0.0rc1/tests/samples/docker_ok/server.js +15 -0
  95. prodpilot-1.0.0rc1/tests/samples/node_express_api/package.json +18 -0
  96. prodpilot-1.0.0rc1/tests/samples/node_express_api/src/server.js +8 -0
  97. prodpilot-1.0.0rc1/tests/samples/node_express_gated/.dockerignore +4 -0
  98. prodpilot-1.0.0rc1/tests/samples/node_express_gated/.env.example +2 -0
  99. prodpilot-1.0.0rc1/tests/samples/node_express_gated/.github/workflows/deploy.yml +9 -0
  100. prodpilot-1.0.0rc1/tests/samples/node_express_gated/.gitignore +4 -0
  101. prodpilot-1.0.0rc1/tests/samples/node_express_gated/Dockerfile +14 -0
  102. prodpilot-1.0.0rc1/tests/samples/node_express_gated/package.json +22 -0
  103. prodpilot-1.0.0rc1/tests/samples/node_express_gated/src/server.js +51 -0
  104. prodpilot-1.0.0rc1/tests/samples/node_express_hardened/.env.example +5 -0
  105. prodpilot-1.0.0rc1/tests/samples/node_express_hardened/package.json +17 -0
  106. prodpilot-1.0.0rc1/tests/samples/node_express_hardened/src/db/pool.js +10 -0
  107. prodpilot-1.0.0rc1/tests/samples/node_express_hardened/src/logger.js +9 -0
  108. prodpilot-1.0.0rc1/tests/samples/node_express_hardened/src/routes/orderRoutes.js +8 -0
  109. prodpilot-1.0.0rc1/tests/samples/node_express_hardened/src/server.js +41 -0
  110. prodpilot-1.0.0rc1/tests/samples/node_express_insecure/package.json +15 -0
  111. prodpilot-1.0.0rc1/tests/samples/node_express_insecure/src/controllers/invoiceController.js +8 -0
  112. prodpilot-1.0.0rc1/tests/samples/node_express_insecure/src/routes/invoiceRoutes.js +11 -0
  113. prodpilot-1.0.0rc1/tests/samples/node_express_insecure/src/server.js +23 -0
  114. prodpilot-1.0.0rc1/tests/samples/node_express_ready/.dockerignore +4 -0
  115. prodpilot-1.0.0rc1/tests/samples/node_express_ready/.github/workflows/deploy.yml +10 -0
  116. prodpilot-1.0.0rc1/tests/samples/node_express_ready/.gitignore +3 -0
  117. prodpilot-1.0.0rc1/tests/samples/node_express_ready/Dockerfile +14 -0
  118. prodpilot-1.0.0rc1/tests/samples/node_express_ready/package.json +12 -0
  119. prodpilot-1.0.0rc1/tests/samples/node_express_ready/src/server.js +9 -0
  120. prodpilot-1.0.0rc1/tests/samples/node_express_secrets/package.json +6 -0
  121. prodpilot-1.0.0rc1/tests/samples/node_express_secrets/src/config.js +8 -0
  122. prodpilot-1.0.0rc1/tests/samples/node_express_secure/package.json +15 -0
  123. prodpilot-1.0.0rc1/tests/samples/node_express_secure/src/controllers/userController.js +12 -0
  124. prodpilot-1.0.0rc1/tests/samples/node_express_secure/src/routes/userRoutes.js +8 -0
  125. prodpilot-1.0.0rc1/tests/samples/node_express_secure/src/server.js +22 -0
  126. prodpilot-1.0.0rc1/tests/samples/node_express_secure/src/services/userService.js +7 -0
  127. prodpilot-1.0.0rc1/tests/samples/node_express_wildcard/package.json +6 -0
  128. prodpilot-1.0.0rc1/tests/samples/node_express_wildcard/src/server.js +10 -0
  129. prodpilot-1.0.0rc1/tests/samples/react_vite_app/package.json +20 -0
  130. prodpilot-1.0.0rc1/tests/samples/react_vite_app/src/main.jsx +4 -0
  131. prodpilot-1.0.0rc1/tests/samples/react_vite_app/vite.config.js +6 -0
  132. prodpilot-1.0.0rc1/tests/samples/react_vite_hardened/.env.example +2 -0
  133. prodpilot-1.0.0rc1/tests/samples/react_vite_hardened/package.json +13 -0
  134. prodpilot-1.0.0rc1/tests/samples/react_vite_hardened/src/ErrorBoundary.jsx +23 -0
  135. prodpilot-1.0.0rc1/tests/samples/react_vite_hardened/src/api.js +6 -0
  136. prodpilot-1.0.0rc1/tests/samples/react_vite_hardened/src/main.jsx +23 -0
  137. prodpilot-1.0.0rc1/tests/samples/react_vite_hardened/vite.config.js +4 -0
  138. prodpilot-1.0.0rc1/tests/samples/react_vite_noroute/package.json +13 -0
  139. prodpilot-1.0.0rc1/tests/samples/react_vite_noroute/src/routes.jsx +12 -0
  140. prodpilot-1.0.0rc1/tests/samples/react_vite_noroute/vite.config.js +3 -0
  141. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/.dockerignore +4 -0
  142. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/.github/workflows/deploy.yml +10 -0
  143. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/.gitignore +4 -0
  144. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/Dockerfile +13 -0
  145. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/nginx.conf +22 -0
  146. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/package.json +13 -0
  147. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/src/main.jsx +8 -0
  148. prodpilot-1.0.0rc1/tests/samples/react_vite_ready/vite.config.js +4 -0
  149. prodpilot-1.0.0rc1/tests/samples/react_vite_ts_config/package.json +19 -0
  150. prodpilot-1.0.0rc1/tests/samples/react_vite_ts_config/src/main.tsx +8 -0
  151. prodpilot-1.0.0rc1/tests/samples/react_vite_ts_config/vite.config.ts +9 -0
  152. prodpilot-1.0.0rc1/tests/samples/unrecognized_python_service/app.py +8 -0
  153. prodpilot-1.0.0rc1/tests/samples/unrecognized_python_service/pyproject.toml +5 -0
  154. prodpilot-1.0.0rc1/tests/samples/vite_without_react/package.json +17 -0
  155. prodpilot-1.0.0rc1/tests/samples/vite_without_react/src/main.js +5 -0
  156. prodpilot-1.0.0rc1/tests/samples/vite_without_react/vite.config.js +6 -0
  157. prodpilot-1.0.0rc1/tests/test_astchecks.py +700 -0
  158. prodpilot-1.0.0rc1/tests/test_audit.py +323 -0
  159. prodpilot-1.0.0rc1/tests/test_builds.py +261 -0
  160. prodpilot-1.0.0rc1/tests/test_buildtest.py +599 -0
  161. prodpilot-1.0.0rc1/tests/test_cicd.py +721 -0
  162. prodpilot-1.0.0rc1/tests/test_clients.py +172 -0
  163. prodpilot-1.0.0rc1/tests/test_config_secrets.py +329 -0
  164. prodpilot-1.0.0rc1/tests/test_connect.py +257 -0
  165. prodpilot-1.0.0rc1/tests/test_constraints.py +526 -0
  166. prodpilot-1.0.0rc1/tests/test_dataset.py +598 -0
  167. prodpilot-1.0.0rc1/tests/test_detect_stack_tool.py +167 -0
  168. prodpilot-1.0.0rc1/tests/test_detection.py +215 -0
  169. prodpilot-1.0.0rc1/tests/test_dispatch.py +471 -0
  170. prodpilot-1.0.0rc1/tests/test_env_keys.py +77 -0
  171. prodpilot-1.0.0rc1/tests/test_extraction.py +592 -0
  172. prodpilot-1.0.0rc1/tests/test_features.py +514 -0
  173. prodpilot-1.0.0rc1/tests/test_filechecks.py +460 -0
  174. prodpilot-1.0.0rc1/tests/test_fix_tools.py +348 -0
  175. prodpilot-1.0.0rc1/tests/test_gate.py +813 -0
  176. prodpilot-1.0.0rc1/tests/test_gh.py +467 -0
  177. prodpilot-1.0.0rc1/tests/test_handshake.py +97 -0
  178. prodpilot-1.0.0rc1/tests/test_labels.py +1026 -0
  179. prodpilot-1.0.0rc1/tests/test_loop.py +426 -0
  180. prodpilot-1.0.0rc1/tests/test_negatives.py +306 -0
  181. prodpilot-1.0.0rc1/tests/test_packaged_model.py +49 -0
  182. prodpilot-1.0.0rc1/tests/test_pipeline.py +87 -0
  183. prodpilot-1.0.0rc1/tests/test_preflight.py +440 -0
  184. prodpilot-1.0.0rc1/tests/test_prereqs.py +94 -0
  185. prodpilot-1.0.0rc1/tests/test_prodpush.py +603 -0
  186. prodpilot-1.0.0rc1/tests/test_provider.py +505 -0
  187. prodpilot-1.0.0rc1/tests/test_push.py +462 -0
  188. prodpilot-1.0.0rc1/tests/test_reaudit.py +330 -0
  189. prodpilot-1.0.0rc1/tests/test_render.py +780 -0
  190. prodpilot-1.0.0rc1/tests/test_rules.py +348 -0
  191. prodpilot-1.0.0rc1/tests/test_scoring.py +385 -0
  192. prodpilot-1.0.0rc1/tests/test_sealing.py +393 -0
  193. prodpilot-1.0.0rc1/tests/test_smoke.py +450 -0
  194. prodpilot-1.0.0rc1/tests/test_stdio_roundtrip.py +130 -0
  195. prodpilot-1.0.0rc1/tests/test_templates.py +455 -0
  196. prodpilot-1.0.0rc1/tests/test_training.py +647 -0
  197. prodpilot-1.0.0rc1/tests/test_verify.py +646 -0
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "prodpilot": {
4
+ "type": "stdio",
5
+ "command": "${workspaceFolder}/.venv/Scripts/prodpilot.exe",
6
+ "args": ["serve"]
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,52 @@
1
+ name: Release
2
+
3
+ # Publishes to PyPI when a version tag such as v1.0.0rc1 is pushed. It uses
4
+ # PyPI's trusted publishing, so no PyPI token is stored anywhere: the project
5
+ # must first be registered on PyPI with this repository and this workflow as
6
+ # its trusted publisher, and the pypi environment created in the repository.
7
+
8
+ on:
9
+ push:
10
+ tags: ["v*"]
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.11"
21
+
22
+ - name: Refuse a tag that does not match the package version
23
+ run: |
24
+ version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
25
+ if [ "v$version" != "$GITHUB_REF_NAME" ]; then
26
+ echo "tag $GITHUB_REF_NAME does not match version $version in pyproject.toml"
27
+ exit 1
28
+ fi
29
+
30
+ - name: Build
31
+ run: |
32
+ python -m pip install build
33
+ python -m build
34
+
35
+ - uses: actions/upload-artifact@v4
36
+ with:
37
+ name: dist
38
+ path: dist/
39
+
40
+ publish:
41
+ needs: build
42
+ runs-on: ubuntu-latest
43
+ environment: pypi
44
+ permissions:
45
+ id-token: write
46
+ steps:
47
+ - uses: actions/download-artifact@v4
48
+ with:
49
+ name: dist
50
+ path: dist/
51
+
52
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,67 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ # Linux runs the Docker tests against the runner's daemon. macOS runners
14
+ # have no Docker daemon, so those tests skip there, as they do on any
15
+ # machine without one.
16
+ os: [ubuntu-latest, macos-latest]
17
+ python: ["3.11", "3.12", "3.13", "3.14"]
18
+ runs-on: ${{ matrix.os }}
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python }}
25
+
26
+ - uses: actions/setup-node@v4
27
+ with:
28
+ node-version: "20"
29
+
30
+ - name: Give git an identity for the commits the tests make
31
+ run: |
32
+ git config --global user.name "ProdPilot CI"
33
+ git config --global user.email "ci@prodpilot.invalid"
34
+ git config --global init.defaultBranch main
35
+
36
+ - name: Install
37
+ run: python -m pip install -e . pytest pytest-asyncio
38
+
39
+ - name: Test
40
+ run: python -m pytest -q
41
+
42
+ package:
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+
47
+ - uses: actions/setup-python@v5
48
+ with:
49
+ python-version: "3.11"
50
+
51
+ - name: Build the wheel and the source distribution
52
+ run: |
53
+ python -m pip install build
54
+ python -m build
55
+
56
+ - name: Install the wheel outside the repository and load the shipped model
57
+ run: |
58
+ python -m venv /tmp/user
59
+ /tmp/user/bin/pip install dist/*.whl
60
+ cd /tmp
61
+ /tmp/user/bin/prodpilot --help
62
+ /tmp/user/bin/python -c "from prodpilot import scoring; m = scoring.load(); print('model loaded, operating point', m.threshold)"
63
+
64
+ - uses: actions/upload-artifact@v4
65
+ with:
66
+ name: dist
67
+ path: dist/
@@ -0,0 +1,35 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+
7
+ .venv/
8
+ venv/
9
+ env/
10
+
11
+ .pytest_cache/
12
+ .coverage
13
+ htmlcov/
14
+
15
+ .env
16
+ .env.*
17
+ !.env.example
18
+
19
+ .DS_Store
20
+ Thumbs.db
21
+
22
+ # Vendored JavaScript parser. The dist rule above matches acorn's build
23
+ # directory, which would drop the parser itself from both the repository and
24
+ # the wheel and ship a package that cannot parse anything.
25
+ !src/prodpilot/vendor/node_modules/acorn/dist/
26
+ !src/prodpilot/vendor/**
27
+
28
+ # Phase 5 dataset. Manifest and cache only, never committed.
29
+ data/
30
+
31
+ # Retired and superseded data files, kept locally rather than deleted.
32
+ backup/
33
+
34
+ # Devin project-local MCP config: holds a path that only works on one machine
35
+ .devin/mcp_config.local.json
@@ -0,0 +1,9 @@
1
+ {
2
+ "servers": {
3
+ "prodpilot": {
4
+ "type": "stdio",
5
+ "command": "${workspaceFolder}/.venv/Scripts/prodpilot.exe",
6
+ "args": ["serve"]
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,48 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0rc1, unreleased
4
+
5
+ The first release candidate, prepared for a beta with outside users.
6
+
7
+ ### Added
8
+
9
+ - The MCP server with five tools: stack detection with production blueprints,
10
+ fix instructions and independent verification of applied fixes for fifty
11
+ rules, and ProdPush, which takes a project that passes the scoring gate to a
12
+ live, smoke tested Render service with an active CI/CD pipeline.
13
+ - `prodpilot connect vscode|cursor|devin`, which connects each IDE's agent to
14
+ the installed ProdPilot in the place that IDE documents.
15
+ - `prodpilot doctor` now checks git, Node.js and the Docker daemon.
16
+ - Tool annotations: four tools are marked read only and the deploy tool as
17
+ changing its environment.
18
+ - LICENSE, SECURITY.md, third-party notices, a test workflow and a release
19
+ workflow for PyPI trusted publishing.
20
+
21
+ ### Changed
22
+
23
+ - The gate's model ships inside the package, so an installed ProdPilot has
24
+ one; scikit-learn is pinned to 1.9.0, the version that saved it.
25
+ - Runs on Python 3.11 to 3.14, where it was 3.11 only. The full suite passes
26
+ on 3.11, 3.13 and 3.14 on Windows with a Docker daemon; 3.12 is covered by
27
+ the test workflow.
28
+ - The CI/CD workflow ProdPilot writes waits for the deploy it started before
29
+ checking the service, instead of a fixed 90 second wait.
30
+ - Content fixes declare the environment keys they read, so a CORS fix no
31
+ longer breaks the environment template and gets reverted.
32
+
33
+ ### Fixed
34
+
35
+ - A failed Docker build kept none of its output, because the build log was read
36
+ twice from a one-pass generator; its summary now names the cause.
37
+
38
+ ### Known limits
39
+
40
+ - Supported stacks are Node.js with Express and React with Vite; the only
41
+ deployment target is Render.
42
+ - How often a live agent's delegated fix passes verification has not been
43
+ measured.
44
+ - Not yet observed on real services: the deploy tool called by an IDE agent,
45
+ the new workflow on GitHub Actions, and `prodpilot connect` in the real
46
+ clients.
47
+ - Render's own automatic deploy stays on, so a push can start a second deploy
48
+ beside the workflow's; the workflow waits for the newer one.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Muhammad Sudais Khalid, Muhammad Farooq Khan, Muhammad Talha Khan
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.
@@ -0,0 +1,301 @@
1
+ Metadata-Version: 2.5
2
+ Name: prodpilot
3
+ Version: 1.0.0rc1
4
+ Summary: A layered MCP-based system for automated production readiness and deployment of vibe-coded projects.
5
+ Project-URL: Homepage, https://github.com/prodpilotai/ProdPilot
6
+ Project-URL: Repository, https://github.com/prodpilotai/ProdPilot
7
+ Project-URL: Documentation, https://github.com/prodpilotai/ProdPilot/blob/main/docs/quickstart.md
8
+ Project-URL: Changelog, https://github.com/prodpilotai/ProdPilot/blob/main/CHANGELOG.md
9
+ Project-URL: Issues, https://github.com/prodpilotai/ProdPilot/issues
10
+ Author-email: Muhammad Sudais Khalid <msudaiskhalid.ai@gmail.com>, Muhammad Farooq Khan <farooqhoi52@gmail.com>, Muhammad Talha Khan <hotikhanbhai@gmail.com>
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: audit,ci-cd,deployment,devops,mcp,production-readiness,render
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Software Development :: Build Tools
25
+ Classifier: Topic :: Software Development :: Quality Assurance
26
+ Classifier: Topic :: System :: Installation/Setup
27
+ Requires-Python: <3.15,>=3.11
28
+ Requires-Dist: docker>=7.0.0
29
+ Requires-Dist: joblib>=1.4.0
30
+ Requires-Dist: mcp>=2.0.0
31
+ Requires-Dist: pynacl>=1.5.0
32
+ Requires-Dist: scikit-learn==1.9.0
33
+ Requires-Dist: tomli-w>=1.0.0
34
+ Requires-Dist: typer>=0.16.0
35
+ Description-Content-Type: text/markdown
36
+
37
+ # ProdPilot
38
+
39
+ **Takes a web app you built with an AI coding assistant from "it works on my machine" to a live, verified deployment, without leaving your IDE.**
40
+
41
+ [![Tests](https://github.com/prodpilotai/ProdPilot/actions/workflows/tests.yml/badge.svg)](https://github.com/prodpilotai/ProdPilot/actions/workflows/tests.yml)
42
+ [![Python 3.11 to 3.14](https://img.shields.io/badge/python-3.11%20to%203.14-blue)](pyproject.toml)
43
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
44
+ [![Status: beta](https://img.shields.io/badge/status-beta%201.0.0rc1-orange)](CHANGELOG.md)
45
+
46
+ AI coding assistants make it quick to build a Node.js API or a React app that
47
+ runs on your laptop. Getting it to run in production is where it breaks:
48
+ credentials hardcoded in the source, no security headers, no container setup,
49
+ no health check, and a deploy that fails with an error you have never seen.
50
+
51
+ ProdPilot finds those gaps, has your IDE's own coding agent fix them one at a
52
+ time, checks every fix itself, and deploys the project to Render with a CI/CD
53
+ pipeline once it is ready. It works as a Model Context Protocol (MCP) server: a
54
+ small program on your machine that the agent in VS Code with GitHub Copilot,
55
+ Cursor or Devin can call as a set of tools. ProdPilot calls no AI service
56
+ itself.
57
+
58
+ It is for developers building **Node.js with Express** APIs or **React with
59
+ Vite** apps who want them deployed properly, not just deployed.
60
+
61
+ ## Features
62
+
63
+ - **A production audit of 50 rules** across security, secrets, environment,
64
+ build, connectivity, API, structure, observability and git hygiene, scored
65
+ from 0 to 100.
66
+ - **Fixes your agent applies and ProdPilot verifies.** The agent reports a
67
+ fix; ProdPilot re-runs that rule's own check on your files and decides. A fix
68
+ that breaks something that already worked is undone.
69
+ - **Predictable changes.** 44 of the 50 rules come with an exact change for the
70
+ agent to apply; only 6 ask it to write code, inside limits ProdPilot sets.
71
+ - **A gate that asks whether it will really deploy.** A score of at least 90,
72
+ no critical failures, and an estimate from a model trained on 684 real Render
73
+ deployments.
74
+ - **Deployment in one call.** Nine stages, from a local Docker build to a live,
75
+ smoke tested Render service with a GitHub Actions pipeline. It stops at the
76
+ first stage that fails and tells you why.
77
+ - **Your credentials stay yours.** They live in a file only your account can
78
+ read, never in the project, and repository secrets are encrypted before they
79
+ leave your machine.
80
+ - **Works in the IDE you already use.** One command connects VS Code, Cursor or
81
+ Devin, formerly Windsurf.
82
+
83
+ ## Quick start
84
+
85
+ You need Python 3.11 to 3.14, Node.js 20 or later, Docker running, git, a
86
+ GitHub token and a Render API key.
87
+
88
+ ```bash
89
+ pipx install prodpilot # 1. install
90
+ prodpilot setup # 2. store your GitHub token and Render API key
91
+ prodpilot connect vscode # 3. connect your IDE: vscode, cursor, or devin --project PATH
92
+ ```
93
+
94
+ 1.0.0rc1 is not on PyPI yet. Until it is, install from a clone of this
95
+ repository with `pip install .` in place of step 1.
96
+
97
+ Then check that everything ProdPilot needs is in place:
98
+
99
+ ```bash
100
+ prodpilot doctor
101
+ ```
102
+
103
+ ```text
104
+ ProdPilot doctor
105
+
106
+ Config file: ~/.prodpilot/config.toml
107
+ found
108
+ github_token: stored
109
+ render_api_key: stored
110
+ permissions: access is limited to the current user
111
+
112
+ Tools ProdPilot runs:
113
+ git: git version 2.54.0.windows.1
114
+ Node.js: v26.3.0
115
+ Docker: daemon 29.7.2
116
+
117
+ All checks passed.
118
+ ```
119
+
120
+ In VS Code, run **MCP: List Servers** and start `prodpilot`. Open your project
121
+ and ask the agent:
122
+
123
+ > Use ProdPilot to audit this project and fix what it reports, one rule at a time.
124
+
125
+ ## Installation
126
+
127
+ | Method | Command |
128
+ | --- | --- |
129
+ | pipx, recommended | `pipx install prodpilot` |
130
+ | uv | `uv tool install prodpilot` |
131
+ | From source | `git clone https://github.com/prodpilotai/ProdPilot && cd ProdPilot && pip install .` |
132
+
133
+ Check the install with `prodpilot --help`, which lists `serve`, `setup`,
134
+ `doctor` and `connect`.
135
+
136
+ | Requirement | Why |
137
+ | --- | --- |
138
+ | Python 3.11, 3.12, 3.13 or 3.14 | ProdPilot itself |
139
+ | Node.js 20 or later | The audit parses your JavaScript with Node |
140
+ | Docker, running | The gate and the deploy build your project in a container first |
141
+ | git, and a GitHub repository set as the project's `origin` | Deploys push the files ProdPilot generated |
142
+ | A GitHub token | A classic token with the `repo` and `workflow` scopes, or a fine grained one with read and write access to contents, secrets and workflows |
143
+ | A Render account and API key | Render is where the project is deployed |
144
+
145
+ ProdPilot is developed and tested on Windows 11, and the repository's test
146
+ workflow is configured for Linux and macOS.
147
+
148
+ ## Usage
149
+
150
+ ### Audit and fix
151
+
152
+ > Use ProdPilot to audit this project and fix what it reports, one rule at a
153
+ > time, reporting each fix with prodpilot_fix_applied.
154
+
155
+ The agent asks ProdPilot for the exact change each failing rule needs, applies
156
+ it, and reports back. ProdPilot re-runs the rule's check and answers
157
+ `resolved`, `unresolved` or `blocked`, whatever the agent claimed. On one of
158
+ the deliberately broken sample projects in this repository, the first audit
159
+ scores 13 out of 100 with 6 critical failures; after the fix loop it scores 96
160
+ with none.
161
+
162
+ ### Deploy
163
+
164
+ Commit your changes, then:
165
+
166
+ > Deploy this project with prodpilot_deploy.
167
+
168
+ The deploy creates a real Render service on the free plan and pushes to your
169
+ GitHub repository, so the agent is told to confirm with you first. You get a
170
+ live URL and a GitHub Actions workflow that redeploys on every push and checks
171
+ the service afterwards. A small Express API that the fix loop took from 69 to
172
+ 100 went live on Render this way, all nine stages passing, in 82 seconds.
173
+
174
+ ### When something is refused
175
+
176
+ ProdPilot always says which condition failed. These are real messages:
177
+
178
+ ```text
179
+ score 89 but 1 critical rule(s) still fail: SEC-003
180
+ score 99 meets the threshold, but the model estimates a 5% chance of deploying, below its operating point of 37%
181
+ build failed, missing dependency: npm error The `npm ci` command can only install with an existing package-lock.json or
182
+ ```
183
+
184
+ ## Tools and commands
185
+
186
+ The five tools your IDE's agent sees:
187
+
188
+ | Tool | What it does |
189
+ | --- | --- |
190
+ | `prodpilot_ping` | Confirms the server is running |
191
+ | `prodpilot_detect_stack` | Identifies the project's stack and returns what a production-ready version must contain |
192
+ | `prodpilot_fix_instruction` | Returns the exact change, or the limits for the change, that fixes one failing rule |
193
+ | `prodpilot_fix_applied` | Takes the agent's report of a fix and answers from the rule's own check |
194
+ | `prodpilot_deploy` | Runs the nine deploy stages; creates a real Render service and pushes to GitHub |
195
+
196
+ The commands you run:
197
+
198
+ | Command | What it does |
199
+ | --- | --- |
200
+ | `prodpilot setup` | Stores the GitHub token and Render API key in `~/.prodpilot/config.toml`, readable only by you |
201
+ | `prodpilot doctor [--project PATH]` | Checks the credentials, git, Node.js and Docker; with `--project`, that the project's state file is kept out of git |
202
+ | `prodpilot connect vscode\|cursor\|devin [--project PATH]` | Adds ProdPilot to that IDE's configuration; `--project` is for Devin, which is set up per project |
203
+ | `prodpilot serve` | Starts the MCP server over stdio; your IDE runs this for you |
204
+
205
+ ## How it works
206
+
207
+ ```mermaid
208
+ flowchart LR
209
+ A[Your project] --> B[Audit: 50 rules, score 0 to 100]
210
+ B --> C[Fix loop: your agent applies, ProdPilot verifies]
211
+ C --> B
212
+ C --> D{Gate: score 90 or more, no critical failure, model estimate}
213
+ D -- refused --> C
214
+ D -- cleared --> E[Deploy: 9 stages]
215
+ E --> F[Live on Render, with CI/CD]
216
+ ```
217
+
218
+ Each rule has its own check, and a fix only counts when that check passes on
219
+ the files on disk. Each rule gets three attempts, and the loop runs up to five
220
+ times while the gate stays shut. The deploy stages are pre-flight checks,
221
+ environment sealing, a local Docker build and run, a push of the generated
222
+ files, the Render deployment, deploy monitoring, a smoke test of the live
223
+ service, and CI/CD wiring. The design, the model and the data behind it are in
224
+ [docs/architecture.md](docs/architecture.md).
225
+
226
+ ## Privacy and security
227
+
228
+ - ProdPilot talks only to GitHub, Render, and, while building your project,
229
+ Docker Hub and the npm registry. It sends no telemetry.
230
+ - Your GitHub token and Render API key are stored outside every project, in a
231
+ file restricted to your account.
232
+ - Secrets go to the test container at run time, never into the image, and to
233
+ GitHub encrypted with your repository's public key.
234
+
235
+ Report a vulnerability privately as described in [SECURITY.md](SECURITY.md).
236
+
237
+ ## Limitations
238
+
239
+ - Two stacks only: Node.js with Express, and React with Vite.
240
+ - One deployment target: Render, on its free plan.
241
+ - For the 6 rules where the agent writes the change, how often a live agent's
242
+ change passes on the first try has not been measured yet.
243
+ - A project whose code requires a file it does not contain can pass the audit;
244
+ the Docker build during the deploy catches it and names the missing module.
245
+ - Render's own automatic deploy stays on, so a push can start a second deploy
246
+ beside the workflow's; the workflow waits for the newer one.
247
+ - This is a beta. Not yet observed on real services: a deploy started by an IDE
248
+ agent, the generated workflow running on GitHub Actions, and `prodpilot
249
+ connect` inside Cursor and Devin.
250
+
251
+ ## What's new in 1.0.0rc1
252
+
253
+ - The deployability model ships inside the package.
254
+ - `prodpilot connect` sets up VS Code, Cursor and Devin in one command.
255
+ - `prodpilot doctor` checks git, Node.js and Docker.
256
+ - The generated CI/CD workflow waits for its own deploy before checking the
257
+ service.
258
+ - Runs on Python 3.11 to 3.14.
259
+
260
+ The full list is in [CHANGELOG.md](CHANGELOG.md).
261
+
262
+ ## Documentation
263
+
264
+ - [Quick start and troubleshooting](docs/quickstart.md)
265
+ - [Architecture: the audit, the fix loop, the gate, the model and the data](docs/architecture.md)
266
+ - [IDE compatibility, observed in each client](docs/compatibility.md)
267
+ - [The whole chain run on every sample project](docs/pipeline.md)
268
+ - [Measured fix reliability](docs/metrics.md)
269
+ - [The deployability model's evaluation](docs/evaluation.md)
270
+
271
+ ## Contributing
272
+
273
+ ```bash
274
+ git clone https://github.com/prodpilotai/ProdPilot
275
+ cd ProdPilot
276
+ python -m venv .venv
277
+ .venv/bin/pip install -e . --group dev # on Windows: .venv\Scripts\pip; needs pip 25.1 or later
278
+ .venv/bin/python -m pytest
279
+ ```
280
+
281
+ The tests reach no live service: Render and GitHub are scripted. Tests that
282
+ build real Docker images are skipped when no Docker daemon is running. Please
283
+ open an issue before a large change, and run the suite before sending a pull
284
+ request.
285
+
286
+ Questions and bug reports go to
287
+ [GitHub issues](https://github.com/prodpilotai/ProdPilot/issues).
288
+
289
+ ## License
290
+
291
+ MIT, see [LICENSE](LICENSE). Bundled third-party code is listed in
292
+ [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
293
+
294
+ ## Credits
295
+
296
+ Built by Muhammad Sudais Khalid, Muhammad Farooq Khan and Muhammad Talha Khan
297
+ as the Final Year Project BSAI-FYP-2026 of the Department of Artificial
298
+ Intelligence, Shifa Tameer-e-Millat University, at the Artificial Intelligence
299
+ Technology Centre, National Centre for Physics, Islamabad. Supervised by Mr.
300
+ Rehan Naveed Abbasi, with industrial supervision by Dr. Rana Fayyaz Ahmad and
301
+ Muhammad Junaid Asif.