Skip to content

Commit d9d8cd5

Browse files
authored
Merge pull request #375 from raifdmueller/feat/writing-style-contract
feat: add Writing Style semantic contract
2 parents 811ed16 + e14ead1 commit d9d8cd5

5 files changed

Lines changed: 72 additions & 29 deletions

File tree

docs/rejected-proposals.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,36 @@ A real methodology but too specialized for reliable activation across different
2323

2424
| *TLDR*
2525
| Structurally unsuitable
26-
| Underspecified instruction with no defined structure. Just means "be brief" without any framework for how. Not a methodology.
26+
| Underspecified instruction with no defined structure. Just means "be brief" without any framework for how. Not a methodology. +
27+
*Now available as link:#/contracts[Semantic Contract]*: "Concise Response" — composes BLUF + Strunk & White.
2728

2829
| *ELI5* (Explain Like I'm 5)
2930
| Structurally unsuitable
30-
| Vague target level with no pedagogical framework. No consistent interpretation of what "5-year-old level" means technically.
31+
| Vague target level with no pedagogical framework. No consistent interpretation of what "5-year-old level" means technically. +
32+
*Now available as link:#/contracts[Semantic Contract]*: "Simple Explanation" — composes Feynman Technique.
33+
34+
| *Spec-Driven Development* (https://github.com/LLM-Coding/Semantic-Anchors/pull/356[#356])
35+
| Structurally unsuitable
36+
| Relevant concept but no single canonical definition — different people mean different things (API-first, formal specs, our workflow). Not attributable to a specific proponent. +
37+
*Now available as link:#/contracts[Semantic Contracts]*: "Specification" + "Requirements Discovery" — composes Gherkin, BDD, Socratic Method, MECE, PRD.
38+
39+
| *Explicit Contract Surface* (https://github.com/LLM-Coding/Semantic-Anchors/pull/357[#357])
40+
| Structurally unsuitable
41+
| Well-described design practice but not an established term in the literature. Combines existing anchors (Clean Architecture, Hexagonal, DDD, SOLID DIP/ISP) without adding new activation. +
42+
*Now available as link:#/contracts[Semantic Contract]*: "Layer Boundaries".
3143

3244
| *MIRRR UX Framework* (https://github.com/LLM-Coding/Semantic-Anchors/issues/150[#150])
3345
| Not in training data
3446
| A real UX framework with defined methodology, but not widely enough documented for LLMs to reliably recognize it and activate the correct concepts.
3547

3648
|===
3749

50+
[TIP]
51+
====
52+
Terms that don't qualify as semantic anchors can still be useful as link:#/contracts[Semantic Contracts].
53+
A contract defines what a term means in your project — either by composing established anchors or by providing custom definitions that only exist within your team.
54+
====
55+
3856
== How We Evaluate
3957

4058
Every proposal is tested against our four quality criteria:

docs/rejected-proposals.de.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,36 @@ Eine echte Methodik, aber zu spezialisiert für zuverlässige Aktivierung über
2323

2424
| *TLDR*
2525
| Strukturell ungeeignet
26-
| Unterspezifizierte Anweisung ohne definierte Struktur. Bedeutet nur "fasse dich kurz" ohne ein Framework dafür. Keine Methodik.
26+
| Unterspezifizierte Anweisung ohne definierte Struktur. Bedeutet nur "fasse dich kurz" ohne ein Framework dafür. Keine Methodik. +
27+
*Jetzt verfügbar als link:#/contracts[Semantic Contract]*: "Concise Response" — kombiniert BLUF + Strunk & White.
2728

2829
| *ELI5* (Explain Like I'm 5)
2930
| Strukturell ungeeignet
30-
| Vages Zielniveau ohne pädagogisches Framework. Keine konsistente Interpretation dessen, was "Niveau eines 5-Jährigen" technisch bedeutet.
31+
| Vages Zielniveau ohne pädagogisches Framework. Keine konsistente Interpretation dessen, was "Niveau eines 5-Jährigen" technisch bedeutet. +
32+
*Jetzt verfügbar als link:#/contracts[Semantic Contract]*: "Simple Explanation" — nutzt die Feynman-Technik.
33+
34+
| *Spec-Driven Development* (https://github.com/LLM-Coding/Semantic-Anchors/pull/356[#356])
35+
| Strukturell ungeeignet
36+
| Relevantes Konzept, aber keine einheitliche Definition — verschiedene Interpretationen (API-first, formale Specs, unser Workflow). Nicht einem konkreten Urheber zuordenbar. +
37+
*Jetzt verfügbar als link:#/contracts[Semantic Contracts]*: "Specification" + "Requirements Discovery" — kombiniert Gherkin, BDD, Sokratische Methode, MECE, PRD.
38+
39+
| *Explicit Contract Surface* (https://github.com/LLM-Coding/Semantic-Anchors/pull/357[#357])
40+
| Strukturell ungeeignet
41+
| Gut beschriebene Design-Praxis, aber kein etablierter Begriff in der Literatur. Kombiniert bestehende Anker (Clean Architecture, Hexagonal, DDD, SOLID DIP/ISP) ohne neue Aktivierung. +
42+
*Jetzt verfügbar als link:#/contracts[Semantic Contract]*: "Layer Boundaries".
3143

3244
| *MIRRR UX Framework* (https://github.com/LLM-Coding/Semantic-Anchors/issues/150[#150])
3345
| Nicht in Trainingsdaten
3446
| Ein echtes UX-Framework mit definierter Methodik, aber nicht weit genug dokumentiert, damit LLMs es zuverlässig erkennen und die richtigen Konzepte aktivieren.
3547

3648
|===
3749

50+
[TIP]
51+
====
52+
Begriffe, die nicht als Semantic Anchors qualifizieren, können trotzdem als link:#/contracts[Semantic Contracts] nützlich sein.
53+
Ein Contract definiert, was ein Begriff in deinem Projekt bedeutet — entweder durch Komposition etablierter Anker oder durch eigene Definitionen, die nur in deinem Team existieren.
54+
====
55+
3856
== Wie wir bewerten
3957

4058
Jeder Vorschlag wird gegen unsere vier Qualitätskriterien getestet:

scripts/generate-llms-txt.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -249,19 +249,11 @@ function generateLlmsTxt() {
249249
lines.push('')
250250
lines.push('# Semantic Contracts')
251251
lines.push('')
252-
lines.push(
253-
'Semantic Contracts define what a term means in your project — either by'
254-
)
255-
lines.push(
256-
'composing established anchors or by providing custom definitions that only'
257-
)
252+
lines.push('Semantic Contracts define what a term means in your project — either by')
253+
lines.push('composing established anchors or by providing custom definitions that only')
258254
lines.push('exist within your team.')
259-
lines.push(
260-
'Add them to your AGENTS.md or CLAUDE.md.'
261-
)
262-
lines.push(
263-
'Select and download: https://llm-coding.github.io/Semantic-Anchors/#/contracts'
264-
)
255+
lines.push('Add them to your AGENTS.md or CLAUDE.md.')
256+
lines.push('Select and download: https://llm-coding.github.io/Semantic-Anchors/#/contracts')
265257
lines.push('')
266258

267259
for (const contract of contracts) {
@@ -276,9 +268,7 @@ function generateLlmsTxt() {
276268
}
277269

278270
lines.push('---')
279-
console.warn(
280-
` Including ${contracts.length} Semantic Contracts in llms.txt`
281-
)
271+
console.warn(` Including ${contracts.length} Semantic Contracts in llms.txt`)
282272
}
283273
} catch {
284274
// contracts.json not found — skip

website/public/data/contracts.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,16 @@
119119
"template": "Explain complex concepts using simple language and everyday analogies. When the explanation feels hard to write, that reveals gaps in understanding — study those areas first (Feynman Technique).",
120120
"templateDe": "Komplexe Konzepte mit einfacher Sprache und Alltagsanalogien erklären. Wenn die Erklärung schwerfällt, zeigt das Wissenslücken — diese zuerst vertiefen (Feynman-Technik).",
121121
"category": "communication"
122+
},
123+
{
124+
"id": "writing-style",
125+
"title": "Writing Style",
126+
"titleDe": "Schreibstil",
127+
"description": "How we write technical texts — language, tone, and structure",
128+
"descriptionDe": "Wie wir technische Texte schreiben — Sprache, Ton und Struktur",
129+
"anchors": ["gutes-deutsch-wolf-schneider", "plain-english-strunk-white"],
130+
"template": "Writing follows Gutes Deutsch nach Wolf Schneider (or Plain English according to Strunk & White).\n\nAdditionally:\n- Technical terms stay in English (LLM, Prompt, Token, Spec, etc.)\n- Address the reader directly, use first person sparingly but deliberately\n- Use analogies to human thinking to explain technical concepts\n- One thought per paragraph (5-8 sentences is fine)\n- Section headings are statements, not topic announcements\n- First sentence says what the paragraph is about\n- Show code and prompts, don't just claim things work\n- Conclusions make a clear statement — never end with 'it remains exciting'",
131+
"templateDe": "Schreibstil folgt Gutes Deutsch nach Wolf Schneider (oder Plain English nach Strunk & White).\n\nZusätzlich:\n- Fachbegriffe auf Englisch lassen (LLM, Prompt, Token, Spec, etc.)\n- Leser direkt ansprechen, Ich-Perspektive sparsam aber gezielt\n- Analogien zum menschlichen Denken für technische Konzepte\n- Ein Gedanke pro Absatz (5-8 Sätze OK)\n- Zwischenüberschriften als Aussagen, nicht Themenankündigungen\n- Erster Satz sagt sofort worum es geht\n- Code/Prompts zeigen, nicht nur behaupten\n- Fazit: klare Aussage, kein 'es bleibt spannend'",
132+
"category": "communication"
122133
}
123134
]

website/tests/e2e/website.spec.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test.describe('Homepage - Card Grid', () => {
2424
await expect(page.locator('#lang-toggle')).toHaveText('DE')
2525

2626
// Check navigation links (use .first() to select desktop nav, not mobile)
27-
await expect(page.locator('a[data-route="/"]').first()).toContainText('Catalog')
27+
await expect(page.locator('a[data-route="/"]').first()).toContainText('Anchors')
2828
await expect(page.locator('a[data-route="/about"]').first()).toContainText('About')
2929
await expect(page.locator('a[data-route="/contributing"]').first()).toContainText('Contributing')
3030
})
@@ -157,6 +157,8 @@ test.describe('Homepage - Card Grid', () => {
157157
})
158158

159159
test('should display action links', async ({ page }) => {
160+
// About link is in the More dropdown — open it first
161+
await page.locator('#more-menu-toggle').click()
160162
const aboutLink = page.locator('a[href="#/about"]').first()
161163
await expect(aboutLink).toBeVisible()
162164

@@ -223,7 +225,8 @@ test.describe('Routing - Documentation Pages', () => {
223225
})
224226

225227
test('should navigate to About page', async ({ page }) => {
226-
// Click About link (use first for desktop nav)
228+
// About is in the More dropdown — open it first
229+
await page.locator('#more-menu-toggle').click()
227230
await page.locator('a[data-route="/about"]').first().click()
228231

229232
// URL should update
@@ -239,7 +242,8 @@ test.describe('Routing - Documentation Pages', () => {
239242
})
240243

241244
test('should navigate to Contributing page', async ({ page }) => {
242-
// Click Contributing link (use first for desktop nav)
245+
// Contributing is in the More dropdown — open it first
246+
await page.locator('#more-menu-toggle').click()
243247
await page.locator('a[data-route="/contributing"]').first().click()
244248

245249
// URL should update
@@ -254,11 +258,12 @@ test.describe('Routing - Documentation Pages', () => {
254258
await expect(contributingLink).toHaveClass(/font-semibold/)
255259
})
256260

257-
test('should navigate back to Catalog from About', async ({ page }) => {
258-
// Go to About (use first for desktop nav)
261+
test('should navigate back to Anchors from About', async ({ page }) => {
262+
// Go to About via More dropdown
263+
await page.locator('#more-menu-toggle').click()
259264
await page.locator('a[data-route="/about"]').first().click()
260265

261-
// Go back to Catalog
266+
// Go back to Anchors
262267
await page.locator('a[data-route="/"]').first().click()
263268

264269
// URL should be home
@@ -267,9 +272,9 @@ test.describe('Routing - Documentation Pages', () => {
267272
// Card grid should be visible
268273
await expect(page.locator('.anchor-card').first()).toBeVisible()
269274

270-
// Catalog link should be highlighted (use .first() to select desktop nav)
271-
const catalogLink = page.locator('a[data-route="/"]').first()
272-
await expect(catalogLink).toHaveClass(/font-semibold/)
275+
// Anchors link should be highlighted (use .first() to select desktop nav)
276+
const anchorsLink = page.locator('a[data-route="/"]').first()
277+
await expect(anchorsLink).toHaveClass(/font-semibold/)
273278
})
274279

275280
test('should handle direct URL to About page', async ({ page }) => {
@@ -282,7 +287,8 @@ test.describe('Routing - Documentation Pages', () => {
282287
})
283288

284289
test('should handle browser back button', async ({ page }) => {
285-
// Navigate to About (use first for desktop nav)
290+
// Navigate to About via More dropdown
291+
await page.locator('#more-menu-toggle').click()
286292
await page.locator('a[data-route="/about"]').first().click()
287293

288294
// Go back

0 commit comments

Comments
 (0)