Structural Simplificationのロゴ

Structural Simplification

組織
l-gevity
structural-simplification

分野を問わず使える複雑さのモデルと意思決定プロトコルです。複雑さを4軸のベクトル—D(多様性)、K(結合度)、P(深さ)、n(量)—として捉え、再構成案を直感ではなく各軸への影響で評価します。コード、プロジェクトの編成、ランタイムトポロジー、データモデル、ワークフロー、UIレイアウト、組織構造、時間的プロセスに適用できます。次の場合に使用してください:リファクタリングを評価するとき、再構成を設計するとき、変更案によってシステムが単純になるか複雑になるかを判断するとき。次の場合は使用しないでください:単純な名前変更、コンテンツの編集、依存関係の更新、構造に触れない個別のバグ修正。サブシステムレベルの設計規律には`architecture-guidelines`を、配置や証拠の重みを考慮した依存関係トポロジーの制約には`morphogenetic-architecture`を参照してください。

Add to TypingMind

概要

公開者l-gevity
リポジトリl-gevity-skills
スキル名structural-simplification
スター
72
フォーク
13
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    l-gevityがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Structural Simplification」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/l-gevity/l-gevity-skills/tree/main/.agents/skills/structural-simplification
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/l-gevity/l-gevity-skills.git /tmp/l-gevity-skills
mkdir -p .claude/skills
cp -r /tmp/l-gevity-skills/.agents/skills/structural-simplification .claude/skills/structural-simplification
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでStructural Simplificationを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にStructural Simplificationを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Structural Simplificationは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Structural Simplification

Core Directives

  1. Complexity has four axes: D (diversity), K (coupling), P (depth), n (quantity). Score each independently; never collapse into a single number.
  2. Compare before and after. Intuition is not a metric.
  3. Conform when semantics match. Reusing an existing pattern shrinks D globally only when the semantics, lifecycle, and constraints actually fit.
  4. Remove over mitigate, safely. Removing a subsystem or special case beats handling it when functionality, migration, rollback, and external constraints permit removal.

Reporting Vocabulary

The skill may reason with axis symbols, but reports are for a coding agent that must choose an edit, test, lint rule, or rejection. Use the coder-facing field names below in every emit block, gate table, and cross-skill citation.

Internal symbolCoder-facing field used in reports
ΔD (diversity)Subsystem-kinds Δ — distinct subsystem/interface/pattern types added or removed
ΔK (coupling)Dependency-edges Δ — imports, calls, package edges, or runtime links added or removed
ΔP (depth)Max-chain-depth Δ — longest import/call/build chain before vs after
Δn (quantity)Subsystem-count Δ — files, subsystems, jobs, services, or instances added or removed

Naming guardrails. P is max-chain-depth, never "depth" alone — bare "depth" collides with the layer field in morphogenetic-architecture. Symbols appear in exactly three places: inside a formula, inside this table, and inside §§1–7 (the internal model). Anywhere else in narrative, use the coder-facing field name.


1. The Complexity Model

AxisSymbolWhat it countsMeasurement recipe
DiversityDDistinct patterns, shapes, conceptsCount distinct patterns / vocabulary items in the structure
CouplingKRelationship count and densityCount edges, then compute density (edges / (n × (n−1)) for directed graphs where n > 1) after defining edge kind and direction
DepthPLongest chain from source to sinkLongest path from any origin to any terminus in the DAG
QuantitynTotal number of subsystemsDirect count of subsystems (use §2 to identify them in your domain)

Domain-agnostic. Subsystem = any discrete node of the structure under review — §2 names it per domain (a function, a service, a screen, a role, a step); relationships = any connection (dependency, flow, sequence, authority). Multi-axis interactions usually cost more than any single-axis change alone; verify against the domain's actual constraints.

[!IMPORTANT] Cycles are property violations, not just high K. A cycle breaks the DAG assumption only when the chosen projection is required to be acyclic, such as imports, ownership, authority, or layer dependencies. See §5 for the topology framing that rules those cycles out; morphogenetic-architecture §2 defines the hard invariant and hands enforceable static constraints to architecture-as-code. If the domain intentionally contains cycles (feedback loops, state machines, workflows), define the acyclic projection or cycle semantics before scoring.


2. Domain Mapping

DomainSubsystems (nodes)Relationships (edges)
CodeSubsystems, functionsDependencies, calls, imports
Project organizationRepos, packages, workspaces, build targetsPackage dependencies, version constraints, build-time references, ownership
Runtime / deploymentServices, processes, containers, instances, threadsRPC/HTTP calls, message flows, network paths, replication, lifecycle order
Data modelEntities, fields, typesReferences, joins, constraints
WorkflowSteps, stages, decisionsTransitions, triggers, sequencing
UI / spatialScreens, regions, elementsNavigation, data flow, visual links
Organization (people)Roles, teams, systemsAuthority, communication, data exchange
TemporalEvents, states, phasesCausal or sequential ordering

3. Heuristic Checks

Fast proxies — not substitutes for measurement.

CheckSignalAxis
SymmetryStructure more uniform afterD↓
VocabularyDescribable with fewer conceptsD↓
BoundaryFewer relationships crossing boundariesK↓
Cycle brokenDependency cycle eliminatedK↓ + §1 fault
ChainFewer hops source-to-sinkP↓
CountFewer subsystemsn↓
RippleTypical change in this area touches many subsystemsK
Consistency pointsEach public element (route, right, config key) drags N hand-maintained artifacts — handler, guard, contract entry, registry row, tests; removing the element deletes them alln, K

4. Reduction Operations

Each axis has its own operation family — D↓ reduce diversity, K↓ reduce coupling, P↓ reduce depth, n↓ reduce quantity — plus multi-axis moves, each with guardrails on what it may claim. Read references/reduction-operations.md when proposing a simpler alternative, a SIMPLIFY, or a redesign, or when §6 cites a §4 warning; a measurement of a given candidate's four deltas does not need it.

5. Topology Constraint

Treat a dependency structure as a directed topology with explicit positions, interfaces, locality, and separately measured relationship fields. Bounded public surfaces and local neighbor sets cap K, directional static edges cap P, cohesive positions bound n, and consistent subsystem forms cap D. Decompose along domain, abstraction-tier, or layer seams only when the proposed cut improves the measured vector. Decomposition splits one subsystem into several; aspect extraction pulls one aspect out of several subsystems. They are different cuts; judge both by the vector.

For dependency projections that require acyclicity, reject cycles before scoring trade-offs. For runtime feedback, name the cycle semantics and measure the chosen acyclic projection separately.

For declared placement, observed fields, candidate boundary decisions, and enforcement handoffs, see morphogenetic-architecture.


6. Trade-off Matrix

Reducing one axis usually raises another. Examples lean software but the moves apply to any structure.

RestructuringDKPnVerdict
Add abstraction tier — ≥3 concrete instances↑↓↑↑Candidate proceed (§7a Conformance); verify semantics match
Add abstraction tier — <3 instances or speculative↑↑↑↑Candidate reject — Rule of 3; verify no external constraint
Add facade — over a 4-step chain↑—hides P↑Keep only if K↓ measurable; never claim P↓ (§4 warning)
Flatten — intermediate subsystem has no independent role—↑↓↓Candidate proceed; verify internal K and invariants bounded
Extract common subsystem — ≥3 dependents↓↓—↑Candidate proceed; verify lifecycle and ownership match
Bypass a subsystem — the bypassed one has no independent role—↑↓↓Candidate proceed; verify no boundary or policy is bypassed
Introduce mediator between 2 subsystems↑↑↑↑Candidate reject unless it enforces a boundary or decouples time
Merge two cohesive subsystems↓within ↑↓↓Candidate proceed; verify internal K stays bounded
Split overloaded subsystem along an SoC seam↓↓↑↑Candidate proceed; verify caller paths remain understandable

7. Asymmetric Trade-offs

Cases where net axis effect is positive despite local cost.

7a. Conformance (Pattern Alignment)

Accept local structural cost to eliminate a unique shape from D only when the standard pattern fits the same semantics, lifecycle, ownership, and external constraints. One snowflake among ten uniform subsystems can inflate D disproportionately, but a real domain distinction should be named and preserved.

7b. Scope Reduction (Deletion)

Remove or deprecate special functionality if its structural footprint exceeds its utility and the functionality-complexity-tradeoff verdict allows safe removal. Special cases are complexity multipliers: D↑ (unique patterns), K↑ (conditional paths), P↑ (extended chains), n↑ (supporting subsystems). The cost of a feature includes every special case it forces elsewhere, plus the migration and compatibility work needed to remove it safely.

7c. Atomicity Requirements

When an action coordinates multiple independent participants (services, actors, steps, partners), the atomicity decision has direct structural cost. Decide before implementation — see architecture-guidelines §5 Atomicity.

DecisionStructural effectAction
Atomicity requiredK↑ P↑Accept coupling; use fail-fast / compensation
Eventual consistencyK↓ P↓Document acceptable partial-failure states

Anti-Pattern: designing multi-step operations without deciding atomicity first.


8. Decision Protocol

  1. Model before-state and after-state. Record D, K, P, n for each (internal axes; see Reporting Vocabulary for the coder-facing field names).

  2. Cycle check. If the modeled projection is required to be acyclic, a cycle in the after-state is a hard fault — fix before continuing. If the domain permits cycles, record the cycle semantics and score the chosen acyclic projection separately.

  3. Answer the forcing questions in writing (one line each):

    • D: What unique pattern does this introduce that no sibling uses? (Name the 2nd concrete instance; absence = Rule-of-3 violation.)
    • K: Which previously-independent subsystems does this link?
    • P: How long is the longest dependency chain a typical change traverses? (>3 hops → max-chain-depth is itself the cost.)
    • n: If deleted, what would dependents do? (If "use the thing it wraps," it's a no-op facade.)
    • Counterfactual: Does §7a or §7b apply? What is the 12-month removal cost?
  4. Check non-structural gates. Confirm the candidate still satisfies required behavior, security/privacy, compliance, observability, performance, migration, and rollback constraints. Structural improvement is not permission to break a required property.

  5. Classify:

    PatternAction
    All axes improve or holdProceed if non-structural gates pass
    Mixed (some improve, some worsen)Consult §6 trade-offs, apply §7, then check gates
    No axis improvesReject or redesign unless required by an external gate
  6. Emit a coder-facing decision record (see Reporting Vocabulary for the symbol mapping):

    Subject:              <structure / subsystem / refactor under review>
    Decision:             Proceed | Redesign | Reject
                          (retrospective: KEEP | SIMPLIFY | DELETE)
    Subsystem-kinds Δ:    <±n>   (evidence: novel pattern, 2nd concrete instance)
    Dependency-edges Δ:   <±n>   (evidence: what newly couples to what)
    Max-chain-depth Δ:    <±n>   (evidence: longest path before → after)
    Subsystem-count Δ:    <±n>   (evidence: subsystems added / removed)
    Cycle:                Pass | Fail
    Non-structural gates: Pass | Fail | Not evaluated
    Trade-off:            <§6 row matched; §7 sub-section if asymmetric>
    Rationale:            <1–3 sentences tying the four deltas and forcing-Q answers → decision>
    Next action:          <edit, test, lint rule, measurement, or smaller alternative>
    Verification:         <command / graph check / review evidence, or Not run + reason>

[!IMPORTANT] If no axis improves, state: "Complexity Warning: Subsystem-kinds Δ [X], Dependency-edges Δ [Y], Max-chain-depth Δ [Z], Subsystem-count Δ [W]. A simpler alternative is [...]."


9. See also

  • architecture-guidelines — first-principles discipline that informs Δ scoring (YAGNI, Rule of 3, DRY, SoC).
  • morphogenetic-architecture — placement and topology rationale; static cycles remain forbidden while explicit runtime feedback is modeled separately.
  • functionality-complexity-tradeoff — consumes D, K, P, n deltas in its cost ledger.
  • defect-shift-left — earliest stage to catch each axis violation.
  • continuous-improvement — when a recurring axis violation signals a missing rule.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Structural Simplification」では何ができますか?

分野を問わず使える複雑さのモデルと意思決定プロトコルです。複雑さを4軸のベクトル—D(多様性)、K(結合度)、P(深さ)、n(量)—として捉え、再構成案を直感ではなく各軸への影響で評価します。コード、プロジェクトの編成、ランタイムトポロジー、データモデル、ワークフロー、UIレイアウト、組織構造、時間的プロセスに適用できます。次の場合に使用してください:リファクタリングを評価するとき、再構成を設計するとき、変更案によってシステムが単純になるか複雑になるかを判断するとき。次の場合は使用しないでください:単純な名前変更、コンテンツの編集、依存関係の更新、構造に触れない個別のバグ修正。サブシステムレベルの設計規律には`architecture-guidelines`を、配置や証拠の重みを考慮した依存関係トポロジーの制約には`morphogenetic-architecture`を参照してください。

TypingMindでStructural Simplificationを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Structural Simplificationはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにStructural Simplificationをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/l-gevity/l-gevity-skills/tree/main/.agents/skills/structural-simplificationを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Structural Simplificationを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Structural Simplificationで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもStructural Simplificationを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Structural Simplification」は無料ですか?

はい。l-gevityがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇