Scaffoldizr: Scaffolding to create Structurizr Workspaces

Opinionated TypeScript/Bun Scaffolding Tool for creating Structurizr DSL Documentations

Download as .zip Download as .tar.gz View on GitHub

AI Agent Integration

< Back

Scaffoldizr provides an opinionated framework for AI agents to generate and interact with Structurizr workspaces. By following a consistent folder structure and non-interactive CLI patterns, AI agents can reliably build and maintain C4 model architecture documentation.

Overview

The AI Agent integration is designed for scenarios where:

Installation

The AI integration is available as a skill for agents that support OpenCode skills or similar tool-based environments.

Install the Scaffoldizr agent skill (e.g. for OpenCode):

npx skills add formulamonks/scaffoldizr

Also ensure the Scaffoldizr CLI is installed in the agent’s environment:

curl -s https://formulamonks.github.io/scaffoldizr/assets/install.sh | sh

The agent should then have access to the scfz command for non-interactive operations.

Folder Structure

Scaffoldizr generates a predictable folder structure within the architecture/ directory, making it easy for AI agents to locate and modify specific architectural elements:

Workspace Scope

AI agents must respect the workspace scope defined in architecture/workspace.dsl. The scope determines which elements can be created:

  1. Landscape Scope: Allows creating system, person, external-system, view, relationship, constant, and archetype.
  2. SoftwareSystem Scope: Allows creating container, component, person, external-system, view, relationship, constant, and archetype.

Agents should verify the current scope before attempting to scaffold new elements to ensure consistency with the C4 model levels.

Creating Elements

AI agents interact with the workspace using the scfz CLI tool in non-interactive mode. This is achieved by passing arguments as flags to bypass interactive prompts.

For a detailed list of subcommands and parameters, refer to the Usage Guide.

Workspace Build Process

Agents should never modify the workspace.json file directly; all changes should be made to the DSL source files.