AI Power Tools for Sparx EA Docs Release 3.6.4

Choose the right diagram

Goal

From what you want to understand and the measured content of a scope, recommend a diagram type and viewpoint, including when the scope spans several modeling languages and no conformant view exists. For an architect. You end with a ranked recommendation with its reasoning, the caveats that apply (including whether the view can be generated), and, for a mixed-language scope, an explicit choice among three ways to handle it.

Where it runs

This scenario needs the MCP server and local code execution. Computer use covers its UI steps.

Surface How it runs
Claude Code Fully
Claude Cowork Not available. The scenario needs local code execution on the machine where EA runs, and a local Claude Cowork session runs code in an isolated virtual machine instead. A cloud session has no local MCP server.
Claude Desktop chat Not available. The scenario needs local code execution, which Claude Desktop chat does not have.
VS Code with GitHub Copilot Fully, except the UI steps, which you perform: starting EA and opening the model, and dismissing any dialog EA raises (you paste a screenshot of it into the conversation first).

Before you start

  • The start-of-session check done.
  • A scope: a package or a package subtree, in the open model.
  • The modeling technologies that the scope uses loaded, so that their vocabularies can be read.
  • Local code execution: the profiling and ranking are a code engine (Diagram advisor engine). Without it the scenario is not available.
  • No baseline is needed. The scenario is read-only.

A person says what they want to understand: "show me how the payments applications depend on each other". They should not have to know which of dozens of diagram types, across several modeling languages, expresses that. The advisor turns the request into a recommendation with its reasoning attached. It never draws anything, and it never silently decides: a user who asked for a specific type gets it, with a note when it fits badly.

The rule that matters most is to measure the content and never guess it. Nearly every bad diagram-type choice comes from assuming what a scope holds. The method is to profile what is there, attribute it to modeling languages, and let that decide whether a conformant view exists at all.

Steps

  1. AI with computer use; otherwise you If EA is not running or the model is not open, start EA and open it. You State the intent in your own words, and fix the scope. What decision should the diagram support?
  2. AI Power Tools ea-diagram-advisor collects the packages in scope (the package tree).
  3. AI Power Tools ea-diagram-advisor measures the content with one grouped count of stereotypes and element types over the scope (a direct model query). The three summary operations in ea_analyze take no scope: they query the whole repository, so they suit a model-wide picture and not a scope. The count excludes unstereotyped elements, so its total is not the scope size. Ask for the scope size separately, because "40% unattributed" against the wrong denominator is worse than not reporting it.
  4. AI Power Tools ea-diagram-advisor reads each technology's vocabulary (get_mdg_from_runtime, with the id, not the display name). A loaded technology can expose nothing, so an empty vocabulary is not proof of an empty technology. If a technology you can see in the model is not listed, the AI reads the technology ids out of the repository before concluding it is absent.
  5. AI Power Tools Optionally, ea-diagram-advisor profiles the element set through its connectors (traverse_element_subgraph). It returns every interior edge twice, so the AI deduplicates before counting. A bad element id gives an empty result with no error, so an empty profile means "check the scope", never "the scope is empty".
  6. Engine ea-diagram-advisor profiles the scope (rule-based): one language or several?
  7. Engine ea-diagram-advisor ranks the options (rule-based).
  8. You Choose from the ranking, with its reasons and caveats, especially on a close call.
  9. You If the scope is mixed, choose how to handle it, in one of the three ways below.
  10. You Reconcile with validation before drawing: ea-diagram-advisor and ea-validation audit the package that will hold the new diagram's content (ea_validate, scoped to a package). Scope those rules out, or accept the findings.
  11. AI ea-diagram-advisor hands the choice to composition (Compose a diagram).

The scope profile answers one pivotal question: is the scope one language or several?

Profile Meaning
Homogeneous and bound The dominant language holds at least 90% of the scope, and a binding exists for it. An ordinary, conformant view exists
Mixed No conformant view exists. See step 9
Dominant language named but unbound Most of the scope is a language with no binding here, usually a customer's own technology. This is not the same as mixed. There is no view catalog for it, so there is no conformant view to recommend
Dominant is ambiguous More than one loaded language claims these stereotypes, and the stereotype alone cannot settle it. Ask which language the content is meant to be, or narrow the scope

Look at the share of stereotypes the profile could not attribute to any language before trusting anything. "I could not place 40% of this scope" is the most useful thing to know, and it changes what the recommendation is worth.

The ranking. Options are ranked best first on coverage (how much of the content the view admits), then on intent, then on specificity. The reasons name the counts, the shares and the coverage arithmetic. Watch for a close call: in a small scope many viewpoints admit everything, coverage and intent tie, and an arbitrary tiebreak picks the winner. The AI says so, and lets you choose on what the diagram is for, which the ranking cannot see. Each option also carries whether it can be generated.

How it is generated Meaning What to do
Composed AI Power Tools computes the geometry and the layout is built Hand it to composition
EA layout EA's own layout places it Place the elements, run the layout, tidy and check. This is the intended approach for most diagram types, not a limitation
Not producible The diagram type dictates the arrangement itself The AI says so, and the reason starts "cannot be generated". Draw it by hand or choose another view
Unanswered The binding did not answer Confirm before promising a generated diagram

A view that cannot be generated is still ranked and still recommended. Hiding it would report the toolchain's gap as the content's.

A mixed scope can be handled in three ways, in order of preference.

  1. A dominant-language view. It carries the majority, and the rest appears as foreign content. This is the least surprising.
  2. A neutral custom view. A base type with no profile, belonging to no language, so nothing on it is foreign. This is ordinary practice: a large share of real diagrams are plain base types.
  3. Split into linked conformant diagrams. Every view stays valid. The cost is that no single picture shows the whole scope, which is usually what was wanted.

Two obligations follow, and neither is optional. Say so: record on the diagram and in the response that the view is non-conformant and which languages it spans. Reconcile with validation: AI Power Tools names the concepts a conformance check will object to. Offer to scope those rules out or to annotate them as accepted before generating, so that you decide and do not discover a wall of findings afterward. A finding in the audit that was not predicted means the profile missed something. The AI says so and does not quietly absorb it.

Prompts to use

Opening

Follow-ups

Hands off to Compose a diagram.

Model Fit Why
Claude Fable 5.1 Recommended Choosing among viewpoints on a close call is judgment about purpose
Claude Opus 5.5 Recommended The same
Claude Sonnet 5.5 Capable Runs the measurement and reads the ranking well
Claude Haiku 4.5 Capable Fine for the measurement. Less reliable at explaining a close call

Ratings are guidance based on the kind of reasoning the skill needs, not measured benchmarks.

Checking the result

  • Accurate. The count's total equals the sum of its rows, and the scope size is reported separately. The vocabularies used came from the runtime reading, by id. The reasons name real counts that you can reproduce with the count.
  • Complete. The response states the homogeneity result, the unattributed share, the ranked options and how each can be generated, and, for a mixed scope, the non-conformance sentence and the list of concepts that will be flagged. A recommendation over content that could not be profiled says it is weak, and why.
  • Nothing unintended changed. The scenario writes nothing. The audit also reads only.

Variations

  • You name a type. You get that type, with a note when it fits badly.
  • Unbound customer technology. The recommendation is a neutral view or the dominant-language view of what is bound, and the report says no view catalog exists for the customer's own technology. Adding a language is a data change to a binding's viewpoints, never a code change.
  • Before any generated diagram. Run it whenever the diagram type was not given, or whenever the languages in a scope have not been checked.

Limitations

  • It recommends, and never draws. Drawing is Compose a diagram.
  • Coverage is not fitness. A viewpoint that admits every concept in the scope can still be the wrong argument to make about it.
  • Your words are evidence, not instructions. "The application landscape" narrows the choice and does not settle it.
  • An unmeasured scope is a guess with a footnote.
  • Bindings exist for a limited set of notations. Eleven ship: ArchiMate 3, BPMN 2.0, DMN 1.1, UML (EA's base notation), SysML 1.4, TOGAF diagrams, the UAF framework, mind mapping, strategy map, ERD and the Zachman framework grid. Where a notation spans several technology ids, one binding covers one id. Some diagram types are deliberately unbound. A customer's own technology has no binding.
  • A diagram type can be unproducible. A type whose arrangement is the content, such as a sequence diagram or a waveform, cannot be generated by composing coordinates.