Patterns
Every pattern in a manifest is a glob over a repository-relative path. Anything not in this table is literal, including dots.
| Token | Matches |
|---|---|
* |
part of one path segment |
** |
any number of segments |
? |
one character other than / |
{name} |
one segment: a capture in a tree key, a back-reference elsewhere |
[A-Z] |
a character class, passed through as written |
a | b |
several patterns sharing one node (tree keys only) |
A trailing /** also matches the folder itself: @/domain/** matches @/domain.
Captures
Section titled “Captures”A {name} in a tree key captures one segment. Below that node, {name} refers back to the
captured value:
"@/modules/{module}/domain/": imports: allow: ["@/modules/{module}/domain/**"] # the same module's domain onlyCaptures are refused in importedBy.allow. See
Imports.
Character classes
Section titled “Character classes”members: - subject: calls match: "use[A-Z]*" message: "`{name}` puts state in the View."use[A-Z]* matches useState but not user.
Multi-pattern keys
Section titled “Multi-pattern keys”A tree key may join patterns with | to share one node:
children: "*.aggregate-ops.ts | *.entity-ops.ts": { use: constituent-ops }In a value such as match or allow, | is literal. Use an array instead:
match: ["**/*.test.ts", "**/*.test.tsx"] # not "**/*.test.ts | **/*.test.tsx"Quoting in YAML
Section titled “Quoting in YAML”Quote every glob and every message. Unquoted, *, @, a backtick, { and # all mean
something else to YAML.
allow: ["@/domain/**", "**/*.test.ts"]name: { regex: "^(?:Database|[a-z0-9]+(?:-[a-z0-9]+)*)$" }- Use single quotes for a regex containing
\; double quotes process escapes. - Plain names can stay bare:
subject: calls,convention: kebab-case. - Quote
yes,no,onandofffor tools that still read YAML 1.1. - For multi-line values, such as a probe source,
use a block scalar (
|keeps line breaks,>-folds them):
probe: source: | import { readFileSync } from "node:fs"; readFileSync("x"); name: readFileSyncPlaceholders
Section titled “Placeholders”{name}in amembersmessage is the offending name.{base}in arequiresentry is the file’s name minus its final extension:"{base}.test.ts"besideuser.root.tsmeansuser.root.test.ts.requiresentries resolve../against the node’s folder.