@r_masseater/msch 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { A as dependencyEntries, C as propertyValue, D as publishedWorkspaces, M as workspaceDependencies, O as publicEntriesOf, S as nestedValues, _ as workspaceConfigOf, a as runTasksOf, b as keyName, c as VERIFY_TASK, i as workspaceDirectories, j as readManifest, k as MANIFEST_FILE, l as definesTask, s as RUN_TASKS, t as namedWorkspaces, u as hasVerifyTask, v as KeySchema, w as stringsIn, x as literalOf, y as childrenOf$2 } from "./workspace-CMPDXFWk.mjs";
3
- import { $ as isPropertyAssignment, A as getNameOfDeclaration, B as isExportDeclaration, C as API, D as SyntaxKind, E as SignatureKind, F as isBlock, G as isInterfaceDeclaration, H as isFunctionExpression, I as isCallExpression, J as isNewExpression, K as isModuleBlock, L as isClassDeclaration, M as isArrayLiteralExpression, N as isArrowFunction, O as getJSDocTags, P as isBinaryExpression, Q as isPropertyAccessExpression, R as isElementAccessExpression, S as uniqueByReference, T as InternalSymbolName, U as isIdentifier, V as isFunctionDeclaration, W as isImportDeclaration, X as isObjectLiteralExpression, Y as isNumericLiteral, Z as isParenthesizedExpression, _ as packageOf$1, a as problemAt$3, at as isStringLiteral, b as resolvedSymbol, c as columnOf, ct as isTypeReferenceNode, d as descendantsOf, dt as isVariableDeclarationList, et as isReturnStatement, f as importedModulesOf, ft as isVariableStatement, g as lineOf, h as isTypeDeclaration, i as formatProblem, it as isSpreadElement, j as getTextOfJSDocComment, k as getLeadingCommentRanges, l as contains, lt as isUnionTypeNode, m as isGenericDeclaration, n as ProblemList, nt as isSignatureDeclaration, o as sortProblems, ot as isTypeAliasDeclaration, p as isExternalDeclaration, q as isModuleDeclaration, rt as isSourceFile, s as childrenOf$3, st as isTypeLiteralNode, tt as isSatisfiesExpression, u as declarationsOf, ut as isVariableDeclaration, v as propertyNamesOf, w as IndexKind, x as symbolAt, y as referencedSymbols, z as isEnumDeclaration } from "./cli-contract-D4OO_ku4.mjs";
2
+ import { A as MANIFEST_FILE, C as nestedValues, M as readManifest, N as workspaceDependencies, O as publishedWorkspaces, S as literalOf, T as stringsIn, a as workspaceDirectories, b as childrenOf$2, c as RUN_TASKS, d as hasVerifyTask, j as dependencyEntries, k as publicEntriesOf, l as VERIFY_TASK, n as patternOf, o as runTasksOf, t as namedWorkspaces, u as definesTask, v as workspaceConfigOf, w as propertyValue, x as keyName, y as KeySchema } from "./workspace-BPoE5oW1.mjs";
3
+ import { $ as isPropertyAssignment, A as getNameOfDeclaration, B as isExportDeclaration, C as API, D as SyntaxKind, E as SignatureKind, F as isBlock, G as isInterfaceDeclaration, H as isFunctionExpression, I as isCallExpression, J as isNewExpression, K as isModuleBlock, L as isClassDeclaration, M as isArrayLiteralExpression, N as isArrowFunction, O as getJSDocTags, P as isBinaryExpression, Q as isPropertyAccessExpression, R as isElementAccessExpression, S as uniqueByReference, T as InternalSymbolName, U as isIdentifier, V as isFunctionDeclaration, W as isImportDeclaration, X as isObjectLiteralExpression, Y as isNumericLiteral, Z as isParenthesizedExpression, _ as packageOf$1, a as problemAt$4, at as isStringLiteral, b as resolvedSymbol, c as columnOf, ct as isTypeReferenceNode, d as descendantsOf, dt as isVariableDeclarationList, et as isReturnStatement, f as importedModulesOf, ft as isVariableStatement, g as lineOf, h as isTypeDeclaration, i as formatProblem, it as isSpreadElement, j as getTextOfJSDocComment, k as getLeadingCommentRanges, l as contains, lt as isUnionTypeNode, m as isGenericDeclaration, n as ProblemList, nt as isSignatureDeclaration, o as sortProblems, ot as isTypeAliasDeclaration, p as isExternalDeclaration, q as isModuleDeclaration, rt as isSourceFile, s as childrenOf$3, st as isTypeLiteralNode, tt as isSatisfiesExpression, u as declarationsOf, ut as isVariableDeclaration, v as propertyNamesOf, w as IndexKind, x as symbolAt, y as referencedSymbols, z as isEnumDeclaration } from "./cli-contract-B5ilWPaY.mjs";
4
4
  import { a as groupOf$1, i as nodeServicesLayer, n as RepositoryFiles, r as nodeRepositoryFiles, t as NODE_MODULES } from "./repository-files-B11FFAIk.mjs";
5
5
  import { t as COMMENT_DIRECTIVES } from "./comment-directives-WcDqvLwJ.mjs";
6
6
  import { VpToolsError, runVpa } from "@r_masseater/vite-plus-adopt";
@@ -317,7 +317,7 @@ const mentions$1 = (needle) => ({ api }) => (configPath) => Effect.gen(function*
317
317
  return pipe(texts, Array.some((text) => Option.exists(text, includesNeedle)));
318
318
  });
319
319
  // src/entities/project/model/inputs.ts
320
- const SEPARATOR$14 = "/";
320
+ const SEPARATOR$15 = "/";
321
321
  const SCOPE_PREFIX$1 = "@";
322
322
  const HIDDEN_PREFIX = ".";
323
323
  const encodeOptions = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown));
@@ -359,14 +359,14 @@ const closureOf$1 = Effect.fn("closureOf")(function* closureOf(root, configPath)
359
359
  const directories = yield* workspaceClosure(directory);
360
360
  return {
361
361
  directories,
362
- prefixes: pipe(directories, Array.map((found) => `${files.relative(root, found)}${SEPARATOR$14}`))
362
+ prefixes: pipe(directories, Array.map((found) => `${files.relative(root, found)}${SEPARATOR$15}`))
363
363
  };
364
364
  });
365
365
  const scopedNames = (modules) => (name) => Effect.gen(function* listScope() {
366
366
  const files = yield* RepositoryFiles;
367
367
  if (!String$1.startsWith(SCOPE_PREFIX$1)(name)) return [name];
368
368
  const scoped = yield* files.readDirectory(files.join(modules, name));
369
- return pipe(scoped, Array.map((entry) => `${name}${SEPARATOR$14}${entry}`));
369
+ return pipe(scoped, Array.map((entry) => `${name}${SEPARATOR$15}${entry}`));
370
370
  });
371
371
  const installedNames$1 = Effect.fn("installedNames")(function* installedNames(modules) {
372
372
  const listed = yield* (yield* RepositoryFiles).readDirectory(modules);
@@ -412,11 +412,11 @@ const positionOf = (source) => (index) => {
412
412
  };
413
413
  };
414
414
  // src/features/install-size/model/import-graph.ts
415
- const RELATIVE = /^\.\.?(?:\/|$)/u;
415
+ const RELATIVE$1 = /^\.\.?(?:\/|$)/u;
416
416
  const SUBPATH_IMPORT = "#";
417
417
  const WILDCARD$2 = "*";
418
418
  const SCOPE$1 = "@";
419
- const SEPARATOR$13 = "/";
419
+ const SEPARATOR$14 = "/";
420
420
  const SOURCE_SUFFIXES = [
421
421
  "",
422
422
  ".ts",
@@ -428,9 +428,9 @@ const PLAIN_SEGMENTS = 1;
428
428
  const ImportsField = Schema.Struct({ imports: Schema.optional(Schema.Record(Schema.String, Schema.String)) });
429
429
  const decodeImports = Schema.decodeOption(Schema.fromJsonString(ImportsField));
430
430
  const packageNameOf = (specifier) => {
431
- const segments = String$1.split(specifier, SEPARATOR$13);
432
- if (String$1.startsWith(SCOPE$1)(specifier)) return pipe(segments, Array.take(SCOPED_SEGMENTS), Array.join(SEPARATOR$13));
433
- return pipe(segments, Array.take(PLAIN_SEGMENTS), Array.join(SEPARATOR$13));
431
+ const segments = String$1.split(specifier, SEPARATOR$14);
432
+ if (String$1.startsWith(SCOPE$1)(specifier)) return pipe(segments, Array.take(SCOPED_SEGMENTS), Array.join(SEPARATOR$14));
433
+ return pipe(segments, Array.take(PLAIN_SEGMENTS), Array.join(SEPARATOR$14));
434
434
  };
435
435
  const literalText = (specifier) => pipe(Option.liftPredicate(specifier, isStringLiteral), Option.map((literal) => literal.text));
436
436
  const runtimeSpecifierOf = (statement) => {
@@ -462,13 +462,13 @@ const existingSource = Effect.fn("existingSource")(function* existingSource(base
462
462
  });
463
463
  const localFile = Effect.fn("localFile")(function* localFile({ directory, imports }, from, specifier) {
464
464
  const files = yield* RepositoryFiles;
465
- if (RELATIVE.test(specifier)) return yield* existingSource(files.resolve(files.dirname(from), specifier));
465
+ if (RELATIVE$1.test(specifier)) return yield* existingSource(files.resolve(files.dirname(from), specifier));
466
466
  const target = subpathTarget(imports, specifier);
467
467
  if (Option.isNone(target)) return Option.none();
468
468
  return yield* existingSource(files.resolve(directory, target.value));
469
469
  });
470
470
  const referenceOf$1 = (graph, from, specifier) => {
471
- if (RELATIVE.test(specifier) || String$1.startsWith(SUBPATH_IMPORT)(specifier)) return localFile(graph, from, specifier).pipe(Effect.map(Option.map(Result.succeed)));
471
+ if (RELATIVE$1.test(specifier) || String$1.startsWith(SUBPATH_IMPORT)(specifier)) return localFile(graph, from, specifier).pipe(Effect.map(Option.map(Result.succeed)));
472
472
  const name = packageNameOf(specifier);
473
473
  return Effect.succeedSome(Result.fail(name));
474
474
  };
@@ -1004,9 +1004,72 @@ const checkOverrides = Effect.fn("checkOverrides")(function* checkOverrides(root
1004
1004
  if (Option.isNone(manifest) || !Array.isReadonlyArrayNonEmpty(keys)) return [];
1005
1005
  return yield* problemsFor(root, manifest.value, keys);
1006
1006
  });
1007
+ // src/shared/lib/scanned-files.ts
1008
+ const SCANNED_FILE = /(?:\.(?:[cm]?[jt]sx?|jsonc?|toml|ya?ml|sh|bash|zsh|fish|rs|cs|go|mk)|(?:^|\/)(?:(?:Dockerfile|Containerfile)[^/]*|Makefile|justfile|\.tool-versions|[^./][^./]*))$/u;
1009
+ const LOCKFILE = /(?:^|\/)(?:[^/]*\.lock|[^/]*-lock\.(?:json|ya?ml))$/u;
1010
+ const TOOL_VERSIONS = /(?:^|\/)(?:\.?mise(?:\.[^/]+)?\.toml|\.tool-versions)$/u;
1011
+ const READ_CONCURRENCY$19 = 64;
1012
+ const isScannedText = ({ name }) => SCANNED_FILE.test(name) && !LOCKFILE.test(name);
1013
+ const isToolVersions = ({ name }) => TOOL_VERSIONS.test(name);
1014
+ /** @internal */
1015
+ const listedFiles = Effect.fn("listedFiles")(function* listedFiles(root) {
1016
+ const files = yield* RepositoryFiles;
1017
+ const names = yield* files.listedFiles(root);
1018
+ return pipe(names, Array.map((name) => ({
1019
+ name,
1020
+ file: files.join(root, name)
1021
+ })));
1022
+ });
1023
+ /** @internal */
1024
+ const presentFiles = Effect.fn("presentFiles")(function* presentFiles(listed) {
1025
+ const files = yield* RepositoryFiles;
1026
+ return yield* pipe(listed, Effect.filter(({ file }) => files.exists(file)));
1027
+ });
1028
+ /** @internal */
1029
+ const scanText = Effect.fn("scanText")(function* scanText(listed, problemsIn) {
1030
+ const files = yield* RepositoryFiles;
1031
+ const found = yield* Effect.forEach(listed, (entry) => files.readFile(entry.file).pipe(Effect.map(Option.match({
1032
+ onNone: () => [],
1033
+ onSome: (source) => problemsIn(entry, source)
1034
+ }))), { concurrency: READ_CONCURRENCY$19 });
1035
+ return Array.flatten(found);
1036
+ });
1037
+ // src/features/overrides/model/git-subpath.ts
1038
+ const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
1039
+ const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
1040
+ const RULE$28 = "git-subpath-dependency";
1041
+ const WHOLE_MATCH$3 = 0;
1042
+ const problemAt$3 = ({ file }, source) => (found) => ({
1043
+ file,
1044
+ ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
1045
+ rule: RULE$28,
1046
+ message: `Git subpath dependencies are banned. Publish the package to npm and depend on a released version instead of \`${String$1.trim(found[WHOLE_MATCH$3])}\`.`
1047
+ });
1048
+ const problemsIn$12 = (entry, source) => pipe(Array.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array.map(problemAt$3(entry, source)));
1049
+ const isDependencyFile = ({ name }) => DEPENDENCY_FILE.test(name);
1050
+ /** @internal */
1051
+ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(root) {
1052
+ const listed = yield* listedFiles(root);
1053
+ return yield* scanText(pipe(listed, Array.filter(isDependencyFile)), problemsIn$12);
1054
+ });
1055
+ // src/features/overrides/model/restricted-rules.ts
1056
+ const RULE$27 = "unnamed-restriction";
1057
+ const WHOLE_MATCH$2 = 0;
1058
+ const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-(?:imports|properties)\\b`, "gu");
1059
+ const problemsIn$11 = (entry, source) => pipe(Array.fromIterable(String$1.matchAll(UNNAMED)(source)), Array.map((found) => ({
1060
+ file: entry.file,
1061
+ ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
1062
+ rule: RULE$27,
1063
+ message: `${found[WHOLE_MATCH$2]} is not used in this repository, because its name does not say what an entry protects. Ban a package in dependencyRules.banned, and write any other restriction as a rule in msch-lint whose name states the intent.`
1064
+ })));
1065
+ /** @internal */
1066
+ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRestrictedRules(root) {
1067
+ const listed = yield* listedFiles(root);
1068
+ return yield* scanText(pipe(listed, Array.filter(isScannedText)), problemsIn$11);
1069
+ });
1007
1070
  // src/shared/lib/agent-docs.ts
1008
1071
  const AGENT_DOC = /(?:^|\/)(?:AGENTS|CLAUDE)\.md$/u;
1009
- const READ_CONCURRENCY$19 = 16;
1072
+ const READ_CONCURRENCY$18 = 16;
1010
1073
  const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblems(root, problemIn) {
1011
1074
  const files = yield* RepositoryFiles;
1012
1075
  const listed = yield* files.listedFiles(root);
@@ -1015,7 +1078,7 @@ const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblem
1015
1078
  const file = files.join(root, name);
1016
1079
  const problemOf = Option.flatMap(problemIn(file));
1017
1080
  return files.readFile(file).pipe(Effect.map(problemOf));
1018
- }, { concurrency: READ_CONCURRENCY$19 });
1081
+ }, { concurrency: READ_CONCURRENCY$18 });
1019
1082
  return Array.getSomes(found);
1020
1083
  });
1021
1084
  // src/features/placement/model/agent-docs-length.ts
@@ -1038,14 +1101,16 @@ const checkAgentDocsLength = (root) => agentDocProblems(root, (file) => (source)
1038
1101
  // src/features/placement/model/colocated-tests.ts
1039
1102
  const RULE$25 = "colocated-test";
1040
1103
  const FIRST$12 = 1;
1041
- const READ_CONCURRENCY$18 = 64;
1104
+ const READ_CONCURRENCY$17 = 64;
1042
1105
  const ROOT_SUBPATH = ".";
1043
1106
  const NAME_GROUP = "name";
1044
1107
  const SPECIFIER_GROUP = "specifier";
1045
1108
  const SCRIPT$1 = /\.[cm]?[jt]sx?$/u;
1046
1109
  const TEST_FILE = /\.test\.[cm]?[jt]sx?$/u;
1047
1110
  const MANIFEST_NAME = /package\.json$/u;
1048
- const SEPARATE_TEST_DIRECTORY = /(?:^|\/)(?:__tests__|__mocks__|tests?|specs?)\//u;
1111
+ const SEPARATE_TEST_DIRECTORY = /(?:^|\/)(?:__tests__|__mocks__|tests?)\//u;
1112
+ const SPEC_DIRECTORY = /(?:^|\/)specs?\//u;
1113
+ const SPEC_FILE = /\.spec\.[cm]?[jt]sx?$/u;
1049
1114
  const RELATIVE_REFERENCE = /["'`]\.\/(?<name>[^/"'`]+)/gu;
1050
1115
  const DIRNAME_REFERENCE = /import\.meta\.dirname\s*,\s*["'](?<name>[^/"']+)["']/gu;
1051
1116
  const MODULE_SPECIFIER = /(?:\bfrom\s+|\bimport\s*\(\s*|\bimport\s+|\bvi\.mock\(\s*)["'](?<specifier>[^"'.#][^"']*)["']/gu;
@@ -1100,8 +1165,9 @@ const refersIn = Effect.fn("refersIn")(function* refersIn(context, test) {
1100
1165
  if (Option.isNone(source)) return true;
1101
1166
  return yield* refersToOwnDirectory(context, test, source.value);
1102
1167
  });
1168
+ const inSeparateTestDirectory = (name) => SEPARATE_TEST_DIRECTORY.test(name) || SPEC_DIRECTORY.test(name) && SPEC_FILE.test(name);
1103
1169
  const problemIn$5 = Effect.fn("problemIn")(function* problemIn(context, test) {
1104
- if (SEPARATE_TEST_DIRECTORY.test(test.name)) return Option.some(problemFor$4(test, DIRECTORY_MESSAGE));
1170
+ if (inSeparateTestDirectory(test.name)) return Option.some(problemFor$4(test, DIRECTORY_MESSAGE));
1105
1171
  if (!TEST_FILE.test(test.name)) return Option.none();
1106
1172
  if (yield* refersIn(context, test)) return Option.none();
1107
1173
  return Option.some(problemFor$4(test, SIBLING_MESSAGE));
@@ -1124,15 +1190,15 @@ const checkColocatedTests = Effect.fn("checkColocatedTests")(function* checkColo
1124
1190
  directory: files.dirname(file)
1125
1191
  };
1126
1192
  }));
1127
- const found = yield* Effect.forEach(tests, (test) => problemIn$5(context, test), { concurrency: READ_CONCURRENCY$18 });
1193
+ const found = yield* Effect.forEach(tests, (test) => problemIn$5(context, test), { concurrency: READ_CONCURRENCY$17 });
1128
1194
  return Array.getSomes(found);
1129
1195
  });
1130
1196
  // src/features/placement/model/dangling-links.ts
1131
1197
  const RULE$24 = "dangling-link";
1132
- const SEPARATOR$12 = "/";
1198
+ const SEPARATOR$13 = "/";
1133
1199
  const FIRST$11 = 1;
1134
- const READ_CONCURRENCY$17 = 16;
1135
- const holds = (target) => (name) => name === target || String$1.startsWith(`${target}${SEPARATOR$12}`)(name);
1200
+ const READ_CONCURRENCY$16 = 16;
1201
+ const holds = (target) => (name) => name === target || String$1.startsWith(`${target}${SEPARATOR$13}`)(name);
1136
1202
  /** @internal */
1137
1203
  const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDanglingLinks(root) {
1138
1204
  const files = yield* RepositoryFiles;
@@ -1148,22 +1214,22 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
1148
1214
  message: `is a link to ${target}, where no file is tracked. A fresh checkout gets a link to nothing, and GitHub Actions fails to load the repository's actions. Track a file there, such as .gitkeep, or delete the link.`
1149
1215
  })));
1150
1216
  });
1151
- const found = yield* Effect.forEach(links, problemOf, { concurrency: READ_CONCURRENCY$17 });
1217
+ const found = yield* Effect.forEach(links, problemOf, { concurrency: READ_CONCURRENCY$16 });
1152
1218
  return Array.getSomes(found);
1153
1219
  });
1154
1220
  // src/features/placement/model/nested-docs.ts
1155
1221
  const RULE$23 = "nested-docs";
1156
1222
  const CONFIG_FILE$4 = "vite.config.ts";
1157
- const SEPARATOR$11 = "/";
1223
+ const SEPARATOR$12 = "/";
1158
1224
  const FIRST$10 = 1;
1159
- const READ_CONCURRENCY$16 = 64;
1225
+ const READ_CONCURRENCY$15 = 64;
1160
1226
  const AGENT_DOCS = /^(?:AGENTS|CLAUDE)(?:\.[^/]+)?\.md$/iu;
1161
1227
  const WORKSPACE_AGENT_DOC = "AGENTS.md";
1162
1228
  const README = /^README(?:\.[^/]+)?$/iu;
1163
1229
  const RootConfig$1 = Schema.Struct({ msch: Schema.Struct({ workspaceAgentsMd: Schema.Literal(true) }) });
1164
1230
  const taggedError$3 = Schema.TaggedError;
1165
1231
  var RootConfigUnreadable = class extends taggedError$3()("RootConfigUnreadable", { file: Schema.String }) {};
1166
- const isNested = (name) => String$1.includes(SEPARATOR$11)(name);
1232
+ const isNested = (name) => String$1.includes(SEPARATOR$12)(name);
1167
1233
  const problemFor$3 = (file, message) => ({
1168
1234
  file,
1169
1235
  line: FIRST$10,
@@ -1214,17 +1280,17 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
1214
1280
  workspaces: pipe(nested, Array.filter((name) => files.basename(name) === MANIFEST_FILE), Array.map((name) => files.dirname(files.join(root, name))), HashSet.fromIterable),
1215
1281
  workspaceAgentDocs
1216
1282
  };
1217
- const found = yield* Effect.forEach(nested, (name) => problemIn$4(root, allowed, name), { concurrency: READ_CONCURRENCY$16 });
1283
+ const found = yield* Effect.forEach(nested, (name) => problemIn$4(root, allowed, name), { concurrency: READ_CONCURRENCY$15 });
1218
1284
  return Array.getSomes(found);
1219
1285
  });
1220
1286
  // src/features/placement/model/root-docs.ts
1221
1287
  const RULE$22 = "root-docs";
1222
- const SEPARATOR$10 = "/";
1288
+ const SEPARATOR$11 = "/";
1223
1289
  const FIRST$9 = 1;
1224
1290
  const MARKDOWN$1 = /\.(?:md|mdx|markdown)$/iu;
1225
1291
  const ALLOWED = /^(?:README(?:\.[^/]+)?|AGENTS|CLAUDE|ARCHITECTURE|DESIGN|CHANGELOG|LICENSE|NOTICE)\.(?:md|mdx|markdown)$/iu;
1226
1292
  const MESSAGE$5 = "is a hand-written document outside the places documents belong. Hand-written text goes only in the root README.md, AGENTS.md, CLAUDE.md, ARCHITECTURE.md and DESIGN.md, and under docs/. Move what is still true and not already told by the code into one of them, and delete this file.";
1227
- const isStrayRootDoc = (name) => !String$1.includes(SEPARATOR$10)(name) && MARKDOWN$1.test(name) && !ALLOWED.test(name);
1293
+ const isStrayRootDoc = (name) => !String$1.includes(SEPARATOR$11)(name) && MARKDOWN$1.test(name) && !ALLOWED.test(name);
1228
1294
  /** @internal */
1229
1295
  const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
1230
1296
  const files = yield* RepositoryFiles;
@@ -1240,14 +1306,50 @@ const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
1240
1306
  // src/features/placement/model/root-readme.ts
1241
1307
  const RULE$21 = "root-readme";
1242
1308
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
1243
- const READ_CONCURRENCY$15 = 16;
1309
+ const READ_CONCURRENCY$14 = 16;
1244
1310
  const START$12 = 0;
1245
1311
  const CHECK_POLICY = "@r_masseater/msch";
1312
+ const MARKETPLACE = ".claude-plugin/marketplace.json";
1313
+ const RELATIVE = /^\.\//u;
1314
+ const SEPARATOR$10 = "/";
1315
+ const MarketplacePlugin = Schema.Struct({
1316
+ name: Schema.optional(Schema.String),
1317
+ source: Schema.Unknown
1318
+ });
1319
+ const Marketplace = Schema.fromJsonString(Schema.Struct({ plugins: Schema.Array(MarketplacePlugin) }));
1320
+ const NO_PLUGINS = {
1321
+ directories: [],
1322
+ names: []
1323
+ };
1246
1324
  const isCheckPolicy = ({ packageName }) => Option.contains(packageName, CHECK_POLICY);
1247
1325
  const messageFor = (directory) => `names the workspace ${directory}. The root README, AGENTS.md and CLAUDE.md describe the repository as a whole. Write what belongs to the workspace in ${directory}/README.md, or for agents in ${directory}/AGENTS.md.`;
1248
- const problemsIn$10 = (file, source) => ({ directory, pattern }) => {
1249
- const message = messageFor(directory);
1326
+ const lastSegment = (directory) => pipe(String$1.split(SEPARATOR$10)(directory), Array.last, Option.getOrElse(() => directory));
1327
+ const pluginsOf = (plugins) => {
1328
+ const directories = pipe(plugins, Array.map(({ source }) => source), Array.filter(Predicate.isString), Array.map(String$1.replace(RELATIVE, "")));
1329
+ const segments = pipe(directories, Array.map(lastSegment));
1330
+ return {
1331
+ directories,
1332
+ names: pipe(plugins, Array.map(({ name }) => name), Array.filter(Predicate.isString), Array.appendAll(segments), Array.dedupe)
1333
+ };
1334
+ };
1335
+ const marketplacePlugins = Effect.fn("marketplacePlugins")(function* marketplacePlugins(root) {
1336
+ const files = yield* RepositoryFiles;
1337
+ const text = yield* files.readFile(files.join(root, MARKETPLACE));
1338
+ return pipe(text, Option.flatMap(Schema.decodeOption(Marketplace)), Option.map(({ plugins }) => pluginsOf(plugins)), Option.getOrElse(() => NO_PLUGINS));
1339
+ });
1340
+ const isPluginName = (plugins) => (name) => Array.contains(plugins.names, name);
1341
+ const ownNames = (plugins, names) => {
1342
+ const ownName = Predicate.not(isPluginName(plugins));
1343
+ return pipe(names, Array.filter(ownName));
1344
+ };
1345
+ const patternFor = (plugins) => ({ directory, names }) => patternOf(Option.match(Array.findFirst(plugins.directories, (plugin) => plugin === directory), {
1346
+ onNone: () => ownNames(plugins, names),
1347
+ onSome: () => [directory]
1348
+ }));
1349
+ const problemsIn$10 = (file, source, plugins) => (workspace) => {
1350
+ const message = messageFor(workspace.directory);
1250
1351
  const at = positionOf(source);
1352
+ const pattern = patternFor(plugins)(workspace);
1251
1353
  return pipe(Array.fromIterable(String$1.matchAll(pattern)(source)), Array.map((found) => ({
1252
1354
  file,
1253
1355
  ...at(found.index ?? START$12),
@@ -1255,11 +1357,11 @@ const problemsIn$10 = (file, source) => ({ directory, pattern }) => {
1255
1357
  message
1256
1358
  })));
1257
1359
  };
1258
- const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces) {
1360
+ const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces, plugins) {
1259
1361
  const text = yield* (yield* RepositoryFiles).readFile(file);
1260
1362
  return pipe(text, Option.match({
1261
1363
  onNone: () => [],
1262
- onSome: (source) => pipe(workspaces, Array.flatMap(problemsIn$10(file, source)))
1364
+ onSome: (source) => pipe(workspaces, Array.flatMap(problemsIn$10(file, source, plugins)))
1263
1365
  }));
1264
1366
  });
1265
1367
  /** @internal */
@@ -1269,7 +1371,8 @@ const checkRootReadme = Effect.fn("checkRootReadme")(function* checkRootReadme(r
1269
1371
  const readmes = pipe(names, Array.filter((name) => ROOT_DOC.test(name)));
1270
1372
  const named = yield* namedWorkspaces(root);
1271
1373
  const workspaces = pipe(named, Array.filter((workspace) => !isCheckPolicy(workspace)));
1272
- const found = yield* Effect.forEach(readmes, (name) => problemsInReadme(files.join(root, name), workspaces), { concurrency: READ_CONCURRENCY$15 });
1374
+ const plugins = yield* marketplacePlugins(root);
1375
+ const found = yield* Effect.forEach(readmes, (name) => problemsInReadme(files.join(root, name), workspaces, plugins), { concurrency: READ_CONCURRENCY$14 });
1273
1376
  return Array.flatten(found);
1274
1377
  });
1275
1378
  // src/features/placement/model/placement-checks.ts
@@ -1294,7 +1397,7 @@ const SCRIPTS_DIRECTORY = "scripts";
1294
1397
  const WORKFLOW_DIRECTORY$1 = ".github/";
1295
1398
  const SEPARATOR$9 = "/";
1296
1399
  const CURRENT = "./";
1297
- const READ_CONCURRENCY$14 = 8;
1400
+ const READ_CONCURRENCY$13 = 8;
1298
1401
  const FIRST$8 = 1;
1299
1402
  const RUN_FILE = /(?:^|[\s;&|(])(?:node|vpx|tsx|bun|deno)\s+(?:-\S+\s+)*(?<file>[^\s;&|)]+\.[cm]?[jt]s)\b/gu;
1300
1403
  const COMMAND = /^bin\/[^/]+\.[cm]?ts$/u;
@@ -1344,7 +1447,7 @@ const workflowText = Effect.fn("workflowText")(function* workflowText(root) {
1344
1447
  const files = yield* RepositoryFiles;
1345
1448
  const listed = yield* files.listedFiles(root);
1346
1449
  const workflows = pipe(listed, Array.filter(String$1.startsWith(WORKFLOW_DIRECTORY$1)));
1347
- const texts = yield* Effect.forEach(workflows, (file) => files.readFile(files.join(root, file)), { concurrency: READ_CONCURRENCY$14 });
1450
+ const texts = yield* Effect.forEach(workflows, (file) => files.readFile(files.join(root, file)), { concurrency: READ_CONCURRENCY$13 });
1348
1451
  return pipe(Array.getSomes(texts), Array.join("\n"));
1349
1452
  });
1350
1453
  const workspacePath = (directory, path) => pipe([directory, path], Array.filter(String$1.isNonEmpty), Array.join(SEPARATOR$9));
@@ -1394,8 +1497,8 @@ const scriptsProblem = Effect.fn("scriptsProblem")(function* scriptsProblem(root
1394
1497
  const checkCommandEntries = Effect.fn("checkCommandEntries")(function* checkCommandEntries(root) {
1395
1498
  const all = ["", ...yield* workspaceDirectories(root)];
1396
1499
  const workflows = yield* workflowText(root);
1397
- const found = yield* Effect.forEach(all, (directory) => problemsIn$9(root, directory, workflows), { concurrency: READ_CONCURRENCY$14 });
1398
- const scripts = yield* Effect.forEach(all, (directory) => scriptsProblem(root, directory), { concurrency: READ_CONCURRENCY$14 });
1500
+ const found = yield* Effect.forEach(all, (directory) => problemsIn$9(root, directory, workflows), { concurrency: READ_CONCURRENCY$13 });
1501
+ const scripts = yield* Effect.forEach(all, (directory) => scriptsProblem(root, directory), { concurrency: READ_CONCURRENCY$13 });
1399
1502
  return [...Array.flatten(found), ...Array.getSomes(scripts)];
1400
1503
  });
1401
1504
  // src/features/repository-layout/model/crates.ts
@@ -1404,7 +1507,7 @@ const CARGO_FILE = "Cargo.toml";
1404
1507
  const CONFIG_FILE$3 = "vite.config.ts";
1405
1508
  const SEPARATOR$8 = "/";
1406
1509
  const FIRST$7 = 1;
1407
- const READ_CONCURRENCY$13 = 8;
1510
+ const READ_CONCURRENCY$12 = 8;
1408
1511
  const CrateEntry = Schema.Struct({
1409
1512
  name: Schema.String,
1410
1513
  manifest_path: Schema.String
@@ -1453,7 +1556,7 @@ const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
1453
1556
  if (!(yield* files.exists(files.join(root, CARGO_FILE)))) return [];
1454
1557
  const directories = yield* workspaceDirectories(root);
1455
1558
  const crates = yield* cratesIn(root);
1456
- const found = yield* Effect.forEach(crates, (crate) => problemIn$3(root, directories, crate), { concurrency: READ_CONCURRENCY$13 });
1559
+ const found = yield* Effect.forEach(crates, (crate) => problemIn$3(root, directories, crate), { concurrency: READ_CONCURRENCY$12 });
1457
1560
  return Array.getSomes(found);
1458
1561
  });
1459
1562
  // src/features/repository-layout/model/fallow-entries.ts
@@ -1467,7 +1570,7 @@ const FALLOW_CONFIG = /(?:^|\/)(?:\.fallowrc\.jsonc?|fallow-plugin-[^/]+\.jsonc?
1467
1570
  const WILDCARD$1 = /[*?{[]/u;
1468
1571
  const SEPARATOR$7 = "/";
1469
1572
  const WRAP_OFFSET = 1;
1470
- const READ_CONCURRENCY$12 = 8;
1573
+ const READ_CONCURRENCY$11 = 8;
1471
1574
  const decodeKey = Schema.decodeUnknownOption(KeySchema);
1472
1575
  const isEntryProperty = (node) => node["type"] === "Property" && pipe(decodeKey(node["key"]), Option.exists((key) => Array.contains(ENTRY_KEYS, keyName(key))));
1473
1576
  const entryPatternsIn = (node) => {
@@ -1495,14 +1598,14 @@ const problemsIn$8 = Effect.fn("problemsIn")(function* problemsIn(root, file, di
1495
1598
  const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallowEntries(root) {
1496
1599
  const listed = yield* (yield* RepositoryFiles).listedFiles(root);
1497
1600
  const directories = yield* workspaceDirectories(root);
1498
- const found = yield* Effect.forEach(pipe(listed, Array.filter((file) => FALLOW_CONFIG.test(file))), (file) => problemsIn$8(root, file, directories), { concurrency: READ_CONCURRENCY$12 });
1601
+ const found = yield* Effect.forEach(pipe(listed, Array.filter((file) => FALLOW_CONFIG.test(file))), (file) => problemsIn$8(root, file, directories), { concurrency: READ_CONCURRENCY$11 });
1499
1602
  return Array.flatten(found);
1500
1603
  });
1501
1604
  // src/features/repository-layout/model/hidden-verify.ts
1502
1605
  const RULE$18 = "hidden-verify";
1503
1606
  const CONFIG_FILE$2 = "vite.config.ts";
1504
1607
  const FIRST$6 = 1;
1505
- const READ_CONCURRENCY$11 = 8;
1608
+ const READ_CONCURRENCY$10 = 8;
1506
1609
  const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory) {
1507
1610
  const config = yield* workspaceConfigOf(root, directory);
1508
1611
  if (Option.isNone(config)) return Option.none();
@@ -1520,7 +1623,7 @@ const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory)
1520
1623
  /** @internal */
1521
1624
  const checkHiddenVerify = Effect.fn("checkHiddenVerify")(function* checkHiddenVerify(root) {
1522
1625
  const directories = yield* workspaceDirectories(root);
1523
- const found = yield* Effect.forEach(directories, (directory) => problemIn$2(root, directory), { concurrency: READ_CONCURRENCY$11 });
1626
+ const found = yield* Effect.forEach(directories, (directory) => problemIn$2(root, directory), { concurrency: READ_CONCURRENCY$10 });
1524
1627
  return Array.getSomes(found);
1525
1628
  });
1526
1629
  // src/features/repository-layout/model/root-workspace-paths.ts
@@ -1558,7 +1661,7 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
1558
1661
  });
1559
1662
  // src/features/repository-layout/model/shared-uncached-tasks.ts
1560
1663
  const RULE$16 = "shared-uncached-task";
1561
- const READ_CONCURRENCY$10 = 8;
1664
+ const READ_CONCURRENCY$9 = 8;
1562
1665
  const SHARED = 2;
1563
1666
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
1564
1667
  const UncachedTask = Schema.Struct({
@@ -1607,7 +1710,7 @@ const problemsOf$1 = (definitions) => {
1607
1710
  /** @internal */
1608
1711
  const checkSharedUncachedTasks = Effect.fn("checkSharedUncachedTasks")(function* checkSharedUncachedTasks(root) {
1609
1712
  const directories = yield* workspaceDirectories(root);
1610
- const found = yield* Effect.forEach(directories, (directory) => definitionsIn(root, directory), { concurrency: READ_CONCURRENCY$10 });
1713
+ const found = yield* Effect.forEach(directories, (directory) => definitionsIn(root, directory), { concurrency: READ_CONCURRENCY$9 });
1611
1714
  return pipe(Array.flatten(found), Array.groupBy(({ name, definition }) => `${name}\u0000${definition}`), Record.values, Array.flatMap(problemsOf$1));
1612
1715
  });
1613
1716
  // src/features/repository-layout/model/workflow-nodes.ts
@@ -1749,7 +1852,7 @@ const producedPaths = (source) => pipe(jobsOf(source), Array.flatMap(([, job]) =
1749
1852
  const RULE$15 = "workflow-path";
1750
1853
  const WORKFLOW_DIRECTORY = ".github/workflows/";
1751
1854
  const WORKFLOW_EXTENSIONS = [".yml", ".yaml"];
1752
- const READ_CONCURRENCY$9 = 8;
1855
+ const READ_CONCURRENCY$8 = 8;
1753
1856
  const WILDCARD = /[*?[]/u;
1754
1857
  const SEPARATOR$5 = "/";
1755
1858
  const FIRST$4 = 0;
@@ -1827,7 +1930,7 @@ const problemsIn$6 = Effect.fn("problemsIn")(function* problemsIn(root, workflow
1827
1930
  /** @internal */
1828
1931
  const checkWorkflowPaths = Effect.fn("checkWorkflowPaths")(function* checkWorkflowPaths(root) {
1829
1932
  const listed = yield* (yield* RepositoryFiles).listedFiles(root);
1830
- const found = yield* Effect.forEach(pipe(listed, Array.filter(isWorkflow)), (workflow) => problemsIn$6(root, workflow), { concurrency: READ_CONCURRENCY$9 });
1933
+ const found = yield* Effect.forEach(pipe(listed, Array.filter(isWorkflow)), (workflow) => problemsIn$6(root, workflow), { concurrency: READ_CONCURRENCY$8 });
1831
1934
  return Array.flatten(found);
1832
1935
  });
1833
1936
  // src/features/repository-layout/model/workflow-scale.ts
@@ -1839,7 +1942,7 @@ const FILTER_KEYS = ["paths", "paths-ignore"];
1839
1942
  const PATHS_FILTER_ACTION = /(?:^|\/)paths-filter@/u;
1840
1943
  const PACKAGE_FILTER = /(?:^|\s)(?:--filter|-F)(?:\s+|=)(?<quote>["']?)(?<value>[^\s"'$][^\s"']*)\k<quote>/gu;
1841
1944
  const START$11 = 0;
1842
- const READ_CONCURRENCY$8 = 8;
1945
+ const READ_CONCURRENCY$7 = 8;
1843
1946
  const SEPARATOR$4 = "/";
1844
1947
  const WORD_SEPARATORS = /[-_]/gu;
1845
1948
  const SPACE = " ";
@@ -1861,7 +1964,7 @@ const pathFiltersIn = (file, source) => {
1861
1964
  source
1862
1965
  }, PATH_FILTER, FILTER_MESSAGE)(offset)));
1863
1966
  };
1864
- const matching = (workspaces, text) => pipe(workspaces, Array.findFirst(({ pattern }) => Option.isSome(String$1.match(pattern)(text))), Option.map(({ directory }) => directory));
1967
+ const matching = (workspaces, text) => pipe(workspaces, Array.findFirst(({ names }) => Array.isReadonlyArrayNonEmpty(names) && Option.isSome(String$1.match(patternOf(names))(text))), Option.map(({ directory }) => directory));
1865
1968
  const named = (workspaces, text) => Option.orElse(matching(workspaces, text), () => matching(workspaces, String$1.replaceAll(WORD_SEPARATORS, SPACE)(text)));
1866
1969
  const containing = (workspaces, path) => pipe(workspaces, Array.findFirst(({ directory }) => path === directory || String$1.startsWith(`${directory}${SEPARATOR$4}`)(path)), Option.map(({ directory }) => directory));
1867
1970
  const namesIn = (name, source) => {
@@ -1919,7 +2022,7 @@ const checkWorkflowScale = Effect.fn("checkWorkflowScale")(function* checkWorkfl
1919
2022
  name: stem,
1920
2023
  source: text
1921
2024
  })]), Option.getOrElse(() => []));
1922
- }), { concurrency: READ_CONCURRENCY$8 });
2025
+ }), { concurrency: READ_CONCURRENCY$7 });
1923
2026
  const actions = pipe(listed, Array.flatMap((name) => pipe(groupOf(ACTION, name), Option.map((action) => actionProblems(workspaces, files.join(root, name), action)), Option.getOrElse(() => []))));
1924
2027
  return [...Array.flatten(found), ...actions];
1925
2028
  });
@@ -2035,7 +2138,7 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
2035
2138
  };
2036
2139
  const problemOf$4 = (checker) => (candidate) => {
2037
2140
  if (changesTheCall(candidate.wrapper)) return Option.none();
2038
- return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$3({
2141
+ return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$4({
2039
2142
  rule: RULE$14,
2040
2143
  message: messageOf(forward.callee.getText())
2041
2144
  })(candidate.name)));
@@ -2125,7 +2228,7 @@ const ownerValuesOf = (checker) => (declaration) => {
2125
2228
  const type = checker.getTypeAtLocation(declaration.name);
2126
2229
  return finiteValuesOf(checker)(type).pipe(Option.orElse(() => objectValuesOf(checker)(type)));
2127
2230
  };
2128
- const annotationProblem = (message) => problemAt$3({
2231
+ const annotationProblem = (message) => problemAt$4({
2129
2232
  rule: "owner-annotation",
2130
2233
  message
2131
2234
  });
@@ -2258,7 +2361,7 @@ const shapeProblem = (site, matches) => {
2258
2361
  onNone: () => "Derive it from the library type, for example with Pick, instead of copying its properties.",
2259
2362
  onSome: () => "Use the library type instead of copying it."
2260
2363
  });
2261
- return problemAt$3({
2364
+ return problemAt$4({
2262
2365
  rule: "library-shape",
2263
2366
  message: `This shape copies ${shown}. ${advice}`
2264
2367
  })(site.node);
@@ -2352,7 +2455,7 @@ const derivedVerdict = (context) => (site) => {
2352
2455
  const added = pipe(site.values, Array.filter((value) => !isSubsetOf([value], held)));
2353
2456
  if (!Array.isReadonlyArrayNonEmpty(owners) || !Array.isReadonlyArrayNonEmpty(added)) return verdict([], []);
2354
2457
  const message = `This set adds ${formatValues(added)} to ${describeOwners(owners)}. Add the values to the owner, or register the wider set as its own concept.`;
2355
- return verdict([problemAt$3({
2458
+ return verdict([problemAt$4({
2356
2459
  rule: "owner-extension",
2357
2460
  message
2358
2461
  })(site.node)], []);
@@ -2374,7 +2477,7 @@ const originalVerdict = (context) => (site) => {
2374
2477
  const owners = pipe(context.owners, Array.filter((owner) => isSubsetOf(site.values, owner.values)));
2375
2478
  if (Array.isReadonlyArrayNonEmpty(owners)) {
2376
2479
  const message = `The values ${formatValues(site.values)} are owned by ${describeOwners(owners)}. Derive this set from the owner instead of restating it.`;
2377
- return verdict([problemAt$3({
2480
+ return verdict([problemAt$4({
2378
2481
  rule: "owner-value-set",
2379
2482
  message
2380
2483
  })(site.node)], []);
@@ -2382,7 +2485,7 @@ const originalVerdict = (context) => (site) => {
2382
2485
  const candidates = libraryCandidates(context)(site);
2383
2486
  if (Array.isReadonlyArrayNonEmpty(candidates)) {
2384
2487
  const message = `The values ${formatValues(site.values)} restate a dependency type: ${listCandidates(candidates)}. Derive this set from the library type.`;
2385
- return verdict([problemAt$3({
2488
+ return verdict([problemAt$4({
2386
2489
  rule: "library-value-set",
2387
2490
  message
2388
2491
  })(site.node)], []);
@@ -2413,7 +2516,7 @@ const isValuePosition = (node) => {
2413
2516
  const { parent } = node;
2414
2517
  return VALUE_PARENT_KINDS.has(parent.kind) || pipe(VALUE_SLOTS, Array.some((isSlot) => isSlot(node, parent)));
2415
2518
  };
2416
- const ownedLiteralProblem = (context) => (literal) => Option.fromUndefinedOr(context.checker.getContextualType(literal)).pipe(Option.filter((contextual) => vocabularyOf(context.checker)(contextual).pipe(Option.exists((vocabulary) => !vocabulary.admitsUnnamedValues))), Option.map(() => pipe(contextSymbolsOf(context.checker)(literal), Array.flatMap((symbol) => ownersBehind(context)(symbol, [])), uniqueByReference, Array.filter((owner) => isSubsetOf([literal.text], pipe(owner.values, Array.map(String)))))), Option.filter((owners) => Array.isReadonlyArrayNonEmpty(owners)), Option.map((owners) => problemAt$3({
2519
+ const ownedLiteralProblem = (context) => (literal) => Option.fromUndefinedOr(context.checker.getContextualType(literal)).pipe(Option.filter((contextual) => vocabularyOf(context.checker)(contextual).pipe(Option.exists((vocabulary) => !vocabulary.admitsUnnamedValues))), Option.map(() => pipe(contextSymbolsOf(context.checker)(literal), Array.flatMap((symbol) => ownersBehind(context)(symbol, [])), uniqueByReference, Array.filter((owner) => isSubsetOf([literal.text], pipe(owner.values, Array.map(String)))))), Option.filter((owners) => Array.isReadonlyArrayNonEmpty(owners)), Option.map((owners) => problemAt$4({
2417
2520
  rule: "owned-literal",
2418
2521
  message: `${literal.getText()} is a value of ${describeOwners(owners)}. Write it through the owner's binding instead of as a literal.`
2419
2522
  })(literal)));
@@ -2693,7 +2796,7 @@ const PLUGIN_HOOKS_FILE = /(?:^|\/)hooks\/hooks\.json$/u;
2693
2796
  const PROJECT_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PROJECT_DIR\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
2694
2797
  const PLUGIN_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PLUGIN_ROOT\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
2695
2798
  const PLUGIN_ROOT = "..";
2696
- const READ_CONCURRENCY$7 = 16;
2799
+ const READ_CONCURRENCY$6 = 16;
2697
2800
  const START$10 = 0;
2698
2801
  const referenceOf = (found) => pipe(groupOf$1("path")(found), Option.filter(() => Option.isNone(groupOf$1("optional")(found))), Option.map((path) => ({
2699
2802
  path,
@@ -2736,7 +2839,7 @@ const checkMissingHooks = Effect.fn("checkMissingHooks")(function* checkMissingH
2736
2839
  }];
2737
2840
  return [];
2738
2841
  }));
2739
- const found = yield* Effect.forEach(hookFiles, problemsIn$5, { concurrency: READ_CONCURRENCY$7 });
2842
+ const found = yield* Effect.forEach(hookFiles, problemsIn$5, { concurrency: READ_CONCURRENCY$6 });
2740
2843
  return Array.flatten(found);
2741
2844
  });
2742
2845
  // src/features/scripts/model/shell-scripts.ts
@@ -2744,7 +2847,7 @@ const SHELL_FILE = /\.(?:sh|bash|zsh|ksh|fish|command)$/u;
2744
2847
  const SHELL_SHEBANG = /^#!\S*(?:\/|\s)(?:env\s+)?(?:-\S+\s+)*(?:ba|z|k|da)?sh\b|^#!\S*fish\b/u;
2745
2848
  const EXTENSION = /\.[^./]+$/u;
2746
2849
  const SETTINGS_FILE = ".claude/settings.json";
2747
- const READ_CONCURRENCY$6 = 64;
2850
+ const READ_CONCURRENCY$5 = 64;
2748
2851
  const FIRST$3 = 1;
2749
2852
  const RULE$12 = "shell-script";
2750
2853
  const MESSAGE$4 = "is a shell script. Do the work in TypeScript as a Vite+ task in vite.config.ts, a test, or the tool's own hook, and delete this file. Only the SessionStart hook in .claude/settings.json, which installs the toolchain before TypeScript can run, stays a shell script.";
@@ -2786,12 +2889,12 @@ const checkShellScripts = Effect.fn("checkShellScripts")(function* checkShellScr
2786
2889
  return files.readFile(file).pipe(Effect.map(Option.exists((source) => SHELL_SHEBANG.test(source))));
2787
2890
  };
2788
2891
  const candidates = pipe(names, Array.filter((name) => !isSessionStartHook(name)));
2789
- const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$6 });
2892
+ const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$5 });
2790
2893
  return pipe(shell, Array.map((name) => problemFor$1(files.join(root, name))));
2791
2894
  });
2792
2895
  // src/shared/lib/workflow-files.ts
2793
2896
  const WORKFLOW_FILE = /^\.github\/workflows\/[^/]+\.ya?ml$/u;
2794
- const READ_CONCURRENCY$5 = 16;
2897
+ const READ_CONCURRENCY$4 = 16;
2795
2898
  const readWorkflows = Effect.fn("readWorkflows")(function* readWorkflows(root) {
2796
2899
  const files = yield* RepositoryFiles;
2797
2900
  const names = yield* files.listedFiles(root);
@@ -2801,7 +2904,7 @@ const readWorkflows = Effect.fn("readWorkflows")(function* readWorkflows(root) {
2801
2904
  file,
2802
2905
  source
2803
2906
  }))));
2804
- }, { concurrency: READ_CONCURRENCY$5 });
2907
+ }, { concurrency: READ_CONCURRENCY$4 });
2805
2908
  return Array.getSomes(found);
2806
2909
  });
2807
2910
  // src/shared/lib/workflow-run.ts
@@ -2921,7 +3024,7 @@ const STEP_FILES = [
2921
3024
  ];
2922
3025
  const HOOK_FILES = [":(glob).vite-hooks/*"];
2923
3026
  const AGENT_FILES = [".claude/settings.json", ".mcp.json"];
2924
- const READ_CONCURRENCY$4 = 16;
3027
+ const READ_CONCURRENCY$3 = 16;
2925
3028
  const START$8 = 0;
2926
3029
  const FIRST$2 = 1;
2927
3030
  const LINE = "\n";
@@ -2992,7 +3095,7 @@ const taskSources = Effect.fn("taskSources")(function* taskSources(root, directo
2992
3095
  return pipe(tasks, Array.flatMap((task) => Option.toArray(taskSource(file, source)(task))));
2993
3096
  });
2994
3097
  const workspaceTasks = Effect.fn("workspaceTasks")(function* workspaceTasks(root, directories) {
2995
- const found = yield* Effect.forEach(directories, (directory) => taskSources(root, directory), { concurrency: READ_CONCURRENCY$4 });
3098
+ const found = yield* Effect.forEach(directories, (directory) => taskSources(root, directory), { concurrency: READ_CONCURRENCY$3 });
2996
3099
  return Array.flatten(found);
2997
3100
  });
2998
3101
  const readSources = Effect.fn("readSources")(function* readSources(root, names, sourcesOf) {
@@ -3004,7 +3107,7 @@ const readSources = Effect.fn("readSources")(function* readSources(root, names,
3004
3107
  onSome: sourcesOf(file, name)
3005
3108
  });
3006
3109
  return files.readFile(file).pipe(Effect.map(sourcesIn));
3007
- }, { concurrency: READ_CONCURRENCY$4 });
3110
+ }, { concurrency: READ_CONCURRENCY$3 });
3008
3111
  return Array.flatten(found);
3009
3112
  });
3010
3113
  /** @internal */
@@ -3120,40 +3223,11 @@ const checkToolUse = Effect.fn("checkToolUse")(function* checkToolUse(root) {
3120
3223
  checkVitePlus(root),
3121
3224
  checkMissingHooks(root),
3122
3225
  checkScripts(root),
3123
- checkWorkflowQueues(root)
3226
+ checkWorkflowQueues(root),
3227
+ checkRestrictedRules(root)
3124
3228
  ], { concurrency: "unbounded" });
3125
3229
  return Array.flatten(found);
3126
3230
  });
3127
- // src/shared/lib/scanned-files.ts
3128
- const SCANNED_FILE = /(?:\.(?:[cm]?[jt]sx?|jsonc?|toml|ya?ml|sh|bash|zsh|fish|rs|cs|go|mk)|(?:^|\/)(?:(?:Dockerfile|Containerfile)[^/]*|Makefile|justfile|\.tool-versions|[^./][^./]*))$/u;
3129
- const LOCKFILE = /(?:^|\/)(?:[^/]*\.lock|[^/]*-lock\.(?:json|ya?ml))$/u;
3130
- const TOOL_VERSIONS = /(?:^|\/)(?:\.?mise(?:\.[^/]+)?\.toml|\.tool-versions)$/u;
3131
- const READ_CONCURRENCY$3 = 64;
3132
- const isScannedText = ({ name }) => SCANNED_FILE.test(name) && !LOCKFILE.test(name);
3133
- const isToolVersions = ({ name }) => TOOL_VERSIONS.test(name);
3134
- /** @internal */
3135
- const listedFiles = Effect.fn("listedFiles")(function* listedFiles(root) {
3136
- const files = yield* RepositoryFiles;
3137
- const names = yield* files.listedFiles(root);
3138
- return pipe(names, Array.map((name) => ({
3139
- name,
3140
- file: files.join(root, name)
3141
- })));
3142
- });
3143
- /** @internal */
3144
- const presentFiles = Effect.fn("presentFiles")(function* presentFiles(listed) {
3145
- const files = yield* RepositoryFiles;
3146
- return yield* pipe(listed, Effect.filter(({ file }) => files.exists(file)));
3147
- });
3148
- /** @internal */
3149
- const scanText = Effect.fn("scanText")(function* scanText(listed, problemsIn) {
3150
- const files = yield* RepositoryFiles;
3151
- const found = yield* Effect.forEach(listed, (entry) => files.readFile(entry.file).pipe(Effect.map(Option.match({
3152
- onNone: () => [],
3153
- onSome: (source) => problemsIn(entry, source)
3154
- }))), { concurrency: READ_CONCURRENCY$3 });
3155
- return Array.flatten(found);
3156
- });
3157
3231
  // src/features/banned-tools/model/banned-tool.ts
3158
3232
  const FIRST_LINE$2 = 1;
3159
3233
  const FIRST_COLUMN$2 = 1;
@@ -3555,7 +3629,7 @@ const checkComments = Effect.fn("checkComments")(function* checkComments(root) {
3555
3629
  return Array.flatten(found);
3556
3630
  });
3557
3631
  // src/features/invisible-characters/model/hidden-unicode.ts
3558
- const HIDDEN = /[\u00AD\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]|[\u{E0000}-\u{E007F}]/gu;
3632
+ const HIDDEN = /[\u00AD\u180E\u200B\u200C\u200E\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]|(?<![\p{Extended_Pictographic}\p{Emoji_Modifier}\uFE0F])\u200D|\u200D(?!\p{Extended_Pictographic})|[\u{E0000}-\u{E007F}]/gu;
3559
3633
  const NUL = "\0";
3560
3634
  const START$5 = 0;
3561
3635
  const HEX = 16;
@@ -4190,7 +4264,8 @@ const checkTrackedText = Effect.fn("checkTrackedText")(function* checkTrackedTex
4190
4264
  checkSkillFiles(root),
4191
4265
  checkSkillEntry(root),
4192
4266
  checkComments(root),
4193
- checkAppliedPackages(root)
4267
+ checkAppliedPackages(root),
4268
+ checkGitSubpath(root)
4194
4269
  ], { concurrency: "unbounded" });
4195
4270
  return Array.flatten(found);
4196
4271
  });