@r_masseater/msch 0.113.0 → 0.114.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,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { i as nodeRepositoryFiles, n as NODE_MODULES, o as TOOL_NAME$1, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-DbZY3I_3.mjs";
3
- import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, D as resolvedSymbol, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, M as IndexKind, N as InternalSymbolName, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, R as getLeadingCommentRanges, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, j as API, k as symbolAtLocation, l as childrenOf$3, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, r as formatProblem, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$5, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-BP2B-3M4.mjs";
4
- import { S as workspaceDependencies$1, _ as shadcnUiOf, a as workspaceConfigs, b as installedManifest, c as publicEntriesOf, d as splitFrontmatter, h as deployEntries, i as publishedWorkspaces, l as isIndexSkill, m as bundledEntries, o as entryNameOf, p as workspaceLinks, r as packedWorkspaces, s as isBinEntry, u as FRONTMATTER, x as readManifest, y as dependencyEntries } from "./published-B0rqrGML.mjs";
5
- import { C as keyName, D as stringsIn, E as propertyValue, S as childrenOf$4, T as nestedValues, a as workspaceManifest, b as workspaceConfigOf, c as TASK_NAMES, d as definesTask, f as hasVerifyTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as literalOf, x as KeySchema } from "./workspace-projects-YdLknbDq.mjs";
2
+ import { i as nodeRepositoryFiles, n as NODE_MODULES, o as TOOL_NAME$1, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-BU_wY36C.mjs";
3
+ import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, D as resolvedSymbol, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, M as IndexKind, N as InternalSymbolName, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, R as getLeadingCommentRanges, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, j as API, k as symbolAtLocation, l as childrenOf$3, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, r as formatProblem, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$5, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-DaWjnZyW.mjs";
4
+ import { S as workspaceDependencies$1, _ as shadcnUiOf, a as workspaceConfigs, b as installedManifest, c as publicEntriesOf, d as splitFrontmatter, h as deployEntries, i as publishedWorkspaces, l as isIndexSkill, m as bundledEntries, o as entryNameOf, p as workspaceLinks, r as packedWorkspaces, s as isBinEntry, u as FRONTMATTER, x as readManifest, y as dependencyEntries } from "./published-J2q6skGp.mjs";
5
+ import { C as keyName, D as stringsIn, E as propertyValue, S as childrenOf$4, T as nestedValues, a as workspaceManifest, b as workspaceConfigOf, c as TASK_NAMES, d as definesTask, f as hasVerifyTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as literalOf, x as KeySchema } from "./workspace-projects-DYfp6Tpn.mjs";
6
6
  import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-DUttmo2s.mjs";
7
7
  import { n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-BBdsNPSO.mjs";
8
- import { a as CI_TASKS, d as isIgnored, l as existsAt, m as patternOf$1, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, p as namedWorkspaces, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES } from "./repository-text-DdeWgRlO.mjs";
8
+ import { a as CI_TASKS, d as isIgnored, l as existsAt, m as patternOf$1, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, p as namedWorkspaces, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES } from "./repository-text-Cu-_rD_Q.mjs";
9
9
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
10
10
  import { g as decisionTestRules, n as MARKDOWN_RULES, p as lint$3, t as MARKDOWN_IGNORES, x as exempt } from "./define-lint-preset-BXnNnSR9.mjs";
11
11
  import { builtinModules, isBuiltin } from "node:module";
@@ -43,7 +43,7 @@ import { Base64 } from "effect/encoding";
43
43
  import { dual } from "effect/Function";
44
44
  // package.json
45
45
  var name = "@r_masseater/msch";
46
- var version = "0.113.0";
46
+ var version = "0.114.0";
47
47
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
48
48
  var repository = {
49
49
  "type": "git",
@@ -1060,7 +1060,7 @@ const checkOverrides = Effect.fn("checkOverrides")(function* checkOverrides(root
1060
1060
  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;
1061
1061
  const LOCKFILE$1 = /(?:^|\/)(?:[^/]*\.lock|[^/]*-lock\.(?:json|ya?ml))$/u;
1062
1062
  const TOOL_VERSIONS = /(?:^|\/)(?:\.?mise(?:\.[^/]+)?\.toml|\.tool-versions)$/u;
1063
- const READ_CONCURRENCY$41 = 64;
1063
+ const READ_CONCURRENCY$42 = 64;
1064
1064
  const isScannedText = ({ name }) => SCANNED_FILE.test(name) && !LOCKFILE$1.test(name);
1065
1065
  const isToolVersions = ({ name }) => TOOL_VERSIONS.test(name);
1066
1066
  /** @internal */
@@ -1083,18 +1083,18 @@ const scanText = Effect.fn("scanText")(function* scanText(listed, foundIn) {
1083
1083
  const found = yield* Effect.forEach(listed, (entry) => files.readFile(entry.file).pipe(Effect.map(Option.match({
1084
1084
  onNone: () => [],
1085
1085
  onSome: (source) => foundIn(entry, source)
1086
- }))), { concurrency: READ_CONCURRENCY$41 });
1086
+ }))), { concurrency: READ_CONCURRENCY$42 });
1087
1087
  return Array$1.flatten(found);
1088
1088
  });
1089
1089
  // src/features/check-overrides/model/git-subpath.ts
1090
1090
  const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
1091
1091
  const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
1092
- const RULE$76 = "git-subpath-dependency";
1092
+ const RULE$77 = "git-subpath-dependency";
1093
1093
  const WHOLE_MATCH$4 = 0;
1094
1094
  const problemAt$5 = ({ file }, source) => (found) => ({
1095
1095
  file,
1096
1096
  ...positionOf(source)(found.index ?? WHOLE_MATCH$4),
1097
- rule: RULE$76,
1097
+ rule: RULE$77,
1098
1098
  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$4])}\`.`
1099
1099
  });
1100
1100
  const problemsIn$24 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$5(entry, source)));
@@ -1105,13 +1105,13 @@ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(r
1105
1105
  return yield* scanText(pipe(listed, Array$1.filter(isDependencyFile)), problemsIn$24);
1106
1106
  });
1107
1107
  // src/features/check-overrides/model/restricted-rules.ts
1108
- const RULE$75 = "unnamed-restriction";
1108
+ const RULE$76 = "unnamed-restriction";
1109
1109
  const WHOLE_MATCH$3 = 0;
1110
1110
  const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-[a-z]+(?:-[a-z]+)*\\b`, "gu");
1111
1111
  const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(UNNAMED)(source)), Array$1.map((found) => ({
1112
1112
  file: entry.file,
1113
1113
  ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
1114
- rule: RULE$75,
1114
+ rule: RULE$76,
1115
1115
  message: `${found[WHOLE_MATCH$3]} 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.`
1116
1116
  })));
1117
1117
  /** @internal */
@@ -1120,13 +1120,13 @@ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRe
1120
1120
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$23);
1121
1121
  });
1122
1122
  // src/features/check-overrides/model/type-exemptions.ts
1123
- const RULE$74 = "named-type-exemption";
1123
+ const RULE$75 = "named-type-exemption";
1124
1124
  const WHOLE_MATCH$2 = 0;
1125
1125
  const SPECIFIER = new RegExp(`["']?\\bfrom["']?\\s*:\\s*["'](?:file|lib|package)["']`, "gu");
1126
1126
  const problemsIn$22 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(SPECIFIER)(source)), Array$1.map((found) => ({
1127
1127
  file: entry.file,
1128
1128
  ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
1129
- rule: RULE$74,
1129
+ rule: RULE$75,
1130
1130
  message: "exempts a type from a lint rule by its name. Such a list is written by hand for every dependency and only grows. msch-lint/readonly-parameters reads where each type is declared and exempts the types of packages and of the language by itself, so remove the entry. For another rule, add a rule to msch-lint that reads the declaration."
1131
1131
  })));
1132
1132
  /** @internal */
@@ -1142,7 +1142,7 @@ const INSTALL_REGISTRY = "https://npm.flatt.tech/";
1142
1142
  const withTrailingSlash = (url) => `${String$1.replace(TRAILING_SLASH$1, "")(url)}/`;
1143
1143
  const scopeOfName = (name) => pipe(Option.liftPredicate(name, String$1.startsWith("@")), Option.flatMap((scoped) => pipe(String$1.indexOf(SCOPE_SEPARATOR)(scoped), Option.map((end) => String$1.takeLeft(scoped, end + 1)))));
1144
1144
  // src/features/check-overrides/model/package-registry.ts
1145
- const RULE$73 = "package-registry";
1145
+ const RULE$74 = "package-registry";
1146
1146
  const WORKSPACE_FILE$6 = "pnpm-workspace.yaml";
1147
1147
  const NPMRC = /(?:^|\/)\.npmrc$/u;
1148
1148
  const WORKSPACE_REGISTRY = /^registry:/mu;
@@ -1156,7 +1156,7 @@ const offsetIn$1 = (found) => pipe(Option.fromNullishOr(found), Option.map(({ in
1156
1156
  const workspaceProblem = ({ file, source }, registry) => ({
1157
1157
  file,
1158
1158
  ...positionOf(source)(offsetIn$1(WORKSPACE_REGISTRY.exec(source))),
1159
- rule: RULE$73,
1159
+ rule: RULE$74,
1160
1160
  message: Option.match(registry, {
1161
1161
  onNone: () => `${REASON$3} Set \`registry: ${INSTALL_REGISTRY}\` in ${WORKSPACE_FILE$6}.`,
1162
1162
  onSome: (value) => `${REASON$3} \`registry\` is ${value}. Set it to ${INSTALL_REGISTRY}.`
@@ -1165,7 +1165,7 @@ const workspaceProblem = ({ file, source }, registry) => ({
1165
1165
  const npmrcProblems = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(NPMRC_REGISTRY)(source)), Array$1.filter((found) => !Option.exists(groupOf("value")(found), isRequired)), Array$1.map((found) => ({
1166
1166
  file: entry.file,
1167
1167
  ...positionOf(source)(found.index ?? START$33),
1168
- rule: RULE$73,
1168
+ rule: RULE$74,
1169
1169
  message: `${REASON$3} This .npmrc overrides it with \`${String$1.trim(found[START$33])}\`. Remove the line.`
1170
1170
  })));
1171
1171
  const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root) {
@@ -3350,7 +3350,7 @@ const SELF_HOMEPAGE = homepage;
3350
3350
  const SELF_DIRECTORY = repository.directory;
3351
3351
  const RENOVATE_PRESET = `github>${pipe(repository.url, String$1.replace(GIT_PREFIX, ""), String$1.replace(GIT_SUFFIX, ""), String$1.replace(GITHUB$6, ""))}//${SELF_DIRECTORY}/renovate`;
3352
3352
  // src/features/check-overrides/model/removed-peers.ts
3353
- const RULE$72 = "removed-peer";
3353
+ const RULE$73 = "removed-peer";
3354
3354
  const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
3355
3355
  const REMOVED = "-";
3356
3356
  const PARENT_SEPARATOR = ">";
@@ -3360,7 +3360,7 @@ const packageNameOf$1 = (selector) => pipe(String$1.indexOf(VERSION_SEPARATOR)(S
3360
3360
  onNone: () => selector,
3361
3361
  onSome: (index) => String$1.takeLeft(selector, index + SCOPED_START)
3362
3362
  }));
3363
- const removalOf = (key) => Array$1.matchRight(String$1.split(key, PARENT_SEPARATOR), {
3363
+ const removalOf$1 = (key) => Array$1.matchRight(String$1.split(key, PARENT_SEPARATOR), {
3364
3364
  onEmpty: () => Option.none(),
3365
3365
  onNonEmpty: (parents, target) => Option.some({
3366
3366
  key,
@@ -3377,12 +3377,12 @@ const problemAt$4 = (file, { key, line, column }) => ({ peer, dependent }) => ({
3377
3377
  file,
3378
3378
  line,
3379
3379
  column,
3380
- rule: RULE$72,
3380
+ rule: RULE$73,
3381
3381
  message: `msch runs ${dependent}, which needs ${peer} as a peer, so removing ${peer} with the override ${key} breaks msch. Remove the override.`
3382
3382
  });
3383
3383
  const removalsIn = (overrides) => pipe(overrides, Record.filter(isRemoval));
3384
3384
  const firstRemovedPeer = (peers) => (removal) => pipe(peers, Array$1.findFirst(removesPeer(removal)));
3385
- const removedPeerProblems = (peers) => ({ file, source, overrides }) => pipe(overrideKeysOf(source)(removalsIn(overrides)), Array$1.flatMap((located) => pipe(removalOf(located.key), Option.flatMap(firstRemovedPeer(peers)), Option.map(problemAt$4(file, located)), Option.toArray)));
3385
+ const removedPeerProblems = (peers) => ({ file, source, overrides }) => pipe(overrideKeysOf(source)(removalsIn(overrides)), Array$1.flatMap((located) => pipe(removalOf$1(located.key), Option.flatMap(firstRemovedPeer(peers)), Option.map(problemAt$4(file, located)), Option.toArray)));
3386
3386
  const requiredPeersOf = (dependent, manifest) => pipe(Record.keys(manifest.peerDependencies ?? {}), Array$1.difference(optionalPeerNames(manifest)), Array$1.map((peer) => ({
3387
3387
  peer,
3388
3388
  dependent
@@ -3411,7 +3411,7 @@ const checkRemovedPeers = Effect.fn("checkRemovedPeers")(function* checkRemovedP
3411
3411
  });
3412
3412
  });
3413
3413
  // src/features/check-placement/model/colocated-git-patterns.ts
3414
- const RULE$71 = "colocated-git-patterns";
3414
+ const RULE$72 = "colocated-git-patterns";
3415
3415
  const PATTERN_FILES = [":(glob)**/.gitignore", ":(glob)**/.gitattributes"];
3416
3416
  const ROOT$3 = ".";
3417
3417
  const NEGATION = "!";
@@ -3422,7 +3422,7 @@ const LEADING_SLASHES = /^\/+/u;
3422
3422
  const TRAILING_SLASHES = /\/+$/u;
3423
3423
  const SPACES = /\s+/u;
3424
3424
  const FIRST$26 = 1;
3425
- const READ_CONCURRENCY$40 = 16;
3425
+ const READ_CONCURRENCY$41 = 16;
3426
3426
  const withoutPrefix = (prefix, text) => {
3427
3427
  if (String$1.startsWith(prefix)(text)) return String$1.slice(prefix.length)(text);
3428
3428
  return text;
@@ -3458,7 +3458,7 @@ const entriesIn$2 = Effect.fn("entriesIn")(function* entriesIn(root, file) {
3458
3458
  const toEntry = entryOf$2(absolute, files.basename(file), files.dirname(file));
3459
3459
  return pipe(Option.getOrElse(text, () => ""), String$1.split("\n"), Array$1.map(toEntry), Array$1.getSomes);
3460
3460
  });
3461
- const patternProblem = (entry, message) => problemAtPosition(RULE$71)(entry.file, {
3461
+ const patternProblem = (entry, message) => problemAtPosition(RULE$72)(entry.file, {
3462
3462
  line: entry.line,
3463
3463
  column: FIRST$26
3464
3464
  }, message);
@@ -3513,17 +3513,17 @@ const repeated = (entries) => (entry) => {
3513
3513
  /** @internal */
3514
3514
  const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(function* checkColocatedGitPatterns(root) {
3515
3515
  const patternFiles = yield* (yield* RepositoryFiles).matchingFiles(root, PATTERN_FILES);
3516
- const read = yield* Effect.forEach(patternFiles, (file) => entriesIn$2(root, file), { concurrency: READ_CONCURRENCY$40 });
3516
+ const read = yield* Effect.forEach(patternFiles, (file) => entriesIn$2(root, file), { concurrency: READ_CONCURRENCY$41 });
3517
3517
  const entries = Array$1.flatten(read);
3518
3518
  const workspaces = yield* workspaceDirectories(root);
3519
- const misplacedFound = yield* Effect.forEach(entries, (entry) => misplaced(root, workspaces, entry), { concurrency: READ_CONCURRENCY$40 });
3519
+ const misplacedFound = yield* Effect.forEach(entries, (entry) => misplaced(root, workspaces, entry), { concurrency: READ_CONCURRENCY$41 });
3520
3520
  const repeatedFound = pipe(entries, Array$1.map(repeated(entries)));
3521
3521
  return Array$1.getSomes([...misplacedFound, ...repeatedFound]);
3522
3522
  });
3523
3523
  // src/features/check-placement/model/colocated-tests.ts
3524
- const RULE$70 = "colocated-test";
3524
+ const RULE$71 = "colocated-test";
3525
3525
  const FIRST$25 = 1;
3526
- const READ_CONCURRENCY$39 = 64;
3526
+ const READ_CONCURRENCY$40 = 64;
3527
3527
  const ROOT_SUBPATH$2 = ".";
3528
3528
  const NAME_GROUP$2 = "name";
3529
3529
  const SPECIFIER_GROUP = "specifier";
@@ -3544,7 +3544,7 @@ const problemFor$10 = (test, message) => ({
3544
3544
  file: test.file,
3545
3545
  line: FIRST$25,
3546
3546
  column: FIRST$25,
3547
- rule: RULE$70,
3547
+ rule: RULE$71,
3548
3548
  message: `${test.base} ${message}`
3549
3549
  });
3550
3550
  const groupsOf$1 = (source, pattern, group) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((match) => pipe(Option.fromUndefinedOr(match.groups), Option.flatMap((groups) => Option.fromUndefinedOr(groups[group])))), Array$1.getSomes);
@@ -3607,12 +3607,12 @@ const checkColocatedTests = Effect.fn("checkColocatedTests")(function* checkColo
3607
3607
  directory: files.dirname(file)
3608
3608
  };
3609
3609
  }));
3610
- const found = yield* Effect.forEach(tests, (test) => problemIn$8(context, test), { concurrency: READ_CONCURRENCY$39 });
3610
+ const found = yield* Effect.forEach(tests, (test) => problemIn$8(context, test), { concurrency: READ_CONCURRENCY$40 });
3611
3611
  return Array$1.getSomes(found);
3612
3612
  });
3613
3613
  // src/shared/lib/agent-docs.ts
3614
3614
  const AGENT_DOC$1 = /(?:^|\/)(?:AGENTS|CLAUDE)\.md$/u;
3615
- const READ_CONCURRENCY$38 = 16;
3615
+ const READ_CONCURRENCY$39 = 16;
3616
3616
  const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblems(root, problemIn) {
3617
3617
  const files = yield* RepositoryFiles;
3618
3618
  const listed = yield* files.listedFiles(root);
@@ -3621,13 +3621,13 @@ const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblem
3621
3621
  const file = files.join(root, name);
3622
3622
  const problemOf = Option.flatMap(problemIn(file));
3623
3623
  return files.readFile(file).pipe(Effect.map(problemOf));
3624
- }, { concurrency: READ_CONCURRENCY$38 });
3624
+ }, { concurrency: READ_CONCURRENCY$39 });
3625
3625
  return Array$1.getSomes(found);
3626
3626
  });
3627
3627
  // src/features/check-placement/model/agent-docs-length.ts
3628
3628
  const RECOMMENDED_LINES = 200;
3629
3629
  const FIRST$24 = 1;
3630
- const RULE$69 = "agent-docs-length";
3630
+ const RULE$70 = "agent-docs-length";
3631
3631
  const lineCount = (source) => pipe(String$1.trimEnd(source), String$1.split("\n")).length;
3632
3632
  const problemFor$9 = (file) => (lines) => {
3633
3633
  if (lines <= RECOMMENDED_LINES) return Option.none();
@@ -3635,18 +3635,18 @@ const problemFor$9 = (file) => (lines) => {
3635
3635
  file,
3636
3636
  line: 201,
3637
3637
  column: FIRST$24,
3638
- rule: RULE$69,
3638
+ rule: RULE$70,
3639
3639
  message: `has ${String(lines)} lines. Claude Code recommends under ${String(RECOMMENDED_LINES)} lines per file: longer files cost context and are followed less reliably. Cut what the code already tells, and move rules shared across repositories into skills.`
3640
3640
  });
3641
3641
  };
3642
3642
  /** @internal */
3643
3643
  const checkAgentDocsLength = (root) => agentDocProblems(root, (file) => (source) => problemFor$9(file)(lineCount(source)));
3644
3644
  // src/features/check-placement/model/claude-link.ts
3645
- const RULE$68 = "claude-md-link";
3645
+ const RULE$69 = "claude-md-link";
3646
3646
  const CLAUDE = "CLAUDE.md";
3647
3647
  const AGENTS = "AGENTS.md";
3648
3648
  const FIRST$23 = 1;
3649
- const READ_CONCURRENCY$37 = 16;
3649
+ const READ_CONCURRENCY$38 = 16;
3650
3650
  const MESSAGE$14 = "CLAUDE.md must be a symbolic link to AGENTS.md";
3651
3651
  /** @internal */
3652
3652
  const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLinks(root) {
@@ -3661,19 +3661,19 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3661
3661
  file: path,
3662
3662
  line: FIRST$23,
3663
3663
  column: FIRST$23,
3664
- rule: RULE$68,
3664
+ rule: RULE$69,
3665
3665
  message: MESSAGE$14
3666
3666
  })));
3667
3667
  });
3668
3668
  const claude = pipe(listed, Array$1.filter((name) => files.basename(name) === CLAUDE));
3669
- const found = yield* Effect.forEach(claude, problemOf, { concurrency: READ_CONCURRENCY$37 });
3669
+ const found = yield* Effect.forEach(claude, problemOf, { concurrency: READ_CONCURRENCY$38 });
3670
3670
  return Array$1.getSomes(found);
3671
3671
  });
3672
3672
  // src/features/check-placement/model/dangling-links.ts
3673
- const RULE$67 = "dangling-link";
3673
+ const RULE$68 = "dangling-link";
3674
3674
  const SEPARATOR$25 = "/";
3675
3675
  const FIRST$22 = 1;
3676
- const READ_CONCURRENCY$36 = 16;
3676
+ const READ_CONCURRENCY$37 = 16;
3677
3677
  const holds = (target) => (name) => name === target || String$1.startsWith(`${target}${SEPARATOR$25}`)(name);
3678
3678
  /** @internal */
3679
3679
  const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDanglingLinks(root) {
@@ -3686,11 +3686,11 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
3686
3686
  file,
3687
3687
  line: FIRST$22,
3688
3688
  column: FIRST$22,
3689
- rule: RULE$67,
3689
+ rule: RULE$68,
3690
3690
  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.`
3691
3691
  })));
3692
3692
  });
3693
- const found = yield* Effect.forEach(links, problemOf, { concurrency: READ_CONCURRENCY$36 });
3693
+ const found = yield* Effect.forEach(links, problemOf, { concurrency: READ_CONCURRENCY$37 });
3694
3694
  return Array$1.getSomes(found);
3695
3695
  });
3696
3696
  // src/features/check-placement/model/member-sources.ts
@@ -3744,9 +3744,9 @@ const readReadme = Effect.fn("readReadme")(function* readReadme({ root, director
3744
3744
  }));
3745
3745
  });
3746
3746
  // src/features/check-placement/model/deployed-readme.ts
3747
- const RULE$66 = "deployed-readme";
3747
+ const RULE$67 = "deployed-readme";
3748
3748
  const ROOT_DIRECTORY$4 = "";
3749
- const READ_CONCURRENCY$35 = 16;
3749
+ const READ_CONCURRENCY$36 = 16;
3750
3750
  const MISSING_MESSAGE$2 = "is missing. This workspace has an Alchemy stack that serves an address, so give it a README.md that says what it is and links its URL.";
3751
3751
  const NO_URL_MESSAGE = "has no https:// URL. This workspace has an Alchemy stack that serves an address, so link the URL it is served at.";
3752
3752
  const ADDRESS_KEYS = [
@@ -3784,14 +3784,14 @@ const problemIn$7 = Effect.fn("problemIn")(function* problemIn(root, directory)
3784
3784
  const readme = yield* readReadme({
3785
3785
  root,
3786
3786
  directory,
3787
- rule: RULE$66,
3787
+ rule: RULE$67,
3788
3788
  missingMessage: MISSING_MESSAGE$2
3789
3789
  });
3790
3790
  return Result.match(readme, {
3791
3791
  onFailure: Option.some,
3792
3792
  onSuccess: ({ file, source }) => pipe(Option.liftPredicate(source, (text) => !URL_PATTERN.test(text)), Option.map(() => fileProblem$1({
3793
3793
  file,
3794
- rule: RULE$66,
3794
+ rule: RULE$67,
3795
3795
  message: NO_URL_MESSAGE
3796
3796
  })))
3797
3797
  });
@@ -3802,16 +3802,16 @@ const checkDeployedReadme = Effect.fn("checkDeployedReadme")(function* checkDepl
3802
3802
  const listed = yield* files.listedFiles(root);
3803
3803
  const directories = yield* workspaceDirectories(root);
3804
3804
  const candidates = pipe(listed, Array$1.filter((file) => STACK_FILE.test(file)));
3805
- const deploying = yield* Effect.filter(candidates, (file) => deploysTo(root, file), { concurrency: READ_CONCURRENCY$35 });
3805
+ const deploying = yield* Effect.filter(candidates, (file) => deploysTo(root, file), { concurrency: READ_CONCURRENCY$36 });
3806
3806
  const owners = pipe(deploying, Array$1.map((file) => pipe(owningWorkspace(directories)(files.dirname(file)), Option.getOrElse(() => ROOT_DIRECTORY$4))), Array$1.dedupe);
3807
- const found = yield* Effect.forEach(owners, (directory) => problemIn$7(root, directory), { concurrency: READ_CONCURRENCY$35 });
3807
+ const found = yield* Effect.forEach(owners, (directory) => problemIn$7(root, directory), { concurrency: READ_CONCURRENCY$36 });
3808
3808
  return Array$1.getSomes(found);
3809
3809
  });
3810
3810
  // src/features/check-placement/model/nested-docs.ts
3811
- const RULE$65 = "nested-docs";
3811
+ const RULE$66 = "nested-docs";
3812
3812
  const CONFIG_FILE$9 = "vite.config.ts";
3813
3813
  const SEPARATOR$23 = "/";
3814
- const READ_CONCURRENCY$34 = 64;
3814
+ const READ_CONCURRENCY$35 = 64;
3815
3815
  const AGENT_DOCS$1 = /^(?:AGENTS|CLAUDE)(?:\.[^/]+)?\.md$/iu;
3816
3816
  const WORKSPACE_AGENT_DOC = "AGENTS.md";
3817
3817
  const README = /^README(?:\.[^/]+)?$/iu;
@@ -3821,7 +3821,7 @@ const RootConfig$1 = Schema.Struct({ msch: Schema.Struct({ workspaceAgentsMd: Sc
3821
3821
  const taggedError$13 = Schema.TaggedError;
3822
3822
  var RootConfigUnreadable = class extends taggedError$13()("RootConfigUnreadable", { file: Schema.String }) {};
3823
3823
  const isNested = (name) => String$1.includes(SEPARATOR$23)(name);
3824
- const problemFor$8 = problemInFile(RULE$65);
3824
+ const problemFor$8 = problemInFile(RULE$66);
3825
3825
  const AGENT_DOCS_MESSAGE = "belongs only at the repository root. Move what agents need into the root AGENTS.md and delete this file.";
3826
3826
  const WORKSPACE_AGENT_DOCS_MESSAGE = "belongs only at the repository root or as AGENTS.md directly in a workspace, the directory that holds its package.json. Move what agents need there and delete this file.";
3827
3827
  const MISSING_MESSAGE$1 = "has no AGENTS.md next to it. This repository sets msch.workspaceAgentsMd, so every workspace describes what it is for and the rules that apply only there in its own AGENTS.md.";
@@ -3868,7 +3868,7 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3868
3868
  workspaces: pipe(directories, Array$1.map((directory) => files.join(root, directory)), HashSet.fromIterable),
3869
3869
  workspaceAgentDocs
3870
3870
  };
3871
- const found = yield* Effect.forEach(nested, (name) => problemIn$6(root, allowed, name), { concurrency: READ_CONCURRENCY$34 });
3871
+ const found = yield* Effect.forEach(nested, (name) => problemIn$6(root, allowed, name), { concurrency: READ_CONCURRENCY$35 });
3872
3872
  const missing = missingProblems({
3873
3873
  required: workspaceAgentDocs,
3874
3874
  directories: pipe(directories, Array$1.map((directory) => files.join(root, directory))),
@@ -3878,15 +3878,15 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3878
3878
  return [...Array$1.getSomes(found), ...missing];
3879
3879
  });
3880
3880
  // src/features/check-placement/model/published-readme.ts
3881
- const RULE$64 = "published-readme";
3882
- const READ_CONCURRENCY$33 = 16;
3881
+ const RULE$65 = "published-readme";
3882
+ const READ_CONCURRENCY$34 = 16;
3883
3883
  const MESSAGE$13 = "contains Japanese. This package is published to npm, so write its README in English.";
3884
3884
  const MISSING_MESSAGE = "is missing. This package is published to npm, so give it an English README.md.";
3885
3885
  const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory }) {
3886
3886
  const readme = yield* readReadme({
3887
3887
  root,
3888
3888
  directory,
3889
- rule: RULE$64,
3889
+ rule: RULE$65,
3890
3890
  missingMessage: MISSING_MESSAGE
3891
3891
  });
3892
3892
  return Result.match(readme, {
@@ -3897,7 +3897,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3897
3897
  file,
3898
3898
  line,
3899
3899
  column,
3900
- rule: RULE$64,
3900
+ rule: RULE$65,
3901
3901
  message: MESSAGE$13
3902
3902
  };
3903
3903
  }))
@@ -3906,11 +3906,11 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3906
3906
  /** @internal */
3907
3907
  const checkPublishedReadme = Effect.fn("checkPublishedReadme")(function* checkPublishedReadme(root) {
3908
3908
  const projects = yield* publishedProjects(root);
3909
- const found = yield* Effect.forEach(projects, (project) => problemIn$5(root, project), { concurrency: READ_CONCURRENCY$33 });
3909
+ const found = yield* Effect.forEach(projects, (project) => problemIn$5(root, project), { concurrency: READ_CONCURRENCY$34 });
3910
3910
  return Array$1.getSomes(found);
3911
3911
  });
3912
3912
  // src/features/check-placement/model/published-tests.ts
3913
- const RULE$63 = "published-tests";
3913
+ const RULE$64 = "published-tests";
3914
3914
  const FILE_START = 1;
3915
3915
  const TEST_FILE$3 = /\.test\.[cm]?[jt]sx?$/u;
3916
3916
  const MESSAGE$12 = "belongs to a package published to npm that has no tests. Write tests for what the package offers before publishing it.";
@@ -3924,7 +3924,7 @@ const problemFor$7 = Effect.fn("problemFor")(function* problemFor(root, listed,
3924
3924
  file: files.join(absolute, PACKAGE_JSON_FILE),
3925
3925
  line: FILE_START,
3926
3926
  column: FILE_START,
3927
- rule: RULE$63,
3927
+ rule: RULE$64,
3928
3928
  message: MESSAGE$12
3929
3929
  });
3930
3930
  });
@@ -3938,7 +3938,7 @@ const checkPublishedTests = Effect.fn("checkPublishedTests")(function* checkPubl
3938
3938
  return Array$1.getSomes(found);
3939
3939
  });
3940
3940
  // src/features/check-placement/model/root-docs.ts
3941
- const RULE$62 = "root-docs";
3941
+ const RULE$63 = "root-docs";
3942
3942
  const SEPARATOR$22 = "/";
3943
3943
  const FIRST$20 = 1;
3944
3944
  const MARKDOWN$6 = /\.(?:md|mdx|markdown)$/iu;
@@ -3953,14 +3953,14 @@ const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
3953
3953
  file: files.join(root, name),
3954
3954
  line: FIRST$20,
3955
3955
  column: FIRST$20,
3956
- rule: RULE$62,
3956
+ rule: RULE$63,
3957
3957
  message: `${name} ${MESSAGE$11}`
3958
3958
  })));
3959
3959
  });
3960
3960
  // src/features/check-placement/model/root-readme.ts
3961
- const RULE$61 = "root-readme";
3961
+ const RULE$62 = "root-readme";
3962
3962
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
3963
- const READ_CONCURRENCY$32 = 16;
3963
+ const READ_CONCURRENCY$33 = 16;
3964
3964
  const START$31 = 0;
3965
3965
  const MARKETPLACE = ".claude-plugin/marketplace.json";
3966
3966
  const RELATIVE$3 = /^\.\//u;
@@ -4001,7 +4001,7 @@ const problemsIn$21 = (file, source, plugins) => (workspace) => {
4001
4001
  const message = messageFor$4(workspace.directory);
4002
4002
  const at = positionOf(source);
4003
4003
  const pattern = patternFor(plugins)(workspace);
4004
- return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$61)(file, at(found.index ?? START$31), message)));
4004
+ return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$62)(file, at(found.index ?? START$31), message)));
4005
4005
  };
4006
4006
  const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces, plugins) {
4007
4007
  const text = yield* (yield* RepositoryFiles).readFile(file);
@@ -4018,7 +4018,7 @@ const checkRootReadme = Effect.fn("checkRootReadme")(function* checkRootReadme(r
4018
4018
  const named = yield* namedWorkspaces(root);
4019
4019
  const workspaces = pipe(named, Array$1.filter((workspace) => !isCheckPolicy(workspace)));
4020
4020
  const plugins = yield* marketplacePlugins(root);
4021
- const found = yield* Effect.forEach(readmes, (name) => problemsInReadme(files.join(root, name), workspaces, plugins), { concurrency: READ_CONCURRENCY$32 });
4021
+ const found = yield* Effect.forEach(readmes, (name) => problemsInReadme(files.join(root, name), workspaces, plugins), { concurrency: READ_CONCURRENCY$33 });
4022
4022
  return Array$1.flatten(found);
4023
4023
  });
4024
4024
  // src/features/check-placement/model/doc-placement.ts
@@ -4038,10 +4038,10 @@ const checkDocPlacement = Effect.fn("checkDocPlacement")(function* checkDocPlace
4038
4038
  return Array$1.flatten(found);
4039
4039
  });
4040
4040
  // src/features/check-placement/model/docs-mirror.ts
4041
- const RULE$60 = "docs-mirror";
4041
+ const RULE$61 = "docs-mirror";
4042
4042
  const DOC = /(?:^|\/)(?:README|AGENTS|ARCHITECTURE|CLAUDE|SKILL)\.md$/u;
4043
4043
  const MIRROR_LIMIT = 3;
4044
- const READ_CONCURRENCY$31 = 16;
4044
+ const READ_CONCURRENCY$32 = 16;
4045
4045
  const SPECIAL = /[$()*+.?[\\\]^{|}]/gu;
4046
4046
  const BEFORE = String.raw`(?<![\w@/.-])`;
4047
4047
  const AFTER = String.raw`(?![\w@.-])`;
@@ -4063,7 +4063,7 @@ const problemFor$6 = (file, source, mentions) => pipe(Array$1.head(mentions), Op
4063
4063
  file,
4064
4064
  line,
4065
4065
  column,
4066
- rule: RULE$60,
4066
+ rule: RULE$61,
4067
4067
  message: `names ${String(mentions.length)} other workspaces (${describe(mentions)}). The workspace list and each package.json already declare them, so this copy goes stale. Point at the declaration instead of listing it.`
4068
4068
  };
4069
4069
  }), Option.toArray);
@@ -4078,7 +4078,7 @@ const workspacesOf$1 = Effect.fn("workspacesOf")(function* workspacesOf(root) {
4078
4078
  return yield* Effect.forEach(directories, (directory) => readManifest(files.join(root, directory)).pipe(Effect.map((manifest) => ({
4079
4079
  directory,
4080
4080
  names: [directory, ...pipe(manifest, Option.flatMap(({ name }) => Option.fromUndefinedOr(name)), Option.toArray)]
4081
- }))), { concurrency: READ_CONCURRENCY$31 });
4081
+ }))), { concurrency: READ_CONCURRENCY$32 });
4082
4082
  });
4083
4083
  /** @internal */
4084
4084
  const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(root) {
@@ -4091,11 +4091,11 @@ const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(r
4091
4091
  onNone: () => [],
4092
4092
  onSome: (text) => problemIn$4(workspaces)(doc, file, text)
4093
4093
  })));
4094
- }, { concurrency: READ_CONCURRENCY$31 });
4094
+ }, { concurrency: READ_CONCURRENCY$32 });
4095
4095
  return Array$1.flatten(found);
4096
4096
  });
4097
4097
  // src/features/check-placement/model/ignored-sources.ts
4098
- const RULE$59 = "ignored-sources";
4098
+ const RULE$60 = "ignored-sources";
4099
4099
  const SOURCES = [":(glob)**/src/**", ":(exclude,glob)**/node_modules/**"];
4100
4100
  const FIRST$19 = 1;
4101
4101
  const MESSAGE$10 = "is under src/ but .gitignore ignores it, so verify passes here while the file never reaches the commit. Narrow the pattern in .gitignore.";
@@ -4107,7 +4107,7 @@ const checkIgnoredSources = Effect.fn("checkIgnoredSources")(function* checkIgno
4107
4107
  file: files.join(root, file),
4108
4108
  line: FIRST$19,
4109
4109
  column: FIRST$19,
4110
- rule: RULE$59,
4110
+ rule: RULE$60,
4111
4111
  message: MESSAGE$10
4112
4112
  })));
4113
4113
  });
@@ -12784,9 +12784,9 @@ const LAYER_ITEMS = [
12784
12784
  "attribute_item",
12785
12785
  "inner_attribute_item"
12786
12786
  ];
12787
- const READ_CONCURRENCY$30 = 64;
12787
+ const READ_CONCURRENCY$31 = 64;
12788
12788
  const EXCLUDED$6 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
12789
- const NONE$4 = [];
12789
+ const NONE$5 = [];
12790
12790
  const ROOT_MESSAGE = "defines code in the crate root. Keep lib.rs and main.rs to mod declarations of layers, use, pub use and fn main, and put the code in a layer.";
12791
12791
  const LAYER_INDEX_MESSAGE = "defines code in a layer module. A layer module holds only mod declarations of its slices and use; put the code in a slice.";
12792
12792
  const ENTRY_MESSAGE = "makes an inner module of a slice public. Declare it with plain mod and re-export what other slices use with pub use from the slice module.";
@@ -12801,12 +12801,12 @@ const isRootItem = (inner) => (item) => {
12801
12801
  };
12802
12802
  const isLayerItem = (item) => Array$1.contains(LAYER_ITEMS, item.kind) || item.kind === "mod_item" && !item.inline;
12803
12803
  const entryProblems$2 = (file, modulePath, parsed) => {
12804
- if (!isSliceIndex(modulePath)) return NONE$4;
12804
+ if (!isSliceIndex(modulePath)) return NONE$5;
12805
12805
  return pipe(parsed.items, Array$1.filter((item) => item.kind === "mod_item" && item.visible), Array$1.map(itemProblem(file, ENTRY_RULE$1, ENTRY_MESSAGE)));
12806
12806
  };
12807
12807
  const moduleProblems = ({ source, parsed }) => entryProblems$2(source.file, modulePathOf(source.inner), parsed);
12808
12808
  const testProblems = ({ source, parsed }) => {
12809
- if (parsed.replacesAllocator) return NONE$4;
12809
+ if (parsed.replacesAllocator) return NONE$5;
12810
12810
  return [fileProblem$1({
12811
12811
  file: source.file,
12812
12812
  rule: TEST_RULE,
@@ -12819,8 +12819,8 @@ const PROBLEMS = {
12819
12819
  layer: (read) => strayItems(read, isLayerItem, LAYER_INDEX_MESSAGE),
12820
12820
  test: testProblems,
12821
12821
  module: moduleProblems,
12822
- skipped: () => NONE$4,
12823
- misplaced: () => NONE$4
12822
+ skipped: () => NONE$5,
12823
+ misplaced: () => NONE$5
12824
12824
  };
12825
12825
  const problemsOf$4 = (read) => PROBLEMS[kindOf$1(read.source.inner)](read);
12826
12826
  const misnamedSlice = ({ crate, inner }, root, join) => {
@@ -12857,20 +12857,20 @@ const rustSources = Effect.fn("rustSources")(function* rustSources(root) {
12857
12857
  const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModules(root) {
12858
12858
  const files = yield* RepositoryFiles;
12859
12859
  const sources = yield* rustSources(root);
12860
- if (!Array$1.isReadonlyArrayNonEmpty(sources)) return NONE$4;
12860
+ if (!Array$1.isReadonlyArrayNonEmpty(sources)) return NONE$5;
12861
12861
  const language = yield* loadLanguage(GRAMMAR$1).pipe(Effect.orDie);
12862
12862
  const parse = parsedWith(language);
12863
- const read = yield* Effect.forEach(pipe(sources, Array$1.filter(isRead)), (source) => files.readFile(source.file).pipe(Effect.map(Option.flatMap((text) => parse(source, text)))), { concurrency: READ_CONCURRENCY$30 });
12863
+ const read = yield* Effect.forEach(pipe(sources, Array$1.filter(isRead)), (source) => files.readFile(source.file).pipe(Effect.map(Option.flatMap((text) => parse(source, text)))), { concurrency: READ_CONCURRENCY$31 });
12864
12864
  return [...sliceNameProblems(root, files.join, sources), ...Array$1.flatMap(Array$1.getSomes(read), problemsOf$4)];
12865
12865
  });
12866
12866
  // src/features/check-placement/model/shadcn-ui-alias.ts
12867
- const RULE$58 = "shadcn-ui-alias";
12867
+ const RULE$59 = "shadcn-ui-alias";
12868
12868
  const FIRST$18 = 1;
12869
12869
  const problemOf$12 = (directory, { file, alias }) => ({
12870
12870
  file,
12871
12871
  line: FIRST$18,
12872
12872
  column: FIRST$18,
12873
- rule: RULE$58,
12873
+ rule: RULE$59,
12874
12874
  message: `aliases.ui "${alias}" in ${directory}/components.json does not resolve to a directory through the imports of ${directory}/package.json. shadcn lint and msch then cannot tell which files are the design-system components. Point the alias at a "#/" import, such as "#/shared/ui", and map "#/*" to "./src/*".`
12875
12875
  });
12876
12876
  /** @internal */
@@ -12934,7 +12934,7 @@ const SCRIPTS_DIRECTORY = "scripts";
12934
12934
  const WORKFLOW_DIRECTORY = ".github/";
12935
12935
  const SEPARATOR$19 = "/";
12936
12936
  const CURRENT = "./";
12937
- const READ_CONCURRENCY$29 = 8;
12937
+ const READ_CONCURRENCY$30 = 8;
12938
12938
  const FIRST$17 = 1;
12939
12939
  const RUN_FILE = /(?:^|[\s;&|(])(?:node|vpx|tsx|bun|deno)\s+(?:-\S+\s+)*(?<file>[^\s;&|)]+\.[cm]?[jt]s)\b/gu;
12940
12940
  const COMMAND$1 = /^bin\/[^/]+\.[cm]?ts$/u;
@@ -12976,7 +12976,7 @@ const workflowText = Effect.fn("workflowText")(function* workflowText(root) {
12976
12976
  const files = yield* RepositoryFiles;
12977
12977
  const listed = yield* files.listedFiles(root);
12978
12978
  const workflows = pipe(listed, Array$1.filter(String$1.startsWith(WORKFLOW_DIRECTORY)));
12979
- const texts = yield* Effect.forEach(workflows, (file) => files.readFile(files.join(root, file)), { concurrency: READ_CONCURRENCY$29 });
12979
+ const texts = yield* Effect.forEach(workflows, (file) => files.readFile(files.join(root, file)), { concurrency: READ_CONCURRENCY$30 });
12980
12980
  return pipe(Array$1.getSomes(texts), Array$1.join("\n"));
12981
12981
  });
12982
12982
  const workspacePath = (directory, path) => pipe([directory, path], Array$1.filter(String$1.isNonEmpty), Array$1.join(SEPARATOR$19));
@@ -13039,9 +13039,9 @@ const codeInBinProblems = Effect.fn("codeInBinProblems")(function* codeInBinProb
13039
13039
  const checkCommandEntries = Effect.fn("checkCommandEntries")(function* checkCommandEntries(root) {
13040
13040
  const all = ["", ...yield* workspaceDirectories(root)];
13041
13041
  const workflows = yield* workflowText(root);
13042
- const found = yield* Effect.forEach(all, (directory) => problemsIn$20(root, directory, workflows), { concurrency: READ_CONCURRENCY$29 });
13043
- const scripts = yield* Effect.forEach(all, (directory) => scriptsProblem(root, directory), { concurrency: READ_CONCURRENCY$29 });
13044
- const code = yield* Effect.forEach(all, (directory) => codeInBinProblems(root, directory), { concurrency: READ_CONCURRENCY$29 });
13042
+ const found = yield* Effect.forEach(all, (directory) => problemsIn$20(root, directory, workflows), { concurrency: READ_CONCURRENCY$30 });
13043
+ const scripts = yield* Effect.forEach(all, (directory) => scriptsProblem(root, directory), { concurrency: READ_CONCURRENCY$30 });
13044
+ const code = yield* Effect.forEach(all, (directory) => codeInBinProblems(root, directory), { concurrency: READ_CONCURRENCY$30 });
13045
13045
  return [
13046
13046
  ...Array$1.flatten(found),
13047
13047
  ...Array$1.getSomes(scripts),
@@ -13138,26 +13138,26 @@ const tsconfigMentions = Effect.fn("tsconfigMentions")(function* tsconfigMention
13138
13138
  ])));
13139
13139
  });
13140
13140
  // src/features/check-repository-layout/model/config-paths.ts
13141
- const RULE$57 = "config-path";
13141
+ const RULE$58 = "config-path";
13142
13142
  const WORKSPACE_FILE$4 = "pnpm-workspace.yaml";
13143
13143
  const CARGO_MANIFEST = /(?:^|\/)Cargo\.toml$/u;
13144
13144
  const TSCONFIG = /(?:^|\/)tsconfig(?:\.[\w-]+)?\.json$/u;
13145
13145
  const OUTSIDE = "..";
13146
- const READ_CONCURRENCY$28 = 8;
13146
+ const READ_CONCURRENCY$29 = 8;
13147
13147
  const isMissing$1 = Effect.fn("isMissing")(function* isMissing(root, file, mention) {
13148
13148
  const files = yield* RepositoryFiles;
13149
13149
  const relatives = pipe(mention.candidates, Array$1.map((candidate) => files.relative(root, files.resolve(files.dirname(file), candidate))), Array$1.filter((relative) => !String$1.startsWith(OUTSIDE)(relative)));
13150
13150
  if (!Array$1.isReadonlyArrayNonEmpty(relatives)) return false;
13151
- const present = yield* Effect.forEach(relatives, (relative) => existsAt(root, relative), { concurrency: READ_CONCURRENCY$28 });
13151
+ const present = yield* Effect.forEach(relatives, (relative) => existsAt(root, relative), { concurrency: READ_CONCURRENCY$29 });
13152
13152
  if (pipe(present, Array$1.some(Boolean))) return false;
13153
- const ignored = yield* Effect.forEach(relatives, (relative) => isIgnored(root, relative), { concurrency: READ_CONCURRENCY$28 });
13153
+ const ignored = yield* Effect.forEach(relatives, (relative) => isIgnored(root, relative), { concurrency: READ_CONCURRENCY$29 });
13154
13154
  return !pipe(ignored, Array$1.some(Boolean));
13155
13155
  });
13156
13156
  const byIndex = Order.mapInput(Order.Number, ({ index }) => index);
13157
13157
  const problemOf$11 = (file, source) => (mention) => ({
13158
13158
  file,
13159
13159
  ...positionOf(source)(mention.index),
13160
- rule: RULE$57,
13160
+ rule: RULE$58,
13161
13161
  message: `${mention.field} names ${mention.text}, which does not exist in this repository. Point it at a path that exists or remove the entry.`
13162
13162
  });
13163
13163
  const mentionsIn = Effect.fn("mentionsIn")(function* mentionsIn(file, source) {
@@ -13170,7 +13170,7 @@ const problemsIn$19 = Effect.fn("problemsIn")(function* problemsIn(root, name) {
13170
13170
  const source = yield* files.readFile(file);
13171
13171
  if (Option.isNone(source)) return [];
13172
13172
  const mentions = yield* mentionsIn(file, source.value);
13173
- const missing = yield* Effect.filter(mentions, (mention) => isMissing$1(root, file, mention), { concurrency: READ_CONCURRENCY$28 });
13173
+ const missing = yield* Effect.filter(mentions, (mention) => isMissing$1(root, file, mention), { concurrency: READ_CONCURRENCY$29 });
13174
13174
  return pipe(Array$1.sort(missing, byIndex), Array$1.map(problemOf$11(file, source.value)));
13175
13175
  });
13176
13176
  const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatterns(root) {
@@ -13182,7 +13182,7 @@ const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatt
13182
13182
  return pipe(patterns, Array$1.map((pattern) => ({
13183
13183
  file,
13184
13184
  ...positionOf(source.value)(indexOfText(source.value)(pattern)),
13185
- rule: RULE$57,
13185
+ rule: RULE$58,
13186
13186
  message: `packages lists ${pattern}, which matches no workspace package. Point it at directories that have a package.json or remove the entry.`
13187
13187
  })));
13188
13188
  });
@@ -13190,23 +13190,23 @@ const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatt
13190
13190
  const checkConfigPaths = Effect.fn("checkConfigPaths")(function* checkConfigPaths(root) {
13191
13191
  const owned = yield* (yield* RepositoryFiles).ownedFiles(root);
13192
13192
  const configs = pipe(owned, Array$1.filter((name) => CARGO_MANIFEST.test(name) || TSCONFIG.test(name)));
13193
- const [found, patterns] = yield* Effect.all([Effect.forEach(configs, (name) => problemsIn$19(root, name), { concurrency: READ_CONCURRENCY$28 }), unmatchedPatterns(root)], { concurrency: "unbounded" });
13193
+ const [found, patterns] = yield* Effect.all([Effect.forEach(configs, (name) => problemsIn$19(root, name), { concurrency: READ_CONCURRENCY$29 }), unmatchedPatterns(root)], { concurrency: "unbounded" });
13194
13194
  return [...Array$1.flatten(found), ...patterns];
13195
13195
  });
13196
13196
  // src/features/check-repository-layout/model/crates.ts
13197
- const RULE$56 = "unverified-crate";
13197
+ const RULE$57 = "unverified-crate";
13198
13198
  const VERSION_RULE = "release-version";
13199
13199
  const APP_DIRECTORIES = ["", "src-tauri"];
13200
13200
  const CARGO_FILE$1 = "Cargo.toml";
13201
13201
  const CONFIG_FILE$8 = "vite.config.ts";
13202
13202
  const SEPARATOR$17 = "/";
13203
13203
  const FIRST$16 = 1;
13204
- const READ_CONCURRENCY$27 = 8;
13204
+ const READ_CONCURRENCY$28 = 8;
13205
13205
  const problemFor$5 = (crate, message) => ({
13206
13206
  file: crate.manifest,
13207
13207
  line: FIRST$16,
13208
13208
  column: FIRST$16,
13209
- rule: RULE$56,
13209
+ rule: RULE$57,
13210
13210
  message: `crate ${crate.name} ${message}, so vp run verify never checks it.`
13211
13211
  });
13212
13212
  const problemIn$3 = Effect.fn("problemIn")(function* problemIn(root, directories, crate) {
@@ -13238,11 +13238,11 @@ const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
13238
13238
  if (!(yield* files.exists(files.join(root, CARGO_FILE$1)))) return [];
13239
13239
  const directories = yield* workspaceDirectories(root);
13240
13240
  const crates = yield* cratesIn(root);
13241
- const found = yield* Effect.forEach(crates, (crate) => Effect.all([problemIn$3(root, directories, crate), versionProblemIn(root, directories, crate)], { concurrency: "unbounded" }), { concurrency: READ_CONCURRENCY$27 });
13241
+ const found = yield* Effect.forEach(crates, (crate) => Effect.all([problemIn$3(root, directories, crate), versionProblemIn(root, directories, crate)], { concurrency: "unbounded" }), { concurrency: READ_CONCURRENCY$28 });
13242
13242
  return Array$1.getSomes(Array$1.flatten(found));
13243
13243
  });
13244
13244
  // src/features/check-repository-layout/model/deploy-entry-patterns.ts
13245
- const RULE$55 = "deploy-entry-pattern";
13245
+ const RULE$56 = "deploy-entry-pattern";
13246
13246
  const FALLOW_KEYS = [
13247
13247
  "entry",
13248
13248
  "entryPoints",
@@ -13260,7 +13260,7 @@ const NEGATED = "!";
13260
13260
  const ROOT_WORKSPACE = ".";
13261
13261
  const WRAP_OFFSET$1 = 1;
13262
13262
  const NO_OFFSET = 0;
13263
- const READ_CONCURRENCY$26 = 8;
13263
+ const READ_CONCURRENCY$27 = 8;
13264
13264
  const MESSAGE$9 = "selects deploy entries by their name or location. A deploy entry is the file that an Alchemy resource names in main, and its name and place change with the code. Use workspaceSettings().lint.deployEntries in lint settings; fallow reads main from the stack by itself.";
13265
13265
  const decodeKey$1 = Schema.decodeUnknownOption(KeySchema);
13266
13266
  const FALLOW = {
@@ -13313,7 +13313,7 @@ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(request) {
13313
13313
  return pipe(Array$1.getSomes(flagged), Array$1.map(({ text: pattern, start }) => ({
13314
13314
  file: path,
13315
13315
  ...positionOf(text.value)(start - kind.offset),
13316
- rule: RULE$55,
13316
+ rule: RULE$56,
13317
13317
  message: `${pattern} ${MESSAGE$9}`
13318
13318
  })));
13319
13319
  });
@@ -13342,11 +13342,11 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
13342
13342
  kind,
13343
13343
  workspaces,
13344
13344
  entries
13345
- }), { concurrency: READ_CONCURRENCY$26 });
13345
+ }), { concurrency: READ_CONCURRENCY$27 });
13346
13346
  return Array$1.flatten(found);
13347
13347
  });
13348
13348
  // src/features/check-repository-layout/model/fallow-entries.ts
13349
- const RULE$54 = "listed-entry";
13349
+ const RULE$55 = "listed-entry";
13350
13350
  const ENTRY_KEYS = [
13351
13351
  "entry",
13352
13352
  "entryPoints",
@@ -13356,7 +13356,7 @@ const FALLOW_CONFIG = /(?:^|\/)(?:\.fallowrc\.jsonc?|fallow-plugin-[^/]+\.jsonc?
13356
13356
  const WILDCARD$2 = /[*?{[]/u;
13357
13357
  const SEPARATOR$16 = "/";
13358
13358
  const WRAP_OFFSET = 1;
13359
- const READ_CONCURRENCY$25 = 8;
13359
+ const READ_CONCURRENCY$26 = 8;
13360
13360
  const decodeKey = Schema.decodeUnknownOption(KeySchema);
13361
13361
  const isEntryProperty = (node) => node["type"] === "Property" && pipe(decodeKey(node["key"]), Option.exists((key) => Array$1.contains(ENTRY_KEYS, keyName(key))));
13362
13362
  const entryPatternsIn = (node) => {
@@ -13376,7 +13376,7 @@ const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
13376
13376
  return pipe(entryPatternsIn(parsed.program), Array$1.filter(namesOneFile(directories)), Array$1.map(({ text: pattern, start }) => ({
13377
13377
  file: path,
13378
13378
  ...positionOf(text.value)(start),
13379
- rule: RULE$54,
13379
+ rule: RULE$55,
13380
13380
  message: `${pattern} names files one by one. Let fallow find the file through what declares it: package.json bin and exports, a tool's config file, or the main of the Alchemy resource that deploys it.`
13381
13381
  })));
13382
13382
  });
@@ -13384,11 +13384,11 @@ const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
13384
13384
  const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallowEntries(root) {
13385
13385
  const listed = yield* (yield* RepositoryFiles).listedFiles(root);
13386
13386
  const directories = yield* workspaceDirectories(root);
13387
- const found = yield* Effect.forEach(pipe(listed, Array$1.filter((file) => FALLOW_CONFIG.test(file))), (file) => problemsIn$17(root, file, directories), { concurrency: READ_CONCURRENCY$25 });
13387
+ const found = yield* Effect.forEach(pipe(listed, Array$1.filter((file) => FALLOW_CONFIG.test(file))), (file) => problemsIn$17(root, file, directories), { concurrency: READ_CONCURRENCY$26 });
13388
13388
  return Array$1.flatten(found);
13389
13389
  });
13390
13390
  // src/features/check-repository-layout/model/root-workspace-paths.ts
13391
- const RULE$53 = "root-workspace-path";
13391
+ const RULE$54 = "root-workspace-path";
13392
13392
  const CONFIG_FILE$7 = "vite.config.ts";
13393
13393
  const PATH_CHARACTER = /[\w.@/-]/u;
13394
13394
  const NAME_CHARACTER = /[\w.@-]/u;
@@ -13407,7 +13407,7 @@ const mentions = (directory) => (text) => {
13407
13407
  const problemsIn$16 = (file, source, directories) => (found) => pipe(directories, Array$1.filter((directory) => mentions(directory)(found.text)), Array$1.map((directory) => ({
13408
13408
  file,
13409
13409
  ...positionOf(source)(found.start),
13410
- rule: RULE$53,
13410
+ rule: RULE$54,
13411
13411
  message: `${directory} is a workspace. The root ${CONFIG_FILE$7} holds what applies to every workspace, so move what only ${directory} needs into ${directory}/${CONFIG_FILE$7}: msch.lint, msch.devDependencies or its verify task.`
13412
13412
  })));
13413
13413
  /** @internal */
@@ -13421,10 +13421,10 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
13421
13421
  return pipe(stringsIn(parsed.program), Array$1.flatMap(problemsIn$16(file, source.value, directories)));
13422
13422
  });
13423
13423
  // src/features/check-repository-layout/model/hidden-verify.ts
13424
- const RULE$52 = "hidden-verify";
13424
+ const RULE$53 = "hidden-verify";
13425
13425
  const CONFIG_FILE$6 = "vite.config.ts";
13426
13426
  const FIRST$14 = 1;
13427
- const READ_CONCURRENCY$24 = 8;
13427
+ const READ_CONCURRENCY$25 = 8;
13428
13428
  const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory) {
13429
13429
  const config = yield* workspaceConfigOf(root, directory);
13430
13430
  if (Option.isNone(config)) return Option.none();
@@ -13435,19 +13435,19 @@ const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory)
13435
13435
  file,
13436
13436
  line: FIRST$14,
13437
13437
  column: FIRST$14,
13438
- rule: RULE$52,
13438
+ rule: RULE$53,
13439
13439
  message: `${directory} gets its verify task from code outside ${CONFIG_FILE$6}. The root verify reads ${CONFIG_FILE$6} without running it, so it never runs this verify. Write run.tasks.verify in ${directory}/${CONFIG_FILE$6}.`
13440
13440
  }).pipe(Option.filter(() => verified));
13441
13441
  });
13442
13442
  /** @internal */
13443
13443
  const checkHiddenVerify = Effect.fn("checkHiddenVerify")(function* checkHiddenVerify(root) {
13444
13444
  const directories = yield* workspaceDirectories(root);
13445
- const found = yield* Effect.forEach(directories, (directory) => problemIn$2(root, directory), { concurrency: READ_CONCURRENCY$24 });
13445
+ const found = yield* Effect.forEach(directories, (directory) => problemIn$2(root, directory), { concurrency: READ_CONCURRENCY$25 });
13446
13446
  return Array$1.getSomes(found);
13447
13447
  });
13448
13448
  // src/features/check-repository-layout/model/shared-uncached-tasks.ts
13449
- const RULE$51 = "shared-uncached-task";
13450
- const READ_CONCURRENCY$23 = 8;
13449
+ const RULE$52 = "shared-uncached-task";
13450
+ const READ_CONCURRENCY$24 = 8;
13451
13451
  const SHARED = 2;
13452
13452
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
13453
13453
  const UncachedTask = Schema.Struct({
@@ -13489,19 +13489,19 @@ const problemsOf$3 = (definitions) => {
13489
13489
  return pipe(definitions, Array$1.map(({ file, position, name, command }) => ({
13490
13490
  file,
13491
13491
  ...position,
13492
- rule: RULE$51,
13492
+ rule: RULE$52,
13493
13493
  message: `The uncached task ${name} (${command}) is written the same way in ${Array$1.join(directories, ", ")}. Write it once in a shared helper and spread it into each run.tasks, so that a change to it reaches every workspace.`
13494
13494
  })));
13495
13495
  };
13496
13496
  /** @internal */
13497
13497
  const checkSharedUncachedTasks = Effect.fn("checkSharedUncachedTasks")(function* checkSharedUncachedTasks(root) {
13498
13498
  const directories = yield* workspaceDirectories(root);
13499
- const found = yield* Effect.forEach(directories, (directory) => definitionsIn(root, directory), { concurrency: READ_CONCURRENCY$23 });
13499
+ const found = yield* Effect.forEach(directories, (directory) => definitionsIn(root, directory), { concurrency: READ_CONCURRENCY$24 });
13500
13500
  return pipe(Array$1.flatten(found), Array$1.groupBy(({ name, definition }) => `${name}\u0000${definition}`), Record.values, Array$1.flatMap(problemsOf$3));
13501
13501
  });
13502
13502
  // src/features/check-repository-layout/model/tested-verify.ts
13503
- const RULE$50 = "tested-verify";
13504
- const READ_CONCURRENCY$22 = 8;
13503
+ const RULE$51 = "tested-verify";
13504
+ const READ_CONCURRENCY$23 = 8;
13505
13505
  const TESTS = new Set(TEST_TASK_NAMES);
13506
13506
  const RUNS_TESTS = /\b(?:vp|cargo) test\b/u;
13507
13507
  const edgesOf = (task) => pipe(Option.toArray(propertyValue("dependsOn")(task.value)), Array$1.flatMap(stringsIn), Array$1.map((at) => ({
@@ -13529,19 +13529,19 @@ const problemsIn$15 = Effect.fn("problemsIn")(function* problemsIn(root, directo
13529
13529
  return pipe(Option.toArray(config), Array$1.flatMap(({ file, source, program }) => pipe(testedEdges(runTasksIn(program)), Array$1.map(({ to, at }) => ({
13530
13530
  file,
13531
13531
  ...positionOf(source)(at.start),
13532
- rule: RULE$50,
13532
+ rule: RULE$51,
13533
13533
  message: `The verify task of ${directory} runs tests through ${to}. verify is what the pre-push hook runs, and tests run in CI through the root ci task, which runs the test and cargo-test tasks of every workspace. Move them into this workspace's test or cargo-test task, and take them out of verify.`
13534
13534
  })))));
13535
13535
  });
13536
13536
  /** @internal */
13537
13537
  const checkTestedVerify = Effect.fn("checkTestedVerify")(function* checkTestedVerify(root) {
13538
13538
  const directories = yield* workspaceDirectories(root);
13539
- const found = yield* Effect.forEach(directories, (directory) => problemsIn$15(root, directory), { concurrency: READ_CONCURRENCY$22 });
13539
+ const found = yield* Effect.forEach(directories, (directory) => problemsIn$15(root, directory), { concurrency: READ_CONCURRENCY$23 });
13540
13540
  return Array$1.flatten(found);
13541
13541
  });
13542
13542
  // src/features/check-repository-layout/model/unlocked-tasks.ts
13543
- const RULE$49 = "unlocked-task";
13544
- const READ_CONCURRENCY$21 = 8;
13543
+ const RULE$50 = "unlocked-task";
13544
+ const READ_CONCURRENCY$22 = 8;
13545
13545
  const READS_DEPENDENCIES = /^vp (?:test|pack|build)\b/u;
13546
13546
  const decodeCommand = Schema.decodeUnknownOption(Schema.Union([Schema.String, Schema.NonEmptyArray(Schema.String)]));
13547
13547
  const commandOf = (task) => pipe(propertyValue("command")(task.value), Option.getOrElse(() => task.value), literalOf, Option.flatMap(decodeCommand), Option.flatMap((command) => Array$1.findFirst(Array$1.ensure(command), (line) => READS_DEPENDENCIES.test(line))));
@@ -13552,13 +13552,13 @@ const tracksLockfiles = (task) => pipe(propertyValue("cache")(task.value), Optio
13552
13552
  const problemsOf$2 = ({ file, source, tasks }) => pipe(tasks, Array$1.filter(tracksLockfiles), Array$1.flatMap((task) => pipe(commandOf(task), Option.map((command) => ({
13553
13553
  file,
13554
13554
  ...positionOf(source)(task.start),
13555
- rule: RULE$49,
13555
+ rule: RULE$50,
13556
13556
  message: `The task ${keyName(task.key)} runs ${command} with inputs written by hand. It then reruns after every lockfile change, and it does not rerun when a dependency of a dependency moves. Set cache to LOCKED from @r_masseater/msch/locked-inputs.`
13557
13557
  })), Option.toArray)));
13558
13558
  /** @internal */
13559
13559
  const checkUnlockedTasks = Effect.fn("checkUnlockedTasks")(function* checkUnlockedTasks(root) {
13560
13560
  const directories = yield* workspaceDirectories(root);
13561
- const found = yield* Effect.forEach(directories, (directory) => runTasksOf(root, directory), { concurrency: READ_CONCURRENCY$21 });
13561
+ const found = yield* Effect.forEach(directories, (directory) => runTasksOf(root, directory), { concurrency: READ_CONCURRENCY$22 });
13562
13562
  return pipe(Array$1.getSomes(found), Array$1.flatMap(problemsOf$2));
13563
13563
  });
13564
13564
  // src/features/check-repository-layout/model/task-checks.ts
@@ -13868,12 +13868,12 @@ const baseRevision = Effect.fn("baseRevision")(function* baseRevision(root) {
13868
13868
  return yield* files.mergeBase(root, base);
13869
13869
  });
13870
13870
  // src/features/check-migration-order/model/migration-order.ts
13871
- const RULE$48 = "migration-order";
13871
+ const RULE$49 = "migration-order";
13872
13872
  const SNAPSHOT = "snapshot.json";
13873
13873
  const MIGRATION = "migration.sql";
13874
13874
  const SNAPSHOTS = [`*/${SNAPSHOT}`];
13875
13875
  const FIRST$13 = 1;
13876
- const READ_CONCURRENCY$20 = 16;
13876
+ const READ_CONCURRENCY$21 = 16;
13877
13877
  const isSnapshot = (basename) => (file) => basename(file) === SNAPSHOT;
13878
13878
  const migrationAt = Effect.fn("migrationAt")(function* migrationAt(root, base, file) {
13879
13879
  const files = yield* RepositoryFiles;
@@ -13902,7 +13902,7 @@ const outOfOrder = (root, base, join) => (migrations) => pipe(latestOf(migration
13902
13902
  file: join(root, file),
13903
13903
  line: FIRST$13,
13904
13904
  column: FIRST$13,
13905
- rule: RULE$48,
13905
+ rule: RULE$49,
13906
13906
  message: `${folder} is new, but it sorts before ${latest.folder}, which ${base} already has. A database that has applied ${latest.folder} rejects an earlier migration, so delete ${folder} and generate it again after ${latest.folder}.`
13907
13907
  })))), Option.getOrElse(() => []));
13908
13908
  /** @internal */
@@ -13913,7 +13913,7 @@ const checkMigrationOrder = Effect.fn("checkMigrationOrder")(function* checkMigr
13913
13913
  if (Option.isNone(found)) return [];
13914
13914
  const [listed, changed] = yield* Effect.all([files.matchingFiles(root, SNAPSHOTS), files.changedFiles(root, base)], { concurrency: "unbounded" });
13915
13915
  const snapshots = pipe([...listed, ...changed], Array$1.filter(isSnapshot(files.basename)), Array$1.dedupe);
13916
- const migrations = yield* Effect.forEach(snapshots, (file) => migrationAt(root, base, file), { concurrency: READ_CONCURRENCY$20 });
13916
+ const migrations = yield* Effect.forEach(snapshots, (file) => migrationAt(root, base, file), { concurrency: READ_CONCURRENCY$21 });
13917
13917
  return pipe(Array$1.getSomes(migrations), Array$1.groupBy(({ directory }) => directory), Record.values, Array$1.flatMap(outOfOrder(root, base, files.join)));
13918
13918
  });
13919
13919
  // src/shared/lib/bundle-error.ts
@@ -13953,7 +13953,7 @@ const unresolvedFrom = (entries) => Effect.acquireUseRelease(Effect.tryPromise({
13953
13953
  catch: bundleErrorDetail
13954
13954
  }), (bundle) => Effect.promise(() => bundle.close())).pipe(Effect.map(({ output }) => unresolvedIn(pipe(output, Array$1.filter(isChunk$1)))));
13955
13955
  // src/features/check-plugin-dependencies/model/plugin-dependencies.ts
13956
- const RULE$47 = "plugin-dependencies";
13956
+ const RULE$48 = "plugin-dependencies";
13957
13957
  const PLUGIN_FILE$3 = ".claude-plugin/plugin.json";
13958
13958
  const LOCK_FILE = "bun.lock";
13959
13959
  const SOURCE_FILE$1 = /\.[cm]?[jt]sx?$/u;
@@ -13962,7 +13962,7 @@ const SUCCESS$6 = 0;
13962
13962
  const NOT_STARTED = -1;
13963
13963
  const DETAIL_LINES = 3;
13964
13964
  const PLUGIN_CONCURRENCY = 2;
13965
- const problemFor$4 = problemInFile(RULE$47);
13965
+ const problemFor$4 = problemInFile(RULE$48);
13966
13966
  const hasDependencies = Effect.fn("hasDependencies")(function* hasDependencies(directory) {
13967
13967
  const files = yield* RepositoryFiles;
13968
13968
  const text = yield* files.readFile(files.join(directory, PACKAGE_JSON_FILE));
@@ -14181,7 +14181,7 @@ const bundleScopeOf = ({ manifest, workspace }) => ({
14181
14181
  });
14182
14182
  const stackPackagesOf = ({ devDependencies }) => pipe(Option.fromUndefinedOr(devDependencies), Option.map(Record.filter((specifier) => specifier === STACK_CATALOG)), Option.map(Record.keys), Option.getOrElse(() => []));
14183
14183
  // src/features/check-tree-shaking/model/optional-peers.ts
14184
- const RULE$46 = "optional-peer";
14184
+ const RULE$47 = "optional-peer";
14185
14185
  const REQUIRED_RULE = "required-peer";
14186
14186
  const START$27 = 0;
14187
14187
  const SINGLE$1 = 1;
@@ -14198,7 +14198,7 @@ const positionIn = (located, key, name) => {
14198
14198
  const problemFor$3 = (located, name, importers) => ({
14199
14199
  file: located.file,
14200
14200
  ...positionIn(located, DEPENDENCIES_KEY, name),
14201
- rule: RULE$46,
14201
+ rule: RULE$47,
14202
14202
  message: `${name} is imported only from ${labelsOf$1(importers)}, so installing the other entries must not require it. Move it to peerDependencies, mark it optional in peerDependenciesMeta and keep it in devDependencies.`
14203
14203
  });
14204
14204
  const requiredPeerAdvice = (fromStack) => {
@@ -14234,7 +14234,7 @@ const requiredPeerProblems = ({ located, manifest, used }) => {
14234
14234
  }));
14235
14235
  };
14236
14236
  // src/features/check-tree-shaking/model/side-effects.ts
14237
- const RULE$45 = "side-effects";
14237
+ const RULE$46 = "side-effects";
14238
14238
  const BUNDLE_CONCURRENCY$2 = 4;
14239
14239
  const START$26 = 0;
14240
14240
  const FIRST$12 = 1;
@@ -14280,34 +14280,34 @@ const othersOf = (total) => {
14280
14280
  if (total <= FIRST$12) return "";
14281
14281
  return ` The same happens for ${String(total - FIRST$12)} other exports.`;
14282
14282
  };
14283
- const messageOf$5 = (worst, total) => `importing \`${worst.member}\` from \`${worst.label}\` also bundles ${String(worst.modules)} modules${importsOf$1(worst.packages)}, which it does not use.${othersOf(total)} Declare "sideEffects": false in package.json so that a bundler drops what nothing imports, and keep a module that must run for its effect out of the package.`;
14283
+ const messageOf$6 = (worst, total) => `importing \`${worst.member}\` from \`${worst.label}\` also bundles ${String(worst.modules)} modules${importsOf$1(worst.packages)}, which it does not use.${othersOf(total)} Declare "sideEffects": false in package.json so that a bundler drops what nothing imports, and keep a module that must run for its effect out of the package.`;
14284
14284
  const largest = Order.mapInput(Order.flip(Order.Number), (excess) => excess.modules);
14285
14285
  const keyIndex$1 = (source) => pipe(String$1.indexOf(SIDE_EFFECTS_KEY)(source), Option.orElse(() => String$1.indexOf(EXPORTS_KEY)(source)), Option.getOrElse(() => START$26));
14286
14286
  const sideEffectProblems = ({ file, source, excesses }) => pipe(excesses, Array$1.sortBy(largest), Array$1.head, Option.map((worst) => ({
14287
14287
  file,
14288
14288
  ...positionOf(source)(keyIndex$1(source)),
14289
- rule: RULE$45,
14290
- message: messageOf$5(worst, excesses.length)
14289
+ rule: RULE$46,
14290
+ message: messageOf$6(worst, excesses.length)
14291
14291
  })), Option.toArray);
14292
14292
  // src/features/check-tree-shaking/model/top-level-effects.ts
14293
- const RULE$44 = "top-level-effect";
14293
+ const RULE$45 = "top-level-effect";
14294
14294
  const CODE$1 = /\.[cm]?[jt]sx?$/u;
14295
- const READ_CONCURRENCY$19 = 16;
14295
+ const READ_CONCURRENCY$20 = 16;
14296
14296
  const IMPORT_MESSAGE = "imports a module only for its effect, but sideEffects in package.json does not list this file, so a bundler drops the import. Import what the module exports, or list the entry that exists for its effect in sideEffects.";
14297
14297
  const STATEMENT_MESSAGE = "runs a statement at the top level for its effect, but sideEffects in package.json does not list this file, so a bundler drops the module when nothing it exports is used. Move the statement into a function that the caller runs, or list the entry that exists for its effect in sideEffects.";
14298
14298
  const isEffect = (statement) => {
14299
14299
  if (isExpressionStatement(statement)) return !isStringLiteral(statement.expression);
14300
14300
  return isImportDeclaration(statement) && Predicate.isUndefined(statement.importClause);
14301
14301
  };
14302
- const messageOf$4 = (statement) => {
14302
+ const messageOf$5 = (statement) => {
14303
14303
  if (isImportDeclaration(statement)) return IMPORT_MESSAGE;
14304
14304
  return STATEMENT_MESSAGE;
14305
14305
  };
14306
14306
  const problemsIn$14 = (api) => (file) => (source) => {
14307
14307
  const retained = api.createSourceFile(file, source);
14308
14308
  const problems = pipe(retained.sourceFile.statements, Array$1.fromIterable, Array$1.filter(isEffect), Array$1.map((statement) => problemAt$6({
14309
- rule: RULE$44,
14310
- message: messageOf$4(statement)
14309
+ rule: RULE$45,
14310
+ message: messageOf$5(statement)
14311
14311
  })(statement)));
14312
14312
  retained.dispose();
14313
14313
  return problems;
@@ -14319,7 +14319,7 @@ const topLevelEffects = Effect.fn("topLevelEffects")(function* topLevelEffects(r
14319
14319
  const names = yield* files.ownedFiles(root);
14320
14320
  const owned = new Set(pipe(names, Array$1.map((name) => files.join(root, name))));
14321
14321
  const sources = pipe(modules, Array$1.filter((file) => owned.has(file) && CODE$1.test(file)));
14322
- const found = yield* Effect.forEach(sources, (file) => files.readFile(file).pipe(Effect.map((text) => pipe(text, Option.map(problemsIn$14(compiler.api)(file)), Option.getOrElse(() => [])))), { concurrency: READ_CONCURRENCY$19 });
14322
+ const found = yield* Effect.forEach(sources, (file) => files.readFile(file).pipe(Effect.map((text) => pipe(text, Option.map(problemsIn$14(compiler.api)(file)), Option.getOrElse(() => [])))), { concurrency: READ_CONCURRENCY$20 });
14323
14323
  return Array$1.flatten(found);
14324
14324
  }, Effect.scoped);
14325
14325
  const BUNDLED_RULE = "bundled-side-effects";
@@ -14349,7 +14349,7 @@ const bundledSideEffectProblems = Effect.fn("bundledSideEffectProblems")(functio
14349
14349
  const manifests = new Set(pipe(owned, Array$1.filter((file) => files.basename(file) === PACKAGE_JSON_FILE)));
14350
14350
  const ownedSet = new Set(owned);
14351
14351
  const directories = pipe(used, Array$1.flatMap(({ modules }) => modules), Array$1.filter((module) => ownedSet.has(module)), Array$1.flatMap((module) => Option.toArray(packageDirectoryOf(manifests, files)(module))), Array$1.dedupe, Array$1.filter((found) => found !== directory), Array$1.sortBy(Order.String));
14352
- const undeclared = yield* Effect.forEach(directories, undeclaredAt, { concurrency: READ_CONCURRENCY$19 });
14352
+ const undeclared = yield* Effect.forEach(directories, undeclaredAt, { concurrency: READ_CONCURRENCY$20 });
14353
14353
  const at = problemAtIndex(BUNDLED_RULE)(located.file, located.source);
14354
14354
  const index = nameIndex$1(located.source);
14355
14355
  return pipe(Array$1.getSomes(undeclared), Array$1.map((found) => at(index, undeclaredMessage(files, root)(found))));
@@ -14475,7 +14475,7 @@ const checkTreeShaking = Effect.fn("checkTreeShaking")(function* checkTreeShakin
14475
14475
  return Array$1.flatten(found);
14476
14476
  });
14477
14477
  // src/features/check-typescript-generation/model/typescript-generation.ts
14478
- const RULE$43 = "legacy-typescript";
14478
+ const RULE$44 = "legacy-typescript";
14479
14479
  const LOCKFILE = "pnpm-lock.yaml";
14480
14480
  const COMPILER = "typescript";
14481
14481
  const CURRENT_MAJOR = 7;
@@ -14494,7 +14494,7 @@ const lineOf$4 = (source) => (id) => pipe(String$1.split(source, "\n"), Array$1.
14494
14494
  onNone: () => FIRST$11,
14495
14495
  onSome: (index) => index + FIRST$11
14496
14496
  }));
14497
- const messageOf$3 = (legacy, dependents) => `\`${legacy.id}\` is installed, pulled in by ${Array$1.join(dependents, ", ")}. Only TypeScript ${String(CURRENT_MAJOR)} or newer is used: remove the dependency that needs the old compiler, move it to the TypeScript ${String(CURRENT_MAJOR)} API, or bundle or port it. Do not install an old compiler beside TypeScript ${String(CURRENT_MAJOR)}.`;
14497
+ const messageOf$4 = (legacy, dependents) => `\`${legacy.id}\` is installed, pulled in by ${Array$1.join(dependents, ", ")}. Only TypeScript ${String(CURRENT_MAJOR)} or newer is used: remove the dependency that needs the old compiler, move it to the TypeScript ${String(CURRENT_MAJOR)} API, or bundle or port it. Do not install an old compiler beside TypeScript ${String(CURRENT_MAJOR)}.`;
14498
14498
  /** @internal */
14499
14499
  const checkTypescriptGeneration = Effect.fn("checkTypescriptGeneration")(function* checkTypescriptGeneration(root) {
14500
14500
  const files = yield* RepositoryFiles;
@@ -14506,12 +14506,12 @@ const checkTypescriptGeneration = Effect.fn("checkTypescriptGeneration")(functio
14506
14506
  file,
14507
14507
  line: lineOf$4(source)(legacy.id),
14508
14508
  column: FIRST$11,
14509
- rule: RULE$43,
14510
- message: messageOf$3(legacy, dependentsOf$1(Option.getOrElse(nodes, () => []))(legacy.id))
14509
+ rule: RULE$44,
14510
+ message: messageOf$4(legacy, dependentsOf$1(Option.getOrElse(nodes, () => []))(legacy.id))
14511
14511
  })));
14512
14512
  });
14513
14513
  // src/features/check-worker-bundles/model/worker-bundles.ts
14514
- const RULE$42 = "worker-bundle";
14514
+ const RULE$43 = "worker-bundle";
14515
14515
  const BUNDLE_CONCURRENCY = 4;
14516
14516
  const PLATFORM_MODULES = [/^cloudflare:/u, /^node:/u];
14517
14517
  const CONDITIONS = [
@@ -14522,7 +14522,7 @@ const CONDITIONS = [
14522
14522
  "module",
14523
14523
  "default"
14524
14524
  ];
14525
- const problemFor$2 = problemInFile(RULE$42);
14525
+ const problemFor$2 = problemInFile(RULE$43);
14526
14526
  const problemOf$10 = (file, detail) => problemFor$2(file, `does not bundle as a Worker, so the deploy would fail. ${detail}`);
14527
14527
  const bundleProblem = (file) => Effect.gen(function* bundle() {
14528
14528
  const built = yield* Effect.tryPromise({
@@ -14712,7 +14712,7 @@ const weakeningsOf = (expected) => (config) => [
14712
14712
  ...secretWeakenings(config.h56m, expected.secrets)
14713
14713
  ];
14714
14714
  // src/app/disabled-rules.ts
14715
- const RULE$41 = "disabled-rule";
14715
+ const RULE$42 = "disabled-rule";
14716
14716
  const CONFIG_FILE$5 = "vite.config.ts";
14717
14717
  const START$24 = 0;
14718
14718
  const SIDE_CONFIG = /(?:^|\/)(?:\.oxlintrc(?:\.jsonc?)?|oxlint\.config\.[cm]?[jt]s|\.oxlintignore|\.eslintrc(?:\.\w+)?|eslint\.config\.[cm]?[jt]s|\.eslintignore|\.textlintrc(?:\.\w+)?|\.textlintignore|\.markdownlint(?:-cli2)?(?:\.\w+)?|\.markdownlintignore|\.prettierignore|\.oxfmtrc(?:\.jsonc?)?|knip\.jsonc?)$/u;
@@ -14726,7 +14726,7 @@ const sideConfigs = Effect.fn("sideConfigs")(function* sideConfigs(root) {
14726
14726
  const files = yield* RepositoryFiles;
14727
14727
  const listed = yield* files.listedFiles(root);
14728
14728
  const isExempt = matcher(exempt);
14729
- return pipe(listed, Array$1.filter((name) => SIDE_CONFIG.test(name) && !isExempt(name)), Array$1.map((name) => problemAtIndex(RULE$41)(files.join(root, name), "")(START$24, SIDE_CONFIG_MESSAGE)));
14729
+ return pipe(listed, Array$1.filter((name) => SIDE_CONFIG.test(name) && !isExempt(name)), Array$1.map((name) => problemAtIndex(RULE$42)(files.join(root, name), "")(START$24, SIDE_CONFIG_MESSAGE)));
14730
14730
  });
14731
14731
  const configWeakenings = Effect.fn("configWeakenings")(function* configWeakenings(root, source) {
14732
14732
  const file = (yield* RepositoryFiles).join(root, CONFIG_FILE$5);
@@ -14738,7 +14738,7 @@ const configWeakenings = Effect.fn("configWeakenings")(function* configWeakening
14738
14738
  })
14739
14739
  });
14740
14740
  const expected = yield* expectationsIn(root);
14741
- const at = problemAtIndex(RULE$41)(file, source);
14741
+ const at = problemAtIndex(RULE$42)(file, source);
14742
14742
  return pipe(weakeningsOf(expected)(config), Array$1.map(({ anchor, message }) => at(Option.getOrElse(String$1.indexOf(anchor)(source), () => START$24), message)));
14743
14743
  });
14744
14744
  /** @internal */
@@ -14746,7 +14746,7 @@ const checkDisabledRules = Effect.fn("checkDisabledRules")(function* checkDisabl
14746
14746
  const files = yield* RepositoryFiles;
14747
14747
  const text = yield* files.readFile(files.join(root, CONFIG_FILE$5));
14748
14748
  if (Option.isNone(text)) return [];
14749
- return [...yield* configWeakenings(root, text.value).pipe(Effect.catchTag("DisabledRulesConfigUnreadable", ({ file, reason }) => Effect.succeed([problemAtIndex(RULE$41)(file, "")(START$24, `msch could not load this file: ${reason}`)]))), ...yield* sideConfigs(root)];
14749
+ return [...yield* configWeakenings(root, text.value).pipe(Effect.catchTag("DisabledRulesConfigUnreadable", ({ file, reason }) => Effect.succeed([problemAtIndex(RULE$42)(file, "")(START$24, `msch could not load this file: ${reason}`)]))), ...yield* sideConfigs(root)];
14750
14750
  });
14751
14751
  // src/app/build-checks.ts
14752
14752
  /** @internal */
@@ -14842,7 +14842,7 @@ const fileFactsIn = (checker) => (sourceFiles, excluded) => pipe(sourceFiles, Ar
14842
14842
  imports: importedFilesOf(checker)(sourceFile)
14843
14843
  })), Array$1.filter((facts) => Array$1.isReadonlyArrayNonEmpty(facts.values) || Array$1.isReadonlyArrayNonEmpty(facts.imports)));
14844
14844
  // src/features/check-value-owners/model/name-lists.ts
14845
- const RULE$40 = "hand-written-names";
14845
+ const RULE$41 = "hand-written-names";
14846
14846
  const TEST_FILE$1 = /\.test(?:\.[\w-]+)?\.[cm]?tsx?$/u;
14847
14847
  const nameListOf = (site) => {
14848
14848
  if (TEST_FILE$1.test(site.file) || site.values.length < 2) return Option.none();
@@ -14857,7 +14857,7 @@ const listedProblem = ({ file, line, column, names, reason }) => ({
14857
14857
  file,
14858
14858
  line,
14859
14859
  column,
14860
- rule: RULE$40,
14860
+ rule: RULE$41,
14861
14861
  message: `The names ${formatValues(names)} are listed by hand, but ${reason}`
14862
14862
  });
14863
14863
  const problemOf$9 = ({ list, reason }) => listedProblem({
@@ -15648,9 +15648,9 @@ const checkRepository = Effect.fn("checkRepository")(function* checkRepository(r
15648
15648
  return sortProblems([...ownerScan.problems, ...repositoryProblems(repository)(analyses)]);
15649
15649
  }, Effect.scoped);
15650
15650
  // src/features/source-code/find-namespace-destructuring/model/namespace-destructuring.ts
15651
- const RULE$39 = "namespace-destructuring";
15651
+ const RULE$40 = "namespace-destructuring";
15652
15652
  const LOCAL = /^[.#/]/u;
15653
- const messageOf$2 = (name) => `Destructuring ${name}, which comes from a package, makes the bundler keep everything ${name} exports. Write ${name}.<member> where it is used.`;
15653
+ const messageOf$3 = (name) => `Destructuring ${name}, which comes from a package, makes the bundler keep everything ${name} exports. Write ${name}.<member> where it is used.`;
15654
15654
  const isPackage = (specifier) => isStringLiteral(specifier) && !LOCAL.test(specifier.text);
15655
15655
  const importedNames = (sourceFile) => {
15656
15656
  const bindings = pipe(sourceFile.statements, Array$1.filter(isImportDeclaration), Array$1.filter((declaration) => isPackage(declaration.moduleSpecifier)), Array$1.map((declaration) => Option.fromUndefinedOr(declaration.importClause)), Array$1.getSomes, Array$1.filter((clause) => clause.phaseModifier !== SyntaxKind.TypeKeyword), Array$1.map((clause) => Option.fromUndefinedOr(clause.namedBindings)), Array$1.getSomes);
@@ -15664,20 +15664,20 @@ const destructuredName = (declaration) => {
15664
15664
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
15665
15665
  };
15666
15666
  const problemOf$8 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$6({
15667
- rule: RULE$39,
15668
- message: messageOf$2(name)
15667
+ rule: RULE$40,
15668
+ message: messageOf$3(name)
15669
15669
  })), Option.map((report) => report(declaration)));
15670
15670
  const namespaceDestructuringIn = () => (sourceFile) => {
15671
15671
  const names = importedNames(sourceFile);
15672
15672
  return pipe(descendantsOf(sourceFile), Array$1.filter(isVariableDeclaration), Array$1.map(problemOf$8(names)), Array$1.getSomes);
15673
15673
  };
15674
15674
  // src/features/source-code/find-pass-through-wrappers/model/pass-through-wrappers.ts
15675
- const RULE$38 = "pass-through-wrapper";
15675
+ const RULE$39 = "pass-through-wrapper";
15676
15676
  const SINGLE_STATEMENT = 1;
15677
15677
  const SINGLE_DECLARATION = 1;
15678
15678
  const THIS_PARAMETER = "this";
15679
15679
  const NO_ARGUMENTS = [];
15680
- const messageOf$1 = (callee) => `This function only passes its parameters to ${callee} unchanged. Call ${callee} directly and delete this function.`;
15680
+ const messageOf$2 = (callee) => `This function only passes its parameters to ${callee} unchanged. Call ${callee} directly and delete this function.`;
15681
15681
  const unwrapped = (expression) => {
15682
15682
  if (isParenthesizedExpression(expression)) return unwrapped(expression.expression);
15683
15683
  return expression;
@@ -15769,8 +15769,8 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
15769
15769
  const problemOf$7 = (checker) => (candidate) => {
15770
15770
  if (changesTheCall(candidate.wrapper)) return Option.none();
15771
15771
  return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$6({
15772
- rule: RULE$38,
15773
- message: messageOf$1(forward.callee.getText())
15772
+ rule: RULE$39,
15773
+ message: messageOf$2(forward.callee.getText())
15774
15774
  })(candidate.name)));
15775
15775
  };
15776
15776
  const passThroughWrappersIn = (checker) => (sourceFile) => pipe(descendantsOf(sourceFile), Array$1.map(candidateOf), Array$1.getSomes, Array$1.map(problemOf$7(checker)), Array$1.getSomes);
@@ -15792,7 +15792,7 @@ const repositoryOrigin = Effect.fn("repositoryOrigin")(function* repositoryOrigi
15792
15792
  /** @internal */
15793
15793
  const slugOf = ({ owner, name }) => `${owner}/${name}`;
15794
15794
  // src/features/check-agent-settings/model/known-plugins.ts
15795
- const RULE$37 = "known-plugins";
15795
+ const RULE$38 = "known-plugins";
15796
15796
  const SETTINGS_FILE$2 = ".claude/settings.json";
15797
15797
  const MARKETPLACE_FILE$2 = ".claude-plugin/marketplace.json";
15798
15798
  const GITHUB$5 = "github";
@@ -15813,7 +15813,7 @@ const MarketplaceSchema = Schema.Struct({
15813
15813
  plugins: Schema.Array(Schema.Struct({ name: Schema.String }))
15814
15814
  });
15815
15815
  const decodeMarketplace = Schema.decodeUnknownOption(Schema.fromJsonString(MarketplaceSchema));
15816
- const problem$5 = problemInFile(RULE$37);
15816
+ const problem$5 = problemInFile(RULE$38);
15817
15817
  const knownFrom = (repository, marketplace, settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(marketplace.name)), Option.exists(({ source }) => source.source === GITHUB$5 && source.repo === repository));
15818
15818
  const pluginEnabled = (settings) => (plugin) => pipe(Option.fromUndefinedOr(settings.enabledPlugins), Option.flatMap(Record.get(plugin)), Option.getOrElse(() => false));
15819
15819
  const pluginProblems = (marketplace, file, settings) => {
@@ -15838,13 +15838,13 @@ const checkKnownPlugins = Effect.fn("checkKnownPlugins")(function* checkKnownPlu
15838
15838
  }));
15839
15839
  });
15840
15840
  // src/features/check-agent-settings/model/missing-hooks.ts
15841
- const RULE$36 = "missing-hook";
15841
+ const RULE$37 = "missing-hook";
15842
15842
  const SETTINGS_FILE$1 = /^\.claude\/settings\.json$/u;
15843
15843
  const PLUGIN_HOOKS_FILE = /(?:^|\/)hooks\/hooks\.json$/u;
15844
15844
  const PROJECT_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PROJECT_DIR\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
15845
15845
  const PLUGIN_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PLUGIN_ROOT\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
15846
15846
  const PLUGIN_ROOT = "..";
15847
- const READ_CONCURRENCY$18 = 16;
15847
+ const READ_CONCURRENCY$19 = 16;
15848
15848
  const START$23 = 0;
15849
15849
  const referenceOf$1 = (found) => pipe(groupOf("path")(found), Option.filter(() => Option.isNone(groupOf("optional")(found))), Option.map((path) => ({
15850
15850
  path,
@@ -15863,7 +15863,7 @@ const problemsIn$13 = Effect.fn("problemsIn")(function* problemsIn({ root, file,
15863
15863
  return pipe(missing, Array$1.map(({ path, index }) => ({
15864
15864
  file,
15865
15865
  ...positionOf(source)(index),
15866
- rule: RULE$36,
15866
+ rule: RULE$37,
15867
15867
  message: `runs ${path}, which does not exist. The hook fails every time it fires. Point it at a file that exists or remove the hook.`
15868
15868
  })));
15869
15869
  });
@@ -15887,7 +15887,7 @@ const checkMissingHooks = Effect.fn("checkMissingHooks")(function* checkMissingH
15887
15887
  }];
15888
15888
  return [];
15889
15889
  }));
15890
- const found = yield* Effect.forEach(hookFiles, problemsIn$13, { concurrency: READ_CONCURRENCY$18 });
15890
+ const found = yield* Effect.forEach(hookFiles, problemsIn$13, { concurrency: READ_CONCURRENCY$19 });
15891
15891
  return Array$1.flatten(found);
15892
15892
  });
15893
15893
  // src/features/check-documented-commands/model/task-graph.ts
@@ -15916,7 +15916,7 @@ const listedTasks = Effect.fn("listedTasks")(function* listedTasks(root) {
15916
15916
  }, Effect.scoped, Effect.orElseSucceed(() => Option.none()));
15917
15917
  const GivenTaskGraph = Context.Reference("msch/GivenTaskGraph", { defaultValue: () => Option.none() });
15918
15918
  // src/features/check-documented-commands/model/commands.ts
15919
- const RULE$35 = "documented-commands";
15919
+ const RULE$36 = "documented-commands";
15920
15920
  const DOCUMENTS = ["*AGENTS.md", "*CLAUDE.md"];
15921
15921
  const DOCUMENT_NAMES = /* @__PURE__ */ new Set(["AGENTS.md", "CLAUDE.md"]);
15922
15922
  const COMMAND = /`vp run (?<args>[^`]+)`/gu;
@@ -15994,7 +15994,7 @@ const isMissing = (graph, file) => ({ task, scope }) => !pipe(packagesOf(graph,
15994
15994
  const problemsIn$12 = (graph, absolute, { file, text }) => pipe(Array$1.fromIterable(String$1.matchAll(COMMAND)(text)), Array$1.flatMap((match) => pipe(Option.fromNullishOr(match.groups), Option.flatMap(Record.get(ARGS)), Option.flatMap(parsed), Option.filter(isMissing(graph, file)), Option.map(({ task, scope }) => ({
15995
15995
  file: absolute(file),
15996
15996
  ...positionOf(text)(match.index ?? START$22),
15997
- rule: RULE$35,
15997
+ rule: RULE$36,
15998
15998
  message: `${match[START$22]} runs task ${task}, but ${whereOf(scope, file)} has no such task. Fix the command or the task`
15999
15999
  })), Option.toArray)));
16000
16000
  const isDocument = (file) => pipe(String$1.split(file, SEPARATOR$12), Array$1.last, Option.exists((name) => DOCUMENT_NAMES.has(name)));
@@ -16019,14 +16019,14 @@ const checkDocumentedCommands = Effect.fn("checkDocumentedCommands")(function* c
16019
16019
  file: absolute(Array$1.headNonEmpty(commanded).file),
16020
16020
  line: ONE$2,
16021
16021
  column: ONE$2,
16022
- rule: RULE$35,
16022
+ rule: RULE$36,
16023
16023
  message: "msch could not list the tasks with `vp run --json`"
16024
16024
  }],
16025
16025
  onSome: (found) => pipe(commanded, Array$1.flatMap((document) => problemsIn$12(found, absolute, document)))
16026
16026
  });
16027
16027
  });
16028
16028
  // src/features/check-legacy-web/model/legacy-web.ts
16029
- const RULE$34 = "legacy-web";
16029
+ const RULE$35 = "legacy-web";
16030
16030
  const FIRST_COLUMN$7 = 1;
16031
16031
  const SCANNER = fileURLToPath(new URL("./skills/modern-web-guidance/modern-web.mjs", import.meta.resolve("modern-web-guidance/package.json")));
16032
16032
  const Finding = Schema.Struct({
@@ -16065,7 +16065,7 @@ const checkLegacyWeb = Effect.fn("checkLegacyWeb")(function* checkLegacyWeb(root
16065
16065
  file: files.join(root, file),
16066
16066
  line,
16067
16067
  column: FIRST_COLUMN$7,
16068
- rule: RULE$34,
16068
+ rule: RULE$35,
16069
16069
  message: `${ruleId}: ${message} Read the guide with \`modern-web-guidance retrieve ${guideId}\` and apply it.`
16070
16070
  });
16071
16071
  return pipe(scan.guides, Array$1.flatMap(({ guideId, rules }) => pipe(rules, Array$1.flatMap(({ ruleId, findings }) => pipe(findings, Array$1.map(problemOf(guideId, ruleId)))))));
@@ -16135,8 +16135,8 @@ const SHELL_FILE = /\.(?:sh|bash|zsh|ksh|fish|command)$/u;
16135
16135
  const SHELL_SHEBANG = /^#!\S*(?:\/|\s)(?:env\s+)?(?:-\S+\s+)*(?:ba|z|k|da)?sh\b|^#!\S*fish\b/u;
16136
16136
  const EXTENSION$1 = /\.[^./]+$/u;
16137
16137
  const SETTINGS_FILE = ".claude/settings.json";
16138
- const READ_CONCURRENCY$17 = 64;
16139
- const RULE$33 = "shell-script";
16138
+ const READ_CONCURRENCY$18 = 64;
16139
+ const RULE$34 = "shell-script";
16140
16140
  const MESSAGE$8 = "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.";
16141
16141
  const HookSchema = Schema.Struct({
16142
16142
  command: Schema.optional(Schema.String),
@@ -16168,8 +16168,8 @@ const checkShellScripts = Effect.fn("checkShellScripts")(function* checkShellScr
16168
16168
  return files.readFile(file).pipe(Effect.map(Option.exists((source) => SHELL_SHEBANG.test(source))));
16169
16169
  };
16170
16170
  const candidates = pipe(names, Array$1.filter((name) => !isSessionStartHook(name)));
16171
- const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$17 });
16172
- return pipe(shell, Array$1.map((name) => problemInFile(RULE$33)(files.join(root, name), MESSAGE$8)));
16171
+ const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$18 });
16172
+ return pipe(shell, Array$1.map((name) => problemInFile(RULE$34)(files.join(root, name), MESSAGE$8)));
16173
16173
  });
16174
16174
  // src/features/check-structure/model/structure.ts
16175
16175
  const checkStructure = checkSection({
@@ -16302,7 +16302,7 @@ const AGENT_DOCS = [
16302
16302
  ":(glob)**/CLAUDE.md",
16303
16303
  ...EXCLUDED$5
16304
16304
  ];
16305
- const READ_CONCURRENCY$16 = 16;
16305
+ const READ_CONCURRENCY$17 = 16;
16306
16306
  const START$20 = 0;
16307
16307
  const FIRST$9 = 1;
16308
16308
  const LINE = "\n";
@@ -16371,7 +16371,7 @@ const taskSources = Effect.fn("taskSources")(function* taskSources(root, directo
16371
16371
  return pipe(tasks, Array$1.flatMap((task) => Option.toArray(taskSource(file, source)(task))));
16372
16372
  });
16373
16373
  const workspaceTasks = Effect.fn("workspaceTasks")(function* workspaceTasks(root, directories) {
16374
- const found = yield* Effect.forEach(directories, (directory) => taskSources(root, directory), { concurrency: READ_CONCURRENCY$16 });
16374
+ const found = yield* Effect.forEach(directories, (directory) => taskSources(root, directory), { concurrency: READ_CONCURRENCY$17 });
16375
16375
  return Array$1.flatten(found);
16376
16376
  });
16377
16377
  const readSources = Effect.fn("readSources")(function* readSources(root, names, sourcesOf) {
@@ -16383,7 +16383,7 @@ const readSources = Effect.fn("readSources")(function* readSources(root, names,
16383
16383
  onSome: sourcesOf(file, name)
16384
16384
  });
16385
16385
  return files.readFile(file).pipe(Effect.map(sourcesIn));
16386
- }, { concurrency: READ_CONCURRENCY$16 });
16386
+ }, { concurrency: READ_CONCURRENCY$17 });
16387
16387
  return Array$1.flatten(found);
16388
16388
  });
16389
16389
  /** @internal */
@@ -16407,7 +16407,7 @@ const commandSources = Effect.fn("commandSources")(function* commandSources(root
16407
16407
  return Array$1.flatten(found);
16408
16408
  });
16409
16409
  // src/features/check-vite-plus/model/package-scripts.ts
16410
- const RULE$32 = "package-script";
16410
+ const RULE$33 = "package-script";
16411
16411
  const LIFECYCLE = [
16412
16412
  "preinstall",
16413
16413
  "install",
@@ -16430,25 +16430,25 @@ const LIFECYCLE = [
16430
16430
  const problemOf$6 = ({ file, position, name }) => ({
16431
16431
  file,
16432
16432
  ...position,
16433
- rule: RULE$32,
16433
+ rule: RULE$33,
16434
16434
  message: `The script ${name} is not a lifecycle script. package.json scripts hold only the scripts the package manager runs by itself, such as prepare and prepack. Write ${name} as a task in run.tasks of this package's vite.config.ts, where its shape is type-checked.`
16435
16435
  });
16436
16436
  const packageScriptProblems = (sources) => pipe(sources, Array$1.filter(({ kind, name }) => kind === "script" && !Array$1.contains(LIFECYCLE, name)), Array$1.map(problemOf$6));
16437
16437
  // src/features/check-vite-plus/model/vite-plus-block.ts
16438
- const RULE$31 = "vite-plus-block";
16439
- const MARKER = Array$1.join([
16438
+ const RULE$32 = "vite-plus-block";
16439
+ const MARKER$1 = Array$1.join([
16440
16440
  "<!--",
16441
16441
  "VITE PLUS START",
16442
16442
  "-->"
16443
16443
  ], "");
16444
16444
  const MESSAGE$7 = "holds the Vite+ block that `vp create --agent` and `vp migrate --agent` write, and every `vp config` rewrites it. Delete the block with its markers. The vite-plus skill reads the same guidance from node_modules/vite-plus/AGENTS.md.";
16445
16445
  const problemIn = (file) => (source) => {
16446
- const index = String$1.indexOf(MARKER)(source);
16446
+ const index = String$1.indexOf(MARKER$1)(source);
16447
16447
  if (Option.isNone(index)) return Option.none();
16448
16448
  return Option.some({
16449
16449
  file,
16450
16450
  ...positionOf(source)(index.value),
16451
- rule: RULE$31,
16451
+ rule: RULE$32,
16452
16452
  message: MESSAGE$7
16453
16453
  });
16454
16454
  };
@@ -16481,7 +16481,7 @@ const checkCiDrift = Effect.fn("checkCiDrift")(function* checkCiDrift(root) {
16481
16481
  return pipe(drifts, Array$1.map(problemOf$5));
16482
16482
  });
16483
16483
  // src/features/check-workflows/model/release-please.ts
16484
- const RULE$30 = "release-please";
16484
+ const RULE$31 = "release-please";
16485
16485
  const RELEASE_PLEASE_FILE = /(?:^|\/)(?:release-please-config|\.release-please-manifest)\.json$/u;
16486
16486
  const FIRST$8 = 1;
16487
16487
  const MESSAGE$6 = "releases with release-please. Releases are manual: bump the version in a PR, then run the publish workflow, which runs `msch publish` for the workspace.";
@@ -16493,7 +16493,7 @@ const checkReleasePlease = Effect.fn("checkReleasePlease")(function* checkReleas
16493
16493
  file: files.join(root, name),
16494
16494
  line: FIRST$8,
16495
16495
  column: FIRST$8,
16496
- rule: RULE$30,
16496
+ rule: RULE$31,
16497
16497
  message: MESSAGE$6
16498
16498
  })));
16499
16499
  });
@@ -16653,7 +16653,7 @@ const COMMENT_NODES = [
16653
16653
  ];
16654
16654
  const START$19 = 0;
16655
16655
  const NEXT = 1;
16656
- const NONE$3 = [];
16656
+ const NONE$4 = [];
16657
16657
  const loadGrammar = (grammar) => loadLanguage(grammar).pipe(Effect.mapBoth({
16658
16658
  onFailure: ({ message }) => unreadable(grammar)(message),
16659
16659
  onSuccess: (language) => [grammar, language]
@@ -16671,7 +16671,7 @@ const commentNodesIn = (language, source) => pipe(readTree({
16671
16671
  index: node.startIndex,
16672
16672
  text: node.text
16673
16673
  })))
16674
- }), Option.getOrElse(() => NONE$3));
16674
+ }), Option.getOrElse(() => NONE$4));
16675
16675
  const syntaxComments = (grammars, grammar) => (source) => Option.match(grammars(grammar), {
16676
16676
  onNone: () => Effect.fail(unreadable(grammar)("the grammar is not loaded")),
16677
16677
  onSome: (language) => commentsFrom(grammar)((text) => commentNodesIn(language, text))(source)
@@ -16694,7 +16694,7 @@ const shifted = (offset) => ({ index, text }) => ({
16694
16694
  text
16695
16695
  });
16696
16696
  const markupComment = (source) => (node) => {
16697
- if (!isComment(node) || node.startIndex === null || node.endIndex === null) return NONE$3;
16697
+ if (!isComment(node) || node.startIndex === null || node.endIndex === null) return NONE$4;
16698
16698
  return [{
16699
16699
  index: node.startIndex,
16700
16700
  text: String$1.slice(node.startIndex, node.endIndex + NEXT)(source)
@@ -16705,10 +16705,10 @@ const textComments = (grammars, grammar) => (text) => {
16705
16705
  return syntaxComments(grammars, grammar)(text.data).pipe(Effect.map(Array$1.map(shift)));
16706
16706
  };
16707
16707
  const embeddedComments = (grammars) => (node) => {
16708
- if (!isTag(node)) return Effect.succeed(NONE$3);
16708
+ if (!isTag(node)) return Effect.succeed(NONE$4);
16709
16709
  const texts = pipe(node.children, Array$1.filter(isText));
16710
16710
  return Option.match(embeddedGrammar(node), {
16711
- onNone: () => Effect.succeed(NONE$3),
16711
+ onNone: () => Effect.succeed(NONE$4),
16712
16712
  onSome: (grammar) => pipe(texts, (items) => Effect.forEach(items, textComments(grammars, grammar), { concurrency: 1 }), Effect.map(Array$1.flatten))
16713
16713
  });
16714
16714
  };
@@ -16781,11 +16781,11 @@ const scannedFiles = Effect.fn("scannedFiles")(function* scannedFiles(root) {
16781
16781
  })), Array$1.filter(({ file }) => !HashSet.has(skipped, file)));
16782
16782
  });
16783
16783
  // src/features/ban-comments/model/comments.ts
16784
- const RULE$29 = "comment";
16784
+ const RULE$30 = "comment";
16785
16785
  const SUPPRESSION_RULE = "suppression";
16786
16786
  const UNUSED_RULE = "unused-comment-allowance";
16787
16787
  const CONFIG_FILE$3 = "vite.config.ts";
16788
- const READ_CONCURRENCY$15 = 64;
16788
+ const READ_CONCURRENCY$16 = 64;
16789
16789
  const START$18 = 0;
16790
16790
  const SHEBANG = "#!";
16791
16791
  const PIN = /@(?:[0-9a-f]{40}|sha256:[0-9a-f]{64})\s*$/u;
@@ -16813,7 +16813,7 @@ const NOTHING = {
16813
16813
  used: []
16814
16814
  };
16815
16815
  const unusedMessage = (entry) => `allows the comment pattern \`${entry}\`, but no comment in the repository matches it. Delete the entry and add it back when a comment needs it.`;
16816
- const problemOf$4 = (file, source) => (comment) => Match.value(isSuppression(comment)).pipe(Match.when(true, () => problemAtIndex(SUPPRESSION_RULE)(file, source)(comment.index, SUPPRESSION_MESSAGE)), Match.orElse(() => problemAtIndex(RULE$29)(file, source)(comment.index, MESSAGE$5)));
16816
+ const problemOf$4 = (file, source) => (comment) => Match.value(isSuppression(comment)).pipe(Match.when(true, () => problemAtIndex(SUPPRESSION_RULE)(file, source)(comment.index, SUPPRESSION_MESSAGE)), Match.orElse(() => problemAtIndex(RULE$30)(file, source)(comment.index, MESSAGE$5)));
16817
16817
  const settingsOf = ({ msch }) => ({ allow: pipe(Option.fromUndefinedOr(msch), Option.flatMap(({ comments }) => Option.fromUndefinedOr(comments)), Option.match({
16818
16818
  onNone: () => NO_SETTINGS.allow,
16819
16819
  onSome: ({ allow }) => allow
@@ -16850,7 +16850,7 @@ const scanFile = ({ directives, allowances, comments }) => ({ name, file }, sour
16850
16850
  problems: pipe(found, Array$1.filter(kept), Array$1.map(toProblem)),
16851
16851
  used: usedAllowances(allowances, found)
16852
16852
  })), Effect.catchTag("CommentsUnreadable", ({ message }) => Effect.succeed({
16853
- problems: [problemAtIndex(RULE$29)(file, source)(START$18, `msch could not read the comments in this file: ${message}`)],
16853
+ problems: [problemAtIndex(RULE$30)(file, source)(START$18, `msch could not read the comments in this file: ${message}`)],
16854
16854
  used: []
16855
16855
  })))
16856
16856
  });
@@ -16869,7 +16869,7 @@ const checkComments = Effect.fn("checkComments")(function* checkComments(root) {
16869
16869
  const found = yield* Effect.forEach(scanned, (entry) => files.readFile(entry.file).pipe(Effect.flatMap(Option.match({
16870
16870
  onNone: () => Effect.succeed(NOTHING),
16871
16871
  onSome: (source) => scan(entry, source)
16872
- }))), { concurrency: READ_CONCURRENCY$15 });
16872
+ }))), { concurrency: READ_CONCURRENCY$16 });
16873
16873
  const used = HashSet.fromIterable(pipe(found, Array$1.flatMap(({ used: indexes }) => indexes)));
16874
16874
  const unused = yield* unusedAllowances(root, settings, used);
16875
16875
  return [...pipe(found, Array$1.flatMap(({ problems }) => problems)), ...unused];
@@ -16963,7 +16963,7 @@ const PYTHON = {
16963
16963
  /** @internal */
16964
16964
  const checkPython = (root) => checkBannedTool(root, PYTHON);
16965
16965
  // src/features/check-catalog-entries/model/uncataloged-dependencies.ts
16966
- const RULE$28 = "uncataloged-dependency";
16966
+ const RULE$29 = "uncataloged-dependency";
16967
16967
  const OWNED_ELSEWHERE = [
16968
16968
  "catalog:",
16969
16969
  "workspace:",
@@ -16977,7 +16977,7 @@ const isOwnedElsewhere = ({ specifier }) => pipe(OWNED_ELSEWHERE, Array$1.some((
16977
16977
  const problemsIn$11 = (entry, source) => pipe(manifestSpecifiers(source), Array$1.filter((found) => !isOwnedElsewhere(found)), Array$1.map((found) => ({
16978
16978
  file: entry.file,
16979
16979
  ...positionOf(source)(offsetIn(source)(manifestPattern(found))),
16980
- rule: RULE$28,
16980
+ rule: RULE$29,
16981
16981
  message: `\`${found.name}\` \`${found.specifier}\` ${MESSAGE$4}`
16982
16982
  })));
16983
16983
  /** @internal */
@@ -16998,7 +16998,7 @@ const uncatalogedDependencies = Effect.fn("uncatalogedDependencies")(function* u
16998
16998
  const WORKSPACE_FILE$3 = "pnpm-workspace.yaml";
16999
16999
  const FIRST_LINE$5 = 1;
17000
17000
  const FIRST_COLUMN$5 = 1;
17001
- const RULE$27 = "prune-setting-off";
17001
+ const RULE$28 = "prune-setting-off";
17002
17002
  const PRUNE_SETTINGS = [["catalogPrune", "removes catalog entries no package refers to, so the catalog holds only versions in use."], ["minimumReleaseAgeExcludePrune", "removes `minimumReleaseAgeExclude` entries the lockfile no longer resolves, which only exempted that one version while it was new."]];
17003
17003
  const decodeTrue = Schema.decodeUnknownOption(Schema.Literal(true));
17004
17004
  const lineOf$3 = (source) => (setting) => pipe(String$1.split(source, "\n"), Array$1.findFirstIndex(String$1.startsWith(`${setting}:`)), Option.match({
@@ -17012,7 +17012,7 @@ const pruneProblems = Effect.fn("pruneProblems")(function* pruneProblems(file, s
17012
17012
  file,
17013
17013
  line: at(setting),
17014
17014
  column: FIRST_COLUMN$5,
17015
- rule: RULE$27,
17015
+ rule: RULE$28,
17016
17016
  message: `Set \`${setting}: true\`. It ${effect}`
17017
17017
  })));
17018
17018
  });
@@ -17106,13 +17106,13 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
17106
17106
  ];
17107
17107
  });
17108
17108
  // src/features/check-skills/model/published-skills.ts
17109
- const RULE$26 = "published-skills";
17109
+ const RULE$27 = "published-skills";
17110
17110
  const KEYWORD = "tanstack-intent";
17111
17111
  const SKILLS = "skills";
17112
17112
  const SKILL_FILE$3 = "SKILL.md";
17113
17113
  const SUCCEEDED = 0;
17114
17114
  const INTENT_CLI = fileURLToPath(new URL("./cli.mjs", import.meta.resolve("@tanstack/intent")));
17115
- const problemAt$2 = problemInFile(RULE$26);
17115
+ const problemAt$2 = problemInFile(RULE$27);
17116
17116
  const skillDirectoriesIn = (files, directory) => pipe(findSkillFiles(files.join(directory, SKILLS)), Array$1.filter((file) => files.basename(file) === SKILL_FILE$3), Array$1.map((file) => files.relative(directory, files.dirname(file))));
17117
17117
  const isShipped = (listed) => (skill) => Array$1.contains(listed, SKILLS) || Array$1.contains(listed, skill);
17118
17118
  const packagingMessages = ({ keywords, files }, skills) => {
@@ -17149,7 +17149,7 @@ const checkPublishedSkills = Effect.fn("checkPublishedSkills")(function* checkPu
17149
17149
  return Array$1.flatten(problems);
17150
17150
  });
17151
17151
  // src/features/check-skills/model/skill-files.ts
17152
- const RULE$25 = "skill-file";
17152
+ const RULE$26 = "skill-file";
17153
17153
  const SKILL_FILE$2 = /(?:^|\/)SKILL\.md$/u;
17154
17154
  const INSTALLED = /(?:^|\/)\.(?:agents|claude|codex)\/skills\//u;
17155
17155
  const FIXTURE$1 = /(?:^|\/)fixtures\//u;
@@ -17168,7 +17168,7 @@ const BLANK = /\s+/u;
17168
17168
  const SEPARATOR$10 = "/";
17169
17169
  const START$16 = 0;
17170
17170
  const FIRST$7 = 1;
17171
- const READ_CONCURRENCY$14 = 16;
17171
+ const READ_CONCURRENCY$15 = 16;
17172
17172
  const Metadata = Schema.Struct({ "derived-from": Schema.optional(Schema.String) });
17173
17173
  const Frontmatter = Schema.Struct({
17174
17174
  name: Schema.optional(Schema.String),
@@ -17206,7 +17206,7 @@ const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source),
17206
17206
  ]), Option.getOrElse(() => []), Array$1.map(({ index, message }) => ({
17207
17207
  file: skill.file,
17208
17208
  ...positionOf(skill.source)(index),
17209
- rule: RULE$25,
17209
+ rule: RULE$26,
17210
17210
  message
17211
17211
  })));
17212
17212
  const linkOf = (found) => pipe(groupOf("target")(found), Option.filter((target) => !EXTERNAL.test(target)), Option.map((target) => String$1.replace(FRAGMENT, "")(target)), Option.filter(String$1.isNonEmpty), Option.map((target) => ({
@@ -17233,7 +17233,7 @@ const linkProblems = Effect.fn("linkProblems")(function* linkProblems(file) {
17233
17233
  return pipe(missing, Array$1.map(({ target, index }) => ({
17234
17234
  file,
17235
17235
  ...positionOf(source)(index),
17236
- rule: RULE$25,
17236
+ rule: RULE$26,
17237
17237
  message: `links to ${target}, which does not exist. Fix the path or remove the link.`
17238
17238
  })));
17239
17239
  });
@@ -17244,12 +17244,12 @@ const problemsIn$9 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
17244
17244
  const inside = pipe(listed, Array$1.filter(String$1.startsWith(`${directory}${SEPARATOR$10}`)));
17245
17245
  const text = yield* files.readFile(file);
17246
17246
  const documents = pipe(inside, Array$1.filter(String$1.endsWith(MARKDOWN$5)), Array$1.map((entry) => files.join(root, entry)));
17247
- const links = yield* Effect.forEach(documents, linkProblems, { concurrency: READ_CONCURRENCY$14 });
17247
+ const links = yield* Effect.forEach(documents, linkProblems, { concurrency: READ_CONCURRENCY$15 });
17248
17248
  const licenses = pipe(inside, Array$1.filter((entry) => files.dirname(entry) === directory), Array$1.filter((entry) => LICENSE_FILE.test(files.basename(entry))), Array$1.map((entry) => ({
17249
17249
  file: files.join(root, entry),
17250
17250
  line: FIRST$7,
17251
17251
  column: FIRST$7,
17252
- rule: RULE$25,
17252
+ rule: RULE$26,
17253
17253
  message: "is a license file inside a skill. Skills here carry neither a license field nor a LICENSE file. Delete it."
17254
17254
  })));
17255
17255
  return [
@@ -17266,7 +17266,7 @@ const problemsIn$9 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
17266
17266
  const checkSkillFiles = Effect.fn("checkSkillFiles")(function* checkSkillFiles(root) {
17267
17267
  const listed = yield* (yield* RepositoryFiles).listedFiles(root);
17268
17268
  const skills = pipe(listed, Array$1.filter((name) => SKILL_FILE$2.test(name) && !INSTALLED.test(name) && !FIXTURE$1.test(name)));
17269
- const found = yield* Effect.forEach(skills, (name) => problemsIn$9(root, listed, name), { concurrency: READ_CONCURRENCY$14 });
17269
+ const found = yield* Effect.forEach(skills, (name) => problemsIn$9(root, listed, name), { concurrency: READ_CONCURRENCY$15 });
17270
17270
  return Array$1.flatten(found);
17271
17271
  });
17272
17272
  // src/features/check-version-downgrades/model/version-entries.ts
@@ -17327,8 +17327,8 @@ const cargoEntries = (text) => {
17327
17327
  };
17328
17328
  const toolchainEntries = (text) => singleEntry("channel", fieldOf("channel")(parseToml(text)["toolchain"]));
17329
17329
  // src/features/check-version-downgrades/model/version-downgrade.ts
17330
- const RULE$24 = "version-downgrade";
17331
- const READ_CONCURRENCY$13 = 16;
17330
+ const RULE$25 = "version-downgrade";
17331
+ const READ_CONCURRENCY$14 = 16;
17332
17332
  const READERS = [
17333
17333
  [/(?:^|\/)package\.json$/u, manifestEntries],
17334
17334
  [/^pnpm-workspace\.yaml$/u, workspaceEntries],
@@ -17352,7 +17352,7 @@ const downgradesIn = ({ file, text, before, after }) => {
17352
17352
  file,
17353
17353
  line: lineOf$2(text, entry),
17354
17354
  column: FIRST_LINE$4,
17355
- rule: RULE$24,
17355
+ rule: RULE$25,
17356
17356
  message: message$1(old, entry)
17357
17357
  })), Option.toArray)));
17358
17358
  };
@@ -17372,7 +17372,7 @@ const checkDowngrades = Effect.fn("checkDowngrades")(function* checkDowngrades(r
17372
17372
  before: read(before),
17373
17373
  after: read(after)
17374
17374
  })), Option.getOrElse(() => []));
17375
- }), { concurrency: READ_CONCURRENCY$13 });
17375
+ }), { concurrency: READ_CONCURRENCY$14 });
17376
17376
  return Array$1.flatten(found);
17377
17377
  });
17378
17378
  // src/features/check-version-downgrades/model/renovate-settings.ts
@@ -17383,7 +17383,7 @@ const AUTOMERGE_RULE = "renovate-platform-automerge";
17383
17383
  const CAP_RULE = "renovate-version-cap";
17384
17384
  const PRESET_RULE = "renovate-msch-preset";
17385
17385
  const START$15 = 0;
17386
- const READ_CONCURRENCY$12 = 16;
17386
+ const READ_CONCURRENCY$13 = 16;
17387
17387
  const AUTOMERGE_MESSAGE = "sets `platformAutomerge: false`. Keep the platform's automerge on so passing updates merge without waiting for the next Renovate run.";
17388
17388
  const CAP_MESSAGE = "caps a dependency below a version with `allowedVersions`. A cap holds the dependency on an old version, which is a downgrade that never ends: fix what breaks on the new version instead.";
17389
17389
  const PRESET_MESSAGE = `does not extend \`${RENOVATE_PRESET}\`, so Renovate writes ranges that the \`version-range\` check rejects. Add it to \`extends\`.`;
@@ -17417,12 +17417,12 @@ const checkRenovateSettings = Effect.fn("checkRenovateSettings")(function* check
17417
17417
  onNone: () => [],
17418
17418
  onSome: (source) => problemsIn$8(file, source)
17419
17419
  })));
17420
- }, { concurrency: READ_CONCURRENCY$12 });
17420
+ }, { concurrency: READ_CONCURRENCY$13 });
17421
17421
  return Array$1.flatten(found);
17422
17422
  });
17423
17423
  // src/shared/lib/manifest-texts.ts
17424
17424
  const MANIFEST$2 = /(?:^|\/)package\.json$/u;
17425
- const READ_CONCURRENCY$11 = 16;
17425
+ const READ_CONCURRENCY$12 = 16;
17426
17426
  /** @internal */
17427
17427
  const manifestTexts = Effect.fn("manifestTexts")(function* manifestTexts(root) {
17428
17428
  const files = yield* RepositoryFiles;
@@ -17431,16 +17431,16 @@ const manifestTexts = Effect.fn("manifestTexts")(function* manifestTexts(root) {
17431
17431
  const read = yield* Effect.forEach(names, (file) => Effect.map(files.readFile(files.join(root, file)), Option.map((text) => ({
17432
17432
  file,
17433
17433
  text
17434
- }))), { concurrency: READ_CONCURRENCY$11 });
17434
+ }))), { concurrency: READ_CONCURRENCY$12 });
17435
17435
  return Array$1.getSomes(read);
17436
17436
  });
17437
17437
  // src/features/check-version-downgrades/model/package-versions.ts
17438
- const RULE$23 = "unbumped-package";
17438
+ const RULE$24 = "unbumped-package";
17439
17439
  const UNSHIPPED = /(?:\.test\.[\w.]+$|(?:^|\/)(?:fixtures|__tests__|tests?)\/|(?:^|\/)(?:AGENTS|CLAUDE|CHANGELOG)\.md$)/u;
17440
17440
  const UNVERSIONED$5 = "0.0.0";
17441
17441
  const FIRST_LINE$3 = 1;
17442
17442
  const FIRST_COLUMN$4 = 1;
17443
- const READ_CONCURRENCY$10 = 16;
17443
+ const READ_CONCURRENCY$11 = 16;
17444
17444
  const LAST_SEGMENT$1 = /[^/]*$/u;
17445
17445
  const directoryOf$1 = (file) => String$1.replace(LAST_SEGMENT$1, "")(file);
17446
17446
  const packageAt$1 = (file, text) => pipe(decodeVersionedPackageJson(text), Option.filter(({ private: hidden, version }) => hidden !== true && version !== UNVERSIONED$5), Option.map((manifest) => ({
@@ -17510,16 +17510,16 @@ const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPa
17510
17510
  file: files.join(root, pack.file),
17511
17511
  line: versionLine(pack.text),
17512
17512
  column: FIRST_COLUMN$4,
17513
- rule: RULE$23,
17513
+ rule: RULE$24,
17514
17514
  message: message(pack, part, lowest)
17515
17515
  })), Option.toArray);
17516
- }), { concurrency: READ_CONCURRENCY$10 });
17516
+ }), { concurrency: READ_CONCURRENCY$11 });
17517
17517
  return Array$1.flatten(found);
17518
17518
  });
17519
17519
  // src/features/find-unneeded-files/model/applied-packages.ts
17520
17520
  const SCOPE$1 = Option.getOrElse(scopeOfName(SELF_NAME), () => SELF_NAME);
17521
17521
  const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
17522
- const RULE$22 = "applied-package";
17522
+ const RULE$23 = "applied-package";
17523
17523
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
17524
17524
  const NOT_FOUND$3 = -1;
17525
17525
  const SEPARATOR$9 = "/";
@@ -17555,7 +17555,7 @@ const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
17555
17555
  const problemAt$1 = (file, source) => (index, name) => ({
17556
17556
  file,
17557
17557
  ...positionOf(source)(index),
17558
- rule: RULE$22,
17558
+ rule: RULE$23,
17559
17559
  message: `msch applies ${name}. Remove this use and let msch apply it.`
17560
17560
  });
17561
17561
  const specifierPattern = ({ name }) => new RegExp(`["'\`]${escaped$1(name)}(?=["'\`/])`, "gu");
@@ -17610,7 +17610,7 @@ const checkAppliedPackages = Effect.fn("checkAppliedPackages")(function* checkAp
17610
17610
  return yield* appliedPackageProblems(root, applied);
17611
17611
  });
17612
17612
  // src/features/find-unneeded-files/model/replaced-tools.ts
17613
- const RULE$21 = "replaced-tool";
17613
+ const RULE$22 = "replaced-tool";
17614
17614
  const FIRST$6 = 1;
17615
17615
  const TASKS = "Vite+ tasks in run.tasks of vite.config.ts, run with `vp run`";
17616
17616
  const HOOKS = "the hooks in .vite-hooks/ that `vp config` installs";
@@ -17691,7 +17691,7 @@ const problemFor$1 = ({ name, file }) => pipe(REPLACED, Array$1.findFirst(({ pat
17691
17691
  file,
17692
17692
  line: FIRST$6,
17693
17693
  column: FIRST$6,
17694
- rule: RULE$21,
17694
+ rule: RULE$22,
17695
17695
  message: `belongs to ${tool}, which this repository replaced with ${replacement}. Move what is still needed there and delete this file.`
17696
17696
  })));
17697
17697
  /** @internal */
@@ -17830,7 +17830,7 @@ const checkUnneededFiles = Effect.fn("checkUnneededFiles")(function* checkUnneed
17830
17830
  return yield* unneededIn(root, cargoEnabled(workspace.value));
17831
17831
  });
17832
17832
  // src/features/check-markdown-directives/model/directives.ts
17833
- const RULE$20 = "markdown-directive";
17833
+ const RULE$21 = "markdown-directive";
17834
17834
  const START$13 = 0;
17835
17835
  const SECOND = 1;
17836
17836
  const ODD = 1;
@@ -17855,7 +17855,7 @@ const problemsIn$7 = (file, source) => {
17855
17855
  const { line, column } = positionOf(source)(index);
17856
17856
  return pipe(Array$1.get(fenced, line - SECOND), Option.getOrElse(() => false)) || pipe(Array$1.get(lines, line - SECOND), Option.map(String$1.slice(START$13, column - SECOND)), Option.exists(insideCodeSpan));
17857
17857
  };
17858
- return pipe(Array$1.fromIterable(String$1.matchAll(DISABLE)(source)), Array$1.filter((match) => !isCode(match.index ?? START$13)), Array$1.map((match) => problemAtIndex(RULE$20)(file, source)(match.index ?? START$13, MESSAGE$3)));
17858
+ return pipe(Array$1.fromIterable(String$1.matchAll(DISABLE)(source)), Array$1.filter((match) => !isCode(match.index ?? START$13)), Array$1.map((match) => problemAtIndex(RULE$21)(file, source)(match.index ?? START$13, MESSAGE$3)));
17859
17859
  };
17860
17860
  const isChecked$1 = (name) => String$1.endsWith(MARKDOWN$4)(name) && !pipe(SKIPPED_DIRECTORIES, Array$1.some((directory) => String$1.includes(directory)(`/${name}`))) && !pipe(SKIPPED_FILES, Array$1.some((skipped) => name === skipped || String$1.endsWith(`/${skipped}`)(name)));
17861
17861
  /** @internal */
@@ -17867,6 +17867,50 @@ const checkMarkdownDirectives = Effect.fn("checkMarkdownDirectives")(function* c
17867
17867
  file: files.join(root, name)
17868
17868
  }))), ({ file }, source) => problemsIn$7(file, source));
17869
17869
  });
17870
+ // src/features/check-owner-markers/model/owner-markers.ts
17871
+ const RULE$20 = "owner-decision-removed";
17872
+ const MARKER = /\(owner, \d{4}-\d{2}-\d{2}\)/gu;
17873
+ const TRAILER = /^Owner-Decision-(?:Moved|Revoked):[ \t]*\S/mu;
17874
+ const READ_CONCURRENCY$10 = 16;
17875
+ const HEAD = "HEAD";
17876
+ const NONE$3 = 0;
17877
+ const markersOf = (text) => pipe(String$1.matchAll(MARKER)(text), Array$1.fromIterable, Array$1.flatMap((hit) => Option.toArray(Array$1.head(hit))));
17878
+ const countOf = (markers) => (marker) => pipe(markers, Array$1.filter((candidate) => candidate === marker)).length;
17879
+ const lostMarkers = (before, after) => pipe(Array$1.dedupe(before), Array$1.flatMap((marker) => Array$1.replicate(marker, Math.max(NONE$3, countOf(before)(marker) - countOf(after)(marker)))));
17880
+ const removalOf = (file, lost) => pipe(Option.liftPredicate(lost, Array$1.isReadonlyArrayNonEmpty), Option.map((markers) => ({
17881
+ file,
17882
+ markers
17883
+ })), Option.toArray);
17884
+ const messageOf$1 = ({ markers }) => `removes ${Array$1.join(markers, " ")}. Only the owner changes or removes an owner decision. When it moves to a stronger home, add the trailer "Owner-Decision-Moved: <new place>" to a commit of the branch. When the owner revoked it, add "Owner-Decision-Revoked: <the owner's words>".`;
17885
+ const removalsSince = Effect.fn("removalsSince")(function* removalsSince(root, base) {
17886
+ const files = yield* RepositoryFiles;
17887
+ const changed = yield* files.changedFiles(root, base);
17888
+ const found = yield* Effect.forEach(changed, (name) => Effect.gen(function* compare() {
17889
+ const before = yield* files.readAtRevision(root, base, name);
17890
+ const after = yield* files.readAtRevision(root, HEAD, name);
17891
+ const lost = lostMarkers(Option.match(before, {
17892
+ onNone: () => [],
17893
+ onSome: markersOf
17894
+ }), Option.match(after, {
17895
+ onNone: () => [],
17896
+ onSome: markersOf
17897
+ }));
17898
+ return removalOf(files.join(root, name), lost);
17899
+ }), { concurrency: READ_CONCURRENCY$10 });
17900
+ return Array$1.flatten(found);
17901
+ });
17902
+ const hasTrailer = Effect.fn("hasTrailer")(function* hasTrailer(root, base) {
17903
+ const messages = yield* (yield* RepositoryFiles).commitMessages(root, base);
17904
+ return pipe(messages, Array$1.some((commit) => TRAILER.test(commit)));
17905
+ });
17906
+ /** @internal */
17907
+ const checkOwnerMarkers = Effect.fn("checkOwnerMarkers")(function* checkOwnerMarkers(root) {
17908
+ const base = yield* baseRevision(root);
17909
+ if (Option.isNone(base)) return [];
17910
+ const removals = yield* removalsSince(root, base.value);
17911
+ if (!Array$1.isReadonlyArrayNonEmpty(removals) || (yield* hasTrailer(root, base.value))) return [];
17912
+ return pipe(removals, Array$1.map((removal) => problemInFile(RULE$20)(removal.file, messageOf$1(removal))));
17913
+ });
17870
17914
  // src/features/check-owner-names/model/owner-names.ts
17871
17915
  const RULE$19 = "owner-name";
17872
17916
  const TEXT_FILE$1 = /\.(?:[cm]?[jt]sx?|jsonc?|md|ya?ml|toml)$/u;
@@ -17998,6 +18042,7 @@ const checkDocuments = Effect.fn("checkDocuments")(function* checkDocuments(root
17998
18042
  const found = yield* Effect.all([
17999
18043
  checkHiddenUnicode(root),
18000
18044
  checkMarkdownDirectives(root),
18045
+ checkOwnerMarkers(root),
18001
18046
  checkOwnerNames(root)
18002
18047
  ], { concurrency: "unbounded" });
18003
18048
  return Array$1.flatten(found);