Clean oop architecture

From furkantokkan/agent-foundry · View interactive version

Clean oop architecture is an AI agent skill from the GitHub repository furkantokkan/agent-foundry. Use for SOLID, Clean Code, and maintainable object-oriented design, including Unity C#. Covers dependency boundaries, DI, ServiceLocator, Onity, design patterns, testability, naming, code smells, refactoring, overengineering risk, surgical changes, and goal-driven verification.

How to use this skill

Skill file

Clean OOP Architecture

Use this skill for code quality decisions that go beyond syntax: boundaries,

responsibilities, coupling, cohesion, naming, refactoring, and testability.

Core Principle

Prefer code that is easy to change safely:

First Read

Before changing code, inspect:

  1. Existing project conventions.
  2. The target class/module and direct collaborators.
  3. Tests around the behavior.
  4. Composition root / dependency injection setup if present.
  5. Any ADR, design doc, or task file that names the pattern.

SOLID Checks

Do not force patterns mechanically. A small direct implementation is better than

an abstraction that hides nothing and makes testing harder.

Clean Code Checks

same shape.

Refactoring Workflow

  1. Characterize current behavior with tests or a precise reading.
  2. Identify the code smell and the reason it matters.
  3. Make one small structural change at a time.
  4. Preserve behavior unless the user asked for a behavior change.
  5. Run tests after meaningful steps.
  6. Stop before broad rewrites that are not needed for the current goal.

Reference Loading

Load only the relevant reference:

LLM coding discipline, Unity OOP, Dive Into Refactoring, and design-pattern

routing.

domain/authoring parity: Unity ownership and authoring.

implementation, bug fixing, refactoring, or review work that risks hidden

assumptions, overengineering, drive-by edits, or weak verification.

modes and concrete before/after examples would help steer the implementation.

Unity task needs extra local PDF-derived context on game programming patterns,

refactoring discipline, performance, testing, or handoff workflow. Search with

rg and load only the relevant extracted Markdown sections.

If the local project contains

docs/reference/private/coding/README.md, read that index and grep targeted

terms only. Do not bulk-load full books.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.