What the pattern library is
The pattern library is a store of past solutions: short records of a problem, how it was solved and whether tests and the build passed afterwards. The idea is that an AI tool working on a similar problem later, in any of your projects, can start from something that already worked.
The library lives on your own machine, not inside a project. It is shared by every project on that machine and is not committed to git.
In 1.91.1 you can list, prune and export the library, but no command or workflow adds patterns to it. Recording patterns explains what that means in practice.
Where patterns are stored
| Path | What it holds |
|---|---|
~/.paqad/patterns/entries/<id>.json | One JSON file per pattern with the full record. |
~/.paqad/patterns/index.json | A summary of every pattern (id, category, stack, tags, date and the first 100 characters of the problem), used for fast filtering. |
~/.paqad/patterns/vectors/ | Only when RAG is turned on: numeric versions of each pattern used for similarity search, one folder per embedding provider and model. |
What a pattern contains
| Field | Meaning |
|---|---|
id | A random unique identifier (a UUID). |
created_at | When the pattern was saved. Used to decide whether it is stale. |
source_project | The folder name of the project it came from. |
stack_filter | The domain (coding or content), the frameworks and the traits it applies to. |
category | A label for the kind of work, general when none was given. |
problem | What needed solving. |
solution | How it was solved. |
files_involved | The files the solution touched. |
verification | Two yes-or-no values: tests_passed and build_passed. |
tags | Keywords for searching and filtering. |
How patterns are used
- By the AI, as instructions. Two of the agent roles Paqad installs, the solution architect and the market researcher, are told to check
~/.paqad/patterns/for similar past solutions. Whether and how the AI does this is model judgment, and it depends on your host tool allowing the AI to read files outside the project. - By you, from the command line.
paqad-ai patterns listfilters the library by domain, category, frameworks or keywords.paqad-ai patterns prunedeletes old patterns, andpaqad-ai patterns exportwrites them to a JSON or Markdown file. Details are on the patterns command reference. - By a scoring routine. Paqad's code contains a deterministic scoring routine for ranking patterns against a task. In 1.91.1 no command calls it. See How patterns are scored.
Does pattern text leave your machine
The library itself is plain files in your home folder. The only time pattern text is processed elsewhere is when RAG (the code search index) is turned on in a project. Building or refreshing that index also turns each pattern's text into vectors (lists of numbers that let similar texts be found) using the embedding provider you configured. With a hosted provider such as openai or voyageai, the pattern text is sent to that provider. With the local provider it is processed on your machine. RAG is off by default. See RAG overview.
Not the same as defect patterns
Paqad keeps a separate store of recurring defects found by compliance checks in ~/.paqad/defect-patterns/. That store is not part of the pattern library and is not managed by paqad-ai patterns.