Skip to content

varjoranta/patterns-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Patterns Corpus Starter

A single file. The zeroth pattern. A template for starting your own living corpus of architectural patterns mined from everything you build.

Fork this. Delete my name from the commit history if you like. Add your first pattern as PAT-0001. Five years from now you'll have something durable.

Built with your AI agents, not just by you. The format is deliberately designed for LLM consumption. Agents read your corpus as RAG context during engineering work; agents also help write new patterns by recognizing shapes in the code you review together. Treat the corpus as a shared notebook between you and your agents. A bundled MCP server (see below) lets any agent read your corpus over the Model Context Protocol.

What this is

One pattern — PAT-0000 Living Patterns Corpus — that describes the practice of building a personal, growing, cross-referenced repository of architectural patterns. Read it. It's the whole idea.

Why

Engineering knowledge decays between projects. The insights you gain shipping one system rarely survive to the next. Team wikis fossilize; blog posts are essays, not primitives; design-pattern books are either too abstract or too narrow.

A personal patterns corpus fixes this. Each pattern is a named, structured primitive you can retrieve, compose, and point at. Over years it compounds into a library that's simultaneously your architecture reference, your writing material, your AI agent's RAG context, and a lens for recognizing new problems as old ones in disguise.

How to start yours

  1. Fork this repo (or just copy the meta/ folder and this README into a new private repo).
  2. Read PAT-0000. It's the whole method in one file.
  3. Write your first pattern. Pick something non-trivial you've recently solved. Use the format from PAT-0. File it under a category folder (e.g. database/, infrastructure/, ai-llm/). It becomes PAT-0001.
  4. Keep writing. Every PR, every paper, every incident, every "oh, it's X in disguise" moment is a pattern.
  5. Cross-reference as you go. Every new PAT points at 2–5 existing ones.
  6. Synthesize when you notice repetition. When the same shape appears in 5+ PATs across different categories, write a synthesis PAT that names the meta-pattern.

The growth curve is exponential:

  • Month 1: 5–10 patterns. Get the format right.
  • Month 3: ~100 patterns. A handful of syntheses emerge.
  • Year 1: reference infrastructure for your thinking.

What's in this repo

patterns-starter/
├── README.md                                    (this file)
├── meta/
│   └── living-patterns-corpus.md                PAT-0000 — the method
└── mcp-server/
    ├── server.py                                Minimal MCP server (Python)
    ├── requirements.txt                         Dependencies
    ├── example-config.json                      Example MCP client config
    └── README.md                                How to hook it up

One pattern. One MCP server. You add the rest.

The MCP server is optional. You can build a corpus without it and skip to the good part (writing patterns). Adopt the server when you want your AI agents to read your corpus as live context.

The server includes a synthesis_help tool that returns the synthesis methodology plus candidate themes auto-detected from your corpus (tags appearing across multiple categories). Once your corpus passes ~30 PATs, ask your agent to call it — it will propose and can draft synthesis PATs for your review. The server gives the agent the recipe; you and your agent write the syntheses.

Conventions (from PAT-0)

Every pattern file follows this structure:

---
id: PAT-NNNN
created_utc: ISO8601
category: one-of-your-categories
tags: [tag, tag, tag]
---

# Pattern: [clear descriptive name]

## Problem
[1-2 paragraphs: the pain this addresses]

## Solution
[1-2 paragraphs: the shape of the fix]

## How It Works
[code, diagrams, examples]

## Key Design Decisions
- [bulleted tradeoffs and gotchas]

## Applicability
[where it fits; where it doesn't]

## Related Patterns
- PAT-XXXX — one-line reference to each sibling

Read PAT-0 for the full rationale behind each section.

Suggested category structure

Pick 10–16 categories that cover your domains. Don't agonize — they're navigation, not taxonomy. A common starting set:

  • api-design/
  • database/
  • infrastructure/
  • security/
  • testing/
  • error-handling/
  • ci-cd/
  • frontend-visual/
  • ai-llm/
  • meta/ (this one's pre-created — keep PAT-0 here)

Add a new category when you have ≥5 patterns needing a new home, not before.

License

This starter repo (PAT-0000 and this README) is released under CC0 1.0 Universal — public domain. Fork freely, modify freely, commercialize freely. No attribution required.

Your own patterns corpus should probably be private, for the reasons explained in PAT-0. This starter is intentionally the only thing that's public.

One last thing

The corpus IS the method. Writing patterns changes how you think — you start recognizing patterns faster because you've named so many. That's the real compounding return. Not the repository; what writing to it does to your mind.

Good luck. Go write PAT-0001.

About

A single pattern, an MCP server, and a method for building your own living corpus of architectural patterns — co-authored with your AI agents.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages