throughline 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.
- throughline-0.1.0/LICENSE +201 -0
- throughline-0.1.0/NOTICE +12 -0
- throughline-0.1.0/PKG-INFO +268 -0
- throughline-0.1.0/README.md +240 -0
- throughline-0.1.0/pyproject.toml +52 -0
- throughline-0.1.0/setup.cfg +4 -0
- throughline-0.1.0/src/throughline/__init__.py +38 -0
- throughline-0.1.0/src/throughline/cli.py +1007 -0
- throughline-0.1.0/src/throughline/fingerprint.py +43 -0
- throughline-0.1.0/src/throughline/graph.py +113 -0
- throughline-0.1.0/src/throughline/grounding.py +112 -0
- throughline-0.1.0/src/throughline/model.py +176 -0
- throughline-0.1.0/src/throughline/schema.py +237 -0
- throughline-0.1.0/src/throughline/storage.py +327 -0
- throughline-0.1.0/src/throughline/uid.py +58 -0
- throughline-0.1.0/src/throughline/validate.py +243 -0
- throughline-0.1.0/src/throughline.egg-info/PKG-INFO +268 -0
- throughline-0.1.0/src/throughline.egg-info/SOURCES.txt +21 -0
- throughline-0.1.0/src/throughline.egg-info/dependency_links.txt +1 -0
- throughline-0.1.0/src/throughline.egg-info/entry_points.txt +3 -0
- throughline-0.1.0/src/throughline.egg-info/requires.txt +4 -0
- throughline-0.1.0/src/throughline.egg-info/top_level.txt +1 -0
- throughline-0.1.0/tests/test_engine.py +926 -0
|
@@ -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 Time Back Solutions Limited
|
|
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.
|
throughline-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
throughline
|
|
2
|
+
Copyright 2026 Time Back Solutions Limited
|
|
3
|
+
|
|
4
|
+
This product includes software developed by Time Back Solutions Limited.
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0. See the LICENSE file for the
|
|
7
|
+
full terms.
|
|
8
|
+
|
|
9
|
+
throughline is a clean-room implementation. Its design draws on the public
|
|
10
|
+
documentation of prior-art requirements tools (notably Doorstop and StrictDoc);
|
|
11
|
+
no third-party source code was copied. See PROVENANCE.md for the full prior-art
|
|
12
|
+
and ownership record.
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: throughline
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Git-native requirements management tool with a scope-avalanche grounding layer: permanent UIDs, one file per item, typed links, suspect detection, and a CI-gating check.
|
|
5
|
+
Author: Time Back Solutions Limited
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/rhodium-org/throughline
|
|
8
|
+
Project-URL: Repository, https://github.com/rhodium-org/throughline
|
|
9
|
+
Project-URL: Issues, https://github.com/rhodium-org/throughline/issues
|
|
10
|
+
Keywords: requirements,requirements-management,traceability,grounding,git-native,idd,intent-driven-development
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
License-File: NOTICE
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# throughline
|
|
30
|
+
|
|
31
|
+
[](https://github.com/rhodium-org/throughline/actions/workflows/ci.yml)
|
|
32
|
+
|
|
33
|
+
A **Git-native requirements management tool** with a built-in **scope-avalanche
|
|
34
|
+
grounding layer**. Requirements live as one small YAML file per item under
|
|
35
|
+
version control; a `check` command validates the whole graph and gates CI.
|
|
36
|
+
|
|
37
|
+
Two ideas, one system:
|
|
38
|
+
|
|
39
|
+
1. **throughline core** — permanent, position-independent UIDs (never renumbered,
|
|
40
|
+
never reused; deletion is a tombstone), one file per item, typed directed
|
|
41
|
+
links, SHA-256 *normative* fingerprints that turn a real content change into a
|
|
42
|
+
**suspect** link, and a `check` CLI with stable exit codes.
|
|
43
|
+
2. **grounding layer** — every non-root item must justify itself by reaching a
|
|
44
|
+
*root* ("why"); AI/scout-generated items enter `proposed` and must be
|
|
45
|
+
**ratified** by a human; assumptions are first-class and invalidating one
|
|
46
|
+
cascades **suspect** across its blast radius. Unbounded generation yields a
|
|
47
|
+
bounded, ranked review queue instead of silent sprawl.
|
|
48
|
+
|
|
49
|
+
The build contract is the throughline spec in
|
|
50
|
+
[`docs/referenced-resource/`](docs/referenced-resource) (docs 04 system
|
|
51
|
+
requirements, 06 data format, 07 architecture).
|
|
52
|
+
|
|
53
|
+
> **New here?** [`HOW_TO_USE.md`](HOW_TO_USE.md) is a fifteen-minute hands-on
|
|
54
|
+
> quick start: scaffold a project, add three linked requirements, watch the
|
|
55
|
+
> validator reject an ungrounded graph, fix it, and trace a requirement back to
|
|
56
|
+
> its reason for existing. Curious how the workflow relates to test-first
|
|
57
|
+
> practice? [`HOW_IDD_DIFFERS_FROM_BDD.md`](HOW_IDD_DIFFERS_FROM_BDD.md) explains
|
|
58
|
+
> Intent-Driven Development and why it is the *why* axis to BDD's *what*.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Install
|
|
63
|
+
|
|
64
|
+
throughline is pure Python (one dependency, `pyyaml`) and needs **Python >= 3.11**
|
|
65
|
+
(for the stdlib `tomllib`). The same steps work on **Linux, macOS, and Windows** —
|
|
66
|
+
only how you obtain Python and put scripts on `PATH` differs.
|
|
67
|
+
|
|
68
|
+
**Recommended — [`pipx`](https://pipx.pypa.io)** (installs the CLI in its own
|
|
69
|
+
isolated environment):
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
pipx install "git+https://github.com/rhodium-org/throughline.git"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
> A PyPI release (`pipx install throughline`) is planned but not yet published —
|
|
76
|
+
> until then, install from Git as above.
|
|
77
|
+
|
|
78
|
+
Per-OS notes:
|
|
79
|
+
|
|
80
|
+
- **Linux** — system Python is often "externally managed" (PEP 668); don't
|
|
81
|
+
`pip install` into it. Use `pipx` (`sudo apt install pipx` / `pacman -S python-pipx`)
|
|
82
|
+
or a virtual environment.
|
|
83
|
+
- **macOS** — `brew install python pipx && pipx ensurepath`, then install as above.
|
|
84
|
+
- **Windows** — install Python 3.12 from python.org or `winget install Python.Python.3.12`
|
|
85
|
+
(tick *Add to PATH*), then `python -m pip install --user pipx && pipx ensurepath`.
|
|
86
|
+
Both `tl.exe` and `throughline.exe` are generated.
|
|
87
|
+
|
|
88
|
+
Either way you get `tl` (and the long form `throughline`) on your `PATH`. For a
|
|
89
|
+
local checkout you can develop against, see [`CONTRIBUTING.md`](CONTRIBUTING.md).
|
|
90
|
+
|
|
91
|
+
Or run it containerised, no local Python at all:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
docker build -t throughline .
|
|
95
|
+
docker run --rm -v "$PWD/my-project:/work" throughline -C /work check --strict
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## The format
|
|
101
|
+
|
|
102
|
+
A project is a directory: `throughline.toml` (config) + per-document folders, each
|
|
103
|
+
with a `.document.yml` manifest and one `<UID>.yml` per item.
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
uid: FR-0022 # permanent, immutable, never reused
|
|
107
|
+
type: requirement
|
|
108
|
+
status: approved
|
|
109
|
+
title: Guided setup wizard
|
|
110
|
+
text: The system shall walk new users through a 3-step setup.
|
|
111
|
+
normative: true
|
|
112
|
+
links:
|
|
113
|
+
- target: BN-0003 # this requirement derives from a business need
|
|
114
|
+
type: derives_from
|
|
115
|
+
- target: ASM-0002 # …and depends on an assumption's validity
|
|
116
|
+
type: assumes
|
|
117
|
+
stamp: sha256:… # target fingerprint when last confirmed (suspect tracking)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Roots** (`intent`, `business_need`, `risk`, `constraint`, `assumption`) may
|
|
121
|
+
exist ungrounded — they are the roots of "why". Everything else must reach a root
|
|
122
|
+
through a grounding link (`derives_from`, `mitigates`, `implements`, `verifies`),
|
|
123
|
+
which together form a DAG — circular justification is rejected.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## CLI
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
tl init [--name NAME] # scaffold a project
|
|
131
|
+
tl doc new <PREFIX> <dir> [--parent P] # add a document
|
|
132
|
+
tl new <PREFIX> [--uid U] [--type T] [--ground UID] # allocate + create (grounded at birth)
|
|
133
|
+
tl link <SRC> <DST> --type <kind> [--stamp] # add a typed link
|
|
134
|
+
throughline delete <UID> --reason "…" # tombstone (never erased)
|
|
135
|
+
throughline review [<UID> | --all-clean] # mark reviewed at current content
|
|
136
|
+
tl check [--strict] [--format json] # validate the graph — the CI gate
|
|
137
|
+
tl trace <UID> [--direction in|out] [--depth N]
|
|
138
|
+
tl blast <UID> [--format json] # everything depending on an item
|
|
139
|
+
tl shape [--format json] # observed (from)-[link]->(to) triples
|
|
140
|
+
tl diagram [types|transitions|both] # Mermaid of the model / lifecycle
|
|
141
|
+
tl docs [--doc PREFIX] [--at REF] # render a Markdown requirements document
|
|
142
|
+
tl context # agent-facing brief (IDD + this project's model)
|
|
143
|
+
tl ratify <UID> --by <who> # a human takes accountability
|
|
144
|
+
throughline invalidate <UID> --reason "…" # falsify; cascade suspect
|
|
145
|
+
throughline scout <report.json> # ingest scout proposals
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Exit codes are a stable contract: **0** ok · **1** findings at error severity ·
|
|
149
|
+
**2** usage/internal error. So `tl check` drops straight into a pre-commit hook
|
|
150
|
+
or CI gate — an ungrounded, unserved, or otherwise invalid graph fails the build.
|
|
151
|
+
|
|
152
|
+
### What `check` enforces
|
|
153
|
+
|
|
154
|
+
Upward and downward coverage are independent and both matter:
|
|
155
|
+
|
|
156
|
+
| Rule | Meaning |
|
|
157
|
+
|------|---------|
|
|
158
|
+
| `orphan` | a non-root item with no grounding chain to a root |
|
|
159
|
+
| `unserved-root` | a delivery root nobody derives from / mitigates |
|
|
160
|
+
| `grounding-cycle` | circular justification |
|
|
161
|
+
| `dangling-link` / `deleted-link-target` | link to a missing/tombstoned item |
|
|
162
|
+
| `uid-grammar` / `uid-collision` | malformed UID, or one UID in two places (merge) |
|
|
163
|
+
| `schema` | missing required attr or out-of-enum value |
|
|
164
|
+
| `suspect-link` | target changed since the link was last confirmed |
|
|
165
|
+
| `unreviewed` | item content changed since last review |
|
|
166
|
+
| `unratified` | AI/scout-origin item still `proposed` |
|
|
167
|
+
| `ambiguous` | flagged ambiguous — blocked from ratification |
|
|
168
|
+
| `coverage` | a declared `[[rules.coverage]]` link requirement is unmet |
|
|
169
|
+
|
|
170
|
+
Every rule's severity is configurable per project under `[rules]`; `--strict`
|
|
171
|
+
promotes every warning to an error for CI.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Try it
|
|
176
|
+
|
|
177
|
+
The [`examples/grounding-demo/`](examples/grounding-demo) project is a small, fully
|
|
178
|
+
grounded graph (intents, a business need, a risk, a constraint, an assumption,
|
|
179
|
+
requirements, an NFR, and verifying tests):
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
tl -C examples/grounding-demo check --strict # green, exit 0
|
|
183
|
+
tl -C examples/grounding-demo trace FR-0055 # walk its justification tree
|
|
184
|
+
tl -C examples/grounding-demo blast ASM-0002 # what a bad assumption would take down
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Self-hosting — throughline's own requirements
|
|
190
|
+
|
|
191
|
+
throughline manages its own spec. The [`requirements/`](requirements) project is
|
|
192
|
+
throughline's vision, goals, user requirements, system requirements, and NFRs seeded
|
|
193
|
+
as throughline items, with the full grounding chain wired up
|
|
194
|
+
(`SR/NFR --implements--> UR --derives_from--> goal --derives_from--> vision`):
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
tl -C requirements check --strict # green, exit 0 — the tool gates its own scope
|
|
198
|
+
tl -C requirements trace SR-0001 # walk a system requirement up to the vision
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
This is the discipline the tool exists to provide, applied to the tool itself: a
|
|
202
|
+
new system requirement that doesn't justify itself against a user requirement —
|
|
203
|
+
or a user requirement that doesn't derive from a goal — fails the build. Both the
|
|
204
|
+
demo and the self-host graph are gated in CI and by the pre-commit hook.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Grounding operations
|
|
209
|
+
|
|
210
|
+
- **ratify** — a human takes accountability. Refused for ambiguous or ungrounded
|
|
211
|
+
items: the two states that must never be signed off.
|
|
212
|
+
- **invalidate** — falsify an assumption (or any node): it is rejected and every
|
|
213
|
+
transitive dependent is marked `suspect` (its blast radius).
|
|
214
|
+
- **scout ingest** — scout *proposes*, humans *ratify*. Proposed roots enter as
|
|
215
|
+
`origin: scout, status: proposed`; ambiguities set `attrs.ambiguous` and block
|
|
216
|
+
ratification; coverage gaps corroborate the structural `unserved-root` finding.
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"proposed_roots": [{"id": "BN-0009", "type": "business_need", "title": "…", "rationale": "…"}],
|
|
221
|
+
"ambiguities": [{"id": "FR-0055", "reason": "'fast' is unquantified"}],
|
|
222
|
+
"coverage_gaps": [{"root": "CON-0002", "detail": "no requirement implements it"}]
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Testing & gates
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
pytest -q # model, UID, fingerprint, validate, grounding
|
|
232
|
+
tl -C examples/grounding-demo check --strict # the demo graph gate (exit 1 = broken)
|
|
233
|
+
tl -C requirements check --strict # throughline's own requirements (self-host gate)
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
- [`.pre-commit-config.yaml`](.pre-commit-config.yaml) runs the gate on commits
|
|
237
|
+
touching either project (demo and self-host). Enable with `pre-commit install`.
|
|
238
|
+
- [`.github/workflows/ci.yml`](.github/workflows/ci.yml) runs the tests, both
|
|
239
|
+
grounding gates, and a Docker build + image smoke-test on push/PR.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## What this is
|
|
244
|
+
|
|
245
|
+
**M0 — Core**: UID model, one-file-per-item storage, typed links,
|
|
246
|
+
fingerprints/suspect, the validation pipeline, the grounding layer, and the
|
|
247
|
+
`tl` CLI. **Not included**: baselines/diff, HTML/PDF publish, and CSV/ReqIF
|
|
248
|
+
import-export. Assumption items carry provenance attributes (`attrs.owner` /
|
|
249
|
+
`attrs.last_validated` / `attrs.confidence`) alongside their content.
|
|
250
|
+
|
|
251
|
+
throughline is **early software (alpha)** and unfinished by design — see
|
|
252
|
+
[`ROADMAP.md`](ROADMAP.md) for what's built, what's next, and where help is most
|
|
253
|
+
useful.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Contributing
|
|
258
|
+
|
|
259
|
+
Contributions are welcome. [`CONTRIBUTING.md`](CONTRIBUTING.md) gets you to a
|
|
260
|
+
checked development environment; [`ROADMAP.md`](ROADMAP.md) lists good first work;
|
|
261
|
+
all participation is under the [`Code of Conduct`](CODE_OF_CONDUCT.md). To report a
|
|
262
|
+
vulnerability, see [`SECURITY.md`](SECURITY.md).
|
|
263
|
+
|
|
264
|
+
## License
|
|
265
|
+
|
|
266
|
+
Copyright © 2026 Time Back Solutions Limited. Released under the
|
|
267
|
+
**Apache License 2.0** — see [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE). Provenance
|
|
268
|
+
and prior-art are recorded in [`PROVENANCE.md`](PROVENANCE.md).
|