Skip to content

Commit 3f7e549

Browse files
committed
docs: document sphinx-needs processing rules and add comp_saf_dfa/comp_saf_fmea extraction
1 parent 6dcc1ea commit 3f7e549

5 files changed

Lines changed: 553 additions & 10 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,29 @@ pre-commit install --hook-type pre-push
3232
```
3333

3434
Execute the pre-commit manually via `pre-commit run` or `pre-commit run --all-files` to run it on all files.
35+
36+
## Sphinx-needs processing rules
37+
38+
> [!WARNING]
39+
> These rules are currently a **work-in-progress / demonstration** and are not yet production ready.
40+
41+
In addition to building the documentation, docs-as-code ships a set of Bazel macros
42+
(in [docs.bzl](docs.bzl), backed by the Python tools in [scripts_bazel/](scripts_bazel))
43+
that post-process the `needs.json` produced by the documentation build. They let you:
44+
45+
- **Filter** `needs.json` down to selected element types and/or components
46+
(`filtered_needs_json`, plus convenience wrappers such as `component_requirements`,
47+
`feature_requirements`, `assumptions_of_use`, `feature_architecture`, `component_architecture`).
48+
- **Render** the selected needs as a Markdown document (`sphinx_needs_to_md`).
49+
- **Convert** S-CORE requirements into [TRLC](https://github.com/bmw-software-engineering/trlc)
50+
(`sphinx_needs_to_trlc`).
51+
- **Validate checklists** by pinning a SHA256 hash on a `mod_insp` / `mod_ver_report`
52+
record and failing the build when the reviewed output drifts
53+
(`requirements_checklist`, `architecture_checklist`, `dfa_checklist`,
54+
`fmea_checklist`, `verification_report`).
55+
- **Bundle** a component's or feature's checklists, docs and sub-components
56+
(`score_component`, `score_module`).
57+
58+
See [scripts_bazel/README_needs_rules.md](scripts_bazel/README_needs_rules.md) for the
59+
full guide, including usage examples, transitive-dependency hashing and resolving
60+
external needs via `extra_needs`.

0 commit comments

Comments
 (0)