@codemcp/workflows-core 3.1.22 → 3.2.1

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.
Files changed (80) hide show
  1. package/package.json +8 -3
  2. package/resources/templates/architecture/arc42/arc42-template-EN.md +1077 -0
  3. package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio-2023.png +0 -0
  4. package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio.png +0 -0
  5. package/resources/templates/architecture/arc42/images/05_building_blocks-EN.png +0 -0
  6. package/resources/templates/architecture/arc42/images/08-concepts-EN.drawio.png +0 -0
  7. package/resources/templates/architecture/arc42/images/arc42-logo.png +0 -0
  8. package/resources/templates/architecture/c4.md +224 -0
  9. package/resources/templates/architecture/freestyle.md +53 -0
  10. package/resources/templates/architecture/none.md +17 -0
  11. package/resources/templates/design/comprehensive.md +207 -0
  12. package/resources/templates/design/freestyle.md +37 -0
  13. package/resources/templates/design/none.md +17 -0
  14. package/resources/templates/requirements/ears.md +90 -0
  15. package/resources/templates/requirements/freestyle.md +42 -0
  16. package/resources/templates/requirements/none.md +17 -0
  17. package/resources/workflows/big-bang-conversion.yaml +539 -0
  18. package/resources/workflows/boundary-testing.yaml +334 -0
  19. package/resources/workflows/bugfix.yaml +185 -0
  20. package/resources/workflows/business-analysis.yaml +671 -0
  21. package/resources/workflows/c4-analysis.yaml +485 -0
  22. package/resources/workflows/epcc.yaml +161 -0
  23. package/resources/workflows/greenfield.yaml +189 -0
  24. package/resources/workflows/minor.yaml +127 -0
  25. package/resources/workflows/posts.yaml +207 -0
  26. package/resources/workflows/slides.yaml +256 -0
  27. package/resources/workflows/tdd.yaml +157 -0
  28. package/resources/workflows/waterfall.yaml +195 -0
  29. package/.turbo/turbo-build.log +0 -4
  30. package/src/config-manager.ts +0 -96
  31. package/src/conversation-manager.ts +0 -489
  32. package/src/database.ts +0 -427
  33. package/src/file-detection-manager.ts +0 -302
  34. package/src/git-manager.ts +0 -64
  35. package/src/index.ts +0 -28
  36. package/src/instruction-generator.ts +0 -210
  37. package/src/interaction-logger.ts +0 -109
  38. package/src/logger.ts +0 -353
  39. package/src/path-validation-utils.ts +0 -261
  40. package/src/plan-manager.ts +0 -323
  41. package/src/project-docs-manager.ts +0 -523
  42. package/src/state-machine-loader.ts +0 -365
  43. package/src/state-machine-types.ts +0 -72
  44. package/src/state-machine.ts +0 -370
  45. package/src/system-prompt-generator.ts +0 -122
  46. package/src/template-manager.ts +0 -328
  47. package/src/transition-engine.ts +0 -386
  48. package/src/types.ts +0 -60
  49. package/src/workflow-manager.ts +0 -606
  50. package/test/unit/conversation-manager.test.ts +0 -179
  51. package/test/unit/custom-workflow-loading.test.ts +0 -174
  52. package/test/unit/directory-linking-and-extensions.test.ts +0 -338
  53. package/test/unit/file-linking-integration.test.ts +0 -256
  54. package/test/unit/git-commit-integration.test.ts +0 -91
  55. package/test/unit/git-manager.test.ts +0 -86
  56. package/test/unit/install-workflow.test.ts +0 -138
  57. package/test/unit/instruction-generator.test.ts +0 -247
  58. package/test/unit/list-workflows-filtering.test.ts +0 -68
  59. package/test/unit/none-template-functionality.test.ts +0 -224
  60. package/test/unit/project-docs-manager.test.ts +0 -337
  61. package/test/unit/state-machine-loader.test.ts +0 -234
  62. package/test/unit/template-manager.test.ts +0 -217
  63. package/test/unit/validate-workflow-name.test.ts +0 -150
  64. package/test/unit/workflow-domain-filtering.test.ts +0 -75
  65. package/test/unit/workflow-enum-generation.test.ts +0 -92
  66. package/test/unit/workflow-manager-enhanced-path-resolution.test.ts +0 -369
  67. package/test/unit/workflow-manager-path-resolution.test.ts +0 -150
  68. package/test/unit/workflow-migration.test.ts +0 -155
  69. package/test/unit/workflow-override-by-name.test.ts +0 -116
  70. package/test/unit/workflow-prioritization.test.ts +0 -38
  71. package/test/unit/workflow-validation.test.ts +0 -303
  72. package/test/utils/e2e-test-setup.ts +0 -453
  73. package/test/utils/run-server-in-dir.sh +0 -27
  74. package/test/utils/temp-files.ts +0 -308
  75. package/test/utils/test-access.ts +0 -79
  76. package/test/utils/test-helpers.ts +0 -286
  77. package/test/utils/test-setup.ts +0 -78
  78. package/tsconfig.build.json +0 -21
  79. package/tsconfig.json +0 -8
  80. package/vitest.config.ts +0 -18
@@ -0,0 +1,1077 @@
1
+ <!--
2
+
3
+ **About arc42**
4
+
5
+ arc42, the template for documentation of software and system
6
+ architecture.
7
+
8
+ Template Version 8.2 EN. (based upon AsciiDoc version), January 2023
9
+
10
+ Created, maintained and © by Dr. Peter Hruschka, Dr. Gernot Starke and
11
+ contributors. See <https://arc42.org>.
12
+
13
+ <div class="note">
14
+
15
+ This version of the template contains some help and explanations as comments.
16
+
17
+ Remove the comments after completing a section.
18
+
19
+ </div>
20
+ -->
21
+
22
+ # Introduction and Goals
23
+
24
+ <!-- Describes the relevant requirements and the driving forces that software
25
+ architects and development team must consider. These include
26
+
27
+ - underlying business goals,
28
+
29
+ - essential features,
30
+
31
+ - essential functional requirements,
32
+
33
+ - quality goals for the architecture and
34
+
35
+ - relevant stakeholders and their expectations -->
36
+
37
+ ## Requirements Overview
38
+
39
+ <div class="formalpara-title">
40
+
41
+ **Contents**
42
+
43
+ </div>
44
+
45
+ <!-- Short description of the functional requirements, driving forces,
46
+ extract (or abstract) of requirements. Link to (hopefully existing)
47
+ requirements documents (with version number and information where to
48
+ find it). -->
49
+
50
+ <div class="formalpara-title">
51
+
52
+ **Motivation**
53
+
54
+ </div>
55
+
56
+ <!-- From the point of view of the end users a system is created or modified
57
+ to improve support of a business activity and/or improve the quality. -->
58
+
59
+ <div class="formalpara-title">
60
+
61
+ **Form**
62
+
63
+ </div>
64
+
65
+ <!-- Short textual description, probably in tabular use-case format. If
66
+ requirements documents exist this overview should refer to these
67
+ documents.
68
+
69
+ Keep these excerpts as short as possible. Balance readability of this
70
+ document with potential redundancy w.r.t to requirements documents. -->
71
+
72
+ ## Quality Goals
73
+
74
+ <div class="formalpara-title">
75
+
76
+ **Contents**
77
+
78
+ </div>
79
+
80
+ <!-- The top three (max five) quality goals for the architecture whose
81
+ fulfillment is of highest importance to the major stakeholders. We
82
+ really mean quality goals for the architecture. Don’t confuse them with
83
+ project goals. They are not necessarily identical.
84
+
85
+ Consider this overview of potential topics (based upon the ISO 25010
86
+ standard): -->
87
+
88
+ ![Categories of Quality
89
+ Requirements](images/01_2_iso-25010-topics-EN.drawio.png)
90
+
91
+ <div class="formalpara-title">
92
+
93
+ **Motivation**
94
+
95
+ </div>
96
+
97
+ <!-- You should know the quality goals of your most important stakeholders,
98
+ since they will influence fundamental architectural decisions. Make sure
99
+ to be very concrete about these qualities, avoid buzzwords. If you as an
100
+ architect do not know how the quality of your work will be judged… -->
101
+
102
+ <div class="formalpara-title">
103
+
104
+ **Form**
105
+
106
+ </div>
107
+
108
+ <!-- A table with quality goals and concrete scenarios, ordered by priorities -->
109
+
110
+ ## Stakeholders
111
+
112
+ <div class="formalpara-title">
113
+
114
+ **Contents**
115
+
116
+ </div>
117
+
118
+ <!-- Explicit overview of stakeholders of the system, i.e. all person, roles
119
+ or organizations that
120
+
121
+ - should know the architecture
122
+
123
+ - have to be convinced of the architecture
124
+
125
+ - have to work with the architecture or with code
126
+
127
+ - need the documentation of the architecture for their work
128
+
129
+ - have to come up with decisions about the system or its development -->
130
+
131
+ <div class="formalpara-title">
132
+
133
+ **Motivation**
134
+
135
+ </div>
136
+
137
+ <!-- You should know all parties involved in development of the system or
138
+ affected by the system. Otherwise, you may get nasty surprises later in
139
+ the development process. These stakeholders determine the extent and the
140
+ level of detail of your work and its results. -->
141
+
142
+ <div class="formalpara-title">
143
+
144
+ **Form**
145
+
146
+ </div>
147
+
148
+ <!-- Table with role names, person names, and their expectations with respect
149
+ to the architecture and its documentation. -->
150
+
151
+ | Role/Name | Contact | Expectations |
152
+ | ----------- | -------------- | ------------------ |
153
+ | _\<Role-1>_ | _\<Contact-1>_ | _\<Expectation-1>_ |
154
+ | _\<Role-2>_ | _\<Contact-2>_ | _\<Expectation-2>_ |
155
+
156
+ # Architecture Constraints
157
+
158
+ <div class="formalpara-title">
159
+
160
+ **Contents**
161
+
162
+ </div>
163
+
164
+ <!-- Any requirement that constraints software architects in their freedom of
165
+ design and implementation decisions or decision about the development
166
+ process. These constraints sometimes go beyond individual systems and
167
+ are valid for whole organizations and companies. -->
168
+
169
+ <div class="formalpara-title">
170
+
171
+ **Motivation**
172
+
173
+ </div>
174
+
175
+ <!-- Architects should know exactly where they are free in their design
176
+ decisions and where they must adhere to constraints. Constraints must
177
+ always be dealt with; they may be negotiable, though. -->
178
+
179
+ <div class="formalpara-title">
180
+
181
+ **Form**
182
+
183
+ </div>
184
+
185
+ <!-- Simple tables of constraints with explanations. If needed you can
186
+ subdivide them into technical constraints, organizational and political
187
+ constraints and conventions (e.g. programming or versioning guidelines,
188
+ documentation or naming conventions)
189
+
190
+ See [Architecture Constraints](https://docs.arc42.org/section-2/) in the
191
+ arc42 documentation. -->
192
+
193
+ # Context and Scope
194
+
195
+ <div class="formalpara-title">
196
+
197
+ **Contents**
198
+
199
+ </div>
200
+
201
+ <!-- Context and scope - as the name suggests - delimits your system (i.e.
202
+ your scope) from all its communication partners (neighboring systems and
203
+ users, i.e. the context of your system). It thereby specifies the
204
+ external interfaces.
205
+
206
+ If necessary, differentiate the business context (domain specific inputs
207
+ and outputs) from the technical context (channels, protocols, hardware). -->
208
+
209
+ <div class="formalpara-title">
210
+
211
+ **Motivation**
212
+
213
+ </div>
214
+
215
+ <!-- The domain interfaces and technical interfaces to communication partners
216
+ are among your system’s most critical aspects. Make sure that you
217
+ completely understand them. -->
218
+
219
+ <div class="formalpara-title">
220
+
221
+ **Form**
222
+
223
+ </div>
224
+
225
+ <!-- Various options:
226
+
227
+ - Context diagrams
228
+
229
+ - Lists of communication partners and their interfaces.
230
+
231
+ See [Context and Scope](https://docs.arc42.org/section-3/) in the arc42
232
+ documentation. -->
233
+
234
+ ## Business Context
235
+
236
+ <div class="formalpara-title">
237
+
238
+ **Contents**
239
+
240
+ </div>
241
+
242
+ <!-- Specification of **all** communication partners (users, IT-systems, …)
243
+ with explanations of domain specific inputs and outputs or interfaces.
244
+ Optionally you can add domain specific formats or communication
245
+ protocols. -->
246
+
247
+ <div class="formalpara-title">
248
+
249
+ **Motivation**
250
+
251
+ </div>
252
+
253
+ <!-- All stakeholders should understand which data are exchanged with the
254
+ environment of the system. -->
255
+
256
+ <div class="formalpara-title">
257
+
258
+ **Form**
259
+
260
+ </div>
261
+
262
+ <!-- All kinds of diagrams that show the system as a black box and specify
263
+ the domain interfaces to communication partners.
264
+
265
+ Alternatively (or additionally) you can use a table. The title of the
266
+ table is the name of your system, the three columns contain the name of
267
+ the communication partner, the inputs, and the outputs. -->
268
+
269
+ **\<Diagram or Table>**
270
+
271
+ **\<optionally: Explanation of external domain interfaces>**
272
+
273
+ ## Technical Context
274
+
275
+ <div class="formalpara-title">
276
+
277
+ **Contents**
278
+
279
+ </div>
280
+
281
+ <!-- Technical interfaces (channels and transmission media) linking your
282
+ system to its environment. In addition a mapping of domain specific
283
+ input/output to the channels, i.e. an explanation which I/O uses which
284
+ channel. -->
285
+
286
+ <div class="formalpara-title">
287
+
288
+ **Motivation**
289
+
290
+ </div>
291
+
292
+ <!-- Many stakeholders make architectural decision based on the technical
293
+ interfaces between the system and its context. Especially infrastructure
294
+ or hardware designers decide these technical interfaces. -->
295
+
296
+ <div class="formalpara-title">
297
+
298
+ **Form**
299
+
300
+ </div>
301
+
302
+ <!-- E.g. UML deployment diagram describing channels to neighboring systems,
303
+ together with a mapping table showing the relationships between channels
304
+ and input/output.
305
+
306
+ **\<Diagram or Table>**
307
+
308
+ **\<optionally: Explanation of technical interfaces>**
309
+
310
+ **\<Mapping Input/Output to Channels>**
311
+ -->
312
+
313
+ # Solution Strategy
314
+
315
+ <div class="formalpara-title">
316
+
317
+ **Contents**
318
+
319
+ </div>
320
+
321
+ <!-- A short summary and explanation of the fundamental decisions and
322
+ solution strategies, that shape system architecture. It includes
323
+
324
+ - technology decisions
325
+
326
+ - decisions about the top-level decomposition of the system, e.g.
327
+ usage of an architectural pattern or design pattern
328
+
329
+ - decisions on how to achieve key quality goals
330
+
331
+ - relevant organizational decisions, e.g. selecting a development
332
+ process or delegating certain tasks to third parties. -->
333
+
334
+ <div class="formalpara-title">
335
+
336
+ **Motivation**
337
+
338
+ </div>
339
+
340
+ <!-- These decisions form the cornerstones for your architecture. They are
341
+ the foundation for many other detailed decisions or implementation
342
+ rules. -->
343
+
344
+ <div class="formalpara-title">
345
+
346
+ **Form**
347
+
348
+ </div>
349
+
350
+ <!-- Keep the explanations of such key decisions short.
351
+
352
+ Motivate what was decided and why it was decided that way, based upon
353
+ problem statement, quality goals and key constraints. Refer to details
354
+ in the following sections.
355
+
356
+ See [Solution Strategy](https://docs.arc42.org/section-4/) in the arc42
357
+ documentation. -->
358
+
359
+ # Building Block View
360
+
361
+ <div class="formalpara-title">
362
+
363
+ **Content**
364
+
365
+ </div>
366
+
367
+ <!-- The building block view shows the static decomposition of the system
368
+ into building blocks (modules, components, subsystems, classes,
369
+ interfaces, packages, libraries, frameworks, layers, partitions, tiers,
370
+ functions, macros, operations, data structures, …) as well as their
371
+ dependencies (relationships, associations, …)
372
+
373
+ This view is mandatory for every architecture documentation. In analogy
374
+ to a house this is the *floor plan*. -->
375
+
376
+ <div class="formalpara-title">
377
+
378
+ **Motivation**
379
+
380
+ </div>
381
+
382
+ <!-- Maintain an overview of your source code by making its structure
383
+ understandable through abstraction.
384
+
385
+ This allows you to communicate with your stakeholder on an abstract
386
+ level without disclosing implementation details.
387
+
388
+ <div class="formalpara-title">
389
+
390
+ **Form**
391
+
392
+ </div>
393
+
394
+ The building block view is a hierarchical collection of black boxes and
395
+ white boxes (see figure below) and their descriptions.
396
+
397
+ **Level 1** is the white box description of the overall system together
398
+ with black box descriptions of all contained building blocks.
399
+
400
+ **Level 2** zooms into some building blocks of level 1. Thus it contains
401
+ the white box description of selected building blocks of level 1,
402
+ together with black box descriptions of their internal building blocks.
403
+
404
+ **Level 3** zooms into selected building blocks of level 2, and so on.
405
+
406
+ See [Building Block View](https://docs.arc42.org/section-5/) in the
407
+ arc42 documentation. -->
408
+
409
+ ## Whitebox Overall System
410
+
411
+ <!-- Here you describe the decomposition of the overall system using the
412
+ following white box template. It contains
413
+
414
+ - an overview diagram
415
+
416
+ - a motivation for the decomposition
417
+
418
+ - black box descriptions of the contained building blocks. For these
419
+ we offer you alternatives:
420
+
421
+ - use *one* table for a short and pragmatic overview of all
422
+ contained building blocks and their interfaces
423
+
424
+ - use a list of black box descriptions of the building blocks
425
+ according to the black box template (see below). Depending on
426
+ your choice of tool this list could be sub-chapters (in text
427
+ files), sub-pages (in a Wiki) or nested elements (in a modeling
428
+ tool).
429
+
430
+ - (optional:) important interfaces, that are not explained in the
431
+ black box templates of a building block, but are very important for
432
+ understanding the white box. Since there are so many ways to specify
433
+ interfaces why do not provide a specific template for them. In the
434
+ worst case you have to specify and describe syntax, semantics,
435
+ protocols, error handling, restrictions, versions, qualities,
436
+ necessary compatibilities and many things more. In the best case you
437
+ will get away with examples or simple signatures. -->
438
+
439
+ **_\<Overview Diagram>_**
440
+
441
+ Motivation
442
+
443
+ Contained Building Blocks
444
+
445
+ <!-- *\<Description of contained building block (black boxes)>* -->
446
+
447
+ Important Interfaces
448
+
449
+ <!-- *\<Description of important interfaces>* -->
450
+
451
+ <!-- Insert your explanations of black boxes from level 1:
452
+
453
+ If you use tabular form you will only describe your black boxes with
454
+ name and responsibility according to the following schema:
455
+
456
+ | **Name** | **Responsibility** |
457
+ |------------------|--------------------|
458
+ | *\<black box 1>* |  *\<Text>* |
459
+ | *\<black box 2>* |  *\<Text>* |
460
+
461
+ If you use a list of black box descriptions then you fill in a separate
462
+ black box template for every important building block . Its headline is
463
+ the name of the black box.
464
+
465
+ ### \<Name black box 1>
466
+
467
+ Here you describe \<black box 1> according the the following black box
468
+ template:
469
+
470
+ - Purpose/Responsibility
471
+
472
+ - Interface(s), when they are not extracted as separate paragraphs.
473
+ This interfaces may include qualities and performance
474
+ characteristics.
475
+
476
+ - (Optional) Quality-/Performance characteristics of the black box,
477
+ e.g.availability, run time behavior, ….
478
+
479
+ - (Optional) directory/file location
480
+
481
+ - (Optional) Fulfilled requirements (if you need traceability to
482
+ requirements).
483
+
484
+ - (Optional) Open issues/problems/risks
485
+
486
+ *\<Purpose/Responsibility>*
487
+
488
+ *\<Interface(s)>*
489
+
490
+ *\<(Optional) Quality/Performance Characteristics>*
491
+
492
+ *\<(Optional) Directory/File Location>*
493
+
494
+ *\<(Optional) Fulfilled Requirements>*
495
+
496
+ *\<(optional) Open Issues/Problems/Risks>*
497
+
498
+ ### \<Name black box 2>
499
+
500
+ *\<black box template>*
501
+
502
+ ### \<Name black box n>
503
+
504
+ *\<black box template>*
505
+
506
+ ### \<Name interface 1>
507
+
508
+
509
+
510
+ ### \<Name interface m> -->
511
+
512
+ ## Level 2
513
+
514
+ <!-- Here you can specify the inner structure of (some) building blocks from
515
+ level 1 as white boxes.
516
+
517
+ You have to decide which building blocks of your system are important
518
+ enough to justify such a detailed description. Please prefer relevance
519
+ over completeness. Specify important, surprising, risky, complex or
520
+ volatile building blocks. Leave out normal, simple, boring or
521
+ standardized parts of your system -->
522
+
523
+ ### White Box _\<building block 1>_
524
+
525
+ <!-- …describes the internal structure of *building block 1*. -->
526
+
527
+ _\<white box template>_
528
+
529
+ ### White Box _\<building block 2>_
530
+
531
+ _\<white box template>_
532
+
533
+
534
+
535
+ ### White Box _\<building block m>_
536
+
537
+ _\<white box template>_
538
+
539
+ ## Level 3
540
+
541
+ <!-- Here you can specify the inner structure of (some) building blocks from
542
+ level 2 as white boxes.
543
+
544
+ When you need more detailed levels of your architecture please copy this
545
+ part of arc42 for additional levels. -->
546
+
547
+ ### White Box \<\_building block x.1\_\>
548
+
549
+ <!-- Specifies the internal structure of *building block x.1*. -->
550
+
551
+ _\<white box template>_
552
+
553
+ ### White Box \<\_building block x.2\_\>
554
+
555
+ _\<white box template>_
556
+
557
+ ### White Box \<\_building block y.1\_\>
558
+
559
+ _\<white box template>_
560
+
561
+ # Runtime View
562
+
563
+ <div class="formalpara-title">
564
+
565
+ **Contents**
566
+
567
+ </div>
568
+
569
+ <!-- The runtime view describes concrete behavior and interactions of the
570
+ system’s building blocks in form of scenarios from the following areas:
571
+
572
+ - important use cases or features: how do building blocks execute
573
+ them?
574
+
575
+ - interactions at critical external interfaces: how do building blocks
576
+ cooperate with users and neighboring systems?
577
+
578
+ - operation and administration: launch, start-up, stop
579
+
580
+ - error and exception scenarios
581
+
582
+ Remark: The main criterion for the choice of possible scenarios
583
+ (sequences, workflows) is their **architectural relevance**. It is
584
+ **not** important to describe a large number of scenarios. You should
585
+ rather document a representative selection. -->
586
+
587
+ <div class="formalpara-title">
588
+
589
+ **Motivation**
590
+
591
+ </div>
592
+
593
+ <!-- You should understand how (instances of) building blocks of your system
594
+ perform their job and communicate at runtime. You will mainly capture
595
+ scenarios in your documentation to communicate your architecture to
596
+ stakeholders that are less willing or able to read and understand the
597
+ static models (building block view, deployment view). -->
598
+
599
+ <div class="formalpara-title">
600
+
601
+ **Form**
602
+
603
+ </div>
604
+
605
+ There are many notations for describing scenarios, e.g.
606
+
607
+ - numbered list of steps (in natural language)
608
+
609
+ - activity diagrams or flow charts
610
+
611
+ - sequence diagrams
612
+
613
+ - BPMN or EPCs (event process chains)
614
+
615
+ - state machines
616
+
617
+ - …
618
+
619
+ See [Runtime View](https://docs.arc42.org/section-6/) in the arc42
620
+ documentation.
621
+
622
+ ## \<Runtime Scenario 1>
623
+
624
+ - _\<insert runtime diagram or textual description of the scenario>_
625
+
626
+ - _\<insert description of the notable aspects of the interactions
627
+ between the building block instances depicted in this diagram.>_
628
+
629
+ ## \<Runtime Scenario 2>
630
+
631
+ ## …
632
+
633
+ ## \<Runtime Scenario n>
634
+
635
+ # Deployment View
636
+
637
+ <div class="formalpara-title">
638
+
639
+ **Content**
640
+
641
+ </div>
642
+
643
+ The deployment view describes:
644
+
645
+ 1. technical infrastructure used to execute your system, with
646
+ infrastructure elements like geographical locations, environments,
647
+ computers, processors, channels and net topologies as well as other
648
+ infrastructure elements and
649
+
650
+ 2. mapping of (software) building blocks to that infrastructure
651
+ elements.
652
+
653
+ Often systems are executed in different environments, e.g. development
654
+ environment, test environment, production environment. In such cases you
655
+ should document all relevant environments.
656
+
657
+ Especially document a deployment view if your software is executed as
658
+ distributed system with more than one computer, processor, server or
659
+ container or when you design and construct your own hardware processors
660
+ and chips.
661
+
662
+ From a software perspective it is sufficient to capture only those
663
+ elements of an infrastructure that are needed to show a deployment of
664
+ your building blocks. Hardware architects can go beyond that and
665
+ describe an infrastructure to any level of detail they need to capture.
666
+
667
+ <div class="formalpara-title">
668
+
669
+ **Motivation**
670
+
671
+ </div>
672
+
673
+ Software does not run without hardware. This underlying infrastructure
674
+ can and will influence a system and/or some cross-cutting concepts.
675
+ Therefore, there is a need to know the infrastructure.
676
+
677
+ Maybe a highest level deployment diagram is already contained in section
678
+ 3.2. as technical context with your own infrastructure as ONE black box.
679
+ In this section one can zoom into this black box using additional
680
+ deployment diagrams:
681
+
682
+ - UML offers deployment diagrams to express that view. Use it,
683
+ probably with nested diagrams, when your infrastructure is more
684
+ complex.
685
+
686
+ - When your (hardware) stakeholders prefer other kinds of diagrams
687
+ rather than a deployment diagram, let them use any kind that is able
688
+ to show nodes and channels of the infrastructure.
689
+
690
+ See [Deployment View](https://docs.arc42.org/section-7/) in the arc42
691
+ documentation.
692
+
693
+ ## Infrastructure Level 1
694
+
695
+ Describe (usually in a combination of diagrams, tables, and text):
696
+
697
+ - distribution of a system to multiple locations, environments,
698
+ computers, processors, .., as well as physical connections between
699
+ them
700
+
701
+ - important justifications or motivations for this deployment
702
+ structure
703
+
704
+ - quality and/or performance features of this infrastructure
705
+
706
+ - mapping of software artifacts to elements of this infrastructure
707
+
708
+ For multiple environments or alternative deployments please copy and
709
+ adapt this section of arc42 for all relevant environments.
710
+
711
+ **_\<Overview Diagram>_**
712
+
713
+ Motivation
714
+ _\<explanation in text form>_
715
+
716
+ Quality and/or Performance Features
717
+ _\<explanation in text form>_
718
+
719
+ Mapping of Building Blocks to Infrastructure
720
+ _\<description of the mapping>_
721
+
722
+ ## Infrastructure Level 2
723
+
724
+ Here you can include the internal structure of (some) infrastructure
725
+ elements from level 1.
726
+
727
+ Please copy the structure from level 1 for each selected element.
728
+
729
+ ### _\<Infrastructure Element 1>_
730
+
731
+ _\<diagram + explanation>_
732
+
733
+ ### _\<Infrastructure Element 2>_
734
+
735
+ _\<diagram + explanation>_
736
+
737
+
738
+
739
+ ### _\<Infrastructure Element n>_
740
+
741
+ _\<diagram + explanation>_
742
+
743
+ # Cross-cutting Concepts
744
+
745
+ <div class="formalpara-title">
746
+
747
+ **Content**
748
+
749
+ </div>
750
+
751
+ This section describes overall, principal regulations and solution ideas
752
+ that are relevant in multiple parts (= cross-cutting) of your system.
753
+ Such concepts are often related to multiple building blocks. They can
754
+ include many different topics, such as
755
+
756
+ - models, especially domain models
757
+
758
+ - architecture or design patterns
759
+
760
+ - rules for using specific technology
761
+
762
+ - principal, often technical decisions of an overarching (=
763
+ cross-cutting) nature
764
+
765
+ - implementation rules
766
+
767
+ <div class="formalpara-title">
768
+
769
+ **Motivation**
770
+
771
+ </div>
772
+
773
+ Concepts form the basis for _conceptual integrity_ (consistency,
774
+ homogeneity) of the architecture. Thus, they are an important
775
+ contribution to achieve inner qualities of your system.
776
+
777
+ Some of these concepts cannot be assigned to individual building blocks,
778
+ e.g. security or safety.
779
+
780
+ <div class="formalpara-title">
781
+
782
+ **Form**
783
+
784
+ </div>
785
+
786
+ The form can be varied:
787
+
788
+ - concept papers with any kind of structure
789
+
790
+ - cross-cutting model excerpts or scenarios using notations of the
791
+ architecture views
792
+
793
+ - sample implementations, especially for technical concepts
794
+
795
+ - reference to typical usage of standard frameworks (e.g. using
796
+ Hibernate for object/relational mapping)
797
+
798
+ <div class="formalpara-title">
799
+
800
+ **Structure**
801
+
802
+ </div>
803
+
804
+ A potential (but not mandatory) structure for this section could be:
805
+
806
+ - Domain concepts
807
+
808
+ - User Experience concepts (UX)
809
+
810
+ - Safety and security concepts
811
+
812
+ - Architecture and design patterns
813
+
814
+ - "Under-the-hood"
815
+
816
+ - development concepts
817
+
818
+ - operational concepts
819
+
820
+ Note: it might be difficult to assign individual concepts to one
821
+ specific topic on this list.
822
+
823
+ ![Possible topics for crosscutting
824
+ concepts](images/08-concepts-EN.drawio.png)
825
+
826
+ See [Concepts](https://docs.arc42.org/section-8/) in the arc42
827
+ documentation.
828
+
829
+ ## _\<Concept 1>_
830
+
831
+ _\<explanation>_
832
+
833
+ ## _\<Concept 2>_
834
+
835
+ _\<explanation>_
836
+
837
+
838
+
839
+ ## _\<Concept n>_
840
+
841
+ _\<explanation>_
842
+
843
+ # Architecture Decisions
844
+
845
+ <div class="formalpara-title">
846
+
847
+ **Contents**
848
+
849
+ </div>
850
+
851
+ Important, expensive, large scale or risky architecture decisions
852
+ including rationales. With "decisions" we mean selecting one alternative
853
+ based on given criteria.
854
+
855
+ Please use your judgement to decide whether an architectural decision
856
+ should be documented here in this central section or whether you better
857
+ document it locally (e.g. within the white box template of one building
858
+ block).
859
+
860
+ Avoid redundancy. Refer to section 4, where you already captured the
861
+ most important decisions of your architecture.
862
+
863
+ <div class="formalpara-title">
864
+
865
+ **Motivation**
866
+
867
+ </div>
868
+
869
+ Stakeholders of your system should be able to comprehend and retrace
870
+ your decisions.
871
+
872
+ <div class="formalpara-title">
873
+
874
+ **Form**
875
+
876
+ </div>
877
+
878
+ Various options:
879
+
880
+ - ADR ([Documenting Architecture
881
+ Decisions](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions))
882
+ for every important decision
883
+
884
+ - List or table, ordered by importance and consequences or:
885
+
886
+ - more detailed in form of separate sections per decision
887
+
888
+ See [Architecture Decisions](https://docs.arc42.org/section-9/) in the
889
+ arc42 documentation. There you will find links and examples about ADR.
890
+
891
+ # Quality Requirements
892
+
893
+ <div class="formalpara-title">
894
+
895
+ **Content**
896
+
897
+ </div>
898
+
899
+ This section contains all quality requirements as quality tree with
900
+ scenarios. The most important ones have already been described in
901
+ section 1.2. (quality goals)
902
+
903
+ Here you can also capture quality requirements with lesser priority,
904
+ which will not create high risks when they are not fully achieved.
905
+
906
+ <div class="formalpara-title">
907
+
908
+ **Motivation**
909
+
910
+ </div>
911
+
912
+ Since quality requirements will have a lot of influence on architectural
913
+ decisions you should know for every stakeholder what is really important
914
+ to them, concrete and measurable.
915
+
916
+ See [Quality Requirements](https://docs.arc42.org/section-10/) in the
917
+ arc42 documentation.
918
+
919
+ ## Quality Tree
920
+
921
+ <div class="formalpara-title">
922
+
923
+ **Content**
924
+
925
+ </div>
926
+
927
+ The quality tree (as defined in ATAM – Architecture Tradeoff Analysis
928
+ Method) with quality/evaluation scenarios as leafs.
929
+
930
+ <div class="formalpara-title">
931
+
932
+ **Motivation**
933
+
934
+ </div>
935
+
936
+ The tree structure with priorities provides an overview for a sometimes
937
+ large number of quality requirements.
938
+
939
+ <div class="formalpara-title">
940
+
941
+ **Form**
942
+
943
+ </div>
944
+
945
+ The quality tree is a high-level overview of the quality goals and
946
+ requirements:
947
+
948
+ - tree-like refinement of the term "quality". Use "quality" or
949
+ "usefulness" as a root
950
+
951
+ - a mind map with quality categories as main branches
952
+
953
+ In any case the tree should include links to the scenarios of the
954
+ following section.
955
+
956
+ ## Quality Scenarios
957
+
958
+ <div class="formalpara-title">
959
+
960
+ **Contents**
961
+
962
+ </div>
963
+
964
+ Concretization of (sometimes vague or implicit) quality requirements
965
+ using (quality) scenarios.
966
+
967
+ These scenarios describe what should happen when a stimulus arrives at
968
+ the system.
969
+
970
+ For architects, two kinds of scenarios are important:
971
+
972
+ - Usage scenarios (also called application scenarios or use case
973
+ scenarios) describe the system’s runtime reaction to a certain
974
+ stimulus. This also includes scenarios that describe the system’s
975
+ efficiency or performance. Example: The system reacts to a user’s
976
+ request within one second.
977
+
978
+ - Change scenarios describe a modification of the system or of its
979
+ immediate environment. Example: Additional functionality is
980
+ implemented or requirements for a quality attribute change.
981
+
982
+ <div class="formalpara-title">
983
+
984
+ **Motivation**
985
+
986
+ </div>
987
+
988
+ Scenarios make quality requirements concrete and allow to more easily
989
+ measure or decide whether they are fulfilled.
990
+
991
+ Especially when you want to assess your architecture using methods like
992
+ ATAM you need to describe your quality goals (from section 1.2) more
993
+ precisely down to a level of scenarios that can be discussed and
994
+ evaluated.
995
+
996
+ <div class="formalpara-title">
997
+
998
+ **Form**
999
+
1000
+ </div>
1001
+
1002
+ Tabular or free form text.
1003
+
1004
+ # Risks and Technical Debts
1005
+
1006
+ <div class="formalpara-title">
1007
+
1008
+ **Contents**
1009
+
1010
+ </div>
1011
+
1012
+ A list of identified technical risks or technical debts, ordered by
1013
+ priority
1014
+
1015
+ <div class="formalpara-title">
1016
+
1017
+ **Motivation**
1018
+
1019
+ </div>
1020
+
1021
+ “Risk management is project management for grown-ups” (Tim Lister,
1022
+ Atlantic Systems Guild.)
1023
+
1024
+ This should be your motto for systematic detection and evaluation of
1025
+ risks and technical debts in the architecture, which will be needed by
1026
+ management stakeholders (e.g. project managers, product owners) as part
1027
+ of the overall risk analysis and measurement planning.
1028
+
1029
+ <div class="formalpara-title">
1030
+
1031
+ **Form**
1032
+
1033
+ </div>
1034
+
1035
+ List of risks and/or technical debts, probably including suggested
1036
+ measures to minimize, mitigate or avoid risks or reduce technical debts.
1037
+
1038
+ See [Risks and Technical Debt](https://docs.arc42.org/section-11/) in
1039
+ the arc42 documentation.
1040
+
1041
+ # Glossary
1042
+
1043
+ <div class="formalpara-title">
1044
+
1045
+ **Contents**
1046
+
1047
+ </div>
1048
+
1049
+ The most important domain and technical terms that your stakeholders use
1050
+ when discussing the system.
1051
+
1052
+ You can also see the glossary as source for translations if you work in
1053
+ multi-language teams.
1054
+
1055
+ <div class="formalpara-title">
1056
+
1057
+ **Motivation**
1058
+
1059
+ </div>
1060
+
1061
+ You should clearly define your terms, so that all stakeholders
1062
+
1063
+ - have an identical understanding of these terms
1064
+
1065
+ - do not use synonyms and homonyms
1066
+
1067
+ A table with columns \<Term> and \<Definition>.
1068
+
1069
+ Potentially more columns in case you need translations.
1070
+
1071
+ See [Glossary](https://docs.arc42.org/section-12/) in the arc42
1072
+ documentation.
1073
+
1074
+ | Term | Definition |
1075
+ | ----------- | ----------------- |
1076
+ | _\<Term-1>_ | _\<definition-1>_ |
1077
+ | _\<Term-2>_ | _\<definition-2>_ |