跳到主要内容
知仓学习社ZHICANG

improve-architecture

Audit an area of the codebase and propose the smallest structural moves that improve it - untangle boundaries, kill duplication, fix seams, break cy…

不碰外部(只输出文字)无严重或高危命中rohitg00/pro-workflow

它会碰到什么

扫了多少1 个文本文件,3 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

improve-architecture

Invest in the shape of the system a little at a time rather than paying for a

rewrite later. This skill diagnoses and proposes; it does not rewrite on its own.

Method

  1. Map first. Get the current shape before judging it - entry points,

modules, data flow, who calls whom. Reuse module-map for the one-screen

view; do not skip to opinions.

  1. Find the strain. Look for the load-bearing problems, not style nits:
  • God modules that everything imports and nothing can change safely.
  • Leaky boundaries - a module reaching into another's internals instead of

its surface.

  • Duplicated logic that drifts (the same rule implemented three ways).
  • Wrong seams - the code is split where it does not bend and fused where it

does.

  • Cyclic dependencies.
  • A shape that fights the domain (see domain-modeling - boundaries in code

should track boundaries in the language).

  1. Propose the smallest move. For each problem, the least change that

relieves it: extract a boundary, collapse a duplicate, invert a dependency,

move a seam. Prefer a sequence of safe steps over one big cut.

  1. Rank by leverage. Order the moves by pain relieved over effort. Say which

are safe now and which need a test net first (pair with tdd).

  1. Record the big calls. For a structural change a future reader would

question, write a decision record in docs/decisions/NNNN-slug.md: context,

choice, alternatives rejected, why.

Guardrails

  • Diagnose, do not rewrite. The deliverable is a plan the user approves before

any code moves.

  • No churn for taste. A move must relieve a named strain; "cleaner" is not a

reason.

  • Three similar lines beat a premature abstraction - do not trade duplication

for indirection unless the duplication actually drifts.

  • Keep behavior fixed. Structural moves are refactors; land them behind green

tests.

Output

A prioritized list: each item is the problem, the smallest move, the risk, and

whether it needs a test net first. Plus decision records for the big moves. No

code changes until the user picks what to do.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 2,870
本站分层T1
该仓技能数41
原文件路径skills/improve-architecture/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 41 个技能