2b-layer-boundary-repair

Repair Python layer-boundary violations with deterministic directory and __init__.py fixes.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/AgustinMadygraf/skills --skill 2b-layer-boundary-repair
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 2b-layer-boundary-repair
Source: https://github.com/AgustinMadygraf/skills/tree/main/2b-layer-boundary-repair
Command: npx skills add https://github.com/AgustinMadygraf/skills --skill 2b-layer-boundary-repair

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Layer-boundary violations between architectural layers are fixed with deterministic, mechanical changes, reducing drift and manual remediation.

Core Features & Use Cases

  • Create missing layer directories under src/ (entities, use_cases, interface_adapters, infrastructure) and ensure init.py files exist.
  • Create missing subdirectories under interface_adapters (gateways, controllers, presenters) and add init.py placeholders.
  • Generate a structured todo.md in docs that lists the actions taken or proposed, guiding subsequent auditing.
  • Offer dry-run mode to preview changes and an apply mode to enact them in the repository.

Quick Start

Run the dry-run to identify missing layer scaffolding, then run with apply to implement the fixes across the repository.

Frequently Asked Questions about 2b-layer-boundary-repair

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

FAQPage Schema
How do I fix layer-boundary violations in a Python codebase safely?

Fix layer-boundary violations by applying deterministic, mechanical repairs to your Python codebase. This process targets architectural layers like entities and use_cases, handling missing directories and __init__.py placeholders without manual intervention.

What is the best way to repair missing architectural layer directories under src/?

The best way to repair missing architectural layer directories is using automated scaffolding generation. It creates required layer directories like interface_adapters and infrastructure under src/, and automatically adds __init__.py placeholders to ensure Python package recognition.

Does this layer-boundary repair approach support Clean Architecture layers like entities and use_cases?

Yes, this layer-boundary repair approach supports typical Clean Architecture layers. It specifically targets layers such as entities, use_cases, interface_adapters, and infrastructure, creating missing subdirectories like gateways and presenters under interface_adapters.

How do I log architectural layer modifications for later auditing?

Log architectural layer modifications by generating a structured todo.md file in the docs directory. This file lists all actions taken or proposed during the layer-boundary repair, providing a clear audit trail for subsequent codebase review.

Can I preview layer-boundary repairs before modifying my repository structure?

Yes, you can preview layer-boundary repairs using the built-in dry-run mode. This mode identifies missing layer scaffolding and displays proposed changes without enacting them, ensuring you can validate modifications before applying them to the repository.