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.
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
- the specific edges coupling two modules (use
ek9_query_module_coupling) - intra-module cohesion detail (use
ek9_query_module_cohesion) - the dependency graph / who-imports-whom (use
ek9_query_module_dependencies) - full cycle paths and how to break them (use
ek9_check_module_cycles)
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
| Argument | Type | Required | What it is |
|---|---|---|---|
band | string: all | ok | approaching | at-limit | over | Restrict to modules whose overall health band is at/over this level. Default 'all'. | |
metric | string: efferent | afferent | Rank modules by this metric (worst first). Default 'efferent'. | |
moduleFilter | array of string | Restrict 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.