Skip to content

Commit 74062e5

Browse files
cpoepkeclaude
andcommitted
fix: sync catalog with docs/anchors and fix npm audit vulnerabilities
Catalog (skill/ + synced plugins/): - Add individual ### entries for all 23 GoF patterns (Abstract Factory, Builder, Factory Method, Prototype, Singleton, Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy, Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor) - Promote SOLID sub-principles from #### to ### level (SRP, OCP, LSP, ISP, DIP) - Add individual ### entries for all 5 test double variants (Dummy, Stub, Spy, Mock, Fake) npm audit (website/): - Run npm audit fix (resolved high-severity lodash/lodash-es vulnerabilities) - Add tmp>=0.2.4 override (fixes GHSA-52f5-9888-hmc6 symlink write in @lhci/cli) - Result: 0 vulnerabilities Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f95a9ee commit 74062e5

4 files changed

Lines changed: 266 additions & 139 deletions

File tree

plugins/semantic-anchors/skills/semantic-anchor-translator/references/catalog.md

Lines changed: 127 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 127 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,26 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
2828
- **Proponents:** Gerard Meszaros
2929
- **Core:** Taxonomy of test substitutes — Dummy (unused), Stub (canned responses), Spy (records calls), Mock (verifies interactions), Fake (simplified implementation)
3030

31+
### Test Double Dummy
32+
- **Proponents:** Gerard Meszaros
33+
- **Core:** Placeholder passed to fill required parameters but never actually used in the test; has no behavior
34+
35+
### Test Double Stub
36+
- **Proponents:** Gerard Meszaros
37+
- **Core:** Returns predefined (canned) responses to calls; does not verify interactions, only supplies data
38+
39+
### Test Double Spy
40+
- **Proponents:** Gerard Meszaros
41+
- **Core:** Stub that also records how it was called; assertions happen after the action, not as pre-programmed expectations
42+
43+
### Test Double Mock
44+
- **Proponents:** Gerard Meszaros
45+
- **Core:** Pre-programmed with expectations about which calls should be made; verifies interactions and fails immediately if expectations are violated
46+
47+
### Test Double Fake
48+
- **Proponents:** Gerard Meszaros
49+
- **Core:** Working but simplified implementation unsuitable for production; has real behavior (e.g. in-memory database) but takes shortcuts
50+
3151
### Testing Pyramid
3252
- **Core:** Many unit tests, fewer integration tests, fewest E2E tests
3353

@@ -131,23 +151,28 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
131151
### SOLID Principles
132152
- **Core:** Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
133153

134-
#### SOLID-SRP (Single Responsibility Principle)
154+
### SOLID-SRP
155+
- **Also known as:** Single Responsibility Principle
135156
- **Proponents:** Robert C. Martin
136157
- **Core:** Each class should have only one reason to change
137158

138-
#### SOLID-OCP (Open/Closed Principle)
159+
### SOLID-OCP
160+
- **Also known as:** Open/Closed Principle
139161
- **Proponents:** Robert C. Martin, Bertrand Meyer
140162
- **Core:** Open for extension, closed for modification
141163

142-
#### SOLID-LSP (Liskov Substitution Principle)
164+
### SOLID-LSP
165+
- **Also known as:** Liskov Substitution Principle
143166
- **Proponents:** Robert C. Martin, Barbara Liskov
144167
- **Core:** Subtypes must be substitutable for their base types
145168

146-
#### SOLID-ISP (Interface Segregation Principle)
169+
### SOLID-ISP
170+
- **Also known as:** Interface Segregation Principle
147171
- **Proponents:** Robert C. Martin
148172
- **Core:** Don't force clients to depend on unused interfaces
149173

150-
#### SOLID-DIP (Dependency Inversion Principle)
174+
### SOLID-DIP
175+
- **Also known as:** Dependency Inversion Principle
151176
- **Proponents:** Robert C. Martin
152177
- **Core:** Depend on abstractions, not concrete implementations
153178

@@ -184,34 +209,103 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
184209
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
185210
- **Core:** 23 patterns in 3 categories (Creational, Structural, Behavioral), pattern language, composition over inheritance, program to an interface
186211

187-
#### Creational Patterns
188-
- **GoF-Abstract Factory** — Families of related objects without specifying concrete classes
189-
- **GoF-Builder** — Construct complex objects step by step
190-
- **GoF-Factory Method** — Let subclasses decide which class to instantiate
191-
- **GoF-Prototype** — Clone existing objects
192-
- **GoF-Singleton** — Ensure single instance with global access
193-
194-
#### Structural Patterns
195-
- **GoF-Adapter** — Convert interface to one clients expect
196-
- **GoF-Bridge** — Separate abstraction from implementation
197-
- **GoF-Composite** — Compose objects into tree structures
198-
- **GoF-Decorator** — Add responsibilities dynamically
199-
- **GoF-Facade** — Simplified interface to a subsystem
200-
- **GoF-Flyweight** — Share fine-grained objects efficiently (not a semantic anchor)
201-
- **GoF-Proxy** — Surrogate controlling access to another object
202-
203-
#### Behavioral Patterns
204-
- **GoF-Chain of Responsibility** — Pass requests along a chain of handlers
205-
- **GoF-Command** — Encapsulate requests as objects
206-
- **GoF-Interpreter** — Grammar and interpreter for a language (not a semantic anchor)
207-
- **GoF-Iterator** — Sequential access without exposing structure
208-
- **GoF-Mediator** — Centralize complex communications
209-
- **GoF-Memento** — Capture and restore object state (not a semantic anchor)
210-
- **GoF-Observer** — Notify dependents of state changes
211-
- **GoF-State** — Alter behavior when internal state changes
212-
- **GoF-Strategy** — Interchangeable algorithm families
213-
- **GoF-Template Method** — Define skeleton, let subclasses fill in steps
214-
- **GoF-Visitor** — Operations on elements without changing their classes (not a semantic anchor)
212+
### GoF-Abstract Factory Pattern
213+
- **Also known as:** Kit
214+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
215+
- **Core:** Create families of related objects without specifying concrete classes (Creational)
216+
217+
### GoF-Builder Pattern
218+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
219+
- **Core:** Separate construction of a complex object from its representation; same process can create different representations (Creational)
220+
221+
### GoF-Factory Method Pattern
222+
- **Also known as:** Virtual Constructor
223+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
224+
- **Core:** Define an interface for creating an object, but let subclasses decide which class to instantiate (Creational)
225+
226+
### GoF-Prototype Pattern
227+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
228+
- **Core:** Create new objects by copying a prototypical instance (Creational)
229+
230+
### GoF-Singleton Pattern
231+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
232+
- **Core:** Ensure a class has only one instance with a global access point (Creational)
233+
234+
### GoF-Adapter Pattern
235+
- **Also known as:** Wrapper
236+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
237+
- **Core:** Convert an interface into another interface clients expect; makes incompatible interfaces work together (Structural)
238+
239+
### GoF-Bridge Pattern
240+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
241+
- **Core:** Decouple an abstraction from its implementation so both can vary independently (Structural)
242+
243+
### GoF-Composite Pattern
244+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
245+
- **Core:** Compose objects into tree structures to represent part-whole hierarchies; treat individual objects and compositions uniformly (Structural)
246+
247+
### GoF-Decorator Pattern
248+
- **Also known as:** Wrapper
249+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
250+
- **Core:** Attach additional responsibilities to an object dynamically; flexible alternative to subclassing (Structural)
251+
252+
### GoF-Facade Pattern
253+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
254+
- **Core:** Provide a unified interface to a set of interfaces in a subsystem; defines a higher-level interface (Structural)
255+
256+
### GoF-Flyweight Pattern
257+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
258+
- **Core:** Use sharing to support large numbers of fine-grained objects efficiently (Structural)
259+
260+
### GoF-Proxy Pattern
261+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
262+
- **Core:** Provide a surrogate or placeholder for another object to control access to it (Structural)
263+
264+
### GoF-Chain of Responsibility Pattern
265+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
266+
- **Core:** Pass requests along a chain of handlers; each handler decides to process or forward (Behavioral)
267+
268+
### GoF-Command Pattern
269+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
270+
- **Core:** Encapsulate a request as an object, enabling parameterization, queuing, logging, and undoable operations (Behavioral)
271+
272+
### GoF-Interpreter Pattern
273+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
274+
- **Core:** Define a representation for a language's grammar and an interpreter to process sentences (Behavioral)
275+
276+
### GoF-Iterator Pattern
277+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
278+
- **Core:** Provide a way to access elements of an aggregate object sequentially without exposing its underlying representation (Behavioral)
279+
280+
### GoF-Mediator Pattern
281+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
282+
- **Core:** Define an object that encapsulates how a set of objects interact; promotes loose coupling (Behavioral)
283+
284+
### GoF-Memento Pattern
285+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
286+
- **Core:** Capture and externalize an object's internal state so it can be restored later, without violating encapsulation (Behavioral)
287+
288+
### GoF-Observer Pattern
289+
- **Also known as:** Publish-Subscribe, Event-Listener
290+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
291+
- **Core:** Define a one-to-many dependency so that when one object changes state, all dependents are notified (Behavioral)
292+
293+
### GoF-State Pattern
294+
- **Also known as:** Objects for States
295+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
296+
- **Core:** Allow an object to alter its behavior when its internal state changes; the object will appear to change its class (Behavioral)
297+
298+
### GoF-Strategy Pattern
299+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
300+
- **Core:** Define a family of algorithms, encapsulate each one, and make them interchangeable (Behavioral)
301+
302+
### GoF-Template Method Pattern
303+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
304+
- **Core:** Define the skeleton of an algorithm in an operation, deferring some steps to subclasses (Behavioral)
305+
306+
### GoF-Visitor Pattern
307+
- **Proponents:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
308+
- **Core:** Represent an operation to be performed on elements of an object structure without changing their classes (Behavioral)
215309

216310
### Patterns of Enterprise Application Architecture (PEAA)
217311
- **Proponents:** Martin Fowler

0 commit comments

Comments
 (0)