بنقرة واحدة
improve-codebase-architecture
Deep exploration and architectural improvement via organic friction detection
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Deep exploration and architectural improvement via organic friction detection
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Manage OMA skills — list, add, remove, search, and edit skills
Socratic deep interview with mathematical ambiguity gating before autonomous execution
Remove AI slop - low-quality, generic, or verbose content. Use for "clean up", "remove fluff", and "make concise".
Consensus planning - agree before executing. Use for "ralplan", "consensus", "pre-execution review".
Setup routing and environment configuration. Use for "setup", "configure", and "get started".
N coordinated agents on shared task list using Claude Code native teams, with git worktree isolation per executor
| name | improve-codebase-architecture |
| description | Deep exploration and architectural improvement via organic friction detection |
| triggers | ["/oma:improve-architecture","/oma:architect-deep"] |
Deep architectural analysis of a codebase with the goal of making the system easier to change. This skill works by following friction, not by applying rigid rules.
| Trigger | When to Use |
|---|---|
/oma:improve-architecture | General request to analyze and improve a codebase's structure |
/oma:architect-deep | When you suspect deep architectural problems and want a thorough analysis |
Spawn multiple sub-agents simultaneously, each with a different constraint perspective. This is the core technique for designing better module interfaces.
Agent A: Minimize the interface surface
- Goal: Reduce parameters, simplify signatures
- Ask: "What is the smallest interface that still fulfills the contract?"
Agent B: Maximize flexibility / ease of change
- Goal: Identify where changes cascade, minimize blast radius
- Ask: "What would I need to change to swap this dependency?"
Agent C: Optimize for the common case
- Goal: Make the happy path effortless
- Ask: "What does this code do most of the time, and how do we make that the default?"
Workflow:
After analysis, produce a GitHub Issue RFC using this template:
## Problem: [what's wrong]
## Proposal: [what to change]
## Alternatives Considered: [other options]
## Consequences: [what happens if we do this]
Most codebases degrade silently. Features are added, conditions accumulate, abstractions pile on top of abstractions. Eventually, every team reaches a point where changing one thing breaks three others -- and nobody knows why.
This skill exists because friction is a signal, not a noise. When a developer hits resistance while trying to make a change, that resistance reveals the architecture's true shape. The goal is to listen to that friction, trace it to its root cause, and propose changes that make the system easier to work with -- not by applying external rules, but by following what the code is already telling you.
The core ideas come from John Ousterhout's A Philosophy of Software Design:
This skill is also a direct response to the failure mode of "architecture astronauts" -- people who design grand systems upfront without reacting to what the code actually needs. The approach here is the opposite: start from real friction and let the architecture emerge from the evidence.
A team has a UserManager class with 47 methods. It is imported everywhere. The LSP shows it in 200+ files.
What the friction tells you:
UserManager risks breaking many unrelated callers.Organic response:
UserManager.UserManager as a facade with a small, stable interface.Proposal (RFC snippet):
## Problem: UserManager is a shallow module with 47 methods imported by 200+ files.
Any change to it risks cascading failures across the codebase.
## Proposal: Extract three cohesive sub-modules (AuthManager, ProfileManager, PreferencesManager)
and replace UserManager's responsibilities with delegation to these new modules.
Keep UserManager as a thin facade with no more than 5 public methods.
## Alternatives Considered:
- Keep UserManager and add deprecation warnings (does not reduce coupling)
- Create a single new class replacing UserManager (too large a change, hard to review)
A developer tries to add a new log level and discovers that the logging system has 6 different configuration locations, each with different precedence rules.
What the friction tells you:
Organic response:
A team needs to redesign the CacheManager interface. Instead of one agent designing it in isolation, three agents work simultaneously:
get(key) / set(key, value) interface, with TTL as a property set once at initialization.CacheStrategy objects and a CacheBackend interface for swapping implementations.@Cacheable and the system handles everything transparently.Synthesis: Agent A's surface is too small (loses TTL control at runtime). Agent C is too magical (hard to debug). Agent B's strategy pattern is the best foundation, but the interface is tightened to 4 methods instead of 8.
When evaluating how to test a module, classify its dependencies:
| Module | Dependency | Category | Testing Strategy |
|---|---|---|---|
UserService | UserRepository (local SQLite) | Local-substitutable | Inject a mock repository |
UserService | EmailClient (external SendGrid) | True external | Use a test SMTP server or mock |
AuthService | SessionStore (in-process Map) | In-process | Test directly with real instance |
PaymentService | PaymentGateway (remote, owned adapter) | Remote-but-owned | Use a test payment gateway adapter |