coding-eng-laws
Use when analyzing code, architecture, team, or planning decisions using software engineering laws and principles, or when `coding-eng-laws` is mentioned.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- kind
- dev
- name
- coding-eng-laws
- description
- Use when analyzing code, architecture, team, or planning decisions using software engineering laws and principles, or when `coding-eng-laws` is mentioned.
02 资源文件 64
- 参考文档references/coding-and-design-principles/MetaSkill.md3.4 KB
- 参考文档references/coding-and-design-principles/references/dry-principle.md3.4 KB
- 参考文档references/coding-and-design-principles/references/kiss-principle.md3.7 KB
- 参考文档references/coding-and-design-principles/references/law-of-demeter.md4.4 KB
- 参考文档references/coding-and-design-principles/references/principle-of-least-astonishment.md3.9 KB
- 参考文档references/coding-and-design-principles/references/solid-principles.md4.6 KB
- 参考文档references/coding-and-design-principles/references/yagni.md3.3 KB
- 参考文档references/decision-making-cognitive-biases/MetaSkill.md5.2 KB
- 参考文档references/decision-making-cognitive-biases/references/confirmation-bias.md4.0 KB
- 参考文档references/decision-making-cognitive-biases/references/cunninghams-law.md3.5 KB
- 参考文档references/decision-making-cognitive-biases/references/dunning-kruger-effect.md3.0 KB
- 参考文档references/decision-making-cognitive-biases/references/first-principles-thinking.md3.8 KB
- 参考文档references/decision-making-cognitive-biases/references/hanlons-razor.md2.9 KB
- 参考文档references/decision-making-cognitive-biases/references/hype-cycle-amaras-law.md3.3 KB
- 参考文档references/decision-making-cognitive-biases/references/inversion.md3.3 KB
- 参考文档references/decision-making-cognitive-biases/references/lindy-effect.md3.7 KB
- 参考文档references/decision-making-cognitive-biases/references/map-is-not-the-territory.md3.5 KB
- 参考文档references/decision-making-cognitive-biases/references/occams-razor.md3.3 KB
- 参考文档references/decision-making-cognitive-biases/references/pareto-principle.md4.2 KB
- 参考文档references/decision-making-cognitive-biases/references/sunk-cost-fallacy.md3.8 KB
- 参考文档references/people-teams-organizations/MetaSkill.md3.6 KB
- 参考文档references/people-teams-organizations/references/brooks-law.md3.1 KB
- 参考文档references/people-teams-organizations/references/bus-factor.md3.4 KB
- 参考文档references/people-teams-organizations/references/conways-law.md3.2 KB
- 参考文档references/people-teams-organizations/references/dilbert-principle.md3.2 KB
- 参考文档references/people-teams-organizations/references/dunbars-number.md3.1 KB
- 参考文档references/people-teams-organizations/references/peter-principle.md3.0 KB
- 参考文档references/people-teams-organizations/references/prices-law.md3.8 KB
- 参考文档references/people-teams-organizations/references/putts-law.md3.7 KB
- 参考文档references/people-teams-organizations/references/ringelmann-effect.md3.3 KB
- 参考文档references/quality-maintenance-evolution/MetaSkill.md3.9 KB
- 参考文档references/quality-maintenance-evolution/references/boy-scout-rule.md3.6 KB
- 参考文档references/quality-maintenance-evolution/references/broken-windows-theory.md3.5 KB
- 参考文档references/quality-maintenance-evolution/references/kernighans-law.md3.0 KB
- 参考文档references/quality-maintenance-evolution/references/lehmans-laws.md4.3 KB
- 参考文档references/quality-maintenance-evolution/references/linuss-law.md4.1 KB
- 参考文档references/quality-maintenance-evolution/references/murphys-law.md2.8 KB
- 参考文档references/quality-maintenance-evolution/references/pesticide-paradox.md3.9 KB
- 参考文档references/quality-maintenance-evolution/references/postels-law.md4.0 KB
- 参考文档references/quality-maintenance-evolution/references/sturgeons-law.md2.9 KB
- 参考文档references/quality-maintenance-evolution/references/technical-debt.md4.1 KB
- 参考文档references/quality-maintenance-evolution/references/testing-pyramid.md3.4 KB
- 参考文档references/ROUTER.md5.9 KB
- 参考文档references/scale-performance-growth/MetaSkill.md2.6 KB
- 参考文档references/scale-performance-growth/references/amdahls-law.md2.5 KB
- 参考文档references/scale-performance-growth/references/gustafsons-law.md3.4 KB
- 参考文档references/scale-performance-growth/references/metcalfes-law.md3.2 KB
- 参考文档references/system-and-architecture/MetaSkill.md3.6 KB
- 参考文档references/system-and-architecture/references/cap-theorem.md3.6 KB
- 参考文档references/system-and-architecture/references/fallacies-of-distributed-computing.md3.5 KB
- 参考文档references/system-and-architecture/references/galls-law.md3.4 KB
- 参考文档references/system-and-architecture/references/hyrums-law.md3.0 KB
- 参考文档references/system-and-architecture/references/law-of-leaky-abstractions.md4.0 KB
- 参考文档references/system-and-architecture/references/law-of-unintended-consequences.md2.8 KB
- 参考文档references/system-and-architecture/references/second-system-effect.md3.1 KB
- 参考文档references/system-and-architecture/references/teslers-law.md3.1 KB
- 参考文档references/system-and-architecture/references/zawinskis-law.md3.4 KB
- 参考文档references/time-estimation-planning/MetaSkill.md3.1 KB
- 参考文档references/time-estimation-planning/references/gilbs-law.md3.4 KB
- 参考文档references/time-estimation-planning/references/goodharts-law.md3.5 KB
- 参考文档references/time-estimation-planning/references/hofstadters-law.md3.0 KB
- 参考文档references/time-estimation-planning/references/ninety-ninety-rule.md3.5 KB
- 参考文档references/time-estimation-planning/references/parkinsons-law.md3.1 KB
- 参考文档references/time-estimation-planning/references/premature-optimization.md4.3 KB
03 SKILL.md 正文
Software Engineering Laws — Thinking Lens
Purpose
A library of 56 named laws, principles, and cognitive biases organized as seven analytical lenses. The user describes a situation — a slipping deadline, a team that keeps growing dysfunctional, a codebase that no one trusts, a decision they keep second-guessing — and the router pulls the relevant cluster of laws to reason with.
The collection is harness-agnostic and domain-agnostic: most of the laws apply equally to software, to running a business, to managing a team, and to personal life choices. Pareto, Parkinson, Sunk Cost, Inversion, Dunbar, and First Principles are just as useful when you are deciding whether to keep a relationship, a side project, or an entire career path.
Each law is presented with what it says, where it came from, why it matters, and how it manifests in real situations.
What's Included
| # | Lens | Laws | When to invoke |
|---|---|---|---|
| 1 | system-and-architecture |
9 | Designing systems, debugging emergent complexity, distributed-system trade-offs |
| 2 | people-teams-organizations |
9 | Hiring, team scaling, comms structure, productivity distribution |
| 3 | time-estimation-planning |
6 | Estimates failing, deadlines slipping, "almost done" debugging |
| 4 | quality-maintenance-evolution |
11 | Tech debt, code rot, testing strategy, defect economics |
| 5 | scale-performance-growth |
3 | Parallelization limits, network-effect investments |
| 6 | coding-and-design-principles |
6 | Code review, refactoring, API design, "is this over-engineered?" |
| 7 | decision-making-cognitive-biases |
12 | High-stakes decisions, debating, hiring, life choices, second-guessing |
Total: 56 laws.
Invocation Scenarios
| User says | Router routes to |
|---|---|
| "Why is this distributed system so hard to keep consistent?" | system-and-architecture (CAP, Fallacies of Distributed Computing) |
| "We added two engineers and we're moving slower" | people-teams-organizations (Brooks, Ringelmann) |
| "I keep underestimating this project" | time-estimation-planning (Hofstadter, Ninety-Ninety) |
| "Our codebase feels like it's rotting" | quality-maintenance-evolution (Broken Windows, Lehman, Tech Debt) |
| "Should I parallelize this pipeline?" | scale-performance-growth (Amdahl, Gustafson) |
| "Is this code over-engineered?" | coding-and-design-principles (KISS, YAGNI, SOLID) |
| "I'm not sure if I'm being objective about this decision" | decision-making-cognitive-biases (Confirmation Bias, Inversion, Sunk Cost) |
| "Apply the laws to: <situation>" | Router selects best-fit lens, may compose multiple |
| "What law fits this?" | Router returns shortlist with one-line rationale |
Usage Examples
Example 1 — team coordination
User: We added three senior engineers to the late project and the deadline keeps slipping further. What's going on?
The skill loads people-teams-organizations → applies Brooks's Law
(adding manpower to a late project makes it later, due to onboarding cost
and communication overhead) and Ringelmann Effect (per-person
productivity drops as group size grows). Diagnoses ramp time + comms
overhead as the actual cost. Suggests freezing team size and re-scoping.
Example 2 — life decision composed with code decision
User: I've spent six months on this side project and it's not getting traction. Should I push through?
The skill loads decision-making-cognitive-biases → applies Sunk Cost
Fallacy (past investment is irrelevant to forward decision) and
Inversion (instead of "should I keep going?", ask "if I were starting
today knowing what I know, would I start this?"). Composes with Pareto
Principle to ask which 20% of the project, if any, has produced 80% of
the value or learning so far.
Example 3 — code review
User: This new abstraction layer is supposed to make things easier but it feels worse. Is it?
The skill loads coding-and-design-principles → applies YAGNI (was
the abstraction added speculatively?), KISS (does it preserve the
simpler call site?), Law of Leaky Abstractions from
system-and-architecture (does it actually hide complexity or just
relocate it?), and Tesler's Law (irreducible complexity has to live
somewhere — was it just shifted from caller to abstraction?).
Example 4 — diagnose without moralizing
User: My team keeps building features no one uses.
The skill loads decision-making-cognitive-biases (Confirmation Bias —
team confirms its own roadmap), composes with coding-and-design-principles
(YAGNI — building for hypothetical needs), and time-estimation-planning
(Goodhart — if "ship N features per quarter" is the metric, the metric
is the problem). The diagnosis is structural, not a moral failing.
How to Use This Collection
- Start shallow. Read this
SKILL.mdand let the router pick a lens. - Compose when needed. Real situations rarely fit one lens — Brooks composes with Conway, YAGNI composes with Sunk Cost, Murphy composes with almost everything. The router will suggest composition when the situation is ambiguous.
- Reference files are source material. Each sub-skill's
references/holds the per-law detail pages. Cite them to ground reasoning, but the lens — not the page — is what's being applied. - Hold conclusions loosely. Laws are pattern names, not proofs. They are useful when they help you ask better questions; ignore them when the situation genuinely doesn't fit.
Intellectual Posture
- Diagnose before prescribing. Pick the law that describes what is happening before reaching for the law that tells you what to do.
- Inversion first when stuck. When a question is hard ("how do I make this team productive?"), invert it ("what would guarantee this team is unproductive?") and remove those causes.
- Goodhart any metric you propose. If you propose a target, immediately ask how it will be gamed.
- The law is a hypothesis, not a verdict. "This looks like Brooks's Law" invites investigation; "this is Brooks's Law" closes it prematurely.
Routing
Load references/ROUTER.md to determine which sub-skill handles this
request, then load that sub-skill's MetaSkill.md. Each sub-skill's
MetaSkill.md provides an overview, a table of its laws with one-liners,
and pointers to the per-law detail files in its own references/.
Adding a new law
To add a 57th law (or any new principle / pattern / bias):
- Pick the sub-skill it belongs to (or create a new one if it doesn't fit any existing lens).
- Drop the law's detail page into that sub-skill's
references/askebab-case-name.md. Use the existing pages as a format template (Takeaways, Overview, Examples, Origins, Further Reading, Related Laws). - Append one row to that sub-skill's
MetaSkill.mdlaw table. - Append the law's distinctive keywords to that sub-skill's
MetaSkill.mdUSE WHENline. - Append the same keywords to
references/ROUTER.mdfor the matching row, and to this rootSKILL.mdUSE WHEN(so the scanner surfaces the collection on those triggers).
No other file needs to change.
Source
All 56 detail pages are reproduced verbatim from lawsofsoftwareengineering.com, organized into the seven-part structure used in the original Table of Contents. Each detail page retains its original "Further Reading" and "Related Laws" cross-links.
04 同仓库更多 Skills
writing-great-skills
Use when creating, modifying, evaluating a skill.
writing-for-agents
Use when creating, editing, or reviewing a skill, AGENTS.md, CLAUDE.md, or another document agents read.
why
Use for questions about design rationale, the history of regressions or incidents, or the evidence behind thresholds and tradeoffs. Use `how` for runtime behavior. Do not use for plain commit or date lookups.
verify-video-archive
Use when validating the macOS or Linux archive workflow reached by `just convert-video`, including real media, prerequisites, terminal progress, source safety, locking, and recovery.
verify-transcript
Use when validating transcript CLI behavior, locating its verification features, or running the paid YouTube end-to-end check.
verify-skills
Use when verifying `just compile-skills`, `just remote-skills`, `just install-skills`, or `just skills-discover` in the skills repository, such as after changing their scripts or adding, renaming, or moving a skill.