standr/architecture

Structural design

AI-generated code lands somewhere. The problem is where. New behavior ends up in whatever file was open. Parallel concepts get reinvented instead of reused. The architecture plugin adds repo-aware judgment: reuse before invent, smallest structural diff by default, explicit larger reshapes only when you ask for them.

11 skills

Diagnostic

/architecture-scan

Diagnose structural issue category in an area.

/architecture-review

Diff-aware structural review of a PR, worktree, or change.

Placement

/architecture-place

Decide where new behavior belongs.

/architecture-reuse

Find what existing structure should be reused or extended.

/architecture-prep

Identify the minimum structural prep refactor before a feature.

/architecture-align

Create new structure in parallel with the closest repo analog.

Consistency

/architecture-boundary

Inspect responsibility separation.

/architecture-symmetry

Ensure similar concepts are represented similarly.

/architecture-hierarchy

Detect mixed abstraction levels.

Escalation

/architecture-pattern

Suggest a pattern only when it clearly pays rent.

/architecture-reshape

Explicit bigger redesign for ad-hoc or spaghetti zones.

Agent

architecture-reviewer

Deep structural review of placement, boundaries, and consistency.

Demo

The diff

Same billing backend, same feature requirements. The left side is where the code landed. The right side is where it should live.

Use whenever you're adding something that has a parallel elsewhere in the codebase. It finds the closest existing analog — a dataclass, a service method, a factory function — and mirrors its structure exactly. A plain dict event today means three more plain dict events tomorrow: inconsistency compounds because each new addition uses the most recent example as a template.

One inconsistent structure becomes the template for the next ten.
@dataclass(frozen=True)
class SubscriptionCreatedEvent:
    subscription_id: str
    plan_id: str
    created_at: datetime


def make_invoice_paid_event(
    invoice_id, amount, paid_date
):
    return {
        "type": "invoice_paid",
        "invoice_id": invoice_id,
        "amount": amount,
        "paid_date": paid_date.isoformat(),
    }
@dataclass(frozen=True)
class SubscriptionCreatedEvent:
    subscription_id: str
    plan_id: str
    created_at: datetime


@dataclass(frozen=True)
class InvoicePaidEvent:
    invoice_id: str
    amount: int
    paid_at: datetime

Install

$ npx skills add https://gitlab.com/standr.dev/standr