Graph-CADアプローチによる間取りグラフ→YAML変換パイプラインの実装 - #1
Open
4kk11 wants to merge 2 commits into
Open
Conversation
Plan to apply Graph-CAD's hierarchical graph intermediate representation approach to archilang's Tier 3 (LLM integration). Defines a 4-phase strategy: graph schema, graph-to-yaml engine, LLM prompt design, and evaluation framework. https://claude.ai/code/session_017rppwCngGYq9Q2C9Hqypbm
Add intermediate graph representation for LLM-based floor plan generation, inspired by Graph-CAD (ICLR 2026). The pipeline converts a FloorplanGraph JSON (rooms, connections, constraints) into valid archilang YAML. New modules: - src/graph/types.ts: FloorplanGraph schema (zones, rooms, connections, constraints) - src/graph/room-sizer.ts: tatami → grid size conversion - src/graph/zone-placer.ts: zone ordering with cross-band connection awareness - src/graph/grid-packer.ts: 2-row constraint-based rectangle packing - src/graph/opening-placer.ts: connection edges → openings/equipment specs - src/graph/graph-to-yaml.ts: main conversion pipeline + YAML serializer CLI: - `generate` command: graph.json → YAML → validate → render - `generate --prompt`: outputs LLM prompt template for graph generation - `generate --render`: also produces SVG output Tests: 9 new tests (all 188 pass) https://claude.ai/code/session_017rppwCngGYq9Q2C9Hqypbm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Summary
docs/plan-graph-cad-integration.md— 4フェーズ計画(スキーマ定義→graph-to-yaml→LLMプロンプト→評価)src/graph/types.ts): ゾーン・部屋ノード・接続エッジ・配置制約の中間グラフ型定義room-sizer.ts: 畳数→グリッドサイズ変換zone-placer.ts: ゾーン帯の方位配置(帯間接続考慮のBFS順序付け)grid-packer.ts: 2行制約付き矩形パッキングopening-placer.ts: 接続エッジ→ドア/窓/設備の自動生成graph-to-yaml.ts: メインパイプライン + YAMLシリアライザgenerate): グラフJSON→YAML→validate→SVGgenerate --promptで表示