@kensnzk/koyu 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +16 -0
- package/.zenodo.json +20 -0
- package/CITATION.cff +26 -0
- package/LICENSE +73 -0
- package/NOTICE +2 -0
- package/README.ja.md +71 -0
- package/README.md +72 -0
- package/docs/decisions/0001-notation-v0.md +29 -0
- package/docs/decisions/0002-height-and-offsets.md +27 -0
- package/docs/decisions/0003-uncounted-divisions.md +36 -0
- package/docs/decisions/0004-typical-floors.md +21 -0
- package/docs/decisions/0005-zones-and-unions.md +23 -0
- package/docs/decisions/0006-voids-and-light.md +31 -0
- package/docs/decisions/0007-semi-outdoor-air.md +27 -0
- package/docs/decisions/0008-vocabulary-and-level-attr.md +23 -0
- package/docs/decisions/0009-site-and-exterior.md +29 -0
- package/docs/ifc-coverage.md +82 -0
- package/docs/ifcx-notes.md +25 -0
- package/docs/img/house-L1.svg +80 -0
- package/docs/img/house-L2.svg +53 -0
- package/docs/img/mansion-L1.svg +113 -0
- package/docs/img/mansion-L10.svg +111 -0
- package/docs/img/mansion-L5.svg +160 -0
- package/docs/img/office-L1.svg +116 -0
- package/docs/img/office-L2.svg +109 -0
- package/docs/img/two-rooms.svg +39 -0
- package/docs/log/2026-07-22.md +13 -0
- package/docs/log/2026-07-23.md +51 -0
- package/docs/roadmap.md +55 -0
- package/docs/writing-architecture.md +119 -0
- package/examples/comparison/README.md +38 -0
- package/examples/comparison/gen-ifc4.ts +133 -0
- package/examples/comparison/gen-ifcx.ts +134 -0
- package/examples/comparison/two-rooms.ifc +152 -0
- package/examples/comparison/two-rooms.ifcx +1030 -0
- package/examples/comparison/validate-ifc.ts +33 -0
- package/examples/house.muro +89 -0
- package/examples/mansion.muro +187 -0
- package/examples/office.muro +110 -0
- package/examples/two-rooms.canonical.json +111 -0
- package/examples/two-rooms.muro +22 -0
- package/package.json +33 -0
- package/spec/notation-v0.md +164 -0
- package/spec/vocabulary.md +62 -0
- package/src/check.ts +302 -0
- package/src/cli.ts +281 -0
- package/src/graph.ts +306 -0
- package/src/index.ts +8 -0
- package/src/light.ts +66 -0
- package/src/model.ts +367 -0
- package/src/parse.ts +512 -0
- package/src/plan.ts +334 -0
- package/src/site.ts +82 -0
- package/test/core.test.ts +171 -0
- package/test/design2.test.ts +97 -0
- package/test/house.test.ts +74 -0
- package/test/mansion.test.ts +99 -0
- package/test/office.test.ts +71 -0
- package/test/uncounted.test.ts +120 -0
- package/test/vertical.test.ts +75 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# コミットのたびに構成の整合と法則を自動で確かめる。
|
|
2
|
+
# 「整合性や法規のチェックは、コミットのたびに自動で回るCIになります」(docs/writing-architecture.md)
|
|
3
|
+
name: ci
|
|
4
|
+
on: [push, pull_request]
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
- uses: actions/setup-node@v4
|
|
11
|
+
with:
|
|
12
|
+
node-version: 22
|
|
13
|
+
- run: npm ci
|
|
14
|
+
- run: npm run typecheck
|
|
15
|
+
- run: npm test
|
|
16
|
+
- run: npm run check:examples
|
package/.zenodo.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "koyu (戸牖) — a space-first, text-native notation for architecture",
|
|
3
|
+
"description": "An exploration of text-native architectural description with space as the primary element: walls are boundaries between spaces, openings are connections, form is generated rather than authored. A whole building in a few hundred lines. 空間を一次要素とするテキストネイティブ建築記述の探求。",
|
|
4
|
+
"creators": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Shinozaki, Ken"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"architecture",
|
|
12
|
+
"BIM",
|
|
13
|
+
"IFC",
|
|
14
|
+
"ontology",
|
|
15
|
+
"spatial description",
|
|
16
|
+
"text-native",
|
|
17
|
+
"DSL"
|
|
18
|
+
],
|
|
19
|
+
"upload_type": "software"
|
|
20
|
+
}
|
package/CITATION.cff
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "この探求を参照する場合は、以下の情報で引用してください。"
|
|
3
|
+
title: "koyu (戸牖) — a space-first, text-native notation for architecture"
|
|
4
|
+
authors:
|
|
5
|
+
- family-names: "Shinozaki"
|
|
6
|
+
given-names: "Ken"
|
|
7
|
+
email: "shinozaki.ken.141@gmail.com"
|
|
8
|
+
version: "0.5.0"
|
|
9
|
+
date-released: "2026-07-23"
|
|
10
|
+
license: "Apache-2.0"
|
|
11
|
+
repository-code: "https://github.com/kensnzk/koyu"
|
|
12
|
+
keywords:
|
|
13
|
+
- architecture
|
|
14
|
+
- BIM
|
|
15
|
+
- IFC
|
|
16
|
+
- ontology
|
|
17
|
+
- spatial-description
|
|
18
|
+
- text-native
|
|
19
|
+
- DSL
|
|
20
|
+
abstract: >-
|
|
21
|
+
空間を一次要素とするテキストを建築の原本とし、形はそこから生成する。
|
|
22
|
+
壁は二つの空間の境界という関係、開口は境界に開いた接続。
|
|
23
|
+
建物一棟を数百行で書く記法とツール群の探求。
|
|
24
|
+
Writing architecture, not buildings: a text-native, space-first
|
|
25
|
+
notation where walls are boundaries between spaces and form is
|
|
26
|
+
generated, not authored.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
|
56
|
+
|
|
57
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
58
|
+
|
|
59
|
+
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
60
|
+
|
|
61
|
+
Copyright 2026 Ken Shinozaki
|
|
62
|
+
|
|
63
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
64
|
+
you may not use this file except in compliance with the License.
|
|
65
|
+
You may obtain a copy of the License at
|
|
66
|
+
|
|
67
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
68
|
+
|
|
69
|
+
Unless required by applicable law or agreed to in writing, software
|
|
70
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
71
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
72
|
+
See the License for the specific language governing permissions and
|
|
73
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.ja.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# koyu (戸牖) — 建築を書く
|
|
2
|
+
|
|
3
|
+
[English](README.md)
|
|
4
|
+
|
|
5
|
+
> 鑿戸牖以為室、当其無、有室之用 — 老子 第十一章
|
|
6
|
+
|
|
7
|
+
空間を一次要素とするテキストネイティブな建築記述の探求。壁は物ではなく二つの空間の境界という関係であり、形はソースではなく生成物である。建物一棟を数百行のテキストで書き、git・LLM・都市データと同じ土俵に載せることを狙う。主張の全文は [docs/writing-architecture.md](docs/writing-architecture.md)。
|
|
8
|
+
|
|
9
|
+
二室一扉はこう書く (全文 [examples/two-rooms.muro](examples/two-rooms.muro)):
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
space /L1/a room X1..X2 Y1..Y2 name:居室A
|
|
13
|
+
space /L1/b room X2..X3 Y1..Y2 name:居室B
|
|
14
|
+
space /out exterior name:外部
|
|
15
|
+
|
|
16
|
+
boundary /L1/a /L1/b t:120 spec:PW1
|
|
17
|
+
door w:780 h:2000
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ここから平面図が生成される。壁を描く操作はどこにも無い — 壁は空間の割付から導出される。
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
2フロアのオフィス (廊下・コア・通り芯オフセット壁・階段/EV・高さの整合つき) でも約100行 ([examples/office.muro](examples/office.muro))。解像度は基本計画レベル — 垂れ壁を表現しないのは省略ではなく抽象度の選択で、計画初期にBIMが重すぎたという弱点の裏側がこの記述の主戦場である。高さ方向の一貫性は「天井高+上階slab ≤ 階高」という宣言された不変量の検査で担保する (ADR-0002)。
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
10階建て内廊下型集合住宅 (43戸、EV+屋外階段、屋上、Aタイプは間取り込み) は **183行** ([examples/mansion.muro](examples/mansion.muro))。基準階は一度だけ書き、`/L2..L9/A` のスパンが8フロアへ展開される (ADR-0004)。L字のLDKは矩形の合併、住戸は `zone` (数える集約) で間取りに割っても専有面積の言葉を保つ (ADR-0005)。吹抜けは `type:void` の垂直境界 — 床の不在も境界で書く (ADR-0006)。`doors` が「9階のLDKから地上まで扉3枚」に、`light` が住居系居室の1/7採光に即答する。
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
## 使い方
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm install
|
|
36
|
+
npm test
|
|
37
|
+
|
|
38
|
+
npm run koyu -- check examples/two-rooms.muro # 整合チェック
|
|
39
|
+
npm run koyu -- plan examples/two-rooms.muro -o out/two-rooms.svg
|
|
40
|
+
npm run koyu -- doors examples/two-rooms.muro /L1/a /out # → 2枚
|
|
41
|
+
npm run koyu -- graph examples/two-rooms.muro # 空間グラフ
|
|
42
|
+
npm run koyu -- stats examples/two-rooms.muro # 面積 (壁芯)
|
|
43
|
+
npm run koyu -- json examples/two-rooms.muro # 正準JSON (機械形式)
|
|
44
|
+
|
|
45
|
+
npm run koyu -- plan examples/office.muro -l L2 # レベル別の平面図
|
|
46
|
+
npm run koyu -- levels examples/office.muro # テキストの矩計 (高さの積み上がり)
|
|
47
|
+
npm run koyu -- doors examples/office.muro /L2/office /out # → 4枚 (階段経由)
|
|
48
|
+
npm run koyu -- stats examples/mansion.muro # 面積・ゾーン集計・専有率
|
|
49
|
+
npm run koyu -- light examples/mansion.muro # 採光 1/7 の粗い判定
|
|
50
|
+
npm run koyu -- site examples/house.muro # 敷地面積・接道・建蔽率・容積率
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 構成
|
|
54
|
+
|
|
55
|
+
記法の仕様と書き比べは [spec/notation-v0.md](spec/notation-v0.md)、属性の付け方の契約は [spec/vocabulary.md](spec/vocabulary.md)、IFC4とのカバレッジ照合は [docs/ifc-coverage.md](docs/ifc-coverage.md)、設計判断の記録は [docs/decisions/](docs/decisions/)、行程は [docs/roadmap.md](docs/roadmap.md) (Linear: [koyu](https://linear.app/munipersonal/project/koyu-2789f588a03a/overview) と対応)、日々の記録は [docs/log/](docs/log/)。実装は src/ に約900行 (パーサ・グラフ・チェック・平面図生成・CLI)、テストは test/。IFCXの読解メモは [docs/ifcx-notes.md](docs/ifcx-notes.md)、同じ二室一扉をIFC4・IFCXで書いた三方比較は [examples/comparison/](examples/comparison/README.md)。
|
|
56
|
+
|
|
57
|
+
## 技術方針
|
|
58
|
+
|
|
59
|
+
TypeScriptで書き、実行時依存はゼロに保つ。BIM/IFC系のツールが必要になったらThatOpenのOSS (web-ifc, @thatopen/components) を使う。IFC_samples/ はIFC取り込み (M5) 用のサンプルコーパスでgitの外に置いている (第三者提供のファイルのため再配布しない)。
|
|
60
|
+
|
|
61
|
+
これは探求である。事業化を目的とせず、オーサリングツールは作らず、往復互換は捨て、直交グリッドに絞る。
|
|
62
|
+
|
|
63
|
+
## 名について
|
|
64
|
+
|
|
65
|
+
戸牖 (こゆう) は戸と窓 — 開口。老子第十一章は「戸牖を鑿ちて以て室と為す。其の無に当たりて、室の用有り」と言う。開口を鑿ってはじめて室になり、室の用は壁ではなく無 (空間) の側にある。空間を一次要素とし、壁を境界という関係、開口を境界に開いた接続として書くこの記法の、これが最古の出典である。同音の「固有」も掛かっている — 各空間は人間可読な固有名 (階層パス) で名指される。
|
|
66
|
+
|
|
67
|
+
ファイル拡張子は `.muro` (室)。ファイルが保持する単位は部材ではなく室である。
|
|
68
|
+
|
|
69
|
+
## ライセンス
|
|
70
|
+
|
|
71
|
+
コード (src/, test/, examples/ ほか) は [Apache License 2.0](LICENSE)。文書 (docs/, spec/, 原稿「[建築を書く](docs/writing-architecture.md)」) は [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.ja)。引用情報は [CITATION.cff](CITATION.cff)。
|
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# koyu (戸牖) — writing architecture, not buildings
|
|
2
|
+
|
|
3
|
+
> 鑿戸牖以為室、当其無、有室之用
|
|
4
|
+
> *Cut doors and windows to make a room; it is the emptiness within that makes the room useful.* — Laozi, ch. 11
|
|
5
|
+
|
|
6
|
+
[日本語](README.ja.md)
|
|
7
|
+
|
|
8
|
+
An exploration of text-native architectural description with **space as the primary element**. A wall is not a thing — it is the boundary between two spaces. An opening is a connection cut into a boundary. Form is not source — it is generated. A whole building fits in a few hundred lines of text, which puts architecture on the same ground as git, LLMs, and city-scale data. The full argument (in Japanese) is in [docs/writing-architecture.md](docs/writing-architecture.md).
|
|
9
|
+
|
|
10
|
+
Two rooms and one door are written like this (full file: [examples/two-rooms.muro](examples/two-rooms.muro)):
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
space /L1/a room X1..X2 Y1..Y2 name:居室A
|
|
14
|
+
space /L1/b room X2..X3 Y1..Y2 name:居室B
|
|
15
|
+
space /out exterior name:外部
|
|
16
|
+
|
|
17
|
+
boundary /L1/a /L1/b t:120 spec:PW1
|
|
18
|
+
door w:780 h:2000
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The floor plan is generated from this. There is no operation that draws a wall — walls are derived from the layout of spaces.
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
A two-story office — corridor, core, offset walls off the grid lines, stairs/elevator, vertical consistency — is about 100 lines ([examples/office.muro](examples/office.muro)). The resolution is schematic-design level. Not modeling downstand beams is not an omission but a chosen level of abstraction: the early design phase, where BIM has always been too heavy, is exactly where this notation lives. Vertical consistency is enforced as a declared invariant — ceiling height + slab above ≤ floor-to-floor height (ADR-0002).
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
A 10-story double-loaded apartment building — 43 units, elevator + exterior stair, roof, unit type A with its interior layout — is **183 lines** ([examples/mansion.muro](examples/mansion.muro)). The typical floor is written once and the span `/L2..L9/A` expands it across eight floors (ADR-0004). An L-shaped living room is a union of rectangles; units are `zone`s (counted aggregation), so subdividing a unit into rooms never loses the language of net area (ADR-0005). A double-height void is a vertical boundary of `type:void` — even the absence of a floor is written as a boundary (ADR-0006). `doors` answers "how many doors from the 9th-floor living room to the street"; `light` gives a first-pass check of the 1/7 daylighting ratio for habitable rooms.
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm install
|
|
37
|
+
npm test
|
|
38
|
+
|
|
39
|
+
npm run koyu -- check examples/two-rooms.muro # consistency check
|
|
40
|
+
npm run koyu -- plan examples/two-rooms.muro -o out/two-rooms.svg
|
|
41
|
+
npm run koyu -- doors examples/two-rooms.muro /L1/a /out # → 2 doors
|
|
42
|
+
npm run koyu -- graph examples/two-rooms.muro # the space graph
|
|
43
|
+
npm run koyu -- stats examples/two-rooms.muro # areas (centerline)
|
|
44
|
+
npm run koyu -- json examples/two-rooms.muro # canonical JSON (machine form)
|
|
45
|
+
|
|
46
|
+
npm run koyu -- plan examples/office.muro -l L2 # per-level plans
|
|
47
|
+
npm run koyu -- levels examples/office.muro # a textual section (height stack-up)
|
|
48
|
+
npm run koyu -- doors examples/office.muro /L2/office /out # → 4 doors (via the stair)
|
|
49
|
+
npm run koyu -- stats examples/mansion.muro # areas, zone rollups, efficiency ratio
|
|
50
|
+
npm run koyu -- light examples/mansion.muro # rough 1/7 daylight check
|
|
51
|
+
npm run koyu -- site examples/house.muro # site area, frontage, coverage, FAR
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Layout
|
|
55
|
+
|
|
56
|
+
The notation spec and side-by-side comparisons are in [spec/notation-v0.md](spec/notation-v0.md); the contract for attributes is [spec/vocabulary.md](spec/vocabulary.md); coverage against the IFC4 architectural core is [docs/ifc-coverage.md](docs/ifc-coverage.md); design decisions are recorded in [docs/decisions/](docs/decisions/); the roadmap is [docs/roadmap.md](docs/roadmap.md); daily logs are in [docs/log/](docs/log/). The implementation is ~900 lines in src/ (parser, graph, checks, plan generation, CLI), tests in test/. Reading notes on IFCX are in [docs/ifcx-notes.md](docs/ifcx-notes.md); the same two-rooms-one-door written three ways (this notation, IFC4, IFCX) is in [examples/comparison/](examples/comparison/README.md).
|
|
57
|
+
|
|
58
|
+
## Technical stance
|
|
59
|
+
|
|
60
|
+
TypeScript, zero runtime dependencies. When BIM/IFC tooling is needed, ThatOpen's OSS (web-ifc, @thatopen/components) is used. IFC_samples/ is a sample corpus for one-way IFC import (M5) and is kept out of git (third-party files; not redistributed).
|
|
61
|
+
|
|
62
|
+
This is an exploration. It is not aimed at commercialization; it builds no authoring tool, abandons round-trip compatibility, and restricts itself to orthogonal grids.
|
|
63
|
+
|
|
64
|
+
## The name
|
|
65
|
+
|
|
66
|
+
戸牖 (*koyu*) means doors and windows — openings. Laozi, chapter 11: cut doors and windows to make a room; it is the emptiness — the space — that makes the room useful, not the walls. For a notation in which space is primary, walls are relations, and openings are connections cut into boundaries, this is the oldest source there is. The homophone 固有 (*koyu*, "proper / intrinsic") is also intended: every space is addressed by a human-readable proper name, its hierarchical path.
|
|
67
|
+
|
|
68
|
+
The file extension is `.muro` (室, *muro* — room). The unit a file holds is not a building component but a room.
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
Code (src/, test/, examples/, …) is under the [Apache License 2.0](LICENSE). Documents (docs/, spec/, and the essay "[建築を書く / Writing Architecture](docs/writing-architecture.md)") are under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Citation metadata is in [CITATION.cff](CITATION.cff).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ADR-0001: 記法v0 — 空間一次のDSLと正準JSON
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-22 / 状態: 採用 (素振り段階の決定。M1で再訪してよいが、覆すときはこの文書を更新する)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
原稿 (docs/writing-architecture.md) の最初の一手として、二つの室とその間の扉一つだけを自分の記法で書いた。原稿が予告したとおり、この数十行を書くには「空間の同一性をどう与えるか」「境界をどちらの空間に属させるか」「接続をどう表すか」「パスをどう切るか」を決めざるを得ず、記法はここで生まれた。
|
|
8
|
+
|
|
9
|
+
## 決定
|
|
10
|
+
|
|
11
|
+
**1. 空間の同一性は人間可読の階層パスに与える。** `/L1/a` がその空間の名であり同一性である。UUIDは持たない。LLMが一つのコンテキストで読み切り部分編集できること、diffが構成の言葉で読めることを、機械的な同一性の頑健さより優先する。改名は履歴上の出来事としてgitに残る。IFCのGUIDなど外部の同一性が必要になったら `id:` 属性を載せるレイヤーとして後置する。
|
|
12
|
+
|
|
13
|
+
**2. 境界はどちらの空間にも属させない。** `boundary` は二つの空間パスを結ぶ第一級の関係であり、壁とはこの関係に乗る属性 (厚み・仕様・耐火・遮音) である。壁をどちらかの室の所有物にすると、反対側の室から見た記述が二重になるか非対称になる。関係として持てば、グラフの辺がそのまま得られる。
|
|
14
|
+
|
|
15
|
+
**3. 接続は境界上の開口として表す。** `door` / `window` は境界の字下げ行に書く。垂れ壁のない開放的な分節は `type:open` の境界とし、扉ゼロで通行できる。これにより「一体空間の中の分節」(リビングとダイニングなど) が、壁のある境界と同じ語彙で書ける。
|
|
16
|
+
|
|
17
|
+
**4. パスは /レベル/空間 で切る。** パスの先頭セグメントがレベル名ならその階に属する。外部のようにレベルに属さない空間はサイト直下 (`/out`) に置く。粒度 (室の下位のゾーン、室の上位の住戸) はパスの階層で表せる見込みだが、M1まで判断を保留する。
|
|
18
|
+
|
|
19
|
+
**5. author形式は独自DSL、機械形式は正準JSONの二層構成。** 人とLLMが読み書きする原本は一行一文のDSL。合成 (レイヤー重ね)・diffの土台・外部ツール接続は `koyu json` が吐く正準JSONで行う。書き比べと評価は spec/notation-v0.md にある。
|
|
20
|
+
|
|
21
|
+
**6. 形は生成物。** 壁芯線分は空間の割付から導出され、ソースには書かれない。壁厚は芯振り分け、面積は壁芯算定。「壁を置く」操作はこのデータのどこにも存在しない。
|
|
22
|
+
|
|
23
|
+
## 代替案
|
|
24
|
+
|
|
25
|
+
UUID主キー (IFCXの選択) は可読性とLLM編集性を損なうため退けた。壁を物として持つこと (BIMの選択) は記述対象の取り替えという主題そのものの放棄になる。YAMLをauthor形式にする案は、DSLの密度とJSONの機械性の中間にあって決め手を欠いた。
|
|
26
|
+
|
|
27
|
+
## 帰結と代償
|
|
28
|
+
|
|
29
|
+
DSLはエディタ支援が無く文法の保守が要る。文法を「一行一文 + key:value + 字下げ開口」から増やさないことで抑える。v0の領域は矩形ひとつでありL字型の室が書けない — M1の一フロアで必ずぶつかるので、そこで多角形または複数矩形を決める。開き勝手は記述せず「先に書いた空間側へ開く」という描画規約に逃げた — 建具語彙とともに再訪する。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ADR-0002: 高さ方向の一貫性と、通り芯からのオフセット
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.1)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
一フロアを超えて複数レベルを書くと、BIMが「3Dであること」によって暗黙に担保していた課題が表に出る。壁や床が幾何として存在すれば、階高と天井高とスラブの関係は形の整合として自然に成立し、食い込みは目に見える。空間一次のテキストにはその暗黙の担保が無い。どう置き換えるかを決める必要があった。
|
|
8
|
+
|
|
9
|
+
あわせて位置づけをはっきりさせる。**このデータの解像度は計画初期 — 基本計画レベル — である。** 垂れ壁や建具詳細は表現しない。それは省略ではなく抽象度の選択であり、まさにこの解像度に対して既存BIMは重すぎた (計画初期にBIMが使われない最大の理由)。目指す使い勝手の参照点はVectorworks的な軽さで、ただし原本は図形ではなく構成である。
|
|
10
|
+
|
|
11
|
+
## 決定
|
|
12
|
+
|
|
13
|
+
**1. 暗黙の3Dを、宣言された不変量と検査に置き換える。** レベルが `z` (FL高さ)・`h` (基準天井高)・`slab` (その階の床組み厚 = 下階天井面から自階FLまで: スラブ+懐+仕上) を宣言し、check が不変量「下階空間の天井高 + 上階slab ≤ 階高」を検査する。超えれば食い込みエラー。等号でなく不等号にしたのは、天井懐に余りのある設計 (下がり天井) が正当だからで、余り寸法は `levels` コマンド — テキストの矩計 — が見える化する。
|
|
14
|
+
|
|
15
|
+
**2. 床は書かない。** 垂直の隣接は平面の重なりと隣接レベルから導出され、境界の既定は床 (slab) である。書くのは例外 — 床が繋がる場所 — だけ: `type:stair` (階段、扉0枚で通行可)、`type:shaft` (EV等、空間として連続するが人は通れない)。将来の吹抜けは `type:void` (床が無い=ひとつの空間が階をまたぐ) としてここに加わる予定。水平の境界は全宣言 (書かなければ警告) なのに対し垂直は既定+例外宣言と非対称なのは、水平の分節が設計判断そのものであるのに対し、床の存在は階という概念の既定だからである。
|
|
16
|
+
|
|
17
|
+
**3. 通り芯からのオフセットは `X2+600` と書く。** 座標を直接書く記法は採らない。芯からの寸法で語ることで通り芯の言語を保ったまま、芯に載らない壁 (コアの間仕切り、水回りのブース壁など) が書ける。
|
|
18
|
+
|
|
19
|
+
**4. EVシャフトを通行不可としたのは避難の問いに正直であるため。** `doors /L1/ev /L2/ev` は4枚 (階段迂回) と答える。エレベーターは避難経路ではない。
|
|
20
|
+
|
|
21
|
+
## 代替案
|
|
22
|
+
|
|
23
|
+
三次元を生成して幾何干渉で検査する案は、検査が生成物の側に移り、エラーが構成の言葉 (「食い込む」) ではなく形の言葉 (メッシュ交差) になるため退けた。原本の検査は原本の言語で行う。空間ごとに床レベル・天井レベルを書く案は冗長で、既定 (レベルの宣言) + 例外 (h属性) で足りる。slabを境界ごとに書く案は、9割が同じ値の反復になりノイズになる。
|
|
24
|
+
|
|
25
|
+
## 帰結と代償
|
|
26
|
+
|
|
27
|
+
段差床・スキップフロアはレベルを増やして書くことになる (中2階 = 別レベル)。メゾネットと吹抜けは type:void の設計と同時に再訪する。構面の通層 (上下階で壁が揃っているか) はまだ検査していない — 揃っていない構成も計画としては正当なため、警告ではなく問い (クエリ) として提供するのが筋だろう。斜め壁は直交からの最初の逸脱として、多角形領域と同時に設計する。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ADR-0003: 数える分節と数えない分節
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.1)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
同じ室の中で床材が変わる。同じ境界なのに途中から壁材が変わる。これをどう書くか。最初の案は「仕様が変わるところには分節が潜んでいる — 空間を割れ」だったが、これは要求に合わないと判明した。**室は面積計算の単位である。** 執務室は執務室として一室で扱いたい。採光・排煙・収容人員・貸室面積 — 面積にまつわる計算はすべて室を単位に走る。土間があるからといってホールが二室になってはならない。
|
|
8
|
+
|
|
9
|
+
## 決定
|
|
10
|
+
|
|
11
|
+
**分節には二種類ある、と認める。数える分節と、数えない分節である。**
|
|
12
|
+
|
|
13
|
+
数える分節は室と境界だ。面積表に一行として載り、室数に数えられ、グラフの節点と辺になる。垂れ壁のない分節でも、面積や動線の上で別の単位なら `type:open` の境界で割る — これは今まで通り。
|
|
14
|
+
|
|
15
|
+
数えない分節は、室に従属する領域 (`area`) と、境界に従属する区間 (`seg`) である。字下げで親に付き、属性の上書きだけを運ぶ:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
space /L1/hall hall X1..X2 Y1..Y2 name:エントランスホール floor:フローリング
|
|
19
|
+
area X1..X1+1800 Y1..Y2 name:土間 floor:モルタル
|
|
20
|
+
|
|
21
|
+
boundary /L1/office /L1/corridor t:120 spec:LGS
|
|
22
|
+
door w:900
|
|
23
|
+
seg at:0.75 w:3600 spec:ガラスパーティション
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**隔離則: 数えない分節は、面積・室数・グラフに一切影響しない。** ホールは土間があっても40.96㎡の一室であり、doorsの答えも隣接も変わらない。これはテストで恒久的に保証する (test/uncounted.test.ts)。segの位置は開口と同じ流儀 (at, w, edge) をとる。
|
|
27
|
+
|
|
28
|
+
使い分けのリトマス試験は二つ。**「面積表に一行として現れてほしいか?」** — 欲しければ space、要らなければ area。**「そこを通れるかが問題になるか?」** — なるなら boundary/opening、ならないなら seg。
|
|
29
|
+
|
|
30
|
+
## 代替案
|
|
31
|
+
|
|
32
|
+
空間を割ってパス階層で束ねる案 (/L1/hall/doma + /L1/hall/main) は、室の同一性と面積単位を壊すため退けた。割る操作はこのデータでは安いが、安いからといって単位が変わってよいことにはならない。属性値を領域つきの複合値にする案 (floor: [{rect, material}]) は、同じ内容の形式化が弱いだけの版である。実施設計まで先送りする案 (基本計画と割り切って捨てる) は、土間や延焼ラインの仕様変化のように基本計画レベルで意味を持つ例がある以上、粗すぎる。
|
|
33
|
+
|
|
34
|
+
## 帰結と代償
|
|
35
|
+
|
|
36
|
+
物の記述への滑り戻りを防ぐ防波堤が「幾何を持たせない」から「**構成に影響させない (隔離則)**」に移った。area/segは幾何 (範囲) を持つ — だが構成 (グラフ・面積・室数) からは見えない。この線は今後も試される: areaに面積の内訳を答えさせたくなったら (仕上げ数量など)、それは構成の問いではなく生成物の問いとして実装する。境界の仕様が変わる場所の多くは実際には向こう側の分節 (廊下の相手が受付から執務に変わる等) や外部の分節 (延焼ライン → /outを割る) であり、segはその残余のための最後の道具である — 迷ったらまず「向こう側に分節が潜んでいないか」を疑うのが正しい順序。areaの重なりは現状未定義 (警告もしない)。必要が出たらレイヤー的な later-wins を明文化する。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ADR-0004: 基準階は一度だけ書く — レベル範囲・スパン展開・stack
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.2)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
10階建ての集合住宅を書くと、反復が初めて現れる。2〜9Fの基準階は同じ割付であり、8回複製すれば書けるが、それは設計基準「LLMが一つのコンテキストで読み切り、正しく部分編集できるか」を壊す。基準階の一つの変更が8箇所の編集になり、diffは8倍に膨れ、「この住戸が広がった」という一言で読めなくなる。原本に複製を持たないことは、テキストであることと同じくらい本質的だった。
|
|
8
|
+
|
|
9
|
+
## 決定
|
|
10
|
+
|
|
11
|
+
三つの機構を足す。**レベルの等差宣言** `level L3..L9 6700 pitch:2900 h:2400 slab:500` は7つのレベルを一度に宣言する。**パスのスパン展開** `/L2..L9/A` は、宣言済みレベルのz順の並びとして解決され、その行が各レベルへ展開される — 一行の中の複数パスは同じスパンでなければならず、同じ階に揃って展開される (`boundary /L2..L9/A /L2..L9/corridor` はA|廊下を8フロアぶん張る)。字下げの開口・area・segも展開先の全てに付く。**stack宣言** `stack ev L1..L10 type:shaft` は垂直に積層する空間列を宣言し、連続するレベル対に垂直境界を張る。
|
|
12
|
+
|
|
13
|
+
DSLは「基準階は一つ」という意図を保持し、機械形式 (正準JSON) は展開後を持つ。原本のdiffは基準階の一行の変更として読める — 159行の原本が90空間・244境界に展開される集合住宅で、界壁の仕様変更は1行のdiffである。
|
|
14
|
+
|
|
15
|
+
## 代替案
|
|
16
|
+
|
|
17
|
+
8回書く案は上記の通り編集の局所性を壊す。composition (レイヤー参照) で基準階レイヤーを8回重ねる案は、OpenUSD/IFCXの流儀に忠実で機械形式側の将来実装とも整合するが、DSLの一読性を今失う理由がない。スパン展開はcompositionの前借りであり、正準JSON側で参照レイヤーに正規化する道は塞いでいない。
|
|
18
|
+
|
|
19
|
+
## 帰結と代償
|
|
20
|
+
|
|
21
|
+
**例外階がまだ書けない。** 8Fだけ間取りが違う、5Fに吹抜けが抜ける — スパンから特定階を除く記法 (except) か、展開後への上書きが要る。これは吹抜け (`type:void` — 基準階の床が一部抜ける) と同根の問題であり、同時に設計する。スパンはパスのレベル段 (先頭セグメント) にしか使えず、連番のみ。stackの端点レベルは宣言済みである必要がある (levelを先に書く)。
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ADR-0005: 間取りの粒度 — ゾーンとL字の合併
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.3)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
住戸の中の間取りを書くと、粒度の二層性が本格化する。住戸は面積計算・分譲・管理の単位であり続けたいが、間取りを書けば室が一次要素になる。両方が同時に「数える単位」でありたい。あわせて、L字のLDKのような非矩形の室が初めて必要になった。
|
|
8
|
+
|
|
9
|
+
## 決定
|
|
10
|
+
|
|
11
|
+
**1. ゾーン = 数える集約。** `zone /L2..L9/A name:Aタイプ use:exclusive` は幾何を持たない宣言で、パス接頭辞で室を束ねる。ゾーンの面積は配下の室の合計として導出され (壁芯で室が住戸を敷き詰めるので住戸壁芯面積に一致する)、`use` などの属性は配下の室へ継承される (室自身の宣言が勝つ)。空間の階層パスがそのまま集計の階層になる — 「共用と専有の面積比」は住戸を間取りに割った後も1行も変えずに答えられる。
|
|
12
|
+
|
|
13
|
+
**2. 粒度は混在してよい。** 集合住宅の例ではAタイプだけを間取りまで書き、B〜Eは住戸一室のまま。基本計画の進行に合わせて、詳細化した住戸から順に割っていける。ゾーンがあるから、割っても集計の言葉 (Aタイプ 34.8㎡) は壊れない。
|
|
14
|
+
|
|
15
|
+
**3. L字は矩形の合併。** 領域は `+` で複数書ける: `space .../ldk ldk X1+2600..X2 Y1..Y2-1800 + X1..X1+2600 Y1..Y1+1400`。面積は合計、壁は合併の外周と共有辺から導出され、共線の外周は一本にマージされる (掃き出し窓が2矩形をまたぐS面に普通に置ける)。同一ペアがL字で2辺接する場合 (LDK|洋室)、扉は `edge:` で辺を選ぶ。
|
|
16
|
+
|
|
17
|
+
## 代替案
|
|
18
|
+
|
|
19
|
+
住戸を空間のままにして間取りをarea (数えない分節) で書く案は、室が通行と面積の単位である以上不可 (寝室の扉が書けない)。多角形を直接書く案は、直交グリッドの言語 (通り芯とオフセット) を捨てて頂点列に落ちるため退けた — 矩形の合併は骨格の言葉を保ったまま同じ形状クラスを覆う。
|
|
20
|
+
|
|
21
|
+
## 帰結と代償
|
|
22
|
+
|
|
23
|
+
矩形合併は直交形状しか作れない (これは方針: 曲線・斜めは対象外)。合併の矩形同士の重なりはエラーとし、面積の二重算入を防ぐ。ゾーンの入れ子 (棟>住戸>室) はパス上は自然に書けるが、集計の重複規則はまだ決めていない。
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ADR-0006: 吹抜け — 床の不在も境界で書く。採光は最初の法規クエリ
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.3)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
吹抜けは空間一次のモデルにとって試金石だった。物のモデルなら「床スラブに穴を開ける」操作だが、ここには床がそもそも書かれていない (levelのslabが既定)。書かれていないものの不在をどう書くか。
|
|
8
|
+
|
|
9
|
+
## 決定
|
|
10
|
+
|
|
11
|
+
**1. 吹抜けは垂直境界 `type:void` で書く。** 上階に `type:void` の空間 (吹抜けの領域) を置き、下階の空間と `boundary /L1/hall /L2/void type:void` で結ぶ。床は既定・接続 (stair) は例外・不在 (void) も例外、という同じ文法に収まる。
|
|
12
|
+
|
|
13
|
+
**2. void境界は高さ不変量の宣言的な免除である。** 下階の空間は `h:6700` のように階をまたぐ天井高を宣言でき、通常なら「上階に食い込む」エラーになるところを、void境界が免除する。免除は暗黙ではなく宣言 — void境界を消せばエラーが戻る (テストで保証)。BIMが幾何の穴で暗黙に表現するものを、ここでは「不在の宣言とその帰結の検査」で持つ。
|
|
14
|
+
|
|
15
|
+
**3. voidの空間は数えない・通れない。** 床面積に算入せず (吹抜けは床面積不算入 — 法規と一致)、通行不可 (落ちないため)。平面図では作図慣習どおり破線の対角線で描く。
|
|
16
|
+
|
|
17
|
+
**4. 例外階は新しい記法なしで書ける。** 「8Fだけ違う」はスパンを割ればよい: `/L2..L7/` と `/L9..L9/`… ではなく `/L2..L7/A` の行と L8 個別の行に分ける。展開の機構がそのまま例外を許す。専用の except 糖衣は、実例が要求するまで足さない。
|
|
18
|
+
|
|
19
|
+
**5. 採光は `light` コマンド — 法規検証の芽の第一号。** 住居系の居室 (unit/room/ldk/bedroom/living) について窓面積/床面積 ≥ 1/7 を判定する。採光補正係数を掛けない甘い早期警報であり、基本計画の解像度に合わせた割り切りを明記する。実際、54㎡のEタイプが1面の掃き出し窓では1/7に足りないことをこの検査が指摘し、東面の窓が足された — 構成の記述から法規の帰結が「何もせず」出てくる最初の実例。
|
|
20
|
+
|
|
21
|
+
## 代替案
|
|
22
|
+
|
|
23
|
+
吹抜けを「下階の空間が上のレベルにもrectを持つ」多層空間として書く案は、空間とレベルの1対1対応 (パス=/レベル/名前) を壊す。スラブを明示的に書いて穴を開ける案は、物の記述への回帰。メゾネット (住戸内階段で2層) は多層空間の方が素直かもしれず、void+stairの組で書けるかを次に試す。
|
|
24
|
+
|
|
25
|
+
## 帰結と代償
|
|
26
|
+
|
|
27
|
+
採光の補正係数・隣地距離・開口の方位は扱っていない — /outの分節 (道路側・隣地側) が入った時に精度を上げる。
|
|
28
|
+
|
|
29
|
+
## 追記 (同日夜): 部分吹抜けの規則
|
|
30
|
+
|
|
31
|
+
部分吹抜けを正式に定義した。**下階の空間の天井高は階高内に収めたまま、吹抜け部分の高さは導出とする** — 天井高が一様である前提と衝突しない。void境界による高さ不変量の免除は「吹抜けが下階空間の平面を全て覆う場合 (被覆率≥99%)」に限り、部分吹抜けで階をまたぐ天井高を宣言するとcheckが被覆率つきでエラーにする (examples/house.muro のLDK上部が実例、被覆1/3)。下階の平面図には吹抜け範囲を破線+「上部吹抜け」で表示する (作図慣習)。バルコニー越し採光の0.7掛けもこの日に追加 (ADR-0007)。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ADR-0007: 半屋外は導出する — 遮蔽性はair属性、kindにrailを入れない
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.4)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
屋外階段が平面図で屋外に見えない、という指摘から始まった。原因は描画ではなくデータにある: 手すりを `spec:手すり壁` のwallとして書いており、「囲う壁」と「囲わない手すり」の区別をデータが持っていなかった。仕様が書かれていないものは描き分けられない。
|
|
8
|
+
|
|
9
|
+
最初の実装案は境界kindに `rail` を足すことだった。これは途中で棄却した — **IFCを参照すると、IfcRailingは要素クラスであり、空間境界の関係 (IfcRelSpaceBoundary) が言うのは Physical/Virtual と Internal/External だけである。** kindに物の名を入れ始めると、明日は curtainwall、fence、hedge… と増殖し、退けたはずのクラス階層を関係の側で再発明することになる。
|
|
10
|
+
|
|
11
|
+
## 決定
|
|
12
|
+
|
|
13
|
+
**1. kindは関係のトポロジーだけ (wall/open + 垂直)。物の名はspec語彙。** 手すりは `boundary A /out t:120 spec:手すり air:1` — wallである (扉がないから通れないのはwallの既定)。specは自由語彙でツールは解釈しない。
|
|
14
|
+
|
|
15
|
+
**2. 解釈される性質は `air:1` (遮蔽しない) の一語だけ足す。** 通行可能性はkindが言い、遮蔽性はairが言う。直交する二軸を混ぜない。
|
|
16
|
+
|
|
17
|
+
**3. 半屋外は宣言ではなく導出する。** 外部 (type:exterior) に対して open または air:1 の境界を持つ空間が半屋外である。バルコニー・屋外階段・ルーフテラスは、手すりを正しく書けば自動的に半屋外になる。
|
|
18
|
+
|
|
19
|
+
**4. 導出の帰結。** statsでは半屋外を床面積合計から別掲し (算入条件は法規細部のため)、ゾーン面積 (専有面積) からも除く。lightは半屋外越しの窓を0.7掛け (縁側補正に倣う粗い値)。平面図ではair境界を細実線で描く — 壁の黒帯と描き分けることで、囲われていないことが図から読める。「仕様かデザインか」への答え: データが仕様を持ち、描画はそれに従う。
|
|
20
|
+
|
|
21
|
+
## 代替案
|
|
22
|
+
|
|
23
|
+
kindにrailを足す案 (上述、実装後に棄却)。空間に `outdoor:1` を宣言する案は、境界を正しく書けば導出できる情報の二重宣言であり、矛盾の置き場になる。
|
|
24
|
+
|
|
25
|
+
## 帰結と代償
|
|
26
|
+
|
|
27
|
+
airは遮蔽の有無だけを言う二値で、開放率 (欄干の透過度) や防風・防雨の程度は持たない — 基本計画の解像度。屋根の有無 (半屋外のうち庇下か吹きさらしか) は未分節で、日影・斜線を扱う時に再訪する。
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ADR-0008: 語彙の台帳と、パス=集計の階層
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.4)
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
開き勝手をどう書くかという問いは、掘ると「要素ごとの属性の付け方をどうルール化するか」という問いだった。属性が場当たりに増えると、同じ意味に別の語が使われ、どれをツールが解釈するのか分からなくなる — 開かれた語彙の「開き方」に規則が要る。あわせてメゾネット (階を跨ぐ住戸) がゾーンのパス接頭辞と衝突する問題があった。
|
|
8
|
+
|
|
9
|
+
## 決定
|
|
10
|
+
|
|
11
|
+
**1. 語彙の台帳 (spec/vocabulary.md) を契約とする。** 規則は五つ: kindは関係のトポロジーだけ / 物の名はspec語彙 (ツールは解釈しない) / 解釈される属性は台帳に載せ、変えるときはADRを書く / 単位はmm・位置は0..1・キーは小文字英字 / 継承と上書きの規則 (use: zone→space、floor: space→area、spec: boundary→seg) を明文化する。自由な k:v はいつでも書けるが、意味が定まったら台帳に追記して育てる。台帳は一つ。
|
|
12
|
+
|
|
13
|
+
**2. 開き勝手は解釈される属性の実例として `hinge` と `swing` で書く。** `hinge:W/E` (水平線分) / `hinge:N/S` (垂直線分) が吊元、`swing:a/b` が開く側 (境界のどちらの空間へ)。既定は始端側・a側で、書かなければ今まで通り。checkが線分の向きとhingeの軸の整合を検査し、平面図が従う。
|
|
14
|
+
|
|
15
|
+
**3. パスの第一義は集計の階層である。** レベルは既定でパス先頭セグメントから読むが、階を跨ぐくくり (メゾネット住戸・吹抜けを含む一体空間の親) は `level:` 属性で階を明示し、パスは所属 (どの住戸か) を言う。`zone /home` の下に `space /home/ldk ... level:L1` と `space /home/bed1 ... level:L2` が並び、住戸=ゾーンが階を跨いで束ねられる (examples/house.muro)。
|
|
16
|
+
|
|
17
|
+
## 代替案
|
|
18
|
+
|
|
19
|
+
開き勝手を `door-l` / `door-r` のような開口kindの増殖で書く案は、ADR-0007と同じ理由で退けた (kindはトポロジー、性質は属性)。メゾネットのために「多層空間」(一つのspaceが複数レベルにrectを持つ) を導入する案は、空間とレベルの対応を壊し、高さ検査と平面図の前提を複雑にする — ゾーンが既に「束ねる」道具なので、束ねる側で解くのが筋。
|
|
20
|
+
|
|
21
|
+
## 帰結と代償
|
|
22
|
+
|
|
23
|
+
台帳の規律は自己申告であり、CIは未知の属性を警告しない (自由語彙を守るため)。将来、台帳との突き合わせを `check --strict` のような任意検査にすることはあり得る。hinge/swingは平面表現の語であり、建具表 (開き戸/引き戸/折れ戸の別) はまだ持たない — 実施へ向かう情報としてsegやレイヤーの側に置く選択肢を残す。
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ADR-0009: 敷地と外部の分節 — 外もまた空間である
|
|
2
|
+
|
|
3
|
+
日付: 2026-07-23 / 状態: 採用 (v0.5) / 対応Issue: MUN-149, MUN-150
|
|
4
|
+
|
|
5
|
+
## 文脈
|
|
6
|
+
|
|
7
|
+
/out は一枚岩の外部で、どの外部に面するかが言えなかった。延焼ライン (隣地側だけ仕様が変わる)、接道、屋外階段の「地上」の意味、いずれもこの分節を待っていた。IFCではIfcSite・IfcExternalSpatialElementにあたるが、敷地境界線そのものはIFCにも一次エンティティが無い — 空間一次が素直に勝てる場所である。
|
|
8
|
+
|
|
9
|
+
## 決定
|
|
10
|
+
|
|
11
|
+
**1. /out は複数のexterior空間に割れる。** `space /out/road exterior name:南側道路 road:6000` — 方角・性格ごとに割り、粒度は自由 (一枚岩のままでも良い — 既存例は無修正で有効)。道路は `road:幅員` の解釈属性で印す。上階の外壁は方角別のexteriorに `edge:` で面する。
|
|
12
|
+
|
|
13
|
+
**2. 地上の外部空間 (庭・通路) はL1上の実在の空間として建物の周りをタイルする。** 領域を持つので、建物との重なりはエラーとして検証され、室との境界線分は矩形同士から正確に導出される。GL/FLの段差はv0では無視 (測地・高さ基準はMUN-159で再訪)。「地上」の意味はこの空間たちが担う — 屋外階段や玄関はここへ開き、避難は庭を通って門扉から道路へ抜ける (「寝室から道路まで扉3枚」)。
|
|
14
|
+
|
|
15
|
+
**3. 敷地 = site:1 属性を持つゾーン。** `zone /site name:敷地 site:1 area:126.24` — 幾何を持たない集約という原則を保ちつつ、宣言面積 (測量値) を属性に持ち、`site` コマンドが導出面積 (敷地内空間+建物投影の合併) と突き合わせる。高さ不変量と同じ「宣言+検査」のパターン。
|
|
16
|
+
|
|
17
|
+
**4. 敷地の数字は導出する。** `site` コマンドが敷地面積 (宣言/導出の照合)・接道 (敷地空間と道路の境界線分長 — 建物外壁が道路に面する分は数えない)・建築面積 (屋内空間の水平投影の合併)・建蔽率・容積率を返す。基本計画のボリューム検討の数字が、構成を書けば出てくる。
|
|
18
|
+
|
|
19
|
+
**5. 塀・門扉は境界の語彙で書く。** 塀 = `t:120 spec:ブロック塀 air:1 h:1200` (物はspec、外気は遮らない)、門扉 = その境界の door。外構 (MUN-151) の語彙の入口。
|
|
20
|
+
|
|
21
|
+
**6. 庇下の導出。** 採光の半屋外係数0.7は「上に空間がある半屋外 (バルコニー下・庇下)」にだけ適用し、上が開いた半屋外 (庭・最上階バルコニー) は1.0とする。屋根の有無すら宣言ではなく、上階の空間の重なりから導出する。
|
|
22
|
+
|
|
23
|
+
## 代替案
|
|
24
|
+
|
|
25
|
+
敷地を専用の第4要素 (site) として幾何ごと導入する案は、空間・境界・ゾーンの三つ組で足りるのに要素を増やす。外部をレベルごとに割る案 (地上/2F上空/…) は無限の分節を招く — 地上性は敷地空間が、方角性は/outの分節が、それぞれ一度だけ担えば足りる。
|
|
26
|
+
|
|
27
|
+
## 帰結と代償
|
|
28
|
+
|
|
29
|
+
敷地空間のタイルは規律を要する (宣言/導出の照合が破れを警告する)。建築面積の算入 (庇・バルコニーの1m/2m規則) は粗いまま。延焼ラインの実計算は距離幾何が要るため未実装 — ただし「どの隣地に面するか」はこの分節で言えるようになった (足がかり完了)。傾斜地・GL段差は未対応。集合住宅の例の/out分節への移行は必要になった時に行う (一枚岩の/outも引き続き有効)。
|