Skip to content

Create design

create design - Generate workspace.dsl for a module using AI

Generates Structurizr DSL workspace files for a module by analyzing its source code using AI. The AI analyzes the source code in go/eac// and creates comprehensive architecture documentation including system context views (external systems and actors), container views (major components), and component views (internal structure). All generated workspaces are automatically validated against Structurizr CLI to ensure correct syntax before saving to specs//.design/workspace.dsl (or custom path via --output). Use --debug to save AI prompts and outputs.

Flags

Flag Description
-d, --debug (default: false) Save intermediate outputs (prompts, raw AI responses, validation results) to out/commands.log for debugging
-f, --force (default: false) Overwrite existing workspace.dsl file if it exists
-o, --output Custom output path for workspace.dsl (default: specs//.design/workspace.dsl)
--prompt Custom AI prompt file path
--skip-validation (default: false) Skip Docker validation (useful when Docker is unavailable)

Notes

Expected Output:

  • Structurizr DSL workspace file at output path
  • System context, container, and component views
  • Validation results if Docker available
  • Debug logs in out/commands.log if --debug enabled

How It Works

The command uses AI generation with Structurizr DSL format support:

  • Format: Generates workspace.dsl files in valid Structurizr DSL syntax
  • Validation: Validates DSL syntax using Structurizr CLI (requires Docker)
  • Retry: If syntax validation fails, AI receives error feedback and regenerates corrected DSL
  • Customization: Uses three-tier prompt system for team-specific design approaches

Supported formats: Structurizr DSL for C4 model diagrams (system context, container, component).

Custom Prompts

The design generation supports three-tier prompt system for customization:

  1. Command Flag: --prompt /path/to/custom.md (highest priority)
  2. Team Override: .r2r/eac/templates/ai/design/design.md (team-wide customization)
  3. System Default: templates/ai/design/design.md (fallback)

See commit-message for detailed customization guide or:

cat .r2r/eac/templates/ai/README.md

See Also


Tutorials | How-to Guides | Explanation | Reference

You are here: Reference — information-oriented technical descriptions of the system.