Skip to content

feat(skills): add forge-improve-architecture skill #19

Description

@mgratzer

Summary

Add a skill for proactive architectural friction discovery and refactoring planning.

Problem / Motivation

Forge has no skill for identifying architectural problems before they become bugs. Current workflow is reactive: issues are created when problems are noticed. A proactive skill would explore the codebase organically, surface friction, and propose targeted refactors.

Inspired by mattpocock/skills improve-codebase-architecture, which combines organic exploration with structured dependency analysis.

Proposed Solution

Create forge-improve-architecture with these core concepts:

Organic Codebase Exploration

  • Explore like a new team member — note where understanding requires bouncing between many files
  • Surface friction: shallow modules, tightly-coupled seams, untested code, functions extracted just for testability

Dependency Categories Framework

Classify each friction point by dependency type, which determines the testing strategy:

  1. In-process — pure computation, no I/O → merge and test directly
  2. Local-substitutable — has test stand-ins (e.g., SQLite for Postgres) → deepen with local sub
  3. Remote but owned (Ports & Adapters) — own services across network → define port, inject adapters
  4. True external (Mock) — third-party services → mock at boundary

Parallel Sub-Agent Design Exploration

  • Spawn 3+ sub-agents with radically different design constraints
  • Each proposes a different interface for the identified friction point
  • Compare on: simplicity, general-purpose vs specialized, depth, ease of correct use

"Replace, Don't Layer" Testing

  • Delete old tests on shallow modules once boundary tests exist
  • Write new tests at the deepened module's interface boundary
  • Assert on observable outcomes through public interface

Pipeline Fit

Standalone skill invoked ad-hoc — not part of the linear workflow. Can feed into forge-create-issue when a refactor is identified.

Acceptance Criteria

  • SKILL.md follows forge skill structure
  • Organic exploration step with concrete friction indicators
  • Dependency categories framework with testing strategy per category
  • Parallel sub-agent design step for interface alternatives
  • Output: GitHub issue RFC with proposed interface, dependency strategy, testing strategy
  • Cross-skill consistency table updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions