archi-cli 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.
- archi_cli-0.1.0/.gitignore +15 -0
- archi_cli-0.1.0/LICENSE +190 -0
- archi_cli-0.1.0/NOTICE +15 -0
- archi_cli-0.1.0/PKG-INFO +214 -0
- archi_cli-0.1.0/README.md +192 -0
- archi_cli-0.1.0/pyproject.toml +49 -0
- archi_cli-0.1.0/tools/archi_tool/__init__.py +1 -0
- archi_cli-0.1.0/tools/archi_tool/cli.py +528 -0
- archi_cli-0.1.0/tools/archi_tool/discovery.py +137 -0
- archi_cli-0.1.0/tools/archi_tool/engine.py +266 -0
- archi_cli-0.1.0/tools/archi_tool/model.py +280 -0
- archi_cli-0.1.0/tools/archi_tool/normalize.py +91 -0
- archi_cli-0.1.0/tools/archi_tool/render.py +207 -0
- archi_cli-0.1.0/tools/archi_tool/render_html.py +645 -0
- archi_cli-0.1.0/tools/archi_tool/render_slides.py +650 -0
- archi_cli-0.1.0/tools/archi_tool/validate.py +150 -0
- archi_cli-0.1.0/tools/archi_tool/views.py +215 -0
- archi_cli-0.1.0/views/README.md +10 -0
archi_cli-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
EUROPEAN UNION PUBLIC LICENCE v. 1.2
|
|
2
|
+
EUPL © the European Union 2007, 2016
|
|
3
|
+
|
|
4
|
+
This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined below) which is provided under the
|
|
5
|
+
terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such
|
|
6
|
+
use is covered by a right of the copyright holder of the Work).
|
|
7
|
+
The Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following
|
|
8
|
+
notice immediately following the copyright notice for the Work:
|
|
9
|
+
Licensed under the EUPL
|
|
10
|
+
or has expressed by any other means his willingness to license under the EUPL.
|
|
11
|
+
|
|
12
|
+
1.Definitions
|
|
13
|
+
In this Licence, the following terms have the following meaning:
|
|
14
|
+
— ‘The Licence’:this Licence.
|
|
15
|
+
— ‘The Original Work’:the work or software distributed or communicated by the Licensor under this Licence, available
|
|
16
|
+
as Source Code and also as Executable Code as the case may be.
|
|
17
|
+
— ‘Derivative Works’:the works or software that could be created by the Licensee, based upon the Original Work or
|
|
18
|
+
modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work
|
|
19
|
+
required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in
|
|
20
|
+
the country mentioned in Article 15.
|
|
21
|
+
— ‘The Work’:the Original Work or its Derivative Works.
|
|
22
|
+
— ‘The Source Code’:the human-readable form of the Work which is the most convenient for people to study and
|
|
23
|
+
modify.
|
|
24
|
+
— ‘The Executable Code’:any code which has generally been compiled and which is meant to be interpreted by
|
|
25
|
+
a computer as a program.
|
|
26
|
+
— ‘The Licensor’:the natural or legal person that distributes or communicates the Work under the Licence.
|
|
27
|
+
— ‘Contributor(s)’:any natural or legal person who modifies the Work under the Licence, or otherwise contributes to
|
|
28
|
+
the creation of a Derivative Work.
|
|
29
|
+
— ‘The Licensee’ or ‘You’:any natural or legal person who makes any usage of the Work under the terms of the
|
|
30
|
+
Licence.
|
|
31
|
+
— ‘Distribution’ or ‘Communication’:any act of selling, giving, lending, renting, distributing, communicating,
|
|
32
|
+
transmitting, or otherwise making available, online or offline, copies of the Work or providing access to its essential
|
|
33
|
+
functionalities at the disposal of any other natural or legal person.
|
|
34
|
+
|
|
35
|
+
2.Scope of the rights granted by the Licence
|
|
36
|
+
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable licence to do the following, for
|
|
37
|
+
the duration of copyright vested in the Original Work:
|
|
38
|
+
— use the Work in any circumstance and for all usage,
|
|
39
|
+
— reproduce the Work,
|
|
40
|
+
— modify the Work, and make Derivative Works based upon the Work,
|
|
41
|
+
— communicate to the public, including the right to make available or display the Work or copies thereof to the public
|
|
42
|
+
and perform publicly, as the case may be, the Work,
|
|
43
|
+
— distribute the Work or copies thereof,
|
|
44
|
+
— lend and rent the Work or copies thereof,
|
|
45
|
+
— sublicense rights in the Work or copies thereof.
|
|
46
|
+
Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the
|
|
47
|
+
applicable law permits so.
|
|
48
|
+
In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed
|
|
49
|
+
by law in order to make effective the licence of the economic rights here above listed.
|
|
50
|
+
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to any patents held by the Licensor, to the
|
|
51
|
+
extent necessary to make use of the rights granted on the Work under this Licence.
|
|
52
|
+
|
|
53
|
+
3.Communication of the Source Code
|
|
54
|
+
The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as
|
|
55
|
+
Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with
|
|
56
|
+
each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to
|
|
57
|
+
the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to
|
|
58
|
+
distribute or communicate the Work.
|
|
59
|
+
|
|
60
|
+
4.Limitations on copyright
|
|
61
|
+
Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the
|
|
62
|
+
exclusive rights of the rights owners in the Work, of the exhaustion of those rights or of other applicable limitations
|
|
63
|
+
thereto.
|
|
64
|
+
|
|
65
|
+
5.Obligations of the Licensee
|
|
66
|
+
The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those
|
|
67
|
+
obligations are the following:
|
|
68
|
+
|
|
69
|
+
Attribution right: The Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to
|
|
70
|
+
the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the
|
|
71
|
+
Licence with every copy of the Work he/she distributes or communicates. The Licensee must cause any Derivative Work
|
|
72
|
+
to carry prominent notices stating that the Work has been modified and the date of modification.
|
|
73
|
+
|
|
74
|
+
Copyleft clause: If the Licensee distributes or communicates copies of the Original Works or Derivative Works, this
|
|
75
|
+
Distribution or Communication will be done under the terms of this Licence or of a later version of this Licence unless
|
|
76
|
+
the Original Work is expressly distributed only under this version of the Licence — for example by communicating
|
|
77
|
+
‘EUPL v. 1.2 only’. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the
|
|
78
|
+
Work or Derivative Work that alter or restrict the terms of the Licence.
|
|
79
|
+
|
|
80
|
+
Compatibility clause: If the Licensee Distributes or Communicates Derivative Works or copies thereof based upon both
|
|
81
|
+
the Work and another work licensed under a Compatible Licence, this Distribution or Communication can be done
|
|
82
|
+
under the terms of this Compatible Licence. For the sake of this clause, ‘Compatible Licence’ refers to the licences listed
|
|
83
|
+
in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with
|
|
84
|
+
his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail.
|
|
85
|
+
|
|
86
|
+
Provision of Source Code: When distributing or communicating copies of the Work, the Licensee will provide
|
|
87
|
+
a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available
|
|
88
|
+
for as long as the Licensee continues to distribute or communicate the Work.
|
|
89
|
+
Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names
|
|
90
|
+
of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and
|
|
91
|
+
reproducing the content of the copyright notice.
|
|
92
|
+
|
|
93
|
+
6.Chain of Authorship
|
|
94
|
+
The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or
|
|
95
|
+
licensed to him/her and that he/she has the power and authority to grant the Licence.
|
|
96
|
+
Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or
|
|
97
|
+
licensed to him/her and that he/she has the power and authority to grant the Licence.
|
|
98
|
+
Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions
|
|
99
|
+
to the Work, under the terms of this Licence.
|
|
100
|
+
|
|
101
|
+
7.Disclaimer of Warranty
|
|
102
|
+
The Work is a work in progress, which is continuously improved by numerous Contributors. It is not a finished work
|
|
103
|
+
and may therefore contain defects or ‘bugs’ inherent to this type of development.
|
|
104
|
+
For the above reason, the Work is provided under the Licence on an ‘as is’ basis and without warranties of any kind
|
|
105
|
+
concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or
|
|
106
|
+
errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this
|
|
107
|
+
Licence.
|
|
108
|
+
This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work.
|
|
109
|
+
|
|
110
|
+
8.Disclaimer of Liability
|
|
111
|
+
Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be
|
|
112
|
+
liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the
|
|
113
|
+
Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss
|
|
114
|
+
of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However,
|
|
115
|
+
the Licensor will be liable under statutory product liability laws as far such laws apply to the Work.
|
|
116
|
+
|
|
117
|
+
9.Additional agreements
|
|
118
|
+
While distributing the Work, You may choose to conclude an additional agreement, defining obligations or services
|
|
119
|
+
consistent with this Licence. However, if accepting obligations, You may act only on your own behalf and on your sole
|
|
120
|
+
responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify,
|
|
121
|
+
defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by
|
|
122
|
+
the fact You have accepted any warranty or additional liability.
|
|
123
|
+
|
|
124
|
+
10.Acceptance of the Licence
|
|
125
|
+
The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ placed under the bottom of a window
|
|
126
|
+
displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of
|
|
127
|
+
applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms
|
|
128
|
+
and conditions.
|
|
129
|
+
Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You
|
|
130
|
+
by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution
|
|
131
|
+
or Communication by You of the Work or copies thereof.
|
|
132
|
+
|
|
133
|
+
11.Information to the public
|
|
134
|
+
In case of any Distribution or Communication of the Work by means of electronic communication by You (for example,
|
|
135
|
+
by offering to download the Work from a remote location) the distribution channel or media (for example, a website)
|
|
136
|
+
must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence
|
|
137
|
+
and the way it may be accessible, concluded, stored and reproduced by the Licensee.
|
|
138
|
+
|
|
139
|
+
12.Termination of the Licence
|
|
140
|
+
The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms
|
|
141
|
+
of the Licence.
|
|
142
|
+
Such a termination will not terminate the licences of any person who has received the Work from the Licensee under
|
|
143
|
+
the Licence, provided such persons remain in full compliance with the Licence.
|
|
144
|
+
|
|
145
|
+
13.Miscellaneous
|
|
146
|
+
Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the
|
|
147
|
+
Work.
|
|
148
|
+
If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or
|
|
149
|
+
enforceability of the Licence as a whole. Such provision will be construed or reformed so as necessary to make it valid
|
|
150
|
+
and enforceable.
|
|
151
|
+
The European Commission may publish other linguistic versions or new versions of this Licence or updated versions of
|
|
152
|
+
the Appendix, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence.
|
|
153
|
+
New versions of the Licence will be published with a unique version number.
|
|
154
|
+
All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take
|
|
155
|
+
advantage of the linguistic version of their choice.
|
|
156
|
+
|
|
157
|
+
14.Jurisdiction
|
|
158
|
+
Without prejudice to specific agreement between parties,
|
|
159
|
+
— any litigation resulting from the interpretation of this License, arising between the European Union institutions,
|
|
160
|
+
bodies, offices or agencies, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice
|
|
161
|
+
of the European Union, as laid down in article 272 of the Treaty on the Functioning of the European Union,
|
|
162
|
+
— any litigation arising between other parties and resulting from the interpretation of this License, will be subject to
|
|
163
|
+
the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business.
|
|
164
|
+
|
|
165
|
+
15.Applicable Law
|
|
166
|
+
Without prejudice to specific agreement between parties,
|
|
167
|
+
— this Licence shall be governed by the law of the European Union Member State where the Licensor has his seat,
|
|
168
|
+
resides or has his registered office,
|
|
169
|
+
— this licence shall be governed by Belgian law if the Licensor has no seat, residence or registered office inside
|
|
170
|
+
a European Union Member State.
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
Appendix
|
|
174
|
+
|
|
175
|
+
‘Compatible Licences’ according to Article 5 EUPL are:
|
|
176
|
+
— GNU General Public License (GPL) v. 2, v. 3
|
|
177
|
+
— GNU Affero General Public License (AGPL) v. 3
|
|
178
|
+
— Open Software License (OSL) v. 2.1, v. 3.0
|
|
179
|
+
— Eclipse Public License (EPL) v. 1.0
|
|
180
|
+
— CeCILL v. 2.0, v. 2.1
|
|
181
|
+
— Mozilla Public Licence (MPL) v. 2
|
|
182
|
+
— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
|
|
183
|
+
— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for works other than software
|
|
184
|
+
— European Union Public Licence (EUPL) v. 1.1, v. 1.2
|
|
185
|
+
— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity (LiLiQ-R+).
|
|
186
|
+
|
|
187
|
+
The European Commission may update this Appendix to later versions of the above licences without producing
|
|
188
|
+
a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the
|
|
189
|
+
covered Source Code from exclusive appropriation.
|
|
190
|
+
All other changes or additions to this Appendix require the production of a new EUPL version.
|
archi_cli-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
archi-cli
|
|
2
|
+
Copyright (c) 2026 Bureau Architectuur Digitale Overheid
|
|
3
|
+
Licensed under the EUPL-1.2 (see LICENSE).
|
|
4
|
+
|
|
5
|
+
This tool downloads and drives the Archi engine for its `normalize` command.
|
|
6
|
+
Archi is a separate work and is not distributed as part of this package; it is
|
|
7
|
+
fetched at runtime from the official release on first use.
|
|
8
|
+
|
|
9
|
+
Archi — ArchiMate modelling tool
|
|
10
|
+
Copyright (c) Phillip Beauvoir, Jean-Baptiste Sarrodie and contributors
|
|
11
|
+
Licensed under the MIT License
|
|
12
|
+
https://github.com/archimatetool/archi
|
|
13
|
+
|
|
14
|
+
The Archi distribution bundles an OpenJDK runtime; its own licensing applies to
|
|
15
|
+
that runtime.
|
archi_cli-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: archi-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ar·cli·mate — de CLI in je ArchiMate: deterministisch native .archimate-modellen inspecteren, muteren, valideren en renderen
|
|
5
|
+
Project-URL: Homepage, https://github.com/BureauArchitectuurDigitaleOverheid/ai-assisted-architecting
|
|
6
|
+
Project-URL: Repository, https://github.com/BureauArchitectuurDigitaleOverheid/ai-assisted-architecting
|
|
7
|
+
Project-URL: Issues, https://github.com/BureauArchitectuurDigitaleOverheid/ai-assisted-architecting/issues
|
|
8
|
+
Author: Bureau Architectuur Digitale Overheid
|
|
9
|
+
License-Expression: EUPL-1.2
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: archi,archimate,cli,enterprise-architecture,modeling
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Requires-Dist: lxml>=5.0
|
|
20
|
+
Requires-Dist: typer>=0.26
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# AI-assisted architecting
|
|
24
|
+
|
|
25
|
+
[](https://github.com/BureauArchitectuurDigitaleOverheid/ai-assisted-architecting/actions/workflows/ci.yml)
|
|
26
|
+
[](LICENSE)
|
|
27
|
+
|
|
28
|
+
Experiment van Bureau Architectuur Digitale Overheid: een ArchiMate-model in
|
|
29
|
+
het native Archi-formaat als bron van waarheid, bijgehouden met AI-assistentie
|
|
30
|
+
en deterministische tooling. Het modelbestand opent direct in Archi, zonder
|
|
31
|
+
import-stap, en de views zijn op GitHub zelf te bekijken.
|
|
32
|
+
|
|
33
|
+
## De `archi`-CLI los gebruiken
|
|
34
|
+
|
|
35
|
+
De tooling is ook een zelfstandig pakket, `archi-cli` (*ar·cli·mate*: de CLI in
|
|
36
|
+
je ArchiMate). Je installeert het commando `archi` los van deze repo:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uv tool install archi-cli
|
|
40
|
+
archi --help
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`archi` werkt op elk `.archimate`-model: geef `--model <pad>` op, of leg het
|
|
44
|
+
model vast in een `archi.toml` (`[tool.archi] model = "..."`), of draai in een
|
|
45
|
+
map met precies één `.archimate`-bestand. Voor `normalize` heb je de Archi-
|
|
46
|
+
engine nodig; die haalt `archi` bij het eerste gebruik zelf op (of expliciet
|
|
47
|
+
met `archi setup`). De rest van dit document beschrijft het werken in deze repo.
|
|
48
|
+
|
|
49
|
+
## Het idee
|
|
50
|
+
|
|
51
|
+
`models/ado.archimate` is de bron. Er zijn twee gelijkwaardige manieren om
|
|
52
|
+
eraan te werken: via de `archi`-CLI (meestal aangestuurd door een AI-sessie
|
|
53
|
+
zoals Claude Code) of gewoon in de Archi-GUI. Beide routes komen samen in
|
|
54
|
+
dezelfde controles:
|
|
55
|
+
|
|
56
|
+
- `just validate` controleert de integriteit: unieke ids, kloppende
|
|
57
|
+
verwijzingen van relaties en view-objecten, juiste folder-plaatsing, en
|
|
58
|
+
property-keys tegen de conventielijst.
|
|
59
|
+
- `just normalize` laat headless Archi het bestand opnieuw serialiseren.
|
|
60
|
+
Archi is daarmee de canonieke serializer, dus diffs blijven klein en
|
|
61
|
+
reviewbaar, wie of wat er ook geschreven heeft.
|
|
62
|
+
- `just render` genereert uit elke view in het model een Mermaid-diagram
|
|
63
|
+
(rendert op GitHub, in `views/`) en een NLDD-gestileerde HTML-pagina die de
|
|
64
|
+
layout uit het model pixelgetrouw volgt (`views/html/`), inclusief de
|
|
65
|
+
ArchiMate-notatie-iconen per elementtype, notes, groups en bendpoints.
|
|
66
|
+
Daarnaast rendert het uit elke deckdefinitie in `decks/` een presentatie
|
|
67
|
+
(`views/html/slides/`): een lineair verhaal als zelfstandige HTML-slides
|
|
68
|
+
in Rijkshuisstijl, met views uit het model als diagrammen, afgewisseld
|
|
69
|
+
met tekst- en bulletslides.
|
|
70
|
+
|
|
71
|
+
Pre-commit hooks dwingen validatie en verse renders af bij elke commit die
|
|
72
|
+
het model raakt. De afweging achter deze opzet, inclusief wat we inleveren
|
|
73
|
+
ten opzichte van de JSON-aanpak in het zusterexperiment, staat in
|
|
74
|
+
`adr/0001-archimate-als-bron.md`; het besluit om gegenereerde renders wel te
|
|
75
|
+
committen staat in `adr/0002-views-als-mermaid-in-git.md`, dat voor de
|
|
76
|
+
slidedecks in `adr/0003-slidedecks-als-toml-in-git.md`.
|
|
77
|
+
|
|
78
|
+
## Structuur
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
models/ado.archimate Het model, de bron van waarheid
|
|
82
|
+
decks/ Deckdefinities voor presentaties (TOML)
|
|
83
|
+
views/ Gerenderde views als Mermaid (.md, rendert op GitHub)
|
|
84
|
+
views/html/ Dezelfde views als NLDD-HTML, lokaal te bekijken
|
|
85
|
+
views/html/slides/ Gerenderde slidedecks (één HTML per deck)
|
|
86
|
+
docs/conventies.md Types, property-keys en naamgeving
|
|
87
|
+
docs/spelregels.md Rollen, workflow en de een-schrijver-afspraak
|
|
88
|
+
adr/ Architectuurbeslissingen
|
|
89
|
+
tools/archi_tool/ De archi-CLI (Python, lxml; beheerd met uv)
|
|
90
|
+
tests/ pytest-suite met een klein fixture-model
|
|
91
|
+
.claude/skills/ Procedures voor AI-sessies (archi-model, archi-view, archi-slides)
|
|
92
|
+
justfile Vaste taken
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Aan de slag
|
|
96
|
+
|
|
97
|
+
Nodig: [uv](https://docs.astral.sh/uv/), [just](https://just.systems/) en
|
|
98
|
+
[Archi](https://www.archimatetool.com/) voor normalisatie.
|
|
99
|
+
|
|
100
|
+
macOS:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
brew install uv just
|
|
104
|
+
brew install --cask archi
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Windows (PowerShell):
|
|
108
|
+
|
|
109
|
+
```powershell
|
|
110
|
+
winget install --id astral-sh.uv -e
|
|
111
|
+
winget install --id Casey.Just -e
|
|
112
|
+
winget install --id Archi.Archi -e
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Linux: uv via `curl -LsSf https://astral.sh/uv/install.sh | sh`, just via je
|
|
116
|
+
packagemanager, Archi als tgz van
|
|
117
|
+
[archimatetool.com/download](https://www.archimatetool.com/download/).
|
|
118
|
+
|
|
119
|
+
Archi wordt automatisch gevonden op `/Applications/Archi.app` (macOS),
|
|
120
|
+
`C:\Program Files\Archi\Archi.exe` (Windows) en `/opt/Archi/Archi` (Linux);
|
|
121
|
+
een ander pad geef je op via de env var `ARCHI_APP`. Python en pre-commit
|
|
122
|
+
hoef je niet zelf te installeren: uv regelt de Python-versie en pre-commit
|
|
123
|
+
is een dev-dependency.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
just setup # eenmalig per clone: venv, dependencies en pre-commit hooks
|
|
127
|
+
just stats # wat zit erin
|
|
128
|
+
just open # model openen in Archi
|
|
129
|
+
just serve # gerenderde HTML-views op http://localhost:8766
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Sla `just setup` niet over: zonder de pre-commit hooks kun je committen
|
|
133
|
+
zonder validatie en met verouderde renders.
|
|
134
|
+
|
|
135
|
+
Alle vaste taken:
|
|
136
|
+
|
|
137
|
+
| Commando | Wat het doet |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `just setup` | venv, dependencies en pre-commit hooks installeren |
|
|
140
|
+
| `just validate` | integriteitschecks (draait ook als pre-commit hook) |
|
|
141
|
+
| `just render` | views en decks renderen naar `views/` en `views/html/` (ook hook) |
|
|
142
|
+
| `just normalize` | canonieke serialisatie via headless Archi, duurt zo'n 15 s |
|
|
143
|
+
| `just stats` | telling per elementtype, relaties en views |
|
|
144
|
+
| `just tree` | folderstructuur van het model met inhoud |
|
|
145
|
+
| `just list *args` | elementen tonen, bv. `just list --type Capability` |
|
|
146
|
+
| `just show *args` | één element met properties en relaties, bv. `just show "Gegevensuitwisseling"` |
|
|
147
|
+
| `just test` | pytest-suite |
|
|
148
|
+
| `just open` | model openen in Archi |
|
|
149
|
+
| `just serve` | HTML-views serveren op http://localhost:8766 |
|
|
150
|
+
|
|
151
|
+
Wijzigen doe je met de CLI. Die valideert het model na elke mutatie en
|
|
152
|
+
weigert op te slaan zolang er fouten zijn. Elementen zijn aanspreekbaar op id
|
|
153
|
+
of op naam, zolang die uniek is:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
uv run archi list --type Capability --property "Capability-niveau=gebied"
|
|
157
|
+
uv run archi show "Gegevensuitwisseling"
|
|
158
|
+
uv run archi tree
|
|
159
|
+
uv run archi add-element --type Capability --name "..." \
|
|
160
|
+
--property "Capability-niveau=bouwblok" --property "Omschrijving=..."
|
|
161
|
+
uv run archi add-relation --type Aggregation \
|
|
162
|
+
--source "Gegevensuitwisseling" --target "..." --name "bevat"
|
|
163
|
+
uv run archi set-property "Gegevensuitwisseling" "Omschrijving=..."
|
|
164
|
+
uv run archi rename "Oude naam" "Nieuwe naam"
|
|
165
|
+
uv run archi set-documentation "Gegevensuitwisseling" "..."
|
|
166
|
+
uv run archi remove "Gegevensuitwisseling" --cascade
|
|
167
|
+
uv run archi add-view --name "..." --layout cluster \
|
|
168
|
+
--type Capability --relation Aggregation
|
|
169
|
+
uv run archi add-view --name "... in detail" --layout cluster \
|
|
170
|
+
--root "Gegevensuitwisseling" --related
|
|
171
|
+
uv run archi add-view --name "Losse selectie" --layout grid \
|
|
172
|
+
--element "Gegevensuitwisseling" --element "Kunstmatige Intelligentie"
|
|
173
|
+
uv run archi slides --deck decks/ado.toml
|
|
174
|
+
uv run archi set-model-name "..."
|
|
175
|
+
uv run archi --help
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Elk commando heeft nog wat minder gebruikte vlaggen: `add-element --folder`
|
|
179
|
+
overschrijft de folder-plaatsing (default volgt uit het type), `add-view
|
|
180
|
+
--element` voegt losse elementen aan een selectie toe (zie hierboven), en
|
|
181
|
+
`slides` accepteert `--deck`, `--decks` en `--out` om gericht te renderen. De
|
|
182
|
+
volledige set toont `uv run archi <commando> --help`.
|
|
183
|
+
|
|
184
|
+
## Werkwijze
|
|
185
|
+
|
|
186
|
+
Branch afsplitsen, wijzigen, `just validate`, `just normalize`, committen en
|
|
187
|
+
een PR openen. De pre-commit hook rendert de views mee; verandert er iets in
|
|
188
|
+
`views/`, dan faalt de commit een keer en stage je de verse renders erbij.
|
|
189
|
+
CI draait dezelfde checks (validatie, actuele renders, tests) op Ubuntu en
|
|
190
|
+
Windows, dus een omzeilde hook strandt alsnog op de PR. De
|
|
191
|
+
architect-eigenaar reviewt en merget.
|
|
192
|
+
|
|
193
|
+
De belangrijkste afspraak: een schrijver tegelijk op het modelbestand. Een
|
|
194
|
+
enkel XML-bestand merget slecht, dus parallelle branches met modelwijzigingen
|
|
195
|
+
zijn er niet. Tooling- en documentatie-PR's kunnen wel naast elkaar lopen.
|
|
196
|
+
Details en rollen staan in `docs/spelregels.md`; de modelconventies (welke
|
|
197
|
+
types, welke property-keys, Nederlandse naamgeving) in `docs/conventies.md`.
|
|
198
|
+
|
|
199
|
+
Werk je met Claude Code, dan wordt `CLAUDE.md` automatisch geladen en
|
|
200
|
+
triggeren de skills `archi-model` (modelwijzigingen doorvoeren), `archi-view`
|
|
201
|
+
(views genereren) en `archi-slides` (presentaties maken) zodra je erom
|
|
202
|
+
vraagt.
|
|
203
|
+
|
|
204
|
+
## Herkomst
|
|
205
|
+
|
|
206
|
+
Het seedmodel is de export van het ADO-niveau-1-model uit
|
|
207
|
+
[`ADO-architectuurmodel-experiment`](https://github.com/BureauArchitectuurDigitaleOverheid/ADO-architectuurmodel-experiment),
|
|
208
|
+
waar JSON de bron is en ArchiMate een exportformaat. Dit repo draait die
|
|
209
|
+
verhouding om: het Archi-bestand is de bron, en al het andere wordt eruit
|
|
210
|
+
gegenereerd.
|
|
211
|
+
|
|
212
|
+
## Licentie
|
|
213
|
+
|
|
214
|
+
[EUPL-1.2](LICENSE).
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# AI-assisted architecting
|
|
2
|
+
|
|
3
|
+
[](https://github.com/BureauArchitectuurDigitaleOverheid/ai-assisted-architecting/actions/workflows/ci.yml)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
Experiment van Bureau Architectuur Digitale Overheid: een ArchiMate-model in
|
|
7
|
+
het native Archi-formaat als bron van waarheid, bijgehouden met AI-assistentie
|
|
8
|
+
en deterministische tooling. Het modelbestand opent direct in Archi, zonder
|
|
9
|
+
import-stap, en de views zijn op GitHub zelf te bekijken.
|
|
10
|
+
|
|
11
|
+
## De `archi`-CLI los gebruiken
|
|
12
|
+
|
|
13
|
+
De tooling is ook een zelfstandig pakket, `archi-cli` (*ar·cli·mate*: de CLI in
|
|
14
|
+
je ArchiMate). Je installeert het commando `archi` los van deze repo:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv tool install archi-cli
|
|
18
|
+
archi --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`archi` werkt op elk `.archimate`-model: geef `--model <pad>` op, of leg het
|
|
22
|
+
model vast in een `archi.toml` (`[tool.archi] model = "..."`), of draai in een
|
|
23
|
+
map met precies één `.archimate`-bestand. Voor `normalize` heb je de Archi-
|
|
24
|
+
engine nodig; die haalt `archi` bij het eerste gebruik zelf op (of expliciet
|
|
25
|
+
met `archi setup`). De rest van dit document beschrijft het werken in deze repo.
|
|
26
|
+
|
|
27
|
+
## Het idee
|
|
28
|
+
|
|
29
|
+
`models/ado.archimate` is de bron. Er zijn twee gelijkwaardige manieren om
|
|
30
|
+
eraan te werken: via de `archi`-CLI (meestal aangestuurd door een AI-sessie
|
|
31
|
+
zoals Claude Code) of gewoon in de Archi-GUI. Beide routes komen samen in
|
|
32
|
+
dezelfde controles:
|
|
33
|
+
|
|
34
|
+
- `just validate` controleert de integriteit: unieke ids, kloppende
|
|
35
|
+
verwijzingen van relaties en view-objecten, juiste folder-plaatsing, en
|
|
36
|
+
property-keys tegen de conventielijst.
|
|
37
|
+
- `just normalize` laat headless Archi het bestand opnieuw serialiseren.
|
|
38
|
+
Archi is daarmee de canonieke serializer, dus diffs blijven klein en
|
|
39
|
+
reviewbaar, wie of wat er ook geschreven heeft.
|
|
40
|
+
- `just render` genereert uit elke view in het model een Mermaid-diagram
|
|
41
|
+
(rendert op GitHub, in `views/`) en een NLDD-gestileerde HTML-pagina die de
|
|
42
|
+
layout uit het model pixelgetrouw volgt (`views/html/`), inclusief de
|
|
43
|
+
ArchiMate-notatie-iconen per elementtype, notes, groups en bendpoints.
|
|
44
|
+
Daarnaast rendert het uit elke deckdefinitie in `decks/` een presentatie
|
|
45
|
+
(`views/html/slides/`): een lineair verhaal als zelfstandige HTML-slides
|
|
46
|
+
in Rijkshuisstijl, met views uit het model als diagrammen, afgewisseld
|
|
47
|
+
met tekst- en bulletslides.
|
|
48
|
+
|
|
49
|
+
Pre-commit hooks dwingen validatie en verse renders af bij elke commit die
|
|
50
|
+
het model raakt. De afweging achter deze opzet, inclusief wat we inleveren
|
|
51
|
+
ten opzichte van de JSON-aanpak in het zusterexperiment, staat in
|
|
52
|
+
`adr/0001-archimate-als-bron.md`; het besluit om gegenereerde renders wel te
|
|
53
|
+
committen staat in `adr/0002-views-als-mermaid-in-git.md`, dat voor de
|
|
54
|
+
slidedecks in `adr/0003-slidedecks-als-toml-in-git.md`.
|
|
55
|
+
|
|
56
|
+
## Structuur
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
models/ado.archimate Het model, de bron van waarheid
|
|
60
|
+
decks/ Deckdefinities voor presentaties (TOML)
|
|
61
|
+
views/ Gerenderde views als Mermaid (.md, rendert op GitHub)
|
|
62
|
+
views/html/ Dezelfde views als NLDD-HTML, lokaal te bekijken
|
|
63
|
+
views/html/slides/ Gerenderde slidedecks (één HTML per deck)
|
|
64
|
+
docs/conventies.md Types, property-keys en naamgeving
|
|
65
|
+
docs/spelregels.md Rollen, workflow en de een-schrijver-afspraak
|
|
66
|
+
adr/ Architectuurbeslissingen
|
|
67
|
+
tools/archi_tool/ De archi-CLI (Python, lxml; beheerd met uv)
|
|
68
|
+
tests/ pytest-suite met een klein fixture-model
|
|
69
|
+
.claude/skills/ Procedures voor AI-sessies (archi-model, archi-view, archi-slides)
|
|
70
|
+
justfile Vaste taken
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Aan de slag
|
|
74
|
+
|
|
75
|
+
Nodig: [uv](https://docs.astral.sh/uv/), [just](https://just.systems/) en
|
|
76
|
+
[Archi](https://www.archimatetool.com/) voor normalisatie.
|
|
77
|
+
|
|
78
|
+
macOS:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
brew install uv just
|
|
82
|
+
brew install --cask archi
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Windows (PowerShell):
|
|
86
|
+
|
|
87
|
+
```powershell
|
|
88
|
+
winget install --id astral-sh.uv -e
|
|
89
|
+
winget install --id Casey.Just -e
|
|
90
|
+
winget install --id Archi.Archi -e
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Linux: uv via `curl -LsSf https://astral.sh/uv/install.sh | sh`, just via je
|
|
94
|
+
packagemanager, Archi als tgz van
|
|
95
|
+
[archimatetool.com/download](https://www.archimatetool.com/download/).
|
|
96
|
+
|
|
97
|
+
Archi wordt automatisch gevonden op `/Applications/Archi.app` (macOS),
|
|
98
|
+
`C:\Program Files\Archi\Archi.exe` (Windows) en `/opt/Archi/Archi` (Linux);
|
|
99
|
+
een ander pad geef je op via de env var `ARCHI_APP`. Python en pre-commit
|
|
100
|
+
hoef je niet zelf te installeren: uv regelt de Python-versie en pre-commit
|
|
101
|
+
is een dev-dependency.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
just setup # eenmalig per clone: venv, dependencies en pre-commit hooks
|
|
105
|
+
just stats # wat zit erin
|
|
106
|
+
just open # model openen in Archi
|
|
107
|
+
just serve # gerenderde HTML-views op http://localhost:8766
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Sla `just setup` niet over: zonder de pre-commit hooks kun je committen
|
|
111
|
+
zonder validatie en met verouderde renders.
|
|
112
|
+
|
|
113
|
+
Alle vaste taken:
|
|
114
|
+
|
|
115
|
+
| Commando | Wat het doet |
|
|
116
|
+
|---|---|
|
|
117
|
+
| `just setup` | venv, dependencies en pre-commit hooks installeren |
|
|
118
|
+
| `just validate` | integriteitschecks (draait ook als pre-commit hook) |
|
|
119
|
+
| `just render` | views en decks renderen naar `views/` en `views/html/` (ook hook) |
|
|
120
|
+
| `just normalize` | canonieke serialisatie via headless Archi, duurt zo'n 15 s |
|
|
121
|
+
| `just stats` | telling per elementtype, relaties en views |
|
|
122
|
+
| `just tree` | folderstructuur van het model met inhoud |
|
|
123
|
+
| `just list *args` | elementen tonen, bv. `just list --type Capability` |
|
|
124
|
+
| `just show *args` | één element met properties en relaties, bv. `just show "Gegevensuitwisseling"` |
|
|
125
|
+
| `just test` | pytest-suite |
|
|
126
|
+
| `just open` | model openen in Archi |
|
|
127
|
+
| `just serve` | HTML-views serveren op http://localhost:8766 |
|
|
128
|
+
|
|
129
|
+
Wijzigen doe je met de CLI. Die valideert het model na elke mutatie en
|
|
130
|
+
weigert op te slaan zolang er fouten zijn. Elementen zijn aanspreekbaar op id
|
|
131
|
+
of op naam, zolang die uniek is:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
uv run archi list --type Capability --property "Capability-niveau=gebied"
|
|
135
|
+
uv run archi show "Gegevensuitwisseling"
|
|
136
|
+
uv run archi tree
|
|
137
|
+
uv run archi add-element --type Capability --name "..." \
|
|
138
|
+
--property "Capability-niveau=bouwblok" --property "Omschrijving=..."
|
|
139
|
+
uv run archi add-relation --type Aggregation \
|
|
140
|
+
--source "Gegevensuitwisseling" --target "..." --name "bevat"
|
|
141
|
+
uv run archi set-property "Gegevensuitwisseling" "Omschrijving=..."
|
|
142
|
+
uv run archi rename "Oude naam" "Nieuwe naam"
|
|
143
|
+
uv run archi set-documentation "Gegevensuitwisseling" "..."
|
|
144
|
+
uv run archi remove "Gegevensuitwisseling" --cascade
|
|
145
|
+
uv run archi add-view --name "..." --layout cluster \
|
|
146
|
+
--type Capability --relation Aggregation
|
|
147
|
+
uv run archi add-view --name "... in detail" --layout cluster \
|
|
148
|
+
--root "Gegevensuitwisseling" --related
|
|
149
|
+
uv run archi add-view --name "Losse selectie" --layout grid \
|
|
150
|
+
--element "Gegevensuitwisseling" --element "Kunstmatige Intelligentie"
|
|
151
|
+
uv run archi slides --deck decks/ado.toml
|
|
152
|
+
uv run archi set-model-name "..."
|
|
153
|
+
uv run archi --help
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Elk commando heeft nog wat minder gebruikte vlaggen: `add-element --folder`
|
|
157
|
+
overschrijft de folder-plaatsing (default volgt uit het type), `add-view
|
|
158
|
+
--element` voegt losse elementen aan een selectie toe (zie hierboven), en
|
|
159
|
+
`slides` accepteert `--deck`, `--decks` en `--out` om gericht te renderen. De
|
|
160
|
+
volledige set toont `uv run archi <commando> --help`.
|
|
161
|
+
|
|
162
|
+
## Werkwijze
|
|
163
|
+
|
|
164
|
+
Branch afsplitsen, wijzigen, `just validate`, `just normalize`, committen en
|
|
165
|
+
een PR openen. De pre-commit hook rendert de views mee; verandert er iets in
|
|
166
|
+
`views/`, dan faalt de commit een keer en stage je de verse renders erbij.
|
|
167
|
+
CI draait dezelfde checks (validatie, actuele renders, tests) op Ubuntu en
|
|
168
|
+
Windows, dus een omzeilde hook strandt alsnog op de PR. De
|
|
169
|
+
architect-eigenaar reviewt en merget.
|
|
170
|
+
|
|
171
|
+
De belangrijkste afspraak: een schrijver tegelijk op het modelbestand. Een
|
|
172
|
+
enkel XML-bestand merget slecht, dus parallelle branches met modelwijzigingen
|
|
173
|
+
zijn er niet. Tooling- en documentatie-PR's kunnen wel naast elkaar lopen.
|
|
174
|
+
Details en rollen staan in `docs/spelregels.md`; de modelconventies (welke
|
|
175
|
+
types, welke property-keys, Nederlandse naamgeving) in `docs/conventies.md`.
|
|
176
|
+
|
|
177
|
+
Werk je met Claude Code, dan wordt `CLAUDE.md` automatisch geladen en
|
|
178
|
+
triggeren de skills `archi-model` (modelwijzigingen doorvoeren), `archi-view`
|
|
179
|
+
(views genereren) en `archi-slides` (presentaties maken) zodra je erom
|
|
180
|
+
vraagt.
|
|
181
|
+
|
|
182
|
+
## Herkomst
|
|
183
|
+
|
|
184
|
+
Het seedmodel is de export van het ADO-niveau-1-model uit
|
|
185
|
+
[`ADO-architectuurmodel-experiment`](https://github.com/BureauArchitectuurDigitaleOverheid/ADO-architectuurmodel-experiment),
|
|
186
|
+
waar JSON de bron is en ArchiMate een exportformaat. Dit repo draait die
|
|
187
|
+
verhouding om: het Archi-bestand is de bron, en al het andere wordt eruit
|
|
188
|
+
gegenereerd.
|
|
189
|
+
|
|
190
|
+
## Licentie
|
|
191
|
+
|
|
192
|
+
[EUPL-1.2](LICENSE).
|