@kensnzk/koyu 0.5.0 → 0.11.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/README.ja.md +43 -11
- package/README.md +51 -11
- package/dist/check.d.ts +34 -0
- package/dist/check.d.ts.map +1 -0
- package/dist/check.js +500 -0
- package/dist/check.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +319 -0
- package/dist/cli.js.map +1 -0
- package/dist/diff.d.ts +90 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +522 -0
- package/dist/diff.js.map +1 -0
- package/dist/graph.d.ts +81 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +328 -0
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/light.d.ts +15 -0
- package/dist/light.d.ts.map +1 -0
- package/dist/light.js +55 -0
- package/dist/light.js.map +1 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +354 -0
- package/dist/mcp.js.map +1 -0
- package/dist/model.d.ts +264 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +361 -0
- package/dist/model.js.map +1 -0
- package/dist/parse-file.d.ts +9 -0
- package/dist/parse-file.d.ts.map +1 -0
- package/dist/parse-file.js +22 -0
- package/dist/parse-file.js.map +1 -0
- package/dist/parse.d.ts +16 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +922 -0
- package/dist/parse.js.map +1 -0
- package/dist/plan.d.ts +8 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +267 -0
- package/dist/plan.js.map +1 -0
- package/dist/site.d.ts +24 -0
- package/dist/site.d.ts.map +1 -0
- package/dist/site.js +53 -0
- package/dist/site.js.map +1 -0
- package/examples/comparison/README.md +16 -1
- package/examples/comparison/gen-ifc4.ts +1 -1
- package/examples/comparison/gen-ifcx.ts +2 -2
- package/examples/comparison/two-rooms.ifcx +1 -1
- package/examples/house/L1.muro +16 -0
- package/examples/house/L2.muro +19 -0
- package/examples/house/assets.muro +9 -0
- package/examples/house/main.muro +27 -0
- package/examples/house/site.muro +31 -0
- package/examples/house.muro +1 -1
- package/examples/mansion.muro +1 -1
- package/examples/office.muro +1 -1
- package/examples/steps/01-one-room.muro +4 -0
- package/examples/steps/02-two-rooms.muro +5 -0
- package/examples/steps/03-door.muro +9 -0
- package/examples/steps/04-exterior.muro +15 -0
- package/examples/steps/05-two-storeys.muro +27 -0
- package/examples/steps/06-finished.muro +30 -0
- package/examples/steps/README.md +25 -0
- package/examples/tower/L1.muro +80 -0
- package/examples/tower/L11.muro +47 -0
- package/examples/tower/L2.muro +69 -0
- package/examples/tower/L3.muro +28 -0
- package/examples/tower/assets.muro +13 -0
- package/examples/tower/main.muro +37 -0
- package/examples/tower/site-geometry.muro +7 -0
- package/examples/tower/site.muro +33 -0
- package/examples/tower/typical.muro +124 -0
- package/examples/two-rooms.canonical.json +5 -2
- package/examples/two-rooms.muro +6 -5
- package/package.json +28 -2
- package/src/check.ts +352 -63
- package/src/cli.ts +76 -11
- package/src/diff.ts +608 -0
- package/src/graph.ts +90 -10
- package/src/index.ts +14 -2
- package/src/mcp.ts +390 -0
- package/src/model.ts +260 -55
- package/src/parse-file.ts +28 -0
- package/src/parse.ts +562 -44
- package/src/plan.ts +33 -4
- package/src/site.ts +13 -5
- package/.github/workflows/ci.yml +0 -16
- package/.zenodo.json +0 -20
- package/CITATION.cff +0 -26
- package/docs/decisions/0001-notation-v0.md +0 -29
- package/docs/decisions/0002-height-and-offsets.md +0 -27
- package/docs/decisions/0003-uncounted-divisions.md +0 -36
- package/docs/decisions/0004-typical-floors.md +0 -21
- package/docs/decisions/0005-zones-and-unions.md +0 -23
- package/docs/decisions/0006-voids-and-light.md +0 -31
- package/docs/decisions/0007-semi-outdoor-air.md +0 -27
- package/docs/decisions/0008-vocabulary-and-level-attr.md +0 -23
- package/docs/decisions/0009-site-and-exterior.md +0 -29
- package/docs/ifc-coverage.md +0 -82
- package/docs/ifcx-notes.md +0 -25
- package/docs/img/house-L1.svg +0 -80
- package/docs/img/house-L2.svg +0 -53
- package/docs/img/mansion-L1.svg +0 -113
- package/docs/img/mansion-L10.svg +0 -111
- package/docs/img/mansion-L5.svg +0 -160
- package/docs/img/office-L1.svg +0 -116
- package/docs/img/office-L2.svg +0 -109
- package/docs/img/two-rooms.svg +0 -39
- package/docs/log/2026-07-22.md +0 -13
- package/docs/log/2026-07-23.md +0 -51
- package/docs/roadmap.md +0 -55
- package/docs/writing-architecture.md +0 -119
- package/spec/notation-v0.md +0 -164
- package/spec/vocabulary.md +0 -62
- package/test/core.test.ts +0 -171
- package/test/design2.test.ts +0 -97
- package/test/house.test.ts +0 -74
- package/test/mansion.test.ts +0 -99
- package/test/office.test.ts +0 -71
- package/test/uncounted.test.ts +0 -120
- package/test/vertical.test.ts +0 -75
- package/tsconfig.json +0 -13
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# 基準階の層 — L3..L10の住戸とL3..L11のコアを「一度だけ」書く (ADR-0004)。
|
|
2
|
+
# 南列: A (間取りまで割る・L字LDK) / B (Aと噛み合うL字) / C。北列: D / E / F。
|
|
3
|
+
# バルコニーはL4..L10 (L3の南は低層部屋根のテラス — L3.muro が例外の差分を持つ)。
|
|
4
|
+
# Aだけ間取りに割り、ゾーンが専有面積の言葉を保つ (ADR-0005 — 粒度の混在)。
|
|
5
|
+
|
|
6
|
+
zone /L3..L10/A name:Aタイプ use:exclusive
|
|
7
|
+
|
|
8
|
+
space /L3..L10/A/ldk ldk X1+3200..X2+3200 Y1..Y1+4000 + X2+3200..X3 Y1..Y1+2400 name:LDK floor:オーク
|
|
9
|
+
# 帯 (ADR-0019): 位置ではなく寸法と並びを書き、位置は導出させる。
|
|
10
|
+
# 西列を南から (洋室2 2400 / 洋室1 3200)、玄関側の帯を西から (水回り 4800 / 玄関 1600)。
|
|
11
|
+
# どちらも「閉じた帯」— 合計が帯幅と一致することを parse が照合する (寸法の打ち間違いの検算)。
|
|
12
|
+
band Y X1..X1+3200 Y1..Y2
|
|
13
|
+
space /L3..L10/A/bed2 bedroom w:2400 name:洋室2
|
|
14
|
+
space /L3..L10/A/bed1 bedroom w:3200 name:洋室1
|
|
15
|
+
|
|
16
|
+
band X X1+3200..X2+3200 Y1+4000..Y2
|
|
17
|
+
space /L3..L10/A/wet wet w:4800 name:水回り
|
|
18
|
+
space /L3..L10/A/hall hall w:1600 name:玄関
|
|
19
|
+
|
|
20
|
+
space /L3..L10/B unit X3..X4+3200 Y1..Y2 + X2+3200..X3 Y1+2400..Y2 name:Bタイプ use:exclusive
|
|
21
|
+
space /L3..L10/C unit X4+3200..X6 Y1..Y2 name:Cタイプ use:exclusive
|
|
22
|
+
space /L3..L10/D unit X1+3200..X2+3200 Y3..Y4 name:Dタイプ use:exclusive
|
|
23
|
+
space /L3..L10/E unit X2+3200..X4 Y3..Y4 name:Eタイプ use:exclusive
|
|
24
|
+
space /L3..L10/F unit X4+3200..X5+3200 Y3..Y4 name:Fタイプ use:exclusive
|
|
25
|
+
|
|
26
|
+
space /L3..L11/corridor corridor X1..X6 Y2..Y3 + X4..X4+3200 Y3..Y3+3200 name:内廊下 use:common
|
|
27
|
+
space /L3..L11/st2 stair X1..X1+3200 Y3..Y4 name:西階段 use:common
|
|
28
|
+
space /L3..L11/ev shaft X4..X4+3200 Y3+3200..Y4 name:EV use:common
|
|
29
|
+
space /L3..L11/st1 stair X5+3200..X6 Y3..Y4 name:東階段 use:common
|
|
30
|
+
|
|
31
|
+
space /L4..L10/bA balcony X1..X3 Y1-1500..Y1 name:バルコニーA
|
|
32
|
+
space /L4..L10/bB balcony X3..X4+3200 Y1-1500..Y1 name:バルコニーB
|
|
33
|
+
space /L4..L10/bC balcony X4+3200..X6 Y1-1500..Y1 name:バルコニーC
|
|
34
|
+
|
|
35
|
+
# ---- Aの間取り (内部) ----
|
|
36
|
+
boundary /L3..L10/A/ldk /L3..L10/A/bed1 t:120 spec:LGS
|
|
37
|
+
door SD1
|
|
38
|
+
boundary /L3..L10/A/ldk /L3..L10/A/bed2 t:120 spec:LGS
|
|
39
|
+
door SD1
|
|
40
|
+
boundary /L3..L10/A/ldk /L3..L10/A/hall t:120 spec:LGS
|
|
41
|
+
door SD1
|
|
42
|
+
boundary /L3..L10/A/ldk /L3..L10/A/wet t:120 spec:LGS
|
|
43
|
+
boundary /L3..L10/A/hall /L3..L10/A/wet t:120 spec:LGS
|
|
44
|
+
door w:700
|
|
45
|
+
boundary /L3..L10/A/bed1 /L3..L10/A/wet t:120 spec:LGS
|
|
46
|
+
boundary /L3..L10/A/bed1 /L3..L10/A/bed2 t:120 spec:LGS
|
|
47
|
+
|
|
48
|
+
# ---- 戸境 (RC) ----
|
|
49
|
+
boundary /L3..L10/A/ldk /L3..L10/B t:180 spec:戸境RC
|
|
50
|
+
boundary /L3..L10/A/hall /L3..L10/B t:180 spec:戸境RC
|
|
51
|
+
boundary /L3..L10/B /L3..L10/C t:180 spec:戸境RC
|
|
52
|
+
boundary /L3..L10/D /L3..L10/E t:180 spec:戸境RC
|
|
53
|
+
|
|
54
|
+
# ---- 住戸と内廊下 (玄関は明示位置) ----
|
|
55
|
+
boundary /L3..L10/A/hall /L3..L10/corridor t:180 spec:RC
|
|
56
|
+
door D1 name:A玄関
|
|
57
|
+
boundary /L3..L10/A/bed1 /L3..L10/corridor t:180 spec:RC
|
|
58
|
+
boundary /L3..L10/A/wet /L3..L10/corridor t:180 spec:RC
|
|
59
|
+
boundary /L3..L10/B /L3..L10/corridor t:180 spec:RC
|
|
60
|
+
door D1 at:X4 name:B玄関
|
|
61
|
+
boundary /L3..L10/C /L3..L10/corridor t:180 spec:RC
|
|
62
|
+
door D1 at:X5 name:C玄関
|
|
63
|
+
boundary /L3..L10/D /L3..L10/corridor t:180 spec:RC
|
|
64
|
+
door D1 name:D玄関
|
|
65
|
+
boundary /L3..L10/E /L3..L10/corridor t:180 spec:RC
|
|
66
|
+
door D1 edge:S at:X3+1600 name:E玄関
|
|
67
|
+
boundary /L3..L10/F /L3..L10/corridor t:180 spec:RC
|
|
68
|
+
door D1 edge:S at:X5 name:F玄関
|
|
69
|
+
|
|
70
|
+
# ---- コア回り ----
|
|
71
|
+
boundary /L3..L11/corridor /L3..L11/st2 t:200 spec:RC
|
|
72
|
+
door FD1 name:西階段防火戸
|
|
73
|
+
boundary /L3..L11/corridor /L3..L11/st1 t:200 spec:RC
|
|
74
|
+
door FD1 name:東階段防火戸
|
|
75
|
+
boundary /L3..L11/corridor /L3..L11/ev t:200 spec:RC
|
|
76
|
+
boundary /L3..L10/D /L3..L10/st2 t:180 spec:RC
|
|
77
|
+
boundary /L3..L10/E /L3..L10/ev t:180 spec:RC
|
|
78
|
+
boundary /L3..L10/F /L3..L10/ev t:180 spec:RC
|
|
79
|
+
boundary /L3..L10/F /L3..L10/st1 t:180 spec:RC
|
|
80
|
+
|
|
81
|
+
# ---- バルコニー (L4..L10): サッシは窓、外は手すり (air:1)、隣とは隔て板 ----
|
|
82
|
+
boundary /L4..L10/A/ldk /L4..L10/bA t:100 spec:サッシ
|
|
83
|
+
window W1 at:X2 name:掃き出し
|
|
84
|
+
window W3 at:X2+4800
|
|
85
|
+
boundary /L4..L10/A/bed2 /L4..L10/bA t:100 spec:サッシ
|
|
86
|
+
window W2
|
|
87
|
+
boundary /L4..L10/B /L4..L10/bB t:100 spec:サッシ
|
|
88
|
+
window W1 at:X3+1600
|
|
89
|
+
window W1 at:X4-1600
|
|
90
|
+
window W2 at:X4+800
|
|
91
|
+
boundary /L4..L10/C /L4..L10/bC t:100 spec:サッシ
|
|
92
|
+
window W1 at:X5
|
|
93
|
+
window W1 at:X5+3200
|
|
94
|
+
boundary /L4..L10/bA /L4..L10/bB t:60 spec:隔て板 air:1
|
|
95
|
+
boundary /L4..L10/bB /L4..L10/bC t:60 spec:隔て板 air:1
|
|
96
|
+
boundary /L4..L10/bA /out/road-s edge:S t:120 spec:手すり air:1 h:1200
|
|
97
|
+
boundary /L4..L10/bB /out/road-s edge:S t:120 spec:手すり air:1 h:1200
|
|
98
|
+
boundary /L4..L10/bC /out/road-s edge:S t:120 spec:手すり air:1 h:1200
|
|
99
|
+
boundary /L4..L10/bA /out/w edge:W t:120 spec:手すり air:1 h:1200
|
|
100
|
+
boundary /L4..L10/bC /out/road-e edge:E t:120 spec:手すり air:1 h:1200
|
|
101
|
+
|
|
102
|
+
# ---- 塔状部の外周 (L3..L10) ----
|
|
103
|
+
boundary /L3..L10/A/bed1 /out/w edge:W t:200 spec:RC
|
|
104
|
+
window W2
|
|
105
|
+
boundary /L3..L10/A/bed2 /out/w edge:W t:200 spec:RC
|
|
106
|
+
boundary /L3..L10/C /out/road-e edge:E t:200 spec:RC
|
|
107
|
+
window W2
|
|
108
|
+
boundary /L3..L10/D /out/n edge:N t:200 spec:RC
|
|
109
|
+
window W4
|
|
110
|
+
boundary /L3..L10/E /out/n edge:N t:200 spec:RC
|
|
111
|
+
window W4
|
|
112
|
+
boundary /L3..L10/F /out/n edge:N t:200 spec:RC
|
|
113
|
+
window W4
|
|
114
|
+
boundary /L3..L11/st2 /out/w edge:W t:200 spec:RC
|
|
115
|
+
window W2
|
|
116
|
+
boundary /L3..L11/st2 /out/n edge:N t:200 spec:RC
|
|
117
|
+
boundary /L3..L11/st1 /out/road-e edge:E t:200 spec:RC
|
|
118
|
+
window W2
|
|
119
|
+
boundary /L3..L11/st1 /out/n edge:N t:200 spec:RC
|
|
120
|
+
boundary /L3..L11/ev /out/n edge:N t:200 spec:RC
|
|
121
|
+
boundary /L3..L11/corridor /out/w edge:W t:200 spec:RC
|
|
122
|
+
window W2
|
|
123
|
+
boundary /L3..L11/corridor /out/road-e edge:E t:200 spec:RC
|
|
124
|
+
window W2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"koyu": "0.
|
|
3
|
-
"name": "
|
|
2
|
+
"koyu": "0.3",
|
|
3
|
+
"name": "二室",
|
|
4
4
|
"unit": "mm",
|
|
5
5
|
"grid": {
|
|
6
6
|
"X": [
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"/L1/a",
|
|
58
58
|
"/L1/b"
|
|
59
59
|
],
|
|
60
|
+
"a": "/L1/a",
|
|
60
61
|
"kind": "wall",
|
|
61
62
|
"t": 120,
|
|
62
63
|
"attrs": {
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
"/L1/a",
|
|
77
78
|
"/out"
|
|
78
79
|
],
|
|
80
|
+
"a": "/L1/a",
|
|
79
81
|
"kind": "wall",
|
|
80
82
|
"t": 150,
|
|
81
83
|
"attrs": {
|
|
@@ -88,6 +90,7 @@
|
|
|
88
90
|
"/L1/b",
|
|
89
91
|
"/out"
|
|
90
92
|
],
|
|
93
|
+
"a": "/L1/b",
|
|
91
94
|
"kind": "wall",
|
|
92
95
|
"t": 150,
|
|
93
96
|
"attrs": {
|
package/examples/two-rooms.muro
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# 二室 — 最小の例
|
|
2
|
+
# 室を二つ並べ、その間に扉を一枚、外へ出る扉を一枚。
|
|
3
|
+
# 室と室のあいだの壁は書かない — 接する空間の既定は壁である (ADR-0014)。
|
|
4
|
+
# 書いてあるのは、扉を吊るために宣言した境界と、外皮の境界だけ。
|
|
4
5
|
|
|
5
|
-
koyu 0.
|
|
6
|
-
name
|
|
6
|
+
koyu 0.3
|
|
7
|
+
name 二室
|
|
7
8
|
unit mm
|
|
8
9
|
|
|
9
10
|
grid X 0 3600 7200
|
package/package.json
CHANGED
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kensnzk/koyu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "空間を一次要素とするテキストネイティブ建築記述の探求 — writing architecture, not buildings",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./examples/*": "./examples/*",
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
"./node": {
|
|
16
|
+
"types": "./dist/parse-file.d.ts",
|
|
17
|
+
"default": "./dist/parse-file.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"bin": {
|
|
21
|
+
"koyu": "dist/cli.js",
|
|
22
|
+
"koyu-mcp": "dist/mcp.js"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"src",
|
|
27
|
+
"examples",
|
|
28
|
+
"NOTICE"
|
|
29
|
+
],
|
|
6
30
|
"scripts": {
|
|
7
31
|
"koyu": "tsx src/cli.ts",
|
|
32
|
+
"build": "tsc -p tsconfig.build.json",
|
|
33
|
+
"prepare": "npm run build",
|
|
8
34
|
"test": "node --import tsx --test test/*.test.ts",
|
|
9
35
|
"typecheck": "tsc --noEmit",
|
|
10
|
-
"check:examples": "tsx src/cli.ts check
|
|
36
|
+
"check:examples": "for f in examples/two-rooms.muro examples/office.muro examples/mansion.muro examples/house.muro examples/house/main.muro examples/tower/main.muro examples/steps/*.muro; do tsx src/cli.ts check $f || exit 1; done",
|
|
11
37
|
"plan:examples": "tsx src/cli.ts plan examples/two-rooms.muro -o out/two-rooms.svg"
|
|
12
38
|
},
|
|
13
39
|
"devDependencies": {
|