Loading...
Loading...
Multi-language SOLID detection rules. Project type detection, interface locations, file size limits per language.
npx skill4agent add fusengine/agents solid-detection# Next.js (priority over React)
[ -f "package.json" ] && grep -q '"next"' package.json
# React (no "next" in package.json)
[ -f "package.json" ] && grep -q '"react"' package.json && ! grep -q '"next"' package.json
# Generic TypeScript (no react/next, has .ts files)
[ -f "package.json" ] && ! grep -q '"react"' package.json && ! grep -q '"next"' package.json
[ -f "tsconfig.json" ] || [ -f "bun.lockb" ] || [ -f "bunfig.toml" ]
# Laravel
[ -f "composer.json" ] && grep -q '"laravel' composer.json
# Swift
[ -f "Package.swift" ] || ls *.xcodeproj
# Java
[ -f "pom.xml" ] || [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]
# Go
[ -f "go.mod" ]
# Ruby
[ -f "Gemfile" ] && [ -f "Rakefile" ]
# Rust
[ -f "Cargo.toml" ]
# Python
[ -f "pyproject.toml" ] || [ -f "requirements.txt" ]| Rule | Value |
|---|---|
| File limit | 150 lines |
| Interface location | |
| Shared interfaces | |
| Forbidden | Interfaces in |
| SOLID skill | |
^(export )?(interface|type) \w+| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Shared interfaces | |
| Forbidden | Interfaces in |
| SOLID skill | |
^(export )?(interface|type) \w+| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Shared interfaces | |
| Structure | Modular MANDATORY |
| Forbidden | Interfaces in service/lib files |
| SOLID skill | |
^(export )?(interface|type) \w+| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Shared interfaces | |
| Structure | FuseCore Modular MANDATORY |
| Forbidden | Interfaces outside Contracts/ |
| SOLID skill | |
^interface \w+| Rule | Value |
|---|---|
| File limit | 150 lines |
| Interface location | |
| Shared interfaces | |
| Structure | Features Modular MANDATORY |
| Forbidden | Protocols outside Protocols/ |
| SOLID skill | |
^protocol \w+| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Shared interfaces | |
| Structure | Modular MANDATORY |
| Forbidden | Interfaces in impl files |
| SOLID skill | |
^(public )?(interface) \w+| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Shared interfaces | |
| Structure | Modular MANDATORY |
| Forbidden | Interfaces in impl files |
| SOLID skill | |
^type \w+ interface \{| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Shared interfaces | |
| Structure | Modular MANDATORY |
| Forbidden | Contracts in model files |
| SOLID skill | |
^module \w+Contract| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Shared interfaces | |
| Structure | Modular MANDATORY |
| Forbidden | Traits in impl files |
| SOLID skill | |
^pub trait \w+| Rule | Value |
|---|---|
| File limit | 100 lines |
| Interface location | |
| Forbidden | ABC outside interfaces/ |
class \w+\(.*ABC.*\)///* */#"""# TypeScript/Go/Rust/Swift
grep -v '^\s*$\|^\s*//\|^\s*/\*\|^\s*\*' file
# PHP
grep -v '^\s*$\|^\s*//\|^\s*#\|^\s*/\*\|^\s*\*' file
# Python
grep -v '^\s*$\|^\s*#\|^\s*"""' file| Severity | Action |
|---|---|
| Interface in wrong location | BLOCK (exit 2) |
| File over limit | WARNING (exit 0) |
| Missing documentation | WARNING |
| Project Type | SOLID Skill | Skill Path |
|---|---|---|
| solid-nextjs | |
| solid-react | |
| solid-generic | |
| solid-php | |
| solid-swift | |
| solid-java | |
| solid-go | |
| solid-ruby | |
| solid-rust | |
| (no skill yet) | - |
detect-project.shSOLID_PROJECT_TYPE=nextjs|react|generic|laravel|swift|java|go|ruby|rust|python|unknown
SOLID_FILE_LIMIT=100|150
SOLID_INTERFACE_DIR=path/to/interfaces
SOLID_STRUCTURE=modular