Contributing — Originality and Structure Rules
Part of the unified study index: Home. Single source of truth is
content/— see content/MAPPING.md.
All content here is original study material. Reference catalogs are inspiration only.
Inspiration sources (coverage only)
- refactoring.guru Design Patterns catalog — used to confirm the 23-pattern list and category grouping.
- GeeksforGeeks Catalog of Design Patterns — used to confirm pattern names and the Essential Elements lens (name / problem / solution / consequences).
Do not copy from these or any other source.
No-paste rule
- MUST write every paragraph, diagram, and code example from scratch.
- MUST NOT paste text, images, or code from refactoring.guru, GeeksforGeeks, Wikipedia, or books.
- Diagrams MUST be authored as Mermaid or ASCII in the page — no downloaded images.
- Code MUST be your own minimal scenario; do not port reference-site implementations line-for-line.
Where to put it (single source)
- Author exactly one file under
content/(patterns/,architecture/,principles/,practice/). Root anddocs/paths are symlinked views — do not author duplicates. - New pages MUST be listed in
docs/SUMMARY.mdunder the matching pillar (1 Patterns, 2 Architecture, 3 Principles, 4 Practice, 5 Guides) exactly once. - Selection guidance is canonical in
guides/selection.md(§1 patterns, §2 architecture, §3 principles). Category READMEs link to it; do not create competing decision tables.
Shared explanation shape
- Patterns: follow
content/patterns/TEMPLATE.md— Intent → Motivation → Structure → Consequences → Basic Recap → Complex Scenario → When to Use/Not → Examples → Anti-pattern → Related (same-pillar + cross-pillar) → Exercise → Self-check. - Architecture: follow
content/architecture/TEMPLATE.md— Intent → When It Helps → Structure → Rules → Snippet → Basic Recap → Complex Scenario → Trade-offs → When to Use/Not → Anti-pattern → Related (neighbors + cross-pillar). - Principles: follow
content/principles/TEMPLATE.md— Definition → Rationale → Example → Anti-pattern → Related (neighbors + cross-pillar where applied). - Depth content is merged into standard pages: follow the
## Basic Recap,## Complex Scenario, and expanded## Anti-Pattern / Failure Modesections in the standard templates.
Canonical-place rule (no full duplication)
- Architecture patterns are canonical in
content/architecture/*. Principle entries that overlap (Hexagonal, Clean, Onion, CQRS, Event Sourcing) MUST be summaries linking the canonical page, not re-teachings. - Disambiguate near-duplicates by scope in the title and cross-link counterparts (e.g. Fault Isolation distributed-services vs BEAM supervision; Least Privilege vs Least Common Mechanism; Least Astonishment vs Least Surprise).
Declaration
Every new page or example declares in its PR/commit message:
Original wording, fresh diagram, no reference-site content pasted.
Review checklist
- Single file under
content/;docs/SUMMARY.mdlists it once under the right pillar. - Page follows its pillar TEMPLATE order (patterns / architecture / principles / depth).
- At least one benefit, one cost, one use-when, one avoid-when.
- Anti-pattern with review signal present; depth linked where it exists.
- Related includes at least one cross-pillar link (pattern ↔ architecture ↔ principle ↔ practice).
- Overlaps use summary-plus-canonical-link; no full duplication.
- Mermaid/ASCII diagram renders from source (diagrams optional for principles).
- Example in all four languages runs and prints the documented outcome (patterns only).
- Role-mapping comments present in each example entry file (patterns only).
- All links resolve (
find docs -type lmatchescontent/MAPPING.md; no 404s).