prodocux 0.3.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 (119) hide show
  1. prodocux-0.3.0rc1/LICENSE +190 -0
  2. prodocux-0.3.0rc1/PKG-INFO +150 -0
  3. prodocux-0.3.0rc1/README.md +126 -0
  4. prodocux-0.3.0rc1/api/__init__.py +1 -0
  5. prodocux-0.3.0rc1/api/main.py +374 -0
  6. prodocux-0.3.0rc1/api/path_policy.py +31 -0
  7. prodocux-0.3.0rc1/prodocux.egg-info/PKG-INFO +150 -0
  8. prodocux-0.3.0rc1/prodocux.egg-info/SOURCES.txt +117 -0
  9. prodocux-0.3.0rc1/prodocux.egg-info/dependency_links.txt +1 -0
  10. prodocux-0.3.0rc1/prodocux.egg-info/requires.txt +15 -0
  11. prodocux-0.3.0rc1/prodocux.egg-info/top_level.txt +3 -0
  12. prodocux-0.3.0rc1/prodocux_kernel/__init__.py +8 -0
  13. prodocux-0.3.0rc1/prodocux_kernel/artifacts.py +83 -0
  14. prodocux-0.3.0rc1/prodocux_kernel/audit/__init__.py +1 -0
  15. prodocux-0.3.0rc1/prodocux_kernel/audit/numbers.py +178 -0
  16. prodocux-0.3.0rc1/prodocux_kernel/audit/pif_tw.py +241 -0
  17. prodocux-0.3.0rc1/prodocux_kernel/config.py +30 -0
  18. prodocux-0.3.0rc1/prodocux_kernel/docdiff/__init__.py +1 -0
  19. prodocux-0.3.0rc1/prodocux_kernel/docdiff/clauses.py +98 -0
  20. prodocux-0.3.0rc1/prodocux_kernel/docdiff/compare.py +61 -0
  21. prodocux-0.3.0rc1/prodocux_kernel/docops/__init__.py +9 -0
  22. prodocux-0.3.0rc1/prodocux_kernel/docops/content.py +72 -0
  23. prodocux-0.3.0rc1/prodocux_kernel/docops/fields.py +129 -0
  24. prodocux-0.3.0rc1/prodocux_kernel/docops/front_matter.py +98 -0
  25. prodocux-0.3.0rc1/prodocux_kernel/docops/invariants.py +456 -0
  26. prodocux-0.3.0rc1/prodocux_kernel/docops/pagination.py +223 -0
  27. prodocux-0.3.0rc1/prodocux_kernel/docops/parts.py +85 -0
  28. prodocux-0.3.0rc1/prodocux_kernel/docops/review_marks.py +69 -0
  29. prodocux-0.3.0rc1/prodocux_kernel/docops/sections.py +237 -0
  30. prodocux-0.3.0rc1/prodocux_kernel/docops/tables.py +264 -0
  31. prodocux-0.3.0rc1/prodocux_kernel/intake/__init__.py +93 -0
  32. prodocux-0.3.0rc1/prodocux_kernel/intake/archive.py +50 -0
  33. prodocux-0.3.0rc1/prodocux_kernel/intake/docx.py +99 -0
  34. prodocux-0.3.0rc1/prodocux_kernel/intake/evidence.py +90 -0
  35. prodocux-0.3.0rc1/prodocux_kernel/intake/formula.py +129 -0
  36. prodocux-0.3.0rc1/prodocux_kernel/intake/image.py +174 -0
  37. prodocux-0.3.0rc1/prodocux_kernel/intake/ocr.py +57 -0
  38. prodocux-0.3.0rc1/prodocux_kernel/intake/pdf.py +313 -0
  39. prodocux-0.3.0rc1/prodocux_kernel/intake/pdf_images.py +172 -0
  40. prodocux-0.3.0rc1/prodocux_kernel/intake/presentation.py +112 -0
  41. prodocux-0.3.0rc1/prodocux_kernel/intake/table.py +37 -0
  42. prodocux-0.3.0rc1/prodocux_kernel/intake/workbook.py +99 -0
  43. prodocux-0.3.0rc1/prodocux_kernel/models.py +213 -0
  44. prodocux-0.3.0rc1/prodocux_kernel/review/__init__.py +1 -0
  45. prodocux-0.3.0rc1/prodocux_kernel/review/capture.py +94 -0
  46. prodocux-0.3.0rc1/prodocux_kernel/schemas/intake_request_v1.json +18 -0
  47. prodocux-0.3.0rc1/prodocux_kernel/schemas/intake_response_v1.json +35 -0
  48. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_evidence_bundle_request_v1.json +119 -0
  49. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_evidence_bundle_result_v1.json +89 -0
  50. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_image_profile_v1.json +89 -0
  51. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_intake_capabilities_v1.json +38 -0
  52. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_normalized_diff_request_v1.json +47 -0
  53. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_normalized_diff_result_v1.json +62 -0
  54. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_opaque_artifact_v1.json +28 -0
  55. prodocux-0.3.0rc1/prodocux_kernel/schemas/prodocux_source_reference_v1.json +118 -0
  56. prodocux-0.3.0rc1/prodocux_kernel/scoring/__init__.py +1 -0
  57. prodocux-0.3.0rc1/prodocux_kernel/scoring/scorer.py +183 -0
  58. prodocux-0.3.0rc1/prodocux_kernel/templating/__init__.py +13 -0
  59. prodocux-0.3.0rc1/prodocux_kernel/templating/drafts.py +7 -0
  60. prodocux-0.3.0rc1/prodocux_kernel/templating/mapping.py +222 -0
  61. prodocux-0.3.0rc1/prodocux_kernel/templating/pipeline.py +180 -0
  62. prodocux-0.3.0rc1/prodocux_kernel/templating/profile.py +166 -0
  63. prodocux-0.3.0rc1/prodocux_kernel/templating/render.py +191 -0
  64. prodocux-0.3.0rc1/prodocux_kernel/verification/__init__.py +17 -0
  65. prodocux-0.3.0rc1/prodocux_kernel/verification/diff_models.py +81 -0
  66. prodocux-0.3.0rc1/prodocux_kernel/verification/evidence.py +229 -0
  67. prodocux-0.3.0rc1/prodocux_kernel/verification/evidence_models.py +190 -0
  68. prodocux-0.3.0rc1/prodocux_kernel/verification/structured_diff.py +246 -0
  69. prodocux-0.3.0rc1/pyproject.toml +42 -0
  70. prodocux-0.3.0rc1/setup.cfg +4 -0
  71. prodocux-0.3.0rc1/skills/__init__.py +1 -0
  72. prodocux-0.3.0rc1/skills/clause_diff/__init__.py +1 -0
  73. prodocux-0.3.0rc1/skills/clause_diff/clause_diff.py +112 -0
  74. prodocux-0.3.0rc1/skills/common/__init__.py +1 -0
  75. prodocux-0.3.0rc1/skills/common/i18n.py +91 -0
  76. prodocux-0.3.0rc1/skills/doc_assemble/__init__.py +1 -0
  77. prodocux-0.3.0rc1/skills/doc_assemble/assemble.py +270 -0
  78. prodocux-0.3.0rc1/skills/number_audit/__init__.py +1 -0
  79. prodocux-0.3.0rc1/skills/number_audit/number_audit.py +151 -0
  80. prodocux-0.3.0rc1/skills/pdf_extract/__init__.py +1 -0
  81. prodocux-0.3.0rc1/skills/pdf_extract/pdf_extract.py +168 -0
  82. prodocux-0.3.0rc1/skills/pif_audit/__init__.py +1 -0
  83. prodocux-0.3.0rc1/skills/pif_audit/pif_audit.py +231 -0
  84. prodocux-0.3.0rc1/skills/structure_health/__init__.py +1 -0
  85. prodocux-0.3.0rc1/skills/structure_health/health_check.py +347 -0
  86. prodocux-0.3.0rc1/skills/version_diff/__init__.py +1 -0
  87. prodocux-0.3.0rc1/skills/version_diff/version_diff.py +96 -0
  88. prodocux-0.3.0rc1/tests/test_clause_diff.py +77 -0
  89. prodocux-0.3.0rc1/tests/test_compatibility_manifest.py +33 -0
  90. prodocux-0.3.0rc1/tests/test_compatibility_v2_candidate.py +71 -0
  91. prodocux-0.3.0rc1/tests/test_doc_assemble.py +80 -0
  92. prodocux-0.3.0rc1/tests/test_docops.py +346 -0
  93. prodocux-0.3.0rc1/tests/test_docx_intake.py +59 -0
  94. prodocux-0.3.0rc1/tests/test_evidence_contracts.py +66 -0
  95. prodocux-0.3.0rc1/tests/test_evidence_verifier.py +144 -0
  96. prodocux-0.3.0rc1/tests/test_formula_extract.py +56 -0
  97. prodocux-0.3.0rc1/tests/test_image_intake.py +133 -0
  98. prodocux-0.3.0rc1/tests/test_intake_capabilities.py +51 -0
  99. prodocux-0.3.0rc1/tests/test_intake_security.py +92 -0
  100. prodocux-0.3.0rc1/tests/test_invariants.py +195 -0
  101. prodocux-0.3.0rc1/tests/test_normalized_diff.py +157 -0
  102. prodocux-0.3.0rc1/tests/test_number_audit.py +86 -0
  103. prodocux-0.3.0rc1/tests/test_old_docx_regression.py +75 -0
  104. prodocux-0.3.0rc1/tests/test_opaque_artifacts.py +101 -0
  105. prodocux-0.3.0rc1/tests/test_pdf_extract.py +124 -0
  106. prodocux-0.3.0rc1/tests/test_pdf_intake_api.py +81 -0
  107. prodocux-0.3.0rc1/tests/test_pif_audit.py +127 -0
  108. prodocux-0.3.0rc1/tests/test_pif_compat.py +86 -0
  109. prodocux-0.3.0rc1/tests/test_pipeline.py +120 -0
  110. prodocux-0.3.0rc1/tests/test_presentation_intake.py +64 -0
  111. prodocux-0.3.0rc1/tests/test_release_hygiene.py +31 -0
  112. prodocux-0.3.0rc1/tests/test_review.py +43 -0
  113. prodocux-0.3.0rc1/tests/test_scoring.py +54 -0
  114. prodocux-0.3.0rc1/tests/test_structure_health.py +60 -0
  115. prodocux-0.3.0rc1/tests/test_table_intake.py +42 -0
  116. prodocux-0.3.0rc1/tests/test_table_write.py +136 -0
  117. prodocux-0.3.0rc1/tests/test_templating.py +180 -0
  118. prodocux-0.3.0rc1/tests/test_version_diff.py +63 -0
  119. prodocux-0.3.0rc1/tests/test_workbook_intake.py +70 -0
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 ProDocuX contributors
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: prodocux
3
+ Version: 0.3.0rc1
4
+ Summary: ProDocuX Kernel — deterministic document processing
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: fastapi==0.115.6
10
+ Requires-Dist: uvicorn==0.34.0
11
+ Requires-Dist: pydantic==2.10.4
12
+ Requires-Dist: python-docx==1.1.2
13
+ Requires-Dist: pypdf==5.1.0
14
+ Requires-Dist: cryptography>=42.0.0
15
+ Requires-Dist: Pillow>=11.0.0
16
+ Requires-Dist: pymupdf==1.25.1
17
+ Requires-Dist: httpx==0.28.1
18
+ Requires-Dist: openpyxl<4,>=3.1
19
+ Requires-Dist: python-pptx<2,>=1.0
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest==8.3.4; extra == "dev"
22
+ Requires-Dist: jsonschema>=4.22.0; extra == "dev"
23
+ Dynamic: license-file
24
+
25
+ # ProDocuX Kernel
26
+
27
+ Deterministic document kernel for ProDocuX. Runtime **does not call any LLM API**
28
+ (semantic drafting stays on the solver side).
29
+
30
+ License: Apache-2.0. See [LICENSE](LICENSE).
31
+
32
+ Current prerelease: **`0.3.0rc1`**. It adds product-neutral evidence
33
+ verification, bounded JPEG/PNG profiling, deterministic normalized profile
34
+ diffs, and a host-injected opaque artifact boundary while preserving HTTP API
35
+ `/v1` and the frozen `0.2.0` compatibility surface.
36
+
37
+ ## Documents
38
+
39
+ - [`ARCHITECTURE.md`](ARCHITECTURE.md) — public architecture overview
40
+ - [`CONTRACT.md`](CONTRACT.md) — boundaries, API, scoring contract
41
+ - [`CAPABILITY_REQUESTS.md`](CAPABILITY_REQUESTS.md) — capability request template
42
+ - [`docs/RELEASE.md`](docs/RELEASE.md) — release-candidate boundary and checks
43
+ - [`compatibility/pdx_prodocux_compatibility_v2.json`](compatibility/pdx_prodocux_compatibility_v2.json) — active prerelease versions, operations, and schema digests
44
+ - [`compatibility/pdx_prodocux_compatibility_v1.json`](compatibility/pdx_prodocux_compatibility_v1.json) — frozen historical compatibility evidence
45
+
46
+ ## Install
47
+
48
+ ```powershell
49
+ git clone https://github.com/prodocux/prodocux.git
50
+ cd prodocux
51
+ .\runtime\install.ps1 -Fresh
52
+ .\runtime\verify.ps1
53
+ ```
54
+
55
+ Or:
56
+
57
+ ```powershell
58
+ python -m venv .venv
59
+ .\.venv\Scripts\python.exe -m pip install -e ".[dev]"
60
+ .\.venv\Scripts\python.exe -m pytest -q
61
+ ```
62
+
63
+ Install the published GitHub prerelease wheel with:
64
+
65
+ ```powershell
66
+ python -m pip install "https://github.com/prodocux/prodocux/releases/download/v0.3.0rc1/prodocux-0.3.0rc1-py3-none-any.whl"
67
+ ```
68
+
69
+ See [`runtime/INSTALL.md`](runtime/INSTALL.md) for environment variables and
70
+ private-sidecar notes.
71
+
72
+ Release maintainers can verify a wheel from an isolated temporary directory:
73
+
74
+ ```powershell
75
+ python scripts/verify_clean_install.py
76
+ ```
77
+
78
+ ## Test
79
+
80
+ ```powershell
81
+ .\.venv\Scripts\python.exe -m pytest -q
82
+ ```
83
+
84
+ ## Start API
85
+
86
+ ```powershell
87
+ .\.venv\Scripts\python.exe run_kernel.py # http://localhost:8900/v1
88
+ ```
89
+
90
+ ## P1 delivered
91
+
92
+ | Component | Endpoint | Status |
93
+ |---|---|---|
94
+ | Structure invariants (L0) | `POST /v1/validate-structure` | shipped |
95
+ | Scorer (L0–L3) | `POST /v1/score` | shipped |
96
+ | Review capture | `POST /v1/review/start`, `/commit` | shipped |
97
+ | Version | `GET /v1/version` | shipped |
98
+ | Semantic extract/render/learn | — | 501 (later) |
99
+ | Deterministic PDF page intake | `POST /v1/intake/extract-pages` | shipped |
100
+ | JPEG/PNG technical profile | `POST /v1/intake/profile-image` | shipped |
101
+ | Typed evidence verification | `POST /v1/verify/evidence-bundle` | shipped |
102
+ | Normalized structured diff | `POST /v1/compare/normalized-profiles` | shipped |
103
+
104
+ The PDF intake endpoint accepts only a bounded base64 payload and a plain
105
+ `.pdf` basename. It returns source SHA-256, bounded page text, truncation
106
+ disclosure, and an explicit `ocr_required` status without persisting the
107
+ source document or calling an LLM.
108
+
109
+ `GET /v1/intake/capabilities` is the authoritative machine-readable source
110
+ for available intake operations and their raw-byte/page ceilings. Clients
111
+ should discover these limits instead of copying constants into adapters.
112
+
113
+ The evidence verifier accepts already-extracted typed evidence and declarative
114
+ presence, equality, numeric-range, and date/version checks. It returns stable
115
+ pass/fail/review reasons without interpreting product claims or regulations.
116
+ Image OCR is available only through an explicitly injected bounded backend;
117
+ otherwise the profile reports `ocr_unavailable`. Normalized diff reports
118
+ source-linked structural/value changes but leaves business impact to the host.
119
+
120
+ Library hosts may inject an opaque `artifact://` resolver. ProDocuX rejects
121
+ network/local-path identities at this boundary and verifies declared media
122
+ type, size, and SHA-256 before returning bytes; storage authorization and
123
+ tenant isolation remain host responsibilities.
124
+
125
+ ## Flagship pipeline
126
+
127
+ Deterministic template extract → field mapping → precise write → structure repair → L0 gate.
128
+ Content drafts are supplied by the solver as `drafts.json`.
129
+
130
+ See `examples/pif_tw/` for curated **synthetic** fixtures (no customer documents).
131
+
132
+ ## Skills (first-party)
133
+
134
+ | Skill | Module |
135
+ |---|---|
136
+ | Structure health | `skills.structure_health` |
137
+ | Number audit | `skills.number_audit` |
138
+ | Version diff | `skills.version_diff` |
139
+ | Clause diff | `skills.clause_diff` |
140
+ | Doc assemble | `skills.doc_assemble` |
141
+ | PIF audit (TW) | `skills.pif_audit` |
142
+ | PDF extract | `skills.pdf_extract` |
143
+
144
+ All first-party skills are deterministic. CLI messages support `en` and `zh-TW`.
145
+
146
+ ## Acknowledgments
147
+
148
+ Codex and Cursor contributed implementation support, contract hardening, and
149
+ cross-review for the multi-format intake upgrade. Final design and release
150
+ decisions remain with the project maintainers.
@@ -0,0 +1,126 @@
1
+ # ProDocuX Kernel
2
+
3
+ Deterministic document kernel for ProDocuX. Runtime **does not call any LLM API**
4
+ (semantic drafting stays on the solver side).
5
+
6
+ License: Apache-2.0. See [LICENSE](LICENSE).
7
+
8
+ Current prerelease: **`0.3.0rc1`**. It adds product-neutral evidence
9
+ verification, bounded JPEG/PNG profiling, deterministic normalized profile
10
+ diffs, and a host-injected opaque artifact boundary while preserving HTTP API
11
+ `/v1` and the frozen `0.2.0` compatibility surface.
12
+
13
+ ## Documents
14
+
15
+ - [`ARCHITECTURE.md`](ARCHITECTURE.md) — public architecture overview
16
+ - [`CONTRACT.md`](CONTRACT.md) — boundaries, API, scoring contract
17
+ - [`CAPABILITY_REQUESTS.md`](CAPABILITY_REQUESTS.md) — capability request template
18
+ - [`docs/RELEASE.md`](docs/RELEASE.md) — release-candidate boundary and checks
19
+ - [`compatibility/pdx_prodocux_compatibility_v2.json`](compatibility/pdx_prodocux_compatibility_v2.json) — active prerelease versions, operations, and schema digests
20
+ - [`compatibility/pdx_prodocux_compatibility_v1.json`](compatibility/pdx_prodocux_compatibility_v1.json) — frozen historical compatibility evidence
21
+
22
+ ## Install
23
+
24
+ ```powershell
25
+ git clone https://github.com/prodocux/prodocux.git
26
+ cd prodocux
27
+ .\runtime\install.ps1 -Fresh
28
+ .\runtime\verify.ps1
29
+ ```
30
+
31
+ Or:
32
+
33
+ ```powershell
34
+ python -m venv .venv
35
+ .\.venv\Scripts\python.exe -m pip install -e ".[dev]"
36
+ .\.venv\Scripts\python.exe -m pytest -q
37
+ ```
38
+
39
+ Install the published GitHub prerelease wheel with:
40
+
41
+ ```powershell
42
+ python -m pip install "https://github.com/prodocux/prodocux/releases/download/v0.3.0rc1/prodocux-0.3.0rc1-py3-none-any.whl"
43
+ ```
44
+
45
+ See [`runtime/INSTALL.md`](runtime/INSTALL.md) for environment variables and
46
+ private-sidecar notes.
47
+
48
+ Release maintainers can verify a wheel from an isolated temporary directory:
49
+
50
+ ```powershell
51
+ python scripts/verify_clean_install.py
52
+ ```
53
+
54
+ ## Test
55
+
56
+ ```powershell
57
+ .\.venv\Scripts\python.exe -m pytest -q
58
+ ```
59
+
60
+ ## Start API
61
+
62
+ ```powershell
63
+ .\.venv\Scripts\python.exe run_kernel.py # http://localhost:8900/v1
64
+ ```
65
+
66
+ ## P1 delivered
67
+
68
+ | Component | Endpoint | Status |
69
+ |---|---|---|
70
+ | Structure invariants (L0) | `POST /v1/validate-structure` | shipped |
71
+ | Scorer (L0–L3) | `POST /v1/score` | shipped |
72
+ | Review capture | `POST /v1/review/start`, `/commit` | shipped |
73
+ | Version | `GET /v1/version` | shipped |
74
+ | Semantic extract/render/learn | — | 501 (later) |
75
+ | Deterministic PDF page intake | `POST /v1/intake/extract-pages` | shipped |
76
+ | JPEG/PNG technical profile | `POST /v1/intake/profile-image` | shipped |
77
+ | Typed evidence verification | `POST /v1/verify/evidence-bundle` | shipped |
78
+ | Normalized structured diff | `POST /v1/compare/normalized-profiles` | shipped |
79
+
80
+ The PDF intake endpoint accepts only a bounded base64 payload and a plain
81
+ `.pdf` basename. It returns source SHA-256, bounded page text, truncation
82
+ disclosure, and an explicit `ocr_required` status without persisting the
83
+ source document or calling an LLM.
84
+
85
+ `GET /v1/intake/capabilities` is the authoritative machine-readable source
86
+ for available intake operations and their raw-byte/page ceilings. Clients
87
+ should discover these limits instead of copying constants into adapters.
88
+
89
+ The evidence verifier accepts already-extracted typed evidence and declarative
90
+ presence, equality, numeric-range, and date/version checks. It returns stable
91
+ pass/fail/review reasons without interpreting product claims or regulations.
92
+ Image OCR is available only through an explicitly injected bounded backend;
93
+ otherwise the profile reports `ocr_unavailable`. Normalized diff reports
94
+ source-linked structural/value changes but leaves business impact to the host.
95
+
96
+ Library hosts may inject an opaque `artifact://` resolver. ProDocuX rejects
97
+ network/local-path identities at this boundary and verifies declared media
98
+ type, size, and SHA-256 before returning bytes; storage authorization and
99
+ tenant isolation remain host responsibilities.
100
+
101
+ ## Flagship pipeline
102
+
103
+ Deterministic template extract → field mapping → precise write → structure repair → L0 gate.
104
+ Content drafts are supplied by the solver as `drafts.json`.
105
+
106
+ See `examples/pif_tw/` for curated **synthetic** fixtures (no customer documents).
107
+
108
+ ## Skills (first-party)
109
+
110
+ | Skill | Module |
111
+ |---|---|
112
+ | Structure health | `skills.structure_health` |
113
+ | Number audit | `skills.number_audit` |
114
+ | Version diff | `skills.version_diff` |
115
+ | Clause diff | `skills.clause_diff` |
116
+ | Doc assemble | `skills.doc_assemble` |
117
+ | PIF audit (TW) | `skills.pif_audit` |
118
+ | PDF extract | `skills.pdf_extract` |
119
+
120
+ All first-party skills are deterministic. CLI messages support `en` and `zh-TW`.
121
+
122
+ ## Acknowledgments
123
+
124
+ Codex and Cursor contributed implementation support, contract hardening, and
125
+ cross-review for the multi-format intake upgrade. Final design and release
126
+ decisions remain with the project maintainers.
@@ -0,0 +1 @@
1
+