rune-improve-architecture

Analyze codebase modules and emit scored architecture deepening proposals in YAML.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-improve-architecture-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-improve-architecture
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-improve-architecture
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-improve-architecture-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Codebases accumulate shallow wrapper modules that spread logic across many files, making them hard to test and reason about. This Skill finds that architectural friction and produces scored, structured refactor proposals that downstream skills can consume programmatically. ## Core Features & Use Cases - Numeric Scoring: Scores each candidate module on depth, leverage, and locality (1-5 each) plus a deletion-test verdict (vanish, concentrate, redistribute). - Dependency Classification: Categorizes dependencies as in-process, local-substitutable, remote-owned, or true-external to determine the right test strategy and seam discipline. - Structured Proposals: Emits YAML proposal payloads with current/target scores, planned adapters, and test changes, consumable by surgeon, brainstorm, audit, and review skills. - Use Case: Point it at src/auth/ where login, refresh, and logout are three thin modules; it scores the cluster, proposes a deepened AuthPort with production and in-memory adapters, and hands the payload to a refactor skill. ## Quick Start Ask the agent to run improve-architecture on a target module path such as src/auth/ to get scored deepening candidates and a recommendation.

Frequently Asked Questions about rune-improve-architecture

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

FAQPage Schema
How do I find shallow modules in my codebase?

Run improve-architecture against a target module path like src/auth/. It reads the module and its callers, then scores each candidate on depth, leverage, and locality so shallow wrappers are identified numerically rather than by intuition.

What is module depth in software architecture?

Depth measures how much behavior hides behind an interface, scored 1-5 by comparing implementation complexity to interface complexity. A score of 1 means a pass-through wrapper; 5 means a small interface concealing large machinery.

When should I introduce a port or adapter at a seam?

Introduce a port only when at least two adapters are justified, typically a production adapter plus an in-memory test adapter. A single-adapter seam is flagged as indirection-only and dropped from the proposal.

Does this skill refactor the code itself?

No. It only analyzes, scores, and emits structured YAML proposals. Actual refactoring is handed to the surgeon skill, and non-obvious interface design goes to the brainstorm skill in design-it-twice mode.

What happens to old tests after deepening a module?

New tests are written at the deepened interface and old shallow-module tests are deleted in the same commit. Keeping both creates double coverage on the same behavior and tests that break together on structural changes.