Skip to content
Pathrule

docs

Patterns overview

What a Pathrule pattern is, why patterns exist, and how a curated bundle of memories, rules and skills lands pre-scoped in your workspace.

On this page

A pattern is a ready-to-use package of team knowledge for a specific stack or a specific development problem. Instead of starting a workspace empty and writing every memory, rule and skill by hand, you add a pattern and your AI assistant starts the project already knowing the conventions that stack tends to need and the mistakes it tends to make.

Each pattern is a bundle of the same three content types Pathrule already uses, and every piece arrives pre-scoped to the path it belongs to. A rule about server components lands on /app, a billing memory lands on the billing service, a review skill lands at the root. Nothing is dumped into one global file.

Why patterns exist

Most repositories share the same early questions. How should a Next.js App Router project split server and client components? Where do you keep Supabase row-level security rules? What is the safe way to handle a Stripe webhook? Why does a query that was fast in development deadlock in production? The answers are well understood, but every team rediscovers and re-types them.

Patterns capture those answers once, as path-scoped Pathrule content, so a new workspace can adopt them in seconds:

  • Pre-scoped, not pasted. A pattern is not a prompt blob. Each piece declares the path it lives at, so your assistant only sees it where it is relevant. A UI tweak never has to read a database rule.
  • Typed, not freeform. A pattern is made of memories, rules and skills, the same types you write yourself. An imported rule keeps its scope type and priority; an imported skill is invocable by name.
  • Composed to fit the topic. The mix of rules, memories and skills differs per pattern. A framework pattern leans on rules for its hard conventions, a workflow pattern leans on skills you run as checklists.
  • Yours after import. Importing a pattern is a one-time seed, not a live subscription. The pieces become ordinary content in your workspace and you edit them like anything else.

The catalog

The public catalog lives at pathrule.io/patterns. It holds 150 patterns, every one first-party and published under Apache-2.0, organised into eight categories:

  • Framework for app and platform frameworks, from Next.js App Router, Nuxt, SvelteKit, Astro and React Router to Django, Rails, Laravel, Spring Boot, ASP.NET Core, SwiftUI, Flutter, Expo and Unity.
  • Frontend for components, forms, state, styling, accessibility, Core Web Vitals, hydration, internationalization and offline behavior.
  • Backend for data access, ORMs, queues, search, APIs, authentication, multi-tenancy and database performance.
  • Billing for payments, subscriptions, invoicing and tax, checkout, payouts, refunds and disputes.
  • Infra for containers, serverless runtimes, CI/CD, infrastructure as code, observability, caching, DNS and TLS.
  • Workflow for code review, debugging, dependency upgrades, Git workflows, releases, incidents and onboarding.
  • AI for agents in production, agent memory, evaluations, observability, guardrails, fine-tuning and verifying AI-generated code.
  • Security for account takeover and MFA, service credentials, rate limiting, encryption, authorization, enterprise SSO and least privilege.

The catalog page has a category sidebar and a search box. Each pattern has its own page showing:

  • a contents summary, how many rules, memories and skills it carries, derived from the bundle itself
  • a path map of every target path, and the full list of pieces grouped by path
  • why the pattern exists: the problem it solves, who it is built for, and the mistakes it keeps your assistant from making
  • the token used to add it, with a copy button, and a manual copy of the full bundle
  • its license, version and last updated date, with a link to the source

Every pattern is also served as plain markdown at /patterns/<slug>/raw (the "View as markdown" link on the page), so an AI assistant can read the whole bundle directly from a shared link.

How a pattern fits the rest of Pathrule

A pattern does not introduce a new runtime concept. It is a packaging format over the model you already know:

  • The pieces are memories, rules and skills.
  • Each piece's path uses the same path scope rule as content you write yourself.
  • Once imported, the pieces surface through the same hooks and the same just-in-time retrieval as the rest of your workspace.

That is the whole idea: a pattern is a curated head start, expressed in the exact shape your assistant already reads.

  • Anatomy of a pattern breaks down the content model: pieces, paths, versioning and the open package behind the catalog.
  • Importing a pattern covers the token, the preview, and removing a bundle later.
  • Core concepts explains memories, rules and skills if you are new to the model.