Skip to content

Commit e038071

Browse files
raifdmuellerclaude
andcommitted
feat: add BDD and YAGNI semantic anchors (resolves merge conflicts from LLM-Coding#138, LLM-Coding#139)
Content from @Nantero1's original PRs LLM-Coding#138 and LLM-Coding#139, rebased on current main after merging LLM-Coding#137, LLM-Coding#140, LLM-Coding#142, LLM-Coding#143. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f6e0951 commit e038071

File tree

4 files changed

+107
-0
lines changed

4 files changed

+107
-0
lines changed

docs/all-anchors.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ include::anchors/spot-principle.adoc[leveloffset=+2]
3333

3434
include::anchors/ssot-principle.adoc[leveloffset=+2]
3535

36+
include::anchors/yagni.adoc[leveloffset=+2]
37+
3638
<<<
3739

3840
== Development Workflow
@@ -155,6 +157,8 @@ include::anchors/wardley-mapping.adoc[leveloffset=+2]
155157

156158
== Testing & Quality Practices
157159

160+
include::anchors/bdd-given-when-then.adoc[leveloffset=+2]
161+
158162
include::anchors/iec-61508-sil-levels.adoc[leveloffset=+2]
159163

160164
include::anchors/mutation-testing.adoc[leveloffset=+2]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
= BDD (Behavior-Driven Development)
2+
:categories: testing-quality
3+
:roles: software-developer, qa-engineer, business-analyst, product-owner
4+
:proponents: Dan North
5+
:related: tdd-london-school, tdd-chicago-school, user-story-mapping
6+
:tags: bdd, gherkin, cucumber, specification-by-example, three-amigos, given-when-then, living-documentation
7+
8+
[%collapsible]
9+
====
10+
Also known as:: Specification by Example, Executable Specifications
11+
12+
[discrete]
13+
== *Core Concepts*:
14+
15+
Given-When-Then:: Structured scenario format — Given a precondition, When an action occurs, Then an expected outcome results
16+
17+
Specification by Example:: Concrete examples as executable specifications that define system behavior
18+
19+
Three Amigos:: Collaborative discovery sessions between developer, tester, and business representative
20+
21+
Gherkin syntax:: Domain-specific language for writing human-readable, machine-executable scenarios
22+
23+
Living documentation:: Tests that serve as always-current system documentation
24+
25+
Outside-in specification:: Start from desired business behavior, work inward to implementation
26+
27+
Ubiquitous language:: Shared vocabulary bridging technical and business stakeholders in scenarios
28+
29+
Discovery workshops:: Structured conversations to uncover requirements through examples before implementation
30+
31+
32+
Key Proponent:: Dan North ("Introducing BDD", 2006), creator of JBehave which influenced Cucumber's design (Cucumber created by Aslak Hellesøy, 2008)
33+
34+
[discrete]
35+
== *When to Use*:
36+
37+
* Cross-functional teams needing shared understanding of requirements
38+
* Systems where business rules are complex and need clear documentation
39+
* Projects requiring executable acceptance criteria
40+
* Bridging communication gaps between technical and non-technical stakeholders
41+
42+
[discrete]
43+
== *Related Anchors*:
44+
45+
* <<tdd-london-school,TDD, London School>> - Outside-in development approach that complements BDD
46+
* <<tdd-chicago-school,TDD, Chicago School>> - Developer-focused TDD practice
47+
* <<user-story-mapping,User Story Mapping>> - Requirements discovery that feeds BDD scenarios
48+
====

docs/anchors/yagni.adoc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
= YAGNI (You Aren't Gonna Need It)
2+
:categories: design-principles
3+
:roles: software-developer, software-architect, consultant
4+
:proponents: Ron Jeffries, Kent Beck
5+
:related: dry-principle, spot-principle, tdd-chicago-school
6+
:tags: yagni, extreme-programming, simplicity, incremental-design, over-engineering
7+
8+
[%collapsible]
9+
====
10+
Full Name:: You Aren't Gonna Need It
11+
12+
[discrete]
13+
== *Core Concepts*:
14+
15+
Don't build for hypothetical futures:: Only implement functionality when it is actually needed, not when you foresee it might be needed
16+
17+
Speculative generality:: Anti-pattern of building abstractions for imagined future requirements that may never materialize
18+
19+
Incremental design:: Let design emerge through actual needs; evolve architecture as requirements become concrete
20+
21+
Cost of carry:: Unused code adds maintenance burden, increases complexity, and creates cognitive load for the entire team
22+
23+
Delete dead code:: Aggressively remove code that no longer serves a current purpose
24+
25+
Extreme Programming origin:: Core XP practice alongside TDD, refactoring, and continuous integration
26+
27+
Reversibility:: Prefer simple, changeable decisions over premature commitments to complex solutions
28+
29+
30+
Key Proponents:: Ron Jeffries (coined the phrase), Kent Beck ("Extreme Programming Explained", 1999)
31+
32+
[discrete]
33+
== *When to Use*:
34+
35+
* Fighting over-engineering and premature abstraction
36+
* Agile projects with iterative delivery and evolving requirements
37+
* Refactoring legacy systems burdened with unused features
38+
* When tempted to add "just in case" functionality or configurability
39+
40+
[discrete]
41+
== *Related Anchors*:
42+
43+
* <<dry-principle,DRY>> - Eliminates duplication of existing knowledge (complementary but distinct)
44+
* <<spot-principle,SPOT>> - Single Point of Truth, related simplicity principle
45+
* <<tdd-chicago-school,TDD, Chicago School>> - YAGNI is a core principle of classicist TDD
46+
====

skill/semantic-anchor-translator/references/catalog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
1414
- **Proponents:** Kent Beck, Martin Fowler
1515
- **Core:** State-based testing, real objects over mocks, refactoring-focused
1616

17+
### BDD (Behavior-Driven Development)
18+
- **Also known as:** Specification by Example, Executable Specifications
19+
- **Proponents:** Dan North
20+
- **Core:** Given-When-Then scenarios, Gherkin syntax, three amigos, living documentation, outside-in specification
21+
1722
### Test Double (Meszaros)
1823
- **Proponents:** Gerard Meszaros
1924
- **Core:** Taxonomy of test substitutes — Dummy (unused), Stub (canned responses), Spy (records calls), Mock (verifies interactions), Fake (simplified implementation)
@@ -86,6 +91,10 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
8691
### SSOT (Single Source of Truth)
8792
- **Core:** One system is the master for specific data
8893

94+
### YAGNI (You Aren't Gonna Need It)
95+
- **Proponents:** Ron Jeffries, Kent Beck
96+
- **Core:** Don't build for hypothetical futures, speculative generality anti-pattern, incremental design, delete dead code
97+
8998
### GoF Design Patterns
9099
- **Also known as:** Design Patterns, Gang of Four Patterns
91100
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides

0 commit comments

Comments
 (0)