
structure-boundaries
by iplaylf2
Personal coding profile kit for reusable defaults and setup
SKILL.md
name: structure-boundaries description: 'Use when navigation is costly or module boundaries feel blurry due to messy directories, inconsistent naming, or cross-boundary imports. Goal: make architecture and dependency direction readable from the tree and imports, with minimal churn.' metadata: short-description: Clear boundaries
Structure & Boundaries
A good project layout makes intent obvious: where code belongs, what it does, and which parts depend on which.
Core Principle
Structure should reflect responsibility and boundaries. Directories and imports should let a reader infer the architecture without opening many files.
Directory Organization
List vs Dict
Use one of these meanings per directory level.
List pattern: children are interchangeable items of the same kind. Use plural or category-like parent names.
operations/
articles/
comments/
users/
Test: can you add another sibling without changing what the parent means?
Dict pattern: children are distinct roles (fixed set of responsibilities).
project/
operations/ # business logic
services/ # integrations / IO
utils/ # domain-free primitives
Test: does each child have a unique, non-interchangeable purpose?
Avoid mixing both meanings at the same level.
Flat when possible
Prefer shallow trees. Add a subdirectory only when a real grouping exists (many files, or clear sub-roles).
Naming
Names assume directory context
File names should describe what it is, not repeat the directory’s meaning.
operations/articles/
publish.py
validate.py
Avoid vague buckets (misc, helpers, manager) unless the responsibility is truly precise.
Shared code conventions
…kitsuffix: shared code for a specific layer or domain boundary.- Use when code is reused across siblings within that boundary.
- Meaning: “tooling/support code for X”, not a new domain.
utils/: domain-free utilities only.- No business terms, no project-layer dependencies.
- If something belongs to a domain or layer, prefer placing it in that domain/layer (or its
…kit) instead ofutils.
Imports as Boundary Signals
Imports should make relationships obvious:
- Within a boundary (same directory/subtree): use the local convention (often relative or shortest local path).
- Across boundaries (parent/sibling/other layers/domains): use explicit absolute paths to make crossing visible.
- Avoid “upward” relative imports that hide boundary crossing.
A healthy codebase tends to have a clear dependency direction (e.g., higher-level logic depends on lower-level utilities/integrations, not the reverse). Flag boundary violations.
Review Process
- Identify the project’s main boundary axes (layer, domain). Keep one primary axis per directory level.
- Classify each directory level as List or Dict; rename/restructure to remove ambiguity.
- Flatten over-nesting; create subdirectories only for real grouping.
- Fix naming to be context-aware and non-redundant.
- Align imports so boundary crossings are visible and dependency direction is consistent.
- Propose a minimal-change plan: smallest set of moves/renames that improves readability.
Review Checklist
- Each directory level has a single meaning: List or Dict.
- The tree makes responsibilities and boundaries obvious.
- Names are concise given directory context.
- The hierarchy is flat unless grouping is justified.
- Imports make boundary crossings and dependency direction easy to see.
utils/stays domain-free; shared code lives in the right…kitboundary when applicable.
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
1ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です
