architecture-refactor

Define architecture improvement patterns for pool-controller firmware with dependency injection and layered structure.

25|7|Updated Mar 4, 2019
One-click install
npx skills add https://github.com/smart-swimmingpool/pool-controller --skill architecture-refactor-smart-swimmingpool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-refactor
Source: https://github.com/smart-swimmingpool/pool-controller/tree/main/.opencode/skills/architecture-refactor
Command: npx skills add https://github.com/smart-swimmingpool/pool-controller --skill architecture-refactor-smart-swimmingpool

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Architecture improvement patterns for the pool-controller firmware to enhance testability, maintainability, and separation of concerns.

Core Features & Use Cases

  • Introduces dependency injection and interface extraction to decouple hardware drivers from application logic.
  • Provides a layered architecture blueprint (app, drivers, services, platform) to improve testability and reusability.
  • Supports a migration path from a flat codebase to modular components with clear ownership and responsibilities.

Quick Start

Begin by applying a layered architecture and extracting interfaces for hardware dependencies.

Frequently Asked Questions about architecture-refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor firmware architecture to improve testability and maintainability?

To refactor firmware architecture for testability, apply dependency injection and interface extraction to decouple hardware drivers from application logic, establishing a modular structure with clear ownership boundaries.

What is the best way to migrate a flat codebase to a layered architecture?

Migrating to a layered architecture involves structuring code into app, drivers, services, and platform layers, providing a clear migration path that separates concerns and improves reusability across the firmware.

How does dependency injection decouple hardware drivers in embedded systems?

Dependency injection decouples hardware drivers by defining abstract interfaces for hardware dependencies, allowing application logic to interact with these interfaces rather than concrete implementations, significantly enhancing testability.

When do I need interface extraction for maintaining firmware codebases?

Interface extraction is needed when hardware dependencies are tightly coupled to application logic, preventing isolated testing and requiring a clear separation of concerns to improve maintainability and modularity.

Does firmware refactoring require a specific directory structure for separation of concerns?

Firmware refactoring targets a specific directory structure dividing components into app, drivers, services, and platform layers, ensuring clear ownership and strict separation of concerns throughout the codebase.

What testing expectations should I follow during safe architecture refactoring?

Safe architecture refactoring requires documented verification and testing expectations, ensuring that decoupled components and extracted interfaces maintain functional integrity throughout the migration process.