Skip to content

Commit 939b08a

Browse files
raifdmuellerclaude
andcommitted
chore: regenerate all-anchors include + llms.txt + sitemap
Picks up the 4 anchors merged in #444 and #445 that the previous PRs did not regenerate (SLAP, Occam's Razor, Code Smells, WWCND). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b6ca93b commit 939b08a

4 files changed

Lines changed: 418 additions & 142 deletions

File tree

docs/all-anchors.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ include::anchors/three-act-structure.adoc[leveloffset=+2]
4747

4848
== Design Principles & Patterns
4949

50+
include::anchors/code-smells.adoc[leveloffset=+2]
51+
5052
include::anchors/cohesion-criteria.adoc[leveloffset=+2]
5153

5254
include::anchors/crc-cards.adoc[leveloffset=+2]
@@ -105,6 +107,8 @@ include::anchors/grasp.adoc[leveloffset=+2]
105107

106108
include::anchors/kiss-principle.adoc[leveloffset=+2]
107109

110+
include::anchors/single-level-of-abstraction-principle.adoc[leveloffset=+2]
111+
108112
include::anchors/solid-dip.adoc[leveloffset=+2]
109113

110114
include::anchors/solid-isp.adoc[leveloffset=+2]
@@ -197,6 +201,10 @@ include::anchors/five-whys.adoc[leveloffset=+2]
197201

198202
include::anchors/morphological-box.adoc[leveloffset=+2]
199203

204+
include::anchors/occams-razor.adoc[leveloffset=+2]
205+
206+
include::anchors/what-would-chuck-norris-do.adoc[leveloffset=+2]
207+
200208
<<<
201209

202210
== Requirements Engineering
@@ -241,6 +249,8 @@ include::anchors/iso-25010.adoc[leveloffset=+2]
241249

242250
include::anchors/lasr.adoc[leveloffset=+2]
243251

252+
include::anchors/lehmans-classification.adoc[leveloffset=+2]
253+
244254
include::anchors/madr.adoc[leveloffset=+2]
245255

246256
include::anchors/tracer-bullet.adoc[leveloffset=+2]

website/public/data/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generatedAt": "2026-04-20T10:51:07.435Z",
2+
"generatedAt": "2026-04-21T07:31:33.431Z",
33
"version": "1.0.0",
44
"counts": {
55
"anchors": 135,

website/public/llms.txt

Lines changed: 227 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Semantic Anchors — Complete Reference
22

3-
> 131 well-defined terms, methodologies, and frameworks
3+
> 136 well-defined terms, methodologies, and frameworks
44
> that serve as precision reference points when communicating with LLMs.
55
> Source: https://github.com/LLM-Coding/Semantic-Anchors
66
> Website: https://llm-coding.github.io/Semantic-Anchors/
@@ -967,6 +967,54 @@ Ready to explore? [Browse the catalog →](https://llm-coding.github.io/Semantic
967967

968968
## Design Principles & Patterns
969969

970+
### Code Smells
971+
972+
***Full Name***: Code Smells
973+
974+
***Also known as***: Bad Smells in Code, Refactoring Smells
975+
976+
[discrete]
977+
## **Core Concepts**:
978+
979+
***What a smell is***
980+
A **surface indication** in the code that usually points to a deeper design problem. Smells are heuristic: they are quick to spot, do not prove a defect exists, and are evaluated in context. A smell tells you **where to look**, not **what to do**.
981+
982+
***Fowler's catalogue***
983+
Martin Fowler's _Refactoring_ (1999, 2nd ed. 2018, with the original smell chapter co-authored by Kent Beck) is the canonical catalogue. Each smell is paired with a refactoring that typically resolves it. Common groupings of Fowler's 20+ smells:
984+
985+
* **Bloaters** — structures that grow too large: Long Method, Large Class, Long Parameter List, Primitive Obsession, Data Clumps.
986+
* **Object-Orientation Abusers** — incomplete or inverted use of OO: Switch Statements, Refused Bequest, Alternative Classes with Different Interfaces, Temporary Field.
987+
* **Change Preventers** — structures that multiply the cost of change: Divergent Change (one class changes for many reasons), Shotgun Surgery (one change touches many classes), Parallel Inheritance Hierarchies.
988+
* **Dispensables** — code that earns its keep poorly: Comments (as compensation), Duplicate Code, Lazy Class, Data Class, Dead Code, Speculative Generality.
989+
* **Couplers** — excessive or inappropriate coupling: Feature Envy, Inappropriate Intimacy, Message Chains, Middle Man.
990+
991+
***Martin's extensions***
992+
Robert C. Martin's _Clean Code_ (2008), Appendix A "Smells and Heuristics", extends Fowler's catalogue with additional smells organised by concern — Comments, Environment, Functions, General, Java, Names, Tests — about 65 heuristics in total. These are complementary refinements, not a replacement for Fowler's set.
993+
994+
***Terminology origin***
995+
Kent Beck coined the term "code smell" in the 1990s; Fowler wrote the book that made it the standard vocabulary. "It just feels wrong" became expressible and teachable.
996+
997+
***Key Proponents***: Kent Beck (coined the term), Martin Fowler (_Refactoring_, 1999, 2nd ed. 2018 — canonical catalogue), Robert C. Martin (_Clean Code_, 2008, Appendix A — extended enumeration).
998+
999+
[discrete]
1000+
## **When to Use**:
1001+
1002+
* Code review: a shared vocabulary for "this feels wrong" that turns taste into checkable signals
1003+
* Refactoring planning: each smell maps to known refactorings, so a smell is an actionable handle
1004+
* Teaching: junior developers learn faster from a named smell + named fix than from abstract design lectures
1005+
* Technical-debt inventory: enumerate smells to quantify and prioritise cleanup work
1006+
* LLM prompting: asking the model to "identify code smells" activates a richer inspection than "find problems"
1007+
* Self-review before PR: a mental pass over the smell list catches issues a reader would otherwise flag
1008+
1009+
[discrete]
1010+
## **Related Anchors**:
1011+
1012+
* Patterns of Enterprise Application Architecture - Same author; Fowler's broader design-pattern vocabulary
1013+
* Cohesion Criteria - Many smells (Feature Envy, Divergent Change, Large Class) are low-cohesion symptoms
1014+
* SOLID Principles - SOLID violations manifest as identifiable smells; smell→principle is a useful diagnostic direction
1015+
* SOLID SRP - Divergent Change is almost always an SRP violation
1016+
* KISS Principle - Speculative Generality and Comments-as-compensation are KISS failures
1017+
9701018
### Cohesion Criteria
9711019

9721020
***Full Name***: Cohesion Criteria (Constantine & Yourdon)
@@ -1677,6 +1725,48 @@ Represent an operation to be performed on the elements of an object structure. V
16771725
* DRY - Eliminate redundancy to keep codebases simple and consistent
16781726
* SOLID Principles - Structured guidelines that reinforce clean, simple designs
16791727

1728+
### Single Level of Abstraction Principle (SLAP)
1729+
1730+
***Full Name***: Single Level of Abstraction Principle
1731+
1732+
***Also known as***: SLAP, SLA Principle, One Level of Abstraction Per Function
1733+
1734+
[discrete]
1735+
## **Core Concepts**:
1736+
1737+
***Core rule***
1738+
All statements within a single function (or block) should operate at the same level of abstraction. High-level orchestration and low-level mechanics do not belong in the same body.
1739+
1740+
***Why it works***
1741+
A reader scanning a function can trust it to answer **one** question at **one** resolution. Mixing levels forces the reader to context-switch between "what is this step doing" and "how exactly is it being done" on every line, which is the primary driver of the "I have to read this three times" feeling.
1742+
1743+
***Applying SLAP***
1744+
* When you notice a function mixing levels, extract the low-level details into well-named helper functions whose names **express the next level of detail**.
1745+
* The top-level function becomes a readable summary — almost a table of contents — of the work.
1746+
* This is the **Composed Method** pattern (Kent Beck, _Smalltalk Best Practice Patterns_, 1996): build functions from calls to other methods at the same conceptual level.
1747+
1748+
***Relation to Clean Code***
1749+
Robert C. Martin formalised SLAP as one of the function-design rules in _Clean Code_ (2008), alongside "Functions should be small", "Do one thing", and "Use descriptive names". SLAP is the organising principle that makes "small functions" readable rather than just fragmented.
1750+
1751+
***Key Proponents***: Kent Beck (_Smalltalk Best Practice Patterns_, 1996 — "Composed Method"), Robert C. Martin (_Clean Code_, 2008).
1752+
1753+
[discrete]
1754+
## **When to Use**:
1755+
1756+
* Refactoring a long function that "does too much" — SLAP tells you **how** to split it, not just that you should
1757+
* Code review: a natural smell-detector for functions that mix orchestration with mechanics
1758+
* Teaching junior developers a concrete, checkable rule that produces readable code
1759+
* Designing a new algorithm top-down: write the high-level steps as calls to not-yet-existing helpers, then fill them in
1760+
* Reconstructing the intent of legacy code — lift the orchestration out and the design becomes visible
1761+
1762+
[discrete]
1763+
## **Related Anchors**:
1764+
1765+
* Cohesion Criteria - SLAP produces functional cohesion by keeping a function focused on one conceptual step
1766+
* KISS Principle - SLAP is one concrete technique for keeping functions simple
1767+
* SOLID SRP - SRP applies at the class level what SLAP applies at the function level
1768+
* Clean Architecture - Layered abstraction at the architectural scale mirrors SLAP at the code scale
1769+
16801770
### SOLID-Dependency Inversion Principle
16811771

16821772
***Full Name***: SOLID Dependency Inversion Principle (DIP)
@@ -3192,6 +3282,101 @@ Filter by constraints (e.g., "AsciiDoc + Hugo not well-supported")
31923282
* Stopping at matrix creation without exploring combinations
31933283
* Forgetting to filter out infeasible combinations
31943284

3285+
### Occam's Razor
3286+
3287+
***Full Name***: Occam's Razor (also spelled Ockham's Razor)
3288+
3289+
***Also known as***: Law of Parsimony, Principle of Parsimony, _Lex Parsimoniae_, "Entities should not be multiplied beyond necessity"
3290+
3291+
[discrete]
3292+
## **Core Concepts**:
3293+
3294+
***Core rule***
3295+
Among competing hypotheses that explain the same observations equally well, prefer the one that requires the fewest assumptions. The razor **shaves off** unnecessary entities, causes, or mechanisms.
3296+
3297+
**What it is *not***
3298+
* Not a rule to be brief or terse — that is a stylistic choice, not an epistemic one.
3299+
* Not a proof that the simpler answer is **true** — only a guide to which hypothesis to prefer, investigate first, or commit to under uncertainty.
3300+
* Not a licence for KISS-style solution simplification — Occam operates at the level of **explanations**, KISS at the level of **solutions**. They overlap but are not the same razor.
3301+
3302+
***How it is used***
3303+
* As a **selection filter** under uncertainty — when two stories fit the data, start with the one that assumes less.
3304+
* As a **debugging heuristic** — before assuming a bug requires a race condition plus caching layer plus stale DNS, check whether a single off-by-one explains everything.
3305+
* In **architecture decisions** — a design that needs three new components to justify itself is evidentially weaker than one that reuses existing pieces.
3306+
* In **diagnostic reasoning** — prefer explanations grounded in the system's known mechanics over ones that require novel failure modes.
3307+
3308+
***Limits and counters***
3309+
The razor is a **prior**, not a verdict. Reality is frequently non-parsimonious, and "simpler" is relative to a chosen ontology. Einstein's corollary — "_as simple as possible, but no simpler_" — warns against under-fitting. Pair Occam with evidence, not as a substitute for it.
3310+
3311+
***Key Proponents***: William of Ockham (c. 1287–1347, _Summa Logicae_, _Quodlibetal Questions_); the principle predates Ockham in Aristotle and Scotus but carries his name due to his repeated methodological use of it. Modernised by Bertrand Russell and formalised as minimum-description-length / Bayesian simplicity priors in 20th-century philosophy of science.
3312+
3313+
[discrete]
3314+
## **When to Use**:
3315+
3316+
* Debugging: triage competing theories of a bug before instrumenting for all of them
3317+
* Architecture review: challenge proposals that introduce new components to explain observed requirements
3318+
* Root-cause analysis: pair with Five Whys to avoid stopping at an elaborate but unjustified explanation
3319+
* Incident response: the outage likely has **one** cause matching the data, not a conspiracy
3320+
* Requirements clarification: pick the interpretation that requires fewest hidden assumptions about the user
3321+
* LLM prompting: ask the model to prefer the explanation with the fewest moving parts when diagnosing
3322+
3323+
[discrete]
3324+
## **Related Anchors**:
3325+
3326+
* KISS Principle - Sibling razor applied to **solutions** rather than **explanations**
3327+
* YAGNI - Applies parsimony to future requirements: don't build what you can't justify
3328+
* Five Whys - Occam helps pick which "why" to pursue when the chain forks
3329+
* MECE Principle - Both disciplines of hypothesis hygiene; MECE ensures coverage, Occam ranks by parsimony
3330+
* Devil's Advocate - Devil's Advocate stress-tests the hypothesis Occam has selected
3331+
3332+
### What Would Chuck Norris Do? (WWCND)
3333+
3334+
***Full Name***: What Would Chuck Norris Do?
3335+
3336+
***Also known as***: WWCND, Chuck Norris framing, "What would Chuck do?"
3337+
3338+
[discrete]
3339+
## **Core Concepts**:
3340+
3341+
***What the anchor activates***
3342+
A **disposition**, not a methodology: commit to the most direct, effective solution; refuse hedging; refuse premature optimisation; refuse ceremony that does not buy risk reduction. The activation is driven by the Chuck Norris facts meme corpus (circa 2005–) and its well-established software subcorpus ("Chuck Norris doesn't write unit tests — the code is too afraid to fail"), both of which are densely present in modern LLM training data.
3343+
3344+
***Scope note***
3345+
WWCND is a **Tier 3, qualified** anchor. It is not self-standing in the way that GoF Patterns or DDD are. Used bare it produces humour with signal; used with a short qualifier — "WWCND: commit to the most direct solution" — it behaves reliably across scenarios. It activates one disposition, not an interconnected body of engineering knowledge.
3346+
3347+
***How it differs from neighbours***
3348+
* **Devil's Advocate** activates contrary-argument generation — a rhetorical operation against a stated position. WWCND activates direct-commitment problem-solving. Complementary, not substitutable, in the same way KISS and YAGNI coexist.
3349+
* **KISS** constrains the shape of a **solution** toward simplicity. WWCND constrains the **stance** toward commitment under uncertainty. A WWCND recommendation can still be a complex solution if that is the most direct one.
3350+
* **Rambo** and other action-hero framings produce convergent recommendations but different vocabulary: military metaphors ("fortify the perimeter") rather than software-native framing ("Microservices migrate to Chuck Norris, not the other way around").
3351+
3352+
***Why it works***
3353+
The Chuck Norris humour format is built on **absurd competence** — the subject overcomes constraints that would stop anyone else. Applied to software problems, that frame consistently steers the model toward action-biased, commitment-first answers and away from multi-option hedging. Cross-model testing (see below) shows the activation is stable enough to treat as an anchor rather than a stylistic quirk.
3354+
3355+
***Empirical validation***
3356+
Validated by Cornelius Schumacher (Protocol v3, April 2026) across Claude Sonnet 4.6, Gemini 3.1 Pro, and GPT-5.3 Codex: 19 prompts × N=2 = 114 manually scored responses. Key results: WWCND exceeds a "be direct, don't hedge" control condition on engagement (12/12 scenario-model pairs) and insight quality (12/12); three independent models converged on the same primary recommendation in all four test scenarios (12/12 agreement); five architectural patterns (Strangler Fig, modular monolith / packwerk, team expertise, regression-for-specific-bug, CI gate) appeared unprompted across all three models. Full report: https://github.com/cornelius/what-would-chuck-norris-do
3357+
3358+
***Known limitation***
3359+
GPT-5.3 Codex activates the decisiveness signal but **not** the character voice — it treats all persona anchors with a uniform pragmatic style. Expect diminished distinctiveness on Codex-class models. The recommendation content is consistent; the framing is muted.
3360+
3361+
***Key Proponents***: Ian Spector, _The Truth About Chuck Norris_ (Gotham Books, 2007); Ian Spector and Chuck Norris, _The Official Chuck Norris Fact Book_ (Thomas Nelson, 2009) — co-authored with Norris. Empirical catalog validation: Cornelius Schumacher, Protocol v3 (April 2026).
3362+
3363+
[discrete]
3364+
## **When to Use**:
3365+
3366+
* Breaking decision paralysis — teams stuck in a prolonged trade-off debate where any reasonable commitment is better than continued deliberation
3367+
* Counter-balancing excessive hedging — when a previous answer is multi-optioned to the point of uselessness, apply WWCND to collapse to a recommendation
3368+
* Architecture or technology picks where the differences are marginal and the cost of not deciding exceeds the cost of a suboptimal pick
3369+
* Pairing with Devil's Advocate — WWCND commits, Devil's Advocate then stress-tests the commitment. Together they avoid both paralysis and overcommitment.
3370+
* Avoid in situations that require calibrated judgment between genuinely different outcomes — the anchor's commitment bias can underweight nuance
3371+
3372+
[discrete]
3373+
## **Related Anchors**:
3374+
3375+
* Devil's Advocate - Complementary partner: WWCND commits, Devil's Advocate challenges
3376+
* KISS Principle - Sibling in the simplification family, applied to **solutions** rather than **stance**
3377+
* YAGNI - Both resist ceremony and speculative complexity
3378+
* Occam's Razor - Occam selects the most parsimonious **explanation**; WWCND commits to the most direct **response**
3379+
31953380
---
31963381

31973382
## Requirements Engineering
@@ -3892,6 +4077,47 @@ MoSCoW = **M**ust have / **S**hould have / **C**ould have / **W**on't have
38924077
* ADR according to Nygard
38934078
* C4 Diagrams
38944079

4080+
### Lehman's Software Classification
4081+
4082+
***Full Name***: Lehman's Classification of Software (S-/P-/E-type) and Laws of Software Evolution
4083+
4084+
***Also known as***: SPE Classification, Lehman's SPE Taxonomy
4085+
4086+
[discrete]
4087+
## **Core Concepts**:
4088+
4089+
Three software types, classified by their relationship to the real world:
4090+
4091+
***S-type (Specification)***
4092+
Software whose problem can be fully and formally specified. Correctness is provable against the specification. The world outside the program is irrelevant to its validity. Example: a sorting algorithm, a compiler for a formally defined language.
4093+
4094+
***P-type (Problem)***
4095+
Software that addresses a real-world problem which cannot be fully specified, only approximated. The specification is a model of the real problem; the solution must be validated against the actual problem, not just the spec. Example: a chess-playing program, a weather forecasting system.
4096+
4097+
***E-type (Embedded)***
4098+
Software that becomes part of the real world and changes it through its use. This use in turn changes the environment and thereby the requirements — creating a feedback loop. Most business and organizational software is E-type. A "correct" E-type system drifts out of correctness over time even if nothing in it changes.
4099+
4100+
***Laws of Software Evolution***
4101+
Lehman derived eight laws from observing E-type systems, including **Continuing Change** (E-type systems must be continually adapted or become progressively less satisfactory), **Increasing Complexity** (complexity increases unless work is done to reduce it), **Self-Regulation**, **Conservation of Organisational Stability**, **Conservation of Familiarity**, **Continuing Growth**, **Declining Quality**, and **Feedback System**.
4102+
4103+
***Key Proponents***: Meir M. Lehman ("Programs, life cycles, and laws of software evolution", Proceedings of the IEEE, 1980); later developed with Laszlo Belady ("Program Evolution: Processes of Software Change", 1985).
4104+
4105+
[discrete]
4106+
## **When to Use**:
4107+
4108+
* Explaining why "finished" business software still needs ongoing investment
4109+
* Deciding how much effort to spend on formal specification vs. validation with users
4110+
* Framing requirements discussions — E-type means requirements will keep changing by nature, not by failure
4111+
* Reasoning about why TDD and formal proofs map cleanly onto S-type but are subtler for E-type
4112+
* Estimating maintenance budgets and justifying them to stakeholders
4113+
* Architectural trade-offs: E-type systems need change-friendliness above all
4114+
4115+
[discrete]
4116+
## **Related Anchors**:
4117+
4118+
* arc42 - Documentation template well suited for evolving E-type systems
4119+
* Cohesion Criteria - High cohesion reduces the cost of continuing change in E-type systems
4120+
38954121
### MADR
38964122

38974123
***Full Name***: Markdown Architectural Decision Records

0 commit comments

Comments
 (0)