How feature-sliced/steiger works
Main Components Identification
The system consists of several key packages that should be represented as primary components:
a. Core Components:
• steiger (main package)
• steiger-plugin-fsd (Feature-Sliced Design plugin)
• pretty-reporter (formatting/reporting)
• toolkit (shared utilities)
• types (shared type definitions)
┌─ CLI Interface Layer ─────────────────────────────────┐
• steiger/cli.ts │
• ┬─┤
• Core Engine Layer │ │
• ┌─────────────┐ ┌──────────────┐ ┌───────────┐ │ │
• Config │ │ Runner │ │ Parser │ │ │
• Processor │──▶│ Engine │──▶│ │ │ │
• ┘ └──────────────┘ └───────────┘ │ │
• ┤ │
• Plugin System │ │
• ┌─────────────────────────────────────────────┐ │ │
• steiger-plugin-fsd │ │ │
• ┌─────────┐ ┌─────────┐ ┌────────────┐ │ │ │
• Rules │ │ Fixes │ │ Validators │ │ │ │
• ┘ └─────────┘ └────────────┘ │ │ │
• ┘ │ │
• ┤ │
• Support Libraries │ │
• ┌────────────┐ ┌───────────┐ ┌──────────────┐ │ │
• Toolkit │ │ Types │ │ Pretty │ │ │
• Reporter │ │ │
• ┘ └───────────┘ └──────────────┘ │ │
• ┘ │
• ┘
Key Interactions to Highlight
a. Input Flow:
• CLI receives file paths and config
• Config processor validates and normalizes settings
• Runner engine processes files
• Plugin system applies rules
b. Output Flow:
• Diagnostics collection
• Pretty reporter formatting
• CLI output
Additional Elements
Annotations for:
• Watch mode functionality
• Configuration options
• Rule severity levels
• File system interactions
Symbols:
▶ Required dependency
⇢ Optional dependency
□ Core component
◇ Plugin
○ Support library
Blue - Core system components
Green - Plugin system
Yellow - Support libraries
Red - Critical paths/validations
The configuration system's flexibility
Keep the abstraction level focused on the architectural components while providing enough detail to understand the system's operation and extension points. This will help developers understand both the current system and how to extend it with new plugins or rules.