AgentSkillsCN

Architecture

建筑

SKILL.md

Skill: Project Architecture

Directory Structure Template

プロジェクトの言語やフレームワークに応じて、以下のテンプレートを参考に構成してください:

Web Framework Project (Next.js, Django, Rails等)

  • src/app (or app/): UI/Presentation Layer
  • src/lib (or lib/): Business Logic and Utilities
  • src/types (or types/): Type/Interface Definitions (Shared Source of Truth)
  • tests/: Unit and Integration Tests

General Project

  • src/: Main source code
  • lib/: Reusable utilities and shared logic
  • types/ (or models/, schemas/): Type/Data structure definitions
  • tests/: Test files

Rules

  1. 関心の分離: ビジネスロジックを UI コンポーネント/プレゼンテーションから分離する
  2. 純粋関数: 可能な限り副作用のない純粋関数を活用する
  3. 型安全性: 言語の型システムを最大限活用し、型定義ファイルを Shared Source of Truth として管理する