home / skills / makfly / superpowers-symfony / interfaces-and-autowiring

interfaces-and-autowiring skill

/skills/interfaces-and-autowiring

This skill helps refine Symfony interfaces and autowiring workflows with controlled checkpoints and auditable decisions for safer architectural changes.

npx playbooks add skill makfly/superpowers-symfony --skill interfaces-and-autowiring

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.1 KB
---

name: symfony:interfaces-and-autowiring
allowed-tools:
  - Read
  - Glob
  - Grep
description: Apply production-grade Symfony architecture and execution workflows with controlled scope and clear checkpoints. Use for interfaces and autowiring tasks.
---

# Interfaces And Autowiring (Symfony)

## Use when
- Refining architecture/workflows/context handling in Symfony projects.
- Planning and executing medium/complex changes safely.

## Default workflow
1. Establish current boundaries, constraints, and coupling points.
2. Propose smallest coherent architectural adjustment.
2. Execute in checkpoints with validation at each stage.
2. Summarize tradeoffs and follow-up backlog.

## Guardrails
- Use existing project patterns by default.
- Avoid broad refactors without explicit need.
- Keep decision log clear and auditable.

## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.

## Output contract
- Architecture/workflow changes.
- Checkpoint validation outcomes.
- Residual risks and next steps.

## References
- `reference.md`
- `docs/complexity-tiers.md`

Overview

This skill helps apply production-grade Symfony architecture and controlled execution workflows focused on interfaces and autowiring. It provides a small-scope, checkpoint-driven approach to introducing or refining service interfaces, autowiring rules, and dependency boundaries. The goal is safe, auditable change with clear validation and follow-up actions.

How this skill works

First, it inspects current boundaries, coupling points, and existing project patterns to avoid unnecessary disruption. Then it proposes the smallest coherent architectural adjustment and defines discrete checkpoints for implementation and validation. Each checkpoint includes tests or verification steps and a short decision log entry. Finally, it summarizes tradeoffs, residual risks, and a prioritized follow-up backlog.

When to use it

  • Introducing interfaces for services currently injected as concrete classes
  • Converting manual service wiring to Symfony autowiring with typed interfaces
  • Refining dependency boundaries to reduce coupling in medium or complex modules
  • Planning incremental architecture changes that must be auditable and reversible
  • Rolling out autowiring changes across a codebase with safe validation steps

Best practices

  • Prefer existing project patterns and naming conventions to minimize cognitive load
  • Make the smallest meaningful change that enables the next step, not a broad refactor
  • Define concrete checkpoints with automated tests or local validation criteria
  • Record a short decision log entry for every change to keep the process auditable
  • List residual risks and schedule follow-up items rather than trying to solve everything at once

Example use cases

  • Add an interface for a payment gateway service and update DI configuration to autowire by interface
  • Replace container->get calls in a bounded module with constructor injection and autowiring
  • Introduce an adapter interface to isolate a legacy library and incrementally replace usages
  • Audit and tighten service visibility (public/private) while maintaining backward compatibility
  • Create a migration plan to move from manual YAML service wiring to attribute-based autowiring with checkpoints

FAQ

Will this skill perform code changes automatically?

It provides concrete change proposals, checkpoints, and validation steps; actual code changes can be executed manually or automated with your preferred tooling.

How are risks tracked?

Each checkpoint includes a short risk assessment and any residual risks are summarized in a follow-up backlog for mitigation.