xiaohongshu
xiaohongshu
analyzer-architecture-review
analyzerアプリケーションのアーキテクチャレビュー。Port&Adapterアーキテクチャ(ヘキサゴナルアーキテクチャ)のルールに従っているかをチェックします。新しいPort/Adapter/Usecase/Model追加時、PRレビュー時、またはアーキテクチャ違反の検出が必要な時に使用します。Port層の関数型定義、依存関係の方向、New*関数パターン、レイヤー分離などを検証します。
Full skill instructions
このスキルは、analyzerアプリケーションのPort&Adapterアーキテクチャ(ヘキサゴナルアーキテクチャ)への準拠をレビューします。
アーキテクチャの詳細: references/analyzer-architecture.mdを参照してください。
git diff --name-only
以下のディレクトリの変更を確認:
app/analyzer/internal/port/app/analyzer/internal/adapter/app/analyzer/internal/usecase/app/analyzer/internal/model/app/analyzer/internal/registory/変更されたファイルのレイヤーに応じて、該当するチェック項目を確認します。
type Name = func(...))で定義されているかcontext.Contextか(必要な場合)詳細: analyzer-architecture.md#Port層
New*という命名規則のコンストラクタがあるか詳細: analyzer-architecture.md#Adapter層
New*コンストラクタで全ての依存性を注入しているかimportチェック: Usecaseはinternal/port/*とinternal/modelのみをimportすべき
詳細: analyzer-architecture.md#Usecase層
詳細: analyzer-architecture.md#Model層
cmd/)から呼び出されているか詳細: analyzer-architecture.md#Registry層
許可される依存:
禁止される依存:
検証方法: ファイルのimport文を確認
// ✅ 正しい Usecase の import
import (
"github.com/ss49919201/keeput/app/analyzer/internal/port/fetcher"
"github.com/ss49919201/keeput/app/analyzer/internal/model"
)
// ❌ 間違った Usecase の import
import (
"github.com/ss49919201/keeput/app/analyzer/internal/adapter/fetcher/hatena" // NG!
)
詳細: analyzer-architecture.md#依存関係のルール
New*関数がPort型を返しているか詳細: analyzer-architecture.md#命名規則
UsecaseがAdapterに依存
// ❌ NG
import "github.com/.../adapter/fetcher/hatena"
Port層に実装を含める
// ❌ NG: Port層に実装があってはいけない
func DefaultFetchLatestEntry() FetchLatestEntry { /* 実装 */ }
Modelが外部依存を持つ
// ❌ NG
import "github.com/aws/aws-sdk-go-v2/service/s3"
詳細な例: analyzer-architecture.md#アーキテクチャ違反の例
レビュー結果は以下の形式で出力:
# Analyzer Architecture Review
## Summary
- 変更ファイル数: X
- アーキテクチャ違反: Y件
- 警告: Z件
## Details
### ✅ Good: Port層の定義(port/fetcher/entry.go)
- 関数型で正しく定義されている
- 実装コードが含まれていない
### ❌ Issue: Usecase層の依存関係(usecase/analyze.go)
- Adapter層を直接importしている
- 修正方法: Registry層で依存性を注入する
### ⚠️ Warning: 命名規則(adapter/fetcher/hatena.go)
- 実装関数が公開されている(小文字始まりにすべき)
このスキルには以下のリファレンスが含まれています:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience