structure-map
Skill0 starsChanged 5 months agoMITView on GitHub
レガシーコードベースの構造・依存関係の可視化。エントリポイント特定、レイヤー分析、モジュール間依存、処理フローの追跡。「構造を可視化して」「どこから処理が始まるか調べて」のとき、または legacy-survey の Phase 2 として使う。実行前に survey-output/01-inventory.md があれば必ず読むこと。
1 other project uses a version of this.
Adopted by
Most recently taken up by
- aykyusuf/structure-maptheir own version, first seen Oct 27, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- aykyusuf/structure-map★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- db-migration-assessSkill
- legacy-surveySkill
- survey-reportSkill
- tech-inventorySkill
The file
Files
構造・依存関係の可視化
「このシステムはどこから始まり、どう流れ、どこで終わるか」を地図にする。
前提
survey-output/01-inventory.md があれば先に読む。フレームワークが分からないままエントリポイントを探すと誤る(Struts なら struts-config.xml、Spring MVC ならアノテーション、Servlet なら web.xml——探し方が全部違う)。
手順
1. エントリポイントの全数調査
種類別に漏れなく数え上げる(grep ベースで機械的に):
- オンライン: 画面/API のエントリ(フレームワーク設定 or アノテーションから抽出)
- バッチ: main メソッド保持クラス、ジョブ定義から呼ばれるシェル/クラス
- 非同期: MQ リスナー、スケジューラ(Quartz 等)、トリガー
各エントリポイントは「ID / 種類 / 定義場所 / 推定される業務機能名」の表にする。
2. レイヤー構造の判定
パッケージ構成と依存方向から、実際のアーキテクチャを判定する:
- 公称アーキテクチャ(パッケージ名が示す設計意図: controller/service/dao 等)
- 実態(レイヤー飛ばし・逆方向依存・神クラスの有無)
公称と実態のギャップこそが移行リスク。ギャップ箇所は具体的なクラス名で記録する。
3. 依存の可視化
- モジュール間依存を Mermaid のグラフで描く(循環依存は赤で強調)
- 「最も依存されているクラス」上位10(= 触ると影響が大きい箇所)
- 共通ライブラリ/ユーティリティの自作率(自作フレームワークの存在は移行難易度を大きく上げる)
4. 代表フローの追跡
エントリポイントから代表的なもの(オンライン1本・バッチ1本以上)を選び、入口→出口まで処理を追跡して シーケンス図(Mermaid)にする。全部は追わない——代表フローで「このシステムの典型的な書き方」を掴むのが目的。
5. 出力
survey-output/02-structure.md に以下の構成で出力:
# 構造・依存関係調査
## エントリポイント一覧(種類別の表 + 総数)
## アーキテクチャ(公称 vs 実態、ギャップ箇所)
## 依存グラフ(Mermaid + 高依存クラス Top10)
## 代表処理フロー(シーケンス図)
## 構造上の懸念(循環依存・神クラス・自作フレームワーク等)
## 未確認事項Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

