|
1 | 1 | # Semantic Anchors — Complete Reference |
2 | 2 |
|
3 | | -> 122 well-defined terms, methodologies, and frameworks |
| 3 | +> 123 well-defined terms, methodologies, and frameworks |
4 | 4 | > that serve as precision reference points when communicating with LLMs. |
5 | 5 | > Source: https://github.com/LLM-Coding/Semantic-Anchors |
6 | 6 | > Website: https://llm-coding.github.io/Semantic-Anchors/ |
@@ -1935,6 +1935,42 @@ A class should have only one reason to change. Each module or class should be re |
1935 | 1935 | * User Story Mapping - Planning technique that identifies the scope Definition of Done must cover |
1936 | 1936 | * MoSCoW - Prioritization method used to decide which DoD items are must-haves |
1937 | 1937 |
|
| 1938 | +### Effective Go |
| 1939 | + |
| 1940 | +[discrete] |
| 1941 | +## **Core Concepts**: |
| 1942 | + |
| 1943 | +***Formatting (gofmt)***: Code is auto-formatted; style debates are eliminated by tooling |
| 1944 | + |
| 1945 | +***Package names***: Short, lowercase, no underscores; package name is part of the qualified identifier |
| 1946 | + |
| 1947 | +***Named return values***: Return values can be named and used as documentation |
| 1948 | + |
| 1949 | +***Defer***: Deferred function calls run in LIFO order when the surrounding function returns; used for cleanup (close, unlock) |
| 1950 | + |
| 1951 | +***Goroutines***: Lightweight concurrently executing functions; "Don't communicate by sharing memory; share memory by communicating" |
| 1952 | + |
| 1953 | +***Channels***: Typed conduits for goroutine communication; first-class synchronization primitive |
| 1954 | + |
| 1955 | +***Interfaces***: Implicit satisfaction — a type implements an interface simply by implementing its methods; enables duck typing |
| 1956 | + |
| 1957 | +***Error handling***: Errors are values; idiomatic pattern is `if err != nil` at each call site; no exceptions |
| 1958 | + |
| 1959 | +***Blank identifier (_)***: Discard unwanted values from multi-value returns without compiler error |
| 1960 | + |
| 1961 | +***Embedding***: Composition over inheritance; types can embed other types to gain their methods |
| 1962 | + |
| 1963 | +***Key Proponent***: The Go Authors (https://go.dev/doc/effective_go) |
| 1964 | + |
| 1965 | +[discrete] |
| 1966 | +## **When to Use**: |
| 1967 | + |
| 1968 | +* Onboarding new Go developers to idiomatic Go style |
| 1969 | +* Code review discussions about Go conventions |
| 1970 | +* Establishing team-wide Go coding standards |
| 1971 | +* Explaining Go idioms that differ from other languages (e.g. error handling, interfaces) |
| 1972 | +* Prompting an LLM to produce idiomatic, production-quality Go code |
| 1973 | + |
1938 | 1974 | ### GitHub Flow |
1939 | 1975 |
|
1940 | 1976 | [discrete] |
@@ -4947,7 +4983,8 @@ Select and download: https://llm-coding.github.io/Semantic-Anchors/#/contracts |
4947 | 4983 | ## Specification |
4948 | 4984 |
|
4949 | 4985 | When we talk about a "specification" or "spec", we mean: |
4950 | | -- Use Cases with Activity Diagrams (all paths, not just the happy path) |
| 4986 | +- Use Cases with Trigger, Main Flow, Alternative Flows, Postconditions, and Business Rules (BR-IDs) |
| 4987 | +- Activity Diagrams for all flows (not just the happy path) |
4951 | 4988 | - Acceptance criteria in Gherkin format (Given/When/Then) |
4952 | 4989 |
|
4953 | 4990 | *Referenced anchors: gherkin, bdd-given-when-then* |
@@ -4998,6 +5035,7 @@ For each issue: |
4998 | 5035 | - Select next issue from backlog (respect dependencies) |
4999 | 5036 | - Analyze and document analysis as a comment on the issue |
5000 | 5037 | - Implement using TDD (London or Chicago School as appropriate) |
| 5038 | +- Each test references its Use Case ID for traceability |
5001 | 5039 | - Commit with Conventional Commits, reference issue number |
5002 | 5040 | - Check if spec or architecture docs need updating |
5003 | 5041 | - When EPIC is complete, create a Pull Request |
|
0 commit comments