docassert 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.
- docassert-0.1.0/LICENSE +201 -0
- docassert-0.1.0/NOTICE +4 -0
- docassert-0.1.0/PKG-INFO +125 -0
- docassert-0.1.0/README.md +87 -0
- docassert-0.1.0/docassert/__init__.py +8 -0
- docassert-0.1.0/docassert/__main__.py +6 -0
- docassert-0.1.0/docassert/_data/consistency.yaml +51 -0
- docassert-0.1.0/docassert/_data/criteria/adr.criteria.yaml +36 -0
- docassert-0.1.0/docassert/_data/criteria/benefits-realization.criteria.yaml +30 -0
- docassert-0.1.0/docassert/_data/criteria/brd.criteria.yaml +30 -0
- docassert-0.1.0/docassert/_data/criteria/business-case.criteria.yaml +23 -0
- docassert-0.1.0/docassert/_data/criteria/charter.criteria.yaml +73 -0
- docassert-0.1.0/docassert/_data/criteria/data-migration-plan.criteria.yaml +28 -0
- docassert-0.1.0/docassert/_data/criteria/frnfr.criteria.yaml +31 -0
- docassert-0.1.0/docassert/_data/criteria/hypercare-plan.criteria.yaml +27 -0
- docassert-0.1.0/docassert/_data/criteria/post-implementation-review.criteria.yaml +24 -0
- docassert-0.1.0/docassert/_data/criteria/prd.criteria.yaml +31 -0
- docassert-0.1.0/docassert/_data/criteria/project.criteria.yaml +32 -0
- docassert-0.1.0/docassert/_data/criteria/qa-test-plan.criteria.yaml +27 -0
- docassert-0.1.0/docassert/_data/criteria/raci-stakeholder.criteria.yaml +24 -0
- docassert-0.1.0/docassert/_data/criteria/release-cutover-plan.criteria.yaml +30 -0
- docassert-0.1.0/docassert/_data/criteria/risk-register.criteria.yaml +32 -0
- docassert-0.1.0/docassert/_data/criteria/rollback-plan.criteria.yaml +29 -0
- docassert-0.1.0/docassert/_data/criteria/runbook.criteria.yaml +30 -0
- docassert-0.1.0/docassert/_data/criteria/status-report.criteria.yaml +26 -0
- docassert-0.1.0/docassert/_data/criteria/test-cases.criteria.yaml +28 -0
- docassert-0.1.0/docassert/_data/criteria/user-story.criteria.yaml +32 -0
- docassert-0.1.0/docassert/_data/profiles/agile-delivery.yaml +20 -0
- docassert-0.1.0/docassert/_data/profiles/lean-startup.yaml +19 -0
- docassert-0.1.0/docassert/_data/profiles/regulated-industry.yaml +31 -0
- docassert-0.1.0/docassert/_data/schema/adr.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/benefits-realization.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/brd.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/business-case.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/charter.schema.json +84 -0
- docassert-0.1.0/docassert/_data/schema/data-migration-plan.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/frnfr.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/hypercare-plan.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/post-implementation-review.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/prd.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/project.schema.json +32 -0
- docassert-0.1.0/docassert/_data/schema/qa-test-plan.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/raci-stakeholder.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/release-cutover-plan.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/risk-register.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/rollback-plan.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/runbook.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/status-report.schema.json +58 -0
- docassert-0.1.0/docassert/_data/schema/test-cases.schema.json +45 -0
- docassert-0.1.0/docassert/_data/schema/user-story.schema.json +45 -0
- docassert-0.1.0/docassert/_data/templates/adr.template.md +17 -0
- docassert-0.1.0/docassert/_data/templates/benefits-realization.template.md +25 -0
- docassert-0.1.0/docassert/_data/templates/brd.template.md +22 -0
- docassert-0.1.0/docassert/_data/templates/business-case.template.md +27 -0
- docassert-0.1.0/docassert/_data/templates/charter.template.md +46 -0
- docassert-0.1.0/docassert/_data/templates/data-migration-plan.template.md +35 -0
- docassert-0.1.0/docassert/_data/templates/frnfr.template.md +19 -0
- docassert-0.1.0/docassert/_data/templates/hypercare-plan.template.md +29 -0
- docassert-0.1.0/docassert/_data/templates/post-implementation-review.template.md +31 -0
- docassert-0.1.0/docassert/_data/templates/prd.template.md +23 -0
- docassert-0.1.0/docassert/_data/templates/project.template.md +17 -0
- docassert-0.1.0/docassert/_data/templates/qa-test-plan.template.md +31 -0
- docassert-0.1.0/docassert/_data/templates/raci-stakeholder.template.md +21 -0
- docassert-0.1.0/docassert/_data/templates/release-cutover-plan.template.md +28 -0
- docassert-0.1.0/docassert/_data/templates/risk-register.template.md +18 -0
- docassert-0.1.0/docassert/_data/templates/rollback-plan.template.md +24 -0
- docassert-0.1.0/docassert/_data/templates/runbook.template.md +28 -0
- docassert-0.1.0/docassert/_data/templates/status-report.template.md +27 -0
- docassert-0.1.0/docassert/_data/templates/test-cases.template.md +17 -0
- docassert-0.1.0/docassert/_data/templates/user-story.template.md +17 -0
- docassert-0.1.0/docassert/cli.py +291 -0
- docassert-0.1.0/docassert/config.py +104 -0
- docassert-0.1.0/docassert/consistency.py +167 -0
- docassert-0.1.0/docassert/graph.py +68 -0
- docassert-0.1.0/docassert/loader.py +116 -0
- docassert-0.1.0/docassert/models.py +99 -0
- docassert-0.1.0/docassert/profiles.py +111 -0
- docassert-0.1.0/docassert/projects.py +49 -0
- docassert-0.1.0/docassert/report.py +83 -0
- docassert-0.1.0/docassert/rtm.py +70 -0
- docassert-0.1.0/docassert/semantic.py +124 -0
- docassert-0.1.0/docassert/status.py +538 -0
- docassert-0.1.0/docassert/structural.py +406 -0
- docassert-0.1.0/docassert.egg-info/PKG-INFO +125 -0
- docassert-0.1.0/docassert.egg-info/SOURCES.txt +100 -0
- docassert-0.1.0/docassert.egg-info/dependency_links.txt +1 -0
- docassert-0.1.0/docassert.egg-info/entry_points.txt +2 -0
- docassert-0.1.0/docassert.egg-info/requires.txt +14 -0
- docassert-0.1.0/docassert.egg-info/top_level.txt +1 -0
- docassert-0.1.0/pyproject.toml +71 -0
- docassert-0.1.0/setup.cfg +4 -0
- docassert-0.1.0/tests/test_config.py +59 -0
- docassert-0.1.0/tests/test_consistency.py +100 -0
- docassert-0.1.0/tests/test_graph.py +58 -0
- docassert-0.1.0/tests/test_kinds_delivery.py +55 -0
- docassert-0.1.0/tests/test_kinds_governance.py +63 -0
- docassert-0.1.0/tests/test_kinds_operate.py +24 -0
- docassert-0.1.0/tests/test_kinds_reporting.py +37 -0
- docassert-0.1.0/tests/test_profiles.py +104 -0
- docassert-0.1.0/tests/test_projects.py +57 -0
- docassert-0.1.0/tests/test_status.py +131 -0
- docassert-0.1.0/tests/test_structural.py +117 -0
docassert-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 C4G Enterprises Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
docassert-0.1.0/NOTICE
ADDED
docassert-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: docassert
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unit testing for business documents — validate structured Markdown docs against a configurable audit standard.
|
|
5
|
+
Author: C4G Enterprises Inc.
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://docassert.com
|
|
8
|
+
Project-URL: Repository, https://github.com/c4g-john/docassert
|
|
9
|
+
Project-URL: Issues, https://github.com/c4g-john/docassert/issues
|
|
10
|
+
Keywords: pmo,documentation,validation,governance,markdown,audit,traceability,ci
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
21
|
+
Classifier: Topic :: Text Processing :: Markup :: Markdown
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
License-File: NOTICE
|
|
26
|
+
Requires-Dist: python-frontmatter>=1.1
|
|
27
|
+
Requires-Dist: PyYAML>=6.0
|
|
28
|
+
Requires-Dist: jsonschema>=4.0
|
|
29
|
+
Provides-Extra: ai
|
|
30
|
+
Requires-Dist: anthropic>=0.40; extra == "ai"
|
|
31
|
+
Provides-Extra: convert
|
|
32
|
+
Requires-Dist: python-docx>=1.1; extra == "convert"
|
|
33
|
+
Requires-Dist: pypdf>=4.0; extra == "convert"
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# docassert
|
|
40
|
+
|
|
41
|
+
**Unit testing for business documents.** Validate structured Markdown documents
|
|
42
|
+
(charters, BRDs, PRDs, risk registers, …) against a configurable audit standard:
|
|
43
|
+
deterministic structural checks that gate a merge, plus optional AI-graded
|
|
44
|
+
semantic checks that advise. Requirements trace end to end, and project status is
|
|
45
|
+
derived from the documents rather than self-reported.
|
|
46
|
+
|
|
47
|
+
docassert is the reference implementation of **[PMO as Code](https://c4g-john.github.io/pmo-as-code/)** —
|
|
48
|
+
a vendor-neutral standard for running a PMO from version-controlled, declarative files.
|
|
49
|
+
|
|
50
|
+
## Install
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install "docassert @ git+https://github.com/c4g-john/docassert" # PyPI release coming
|
|
54
|
+
# with the AI advisory extra:
|
|
55
|
+
pip install "docassert[ai] @ git+https://github.com/c4g-john/docassert"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Quickstart
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
docassert init # scaffold criteria/schema/profiles/templates into your repo
|
|
62
|
+
docassert validate documents/**/*.md # unit-test your documents
|
|
63
|
+
docassert consistency # cross-document traceability + profile completeness
|
|
64
|
+
docassert status --index # derived RAG per project
|
|
65
|
+
docassert pages --out _site # a portfolio dashboard + a page per project
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Config resolves **local override → packaged default**: docassert ships sensible
|
|
69
|
+
defaults, and your repo's own `criteria/` (or `schema/`, `profiles/`,
|
|
70
|
+
`consistency.yaml`) wins when present. `docassert init` copies the defaults in so
|
|
71
|
+
you can customize them.
|
|
72
|
+
|
|
73
|
+
## Commands
|
|
74
|
+
|
|
75
|
+
| Command | What it does |
|
|
76
|
+
|---|---|
|
|
77
|
+
| `docassert validate <globs>` | Validate documents against their kind's criteria. Exit code = number of blocking failures. |
|
|
78
|
+
| `docassert consistency` | Cross-document checks: referential integrity, coverage, required links, profile completeness. |
|
|
79
|
+
| `docassert rtm [--project ID]` | Requirements traceability matrix (Markdown or CSV). |
|
|
80
|
+
| `docassert status [--project ID] [--index]` | Derived project status (md / json / html). |
|
|
81
|
+
| `docassert pages --out DIR` | Build the portfolio site (index + a page per project). |
|
|
82
|
+
| `docassert projects [--out] [--check]` | Generate / verify the project registry. |
|
|
83
|
+
| `docassert init [DIR]` | Scaffold the default config into a repo. |
|
|
84
|
+
|
|
85
|
+
## Document kinds
|
|
86
|
+
|
|
87
|
+
Twenty kinds, each a `templates/<kind>.template.md` + `schema/<kind>.schema.json`
|
|
88
|
+
+ `criteria/<kind>.criteria.yaml` trio: `project`, `charter`, `business-case`,
|
|
89
|
+
`brd`, `prd`, `frnfr`, `user-story`, `test-cases`, `adr`, `risk-register`,
|
|
90
|
+
`raci-stakeholder`, `qa-test-plan`, `data-migration-plan`,
|
|
91
|
+
`release-cutover-plan`, `rollback-plan`, `hypercare-plan`, `runbook`,
|
|
92
|
+
`status-report`, `post-implementation-review`, `benefits-realization`. Adding a
|
|
93
|
+
kind is adding a trio — no code for the common cases.
|
|
94
|
+
|
|
95
|
+
## Two tiers of checks
|
|
96
|
+
|
|
97
|
+
- **Structural — deterministic, blocking.** Required fields and sections,
|
|
98
|
+
measurable success criteria, risks with owner + mitigation, resolving
|
|
99
|
+
references, unique ids. Plain Python, reliable enough to gate a merge.
|
|
100
|
+
- **Semantic — AI-graded, advisory.** Scored via the Anthropic API and posted to
|
|
101
|
+
the PR — never blocking. Set `ANTHROPIC_API_KEY` to enable; skipped otherwise.
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
107
|
+
pip install -e ".[dev]"
|
|
108
|
+
pytest
|
|
109
|
+
ruff check .
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
This repo ships example `documents/` (four sample projects) that the test suite
|
|
113
|
+
validates against.
|
|
114
|
+
|
|
115
|
+
## The reference deployment
|
|
116
|
+
|
|
117
|
+
[**pmo-as-code-pipeline**](https://github.com/c4g-john/pmo-as-code-pipeline) is a
|
|
118
|
+
living example — sample projects, the gate on every pull request, and a published
|
|
119
|
+
dashboard at
|
|
120
|
+
[c4g-john.github.io/pmo-as-code-pipeline](https://c4g-john.github.io/pmo-as-code-pipeline/).
|
|
121
|
+
The standard's site is [c4g-john.github.io/pmo-as-code](https://c4g-john.github.io/pmo-as-code/).
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
Apache-2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE). © 2026 C4G Enterprises Inc.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# docassert
|
|
2
|
+
|
|
3
|
+
**Unit testing for business documents.** Validate structured Markdown documents
|
|
4
|
+
(charters, BRDs, PRDs, risk registers, …) against a configurable audit standard:
|
|
5
|
+
deterministic structural checks that gate a merge, plus optional AI-graded
|
|
6
|
+
semantic checks that advise. Requirements trace end to end, and project status is
|
|
7
|
+
derived from the documents rather than self-reported.
|
|
8
|
+
|
|
9
|
+
docassert is the reference implementation of **[PMO as Code](https://c4g-john.github.io/pmo-as-code/)** —
|
|
10
|
+
a vendor-neutral standard for running a PMO from version-controlled, declarative files.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install "docassert @ git+https://github.com/c4g-john/docassert" # PyPI release coming
|
|
16
|
+
# with the AI advisory extra:
|
|
17
|
+
pip install "docassert[ai] @ git+https://github.com/c4g-john/docassert"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quickstart
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
docassert init # scaffold criteria/schema/profiles/templates into your repo
|
|
24
|
+
docassert validate documents/**/*.md # unit-test your documents
|
|
25
|
+
docassert consistency # cross-document traceability + profile completeness
|
|
26
|
+
docassert status --index # derived RAG per project
|
|
27
|
+
docassert pages --out _site # a portfolio dashboard + a page per project
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Config resolves **local override → packaged default**: docassert ships sensible
|
|
31
|
+
defaults, and your repo's own `criteria/` (or `schema/`, `profiles/`,
|
|
32
|
+
`consistency.yaml`) wins when present. `docassert init` copies the defaults in so
|
|
33
|
+
you can customize them.
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
| Command | What it does |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `docassert validate <globs>` | Validate documents against their kind's criteria. Exit code = number of blocking failures. |
|
|
40
|
+
| `docassert consistency` | Cross-document checks: referential integrity, coverage, required links, profile completeness. |
|
|
41
|
+
| `docassert rtm [--project ID]` | Requirements traceability matrix (Markdown or CSV). |
|
|
42
|
+
| `docassert status [--project ID] [--index]` | Derived project status (md / json / html). |
|
|
43
|
+
| `docassert pages --out DIR` | Build the portfolio site (index + a page per project). |
|
|
44
|
+
| `docassert projects [--out] [--check]` | Generate / verify the project registry. |
|
|
45
|
+
| `docassert init [DIR]` | Scaffold the default config into a repo. |
|
|
46
|
+
|
|
47
|
+
## Document kinds
|
|
48
|
+
|
|
49
|
+
Twenty kinds, each a `templates/<kind>.template.md` + `schema/<kind>.schema.json`
|
|
50
|
+
+ `criteria/<kind>.criteria.yaml` trio: `project`, `charter`, `business-case`,
|
|
51
|
+
`brd`, `prd`, `frnfr`, `user-story`, `test-cases`, `adr`, `risk-register`,
|
|
52
|
+
`raci-stakeholder`, `qa-test-plan`, `data-migration-plan`,
|
|
53
|
+
`release-cutover-plan`, `rollback-plan`, `hypercare-plan`, `runbook`,
|
|
54
|
+
`status-report`, `post-implementation-review`, `benefits-realization`. Adding a
|
|
55
|
+
kind is adding a trio — no code for the common cases.
|
|
56
|
+
|
|
57
|
+
## Two tiers of checks
|
|
58
|
+
|
|
59
|
+
- **Structural — deterministic, blocking.** Required fields and sections,
|
|
60
|
+
measurable success criteria, risks with owner + mitigation, resolving
|
|
61
|
+
references, unique ids. Plain Python, reliable enough to gate a merge.
|
|
62
|
+
- **Semantic — AI-graded, advisory.** Scored via the Anthropic API and posted to
|
|
63
|
+
the PR — never blocking. Set `ANTHROPIC_API_KEY` to enable; skipped otherwise.
|
|
64
|
+
|
|
65
|
+
## Development
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
69
|
+
pip install -e ".[dev]"
|
|
70
|
+
pytest
|
|
71
|
+
ruff check .
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This repo ships example `documents/` (four sample projects) that the test suite
|
|
75
|
+
validates against.
|
|
76
|
+
|
|
77
|
+
## The reference deployment
|
|
78
|
+
|
|
79
|
+
[**pmo-as-code-pipeline**](https://github.com/c4g-john/pmo-as-code-pipeline) is a
|
|
80
|
+
living example — sample projects, the gate on every pull request, and a published
|
|
81
|
+
dashboard at
|
|
82
|
+
[c4g-john.github.io/pmo-as-code-pipeline](https://c4g-john.github.io/pmo-as-code-pipeline/).
|
|
83
|
+
The standard's site is [c4g-john.github.io/pmo-as-code](https://c4g-john.github.io/pmo-as-code/).
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
Apache-2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE). © 2026 C4G Enterprises Inc.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""docassert — unit testing for business documents.
|
|
2
|
+
|
|
3
|
+
Validate structured Markdown business documents against a configurable audit
|
|
4
|
+
standard: deterministic structural checks that gate a merge, plus optional
|
|
5
|
+
AI-graded semantic checks that advise.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Cross-document traceability rules.
|
|
2
|
+
#
|
|
3
|
+
# The chain: BR (business req) ◀ PR (product req) ◀ FR/NFR (spec)
|
|
4
|
+
# PR ◀ AC (acceptance criterion) ◀ TC (test case)
|
|
5
|
+
#
|
|
6
|
+
# Broken references are ALWAYS blocking. The rules below (required links and
|
|
7
|
+
# coverage) block only when the owning document is `status: approved`, so
|
|
8
|
+
# work-in-progress is never punished.
|
|
9
|
+
|
|
10
|
+
# Each downstream item prefix must declare at least one target via this
|
|
11
|
+
# relation (else it's an orphan).
|
|
12
|
+
required_links:
|
|
13
|
+
PR: traces # a product requirement must trace to a business requirement
|
|
14
|
+
FR: traces # a functional requirement must trace to a product requirement
|
|
15
|
+
NFR: traces # a non-functional requirement must trace to a product requirement
|
|
16
|
+
US: traces # a user story must trace to a product requirement
|
|
17
|
+
AC: verifies # an acceptance criterion must verify a requirement
|
|
18
|
+
TC: tests # a test case must test an acceptance criterion
|
|
19
|
+
|
|
20
|
+
# Every parent item (by prefix) must be covered by >=1 child of `by_prefix`
|
|
21
|
+
# linking to it via `relation`.
|
|
22
|
+
coverage:
|
|
23
|
+
- parent: BR
|
|
24
|
+
relation: traces
|
|
25
|
+
by_prefix: PR
|
|
26
|
+
label: business requirement covered by a product requirement
|
|
27
|
+
- parent: PR
|
|
28
|
+
relation: verifies
|
|
29
|
+
by_prefix: AC
|
|
30
|
+
label: product requirement covered by an acceptance criterion
|
|
31
|
+
- parent: AC
|
|
32
|
+
relation: tests
|
|
33
|
+
by_prefix: TC
|
|
34
|
+
label: acceptance criterion covered by a test case
|
|
35
|
+
|
|
36
|
+
# Advisory AI alignment: for each relation, judge whether the child genuinely
|
|
37
|
+
# fulfils the parent it links to. Never blocks.
|
|
38
|
+
alignment:
|
|
39
|
+
- relation: traces
|
|
40
|
+
prompt: >
|
|
41
|
+
Judge whether the CHILD requirement genuinely refines or implements the
|
|
42
|
+
PARENT requirement it traces to, rather than being merely topically
|
|
43
|
+
related. Penalise links that don't actually follow from the parent.
|
|
44
|
+
- relation: verifies
|
|
45
|
+
prompt: >
|
|
46
|
+
Judge whether the acceptance criterion actually verifies the requirement
|
|
47
|
+
it targets: testable, and covering the requirement's intent.
|
|
48
|
+
- relation: tests
|
|
49
|
+
prompt: >
|
|
50
|
+
Judge whether the test case actually exercises the acceptance criterion
|
|
51
|
+
it targets.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Audit criteria for the Architecture Decision Record (ADR) kind.
|
|
2
|
+
#
|
|
3
|
+
# Modeled as a decision log: one document holds many **ADR-###** decision items,
|
|
4
|
+
# each optionally affecting a requirement. (Distinct from the portfolio-level
|
|
5
|
+
# "Decision" concept.)
|
|
6
|
+
kind: adr
|
|
7
|
+
|
|
8
|
+
required_sections:
|
|
9
|
+
- Overview
|
|
10
|
+
- Decisions
|
|
11
|
+
|
|
12
|
+
item_sections:
|
|
13
|
+
- section: Decisions
|
|
14
|
+
prefix: ADR
|
|
15
|
+
|
|
16
|
+
checks:
|
|
17
|
+
- id: frontmatter-schema
|
|
18
|
+
type: structural
|
|
19
|
+
blocking: true
|
|
20
|
+
description: Frontmatter is valid against schema/adr.schema.json.
|
|
21
|
+
- id: required-sections
|
|
22
|
+
type: structural
|
|
23
|
+
blocking: true
|
|
24
|
+
description: Every required section is present and non-empty.
|
|
25
|
+
- id: items-well-formed
|
|
26
|
+
type: structural
|
|
27
|
+
blocking: true
|
|
28
|
+
description: Every decision is a valid **ADR-###** item.
|
|
29
|
+
- id: adr-items-have-status
|
|
30
|
+
type: structural
|
|
31
|
+
blocking: true
|
|
32
|
+
description: Every decision declares a valid Status (proposed | accepted | superseded | deprecated | rejected).
|
|
33
|
+
- id: unique-id
|
|
34
|
+
type: structural
|
|
35
|
+
blocking: true
|
|
36
|
+
description: The document id is unique across documents/.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Audit criteria for the Benefits Realization kind.
|
|
2
|
+
kind: benefits-realization
|
|
3
|
+
|
|
4
|
+
required_sections:
|
|
5
|
+
- Overview
|
|
6
|
+
- Benefits
|
|
7
|
+
- Measurement
|
|
8
|
+
- Realized Value
|
|
9
|
+
|
|
10
|
+
# Bullets in these sections must state a measurable threshold.
|
|
11
|
+
measurable_sections:
|
|
12
|
+
- Benefits
|
|
13
|
+
|
|
14
|
+
checks:
|
|
15
|
+
- id: frontmatter-schema
|
|
16
|
+
type: structural
|
|
17
|
+
blocking: true
|
|
18
|
+
description: Frontmatter is valid against schema/benefits-realization.schema.json.
|
|
19
|
+
- id: required-sections
|
|
20
|
+
type: structural
|
|
21
|
+
blocking: true
|
|
22
|
+
description: Every required section is present and non-empty.
|
|
23
|
+
- id: measurable-items
|
|
24
|
+
type: structural
|
|
25
|
+
blocking: true
|
|
26
|
+
description: Every benefit states a measurable target.
|
|
27
|
+
- id: unique-id
|
|
28
|
+
type: structural
|
|
29
|
+
blocking: true
|
|
30
|
+
description: The document id is unique across documents/.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Audit criteria for the Business Requirements Document (BRD) kind.
|
|
2
|
+
kind: brd
|
|
3
|
+
|
|
4
|
+
required_sections:
|
|
5
|
+
- Purpose
|
|
6
|
+
- Business Requirements
|
|
7
|
+
- Out of Scope
|
|
8
|
+
|
|
9
|
+
# Sections whose bullets are traceable items.
|
|
10
|
+
item_sections:
|
|
11
|
+
- section: Business Requirements
|
|
12
|
+
prefix: BR
|
|
13
|
+
|
|
14
|
+
checks:
|
|
15
|
+
- id: frontmatter-schema
|
|
16
|
+
type: structural
|
|
17
|
+
blocking: true
|
|
18
|
+
description: Frontmatter is valid against schema/brd.schema.json.
|
|
19
|
+
- id: required-sections
|
|
20
|
+
type: structural
|
|
21
|
+
blocking: true
|
|
22
|
+
description: Every required section is present and non-empty.
|
|
23
|
+
- id: items-well-formed
|
|
24
|
+
type: structural
|
|
25
|
+
blocking: true
|
|
26
|
+
description: Every Business Requirement is a valid **BR-###** item.
|
|
27
|
+
- id: unique-id
|
|
28
|
+
type: structural
|
|
29
|
+
blocking: true
|
|
30
|
+
description: The document id is unique across documents/.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Audit criteria for the Business Case kind.
|
|
2
|
+
kind: business-case
|
|
3
|
+
|
|
4
|
+
required_sections:
|
|
5
|
+
- Problem Statement
|
|
6
|
+
- Options Considered
|
|
7
|
+
- Recommendation
|
|
8
|
+
- Costs
|
|
9
|
+
- Benefits
|
|
10
|
+
|
|
11
|
+
checks:
|
|
12
|
+
- id: frontmatter-schema
|
|
13
|
+
type: structural
|
|
14
|
+
blocking: true
|
|
15
|
+
description: Frontmatter is valid against schema/business-case.schema.json.
|
|
16
|
+
- id: required-sections
|
|
17
|
+
type: structural
|
|
18
|
+
blocking: true
|
|
19
|
+
description: Every required section is present and non-empty.
|
|
20
|
+
- id: unique-id
|
|
21
|
+
type: structural
|
|
22
|
+
blocking: true
|
|
23
|
+
description: The document id is unique across documents/.
|