Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
8348e19
Initial commit
eclipse-score-bot Apr 28, 2025
83390d8
Merge remote-tracking branch 'origin/export_tooling' into integration
MaximilianSoerenPollak Apr 28, 2025
45335cc
move docs/_tooling from the score repository
AlexanderLanin Apr 28, 2025
f003bf5
rename and move folders (#2)
MaximilianSoerenPollak Apr 28, 2025
a54d4fb
Integrate functionality (#3)
MaximilianSoerenPollak Apr 29, 2025
36a3f54
Updating & renaming requirements (#4)
MaximilianSoerenPollak Apr 29, 2025
a391da4
Initial cleanup (#5)
MaximilianSoerenPollak Apr 30, 2025
3d129d4
add README (#6)
MaximilianSoerenPollak May 3, 2025
312dd89
Make docs-as-code useable (#7)
MaximilianSoerenPollak May 8, 2025
c2f9e27
Prefix name with score (#9)
MaximilianSoerenPollak May 8, 2025
c3ade5f
Renaming 'docs-as-code' => 'score_docs_as_code' (#10)
MaximilianSoerenPollak May 8, 2025
ee07a3b
quick fix for randomly failing build (#13)
AlexanderLanin May 9, 2025
f1e6944
bump version (#14)
AlexanderLanin May 9, 2025
242bcc4
fix command line argument for live_preview (#15)
AlexanderLanin May 9, 2025
f30d073
rename process-docs to examples/simple (#17)
AlexanderLanin May 9, 2025
a8711bd
add CI/CD workflows to the repository (#16)
Aymen-Soussi-01 May 9, 2025
5120106
quick fix format-cmd for CI/CD (#20)
MaximilianSoerenPollak May 12, 2025
81e2916
always export needs.json & bugfixes (#21)
MaximilianSoerenPollak May 12, 2025
4515734
docs with external link (#22)
MaximilianSoerenPollak May 12, 2025
d45244d
docs-as-code: Remove gitlint non needed action related file (#19)
Aymen-Soussi-01 May 13, 2025
ba3147b
Fixed source_code_linker finding external needs (#23)
MaximilianSoerenPollak May 13, 2025
0b9ad50
docs: include inc files (#26)
hoe-jo May 16, 2025
2bc27b4
Update Module version (#30)
MaximilianSoerenPollak May 16, 2025
bd979d4
docs: extened docs target (#34)
dcalavrezo-qorix May 20, 2025
04e561e
docs: updated version (#36)
dcalavrezo-qorix May 21, 2025
7ed2c2a
Fixed wrong check activation (#37)
MaximilianSoerenPollak May 21, 2025
5af8620
Incremental cleanup (#39)
Aymen-Soussi-01 May 21, 2025
7e6a388
Increase versioning (#38)
MaximilianSoerenPollak May 21, 2025
ba387d7
Adding further examples & bugfixes (#32)
MaximilianSoerenPollak May 22, 2025
995616e
Update version to 0.2.5 (#41)
MaximilianSoerenPollak May 22, 2025
503470c
Integrate renovatebot into docs-as-code (#43)
Aymen-Soussi-01 May 25, 2025
9791db5
fix typo (#44)
AlexanderLanin May 26, 2025
14793ad
Add bugfix for new module json_encoding quirks (#42)
MaximilianSoerenPollak May 26, 2025
bb30a98
fix RenovateBot not detecting updates issue. (#48)
Aymen-Soussi-01 May 27, 2025
3650fcf
Bugfix external_prefix regex check (#50)
MaximilianSoerenPollak May 28, 2025
e40c003
publish documentation to github pages (#55)
MaximilianSoerenPollak May 28, 2025
9715f86
Increase version for release (#58)
MaximilianSoerenPollak May 30, 2025
fae7591
fixes exeternal prefix cleaning (#61)
MaximilianSoerenPollak Jun 3, 2025
94bda9e
Increase module version (#64)
MaximilianSoerenPollak Jun 3, 2025
0460310
fix cleaning of external prefix (#68)
MaximilianSoerenPollak Jun 4, 2025
027e3b7
Update metamodel with (#69)
masc2023 Jun 4, 2025
e1b3bd2
Increase version of module (#71)
MaximilianSoerenPollak Jun 4, 2025
79c7295
docs: add user and repo as parameters to incremental (#70)
nicu1989 Jun 4, 2025
d7bd238
Create README.md (#75)
nicu1989 Jun 4, 2025
d7df843
fix: Change hover color for visited links (#76)
4og Jun 4, 2025
6a468c7
fix: external needs graph checks & misc fixes (#78)
MaximilianSoerenPollak Jun 5, 2025
93136e0
increase version & simplify json parsing (#79)
MaximilianSoerenPollak Jun 6, 2025
5ea6264
add requirements (#67)
AlexanderLanin Jun 13, 2025
180e1f7
extend source code linker to work with any repo (#84)
MaximilianSoerenPollak Jun 13, 2025
db1682d
fix BUILD file of score_source_code_linker (#91)
simon-d-bmw Jun 20, 2025
ab549c6
add CODEOWNERS (#88)
AlexanderLanin Jun 22, 2025
467ed9c
fix: remove formatting from tests (#93)
MaximilianSoerenPollak Jun 23, 2025
65ae158
add support to inject other pip index (#103)
simon-d-bmw Jun 26, 2025
316102a
add caching to some workflows (#95)
Aymen-Soussi-01 Jun 26, 2025
1c4352e
Remove dependency to score_platform (#108)
MaximilianSoerenPollak Jun 26, 2025
d9df244
update process requirements (#111)
AlexanderLanin Jun 27, 2025
86b5a37
fix: esbonio support, registration of HeaderService (#120)
nicu1989 Jul 1, 2025
de4b821
Add support for injecting dependencies (#119)
simon-d-bmw Jul 4, 2025
ebebf9e
Source code linker partial re-write (#125)
MaximilianSoerenPollak Jul 7, 2025
1c436f1
checks: bugfix id contains feature (#114)
hoe-jo Jul 7, 2025
68fe59e
Fix direct sphinx build. (#127)
nicu1989 Jul 8, 2025
f57ba65
Fix source code linker errors (#128)
MaximilianSoerenPollak Jul 8, 2025
69ad70b
Remove empty globs (#124)
simon-d-bmw Jul 9, 2025
36a2252
process: update metamodel safety analysis (#104)
PandaeDo Jul 9, 2025
98e7276
Fix SCL test. (#135)
MaximilianSoerenPollak Jul 14, 2025
e5c2dc5
Bugfix: Attribute Safety Analysis (#131)
PandaeDo Jul 14, 2025
609d4fb
Add cli help targets description. (#134)
nicu1989 Jul 16, 2025
8dac10b
add new need doc_tool (#137)
masc2023 Jul 16, 2025
e866db5
Adding doc_tool to exception list (#139)
MaximilianSoerenPollak Jul 17, 2025
2ce245b
Increase version of module (#141)
MaximilianSoerenPollak Jul 17, 2025
c3065ed
Fixing current BUILD errors (#153)
MaximilianSoerenPollak Jul 22, 2025
a7bea32
Expand the check of stop words in the title to be for all requirement…
Aymen-Soussi-01 Jul 22, 2025
bae447d
Add DevContainer Support (#151)
opajonk Jul 23, 2025
2d19347
Add Process Overview Table for Process–Tool Requirements Mapping (#133)
Aymen-Soussi-01 Jul 23, 2025
5c66928
Automatically Execute ide_support Command (#157)
opajonk Jul 23, 2025
73fd2ee
consumer tests (#129)
MaximilianSoerenPollak Jul 23, 2025
e81f9e9
fix consumer tests (#161)
MaximilianSoerenPollak Jul 23, 2025
110032c
Update LICENSE and NOTICE files (#163)
AlexanderLanin Jul 23, 2025
eaec7c6
fill FAQ with recent questions and answers (#164)
AlexanderLanin Jul 23, 2025
6b181a8
Add permissions to workflow (#165)
MaximilianSoerenPollak Jul 24, 2025
bd0c101
Fixing consumer_test triggers & color output (#167)
MaximilianSoerenPollak Jul 24, 2025
f101ba8
add mandatory content check (#152)
MaximilianSoerenPollak Jul 24, 2025
3007d2b
fix consumer test (#170)
MaximilianSoerenPollak Jul 24, 2025
df01d29
remove obsolete venv (#171)
AlexanderLanin Jul 24, 2025
d7a98e3
update tool_reqs (#172)
AlexanderLanin Jul 24, 2025
6290e80
Update DevContainer Usage (#179)
opajonk Jul 25, 2025
a2d7cad
Fix conent checks (#173)
MaximilianSoerenPollak Jul 25, 2025
3c7be8e
Improve consumer test (#177)
MaximilianSoerenPollak Jul 25, 2025
9719be9
Upgrade bazel version to 8.3.0 (#181)
marcmo Jul 28, 2025
d8aa801
add FMEA/DFA & Needpie function (#183)
MaximilianSoerenPollak Jul 29, 2025
055bf29
Cleanup docs and fix error reporting (#184)
AlexanderLanin Jul 29, 2025
90bd22f
remove the last "mitigates" (#185)
MaximilianSoerenPollak Jul 29, 2025
28ad4ed
Upgrade to 1.0.0 (#187)
AlexanderLanin Jul 30, 2025
8964246
Prepare for release (#190)
MaximilianSoerenPollak Jul 30, 2025
96e5a76
Enhance validation for graph checks error messages (#142)
Aymen-Soussi-01 Jul 30, 2025
446bf0e
Update process version (#191)
MaximilianSoerenPollak Jul 31, 2025
8459a10
update requirements to match process 1.1.0 (#194)
AlexanderLanin Aug 5, 2025
ec62bcc
fix needs_json visibility across repositories (#198)
nicu1989 Aug 7, 2025
e6bf7c2
Improve check_id_format (#192)
Aymen-Soussi-01 Aug 11, 2025
61be512
Increase versions (#203)
MaximilianSoerenPollak Aug 11, 2025
f064cef
linter (#202)
Aymen-Soussi-01 Aug 12, 2025
e0d5de6
Ensure checks exists if added to filter(#206)
Aymen-Soussi-01 Aug 13, 2025
e95e662
Fix source code links strings in code (#208)
Aymen-Soussi-01 Aug 13, 2025
958177e
Fix venv (#209)
MaximilianSoerenPollak Aug 13, 2025
fd4b97c
Fix most of line length errors plus some other errors (#210)
Aymen-Soussi-01 Aug 14, 2025
4e272bd
Adding helper_lib (#207)
MaximilianSoerenPollak Aug 14, 2025
66dc723
Fix linting errors part 2 (#211)
Aymen-Soussi-01 Aug 15, 2025
cc3b0fa
Test parsing & testlinks (#197)
MaximilianSoerenPollak Aug 18, 2025
aae98ca
Fix new needs weak content not detected (#214)
Aymen-Soussi-01 Aug 18, 2025
e48a1fc
Followup PR to integrate nits of #207 (#212)
MaximilianSoerenPollak Aug 18, 2025
49bde21
Update Metamodel README (#217)
MaximilianSoerenPollak Aug 19, 2025
f69b9c0
Improve new checks logs visibility (#215)
Aymen-Soussi-01 Aug 20, 2025
fd90a17
add documentation check command and time tracking (#218)
AlexanderLanin Aug 20, 2025
014857a
Integrate pytest plugin & new tooling structure (#220)
MaximilianSoerenPollak Aug 21, 2025
cab4dfd
Update all dependencies (#219)
Aymen-Soussi-01 Aug 21, 2025
9f410b3
Upgrade Versions (#223)
MaximilianSoerenPollak Aug 22, 2025
753dbe7
Added some test decorators & changed test rst (#224)
MaximilianSoerenPollak Aug 22, 2025
bb83e99
simplify static path configuration and add bazel 7 support (#228)
AlexanderLanin Aug 22, 2025
92a4806
dr-001 (#227)
AlexanderLanin Aug 22, 2025
039abec
Improve docs as code performance (#229)
Aymen-Soussi-01 Aug 25, 2025
5259093
Add Pull request template (#230)
Aymen-Soussi-01 Aug 26, 2025
1a7657e
add test to verify the model loading (#231)
mmr1909 Aug 26, 2025
0272f9e
add puml-theme-score.puml (#232)
kalu-an Aug 28, 2025
47a80da
Simplify-consumer-tests (#237)
AlexanderLanin Aug 29, 2025
b3617ae
strip down conf.py to the bare minimum (#233)
AlexanderLanin Aug 29, 2025
5b52558
fix some of linter warnings (#238)
AlexanderLanin Aug 29, 2025
df9dc12
fix: score_sphinx_bundle must load plantuml before sphinx-needs (#240)
AlexanderLanin Sep 1, 2025
b7ac1d5
lint: Fix lint errors (#245)
nicu1989 Sep 8, 2025
e0385b0
docs: Check optional links as info (#242)
nicu1989 Sep 8, 2025
c62f3d0
Add Decision Record support (#236)
AlexanderLanin Sep 9, 2025
8e46554
tooling: Integrate CLI helper (#247)
nicu1989 Sep 11, 2025
12d6128
update colors in score.css (#248)
AlexanderLanin Sep 12, 2025
d4b230f
fix color and make score_layout self-contained (#249)
AlexanderLanin Sep 15, 2025
dd04c72
score_metamodel cleanup (#250)
AlexanderLanin Sep 15, 2025
d3cb059
fix version switcher (#251)
AlexanderLanin Sep 15, 2025
ceae78a
refactor: improve internal metamodel storage (#252)
AlexanderLanin Sep 16, 2025
5f22e5f
drop id and prefix from metamodel.yaml when they are redundant (#254)
AlexanderLanin Sep 17, 2025
19de31b
ci: Integrate verify, test and build docs in same workflow (#255)
nicu1989 Sep 23, 2025
ee6099e
Refactor yaml parsing (#256)
AlexanderLanin Sep 23, 2025
3f8a6f7
Delete .github/workflows/docs.yml (#262)
nicu1989 Sep 24, 2025
5ea4b6c
better warnings and simpler config (#253)
AlexanderLanin Sep 26, 2025
305c238
Resolve issues with local RST tests (#266)
marcmo Sep 30, 2025
8c99c5a
adjust complies link validation (#268)
AlexanderLanin Oct 7, 2025
afae3b3
Update tool requirements (#271)
a-zw Oct 7, 2025
5ec612c
Fix flaky test (#270)
a-zw Oct 7, 2025
2b39282
update metamodel to follow process requirements (#263)
antonkri Oct 7, 2025
e16f781
Implement validity attributes (#274)
a-zw Oct 8, 2025
1161235
Doc sources as public target (#277)
a-zw Oct 14, 2025
be78ba5
📚 Docs for updating requirements (#281)
ubmarco Oct 23, 2025
5e8b013
update plantuml theme green to purple (#280)
kalu-an Oct 27, 2025
5239062
Cleanup (#290)
AlexanderLanin Nov 4, 2025
33eda7a
Remove id prefixes for mega-build (DR-004-Infra) (#293)
guejan Nov 7, 2025
723bee8
Add experimental combo/mega/full build (see DR-004) (#285)
AlexanderLanin Nov 7, 2025
bb36f74
✨ Introduce needs-config-writer (#283)
ubmarco Nov 7, 2025
19e57a3
set version and fix command name (#294)
AlexanderLanin Nov 10, 2025
a5f3fb6
Add Nikola as code owner (#299)
AlexanderLanin Nov 11, 2025
87b43e1
Fix: allow multiple dependencies + bump version (#298)
AlexanderLanin Nov 11, 2025
60db8fe
Bump version to 2.0.2 and update score_process dependency to 1.3.1 (#…
AlexanderLanin Nov 12, 2025
3a00e3d
color change to red border for architecture elements in diagrams whic…
RolandJentschETAS Nov 12, 2025
8fe17a3
documentation for cross-referencing between modules (#302)
a-zw Nov 17, 2025
14d18a2
Do not use sphinx-collections (#306)
a-zw Nov 21, 2025
703af50
Process safety requirements (#307)
a-zw Nov 25, 2025
d77b662
Use devcontainer 1.0.0 release (#309)
opajonk Nov 27, 2025
7a80227
bump version (#311)
AlexanderLanin Nov 27, 2025
accad51
fix: draw_component with external elements (#316)
4og Dec 1, 2025
3ca45ea
Update how-to setup.md (#317)
guejan Dec 2, 2025
3d4dadd
Document requirements coverage (#308)
a-zw Dec 2, 2025
b7b082a
Adapt requirements tables in docs (#319)
a-zw Dec 2, 2025
1931ac2
Upgrade python dependencies (#310)
AlexanderLanin Dec 3, 2025
b5df7e0
fix: update doc_path to use SOURCE_DIRECTORY environment variable (#320)
AlexanderLanin Dec 3, 2025
c5e0c3f
Introduce feature, sw-module and component as sphinx-needs elements (…
PhilipPartsch Dec 4, 2025
38ecb3d
Bump version from 2.1.0 to 2.2.0 (#325)
AlexanderLanin Dec 5, 2025
80ed1b5
Do not include rst source into website to save some space (#279)
WolfgangFischerEtas Dec 10, 2025
0236364
modify description of architecture types and fix drawing (#329)
RolandJentschETAS Jan 6, 2026
a177ece
update consists_of and add belongs_to optional links in needs_types (…
PhilipPartsch Jan 6, 2026
64df598
increase release version (#334)
RolandJentschETAS Jan 8, 2026
3b2271d
fix: update type checks for component and module in UML drawing funct…
AlexanderLanin Jan 13, 2026
8bf3335
drop module version (#341)
AlexanderLanin Jan 13, 2026
7c591f4
bugfix draw function for modules (#344)
RolandJentschETAS Jan 14, 2026
86b0145
Fixing Workflow unit-test execution & Adding Test-Reports functionali…
MaximilianSoerenPollak Jan 14, 2026
2e7118b
Add TestClass parsing to XML parser (#347)
MaximilianSoerenPollak Jan 16, 2026
c546eed
Fix 'edit on github' button (#352)
MaximilianSoerenPollak Jan 20, 2026
39d78d7
fix issues which prevent latest main update (#349)
RolandJentschETAS Jan 20, 2026
84de4a4
update mod, comp_arc_sta (#350)
RolandJentschETAS Jan 21, 2026
794d642
Enabeling consumer tests to run on PR (#356)
MaximilianSoerenPollak Jan 21, 2026
4d28db0
add optional link from component to requirement (#359)
RolandJentschETAS Jan 22, 2026
015e0af
Fixing consumer test pipe (#363)
MaximilianSoerenPollak Jan 23, 2026
50b21b3
fix: cleanup to consumer tests to ensure fresh env for each run (#365)
MaximilianSoerenPollak Jan 23, 2026
0382665
improve statistics page (#364)
AlexanderLanin Jan 23, 2026
efa8280
remove comp to comp_req link, fix drawing func (#362)
RolandJentschETAS Jan 26, 2026
89dcf0f
Increase verbosity & change assert in consumer tests (#370)
MaximilianSoerenPollak Jan 27, 2026
b5023ad
Upgrade sphinx-needs to 6.3.0 (#361)
arnoox Jan 29, 2026
fe212a0
Source links as Bazel target (#358)
a-zw Jan 29, 2026
072693f
bugfix: linking of plat_saf_dfa (#374)
RolandJentschETAS Feb 2, 2026
a145da7
fix(test): consumer handle present git override (#380)
MaximilianSoerenPollak Feb 3, 2026
3be1288
cleanup meta model (#379)
RolandJentschETAS Feb 3, 2026
4b8ddcd
cicd: build docs on release (#377)
PiotrKorkus Feb 4, 2026
a6cf1d9
Disable ubproject.toml warning on diff (#381)
MaximilianSoerenPollak Feb 4, 2026
4e12400
Update Rules_Py & Consolidate internal structure (#378)
MaximilianSoerenPollak Feb 4, 2026
a1a3e15
Fix typo in source_to_doc_links.rst (#383)
Chidananda-Swamy Feb 4, 2026
5102059
chore: update dependencies (#384)
AlexanderLanin Feb 4, 2026
5629263
fix: wrong module warning in draw functions (#385)
RolandJentschETAS Feb 4, 2026
534e1ef
Add link_check action & workflow (#386)
MaximilianSoerenPollak Feb 4, 2026
d14b917
Msp fix action (#387)
MaximilianSoerenPollak Feb 5, 2026
5008ea2
Rename 'Process Requirement' to 'Tool Requirement' (#391)
Chidananda-Swamy Feb 5, 2026
88bd7ce
Add sphinx_module support (#366)
ramceb Feb 5, 2026
e6460ed
Fix wording in process overview documentation (#393)
Chidananda-Swamy Feb 6, 2026
3723042
feat: implement schema validation for Sphinx-Needs using generated sc…
arnoox Feb 6, 2026
7fbb09b
fix: update ID regex pattern to include uppercase letters - bazel run…
arnoox Feb 6, 2026
59703f5
Merge branch 'main' of https://github.com/arnoox/score-docs-as-code i…
arnoox Feb 6, 2026
de6667c
refactor: clean up print statements in schema generation process
arnoox Feb 6, 2026
60382b9
feat: refactored sn_schema for testabiblity; enhance schema validatio…
arnoox Feb 9, 2026
1a56cfe
Added unit tests for sn_schemas
arnoox Feb 9, 2026
1ab312b
feat: add integration tests for schema generation against SCORE metam…
arnoox Feb 9, 2026
e0bdf84
refactor: remove unused imports and clean up whitespace in test files
arnoox Feb 9, 2026
8174980
feat: update documentation and comments for clarity on schema generat…
arnoox Feb 9, 2026
374f4cd
feat: enhance schema validation by refining network validation for ma…
arnoox Feb 9, 2026
ad53345
refactor: simplify optional links classification and improve test ass…
arnoox Feb 9, 2026
ce37b35
refactor: improve comment formatting for clarity in schema validation…
arnoox Feb 9, 2026
d428a31
feat: add logging for existing links and warnings for missing needs i…
arnoox Feb 11, 2026
e49778e
Fix grammar and broken page links in README.md (#395)
Chidananda-Swamy Feb 11, 2026
7330a45
feat: enhance README to clarify metamodel validation in IDE with ubCo…
arnoox Feb 11, 2026
3fa5b63
Merge branch 'main' into feat/generate-sn6-schema-validation
arnoox Feb 11, 2026
6ee8e86
feat: refine regex patterns for version validation in needs_types
arnoox Feb 11, 2026
5c2c5dd
Merge branch 'feat/generate-sn6-schema-validation' of https://github.…
arnoox Feb 11, 2026
558b210
docs: uplifted version of process (#399)
dcalavrezo-qorix Feb 12, 2026
f505139
Increase Tooling version (#400)
MaximilianSoerenPollak Feb 13, 2026
5517b36
feat: enhance JSON schema generation to allow empty strings for optio…
arnoox Feb 13, 2026
04c9307
chore: Merge branch 'main' of https://github.com/eclipse-score/docs-a…
arnoox Feb 13, 2026
22f830d
style: format function parameters for better readability in schema fu…
arnoox Feb 13, 2026
9074587
Convert markdown table to reStructuredText format (#402)
Chidananda-Swamy Feb 16, 2026
15e1779
Update safety analysis process mapping section (#401)
Chidananda-Swamy Feb 16, 2026
d054d81
Merge branch 'main' into feat/generate-sn6-schema-validation
arnoox Feb 16, 2026
e33bd2f
refactor: remove unused needscfg_exclude_vars configuration
arnoox Feb 16, 2026
a38e999
Fix testlinker & increase tooling version (#403)
MaximilianSoerenPollak Feb 16, 2026
eac5d5e
feat: add schema definitions section to shared.toml
arnoox Feb 18, 2026
2cc5ee8
Cleanup (#405)
a-zw Feb 19, 2026
a42dedd
Merge branch 'main' into feat/generate-sn6-schema-validation
arnoox Feb 19, 2026
29fcd07
feat: add server configuration for index_on_save in shared.toml
Feb 20, 2026
d784f05
Merge branch 'main' of https://github.com/eclipse-score/docs-as-code …
Feb 20, 2026
e0d7efd
Merge branch 'main' into feat/generate-sn6-schema-validation
arnoox Feb 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ user.bazelrc
# docs build artifacts
/_build*
docs/ubproject.toml
docs/schemas.json

# Vale - editorial style guide
.vale.ini
Expand Down
14 changes: 7 additions & 7 deletions docs/internals/requirements/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -997,16 +997,16 @@ Testing
Docs-As-Code shall enforce that needs of type :need:`tool_req__docs_saf_types` have a
`violates` links to at least one dynamic / static diagram according to the table.


.. table::
:widths: auto

============= ===================
Link Source Allowed Link Target
Link Source Allowed Link Target
============= ===================
feat_saf_dfa feat_arc_sta
comp_saf_dfa comp_arc_sta
feat_saf_fmea feat_arc_dyn
feat_saf_dfa feat_arc_sta
comp_saf_dfa comp_arc_sta
feat_saf_fmea feat_arc_dyn
comp_saf_fmea comp_arc_dyn
============= ===================

Expand Down Expand Up @@ -1103,6 +1103,6 @@ Grouped Requirements
.. needextend:: c.this_doc() and type == 'tool_req' and not status
:status: valid

.. needextend:: "metamodel.yaml" in source_code_link
.. needextend:: source_code_link is not None and "metamodel.yaml" in source_code_link
:+satisfies: tool_req__docs_metamodel
:+tags: config
218 changes: 218 additions & 0 deletions src/extensions/score_metamodel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
# score_metamodel

Sphinx extension that enforces the S-CORE metamodel on sphinx-needs documents.

It reads `metamodel.yaml` (the single source of truth for all need types, fields,
links, and constraints) and validates every need in the documentation against
those rules.

## What it does

1. **Registers need types** with sphinx-needs (directives like `feat_req`, `comp`,
`workflow`, etc.) including their fields, links, and extra options.
2. **Generates `schemas.json`** from the metamodel so that sphinx-needs 6 can
validate needs at parse time (required fields, regex patterns, link
constraints). Because ubCode (the VS Code extension for sphinx-needs)
evaluates these schemas during editing, **metamodel violations are shown
as diagnostics directly in the IDE** -- catching errors early with
lightweight, fast rendering, without needing a full Sphinx build.
3. **Runs post-build checks** that go beyond what JSON Schema can express
(graph traversals, prohibited words, ID format rules).

## Metamodel overview

`metamodel.yaml` defines:

| Section | Purpose |
|---|---|
| `needs_types` | All need types (e.g. `feat_req`, `comp`, `document`) with their mandatory/optional fields and links |
| `needs_types_base_options` | Global optional fields applied to every type (e.g. `source_code_link`, `testlink`) |
| `needs_extra_links` | Custom link types (e.g. `satisfies`, `implements`, `mitigated_by`) |
| `prohibited_words_checks` | Forbidden words in titles/descriptions (e.g. "shall", "must") |
| `graph_checks` | Cross-need constraints (e.g. safety level decomposition rules) |

Each need type can specify:

- **`mandatory_options`** -- fields that must be present, with a regex pattern
the value must match (e.g. `status: ^(valid|invalid)$`).
- **`optional_options`** -- fields that, if present, must match a pattern.
- **`mandatory_links`** -- links that must have at least one target. The value
is either a plain type name (`stkh_req`) or a regex (`^logic_arc_int__.+$`).
- **`optional_links`** -- links that are allowed but not required.

## Validation layers

### Schema validation (sphinx-needs >6)

`sn_schemas.py` translates the metamodel into a `schemas.json` file that
sphinx-needs evaluates at parse time. Each schema entry has:

- **`select`** -- matches needs by their `type` field.
- **`validate.local`** -- JSON Schema checking the need's own properties
(required fields, regex patterns on option values, mandatory links with
`minItems: 1`). Regex patterns on **link IDs** (e.g. checking that
`includes` entries match `^logic_arc_int(_op)*__.+$`) are not yet
validated here; the schema only enforces that at least one link exists.
ID-pattern checking is still done by the Python `validate_links()` in
`check_options.py`.
- **`validate.network`** -- validates that linked needs have the expected
`type` (e.g. `satisfies` targets must be `stkh_req`). Uses the
sphinx-needs `items.local` format so each linked need is checked
individually. Only **mandatory** links are checked here; optional link
type violations are left to the Python `validate_links()` check, which
treats them as informational (`treat_as_info=True`) rather than errors.
Fields that mix regex and plain targets (e.g.
`complies: std_wp, ^std_req__aspice_40__iic.*$`) are also excluded
because the `items` schema would incorrectly require all linked needs
to match the plain type.

### Post-build S-Core metamodel checks

Checks in `checks/` run after the Sphinx build and cover rules that
JSON Schema cannot express:

| Check | File | What it validates |
|---|---|---|
| `check_options` | `check_options.py` | Mandatory/optional field presence and patterns (legacy, overlaps with schema validation) |
| `check_extra_options` | `check_options.py` | Warns about fields not defined in the metamodel |
| `check_id_format` | `attributes_format.py` | ID structure (`<type>__<abbrev>__<element>`, part count) |
| `check_for_prohibited_words` | `attributes_format.py` | Forbidden words in titles |
| `check_metamodel_graph` | `graph_checks.py` | Cross-need constraints (e.g. ASIL_B needs must link to non-QM requirements) |
| `check_id_contains_feature` | `id_contains_feature.py` | Need IDs must contain the feature abbreviation from the file path |
| `check_standards` | `standards.py` | Standard compliance link validation |

### Coverage comparison

Schema column: **yes** = implemented, **feasible** = could be added, **--** = not possible.

| Rule | Schema (`sn_schemas.py` + sphinx-needs) | S-Core metamodel (`checks/`) | Notes |
|---|:---:|:---:|---|
| ID required | yes | -- | `needs_id_required` (sphinx-needs built-in) |
| ID basic regex | yes | -- | `needs_id_regex` (sphinx-needs built-in) |
| Dead link detection | yes | -- | `allow_dead_links` (sphinx-needs built-in) |
| Mandatory field presence | yes | yes | Both enforce `required` |
| Mandatory field regex | yes | yes | Same pattern from metamodel |
| Optional field regex | yes | yes | Schema: only if field present |
| Mandatory link presence | yes | yes | Schema: `minItems: 1` in local |
| Mandatory link target type | yes | yes | Schema: `validate.network` |
| Mandatory link ID regex | feasible | yes | Can add `items.pattern` in local; TODO in code |
| Optional link target type | feasible | yes (info) | Split into separate schema with `severity: "info"` |
| Optional link ID regex | feasible | yes (info) | Same split-severity approach |
| Mixed regex+plain link type | -- | yes | `ValidateSchemaType` has no `anyOf`/`oneOf` |
| ID structure (parts count) | feasible | yes | Per-type pattern from `parts` field; cannot check file-path part |
| Prohibited words | feasible | yes | Negative lookahead regex on `title`; less precise than Python |
| Graph constraints | -- | yes | Cross-need traversals beyond JSON Schema |
| Undefined extra options | -- | yes | `unevaluatedProperties` would reject sphinx-needs internal fields |

#### Rule explanations

**ID required** --
Every need directive must have a manually set ID (e.g. `.. feat_req:: feat_req__my_feature__001`).
Enforced by sphinx-needs' `needs_id_required = True` in `__init__.py`.

**ID basic regex** --
The ID must match `^[A-Za-z0-9_-]{6,}` (at least 6 alphanumeric/underscore/hyphen characters).
Enforced by sphinx-needs' `needs_id_regex` in `__init__.py`. The build stops if a need
has an invalid ID.

**Dead link detection** --
A link like `satisfies: nonexistent_need_id` that points to a need that does not exist
triggers a sphinx-needs warning. Controlled per link type via `allow_dead_links` in
`needs_extra_links`.

**Mandatory field presence** --
A `feat_req` must have a `status` field. If it is missing, both the schema
(`"required": ["status"]`) and the Python check flag it.

**Mandatory field regex** --
The `status` field on `feat_req` must match `^(valid|invalid)$`. Both the schema
(`"pattern": "^(valid|invalid)$"`) and the Python check validate this. Writing
`status: approved` is rejected.

**Optional field regex** --
`document` has `optional_options: { author: ^.*$ }`. If `author` is present, it must
match the pattern. If absent, no error. The schema includes it in `properties` but
not in `required`.

**Mandatory link presence** --
`feat_req` has `mandatory_links: { satisfies: stkh_req }`. At least one target must
be provided. The schema enforces this with `"satisfies": {"type": "array", "minItems": 1}`
in `validate.local`.

**Mandatory link target type** --
`feat_req.satisfies` must point to a need of type `stkh_req`. The schema enforces
this with `validate.network`: each linked need is checked for
`{"type": {"const": "stkh_req"}}`. If a `feat_req` links to a `comp` via `satisfies`,
the schema rejects it.

**Mandatory link ID regex** (feasible) --
`feat` has `mandatory_links: { includes: ^logic_arc_int(_op)*__.+$ }`. The link
target IDs (strings like `logic_arc_int__something`) must match this regex.
Currently the schema only enforces that at least one link exists (`minItems: 1`),
not the ID pattern. *Feasible*: add `"items": {"pattern": "^logic_arc_int(_op)*__.+$"}`
to the local schema. There is a TODO in the code for this.

**Optional link target type** (feasible) --
`tool_req` has `optional_links: { satisfies: gd_req, stkh_req }`. If provided, targets
should be `gd_req` or `stkh_req`. The Python check validates this but treats violations
as informational (non-fatal). The schema currently skips this because all schema entries
use `severity: "violation"` and there is no way to set a different severity for one
rule within the same schema entry. *Feasible*: create a second schema entry for the
same need type with `severity: "info"` that only checks optional link targets.

**Optional link ID regex** (feasible) --
Same as above, but for regex-based link IDs on optional links (e.g.
`optional_links: { links: ^.*$ }` on `tsf`). Same severity-split approach would work.

**Mixed regex+plain link type** (not possible) --
`workproduct` has `optional_links: { complies: std_wp, ^std_req__aspice_40__iic.*$ }`.
A `complies` target is valid if it is either a need of type `std_wp` OR has an ID
matching the regex. The `validate.network` `items` schema applies to ALL linked needs
identically, so it cannot express "match type X *or* match regex Y".
sphinx-needs' `ValidateSchemaType` does not support `anyOf`/`oneOf`.
These mixed fields are validated only by the Python check.

**ID structure (parts count)** (feasible) --
`feat_req` has `parts: 3`, meaning its ID must have 3 segments separated by `__`
(e.g. `feat_req__my_feature__001`). The Python check (`check_id_format`) splits on
`__` and counts parts. *Feasible*: generate a per-type regex like
`^feat_req__[^_]+(__[^_]+){1}$` in the schema. However, the Python check also
validates that the ID contains the feature abbreviation from the file path
(`check_id_contains_feature`), which depends on runtime context and cannot be
expressed in a schema.

**Prohibited words** (feasible) --
The metamodel forbids words like "shall", "must", "will" in need titles (for
requirement types). The Python check splits the title into words and checks each one.
*Feasible*: add a negative lookahead regex on the `title` field, e.g.
`^(?!.*\b(shall|must|will)\b).*$`. This is less precise than the Python check
(which normalizes case, strips punctuation) but catches most violations.

**Graph constraints** (not possible) --
`graph_checks` in the metamodel define rules like "an ASIL_B need must link to at
least one non-QM requirement via `satisfies`". This requires traversing the need
graph across multiple levels, which is fundamentally beyond what JSON Schema can
express. Only the Python check (`check_metamodel_graph`) can do this.

**Undefined extra options** (not possible) --
The Python check (`check_extra_options`) warns when a need has fields not defined
in the metamodel (e.g. a typo like `saftey` instead of `safety`). In theory,
`unevaluatedProperties: false` could reject unknown fields. In practice, sphinx-needs
adds many internal fields to needs (e.g. `docname`, `lineno`, `is_external`, computed
fields from dynamic functions) that are not in the metamodel. Enabling this would
cause false positives on every need.

## File layout

```
score_metamodel/
__init__.py # Sphinx extension entry point (setup, check orchestration)
metamodel.yaml # The S-CORE metamodel definition
metamodel_types.py # Type definitions (ScoreNeedType, etc.)
yaml_parser.py # Parses metamodel.yaml into MetaModelData
sn_schemas.py # Generates schemas.json for sphinx-needs 6
log.py # CheckLogger for structured warning output
external_needs.py # External needs integration
checks/ # Post-build validation checks
tests/ # Unit and integration tests
```
27 changes: 26 additions & 1 deletion src/extensions/score_metamodel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import pkgutil
from collections.abc import Callable
from pathlib import Path
from typing import Any

from sphinx.application import Sphinx
from sphinx_needs import logging
Expand All @@ -31,6 +32,7 @@
from src.extensions.score_metamodel.metamodel_types import (
ScoreNeedType as ScoreNeedType,
)
from src.extensions.score_metamodel.sn_schemas import write_sn_schemas
from src.extensions.score_metamodel.yaml_parser import (
default_options as default_options,
)
Expand Down Expand Up @@ -237,10 +239,28 @@ def setup(app: Sphinx) -> dict[str, str | bool]:
# load metamodel.yaml via ruamel.yaml
metamodel = load_metamodel_data()

# Sphinx-Needs 6 requires extra options as dicts: {"name": ..., "schema": ...}
# Options WITH a schema get JSON schema validation (value must be a string).
# Options WITHOUT a schema are registered but not validated.
# non_schema_options = {"source_code_link", "testlink", "codelink"}
non_schema_options = {} # currently empty → all options get schema validation
extra_options_schema: list[dict[str, Any]] = [
{"name": opt, "schema": {"type": "string"}}
for opt in metamodel.needs_extra_options
if opt not in non_schema_options
]
extra_options_wo_schema: list[dict[str, Any]] = [
{"name": opt}
for opt in metamodel.needs_extra_options
if opt in non_schema_options
]
# extra_options = [{"name": opt} for opt in metamodel.needs_extra_options]
extra_options = extra_options_schema + extra_options_wo_schema

# Assign everything to Sphinx config
app.config.needs_types = metamodel.needs_types
app.config.needs_extra_links = metamodel.needs_extra_links
app.config.needs_extra_options = metamodel.needs_extra_options
app.config.needs_extra_options = extra_options
app.config.graph_checks = metamodel.needs_graph_check
app.config.prohibited_words_checks = metamodel.prohibited_words_checks

Expand All @@ -251,6 +271,11 @@ def setup(app: Sphinx) -> dict[str, str | bool]:
app.config.needs_reproducible_json = True
app.config.needs_json_remove_defaults = True

# Generate schemas.json from the metamodel and register it with sphinx-needs.
# This enables sphinx-needs 6 schema validation: required fields, regex
# patterns on option values, and (eventually) link target type checks.
write_sn_schemas(app, metamodel)

# sphinx-collections runs on default prio 500.
# We need to populate the sphinx-collections config before that happens.
# --> 499
Expand Down
6 changes: 6 additions & 0 deletions src/extensions/score_metamodel/metamodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,12 @@ needs_extra_links:
partially_verifies:
incoming: partially_verified_by
outgoing: partially_verifies

# Decision Records
affects:
incoming: affected by
outgoing: affects

##############################################################
# Graph Checks
# The graph checks focus on the relation of the needs and their attributes.
Expand Down
Loading
Loading