ek9_query_module_landscape

Answers first: status, programState, moduleCount, moduleNames, then modules[] {name, band, types, metrics as headroom {rule, limit, value, band, enforced}, cycles} ranked worst-first and summary.

Category: Enquiry · Compare: EK9 IDE — "Module Landscape" pane (health-coloured module map)

When to use it

'How healthy is each module - size, coupling, cohesion, cycles - against the limits the compiler enforces' is one call with no arguments.

When not to use it

Details

Per module: 'types' (counts by genus), 'metrics' — moduleCoupling (E11016, enforced:true, basis:'trueCoupling' — the tool's own type-argument-unwrapped walk, may exceed the FQN-blind E11016 checker), constructCoupling (E11015 rollup), moduleCohesion (E11017, enforced but available:false — value not persisted by the checker), afferent/instability (advisory, enforced:false, limit:null); for applications a registrations tuple (E11042). Enforced metrics carry a real comparator + band; overall 'band' is the worst ENFORCED band (advisory never raises it). Also isApplicationOrRoot (composition roots wire everything by design), cycle membership (pointer only), file/line, and programState — architecture facts need FULL_RESOLUTION; below that, unknown.

Arguments

ArgumentTypeRequiredWhat it is
bandstring: all | ok | approaching | at-limit | overRestrict to modules whose overall health band is at/over this level. Default 'all'.
metricstring: efferent | afferentRank modules by this metric (worst first). Default 'efferent'.
moduleFilterarray of stringRestrict to these modules - exact names; an entry ending in '*' is a prefix ('com.acme.*'). A single string is accepted. Omit for workspace-wide.

It also takes the arguments every tool takes.

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it.

Landscape shape

Request

{ }

Response

{
  "meta" : {
    "serverMs" : "<timing>"
  },
  "moduleCount" : 3,
  "moduleNames" : [ "sample.arch.orders", "sample.arch.web", "sample.arch.domain" ],
  "modules" : [ {
    "band" : "ok",
    "cycles" : [ ],
    "file" : "orders.ek9",
    "isApplicationOrRoot" : false,
    "line" : 2,
    "metrics" : {
      "afferent" : {
        "band" : "info",
        "enforced" : false,
        "excludesExternal" : true,
        "limit" : null,
        "rule" : null,
        "value" : 1
      },
      "constructCoupling" : {
        "band" : "ok",
        "enforced" : true,
...

Cut short here: 138 more lines. The whole recorded call.