Skip to main content

Scope — what a green check means

npx tsx src/cli.ts check examples/two-rooms.muro
✔ Consistent — 3 spaces / 3 boundaries
  Structural consistency only — architectural validity is what koyu validate says, separately

What that one line promises, and what it does not. That is this page.

The definition of green

For the structural tier and the interpreted tier, the declared invariants hold. About the carried tier it says nothing. About architectural validity it says nothing.

This is not a judgement but part of reading — the same layer at which a JSON parser rejects broken JSON.

Three domains

koyu is made of three domains. They are kept apart because the quality demanded of each is different.

DomainWhat it holdsSizeQualityVersion
corethe language, its semantics, composition, identity, derivation, structural diagnostics, questions, canonical JSONsmallmust be cleanfreezes
validationarchitectural judgement — fifteen rulesgrowsmay be messydoes not freeze
presentation and buildSVG generation and outside viewersgrowsmay be messydoes not freeze

The dependency runs one way. Validation and presentation depend on core; core depends on neither. Core runs complete on its own. That one-wayness is enforced by a test, not by prose.

Not separating them makes two things happen at once — mess seeps into core and freezes there, and core's caution stops validation and presentation from growing. The separation itself is what makes it acceptable for the other two to be messy. Mess in a domain that does not freeze can be rewritten at any time, so it is cheap. Mess in a domain that freezes is permanent.

Even the types are separate. Core returns Diagnostic { code, severity }; validation returns Finding { rule, level }. Adding a judgement never moves the language version.

What is guaranteed

GuaranteeDiagnostics
Uniqueness of paths and identityUID01–04 / ZON02 / duplicate-path errors during composition
Existence of referentsREF01 / undefined asset / the zone a polygon belongs to (SIT04)
Levels are definedLVL01 / VRT02
Overlapping regions (in plan)GEO01 / GEO02
Overlapping regions (in section)HGT01 / HGT02
Composition resolvescomposition errors
Sufficiency of what shape needsSUF01–04
Soundness of relationsBND01–06 / VRT01–06
Uniqueness of derivation (openings, segs, lines, columns, run shapes)OPN01–08 / SEG01–08 / LIN01–03 / COL01–02 / RUN01–05
Value domains of interpreted attributesATT01–03 / DAY01
Soundness of the givensSIT01 / SIT02

Overlap in section belongs to core because it is the sectional case of overlap in plan. A ceiling below and a floor above occupying the same z is the same kind of contradiction as two space regions overlapping, and no single shape can be made from it. Architectural judgements about height — storey height, eaves height, setback envelopes — are not guaranteed; those are the validation face.

What is not guaranteed

Daylight, area ratios, floor area ratio, envelope continuity, whether a stair is climbable, whether a door can physically be installed, means of escape, street frontage — and every other question of architectural validity. Plus the meaning of carried-tier attributes.

None of these are absent. They are on another facekoyu validate holds them.

npx tsx src/cli.ts validate examples/two-rooms.muro
✔ Nothing caught by validation (this is a judgement, not a guarantee about the composition)

The output says so itself.

Do not claim "it works" because it is green

Green does not mean the building is usable.

Touching spaces default to a wall, so a two-storey building that declares not one door stays green and is completely sealed. The envelope does not grow by itself either — no default is derived against a space with no region (the exterior), so a forgotten boundary to the outside becomes a silent absence of wall.

Circulation is answered by koyu doors; judgement by koyu validate.

Questions do not say pass or fail

Core holds the questions of quantity and graph. It just never says pass or fail.

QuestionWhat core returnsWhat validation says
Daylightfloor area and effective window areawhether it meets 1/7 (daylight.ratio)
Sitesite area, frontage length, building area, total floor area and their ratios2m of frontage (site.frontage), escape beyond the line (site.escape)
Vertical runsriser count, riser, going, slopewhether it is cramped (stair.proportion), whether the slope is acceptable (run.slope)
Envelopeoutline segments facing nothingwhether that is a hole (envelope.gap)
Circulationthe minimum-door route and passabilitywhether you can reach the outside (access.*)
Columns and openingscolumns standing on grid intersections, openings on a segmentwhether they collide (column.blocksdoor)

Thresholds belong to architecture. Neither 1/7 nor 2m nor 240mm is an invariant a composition must satisfy. Core returns numbers; validation draws lines through them.

The three attribute tiers

TierExamplesHow core treats it
Structuralpath, type, region, level, the other end of a relation, kindalways read. If it is broken, nothing is read
Interpretedh w at daylight road site stylethe ledger defines the value domain, and core reads it
Carriedacme.sensor bems.temp survey.measurednot read. Open, with a namespace

The carried tier carries a namespace (dot-separated). An unknown key without one is an error (ATT03) — so that a one-letter slip like heigh:2400 cannot silently do nothing. That is the only shape in which "not looked at" and "looked at and fine" can be told apart.

Without the declaration, they cannot be told apart, and "nothing wrong" in that state means nothing. Being able to carry something without judging it is a legitimate state, and saying so explicitly is the condition of that freedom.

Neighbouring pages