Skip to content

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.

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 only

Captures are refused in importedBy.allow. See Imports.

members:
- subject: calls
match: "use[A-Z]*"
message: "`{name}` puts state in the View."

use[A-Z]* matches useState but not user.

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"

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, on and off for 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: readFileSync
  • {name} in a members message is the offending name.
  • {base} in a requires entry is the file’s name minus its final extension: "{base}.test.ts" beside user.root.ts means user.root.test.ts.
  • requires entries resolve ../ against the node’s folder.