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
- 参考文档reference/DEEPENING.md2.5 KB
- 参考文档reference/DESIGN-IT-TWICE.md2.6 KB
- 参考文档reference/HTML-REPORT.md6.5 KB
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.
- Scope before scanning (YAGNI) — user direction wins; else walk
git log --onelinefor hot spots. Read.devin/CONTEXT.md+ ADRs first. Broad/unfamiliar →researchdeep-mode before the sub-agent. - Explore with an
architect/researchersub-agent — organic, noting friction; apply the deletion test to suspects. - 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. - Act — pick the refactor move per dependency category
(
reference/DEEPENING.md); tests land at the deepened interface.
Legacy modernization protocol
- Characterization tests first — capture current behavior before touching.
- Find seams — where new code can replace old.
- Strangle incrementally — route small slices through new impls.
- Refactor locally — extract, rename, deduplicate.
- Verify each step — tests + diff-check.
- 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
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.
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.
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.
demo
Use when demonstrating a skill in a fixture project.
duplicate-skill
Use when testing duplicate skill name detection.
duplicate-skill
Use when testing duplicate skill name detection.