Start here

Introduction

Welcome to the ArchiCode Command Line Tool Documentation. ArchiCode is a powerful tool designed to assist architects in creating models and generating views using an efficient as-code approach. Drawing inspiration from both the C4 Model and the ArchiMate Standard, ArchiCode provides a data model and a command line interface to streamline your architectural workflow.

With ArchiCode, architects can easily design models and produce views while adhering to the principles of the C4 Model. Our built-in viewpoints handle various levels of abstraction, ensuring your architectural vision is accurately represented in your projects.

Incorporating concepts from the ArchiMate Standard, ArchiCode’s model is rooted in the structural Aspect and spans the Application and Technology layers. This integration adds depth and clarity to your architectural creations.

This documentation is sorted by the kind of reading: Start here, Tutorials, How-to guides, Reference, Concepts and Upgrading, in that order.

Availability, License, and Deliverables

ArchiCode is an open-source software hosted on GitHub, fostering transparency and collaboration. It operates under the MIT license, granting users flexibility in its use and modification. The software is distributed as a native program for Linux and macOS on the release page, as a Maven Artifact and as an OCI Image (Docker Image), simplifying integration.

  • Source Code: ArchiCode’s source code is hosted on GitHub at https://github.com/tmorin/archicode, providing access for developers to explore, contribute, and collaborate.

  • Licensing: ArchiCode is licensed under the permissive MIT license, enabling users to freely utilize, modify, and distribute the software.

  • Deliverables: ArchiCode is conveniently available as a native program (one file for each of Linux amd64, Linux arm64 and macOS arm64), as a Maven Artifact and as an OCI Image, facilitating easy integration into development workflows. Install tells how to get and check each of them.

  • Access to Deliverables: The native programs, with their checksums, are on the release page at https://github.com/tmorin/archicode/releases. The Maven Artifact and the OCI Image can be accessed through the dedicated packages repository at https://github.com/tmorin/archicode/packages.

This accessibility, licensing, and practical distribution emphasize ArchiCode’s commitment to fostering an open and collaborative architectural community.

Install

ArchiCode is one program, archicode, and the commands are the same whichever form of it you run. This section is about getting it and checking that it is the file the project built.

The native program of a release. The releases after 0.18.0 carry, on https://github.com/tmorin/archicode/releases, one file for each machine and a file of checksums:

File For

archicode-<version>-linux-amd64

Linux on an x86-64 processor

archicode-<version>-linux-arm64

Linux on an ARM 64-bit processor

archicode-<version>-macos-arm64

macOS on Apple silicon

SHA256SUMS

the SHA-256 checksum of each of the three files above

Each is a single file, built as a native image: nothing else has to be installed, no Java and no container runtime, and the editor (archicode editor serve, see Serve the editor) is inside it. views generate writes PlantUML source files and draws no image, so the program needs neither PlantUML nor Graphviz either; turning a .puml file into a picture is done with PlantUML, as with any form of ArchiCode. On Linux, download the file for your machine and SHA256SUMS into one folder, then:

sha256sum --check --ignore-missing SHA256SUMS
chmod +x archicode-<version>-linux-amd64
./archicode-<version>-linux-amd64 --version

The first line checks the files of the folder against their lines of SHA256SUMS and prints archicode-<version>-linux-amd64: OK (--ignore-missing leaves out the files you did not download); the last prints archicode <version>, and nothing needs a workspace for that. To use it as archicode, put it on your PATH under that name, for example install -m 755 archicode-<version>-linux-amd64 ~/.local/bin/archicode. On macOS, shasum replaces sha256sum and checks the lines it is given, so give it the line of the file you downloaded:

grep archicode-<version>-macos-arm64 SHA256SUMS | shasum -a 256 --check
chmod +x archicode-<version>-macos-arm64
./archicode-<version>-macos-arm64 --version

The macOS file is not notarized. It is not signed with an Apple developer identity, so macOS Gatekeeper stops a file that a browser downloaded (the browser marks it as quarantined) with a message that Apple cannot check it for malicious software. Allow it once, either with xattr -d com.apple.quarantine archicode-<version>-macos-arm64 or in System Settings, Privacy & Security, with Open Anyway. A file fetched with curl or gh release download is not marked and runs as it is. The checksum is how you know the file is the one the release published.

Where it runs. The Linux files are built on Ubuntu 24.04 and need glibc 2.34 or later (a system that uses another C library, such as Alpine, which uses musl, was not tried); the macOS file is built on macOS 15 and says it needs macOS 15.0 or later. There is no Windows file and no file for an Intel Mac yet: there, and anywhere else, use the JAR (Java 25) or the OCI Image, which runs the same JAR: java -jar quarkus-run.jar --version and docker run --rm ghcr.io/tmorin/archicode --version print the same line as the native programs do.

Each file of a release is run on its own kind of machine, as it is published, before the release is made public: its checksum, --version, views generate on an example of this manual and editor serve answering a request. That check is what the project does; it does not replace yours.

Features

Structured Application Component Design

ArchiCode provides a structured data model that lets architects define the composition of application components.

Precise Technology Node Modeling

Define the structure of technology nodes in your architecture, so that your technology choices are captured.

Flexible Source Formats

ArchiCode adapts to your preferences by supporting multiple source formats: YAML, JSON and TOML for the manifests and for the workspace file (the editor reads YAML only, see [editor-reads]).

Manifest-Style Source Code Organization

ArchiCode simplifies the management of complex architectures by embracing a Kubernetes-like manifest approach to organize your source code more efficiently.

Automated View Generation

Use pre-defined viewpoints to generate views that communicate your architectural concepts.

Intelligent Relationship Management

ArchiCode’s viewpoints smartly manage relationships, providing a clear representation of how components interact within your architecture.

CI/CD Integration

Run ArchiCode in your CI/CD pipelines to keep the architecture checked throughout your development lifecycle (see Check the architecture in a build).

Plateaus

A plateau is one layer of the architecture, as it is or as it should be, over the plateau it overrides. You write it as the manifests that say plateau: <id> in their header, over the plateau they override, with patches (REMOVE, SET, ADD, MERGE) for what they change. ArchiCode computes what is new, changed and removed from one plateau to another and draws it, in the views and in the editor, with marks that never rely on colour. An element can say what it replaces (replaces), so that a move, a split or a merge is one change and not a removal plus an addition; the editor proposes the matches it finds and writes the hint in one click, and moves an element under another parent without breaking a reference (see Plateaus).

Unraveling Clarity Through Facets

The facet feature in Archicode elegantly simplifies complex architectural views, offering tailored visualizations focused on specific model elements and relationships for enhanced clarity and comprehension.

The next parts guide you through ArchiCode with tutorials, how-to guides, the reference of the domain, the editor and the commands, and the concepts behind them.

Tutorials

Example: An ecommerce platform

Introduction

This example designs an e-commerce platform in steps. It starts with high-level elements and relationships, then breaks the system down into containers and their interactions. The steps are a starting point: adapt the process to the needs of your project.

Step #1: Shape the highest elements of the application layer

In this initial step, we identify the foundational elements of the application layer:

  • EcommercePlatform: At the core of the system, "EcommercePlatform" is identified as the solution itself, representing the entire e-commerce platform.

  • User: This element represents the users who interact with the e-commerce platform, browse products, and make purchases.

  • SocialIdentityProvider: External services such as Google and Microsoft are designated as "SocialIdentityProvider," responsible for authenticating users.

  • PaymentGateway: The element symbolizes external payment processing services like Stripe and Braintree that facilitate secure financial transactions.

Step #1 - The addition of the elements in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
    - kind: "solution"
      id: "EcommercePlatform"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

Once the elements are identified, we design the relationships between them:

  • User uses EcommercePlatform: A direct relationship is established from the "User" element to the "EcommercePlatform" element. This relationship signifies that users engage with the platform to explore products, make purchases, and manage their accounts.

  • EcommercePlatform uses SocialIdentityProvider: A relationship is created from "EcommercePlatform" to "SocialIdentityProvider" to depict the platform’s reliance on external authentication services, so that users log in through trusted identity providers.

  • EcommercePlatform uses PaymentGateway: Another relationship is formed from "EcommercePlatform" to "PaymentGateway" to illustrate the platform’s integration with external payment processing services. Through this relationship, the platform enables customers to complete transactions using various payment methods.

Step #1 - The addition of the relationships in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
    - kind: "solution"
      id: "EcommercePlatform"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

After establishing the relationships, the next task involves generating a first generation of views:

  • Overview Viewpoint: At this level of abstraction, the "Overview" viewpoint is the most suitable. This viewpoint provides a broad perspective of the relationships and interactions related to the e-commerce platform.

  • Ingress and Egress Relationships: The viewpoint showcases the "Ingress" relationships, highlighting how elements such as "User" enter the platform. Additionally, it depicts "Egress" relationships, illustrating how the platform interact with dependencies.

Step #1 - Generate the "Overview" views
archicode views generate --viewpoint=overview

The command generates four Plantuml files in the ./views/plantuml/application folder:

  • EcommercePlatform_overview.puml

  • PaymentGateway_overview.puml

  • SocialIdentityProvider_overview.puml

  • User_overview.puml

The view EcommercePlatform_overview.puml is built upon the "Overview" viewpoint and focus on the Ingress and Egress relationships where the EcommercePlatform element is involved.

EcommercePlatform overview
Figure 1. Step #1 - The overview of the ecommerce platform

The view PaymentGateway-overview.puml is built upon the "Overview" viewpoint and focus on the Ingress and Egress relationships where the PaymentGateway element is involved.

PaymentGateway overview
Figure 2. Step #1 - The overview of the payment gateway

The concept is similar for the others generated views.

This initial step established a clear foundation by identifying the key elements and relationships within the e-commerce platform’s application layer.

Step #2: Identify the systems of the solution

This step goes deeper into the systems that compose the e-commerce platform and establishes relationships between them.

The first task involves breaking down the "EcommercePlatform" Solution into distinct "System" elements, each responsible for specific functionalities:

  • Product Catalog: Manages product categorization, listings, and details.

  • User Management: Handles user authentication, profiles, and preferences.

  • Order Processing: Facilitates order creation, payment processing, and order tracking.

  • Content Management: Manages website content, including product descriptions and promotional banners.

  • User Interface: Provides personalized product recommendations based on user behavior.

Step #2 - The addition of the system elements in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform"
    - kind: "solution"
      id: "EcommercePlatform"
      relationships:
        - destination: "SocialIdentityProvider"
        - destination: "PaymentGateway"
      elements:
        - kind: "system"
          id: "UserInterface"
        - kind: "system"
          id: "ProductCatalog"
        - kind: "system"
          id: "UserManagement"
        - kind: "system"
          id: "OrderProcessing"
        - kind: "system"
          id: "ContentManagement"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

The second task focuses on designing relationships between the newly defined "System" elements:

  • User Interface → Product Catalog: The "User Interface" system interacts with the "Product Catalog" system to present products to users and allow browsing and selection.

  • User Interface → User Management: The "User Interface" system communicates with the "User Management" system to manage user authentication and profile-related interactions.

  • User Interface → Order Processing: The "User Interface" system connects with the "Order Processing" system to handle order creation and transaction processing.

  • User Interface → Content Management: The "User Interface" system engages with the "Content Management" system to display dynamic website content to users.

  • User Management → Social Identity Provider: The "User Management" system integrates with external "Social Identity Providers" to ensure secure user authentication and identity verification.

  • Order Processing → Product Catalog: The "Order Processing" system collaborates with the "Product Catalog" system to validate product availability and manage order-related information.

  • Order Processing → Payment Gateway: The "Order Processing" system interfaces with external "Payment Gateway" services to facilitate secure payment processing and transaction completion.

Step #2 - The addition of the relationships in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform"
    - kind: "solution"
      id: "EcommercePlatform"
      relationships:
        - destination: "SocialIdentityProvider"
        - destination: "PaymentGateway"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
        - kind: "system"
          id: "UserManagement"
          relationships:
            - destination: "SocialIdentityProvider"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
        - kind: "system"
          id: "ContentManagement"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

In the third task, we refine the "Ingress" and "Egress" relationships of the "EcommercePlatform" Solution element to enhance clarity and streamline the representation:

  • The "Ingress" relationship from "User" can be removed, as it is now covered by the "User Interface" system. User interactions with the authentication and profile management, catalogs, ordering or content functionalities are now directed to the "User Interface" system.

  • The "Egress" relationship from the "EcommercePlatform" to "Social Identity Provider" can be removed, as it is now covered by the "User Management" system’s integration with "Social Identity Providers" for secure user authentication and identity verification.

  • The "Egress" relationship from the "EcommercePlatform" to "Payment Gateway" can be removed, as it is now covered by the "Order Processing" system’s interaction with external "Payment Gateway" services for secure payment processing and transaction completion.

Step #2 - The removal of useless relationships in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
        - kind: "system"
          id: "UserManagement"
          relationships:
            - destination: "SocialIdentityProvider"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
        - kind: "system"
          id: "ContentManagement"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

Upon refining relationships and elements, we generate detailed views using the "Detailed" viewpoint:

  • Detailed Viewpoint: At this level of abstraction, the "Detailed" viewpoint is most suitable. It provides an in-depth exploration of the interactions between child elements within a given parent element.

  • Ingress and Egress Relationships: The viewpoint showcases the "Ingress" and "Egress" relationships within each "System" element, providing a comprehensive understanding of how functionalities and data flow between systems.

Step #2 - Generate the "Overview" and "Detailed" views
archicode views generate --viewpoint=overview --viewpoint=detailed

The command generates the additional Plantuml files in the ./views/plantuml/application folder.

  • EcommercePlatform.ContentManagement-overview.puml

  • EcommercePlatform.OrderProcessing-overview.puml

  • EcommercePlatform.ProductCatalog-overview.puml

  • EcommercePlatform.UserInterface-overview.puml

  • EcommercePlatform.UserManagement-overview.puml

  • EcommercePlatform-detailed.puml

The view EcommercePlatform-detailed.puml is built upon the "Detailed" viewpoint and focus on the Ingress and Egress relationships where the children of the EcommercePlatform element are involved.

EcommercePlatform detailed
Figure 3. Step #2 - The detailed of the ecommerce platform

The view EcommercePlatform.UserInterface-overview.puml is built upon the "Overview" viewpoint and focus on the Ingress and Egress relationships of the UserInterface element.

EcommercePlatform
Figure 4. Step #2 - The overview of the user interface

The view EcommercePlatform-overview.puml is still available but the drawn relationships are now synthetic ones.

EcommercePlatform overview synthetic
Figure 5. Step #2 - The overview of the ecommerce platform with synthetic relationships

The second step focused on the composition of systems within the e-commerce platform and the relationships between them.

Step #3: Deep dive into User Management

In this step, we shift our focus to the containers that compose the platform’s systems, starting with the "User Management" system, and establish relationships between them.

The first task involves decomposing the "UserManagement" System into distinct "Container" elements, each responsible for specific functionalities:

  • IdentityAndAccessManagement Container: Manages user authentication, login processes, and role-based access control.

  • UserProfile Container: Handles user profile management, including personal information, preferences, and settings.

  • UserProfile Database: Stores and manages user profile data, providing a reliable data source for the UserProfile Container.

Step #3 - The addition container elements in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
        - kind: "system"
          id: "UserManagement"
          relationships:
            - destination: "SocialIdentityProvider"
          elements:
            - kind: "container"
              id: "IdentityAndAccessManagement"
            - kind: "container"
              id: "UserProfileService"
            - kind: "container"
              id: "UserProfileDatabase"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
        - kind: "system"
          id: "ContentManagement"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

The second task focuses on designing relationships between the newly defined "Container" elements:

  • IdentityAndAccessManagement → UserProfileService: The "IdentityAndAccessManagement" Container communicates with the "UserProfileService" Container to provide access to user profile information after successful authentication.

  • UserProfileService → UserProfileDatabase: The "UserProfileService" Container interacts with the "UserProfileDatabase" to store and retrieve user profile data.

Step #3 - The addition container elements in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
        - kind: "system"
          id: "UserManagement"
          relationships:
            - destination: "SocialIdentityProvider"
          elements:
            - kind: "container"
              id: "IdentityAndAccessManagement"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileService"
            - kind: "container"
              id: "UserProfileService"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileDatabase"
            - kind: "container"
              id: "UserProfileDatabase"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
        - kind: "system"
          id: "ContentManagement"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

In the third task, we refine the "Ingress" and "Egress" relationships of the "UserManagement" System element to enhance clarity and streamline the representation:

  • The "Ingress" relationship from "UserInterface" to "UserManagement" is refined to become "UserInterface" → "UserProfileService". This change reflects the more granular interaction between the "UserInterface" and the dedicated "UserProfileService" container, specifically designed to handle user profile-related operations.

  • The "Egress" relationship from "UserManagement" to "SocialIdentityProvider" is refined to become "IdentityAndAccessManagement" → "SocialIdentityProvider". This adjustment aligns with the system’s architecture, where the "IdentityAndAccessManagement" container handles interactions with "Social Identity Providers" for secure user authentication and identity verification.

Step #3 - The addition container elements in .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement.UserProfileService"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
        - kind: "system"
          id: "UserManagement"
          elements:
            - kind: "container"
              id: "IdentityAndAccessManagement"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileService"
                - destination: "SocialIdentityProvider"
            - kind: "container"
              id: "UserProfileService"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileDatabase"
            - kind: "container"
              id: "UserProfileDatabase"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
        - kind: "system"
          id: "ContentManagement"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

Upon refining relationships and elements, we generate detailed views using the "Deep" viewpoint:

  • Deep Viewpoint: At this level of abstraction, the "Deep" viewpoint is relevant. It provides an exploration of the "Ingress" and "Egress" relationships on descendants of a given element, offering a comprehensive understanding of interactions within the system.

  • Ingress and Egress Relationships: The viewpoint showcases the "Ingress" and "Egress" relationships within each "Container" element of the "UserManagement" System, providing detailed insights into how functionalities and data flow within the system.

Step #3 - Generate the views of all viewpoints
archicode views generate

The command generates many Plantuml files in the ./views/plantuml/application folder.

The view EcommercePlatform-deep.puml is built upon the "Deep" viewpoint and focus on the Ingress and Egress relationships involving the descendants of the EcommercePlatform element.

EcommercePlatform deep
Figure 6. Step #3 - The deepness of the ecommerce platform

The view EcommercePlatform.UserManagement-detailed is built upon the "Detailed" viewpoint and focus on the Ingress and Egress relationships involving the children of the UserManagement element.

EcommercePlatform
Figure 7. Step #3 - The detailed of the User Management

The third step focused on the composition of containers within the "User Management" system, the establishment of relationships between them as well as the refinement of existing relationships.

Conclusion

The iterative process outlined in this example serves as a foundational framework for designing and refining the architecture of an e-commerce platform using ArchiCode. It provides a structured approach to create a clear and organized representation of system elements, their relationships, and interactions. However, it is important to recognize that this process acts as a flexible backbone, adaptable to the unique needs and complexities of each architectural endeavor.

Tailoring the Iterative Process:

Each architectural project requires a tailored approach to effectively address its specific requirements. Depending on the project’s scope and goals, the iterative process may be customized to accommodate deeper levels of decomposition, refined naming and qualification of relationships, as well as more detailed descriptions and qualifications of individual elements.

Deeper Decomposition and Naming:

As the design evolves, later iterations may decompose other elements of the architecture, which makes the model more complete. Refining the naming and qualification of relationships also keeps the architecture true to the intended interactions.

Customization for Audience Expectations:

To effectively communicate the architecture to diverse audiences, customization of styling and formatting becomes essential. Tailoring the visual representation to meet the expectations and preferences of stakeholders ensures that the architectural model is accessible and understandable to all parties involved.

Incorporating the Technology Layer:

The final stages of the iterative process may encompass the design of the technology layer, where decisions about technologies, platforms, and frameworks are integrated into the architecture. This step bridges the gap between the high-level conceptual design and the practical implementation of the system.

Tackling view clutter

Introduction

Complex architectural models are hard to read when details and interactions such as authorization or observability make the generated views cluttered. Facets focus the views on one concern.

Archicode introduces the facet concept, a feature engineered to automate the generation of secondary workspaces and refine views to focus on specific concerns. By employing transformation rules based on JSON Path queries, facets effectively remove certain elements and relationships, offering a cleaner, focused view of specific subsets. This feature serves as a bridge from the chaos of detailed expressions to an organized, easily understandable visualization, paving the way for enhanced insights into complex architectural models.

Note
The paths of a facet are standard JSONPath

The json-path of an action is a JSONPath as standardized by RFC 9535. It selects nodes of the workspace, and the REMOVE operator deletes them. The same code evaluates it in the command line and in the editor, so a facet cannot mean one thing in each. Beyond comparisons, a filter can combine tests with &&, || and !, test that a field exists (?(@.label)), look inside a list (?(@.qualifiers[?(@ == 'oidc')])) and call length() or count(). The functions match() and search() (regular expressions) are not available.

The facets written for the previous engine (Jayway) are no longer read since 0.17. A path that uses anyof, noneof, == null or != null is refused, by the command line and by the editor, with one sentence that names the standard form:

error: facet f: the facet path `$.application..elements[?(@.qualifiers anyof ['a'])]` uses `@.qualifiers anyof ['a']`, which is not JSONPath (RFC 9535) and is no longer read: write `@.qualifiers[?(@ == 'a')]`

Nothing is written, and the exit code is 1; the editor shows the same sentence as the error of the diagram, and of a saved view that names the facet, where it used to say that the facet removes the element (it said so for any facet that the kernel refuses, which hid the sentence). Rewrite the paths as follows:

Before Write

@.qualifiers anyof ['a', 'b']

@.qualifiers[?(@ == 'a' || @ == 'b')]

@.qualifiers noneof ['a']

(@.qualifiers && !@.qualifiers[?(@ == 'a')])

@.qualifiers == null

!@.qualifiers

@.qualifiers != null

@.qualifiers

The keys of a facet are written in kebab-case: global-enabled, directory-name-template, hide-unlinked and json-path. The camel-case spelling is no longer read either, and the sentence says which key to write:

error: `.archicode.yaml` is not valid: unknown key `hideUnlinked`, write `hide-unlinked` (known: actions, hide-unlinked, name) at `settings.facets.customs[0].hideUnlinked` (line 5, column 27)

Relationships that have no tag, or no qualifier, simply do not have the field: @.tags['k'] != 'v' selects them, @.tags['k'] == 'v' does not.

Note
The name of a facet is the name of a folder

The name of a facet goes, as it is written, into the name of the folders that hold its views: views-oidc in the steps below, and, next to each step of archicode stories generate, <NN>-<view>-<facet> (see Draw the stories); directory-name-template only says where the name goes. It must therefore be one folder name, and one that every system takes, since a workspace is shared. A name is refused when it:

  • is empty, or is . or ..;

  • holds /, \, a NUL or another control character;

  • holds one of < > : " | ? *, or ends with a dot or a space (the names Windows refuses).

The reserved device names of Windows (CON, NUL, COM1) are not looked at. A name is never rewritten, because two facets could then write in the same folder. Every command that loads the workspace (views generate, stories generate, query graph and diff) refuses a name that is not a folder name before it reads a manifest or writes a file, with one line for each such facet, in the order of the file, exit code 1; the first reason found, from the left of the name, is the one told:

error: the facet name `a/b` cannot be the name of a folder: it holds `/`, which separates the folders of a path (write a plain word, such as `journey`)

archicode plateau list reads the tree of the plateaus only, and archicode editor serve loads nothing: neither looks at the facets. The editor refuses the workspace with the same sentence when it opens the folder, and Add facet, in Settings (see Facets), does not write such a name. A workspace that had a facet called a/b loaded in 0.18.0 and does not now: rename the facet, and its folder if you keep the old one (see [upgrade-0-18]). The facets of every example of this manual use plain words.

Note
A facet can remove an element, and what points at it goes with it

REMOVE is not only for relationships: an action can select elements, such as $.application..elements[?(@.id == 'catalog')]. The element is removed with the elements inside it, and so is everything of the workspace that pointed at it or at one of them: the relationships whose destination is one of them, the entries of uses of an environment, and the entries of applications of a node. The views of the facet are then written without them; they do not stop with dangling reference. The facet says nothing when it does so, it is what it asked for. The workspace and its other facets are untouched.

settings:
  facets:
    customs:
      - name: "without-catalog"
        actions:
          - operator: REMOVE
            json-path: "$.application..elements[?(@.id == 'catalog')]"

With this facet, the view of shop.web in views-without-catalog no longer shows a browses link to shop.catalog, and no view of shop.catalog (the element, or a view of the manifests that is about it) is written for the facet. The same goes for a facet that selects on the state of a comparison ($.application..elements[?(@.change == 'moved')]). A reference that already pointed nowhere before the facet is not hidden by it: it is still reported as a dangling reference. A view of the manifests that is about the removed element, asked for with views generate --view, is an error that names the view and the facet (see [plateau-views-lacking]).

Step #1: Create the main workspace

In this initial phase, establishing a well-defined workspace is paramount. We’re essentially laying down the groundwork where all subsequent actions and implementations will take place. We revert to a previous model - an ecommerce platform - to set this stage, ensuring we have a tangible, relatable context for the steps that will follow.

In this code snippet, we illustrate the initial configuration and elements included in the .archicode.yaml file. This is the foundation upon which the ecommerce platform model is built.

Step #1 - The initial .archicode.yaml
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement.UserProfileService"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
        - kind: "system"
          id: "UserManagement"
          elements:
            - kind: "container"
              id: "IdentityAndAccessManagement"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileService"
                - destination: "SocialIdentityProvider"
            - kind: "container"
              id: "UserProfileService"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileDatabase"
            - kind: "container"
              id: "UserProfileDatabase"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
        - kind: "system"
          id: "ContentManagement"
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

Here, we execute a command to generate the views for all viewpoints. It renders the initial complex view of the ecommerce platform, laying down the groundwork for further refinement.

Step #1 - Generate the views of all viewpoints
archicode views generate --view=EcommercePlatform-deep

This PlantUML diagram represents the deep view of the ecommerce platform in its initial state. At this stage, all elements and relationships are visible, offering a comprehensive, albeit complex, view of the entire system.

EcommercePlatform deep initial
Figure 8. Step #1 - The deep view of the ecommerce platform

At the end of this step, we have a fully initialized workspace with the ecommerce platform model. The view is complete but also complex and overwhelming; facets, in the steps that follow, refine it.

Step #2: Design the authorization concern

The second phase integrates the authorization concern into the model. This step validates Access Tokens, so that every component of the ecommerce platform interacts securely with the Access component services.

In the context of the ecommerce platform, every component’s interaction is bound by the validation of Access Tokens. We’re designing relationships between the components of the ecommerce platform and the Access component, all qualified with the term oidc.

We expand the .archicode.yaml file to add the oidic relationships. They capture the connections between the ecommerce platform components and the Access component, and emphasize the validation of Access Tokens.

Step #2 - The .archicode.yaml with the oidc relationships
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement.UserProfileService"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
          relationships:
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
        - kind: "system"
          id: "UserManagement"
          elements:
            - kind: "container"
              id: "IdentityAndAccessManagement"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileService"
                - destination: "SocialIdentityProvider"
            - kind: "container"
              id: "UserProfileService"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileDatabase"
                - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
                  qualifiers: ["oidc"]
            - kind: "container"
              id: "UserProfileDatabase"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
        - kind: "system"
          id: "ContentManagement"
          relationships:
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"

A command is executed to refresh the views, reflecting the newly integrated authorization relationships. This allows for a visualization of how the authorization concern is woven into the ecommerce platform model.

Step #2 - Generate the views of all viewpoints
archicode views generate --view=EcommercePlatform-deep

With the inclusion of authorization relationships, the PlantUML diagram unveils a more detailed view of the ecommerce platform. The oidc relationships are distinctly highlighted, offering insights into the integration of the authorization concern.

EcommercePlatform deep authorization
Figure 9. Step #2 - The deep view of the ecommerce platform

By the end of Step #2, the authorization concern is part of the ecommerce platform model. The oidc relationships are now visible, which makes the view more detailed but also more complex. This is why the following steps use the facet feature of Archicode to refine and focus the views.

Step #3: Define the authorization facet

Step 3 defines the facet for authorization, to focus on specific architectural elements and relationships. The objective is to streamline the view, so that authorization concerns are highlighted and easy to interpret.

The facet definition is embodied in the creation of the oidc facet within the workspace configuration. This facet, named oidc, filters out elements and relationships that aren’t tagged with the term oidc. The result is a refined view where authorization concerns are not just visible but are the focal point, enabling a deeper, uncluttered insight into these specific interactions.

The .archicode.yaml file is enhanced with the definition of the oidc facet. This inclusion is a significant stride towards achieving a tailored view that zeroes in on the authorization aspects of the architecture.

Step #3 - The .archicode.yaml with the facet definition
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement.UserProfileService"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
          relationships:
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
        - kind: "system"
          id: "UserManagement"
          elements:
            - kind: "container"
              id: "IdentityAndAccessManagement"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileService"
                - destination: "SocialIdentityProvider"
            - kind: "container"
              id: "UserProfileService"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileDatabase"
                - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
                  qualifiers: ["oidc"]
            - kind: "container"
              id: "UserProfileDatabase"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
        - kind: "system"
          id: "ContentManagement"
          relationships:
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"
settings:
  facets:
    customs:
      - name: "oidc"
        actions:
          - operator: "REMOVE"
            json-path: "$.application..relationships[?(!@.qualifiers[?(@ == 'oidc')])]"

With the oidc facet defined, we re-run the command to generate the views. The outcome is a set of refined visuals where the focus is intensively on the odic qualified relationships and elements.

Step #3 - Generate the views of all viewpoints
archicode views generate --view=EcommercePlatform-deep

The transformation is visualized in this updated PlantUML diagram. It presents a view where the clutter is minimized, and the spotlight is on the odic relationships, offering a clear perspective of the authorization dynamics within the ecommerce platform.

EcommercePlatform deep facet
Figure 10. Step #3 - The oidc deep view of the ecommerce platform

Concluding Step 3, the oidc facet is integrated: it turns a broad, complex view into a focused visualization of the authorization concern.

Step #4: Define the main facet

In this step, we transition from the specific authorization focus, reintegrating into the broader view of the ecommerce platform. However, the approach is refined; we’re disabling the default facet and defining a new one named main to effectively manage the detailed views.

This newly defined main facet is crucial; it’s a tool that filters out all relationships tagged with the term oidc. The outcome is a holistic yet focused view of the ecommerce platform, excluding the specific authorization elements, for a balanced and comprehensive perspective.

The .archicode.yaml is updated to include the definition of the main facet. This acts as a filter, excluding the oidc qualified relationships, thus providing a clearer view of the primary architecture without the specific authorization elements.

Step #4 - The .archicode.yaml with the facet definition
application:
  elements:
    - kind: "person"
      id: "User"
      relationships:
        - destination: "EcommercePlatform.UserInterface"
    - kind: "solution"
      id: "EcommercePlatform"
      elements:
        - kind: "system"
          id: "UserInterface"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "EcommercePlatform.UserManagement.UserProfileService"
            - destination: "EcommercePlatform.OrderProcessing"
            - destination: "EcommercePlatform.ContentManagement"
        - kind: "system"
          id: "ProductCatalog"
          relationships:
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
        - kind: "system"
          id: "UserManagement"
          elements:
            - kind: "container"
              id: "IdentityAndAccessManagement"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileService"
                - destination: "SocialIdentityProvider"
            - kind: "container"
              id: "UserProfileService"
              relationships:
                - destination: "EcommercePlatform.UserManagement.UserProfileDatabase"
                - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
                  qualifiers: ["oidc"]
            - kind: "container"
              id: "UserProfileDatabase"
        - kind: "system"
          id: "OrderProcessing"
          relationships:
            - destination: "EcommercePlatform.ProductCatalog"
            - destination: "PaymentGateway"
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
        - kind: "system"
          id: "ContentManagement"
          relationships:
            - destination: "EcommercePlatform.UserManagement.IdentityAndAccessManagement"
              qualifiers: ["oidc"]
    - kind: "system"
      id: "SocialIdentityProvider"
    - kind: "system"
      id: "PaymentGateway"
settings:
  facets:
    global-enabled: false
    customs:
      - name: "main"
        actions:
          - operator: "REMOVE"
            json-path: "$.application..relationships[?(@.qualifiers[?(@ == 'oidc')])]"
      - name: "oidc"
        actions:
          - operator: "REMOVE"
            json-path: "$.application..relationships[?(!@.qualifiers[?(@ == 'oidc')])]"

A regeneration of the views is executed to reflect the integration of the main facet. This provides a fresh perspective where the specific authorization elements are filtered out, offering a cleaner, uncluttered view of the ecommerce platform’s primary architecture.

Step #4 - Generate the views of all viewpoints
archicode views generate --view=EcommercePlatform-deep

This updated PlantUML diagram illustrates the ecommerce platform’s architecture with the main facet applied. It’s a visual representation that offers insights into the primary elements and relationships, free from the specific OIDC authorization elements.

EcommercePlatform deep main
Figure 11. Step #4 - The main deep view of the ecommerce platform

By the closure of Step 4, we have not only successfully defined but also effectively applied the main facet. It reveals a balanced view, where the specific authorization elements are excluded, ensuring that the primary architectural elements and relationships of the ecommerce platform are the focal point. It’s a testament to the adaptability and precision that the facet feature introduces to Archicode, affirming its role in enhancing the visualization and management of complex architectural designs.

Conclusion

Facets streamline complex workspace views: each step of this guide showed a facet isolating one concern, so that the view keeps what is needed to read it.

A tutorial: from one workspace to a review of the changes

The tutorial builds the example domain_plateaus of this manual, an invented bookshop, from the architecture it has today to a review of the changes in the editor, including the things that change shape. Its commands run in the folder of .archicode.yaml; the output quoted is the one the commands print.

Step 1. Start from the architecture you have. An existing workspace is already your first plateau: its manifests are the root, baseline, and nothing in them has to change, not even a header. To keep the next plateaus in folders beside them, move the manifests to a folder of their own and read it with a path that ends in /** (see Manifests in folders); the folder does not have to be called baseline, the name is for the reader.

mkdir -p plateaus/baseline
mv manifests/* plateaus/baseline/
.archicode.yaml
# the plateaus are layers. The manifests in `plateaus/baseline` say no `plateau:`: they are the root, `baseline`, the architecture as it
# is. The manifests in `plateaus/to-be` say `plateau: "to-be"`: they are the layer that builds on it, with the patches of its
# `plateau.to-be.yaml`. The folders are only a habit; the tools read the `plateau:` of the header, not the folder.
settings:
  name: "Bookshop"
  manifests:
    paths: ["plateaus/**"]

A manifest of kind archicode.morin.io/plateau is optional for the root. This one only gives it a name and a horizon, and the tools show them (baseline is its id, and cannot be another):

plateaus/baseline/plateau.baseline.yaml
header:
  kind: "archicode.morin.io/plateau"
  version: "1"
content:
  # the root of the plateaus: its manifests say no `plateau:`. This manifest only gives it a name and a horizon
  id: "baseline"
  name: "As is"
  horizon: "2026-Q3"

archicode plateau list shows the tree, which is a root for now:

archicode plateau list
PLATEAU   PARENT  SOURCE                                            NAME   HORIZON
baseline  -       manifest plateaus/baseline/plateau.baseline.yaml  As is  2026-Q3

A workspace that names no plateau (no manifest of that kind, no plateau: in a header) is not a workspace of plateaus: it lists baseline alone, implicit, and generates its views in views, as ever. Once a plateau is named, even the root, the views of a plateau go to a folder named after it, here views-baseline (and views-baseline-<facet> for the facets, as the directory-name-template of the facets says). Move or update what reads the old folder.

plateaus/baseline/shop.yaml
header:
  kind: "archicode.morin.io/system"
  version: "1"
content:
  id: "shop"
  name: "Shop"
  elements:
    - kind: "container"
      id: "web"
      name: "Web site"
      description: "The front of the shop."
      relationships:
        - destination: "shop.catalog"
          label: "reads"
        - destination: "shop.mailer"
          label: "sends mails with"
    - kind: "container"
      id: "catalog"
      name: "Catalog"
      description: "The books on sale."
    - kind: "container"
      id: "mailer"
      name: "Mailer"
    - kind: "container"
      id: "orders"
      name: "Orders"
      description: "Takes the basket and the order of a customer."
    - kind: "container"
      id: "invoices"
      name: "Invoices"
      description: "Writes an invoice for each order."
    - kind: "container"
      id: "receipts"
      name: "Receipts"
      description: "Sends a receipt for each payment."
    - kind: "container"
      id: "reviews"
      name: "Reviews"
      description: "Readers rate the books they bought."

Step 2. Add the plateau of the future. A plateau is two things: a manifest of kind archicode.morin.io/plateau, which says what it overrides and what it changes, and the manifests of the elements it adds, which say plateau: "to-be" in their header. Create the folder plateaus/to-be, and in it plateau.to-be.yaml, which for now only names the plateau (its patches come in step 3), and, for instance, the container ratings:

plateaus/to-be/plateau.to-be.yaml, to begin with
header:
  kind: "archicode.morin.io/plateau"
  version: "1"
content:
  id: "to-be"
  name: "To be"
  horizon: "2027-Q1"
  override: "baseline"

The other container manifests of the layer (payments.yaml, cart.yaml, checkout.yaml, billing.yaml) and the manifests of the root that this page does not show (customer.yaml, warehouse.yaml) are in src/doc/examples/domain_plateaus: copy them from there to follow the steps.

plateaus/to-be/ratings.yaml
header:
  kind: "archicode.morin.io/container"
  version: "1"
  plateau: "to-be"
  parent: "shop"
content:
  id: "ratings"
  name: "Ratings"
  description: "Readers rate the books they have bought."

Its parent is the system shop, which only the root declares: a layer can put an element under any element of the plateaus it stands on. The tree has a second plateau now:

PLATEAU   PARENT    SOURCE                                            NAME   HORIZON
baseline  -         manifest plateaus/baseline/plateau.baseline.yaml  As is  2026-Q3
to-be     baseline  manifest plateaus/to-be/plateau.to-be.yaml        To be  2027-Q1

The folder plateaus/to-be holds what the layer adds, nothing of what it inherits. The command line and the editor read it as the plateau to-be because of the headers, not because of the name of the folder.

Step 3. Change what the layer inherits. In the example, shop.payments is added, shop.mailer is removed, shop.web gets the qualifier React and its relationships change, a description is reworded, and four things change shape: the orders are split in two, the invoices and the receipts become one, the reviews are rewritten as the ratings, and the inventory moves from the shop to another system, the warehouse. What is added is manifests (payments.yaml, cart.yaml, checkout.yaml, billing.yaml, ratings.yaml, inventory.yaml); what is removed or changed is the patches of the plateau, which are applied in this order (see [plateau-patches]):

plateaus/to-be/plateau.to-be.yaml
header:
  kind: "archicode.morin.io/plateau"
  version: "1"
content:
  id: "to-be"
  name: "To be"
  horizon: "2027-Q1"
  override: "baseline"
  patches:
    # what the new containers replace, and what is no longer done
    - operator: REMOVE
      target: "shop.mailer"
    - operator: REMOVE
      target: "shop.orders"
    - operator: REMOVE
      target: "shop.invoices"
    - operator: REMOVE
      target: "shop.receipts"
    - operator: REMOVE
      target: "shop.reviews"
    - operator: REMOVE
      target: "shop.inventory" # it moved to the warehouse: `inventory.yaml` says so
    # the web site
    - operator: SET
      target: "shop.web"
      field: qualifiers
      value: ["React"]
    - operator: SET
      target: "shop.web"
      field: relationships
      where: {destination: "shop.catalog", label: "reads"} # the one relationship that has this destination and this label
      value: {label: "browses"}
    - operator: ADD
      target: "shop.web"
      field: relationships
      value: {destination: "shop.payments", label: "pays with"}
    - operator: SET
      target: "shop.catalog"
      field: description
      value: "The books that are on sale."
    # what pointed at the inventory follows it
    - operator: ADD
      target: "warehouse.picking"
      field: relationships
      value: {destination: "warehouse.inventory", label: "counts with"}
  • Six REMOVE: what the new containers replace, and what is no longer done. A REMOVE takes the element with what is in it and what points at it, and archicode diff lists what it took besides the element (step 5).

  • A SET of the qualifiers of shop.web; a SET with where that relabels the one relationship of shop.web towards shop.catalog (the same patch that the editor writes when you change a relationship); an ADD of the relationship towards shop.payments.

  • A SET of the description of shop.catalog: the wording of the description is the only change of that element.

  • An ADD of a relationship to warehouse.picking: what pointed at the inventory follows it. The REMOVE of shop.inventory took the link that picking had, and the inventory is a new container of the warehouse in inventory.yaml.

shop.payments still carries the tag rendering-stereotypes: "new" that its author wrote by hand: it works as before, and the comparison does not need it. In the comparison its word agrees with the state new, so nothing is said; when a hand-written word and the comparison disagree, the command says so on its error output (see [plateau-state-tags]).

A patch that no longer fits is an error that names the plateau, the rank of the patch and its selector. With a typo in the target of the description’s SET (shop.catalogue):

error: plateau to-be: patch 10 (SET target shop.catalogue): selects nothing, there is no element shop.catalogue in the application layer

Step 4. Say what moved, was split or merged. Compare the two plateaus. Read by their references alone, shop.orders, shop.invoices, shop.receipts, shop.reviews and shop.inventory (with its child) are gone, and cart, checkout, billing, ratings and warehouse.inventory (with its child) are new, with nothing that links them. Some of them are the same things, and only you know which, so you say it with replaces on the elements of the more recent plateau (see Saying what an element replaces):

  • shop.orders was split: cart and checkout both say replaces: ["shop.orders"].

  • shop.invoices and shop.receipts were merged: billing lists both in its replaces.

  • shop.inventory moved to the warehouse. It is a manifest of its own, with the parent of its header, and plateaus/to-be/inventory.yaml says parent: "warehouse" and replaces on the container and on its child levels: a container that moves takes none of its children by itself.

  • shop.ratings says nothing, on purpose: it will show a candidate in step 6.

plateaus/to-be/inventory.yaml
header:
  kind: "archicode.morin.io/container"
  version: "1"
  plateau: "to-be"
  parent: "warehouse"
content:
  id: "inventory"
  name: "Inventory"
  description: "Counts the books on the shelves."
  replaces:
    - "shop.inventory" # the inventory moved from the shop to the warehouse
  elements:
    - kind: "component"
      id: "levels"
      name: "Levels"
      description: "The count of each book."
      replaces:
        - "shop.inventory.levels" # what is inside a moved element says it too

In plateaus/baseline, inventory.yaml has the same content with parent: "shop" and no replaces, and warehouse.yaml holds the system warehouse with its container picking. What points at a moved element follows it, but only if you say it: picking counts with shop.inventory in the root, and the layer’s last patch adds the link to warehouse.inventory, so that the comparison does not read it as a change of picking.

Step 5. Ask what changed. archicode diff compares the plateau that is drawn by default, the last one, with the plateau it overrides:

archicode diff
comparing to-be (To be) with baseline (As is)
elements      +2 ~2 -2
replacing     2 moved, 2 split, 1 merged
relationships +1 ~1 -1
wording only  1 of the 2 changed elements

CHANGE   THING         LAYER        REFERENCE                                   NATURES                                                                     DETAILS
merged   element       application  shop.billing                                -                                                                           from shop.invoices, shop.receipts; name: "Billing"
split    element       application  shop.cart                                   -                                                                           from shop.orders; name: "Cart"; split with shop.checkout
changed  element       application  shop.catalog                                description (wording only)                                                  description: "The books on sale." -> "The books that are on sale."
split    element       application  shop.checkout                               -                                                                           from shop.orders; name: "Checkout"; split with shop.cart
removed  element       application  shop.mailer                                 -                                                                           name: "Mailer"
new      element       application  shop.payments                               -                                                                           name: "Payments"
new      element       application  shop.ratings                                -                                                                           name: "Ratings"
removed  element       application  shop.reviews                                -                                                                           name: "Reviews"
changed  element       application  shop.web                                    qualifiers,relationships-added,relationships-removed,relationships-changed  qualifiers: +React
moved    element       application  warehouse.inventory                         -                                                                           from shop.inventory; name: "Inventory"
moved    element       application  warehouse.inventory.levels                  -                                                                           from shop.inventory.levels; name: "Levels"
changed  relationship  application  shop.web -> shop.catalog (browses)          label                                                                       label: "reads" -> "browses"
removed  relationship  application  shop.web -> shop.mailer (sends mails with)  -
new      relationship  application  shop.web -> shop.payments (pays with)       -

candidates, not applied (each pair looks like one thing said twice; to accept one, write `replaces: [FROM]` on the element TO)
LAYER        FROM          TO            REASONS
application  shop.reviews  shop.ratings  description

cascade of the removals (what a REMOVE took besides the elements it selects, in the plateaus the target adds to the one it is compared with)
PLATEAU  PATCH                           EFFECT   LAYER        ELEMENT                DETAIL
to-be    1 REMOVE target shop.mailer     dropped  application  shop.web               relationships: shop.mailer (sends mails with)
to-be    6 REMOVE target shop.inventory  removed  application  shop.inventory.levels
to-be    6 REMOVE target shop.inventory  dropped  application  warehouse.picking      relationships: shop.inventory (counts with)

The NATURES column says what changed in an element that changed (here qualifiers and the relationships of shop.web, description (wording only) for the catalog), and the DETAILS column says from what and to what. Two elements changed, one only by its wording, and two moved, two were split and one merged: the table says in each row what changed or where the element came from (see Compare plateaus for the options and the other formats). The replaced elements have no row and are not counted as removed, and shop.mailer and shop.reviews are, because nothing replaces them. The last section is the cascade of the REMOVE patches (see [plateau-cascade]): the removal of the mailer took the link of the web site towards it (patch 1), and the removal of the inventory took its component levels and the link of picking (patch 6). Nothing is written, and a difference is not an error, unless you ask for it to be: archicode diff --fail-on removed,moved prints the same table and exits with the code 3, because the example has removed and moved elements (a state the plateau does not hold gives 0; see Compare plateaus). That is the line to put in a build that must not let a removal through.

Step 6. Decide about the candidates. The candidate section is a pair: shop.reviews is removed, shop.ratings is new, they are of the same kind in the same layer and their descriptions share most of their words, so the comparison thinks they may be one thing said twice (see [plateau-candidates]). It never applies a candidate. If it is the same thing, write replaces: ["shop.reviews"] on ratings: ratings becomes a moved element (moved, natures name,description, from shop.reviews), the counts read elements +1 ~2 -1 and replacing 3 moved, 2 split, 1 merged, and the table lists a new, weaker candidate, shop.mailer to shop.payments with the reason parent: with the reviews and the ratings settled they are the only removed and the only new container of the shop. They are not the same thing, and the answer is to do nothing. If the reviews and the ratings are not the same thing either, do nothing, as this example does, and the output stays as it is. The editor writes the line for you (step 8).

Step 7. Draw the comparison. views generate writes the views of a plateau, and the views of the comparison next to them (with the plateau it overrides, or the one --against names):

archicode views generate
$ ls
plateaus
views-to-be
views-to-be-vs-baseline
.archicode.yaml
$ ls views-to-be-vs-baseline
gap.json
gap.md
plantuml

(The ls shows what a clean folder shows; a folder that already had manifests or views-baseline still has them: they are not removed.) views-to-be holds the views of the plateau, as for any workspace. views-to-be-vs-baseline holds the views of the comparison, and gap.md and gap.json, the table of changes of step 5 in a file that a pull request can carry (with the cascade, the key cascade of the JSON). archicode views generate --only-changes draws, in views-to-be-vs-baseline only, what changed and the context faded: the views of views-to-be and the table stay as they are. Every box and every link of these views that changed says its state with a mark and a line style, and the views that have a change have a legend. The overview of the container shop.web:

plateaus shop web overview
Figure 12. The overview of shop.web in views-to-be-vs-baseline

shop.web and shop.catalog are changed (dotted outline, ~), shop.payments is new (thick outline, `), `shop.mailer` is removed (dashed, struck title, `−`), and the system `shop`, which did not change by itself, _contains changes_ (`±`). The links say it the same way: ` pays with is new, − sends mails with is removed, and the label of shop.web to shop.catalog changed, from reads to browses.

The detailed view of the system shop draws what was split and merged. The titles say where the boxes came from, (from shop.orders) and (from shop.invoices, shop.receipts), and the legend has one line for each of the two states, with dashes that tell them from the others. shop.ratings is new and shop.reviews removed: the candidate is not drawn.

plateaus shop detailed
Figure 13. The detailed view of shop in views-to-be-vs-baseline

The inventory is drawn where it is now, in the warehouse, with → and (from shop.inventory). The view of its child levels shows the container and the component that moved together, each with the reference it came from.

plateaus levels overview
Figure 14. The overview of levels in views-to-be-vs-baseline

Step 8. Look at it in the editor. archicode editor serve opens the folder in your browser (see Serve the editor).

The editor opens the plateau of the address (plateau=), else the one this browser drew last in this folder, else the one settings.current names, else the root, baseline: here the root. The command line, without a name, draws the last plateau.

  1. The top bar has four buttons, Timeline, Stories, Files and Settings. Timeline opens Applications and has four pages, in a bar of their own: Plateaus, Applications, Environments and Elements. On those four pages, and on those only, the band under the top bar has two lists: Plateau, which draws a plateau in the whole editor, and Compare with, which shows the same tree of plateaus under Nothing and Past. Choose To be in Plateau (see The band of plateaus). The page Plateaus says the same as a tree: one entry for each plateau, with its name, its horizon and what it brings over the plateau it overrides (chips such as + 2 new, ~ 2 changed and − 2 removed), and it is where a plateau is written (see The Plateaus page).

  2. In Compare with, choose Past (follows the plateau drawn): Applications shows the states, the new, changed, removed, moved, split and merged boxes, and the key under the drawing is the legend (see Comparing two plateaus in the editor). Past is the plateau To be overrides, here As is; choosing As is in the tree below it is read the same way. The tree lists every other plateau (the plateau drawn is greyed in it), so that a plateau that overrides the one drawn, or any other, is compared with by choosing it there.

  3. Plateaus, Applications, Environments and Elements, and Stories while a comparison is on, have the Changes panel on the right: the counts (+ 2 new, ~ 2 changed, − 2 removed, → 2 moved, ⋔ 2 split, ⊕ 1 merged for the elements), the candidates, the Cascade of the removals with the three rows of step 5, then every element and relationship that changed. They are the rows of step 5, in the same words. Next change and Previous change walk through them, one by one, and the lists State and Layer narrow what is read; a click on a row shows it (see The Changes panel).

  4. Select a changed element in Elements: the block What changed gives each property Before and After and its relationships that changed; for a moved, split or merged element it says what it replaces (see What changed). The page of the element says where each value comes from: for Web site, the name and the description are inherited from baseline and the qualifiers are set by patch 7 of to-be (SET target shop.web).

  5. Changes only, in the toolbar of a diagram, keeps what changed and the boxes needed to place it, and Hide wording-only changes sets the rewording aside (see Changes only and wording-only changes).

  6. Under the counts, the Candidates section proposes the pair of step 6, Reviews and Ratings, with its reason, close description. Write replaces adds replaces: [shop.reviews] to ratings in the manifest that declares it, plateaus/to-be/ratings.yaml, and changes nothing else in the file; ratings is now moved, the counts read → 3 moved, and Save all changes writes the file. With the clear pair resolved, the comparison proposes a weaker one: Mailer and Payments are now the only removed and the only new container under shop, which is the reason it gives (the only two of their kind under the same parent). They are not the same thing, so Not related is the answer (see Moved, split and merged elements, and candidates).

  7. A change is written in the plateau that is drawn. In To be, select Web site, Edit, change its description and Save all changes: the description comes from baseline, so the editor adds one SET patch at the end of the patches of plateaus/to-be/plateau.to-be.yaml and leaves plateaus/baseline/shop.yaml as it was. The same edit made in As is, on a field that to-be inherits (the description of Picking), writes the root and, because to-be sees the change, asks first (Writing in baseline changes other plateaus, with the list of the plateaus) (see Writing in a plateau).

  8. Move puts an element under another parent (or, for a kind that may be a root, at the top level), with what is inside it, and rewrites the references to it (see Moving an element under another parent); it moves an element that the plateau drawn declares, such as Ratings of to-be, and refuses one it inherits. Move writes no replaces.

  9. Stories lists the stories and the views of the workspace, whatever plateau is drawn. The story From the shop to the new shop (plateaus/story.migration.yaml, the file shown in [story-step-plateaus]) tells it in four steps: Play opens the story in a window of its own that covers the editor and plays it like slides, and each step that says at and against is drawn at that plateau and with that comparison, so that the first step shows the shop of As is and the second the shop of To be with what changed marked; the slide says Plateau To be · compared with As is, and closing it leaves the editor as it was (see Stories: stories and views and [editor-story-player]). Show on diagram, on a step, draws that step on the editing diagram instead, and the bar over it says told at To be, compared with As is.

  10. Files lists every file, in a group for each plateau: As is with its five manifests, To be with its seven, and, last, No plateau with the story, which belongs to none (see Files).

A change is written in the plateau that is drawn; the comparison itself writes nothing (see Writing in a plateau).

Step 9. Go on. To prepare the state after to-be, write another manifest of kind archicode.morin.io/plateau with override: "to-be" and the manifests that say plateau: "later":

plateaus/later/plateau.later.yaml
header:
  kind: "archicode.morin.io/plateau"
  version: "1"
content:
  id: "later"
  name: "Later"
  horizon: "2028-Q1"
  override: "to-be"
  patches:
    - operator: REMOVE
      target: "shop.checkout"
plateaus/later/search.yaml
header:
  kind: "archicode.morin.io/container"
  version: "1"
  plateau: "later"
  parent: "shop"
content:
  id: "search"
  name: "Search"
  description: "Finds a book by its title."

The plateaus still form one line, so later is now the plateau that is drawn by default, and it is compared with the plateau it overrides:

archicode diff
comparing later (Later) with to-be (To be)
elements      +1 ~0 -1
relationships +0 ~0 -0
wording only  0 of the 0 changed elements

CHANGE   THING    LAYER        REFERENCE      NATURES  DETAILS
removed  element  application  shop.checkout  -        name: "Checkout"
new      element  application  shop.search    -        name: "Search"

(The command also prints, on the error output, the warning of step 3 about the hand-written new of shop.payments: against to-be that element did not change, so the word is only the author’s.) archicode diff --plateau later --against baseline compares the last plateau with the first one, and archicode plateau list shows the three. When two plateaus override the same one, the tree forks and the commands ask for the plateau with --plateau (see [plateau-choose]); the editor opens the plateau of the address, else the one you drew last, else the one settings.current names (which Settings can write, see The current plateau), else the root.

Step 10. Put it away. A plateau can be deleted in the editor, from the page Plateaus (see The Plateaus page): Delete opens a dialog that lists the files that go, here plateaus/later/plateau.later.yaml and plateaus/later/search.yaml, and nothing else. Had another plateau overridden later, the dialog would also have said which plateaus go under its parent and what they lose. The files leave the disk at the next Save all changes. The command line deletes nothing: remove the files by hand, and the folders views-later and views-later-vs-to-be that views generate wrote, if you made them.

How-to guides

Check the architecture in a build

A build can fail when a plateau changes what you said it must not change. The check compares one plateau with another one: the to-be plateau must not remove or move what the baseline plateau has. A comparison with an earlier commit of the same plateau is not offered; keep the plateau you guard against as a plateau of its own (see Plateaus). The examples below use domain_plateaus, the bookshop of the tutorial, and run in the folder of its .archicode.yaml.

First, load the workspace. archicode query graph reads every manifest and prints the graph. It exits with 1 and one error: line per problem when a reference dangles or a manifest is wrong, so the build stops before the comparison does. There is no validate command; this is the check.

archicode query graph > /dev/null

Then, compare. diff --fail-on takes the states that fail the build, separated by commas: new, changed, removed, moved, split, merged, contains-changes or any (see Compare plateaus for what each means). List the states you refuse. any fails on every change, which is a review and not a guard.

archicode diff --plateau to-be --against baseline --fail-on removed,moved

Read the exit code. A script tells three situations apart, and the codes are defined once, in Errors, warnings and exit codes.

Code What it says

0

Nothing of a listed state changed, or the comparison was not asked to fail.

1

The check could not run: the workspace is wrong, or a plateau or a state is unknown. One error: line on the error output.

2

The check could not run: a usage error, such as an option that does not exist.

3

The comparison holds a change of a listed state: the architecture changed.

Treat 3 as "the architecture changed" and 1 and 2 as "the check could not run".

Show the changes in the pull request. --format markdown prints the table as Markdown, and --no-wording leaves out the changes that only reword a text. Write it to a file and post it with the tool of your service.

archicode diff --plateau to-be --against baseline --format markdown --no-wording > changes.md

The job. This job of GitHub Actions runs both commands from the OCI image, which needs no Java on the runner (without the image, the program needs Java 25 or the native file, see Install). The job only reads files: it holds no secret and no deploy step. Pin the image to a release tag, as for any build tool: the release image is tagged with the version of the project, the number archicode --version prints, as the release workflow sets it (the registry was not checked for this page). The name without a tag is the latest build of the main branch, not a release.

jobs:
  architecture:
    runs-on: ubuntu-latest # runner
    env:
      ARCHICODE_VERSION: "0.0.0" # replace with the release you use
    steps:
      - uses: actions/checkout@v4 # runner
      - run: docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workdir" -w /workdir ghcr.io/tmorin/archicode:${ARCHICODE_VERSION} query graph
      - run: docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workdir" -w /workdir ghcr.io/tmorin/archicode:${ARCHICODE_VERSION} diff --plateau to-be --against baseline --fail-on removed,moved

The lines marked # runner belong to GitHub Actions, as do jobs, env, steps, uses and run. The arguments after the image name are ArchiCode’s: the same two commands as above. For another service, run the same two commands and read the exit code as the table says.

Work with an agent

This page is for an agent (a program that reads text and writes files) that has the program and nothing else, and for whoever starts one. It gives the order of use. The guide holds the content; this page does not copy it.

Read the guide once. archicode guide prints a Markdown guide on the standard output. Its first line, archicode guide <version>, tells which version of the tool it describes. It is self-contained and needs no workspace (see Print the guide for an agent).

archicode guide

Start from a workspace that works. archicode init writes a small workspace that loads and is drawn, and never overwrites a file (see Start a workspace).

archicode init my-architecture

Loop: write, load, draw. Write or change a manifest, load the workspace with archicode query graph, then draw with archicode views generate. Each problem is one error: line on the error output, and only the first one found is reported, so fix it and run the command again. There is no validate command: loading the workspace is the check. The exit codes are in Errors, warnings and exit codes.

archicode query graph -w my-architecture/.archicode.yaml > /dev/null
archicode views generate -w my-architecture/.archicode.yaml

Ask for the exact shape of a kind. archicode query schemas manifest prints one JSON object. The content of a kind is in kinds[<header.kind>].content. What a schema cannot say is in the guide (see [manifest-schema]).

archicode query schemas manifest

Read a model before writing one. The folder docs/architecture of a clone of the repository is the ArchiCode model of ArchiCode. Load it, then follow the relationships of an element by their source and destination and by their qualifiers.

archicode query graph -w docs/architecture/.archicode.yaml

The same model opens in the editor: the ArchiCode model in the editor.

Ask the tool before the code. To know what depends on an element, query the graph instead of searching the files. This line lists what has a relationship to PaymentGateway:

archicode query graph | jq '.relationships[] | select(.relationship.destination=="PaymentGateway") | .source'

To ask what a change to one element touches, use query impact (see Query impact). It lists the elements that point at PaymentGateway, with their distance, in one call:

archicode query impact PaymentGateway

To check that a change did not remove or move what a plateau holds, use diff --fail-on (see Check the architecture in a build).

Best Practices

The Best Practices part holds the guidelines below, from the design of a model to the organization of its source code.

  • Design Guidelines: how to shape a model that stays cohesive and readable.

  • Source Code Organization: how to organize the manifests so that the source mirrors the architecture and stays easy to share.

To check the architecture in a build or to work with an agent, see Check the architecture in a build and Work with an agent.

Design Guidelines

Incremental and In-Depth Design Approach

ArchiCode advocates an architectural design philosophy characterized by incremental refinement and in-depth exploration. This approach helps architects craft well-structured and comprehensive designs. The tenets of this methodology are:

  • Iterative Refinement: ArchiCode encourages an iterative process. The model evolves incrementally, starting from the highest levels of abstraction and cascading down to the minutiae of detail. This iterative refinement ensures a nuanced and coherent architectural representation.

  • Layered Depth: With each iteration, the model’s depth is progressively enriched. As elements are introduced, relationships between them are also refined, layer by layer. This gradual deepening ensures that architectural intricacies are meticulously captured, leading to a holistic and accurate depiction.

  • Relationship Refinement: Just as elements undergo iterative enhancements, relationships between them also follow the same iterative path. The relationships are fine-tuned and perfected, aligning with the evolving architectural narrative.

  • Clarity in Relationship Hierarchy: ArchiCode lets architects prune relationships for clarity. In instances where higher-level relationships are encompassed by those of lower levels, these higher-level relationships can be refined or omitted, ensuring that the architectural landscape remains lucid and uncluttered.

  • Synthetic Relationship Generation: A distinctive feature of ArchiCode’s built-in Viewpoints lies in their ability to generate synthetic relationships. This intentional design prevents sibling relationships from infiltrating the views, preserving the purity and coherence of each view’s focus.

By following ArchiCode’s incremental and in-depth design approach, architects refine their models iteratively. This methodology ensures that architectural designs are comprehensive, well-structured, intelligible, and free of unnecessary clutter.

Source Code Organization

Organizing your source code well is a cornerstone of successful architectural work. The best practices for structuring your source code with ArchiCode are:

  • Workspace Dynamics: The workspace file, named .archicode.yaml by default, serves as a centralized repository for your architectural data.

  • Scaling Challenges: As the architecture grows, the workspace file may expand and become hard to manage. ArchiCode therefore introduces manifests: a manifest holds a single architectural resource, so complex elements split into distinct resources. Manifest discovery is on by default: ArchiCode detects manifests in the "manifests" folder, a sibling of the workspace file.

Example of an ArchiCode project directory
- project_dir/ (1)
    - manifests/ (2)
        - application/ (3)
            - <FILENAME>.{yaml,json,toml} (4)
            - ....
        - technology/ (5)
            - <FILENAME>.{yaml,json,toml}
            - ....
    - views/ (6)
        - <RENDERER NAME>/ (7)
            - application/ (8)
                - <VIEW_ID>.<EXTENSION> (9)
                - ....
            - technoloy/
                - <VIEW_ID>.<EXTENSION>
                - ....
    - .archicode.yaml (10)
  1. The directory of the project.

  2. The directory containing the manifests.

  3. An arbitrary directory containing the manifest related to the Application layer.

  4. A manifest file.

  5. An arbitrary directory containing the manifest related to the Technology layer.

  6. The directory containing the generated views.

  7. By convention, Render renders their views in subdirectory matching the Render’s name.

  8. By convention, Render renders views in directory layers.

  9. By convention, the filename of rendered views is the view identifier. The extension depends on the Renderer.

  10. The workspace file is mandatory even if empty.

    • Manifest Diversity: ArchiCode handles multiple manifest directories, including manifests from package managers like NPM. This lets architects integrate architectural elements from various sources.

Example of manifest provided by NPM modules
- project_dir/ (1)
    - manifests/ (2)
    - node_modules/ (3)
        - <MODULE_NAME>/ (4)
    - .archicode.yaml (5)
  1. The directory of the project.

  2. The directory containing the manifests defined in the project.

  3. The directory containing the installed NPM modules.

  4. The directory containing the NPM module importing the other manifests.

  5. The .archicode.yaml must declare both directories manifests and node_modules/<MODULE_NAME> to be able to discover all manifests

Reference

Domain

The ArchiCode domain serves as the foundational framework for your architectural endeavors, encompassing essential elements that facilitate and enhance your architectural work:

  • Workspace: ArchiCode’s workspace provides the supportive backdrop for all your architecture projects, offering an organized and collaborative environment.

  • Application Layer: Within the ArchiCode domain, the Application layer hosts a rich array of elements coming from the C4 Model, enabling you to meticulously design and model application components with precision and clarity.

  • Technology Layer: The Technology layer of the ArchiCode domain covers deployment nodes, which configure the technological aspects of your architecture.

  • Viewpoint and Views: Navigating within the ArchiCode domain grants you access to a spectrum of viewpoints and customizable views, facilitating effective architectural communication and visualization.

  • Technical Configuration: The ArchiCode domain encompasses essential technical configurations, enabling you to tailor the tool to your specific architectural requirements.

The Application layer matches the Application layer of ArchiMate and the Technology layer matches the Technology layer of ArchiMate, both for the structure aspect only. The Application layer follows the C4 model, with the Solution on top of the System; the Technology layer follows the deployment representation of the C4 model, with two elements, the Environment and the Node.

The sections below cover each facet of the ArchiCode domain.

Workspace

In ArchiCode, a workspace is a fundamental construct that orchestrates the foundation of your architectural endeavors. It acts as a cohesive hub, streamlining the definition and configuration of your architecture work. Key aspects of the workspace include:

  • Plain Text Format: A workspace is a plain text file, in YAML, TOML, or JSON format, so it matches your preferred configuration style.

  • The Name of the File: the workspace file is called .archicode.yaml, and archicode looks for it in the current directory. The name begins with a dot, so it is a hidden file: ls -a lists it, and a file dialog shows it only when you ask for hidden files (in the file manager of your system, or in the dialog of a browser). It is never read as a manifest, in any folder. -w (--workspace) names another file, in YAML, TOML or JSON, for the command line (archicode -w ci/workspace.toml views generate); the editor, and archicode editor serve, open a folder that has a .archicode.yaml. Before 0.18 the file was called workspace.yaml: Upgrading: what breaks, and what does not says what to do.

  • Centralized Definition and Configuration: The workspace serves as a central repository for defining and configuring your architecture work. This consolidation streamlines your workflow and provides a clear reference point for all aspects of your project.

  • Enrichment with Manifests: Workspaces can be enriched through the inclusion of manifests. A manifest, also presented as a plain text file in YAML, JSON or TOML format, further refines and specifies architectural details within the workspace. The command line reads the three; the editor reads YAML only (see [editor-reads]).

  • Manifest for Enhanced Organization: The concept of manifests introduces a structural layer that enhances source code organization. By encapsulating architectural components, manifests contribute to a cleaner and more comprehensible separation of concerns.

  • Collaboration Support: Embracing the manifest concept not only refines source code organization but also provides enhanced collaboration capabilities. Manifests facilitate clearer communication among team members by offering a well-defined structure and purpose.

  • Optional Name: a workspace can be given a name with settings.name. The editor shows it in place of the name of the folder (see Name of the workspace); the command line does not need it. A workspace without a name stays valid.

  • Optional Plateaus: a plateau is a layer, written as manifests that say plateau: <id> in their header and, for each plateau, a manifest of kind archicode.morin.io/plateau (see Plateaus). Views and stories belong to no plateau (see [plateau-untied]). A workspace that does not write any plateau keeps the one set of manifests it always had.

The following snippet describes a workspace named ArchiCode, designing the CommandLineInterface container of the ArchiCode system and its localization in the Reference environment.

The content of .archicode.yaml
settings:
  name: "ArchiCode"
application:
  elements:
    - kind: "system"
      id: "ArchiCode"
      elements:
        - kind: "container"
          id: "CommandLineInterface"
          qualifiers:
            - "Quarkus"
technology:
  elements:
    - kind: "environment"
      id: "Reference"
      elements:
        - kind: "node"
          id: "Laptop"
          applications:
            - "ArchiCode.CommandLineInterface"

The next one, shows the default properties of a workspace.

The default properties of a workspace
application: {}
technology: {}
settings:
  manifests:
    paths:
    - "manifests"
  relationships:
    default-synthetic-label: "uses"
  views:
    path: "views"
  facets:
    global-enabled: true
    directory-name-template: "%s-%s"
styles:
  atomic:
    shadowing: false
  composite:
    shadowing: false
    background-color: "transparent"
    line-color: "darkgray"
    line-style: 5
    font-style: "normal"
formatters:
  atomic:
    name: "%s"
    qualifiers: "%s"
    description: "%s"
  composite:
    name: "%s"
    qualifiers: "%s"
  link:
    label: "%s"
    qualifiers: "%s"

The following snippet describes a manifest designing the User person and is relationship with the CommandLineInterface container.

The content of manifests/user.yaml
header:
  kind: "archicode.morin.io/person"
  version: "1"
content:
  id: "User"
  relationships:
    - destination: "ArchiCode.CommandLineInterface"
      qualifiers:
        - "Console"

A reference is declared once. The reference of an element is its id placed under its parent, whether that parent is the element that contains it in its file or the parent of the manifest’s header, so shop.web is the same reference for an element nested in shop’s file and for a manifest with `parent: shop and id: web. When two declarations share a reference, in two files, in a file and in a manifest placed under its parent, or twice in one file, the command line stops with an error that names the reference and the files, and generates nothing; two identical copies are as much an error as two different ones, because nothing says which file is meant. The same goes for two views, or two stories, that share an id. A reference may exist in both layers (an application and a node of the same name): they are not the same element.

the reference `shop` is declared twice: in `manifests/a.yaml` and `manifests/b.yaml`

The editor reports the same thing, in the same words (see [editor-folders]). With plateaus the rule is the one of [plateau-header]: a reference declared in a plateau and again in a plateau it stands on is the error, and the same reference in two plateaus that do not stand on each other is not.

Manifest formats and kinds

A manifest is a file of YAML (.yaml, .yml), JSON (.json) or TOML (.toml) with a header and a content. The command line reads the three the same way, so that a manifest written in TOML gives the same graph as its YAML twin. This is the TOML twin of manifests/user.yaml above:

The TOML twin of manifests/user.yaml: manifests/user.toml
[header]
kind = "archicode.morin.io/person"
version = "1"

[content]
id = "User"

[[content.relationships]]
destination = "ArchiCode.CommandLineInterface"
qualifiers = ["Console"]

TOML has no null: a key with nothing to say is not written, and is absent. An element nested in another one is a table (a list of tables, as above). The editor reads YAML only: it lists the .toml and .json files it finds as files it does not read (see [editor-reads]).

The kinds. The kind of the header is one of ten, each written archicode.morin.io/<kind>:

person, solution, system, container, component

the elements of the application layer (see Application Layer)

environment, node

the elements of the technology layer

view, story

the views and the stories (see Viewpoints and Views and Stories); they belong to no plateau

plateau

a plateau (see [plateau-manifest])

The group is gone. Since 0.17 there is no notion of group: container-group, solution-group, system-group and group are no kinds, in the command line and in the editor. Write the children of a former group in the elements of its parent. A nested element of kind: group is refused with the sentence below, which lists the kinds the parent holds:

error: `manifests/a.yaml` is not valid: unknown kind `group`, a group is no kind any more: write its children in the `elements` of its parent (known: container) at `elements[0]`

and so is a manifest whose header is one of the three old kinds, with the same words before the list of the kinds there are:

error: `manifests/a.yaml` is not valid: unrecognized `header.kind` "archicode.morin.io/system-group", a group is no kind any more: write its children in the `elements` of its parent (known: archicode.morin.io/component, archicode.morin.io/container, archicode.morin.io/environment, archicode.morin.io/node, archicode.morin.io/person, archicode.morin.io/plateau, archicode.morin.io/solution, archicode.morin.io/story, archicode.morin.io/system, archicode.morin.io/view) (line 2, column 9)

What a parent holds. A solution holds systems; a system holds containers; a container holds components; an environment and a node hold nodes; a person and a component hold nothing. An element declared under a parent that cannot hold its kind (header.parent: a system under a container) is an error in both tools, with or without plateaus, that names the file and says what the parent holds:

error: `manifests/grp.yaml` is not valid: unknown kind `system` under `ArchiCode.CommandLineInterface` (known: component, container) at `header.kind`

An id is a name without a dot, since the dot separates the levels of a reference: a.b is refused by both tools.

error: `manifests/dot.yaml` is not valid: the id `a.b` contains a dot, which separates the levels of a reference, at `content.id`

What a layer holds at its top. In a workspace that has plateaus, a manifest with no header.parent must be of a kind that its layer holds at its root: a person, a solution or a system in the application layer, an environment in the technology layer. A container, a component or a node is held by an element, never by a layer, and a patch could not select one that stands alone, so both tools refuse it with one line that names the file and the kind:

error: `manifests/root-container.yaml` is not valid: unknown kind `container` with no `header.parent` (known: person, solution, system) at `header.kind`

A workspace with no plateau is not concerned: such a root is indexed and drawn as it always was. The editor does not offer these kinds at the top level, and does not move an element there.

Node types

An element has a type, which is what its box says it is: the word above its name and the shape it is drawn with. With no type, the type of an element is its kind, so solution, system, container, component, person, environment and node are the seven built-in types, and a workspace that declares nothing is read as it always was. To draw an architecture in your own words, declare types in settings.node-types of .archicode.yaml and write the type of an element next to its kind. A type has a label (required, the name shown to people), a shape (one of database, node, person, queue, rectangle), and holds, the list of the types it may hold (absent: any type).

The workspace file of the example domain_node_types: three trees of types, from a business domain down to its modules, and from a datacentre down to its virtual machines
settings:
  name: "Bookshop"
  manifests:
    paths: ["manifests/**"]
  node-types:
    domain:
      label: "Business domain"
      holds: [service]
    service:
      label: "Service"
      holds: [module]
    module:
      label: "Module"
    reader:
      label: "Reader"
      shape: person
    datacentre:
      label: "Datacentre"
      holds: [cluster]
    cluster:
      label: "Cluster"
      shape: node
      holds: [vm]
    vm:
      label: "Virtual machine"
views:
  - kind: "view"
    id: "applications"
    name: "The applications, folded"
    viewpoint: "map"
    layer: "application"
    properties:
      pinned: ["reader"]
  - kind: "view"
    id: "applications-open"
    name: "The applications, opened down to the modules"
    viewpoint: "map"
    layer: "application"
    properties:
      pinned: ["reader"]
      opened: ["bookshop", "bookshop.catalog", "bookshop.catalog.search"]
  - kind: "view"
    id: "environments"
    name: "The environments, opened down to the machines"
    viewpoint: "map"
    layer: "technology"
    properties:
      opened: ["prod", "prod.paris", "prod.paris.web"]
The manifest of the example that nests a domain of the application layer, in manifests/bookshop.yaml
header:
  kind: "archicode.morin.io/solution"
  version: "1"
content:
  id: "bookshop"
  name: "Online bookshop"
  elements:
    - kind: "system"
      id: "catalog"
      name: "Catalog"
      type: domain
      elements:
        - kind: "container"
          id: "search"
          name: "Search"
          type: service
          elements:
            - kind: "component"
              id: "index"
              name: "Index"
              type: module
            - kind: "component"
              id: "suggest"
              name: "Suggestions"
              type: module
              relationships:
                - destination: "bookshop.catalog.search.index"
                  label: "reads"
    - kind: "system"
      id: "orders"
      name: "Orders"
      type: domain
      elements:
        - kind: "container"
          id: "checkout"
          name: "Checkout"
          type: service
          elements:
            - kind: "component"
              id: "basket"
              name: "Basket"
              type: module
              relationships:
                - destination: "bookshop.catalog.search"
                  label: "looks up books in"

The kind still says where the element stands, in the application layer or in the technology layer, and the type says what it is called and how it is drawn. Both tools draw the label and the shape of the type, and the Map opens the elements as deep as the tree goes. In the editor the navigation lists the declared types in the order of the declaration.

A type that is not declared is a free word: the element loads, and the tools say so with a warning that lists the declared types, on the error output with exit 0 in the command line:

the type `servce` of `shop` (in `manifests/shop.yaml`) is not declared in `settings.node-types` (declared: `cluster`, `datacentre`, `vm`)

Three things are errors, and the command line stops with one error: line and writes nothing. A node held by a type that does not hold it:

the type `node` of `prod.c1.box` (in `manifests/prod.yaml`) cannot be held by `prod.c1` of type `cluster`, which holds `vm`

A declared type with no label:

the type `cluster` of `settings.node-types` has no `label`

And a shape that is not one of the five words:

the shape `cloud` of the type `cluster` of `settings.node-types` is not one of `database`, `node`, `person`, `queue`, `rectangle`

The editor tells the same sentences, as errors of the layer and as warnings. The block is read and kept as it is on a save; archicode query schemas workspace does not print it.

Manifests in folders

settings.manifests.paths lists the folders the manifests are read from, manifests by default, and a path read as it is written names one folder: the files directly in it are the manifests, and the files of its sub-folders are not. To keep the manifests in folders of your own (by domain, by team), end a path with /**: the folder and every folder below it are read.

The content of .archicode.yaml of a workspace whose manifests are in folders
settings:
  name: "Bookshop"
  manifests:
    paths:
      - "manifests/**"
The files of the example domain_manifest_folders
.archicode.yaml
manifests/
  application/
    shop.yaml
    shop/warehouse.yaml
  people/customer.yaml
  technology/
    reference.yaml
    reference/server.yaml

The command line and the editor read the same files, in the same order, by these rules:

  1. A path that does not end in /** is read exactly as it always was: the files directly in the folder. ./** is the folder of .archicode.yaml and everything below it. The workspace file is never a manifest, at any depth and whatever the path: it is hidden, so a /** path would skip it anyway, and a folder read without /** skips it too. A folder that does not exist reads nothing, with /** as without.

  2. The files are read in the order of their path from the folder of .archicode.yaml, written with / and compared by Unicode code point, whatever the file system or the language of the system: B.yaml comes before a.yaml, and a.yaml before a/b.yaml. A file that two paths find (manifests and manifests/**) is read once. The order tells which file an error names first and the order of the files in the editor; the views do not depend on it.

  3. Below a path that ends in /**, these are not read: a file or a folder whose name begins with a dot (.git, .cache); a symbolic link to a folder (a link is never followed, so a link that points to its own folder is no loop; a link to a file is read like the file); and the folders of the generated views, which can hold files that are no manifests (the comparison of two plateaus writes a gap.json). These are the folder that settings.views.path names, as it is written in .archicode.yaml, and the folders beside it whose name begins with that name and a dash: with views, the folders views, views-to-be, views-to-be-vs-baseline and views-shop; and any folder that holds both files a comparison writes, gap.json and gap.md, whatever --output named it and whichever command wrote it (a folder with only a gap.json is read, since a manifest may be called so). A folder that is deeper than views.path, or whose name only looks like it (viewsx, views_extra), is read. A path that names such a folder itself (.manifests/**, views-notes/**) reads it: the rule applies to what is found below a path, not to the path. A path that is a link to a folder is read, as it is without /**.

  4. Every .yaml, .yml, .json and .toml file that is found is a manifest, as in a folder read without /**: a YAML file that is not a manifest (a CI file, a values.yaml) is refused with its name, so keep such files out of the folders you name, or in a hidden folder. A TOML manifest is a manifest like the others (see Manifest formats and kinds). The editor reads the YAML ones and says which files it does not read (see [editor-reads]).

  5. A reference declared in two of the files that are found is the error of [duplicate-references], in the same line, with the two files in the order above.

  6. ** means something only at the end of a path, after a /. manifests/**/shop, manifests/**x, a**/b and ** are refused with one line that names the path and says what is read, in the command line and in the editor (where the Settings screen refuses them too). A path that contains .. or is absolute is refused as before, with /** or without. A folder whose name contains ** can no longer be named by a path.

Plateaus, the layers that describe an architecture as it is and as it should be, are described in Plateaus. settings.manifests.paths and the files of a workspace are described in Manifests in folders.

Application Layer

In ArchiCode, the Application Layer is a key aspect of your architectural design, aligned with both the ArchiMate Standard and the C4 Model. Key points about the Application Layer:

  • Correlation with ArchiMate: Drawing inspiration from the ArchiMate Standard, ArchiCode’s Application Layer mirrors the Application Layer within the ArchiMate framework.

  • Structural Focus: ArchiCode covers specifically the structural aspect of the Application Layer. It emphasizes the "Structure" aspect of ArchiMate, enabling architects to design and define the composition of application components.

  • Alignment with C4 Model: Building upon the alignment with ArchiMate, ArchiCode’s Application Layer extends its compatibility to the C4 Model. This alignment, inclusive of a unique "Solution" element, complements the foundational "System" element, enriching the architectural vocabulary.

Composition

  • Solutions and Systems: At the apex of the Application Layer, you encounter "Solutions" and "Systems." A Solution encapsulates one or more Systems, establishing a higher-level conceptual grouping.

  • Systems and Containers: Delving deeper, a "System" encompasses "Containers," delineating the delineating technological boundaries of your architecture. These Containers form the backbone of your application’s operational flow.

  • Containers and Components: Within each Container resides a multitude of "Components," embodying the granular building blocks of your architecture. These Components epitomize the specific functionalities that drive your application’s behavior.

application layer composition
Figure 15. Application Layer Composition

This hierarchical structure lets you systematically model and articulate the relationships and dependencies between Solutions, Systems, Containers, and Components within your architectural design.

Solution

In the ArchiCode domain, "Solutions" matter when architectural work spans multiple systems. The significance of Solutions:

  • Multi-System Scope: Solutions come to the forefront when your architecture work extends its reach across multiple systems. They provide a coherent and organized approach to manage and address the complexities that arise from a diverse ecosystem of interconnected systems.

  • Holistic View: By grouping related Systems under a common Solution, you get a holistic and top-level perspective. This organizational structure allows you to grasp the overarching design intent and align it with the details of your multi-system architecture.

  • Modularity and Scalability: Solutions inherently promote modularity and scalability. They enable you to encapsulate specific sets of Systems, facilitating targeted enhancements, updates, and expansions while maintaining a clear demarcation of responsibilities.

  • Efficient Management: Solutions offer an efficient management framework, streamlining the handling of interdependencies, resource allocation, and cross-cutting concerns across Systems. This, in turn, fosters improved coordination and resource utilization.

  • Enhanced Communication: Solutions enhance communication by providing a concise reference point for discussing architectural decisions and rationale. This clarity aids in effective collaboration among stakeholders, ensuring everyone shares a common understanding of the architectural landscape.

The manifest of the ArchiTool solution
header:
  kind: "archicode.morin.io/solution"
  version: "1"
content:
  id: "ArchiTool"

System

In the ArchiCode domain, the concept of a "System" resonates harmoniously with the counterpart found in the C4 Model.

The manifest of the ArchiCode system
header:
  kind: "archicode.morin.io/system"
  version: "1"
  parent: "ArchiTool"
content:
  id: "ArchiCode"

Container

Within the ArchiCode domain, the concept of a "Container" maintains a parallel equivalence with its counterpart in the C4 Model.

The manifest of a Node element
header:
  kind: "archicode.morin.io/container"
  version: "1"
  parent: "ArchiTool.ArchiCode"
content:
  id: "CommandLineInterface"

Component

In the ArchiCode domain, the concept of a "Component" matches its counterpart within the C4 Model.

The manifest of the ViewpointManagement component
header:
  kind: "archicode.morin.io/component"
  version: "1"
  parent: "ArchiTool.ArchiCode.CommandLineInterface"
content:
  id: "ViewpointManagement"

Technology Layer

In the ArchiCode domain, the "Technology Layer" aligns with both the ArchiMate Standard and the Deployment representations within the C4 Model. About this layer:

  • Correlation with ArchiMate: Mirroring the ArchiMate framework, ArchiCode’s Technology Layer corresponds to the "Technology Layer" within ArchiMate. This alignment makes architectural principles carry across domains.

  • Structural Focus: ArchiCode covers the structural aspect of the Technology Layer. It exclusively emphasizes the "Structure" facet of ArchiMate, enabling architects to model and define the composition of technological elements that underpin your architecture.

  • Equivalence with C4 Model: The Technology Layer in ArchiCode aligns with the Deployment representations found within the C4 Model. However, ArchiCode simplifies this representation by reducing to two foundational elements: "Environment" and "Node." These elements encapsulate the essence of the Technology Layer, providing a streamlined yet comprehensive view of technological aspects.

Composition

Within the ArchiCode domain, the Technology Layer is a structured hierarchy of the elements below. Its composition:

  • Environments and Nodes: At the forefront of the Technology Layer, you encounter "Environments" and "Nodes." An Environment encapsulates one or more Nodes, forming a high-level organizational unit that represents distinct technological contexts.

  • Nodes and Sub-Nodes: Delving deeper, a "Node" encompasses both "Nodes" and "Sub-Nodes." This hierarchical arrangement enables the precise delineation of technological elements, allowing for finer-grained representation and definition.

technology layer composition
Figure 16. Technology Layer Composition

Within this framework, you gain the ability to systematically depict and elucidate the complex interactions, dependencies, and relationships that exist among Environments, Nodes, and Sub-Nodes within your technological architecture.

Environment

In the ArchiCode domain, the concept of an "Environment" resonates in parallel with its counterpart within the Deployment representation of the C4 Model.

The workspace defining the Reference environment
technology:
  elements:
    - kind: "environment"
      id: "Reference"

Node

Within the ArchiCode domain, the concept of a "Node" aligns harmoniously with its counterpart within the Deployment representation of the C4 Model.

The manifest of the Laptop node embedding the OperatingSystem and the TerminalSession nodes
header:
  kind: "archicode.morin.io/node"
  version: "1"
  parent: "Reference"
content:
  id: "Laptop"
  elements:
    - kind: "node"
      id: "OperatingSystem"
      elements:
        - kind: "node"
          id: "TerminalSession"

Using other environments

An application rarely lives alone in its environment: the development environment of a platform talks to an identity provider, to a mail relay, to the integration environment of a partner. Those are environments too, each with the nodes that host the applications modeled for them. An environment says which ones it depends on with uses.

The manifest of an environment that uses another one, and a node of a third one
header:
  kind: archicode.morin.io/environment
  version: "1"
content:
  id: dev
  name: Development
  uses:
    - integration
    - idp.production.openid
  elements:
    - kind: node
      id: cluster
      applications:
        - shop.api

uses is not a relationship and it draws nothing by itself. It tells where to look for what the applications of the environment depend on:

  • When an application deployed in the environment, or anything inside it, has a relationship towards another application, ArchiCode looks where that other application is deployed. A node that lists the container shop.app in applications hosts the relationships of its components too: a relationship of shop.app.payments towards billing is a dependency of the node, where it used to give none. The destination counts the same way: a relationship of backoffice towards shop.app.orders, a component of the deployed container shop.app, is a dependency towards the node that hosts shop.app (it used to give none, because shop.app.orders is not itself listed in applications). A relationship that stays inside the deployed application gives nothing, and the destination must be a deployed application or inside one. If the environment hosts it, nothing leaves the environment.

  • Otherwise, it is looked for in the environments, or the nodes, listed in uses, and nowhere else. An application deployed in several environments is reached in the ones the environment uses. That is how dev reaches the integration instance of an application, and not the production one.

  • The dependency is then drawn, in the deep view of the technology layer, between the two deployed applications, with the label, the qualifiers and the tags of the relationship of the application. It folds with the nodes: when they are collapsed, the dependencies between them are grouped in one link.

  • The overview and the detailed view of an environment, or of a node, show the same dependencies grouped on the nodes that host the applications: an environment is linked to the environments it uses.

  • The view of an environment shows what it depends on, and the view of a used environment shows who depends on it.

An entry of uses is the reference of an environment, to use all of it, or of one of its nodes, to use a part of it. It has to exist, or the views are not generated.

As the dependencies are derived from the relationships of the applications, a facet that removes some of them removes the dependencies that rest on them. Through a facet, the deep view of an environment also draws the relationships between the applications deployed in it, with their label and qualifiers: a facet that keeps one flow (an authentication, the audit events) shows that flow as it is deployed, on the nodes that host the applications. Without a facet these relationships are not drawn, there would be too many. The overview and the detailed view lift them to the nodes the view is made of. These links between the nodes of one environment read, as the others do, the relationships of everything inside the deployed application, at both ends: a relationship of a component of a deployed container towards another deployed application is a link from the node of the container to the node of that application, and a relationship that stays inside one container draws nothing. They are drawn in the faceted views of the technology layer only, as before. A facet that sets hide-unlinked: true also leaves out, in these views, the elements none of its links goes through, the element the view is about staying; in the editor it is a check box of the facet, in the Settings. The entries of uses can also be selected by a facet, as any other part of the workspace.

Relationships

In the ArchiCode domain, relationships link elements. Their characteristics:

  • Interconnection of Elements: A "Relationship" within ArchiCode links two "Elements" existing within a singular architectural "Layer." This gives a coherent representation of how architectural components interact and collaborate.

  • Layer Interactions: Notably, an "Element" within the Technology Layer possesses the capability to reference an "Element" residing within the Application Layer. This cross-layer referencing enriches your architectural design by articulating dependencies that transcend traditional boundaries.

  • Striking the Balance: ArchiCode takes a deliberate approach to relationships. It promotes detailed relationships between Elements, for accuracy and authenticity. At higher levels, it manages synthetic relationships to maintain clarity and comprehensibility.

relationship composition
Figure 17. Relationship Composition

Viewpoints and Views

ArchiCode generates views of both the Application and Technology layers of your architectural design. The mechanics behind it are:

  • View Composition in ArchiCode: Within the ArchiCode framework, a "View" emerges as a coherent amalgamation of two crucial components: a "Viewpoint" and a "Layer." This composition ensures that each view encapsulates a well-defined perspective on your architecture.

  • Viewpoint Definition in ArchiCode: A "Viewpoint" is a set of opinionated and pre-defined rules. These rules extract and transform data, so that views communicate specific architectural aspects.

What a viewpoint opens

A view about one element opens only that element. The overview draws the element and what it is linked to, all as closed boxes. The detailed view opens the element drawn to what it holds, and the deep view opens it down to its leaves. In both, the elements it is linked to stay closed boxes, even when they are systems that hold containers: a link towards the kernel of a system is drawn towards the box of that system. To see the inside of another element, draw a view about that element, or use a map view, whose opened list opens the boxes you name.

Composition

Within the ArchiCode workspace, "Views" portray architectural insights. The characteristics of Views and their associations within the workspace:

  • View and Viewpoint Association: Every View is linked to a designated "Viewpoint". This association ensures that each View is curated to encapsulate the viewpoint’s specific perspective on the architectural content.

  • View and Layer Association: Additionally, every View within ArchiCode is associated with a distinct "Layer." This connection anchors the View’s focus to a specific architectural layer, allowing for a clear and structured portrayal of the intended architectural context.

viewpoint views composition
Figure 18. Viewpoints and Views Composition

Views

ArchiCode generates views dynamically, which makes visualization adaptable. How ArchiCode does this:

  • Diverse Architectural Elements: With ArchiCode, the dynamic view generation process taps into the rich spectrum of architectural elements within the Application and Technology layers. This ensures that views are not only comprehensive but also finely tuned to convey the intricacies of your design.

  • Ad-Hoc View Definition: ArchiCode also lets architects define ad-hoc views. This allows you to create specialized viewpoints for specific architectural inquiries or scenarios, providing an extra layer of customization.

The workspace defined a View representing an overview of the TerminalSession node
technology:
  elements:
    - kind: "environment"
      id: "Reference"
      elements:
        - kind: "node"
          id: "Laptop"
          elements:
            - kind: "node"
              id: "OperatingSystem"
              elements:
                - kind: "node"
                  id: "TerminalSession"
views:
  - kind: "view"
    id: "terminal-session"
    viewpoint: "overview"
    layer: "technology"
    properties:
      element: "Reference.Laptop.OperatingSystem.TerminalSession"

A view that has an id is a named view. Without --view, archicode views generate draws the views it finds from the elements of the model (a named view is drawn when it is asked for); archicode views generate --view terminal-session (or -i) draws the views of that id alone, no other view with them, into views/plantuml/technology/terminal-session.puml. A view can be a manifest of its own, in the folders of the manifests (see Stories); it belongs to no plateau, see [plateau-untied].

The map. A view of the map viewpoint draws a whole layer instead of the surroundings of one element: layer: application (the default) or layer: technology, folded, so that only the top of the layer shows and a link joins the boxes its two ends land on. Three lists of references, in properties, shape it: pinned keeps only what touches these elements, hidden leaves these elements, what is inside them and their relationships out, and opened opens these boxes, so that their children show. A map of the technology layer has two more properties, booleans, that are true when they are absent: applications: false leaves out the applications deployed on the nodes, and relationships: false leaves out the links (see below). The layer of a view (and of a step that carries its own view) is read in any case by both tools: layer: Technology and layer: TECHNOLOGY are the technology layer, and anything else is the application layer; application and technology in lower case remain the form to write. The editor draws the same view on its page Applications (the application layer) and its page Environments (the technology layer, see Applications and Environments: the Map), and both tools draw the same boxes (the example below has the boxes of each view pinned by a test). The command line draws a map when it is asked for it by its id, as for any named view:

The content of .archicode.yaml of the example domain_technology_map: three maps of a technology layer
settings:
  name: "Datacentre"
views:
  - kind: "view"
    id: "datacentre-map"
    name: "The datacentre, folded"
    viewpoint: "map"
    layer: "technology"
  - kind: "view"
    id: "datacentre-map-open"
    name: "The datacentre, opened down to the racks"
    viewpoint: "map"
    layer: "technology"
    properties:
      opened:
        - "datacentre"
        - "datacentre.edge"
        - "datacentre.rack"
  - kind: "view"
    id: "datacentre-map-database"
    name: "What touches the database, without the edge"
    viewpoint: "map"
    layer: "technology"
    properties:
      pinned:
        - "datacentre.rack.db"
      hidden:
        - "datacentre.edge"
archicode views generate --view datacentre-map-open

writes views/plantuml/technology/datacentre-map-open.puml. The command line does not read what the editor keeps in a map besides the three lists, the two booleans and links (facet, hide-unlinked and the texts of the diagram; see [map-links] for links). A list that names an element that does not exist is one error: line that names the view (error: the view datacentre-map-database: dangling reference: datacentre.rack.dbx); in the views of a facet, where the facet may have removed the element, the entry is dropped. A comparison of two plateaus gives a map the states of its boxes, as it does for the other viewpoints.

properties:
  links:
    - source: customer
      destination: shop.web
      label: uses
    - source: shop.web
      destination: shop.catalog

The map then draws these relationships, the boxes of their two ends and what encloses them, and nothing else of the layer. pinned, hidden and opened keep their meaning: hidden still leaves out a relationship of or towards a hidden element, pinned still keeps the relationships that touch a pinned element (the pinned elements are boxes too), and an end inside a closed box lands on that box. A links that is absent, empty or has nothing after it draws the whole map, as before.

An entry names a relationship by what the source element declares: the destination and the label must be equal to the ones declared (the references are exact, an entry does not select what is inside the source). An entry with no label names the relationships that have no label; it is not a wildcard. Relationships that have the same source, destination and label and differ only by their qualifiers or tags cannot be told apart by an entry, so one entry draws them all. An entry of another shape (not a mapping, no text source or destination, a label that is not text, another key) is one error: line that says where it is, and so is an entry that names no relationship, with nothing written for the view:

error: the view orders_map: `links[1]` names a relationship from `shop.web` to `shop.catalog` with the label `reads`, which does not exist

(with no label when the entry has none; an unknown source or destination is dangling reference as for pinned.) The map of the technology layer reads no links and refuses them. The command line and the editor read links: the editor lists the relationships of the layer under the tree of its page Applications and draws the ticked ones (see [editor-map-links]).

In a workspace of plateaus, the entry is left out when the plateau drawn does not have the relationship, with warning: the view `m is drawn without the link a → b, which the plateau p does not have`, and the view is skipped, with warning: skip `m: none of its links is in the plateau p`, when none of its entries is there (see [plateau-views-lacking]). A typo in an entry is therefore only a warning in a workspace of plateaus, where it is an error in a workspace without. A relationship that only the plateau compared with has can be named in a comparison: it is drawn as removed.

Highlighting a relationship. A map of the application layer can also point at relationships among the ones it draws, with a fifth property, highlight. It is a list of the same entries as links (a source, a destination and, optionally, a label), matched the same way (exact references, a missing label names only the relationships that have none):

properties:
  links:
    - source: customer
      destination: shop.web
    - source: shop.web
      destination: shop.catalog
      label: reads
  highlight:
    - source: shop.web
      destination: shop.catalog
      label: reads

The highlight changes how links are drawn and nothing else: it adds no box and no link, and highlight without links points at links of the whole map. In PlantUML the highlighted link is the heaviest line of the view, in a vivid orange, with a black triangle before its label and the label in bold, so that the colour is never the only sign. As soon as one link is highlighted, the other links are drawn calm: thin, light grey, with a grey label. A link that carries a state of a comparison (new, changed, removed) keeps its colour and its dash and only takes the weight and the triangle when it is highlighted, and it is not made calm when it is not. A link that stands for several relationships (a grouped link, or one that lands on a closed box) is highlighted when one of them is. A view with no highlighted link is drawn as it always was, whatever the shape of its highlight: an entry that names a relationship the map leaves out (hidden, inside one closed box, or left out by only changes) marks nothing and is not an error.

The shape of an entry and the errors are the ones of links, with highlight[n] in the sentence, and a missing entry is error: the view orders_map: `highlight[1] names a relationship from shop.web to shop.catalog with the label reads, which does not exist`. The map of the technology layer refuses highlight, and the other viewpoints (overview, detailed, deep) ignore it. In a workspace of plateaus, an entry the plateau drawn does not have is left out with warning: the view `m is drawn without the highlight a → b, which the plateau p does not have`; unlike links, the view is never skipped for it, since a highlight is not what the view is about. In a comparison an entry may name a relationship that only the plateau compared with had. The command line reads highlight (in views generate and stories generate), and so does the editor: it draws the same heavy link and calm links on its Applications page, in a saved view and in a story step, and plays them in the story player (see [editor-map-links], Stories: stories and views and [editor-story-player]). It writes highlight sorted, without a duplicate and after links, and follows the references in it when an element is renamed or moved.

What a map of the technology layer draws. Besides the nodes and the environments, it draws the applications deployed on the nodes and the relationships:

  • The applications are the applications that the nodes list, one box each, inside its node. Only an open node shows them (a node is open when it is in opened, or when it encloses a pinned element), and a node that is hidden shows none; when the map is pinned, they are drawn only inside what it is pinned on. A node that hosts applications can be opened, so it is no longer drawn as a closed box with nothing in it; an application box has nothing to open. Opening a box shows its children one level down: opened: [prod] on an environment shows its nodes as boxes, and their applications show only if the nodes themselves are in opened too (opened: [prod, prod.dc]). A pinned, hidden or opened entry names a technology element: an application is not pinned, hidden or opened on its own (hide its node, or leave the applications out with applications: false).

  • The relationships are the ones the elements of the layer declare, and the dependencies between environments that the deployed applications give: an application of one environment that depends on an application the environment does not host, found in an environment or a node that the first uses, is a link between the two application boxes when both are drawn, and between the boxes of the nodes that host them otherwise. These are the dependencies that the overview, detailed and deep viewpoints draw; the dependencies inside one environment stay out, as in those viewpoints. uses is a scope and no link of its own. The dependency is read from the relationships of the application that is deployed and from the ones of everything inside it (a relationship of a component of a deployed container counts); a relationship that ends inside the same application gives nothing. The destination is read the same way: a relationship that ends on a component of a deployed container is a dependency towards the node that hosts the container, and the destination must be a deployed application or inside one (see Using other environments).

A saved map of the technology layer that says neither property draws both, so that a saved map of the technology layer draws more than it did in 0.14.0, where it drew neither the applications nor the dependencies between the environments. The properties are applications and relationships, false to leave one out; any other value is no choice, in both tools. They mean nothing in a map of the application layer. A comparison of two plateaus gives the states to the applications as it gives them to the other boxes.

A view in a workspace of plateaus. A view is read against one plateau at a time. A name that the plateau drawn does not have, and another plateau has, is not a mistake of the view, and the two tools say the same: an entry of pinned, opened or hidden is left out of the map (warning: the view `m is drawn without x, which the plateau p does not have`), and a view that cannot be drawn without the name (the element of an overview, a map none of whose pinned elements is there, or none of whose links is there: see [map-links]) cannot be drawn in that plateau. archicode views generate --view <id> skips such a view with a warning, and does not fail, since asking for a view in every plateau of a loop is legitimate:

warning: skip `x`: it names `shop.mailer`, which the plateau `to-be` does not have

The editor says it in the view (The element “x” is not in the plateau “p”.). A name that exists in no plateau is the error of [plateau-untied].

A shipped example. The layered Brightcart of the repository (src/test/resources/brightcart/layered, a fixture of the tests, not an example of this manual) keeps seven views and three stories in a folder, shared/, that no plateau owns, so that these cases are checked on it. shop_overview is an overview of shop, which the plateau marketplace renames storefront: archicode views generate --plateau marketplace -i shop_overview skips it with the warning above, and the three other plateaus draw it. marketplace_overview is drawn in one plateau only, and applications_map is drawn everywhere, without shop in marketplace, with a warning. A view is drawn by views generate only when it is named with -i; the plain command draws the built-in views alone.

A view whose element a facet removes. A view you ask for by its id (views generate --view <id>) that is about an element that a facet removes cannot be drawn in that facet. The command does not skip it, since you asked for it by name: it stops with one line that names the view, the element and the facet, exits with the code 1 and writes nothing, not even the folders of the facets before it. The check is made when --view is given, in the facets of the plateau and in those of its comparison, before the first view is drawn:

error: the view `saas_probe` cannot be drawn: it names `commerce-saas`, which the facet `no-externals` removes

The line is the one of archicode views generate --plateau saas -i saas_probe on a copy of the layered Brightcart with a view saas_probe, an overview of commerce-saas, which the facet no-externals of that workspace removes (the first facet that does, in the order of the file; the facets of the plateau come before those of its comparison). Name the view in a workspace where the facet keeps its element, or leave it out of the command. The same holds in a workspace that has no plateau. Without --view nothing is checked, since the views drawn are made from the elements the facet still has; a map whose lists name an element that a facet removes draws it without that element and says nothing.

By embracing dynamic view generation and facilitating ad-hoc view definitions, ArchiCode equips architects with a toolkit for capturing, communicating, and exploring architectural insights in a dynamic and tailored manner. As we navigate deeper into ArchiCode’s capabilities, you’ll uncover the rendering of views and how they enhance your architectural workflow.

Stories

A story puts views in order, with a sentence for each, to tell how a part of the architecture works. It does not draw anything on its own: each step shows a view, and the editor draws that view live from the model, so a story stays true as the architecture moves.

Stories and views are manifests, like the elements: one file each, in the manifests folders, with the kinds archicode.morin.io/story and archicode.morin.io/view. The editor writes them for you (see Stories: stories and views), but they are plain YAML:

manifests/story.order_flow.yaml
header:
  kind: archicode.morin.io/story
  version: "1"
content:
  id: order_flow
  name: How an order travels
  description: From the shop to the payment provider.
  steps:
    - view: shop_overview          # a view that has a name: see below
      text: The shop receives the order.
    - viewpoint: map               # or a view written right in the step
      layer: application
      properties:
        pinned: [shop.payments]
        hidden: [mailer]
        opened: [shop]
        hide-unlinked: true
      text: It hands the payment over.
manifests/view.shop_overview.yaml
header:
  kind: archicode.morin.io/view
  version: "1"
content:
  id: shop_overview
  name: Shop — Overview
  viewpoint: overview     # overview, detailed or deep: drawn by the command line as well
  layer: application
  properties:
    element: shop
    facet: flow           # optional: the editor draws the view through that facet
    descriptions: true    # the texts of the diagram, when they differ from its default (see the editor)
    wrap: true

A step either names a view by its id, or carries one: a viewpoint, a layer and properties, as a view has. A named view can be used by several stories and generated by the command line (its id is what --view takes); a view written in a step is only for that step, and has no file of its own. The text is plain text. A step on a view that is not declared is reported as a warning by the command line, and shown as missing by the editor. The command line does not draw the stories (see below): it reads them and checks them, and it generates the views of the workspace as it always did, the views of the map viewpoint included (see [map-viewpoint]).

A story belongs to no plateau, like a view (see [plateau-untied]): it is the same story whatever plateau is drawn, and it is declared once in the whole workspace. A plateau: in its header is accepted and means nothing, as it does in a view (see [plateau-untied]).

A step told at a plateau. A step may say which plateau it is told at and which plateau it is compared with, with two optional keys, at and against, each the id of a plateau. They are not the plateau: of a header, which says that a manifest belongs to a plateau: here the story belongs to none and a step says where to look.

  • Without at, the step is told at the plateau the reader has drawn. Without against, nothing is compared. A step that names neither is drawn as the reader had it, the plateau and the comparison.

  • against without at is allowed: the step is told at the plateau drawn and compared with against (what changes from baseline to where I am). When against is the plateau drawn, nothing is compared, which is no mistake.

  • A key with nothing after it, or an empty text (at: ""), names nothing.

plateaus/story.migration.yaml of the example domain_plateaus
# A story belongs to no plateau: it is the same story whatever plateau is drawn. A step may say where it is told (`at`) and what it is
# compared with (`against`), with the id of a plateau; a step that says neither is drawn in the plateau the reader has drawn.
header:
  kind: "archicode.morin.io/story"
  version: "1"
content:
  id: "migration"
  name: "From the shop to the new shop"
  description: "What the new shop changes, one look at a time."
  steps:
    - viewpoint: "overview"
      layer: "application"
      properties:
        element: "shop"
      at: "baseline"
      text: "Today the shop is one system: orders, invoices and receipts, and an inventory of its own."
    - viewpoint: "overview"
      layer: "application"
      properties:
        element: "shop"
      at: "to-be"
      against: "baseline"
      text: "The same system next year, with what changed marked: orders are split in two, invoices and receipts are merged."
    - viewpoint: "detailed"
      layer: "application"
      properties:
        element: "warehouse"
      at: "to-be"
      text: "The inventory moved to the warehouse."
    - viewpoint: "overview"
      layer: "application"
      properties:
        element: "shop.web"
      against: "baseline"
      text: "The web site in the plateau that is drawn, compared with where we are today."

Both tools check the keys when the manifests are read, one sentence for each, with the story, the file and the number of the step (from 1), after the layers and before the names the step carries:

error: the story `migration` (`plateaus/story.migration.yaml`) step 1 says `at: tobe`, which is not a plateau of this workspace (the plateaus are `baseline`, `to-be`)
error: the story `migration` (`plateaus/story.migration.yaml`) step 2 says `at: to-be` and `against: to-be`: a plateau is never compared with itself
error: the story `s` (`manifests/story.s.yaml`) step 1 says `at: to-be` but the workspace declares no plateau (a `plateau` key in a header, or a manifest of kind `archicode.morin.io/plateau`)

The last one is told for a workspace that has no plateau too. The command line checks the steps when it loads the workspace, and draws them with archicode stories generate (see Draw the stories). The fork of the layered Brightcart ships a story that tells one (fork_tour: its steps are told at baseline, at saas and at inhouse, two plateaus that override baseline and do not stand on each other, and compared with baseline, with each other and with the plateaus marketplace stands on), next to order_journey, whose steps name no plateau, and seller_journey, whose steps are all told at marketplace. A name that the plateau of a step lacks is no mistake either: stories generate skips the step with a warning, and the editor, which plays the steps and draws their plateaus, tells it (see Stories: stories and views).

Workspaces written before stories became manifests keep their views in views: of .archicode.yaml, and may have a stories: there too: both are still read. The editor offers to move them to manifests, which keeps .archicode.yaml small and free of the rewrites an editor save makes to it.

A story of a flow. A story can show how something travels, one relationship more at each step, so that the reader sees where the flow has got to. Each step is a Map of the application layer with its own recipe: properties.links holds the relationships drawn so far, and the step’s highlight key names the newest one only, so that one link is heavy and the others are calm. A step adds one entry to links and moves highlight to it. The step’s key is the one place of its highlight: it replaces the highlight of a view, as above.

The layered Brightcart ships one, order_flow, with three steps at baseline: the path of an order from the customer to the payment provider, each step opening shop and shop.app so that the last one draws its link.

shared/story.order_flow.yaml of the layered Brightcart
header:
  kind: "archicode.morin.io/story"
  version: "1"
content:
  id: "order_flow"
  name: "An order, link by link"
  description: "The path of an order through the shop, one relationship more at each step, the newest one highlighted."
  steps:
    - viewpoint: "map"
      layer: "application"
      properties:
        opened: ["shop", "shop.app"]
        links:
          - source: "customer"
            destination: "shop.web"
            label: "browses and buys with"
      text: "The shopper browses and buys with the web storefront."
      at: "baseline"
      highlight:
        - source: "customer"
          destination: "shop.web"
          label: "browses and buys with"
    - viewpoint: "map"
      layer: "application"
      properties:
        opened: ["shop", "shop.app"]
        links:
          - source: "customer"
            destination: "shop.web"
            label: "browses and buys with"
          - source: "shop.web"
            destination: "shop.app"
            label: "calls"
      text: "The storefront calls the application."
      at: "baseline"
      highlight:
        - source: "shop.web"
          destination: "shop.app"
          label: "calls"
    - viewpoint: "map"
      layer: "application"
      properties:
        opened: ["shop", "shop.app"]
        links:
          - source: "customer"
            destination: "shop.web"
            label: "browses and buys with"
          - source: "shop.web"
            destination: "shop.app"
            label: "calls"
          - source: "shop.app.payments"
            destination: "psp"
            label: "authorises payments with"
      text: "And the payments component authorises the payment with the provider."
      at: "baseline"
      highlight:
        - source: "shop.app.payments"
          destination: "psp"
          label: "authorises payments with"

The editor writes the same form. On the Applications page, tick the relationships so far, highlight the newest one and choose Add to story…​: the new step carries the ticked relationships in properties.links and the highlight as its highlight key, and the field of the step edits that key. The editor writes the links and the highlight of a view or a step sorted by source, destination and label, without a duplicate, and highlight after links, so a file the editor saves reads the same whatever order the relationships were ticked in. Play plays the story in the player, one step at a time (see [editor-story-player]), and archicode stories generate --story order_flow draws one folder for each step, with the heavy link of each (see Draw the stories).

Rendering

ArchiCode introduces a systematic approach to rendering views, enriching architectural communication through visualization. Here’s how ArchiCode orchestrates the process of rendering views:

  • View Rendering Mechanism: Within ArchiCode, each View is rendered by a designated "Renderer." This integral component takes the architectural model and translates it into tangible artifacts that resonate with the end user, facilitating a comprehensive understanding of the design.

  • Renderer Definition: A "Renderer" within ArchiCode embodies a set of opinionated and pre-defined rules. These rules are specifically tailored to generate artifacts that eloquently present architectural insights, ensuring consistency and clarity in communication.

By introducing a robust rendering mechanism and employing opinionated rules for artifact generation, ArchiCode enhances architectural communication by transforming abstract architectural concepts into tangible representations.

Stereotypes and styles

Every box of a diagram is drawn with a list of stereotypes. The stereotypes of an element are, in this order, its qualifiers (each one whole: Spring Boot is one stereotype) and the words of its rendering-stereotypes tag. The tag is a whitespace-separated list, so that external changed gives the two stereotypes external and changed, and a value of one word gives the one stereotype it always gave. A stereotype named twice counts once. The renderer then adds the kind of the element and the way the box is drawn. The command line and the editor read the stereotypes the same way: they come from the same kernel.

The styles of the workspace give a stereotype its look. styles.by-tags and styles.by-qualifiers map a stereotype to a style, and a box has the style of every stereotype it is drawn with. The key is the stereotype itself, not the name of a tag: the keys of by-tags are the words of rendering-stereotypes, the keys of by-qualifiers are the qualifiers. The two maps are equivalent for the renderer, which only sees stereotypes; use the one that says where the stereotype comes from. A style sets any of background-color, line-color, line-style, line-gap, line-thickness, round-corner, font-color, font-style and shadowing. line-style is the length of a dash (0 is a solid line) and line-gap the gap between two dashes: without line-gap the gap is as long as the dash, so that line-style: 5 is a dash of 5 and a gap of 5 and line-style: 16 with line-gap: 3 is long dashes with narrow gaps (PlantUML’s LineStyle: 16-3). A line-gap means nothing without a line-style; when a style overrides the line-style of another one, the gap of the other style goes with the dash it replaces.

Styling the boxes tagged external and changed
styles:
  by-tags:
    external:
      background-color: "lightgray"
    changed:
      line-color: "orangered"
      line-thickness: 3
  by-qualifiers:
    PostgreSQL:
      round-corner: 20
An element drawn with the external and the changed styles
content:
  id: "mailer"
  name: "Mail Provider"
  tags:
    rendering-stereotypes: "external changed"

In the editor. The editor draws a box with the style of the stereotypes it is drawn with: background-color is the fill, line-color, line-thickness, line-style and line-gap the outline (derived from the fill when only the fill is given, see below), and round-corner, font-color, font-style and shadowing the rest. A styled stereotype is also written on its box as a text badge with its name, so that a colour is never the only carrier. The same badge follows the name of the element in the Elements tree and in the tree of the Map, and in the header of an element (after its kind, on Details and on the diagram tabs; when the header is narrow it shows the badges that fit and the name keeps its room), and the key under the diagram shows the badge of each styled stereotype drawn. The badges are part of the SVG and PNG exported from a diagram, while the key is not; a badge is not the dot that marks an element as modified and not yet saved.

For the same stereotype, by-tags wins over by-qualifiers. When a box has several styled stereotypes, a later one overrides an earlier one property by property: with rendering-stereotypes: "external changed", the fill of changed wins, and the properties it does not set come from external. The order is that of the stereotypes of the box, its qualifiers first and then the words of the tag. The command line follows the same rule: it writes the stereotypes of a box last first, since PlantUML lets the first stereotype of a box win, property by property, whatever the order of the styles. The .puml of a box carrying external changed therefore says <<changed>> <<external>>, and the same workspace always gives the same file, byte for byte. The one difference: shadowing is a flag that is only ever switched on, so a style cannot switch off the shadow another style of the same box switched on (the editor lets shadowing: false of a later stereotype do it).

Colours are read as #rgb, #rrggbb, rgb(r, g, b), transparent or a CSS colour name such as lightgray; a value the editor cannot read is ignored. Numbers are whole numbers.

The fill is the colour written in styles, in both themes, as in the diagrams of the command line; styles has no separate dark colour. A box with a background-color and no line-color is outlined with a line derived from its fill: the same colour, darker (each of its channels at 60 %, so the hue is kept), or lighter when the fill is so dark that darkening it would show nothing, as for black. Without it the outline would be the grey of the theme, lost on the fill, and a box inside a box of the same fill, such as the systems of a solution that are both external, would vanish into it. The derived line is as firm on a box that contains others as on one that does not. The line-color of the style always wins, whatever the fill, and the fill itself is never changed; a box with no fill keeps the outline of the theme, and the outline of the box in focus or selected stays the accent colour. The same line is drawn on the badge of the stereotype, and in the SVG and PNG exported from a diagram. In the diagrams of the command line, PlantUML draws a box with the fill of its style and its own thin dark outline, so a box inside a box of the same fill is already told apart there: nothing is derived. The editor chooses the colour of the text so that it reads on that fill, black or white with a contrast ratio of at least 4.5: the font-color of the style is kept when it reads well, and replaced otherwise. Without a background-color, the box and its text keep the colours of the theme, and font-color is not used. Except that a box that contains others, with no background-color of its own, drawn inside one that has one, lets that fill show: its title is then black or white against that fill, in either theme, so that it never lands on a fill it cannot be read on.

Compared with the command line, line-style and round-corner are an approximation of what PlantUML draws. The editor styles only the stereotypes of an element, its qualifiers and the words of rendering-stereotypes: it does not use the kind of the element, nor atomic and composite, as keys, and styles.atomic and styles.composite are not drawn.

Technical Configuration

ArchiCode is configurable, so you can tailor the tool to your architectural needs. Its configuration capabilities:

  • Opinionated Default Configuration: Out of the box, ArchiCode ships with an opinionated and carefully crafted default configuration. It gives an intuitive architectural experience.

  • Workspace-Specific Customization: ArchiCode extends the flexibility of configuration to your workspace. The default configuration can be effortlessly customized, allowing you to fine-tune settings and preferences to match the unique demands of your architectural endeavor.

  • Manifest Localization: ArchiCode acknowledges the importance of manifest localization. This localization can be dynamically modified, enabling you to adapt and align the tool’s behavior with your project’s localization requirements.

  • Tailored View Generation: ArchiCode’s configurability extends to the very essence of view generation. You have the ability to redefine the output folder for generated views, as well as customize the labels utilized in the built-in viewpoints. This level of customization ensures that the generated views align harmoniously with your architectural narrative.

The settings also accept a name for the workspace (see Workspace) and the plateau that is current (see [plateau-choose]). They have no default, so the snippet below does not show them. There is no settings.plateaus: the plateaus are written in the manifests (see Plateaus).

The settings.views.properties key has one entry for each viewpoint (overview, detailed, deep and map), a mapping of properties for the views of that viewpoint. The editor reads one key of them, layout, the number of boxes per row its diagrams aim at (see The toolbar and the boxes per row). Settings edits the entries of overview, detailed and deep; the entry of map is written in the file, in Files. The command line reads none of it.

The default settings of a workspace
settings:
  manifests:
    paths:
    - "manifests"
  relationships:
    default-synthetic-label: "uses"
  views:
    path: "views"
  facets:
    global-enabled: true
    directory-name-template: "%s-%s"
The default configuration for styling
styles:
  composite:
    shadowing: false
    background-color: "transparent"
    line-color: "darkgray"
    line-style: 5
    font-style: "normal"
The default configuration for labels formatting
formatters:
  atomic:
    name: "%s"
    qualifiers: "%s"
    description: "%s"
  composite:
    name: "%s"
    qualifiers: "%s"
  link:
    label: "%s"
    qualifiers: "%s"

Editor

ArchiCode comes with an editor to browse, edit and draw a workspace without leaving the browser. It is a single page, standalone.html, that reads and writes the files of a workspace folder: nothing is uploaded anywhere, the page and the files stay on your machine.

Opening the editor

There are three ways to open it:

  • Served by the command line. archicode editor serve serves the editor and opens the folder of the .archicode.yaml in it, with nothing to pick. It works in any browser. See Serve the editor.

  • From the published page. The page published next to this documentation, at /editor/ of the same site, works in Chrome, Edge, Brave, Opera, Firefox and Safari. With no folder to choose it keeps a workspace in the browser, and it still lets you pick a folder where the browser has the File System Access API (Chrome, Edge, Brave and Opera). To try it without a workspace of your own, open the editor on the Brightcart sample. See A workspace kept in the browser.

  • From a build of the sources. Without the editor server or the website, ./mvnw package or npm run editor:build (Node.js and rustup needed) makes the page as the file target/editor-webapp/standalone.html, with its assets and samples folders beside it. Open that file in a browser from the disk, or serve the folder target/editor-webapp with any static file server. None of these files is in the repository.

The folder to open is the one that holds the workspace file, .archicode.yaml. You pick the folder, not the file, so the hidden name is no obstacle in the dialog of the browser. A folder that has a workspace.yaml and no .archicode.yaml is not opened: the editor gives the reason beside the folder, with the sentence the command line prints (see [upgrade-0-17]).

When a folder cannot be opened, the editor says so on a card, Can’t open this workspace, and what it says depends on what went wrong with .archicode.yaml. If the file cannot be had at all (there is none, a folder stands in its place, or the browser or the server refuses to read it), the card says .archicode.yaml could not be read in “folder”, with the reason the browser gave and the hint to choose the root of the workspace. If the file is read and found wrong (a key that does not exist, YAML that is not valid, a file that is not a mapping, settings.plateaus, a path of manifests.paths or a facet name that is refused), the card shows the sentence the command line prints for it, as it is, without could not be read and without the hint: the file was read, and the sentence says what to change. The sentence for workspace.yaml is shown as it is as well. In the list of the remembered folders, the note Its .archicode.yaml could not be read the last time it was opened is given to a folder whose file could not be had, or is still named workspace.yaml, and not to one that failed for another reason.

The published page remembers, in the browser, every folder it opened, with the name its workspace gives itself (see Name of the workspace). When the page opens again, it opens the last folder directly if the browser still lets it read it; otherwise it asks for a click (Reopen), because a browser only gives that permission back on a click. Close folder, at the top right, closes the folder and shows the list of the remembered folders: the closed one stays in it, and the next visit does not open it by itself. When no folder is open, the list shows each folder by the name of its workspace, with the name of the folder below it when they differ, most recent first: a click on one opens it, Remove from the list makes the browser forget it, and nothing is deleted on disk. Under each folder, the list says what a click will meet, as the browser answers without asking anything: Opens without asking, Will ask for permission (the browser shows its prompt), Blocked by the browser, or Could not be reached / Could not be checked (the folder may have been moved or deleted). A folder picked again is not added twice, even by two tabs at the same moment: the browser then holds two records for it for an instant, and the editor merges them into one, keeping the name of its workspace and its place in the list. A folder that cannot be opened (the permission refused, the folder moved or deleted) stays in the list, which says why, until it is removed. Served by archicode editor serve, the editor has one folder, the one of the server: there is no list and no Close folder.

The editor loads elkjs (the diagram layout), CodeMirror (the file editor) and the kernel (the WebAssembly that draws the diagrams, viewpoint_kernel.wasm, carried by the script viewpoint_kernel.js) from scripts served beside the page, in an assets folder, so it needs no network. The editor served by archicode editor serve and the one published next to the manual both serve that folder. A copy of the page with its assets folder beside it also works opened from a file:// address (the scripts are plain <script> files, which a page opened from a disk may load); the page alone, without the folder, falls back to a plain text area for the YAML and to the plain list for the layout, and a diagram shows an error naming the kernel script.

In Settings, the paths of the manifests are one per line, and a path that ends in /** is read with the folders below it (see Manifests in folders); a new element, view or story is written in the folder of the first path. The editor served by archicode editor serve does not list the hidden entries of a folder at all, .archicode.yaml of the folder itself excepted (it is served at the root only, not in a sub-folder), so a path that names a hidden folder reads nothing there, and does not list a link to a file that points out of the folder, which the command line reads. A browser that lets the page read a folder gives no way to tell a link from a folder: the page stops at a folder that is one it is inside of, but reads a link to another folder, which the command line does not.

The editor reads and writes YAML manifests (.yaml and .yml) only. The command line reads JSON and TOML manifests too (see Manifest formats and kinds): the editor reads neither, so what such a file declares is missing from its trees and diagrams, and relationships that point at it show as dangling. It says so, in Files (which names the files) and above the trees of Elements (which counts them).

A reference declared more than once is reported, not chosen: a red note above the trees of Elements and of Files gives the same message as the command line, each file that takes part is marked duplicate in Files and says so when opened, and no diagram is drawn until each reference is declared once (a view or a story with a duplicated id is reported too, and does not stop the diagrams). Nothing else is blocked: the editor still edits and saves, so that the duplicate can be fixed in it.

A workspace kept in the browser

Where the browser has no folder picker, or when you prefer not to give the page a folder, the editor keeps a workspace in the browser. The card Open a workspace then offers Open the Brightcart sample, New workspace in this browser and Import a workspace file, next to Open workspace folder when the browser can pick one. The workspaces kept in the browser are listed under In this browser, each with Rename, Export and Delete; a name is 1 to 80 characters and is not used by another workspace.

A browser workspace lives in the data of the site, on this device only: nothing is uploaded. Clearing the data of the site, a private window or a browser that frees space can remove it, so the editor asks the browser to keep it (once, at the first save) and the top bar says In this browser and when the workspace was last exported. Nothing is stored until you click Save all changes. Keep a copy with Export as a file.

The sample. Open the Brightcart sample opens a copy of the layered Brightcart workspace, as the same workspace every time: the second click opens the one you already have, with your changes. The address /timeline/applications?plateau=marketplace&compare=past&sample=brightcart does the same, and it is what the button of the presentation page uses (the editor on the Brightcart sample). A workspace made from the sample has Reset to the sample…​ in its Workspace menu: it names the workspace and what is lost (your changes), and replaces the files with the sample’s, in one step. A second sample is the model of ArchiCode itself: Open the ArchiCode model (or the address #/timeline/applications?sample=archicode) keeps a copy of docs/architecture in the browser the same way, as a workspace named ArchiCode, with its own Reset to the sample…​. It has no plateau, so the page draws the application layer as it is.

Export and import. The Workspace menu of the top bar has Export as a file, which downloads one YAML file named after the workspace (brightcart-bundle.yaml for the sample): every YAML file of the workspace, each opened by a line --- # file: <path>. It waits while changes are not saved. A file the bundle cannot carry (a path that is absolute, hidden other than .archicode.yaml, leaves the folder or is not YAML, a file that is not UTF-8) is left out and listed. Import a workspace file on the card reads such a file and creates a new workspace from it, named after the file’s settings.name or else the file; it never changes an existing workspace. It refuses a file over 10 MB, one that is not UTF-8 text, and a path with .., an absolute path, a hidden file other than .archicode.yaml, or a path given twice, and then creates nothing.

Served by archicode editor serve, the page has the same Workspace menu, with Open the Brightcart sample and, once a browser workspace is open, Back to the served folder. Nothing in that menu writes to the served folder.

What is tested. The flow above is tested end to end in Chromium, Firefox and WebKit as Playwright builds it. That WebKit is not Safari: the real Safari, Windows and macOS are not tested.

The perspectives and their pages

The top bar has four buttons: Timeline, Stories, Files and Settings. Timeline has four pages, in a bar of their own under the top bar: Plateaus, Applications, Environments and Elements. A click on Timeline opens Applications, a click on one of the others opens its first page, and the page that is on screen is the pressed one. On the four pages of Timeline, and on those only, the band shows the plateau that is drawn and the one it is compared with (see The band of plateaus).

Page What it is Address

Plateaus

the plateaus as a tree, each with what it changes over the plateau it overrides; the page where a plateau is made, edited and deleted (see The Plateaus page)

/timeline/plateaus (and /plateaus)

Applications

the Map of the application layer, with no element selected (see Applications and Environments: the Map)

#/timeline/applications

Environments

the Map of the technology layer, with no element selected (see Applications and Environments: the Map)

#/timeline/environments

Elements

the trees of both layers, and the page and the diagrams of the element selected in them (see Elements); where an element is edited, created and deleted

#/timeline/elements

Stories

the stories and the views of the workspace, the same whatever plateau is drawn (see Stories: stories and views)

/stories and /stories/views

Files

every manifest of the workspace, in a group for each plateau (see Files)

#/files

Settings

the settings of the workspace (see Technical Configuration)

#/settings

Since 0.17 the pages answer to the addresses of the table above and to no other: /map, /elements, /library, /library/stories, /library/views, /diagram, /applications, /plateaus, /environments and /timeline alone are no routes any more, and open the default page, Applications, like any address the editor does not know. Replace them with /timeline/applications, /timeline/elements, /stories, /stories/views, /timeline/plateaus and /timeline/environments. The page writes its own address in place of the one that was typed, without adding an entry to the history of the browser. The parameters of an address (ref, tab, pin, facet, story, view, plateau…​) are the ones they were.

The address says the plateau. A link with plateau=<id> draws that plateau, and compare= the comparison it names (see The address and the trees); an address with no plateau= is the root, baseline, which the page never writes. This is also true once the editor is open: an address that is typed in the tab, followed, or reached by Back and Forward draws the plateau it names (an unknown plateau leaves the one that is drawn). A plateau that you choose, on the band or on the page Plateaus, is an entry of the history, so Back walks back through the plateaus you drew. A comparison chosen on the band is an entry of the history too, and the address says it (compare=, see What a link carries), so Back walks back through the comparisons of the same plateau.

Environments is a Map like Applications, on the technology layer: the tree of environments and nodes on the left, the pins, the eye, the chips, the Changes panel and Name view…​ are the ones of Applications. Unlike Applications, it draws the applications deployed on the nodes and the relationships between environments, and its tools can leave each of them out (see Applications and Environments: the Map). The page Elements keeps the tree of both layers, and is where an environment or a node is edited and created, as an application element is. Show on map, on an element of either layer, opens the Map of that layer with the element pinned, and a row of the Changes panel about the other layer leaves the Map on screen for the Map of that layer.

Settings has no section for plateaus: a workspace of layers writes its plateaus in its manifests (see The Plateaus page), and has the paths of its manifests, as a workspace with no plateau does. It has one field about them, Current plateau, which is the key settings.current (see The current plateau). The rest of this chapter says the Map for what Applications and Environments draw, one for each layer. A workspace that writes no layer has the same perspectives and the same pages, and its band has one plateau. Its files are read, drawn and saved as they were.

Elements

The Elements page is the tree of both layers of the workspace on the left, and the selected element in the center. The center has four tabs:

  • Details: the fields, qualifiers, tags and relationships of the element, with Edit to change them (change its id and every reference to it follows; Move, in the edit form, puts it under another parent, see Moving an element under another parent), and Delete (the relationships of other elements that pointed at it are listed first, so that none is left dangling by surprise).

  • Overview, Detailed and Deep: the viewpoints of the same names, drawn live from the model, as the command line generates them. Detailed is for an element that can contain others. Clicking a box in a diagram selects that element.

Renaming an element in a workspace of plateaus. Saving the form of an element with another id rewrites every reference to it. In a workspace that has plateaus the rewrite is made in the files of the plateau that is drawn and of the plateaus that stand on it, since the others do not see the element through it, and in the views and the stories of the workspace, which belong to no plateau and so follow everywhere. A plateau beside the one drawn (one that does not stand on it and does not override it) may still declare the element, or inherit it, under its old reference: a view or a step that names the new reference then cannot be drawn there any more. When that is so, saving the form first opens a dialog before anything is written. It names the plateaus that keep the old reference and the views and the steps of the stories (by story and number) that could no longer be drawn in them, and has two buttons: Cancel, which writes nothing, and Rename anyway, which writes what a rename always wrote. To keep every view whole, cancel, draw each of those plateaus and give the element the same new id there; once every plateau that has it uses the new reference, the views are drawn in all of them. The links and highlight of a Map view and of a story step name two references each, and a rename or a move rewrites them as it rewrites pinned, hidden and opened (the label never changes). Nothing is asked when no view or step is at risk, when the plateau drawn is baseline (every plateau stands on it), or in a workspace with no plateau.

Cancelling. Cancel (or Escape, or a click beside the dialog) writes nothing and gives the form back as you typed it: the new id, the name, the description, what was in the boxes that add a qualifier or a tag, the relationship rows and the replaces, and Save all changes is lit as before. The same goes for the dialog that lists the plateaus a write changes (Writing in baseline changes other plateaus, see Writing in a plateau). Saying yes writes the form that was typed. A write that the editor refuses (Not written: …​), a write that fails after you said yes to the dialog of the plateaus, and an error while it reads the form give the form back as typed too, beside the sentence that tells why: nothing you typed is lost.

Move changes a reference too, and the views and the steps follow it in every plateau, so it asks the same question when you press the button of its dialog with a parent chosen and the move is allowed: the same list of plateaus that keep the old reference and of views and steps that could no longer be drawn there, in words of a move, with the buttons Back to Move and Move anyway. Back to Move, Escape and a click beside the dialog give the Move dialog back with its parent and its search as they were, and write nothing, so that you can choose another parent. A move that no sibling plateau is concerned by (none keeps the old reference, or no view or step names it there), a move in baseline and a move in a workspace with no plateau are written at once, as they were.

The badges and colours of styled stereotypes, on the boxes and in the tree, are explained in Stereotypes and styles.

Changes stay in memory, with a mark on the tree for each modified element, until Save all changes writes them. A file that changed on disk since the editor read it is not overwritten: the save is refused and says which one. A file that is saved keeps what the changes did not touch: its comments, its blank lines, the quotes of the values, its final line break and, for a file that starts with one, its UTF-8 byte-order mark (.archicode.yaml as well as the manifests; a browser never hands the mark to the page, so the editor reads the first three bytes of the file to know it, and puts the mark back when it writes; a file the editor creates has none). Only the lines that changed are rewritten, and a value written anew (a renamed id, a new parent, a reference that follows, a replaces) keeps the quoting of the line it replaces, the way its key is written and its trailing comment; a line that is added is written like the lines around it (double quotes, single quotes or none, as the file does), and plain when the file quotes nothing. A value that comes back on a line that is new (a map in brackets that becomes a list of maps, an item that moves, a list that gives back its item) keeps the quotes it had, and so does a key; a comment after a line stays on the line of its own key or item when that line is written again, and removing the first of two items that read the same removes the first, with its comment. A comment on a line of its own between two lines of an item that is removed stays where it was. A list or a map written in square or curly brackets (replaces: [a, b], tags: {zone: north}, on one line or on several, nested, as an item of a list of maps) stays as written when the change does not reach it; when a change reaches it, it is written in brackets again, on the line where it started: qualifiers: [a, b] that gets a c is qualifiers: [a, b, c], a map in curly brackets that gets a key stays a map in curly brackets, and so does an item of a list of maps (- {destination: x}). The comment after the closing bracket, the quotes of the values and of the keys, the words of the booleans (on, yes) and the spacing inside the brackets ([ a ] or [a]) are the ones you wrote, except for a value the change sets; a collection that you had over several lines goes on one line when it fits, and one that a change empties is [] or {}. It fits when its line, the comment included, is no wider than the widest line of the file, but at least 100 and at most 120 columns, or no wider than it already was. A collection stays a block, as the editor has always written it, in four cases: it no longer fits; it has a comment inside its brackets (the comments stay as lines of the block, a comment above a value above it, a comment after a value at the end of its line); it is an empty [] or {} that the change fills (the emitter’s own spelling for nothing, which a new element or story has); or it has an anchor, an alias or a tag in it. A collection that is a block in the file is never turned into brackets. The same words (yes, no, on, off, ~) and a key with no value (description:) stay as written in the lines the change does not reach, and a comment or a blank line above a line that is rewritten stays above it. A list written at the same column as its key (tags: then - a at the same column) is followed too: its items and comments stay, and an item that is added is written at the column the list uses; the comment after [], {} or a key with no value stays on the line when a change fills the collection, and the comments inside empty brackets stay under the key. A manifest that uses a YAML anchor, an alias or a tag is read by the editor and by the command line the same way: an alias (description: *n) is the value of the anchor it points at (name: &n "Bakery"), not its name, and a tag qualifies a scalar (!!str 12 is the text 12; !!int, !!float, !!bool and !!null read it as such, any other tag as a text; a tagged number is read as the command line reads it: !!int 0x1F is 31, !!int 1:30 stays the text 1:30 and !!binary aGVsbG8= stays the text aGVsbG8=). A merge key (<<: *base) is not a merge: it is a key named <<. The anchor, the alias and the tag stay as written in the lines a change does not touch, and a line a change rewrites keeps its anchor and its tag; an alias stays an alias as long as the line still says what its anchor says, and is written as its value when a change makes them differ. An anchor, an alias or a tag inside square or curly brackets (qualifiers: [&a oven, *a]), a text that goes over several lines (tagged or not) and a list item whose map starts on the line under its dash (-, then its keys, with or without an anchor) stay as written as well: every line a change does not reach is the line of the file, byte for byte. A collection in brackets that a change reaches is written as a block that keeps its anchors, aliases and tags; an anchored value that a change edits keeps its anchor, and each alias of it is written as the value it had, since it would now say the new one. An anchor or a tag on a key (&k name: x) is read by the command line and refused by the editor, which does not open the file and says so (see Limits of today). A few layouts are still written again entirely in the editor’s own layout, with the comments lost and the aliases written as their values, and Limits of today lists them; so is a file laid out in a way the editor does not write (an indentation other than two spaces, for example).

Applications and Environments: the Map

The Applications page, which the editor called the Map until wave 014, draws the whole application layer, with no element selected, and the Environments page draws the whole technology layer the same way, with the same tools: one Map for each layer. The tree on the left of each lists the elements of its layer only (Environments in the title of the tree of the technology Map), the pins, hidden elements and open boxes of a layer are that Map’s own (a reference can exist in both layers, and a pin of one means nothing in the other), and a technology element is the pin of the Map of its layer. A Map opens folded: only the top of the layer shows (the solutions and systems, or the environments), and a link is drawn between the boxes its two ends land on, so opening a box splits the links that reached it among its children.

In the tree on the left, each row has two buttons, which appear when the pointer is over the row or the row has the focus:

  • Pin (the pin) keeps only what touches the element. Pin several to keep what touches any of them. With nothing pinned, the whole layer is drawn.

  • Hide (the eye) leaves the element, what is inside it and their relationships out of the map.

The pinned and hidden elements are also shown as chips over the map, each removable, with Clear all once there are more than two. In the tree, rows of the elements the map does not draw are greyed. Folding the tree does not change the boxes of the map: use Fold all and Unfold all in the toolbar of the map, or the buttons of the boxes. Hide unlinked leaves out the boxes that no link reaches; it is in the toolbar of the diagrams of Elements too, where the element itself always stays. It is in the URL (hide-unlinked=1) and in a saved view. A saved view of a Map keeps the layer it draws, and the command line draws it too (see [map-viewpoint]).

Highlighting a relationship. The panel of a selected link (see The inspection panel) has a Highlight box beside Drawn, for each relationship it lists, and the chip over the diagram says how many are highlighted (Highlight: n, with a cross that draws every relationship calmly again; Clear all does the same). A highlighted relationship is drawn heavy, with a ▶ before its caption and the caption in bold; the other links of the map are drawn calm, thinner, lighter and grey, so that the colour is not the only sign. The highlight is kept in the address as hl= (one parameter for each entry, as rel= is for the ticked relationships), and a relationship that the drawing does not show (hidden, inside a closed box, or left out by the ticked ones) marks nothing and stays in the list. The Map of the technology layer has no highlight, and Keep as named view keeps the highlight of the diagram as it keeps the ticked relationships (see Stories: stories and views).

What Environments draws besides the technology elements. The Map of the technology layer also draws the applications deployed on the nodes, a box each inside its node, and the relationships: the ones the technology elements declare, and the dependencies between environments that the deployed applications give (an application of an environment that depends on an application hosted in an environment or a node that the first uses). Both are what the command line draws for the same view (see [map-technology], which says exactly which). A node that hosts applications can be opened, with its chevron or Unfold all, and only an open node shows them, so the Map opens as folded as before. A click on an application box selects the application, in the application layer: the panel on the right is the one of that application. An application is not pinned, hidden or opened on its own: pin or hide the node. The group Applications and Relationships in the tools of the diagram turns each of the two parts off and on (a button is lit while its part is drawn): Applications off leaves the application boxes out and the links between the nodes that host them stay, Relationships off leaves every link out. The choice is in the URL, as what is left out only (applications=0, relationships=0), and it is what a saved Map view says in its properties (applications: false, relationships: false; the same two buttons, on the page of a saved view of the technology Map, edit the view like the texts do). It is a choice of the view, not of the model: it writes nothing to the workspace, and it is not kept when you go to another page. On the Map of the application layer there is no such group.

Center puts the selected box in the middle at a readable size (with nothing selected on the Map: the top of the map, centered across), never below 80%, and Fit shows the whole diagram, however small. Fit is in the URL (frame=fit) and Center, how a diagram opens, is a URL with no frame, so a link opens the diagram framed as you left it; a zoom or a move of your own is not part of the link. PNG and SVG, in the header, download the diagram.

The inspection panel

Beside a diagram, on the right, a panel shows the data of the selected element without leaving the view: its name and styled stereotypes, its kind, its layer, its id and reference, its description, qualifiers and tags, and the file that declares it. It is there on the Map (Applications and Environments), on the Overview, Detailed and Deep tabs of Elements (where a click on a box moves to that element, and the panel follows) and on the page of a view in Stories (where a click on a box selects it on the page only, see Stories: stories and views); it is not on Details and in the edit form, which show the same things themselves. Nothing is shown, and no room is kept, while nothing is selected. The panel is resized by dragging its edge (the width is remembered; a double click on the edge gives the default back), it goes away with Maximize, and on the Map its x button deselects the element. On the Map the panel says so when the selected element is not drawn (a pin, a hidden element or a folded box leaves it out), and when it is an element of the other layer, which the Map never draws (This map draws the technology layer only. on Environments, The map draws applications only. on Applications). A click does what it did before: on the Map it selects, in Elements it moves to the element.

A click on a link of the diagram, or on its caption, selects it instead, and the panel lists each relationship the link stands for: its label, its qualifiers and its tags (tcp-port, doc-exchange…​), with the element that declares it (a button: it selects that element, in the layer of the drawing, as a click on its box does) and the one it points at. What is selected is the pair of boxes the link joins, so a link that groups several relationships lists them all (and says so), a link between folded boxes names the folded end and how many elements it hides (open it to see the relationships one by one), and a link to an unknown element says it points at nothing. The links of that pair are outlined. When several links join the same two boxes, the panel says how many, and marks (with the words Clicked link) the relationships of the one you clicked, unless they cannot be told from the others'. The links of a diagram are one stop of the Tab key, however many there are, and so are its boxes (Tab goes from one group to the other): once on a link, the arrow keys move to the next and the previous link, in the order the diagram draws them, and Home and End go to the first and the last. Enter or Space selects the link that has the focus. The stop is where the focus last was among the links, or else the selected link, or else the first one; for the boxes it is where the focus last was, or else the selected box, or else the one in focus of the diagram, or else the first one. x or Escape deselects: on the Map the panel goes, in Elements the panel of the element comes back. Selecting a link changes neither the perspective nor the tab, and in Elements the element stays the one being looked at (the tree, the tabs and the URL keep it). On the Map, if the panel that appears leaves the link behind its edge, the view moves by the least it takes to show it, once; a link already in view does not move the view. The selected link is in the URL, after the other parameters of the view (link-from=customer&link-to=shop: the two boxes of the drawing), so a copied URL, a reload and Back or Forward bring it back, and bring the view to it if it is not in sight. Selecting a link rewrites the current entry of the history, like a zoom, and does not add one. A link the drawing does not have when the URL is opened (it was renamed, or the boxes it joins are folded differently, which the URL does not carry) is dropped, and the URL with it. The selection ends as soon as the diagram it was made on is no longer the one on screen (another perspective, Details, another element, or a drawing that no longer has the link: a fold, a pin, a facet). A click on a box does what it did before and ends the link selection. A relationship the diagram does not draw (secondary links between deployed applications, unless a facet asks for them) cannot be selected.

Since the panel takes room from the center, the header of the diagram goes to its narrower states sooner (see The header of a diagram): resize or close the panel to give it back.

The header of a diagram

The header over a diagram, on the tabs of Elements and on the Map, adapts to the width of the center panel, which is the window minus the left panel, so dragging the left panel changes it. From wide to narrow:

  • Wide: every control shows its words.

  • Narrower: Show on map (or Open in Elements on the Map), Name view…​, Add to story…​ and Maximize show only their icon; the tooltip says what each one does.

  • Narrower still: Show on map or Open in Elements, the Story buttons and the Download buttons (PNG, SVG) move into the menu of a "⋯" button, which closes with Escape or a click elsewhere. Maximize stays in the header. The facet list is not in the header: it is in the toolbar, in the group Draw (see The toolbar and the boxes per row). The menu items work exactly like the buttons they replace.

  • Very narrow: the header takes two rows.

  • The key of a comparison is one row that scrolls along under 700 pixels (see Comparing two plateaus).

The editor on a small screen

In a window narrower than 40 rem (640 pixels at the usual size) the regions of the editor are stacked one under the other, and the page scrolls from one to the next. It was measured in a desktop browser (the browser pane of the development tool), at 360 by 800 pixels, in the light and in the dark theme, on the layered Brightcart and on the example domain_application, with a script that walks every page and form and compares the right edge of every box with the width of the window, and the screenshots of the pages were looked at:

What Measured

the top bar

105 pixels high

the band of the plateaus (the pages of Plateaus, Applications, Environments and Elements)

80 pixels, two lists of one line each

the tabs of the pages

39 pixels

the tree / the center / the inspection

up to 240 / 640 / up to 400 pixels (30, 80 and 50 percent of the height of an 800 pixel window)

the width of the document, on Plateaus, Applications, Environments, Elements, Stories, Files and Settings

360 pixels on all seven

the widest control of Settings, the list Current plateau included

ends at 332 pixels

the story player (below), in a window 360 pixels wide, dark scheme only

the page is 360 pixels wide, no horizontal scroll

The top bar row of the table is the measure it had before #182 and is left as it is. The bar of a browser workspace, with the Workspace menu of its name, was measured again after the fix, on the sample, in a window of 360 pixels and of 1280 pixels, in the light and the dark scheme, with the menu open: at 360 pixels the bar is 141 pixels high, its buttons wrap onto as many rows as they need and every one lies inside the window, the document is as wide as the window, and the menu is 328 pixels wide, inside the window; at 1280 pixels the bar is 48 pixels high and the menu is 336 pixels wide. In the menu each item holds its label and its note: Export as a file with its note is 48 pixels high and Reset to the sample is 29 pixels, and the items do not overlap. Before the fix the note of Export as a file ran out of its item and the bar ran past the window, so the page scrolled sideways (see [upgrade-0-21]).

The section Relationships of the page Applications (see [editor-map-links]) wraps its filter, its kind list and Ticked only in the width of the tree, which is stacked above the diagram in this layout, and its long references wrap inside the rows. The controls of the highlight (the Highlight boxes, their chip, and the Highlight fields of a saved view and of a story step, see [editor-map-links] and Stories: stories and views) came with run 0200 and are not in the table above. The Columns list of the toolbar (see The toolbar and the boxes per row) came with run 0202 and is not in the table above either.

Nothing is wider than the window, on the seven pages, on 52 states of the Brightcart in each theme (the forms of ten elements in view, edit, Move and delete, three stories, seven views) and on 20 of domain_application; the diagram is drawn to scale and scrolls in its own box, and the code editor of Files scrolls inside itself, as they do on a large screen. Four places did go past the window inside the scroll of the center and are fixed: the row that adds a tag, the four buttons in the header of an element, the list of saved views of a story, and the lists of the references in Confirm delete. The list of the places not offered in the dialog of Move has text wider than its box and scrolls inside it.

The walk row of the Changes panel (see The Changes panel) is sticky at this width too: Previous change, Next change, the position and Show all stay under the tabs while the list scrolls, and a press brings the selected row into view with the nearest scroll (block: nearest) that shows it. The row’s height was measured at 360 by 640 pixels, as a share of the panel’s height, against the 35 percent limit of the design, and the figure is in the record of the change (run 0201). Safari was not tested, so whether the row sticks the same way there is not proved.

The story player (see [editor-story-player]) is not a stacked layout either: it is a window of its own, as high and as wide as the browser window, and nothing in it makes the page scroll sideways. Its bar (the title, "Step n of N", the list of the steps, Previous, Next, Full screen and Close) wraps onto as many lines as it needs (four at 360 pixels), the plateau and the comparison are one line under it, the diagram takes the room that is left and is moved with a finger or the mouse inside its own box, the status line and the folded key under a comparison are one row that scrolls along, and the words of the step scroll in their own box. It was looked at in a desktop browser (the browser pane of the development tool), on the example domain_plateaus, in a window 360 pixels wide in the dark scheme, and the page was as wide as the window (scrollWidth 360), the diagram, the status and the words readable, zoom, Fit, Center and the wheel moving the drawing, and the open key capped and scrolling inside itself; the wide window in the light scheme was looked at as well, the same way (the first build of the player, before the cap on the key went from 30 to 24 percent of the height). The player is tested with a fake layout in the automated tests, which do not see pixels.

Under 40 rem the groups of the toolbar of a diagram (see The toolbar and the boxes per row) are folded so that the bar stays low. Draw, Texts, Layout and Frame are each one button that shows the name of the group and how many of its controls are on (Texts 2: two texts are shown; Frame shows the zoom, Frame 100%). The dot of a group that a view keeps stays beside its button. A press opens the controls of the group in a panel under the bar, over the drawing, which does not move; a second press closes it, and opening another group replaces it. Escape, with the focus in the toolbar, closes the panel and puts the focus back on the button of its group. The panel is closed when you go to another page or another element. Compare has no button: its one control, Changes only, stays in the bar, and so does Reset. The state of the diagram can be read without opening anything: the count on a group, the dot on Reset, the zoom on Frame.

What this does not say: whether the order of the stacked regions and their heights suit a phone, whether the buttons are easy to touch, and how the on-screen keyboard behaves. They are a judgment on a real device, which nobody has made and which is not planned (see Limits of today). The same goes for the player: nobody has tried a finger on its diagram, its list of the steps (a native list, so that the phone shows its own picker), Full screen on a phone, a screen reader on the announcement of a step, or the player in a folder picked in the browser (the File System Access path; a served folder was tried). Full screen itself was not seen working in a real browser: the pane used for the look refuses the request, so the grant is tested in the automated tests only.

The texts of a diagram

Four buttons in the toolbar of a diagram, in the group Texts, choose what the boxes and the links say. A pressed button is a text that is drawn:

  • Labels: the caption of each link, with its qualifiers in brackets. A long caption does not run over the boxes next to it: it is broken at the spaces into lines of at most 220 pixels (about forty characters at the size of the diagram), centred on the link, and the layout leaves room for all the lines. A word that is wider than a line is cut with an ellipsis, as a name is. The qualifiers are kept in one piece as far as possible, at the end of the last line when they fit and on a line of their own when they do not: the label gives way to them rather than the other way round. They are cut only past two lines without Wrap, or when a single qualifier is wider than a line (then its closing bracket is kept). Without Wrap a caption has at most four lines, and an ellipsis replaces the end of the label. The caption is broken whether Wrap is pressed or not, and the tooltip and the accessible name of the link always have all of it. The command line breaks the captions of its PlantUML views too, in narrower lines (PlantUML’s own wrapWidth of 200).

  • Qualifiers: the qualifiers of each element, after its kind, as the command line writes them: [container: rest, public].

  • Descriptions: the description of each element that does not contain others, under its kind, up to three lines.

  • Wrap: long names, qualifiers and descriptions are broken over several lines, and the box gets taller, instead of being cut with an ellipsis. A box that contains others cuts the qualifiers of its header at any rate. The captions of the links, which are always broken, then show all their lines instead of four at most.

The diagram of an element starts with the labels and the qualifiers, as the command line draws them. The Map starts with none of them, to stay readable. Only a choice that differs from that is remembered: it is in the URL (labels=0, qualifiers=1, descriptions=1, wrap=1), and in a saved view (see Stories: stories and views), so that a link or a step of a story draws the same texts. The tooltip of a box always has the qualifiers and the whole description, and the SVG that is downloaded is the diagram as it is on screen.

The toolbar and the boxes per row

The toolbar of a diagram is docked above the drawing, on the page of an element (its three diagrams), on both Maps, on the page of a saved view and on a story step drawn in the editor, and it is not drawn over the canvas. It holds every control of the diagram in one of five groups, always in this order, and a group with no control for the page is left out:

  • Draw: what the diagram draws of the model: Fold all and Unfold all (the Maps), Hide unlinked, Applications and Relationships (the Map of the technology layer) and the Facet list, when the workspace has facets (on the page of a saved view it sets the facet of the view, which is then modified and saved with Save all changes).

  • Texts: Labels, Qualifiers, Descriptions and Wrap (see The texts of a diagram).

  • Layout: Columns, below.

  • Compare: Changes only, while a plateau is compared (see Changes only and wording-only changes).

  • Frame: Zoom out, 100%, Zoom in, Center and Fit.

A button that is on or off, such as Hide unlinked, a text or Changes only, keeps its name and is announced as pressed or not pressed; it does not change its words. The title of a control, shown when the pointer rests on it, says what happens when it is pressed. The player has no toolbar: its slide has its own zoom and pan.

What a saved view keeps. A dot on the group name says that a named view keeps what the group holds: it is on Draw, Texts and Layout, whose controls write opened, facet, hide-unlinked, the parts of the technology Map, the four texts and layout into the view. Compare and Frame have none: Changes only, the zoom, Center and Fit belong to the session and are never in a view. On a window of 40 rem or more a short legend after Reset says what the dot means.

Reset is one button after Layout. It puts Draw, Texts and Layout back to where the diagram started: the saved view or the story step that Open on diagram or the walk of a story drew it from, named in the button (Reset to "name"), or the defaults when the diagram came from the address or from a Map (Reset to defaults). It leaves Changes only, the zoom and the position, the pinned and hidden boxes, the ticked links, the highlight and the selection as they are. It is dimmed, and does nothing, while the diagram already equals where it started, and it shows a dot when it differs; it keeps the keyboard focus when pressed, and the Back button of the browser undoes it. The starting point is kept for the session only and nothing is written: it is forgotten when you go to another page or another element, and with the folder. A view edited afterwards does not move the starting point of a diagram already open. The page of a saved view has no Reset: its toolbar edits the view, and Save all changes decides what becomes of those edits.

A control is absent only when it can never apply. A control that can apply to a diagram is on its page, working, on every page that draws such a diagram; on the page of a saved view it edits the view, as the texts and Columns do. So Fold all and Unfold all are on both Maps and on the page of a saved Map view, where they write opened (Unfold all opens one more level, and asks first above the same number of boxes as on a Map); the Facet list is on every diagram, for an element, a Map or a saved view, when the workspace has facets. A control is left out only where it has no meaning: a diagram of an element has no boxes to fold, and Changes only is drawn only while a plateau is compared.

Columns, in the toolbar of a diagram, chooses how many boxes a row of its layout aims at. The list begins with Default, which names the value the diagram gets from the levels below it (Default (4), or Default (none) when there is none), then the numbers 1, 2, 3, 4, 5, 6, 8 and 12; a value that is none of these, such as a 7 written in a view, is listed too, in its place. On the Applications and Environments pages and on the page of an element it changes the diagram on screen and writes nothing. On the page of a saved view it changes the view, which is then modified and saved with Save all changes, as the texts are.

The choice is a layout with one key, columns. The value in force is the first one that is set, looked for in this order:

  1. the list of the toolbar, for the diagram on screen;

  2. the layout of the saved view, in its properties;

  3. the layout that the workspace gives its viewpoint, in settings.views.properties.<viewpoint>.layout, for overview, detailed, deep or map;

  4. none, which is the layout the editor has always drawn.

With nothing set, nothing moves. A diagram that aims at N boxes per row asks the layout engine for layers of at most N boxes, on the diagram and in each box that holds other boxes, so that boxes no link joins do not all fall in one long row. It is an aim and not a limit: when links join boxes, the layout can need more than N boxes in a row, and then it draws them so.

The value is a whole number from 1 to 20. A layout that is not a mapping, a key other than columns, or a columns out of that range is not guessed at: the diagram is not drawn, and its place says why, for instance the view shop_map has an invalid layout: columns must be a whole number from 1 to 20 (found 0). The page Settings refuses the same sentence at its field when you save the value of overview, detailed or deep. It has no field for the Map: a Map draws with the value of the workspace when it is drawn, and a wrong one is told there, on the Map. The first level that is set decides, valid or not: a wrong value of the view is told even when the workspace has a good one.

A story step in the player has no toolbar, and a step drawn in the editor has the toolbar of its page, which edits the diagram on screen only: the player takes the value of its saved view, else that of the workspace, as the editor does on the page of a view, so the player draws the same boxes as the editor for the same view. Keep as named view writes the value of the toolbar as the view’s layout, and nothing when the diagram takes the value of the workspace; a rename or a move leaves the layout of a view alone. The value of the toolbar is in the address as layout=N (see the table of the address), so a reload of the page or a copied URL carries it, on the page of an element and on both Maps; a saved view and the workspace keep theirs in their files.

The command line does not read layout. The views it writes are the same with or without it, and the key is one of the view properties it ignores (see [map-viewpoint] and Print the guide for an agent).

Stories: stories and views

The Stories perspective, which the editor called the Library until wave 014, keeps what the workspace says about itself, on two sides: Stories (see Stories) and Views, the named diagrams that the stories are made of. Each side has its list on the left and its page in the center, and they lead to one another: the view of a step is a link to that view, and a view lists the steps that show it. The URL says which side is open (/stories and /stories/views; the former /library/stories and /library/views still open them). The page lists the same stories and the same views whatever plateau is drawn: a story and a view belong to no plateau (see [plateau-untied]), so there is no list per plateau and no note about other plateaus, and a story or a view is edited, renamed and deleted from any plateau. A new story or view is a manifest in the first folder of manifests.paths, with no plateau: in its header, in a workspace of plateaus as in one without. A diagram on the Applications page, on the Environments page or in Elements has two buttons in its header:

  • Name view…​ keeps the diagram as a view, in a file of its own (view.<id>.yaml): the element and the viewpoint (Elements), or what is pinned, hidden and open, and the layer (Map), with the facet, Hide unlinked, the relationships ticked and highlighted of a Map of the application layer (links and highlight, see [editor-map-links]) and the texts it draws (and, for the Map of the technology layer, applications: false and relationships: false when one of them is turned off). It keeps the recipe, not a picture: the view is drawn again from the model each time. A named view can be put in several stories, and generated by the command line.

  • Add to story…​ puts the diagram in a story, as a step after the one being told, or at the end. A dialog asks which story (a list to pick from, or the name of a new one: a name that is already a story’s is that story). The step carries its own view (no extra file), unless the diagram is one that was named: then it points at it. In a workspace that has plateaus the dialog has a box that keeps the plateaus in the step: Tell the step at to-be, compared with baseline`. It is checked when a comparison is on screen, and not otherwise. Checked, the new step is written with `at (the plateau drawn) and against (the plateau compared with), as the plateau ids they are now: a comparison with the Past, which follows the plateau drawn, is written as the plateau that it is at that moment, and the dialog says so. Unchecked, the step has no plateau key and is drawn as the reader has it, as before. Whatever the box, a highlight of the diagram is written as the step’s own highlight key, when there is one, and the relationships ticked stay in the recipe’s properties.links (see [story-of-a-flow]). A comparison that has no plateau to name (the plateau drawn itself, a plateau that is gone) leaves against out, and the dialog says why; plateaus that cannot be drawn offer no box. A workspace with no plateau has no box.

Show on diagram, on a step of a story on the Stories side, draws that step on the editing diagram, on the page that shows its view, and raises a bar over the diagram that says where you are: the title of the story, "Step n of N", the plateau and the comparison the step names, and the words of the step, to read. Edit text turns the words into a box to type in (it opens by itself right after Add to story…​, so that you can write as you go), Edit story goes to the story, Back to this step draws the saved view again when you moved away from it, and Leave story closes the bar. The bar has no Previous, Next or list of the steps: press the Show on diagram of another step, or play the story (below). A step that cannot be drawn (its element was deleted) says why in the bar, which stays, over the diagram that was there. The story is in the URL (story= and step=), so a link or Back lands on the same step.

Playing a story. Play, in the header of a story on the Stories side (off for a story that has no step), opens the story at its first step in a window of its own, on top of the editor, to be read like slides. The window covers the browser window and the editor behind it cannot be reached while it is open: the focus stays inside (Tab and Shift+Tab go round its controls), and closing it gives the focus back to the Play that opened it. It is a dialog with the story as its name, and each step is said to a screen reader when it changes, through a live region that nothing redraws: "Step n of N", then the name of the view, then cannot be shown and the reason when it cannot, and, for a step that highlights a relationship, Highlighted with its two ends and its label (. Highlighted: <source> to <destination>, <label>.).

The slide holds, in a bar, the title of the story, "Step n of N" with the name of the view, the list of the steps (an entry for each, its number and a title; a story of one step has no list), Previous and Next, Full screen and Close. In a workspace that has plateaus a line under it says the plateau the step is drawn at and, when it has one, the plateau it is compared with: it is said, not chosen, and when the step names none it says (from the editor), since a step that names none is drawn at the plateau, and with the comparison, that the editor had when Play was pressed, which stay that way for as long as the window is open. Under the line comes the diagram, which can be zoomed (the buttons, or Ctrl or Cmd with the wheel, around the pointer), moved (a drag, or the wheel) and put back by Fit and Center, but not clicked: a click on a box or a link selects nothing and opens no panel. A step opens at a readable size, from the top of its drawing. Under the diagram are the status line, the key of the comparison when one is drawn (folded, Key opens it and a long one scrolls inside itself) and the words of the step. A step that cannot be drawn (its element is not in its plateau, its plateau is none, it is compared with itself) says why where the diagram would be, and the way on stays open: the list, Previous and Next still work, and the entry of that step in the list says cannot be shown and the reason. The bar of Show on diagram says the same with cannot be shown.

Each step is drawn from the model of its own plateau, on the side, with its highlight: the step’s own highlight replaces the view’s, and an empty one switches it off, so that the heavy link and the calm links are those of the step (see [story-of-a-flow]). The player reads the editor (the model, the story, the plateau and comparison it had when Play was pressed) and writes nothing to it: when the window closes, the plateau drawn, the comparison, the selection, the page, the address and the files are what they were, and nothing is marked as changed. The Changes only and wording switches of the editor are not read; a comparison is drawn with all its boxes.

Full screen asks the browser to give the whole screen to the window. A browser that has no full screen does not show the button; one that refuses leaves the window as it is and says The browser did not give full screen. under the bar; closing the window leaves full screen.

The keys are the arrow keys: Left and Right show the previous and the next step, Home and End the first and the last, and Esc closes the window, from the list of the steps too (the list owns the arrows, Home and End, and lets Esc through). Up and Down are not taken, so that nothing competes with the scroll of a long text. No other key acts while a control that types or owns the arrows has the focus (a field, a text box, a list), while a dialog, the help or the menu of the header is open (then Esc is theirs), or with Ctrl, Alt, Meta or Shift held; J and K of the changes do nothing in the window, which has no list of changes.

The window is in the address, as play=<story>&step=n after the keys of the editor, n counted from 0 as step= is. Opening it is an entry of the history; choosing another step is not (the entry is changed in place), so Back closes the window and Forward opens it again at the step it was left on; Close and Esc go Back when the history holds that entry, so that Forward brings it back. A link with play= opens it when the folder is loaded, for someone who has the folder open (archicode editor serve, or a folder picked in the browser), at the plateau the address names; it is then no entry of the history, and closing it writes the address in place. The story= and step= of the bar are not in the address while the window is open, so there is one step=. A story that is not there, a story with no step, a step that is missing, is not a number or does not exist, and a workspace that has no story leave the window closed, and the page writes the address it really is. It is not a page that exists outside the editor: the editor reads a folder, so a link opens nothing for someone who has none, and there is no export of a story as a document. The player reads; to change a story, Edit story, the page of a story and the story editor are as they were.

A step told at a plateau. A step that says at or against (see [story-step-plateaus]) is drawn at its plateau and with its comparison in the player (above), without the editor changing. With Show on diagram it draws its plateau and its comparison before it draws its view, in the whole editor: the band, the Changes panel and the diagram are the ones of that plateau, and it is the step, not the plateau, that is an entry of the history. The bar says told at To be, compared with As is. With Show on diagram, a step that names none is drawn as the reader had it when the story began; a plateau or a comparison that the reader chooses on the band in the middle of the story is the new home of the steps that name none. Back to this step is offered when the plateau or the comparison on screen is not the step’s, and Leave story closes the bar and changes nothing: the diagram stays as it is. A name that the plateau of the step lacks is no mistake of the story: the step says The element “x” is not in the plateau “p”. and cannot be drawn. A step whose plateau is none, or cannot be drawn, changes nothing, says why in the bar, and stays.

On the Stories side, a story is open as soon as there is one, and edited in place: its name, its text, the order of its steps (Up, Down, Remove, which can be undone right away) and the words of each step. Each step also has a Highlight field, which edits its own highlight key: the relationships it highlights, as pills, and a list to add one. A note under it says that the key replaces the highlight of the view and that an empty list switches it off. Removing the last one leaves highlight: [] only when the view the step names has a highlight to switch off, and otherwise deletes the key. In a workspace that has plateaus, each step has two lists, Told at (the plateau drawn, by default) and Compared with (nothing, by default): a choice that is the default takes the key out of the step, a plateau that is none is listed and flagged (not a plateau) so that it is not lost, and Keep as named view keeps the two keys with the step. The step that is showing on the diagrams is marked. Play opens the story in the player, from its first step (see [editor-story-player]), and Show on diagram draws one step on the editing diagram. A step that carries its own view says so, and Keep as named view gives it a name and a file; a step whose view was deleted offers to point at another one. Renaming an element updates the views and steps that point at it. A change that is not saved yet is marked modified.

On the Views side, the page of a view that can be drawn draws it in the center, from the model, with the canvas and the tools of the Map and Elements: zoom, Center, Fit, Hide unlinked, the four texts (see The texts of a diagram), and PNG and SVG in the header. The facet of the view is applied: it is drawn here, not picked. There is no folding on this page, since the open boxes of a Map view are part of the view. The zoom and the moves are the page’s own and are not changes to the view, and the page changes nothing the Map and Elements show (selection, pins, tab, facet, texts, address). The header keeps Open on diagram, which draws the view on the Map of its layer or in Elements to explore it with their tools, Rename and Delete, and has Maximize, which hides the list of views and the right-hand panel (M maximizes, Esc restores; the Map is not touched).

The panel on the right, resized and hidden as the one of the Map (see The inspection panel), has the view first (while a plateau is compared, it has two tabs, View and Changes, see The Changes panel): what it draws and the file that keeps it, then a field for each attribute of the view, and the steps of the stories that show it, each a link to its story. Once something is selected, the inspection of the selection comes under it; the panel stays where it is when the top of the inspection is in sight, and otherwise scrolls by the least it takes to show its first lines, so that the fields of the view stay in sight as long as there is room. A click on a box, or Enter on the box that has the focus, selects the element and shows its panel, which has a Show in Elements button: it leaves the page and selects the element there, on the tab Elements was left on. A click on a link or on its caption shows the relationships it stands for, and the elements named in that panel select on the page too. The selected box is outlined, and x or Esc deselects. A box for a relationship that points at nothing cannot be clicked here. This selection is the page’s own: it does not select anything on the Map or in Elements, it is forgotten when another view is shown, and it is not in the URL, which carries no more than #/stories/views?view=<id> (and the plateau).

A view is changed by its fields, and the diagram follows at once:

  • Viewpoint: Overview, Detailed, Deep or Map. From an element viewpoint to the Map, the element becomes the pinned element, in the layer the view has (a technology element is the pin of the Map of the technology layer); from the Map to an element viewpoint, the first pinned element that still exists becomes the element, and the hidden and open elements are dropped; the layer stays. What the view showed of the texts is kept. Cancel gives the change up as long as it has not been saved.

  • Layer (every viewpoint: a Map draws the layer it names) and Element (the element viewpoints): the element is typed, with the references of the layer as suggestions, and applied with Enter or by leaving the field. A reference that is not an element of the layer is refused, with the reason under the field, and stays there to be corrected. Changing the layer keeps the element when the other layer has it, and otherwise leaves the view without one: it then says so and cannot be drawn until one is chosen; for a Map it keeps the entries of its three lists that exist in the other layer.

  • Pinned, Hidden and Open (the Map): each is a list of elements of the layer of the view (an element of the other layer is refused), with a cross to take one out and a field to add one (Enter). The drawing of this page is not edited itself, on purpose: a click on a box selects it. To choose pins by clicking, use Open on diagram.

  • Links and Highlight (the Map of the application layer): each is a list of relationships of the layer, a pill for each entry and a select of the relationships not there yet, with a missing one marked as such. They are properties.links and properties.highlight (see [editor-map-links] and [story-of-a-flow]).

  • Columns: the boxes per row the layout aims at, with Default first (the value the view gets from the workspace) and then the numbers. It is properties.layout, and it is the same list as the one of the toolbar (see The toolbar and the boxes per row).

  • Facet: the facets of the workspace, or none. Hide unlinked, Labels, Qualifiers, Descriptions and Wrap are boxes to tick (a Map of the technology layer has two more, Applications and Relationships, ticked when the property is absent: unticking one writes false, see [map-technology]), and they are the same as the buttons of the tools over the diagram. A text that is what that kind of diagram draws by default is not written to the file, as for any view.

Nothing is written to the disk by an edit. The view gets the mark modified, in the header and in the list, and loses it when what you did is put back, as soon as the file of the view would be the one on disk (the last one written); Save all changes writes the file of the view and no other (the comments and the layout of the file stay, as for any manifest; a property that an edit takes out and puts back again is written where the editor writes it, element, facet, Hide unlinked, then the texts), and Cancel gives every unsaved change up: the view, and the diagram with it, are the saved ones again. A view that an edit left impossible to draw (no element, nothing that was pinned exists) says why in the center, with the same fields to correct it, and can still be saved. Renaming an element in Elements still rewrites the views that point at it; the steps of the stories point at the view, so they show the edited view, saved or not.

A view that cannot be drawn (its element was deleted, nothing that was pinned exists any more, the viewpoint is unknown) keeps its message, what it draws, its fields and its steps in the center of the page, with no diagram and no panel.

A story is a file (story.<id>.yaml) in the first manifests folder, and so is each named view. They wait in memory, like the other changes, with a mark on the file, for Save all changes, and Cancel gives them up: only the files that changed are written. When an older workspace still has views or stories in .archicode.yaml, Stories says so, on both sides, with Move to manifests, which works whatever plateau is drawn.

Facets

The facets of the workspace (see Tackling view clutter) are in a list in the header of the diagrams: the diagram is then drawn as the command line generates it for that facet, with the relationships the facet removes left out, and the elements it removes, with the relationships that pointed at them. In the tree, the elements the facet leaves with nothing to draw are greyed. A facet that the kernel refuses (an old path of the previous engine, an invalid JSONPath) shows its sentence as the error of the view. The facets themselves are edited in the Settings perspective, along with the other settings of the workspace (see Technical Configuration). Add facet there refuses a name that cannot be the name of a folder (a/b, .., a name that ends with a dot), with the reason under the field, as the command line refuses it when it loads the workspace (see Tackling view clutter).

Files

Files lists every manifest of the workspace on the left, and the text of the one that is open in the center, which can be edited (see [editor-reads] for what the editor reads). Whatever plateau is drawn, the list holds every file: there is no choice of what it shows. A workspace that has layers lists them in groups.

A group for each plateau. The heading of a group says the plateau, its name and the number of its files. The groups come in the order of the tree, the root first and then each plateau under the one it overrides. The plateau of a manifest is the one its header names (plateau: saas), baseline when the header names none, and, for a manifest of kind archicode.morin.io/plateau, the plateau it declares. A group that holds no file has no heading. A workspace with no layer lists its files as it always did, with no group and nothing to fold.

Fold and unfold. A click on the heading of a group folds and unfolds it (Enter and Space do the same), and Fold all and Unfold all do every group. A folded group still tells, in its heading, that one of its files has an error or is modified. Opening a file, by its row, by an address or by a link of a message, unfolds its group; a fold that you make afterwards is kept. The folds are the page’s own: they last as long as the editor stays open on the same folder, they are not written in the workspace, and they do not make a file modified.

Files that belong to no plateau. The last group, No plateau, holds the files that belong to no plateau: the views and the stories (they are declared in no plateau, see [plateau-untied]) and a file the editor could not read, which is always listed, with its error. .archicode.yaml is not in the list: it is the page Settings.

A plateau that disagrees with the folder. The folder of a manifest does not matter to the tools: the plateau is what the header says. The folders of a project are often named after its plateaus, though, and a file moved from one to the other with its header left alone is read as the plateau of its header, not of its folder. When a manifest sits in a folder that is named like another plateau of the workspace (the deepest such folder counts), its row has a folder mark, a note above the groups counts such files (N files sit in the folder of another plateau), and its page has a warning: a/x.yaml says plateau: b in its header but sits in the folder a; b/y.yaml has no plateau key, so it belongs to baseline, but sits in the folder b. It is only a warning: nothing is refused, the command line says nothing, and the file is where you put it. A folder that is named like no plateau says nothing.

Name of the workspace

A workspace can have a name, the optional name key of its settings (see Workspace). Settings has a section, Workspace, with a Name field. Unlike the theme below, the name is a setting of the workspace: it is written to .archicode.yaml, so it counts as a change to save and lights Save all changes.

When the workspace has a name, the editor shows it at the top left of the window, in place of the name of the folder, in the title of the page, in the list of remembered folders and in the "Opening" messages, which use the name the workspace had when its folder was last opened; the name of the folder is then the tooltip of the name. Without a name, or with a blank one, the editor shows the name of the folder, as before, and an emptied Name is left out of the file.

The current plateau

Settings, in its section Workspace, has a field Current plateau when the workspace has at least two plateaus (or when .archicode.yaml already says current): a list of the plateaus, in the order of the band, and None. It writes settings.current into .archicode.yaml, the plateau the command line draws when --plateau is not given, and the plateau the editor opens the folder on when nothing else says which: no address with plateau=, and no plateau that this browser drew last in this folder. A file that has no settings gets one with that line alone; None takes the line out (and leaves settings: {} when it was the only one). A name that is no plateau is refused with the sentence of the load. Like the other fields of Settings it is a change to save with Save all changes, and it is disabled while the plateaus have mistakes (only what the file says and None can be chosen then).

It does not redraw the plateau on screen: what you chose on the band is not undone by a setting for the next time. With None, the command line draws the last plateau when the plateaus form one line, and asks for --plateau otherwise, while the editor opens the root.

The band of plateaus

Under the top bar, on the four pages of Timeline and nowhere else, the band chooses the plateau that is drawn and the one it is compared with. It is lean and read-only: two lists and, when something is wrong, one button. It writes nothing, and it has no tree, no counts and no sentence of its own (the tree and the counts are on the page Plateaus, see The Plateaus page). The plateau drawn and the comparison are the state of the editor, not of the band: Stories, Files and Settings have no band, and draw the plateau that was chosen. There is no plateau selector, no Compare to list and no section of the Settings for plateaus. A workspace that writes no layer has one plateau, baseline. A workspace of layers (a plateau key in the header of a manifest, or a manifest of kind archicode.morin.io/plateau) has one for each plateau.

  • Plateau draws a plateau in the whole editor. It lists every plateau in the order of the tree, baseline first and then what overrides it, each followed by what overrides it and indented by its depth, with its name and its horizon. A plateau that the command line refuses has a ! in front of its name.

  • Compare with says what the plateau drawn is compared with. It starts with Nothing and Past (follows the plateau drawn) (the plateau it overrides, whichever that is, so it changes when another plateau is drawn; the root has no past, so no such entry), then shows the same tree as Plateau, every plateau in the order of the tree and indented by its depth, with the plateau that is drawn greyed in its place so that it cannot be chosen and the hierarchy reads in both lists. A plateau of the tree is a fixed comparison, as archicode diff --plateau <drawn> --against <other> reads it: the parent, a child, a sibling or a cousin alike. There are no entries Future any more: a plateau above the one drawn is chosen in the tree, and is read as the future of the plateau drawn. A list chooses and does not toggle: choosing again the plateau that is compared already does nothing. Choosing the parent in the tree is read as Past (follows the plateau drawn), as the editor has always read a comparison with the parent: the comparison then moves with the plateau drawn. There is no way, on the band, to compare with the parent and have it stay when another plateau is drawn (see Limits of today). An address with compare=future and several plateaus above the plateau drawn shows a disabled entry, Choose a future plateau, selected, with nothing selected in the tree, until one is chosen.

  • ! N mistakes, when there are some, opens the dialog Mistakes in the plateaus: why only baseline is drawn, the sentences of the plateau drawn and of the plateau compared with that the command line refuses (the sentences of the command line, see Plateaus), the views and the stories that name elements no plateau has, the steps of the stories that name plateaus that are none (see [plateau-untied] and [story-step-plateaus]), and the sentence that nothing is written in a plateau that cannot be drawn.

Changes only is not on the band: it is one toggle in the group Compare of the toolbar of a diagram, and is shown while a plateau is compared (see Changes only and wording-only changes).

The order of the siblings. Plateaus that override the same plateau are placed by their horizon, when it reads as a date, and by their id otherwise. A horizon reads as a date when it is a year (2027), a month (2027-03), a day (2027-03-18), a quarter (2027-Q4) or a half (2027-H2); the date of a quarter or a half is the first day of the period. The plateaus whose horizon reads as a date come first, from the nearest to the farthest, those with the same date by id; the others follow, by id. The rule is the same every time the folder is opened. (archicode plateau list orders the siblings by id only, and the editor by horizon: the tree is the same.) (The tree does not need a horizon: it is the override of each plateau that places it, the horizon only orders the siblings. Any other text in a horizon is a label that no tool interprets.)

Drawing a plateau. A choice in Plateau draws that plateau, in the whole editor: the trees, Applications, Environments, the diagrams, Stories and the panel on the right show the plateau of the band. The plateau is its chain: the manifests that say plateau: <id> are added to the elements of the plateau it overrides, then its patches change them (REMOVE, SET, ADD, MERGE, applied by the same kernel as the command line), and every plateau of the chain is checked, with the sentences and in the order of the command line: a patch that selects nothing names the plateau, the rank of the patch and what it selected; a relationship, an entry of uses or an application hosted on a node that leads nowhere, a manifest whose parent is not there or cannot hold its kind, name the plateau. The views and the stories belong to no plateau: a name that they have and the plateau lacks is told in the view (see Stories: stories and views), and a name that no plateau has is in the dialog of the mistakes. The choice reads nothing from the disk and loses nothing: the manifests stay as they are, and each plateau is resolved once and kept until a manifest changes. When the kernel refuses the patches of a plateau, that plateau cannot be drawn (the dialog says why, and baseline is one choice away); when only the checks fail, the plateau is drawn all the same, flagged !, with the sentences that the command line would stop on, so that the mistake can be repaired in it. The plateau that opens is the one the address names (plateau=), else the one this browser drew last in this folder, else the one settings.current names (a name that is no plateau is an error with the sentence of the command line; the field Current plateau of Settings writes it, see The current plateau), else baseline. When the plateaus form one line and no settings.current says otherwise, the editor therefore opens the root while the command line, with no --plateau, draws the last plateau.

Comparing. Compare with compares the plateau that is drawn with another one. The comparison is the one of Comparing two plateaus: the Map, the diagrams, Stories and the Changes panel tell what is new, changed, removed, moved, split or merged, with the same counts and the same table as archicode diff for the same two plateaus; Changes only, pressed or not, chooses what the diagrams draw. With the past the plateau drawn is the more recent one, with the future it is the older one, and what only the other plateau has is read in the panel on the right, as a removed element is. The choice is remembered by this browser for this folder.

Cascade. Below the lists, the Changes panel has Cascade of the removals when a REMOVE of the more recent plateau took more than what it selects: the elements that went with the selected one, and the entries taken out of elements that stay (a relationship towards it, an entry of uses or of applications), among what the other plateau has, as archicode diff lists them after the table. Write replaces and Not related work on the pairs of any two plateaus; Write replaces writes replaces in the manifest that declares the new element, and refuses an element the plateau only inherits (it is declared in a plateau above, which the key would change).

Where a value comes from. In the panel of an element, each value (name, description, qualifiers, tags, relationships, replaces, uses, applications) says where it comes from: declared in the plateau drawn, inherited from another plateau (the one whose manifest declares the element), or set by patch N of a plateau (with the operator and the selector of the patch, and "inherited" when the patch is one of a plateau above), or taken out by patch N when a REMOVE with a field took the value out (see [plateau-patches]). A block Origin lists the plateau that declares the element and the patches that selected it.

Writing. The plateau that is drawn is the one a write goes to, and the page Plateaus says so (writing in: Buy the commerce platform). What an edit writes, and what is refused, is in Writing in a plateau.

Writing in a plateau

A write goes to the plateau that is drawn, in the files of that plateau, and nowhere else. The page Plateaus says writing in: <plateau> when the workspace has layers. A workspace that writes no layer saves as it always did.

In the plateau drawn What is written

a field of an element the plateau declares (its manifest says plateau: <the plateau>)

the field, in the manifest that declares the element, as before

a field of an element the plateau inherits (name, description, qualifiers, tags, relationships, applications, uses, replaces)

a patch in the manifest of kind archicode.morin.io/plateau of the plateau, at the end of its patches: SET for a value (a list set whole too), ADD for items added at the end of a list, MERGE for tags that only gain or change keys, SET with where for one relationship changed (found by its destination and its label), REMOVE with a field for a text or a number that is cleared (below)

the same field again

the patch the plateau already has on that element and that field is changed (a REMOVE becomes a SET when you write a new text, a SET becomes a REMOVE when you clear it), and taken out when the field is back to what the plateau above gives it; one patch for the field, not one more for each edit. When the plateau has several patches on the field (a relationship added, another relabeled), none is rewritten: the last one takes an edit of its kind, and any other edit is a patch after it

a value a patch of the plateau set

that patch

a new element (top level, or a child of an element the plateau inherits)

a manifest whose header says plateau: <the plateau> (and parent for a child), in the folder of the manifests the plateau already has. A child of an element the plateau declares is written in the file of its parent, as before

a new view or story (they belong to no plateau, whatever plateau is drawn)

a manifest with no plateau: in its header, in the first folder of manifests.paths

removing an element the plateau inherits

a REMOVE at the end of the patches (with layer: technology for a technology element). The kernel takes what is in the element and what points at it; the manifests of the plateau above are not touched

removing an element the plateau declares

its manifests are deleted, as before, and the patches of the plateau that name it (their target, the relationship they find with where or add) are taken out with them

a new plateau (New plateau, on the page Plateaus)

a manifest of kind archicode.morin.io/plateau with its id, name, horizon and override (none when it overrides baseline)

the name, horizon or parent of a plateau (Edit plateau)

the same manifest; a plateau that exists through headers only gets one

deleting a plateau (Delete)

its manifest of kind archicode.morin.io/plateau and the manifests whose header says its id are deleted, after a dialog that lists them (see The Plateaus page)

Asking first. A plateau that other plateaus stand on is not written without a word: when an edit changes the resolution of a plateau that overrides the one written, the editor lists those plateaus (the ones that inherit what was written and do not set it themselves) and writes only when you say yes. baseline is the plateau most often in that case. A plateau at the end of the chain, or an edit that no other plateau sees, is written at once.

Only what was meant. Every write is made on the manifests in memory by the same line-preserving save as ever (the lines the edit does not touch, their comments and quotes, stay as they were written; a list or map in brackets that an edit changes stays in brackets on its line when it fits, see Elements), and it is kept only if the plateaus are resolved again and all of this holds: the plateau written gives back the value that was edited; no plateau that resolved before is refused now, and no new mistake appears in the tree of the plateaus or in a plateau (a rename, a delete or a new parent that would make a patch of another plateau select nothing is refused, and says which plateau and which patch). A write that is refused is one sentence in the top bar, and nothing is changed: not a file, not a mark of what is modified. A new patch is always written at the end of the patches, never between two patches of yours, so that a comment above a patch stays above it.

Clearing what the plateau inherits. When you clear a name, a description or another text that the plateau only inherits, the editor writes a REMOVE patch with the field, at the end of the patches of the plateau drawn, after the question above if other plateaus stand on it. The Inspector then says where the value went (taken out by patch 3 of saas (REMOVE target shop.web)), and writing a text again changes that patch instead of adding one. A list or tags are emptied with a SET of an empty list or object, as before, and clearing a field that the plateau declares itself removes its line from the manifest, as before. If the plateau written does not give the field back gone, nothing is written.

Refused, with one sentence.

  • Renaming (id) or moving an element the plateau inherits: a patch never changes an id or a parent; draw the plateau that declares the element. Renaming or moving an element the plateau declares works as it does in baseline; the target of patches, the relationships they add, and the replaces entries that name it follow the new reference.

  • A field that a patch written by hand with a free json-path sets (for instance a MERGE of tags on every element that has a qualifier): the editor shows it, with its origin, and does not edit it field by field. Edit the patch in Files.

  • A plateau cannot be drawn when the kernel refuses its patches: nothing is written in it until they are repaired in Files.

Not written by the editor: patches with a free json-path or an expect (they are written by hand in Files). A new plateau manifest is written next to the other manifests (plateau.<id>.yaml in the first folder of manifests.paths; for a plateau that exists through headers only, in the folder of its files). The text editor of Files writes the text of any file whatever plateau is drawn, and is the way to repair or write what the forms do not.

The Plateaus page

Plateaus, a page of the perspective Timeline (its address is #/timeline/plateaus), lists the plateaus as a tree: one entry for each, in the order of the tree, each indented by its depth. An entry says the name of the plateau, its id, its horizon, whether it is the one drawn or the one compared, and, in a line below, the plateau it overrides, where it is written (described in inhouse/plateau.yaml, or exists only through the plateau key of a header for a plateau that has no manifest of its own), how many patches it has and how many files belong to it. Below that, what it changes over the plateau it overrides, as the chips of the Changes panel, for the elements and for the relationships: new, changed, removed, and moved, split and merged when there are some. They are the counts of archicode diff --plateau <id>; a plateau that the command line refuses, or that overrides one it refuses, says it is not counted (a ! marks it). The root overrides nothing, and says so. A workspace that writes no layer has the page too: one entry, baseline, and a note on what a plateau is. This page is the one place that lists the plateaus as a tree with their counts and the one place that writes a plateau: the band chooses and writes nothing. The indentation is not capped: each level of the tree is one step further in, for a chain of any length, and in a window narrower than 40 rem (see The editor on a small screen) each level is half as far in, half a rem instead of a full step, so that a deep chain takes less of the width; the two lists of the band keep one em space per level.

The name of a plateau draws it, as a choice in the list Plateau of the band does. Changes draws the plateau and compares it with the plateau it overrides in one step, and the Changes panel opens on the right with the same lists as on the other pages; a click on one of its rows opens the element in Elements, since this page draws none (Next change and Previous change show the change they are at under the buttons, see The Changes panel).

Reading a path. Read the path (on every entry but the root) draws, under the list, a table of the path from the root to that plateau: a row is one element followed through replaces, a column is one plateau, and the last column, Span, is the root compared with the end of the path. A cell says what the element is there (new, changed, removed, moved, split or merged). The rows with no change are folded, and Changes only unfolds them; the table is the one archicode plateau matrix writes (see Read what a path of plateaus changes, element by element). A click on a cell with a change draws the plateau of its column compared with the plateau on its left (the root and the end of the path for the Span), as Changes does for one pair, and selects the element in the Changes panel. Close reading removes the table. The button is off for a plateau that cannot be drawn, and there is no table in a workspace with one plateau.

The address carries the reading: matrix=<plateau> names the end of the path and rows=all says the folded rows are unfolded, both on the page Plateaus only and after plateau=. A plateau that is not in the tree or is the root drops the key, and rows=all without matrix= is dropped; the page writes the address back without it.

Writing a plateau. New plateau after this (on an entry) and New plateau (above the list, for the plateau drawn, with writing in: <plateau>) make a plateau that overrides it; Edit (Edit plateau beside New plateau) changes its name, horizon or parent. The manifest is written as Writing in a plateau says.

Deleting a plateau. Delete is on the entry of every plateau but the root, and Delete plateau beside New plateau for the plateau drawn. It opens a dialog that says what goes before anything does.

  • What can go. Any plateau but the root. The dialog refuses, with one sentence and without a Delete button, the root (every other plateau stands on it), a workspace that has no plateau but baseline, plateaus that cannot be drawn, and a save in flight.

  • A plateau that others override. It is deleted in the same one step. The plateaus that override it go under its parent: their override is rewritten, line by line, in their manifest of kind archicode.morin.io/plateau (the key is taken out when the new parent is the root). What the deleted plateau declared and patched is lost to every plateau that stands on it, and the dialog says it before anything is written: for each plateau above, its new parent, the elements it loses, the ones it gets back (the deleted plateau had removed them) and the ones that read differently. Delete plateau is the yes to those plateaus; a change to any other plateau is still asked. A comparison with the past of a plateau that overrode it follows it to the new parent.

  • What goes, and only that. Its manifest of kind archicode.morin.io/plateau and every manifest whose header says its id, listed one by one (a file not saved yet is marked new, not saved yet, and a modified one says its changes go with it). A view or a story that says plateau: <id> belongs to no plateau: it stays, and the dialog says so. The files leave the disk at the next Save all changes, like any change, and Cancel gives the delete up with the others.

  • Files that the editor does not read. A .toml or .json manifest, or a YAML file that the editor cannot read, may say plateau: <id>, or override: <id>, for the command line: the delete touches and rewrites none of them, the dialog lists them, and says that the command line still reads the plateau if one of them names it.

  • settings.current. When it names the plateau (or baseline, when the last plateau goes), the key is taken out of .archicode.yaml, and the dialog says that the command line then draws the last plateau when the plateaus form one line, and asks for --plateau otherwise. A current that names another plateau, gone already, is left as it is.

  • What blocks it. A step of a story that names the plateau in at or against, a view or a story step that names an element that only this plateau declares (it would exist in no plateau), a step told at a plateau above that would lose the element it draws, a step compared against a plateau above that would lose it when the plateau the step is told at does not keep it either, a saved view that is drawn in a plateau above and would lose its element (or, for a map, every element it is pinned on), and a plateau above that would no longer resolve (a patch that selects nothing, a relationship or a parent that is gone): the dialog lists the sentences, offers no Delete, and says to change them first, in Stories for the steps and the views, or to repair the plateau above or give it another parent with Edit. They are not cleared for you: a step told at a plateau is your statement of which state it shows. A step compared against a plateau above is not refused when the plateau it is told at (the plateau drawn when it says none) keeps what it draws: the comparison is drawn from that plateau, and an element the plateau compared with loses is then shown as new. The sentences are these (tour is a story, beta and marketplace stand above the plateau deleted, and loyalty is an element only the deleted plateau declares):

    the story `tour` (`stories/story.tour.yaml`) step 1 is told at `beta`, which would no longer have `loyalty`
    the story `tour` (`stories/story.tour.yaml`) step 1 is compared with `marketplace`, which would no longer have `loyalty`
    the view `loyalty_overview` (`entries/view.loyalty.yaml`) is drawn in `beta`, `marketplace`, which would no longer have `loyalty`

    A plateau that nothing of this kind concerns is deleted as before, byte for byte. On the layered Brightcart, inhouse cannot be deleted for that reason (marketplace patches what inhouse declares).

  • Folding a plateau into the one above, by hand. The editor does not move the patches and the elements of a plateau into the plateau above: that is a choice about your history, and no button makes it. archicode plateau fold <id> makes it from the command line and checks the result (see Fold a plateau into the one above); this recipe is what it does, and what to do for a plateau it refuses. When the refusal tells you the plateau above would lose what the plateau deleted gave it, and you want that plateau to keep it, fold by hand, in the files, with the plateau to-be and the plateau later above it (later overrides to-be; archicode plateau fold to-be does these steps and --dry-run prints them first, see Fold a plateau into the one above):

    1. In every manifest whose header says plateau: "to-be", write plateau: "later". These are the elements to-be declares.

    2. In the manifest of kind archicode.morin.io/plateau of later, change override: "to-be" to the plateau to-be overrode ("baseline", or take the line out when that is the root), and put the patches of to-be in front of those of later, in their order: later was written to be read over to-be, so its patches come last. A patch of later that refers to what to-be declared (a REMOVE of an element of to-be) still finds it, since it is now declared by later itself.

    3. Compose the replaces of later. Look in the manifests of later and in the value of its patches that SET a replaces for an entry that names an element to-be declared (say shop.search). Once to-be is gone, later is read over the plateau to-be overrode, and that entry names nothing. Replace it by what that element itself replaced (its replaces, in its manifest or set by a patch of to-be), or take it out when the element replaced nothing. An entry that names an element of the plateau below stays as it is. If you forget, archicode diff prints warning: replaces of search (application layer): shop.search is not an element of the base plateau, ignored, exits with 0, and reads the move as one new element and one removed element.

    4. Delete the manifest of kind archicode.morin.io/plateau of to-be, and any manifest that still names it, with your file manager or git rm.

    5. Change what still names to-be; archicode lists the ones you forgot, one error: line each (the story `migration (plateaus/story.migration.yaml) step 2 says at: to-be, which is not a plateau of this workspace (the plateaus are baseline, later)). Each replacement is a choice. A step told `at: "to-be" becomes at: "later", but then it draws later, which is to-be and the layer above it: it can draw more, and a step that names an element later removes is skipped with a warning (warning: skip migration/4: it names `shop, which the plateau later does not have`). An against: "to-be" becomes the plateau to-be overrode, or the key is taken out: do not write later there, a step told at later and compared with later is one error: line (…​ step 5 says `at: later and against: later: a plateau is never compared with itself`). The plateau of a view or a story means nothing and may stay. If settings.current in .archicode.yaml is to-be, write later: otherwise the commands that read it stop with error: `settings.current names the plateau to-be, which is not a plateau of this workspace (the plateaus are baseline, later)`.

      Check it with archicode plateau list (to-be is gone, later has the plateau to-be overrode as its parent), with archicode diff --plateau later --against baseline and with archicode views generate --plateau later --against baseline, before and after. Name --against both times: the default of later is to-be before and its new parent after, so two defaults compare two different pairs. When the steps are followed, the text above the table of diff and every .puml that views generate writes are the same, the table has the same rows, and two columns of the cascade of the removals differ: PLATEAU, where the rows of to-be now say later, and PATCH, since the patches of later are numbered after those of to-be; gap.md and gap.json differ in those two columns only. On a copy of the example domain_plateaus with the plateau later of the tutorial, only the column PLATEAU changes, because the one patch of later has no row in the cascade. A replaces …​ ignored warning after the fold means that the third step was missed. archicode query graph is not a byte for byte check: the order of siblings that two files of the folded plateau declare can change. This is for a plateau with one plateau above it; with two, keep it: folding it into one would leave the other without what it declared. The folding loses what the plateau to-be was on its own: a comparison --plateau to-be, its views folder views-to-be, and the against: "to-be" of any step, which you changed above.

  • After it. The plateau it overrode is drawn, with no comparison, when the plateau drawn was the one deleted; the plateau drawn stays, compared with nothing, when the one deleted was the one compared with. The folders of views that the command line generated (views-<id> and the folders of its comparisons) are not manifests: they stay where they are.

Comparing two plateaus

Compare with, on the band, compares the plateau that is drawn with another one (see The band of plateaus): Past is the plateau it overrides, and the tree lists every other plateau, the one that overrides the plateau drawn (the future of the comparison), a sibling or a cousin included. With nothing compared, which is the default, the plateau is drawn alone, exactly as the editor always did. A comparison draws the plateau together with the other one: Applications, the diagrams of Elements and the page of a view in Stories tell what is new, what changed and what was removed (and, for the elements that say what they replace, what moved, was split or merged, see Moved, split and merged elements, and candidates), with the same states as archicode views generate (see Comparing two plateaus). Like the plateau, the choice is remembered by this browser for this folder (not in the workspace), and it is ignored when the workspace no longer has that plateau. A plateau is never compared with itself. The address carries the plateau (plateau=<id>, when it is not baseline), and, in a workspace that has plateaus, the comparison on every page that draws a diagram (compare=past, compare=future:<id> or compare=other:<id>, empty for none; see What a link carries); a link that has compare= draws that comparison, and an older link that has none leaves the comparison as it is.

The plateau compared with is read, not written: the editor resolves it from the manifests it has already read (there is no second folder to pick), keeps it apart from the plateau that is drawn, and an edit goes to the plateau drawn (see Writing in a plateau). Its elements are not in the trees of the plateau drawn, and what only it has is listed in the Changes panel and read in the panel on the right. A plateau that cannot be resolved cannot be compared, and the dialog of the mistakes (the button of the band) says why. The one write that is made for the comparison is Write replaces (see Moved, split and merged elements, and candidates).

The diagram is drawn from the union of the two plateaus, and the boxes are laid out on that union: what was removed is drawn where it was, so a box does not move when the comparison is turned on from the other plateau or when you choose the other plateau of the pair (when nothing is compared, the plateau is laid out alone, as before). The editor tells the states without relying on colour: each one has a mark in front of the title of the box and of the caption of the link, a line style, and a pill with its name on the box.

State Mark Box Link

new

+

thick solid outline, a pill new, a green tint

thick solid line

changed

~

dotted outline, a pill changed, an orange tint

dotted line

removed

−

long dashes with narrow gaps, grey outline, grey struck title, a pill removed, a grey tint

dashed grey line

contains changes

±

thin dashed outline, a pill contains-changes

(none)

moved

→

long dashes with wide gaps, a pill moved, a blue tint, (from shop.till) after the title

(none)

split

⋔

medium dashes, a pill split, a purple tint, (from shop.report) after the title

(none)

merged

⊕

short dashes far apart, a pill merged, a light blue tint, (from stock.bin, stock.shelf) after the title

(none)

The last three states are for the elements that say what they replace, and exist only for a box: a relationship is never moved, split or merged. They are in the table above and in the key only when the drawing has a box in that state.

A box that did not change is drawn as it always was. A removed element is not in the plateau that is drawn, so it is not in the tree and a click on its box does not open it: it shows, in the panel on the right, what the other plateau had (name, kind, properties, the file it is in, the relationships it declared), read-only. A link that changed shows its mark even when the captions are off, as on the Map. The marks and lines are the ones of the command line (a dash and a gap of its own for removed 16-3, moved 12-12, split 8-8 and merged 3-9 in both, so that no two of them are alike); the colours are only a help, chosen to read in the light and the dark theme. Red dashed keeps its meaning of a dangling reference (an unknown element), and is never used for a removed one.

The look is a default, given to the stereotype of the same name as the state (new, changed, removed, contains-changes). A style of your own for that name in styles (see Stereotypes and styles) wins property by property: your line-color replaces the colour of the line and keeps its style and thickness, your background-color fills the box and replaces the tint, your font-color replaces the grey of a removed title. The state is the last stereotype of a box, so it overrides the style of the others, as a later stereotype always does. A new or changed tag that you wrote by hand on an element that does not have that state is only your stereotype, with your own style if you gave it one, and the command line draws it the same way (see [plateau-state-tags]).

The key is folded. Under the diagram, the key starts as one row: a sample of the box and of the link, the mark, the name and the count of each state the drawing uses, and a Key button. The row wraps on a wide window and stays one row that scrolls along under 700 pixels. Key (aria-expanded) opens the rest, which says how each line is drawn and the note about references that point nowhere; the open key takes at most 30 % of the height of the diagram area and scrolls inside, and the cap follows a resize of the window (it is worked out again when the window changes size, so a key left open keeps within 30 % of a smaller window). Open or folded is not saved: it is not in the address or the workspace, and a new folder folds it again. Open, the key adds an entry for each state the drawing uses, with a sample of its box and its link, its mark, its name, how its line is drawn, and how many boxes and links of that state the drawing shows. The SVG and PNG downloads draw the same marks, lines, struck titles, pills and tints; like the other keys, the key itself is not part of the image.

The Changes panel

While a comparison is on, the panel on the right of Plateaus, Applications, Environments and Elements is never empty. With nothing selected it is the Changes panel; with something selected it has two tabs, Selected (what is selected, as before) and Changes (with the number of rows). On Stories the panel is the one of the view, and while a comparison is on and can be drawn it has two tabs, View (what was there) and Changes; a story, or a view that cannot be drawn, had no panel and has the Changes panel alone.

The panel starts with the counts: elements and relationships, each new, changed and removed, as chips that carry a mark and a word (+ 38 new, ~ 26 changed, − 5 removed), so that they read without colour; the elements add → 1 moved, ⋔ 2 split and ⊕ 1 merged when there are some. The same chip is the state on every row below. Two lists follow, Elements and Relationships, in the order a review reads them: what is new, then what changed, then what moved, was split or merged, then what was removed, and by reference inside each. A row has the chip, the name and the reference of the element (a relationship reads source → destination “label”) and, for something that changed, what changed in it in words: name, description (wording only), qualifiers, tags, deployment, relationships added, relationships removed, relationships changed, and for a relationship label, qualifiers, tags. A relationship whose label changed is one row that says the label before and after. A row of a moved, split or merged element says where it came from (from shop.till, from shop.report; split with shop.report-b), as archicode diff does.

Reading a long list. A comparison of a large workspace has hundreds of changes (the pair before and after-declared of the fixture replaces-large-pair has 360). Under the counts, the panel says how many there are (167 changes) and has what it takes to read them without losing the place:

  • Previous change and Next change walk through the list, in the order of the list (the elements, then the relationships). They stop at the ends and do not wrap, and the panel says where you are (3 of 12). With no change selected, Next change goes to the first and Previous change to the last. The walk selects the change as a click on its row does, and leaves the list on screen (the Changes tab stays). Under the buttons the panel shows the What changed block of the change the walk is at (see What changed), so that the page Plateaus, and a story with no view drawn, where no box can be shown, still say what the change is; a click on a row there opens the element in Elements, as before.

  • The walk row stays in view while the list scrolls. Previous change, Next change, the position (3 of 12) and Show all are one row under the tabs, sticky at the top of the panel, so a reader who walks with the mouse does not scroll back to the buttons after each press. A press brings the selected row into view with the nearest scroll (block: nearest) that shows it, below the sticky row: a row already in view does not move the list, and one that is below it moves the list just enough. At a window 360 pixels wide the row is measured as well, its height as a share of the panel’s height at 360 by 640 pixels, against the 35 percent limit of the design; above that limit the rows would have a box of their own and the buttons would stay outside it. The figure of that measure is in the record of the change (run 0201), not in this manual. The row was tested in Chromium and Firefox. Safari was not tested, so whether it keeps the row in view in the same way is not proved.

  • The lists State (all, then the states that some row has, each with its count) and Layer (both, application, technology) narrow what is listed: the line then reads 12 of 167 changes, each group says n of N, and Show all clears both. contains-changes is not a choice: it is the state of a box that holds a change, never of a row. A filter that leaves out the change you are at moves you to the nearest one that is shown.

  • The filters change the list only, never what the diagrams draw (Changes only does that, see Changes only and wording-only changes), nor the counts above them. They are the editor’s, not the workspace’s: they start again when the pair of plateaus compared changes. The walk has a keyboard shortcut, J and K (see Keyboard).

A click on a row selects the thing as a click on its box or its link does, and shows it. On the Map the boxes around it are opened so that it is drawn, and the view is centred on it (what the Center button does); a pin or a hidden element of your own is not undone, and the panel says when the element is not on the map. A removed element opens the read-only panel described above, a relationship selects its link (in Elements, the element that declares it, and its link when that element’s diagram is shown). The row of the selection is marked in the list, and the Changes tab brings the list back with that row in view.

What changed

The panel of a selected element, link or removed box adds a What changed block, first, so that a long description does not push it out of sight; it is the same on the page of a view in Stories.

  • For a changed element, the natures in words, then each property that differs with its value Before and After (name, kind, description, qualifiers, tags, and the applications or uses of a node), then its relationships that are new, changed or removed, each a line with its chip. The Before and After lines carry a sign and a word, and the old value is struck, so nothing relies on colour.

  • For a new element, "Whole element is new": its properties are the ones listed below the block, and the relationships it declares are listed as new.

  • For a removed element, the read-only panel above, with "Whole element is removed"; it does not repeat what the panel already lists. A removed element that is only drawn as the place of what was inside it, and that other elements replace, adds Replaced by and lists them.

  • For a moved, split or merged element, one sentence that says which, then Replaces with the name and the reference of each element it replaces (one that the other plateau does not have is flagged), then, if the element also changed, Also changed and the properties Before and After as above.

  • For a link, its state (all of the relationships it groups new, or removed, or changed, or a mixture, which reads changed) and, on each relationship it groups, its chip and, for one that changed, what it was and what it is.

Changes only and wording-only changes

Changes only, one toggle in the group Compare of the toolbar of a diagram and shown while a plateau is compared, sets what the diagrams draw: pressed, a diagram keeps what is new, changed or removed, the boxes that enclose them and the ends of the changed links; the links that did not change are left out; pressed again, it draws the whole plateau. The boxes kept only to place the changes, the context, are drawn faded, say no state and are told in the key ("context, faded: shown to place the changes", with their number). The focal element of a diagram always stays and is never faded. It works the same on the Map, on the diagrams of Elements and on the page of a view in Stories, and together with the pins, the hidden elements, a facet and Hide unlinked.

A change of the description alone is a change of wording, not of structure. The Changes panel counts them apart ("10 of the changed elements are changes of wording only") and keeps them visible by default; the checkbox Hide wording-only changes sets them aside in one click: those elements are drawn as unchanged (and a box that only they changed is no longer marked contains-changes, nor kept by Changes only), their rows leave the list, the counts of changed elements drop by their number and the panel says "10 wording-only changes hidden". Relationships are never set aside: a change of a label, a qualifier or a tag is structure.

Both choices are yours and not the workspace’s: they are remembered per folder in this browser, like the plateau and the comparison, never written to .archicode.yaml, and they do nothing while nothing is compared. Changes only is also in the address while a comparison is on (changes-only=1), so that a link shows what its sender saw; opening such a link does not change what this browser remembers. Hide wording-only changes is not in the address.

The address and the trees

The address of the page carries a selection, so that a reload or a shared link reopens it: ref= for an element, link-from= and link-to= for a link, as before, and removed= for a removed element (removed-layer=technology for one of the technology layer). A removed element exists only next to its comparison, so the address then also carries compare= (past, the past that follows the plateau drawn; future:<id>, a plateau that overrides the plateau drawn; or other:<id>, any other plateau of the tree: a choice in the tree of Compare with is written as one of the three; compare=future with no id is read as the future to choose, and shown as the disabled entry Choose a future plateau when several plateaus override the plateau drawn): opening such an address chooses that comparison, as if you had chosen it, even if this browser remembered another one. The page writes compare= on every diagram page of a workspace that has plateaus, with Changes only beside it (see What a link carries); the wording-only toggle is not in the address.

While a comparison is on, a row of the tree of Elements and of the tree of the Map has a small mark after its name: + for a new element, ~ for a changed one, →, ⋔ or ⊕ for a moved, split or merged one, and ± for one that did not change but has a change below it. The word is in its tooltip and is read by a screen reader. A removed element is not in these trees (it is not an element of the plateau drawn, so it can be neither pinned nor hidden nor edited): the Changes panel lists it and opens its panel.

A link copied from the address bar draws the diagram its sender saw: the same boxes, the same links, in the same places. The rule is that an option is in the address when it changes which boxes and links are drawn, or where, and is never there when it changes only the surroundings.

Parameter What it carries

layout=N

the columns chosen in the toolbar (1 to 20), on the page of an element and on both Maps; never the value of a view or of the workspace, which are files

compare=

the comparison (past, future:<id>, other:<id>, empty for none), on every diagram page of a workspace that has plateaus

changes-only=1

Changes only, while a comparison is on; with compare= and without it, the flag is off

open=

the unfolded boxes of a Map, a list of references

hide=

the hidden elements of a Map, a list of references

matrix=

the plateau at the end of the path read on the page Plateaus (the root has none)

rows=all

the unfolded rows of that reading, with matrix= only

pin=, rel=, hl=, facet=, hide-unlinked, applications=0, relationships=0, the names shown, frame=fit

as before

Three things are never in the address: the wording-only toggle, the open or folded key, and zoom and pan; nor is the selection of a box. A reference the workspace does not have, or a layout that is not a whole number from 1 to 20, is dropped and the page writes the address back without it. An address the page wrote earlier opens as before.

Moved, split and merged elements, and candidates

An element of the plateau that is drawn can say which elements of the plateau it is compared with it replaces: the key replaces (see Saying what an element replaces). The editor draws the result with the three states above, counts them and lists them in the Changes panel, and the What changed block of a moved, split or merged element says what it replaces. A replaced element is not listed as removed. The Changes only filter keeps these elements like the others. The hand-written tags still follow the rule of [plateau-state-tags]: the look of moved, split or merged is only for a box the comparison says is in that state.

Candidates. Under the counts, the Candidates section lists the pairs the comparison takes for one thing said twice: an element only the other plateau has, and an element only this one has, of the same kind and the same layer, with the same name (when no other removed and no other new element of that kind has it), a close description, or as the only two of their kind under the same parent (not between two plateaus that are not one the past of the other, two alternatives), and each with its reasons. Unlike archicode diff, which lists them only for a plateau that already uses replaces, the editor proposes them for any comparison: it is how an author starts. A candidate is never applied by itself. Each pair has two buttons:

  • Write replaces adds the reference of the removed element to the replaces of the new one, in the manifest that declares the new element, and nothing else. It is an edit like the others: the file is marked as modified and written by Save all changes, the lines you did not touch (comments, blank lines, quotes) stay as they are, a list that was there gets the reference appended once, and a list written on one line (replaces: [shop.till]) becomes a list on several lines. The comparison is made again at once, and the new element is now moved, split or merged.

  • Not related sets the pair aside. It is remembered by the page only, until you close it: nothing is written and the comparison is not changed. The section says how many pairs are set aside, and Show again brings them back.

Write replaces writes the key on the element to of the more recent plateau of the two compared, in the manifest that declares it, and nowhere else; when the plateau compared with is the past of the one drawn (or any plateau the plateau drawn stands on), the more recent plateau is the one drawn, and when it is a plateau above the one drawn, the more recent plateau is the one compared with, which the button writes all the same, since it is the one thing the Changes panel offers. It is refused, with the reason in the panel and nothing written, when the element belongs to the older plateau of the two (replaces goes on the more recent plateau: compare the other way round), when the more recent plateau only inherits the element (it is declared in a plateau above, and the key would change that plateau and the ones that override it: compare that plateau with its past instead), when the replaced element is still in the more recent plateau, when it is not an element of the older one, or when the replaces of the element is not a list.

One more refusal belongs to comparisons several layers apart. replaces is read against the plateau a manifest builds on, so when a layer in between removed the replaced element, the entry would name nothing in the layer it is written in. The button is then off, and the sentence is its title and is written under the pair; a click that gets through anyway writes nothing and shows the same sentence, which names the element, the plateau the manifest builds on and what to do:

“a” is not an element of “p1”, the plateau “p2” builds on (a layer in between removed it): replaces is read against that plateau, so the entry would name nothing there. Compare “p2” with “p1”, or write the entry in the layer that still has “a” (a plateau that overrides one that holds it); nothing was written.

A split has one replaced element for all its pairs, so they are all refused or all allowed. A merge is written one pair at a time, so every pair is checked before the first is written, and the merge is refused as a whole: if the layer cannot hold one of the replaced elements, the buttons of all its pairs are off (the first pair keeps its own sentence above), and none is written, where the pair the layer could hold used to be written alone. The other pairs say why:

“n” would merge “a” and “b”, which is written one pair at a time, so every pair is checked before the first is written: “a” is not an element of “p1”, the plateau “p2” builds on (a layer in between removed it): replaces is read against that plateau, so the entry would name nothing there. Compare “p2” with “p1”, or write the entry in the layer that still has “a” (a plateau that overrides one that holds it). If a pair is no part of the merge, set it aside with “Not related”; nothing was written.

A pair set aside with Not related is no part of the merge, so the others are written as a lone pair is. A merge whose every replaced element the layer holds is written as it was, and a comparison one layer apart is not concerned.

By hand. The edit form of an element has a Replaces section as soon as the workspace has several plateaus: the list, each reference with a button to remove it, and a field to add one (it completes with the references of the plateau compared with). A reference the plateau compared with does not have is accepted and flagged ("not in “Base”", with the name of that plateau), because you may have written it for another baseline; one that the plateau drawn still has is flagged "still in this plateau: ignored". An element cannot replace itself, and a reference is listed once. Add replaces is checked as Write replaces is, when a comparison is on and the plateau drawn is the more recent of the two: if the comparison is several layers apart and a layer in between removed the reference, the field shows the sentence above under it, keeps what you typed, and nothing is written. With no comparison, or one layer apart, a reference is written as before. The details of an element that replaces something list it too.

Warnings. What the comparison ignored in the replaces it was given (see [plateau-replaces-warnings]) is a short list in the Changes panel, under the candidates, with the sentences of the command line; the editor does not write them to the console. A second list, Hand-written states, has one line per element and word for the state words you wrote by hand that the comparison does not give to the element (see [plateau-state-tags]), with the sentences of the command line, and the panel of such an element says it too, so that a box with a new badge that is not drawn as new tells why.

Moving an element. An element that you put under another parent in the editor has another reference, so it reads as a removed element and a new one when it is compared with the plateau it came from. Move does not write replaces (see Moving an element under another parent): write it from Write replaces in the Changes panel, or in the form of the element.

Moving an element under another parent

In the edit form of an element, Move (after Delete, before Add child) puts the element, and everything inside it, under another parent, or at the top level, without breaking a reference. It is offered when the dialog has at least one place to offer, the top level included: a solution, a person and an environment are at the top already and have nowhere else to go, so they have no Move; a system can go under a solution, and goes to the top level from there. It works on the plateau that is drawn, and never on the one it is compared with, which is read-only. In a plateau of layers it moves an element that plateau declares; an element it inherits is refused (a patch never changes a parent), and says which plateau declares it.

The dialog has a search field (it keeps the places that have every word you type in their name, id, reference or kind) and the list of the places the element can go, in the layer of the element: the top level, when it may be there, then the valid parents, each an element that may hold the kind of this one (the rules that create an element under a parent, see [nesting]). It says how many elements follow, how many references will be rewritten in how many files, and how many saved views follow. Under the places, a closed list says, for every element of the layer that is not offered, why not, with the same search: N places are not offered, and why. The reasons are the sentences that refuse a move: it is the element itself, it is inside the element, it is its parent already, its kind cannot be held by that parent (the sentence says what the parent holds), the parent already holds an element with that id, the parent is declared twice. A reason that stops every move (an element inside it is declared twice, a manifest cannot be read, a reference cannot be rewritten as text) is told once, at the top, as No move can be written now.

The top level. The kinds that may be at the top level are the ones the layer holds there: a person, a solution and a system in the application layer, an environment in the technology layer; for any other kind the list says so (A container is never at the top level: the application layer holds only person, solution and system there.), and the editor neither offers it nor moves an element there. In practice the top level is offered for a system that sits in a solution.

What follows. The reference of the element becomes the reference of the new parent followed by its id (its id alone, at the top level), and so does the reference of each element inside it. Every reference to the element or to something inside it is rewritten, in every file of the workspace, by the machinery of an id change:

  • the destination of the relationships of any element of the same layer;

  • the applications of the nodes of the technology layer (for an application element) and the uses of the environments (for a technology element);

  • the header.parent of the manifests attached to the element or below it;

  • the saved views and the steps of stories of the workspace (the element of a view, the pinned, hidden and open elements of a Map view);

  • what the page remembers: the selection, the unfolded rows, the modified marks, the pins of the Map.

The facets (their JSONPath is not a reference) are not read, as when an id changes. Nothing else of a file is touched.

What is written. There are four ways, chosen by how the manifest holds the element and where the new parent is declared, and the dialog says which one a place gets. The lines that are not part of the move stay as the author wrote them (comments, blank lines, quotes), as for any other edit:

  • An element that has a manifest of its own (app.shop.till.yaml, with its header.parent) stays in its file: only the header.parent line changes (at the top level the line goes), and the manifests attached below it follow by their own header.parent. The new parent can be in any file.

  • An element that is nested in the manifest of another one (in its content.elements) and goes under a parent of the same file is moved as a block inside that manifest: its lines, with the comments just above it and those at the end of its lines, go to the elements of the new parent, one level deeper or shallower, and the elements it leaves is dropped when it was the last element.

  • A nested element that goes under a parent in another file (declared in another manifest of the plateau written) is cut out of its file and pasted in the other, with its comments and its quotes. Both files are marked as modified, and a refused write changes neither.

  • A nested element that goes to the top level, or under a parent declared in a plateau whose files the plateau drawn does not write (a plateau it overrides), gets a manifest of its own, next to the file it leaves (app.<reference>.yaml, env. for the technology layer, and -2 when the name is taken), with its kind, its version, the plateau drawn when it is not baseline and the parent, none at the top level. A group has no kind of manifest, so a group cannot go there: that is #114.

The comments on lines of their own inside the block go with it, and so do the comments after its last line when they belong to it. The rule is the indentation, nothing else (a comment cannot be asked whom it is about): a comment after the last line goes with the block when it is indented deeper than the item, as the keys of the block are, or when it is at the column of the item and nothing follows it in the list; a comment at the column of the item above a sibling is that sibling’s introduction and stays, and so does one that is shallower than the item. The first comment that stays ends the scan, and the blank lines between the block and a comment that goes with it go with it. The rule is wrong in a few cases: a comment about the block written at the column of an item that has a sibling after it stays (it reads as the sibling’s); a comment about the next element indented as the keys of the block goes with the block; a comment at the column of the item, last in its list, goes with the block even when you meant it for the next key of the parent; and a comment deeper than the item after a blank line goes with it, even as a section comment. It is the same for the block that moves to another file and for the one that becomes a manifest of its own. A file whose layout the move cannot follow (an anchor, an alias, a tag, a list written at the column of its key) is written by the ordinary save: the move works and the file says the right thing, and the comments of the block are the price. The end of line of each file is its own.

What a move tells before it writes. A move changes the reference of the element, so the views and the steps of the stories that name it follow it, in every plateau. A plateau beside the one drawn that still declares the old reference can then no longer draw those views, and Move says so as a rename does (see [editor-rename]): it opens a dialog that names those plateaus and the views and steps, and asks before it writes (Back to Move or Move anyway). The plateaus it does not name are not concerned. Moving the element there too keeps the views whole.

Replaces. Move does not write replaces: the element that a move can reach is declared by the plateau that is drawn, and the plateaus it overrides do not have its old reference, so there is nothing for the key to name. In a workspace of plateaus the dialog says so in one line. To say that an element replaces one of another plateau, use Write replaces in the Changes panel, or the Replaces section of the form of the element (see Moved, split and merged elements, and candidates).

A move that is refused changes nothing at all, and the reason is told in the dialog, which stays open with what you chose: the new parent is the element or something inside it, it is its parent already, it cannot hold that kind, it already holds an element with that id, the element or the parent is declared twice or belongs to the plateau compared with, a manifest cannot be read (a reference in it could not be rewritten), a reference is written as a number (destination: 8080) and cannot be rewritten as the reference of another element, or an id has a / or a \ in it, which cannot be the name of a file (rename the element first).

Like every edit, a move is not written until Save all changes, and Cancel gives it up with the others (the folder is read again). The files it changed are marked as modified, and so is the moved element.

Theme

The editor is drawn in a light or a dark theme. By default it follows the one of the operating system. Settings has a section, Appearance (this browser), to choose Light, Dark or System instead: the choice applies at once, to the page, the code editors and the SVG and PNG exported from a diagram.

The choice is a preference of the browser, not of the workspace. It is remembered by the browser alone (nothing is written to .archicode.yaml or to any file of the folder), it is not a change to save, and it does not light Save all changes. A browser that refuses to remember it keeps the choice until the page is closed.

Keyboard

In a tree
  • Up and Down move, Home and End jump to the first and last row.

  • Right unfolds a branch or goes to its first child, Left folds it or goes to its parent.

  • Enter and Space select the element (in the Map, they fold or unfold the branch).

  • In the Map, P pins or unpins the element, and H hides it or shows it again.

In the Changes panel
  • J goes to the next change and K to the previous one: the walk of the buttons Next change and Previous change, in the same order, with the same filters, stopping at the ends. They work on every page that has the list (Plateaus, Applications, Environments, Elements, and Stories while a comparison is on), and from the Selected or View tab they bring the Changes tab back. They do nothing while you type in a field, an editor, a list or a text box, while a dialog, the help or the menu of the header is open, with Ctrl, Alt, Meta or Shift held, or where no list of changes is on the page. The buttons tell the key in their tooltips.

In a diagram
  • The arrow keys move between boxes, and Enter opens the one that has the focus.

  • The boxes are one Tab stop, and so are the links: a diagram takes two presses of Tab to cross, however many boxes and links it has. The arrow keys move from the box that has the focus to the neighbouring box, which becomes the stop. On a link, the arrow keys move to the next and the previous link (not to the neighbouring box), Home and End jump to the first and the last, Enter or Space selects it, and Esc deselects it. Tab goes from the boxes to the links and on, and Shift+Tab comes back.

  • +, - and 0 zoom in, out and back to the actual size. F fits the whole diagram and C goes back to how it opened.

  • M maximizes the diagram, Esc brings the tree back. On the page of a view in Stories, M hides the list of views and the panel, and Esc restores them, or else deselects the box or the link (see Stories: stories and views).

In the story player
  • Left and Right show the previous and the next step, Home and End the first and the last, Esc closes the window and gives the focus back to Play; Tab and Shift+Tab go round inside it. Up and Down are not taken. Nothing else happens while a field, a text box or a list has the focus (the list of the steps has its own arrows, and lets Esc through), while a dialog, the help or the menu of the header is open, or with Ctrl, Alt, Meta or Shift held; J and K do nothing in it (see [editor-story-player]).

Commands

ArchiCode runs as archicode <command>; the usage of every command, with all its options, is in Every command and option. These are the commands of the first level:

Print the version

Print the version - The command line
archicode --version

Prints one line on the standard output, archicode <version>, and exits with the code 0. -V is the short form. The version is the one the program was built from, the same in the native program, the JAR and the OCI Image (a build from a branch says -SNAPSHOT). It reads no workspace file, so it works in any folder. The option belongs to archicode itself: archicode views --version is a usage error like any option that does not exist (see Errors, warnings and exit codes), and the options of archicode --help are -h, -V and -w=<workspace file>, then the command.

Print the guide for an agent

Print the guide - The command line
archicode guide

Prints a guide, in Markdown, on the standard output, and exits with the code 0. The first line is archicode guide <version>, so that whoever reads it knows which version of the tool it describes. It is written for an agent (a program that reads text and writes files) that has nothing else: it is self-sufficient, and the tool does not need anything outside itself to print it. It loads no workspace, so it works in any folder, reads no file and uses no network, and it is the same in the JAR, the OCI Image and the native program.

What is in it, in the order of the text: how to start from nothing (archicode init, see Start a workspace); the loop of writing a manifest, checking that it loads with archicode query graph and drawing with archicode views generate, with the form of an error: line, a warning and the exit codes; the workspace file and its settings; every kind of manifest (the keys, the required ones, the enums, the nesting, the id rule and the reference form); the commands and their options; and a small workspace of eleven files (elements, a plateau that changes them, a story, a saved view and two maps) that shows the shape of each kind of file. The kinds, the nesting, the commands and the options are generated from the code that reads the files, so they cannot disagree with the tool that prints them; the conventions (the loop, what a plateau is, the defaults of --plateau and --against, what the schema cannot say) are text. The tests keep it true: the files of the small workspace are loaded by the command line and by the editor, the commands it shows are run, and the generated parts are compared with the classes. The guide is about 24 KB; the tests keep it under 30 KB, so that an agent can read it whole.

An agent that works on a workspace reads the guide once, then archicode query schemas manifest when it needs the exact content of a kind (see [manifest-schema]). There is no archicode validate command yet: a problem is reported one error: line at a time, the first one found, and the guide says so.

Start a workspace

Start a workspace - The command line
archicode init my-architecture

archicode init [FOLDER] writes a small workspace that loads and is drawn. The folder is created when it does not exist, and the default is the current folder. It writes:

  • .archicode.yaml, with a name and manifests.paths set to the folder manifests;

  • manifests/customer.yaml, a person, and manifests/shop.yaml, a system with one container and a relationship from the person to the system;

  • manifests/view.shop_overview.yaml, a saved view of the system, with the viewpoint overview;

  • the line /views*/ in .gitignore (created when the folder has none, added once to one that exists, and nothing else of it is changed), so that the folders views and views-<plateau> that views generate writes are not committed.

It prints the files it wrote and two commands, to run in the folder: archicode query graph, which checks that the workspace loads, and archicode views generate, which draws it. A saved view is drawn only when it is named, so the view of the example is drawn by archicode views generate -i shop_overview (see Generate views); without -i the command draws the views of the elements. It ends by pointing to archicode guide (see Print the guide for an agent).

init never overwrites. A folder that already holds .archicode.yaml, or one of the three manifests, is one line on the error output, for instance error: the folder my-architecture already holds .archicode.yaml: init writes nothing over a workspace, with the code 1 and nothing written. Edit the files, add manifests, and see [manifest-kinds] for the kinds you can write.

Import a Structurizr workspace

Import a Structurizr workspace - The command line
archicode import structurizr workspace.json --output my-architecture

archicode import structurizr <workspace.json> --output <folder> reads the JSON export of a Structurizr workspace and writes a new ArchiCode workspace. It loads no workspace (-w is not read). --output is required, and the folder must be absent or empty; an absent folder, and its absent parents, are created.

What it reads. The people, the software systems, the containers and the components of model, and the relationships they hold. Every other key is ignored.

What it writes. .archicode.yaml (a name, and manifests.paths set to manifests/**) and one manifest for each element, in manifests/, named by its reference: a person, a system, and a container or a component whose header.parent is the element that holds it. The id of an element is its name, in lower case, with each run of characters other than letters, digits, and - turned into one ; a name with no letter or digit takes <kind>_<Structurizr id>; elements that share a parent and an id get the suffix _2, _3, and so on, in the order of the export. The Structurizr id is kept in the tag structurizr.id and the group in the tag group; the technology and the tags of the element, other than the defaults of Structurizr, become qualifiers. A relationship is written on its source, with the description as its label and the technology as a qualifier. A relationship that Structurizr derived from another (it has a linkedRelationshipId) is not written, since ArchiCode derives such links itself. When it is done the command prints imported <n> elements and <m> relationships into <folder>; the result loads with archicode query graph and opens in the editor.

What it drops. Views, deployment nodes, styles, documentation and properties are not carried. Each part present is one warning: line with its count, and so is each relationship whose end is not an imported element, each derived relationship that was skipped and each id that was rewritten (the element, its Structurizr id and the id written). A dropped part is not an error: the exit code is 0, and the warnings tell what to write again.

The refusals. Each is one line on the error output, starts with error: `, exits with the code 1 and writes nothing: an input that does not exist, that is a folder or that is not JSON; a file that ends in `.dsl (export it to JSON first); a JSON with no model; an element with no name; an output folder that is not empty, or that is a file. The files are written in a folder next to the output and moved into place at the end, so that a failed write leaves no half of a workspace.

Import a LikeC4 model

Export a LikeC4 model to JSON, then import it - The command line
likec4 export json --skip-layout --project cloud-system -o cloud-system.json examples/cloud-system
archicode import likec4 cloud-system.json --output my-architecture --map app=container --map lambda=component

archicode import likec4 <model.json> --output <folder> reads the JSON export of a LikeC4 model and writes a new ArchiCode workspace. It loads no workspace (-w is not read). --output is required, and the folder must be absent or empty; an absent folder, and its absent parents, are created. The export is made with the LikeC4 tool, as the first line above does (the sample the tests read was made with that command, see its PROVENANCE.md in src/test/resources/likec4); the command reads that JSON only. When the file holds several projects, --project <id> chooses the one to read.

What it reads. The elements and the relations of the model, the title of the project and, for the report, the other parts of the export. Every other key is ignored. The tree is the one the dotted ids of LikeC4 make: cloud.next.graphql is held by cloud.next.

The kinds. actor is a person, and system, container and component are themselves. Each other kind of the model needs --map <kind>=<person|system|container|component> (repeatable); a model with a kind that has no target is one error: line that names all of them, so that one run tells everything to map. A --map that is not <kind>=<kind>, that names an ArchiCode kind that does not exist, that names a kind twice, or that names a kind that no element of the model has is an error too.

What it writes. .archicode.yaml (the title of the project as its name, else its id, else the name of the file, and manifests.paths set to manifests/**) and one manifest for each element, in manifests/, named by its reference, with header.parent set to the element that holds it. The id of an element is the last segment of its LikeC4 id, in lower case, with each run of characters other than letters, digits, and - turned into one ; a segment with no letter or digit takes <kind>_<n>, n being its position among its siblings; siblings that share an id get the suffix _2, _3, and so on, in the order of the export. The full LikeC4 id is kept in the tag likec4.id and the LikeC4 kind in the tag likec4.kind; the technology and the tags of the element become qualifiers. A relationship is written on its source, with its title as its label, its technology and its tags as qualifiers, and the tags likec4.id and likec4.kind. When it is done the command prints imported <n> elements and <m> relationships into <folder>; the result loads with archicode query graph and opens in the editor.

What it drops. Views, deployment elements and relations, styles, metadata, links, navigateTo, notation, globals, imports, diffs and manual layouts are not carried. Each part present is one warning: line with its count, and so is each relationship that is flagged bidirectional (it is written in one direction), each relationship whose end is not an imported element, and each id that was rewritten (the element, its LikeC4 id and the id written). The nesting of ArchiCode does not hold every pair: a person cannot be held by a system, and a component cannot hold a component. An element that the nesting cannot hold is not written, with everything under it, and its relationships go with it: the warnings give the count (warning: dropped elements: <n>) and then one line for each, with its LikeC4 id, its kind, the kind it was mapped to and the reason. A dropped part is not an error: the exit code is 0, and the warnings tell what to write again or to map otherwise.

The refusals. Each is one line on the error output, starts with error: `, exits with the code 1 and writes nothing: an input that does not exist, that is a folder or that is not JSON; a file that ends in `.c4 or .likec4 (export it to JSON first); a JSON that is not an export of a model, with no elements, or whose element has no kind or has no parent in the file; a file of several projects when --project is not given or names none of them; a kind to map, as above; an output folder that is not empty, or that is a file. The files are written in a folder next to the output and moved into place at the end, so that a failed write leaves no half of a workspace.

Errors, warnings and exit codes

Every command speaks on its error output in the same way, and keeps its standard output for what it produces (the files it announces, a table, a graph), so that archicode diff > changes.txt or archicode query graph | jq never mixes the two.

Errors. When a command cannot do what you asked, it prints one line for each problem on the error output, starts it with error: ` and exits with the code 1. It prints no stack trace. The exit codes are 0 (done), 1 (an error), 2 (a usage error, below) and 3, which only `archicode diff --fail-on gives, when the comparison holds a change it was asked to fail on (see Compare plateaus). The line says what is wrong and where, for instance:

error: `shop.web` has a relationship towards `payments`, which does not exist, in `manifests/shop.web.yaml` at `relationships[0].destination`
error: unknown plateau `nope`: the plateaus of this workspace are `baseline` and `to-be`
error: `manifests/shop.yaml` is not valid: the value has the wrong shape (found an array) at `header` (line 1, column 9)
error: the workspace file `/work/.archicode.yaml` does not exist (`-w` names another one)
error: the workspace file `/work/.archicode.yaml` cannot be read: permission denied

The last two lines are the two ways the command can fail to have the workspace file: there is no file under that name (a folder in its place counts), or there is one that the file system refuses to read (the reason is the one the system gives). The second used to be error: unexpected java.io.FileNotFoundException …​ with a stack trace, which is for a bug; it is a line like the others after 0.18.0. A folder that has workspace.yaml and no .archicode.yaml has its own line (see [upgrade-0-17]). A file that is there and is read, but is wrong, says what is wrong with it (error: `.archicode.yaml` is not valid: ...).

The same sentence in the editor. A manifest or a .archicode.yaml that the command line refuses, the editor refuses with the same sentence, without the file and the line (the editor shows it beside the file): a key that the element, the setting or the header does not have, a nested element whose kind is missing or none of those its parent takes, a value of the wrong shape, a header.kind that is none of the kinds, a key that is required and absent. The place is told by its path in the file, as the command line does:

unknown key `nme` (known: description, id, name, qualifiers, relationships, replaces, tags, type) at `nme`
unknown kind `containr` (known: container) at `elements[0]`
missing `kind` (known: container) at `elements[0]`
unrecognized `header.kind` "archicode.morin.io/persn" (known: archicode.morin.io/component, ...)
the value has the wrong shape (found a string) at `settings.views.labels`
Missing content.elements[0].id

An option that does not exist or a missing argument is a usage error: the command prints the problem and how to use the command, as it always did, and exits with the code 2. A failure that nobody expected, a bug, prints error: unexpected …​ and keeps its stack trace, because a report needs it; the exit code is 1.

Warnings. A warning says that the command went on but that something is probably not what you meant. It is one line starting with warning: ` on the error output, printed when the command has done its work (and before the error, if it fails), once for a sentence the command would say many times. The log is not where to look: the log level of the application is `ERROR, which hides the warnings of the log. A warning does not change the exit code. The command line warns of:

  • a step of a story that names a view nobody declares;

  • a step of a story that archicode stories generate skips: it names an element that the plateau of the step does not have, or it is told at a plateau and compared with that same plateau; or, for one facet only, a facet that removes the element it names (see Draw the stories);

  • a view that cannot be drawn in the plateau, because it names an element that the plateau does not have and another plateau has: skipped by views generate --view, or, for the entries of the lists of a map, left out (see [plateau-views-lacking]);

  • a viewpoint that the command line has no service for, skipped by views generate --view;

  • what a comparison ignored in the replaces of a plateau, with archicode diff and archicode views generate (see [plateau-replaces-warnings]);

  • a state word you wrote by hand on an element, where it disagrees with the comparison (see [plateau-state-tags]).

A command that has nothing to warn of prints nothing on its error output. Nothing here makes a warning fail a command: the exit code tells whether the command did its work.

Serve the editor

Serve the editor - The command line
archicode editor serve

Serves the editor (see Editor) and opens in it the folder of the workspace file, which must be named .archicode.yaml (-w can name that file in another folder; any other name is a usage error, see [upgrade-0-17]). The command prints a URL, http://127.0.0.1:48080/?token=…​;: open it in a browser (the page is refused without the token; the editor removes it from the address bar, and a session cookie, which opens the page only and never the API, lets a reload in).

  • --port (-p): the port to listen on, 48080 by default.

  • --host: the address to bind to, 0.0.0.0 by default, which a Docker -p mapping needs.

  • --allowed-host: a host name, besides localhost, 127.0.0.1 and [::1], that a request may be addressed to. Repeat it for several.

The server writes to the folder, so it does not trust the network: the page and every call carry a token that only the printed URL gives, a request must be addressed to one of the allowed host names, a page of another origin is refused, and only the .yaml, .yml and .json files below the folder of the workspace can be reached. With Docker, keep the host side of the port mapping on 127.0.0.1 (-p 127.0.0.1:48080:48080).

Generate views

Generate Views - The command line
archicode views generate --help

The "Generate Views" command within ArchiCode serves as a dynamic catalyst for creating comprehensive architectural views. This command is designed to efficiently produce visual representations of your architecture, aiding communication and understanding. Here’s a comprehensive breakdown of its functionality:

  • Triggering View Generation: The "Generate Views" command starts the generation of architectural views. Upon invocation, ArchiCode creates visual artifacts that encapsulate your architectural design.

  • Default Behavior: By default, this command uses discovery. It automatically identifies and generates views based on the elements present within both the Application Layer and the Technology Layer of your architecture.

  • Inclusive Viewpoint Generation: The default behavior extends to encompass all available viewpoints. This means that ArchiCode generates views for a comprehensive range of architectural perspectives, enabling a holistic portrayal of your design.

  • Built-in Renderer Integration: By default, the "Generate Views" command uses the ArchiCode’s Plantuml Renderer. This integration ensures that the generated views are easily understandable and sharable.

  • Organized Output: By default, the command orchestrates the organization of generated views within a dedicated "views" folder, nested within your workspace folder. This structured arrangement enhances clarity and enables efficient access to your visual representations.

The command offers also customization Capabilities:

  • Plateau: when the workspace has plateaus (see Plateaus), --plateau <id> chooses the one that is read. Without it, it is the plateau settings.current names, else the last one when the plateaus form one line, else the command asks for a choice (see [plateau-choose]). The views of a plateau are written in a folder of its own, views-<plateau> (and one folder per facet, views-<plateau>-<facet> with the default directory-name-template); a workspace without plateaus writes views as it always did.

Generate Views - Plateau
archicode views generate --plateau to-be
  • Comparison: a plateau other than the root is compared with the plateau it overrides, or with --against <id>, any other plateau (see Comparing two plateaus). The command then writes the plain views of the plateau, as above, and in addition the views of the comparison, which draw what is new, changed and removed. They are written in views-<plateau>-vs-<against> (and one folder per facet, views-<plateau>-vs-<against>-<facet>), next to two files that tell the same in text: gap.md and gap.json, the table of changes that archicode diff prints (see Compare plateaus), with the elements that moved, split or merged, the candidates (see Saying what an element replaces) and the cascade of the REMOVE patches (see [plateau-cascade]), and the same warnings about replaces on the error output. A workspace that sets settings.facets.global-enabled: false has nothing but these two files in views-<plateau>-vs-<against>: its views are in the folders of its facets. The root overrides nothing, so it is drawn alone unless --against names a plateau to compare it with (--plateau baseline --against to-be writes views-baseline-vs-to-be). An unknown plateau given to --against, the plateau itself, or --against on a workspace that has no plateau, stops the command before anything is written. --output is, with plateaus, the beginning of the name of these folders (see Manifests in folders for what it means for the manifests that a path with /** reads).

Generate Views - Comparison
archicode views generate --plateau to-be --against baseline

A facet applies to the views of a comparison as it does to the others, and a facet can select on change (see Comparing two plateaus).

  • Only the changes: --only-changes draws, in the views of the comparison only (views-<plateau>-vs-<against> and the folders of its facets), what changed: the new, changed, removed, moved, split and merged elements and relationships, the ends of their links, the elements that hold a change and what encloses them. The rest is kept as context and drawn faded, and a view with nothing to show still draws its own element. The views of the plateau itself and the table of changes (gap.md and gap.json) are as they are without the option. The option needs a comparison: with no plateau, or with the root and no --against, it is one error: line, and nothing is written.

Generate Views - Only the changes
archicode views generate --plateau to-be --against baseline --only-changes
  • Selective View Rendering: The power of customization lies in your hands. The command can be tailored to render specific views based on their unique identifier, providing you with control over the scope of generated visualizations. A view that a manifest or .archicode.yaml names (its id), a map included (see [map-viewpoint]), is drawn when it is asked for, and the views asked for are the only ones drawn: no built-in view comes with them. A view that cannot be drawn in the plateau is skipped with a warning (see [plateau-views-lacking]).

Generate Views - Selective View Rendering
archicode views generate --view=view_a --view=view_b
  • Renderer Engine Flexibility: You have the freedom to opt for a preferred Renderer Engine. The command allows you to specify a particular engine, aligning the rendering process with your architectural preferences.

Generate Views - Renderer Engine Flexibility
archicode views generate --engine=kubernetes-network-policies
  • Fine-Tuned View Properties: Further customization extends to individual view properties. ArchiCode lets you specify custom properties, ensuring that the generated views align precisely with your architectural objectives.

Generate Views - Fine-Tuned View Properties
archicode views generate --properties-content='{ "key" : "value" }'

The same workspace gives the same files. Generating the views of a workspace twice gives the same files, byte for byte, so that a workspace kept in git only shows a change when the workspace changed. This does not depend on the folder the workspace is in, on the order a file system lists the manifests in, on the JVM that runs the command, nor on the order in which the author wrote the elements of a list, the relationships of an element or its tags. Inside a file, the boxes come by reference and then by identifier, the links by their ends, their label, their qualifiers and their tags, and the styles by the name of the stereotype. What the author writes in an order keeps it: the qualifiers of an element and the words of rendering-stereotypes are the order of the stereotypes of its box (see Stereotypes and styles), so reordering them is a change of the workspace. Only a new version of ArchiCode rewrites files that the workspace did not change: the order of the stereotypes of a box changed in 0.10.0 and in 0.11.0, and the order of two links that only differ by the node they end on changed in 0.12.0 (it used to depend on the JVM). A saved map of the technology layer draws more since 0.15.0 (see [map-technology]). A comparison of two plateaus several layers apart reads the replaces of the layers in between since 0.16.0 (see Saying what an element replaces). A test (DeterministicGenerationTest) generates a workspace twice, with the manifests, the elements, the relationships and the tags declared in the reverse order and in another folder, and compares the files.

Query views

Query Views - The command line
archicode query views --help

The "Query Views" command within ArchiCode offers a versatile toolkit for precise exploration and customization of architectural views. Here’s an in-depth look at the capabilities and features of the "Query Views" command:

  • Default Behavior: As a testament to flexibility, the "Query Views" command, by default, refrains from applying any filtering or formatting. This ensures that you have the freedom to explore your architectural views without any predetermined constraints.

  • Focused Exploration: The "Query Views" command fine-tunes your exploration. It lets you filter and tailor your view output according to your architectural inquiries.

The command offers also customization Capabilities:

  • Plateau: like views generate, the command takes --plateau <id> to choose the plateau that is read (see [plateau-choose]); so does query graph.

  • Dynamic Filtering: The command uses JSON Path, so you can apply filters on the View model. This dynamic filtering allows targeted extraction of specific architectural insights.

Query Views - Dynamic Filtering
archicode query views -q '$.[?(@.viewpoint=="deep")]'
  • Customizable Output Formats: ArchiCode’s "Query Views" command supports various output formats, including YAML, TOML, JSON, and a customizable option. This ensures that your extracted data aligns with your preferred format.

Query Views - Customizable Output Formats
archicode query views -f toml
  • Template-Based Customization: The command’s customizable output format integrates a template-based approach. By leveraging the Velocity template engine, you can define specific output structures tailored to your architectural needs.

Query Views - Template-Based Customization
archicode query views -f custom -t '$d.e("$.[*].id")'
  • Sorted Output: the views come sorted, by identifier and then by layer (application before technology), in every output format and before the JSON Path query is applied, so that $.[0] is always the same view. Two runs, on the same machine or not, and two builds of the same version give the same output byte for byte, which lets you diff it or keep it in git. Before 0.14.0 the order of the views was not defined and changed from one build to another; the set of views did not. The order of your scripts' results changes once, when you upgrade; if a script relies on the position of a view, select it by its id instead.

  • Saved or derived: every entry ends with the key saved, true for a view the workspace saves in a manifest and false for a view the tool derives (the built-in view of each element). The key is in every output format and is there before the JSON Path query is applied, so a query can select on it. When a saved view and a derived one are alike, the saved one comes first.

Query Views - Only the saved views
archicode query views -q '$.[?(@.saved==true)]'
  • TOML Output: a TOML document is a table, so -f toml writes the list of views under the key views, as views = [{ id = '…​', …​ }, …​]; a JSON Path query that selects one view writes that view as a table, and one that selects anything else (a list of identifiers, say) is written under views too. Before 0.14.0 the list was written as an assignment without a key, which no TOML parser reads. The TOML output changes once, when you upgrade; the YAML, JSON and custom outputs did not change.

Query graph

Query Graph - The command line
archicode query graph --help

The "Query Graph" command prints the resolved elements and relationships of the workspace as JSON, with --plateau <id> to choose the plateau that is read. A relationship whose destination does not exist is an error, as it is for the views.

Query Graph - Print the graph
archicode query graph
  • Sorted Output: the elements come by layer (application, then technology) and, in a layer, by reference; the relationships come by the reference of their source in the same order and, for one source, as the author wrote them. Two runs and two builds of the same version give the same output byte for byte, which lets you diff it or keep it in git. Before 0.14.0 the elements came in the hash order of their references: the same for one workspace and one JDK, but not a promised one. The order of the output changes once, when you upgrade; the elements and the relationships did not change.

  • Deployments: when a node of the technology layer hosts applications, the output ends with the key deployments, a list of {"node":"<reference of the node>","application":"<reference as the node wrote it>"}, one entry for each pair the author wrote. The entries come by the reference of the node and, for one node, as the author wrote the applications. A workspace in which no node hosts an application has no deployments key. An entry copies the reference of the application and does not check it: a hosted application that does not exist is an error only in a workspace with plateaus, as before. archicode query graph | jq '.deployments[] | select(.node=="github.actions")' lists what a node hosts.

Query impact

Query Impact - The command line
archicode query impact --help
Query Impact - What touches the kernel of ArchiCode, one hop away
archicode query impact archicode.kernel --depth 1 -w docs/architecture/.archicode.yaml

The command answers "what does a change to this element touch?" in one call, from the same graph as query graph. It takes the reference of one element, prints one line of JSON on the standard output and exits with the code 0. On the model of ArchiCode (the folder docs/architecture of a clone of the repository) the call above prints:

{"start":"archicode.kernel","direction":"in","depth":1,"reached":[{"reference":"archicode.commandline.viewpoint","distance":1,"via":{"source":"archicode.commandline.viewpoint","destination":"archicode.kernel.engine.compute","qualifiers":["calls"],"label":"draws with"}},{"reference":"archicode.commandline.workspace","distance":1,"via":{"source":"archicode.commandline.workspace","destination":"archicode.kernel.engine.patches","qualifiers":["calls"],"label":"applies the patches of a layer"}},{"reference":"archicode.contracts.couplings.kernel_wasm","distance":1,"via":{"source":"archicode.contracts.couplings.kernel_wasm","destination":"archicode.kernel.engine","qualifiers":["generated from"],"label":"is generated from"}},{"reference":"archicode.editor.application","distance":1,"via":{"source":"archicode.editor.application","destination":"archicode.kernel.engine.patches","qualifiers":["calls"],"label":"loads the kernel before the patches"}},{"reference":"archicode.editor.model","distance":1,"via":{"source":"archicode.editor.model","destination":"archicode.kernel.engine.compute","qualifiers":["calls"],"label":"calls the kernel"}},{"reference":"archicode.editor.presentation","distance":1,"via":{"source":"archicode.editor.presentation","destination":"archicode.kernel.engine.compute","qualifiers":["calls"],"label":"draws with"}}]}
  • Answer: start is the reference asked, direction and depth are what was asked (depth is null when there is no bound), and reached lists the elements touched. An entry has the reference of the element, its distance in hops from the start and via, the first coupling that reached it: for a relationship the source, the destination, the qualifiers and the label as the author wrote them, for a deployment deployment: true in place of the qualifiers and the label.

  • Direction: --direction in (the default) follows the couplings backwards and lists the elements that point at the start, which are the ones a change to it can break; out lists what the start points at; both follows the two.

  • Depth: --depth <n> stops after n hops; n is 1 or more, and a smaller value is one error: line (exit 1). Without it the walk goes as far as the couplings go.

  • Qualifiers: --qualifier <qualifier>, repeatable, keeps the relationships that carry any of the qualifiers named. It filters relationships only; a deployment is not filtered by it.

  • Through: --through relationships (the default) follows the relationships. --through deployments follows an application on the node that hosts it (see Query graph), and --through relationships --through deployments follows both. A node that hosts an application is the source of the coupling, so with --direction out an environment’s node reaches its applications and with in an application reaches its nodes.

  • Descendants: an element covers its descendants, so a coupling that ends on a descendant touches the element. A reached element is named once, at its shortest distance. The start and its descendants are never listed.

  • Sorted Output: the entries come by distance and then by reference, so two runs and two builds of the same version give the same output byte for byte.

  • Errors: a reference that is no element of the graph is one error: line on the error output (exit 1), like a workspace that does not load. Like query graph, the command takes --plateau <id> (see [plateau-choose]).

archicode query impact archicode.kernel | jq -r '.reached[].reference' lists the elements a change to the kernel can break.

Draw the stories

Draw the stories - The command line
archicode stories generate --help

views generate does not draw the stories. archicode stories generate [--story <id>]…​ draws the steps of the stories of the workspace, one folder for each step:

  • A step is drawn like a view of the plateau it is told at: its at, else --plateau, else settings.current (see [story-step-plateaus]). A plateau is loaded once, however many steps are told at it. When the step says against, it is drawn like the views of a comparison of that plateau with the against one (views generate --plateau <at> --against <against>); the comparison is made once for the pair, and the table of its changes, gap.md and gap.json, is written in the folder of the step, beside its plantuml/ folder, byte for byte what views generate writes in views-<at>-vs-<against> for the same pair (a step that compares nothing has none).

  • The files go to <views.path>-stories/<story>/<NN>-<view>/, with views.path read without the -<plateau> that a workspace of plateaus adds (views-stories for the default), NN the number of the step from 01, and <view> the view the step names, else the viewpoint of the view it carries (whose file is step_NN.puml). The renderer then adds its own folders as it does for any view (plantuml/application/…​).

  • The facets of the workspace (settings.facets) are drawn as views generate draws them: next to the folder of a step, one folder per facet, <NN>-<view>-<facet> (the name follows directory-name-template), with the same views in it; for a step that compares, the facet is applied to the comparison, and no table is written in a facet folder. A facet that removes the element a step names is a warning, warning: skip fork_tour/2 in the facet `no-externals`: it names `commerce-saas`, which the facet removes, and only that facet’s folder is skipped. global-enabled: false is honoured as it is by views generate: the folder of the global views is not drawn and the folders of the facets are. In 0.17.0 a workspace with that setting still got the global folders of its steps; it does not any more. When the global views are off and the workspace has no facet either, nothing is drawn, and the command says so once: warning: the global views are turned off (`global-enabled: false`) and the workspace has no facet: the steps of the stories are not drawn. --output (-o) replaces the beginning of the folder name, as in views generate, and --engine (-e) chooses the renderer.

  • A step may say highlight, a list of entries as the highlight of a map (see [map-highlight]), for a view of the map viewpoint: it replaces the highlight of the saved view the step names (the saved view is untouched), and an empty highlight: [] switches that highlight off. For a step that carries its own recipe, the highlight of the step wins over a properties.highlight of the same step. A story can thus keep one view and move the highlight from step to step. The entries are checked as in a view, and one that the plateau of the step lacks is the warning of [map-highlight].

  • --story (-s) draws the stories named, repeated for several; with none, every story is drawn, in the order of their ids. An unknown story is one error: line and exit 1, before anything is written: error: no story `nope` in the workspace (known: migration).

  • A tree of plateaus that forks needs --plateau, as every command that loads a plateau (see [plateau-choose]), even when all the steps say at.

  • A step that cannot be drawn is a warning and is skipped; the others are drawn and the exit code is 0: warning: skip fork_tour/7: it is told at the plateau `saas` and compared with it: there is nothing to compare and warning: skip <story>/<n>: it names `x`, which the plateau `p` does not have. A story with no step is a warning too.

Draw the stories of the example domain_plateaus
archicode stories generate

writes views-stories/migration/01-overview/ to 04-overview/ (the third is 03-detailed/: that step uses the detailed viewpoint), one for each step of the story migration. On the layered Brightcart, archicode stories generate --story fork_tour --plateau saas draws the seven steps of fork_tour in views-stories/fork_tour/01-shop_overview/ to 07-overview/, the last one skipped with the warning above, since it is told at saas and compared with it. Each step also has the folders of the three facets of the workspace (01-shop_overview-journey, 01-shop_overview-no-externals, 01-shop_overview-without-cart), and the steps 02 to 06, which compare two plateaus, have a gap.md and a gap.json beside their plantuml/ folder (the step 02 has no folder for no-externals: it names commerce-saas, which that facet removes, and the command warns). On domain_plateaus, whose story migration compares steps 2 and 4 with baseline, 02-overview and 04-overview have the two files and there is no facet.

List the plateaus

List the plateaus - The command line
archicode plateau list

Lists the plateaus of the workspace, one per line, in the order of the tree: baseline, then what overrides it, each plateau followed by what overrides it, and plateaus that override the same one by their ids. The columns are PLATEAU, PARENT (the plateau it overrides), SOURCE (manifest <file>, headers only (<files>) for a plateau that only headers name, or implicit for the root that nothing names), NAME and HORIZON, with - for what is absent; the output is in [plateau-choose]. The warnings of the tree (see Plateaus) go to the error output. A workspace that names no plateau lists baseline alone.

Important
archicode plateau add no longer exists: it copied a complete folder into settings.plateaus, and the plateaus are layers now. To add a plateau, write a manifest of kind archicode.morin.io/plateau (id, name, override, patches) and the manifests that say plateau: <id> in their header (see Plateaus), or use the editor (see The band of plateaus).

Compare plateaus

Compare plateaus - The command line
archicode diff --plateau to-be --against baseline

Tells what a plateau changes: the elements and the relationships that are new, changed or removed compared with the other plateau, and what changed in each. An element that says what it replaces (see Saying what an element replaces) is moved, split or merged. It prints a table to read in a terminal, to paste in a pull request or to feed to a script, and writes nothing to disk (views generate writes the same table next to the views, see Generate views).

comparing to-be (To be) with baseline (As is)
elements      +2 ~2 -2
replacing     2 moved, 2 split, 1 merged
relationships +1 ~1 -1
wording only  1 of the 2 changed elements

CHANGE   THING         LAYER        REFERENCE                                   NATURES                                                                     DETAILS
merged   element       application  shop.billing                                -                                                                           from shop.invoices, shop.receipts; name: "Billing"
split    element       application  shop.cart                                   -                                                                           from shop.orders; name: "Cart"; split with shop.checkout
changed  element       application  shop.catalog                                description (wording only)                                                  description: "The books on sale." -> "The books that are on sale."
split    element       application  shop.checkout                               -                                                                           from shop.orders; name: "Checkout"; split with shop.cart
removed  element       application  shop.mailer                                 -                                                                           name: "Mailer"
new      element       application  shop.payments                               -                                                                           name: "Payments"
new      element       application  shop.ratings                                -                                                                           name: "Ratings"
removed  element       application  shop.reviews                                -                                                                           name: "Reviews"
changed  element       application  shop.web                                    qualifiers,relationships-added,relationships-removed,relationships-changed  qualifiers: +React
moved    element       application  warehouse.inventory                         -                                                                           from shop.inventory; name: "Inventory"
moved    element       application  warehouse.inventory.levels                  -                                                                           from shop.inventory.levels; name: "Levels"
changed  relationship  application  shop.web -> shop.catalog (browses)          label                                                                       label: "reads" -> "browses"
removed  relationship  application  shop.web -> shop.mailer (sends mails with)  -
new      relationship  application  shop.web -> shop.payments (pays with)       -

candidates, not applied (each pair looks like one thing said twice; to accept one, write `replaces: [FROM]` on the element TO)
LAYER        FROM          TO            REASONS
application  shop.reviews  shop.ratings  description

cascade of the removals (what a REMOVE took besides the elements it selects, in the plateaus the target adds to the one it is compared with)
PLATEAU  PATCH                           EFFECT   LAYER        ELEMENT                DETAIL
to-be    1 REMOVE target shop.mailer     dropped  application  shop.web               relationships: shop.mailer (sends mails with)
to-be    6 REMOVE target shop.inventory  removed  application  shop.inventory.levels
to-be    6 REMOVE target shop.inventory  dropped  application  warehouse.picking      relationships: shop.inventory (counts with)
  • --plateau: the plateau that is compared, as for views generate (see [plateau-choose]): settings.current, else the last one when the plateaus form one line.

  • --against: the plateau it is compared with: any plateau of the tree, a sibling or the future included; else the plateau it overrides (see Comparing two plateaus). The root overrides nothing, so --plateau baseline needs it.

  • --format (-f): text (the default; without --width its lines are as long as the longest reference, several hundred characters on a large workspace: wrap it with --width, or take markdown), markdown (a table to paste in a pull request) or json (the counts and one object per change, with before and after for a changed element).

  • --width <columns>: wraps the text table to that many columns, so that a long reference does not push the table off the screen (--width 100; $COLUMNS is not read, give the number). Without it the table is written as before, byte for byte. A cell wraps at its spaces; a word that has none, a reference of a deep element, is cut after a dot, a slash or a comma, then after a hyphen or an underscore, and last where the line ends, so that nothing is lost and a line read back without its line breaks is the cell. The columns share the width: each keeps at least what its heading needs, and what is left goes to the narrowest columns first, so that the change, the thing and the layer stay on one line where the details wrap. The sentences of the report (the candidates, the cascade) wrap too. Under about 50 columns the headings of the main table do not fit and the lines are longer than the width; the cells still wrap at their column and nothing is cut off. A width that is not a whole number above zero is one error: line, with the exit code 1, before anything is read. The markdown and the json formats are never wrapped, and it is an option of diff alone: views generate writes its table as Markdown and JSON only, so it has no --width.

  • --no-wording: leaves the elements whose description is the only thing that changed out of the table, and says how many are left out. The counts still include them. It changes nothing to the elements that moved, split or merged, nor to the candidates.

  • --fail-on <state>[,<state>…​]: makes the command a check for a build. It exits with the code 3 when the comparison holds a change of one of the states it lists, and with 0 otherwise. The states are new, changed, removed, moved, split, merged (the six states of a row), contains-changes (an element that did not change itself and holds a change), and any, which stands for the six of a row. The option may be repeated, and the words are in lower case. With --no-wording, a description that is the only thing that changed does not count. The table is printed as it is without the option, and nothing on the error output says why the build failed: the table does. An unknown or an empty state is one error: line and the exit code 1, before anything is read.

A wrapped table. The first rows of the table above with archicode diff --plateau to-be --against baseline --width 100 (the other rows, the candidates and the cascade wrap the same way):

CHANGE   THING         LAYER        REFERENCE             NATURES               DETAILS
merged   element       application  shop.billing          -                     from shop.invoices,
                                                                                shop.receipts; name:
                                                                                "Billing"
split    element       application  shop.cart             -                     from shop.orders;
                                                                                name: "Cart"; split
                                                                                with shop.checkout
changed  element       application  shop.catalog          description (wording  description: "The
                                                          only)                 books on sale." ->
                                                                                "The books that are
                                                                                on sale."

The table lists the elements, then the relationships, sorted by layer and reference (the reference of an element that moved, split or merged is its own, not the one it replaces): the same output for the same two plateaus, byte for byte, whatever the machine.

When elements replace others. The table above, of the example of the manual, has them already (see Plateaus). A second invented workspace, the warehouse of src/test/resources/plateau-comparison/replaces in the source repository, has a till that moved to the stock system and was renamed, a report that was split in two (and its chart, which nothing replaces, so it is removed), a bin and a shelf that were merged into a place, a mailer that was rewritten as a postman without a word about it, and a replaces that names an element the baseline never had. archicode diff --plateau after prints:

warning: replaces of shop.report-b (application layer): shop.nowhere is not an element of the base plateau, ignored
comparing after with before
elements      +1 ~0 -2
replacing     1 moved, 2 split, 1 merged
relationships +0 ~0 -0
wording only  0 of the 0 changed elements

CHANGE   THING    LAYER        REFERENCE          NATURES  DETAILS
removed  element  application  shop.mailer        -        name: "Mailer"
new      element  application  shop.postman       -        name: "Postman"
split    element  application  shop.report-a      -        from shop.report; name: "Sales report"; split with shop.report-b
split    element  application  shop.report-b      -        from shop.report; name: "Stock report"; split with shop.report-a
removed  element  application  shop.report.chart  -        name: "Chart"
merged   element  application  stock.place        -        from stock.bin, stock.shelf; name: "Place"
moved    element  application  stock.till         name     from shop.till; name: "Till" -> "Cash desk"

candidates, not applied (each pair looks like one thing said twice; to accept one, write `replaces: [FROM]` on the element TO)
LAYER        FROM         TO            REASONS
application  shop.mailer  shop.postman  description, parent

cascade of the removals (what a REMOVE took besides the elements it selects, in the plateaus the target adds to the one it is compared with)
PLATEAU  PATCH                        EFFECT   LAYER        ELEMENT            DETAIL
after    1 REMOVE target shop.till    dropped  application  shop.web           relationships: shop.till (takes payments with)
after    1 REMOVE target shop.till    dropped  technology   prod.cluster       applications: shop.till
after    4 REMOVE target shop.report  removed  application  shop.report.chart
  • The first line is a warning, on the error output; the rest is the table, on the standard output.

  • The replacing line, and in the Markdown form the line "Replacing elements: …​", exist only when an element replaces another. The elements that replaced others are in the replacing counts and not in the new, changed or removed ones, and the elements they replace have no row and no count: they are not removed.

  • The details of a row begin with from what the element replaces, then its name, then what differs from what it replaces (name: "Till" → "Cash desk"), and for a split the other elements that replace the same one.

  • The candidates are listed after the table, marked not applied: write replaces on the element in the TO column to accept one (see [plateau-candidates]). The mailer and the postman are still removed and new.

  • In JSON, a row of an element that replaces others has a replaces list (the references, sorted), the counts of elements have moved, split and merged when there are some, and candidates is a list of layer, from, to, reasons and "applied": false. In Markdown, the candidates are a section, ## Candidates, not applied.

  • The relationships of a split element are not compared with the other plateau (which half would own them is a guess), so those of the halves, and those that end on a half, read as new. When there are some, the header has a line of a split (in Markdown, a sentence under the counts; in JSON, counts.relationships.of_split) that says how many of the new relationships they are, and each of those rows ends with of the split and the element or elements concerned (in JSON, of_split, a list). Nothing is invented as removed, and the counts of new still include them. The editor’s Changes panel says the same under its counts and on each row.

  • A plateau that does not use replaces gets the table it always had, byte for byte. A difference is not an error: the exit code is 0, unless --fail-on asks otherwise (the exit code is then 3, see above). The command stops with an error (exit code 1) that says what to do when the workspace has no plateau, when the plateau is the root and --against names none, and when the plateau named by --against is unknown or is the plateau itself.

Fold a plateau into the one above

Fold a plateau - The command line
archicode plateau fold inhouse --dry-run   # read the plan, write nothing
archicode plateau fold inhouse             # fold it

archicode plateau fold <id> folds the plateau <id> into the plateau that overrides it: the elements the folded plateau declares become elements of the plateau above, its patches go in front of the patches of the plateau above, and its manifest is deleted. The plateau above then overrides what the folded plateau overrode. The command does what [fold-by-hand] does by hand, and then checks the result. With --dry-run it does everything but the write: it prepares the fold, checks it and prints the report, and the folder, its manifests and .archicode.yaml are the same afterwards, byte for byte. Run it first, and read the plan.

A plateau that cannot be folded is refused with one line on the error output and exit code 1, and nothing on the standard output. The first six refusals are checked in this order, and the first one found is the only line:

error: unknown plateau `saaz`: the plateaus of this workspace are `baseline`, `inhouse`, `marketplace` and `saas`
error: the plateau `baseline` is the root of the plateaus: nothing is below it to fold it into
error: the plateau `marketplace` is not overridden by any plateau, so there is no plateau above it to fold it into: to remove it, use Delete in the editor
error: the plateau `inhouse` is overridden by `inhouse-alt` and `marketplace`, which do not stack: folding it into one would change the other. Keep it
error: `settings.current` names the plateau `inhouse`: write another plateau in `.archicode.yaml` first (`marketplace` is the one above it)
error: the plateau `inhouse` is named by the story `fork_tour` (`shared/story.fork_tour.yaml`) step 3 (`at`), step 4 (`at`) and step 5 (`against`), and the story `seller_journey` (`shared/story.seller_journey.yaml`) step 3 (`against`): change those steps first, none is rewritten for you

The sentences name the plateaus of the layered Brightcart of the repository, a test fixture; on your workspace they name yours. There the two stories fork_tour and seller_journey name inhouse, so its fold is refused with the last sentence. Once those steps are changed (the test replaces each story by one step told at baseline), archicode plateau fold inhouse --dry-run prints:

plateau fold inhouse into marketplace (dry run: nothing was written)

after: `marketplace` overrides `baseline`; the plateaus that stay are `baseline` and `saas`

files rewritten (they lose their comments, quotes and layout):
  inhouse/application/accounts.yaml
  inhouse/application/commerce.cart.yaml
  inhouse/application/commerce.catalog.yaml
  inhouse/application/commerce.checkout.yaml
  inhouse/application/commerce.pricing.yaml
  inhouse/application/commerce.search.yaml
  inhouse/application/commerce.yaml
  inhouse/application/orders.yaml
  inhouse/application/payments.yaml
  inhouse/technology/prod.cloud.yaml
  inhouse/technology/staging.k8s.yaml
  marketplace/application/discovery.yaml
  marketplace/plateau.yaml

files deleted:
  inhouse/plateau.yaml (its name "Build commerce services" and its horizon "2026-Q4" are not kept)

patches:
  the 26 patches of `inhouse` go in front of the 23 of `marketplace`: 49

replaces to compose:
  discovery.search (marketplace/application/discovery.yaml): commerce.search -> shop.app.search

plateaus removed:
  inhouse: a command line or a CI file that names it will fail
  the default --against of `marketplace` changes from `inhouse` to `baseline`

checked on a temporary copy before writing: the models of the 3 plateaus that remain and the 6 comparisons between them are the same before and after, but for the PLATEAU and PATCH columns of the cascade

Without --dry-run the report is the same text in the past tense: its first line ends in (written), the title of the first block is files rewritten (they lost their comments, quotes and layout):, and two lines close it:

Read what changed with `git diff`, and run `archicode plateau list` and `archicode diff`

Read the report as follows:

  • The first line says whether anything was written. The after line names the plateau above the folded one and the plateaus that stay.

  • files rewritten lists the files the fold rewrites: the manifests whose header names the folded plateau, and the manifest of the plateau above. A rewritten manifest keeps its format (a TOML manifest stays TOML, a JSON one stays JSON) but loses its comments, its quotes and its layout, as the editor does when it writes a file again from scratch.

  • files deleted lists the manifest of the folded plateau, and says what it takes with it: the name and the horizon of the folded plateau are not kept, and the plateau above keeps its own.

  • patches counts the patches of the folded plateau that go in front of those of the plateau above.

  • replaces to compose lists the entries of the plateau above that name an element of the folded plateau, with the file that holds them; the fold composes each one, as step 3 of [fold-by-hand] does.

  • plateaus removed says what names the folded plateau and breaks: a command line or a CI file, and the default --against of the plateau above.

  • The last block says what was checked.

What is checked. Before it writes anything, the command folds on a temporary copy and compares the plateaus that stay: the model of each plateau, and the table of changes of every pair of them, are read before and after. They must be the same, but for the PLATEAU and PATCH columns of the cascade of the removals, which name the folded plateau. The check runs in the dry run too. A fold that fails it is refused with one line that names the difference, and no file is written; nothing can force it, repair the cause the line names. Three more refusals come after the first six:

error: the fold of `a` into `b` would leave the plateau `c` unreadable: <the sentence of the loader>: no file is written
error: the fold of `a` into `b` would change the plateau `b`: before the fold it has application element extra.leg {"id":"leg","kind":"container","name":"Legacy"}, after it application element extra.leg {"description":"Retired","id":"leg","kind":"container","name":"Legacy"}: no file is written
error: the fold of `a` into `b` would change how the plateau `b` compares with `baseline`: <line> becomes <line or nothing>: no file is written

The first is for a plateau that stays and does not load once the fold is made; the second is for a model that changes, here a patch of the folded plateau that selects by json-path and would, after the fold, reach an element of the plateau above too; the third is for a comparison that changes. A plateau that does not load as it is, before the fold, is refused with the sentence of the loader, as for every command:

error: in the plateau `c`, `bad` has a relationship towards `nowhere`, which does not exist, in `c/bad.yaml` at `relationships[0].destination`

What the guarantee is. A fold writes all its files or none. The command writes each new file next to its target under the name <file>.archicode-fold, moves each over its target, and deletes the manifest of the folded plateau last. If a write fails, it puts back every file already moved and stops with error: the fold stopped at `<path> (<the reason of the file system>): every file is as it was`; if putting a file back fails too, the line lists the files that may be partly written, and says to restore them with git. A file that changed between the moment the command read it and the moment it writes is refused (error: `marketplace/plateau.yaml changed while the fold was prepared: no file is written, run the command again`). The guarantee is for a failure of a write, not for a process that is killed while it moves the files: then a file may be left as it was written last, and a .archicode-fold file may remain, which is no manifest and is read by nothing. Git is the safety net: fold in a clean tree, read git diff, and git restore what you do not want.

What it does not do. It folds into the plateau directly above and no further; it does not rewrite a story or a view that names the folded plateau (it refuses, and you change those steps first); it does not keep the name and the horizon of the folded plateau; and it does not keep the comments, the quotes and the layout of the files it rewrites. The editor has no button for it (see Limits of today).

Read what a path of plateaus changes, element by element

The matrix of a path of plateaus - The command line
archicode plateau matrix baseline inhouse marketplace   # the plateaus, oldest first
archicode plateau matrix --plateau marketplace          # the chain from baseline to marketplace
archicode plateau matrix baseline inhouse marketplace -f markdown
archicode plateau matrix baseline inhouse marketplace -o views

archicode plateau matrix [PLATEAU_ID…​] answers "what happens to this element along the way" for a whole path at once, where archicode diff compares one pair. A row is one element followed through replaces (a move, a split or a merge keeps its row), a column is one plateau, and a cell says what the element is there: absent, present, new, changed, removed, moved, split or merged, with the references it replaces and what differs. A row with no change anywhere is left out, and the table says how many were left out.

The columns. Either the plateau ids, oldest first, each one a plateau that overrides the one before it (a plateau may be skipped: baseline marketplace compares the two as diff does), or none, and then the chain from baseline to --plateau (default: settings.current, else the last plateau when the plateaus form one line). --plateau together with ids is one error: line, and so is a path of fewer than two plateaus, a plateau named twice or out of order, an unknown plateau, and two plateaus that are alternatives (siblings, as inhouse and saas of the layered Brightcart): they are not a history, so no cell compares them.

The Span. From three plateaus, the last column, SPAN, is one comparison of the first plateau with the last, made by the same code as archicode diff --plateau <last> --against <first>. It is not the sum of the cells: an element moved in two steps is one move in the Span, and an element that is new and then removed is left empty there. With two plateaus the Span is the cell, and is not drawn twice.

The output. Without --output the table is printed in --format (text, the default, markdown or json). With --output the command writes matrix.md and matrix.json (the same text as -f markdown and -f json) in the folder <PATH>-matrix-<first>-to-<last>, next to the workspace file, and prints wrote <folder>. Without a value, PATH is the folder of the views of the settings (views), so the folder is views-matrix-baseline-to-marketplace; with one, it is relative to the folder of the workspace file, or absolute. --format with --output is one error: line. Put the plateau ids before --output, since the option may take a value. A folder that exists is written over, file by file; nothing else in it is touched.

Keep the folder in the family of the views. A folder that begins with the views folder and a dash is left out when the manifests are found below a / path, and matrix.json is then not read as a manifest. With -o outside that family (-o reports below manifests/, for instance), matrix.json is read as a manifest on the next load. Choose a PATH that begins with the views folder, or a folder outside manifests.paths.

The exit code is 0, a difference is not an error, and there is no --fail-on. The warnings of the comparisons go to the error output.

Generate JSON Schemas

JSON Schemas - The command line
archicode query schemas --help

The "Generate JSON Schema" command in ArchiCode creates the JSON Schema of the workspace metamodel. Its capabilities:

  • Workspace Model Schema: With the "Generate JSON Schema" command, ArchiCode lets you create the JSON Schema of the Workspace metamodel.

JSON Schemas - Generate the JSON Schema for the Workspace metamodel
archicode query schemas workspace
  • Manifest Model Schema: the command further generates the JSON Schema of a manifest. A manifest is a header and a content, and the content depends on header.kind, which the dialect of the schema cannot say (it is an older JSON Schema dialect, the one the tool has always printed, with no oneOf: the schema of the workspace is in the same dialect). So the schema does not choose for you: it carries the content of every one of the ten kinds side by side, and you pick the one that header.kind names.

JSON Schemas - Generate the JSON Schema for the Manifest metamodel
archicode query schemas manifest

The output is one JSON object. properties gives the envelope: the header and a content typed as an object. Under kinds there is one entry for each kind, keyed by its header.kind (archicode.morin.io/person, solution, system, container, component, environment, node, view, story and plateau), and kinds[<header.kind>].content is the schema of its content: the keys, the ones that are required, the enums (viewpoint, layer, the operations of a patch), the shapes (a text, a list of maps, a map) and a description of the id and of a reference. A reference is the ids from the root of the layer joined by dots (shop.web.api), an id holds no dot, and a reference must exist in the plateau. An element kind also says what it holds (holds: the kinds that can be nested in its elements), whether it can sit at the top of its layer (heldAtTheTop; in a workspace that has plateaus, a container, a component or a node never does, see [nesting]) and its layer. The elements nested in elements have a schema of their own under nested, so the content of a container points at #/nested/component, and the nesting is written once. The keys that a kind does not have are refused (additionalProperties: false), as the loader refuses them, except for a view and a story, which ignore them.

The schema describes one file, and the loader checks the whole workspace. What a schema cannot say, and where the loader says it instead, is part of the output of archicode guide (see Print the guide for an agent). Ten entries: a reference that does not resolve (the loader says unable to find the element …​ or dangling reference); a reference, a plateau, a view or a story declared twice (see [duplicate-references]); a header.parent that is not found, or a parent that cannot hold the kind (see [nesting]); a root that its layer does not hold in a workspace of plateaus; the tree of the plateaus (a plateau declared twice, a missing or circular override, a typo of an id; see Plateaus); a patch that selects nothing or changes an id or a parent, and the rule that a patch has a target or a json-path but not both (see [plateau-patches]); a view or a story step that names an element or a plateau that exists nowhere; .archicode.yaml, which is not a manifest and has the schema of archicode query schemas workspace; the name of a facet, which must be one folder name (see Tackling view clutter); and what a value means (a json-path that is not RFC 9535, a value that does not fit, a horizon earlier than the one below it). A file that conforms to the schema can still be refused by the command that loads it, with one error: line (see Errors, warnings and exit codes). The tests keep this list true: each limit is tied to the cases of the negative corpus that the loader refuses for that reason and not for the shape of a file.

  • Sorted Output: the properties of every object of the schema come in alphabetical order, so that two runs, and two builds of the same version, give the same schema byte for byte and you can diff it or keep it in git. Before 0.14.0 the properties of some objects (the elements) changed order on about one run in three; the schema did not otherwise change. The order of the properties changes once, when you upgrade.

  • IDE Integration and Coding: By integrating the generated JSON Schema into your Integrated Development Environment (IDE), your coding experience is enriched. The schema offers autocompletion and validation, which improve your coding accuracy and efficiency.

Every command and option

Each listing below is the usage of one command, in the text the program prints for --help. The first is archicode itself, then each command in the order of its group; a command that holds others comes before them.

archicode
Usage: archicode [-hV] [-w=<workspace file>] [COMMAND]
ArchiCode provides features to support architecture work with an as-code
approach.
  -h, --help      Display this help message.
  -V, --version   Print the version of ArchiCode and exit.
  -w, --workspace=<workspace file>
                  The workspace file.
Commands:
  views    Manage the views of the workspace.
  query    Query the ArchiCode data model.
  editor   Manage the local manifest editor server.
  plateau  Manage the plateaus of the workspace.
  stories  Manage the stories of the workspace.
  import   Import a model written for another tool into an ArchiCode workspace.
  diff     Compare a plateau with another one: the elements and the
             relationships that are new, changed or removed, and what changed
             in each, as a table.
  guide    Print the guide to ArchiCode for an agent that has only this program.
  init     Write a small workspace (.archicode.yaml, a person, a system with a
             container, a relationship and a view) that loads and is drawn.
archicode views
Usage: archicode views [-h] [-w=<workspace file>] [COMMAND]
Manage the views of the workspace.
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
Commands:
  generate  Generate the views of the workspace.
archicode views generate
Usage: archicode views generate [-h] [--only-changes] [--against=PLATEAU_ID]
                                [-e=ENGINE] [-o=PATH] [-p=PATH]
                                [--plateau=PLATEAU_ID]
                                [--properties-content=PROPERTIES]
                                [--properties-format=FORMAT] [-w=<workspace
                                file>] [-i[=VIEW_ID...]]... [-v
                                [=VIEWPOINT_NAME...]]...
Generate the views of the workspace.
      --against=PLATEAU_ID   The plateau to compare the plateau with, any
                               plateau of the workspace (siblings too).
                               Default: the plateau it overrides. 'baseline' is
                               the root of the plateaus.
  -e, --engine=ENGINE        The name of the rendering engine.
                               Default: plantuml
  -h, --help                 Display this help message.
  -i, --view[=VIEW_ID...]    When specified, render only views matching the
                               given identifier.
  -o, --output=PATH          The output directory: relative to the folder of
                               the workspace file, or absolute. For a workspace
                               with plateaus, the beginning of the name of the
                               folder of each plateau: PATH-<plateau>, and
                               PATH-<plateau>-vs-<against> for a comparison.
                               Default: null
      --only-changes         In the views of a comparison
                               (PATH-<plateau>-vs-<against>), draw only what
                               changed: the new, changed, removed, moved, split
                               and merged elements and relationships, the ends
                               of their links, the elements that hold a change,
                               and what encloses them; the context is kept and
                               greyed. The views of the plateau itself are
                               drawn in full, and so is the table of changes.
                               It needs a comparison: a plateau that overrides
                               another one, or --against.
  -p, --properties-path=PATH The path to optional properties of the views.
      --plateau=PLATEAU_ID   The plateau to read, by its id (a plateau: key of
                               a header or a Plateau manifest). Default:
                               settings.current, else the last plateau when
                               they form one line.
      --properties-content=PROPERTIES
                             Optional properties of the views.
      --properties-format=FORMAT
                             The format of the view properties.
                               Default: json
  -v, --viewpoint[=VIEWPOINT_NAME...]
                             When specified, render only views matching the
                               given viewpoint name.
  -w, --workspace=<workspace file>
                             The workspace file.
archicode query
Usage: archicode query [-h] [-w=<workspace file>] [COMMAND]
Query the ArchiCode data model.
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
Commands:
  schemas  Get JSON schemas related to the ArchiCode data model.
  views    List and filter the views of the workspace.
  graph    Print the resolved element/relationship graph of the workspace as
             JSON.
  impact   Print what a change to an element touches, as one line of JSON: the
             elements reached, their distance in hops and the first coupling
             that reached them.
archicode query schemas
Usage: archicode query schemas [-h] [-w=<workspace file>] TYPE
Get JSON schemas related to the ArchiCode data model.
      TYPE     The type of the JSON Schema.
                 Default: workspace
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
archicode query views
Usage: archicode query views [-h] [-f=FORMAT] [--plateau=PLATEAU_ID] [-q=QUERY]
                             [-t=TEMPLATE] [-w=<workspace file>]
List and filter the views of the workspace.
  -f, --output-format=FORMAT The output format.
                               Default: yaml
  -h, --help                 Display this help message.
      --plateau=PLATEAU_ID   The plateau to read, by its id (a plateau: key of
                               a header or a Plateau manifest). Default:
                               settings.current, else the last plateau when
                               they form one line.
  -q, --query=QUERY          The query in JSON Path.
  -t, --template=TEMPLATE    The template in Velocity with access to data in
                               JSON Path.
  -w, --workspace=<workspace file>
                             The workspace file.
archicode query graph
Usage: archicode query graph [-h] [--plateau=PLATEAU_ID] [-w=<workspace file>]
Print the resolved element/relationship graph of the workspace as JSON.
  -h, --help                 Display this help message.
      --plateau=PLATEAU_ID   The plateau to read, by its id (a plateau: key of
                               a header or a Plateau manifest). Default:
                               settings.current, else the last plateau when
                               they form one line.
  -w, --workspace=<workspace file>
                             The workspace file.
archicode query impact
Usage: archicode query impact [-h] [--depth=<n>] [--direction=<in|out|both>]
                              [--plateau=PLATEAU_ID] [-w=<workspace file>]
                              [--qualifier=<qualifier>]...
                              [--through=<relationships|deployments>]...
                              <reference>
Print what a change to an element touches, as one line of JSON: the elements
reached, their distance in hops and the first coupling that reached them.
An element covers its descendants: a reached element is named once, at its
shortest distance, and the start and its descendants are left out. A reference
that is no element, or a depth below 1, is one error line.
      <reference>            The reference of the element a change is made to,
                               as `archicode query graph` lists them.
      --depth=<n>            The number of hops at most, 1 or more. Default: no
                               bound.
      --direction=<in|out|both>
                             Which way the couplings are followed: in (the
                               elements that point at it), out (the elements it
                               points at) or both. Default: IN.
  -h, --help                 Display this help message.
      --plateau=PLATEAU_ID   The plateau to read, by its id (a plateau: key of
                               a header or a Plateau manifest). Default:
                               settings.current, else the last plateau when
                               they form one line.
      --qualifier=<qualifier>
                             Follow only the relationships that carry this
                               qualifier; repeatable, any of them. It filters
                               relationships only.
      --through=<relationships|deployments>
                             The couplings followed, repeatable: relationships
                               or deployments (an application on its node).
                               Default: relationships.
  -w, --workspace=<workspace file>
                             The workspace file.
archicode editor
Usage: archicode editor [-h] [-w=<workspace file>] [COMMAND]
Manage the local manifest editor server.
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
Commands:
  serve  Serve the editor, with the workspace folder opened in it.
archicode editor serve
Usage: archicode editor serve [-h] [--host=<host>] [-p=<port>] [-w=<workspace
                              file>] [--allowed-host=<name>]...
Serve the editor, with the workspace folder opened in it.
      --allowed-host=<name>
                      A host name, besides localhost, 127.0.0.1 and [::1], that
                        a request may be addressed to.
                      Repeat it for several. Only for a server reached by name
                        from another machine.
  -h, --help          Display this help message.
      --host=<host>   The address to bind to.
                      Must stay 0.0.0.0 (the default) for a Docker -p mapping
                        to forward traffic at all.
                      Requests are only accepted when addressed to localhost,
                        127.0.0.1 or [::1] (see --allowed-host) and when they
                        carry the token of this server (printed in the URL to
                        open): control exposure with the host-side port mapping
                        (e.g. `-p 127.0.0.1:48080:48080`).
                        Default: 0.0.0.0
  -p, --port=<port>   The TCP port to listen on.
                        Default: 48080
  -w, --workspace=<workspace file>
                      The workspace file.
archicode plateau
Usage: archicode plateau [-h] [-w=<workspace file>] [COMMAND]
Manage the plateaus of the workspace.
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
Commands:
  list    List the plateaus of the workspace, in the order of the tree:
            baseline, then what overrides it, each plateau followed by what
            overrides it.
  fold    Fold a plateau into the plateau above it: the files are rewritten or
            deleted, the patches merged and the replaces composed, then the
            plateaus that remain are read before and after on a temporary copy
            and the folder is written only if they read the same.
  matrix  Write the matrix of a path of plateaus: a row per element lineage
            (followed through `replaces`), a column per plateau, and from three
            plateaus a SPAN column that is one comparison of the first plateau
            with the last. A row without a change is left out and counted.
archicode plateau list
Usage: archicode plateau list [-h] [-w=<workspace file>]
List the plateaus of the workspace, in the order of the tree: baseline, then
what overrides it, each plateau followed by what overrides it.
One line each: the id, the plateau it overrides (- for baseline, the root),
where its existence comes from (a manifest of kind plateau, or headers only:
manifests whose header says plateau: <id> and no Plateau manifest, or implicit
for baseline), its name and its horizon (- when it has none).
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
archicode plateau fold
Usage: archicode plateau fold [-h] [--dry-run] [-w=<workspace file>] <plateau>
Fold a plateau into the plateau above it: the files are rewritten or deleted,
the patches merged and the replaces composed, then the plateaus that remain are
read before and after on a temporary copy and the folder is written only if
they read the same.
--dry-run says what the fold would do and writes nothing. A plateau that cannot
be folded is one error line and the folder is not changed.
      <plateau>   The plateau to fold.
      --dry-run   Say what the fold would do and write nothing.
  -h, --help      Display this help message.
  -w, --workspace=<workspace file>
                  The workspace file.
archicode plateau matrix
Usage: archicode plateau matrix [-h] [-o[=PATH]] [-f=FORMAT]
                                [--plateau=PLATEAU_ID] [-w=<workspace file>]
                                [PLATEAU_ID...]
Write the matrix of a path of plateaus: a row per element lineage (followed
through `replaces`), a column per plateau, and from three plateaus a SPAN
column that is one comparison of the first plateau with the last. A row without
a change is left out and counted.
The path is the plateau ids, oldest first, each one a plateau that overrides
the one before it (a plateau may be skipped), or the chain from `baseline` to
--plateau (default: settings.current, else the last plateau when the plateaus
form one line). Two plateaus that are alternatives (siblings) are not a path:
that is one error.
The table is printed in --format. With --output the command writes matrix.md
and matrix.json in the folder PATH-matrix-<first>-to-<last> (default PATH: the
views folder of the settings) and prints its name; put the plateau ids before
--output.
      [PLATEAU_ID...]        The plateaus of the path, oldest first. Without
                               them, the path is the chain from baseline to
                               --plateau.
  -f, --format=FORMAT        The format of the table: text, markdown or json
                               (default: text). Not with --output.
  -h, --help                 Display this help message.
  -o, --output[=PATH]        Write matrix.md and matrix.json in
                               PATH-matrix-<first>-to-<last>, instead of
                               printing the table: PATH is relative to the
                               folder of the workspace file, or absolute
                               (default: the views folder of the settings).
      --plateau=PLATEAU_ID   The plateau to read, by its id (a plateau: key of
                               a header or a Plateau manifest). Default:
                               settings.current, else the last plateau when
                               they form one line.
  -w, --workspace=<workspace file>
                             The workspace file.
archicode stories
Usage: archicode stories [-h] [-w=<workspace file>] [COMMAND]
Manage the stories of the workspace.
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
Commands:
  generate  Draw the steps of the stories of the workspace.
archicode stories generate
Usage: archicode stories generate [-h] [-e=ENGINE] [-o=PATH]
                                  [--plateau=PLATEAU_ID] [-w=<workspace file>]
                                  [-s=STORY_ID]...
Draw the steps of the stories of the workspace.
Each step is drawn from the plateau it is told at (at; default: --plateau, else
settings.current, else the last plateau when they form one line) and, when it
says against, compared with that plateau, as views generate draws the views of
a comparison.
The files are written to <views path>-stories/<story>/<NN>-<view>/. A name that
the plateau of a step lacks is a warning and the step is skipped.
  -e, --engine=ENGINE        The name of the rendering engine.
                               Default: plantuml
  -h, --help                 Display this help message.
  -o, --output=PATH          The beginning of the name of the output folder, as
                               for views generate: PATH-stories, relative to
                               the folder of the workspace file, or absolute.
                               Default: the views path of the settings.
      --plateau=PLATEAU_ID   The plateau to read, by its id (a plateau: key of
                               a header or a Plateau manifest). Default:
                               settings.current, else the last plateau when
                               they form one line.
  -s, --story=STORY_ID       Draw only this story, by its identifier; the
                               option may be repeated. Without it every story
                               is drawn.
  -w, --workspace=<workspace file>
                             The workspace file.
archicode import
Usage: archicode import [-h] [-w=<workspace file>] [COMMAND]
Import a model written for another tool into an ArchiCode workspace.
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
Commands:
  structurizr  Import the JSON export of a Structurizr workspace (people,
                 software systems, containers, components and their
                 relationships) into a new ArchiCode workspace.
  likec4       Import the JSON export of a LikeC4 model (elements, their kinds
                 and their relationships) into a new ArchiCode workspace.
archicode import structurizr
Usage: archicode import structurizr [-h] -o=<folder> [-w=<workspace file>]
                                    <workspace.json>
Import the JSON export of a Structurizr workspace (people, software systems,
containers, components and their relationships) into a new ArchiCode workspace.
Views, deployment, styles, documentation and properties are not imported: each
is said as a warning. The folder must be absent or empty; a file that is not a
JSON export, or a folder that is not empty, is one error line and nothing is
written.
      <workspace.json>    The JSON export to read.
  -h, --help              Display this help message.
  -o, --output=<folder>   The folder to write the workspace in: absent or empty.
  -w, --workspace=<workspace file>
                          The workspace file.
archicode import likec4
Usage: archicode import likec4 [-h] -o=<folder> [--project=<id>] [-w=<workspace
                               file>] [--map=<kind>=<kind>]... <model.json>
Import the JSON export of a LikeC4 model (elements, their kinds and their
relationships) into a new ArchiCode workspace.
The actor, system, container and component kinds are mapped by default; each
other kind needs --map <kind>=<person|system|container|component>. Views,
deployment, styles and metadata are not imported: each is said as a warning.
The folder must be absent or empty; a LikeC4 source file, a file that is not a
JSON export, or a folder that is not empty, is one error line and nothing is
written.
      <model.json>          The JSON export to read.
  -h, --help                Display this help message.
      --map=<kind>=<kind>   Map a LikeC4 kind to person, system, container or
                              component. Repeatable.
  -o, --output=<folder>     The folder to write the workspace in: absent or
                              empty.
      --project=<id>        The project to read when the file holds several.
  -w, --workspace=<workspace file>
                            The workspace file.
archicode diff
Usage: archicode diff [-h] [--no-wording] [--against=PLATEAU_ID] [-f=FORMAT]
                      [--plateau=PLATEAU_ID] [-w=<workspace file>]
                      [--width=COLUMNS] [--fail-on=STATE[,STATE...]]...
Compare a plateau with another one: the elements and the relationships that are
new, changed or removed, and what changed in each, as a table.
The plateau is the one --plateau names (default: settings.current, else the
last one when the plateaus form one line); it is compared with the --against
plateau, any plateau of the workspace, siblings included (default: the plateau
it overrides). A difference is not an error: the exit code is 0, unless
--fail-on asks otherwise.
--fail-on makes the command a check for a build: it exits with code 3 (1 is an
error, 2 a usage error) when the comparison holds a change of one of the states
listed, and the table is printed as it is without it.
The cascade of the REMOVE patches the plateau adds is listed after the table.
--width wraps the text table to a number of columns.
      --against=PLATEAU_ID   The plateau to compare the plateau with, any
                               plateau of the workspace (siblings too).
                               Default: the plateau it overrides. 'baseline' is
                               the root of the plateaus.
  -f, --format=FORMAT        The format of the table: text, markdown or json.
                               Default: text
      --fail-on=STATE[,STATE...]
                             Exit with code 3 when the comparison holds a
                               change of one of these states, a list separated
                               by commas (the option may be repeated): new,
                               changed, removed, moved, split, merged,
                               contains-changes, or any (any of the first six).
                               Without it the exit code is 0 whatever the
                               comparison holds. With --no-wording, a
                               description that is the only thing that changed
                               does not count.
  -h, --help                 Display this help message.
      --no-wording           Leave out of the table the elements whose
                               description is the only thing that changed, and
                               say how many are left out.
      --plateau=PLATEAU_ID   The plateau to read, by its id (a plateau: key of
                               a header or a Plateau manifest). Default:
                               settings.current, else the last plateau when
                               they form one line.
  -w, --workspace=<workspace file>
                             The workspace file.
      --width=COLUMNS        Wrap the text table to this many columns, so that
                               a long reference or a long cell does not make it
                               unreadable: a cell wraps at the spaces, a
                               reference without any is cut after a dot or a
                               slash, then where the line ends. Without it the
                               table is as wide as its longest cell. The
                               markdown and json formats are not wrapped.
archicode guide
Usage: archicode guide [-h] [-w=<workspace file>]
Print the guide to ArchiCode for an agent that has only this program.
It holds the kinds of manifests and their keys, the commands and the
conventions, with a small workspace to start from.
It is Markdown on the standard output, versioned (the first line is `archicode
guide <version>`), the same from any folder, and it loads no workspace.
  -h, --help   Display this help message.
  -w, --workspace=<workspace file>
               The workspace file.
archicode init
Usage: archicode init [-h] [-w=<workspace file>] [<folder>]
Write a small workspace (.archicode.yaml, a person, a system with a container,
a relationship and a view) that loads and is drawn.
FOLDER is created if it does not exist; the default is the current folder.
Nothing is overwritten: a folder that already has .archicode.yaml is refused.
      [<folder>]   The folder to write the workspace in (default: the current
                     folder).
  -h, --help       Display this help message.
  -w, --workspace=<workspace file>
                   The workspace file.

Appendix

Data Structures

Base Element

All elements share the attributes of the Base Element.

Table 1. Attributes of the Base Element
Name Type Comment

id

string

The identifier of the element. Its format should match the variable name in Java or Javascript.

name

string

The human name of the element.

description

string

A short description of the element, usually between 25 and 75 words.

qualifiers

string

A list of specific characteristics that helps define or categorize the element. They are usually rendered in views. It can be the name of the main framework used to implement a container: Spring Boot. Or it can be the name of the RDMS for a database Container : PostgreSQL.

tags

string

A list of key/value pairs that helps to drive the rendering of views. For instance, to assign a predefined shape to the element or to categorize the element during a threat modeling process. The tag rendering-stereotypes is a whitespace-separated list of stereotypes the styles apply to (see Stereotypes and styles).

relationships

string

The list relationships where the current element is the source.

replaces

a list of strings

The full references of the elements of the plateau it is compared with that this element replaces (see Saying what an element replaces). Optional.

Application Layer

Table 2. Attributes of the Application Layer
Name Type Comment

elements

an array of Solution or System elements

A list of embedded objects.

Solution

The Solution Element inherits the attributes of the Base Element.

Table 3. Attributes of the Solution Element
Name Type Comment

elements

an array of System elements

A list of embedded objects.

System

The System Element inherits the attributes of the Base Element.

Table 4. Attributes of the System Element
Name Type Comment

elements

an array of Container elements

A list of embedded objects.

Container

The Container Element inherits the attributes of the Base Element.

Table 5. Attributes of the Container Element
Name Type Comment

elements

an array of Component elements

A list of embedded objects.

Component

The Component Element inherits the attributes of the Base Element.

Technology Layer

Table 6. Attributes of the Technology Layer
Name Type Comment

elements

an array of Environment elements

A list of embedded objects.

Environment

The Environment Element inherits the attributes of the Base Element.

Table 7. Attributes of the Environment Element
Name Type Comment

elements

an array of Node elements

A list of embedded objects.

Node

The Node Element inherits the attributes of the Base Element.

Table 8. Attributes of the Node Element
Name Type Comment

applications

an array of references which refrence elements of the Application Layer

The list of reference elements.

elements

an array of Node elements

A list of embedded objects.

Relationship

Table 9. Attributes of Relationship
Name Type Comment

destination

string

The reference of the destination element within the same layer.

label

string

A human-readable text defining the relationship.

qualifiers

a list of strings

A list of specific characteristics that helps define or categorize the relationship. They are usually rendered in views. It can be the name of the protocol implementing the link.

tags

a list of ky/value pairs

A list of key/value pairs that helps to drive the rendering of views. For instance, to set TCP ports and IPs driving the rendering of Kubernetes Network Policy manifests.

View

Table 10. Attributes of View
Name Type Comment

id

string

The identifier of the view. Its format should match the variable name in Java or Javascript.

viewpoint

string

The code of the viewpoint identifying the viewpoint service.

layer

string

The reference data model of the viewpoint: application or technology. Both tools read it in any case (Technology and TECHNOLOGY are the technology layer).

name

string

The human name of the element.

description

string

A short description of the element, usually between 25 and 75 words.

properties

any

A custom object containing properties to drive the execution of the viewpoint and/or renderer service. The map viewpoint reads pinned, hidden and opened on the application layer, links, the relationships to draw (see [map-links]), highlight, the relationships to point at (see [map-highlight]), and, on the technology layer, the booleans applications and relationships (see [map-viewpoint]). Any viewpoint may say layout: {columns: N}, the boxes per row the editor aims at, which the command line does not read (see The toolbar and the boxes per row).

Story

The content of a manifest of kind archicode.morin.io/story (see Stories).

Table 11. Attributes of Story
Name Type Comment

id

string

Required. The identifier of the story, declared once in the workspace.

name

string

The human name of the story.

description

string

What the story is about, in a few words.

steps

a list of Step

The steps, in the order they are told.

Step

An item of the steps of a Story. A step names a view (view) or carries one (viewpoint, layer, properties).

Table 12. Attributes of Step
Name Type Comment

view

string

The id of a view of the workspace.

viewpoint, layer, properties, name

as a View

The view the step carries, when it names none.

text

string

What to say about the view, as plain text.

at

string

The id of the plateau the step is told at. Absent: the plateau that is drawn (see [story-step-plateaus]).

against

string

The id of the plateau the step is compared with. Absent: no comparison.

Plateau

The content of a manifest of kind archicode.morin.io/plateau (see [plateau-manifest]).

Table 13. Attributes of Plateau
Name Type Comment

id

string

Required. The identifier of the plateau: lowercase letters, digits, _ and -. baseline is the root.

name

string

The human name of the plateau.

horizon

string

A free label for when the plateau is meant to hold, such as 2027-Q1.

override

string

The id of the plateau it is a layer over; baseline when absent.

patches

a list of Patch

What the plateau changes in what it inherits, applied in order.

Patch

An item of the patches of a Plateau (see [plateau-patches]).

Table 14. Attributes of Patch
Name Type Comment

operator

string

Required. REMOVE, SET, ADD or MERGE.

target

string

The full reference of one element. Exclusive with json-path.

layer

string

The layer of target: application (default) or technology.

json-path

string

A JSONPath (RFC 9535) that selects the nodes to change. Exclusive with target.

expect

integer

The number of nodes json-path must select, at least 1.

field

string

The field of the element that is changed.

where

an object

destination and label: finds one relationship of the element, for a SET of the field relationships.

value

any

The new value (SET), the item or the list of items added (ADD), or the keys set (MERGE). REMOVE takes none.

Concepts

Plateaus

An architecture is never finished: it runs one way today, you want it to run another way next year, and it will change again after that. You describe each of these as a plateau, and ArchiCode tells you what changes from one plateau to the next.

Where to go from here:

Important
Breaking changes. settings.plateaus, archicode plateau add and --baseline no longer exist: a plateau is a layer. A path of settings.manifests.paths may no longer contain .. nor be absolute, a reference declared twice is an error, and a plateau id is now lowercase letters, digits, _ and -. A workspace that has no plateau and no such path is read and drawn exactly as before, unless it declares a reference twice. To convert a workspace by hand, follow Upgrading: what breaks, and what does not.

The idea

A plateau is a layer. It starts from the plateau it overrides, adds the elements its own manifests declare, and changes what it inherits with a list of patches. The result is the architecture of that plateau. You write what differs and nothing is copied, so nothing has to be kept in sync by hand: when the root changes, every plateau above it changes with it, and a patch that no longer fits tells you so.

The first plateau, the architecture you have, is the root. It is called baseline, it exists without anything naming it, and it overrides nothing.

ArchiCode computes the difference between two plateaus from the references of the elements and the relationships. You never type it. ArchiCode tells what is new, what changed and what was removed, and the views, the table of changes and the editor all draw the same answer.

One thing cannot be computed: that two elements are the same thing. An element that moves under another parent, or is renamed, has another reference, so it reads as one removed element and one new one. ArchiCode never guesses it. You say it with replaces, on the element of the more recent plateau, and the comparison then reads a moved, split or merged element. ArchiCode proposes the pairs that look like one thing said twice (the candidates) and applies none. The editor writes the hint when you accept a candidate.

The files of a plateau

The folder of the architecture holds:

  • one .archicode.yaml, with the settings, the styles and the facets that every plateau shares;

  • the manifests of the root;

  • for each other plateau, the manifests that say plateau: <id> in their header, and a manifest of kind archicode.morin.io/plateau with its patches.

The example domain_plateaus of this manual (src/doc/examples/domain_plateaus in the source repository) has this layout: its .archicode.yaml, then its folders. The tutorial of the part Tutorials builds it.

A workspace with a root and one layer: .archicode.yaml
# the plateaus are layers. The manifests in `plateaus/baseline` say no `plateau:`: they are the root, `baseline`, the architecture as it
# is. The manifests in `plateaus/to-be` say `plateau: "to-be"`: they are the layer that builds on it, with the patches of its
# `plateau.to-be.yaml`. The folders are only a habit; the tools read the `plateau:` of the header, not the folder.
settings:
  name: "Bookshop"
  manifests:
    paths: ["plateaus/**"]
The folders of that workspace
- project_dir/
    - plateaus/
        - baseline/ (1)
            - customer.yaml
            - inventory.yaml
            - plateau.baseline.yaml
            - shop.yaml
            - warehouse.yaml
        - to-be/ (2)
            - billing.yaml
            - cart.yaml
            - checkout.yaml
            - inventory.yaml
            - payments.yaml
            - plateau.to-be.yaml (3)
            - ratings.yaml
    - .archicode.yaml
  1. The manifests of the root: no plateau: in their header. plateau.baseline.yaml is optional and only gives the root a name and a horizon.

  2. The manifests of the layer to-be: each says plateau: "to-be" in its header. Only what the layer adds; what it inherits from baseline is not copied.

  3. The manifest of the plateau to-be: its name, its horizon, the plateau it overrides and its patches.

The folders are only a habit, and the example (src/doc/examples/domain_plateaus in the source repository) names them after the plateaus to be easy to read. What puts a manifest in a plateau is the plateau key of its header, not the folder it is in. The editor warns when the two disagree (see Files); the command line says nothing.

The header. A manifest of an element can say which plateau it belongs to in its header:

header:
  kind: "archicode.morin.io/container"
  version: "1"
  plateau: "to-be"
  parent: "shop"
content:
  id: "ratings"
  name: "Ratings"

Without plateau, the manifest belongs to baseline, the implicit root.

A plateau exists as soon as a header names it or a manifest of kind archicode.morin.io/plateau declares it. A plateau that only headers name has no name and no horizon and overrides baseline; ArchiCode tells you with a warning (see Warnings in Mistakes and warnings). The elements of a plateau are added to the ones of the plateau it overrides, so a plateau sees everything its ancestors declare.

You declare a reference once in a plateau and in all the plateaus it stands on (see [duplicate-references]). The same reference in a plateau and in its ancestor is an error. In two plateaus that do not stand on each other (two alternatives) it is no duplicate.

Views and stories belong to no plateau. Only the elements, the patches and the plateaus are layers. A view and a story exist whatever plateau is drawn: the same view or story is the one of every plateau, and nothing patches it. You declare each once in the whole workspace (the error of [duplicate-references], between plateaus that do not stand on each other as well). A plateau: in the header of a view or of a story is accepted and means nothing: no tool reads it and no tool says anything about it (it is no warning and no error, whatever the text is). It does not make a workspace of plateaus either: a plateau that only a story names is no plateau. A header carries the key for every kind, and that is all there is to it.

ArchiCode looks at what a view or a story names without a plateau, once the layers are read. Every element it names must exist in at least one plateau, else it is an error, whichever plateau is asked for. A workspace without plateaus is not checked, and a view is looked at when it is drawn. A name that another plateau has and the plateau drawn lacks is no mistake of the view: that view cannot be drawn in that plateau (see [plateau-views-lacking]).

The manifest of a plateau. A manifest of kind archicode.morin.io/plateau qualifies one plateau. It is optional, and there is at most one for a plateau.

id

Required. What plateau: in a header, override, --plateau and --against name. Lowercase letters, digits, _ and - (no dot, no capital): the identifier is also used in folder names. baseline is the id of the root.

name

Optional. The name shown to people; the id when absent.

horizon

Optional. A free-text label for when the plateau is meant to hold, such as 2027-Q1. ArchiCode does not interpret it, except to order sibling plateaus in the lists of the editor and to warn when it is earlier than the horizon of the parent, when both read as a period (see below).

override

Optional. The one plateau this one is a layer over: baseline when absent. The plateaus form a tree whose root is baseline; two plateaus that override the same one are alternatives. The root overrides nothing.

patches

Optional. What the plateau changes in what it inherits, applied in order (see [plateau-patches]).

The manifest of the example, with all its patches, is in step 3 of the tutorial (see A tutorial: from one workspace to a review of the changes).

Mistakes and warnings

What is checked, and the lines you get. ArchiCode checks the tree when it reads the manifests. Each mistake is one error: line that names the plateau and the file, or one warning: (see Errors, warnings and exit codes). A plateau is read as its chain, from the root. For each plateau, the elements that say plateau: <id> are added to the graph, the patches of the plateau are applied, and the result is checked: a relationship, a uses entry, a hosted application and a parent must exist, and an element must be declared under a parent that can hold its kind (see [nesting]). The first plateau that is wrong ends the load, and the plateaus above it are not looked at. The views and the stories are checked once, after the layers (see [plateau-untied]), and so are the plateaus that the steps of a story name (see Stories).

error: the plateau `to-be` (`plateaus/to-be/plateau.to-be.yaml`) overrides `asis`, which is not a plateau of this workspace (the plateaus are `baseline` and `to-be`)
error: the plateau `to-be` is declared twice: in `plateaus/to-be/again.yaml` and `plateaus/to-be/plateau.to-be.yaml`
error: the plateau id `To.Be` in `plateaus/to-be/plateau.to-be.yaml` is not valid: use lowercase letters, digits, `_` and `-`
error: the reference `customer` is declared in the plateau `to-be` (`plateaus/to-be/customer.yaml`) and again in its ancestor `baseline` (`plateaus/baseline/customer.yaml`)
error: in the plateau `to-be`, `shopp.cart` is declared under `shopp`, which does not exist
error: in the plateau `to-be`, `shop.web` has a relationship towards `shop.nowhere`, which does not exist, in `plateaus/to-be/shop.web.yaml` at `relationships[0].destination`
error: the view `shop_overview` (`manifests/view.shop_overview.yaml`) names `shopp`, which exists in no plateau

The first three are about the tree: an override that names nothing, a plateau declared by two manifests, an id that is not valid. Two more are told the same way. One is a plateau that overrides itself, directly or through others (error: the plateau `to-be overrides itself`). The other is a baseline manifest that overrides (error: the plateau `baseline (plateaus/baseline/plateau.baseline.yaml) is the root of the plateaus and cannot override to-be). The next three are about a plateau: a reference declared again in an ancestor, an element declared under a parent that does not exist, a relationship that leads nowhere. That last line and its two cousins (an environment that `uses an environment that is not there, a node that hosts an application that is not there) say the element that holds the reference, the file that declares it and the key of the reference in the element (relationships[0].destination, uses[1], applications[0]: the place in its list). In a workspace without plateaus the same line is told without the plateau (error: shop.web has a relationship towards shop.nowhere, which does not exist, in manifests/shop.web.yaml at relationships[0].destination `), by `views generate and by query graph, and the editor tells it in the same words. A mistake in a plateau names the plateau, so the line says which layer to open. The last one is about no plateau: a view that names an element that exists in none.

One cause, one line. When one mistake has many consequences, the tools say the first one (by reference) and count the others.

  • The elements a plateau declares under a parent that is not there are one sentence, whatever the parents are called (here a typo in the parent of three manifests). The first one told is a symptom of the missing layer, and a second wrong parent shows once you repair the first.

  • The elements that point at one reference that is not there are one sentence for each missing reference (here two relationships added towards shop.nowhere).

  • The views and the stories that name something that is not there keep one line each, since they are not consequences of one another.

When a manifest cannot be read, the command line stops at it, before any layer is built, with one line: the file and what is wrong. The editor draws what it can, and says that same line in place of the consequences the missing elements would leave behind.

error: in the plateau `to-be`, `shopp.billing` is declared under `shopp`, which does not exist (2 more elements of the plateau are declared under a parent that does not exist)
error: in the plateau `to-be`, `customer` has a relationship towards `shop.nowhere`, which does not exist, in `plateaus/to-be/customer.yaml` at `relationships[0].destination` (1 more element of the plateau points at it)

Warnings. These go on, and exit with the code 0:

warning: the plateau `to-b` exists only through the `plateau` key of the header of `plateaus/to-be/typo.yaml`: it has no manifest of kind `archicode.morin.io/plateau`, so it overrides `baseline` and has no name
warning: the plateaus `to-b` and `to-be` have ids one letter apart: check that one of them is not a typo
warning: the plateau `to-be` sets `description` of `shop.catalog` in patches 10 and 12: the last one wins
warning: the horizon `2026-Q1` of the plateau `to-be` is earlier than the horizon `2026-Q3` of the plateau it overrides, `baseline`
  • A plateau that only headers name is told once, with the files. It is usually a typo in a plateau: key.

  • Two plateaus whose ids are one letter apart (to-b and to-be) are told, so that a typo is seen, only when one of the two has no manifest of kind plateau. Two plateaus that have a manifest each (p1 and p2, to-be and to-bf) are the author’s choice and say nothing.

  • Two SET of the same field of the same target in one plateau: the last one wins, and the warning gives both ranks. A SET with a where is a different one for each destination and label, and a patch with a json-path is not compared (what it selects is not known before the patches run).

  • A horizon that is earlier than the one of the plateau it overrides. A horizon is a free label: two are compared only when both read as a period (2026, 2026-10, 2026-10-18, 2026-Q4, 2026Q4, 2026-H2), and one is earlier when its whole period ends before the period above begins (2026 under 2026-Q4 is not). Any other label is never compared.

The patches

The patches. A layer changes what it inherits with the list patches of its manifest. A patch says what it does (operator), to what (a selector), and with what (field, value). The patches are applied in order, each one on the result of the ones before it. A patch can reach an element that the layer brings with its own manifests, because those are in the graph before the patches run. The same kernel applies the patches, draws the views and compares the plateaus, in the command line and in the editor.

REMOVE

The element goes, with what is in it and what points at it: the relationships towards it, its entry in a uses or an applications list. The node that hosted the element stays, even when it hosts nothing any more. Takes no where or value. What it took besides the element is told after the table of changes (see [plateau-cascade]). With a field it takes that field out of the selected elements and leaves the elements (see Taking a field out).

SET

The field is replaced by value, a list or a map as a whole. With where (and field: relationships), value is a map and each of its keys replaces that key of the one relationship found.

ADD

The list field gets value at its end, or each item if value is a list; a missing list is created. Nothing is deduplicated.

MERGE

The keys of value, a map, are set in the map field (the tags, say); the other keys stay. One level only; a missing map is created.

The selector is exactly one of these two:

target

The full reference of exactly one element (shop.web), in the application layer, or in the technology layer with layer: technology. A reference that does not exist is an error, and when the other layer has it, the error says to write layer.

json-path

A JSONPath (RFC 9535) over the document application.elements and technology.elements of the plateau, which selects at least one node (an element or something in it). expect: 3 asks for exactly three: a number of nodes that differs is an error, which turns a silent drift into a message.

field is the field of the element that is changed (name, description, qualifiers, tags, relationships, applications, uses…​); with a json-path, a patch with no field changes the selected nodes themselves. where: {destination: "shop.catalog", label: "reads"} finds one relationship by its destination and its label (a missing label is none); zero or several matches is an error. id, parent and elements cannot be changed: a patch never renames or moves an element. An element that moved is told with replaces (see Saying what an element replaces). Views and stories belong to no plateau, so there is nothing to patch in them (see [plateau-untied]).

patches:
  - operator: SET            # one element, one field
    target: "shop.catalog"
    field: description
    value: "The books that are on sale."
  - operator: SET            # one relationship of an element, found by its destination and its label
    target: "shop.web"
    field: relationships
    where: {destination: "shop.catalog", label: "reads"}
    value: {label: "browses"}
  - operator: MERGE          # every container, and exactly nine of them
    json-path: "$.application..elements[?(@.kind == 'container')]"
    field: tags
    value: {zone: "north"}
    expect: 9
  - operator: REMOVE
    target: "shop.mailer"
  - operator: REMOVE         # a field, not the element: the inherited description is gone
    target: "shop.web"
    field: description

Taking a field out. To say that something a plateau inherits is gone, write REMOVE with a field and the selector: the element stays, the field does not. A SET with no value cannot say it, since a missing value is no value. It works with a target, as in the table of selectors, and with a json-path, to take the field out of every element selected. Any field goes (name, description, qualifiers, tags, relationships, applications, uses, replaces) but id, parent and elements, which no patch changes, and kind, since an element always has one. A field the element does not have is already gone, and that is no error: a plateau still resolves when the plateau under it takes the same field out, and a bulk patch does not miss the elements that never had the field. A where or a value is refused. Nothing leaves the plateau, so the patch is not part of the cascade of the removals, and the comparison reads it as a change of the field of that element (description: "The front of the shop." → (none)). A later SET of the same field, in this plateau or in one above, gives it back, and a plateau that stands on this one sees it gone. The editor writes this patch when you clear a text that the plateau only inherits (see Writing in a plateau).

A patch that cannot be applied stops the load. The line names the plateau, the rank of the patch (from 1) and its selector, so that you can find the patch. These are the lines the commands print, on the example with one patch added each time:

error: plateau to-be: patch 10 (SET target shop.catalogue): selects nothing, there is no element shop.catalogue in the application layer
error: plateau to-be: patch 12 (REMOVE target shop.mailer): selects nothing, there is no element shop.mailer in the application layer
error: plateau to-be: patch 12 (REMOVE target shop.web): `kind` cannot be taken out: an element always has a kind
error: plateau to-be: patch 12 (REMOVE target shop.web): REMOVE takes no `value`: it takes a field out of what the selector selects
error: plateau to-be: patch 12 (SET json-path $.application..elements[?(@.kind == 'container')]): selects 9 nodes, 3 expected
error: plateau to-be: patch 12 (SET json-path $.application..elements[?(@.kind == 'component' && @.name == 'Nope')]): selects nothing, at least one node is expected
error: plateau to-be: patch 12 (SET target shop.web): shop.web has no relationship to shop.catalog with the label `nope`
error: plateau to-be: patch 12 (SET target shop.web): needs a `value`
error: plateau to-be: patch 12 (SET target shop.web): `id` cannot be changed: a patch never changes an id or a parent
error: `plateaus/to-be/plateau.to-be.yaml` is not valid: unknown key `values` (known: expect, field, json-path, layer, operator, target, value, where) at `patches[11].values`
error: `plateaus/to-be/plateau.to-be.yaml` is not valid: `patches[11]` has a `target` and a `json-path`: write one of them

The second one is the stale patch. An earlier patch (rank 1 here) had already removed shop.mailer, and a plateau that stands on this one cannot remove it again. A patch goes stale when you wrote it for a plateau and the plateaus above change, so that it no longer fits the plateau it now overrides. The error is how you learn it. The editor says the same sentences (see The band of plateaus).

What a REMOVE takes. A REMOVE takes more than the element it selects, and that is not obvious from the patch. archicode diff and archicode views generate list the rest after the table of changes, in its own section, cascade of the removals (the key cascade of gap.json, and a section of gap.md). It lists the elements that went with the selected one (removed), and the entries taken out of elements that stay (dropped: a relationship, a uses or an applications entry). The section covers the removals that are part of the difference between the two plateaus compared, and it is not part of the counts. In the example, the removal of the mailer takes the link from the web site to it, and the removal of the inventory takes its component and the link from picking:

cascade of the removals (what a REMOVE took besides the elements it selects, in the plateaus the target adds to the one it is compared with)
PLATEAU  PATCH                           EFFECT   LAYER        ELEMENT                DETAIL
to-be    1 REMOVE target shop.mailer     dropped  application  shop.web               relationships: shop.mailer (sends mails with)
to-be    6 REMOVE target shop.inventory  removed  application  shop.inventory.levels
to-be    6 REMOVE target shop.inventory  dropped  application  warehouse.picking      relationships: shop.inventory (counts with)

The editor shows the same rows in the Cascade of the removals section of its Changes panel (see The band of plateaus). A section that has nothing to say is not written, and the output of a plateau that removes nothing is what it always was.

Choosing a plateau

Choosing a plateau on the command line. The commands that load a workspace (views generate, diff, query views, query graph) take --plateau <id>. Without it, the command reads:

  1. the plateau that settings.current names;

  2. else the last plateau, when the plateaus form one line (each overrides the one before it);

  3. else nothing: a tree that forks has no last plateau, so the command stops and asks you to choose.

The last case prints:

error: the plateaus of this workspace are not one line (`baseline` is overridden by `saas`, `to-be`): name the plateau to read with `--plateau`, or with `settings.current`

--plateau wins over settings.current.

The editor does not choose as the command line does when no name is given and the plateaus form one line. With no address, no plateau remembered by the browser and no settings.current, it draws the root, baseline, where the command line draws the last plateau. Write settings.current (the editor has a field for it, see The current plateau) to make the two agree.

An unknown id is an error that lists the plateaus (error: unknown plateau `nope: the plateaus of this workspace are baseline and to-be`).

archicode plateau list lists the tree, one line per plateau: baseline first, then each plateau followed by what overrides it. Plateaus that override the same one come in the order of their ids. - is for what is absent. SOURCE says where the plateau comes from: its manifest, headers only (a plateau that only headers name, with its files), or implicit (the root that nothing names).

archicode plateau list
PLATEAU   PARENT    SOURCE                                            NAME   HORIZON
baseline  -         manifest plateaus/baseline/plateau.baseline.yaml  As is  2026-Q3
to-be     baseline  manifest plateaus/to-be/plateau.to-be.yaml        To be  2027-Q1

--against <id> names the plateau to compare with. Without it, a plateau is compared with the plateau it overrides. The root overrides nothing, so baseline is compared with nothing unless --against names a plateau (diff --plateau baseline alone stops with error: the plateau `baseline is the root of the plateaus and nothing is before it: there is nothing to compare it with. Name a plateau with --against`). --against takes any plateau of the tree, a sibling or the future included. It refuses the plateau itself (error: `--against to-be is the plateau that is compared: choose another plateau to compare it with`). The views of a plateau are written in views-<plateau>, and the views of its comparison in views-<plateau>-vs-<against> (and one folder per facet, as the directory-name-template of the facets says). A workspace with no plateau writes views, as it always did. With --output out, the folders are out-<plateau> and out-<plateau>-vs-<against>. See Generate views and Compare plateaus.

The settings in short:

settings.manifests.paths

The folders the manifests are read from, for a workspace with plateaus as for one without. A layered workspace usually ends a path with /** to read the folders of its plateaus too (see Manifests in folders).

settings.current

The plateau that is drawn when none is asked for; the last one by default when the plateaus form one line. It must be a plateau of the tree. The editor writes it too (see The current plateau), and opens the folder on it when nothing else says which plateau to draw.

settings.plateaus

No longer exists (see Upgrading: what breaks, and what does not): a plateau is a plateau: header and a manifest of kind archicode.morin.io/plateau.

A path of manifests.paths is relative to the folder of .archicode.yaml, below it (no ..) and not absolute. ArchiCode checks every rule before it reads anything, and reports each problem. The messages are in Manifests in folders.

Comparing two plateaus

What a plateau changes is the difference between it and another plateau. ArchiCode compares the two and tells you what is new, what changed and what was removed, for elements and for relationships. It compares a plateau with the one --against names, else with the plateau it overrides. The root, baseline, overrides nothing, so it is compared with nothing unless --against names a plateau. You can name any plateau of the tree, a sibling or a plateau of the future too (archicode diff --plateau inhouse --against saas compares two alternatives). The comparison is made on the two plateaus as they are resolved, whatever their relation.

Two commands show the comparison: archicode diff writes the table of changes (see Compare plateaus), and archicode views generate draws the views of the comparison (see Generate views).

What counts as a change. An element is the same element in both plateaus when it has the same reference. A reference includes the path of the element, so an element that moves under another parent is a removed one and a new one, unless the new one says that it replaces the old one (see Saying what an element replaces). An element is:

  • new when its reference is only in the plateau;

  • removed when its reference is only in the other plateau;

  • changed when something differs in the element itself or in the relationships it declares: its kind or its type, its name, its description, its qualifiers, its tags (the rendering-* ones do not count), its deployment (applications and uses), or a relationship that was added, removed or changed.

A child is judged on its own: a system whose only change is a new container is not changed, it contains changes. The table lists what changed in each element (natures) and tells a change of wording apart: an element whose description is the only thing that differs is wording only. A relationship is identified by its source, its destination and its label. It is new or removed when it is only on one side, and changed when its qualifiers, its tags or, when it is the only one between the two elements, its label differ. The order of a list and the order of the keys of a file are no change.

How the views say it. The views of a comparison draw the union of the two plateaus (what was removed is drawn too). Every box and every link says its state with the same marks, never by colour alone. The last three are for an element that says what it replaces (see Saying what an element replaces), and are only in the legend of a view that has one:

State Mark Box Link

new

+

thick solid outline

thick solid line

changed

~

dotted outline

dotted line

removed

−

long dashes with narrow gaps, grey outline, grey and struck title

dashed grey line

contains changes

±

thin dashed outline

(none)

moved

→

long dashes with wide gaps, blue; the title ends with (from <the reference it replaces>)

(none)

split

⋔

medium dashes, purple; the title ends with (from <the reference it replaces>)

(none)

merged

⊕

short dashes far apart, light blue; the title ends with (from <the references it replaces>)

(none)

The mark is written in front of the title of the box and of the label of the link. A box that did not change is drawn as it always was, and so is a link. contains changes is for a box that did not change by itself and holds something that did (a system whose container is new, for instance), so you can see where to look inside. A link between two boxes that are drawn as one group (a view draws the relationships of the elements below it as one link) is new when all of them are, removed when all of them are, changed when they are mixed, and unchanged when none changed. A view that says at least one change has a legend that explains the marks.

The states are stereotypes of the boxes (new, changed, removed, contains-changes, moved, split and merged), so a styles.by-tags entry of the same name gives them your own look, as it does for every stereotype (see Stereotypes and styles). ArchiCode brings a default style for a state only when the workspace has none, and the style you write wins property by property: write new with a background-color and the box keeps the thick outline of the default.

The default look of a state belongs to the boxes that have the state, computed: it is never given to a box because of a word it carries. If you wrote rendering-stereotypes: "new" (or changed, removed, contains-changes, moved, split, merged) on an element that does not have that state, the box is drawn with your own styles entry named new and nothing else, no thick outline, no mark, no struck title, in a view that has something new as in one that has not, and the command says so (see [plateau-state-tags]).

styles:
  by-tags:
    new:
      background-color: "#DAF2E6"   # the outline stays the default one
    removed:
      line-color: red

A facet can read what changed: in a comparison, every element and every relationship has a change (none, new, changed or removed, and, for an element that says what it replaces, moved, split or merged) that a JSONPath selects like any other field, such as $..relationships[?(@.change == 'removed')]. The other facets work as they always did.

ArchiCode computes four states for what a plateau changes, on elements and on relationships (the fourth is for boxes only), and three more for the elements that say what they replace (see Saying what an element replaces):

State Mark Means

new

+

the reference is only in the plateau

changed

~

the reference is in both and something differs: a property, or a relationship the element declares (an element whose description is the only difference is wording only)

removed

−

the reference is only in the other plateau, the one compared with

contains-changes

±

the element did not change by itself, but something inside it did

moved

→

the element says that it replaces one element of the other plateau (elements only)

split

⋔

the element says that it replaces an element that another element replaces too (elements only)

merged

⊕

the element says that it replaces several elements (elements only)

Each state has a mark, a line style and a legend, so that nothing relies on colour. The editor draws them too (see Comparing two plateaus in the editor).

The states and the tags you wrote by hand. The states are stereotypes of the boxes, the same ones that a styles.by-tags entry or a rendering-stereotypes tag names (see Stereotypes and styles). If you used to mark the boxes of a target by hand with rendering-stereotypes: "new" or "changed", nothing breaks, and the command line and the editor draw such a tag the same way. One rule decides it: a box gets the default look of a state (its mark, its outline, its tint, its struck title) only when the comparison computes that state for it.

  • A word you wrote that is the state the box has (a new tag on a new element) is one stereotype: the computed state is not written twice, it is the last stereotype of the box, so its look overrides the look of the other stereotypes as a later stereotype always does (the generated .puml writes the stereotypes in reverse, so it reads first there). Your styles.by-tags entry named like the state wins, property by property, over the default look of ArchiCode: a new with only a background-color keeps the thick outline of the default.

  • A word you wrote that is not the state the box has (a new tag on an element that did not change, a new tag on an element that changed, any state word when no comparison is made) is only your stereotype (a .puml of a comparison writes it written-new, so that the default look of new cannot reach it). The box has the style you gave to that name in styles.by-tags or styles.by-qualifiers, if any, and nothing of the default look, whatever else the view shows. On an element that changed, the computed state, which is last, has the last word over it.

  • The tags themselves are not read by the comparison (a rendering-* tag is never a change), so you can drop them when you like: the computed states say the same, and say it only where it is true.

The command line tells you where a word and the comparison disagree, one line per element and word, on the error output (not in the log, which hides warnings by default), and the files it writes and the table it prints are the same whether you read the lines or not. With the tag rendering-stereotypes: "new" added to customer in the example, which did not change, archicode diff says:

warning: the element `customer` carries `new` (`rendering-stereotypes` tag), but the comparison of `to-be` with `baseline` finds that it did not change and holds no change: it is drawn with your own `styles` entry named `new` (if any) and not with the default look of the state. The comparison computes the states, so the word can be dropped.

archicode diff and archicode views generate check the plateau they compare. archicode views generate of a plateau that is not compared says that a state word is a state of a comparison and that nothing is compared here. A workspace with no plateau has no comparison to disagree with, and is never told anything: there the words are your own stereotypes, as they always were. A word that agrees with the comparison is never reported. The editor draws the same: a hand-written word is a badge and a style, and the look of a state only where the state is computed. It tells you the same, in the same sentences, when a plateau is compared (Compare with on the band): in the panel of the element, under what changed, and in the Hand-written states list of the Changes panel (see Comparing two plateaus). Nothing is told when nothing is compared, since the comparison is a choice of the page.

Saying what an element replaces

A comparison finds an element by its reference. An element that moves under another parent, or is renamed, has another reference: the comparison reads it as one removed element and one new one, with nothing that links them. ArchiCode never guesses that two elements are the same thing; you say it. Write the key replaces where the new element is declared, in its manifest, on the element of the more recent plateau. Its value is a list of the full references of what the element replaces, in the plateau it is compared with (called the other plateau from here on: the one it overrides, or the one --against names). It is the same hint as the moved block of Terraform. The editor writes it when you accept a candidate (see Moved, split and merged elements, and candidates), and you can edit it in the form of an element. The editor can move an element under another parent without breaking a reference, but a move does not say that the two references are one thing, and nor does a rename (see Moving an element under another parent).

The container inventory in the plateau to-be (plateaus/to-be/inventory.yaml of the example domain_plateaus)
header:
  kind: "archicode.morin.io/container"
  version: "1"
  plateau: "to-be"
  parent: "warehouse"
content:
  id: "inventory"
  name: "Inventory"
  description: "Counts the books on the shelves."
  replaces:
    - "shop.inventory" # the inventory moved from the shop to the warehouse
  elements:
    - kind: "component"
      id: "levels"
      name: "Levels"
      description: "The count of each book."
      replaces:
        - "shop.inventory.levels" # what is inside a moved element says it too

The inventory used to be a container of the system shop and is now one of the system warehouse, so its reference went from shop.inventory to warehouse.inventory. It says what it replaces, and so does the component levels inside it.

The key is optional, and a tool that does not know it ignores it. The comparison turns the elements that say what they replace into three states, and the replaced elements are no longer removed:

  • moved: the element replaces one element, which no other element replaces. It is in another place or has another name, and it is the same thing. Whatever else it changes, it keeps it: a name, a description and the relationships it declares are compared with the element it replaces, and the table says which (the natures), next to moved. A moved element is counted as moved, not also as changed.

  • split: several elements replace the same element (shop.orders became shop.cart and shop.checkout). Each of them is split, and the table names the other ones.

  • merged: the element replaces two elements or more (shop.billing replaces shop.invoices and shop.receipts), or an element that is in the other plateau and in the plateau at the same time. When an element is both split and merged, it is merged.

What the replaced elements held is not carried by itself: a container that moved takes none of its children with it, so each child needs its own replaces (levels in the example), or it is read as removed (the box of the replaced container is then drawn as the place it was removed from, with the words "replaced by"). What points at a replaced element follows it when exactly one element replaces it: a relationship to shop.till that now points at stock.till is not a change of the element that declares it, and nor is a node that deployed shop.till and now deploys stock.till. What points at a split element is not rewritten, because which half would own it is a guess. The relationships of the halves, and those that end on a half, are therefore not compared with the other plateau and read as new, whether the element had them before it was split or not; archicode diff, gap.md and gap.json say so on each of those rows (of the split shop.report-a) and count them in the header (see Compare plateaus).

Candidates. The comparison may find two elements that look like one thing said twice. It looks when an element is only in the other plateau, another one of the same kind and the same layer is only in the plateau, and nothing replaces or is replaced by either of them. They look alike when they have:

  • the same name (ignoring the case);

  • a description with most of its words in common;

  • or they are the only two elements of that kind under the same parent. This holds only when one of the two plateaus is the past of the other, that is, the plateau it overrides or one further down the same line, baseline being the past of all: two plateaus that build on the same one are alternatives, and sharing a parent says nothing between them.

A name counts only when no other removed element and no other new element of that kind has it: a Cache in every service, or a Message Broker in every environment, would pair every removed one with every new one and say nothing about which is which, so such a name proposes nothing (the description and the parent can still). The comparison lists them as candidates and never applies one. To accept one, write replaces on the new element; to refuse it, do nothing. archicode diff, gap.md and gap.json list the candidates once the plateau uses replaces (a workspace that does not is written as it always was), each with its reasons. The views do not draw the candidates.

Warnings. The comparison does not fail on a replaces that it cannot use: it ignores it, and says so on the error output of archicode diff and of archicode views generate (not in the log, which hides warnings by default), one line per entry (the example has none; the sample after the list is from the invented warehouse that Compare plateaus uses):

  • a reference that is not an element of the other plateau (you may be comparing with another plateau than the one you wrote it for);

  • a reference that is still an element of the plateau (what is there is not replaced, and an element cannot replace itself);

  • a reference listed twice (it counts once);

  • an entry that is not a reference (- 12, or an empty entry: it is ignored, and it is not read as the reference 12);

  • a replaces that is not a list (replaces: "shop.mailer": it is ignored, and the element replaces nothing).

The command line gives the comparison the list as you wrote it, so these lines are the ones the comparison says (the editor refuses a replaces that is not a list with a message). A replaces that is well written says nothing, and so does an empty list.

warning: replaces of shop.report-b (application layer): shop.nowhere is not an element of the base plateau, ignored

replaces is read from the elements of the plateau that is compared; a replaces on an element of the other plateau is not read. A plateau that is not compared does not use it.

The replaces of the layers are composed. Each layer writes replaces relative to the plateau it overrides. Take a move in two steps: a plateau moves shop.app.search to commerce.search, and the next one moves it again to discovery.search. The second layer names commerce.search, which a plateau two layers up does not have. Between two plateaus several layers apart, the comparison reads the entries through the layers in between, down to the plateau it is compared with, so the move is a move: discovery.search replaces shop.app.search. Only what the layers wrote is read, nothing is guessed. A move then a split is a split, and a move then a merge is a merge. An element that a layer in between created and the next one moved replaces nothing (it is new), and its entry is no mistake. An element that a layer in between removed ends its own chain. The comparison with the plateau a plateau overrides is as it was: one layer, nothing to compose. On the layered Brightcart of the repository (src/test/resources/brightcart/layered), archicode diff --plateau marketplace --against baseline counts +38 ~3 -6 elements, 11 moved, 2 split, 1 merged and +35 ~1 -9 relationships, lists discovery.search as moved from shop.app.search, and has no warning. Between two plateaus that do not stand on each other (marketplace against saas) only the layers of the plateau drawn since the plateau they have in common are read, and an entry that the plateau compared with still lacks is ignored with the usual warning, which names the reference the layers composed (shop.app.search, where the entry says commerce.search). Write replaces in the editor writes the entry you choose, one step. When the comparison is several layers apart and a layer in between removed the replaced element, the entry would be a mistake of its own layer: the editor refuses it and prints the sentence quoted in Moved, split and merged elements, and candidates.

What the command line shows. archicode diff has the three states in its table, with the counts of moved, split and merged on a line of their own (replacing), and says in the details of each row what the element replaces (see Compare plateaus). The views of the comparison draw them with the marks of the comparison (see Comparing two plateaus). The editor draws them too, lists the candidates, and writes replaces for you (see Moved, split and merged elements, and candidates).

Limits of today

These are things that do not work yet, or not the way you might expect. Each is known, and the tools say so when they meet one. Those marked not planned will not be built; the others are known and not scheduled.

Plateaus.

  • The editor does not fold a plateau into the one above (not planned). Deleting a plateau that others override is one step and tells what the plateaus above lose, but no operation moves the patches and the elements of the deleted plateau into the plateau above, and the delete is refused when a step or a view would lose what it draws. archicode plateau fold does it from the command line (see Fold a plateau into the one above); [fold-by-hand] says how to do it by hand, for a plateau the command refuses.

  • The editor does not move an element a plateau inherits (a patch never changes an id or a parent): draw the plateau that declares it.

  • A comparison with the parent cannot stay on the parent. On the band, the parent in the tree of Compare with is read as Past (follows the plateau drawn), so the comparison moves to the new parent when another plateau is drawn. There is no fixed comparison with the parent.

  • Which plateau the editor and the command line draw first. The editor draws the plateau of the address, then the one this browser drew last, then settings.current (which Settings writes, see The current plateau), then the root; the command line draws the last plateau when the plateaus form one line and no settings.current says otherwise.

  • The editor and a large pair of plateaus. Finding what has nothing to draw and resolving the patches grow with the number of elements, not faster: for the 591 elements and 839 changes of a test pair (replaces-large-pair), in the page, the first call takes about 0.08 second, where the 82 elements of the layered Brightcart take 10 milliseconds. What still grows faster is the unfolded Map, which builds the view again for each box it could open. No shipped workspace is that large.

Reading and writing files.

  • The save of the editor writes a file again in its own layout in a few cases, with the comments lost and the aliases written as their values: an anchor or a tag on a key inside brackets ({&k zone: north}); a single pair in a list in brackets that also holds an anchor, an alias or a tag ([&a one: two]); a tagged text over several lines inside brackets; a list item whose map starts under its dash, nested inside another such item; and two block scalars that a list item holds in a form the save does not follow: - - | on one line (a block scalar that is the item of a list that is itself an item), and a folded block (- >) that the emitter would write with other line breaks, which read differently once written again. A list item that is a block scalar (- |, then its text) and a block scalar on the second key of a list item whose first key goes or comes are kept as written. The file is read and the model is what it says. The other layouts that were in this list in 0.17.0 are kept as written (see Elements).

  • A few comments are lost or move, and a list is wrapped in brackets, when the lists around them are nested again. Two cases, found by a generated test of the save, are left: a comment on an item that is itself a list (- then its items, or - [c, d] # second row) is lost, or taken by the item above, when the list around it is wrapped in another list or unwrapped; and a list that holds a list in brackets, wrapped in another list, is written in brackets as a whole. The value read is the same in each case; the layout, or a comment, is not what you wrote. (Up to 0.19.0 a block scalar that is a list item, and a block scalar on the second key of a map that is a list item, were in this list; they are kept now, see [upgrade-0-19].) In every other layout the generated test of the save covers, it finds no quote or comment lost on a line that an edit did not touch.

  • A collection in brackets that a change reaches is sometimes saved as a block. It stays in brackets, on its line, when it fits (see Elements); it becomes a block when it would be wider than the widest line of the file (100 to 120 columns), when a comment stands inside its brackets, when it is an empty [] or {} that the change fills, and when it has an anchor, an alias or a tag in it. A block in the file is never turned into brackets. The file reads the same either way; only its layout differs from what you wrote.

  • An anchor or a tag on a mapping key (&k name: x) is read by the command line and refused by the editor, which does not open the file and says an anchor or a tag on a key is not supported (not planned: a splice on a key could lose text, for a form nobody writes). The merge key << is no merge in either tool: it is read as a key named <<, which a manifest does not have, so both refuse it (not planned).

  • Differences in how the two tools read a number or a tag are left, and pinned (a plain scalar that YAML 1.1 reads as a number, a tagged number and a style number are read alike, see Upgrading: what breaks, and what does not). The editor does not tell the line and the column of a mistake in a file: it names the place by its path in the file, as the command line does (see Errors, warnings and exit codes), because it reads a file into a tree that has no positions. A float that JavaScript prints another way than Java (5.0) is the text in a field of any shape: a value of a patch is the text "5.0" in the editor, a number for the command line (the qualifiers it sets are texts in both). A !!binary text in a field that is a whole number, a boolean or an enum is the wrong shape (found a string) for the editor, and Cannot deserialize value of type …​ for the command line, which names a Java class. A few spellings that only Java defines differ in the sentence of the mistake (the digits of other scripts, a character that is not a base64 code point).

The command line.

  • archicode diff cannot compare with another version of the workspace in git (a --baseline-ref; not planned). --width, --fail-on and --only-changes are built (see Compare plateaus and Generate views). views generate writes no text table, so it has no --width.

The editor on a phone (not planned). Nobody has used the editor on a real phone: what the editor does in a window 360 pixels wide was measured in a desktop browser, and is told in The editor on a small screen. That includes the player of a story, which was measured at such a window but not tried on a phone: the finger that moves its diagram, the picker of its list of the steps, full screen on a phone and the on-screen keyboard are not checked.

Upgrading

Upgrading: what breaks, and what does not

From settings.plateaus to layers. The key no longer exists, and no command converts a workspace. A .archicode.yaml that still has the key is refused with the one line quoted in the note below.

Note

There is no settings.plateaus any more. A plateau used to be a complete folder listed under settings.plateaus in .archicode.yaml, created by archicode plateau add and compared with --baseline. The key, the command and the option no longer exist. A .archicode.yaml that still has the key is refused by every command, and by the editor, with this one line, and nothing is read or written:

error: `settings.plateaus` no longer exists: a plateau is a layer now. Remove the key, write `plateau: <id>` in the header of the manifests of each plateau, and declare each plateau in a manifest of kind `archicode.morin.io/plateau` (`id`, `name`, `override`: the plateau it builds on, `baseline` when absent, and `patches` for what it changes)

--baseline is a usage error (Unknown options: '--baseline', …​, exit code 2) and archicode plateau add too (Unmatched arguments from index 1: 'add', …​); --against and archicode plateau list replace them (see [plateau-choose]). No command converts a workspace: the steps below convert one by hand.

To convert a workspace by hand:

  1. Keep the manifests of your first plateau: they are the root, baseline, and need no header. Its id changes: --plateau as-is, settings.current: as-is and scripts that name it must say baseline (a Kind: Plateau manifest with id: baseline and name: "As is" keeps the name for people).

  2. For each later plateau, from the oldest, write a manifest of kind archicode.morin.io/plateau (its id, name, horizon and override: the previous plateau, or baseline for the first). The manifests of elements that are new in that plateau get plateau: "<id>" in their header. What the plateau removes or changes among the elements it inherits becomes a patch (REMOVE, SET, ADD or MERGE, see [plateau-patches]). The copies of the unchanged manifests in the old complete folders are deleted: a manifest that declares again an element of a plateau below it is the error of [plateau-header].

  3. Delete settings.plateaus, and write manifests.paths (a workspace with plateaus could not have one; the default is the folder manifests) with an entry that ends in /** for the folders that hold the plateaus (see Manifests in folders).

  4. Run archicode plateau list and archicode diff --plateau <id> for each plateau: the counts should be the ones you had.

Four differences to know: the views of a plateau are written in views-<plateau> and the views of its comparison in views-<plateau>-vs-<against>; every plateau but the root is now compared with the plateau it overrides when its views are generated; a plateau id is lowercase letters, digits, _ and - (a capital, or a dot as in v1.2, is refused: error: the plateau id `v1.2 in …​ is not valid`); and --baseline is --against. The from key of a plateau, which was reserved, and archicode plateau add, are gone.

Earlier changes. Two things that used to pass stop with an error that says what to change. Everything else about a workspace that has no plateau is unchanged: it is read, and generates its views in the same folders, byte for byte as before (checked on the views of this repository’s workspaces and on a copy of a real workspace of 3,411 views).

  1. A path of settings.manifests.paths with .. or an absolute path. ../shared, /srv/manifests and C:\data are refused: one folder holds a whole workspace, so that the editor, which only reaches the folder it opened, reads what the command line reads. Move the folder below the folder of .archicode.yaml, or move .archicode.yaml up to a folder that holds both, and change the path to match. A path that stays below the folder (manifests, node_modules/<module>/manifests) is not affected.

  2. A reference declared twice. Two manifests, a manifest and an element nested in another one, or two elements of one file that share a reference used to pass silently, and which of them was drawn depended on chance. The command line now stops, names the reference and the two files, and writes nothing, and the editor reports the same in the same words (see [duplicate-references]). Remove one of the declarations, or give one of them another id. Two identical copies count too. This check applies to workspaces without plateaus as well; with plateaus, the same reference in a plateau and in its ancestor is the same error, and in two plateaus that do not stand on each other it is no duplicate, since they are alternatives.

Nothing is to be changed in the manifests themselves: their format is the one it always was, with two optional keys more, plateau in the header and replaces (see Saying what an element replaces), that an older version of ArchiCode ignores.

Later changes. Layers came with the editor reshaped; a few things moved after them, and what a workspace written for the first version of layers may meet is this:

  1. A view or a story that says plateau:. It is accepted and means nothing, with no message at all (see [plateau-untied]; the warning that earlier versions printed is gone). A workspace whose only plateau: is on a view or a story is no longer a workspace of plateaus, so --plateau and settings.current are errors for it, as for any workspace without plateaus. Two plateaus that each declared a view of one id, or a story of one id, are now one error: a view and a story are declared once.

  2. Kinds. An element declared with header.parent under a parent that cannot hold its kind (a system under a container) is an error, with or without patches, where it used to load in a plateau that had none (see [nesting]); an id with a dot is an error. The group kinds were refused here at the time; since 0.17 there is no group at all (see below).

  3. Empty values and spellings. A key with nothing after it and an item with no value in a list are absent, in both tools (global-enabled: with nothing is true; an empty .archicode.yaml is the default workspace; an item of relationships with no value draws no relationship in the editor either). The keys of settings.facets are global-enabled, directory-name-template, hide-unlinked and json-path; the camel-case spelling was still read then; since 0.17 it is refused (see below). The text of header.parent, header.plateau and header.version is the text as written: parent: yes is the reference yes.

  4. The maps. archicode views generate --view <id> draws a view of the map viewpoint, which it used to skip with a warning (see [map-viewpoint]).

  5. The order of the warnings. The facets are read in the order of the file, so the warnings that name them, and the creation of their folders, come in that order.

  6. Folders of a comparison. A folder that holds both gap.json and gap.md is left out of a /** read, whichever command wrote it (see Manifests in folders).

  7. The editor. The pages are Plateaus, Applications, Environments, Elements, Stories, Files and Settings (see The perspectives and their pages); the band has two lists; Files has no choice of what it lists.

What changes for a reader who knows 0.27.0. These are the changes after the release 0.27.0; they are in the release 0.28.0. Nothing breaks: a workspace that loaded in 0.27.0 loads in 0.28.0 and every command prints what it printed, but for the comparison below.

  1. A change of type is a change (Fixed, see Node types). Two plateaus that differ only by the type of a node were reported as identical by archicode diff and by the Changes panel. The change is now reported as a change of the nature kind, said as type in the values before and after, and counted as a change of the element.

What changes for a reader who knows 0.26.0. These are the changes after the release 0.26.0; they are in the release 0.27.0. Nothing breaks: you can declare your own types of node. A workspace that loaded in 0.26.0 loads in 0.27.0 and every command prints what it printed, but for the sentences listed below.

  1. Types of node of your own (New, see Node types). settings.node-types of .archicode.yaml declares types with a label, a shape and the types each may holds, and an element names its type next to its kind. Both layers nest them as deep as you like, the Map and the views detailed and deep draw the label and the shape of the type, and the editor creates, renames, moves and deletes such nodes. A type that is not declared is a warning, only once the workspace declares at least one.

  2. A container can hold a container (Changed, see [nesting]). The seven built-in kinds stay valid, and a container may now hold containers as well as components.

  3. The sentences that list the known keys (Changed message). type joins the keys of an element and node-types those of settings, in the command line and in the editor.

  4. One class of node (Changed, no effect on a reader). The nesting rules are read once from a table of kinds, shared by the command line and the editor.

What changes for a reader who knows 0.25.0. These are the changes after the release 0.25.0; they are in the release 0.26.0. Nothing breaks. One command is new, archicode import likec4, and the build from the sources changes: Maven builds the WebAssembly kernel and the editor page, which are no longer files of the repository. A workspace that loaded in 0.25.0 loads in 0.26.0, every command prints what it printed, and the editor page and the kernel in the jar are the same bytes as in 0.25.0.

  1. A LikeC4 model can be imported (New, see Import a LikeC4 model). archicode import likec4 <model.json> --output <empty folder> reads the JSON export of a LikeC4 model (likec4 export json) and writes a workspace. The kinds of LikeC4 that have no ArchiCode kind are mapped with --map <kind>=<kind>; what it leaves out (views, deployment, styles, metadata) is listed as warnings, and a .c4 file or a folder that is not empty is an error with one line. archicode import structurizr is unchanged.

  2. The kernel and the editor page are built by Maven (Changed, for whoever builds ArchiCode from its sources). ./mvnw compiles the Rust kernel to WebAssembly and builds the page, its scripts and its samples into target/editor-webapp; none of these files is in the repository any more. The build needs rustup and Node (npm ci runs in it); without rustup it stops with one message that says so. The jar, the website and archicode editor serve hold the same files as before.

What changes for a reader who knows 0.24.0. These are the changes after the release 0.24.0; they are in the release 0.25.0. Nothing breaks. Three commands are new, archicode query impact, archicode import structurizr and archicode plateau matrix, two outputs grow: archicode query views prints one more key, saved, last on every entry, and archicode query graph prints one more key, deployments, last, when a node hosts an application, and every --help now starts with Usage: archicode. The editor page is lighter and works with no network, and the manual on the website draws its diagrams. A workspace that loaded in 0.24.0 loads in 0.25.0, every other command prints what it printed, and query graph on a workspace in which no node hosts an application, writes what 0.24.0 wrote for it.

  1. query views says whether a view is saved (Changed, see Query views). Every entry ends with saved: true for a view of the workspace and saved: false for a view the tool derives. A script that read a whole entry now sees this key; a script that reads a field by name is not affected. -q '$.[?(@.saved==true)]' keeps the saved views.

  2. query graph says what each node hosts (Changed, see Query graph). The output ends with deployments, a list of node and application pairs, when the workspace has a deployment. A script that read a whole query graph output now sees one more key; the elements and the relationships did not change, and a script that reads elements or relationships by key is not affected.

  3. query impact says what a change touches (New, see Query impact). archicode query impact <reference> prints the elements that point at an element, or that it points at, with their distance and the first coupling that reached them; --direction, --depth, --qualifier and --through choose the walk. It adds a command and changes no output of another.

  4. Every --help starts with Usage: archicode (Fixed, see Every command and option). The usage of the top command and of each subcommand named the main class where the name of the program belongs; the listing of the manual is now what the program prints.

  5. A Structurizr workspace can be imported (New, see Import a Structurizr workspace). archicode import structurizr <workspace.json> --output <empty folder> reads the JSON export of a Structurizr workspace (people, systems, containers, components and their relationships) and writes a workspace; what it leaves out (views, deployment, styles, properties) is listed as warnings, and a .dsl file or a folder that is not empty is one error: line.

  6. A path of plateaus has a table (New, see Read what a path of plateaus changes, element by element). archicode plateau matrix <plateau>…​ writes a row per element followed through replaces and a column per plateau, and from three plateaus a Span column that is the first compared with the last.

  7. The page Plateaus reads a path in the same table (New, see The Plateaus page). Read the path draws the table under the list of plateaus, a click on a cell draws the pair, and the address keeps the path (matrix=, rows=).

  8. The editor needs no network, and works opened from a disk (Changed, see A workspace kept in the browser). CodeMirror, the diagram layout and the kernel are three scripts beside the page, in an assets folder that archicode editor serve, the website and the jar serve, instead of files loaded from a public server; the page is 1.1 MB smaller. A copy of the page with its assets folder opened from a file:// address works too.

  9. The manual on the website draws its diagrams (Fixed). The 18 diagrams of the manual were not drawn on the website, each block said Could not load PlantUML; the build now fails when one is not drawn.

What changes for a reader who knows 0.23.0. These are the changes after the release 0.23.0; they are in the release 0.24.0. Nothing breaks: the controls of a diagram move into a toolbar of five groups, and the manual is sorted by the kind of reading it is. A workspace that loaded in 0.23.0 loads in 0.24.0 and the command line writes the same files for it; no command and no option changes.

  1. The toolbar of a diagram is docked above the drawing and in five groups (Changed, see The toolbar and the boxes per row). On the page of an element, on both Maps, on the page of a saved view and on a story step, every control is in one of Draw, Texts, Layout, Compare and Frame, in that order. A toggle keeps its label and says whether it is pressed; Changes only is one control, and the address still carries changes-only=1.

  2. A view shows what it keeps, and you can undo the rest (New, see The toolbar and the boxes per row). A dot on Draw, Texts and Layout says that a named view keeps what the group holds; Reset puts those three groups back to the saved view or to the defaults and touches nothing else. On the page of a saved view the toolbar also has Fold all, Unfold all and Facet.

  3. On a window narrower than 40 rem each group is one button with its count (Changed, see The editor on a small screen). The group opens as a panel over the drawing; Escape closes it and gives the focus back to its button.

  4. The manual is sorted by the kind of reading (Changed). Start here, Tutorials, How-to guides, Reference, Concepts and Upgrading; every link to an old anchor still works. The two parts about plateaus are one page, Plateaus.

  5. A how-to guide for a build and one for an agent (New, see Check the architecture in a build and Work with an agent). The first sets up diff --fail-on and the exit codes 1, 2 and 3 in a pipeline; the second tells an agent how to start with archicode guide, archicode init and archicode query graph.

  6. The command reference is the program’s own text (New, see Every command and option). It is generated from --help and a test fails when the two disagree.

What changes for a reader who knows 0.22.0. These are the changes after the release 0.22.0; they are in the release 0.23.0. Nothing breaks: the editor gains a second sample, and the manual and archicode guide say two things about the views that they left unsaid. A workspace that loaded in 0.22.0 loads in 0.23.0 and the command line writes the same files for it.

  1. The model of ArchiCode is a second sample of the editor (New, see A workspace kept in the browser). Open the ArchiCode model, on the card and in the Workspace menu of a served page, keeps a copy of the as-is model of ArchiCode itself in the browser, as a workspace named ArchiCode; sample=archicode in the address does the same. It has its own Reset to the sample…​, and the Brightcart sample is as it was.

  2. A view opens only the element it is about (Documented, see Viewpoints and Views). In a detailed or a deep view the elements linked to the one drawn stay closed boxes, even when they are systems that hold containers. Nothing is drawn differently; the manual and archicode guide now say so.

  3. A box of a Map opens one level at a time (Documented, see [map-technology]). opened: [prod] on an environment shows its nodes as boxes, and the applications of a node show only when the node is in opened too. Nothing is drawn differently; the manual and archicode guide now say so.

What changes for a reader who knows 0.21.0. These are the changes after the release 0.21.0; they are in the release 0.22.0. Nothing breaks: the editor lays a wide diagram out in rows of a size you choose, a link copied from the address bar draws what the sender sees, and the buttons that walk the changes stay in reach. A workspace that loaded in 0.21.0 loads in 0.22.0 and the command line writes the same files for it (the key layout is one it ignores, see The toolbar and the boxes per row).

  1. A diagram can aim at a number of boxes per row (New, see The toolbar and the boxes per row). layout: {columns: N}, a whole number from 1 to 20, in a saved view or under settings.views.properties.<viewpoint>, and a Columns list in the toolbar of a diagram; the editor and the story player lay the diagram out with it. A workspace that sets none is drawn as before, and the command line ignores the key.

  2. A link copied from the address bar draws the diagram the sender saw (Changed, see What a link carries). The address carries what changes the boxes and the links drawn: the layout, Changes only, and which boxes of a Map are open or hidden, on the page of an element, on both Maps and on the page of a saved view. The wording toggle, the key and the zoom stay out of it.

  3. The buttons that walk the changes stay in view (Fixed, see The editor on a small screen). With many changes, each press of Next change scrolled the panel and carried the buttons away; the row now stays under the tabs, and the selected row is brought into view without moving one that is already visible.

  4. The Workspace menu and the top bar of a browser workspace fit a narrow window (Fixed, see The editor on a small screen). In a window 360 pixels wide the note of Export as a file ran out of its item and the buttons of the bar went past the window, so the page scrolled sideways; the buttons now wrap, the notes stay in their items and the menu stays inside the window.

  5. You can read the plan of a fold before you make it (New, see Fold a plateau into the one above). archicode plateau fold <id> folds a plateau into the one above it: it rewrites the manifests, deletes the manifest of the folded plateau, composes the replaces, checks on a temporary copy that the plateaus that stay are the same before and after, and writes all its files or none. --dry-run prints the plan and the check and writes nothing; the plain form writes, so read the plan first and fold in a clean git tree. A fold it cannot make is one error: line (exit 1) and nothing is written. The name and the horizon of the folded plateau, and the comments, quotes and layout of the files rewritten, are not kept.

What changes for a reader who knows 0.20.0. These are the changes after the release 0.20.0; they are in the release 0.21.0. Nothing breaks: the editor opens in a browser that has no folder picker, a Map can be drawn from the relationships it lists, a story can light up one relationship at a time, and a few mistakes are fixed or told in the same words by both tools. A workspace that loaded in 0.20.0 loads in 0.21.0 and the command line writes the same files for it (checked by running every command on every example and fixture of the repository against the jar of 0.19.0: the only differences are the sentence of 0.20.0 for a reference that names no element, see [upgrade-0-19], and the files of the new story order_flow); the new keys links, highlight and layout mean nothing until you write them. As for the blocks below, there is no release notes file in the repository: these blocks are the notes.

  1. The editor works in Chrome, Firefox and Safari with nothing installed (New, see A workspace kept in the browser). Where the browser has no folder picker, or you do not want one, the editor keeps a workspace in the browser; one button on the presentation page opens the Brightcart sample; a workspace is exported to, and imported from, one YAML file with the same bytes. Nothing on your disk is read or written unless you pick a folder, and the editor served by archicode editor serve never touches the served folder while a browser workspace is open.

  2. A Map can list the relationships it draws (New, see [map-links]). links in the properties of a Map of the application layer is a list of source, destination and an optional label: the boxes drawn are the ends of those relationships with the boxes around them. archicode views generate draws it, and an entry that names no relationship is one error: line. A Map with no links is drawn as before.

  3. A link can be highlighted, in a view and in a story step (New, see [map-highlight] and [story-of-a-flow]). highlight draws the named links heavy, with a mark, and the others calm; a story step can say its own, so that a story lights up a flow one link after the other. archicode stories generate draws it, and the editor and the story player draw it too. The shipped example is the story order_flow of the Brightcart fixture.

  4. The editor lists the relationships of a Map (New, see [editor-map-links]). Under the tree of the page Applications, tick the relationships to draw, or click them on the diagram; the choice is saved as the links of the view, kept in the address, and followed by a rename or a move of an element.

  5. The plateau tree is indented by depth for a chain of any length (Fixed). The indentation stopped growing at the sixth level, so a long chain of plateaus read as siblings on the page Plateaus and in the two lists of the band.

  6. The name field of a new browser workspace is one line high (Fixed).

  7. A view with no element, or one that names an element that does not exist, is said in the same words by the command line and the editor (Changed message, see [upgrade-0-19] for the first of the two sentences).

  8. The step 3 of the story migration of the example domain_plateaus draws something (Fixed). It played an empty slide. The editor no longer logs an error on load when the browser asks for its icon.

  9. The manual’s recipe for folding a plateau by hand is repaired (see [editor-plateau-delete]). It now says to compose the replaces of the plateau above, and that two columns of the cascade of the removals change, the plateau and the number of the patch.

  10. The editor page is built from source files (Changed, no effect on a reader). The one file that is distributed is the same page; it is assembled, formatted and linted from about eighty parts.

What changes for a reader who knows 0.19.0. These are the changes after the release 0.19.0; they are in the release 0.20.0. Nothing breaks: three things are new, one thing is fixed, five mistakes are told better (a sentence that names the file and the key, or one error: line where there was a stack trace), and every other command prints and writes what 0.19.0 printed and wrote, byte for byte (the views, the tables of diff, query graph, query views, the generated stories and the output of query schemas workspace; this was checked by running every command on every example and fixture the repository ships against the jar of 0.19.0). A script that reads the old text of the sentence of the second item below has to read the new one. As for the blocks below, there is no release notes file in the repository: these blocks are the notes.

  1. archicode query schemas manifest describes the content of every kind (New, see [manifest-schema]). It printed a schema of the envelope only, with the content as any value; it now carries the schema of the ten kinds side by side under kinds (keys, required keys, enums, shapes, what each element kind holds, whether it can be the top of a layer, the id rule and the reference form), the nested elements under nested, and it is derived from the classes that read the manifests. The output is still sorted. A tool that read the old output and ignored what it did not know is not affected; one that took the content for anything will find an object. The schema cannot say a dozen things the loader checks (a reference that resolves, a name declared twice, the tree of plateaus, a patch that selects nothing); the section lists them.

  2. archicode guide is new (see Print the guide for an agent). It prints a guide for an agent, generated from the code, that needs no workspace and no network, and starts with archicode guide <version>.

  3. archicode init is new (see Start a workspace). It writes a small workspace that loads and is drawn, adds /views*/ to .gitignore, and overwrites nothing.

  4. The editor’s save keeps two layouts it used to write again (see Elements and Limits of today). A file that has a block scalar as an item of a list (- |, then its text) no longer makes any save, even of another key, write the whole file again in the editor’s layout with every comment lost; and a block scalar on the second key of a map that is a list item (note: |) stays a block scalar when the first key of the item goes or another comes before it, where it was written as a quoted text. The file read the same before; what changes is the comments and the layout that are kept. Two shapes still fall back to the emitter’s text: - - | on one line, and a folded block (- >) that reads differently once written again; they, and the two nesting cases listed with them, are in the limits.

  5. A saved view or a story step with no properties is one error: line (Fixed). It ended in a NullPointerException and a stack trace; it now says the view v has no element: write the reference of one in properties.element , exit 1, the same mistake as properties: {}. A map needs no element and is drawn.

  6. A reference that names no element says where it is (Changed message). A relationship destination, a uses entry or a hosted application that names an element which does not exist said unable to find the element nowhere; it now says which element holds it, in which file and at which key, for example error: shop.web has a relationship towards nowhere, which does not exist, in manifests/shop.yaml at relationships[0].destination , and the editor says the same sentence word for word (a workspace with plateaus adds in the plateau p, ). It stays an error where it was one, so no command that succeeded fails.

  7. archicode views generate -e <engine> with an engine that does not exist, and -p <file> with a file that does not exist, are one error: line each (Fixed). They ended in a stack trace; they now say unknown rendering engine nope (known: plantuml) and that the file does not exist or cannot be accessed.

  8. archicode init leaves nothing behind when it is stopped (Fixed). A folder it could not write to (a manifests folder without the right to write) left .archicode.yaml behind, and the next init refused the folder as already a workspace; it now removes every file it created.

  9. A mistake in one key of a manifest never ends in a stack trace (Checked). A test copies every example and fixture, removes one key, empties one list or sets one key to null, and runs the commands: each result is a success or an error: line. The sweep found no other stack trace in the files the repository ships.

What changes for a reader who knows 0.18.0. These are the changes after the release 0.18.0; the release that carries them has no number in this manual yet. One of them can stop a workspace that loaded before, a facet whose name cannot be the name of a folder, and it comes first; the others change a sentence, a saved file or a screen, or add something. As for the blocks below, there is no release notes file in the repository: these blocks are the notes. The error: lines are the ones the tools print.

  1. A facet whose name is not a folder name is refused (Breaking, for such a name). The name of a facet goes as it is written into the folders of its views, so a name that is empty, is . or .., holds /, \, a NUL or another control character or one of < > : " | ? *, or ends with a dot or a space is now refused by every command that loads the workspace and by the editor, with one error: line for each facet, exit code 1, before anything is written. A facet called a/b loaded in 0.18.0 and wrote its views in views-a/b, a folder inside a folder; it now stops with:

    error: the facet name `a/b` cannot be the name of a folder: it holds `/`, which separates the folders of a path (write a plain word, such as `journey`)

    Rename the facet in .archicode.yaml, and rename or delete the folder it wrote if you keep it. Every facet of the examples of this manual and of the repository’s tests uses plain words, so their views are the ones they were, byte for byte. The rule and the names it does not look at are in Tackling view clutter.

  2. A workspace file that cannot be read is one line, not a stack trace (see Errors, warnings and exit codes). A .archicode.yaml that is there and that the file system refuses to read (a file without the right to read it) printed error: unexpected java.io.FileNotFoundException: …​ (Permission denied) and a stack trace in 0.18.0; it is now error: the workspace file `...` cannot be read: permission denied, exit code 1. The other ways to have no workspace file, and the sentence for workspace.yaml, are word for word what they were.

  3. The editor’s card says what is wrong with the file (see Opening the editor). For a .archicode.yaml that is read and found wrong (a key that does not exist, YAML that is not valid, a file that is not a mapping, settings.plateaus, a path or a facet name that is refused) the card Can’t open this workspace shows the sentence of the command line, where it said that the file could not be read and added a hint to check that it is valid YAML. It keeps those words for a file that cannot be had, and the list of the remembered folders notes only those.

  4. The editor keeps the brackets (see Elements). A list or a map that you wrote in brackets (qualifiers: [a, b], tags: {zone: north}) and that a change reaches is saved in brackets, on its line, when it fits, where it was saved as a block. Nothing is lost either way: the file reads the same, and the cases that still become a block are listed there.

  5. A story can be played (see Stories: stories and views and [editor-story-player]). Play, on the page of a story, opens the story in a window of its own that covers the editor and plays it like slides: the diagram of each step, drawn at the plateau and with the comparison the step names, its words, a list of the steps, Previous and Next, full screen, and the arrow keys, Home, End and Esc. The editor behind it does not change: when the window closes, the plateau, the comparison, the selection, the page and the address are what they were, and nothing is written. play= in the address keeps the window in a link. The bar over the editing diagram, which Show on diagram raises for one step, no longer has Previous, Next or a list of the steps: they are in the player. Nothing the command line writes changes: archicode stories generate and views generate draw what they drew.

  6. The save keeps the quotes and the comments it can (see Elements and Limits of today). When you save a file, a value that comes back on a line that is written again (a map in brackets that becomes a list of maps, an item that moves, a list that gives back its item) keeps the quotes it had, and so does a key; a comment stays on the line of its own key or item; and removing the first of two items that read the same removes the first, with its comment, where the comment could stay on the second. A comment that a removed line left right under a block scalar (key: |) no longer makes the editor write the whole file again in its own layout, which lost every comment of the file. The file reads the same either way; what changes is that quotes and comments that were lost or put on the wrong item are kept.

  7. archicode --version is new (see Print the version): one line, archicode <version>, on the top command only. Nothing else changes on the command line.

  8. The release page carries native programs (see Install). The releases after 0.18.0 attach archicode-<version>-linux-amd64, archicode-<version>-linux-arm64 and archicode-<version>-macos-arm64 with a SHA256SUMS file, each run on its own kind of machine before the release is public. The Maven Artifact and the OCI Image are as they were. There is no file for Windows or for an Intel Mac yet.

What changes for a reader who knows 0.17.0. This release has one change that stops every workspace, the name of the workspace file, so it comes first. There is no release notes file in the repository: this block and the ones that follow are the notes. The error: lines below are the ones the tools print.

  1. The workspace file is .archicode.yaml (Breaking). It was workspace.yaml. The new name is the default of -w for every command and the name the editor looks for, and there is no alias and no command that converts: rename the file once, with git mv workspace.yaml .archicode.yaml, or keep the old name and say so with -w workspace.yaml. A folder that has workspace.yaml and no .archicode.yaml is refused, by every command and by the editor, with this one line, exit code 1, before anything is loaded or written:

    error: `workspace.yaml` is no longer the name of the workspace file: rename it to `.archicode.yaml` (`git mv workspace.yaml .archicode.yaml`), or tell the command line where it is with `-w workspace.yaml`

    archicode -w workspace.yaml views generate works as it did, since the path is explicit. archicode editor serve is the exception: it opens a folder that has a .archicode.yaml, so -w workspace.yaml is refused with a usage error (exit code 2), the editor opens a folder with a .archicode.yaml: /work/workspace.yaml is not named so., followed by the usage of the command; rename the file for the editor. The name begins with a dot, so the file is hidden: ls -a shows it, and a file dialog shows it when you ask for hidden files. It is never read as a manifest, in a folder read with /** or without it (see Manifests in folders); a workspace.yaml left behind in a folder that a path ending in /** reads is read as a manifest and refused (error: `workspace.yaml` is not valid: unknown key `settings` (known: content, header) at `settings` (line 5, column 3)), so remove it. Change the scripts, the CI files and the Docker commands that name the old file; the views, the tables and everything else the commands write are byte for byte what they were (checked on the twenty workspaces of this repository).

  2. archicode stories generate writes more (see Draw the stories). The folder of a step that compares two plateaus gets the table of changes, gap.md and gap.json, and the facets of the workspace are drawn beside each step, in <NN>-<view>-<facet> folders. The files that were written are the same, byte for byte, with one exception: global-enabled: false is now honoured, so a workspace with that setting and stories no longer gets the folders of the global views of its steps, only those of its facets. 0.17.0 drew them. A workspace that does not set it loses nothing.

  3. More links in the technology views (see Using other environments and [map-technology]). A relationship whose destination is inside a deployed application (a component of a container that a node lists in applications) is now a dependency towards the node that hosts it, as a relationship whose source is inside already was; and the links between the nodes of one environment that a facet that keeps a flow draws read the relationships of everything inside the deployed applications. The overview, detailed and deep views of the technology layer and the Map of the technology layer gain the links, in the command line and in the editor. The views of a workspace that deploys no application with such relationships are the same, byte for byte, and so are the views of all the examples of this manual. In the layered Brightcart of the repository’s tests, the technology views of the facets journey, no-externals and without-cart and of their comparisons gain links, all inside one environment.

  4. The editor reads more like the command line (see Elements). A tagged number is read as the command line reads it: !!int 0x1F is 31, !!int 1:30 stays the text 1:30, !!binary aGVsbG8= stays the text aGVsbG8= (the page used to refuse them); foo: .inf under a key the header does not have is the unknown key, as in the command line; and a style written line-gap: 0x1F, round-corner: 8.0 or 1.5 is drawn with the number the command line reads. The numbers of 0.17.0 are unchanged otherwise.

  5. The save keeps more as written (see Elements). An anchor, an alias or a tag inside square or curly brackets, a text that goes over several lines and a list item whose map starts under its dash are kept as written when you save a file, where the editor wrote the whole file again in its own layout and lost its comments. A few layouts still fall back (see Limits of today).

  6. The editor checks before it writes (see Moved, split and merged elements, and candidates and [editor-plateau-delete]). Add replaces is checked as Write replaces is; a merge that the layer cannot hold is refused as a whole, where its first pair used to be written alone; and the delete of a plateau that others override is also refused when a step of a story is compared against a plateau above that would lose what it draws and the plateau the step is told at does not keep it either, or when a saved view is drawn in such a plateau. A delete that was allowed and loses nothing is written as before. How to fold a plateau into the one above by hand is told in [fold-by-hand].

  7. Three rough edges, fixed (see Comparing two plateaus, [editor-rename] and Tackling view clutter): the open key under the diagram keeps its 30 % cap when the window is resized, a write that fails after you said yes to the dialog of the plateaus gives the form back as typed, and a facet the kernel refuses shows its sentence as the error of the view instead of "facet removes this element".

  8. The editor is quicker on a large pair of plateaus: finding what has nothing to draw and resolving the patches take a quarter to a fifth of the time they took on the 591 elements of the test pair, and grow with the elements instead of faster (see Limits of today). No output changes.

What changes for a reader who knows 0.16.0. This release removes things that were deprecated, so the first four items can stop a workspace that loaded before. Each prints one error: line, exit code 1, and writes nothing; the sentences below are the ones the tools print.

  1. The group is gone (Breaking). Write the children of a former group in the elements of its parent, which shortens each reference by one segment (shop.web.edge.gateway with a group edge becomes shop.web.gateway). The sentences, for kind: group and for the three old header kinds, are in [manifest-kinds]; the editor says the same words.

  2. The camel-case keys of a facet are gone (Breaking). hideUnlinked, globalEnabled, directoryNameTemplate and jsonPath must be written hide-unlinked, global-enabled, directory-name-template and json-path. The sentence names the key to write: +unknown key `hideUnlinked, write hide-unlinked (known: actions, hide-unlinked, name) at settings.facets.customs[0].hideUnlinked +. `json_path of a patch is still read.

  3. The Jayway dialect of the facets is gone (Breaking). anyof, noneof, == null and != null are not JSONPath. The command line and the editor refuse the path with +facet f: the facet path `…​ uses @.qualifiers anyof ['a'], which is not JSONPath (RFC 9535) and is no longer read: write @.qualifiers[?(@ == 'a')] +`; the table of the four rewrites is in Tackling view clutter. The warning that used to rewrite them is gone with them.

  4. The old addresses of the editor are gone (Breaking). /map, /elements, /library, /diagram, /applications, /plateaus, /environments and /timeline alone open the default page, Applications, like any unknown address. Write /timeline/applications, /timeline/elements, /stories, /stories/views, /timeline/plateaus and /timeline/environments (see The perspectives and their pages). Update your bookmarks.

  5. archicode stories generate draws the steps of the stories (see Draw the stories). views generate still does not.

  6. More dependencies between environments. A relationship declared by what is inside a deployed application (a component of a container that a node lists in applications) is now a dependency of the node, in the overview, the detailed and the deep viewpoints of the technology layer and in the Map of the technology layer (see Using other environments). A workspace that deploys containers whose components declare the relationships gains links there; the layered Brightcart gains the dependencies of app-vm and staging.vm towards partners and sandbox. The views of every other example are written byte for byte as before.

  7. Deleting a plateau in the middle. A plateau that other plateaus override can be deleted in the editor, in one step; they go under its parent and the dialog lists what each loses (see [editor-plateau-delete]).

  8. Write replaces refuses an entry its layer cannot hold, when the comparison is several layers apart and a layer in between removed the replaced element: the button is off, with a sentence (see Moved, split and merged elements, and candidates).

  9. The key of a comparison is folded under the diagram, with a Key button (see Comparing two plateaus), and a write the editor refuses, or an error while it reads the form, no longer empties the form: what you typed stays (see [editor-rename]).

  10. The numbers. The editor reads a plain scalar that YAML 1.1 reads as a number as the command line does, and saves it back as written: id: 010 is the reference 8 in both tools, parent: 0 and version: 1 in a header are the text as written, line-gap: 0x1F is accepted for a whole number and "0x1F", quoted, is refused, and .inf is the one line +Malformed numeric value '.inf' at `content +`. Two differences are left and pinned (see Limits of today), and 0.18 reads the others like the command line (above). The command line is unchanged.

What changes for a reader who knows 0.15.0. Since that release, these things moved; the first can change a file that a workspace had, the second an error:

  1. A comparison several layers apart reads the replaces of the layers in between. archicode diff --plateau <a> --against <b> and the editor give a move that took two steps as a move, where they gave one element new and one removed with a warning; the table of the two plateaus, the counts and the files that views generate writes for the comparison change with it. The comparison of a plateau with the plateau it overrides is as it was (see Saying what an element replaces).

  2. views generate --view on a view whose element a facet removes is one error: line that names the view and the facet, with nothing written, where it was a bare dangling reference after some folders were written (see [plateau-views-lacking]).

  3. A patch can take a field out (operator: REMOVE, target, field), and the editor writes it when you clear an inherited text, where it refused (see [plateau-patches] and Writing in a plateau). The patches that were written before are read as they were.

  4. The editor: the Remove buttons of a qualifier, an application and a use remove the item they sit on; cancelling the dialog of a rename or of a write that changes other plateaus gives the form back as typed; Move asks which views would break in the plateaus beside the one drawn, as a rename does; a saved file keeps its byte-order mark, and a comment after the last line of a moved block goes with it (see [editor-rename], Moving an element under another parent); and the forms of the centre no longer go past a window 360 pixels wide (see The editor on a small screen).

What changes for a reader who knows 0.14.0. Since that release, these things moved; the first two can change a file or an error that a workspace had:

  1. A saved Map of the technology layer draws more. It draws the applications deployed on the open nodes and the dependencies between environments that they give, unless the view says applications: false or relationships: false (see [map-technology]). The views of a workspace that has no such map are written as they were, byte for byte, and so are the other viewpoints.

  2. A root container, component or node in a workspace that has plateaus is an error, with the same line in both tools (see [nesting]). A workspace with no plateau is read as it was.

  3. The band: Compare with shows the tree of the plateaus and has no entries Future any more (see The band of plateaus).

  4. The editor has the field Current plateau in Settings, J and K for the walk through the changes, the box of Add to story…​ that writes at and against, and a dialog before a rename that leaves a view broken in a plateau beside the one drawn (see The current plateau, Keyboard, Stories: stories and views and [editor-rename]).

  5. The command line: archicode diff --width <columns> wraps the text table (see Compare plateaus), and a plateau: in the header of a view or a story says nothing (see [plateau-untied]).

One more thing changed for a workspace that has plateaus and that marks its boxes by hand with a state word (rendering-stereotypes: "new" or "changed"). A word that agrees with the comparison is drawn as before. A word on an element that does not have that state used to give the box the default look of the state in the views of the command line, and the editor did not: it now gives it nothing in both, and the command says so on its error output (see [plateau-state-tags]). The files that a workspace without a state word writes are the same, byte for byte.