@@ -4492,3 +4492,112 @@ SWOT = **S**trengths / **W**eaknesses / **O**pportunities / **T**hreats
44924492* Guiding team testing practices
44934493
44944494---
4495+
4496+
4497+ # Semantic Contracts
4498+
4499+ Semantic Contracts compose existing anchors into project-specific conventions.
4500+ Add them to your AGENTS.md or CLAUDE.md to define what your team means when using these terms.
4501+ Select and download: https://llm-coding.github.io/Semantic-Anchors/#/contracts
4502+
4503+ ## Specification
4504+
4505+ When we talk about a "specification" or "spec", we mean:
4506+ - Use Cases with Activity Diagrams (all paths, not just the happy path)
4507+ - Acceptance criteria in Gherkin format (Given/When/Then)
4508+
4509+ *Referenced anchors: gherkin, bdd-given-when-then*
4510+
4511+ ## Requirements Discovery
4512+
4513+ Clarify requirements using the Socratic Method:
4514+ - Ask at most 3 questions at a time, challenge assumptions
4515+ - Use MECE to ensure questions cover all areas without overlap
4516+ - Keep asking until you fully understand the requirements
4517+ - Document as a PRD (problem, goals, personas, success criteria, scope)
4518+
4519+ *Referenced anchors: socratic-method, mece, prd*
4520+
4521+ ## Architecture Documentation
4522+
4523+ Architecture documentation follows arc42 with all 12 sections.
4524+ - C4 diagrams (PlantUML) for visualization at four abstraction levels
4525+ - Every architecture decision documented as an ADR according to Nygard (Context, Decision, Status, Consequences)
4526+ - Each ADR includes a Pugh Matrix with 3-point scale (-1, 0, +1) evaluating alternatives against quality goals
4527+
4528+ *Referenced anchors: arc42, c4-diagrams, adr-according-to-nygard, pugh-matrix*
4529+
4530+ ## Layer Boundaries
4531+
4532+ At every layer boundary:
4533+ - Expose only well-defined DTOs and contracts — never domain entities
4534+ - Use explicit mapping at every seam
4535+ - Apply Anti-Corruption Layers when integrating external systems
4536+ - Dependency direction points inward (DIP)
4537+
4538+ *Referenced anchors: clean-architecture, hexagonal-architecture, domain-driven-design, solid-dip, solid-isp*
4539+
4540+ ## Backlog Management
4541+
4542+ Create EPICs and User Stories as GitHub issues from the specification.
4543+ - User Stories follow INVEST criteria (Independent, Negotiable, Valuable, Estimable, Small, Testable)
4544+ - Prioritize with MoSCoW (Must/Should/Could/Won't)
4545+ - Mark dependencies between issues
4546+ - Groom the backlog regularly as the project evolves
4547+
4548+ *Referenced anchors: invest, moscow*
4549+
4550+ ## Implement Next
4551+
4552+ For each issue:
4553+ - Create a feature branch for the EPIC
4554+ - Select next issue from backlog (respect dependencies)
4555+ - Analyze and document analysis as a comment on the issue
4556+ - Implement using TDD (London or Chicago School as appropriate)
4557+ - Commit with Conventional Commits, reference issue number
4558+ - Check if spec or architecture docs need updating
4559+ - When EPIC is complete, create a Pull Request
4560+
4561+ *Referenced anchors: tdd-london-school, tdd-chicago-school, definition-of-done, conventional-commits*
4562+
4563+ ## Code Quality
4564+
4565+ Our code follows:
4566+ - SOLID principles
4567+ - DRY, KISS
4568+ - Ubiquitous Language from Domain-Driven Design (same terms in code as in the specification)
4569+
4570+ *Referenced anchors: solid-principles, dry-principle, kiss-principle, domain-driven-design*
4571+
4572+ ## Quality Review
4573+
4574+ Quality assurance follows three layers:
4575+ - Code review using Fagan Inspection (structured, systematic, with defined phases)
4576+ - Security review based on OWASP Top 10
4577+ - Architecture review using ATAM (scenario-based tradeoff analysis against quality goals)
4578+ - Use a different AI model or fresh session for reviews to avoid blind spots
4579+
4580+ *Referenced anchors: fagan-inspection, owasp-top-10, atam*
4581+
4582+ ## Docs-as-Code
4583+
4584+ Documentation follows Docs-as-Code according to Ralf D. Müller:
4585+ - AsciiDoc as format, PlantUML for inline diagrams, built by docToolchain
4586+ - Version-controlled, peer-reviewed, and built automatically
4587+ - Plain English according to Strunk & White (or Gutes Deutsch nach Wolf Schneider)
4588+
4589+ *Referenced anchors: docs-as-code, plain-english-strunk-white, gutes-deutsch-wolf-schneider*
4590+
4591+ ## Concise Response (TLDR)
4592+
4593+ Responses lead with the conclusion first (BLUF). Keep to essential points. No filler, no preamble. Use short sentences, active voice, and no unnecessary words (Strunk & White).
4594+
4595+ *Referenced anchors: bluf, plain-english-strunk-white*
4596+
4597+ ## Simple Explanation (ELI5)
4598+
4599+ 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).
4600+
4601+ *Referenced anchors: feynman-technique*
4602+
4603+ ---
0 commit comments