AGENT SKILL

architecture

Use when designing modules, seams, and adapters, when evaluating module depth and identifying deepening opportunities in a codebase, or when modernizing legacy code incrementally (strangler-fig, seams, characterization tests, safe extraction).

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
1

01 前言 Front Matter

name
architecture
agent
architect
triggers
[ "user", "model" ]
description
Use when designing modules, seams, and adapters, when evaluating module depth and identifying deepening opportunities in a codebase, or when modernizing legacy code incrementally (strangler-fig, seams, characterization tests, safe extraction).

02 资源文件 3

03 SKILL.md 正文

Architecture

Design deep modules — a lot of behaviour behind a small interface at a clean seam, testable through that interface. Aim: leverage for callers, locality for maintainers, testability for everyone.

Reference docs: reference/DEEPENING.md (dependency categories + refactor moves), reference/DESIGN-IT-TWICE.md, reference/HTML-REPORT.md (report format).

Glossary — use these terms exactly

Don't drift into "component," "service," "API," or "boundary."

  • Module — anything with an interface and an implementation (scale-agnostic).
  • Interface — everything a caller must know: signature, invariants, ordering, error modes, config, performance.
  • Depth — leverage at the interface: behaviour exercisable per unit of interface learned. Deep = small interface + lots of implementation.
  • Seam (Feathers) — a place you can alter behaviour without editing there.
  • Adapter — a concrete thing satisfying an interface at a seam (role, not substance).
  • Leverage — what callers get from depth. Locality — what maintainers get: change and bugs concentrate in one place.

Principles

  • Depth is a property of the interface, not the implementation.
  • The deletion test — delete the module: complexity vanishes → pass-through; reappears across callers → earning its keep.
  • The interface is the test surface — callers and tests cross the same seam.
  • One adapter = hypothetical seam; two = real. Don't add a seam unless something varies across it.
  • Accept dependencies, don't create them; collapse pass-through wrappers; co-locate decisions; hide parameter clusters; push I/O to the seam; delete tests on deleted shallow modules.

Deepening process (evaluate + act)

Symptoms of shallowness: wide interface/thin impl; chains of tiny modules per concept; setup-heavy test explosion; dependency fan-out; repeated caller setup. Several together → deepening candidate.

  1. Scope before scanning (YAGNI) — user direction wins; else walk git log --oneline for hot spots. Read .devin/CONTEXT.md + ADRs first. Broad/unfamiliar → research deep-mode before the sub-agent.
  2. Explore with an architect/researcher sub-agent — organic, noting friction; apply the deletion test to suspects.
  3. Present candidates — self-contained HTML report in OS temp dir ($TMPDIR//tmp/%TEMP%, architecture-review-<ts>.html), Tailwind + Mermaid via CDN, before/after visuals, per candidate: files, problem, solution, locality/leverage benefits, strength badge (Strong / Worth exploring / Speculative). Open it for the user.
  4. Act — pick the refactor move per dependency category (reference/DEEPENING.md); tests land at the deepened interface.

Legacy modernization protocol

  1. Characterization tests first — capture current behavior before touching.
  2. Find seams — where new code can replace old.
  3. Strangle incrementally — route small slices through new impls.
  4. Refactor locally — extract, rename, deduplicate.
  5. Verify each step — tests + diff-check.
  6. Document — ADRs for architecture changes and deprecated paths.

Each commit leaves the system testable and no worse than before. Report before/after: tests, complexity, migration status.

04 同仓库更多 Skills

Leostruka
Leostruka/devin-bundle

montador-de-ideias

Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.

★ 0
Leostruka
Leostruka/devin-bundle

git-github-adaptive-engineering

Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.

★ 0
Leostruka
Leostruka/devin-bundle

adaptive-agenda-calendar-routine-engine

Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0