@r_masseater/msch 0.111.0 → 0.113.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
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
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 { B as installedManifest, C as hasVerifyTask, F as literalOf, H as workspaceDependencies$1, I as nestedValues, L as propertyValue, M as KeySchema, N as childrenOf$4, P as keyName, R as stringsIn, S as definesTask, V as readManifest, _ as shadcnUiOf, a as workspaceConfigs, b as RUN_TASKS, c as publicEntriesOf, d as splitFrontmatter, h as deployEntries, i as publishedWorkspaces, j as workspaceConfigOf, l as isIndexSkill, m as bundledEntries, o as entryNameOf, p as workspaceLinks, r as packedWorkspaces, s as isBinEntry, u as FRONTMATTER, x as VERIFY_TASK, z as dependencyEntries } from "./published-BeHBqOVt.mjs";
5
- import { a as workspaceManifest, i as workspaceProjects, n as unmatchedWorkspacePatterns, r as workspaceDirectories, t as publishedProjects } from "./workspace-projects-ycyXdQRo.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";
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 MSCH_TASK_COMMANDS, d as namedWorkspaces, f as patternOf$1, l as isIgnored, n as builtTextRuleNames, r as secretsOf, s as existsAt, t as TEXT_IGNORES } from "./repository-text-ClgnFGgv.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";
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.111.0";
46
+ var version = "0.113.0";
47
47
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
48
48
  var repository = {
49
49
  "type": "git",
@@ -435,7 +435,7 @@ const mentions$1 = (needle) => ({ api }) => (configPath) => Effect.gen(function*
435
435
  return pipe(texts, Array$1.some((text) => Option.exists(text, includesNeedle)));
436
436
  });
437
437
  // src/entities/project/model/inputs.ts
438
- const SEPARATOR$27 = "/";
438
+ const SEPARATOR$28 = "/";
439
439
  const SCOPE_PREFIX$1 = "@";
440
440
  const HIDDEN_PREFIX = ".";
441
441
  const encodeOptions = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown));
@@ -477,14 +477,14 @@ const closureOf$3 = Effect.fn("closureOf")(function* closureOf(root, configPath)
477
477
  const directories = yield* workspaceClosure(directory);
478
478
  return {
479
479
  directories,
480
- prefixes: pipe(directories, Array$1.map((found) => `${files.relative(root, found)}${SEPARATOR$27}`))
480
+ prefixes: pipe(directories, Array$1.map((found) => `${files.relative(root, found)}${SEPARATOR$28}`))
481
481
  };
482
482
  });
483
483
  const scopedNames = (modules) => (name) => Effect.gen(function* listScope() {
484
484
  const files = yield* RepositoryFiles;
485
485
  if (!String$1.startsWith(SCOPE_PREFIX$1)(name)) return [name];
486
486
  const scoped = yield* files.readDirectory(files.join(modules, name));
487
- return pipe(scoped, Array$1.map((entry) => `${name}${SEPARATOR$27}${entry}`));
487
+ return pipe(scoped, Array$1.map((entry) => `${name}${SEPARATOR$28}${entry}`));
488
488
  });
489
489
  const installedNames$1 = Effect.fn("installedNames")(function* installedNames(modules) {
490
490
  const listed = yield* (yield* RepositoryFiles).readDirectory(modules);
@@ -628,17 +628,17 @@ const TaskObject = Schema.Struct({
628
628
  });
629
629
  const decodeTaskProperty = Schema.decodeUnknownOption(TaskProperty);
630
630
  const decodeTaskObject = Schema.decodeUnknownOption(TaskObject);
631
- const tasksIn$1 = (program) => pipe(nestedValues(RUN_TASKS)(program), Array$1.flatMap((tasks) => pipe(decodeTaskObject(tasks), Option.map(({ properties }) => properties), Option.getOrElse(() => []))), Array$1.flatMap((property) => Option.toArray(decodeTaskProperty(property))));
631
+ const runTasksIn = (program) => pipe(nestedValues(RUN_TASKS)(program), Array$1.flatMap((tasks) => pipe(decodeTaskObject(tasks), Option.map(({ properties }) => properties), Option.getOrElse(() => []))), Array$1.flatMap((property) => Option.toArray(decodeTaskProperty(property))));
632
632
  const runTasksOf = Effect.fn("runTasksOf")(function* runTasksOf(root, directory) {
633
633
  const config = yield* workspaceConfigOf(root, directory);
634
634
  return pipe(config, Option.map(({ file, source, program }) => ({
635
635
  file,
636
636
  source,
637
- tasks: tasksIn$1(program)
637
+ tasks: runTasksIn(program)
638
638
  })));
639
639
  });
640
640
  // src/entities/workspace/model/cargo-crates.ts
641
- const SEPARATOR$26 = "/";
641
+ const SEPARATOR$27 = "/";
642
642
  const SUCCESS$7 = 0;
643
643
  const CrateTarget = Schema.Struct({ kind: Schema.Array(Schema.String) });
644
644
  const CrateDependency = Schema.Struct({ path: Schema.optional(Schema.String) });
@@ -678,7 +678,7 @@ const cratesIn = Effect.fn("cratesIn")(function* cratesIn(root) {
678
678
  }, Effect.scoped);
679
679
  /** @internal */
680
680
  const owningWorkspace = (directories) => (directory) => {
681
- const owners = pipe(directories, Array$1.filter((workspace) => directory === workspace || String$1.startsWith(`${workspace}${SEPARATOR$26}`)(directory)));
681
+ const owners = pipe(directories, Array$1.filter((workspace) => directory === workspace || String$1.startsWith(`${workspace}${SEPARATOR$27}`)(directory)));
682
682
  return Array$1.last(Array$1.sort(owners, String$1.Order));
683
683
  };
684
684
  // src/entities/workspace/model/plugins.ts
@@ -686,7 +686,7 @@ const PLUGIN_FILE$4 = ".claude-plugin/plugin.json";
686
686
  const SKILLS_DIRECTORY = "skills";
687
687
  const SKILL_FILE$4 = "SKILL.md";
688
688
  const CONCURRENCY$4 = 16;
689
- const SEPARATOR$25 = "/";
689
+ const SEPARATOR$26 = "/";
690
690
  const PluginManifest$1 = Schema.fromJsonString(Schema.Struct({
691
691
  name: Schema.String,
692
692
  description: Schema.optionalKey(Schema.String),
@@ -702,7 +702,7 @@ const skillIn = Effect.fn("skillIn")(function* skillIn(scan, { plugin, skills },
702
702
  const directory = files.join(skills, name);
703
703
  const file = files.join(directory, SKILL_FILE$4);
704
704
  const source = yield* files.readFile(file);
705
- const prefix = `${files.relative(scan.root, directory)}${SEPARATOR$25}`;
705
+ const prefix = `${files.relative(scan.root, directory)}${SEPARATOR$26}`;
706
706
  const inside = pipe(scan.listed, Array$1.filter(String$1.startsWith(prefix)), Array$1.map((entry) => files.join(scan.root, entry)));
707
707
  return pipe(source, Option.flatMap((text) => pipe(splitFrontmatter(text), Option.map((frontmatter) => ({
708
708
  plugin,
@@ -715,7 +715,7 @@ const skillIn = Effect.fn("skillIn")(function* skillIn(scan, { plugin, skills },
715
715
  })))));
716
716
  });
717
717
  const filesUnder = Effect.fn("filesUnder")(function* filesUnder(scan, directory) {
718
- const prefix = `${(yield* RepositoryFiles).relative(scan.root, directory)}${SEPARATOR$25}`;
718
+ const prefix = `${(yield* RepositoryFiles).relative(scan.root, directory)}${SEPARATOR$26}`;
719
719
  return pipe(scan.listed, Array$1.filter(String$1.startsWith(prefix)), Array$1.map(String$1.slice(prefix.length)));
720
720
  });
721
721
  const skillsOf$1 = Effect.fn("skillsOf")(function* skillsOf(scan, plugin, directory) {
@@ -908,7 +908,7 @@ const judge$1 = (baseline) => (key, candidate) => {
908
908
  };
909
909
  const BASELINE_PROBE = "msch-baseline-probe";
910
910
  const REMOVED_DEPENDENCY = "-";
911
- const QUOTES$2 = ["\"", "'"];
911
+ const QUOTES$1 = ["\"", "'"];
912
912
  const PREVIOUS = 1;
913
913
  const workspaceOverrides = Effect.fn("workspaceOverrides")(function* workspaceOverrides(root) {
914
914
  const manifest = yield* workspaceManifest(root);
@@ -916,7 +916,7 @@ const workspaceOverrides = Effect.fn("workspaceOverrides")(function* workspaceOv
916
916
  });
917
917
  const keyStart = (source) => (index) => {
918
918
  const before = String$1.slice(index - PREVIOUS, index)(source);
919
- return index - Number(Array$1.contains(QUOTES$2, before)) * PREVIOUS;
919
+ return index - Number(Array$1.contains(QUOTES$1, before)) * PREVIOUS;
920
920
  };
921
921
  const overrideKeysOf = (source) => (overrides) => {
922
922
  const at = positionOf(source);
@@ -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$40 = 64;
1063
+ const READ_CONCURRENCY$41 = 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,56 +1083,56 @@ 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$40 });
1086
+ }))), { concurrency: READ_CONCURRENCY$41 });
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$75 = "git-subpath-dependency";
1092
+ const RULE$76 = "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$75,
1097
+ rule: RULE$76,
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
- const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$5(entry, source)));
1100
+ const problemsIn$24 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$5(entry, source)));
1101
1101
  const isDependencyFile = ({ name }) => DEPENDENCY_FILE.test(name);
1102
1102
  /** @internal */
1103
1103
  const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(root) {
1104
1104
  const listed = yield* listedFiles(root);
1105
- return yield* scanText(pipe(listed, Array$1.filter(isDependencyFile)), problemsIn$23);
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$74 = "unnamed-restriction";
1108
+ const RULE$75 = "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
- const problemsIn$22 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(UNNAMED)(source)), Array$1.map((found) => ({
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$74,
1114
+ rule: RULE$75,
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 */
1118
1118
  const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRestrictedRules(root) {
1119
1119
  const listed = yield* listedFiles(root);
1120
- return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$22);
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$73 = "named-type-exemption";
1123
+ const RULE$74 = "named-type-exemption";
1124
1124
  const WHOLE_MATCH$2 = 0;
1125
1125
  const SPECIFIER = new RegExp(`["']?\\bfrom["']?\\s*:\\s*["'](?:file|lib|package)["']`, "gu");
1126
- const problemsIn$21 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(SPECIFIER)(source)), Array$1.map((found) => ({
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$73,
1129
+ rule: RULE$74,
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 */
1133
1133
  const checkTypeExemptions = Effect.fn("checkTypeExemptions")(function* checkTypeExemptions(root) {
1134
1134
  const listed = yield* listedFiles(root);
1135
- return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$21);
1135
+ return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$22);
1136
1136
  });
1137
1137
  // src/shared/lib/registries.ts
1138
1138
  const TRAILING_SLASH$1 = /\/*$/u;
@@ -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$72 = "package-registry";
1145
+ const RULE$73 = "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$72,
1159
+ rule: RULE$73,
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$72,
1168
+ rule: RULE$73,
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$71 = "removed-peer";
3353
+ const RULE$72 = "removed-peer";
3354
3354
  const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
3355
3355
  const REMOVED = "-";
3356
3356
  const PARENT_SEPARATOR = ">";
@@ -3377,7 +3377,7 @@ const problemAt$4 = (file, { key, line, column }) => ({ peer, dependent }) => ({
3377
3377
  file,
3378
3378
  line,
3379
3379
  column,
3380
- rule: RULE$71,
3380
+ rule: RULE$72,
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));
@@ -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$70 = "colocated-git-patterns";
3414
+ const RULE$71 = "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$39 = 16;
3425
+ const READ_CONCURRENCY$40 = 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$70)(entry.file, {
3461
+ const patternProblem = (entry, message) => problemAtPosition(RULE$71)(entry.file, {
3462
3462
  line: entry.line,
3463
3463
  column: FIRST$26
3464
3464
  }, message);
@@ -3513,19 +3513,19 @@ 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$39 });
3516
+ const read = yield* Effect.forEach(patternFiles, (file) => entriesIn$2(root, file), { concurrency: READ_CONCURRENCY$40 });
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$39 });
3519
+ const misplacedFound = yield* Effect.forEach(entries, (entry) => misplaced(root, workspaces, entry), { concurrency: READ_CONCURRENCY$40 });
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$69 = "colocated-test";
3524
+ const RULE$70 = "colocated-test";
3525
3525
  const FIRST$25 = 1;
3526
- const READ_CONCURRENCY$38 = 64;
3526
+ const READ_CONCURRENCY$39 = 64;
3527
3527
  const ROOT_SUBPATH$2 = ".";
3528
- const NAME_GROUP$1 = "name";
3528
+ const NAME_GROUP$2 = "name";
3529
3529
  const SPECIFIER_GROUP = "specifier";
3530
3530
  const SCRIPT$1 = /\.[cm]?[jt]sx?$/u;
3531
3531
  const TEST_FILE$4 = /\.test\.[cm]?[jt]sx?$/u;
@@ -3544,11 +3544,11 @@ const problemFor$10 = (test, message) => ({
3544
3544
  file: test.file,
3545
3545
  line: FIRST$25,
3546
3546
  column: FIRST$25,
3547
- rule: RULE$69,
3547
+ rule: RULE$70,
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);
3551
- const namesSibling = (source) => pipe([...groupsOf$1(source, RELATIVE_REFERENCE, NAME_GROUP$1), ...groupsOf$1(source, DIRNAME_REFERENCE, NAME_GROUP$1)], Array$1.some((name) => !TEST_FILE$4.test(name)));
3551
+ const namesSibling = (source) => pipe([...groupsOf$1(source, RELATIVE_REFERENCE, NAME_GROUP$2), ...groupsOf$1(source, DIRNAME_REFERENCE, NAME_GROUP$2)], Array$1.some((name) => !TEST_FILE$4.test(name)));
3552
3552
  const ownerOf$5 = (packages, name) => {
3553
3553
  const owners = pipe(packages, Array$1.filter((directory) => String$1.startsWith(directory)(name)));
3554
3554
  return Array$1.last(Array$1.sort(owners, byLength$2));
@@ -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$38 });
3610
+ const found = yield* Effect.forEach(tests, (test) => problemIn$8(context, test), { concurrency: READ_CONCURRENCY$39 });
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$37 = 16;
3615
+ const READ_CONCURRENCY$38 = 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$37 });
3624
+ }, { concurrency: READ_CONCURRENCY$38 });
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$68 = "agent-docs-length";
3630
+ const RULE$69 = "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$68,
3638
+ rule: RULE$69,
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$67 = "claude-md-link";
3645
+ const RULE$68 = "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$36 = 16;
3649
+ const READ_CONCURRENCY$37 = 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,20 +3661,20 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3661
3661
  file: path,
3662
3662
  line: FIRST$23,
3663
3663
  column: FIRST$23,
3664
- rule: RULE$67,
3664
+ rule: RULE$68,
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$36 });
3669
+ const found = yield* Effect.forEach(claude, problemOf, { concurrency: READ_CONCURRENCY$37 });
3670
3670
  return Array$1.getSomes(found);
3671
3671
  });
3672
3672
  // src/features/check-placement/model/dangling-links.ts
3673
- const RULE$66 = "dangling-link";
3674
- const SEPARATOR$24 = "/";
3673
+ const RULE$67 = "dangling-link";
3674
+ const SEPARATOR$25 = "/";
3675
3675
  const FIRST$22 = 1;
3676
- const READ_CONCURRENCY$35 = 16;
3677
- const holds = (target) => (name) => name === target || String$1.startsWith(`${target}${SEPARATOR$24}`)(name);
3676
+ const READ_CONCURRENCY$36 = 16;
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) {
3680
3680
  const files = yield* RepositoryFiles;
@@ -3686,17 +3686,17 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
3686
3686
  file,
3687
3687
  line: FIRST$22,
3688
3688
  column: FIRST$22,
3689
- rule: RULE$66,
3689
+ rule: RULE$67,
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$35 });
3693
+ const found = yield* Effect.forEach(links, problemOf, { concurrency: READ_CONCURRENCY$36 });
3694
3694
  return Array$1.getSomes(found);
3695
3695
  });
3696
3696
  // src/features/check-placement/model/member-sources.ts
3697
3697
  const ROOT_WORKSPACE$1 = ".";
3698
3698
  const FIRST$21 = 1;
3699
- const SEPARATOR$23 = "/";
3699
+ const SEPARATOR$24 = "/";
3700
3700
  const EXCLUDED$7 = [
3701
3701
  ":(exclude,attr:linguist-vendored)",
3702
3702
  ":(exclude,attr:linguist-generated)",
@@ -3721,7 +3721,7 @@ const fileProblem$1 = ({ file, rule, message }) => ({
3721
3721
  rule,
3722
3722
  message
3723
3723
  });
3724
- const ownerOf$4 = (workspaces) => (name) => pipe(workspaces, Array$1.filter((workspace) => String$1.startsWith(`${workspace}${SEPARATOR$23}`)(name)), (owners) => Array$1.last(Array$1.sort(owners, byLength$1)), Option.map((workspace) => ({
3724
+ const ownerOf$4 = (workspaces) => (name) => pipe(workspaces, Array$1.filter((workspace) => String$1.startsWith(`${workspace}${SEPARATOR$24}`)(name)), (owners) => Array$1.last(Array$1.sort(owners, byLength$1)), Option.map((workspace) => ({
3725
3725
  workspace,
3726
3726
  inner: String$1.slice(workspace.length + 1)(name)
3727
3727
  })));
@@ -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$65 = "deployed-readme";
3747
+ const RULE$66 = "deployed-readme";
3748
3748
  const ROOT_DIRECTORY$4 = "";
3749
- const READ_CONCURRENCY$34 = 16;
3749
+ const READ_CONCURRENCY$35 = 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$65,
3787
+ rule: RULE$66,
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$65,
3794
+ rule: RULE$66,
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$34 });
3805
+ const deploying = yield* Effect.filter(candidates, (file) => deploysTo(root, file), { concurrency: READ_CONCURRENCY$35 });
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$34 });
3807
+ const found = yield* Effect.forEach(owners, (directory) => problemIn$7(root, directory), { concurrency: READ_CONCURRENCY$35 });
3808
3808
  return Array$1.getSomes(found);
3809
3809
  });
3810
3810
  // src/features/check-placement/model/nested-docs.ts
3811
- const RULE$64 = "nested-docs";
3811
+ const RULE$65 = "nested-docs";
3812
3812
  const CONFIG_FILE$9 = "vite.config.ts";
3813
- const SEPARATOR$22 = "/";
3814
- const READ_CONCURRENCY$33 = 64;
3813
+ const SEPARATOR$23 = "/";
3814
+ const READ_CONCURRENCY$34 = 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;
@@ -3820,8 +3820,8 @@ const MISSING_RULE = "workspace-agents-md";
3820
3820
  const RootConfig$1 = Schema.Struct({ msch: Schema.Struct({ workspaceAgentsMd: Schema.Literal(true) }) });
3821
3821
  const taggedError$13 = Schema.TaggedError;
3822
3822
  var RootConfigUnreadable = class extends taggedError$13()("RootConfigUnreadable", { file: Schema.String }) {};
3823
- const isNested = (name) => String$1.includes(SEPARATOR$22)(name);
3824
- const problemFor$8 = problemInFile(RULE$64);
3823
+ const isNested = (name) => String$1.includes(SEPARATOR$23)(name);
3824
+ const problemFor$8 = problemInFile(RULE$65);
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$33 });
3871
+ const found = yield* Effect.forEach(nested, (name) => problemIn$6(root, allowed, name), { concurrency: READ_CONCURRENCY$34 });
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$63 = "published-readme";
3882
- const READ_CONCURRENCY$32 = 16;
3881
+ const RULE$64 = "published-readme";
3882
+ const READ_CONCURRENCY$33 = 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$63,
3889
+ rule: RULE$64,
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$63,
3900
+ rule: RULE$64,
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$32 });
3909
+ const found = yield* Effect.forEach(projects, (project) => problemIn$5(root, project), { concurrency: READ_CONCURRENCY$33 });
3910
3910
  return Array$1.getSomes(found);
3911
3911
  });
3912
3912
  // src/features/check-placement/model/published-tests.ts
3913
- const RULE$62 = "published-tests";
3913
+ const RULE$63 = "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$62,
3927
+ rule: RULE$63,
3928
3928
  message: MESSAGE$12
3929
3929
  });
3930
3930
  });
@@ -3938,13 +3938,13 @@ 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$61 = "root-docs";
3942
- const SEPARATOR$21 = "/";
3941
+ const RULE$62 = "root-docs";
3942
+ const SEPARATOR$22 = "/";
3943
3943
  const FIRST$20 = 1;
3944
3944
  const MARKDOWN$6 = /\.(?:md|mdx|markdown)$/iu;
3945
3945
  const ALLOWED$1 = /^(?:README(?:\.[^/]+)?|AGENTS|CLAUDE|ARCHITECTURE|DESIGN|CHANGELOG|LICENSE|NOTICE)\.(?:md|mdx|markdown)$/iu;
3946
3946
  const MESSAGE$11 = "is a hand-written document outside the places documents belong. Hand-written text goes only in the root README.md, AGENTS.md, CLAUDE.md, ARCHITECTURE.md and DESIGN.md, and under docs/. Move what is still true and not already told by the code into one of them, and delete this file.";
3947
- const isStrayRootDoc = (name) => !String$1.includes(SEPARATOR$21)(name) && MARKDOWN$6.test(name) && !ALLOWED$1.test(name);
3947
+ const isStrayRootDoc = (name) => !String$1.includes(SEPARATOR$22)(name) && MARKDOWN$6.test(name) && !ALLOWED$1.test(name);
3948
3948
  /** @internal */
3949
3949
  const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
3950
3950
  const files = yield* RepositoryFiles;
@@ -3953,17 +3953,17 @@ 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$61,
3956
+ rule: RULE$62,
3957
3957
  message: `${name} ${MESSAGE$11}`
3958
3958
  })));
3959
3959
  });
3960
3960
  // src/features/check-placement/model/root-readme.ts
3961
- const RULE$60 = "root-readme";
3961
+ const RULE$61 = "root-readme";
3962
3962
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
3963
- const READ_CONCURRENCY$31 = 16;
3963
+ const READ_CONCURRENCY$32 = 16;
3964
3964
  const START$31 = 0;
3965
3965
  const MARKETPLACE = ".claude-plugin/marketplace.json";
3966
- const RELATIVE$2 = /^\.\//u;
3966
+ const RELATIVE$3 = /^\.\//u;
3967
3967
  const MarketplacePlugin = Schema.Struct({
3968
3968
  name: Schema.optional(Schema.String),
3969
3969
  source: Schema.Unknown
@@ -3976,7 +3976,7 @@ const NO_PLUGINS = {
3976
3976
  const isCheckPolicy = ({ packageName }) => Option.contains(packageName, SELF_NAME);
3977
3977
  const messageFor$4 = (directory) => `names the workspace ${directory}. The root README, AGENTS.md and CLAUDE.md describe the repository as a whole. Write what belongs to the workspace in ${directory}/README.md, or for agents in ${directory}/AGENTS.md.`;
3978
3978
  const pluginsOf = (plugins) => {
3979
- const directories = pipe(plugins, Array$1.map(({ source }) => source), Array$1.filter(Predicate.isString), Array$1.map(String$1.replace(RELATIVE$2, "")));
3979
+ const directories = pipe(plugins, Array$1.map(({ source }) => source), Array$1.filter(Predicate.isString), Array$1.map(String$1.replace(RELATIVE$3, "")));
3980
3980
  const segments = pipe(directories, Array$1.map(baseName$1));
3981
3981
  return {
3982
3982
  directories,
@@ -3997,17 +3997,17 @@ const patternFor = (plugins) => ({ directory, names }) => patternOf$1(Option.mat
3997
3997
  onNone: () => ownNames(plugins, names),
3998
3998
  onSome: () => [directory]
3999
3999
  }));
4000
- const problemsIn$20 = (file, source, plugins) => (workspace) => {
4000
+ 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$60)(file, at(found.index ?? START$31), message)));
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)));
4005
4005
  };
4006
4006
  const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces, plugins) {
4007
4007
  const text = yield* (yield* RepositoryFiles).readFile(file);
4008
4008
  return pipe(text, Option.match({
4009
4009
  onNone: () => [],
4010
- onSome: (source) => pipe(workspaces, Array$1.flatMap(problemsIn$20(file, source, plugins)))
4010
+ onSome: (source) => pipe(workspaces, Array$1.flatMap(problemsIn$21(file, source, plugins)))
4011
4011
  }));
4012
4012
  });
4013
4013
  /** @internal */
@@ -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$31 });
4021
+ const found = yield* Effect.forEach(readmes, (name) => problemsInReadme(files.join(root, name), workspaces, plugins), { concurrency: READ_CONCURRENCY$32 });
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$59 = "docs-mirror";
4041
+ const RULE$60 = "docs-mirror";
4042
4042
  const DOC = /(?:^|\/)(?:README|AGENTS|ARCHITECTURE|CLAUDE|SKILL)\.md$/u;
4043
4043
  const MIRROR_LIMIT = 3;
4044
- const READ_CONCURRENCY$30 = 16;
4044
+ const READ_CONCURRENCY$31 = 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$59,
4066
+ rule: RULE$60,
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$30 });
4081
+ }))), { concurrency: READ_CONCURRENCY$31 });
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$30 });
4094
+ }, { concurrency: READ_CONCURRENCY$31 });
4095
4095
  return Array$1.flatten(found);
4096
4096
  });
4097
4097
  // src/features/check-placement/model/ignored-sources.ts
4098
- const RULE$58 = "ignored-sources";
4098
+ const RULE$59 = "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$58,
4110
+ rule: RULE$59,
4111
4111
  message: MESSAGE$10
4112
4112
  })));
4113
4113
  });
@@ -12688,7 +12688,7 @@ var english_verbs_default = [
12688
12688
  const SLICE_RULE$1 = "feature-slice-name";
12689
12689
  const ENTRY_RULE$2 = "deploy-entry-name";
12690
12690
  const SEGMENT_RULE = "slice-segment-name";
12691
- const SEPARATOR$19 = "/";
12691
+ const SEPARATOR$20 = "/";
12692
12692
  const NEXT$3 = 1;
12693
12693
  const WORD_SEPARATOR$1 = "-";
12694
12694
  const MINIMUM_WORDS = 2;
@@ -12714,7 +12714,7 @@ const isVerbObjectBy = (separator) => (slice) => {
12714
12714
  return words.length >= MINIMUM_WORDS && Option.exists(Array$1.head(words), (word) => VERBS.has(word));
12715
12715
  };
12716
12716
  const isVerbObject = isVerbObjectBy(WORD_SEPARATOR$1);
12717
- const misnamedSlice$1 = ({ workspace, inner }) => pipe(Option.liftPredicate(inner, (path) => String$1.startsWith(FEATURES$1)(path) && SCRIPT.test(path)), Option.flatMap((path) => Array$1.head(String$1.split(String$1.slice(13)(path), SEPARATOR$19))), Option.filter((slice) => !isVerbObject(slice)), Option.map((slice) => `${workspace}${SEPARATOR$19}${FEATURES$1}${slice}`));
12717
+ const misnamedSlice$1 = ({ workspace, inner }) => pipe(Option.liftPredicate(inner, (path) => String$1.startsWith(FEATURES$1)(path) && SCRIPT.test(path)), Option.flatMap((path) => Array$1.head(String$1.split(String$1.slice(13)(path), SEPARATOR$20))), Option.filter((slice) => !isVerbObject(slice)), Option.map((slice) => `${workspace}${SEPARATOR$20}${FEATURES$1}${slice}`));
12718
12718
  const SLICE_LAYERS = [
12719
12719
  "features",
12720
12720
  "entities",
@@ -12722,26 +12722,26 @@ const SLICE_LAYERS = [
12722
12722
  "pages"
12723
12723
  ];
12724
12724
  const SLICE_DEPTHS = [3, 4];
12725
- const pathPrefix = (parts, depth) => Array$1.join(Array$1.take(parts, depth), SEPARATOR$19);
12725
+ const pathPrefix = (parts, depth) => Array$1.join(Array$1.take(parts, depth), SEPARATOR$20);
12726
12726
  const isInSliceLayer = (parts) => {
12727
12727
  const [source, layer] = parts;
12728
- return `${source}${SEPARATOR$19}` === SOURCE$2 && Array$1.contains(SLICE_LAYERS, layer ?? "");
12728
+ return `${source}${SEPARATOR$20}` === SOURCE$2 && Array$1.contains(SLICE_LAYERS, layer ?? "");
12729
12729
  };
12730
12730
  const indexedSlice = (owned) => {
12731
- const parts = String$1.split(owned.inner, SEPARATOR$19);
12731
+ const parts = String$1.split(owned.inner, SEPARATOR$20);
12732
12732
  const depth = parts.length - NEXT$3;
12733
- return pipe(Option.liftPredicate(depth, () => isInSliceLayer(parts) && INDEX.test(owned.inner) && Array$1.contains(SLICE_DEPTHS, depth)), Option.map(() => `${owned.workspace}${SEPARATOR$19}${pathPrefix(parts, depth)}`));
12733
+ return pipe(Option.liftPredicate(depth, () => isInSliceLayer(parts) && INDEX.test(owned.inner) && Array$1.contains(SLICE_DEPTHS, depth)), Option.map(() => `${owned.workspace}${SEPARATOR$20}${pathPrefix(parts, depth)}`));
12734
12734
  };
12735
12735
  const misnamedSegment = (slices) => ({ workspace, inner }) => {
12736
- const parts = String$1.split(inner, SEPARATOR$19);
12737
- const insideSlice = (depth) => slices.has(`${workspace}${SEPARATOR$19}${pathPrefix(parts, depth)}`);
12736
+ const parts = String$1.split(inner, SEPARATOR$20);
12737
+ const insideSlice = (depth) => slices.has(`${workspace}${SEPARATOR$20}${pathPrefix(parts, depth)}`);
12738
12738
  const isSegmentFolder = (depth) => parts.length > depth + NEXT$3 && SCRIPT.test(inner) && !SEGMENTS.has(parts[depth] ?? "");
12739
- return pipe(SLICE_DEPTHS, Array$1.findFirst(insideSlice), Option.filter(isSegmentFolder), Option.map((depth) => `${workspace}${SEPARATOR$19}${pathPrefix(parts, depth + NEXT$3)}`));
12739
+ return pipe(SLICE_DEPTHS, Array$1.findFirst(insideSlice), Option.filter(isSegmentFolder), Option.map((depth) => `${workspace}${SEPARATOR$20}${pathPrefix(parts, depth + NEXT$3)}`));
12740
12740
  };
12741
12741
  const deployNamed = ({ workspace, inner }) => {
12742
12742
  if (!String$1.startsWith(SOURCE$2)(inner)) return Option.none();
12743
- const segments = String$1.split(inner, SEPARATOR$19);
12744
- return pipe(Array$1.findFirstIndex(segments, (segment) => DEPLOY_MARKER.test(segment)), Option.map((index) => `${workspace}${SEPARATOR$19}${Array$1.join(Array$1.take(segments, index + NEXT$3), SEPARATOR$19)}`));
12743
+ const segments = String$1.split(inner, SEPARATOR$20);
12744
+ return pipe(Array$1.findFirstIndex(segments, (segment) => DEPLOY_MARKER.test(segment)), Option.map((index) => `${workspace}${SEPARATOR$20}${Array$1.join(Array$1.take(segments, index + NEXT$3), SEPARATOR$20)}`));
12745
12745
  };
12746
12746
  /** @internal */
12747
12747
  const checkSourceNames = Effect.fn("checkSourceNames")(function* checkSourceNames(root) {
@@ -12784,7 +12784,7 @@ const LAYER_ITEMS = [
12784
12784
  "attribute_item",
12785
12785
  "inner_attribute_item"
12786
12786
  ];
12787
- const READ_CONCURRENCY$29 = 64;
12787
+ const READ_CONCURRENCY$30 = 64;
12788
12788
  const EXCLUDED$6 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
12789
12789
  const NONE$4 = [];
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.";
@@ -12860,17 +12860,17 @@ const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModule
12860
12860
  if (!Array$1.isReadonlyArrayNonEmpty(sources)) return NONE$4;
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$29 });
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 });
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$57 = "shadcn-ui-alias";
12867
+ const RULE$58 = "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$57,
12873
+ rule: RULE$58,
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 */
@@ -12932,9 +12932,9 @@ const CODE_IN_BIN = "code-in-bin";
12932
12932
  const BIN = "bin";
12933
12933
  const SCRIPTS_DIRECTORY = "scripts";
12934
12934
  const WORKFLOW_DIRECTORY = ".github/";
12935
- const SEPARATOR$18 = "/";
12935
+ const SEPARATOR$19 = "/";
12936
12936
  const CURRENT = "./";
12937
- const READ_CONCURRENCY$28 = 8;
12937
+ const READ_CONCURRENCY$29 = 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;
@@ -12950,7 +12950,7 @@ const runsIn = ({ text, start }) => pipe(Array$1.fromIterable(String$1.matchAll(
12950
12950
  start
12951
12951
  })), Option.toArray)));
12952
12952
  const targetPaths = (held) => pipe(targetsIn(held), Array$1.map(withoutCurrent));
12953
- const entriesOf = (manifest) => {
12953
+ const entriesOf$1 = (manifest) => {
12954
12954
  const bins = targetPaths(manifest.bin);
12955
12955
  return {
12956
12956
  all: [
@@ -12964,22 +12964,22 @@ const entriesOf = (manifest) => {
12964
12964
  const declaredEntries = Effect.fn("declaredEntries")(function* declaredEntries(root, directory) {
12965
12965
  const files = yield* RepositoryFiles;
12966
12966
  const manifest = yield* readManifest(files.join(root, directory));
12967
- return pipe(manifest, Option.map(entriesOf), Option.getOrElse(() => NO_ENTRIES));
12967
+ return pipe(manifest, Option.map(entriesOf$1), Option.getOrElse(() => NO_ENTRIES));
12968
12968
  });
12969
12969
  const isCommand = (path) => COMMAND$1.test(path) && !NOT_COMMAND.test(path);
12970
12970
  const commandFilesIn$1 = Effect.fn("commandFilesIn")(function* commandFilesIn(root, directory) {
12971
12971
  const files = yield* RepositoryFiles;
12972
12972
  const names = yield* files.readDirectory(files.join(root, directory, BIN));
12973
- return pipe(names, Array$1.map((name) => `${BIN}${SEPARATOR$18}${name}`), Array$1.filter(isCommand));
12973
+ return pipe(names, Array$1.map((name) => `${BIN}${SEPARATOR$19}${name}`), Array$1.filter(isCommand));
12974
12974
  });
12975
12975
  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$28 });
12979
+ const texts = yield* Effect.forEach(workflows, (file) => files.readFile(files.join(root, file)), { concurrency: READ_CONCURRENCY$29 });
12980
12980
  return pipe(Array$1.getSomes(texts), Array$1.join("\n"));
12981
12981
  });
12982
- const workspacePath = (directory, path) => pipe([directory, path], Array$1.filter(String$1.isNonEmpty), Array$1.join(SEPARATOR$18));
12982
+ const workspacePath = (directory, path) => pipe([directory, path], Array$1.filter(String$1.isNonEmpty), Array$1.join(SEPARATOR$19));
12983
12983
  const outsideProblems = ({ file, source, runs, entries }) => pipe(runs, Array$1.filter(({ path }) => !COMMAND$1.test(path) && !Array$1.contains(entries.all, path)), Array$1.map(({ path, start }) => ({
12984
12984
  file,
12985
12985
  ...positionOf(source)(start),
@@ -12987,7 +12987,7 @@ const outsideProblems = ({ file, source, runs, entries }) => pipe(runs, Array$1.
12987
12987
  message: `A task runs ${path}. Put each file that a task runs at ${BIN}/<name>.ts, the one place where every workspace keeps its commands, so that fallow and the other tools find it without a list of files.`
12988
12988
  })));
12989
12989
  const runsOf = (program) => pipe(nestedValues(RUN_TASKS)(program), Array$1.flatMap(stringsIn), Array$1.flatMap(runsIn));
12990
- const problemsIn$19 = Effect.fn("problemsIn")(function* problemsIn(root, directory, workflows) {
12990
+ const problemsIn$20 = Effect.fn("problemsIn")(function* problemsIn(root, directory, workflows) {
12991
12991
  const files = yield* RepositoryFiles;
12992
12992
  const config = yield* workspaceConfigOf(root, directory);
12993
12993
  const entries = yield* declaredEntries(root, directory);
@@ -13026,8 +13026,8 @@ const isCommandFile = (path) => isCommand(path) || COMMAND_FILE$1.test(path) &&
13026
13026
  const codeInBinProblems = Effect.fn("codeInBinProblems")(function* codeInBinProblems(root, directory) {
13027
13027
  const files = yield* RepositoryFiles;
13028
13028
  const listed = yield* files.listedFiles(root);
13029
- const prefix = workspacePath(directory, `${BIN}${SEPARATOR$18}`);
13030
- return pipe(listed, Array$1.filter(String$1.startsWith(prefix)), Array$1.filter((file) => !isCommandFile(`${BIN}${SEPARATOR$18}${String$1.slice(prefix.length)(file)}`)), Array$1.map((file) => ({
13029
+ const prefix = workspacePath(directory, `${BIN}${SEPARATOR$19}`);
13030
+ return pipe(listed, Array$1.filter(String$1.startsWith(prefix)), Array$1.filter((file) => !isCommandFile(`${BIN}${SEPARATOR$19}${String$1.slice(prefix.length)(file)}`)), Array$1.map((file) => ({
13031
13031
  file: files.join(root, file),
13032
13032
  line: FIRST$17,
13033
13033
  column: FIRST$17,
@@ -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$19(root, directory, workflows), { concurrency: READ_CONCURRENCY$28 });
13043
- const scripts = yield* Effect.forEach(all, (directory) => scriptsProblem(root, directory), { concurrency: READ_CONCURRENCY$28 });
13044
- const code = yield* Effect.forEach(all, (directory) => codeInBinProblems(root, directory), { concurrency: READ_CONCURRENCY$28 });
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 });
13045
13045
  return [
13046
13046
  ...Array$1.flatten(found),
13047
13047
  ...Array$1.getSomes(scripts),
@@ -13050,12 +13050,12 @@ const checkCommandEntries = Effect.fn("checkCommandEntries")(function* checkComm
13050
13050
  });
13051
13051
  // src/features/check-repository-layout/model/path-mention.ts
13052
13052
  const START$30 = 0;
13053
- const QUOTES$1 = ["\"", "'"];
13053
+ const QUOTES = ["\"", "'"];
13054
13054
  const firstIndex = (source, needles) => {
13055
13055
  const found = pipe(needles, Array$1.flatMap((needle) => Option.toArray(String$1.indexOf(needle)(source))));
13056
13056
  return Array$1.head(Array$1.sort(found, Order.Number));
13057
13057
  };
13058
- const quoted = (text) => pipe(QUOTES$1, Array$1.map((quote) => `${quote}${text}${quote}`));
13058
+ const quoted = (text) => pipe(QUOTES, Array$1.map((quote) => `${quote}${text}${quote}`));
13059
13059
  const indexOfText = (source) => (text) => pipe(firstIndex(source, quoted(text)), Option.orElse(() => firstIndex(source, [text])), Option.getOrElse(() => START$30));
13060
13060
  // src/features/check-repository-layout/model/cargo-paths.ts
13061
13061
  const MEMBER_LISTS = [
@@ -13103,15 +13103,15 @@ const cargoMentions = (source) => pipe(Option.liftThrowable(() => getStaticTOMLV
13103
13103
  // src/features/check-repository-layout/model/tsconfig-paths.ts
13104
13104
  const WRAP_OFFSET$2 = 1;
13105
13105
  const WILDCARD$3 = /[*?[{]/u;
13106
- const SEPARATOR$17 = "/";
13107
- const RELATIVE$1 = ".";
13106
+ const SEPARATOR$18 = "/";
13107
+ const RELATIVE$2 = ".";
13108
13108
  const JSON_EXTENSION = ".json";
13109
13109
  const isObject = (node) => Predicate.isReadonlyObject(node) && node["type"] === "ObjectExpression";
13110
13110
  const firstObject = (node) => {
13111
13111
  if (isObject(node)) return Option.some(node);
13112
13112
  return pipe(childrenOf$4(node), Array$1.findFirst(firstObject));
13113
13113
  };
13114
- const leadingDirectory = (pattern) => pipe(String$1.split(pattern, SEPARATOR$17), Array$1.takeWhile((segment) => !WILDCARD$3.test(segment)), Array$1.join(SEPARATOR$17));
13114
+ const leadingDirectory = (pattern) => pipe(String$1.split(pattern, SEPARATOR$18), Array$1.takeWhile((segment) => !WILDCARD$3.test(segment)), Array$1.join(SEPARATOR$18));
13115
13115
  const listed$2 = (root) => (name, candidatesOf, valuesOf = stringsIn) => pipe(propertyValue(name)(root), Option.toArray, Array$1.flatMap(valuesOf), Array$1.map(({ text, start }) => ({
13116
13116
  field: name,
13117
13117
  text,
@@ -13122,7 +13122,7 @@ const objectsIn = (node) => [...Array$1.filter([node], isObject), ...pipe(childr
13122
13122
  const referencedPaths = (references) => pipe(objectsIn(references), Array$1.flatMap((reference) => Option.toArray(propertyValue("path")(reference))), Array$1.flatMap(stringsIn));
13123
13123
  const exactly = (text) => [text];
13124
13124
  const relativeConfig = (text) => {
13125
- if (String$1.startsWith(RELATIVE$1)(text)) return [text, `${text}${JSON_EXTENSION}`];
13125
+ if (String$1.startsWith(RELATIVE$2)(text)) return [text, `${text}${JSON_EXTENSION}`];
13126
13126
  return [];
13127
13127
  };
13128
13128
  const patternRoot = (text) => pipe([leadingDirectory(text)], Array$1.filter(String$1.isNonEmpty));
@@ -13138,39 +13138,39 @@ 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$56 = "config-path";
13141
+ const RULE$57 = "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$27 = 8;
13146
+ const READ_CONCURRENCY$28 = 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$27 });
13151
+ const present = yield* Effect.forEach(relatives, (relative) => existsAt(root, relative), { concurrency: READ_CONCURRENCY$28 });
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$27 });
13153
+ const ignored = yield* Effect.forEach(relatives, (relative) => isIgnored(root, relative), { concurrency: READ_CONCURRENCY$28 });
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$56,
13160
+ rule: RULE$57,
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) {
13164
13164
  if (CARGO_MANIFEST.test(file)) return cargoMentions(source);
13165
13165
  return yield* tsconfigMentions(file, source);
13166
13166
  });
13167
- const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(root, name) {
13167
+ const problemsIn$19 = Effect.fn("problemsIn")(function* problemsIn(root, name) {
13168
13168
  const files = yield* RepositoryFiles;
13169
13169
  const file = files.join(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$27 });
13173
+ const missing = yield* Effect.filter(mentions, (mention) => isMissing$1(root, file, mention), { concurrency: READ_CONCURRENCY$28 });
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$56,
13185
+ rule: RULE$57,
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$18(root, name), { concurrency: READ_CONCURRENCY$27 }), unmatchedPatterns(root)], { concurrency: "unbounded" });
13193
+ const [found, patterns] = yield* Effect.all([Effect.forEach(configs, (name) => problemsIn$19(root, name), { concurrency: READ_CONCURRENCY$28 }), 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$55 = "unverified-crate";
13197
+ const RULE$56 = "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
- const SEPARATOR$16 = "/";
13202
+ const SEPARATOR$17 = "/";
13203
13203
  const FIRST$16 = 1;
13204
- const READ_CONCURRENCY$26 = 8;
13204
+ const READ_CONCURRENCY$27 = 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$55,
13209
+ rule: RULE$56,
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) {
@@ -13219,7 +13219,7 @@ const problemIn$3 = Effect.fn("problemIn")(function* problemIn(root, directories
13219
13219
  const versionProblemIn = Effect.fn("versionProblemIn")(function* versionProblemIn(root, directories, crate) {
13220
13220
  const files = yield* RepositoryFiles;
13221
13221
  const directory = files.relative(root, files.dirname(crate.manifest));
13222
- const workspace = pipe(directories, Array$1.findFirst((candidate) => pipe(APP_DIRECTORIES, Array$1.map((inner) => pipe([candidate, inner], Array$1.filter(String$1.isNonEmpty), Array$1.join(SEPARATOR$16))), Array$1.contains(directory))));
13222
+ const workspace = pipe(directories, Array$1.findFirst((candidate) => pipe(APP_DIRECTORIES, Array$1.map((inner) => pipe([candidate, inner], Array$1.filter(String$1.isNonEmpty), Array$1.join(SEPARATOR$17))), Array$1.contains(directory))));
13223
13223
  if (Option.isNone(workspace)) return Option.none();
13224
13224
  const text = yield* files.readFile(files.join(root, workspace.value, PACKAGE_JSON_FILE));
13225
13225
  const version = pipe(text, Option.flatMap(decodePackageJson), Option.flatMap(({ version: own }) => Option.fromUndefinedOr(own)));
@@ -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$26 });
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 });
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$54 = "deploy-entry-pattern";
13245
+ const RULE$55 = "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$25 = 8;
13263
+ const READ_CONCURRENCY$26 = 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 = {
@@ -13297,7 +13297,7 @@ const patternsOf = Effect.fn("patternsOf")(function* patternsOf(file, text, kind
13297
13297
  const parsed = yield* Effect.promise(() => parse(`${file}.ts`, kind.sourceOf(text), { lang: "ts" }));
13298
13298
  return pipe(patternsIn(kind.keys)(parsed.program), Array$1.filter(({ text: pattern }) => !String$1.startsWith(NEGATED)(pattern)));
13299
13299
  });
13300
- const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(request) {
13300
+ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(request) {
13301
13301
  const { root, file, kind, workspaces, entries } = request;
13302
13302
  const files = yield* RepositoryFiles;
13303
13303
  const path = files.join(root, file);
@@ -13313,7 +13313,7 @@ const problemsIn$17 = 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$54,
13316
+ rule: RULE$55,
13317
13317
  message: `${pattern} ${MESSAGE$9}`
13318
13318
  })));
13319
13319
  });
@@ -13336,17 +13336,17 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
13336
13336
  }];
13337
13337
  return [];
13338
13338
  }));
13339
- const found = yield* Effect.forEach(configs, ({ file, kind }) => problemsIn$17({
13339
+ const found = yield* Effect.forEach(configs, ({ file, kind }) => problemsIn$18({
13340
13340
  root,
13341
13341
  file,
13342
13342
  kind,
13343
13343
  workspaces,
13344
13344
  entries
13345
- }), { concurrency: READ_CONCURRENCY$25 });
13345
+ }), { concurrency: READ_CONCURRENCY$26 });
13346
13346
  return Array$1.flatten(found);
13347
13347
  });
13348
13348
  // src/features/check-repository-layout/model/fallow-entries.ts
13349
- const RULE$53 = "listed-entry";
13349
+ const RULE$54 = "listed-entry";
13350
13350
  const ENTRY_KEYS = [
13351
13351
  "entry",
13352
13352
  "entryPoints",
@@ -13354,9 +13354,9 @@ const ENTRY_KEYS = [
13354
13354
  ];
13355
13355
  const FALLOW_CONFIG = /(?:^|\/)(?:\.fallowrc\.jsonc?|fallow-plugin-[^/]+\.jsonc?|\.fallow\/plugins\/[^/]+\.jsonc?)$/u;
13356
13356
  const WILDCARD$2 = /[*?{[]/u;
13357
- const SEPARATOR$15 = "/";
13357
+ const SEPARATOR$16 = "/";
13358
13358
  const WRAP_OFFSET = 1;
13359
- const READ_CONCURRENCY$24 = 8;
13359
+ const READ_CONCURRENCY$25 = 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) => {
@@ -13366,8 +13366,8 @@ const entryPatternsIn = (node) => {
13366
13366
  })));
13367
13367
  return pipe(childrenOf$4(node), Array$1.flatMap(entryPatternsIn));
13368
13368
  };
13369
- const namesOneFile = (directories) => ({ text }) => pipe(directories, Array$1.some((directory) => String$1.startsWith(`${directory}${SEPARATOR$15}`)(text))) || String$1.includes(SEPARATOR$15)(text) && !WILDCARD$2.test(text);
13370
- const problemsIn$16 = Effect.fn("problemsIn")(function* problemsIn(root, file, directories) {
13369
+ const namesOneFile = (directories) => ({ text }) => pipe(directories, Array$1.some((directory) => String$1.startsWith(`${directory}${SEPARATOR$16}`)(text))) || String$1.includes(SEPARATOR$16)(text) && !WILDCARD$2.test(text);
13370
+ const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(root, file, directories) {
13371
13371
  const files = yield* RepositoryFiles;
13372
13372
  const path = files.join(root, file);
13373
13373
  const text = yield* files.readFile(path);
@@ -13376,7 +13376,7 @@ const problemsIn$16 = 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$53,
13379
+ rule: RULE$54,
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$16 = 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$16(root, file, directories), { concurrency: READ_CONCURRENCY$24 });
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 });
13388
13388
  return Array$1.flatten(found);
13389
13389
  });
13390
13390
  // src/features/check-repository-layout/model/root-workspace-paths.ts
13391
- const RULE$52 = "root-workspace-path";
13391
+ const RULE$53 = "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;
@@ -13404,10 +13404,10 @@ const mentions = (directory) => (text) => {
13404
13404
  return isBoundary(previous, PATH_CHARACTER) && (following === "/" || isBoundary(following, NAME_CHARACTER));
13405
13405
  }));
13406
13406
  };
13407
- const problemsIn$15 = (file, source, directories) => (found) => pipe(directories, Array$1.filter((directory) => mentions(directory)(found.text)), Array$1.map((directory) => ({
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$52,
13410
+ rule: RULE$53,
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 */
@@ -13418,13 +13418,13 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
13418
13418
  if (Option.isNone(source)) return [];
13419
13419
  const directories = yield* workspaceDirectories(root);
13420
13420
  const parsed = yield* Effect.promise(() => parse(file, source.value, { lang: "ts" }));
13421
- return pipe(stringsIn(parsed.program), Array$1.flatMap(problemsIn$15(file, source.value, directories)));
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$51 = "hidden-verify";
13424
+ const RULE$52 = "hidden-verify";
13425
13425
  const CONFIG_FILE$6 = "vite.config.ts";
13426
13426
  const FIRST$14 = 1;
13427
- const READ_CONCURRENCY$23 = 8;
13427
+ const READ_CONCURRENCY$24 = 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$51,
13438
+ rule: RULE$52,
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$23 });
13445
+ const found = yield* Effect.forEach(directories, (directory) => problemIn$2(root, directory), { concurrency: READ_CONCURRENCY$24 });
13446
13446
  return Array$1.getSomes(found);
13447
13447
  });
13448
13448
  // src/features/check-repository-layout/model/shared-uncached-tasks.ts
13449
- const RULE$50 = "shared-uncached-task";
13450
- const READ_CONCURRENCY$22 = 8;
13449
+ const RULE$51 = "shared-uncached-task";
13450
+ const READ_CONCURRENCY$23 = 8;
13451
13451
  const SHARED = 2;
13452
13452
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
13453
13453
  const UncachedTask = Schema.Struct({
@@ -13489,16 +13489,56 @@ 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$50,
13492
+ rule: RULE$51,
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$22 });
13499
+ const found = yield* Effect.forEach(directories, (directory) => definitionsIn(root, directory), { concurrency: READ_CONCURRENCY$23 });
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
+ // src/features/check-repository-layout/model/tested-verify.ts
13503
+ const RULE$50 = "tested-verify";
13504
+ const READ_CONCURRENCY$22 = 8;
13505
+ const TESTS = new Set(TEST_TASK_NAMES);
13506
+ const RUNS_TESTS = /\b(?:vp|cargo) test\b/u;
13507
+ const edgesOf = (task) => pipe(Option.toArray(propertyValue("dependsOn")(task.value)), Array$1.flatMap(stringsIn), Array$1.map((at) => ({
13508
+ to: at.text,
13509
+ at
13510
+ })));
13511
+ const runsTests = (task) => TESTS.has(keyName(task.key)) || pipe(propertyValue("command")(task.value), Option.getOrElse(() => task.value), stringsIn, Array$1.some(({ text }) => RUNS_TESTS.test(text)));
13512
+ const testsThrough = (byName) => (edge) => TESTS.has(edge.to) || pipe(Option.fromUndefinedOr(byName.get(edge.to)), Option.exists((target) => runsTests(target)));
13513
+ const edgesFrom = (byName, seen) => (name) => pipe(Option.fromUndefinedOr(byName.get(name)), Option.filter(() => !seen.has(name)), Option.match({
13514
+ onNone: () => [],
13515
+ onSome: (task) => {
13516
+ const next = /* @__PURE__ */ new Set([...seen, name]);
13517
+ const edges = edgesOf(task);
13518
+ const tests = testsThrough(byName);
13519
+ return [...pipe(edges, Array$1.filter(tests)), ...pipe(edges, Array$1.filter((edge) => !tests(edge)), Array$1.flatMap(({ to }) => edgesFrom(byName, next)(to)))];
13520
+ }
13521
+ }));
13522
+ const named$1 = (task) => [keyName(task.key), task];
13523
+ const testedEdges = (tasks) => {
13524
+ const byName = new Map(pipe(tasks, Array$1.map(named$1)));
13525
+ return edgesFrom(byName, /* @__PURE__ */ new Set())(TASK_NAMES.verify);
13526
+ };
13527
+ const problemsIn$15 = Effect.fn("problemsIn")(function* problemsIn(root, directory) {
13528
+ const config = yield* workspaceConfigOf(root, directory);
13529
+ return pipe(Option.toArray(config), Array$1.flatMap(({ file, source, program }) => pipe(testedEdges(runTasksIn(program)), Array$1.map(({ to, at }) => ({
13530
+ file,
13531
+ ...positionOf(source)(at.start),
13532
+ rule: RULE$50,
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
+ })))));
13535
+ });
13536
+ /** @internal */
13537
+ const checkTestedVerify = Effect.fn("checkTestedVerify")(function* checkTestedVerify(root) {
13538
+ const directories = yield* workspaceDirectories(root);
13539
+ const found = yield* Effect.forEach(directories, (directory) => problemsIn$15(root, directory), { concurrency: READ_CONCURRENCY$22 });
13540
+ return Array$1.flatten(found);
13541
+ });
13502
13542
  // src/features/check-repository-layout/model/unlocked-tasks.ts
13503
13543
  const RULE$49 = "unlocked-task";
13504
13544
  const READ_CONCURRENCY$21 = 8;
@@ -13527,6 +13567,7 @@ const checkTasks = Effect.fn("checkTasks")(function* checkTasks(root) {
13527
13567
  const found = yield* Effect.all([
13528
13568
  checkHiddenVerify(root),
13529
13569
  checkSharedUncachedTasks(root),
13570
+ checkTestedVerify(root),
13530
13571
  checkUnlockedTasks(root)
13531
13572
  ], { concurrency: "unbounded" });
13532
13573
  return Array$1.flatten(found);
@@ -13547,16 +13588,16 @@ const checkWorkspaces = Effect.fn("checkWorkspaces")(function* checkWorkspaces(r
13547
13588
  });
13548
13589
  // src/shared/lib/package-name.ts
13549
13590
  const SCOPE$2 = "@";
13550
- const SEPARATOR$14 = "/";
13591
+ const SEPARATOR$15 = "/";
13551
13592
  const SCOPED_SEGMENTS = 2;
13552
13593
  const PLAIN_SEGMENTS = 1;
13553
13594
  const segmentCount = (specifier) => {
13554
13595
  if (String$1.startsWith(SCOPE$2)(specifier)) return SCOPED_SEGMENTS;
13555
13596
  return PLAIN_SEGMENTS;
13556
13597
  };
13557
- const packageNameOf = (specifier) => pipe(String$1.split(specifier, SEPARATOR$14), Array$1.take(segmentCount(specifier)), Array$1.join(SEPARATOR$14));
13598
+ const packageNameOf = (specifier) => pipe(String$1.split(specifier, SEPARATOR$15), Array$1.take(segmentCount(specifier)), Array$1.join(SEPARATOR$15));
13558
13599
  // src/features/measure-install-size/model/import-graph.ts
13559
- const RELATIVE = /^\.\.?(?:\/|$)/u;
13600
+ const RELATIVE$1 = /^\.\.?(?:\/|$)/u;
13560
13601
  const SUBPATH_IMPORT$1 = "#";
13561
13602
  const WILDCARD$1 = "*";
13562
13603
  const SOURCE_SUFFIXES = [
@@ -13592,13 +13633,13 @@ const existingSource = Effect.fn("existingSource")(function* existingSource(base
13592
13633
  });
13593
13634
  const localFile = Effect.fn("localFile")(function* localFile({ directory, imports }, from, specifier) {
13594
13635
  const files = yield* RepositoryFiles;
13595
- if (RELATIVE.test(specifier)) return yield* existingSource(files.resolve(files.dirname(from), specifier));
13636
+ if (RELATIVE$1.test(specifier)) return yield* existingSource(files.resolve(files.dirname(from), specifier));
13596
13637
  const target = subpathTarget(imports, specifier);
13597
13638
  if (Option.isNone(target)) return Option.none();
13598
13639
  return yield* existingSource(files.resolve(directory, target.value));
13599
13640
  });
13600
13641
  const referenceOf$2 = (graph, from, specifier) => {
13601
- if (RELATIVE.test(specifier) || String$1.startsWith(SUBPATH_IMPORT$1)(specifier)) return localFile(graph, from, specifier).pipe(Effect.map(Option.map(Result.succeed)));
13642
+ if (RELATIVE$1.test(specifier) || String$1.startsWith(SUBPATH_IMPORT$1)(specifier)) return localFile(graph, from, specifier).pipe(Effect.map(Option.map(Result.succeed)));
13602
13643
  const name = packageNameOf(specifier);
13603
13644
  return Effect.succeedSome(Result.fail(name));
13604
13645
  };
@@ -14546,7 +14587,8 @@ const expectationsIn = Effect.fn("expectationsIn")(function* expectationsIn(root
14546
14587
  rules: MARKDOWN_RULES
14547
14588
  },
14548
14589
  tasks: MSCH_TASK_COMMANDS,
14549
- verifyTasks: Record.keys(MSCH_TASK_COMMANDS),
14590
+ verifyTasks: Record.keys(MSCH_VERIFY_COMMANDS),
14591
+ ciTasks: CI_TASKS,
14550
14592
  secrets: secretsOf()
14551
14593
  };
14552
14594
  });
@@ -14634,16 +14676,28 @@ const markdownWeakenings = (expected) => whenPresent("y8 section, so the Markdow
14634
14676
  anchor: "y8",
14635
14677
  message: "y8.rules differs from what markdownOf builds. Markdown rules are not turned off or changed in a repository that uses msch."
14636
14678
  })]);
14679
+ const missingDependencies$1 = (tasks, task) => (names) => {
14680
+ const dependsOn = listOf$2(sectionOf(tasks[task])["dependsOn"]);
14681
+ return pipe(names, Array$1.filter((name) => !Array$1.contains(dependsOn, name)), Array$1.map((name) => ({
14682
+ anchor: task,
14683
+ message: `${task} does not run the ${name} task. Leave ${task} as repositoryConfig builds it.`
14684
+ })));
14685
+ };
14637
14686
  const taskWeakenings = (run, expected) => {
14638
14687
  const tasks = sectionOf(sectionOf(run)["tasks"]);
14639
- const dependsOn = listOf$2(sectionOf(tasks["verify"])["dependsOn"]);
14640
- return [...pipe(Record.toEntries(expected.tasks), Array$1.filter(([name, command]) => !Equal.equals(sectionOf(tasks[name])["command"], command)), Array$1.map(([name]) => ({
14641
- anchor: "run",
14642
- message: `The ${name} task does not run what msch builds for it. Leave msch's tasks as repositoryConfig builds them; add other work under another task name.`
14643
- }))), ...pipe(expected.verifyTasks, Array$1.filter((name) => !Array$1.contains(dependsOn, name)), Array$1.map((name) => ({
14644
- anchor: "verify",
14645
- message: `verify does not run the ${name} task. Leave verify as repositoryConfig builds it.`
14646
- })))];
14688
+ const dependsOn = listOf$2(sectionOf(tasks[TASK_NAMES.verify])["dependsOn"]);
14689
+ return [
14690
+ ...pipe(Record.toEntries(expected.tasks), Array$1.filter(([name, command]) => !Equal.equals(sectionOf(tasks[name])["command"], command)), Array$1.map(([name]) => ({
14691
+ anchor: "run",
14692
+ message: `The ${name} task does not run what msch builds for it. Leave msch's tasks as repositoryConfig builds them; add other work under another task name.`
14693
+ }))),
14694
+ ...missingDependencies$1(tasks, TASK_NAMES.verify)(expected.verifyTasks),
14695
+ ...unless(!Array$1.contains(dependsOn, TASK_NAMES.test), {
14696
+ anchor: TASK_NAMES.verify,
14697
+ message: "verify runs the test task. Tests run in CI through the ci task, so verify, which the pre-push hook runs, leaves them out."
14698
+ }),
14699
+ ...missingDependencies$1(tasks, "ci")(expected.ciTasks)
14700
+ ];
14647
14701
  };
14648
14702
  const secretWeakenings = (h56m, expected) => unless(Equal.equals(h56m, expected), {
14649
14703
  anchor: "h56m",
@@ -15409,7 +15463,7 @@ const declaredNameProblem = ({ literals, relative }) => {
15409
15463
  const PATH_PREFIX = /^(?:!|\.\/)+/u;
15410
15464
  const GLOB$1 = /[*?{[]/u;
15411
15465
  const EXTENSION$2 = /\.[^./]+$/u;
15412
- const SEPARATOR$13 = "/";
15466
+ const SEPARATOR$14 = "/";
15413
15467
  const ROOT$2 = ".";
15414
15468
  const namedPath = (repository, file) => (name) => {
15415
15469
  const bare = pipe(name, String$1.replace(PATH_PREFIX, ""));
@@ -15418,12 +15472,12 @@ const namedPath = (repository, file) => (name) => {
15418
15472
  return pipe([fromFile, bare], Array$1.findFirst((path) => HashSet.has(repository.paths, path)));
15419
15473
  };
15420
15474
  const kindOf = (repository) => (path) => {
15421
- if (HashSet.has(repository.directories, path)) return SEPARATOR$13;
15475
+ if (HashSet.has(repository.directories, path)) return SEPARATOR$14;
15422
15476
  return pipe(path, String$1.match(EXTENSION$2), Option.flatMap(Array$1.head), Option.getOrElse(() => path));
15423
15477
  };
15424
15478
  const siblingsOf = (repository) => (path) => pipe(Record.get(repository.entries, repository.dirname(path)), Option.getOrElse(() => []), Array$1.filter((entry) => kindOf(repository)(entry) === kindOf(repository)(path)));
15425
15479
  const coversDirectory = (repository) => (group) => pipe(Array$1.head(group), Option.exists((first) => group.length >= Math.max(2, siblingsOf(repository)(first).length - 1)));
15426
- const enumeratedDirectory = (repository) => (paths) => pipe(paths, Array$1.groupBy((path) => `${repository.dirname(path)}${SEPARATOR$13}${kindOf(repository)(path)}`), Record.values, Array$1.findFirst(coversDirectory(repository)), Option.flatMap(Array$1.head), Option.map(repository.dirname));
15480
+ const enumeratedDirectory = (repository) => (paths) => pipe(paths, Array$1.groupBy((path) => `${repository.dirname(path)}${SEPARATOR$14}${kindOf(repository)(path)}`), Record.values, Array$1.findFirst(coversDirectory(repository)), Option.flatMap(Array$1.head), Option.map(repository.dirname));
15427
15481
  const directoryLabel = (directory) => {
15428
15482
  if (directory === ROOT$2) return "the repository root";
15429
15483
  return directory;
@@ -15446,8 +15500,8 @@ const listedPathProblem = (repository) => (list) => {
15446
15500
  const SUBSET_SHARE = 2;
15447
15501
  const canImport = (importer, imported) => importer.name === imported.name || importer.dependencies.includes(imported.name);
15448
15502
  const importIndexOf = (files) => pipe(files, Array$1.map((entry) => [entry.file, entry.imports]), Record.fromEntries);
15449
- const imports$1 = (index) => (importer, imported) => Record.get(index, importer).pipe(Option.exists(Array$1.contains(imported)));
15450
- const connected = (index) => (left, right) => left === right || imports$1(index)(left, right) || imports$1(index)(right, left);
15503
+ const imports = (index) => (importer, imported) => Record.get(index, importer).pipe(Option.exists(Array$1.contains(imported)));
15504
+ const connected = (index) => (left, right) => left === right || imports(index)(left, right) || imports(index)(right, left);
15451
15505
  const isPartOf = (index, list) => (other) => other !== list && canImport(list.site.scope, other.site.scope) && connected(index)(list.site.file, other.site.file) && isSubsetOf(list.names, other.names) && list.names.length * SUBSET_SHARE >= other.names.length && !sameValues(list.names, other.names);
15452
15506
  const subsetListProblem = ({ lists, literals, relative }) => {
15453
15507
  const index = importIndexOf(literals);
@@ -15475,11 +15529,11 @@ const handWrittenNameProblems = ({ repository, literals }) => (sites) => {
15475
15529
  return pipe(lists, Array$1.map((list) => Array$1.findFirst(checks, (check) => check(list))), Array$1.getSomes);
15476
15530
  };
15477
15531
  // src/features/check-value-owners/model/repository-names.ts
15478
- const SEPARATOR$12 = "/";
15532
+ const SEPARATOR$13 = "/";
15479
15533
  const FIRST_SEGMENT = 1;
15480
15534
  const prefixesOf = (file) => {
15481
- const segments = pipe(file, String$1.split(SEPARATOR$12));
15482
- return pipe(Array$1.range(FIRST_SEGMENT, segments.length), Array$1.map((count) => pipe(Array$1.take(segments, count), Array$1.join(SEPARATOR$12))));
15535
+ const segments = pipe(file, String$1.split(SEPARATOR$13));
15536
+ return pipe(Array$1.range(FIRST_SEGMENT, segments.length), Array$1.map((count) => pipe(Array$1.take(segments, count), Array$1.join(SEPARATOR$13))));
15483
15537
  };
15484
15538
  const directoriesOf$1 = (file) => pipe(prefixesOf(file), Array$1.dropRight(FIRST_SEGMENT));
15485
15539
  const nameOf = (text) => pipe(text, Option.flatMap(decodePackageJson), Option.flatMap((parsed) => Option.fromUndefinedOr(parsed.name)));
@@ -15871,7 +15925,7 @@ const ARGS = "args";
15871
15925
  const PLACEHOLDER = /[<>*{}$]/u;
15872
15926
  const WHITESPACE$1 = /\s+/u;
15873
15927
  const ROOT$1 = ".";
15874
- const SEPARATOR$11 = "/";
15928
+ const SEPARATOR$12 = "/";
15875
15929
  const END_OF_OPTIONS = "--";
15876
15930
  const FLAG = "-";
15877
15931
  const TASK_SEPARATOR$1 = "#";
@@ -15918,8 +15972,8 @@ const parsed = (args) => {
15918
15972
  return pipe(specifierOf(tokens), Option.filter(() => !pipe(tokens, Array$1.some((token) => PLACEHOLDER.test(token)))), Option.map(invocationOf(tokens)));
15919
15973
  };
15920
15974
  const ancestorsOf$1 = (file) => {
15921
- const parts = pipe(String$1.split(file, SEPARATOR$11), Array$1.dropRight(ONE$2));
15922
- return [...Array$1.makeBy(parts.length, (index) => pipe(parts, Array$1.take(parts.length - index), Array$1.join(SEPARATOR$11))), ROOT$1];
15975
+ const parts = pipe(String$1.split(file, SEPARATOR$12), Array$1.dropRight(ONE$2));
15976
+ return [...Array$1.makeBy(parts.length, (index) => pipe(parts, Array$1.take(parts.length - index), Array$1.join(SEPARATOR$12))), ROOT$1];
15923
15977
  };
15924
15978
  const named = (graph, name) => (directory) => directory === String$1.replace(LOCAL_PREFIX$1, "")(name) || pipe(Record.get(graph.packages, directory), Option.exists((found) => found.name === name));
15925
15979
  const packagesOf = (graph, file) => (scope) => {
@@ -15943,7 +15997,7 @@ const problemsIn$12 = (graph, absolute, { file, text }) => pipe(Array$1.fromIter
15943
15997
  rule: RULE$35,
15944
15998
  message: `${match[START$22]} runs task ${task}, but ${whereOf(scope, file)} has no such task. Fix the command or the task`
15945
15999
  })), Option.toArray)));
15946
- const isDocument = (file) => pipe(String$1.split(file, SEPARATOR$11), Array$1.last, Option.exists((name) => DOCUMENT_NAMES.has(name)));
16000
+ const isDocument = (file) => pipe(String$1.split(file, SEPARATOR$12), Array$1.last, Option.exists((name) => DOCUMENT_NAMES.has(name)));
15947
16001
  /** @internal */
15948
16002
  const checkDocumentedCommands = Effect.fn("checkDocumentedCommands")(function* checkDocumentedCommands(root) {
15949
16003
  const files = yield* RepositoryFiles;
@@ -16129,12 +16183,12 @@ const checkStructure = checkSection({
16129
16183
  // src/features/check-vite-plus/model/command-words.ts
16130
16184
  const CONTINUATION = /\\\n/gu;
16131
16185
  const QUOTED = /\$\{\{.*?\}\}|"(?:[^"\\]|\\.)*"|'[^']*'/gu;
16132
- const SEPARATOR$10 = /&&|\|\||[;|\n`]|\$\(/u;
16186
+ const SEPARATOR$11 = /&&|\|\||[;|\n`]|\$\(/u;
16133
16187
  const BLANK$1 = /\s+/u;
16134
16188
  const ASSIGNMENT = /^[A-Za-z_][A-Za-z0-9_]*=/u;
16135
16189
  const QUOTE = "\"\"";
16136
16190
  const wordsOf = (segment) => pipe(String$1.split(String$1.trim(segment), BLANK$1), Array$1.filter(String$1.isNonEmpty), Array$1.dropWhile((word) => ASSIGNMENT.test(word)));
16137
- const simpleCommands = (text) => pipe(text, String$1.replaceAll(CONTINUATION, " "), String$1.replaceAll(QUOTED, QUOTE), String$1.split(SEPARATOR$10), Array$1.map(wordsOf), Array$1.filter(Array$1.isReadonlyArrayNonEmpty));
16191
+ const simpleCommands = (text) => pipe(text, String$1.replaceAll(CONTINUATION, " "), String$1.replaceAll(QUOTED, QUOTE), String$1.split(SEPARATOR$11), Array$1.map(wordsOf), Array$1.filter(Array$1.isReadonlyArrayNonEmpty));
16138
16192
  // src/features/check-vite-plus/model/command-problems.ts
16139
16193
  const PACKAGE_MANAGERS = [
16140
16194
  "pnpm",
@@ -17111,7 +17165,7 @@ const FRAGMENT = /#.*$/u;
17111
17165
  const GITHUB$3 = "https://github.com/";
17112
17166
  const COMMIT_LINK = /\/(?:blob|tree)\/[0-9a-f]{40}(?:\/|$)/u;
17113
17167
  const BLANK = /\s+/u;
17114
- const SEPARATOR$9 = "/";
17168
+ const SEPARATOR$10 = "/";
17115
17169
  const START$16 = 0;
17116
17170
  const FIRST$7 = 1;
17117
17171
  const READ_CONCURRENCY$14 = 16;
@@ -17187,7 +17241,7 @@ const problemsIn$9 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
17187
17241
  const files = yield* RepositoryFiles;
17188
17242
  const file = files.join(root, name);
17189
17243
  const directory = files.dirname(name);
17190
- const inside = pipe(listed, Array$1.filter(String$1.startsWith(`${directory}${SEPARATOR$9}`)));
17244
+ const inside = pipe(listed, Array$1.filter(String$1.startsWith(`${directory}${SEPARATOR$10}`)));
17191
17245
  const text = yield* files.readFile(file);
17192
17246
  const documents = pipe(inside, Array$1.filter(String$1.endsWith(MARKDOWN$5)), Array$1.map((entry) => files.join(root, entry)));
17193
17247
  const links = yield* Effect.forEach(documents, linkProblems, { concurrency: READ_CONCURRENCY$14 });
@@ -17468,7 +17522,7 @@ const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
17468
17522
  const RULE$22 = "applied-package";
17469
17523
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
17470
17524
  const NOT_FOUND$3 = -1;
17471
- const SEPARATOR$8 = "/";
17525
+ const SEPARATOR$9 = "/";
17472
17526
  /** @internal */
17473
17527
  const isApplied = ({ bins, keywords }) => Array$1.isReadonlyArrayNonEmpty(bins) || pipe(keywords, Array$1.some((keyword) => Array$1.contains(PLUGIN_KEYWORDS, keyword)));
17474
17528
  const BY_LENGTH = Order.mapInput(Order.Number, (text) => text.length);
@@ -17507,7 +17561,7 @@ const problemAt$1 = (file, source) => (index, name) => ({
17507
17561
  const specifierPattern = ({ name }) => new RegExp(`["'\`]${escaped$1(name)}(?=["'\`/])`, "gu");
17508
17562
  const binPattern = (bin) => new RegExp(`(?<![\\w./@:-])${escaped$1(bin)}(?=[ \\t"'\`]|$)`, "gmu");
17509
17563
  const usesIn = (applied) => ({ file }, source) => pipe(applied, Array$1.flatMap((entry) => pipe([specifierPattern(entry), ...pipe(entry.bins, Array$1.map(binPattern))], Array$1.flatMap((pattern) => Array$1.fromIterable(String$1.matchAll(pattern)(source))), Array$1.map((found) => problemAt$1(file, source)(found.index ?? NOT_FOUND$3, entry.name)))));
17510
- const ownerOf$1 = (directories) => (name) => pipe(directories, Array$1.filter((directory) => directory === "" || String$1.startsWith(`${directory}${SEPARATOR$8}`)(name)), Array$1.match({
17564
+ const ownerOf$1 = (directories) => (name) => pipe(directories, Array$1.filter((directory) => directory === "" || String$1.startsWith(`${directory}${SEPARATOR$9}`)(name)), Array$1.match({
17511
17565
  onEmpty: () => "",
17512
17566
  onNonEmpty: Array$1.max(BY_LENGTH)
17513
17567
  }));
@@ -17655,7 +17709,7 @@ const unneededLockfile = (present) => (entry) => FOREIGN_LOCKFILE.test(entry.nam
17655
17709
  // src/features/find-unneeded-files/model/unneeded-files.ts
17656
17710
  const WORKSPACE_FILE$1 = "pnpm-workspace.yaml";
17657
17711
  const PNPM_DIRECTORY = ".pnpm/";
17658
- const SEPARATOR$7 = "/";
17712
+ const SEPARATOR$8 = "/";
17659
17713
  const CARGO_MANIFEST_FILE = /(?:^|\/)Cargo\.toml$/u;
17660
17714
  const CARGO_LOCK_FILE = /(?:^|\/)Cargo\.lock$/u;
17661
17715
  const PNPM_OUTPUT = /(?:^|\/)\.pnpm\//u;
@@ -17723,10 +17777,10 @@ const matches = (pattern) => ({ name }) => pattern.test(name);
17723
17777
  const isCargoManifest = matches(CARGO_MANIFEST_FILE);
17724
17778
  const isLegacyCargoConfig = matches(LEGACY_CARGO_CONFIG);
17725
17779
  const isPnpmOutput = matches(PNPM_OUTPUT);
17726
- const directoryOf = (name) => pipe(String$1.split(name, SEPARATOR$7), Array$1.dropRight(LAST_SEGMENT), Array$1.join(SEPARATOR$7));
17780
+ const directoryOf = (name) => pipe(String$1.split(name, SEPARATOR$8), Array$1.dropRight(LAST_SEGMENT), Array$1.join(SEPARATOR$8));
17727
17781
  const ancestorsOf = (directory) => {
17728
- const parts = String$1.split(directory, SEPARATOR$7);
17729
- return pipe(Array$1.makeBy(parts.length, (depth) => Array$1.join(Array$1.take(parts, depth), SEPARATOR$7)), Array$1.filter((ancestor) => ancestor !== directory));
17782
+ const parts = String$1.split(directory, SEPARATOR$8);
17783
+ return pipe(Array$1.makeBy(parts.length, (depth) => Array$1.join(Array$1.take(parts, depth), SEPARATOR$8)), Array$1.filter((ancestor) => ancestor !== directory));
17730
17784
  };
17731
17785
  const readsCargoLock = (manifests, workspaces) => ({ name }) => {
17732
17786
  const directory = directoryOf(name);
@@ -17817,7 +17871,7 @@ const checkMarkdownDirectives = Effect.fn("checkMarkdownDirectives")(function* c
17817
17871
  const RULE$19 = "owner-name";
17818
17872
  const TEXT_FILE$1 = /\.(?:[cm]?[jt]sx?|jsonc?|md|ya?ml|toml)$/u;
17819
17873
  const REGEX_SPECIAL = /[.*+?^${}()|[\]\\/]/gu;
17820
- const SEPARATOR$6 = "/";
17874
+ const SEPARATOR$7 = "/";
17821
17875
  const START$12 = 0;
17822
17876
  const DECLARED = [
17823
17877
  "dependencies",
@@ -17863,7 +17917,7 @@ const workspaceProblems = Effect.fn("workspaceProblems")(function* workspaceProb
17863
17917
  const files = yield* RepositoryFiles;
17864
17918
  const manifest = yield* readManifest(directory);
17865
17919
  if (Option.isNone(manifest)) return [];
17866
- const prefix = `${files.relative(root, directory)}${SEPARATOR$6}`;
17920
+ const prefix = `${files.relative(root, directory)}${SEPARATOR$7}`;
17867
17921
  const names = yield* files.listedFiles(root);
17868
17922
  const listed = pipe(names, Array$1.filter((name) => String$1.startsWith(prefix)(name) && TEXT_FILE$1.test(name) && files.basename(name) !== PACKAGE_JSON_FILE && files.basename(name) !== CONFIG_FILE$1), Array$1.map((name) => ({
17869
17923
  name,
@@ -18248,7 +18302,7 @@ const PLUGIN_FILE$2 = ".claude-plugin/plugin.json";
18248
18302
  const MARKETPLACE_FILE$1 = ".claude-plugin/marketplace.json";
18249
18303
  const SKILL_FILE$1 = "SKILL.md";
18250
18304
  const BIN_PREFIX = "bin/";
18251
- const SEPARATOR$5 = "/";
18305
+ const SEPARATOR$6 = "/";
18252
18306
  const MOST_FILES = 5e3;
18253
18307
  const LONGEST_PATH = 472;
18254
18308
  const MOST_DEPTH = 12;
@@ -18294,7 +18348,7 @@ const WIDE_PART = `has a path part longer than ${String(LONGEST_PART)} character
18294
18348
  const BAD_CHARACTERS = "has characters outside letters, digits, space and _ . - / ( ).";
18295
18349
  const ARCHIVE_MESSAGE = "is an archive, which claude.ai sync rejects.";
18296
18350
  const pathViolation = (file) => {
18297
- const parts = String$1.split(SEPARATOR$5)(file);
18351
+ const parts = String$1.split(SEPARATOR$6)(file);
18298
18352
  const wide = pipe(parts, Array$1.some((part) => part.length > LONGEST_PART));
18299
18353
  return pipe([
18300
18354
  [BAD_CHARACTERS, !ALLOWED_PATH.test(file)],
@@ -18326,9 +18380,9 @@ const skillViolations = (skills) => {
18326
18380
  Option.liftPredicate(`shares the name ${name} with another SKILL.md of the plugin.`, () => pipe(Record.get(counts, name), Option.exists((group) => group.length > SINGLE)))
18327
18381
  ], Array$1.getSomes, Array$1.map((message) => violation(file, message)))));
18328
18382
  };
18329
- const skillFilesOf = (plugin) => pipe(plugin.files, Array$1.filter((file) => file === SKILL_FILE$1 || String$1.endsWith(`${SEPARATOR$5}${SKILL_FILE$1}`)(file)));
18383
+ const skillFilesOf = (plugin) => pipe(plugin.files, Array$1.filter((file) => file === SKILL_FILE$1 || String$1.endsWith(`${SEPARATOR$6}${SKILL_FILE$1}`)(file)));
18330
18384
  const violationsOf = Effect.fn("violationsOf")(function* violationsOf(root, plugin, links) {
18331
- const prefix = `${(yield* RepositoryFiles).relative(root, plugin.directory)}${SEPARATOR$5}`;
18385
+ const prefix = `${(yield* RepositoryFiles).relative(root, plugin.directory)}${SEPARATOR$6}`;
18332
18386
  const skills = yield* Effect.forEach(skillFilesOf(plugin), (file) => skillTextOf(plugin, file), { concurrency: CONCURRENCY$3 });
18333
18387
  return [
18334
18388
  ...manifestViolations(plugin),
@@ -19394,10 +19448,13 @@ const checkUpstream = Effect.fn("checkUpstream")(function* checkUpstream(root) {
19394
19448
  });
19395
19449
  // src/features/check-surface-callers/model/caller-texts.ts
19396
19450
  const READ_CONCURRENCY$7 = 64;
19397
- const SEPARATOR$4 = "/";
19451
+ const SEPARATOR$5 = "/";
19398
19452
  const UNTRACKED = /(?:^|\/)(?:node_modules|\.git)\//u;
19399
- const NOT_A_CALLER = /(?:^|\/)(?:README\.md|CHANGELOG\.md|pnpm-lock\.yaml|[^/]+\.test(?:\.support)?\.[cm]?[jt]sx?)$/u;
19453
+ const NOT_A_CALLER = /(?:^|\/)(?:README\.md|CHANGELOG\.md|pnpm-lock\.yaml)$/u;
19454
+ const TEST = /\.test(?:\.support)?\.[cm]?[jt]sx?$/u;
19400
19455
  const TEXT_FILE = /(?:\.(?:[cm]?[jt]sx?|jsonc?|ya?ml|toml|sh|mdx?|css|html|rs)|(?:^|\/)\.vite-hooks\/[^/.]+)$/u;
19456
+ /** @internal */
19457
+ const isTest = ({ file }) => TEST.test(file);
19401
19458
  const isCallerText = (file) => TEXT_FILE.test(file) && !NOT_A_CALLER.test(file);
19402
19459
  const readTexts = Effect.fn("readTexts")(function* readTexts(root, listed, label) {
19403
19460
  const files = yield* RepositoryFiles;
@@ -19416,32 +19473,57 @@ const ownTexts = Effect.fn("ownTexts")(function* ownTexts(root) {
19416
19473
  const textsUnder = Effect.fn("textsUnder")(function* textsUnder(directory, label) {
19417
19474
  const walked = yield* (yield* RepositoryFiles).walkDirectory(directory);
19418
19475
  const tracked = pipe(walked, Array$1.filter((file) => !UNTRACKED.test(file)));
19419
- return yield* readTexts(directory, tracked, (file) => `${label}${SEPARATOR$4}${file}`);
19476
+ return yield* readTexts(directory, tracked, (file) => `${label}${SEPARATOR$5}${file}`);
19420
19477
  });
19421
- // src/features/check-surface-callers/model/surface-callers.ts
19478
+ // src/features/check-surface-callers/model/export-callers.ts
19422
19479
  const EXPORT_RULE = "uncalled-export";
19423
- const COMMAND_RULE = "uncalled-command";
19424
- const FLAG_RULE = "uncalled-flag";
19425
- const READ_CONCURRENCY$6 = 64;
19426
- const SEPARATOR$3 = "/";
19427
- const START$2 = 0;
19480
+ const SEPARATOR$4 = "/";
19481
+ const NAME_GROUP$1 = "name";
19428
19482
  const ROOT_SUBPATH$1 = ".";
19429
19483
  const MANIFEST_SUBPATH = "./package.json";
19430
19484
  const WILDCARD = "*";
19431
- const QUOTES = [
19485
+ const SPECIFIER_ENDS = [
19432
19486
  "\"",
19433
19487
  "'",
19434
19488
  "`",
19435
- "\\"
19489
+ "\\",
19490
+ "?"
19436
19491
  ];
19437
- const NAME_GROUP = "name";
19438
19492
  const MANIFEST = /(?:^|\/)package\.json$/u;
19493
+ const JSX_RUNTIME = /^(?<name>.+)\/jsx(?:-dev)?-runtime$/u;
19494
+ const JSX_IMPORT_SOURCE = "jsxImportSource";
19495
+ const RELATIVE = /^\.\//u;
19496
+ const DOCUMENT = /\.mdx?$/u;
19497
+ const EXPORT_MESSAGE = "is exported, and nothing imports it. Every name that code outside a package can use exists only while something uses it, and fallow never reports what an entry exports as unused. Delete the subpath, or import it from the code that needs it.";
19498
+ const entriesOf = ({ name, exports }) => pipe(Option.fromUndefinedOr(name), Option.filter(() => Predicate.isNotUndefined(exports)), Option.map((own) => pipe(exportEntriesOf(exports), Array$1.filter(([subpath]) => subpath !== MANIFEST_SUBPATH && !String$1.includes(WILDCARD)(subpath)), Array$1.map(([subpath, held]) => ({
19499
+ specifier: String$1.replace(ROOT_SUBPATH$1, own)(subpath),
19500
+ targets: pipe(targetsIn(held), Array$1.map(String$1.replace(RELATIVE, "")))
19501
+ })))), Option.getOrElse(() => []));
19502
+ const names = (specifier) => ({ text }) => pipe(SPECIFIER_ENDS, Array$1.some((end) => String$1.includes(`${specifier}${end}`)(text)));
19503
+ const setsJsxSource = (specifier) => (file) => pipe(String$1.match(JSX_RUNTIME)(specifier), Option.flatMap((found) => Option.fromUndefinedOr(found.groups)), Option.flatMap(Record.get(NAME_GROUP$1)), Option.exists((source) => String$1.includes(JSX_IMPORT_SOURCE)(file.text) && names(source)(file)));
19504
+ const linksTarget = (prefix, targets) => ({ file, text }) => DOCUMENT.test(file) && !String$1.startsWith(prefix)(file) && pipe(targets, Array$1.some((target) => String$1.includes(`${prefix}${target}`)(text)));
19505
+ const calls = (prefix, { specifier, targets }) => (file) => names(specifier)(file) || setsJsxSource(specifier)(file) || linksTarget(prefix, targets)(file);
19506
+ /** @internal */
19507
+ const exportProblems = ({ root, join, corpus, owner: { directory, manifest } }) => {
19508
+ const prefix = `${directory}${SEPARATOR$4}`;
19509
+ const ownTest = (text) => String$1.startsWith(prefix)(text.file) && isTest(text);
19510
+ const callersOf = (specifier) => pipe(corpus, Array$1.filter(({ file }) => specifier !== manifest.name || !MANIFEST.test(file)), Array$1.filter((text) => !ownTest(text)));
19511
+ return pipe(entriesOf(manifest), Array$1.filter((entry) => !pipe(callersOf(entry.specifier), Array$1.some(calls(prefix, entry)))), Array$1.map(({ specifier }) => problemInFile(EXPORT_RULE)(join(root, directory, PACKAGE_JSON_FILE), `${specifier} ${EXPORT_MESSAGE}`)));
19512
+ };
19513
+ // src/features/check-surface-callers/model/surface-callers.ts
19514
+ const COMMAND_RULE = "uncalled-command";
19515
+ const FLAG_RULE = "uncalled-flag";
19516
+ const READ_CONCURRENCY$6 = 64;
19517
+ const SEPARATOR$3 = "/";
19518
+ const START$2 = 0;
19519
+ const NAME_GROUP = "name";
19439
19520
  const SOURCE = /\.[cm]?tsx?$/u;
19440
19521
  const DECLARED_COMMAND = /\bCommand\.make\(\s*["'](?<name>[a-z][a-z0-9-]*)["']/gu;
19441
19522
  const DECLARED_FLAG = /\bFlag\.[A-Z]\w*\(\s*["'](?<name>[a-z][a-z0-9-]*)["']/gu;
19523
+ const RUN_COMMAND = /\bCommand\.run\(\s*(?<name>[A-Za-z_$][\w$]*)/gu;
19524
+ const INSTALLED_SKILLS$1 = ".agents/skills";
19442
19525
  const COMMAND_FILE = /^bin\/(?<name>[^/.]+)\.[cm]?ts$/u;
19443
19526
  const SAFE_NAME = /^[a-z][a-z0-9-]*$/u;
19444
- const EXPORT_MESSAGE = "is exported, and nothing imports it. Every name that code outside a package can use exists only while something uses it, and fallow never reports what an entry exports as unused. Delete the subpath, or import it from the code that needs it.";
19445
19527
  const COMMAND_MESSAGE = "is declared, and no task, workflow, hook or skill runs it. Every name that a caller outside a package can use exists only while something uses it. Delete the command, or run it from what needs it.";
19446
19528
  const FLAG_MESSAGE = "is declared, and no task, workflow, hook or skill passes it. Every name that a caller outside a package can use exists only while something uses it. Delete the flag, or pass it from what needs it.";
19447
19529
  const reachOf = ({ manifest }) => {
@@ -19456,18 +19538,14 @@ const workspaceOf$1 = Effect.fn("workspaceOf")(function* workspaceOf(root, direc
19456
19538
  manifest: found
19457
19539
  })));
19458
19540
  });
19459
- const specifiersOf = ({ name, exports }) => pipe(Option.fromUndefinedOr(name), Option.filter(() => Predicate.isNotUndefined(exports)), Option.map((own) => pipe(exportEntriesOf(exports), Array$1.map(([subpath]) => subpath), Array$1.filter((subpath) => subpath !== MANIFEST_SUBPATH && !String$1.includes(WILDCARD)(subpath)), Array$1.map((subpath) => String$1.replace(ROOT_SUBPATH$1, own)(subpath)))), Option.getOrElse(() => []));
19460
- const imports = (specifier) => ({ text }) => pipe(QUOTES, Array$1.some((quote) => String$1.includes(`${specifier}${quote}`)(text)));
19461
- const exportProblems = (root, join, corpus) => ({ directory, manifest }) => {
19462
- const importersOf = (specifier) => pipe(corpus, Array$1.filter(({ file }) => specifier !== manifest.name || !MANIFEST.test(file)));
19463
- return pipe(specifiersOf(manifest), Array$1.filter((specifier) => !pipe(importersOf(specifier), Array$1.some(imports(specifier)))), Array$1.map((specifier) => problemInFile(EXPORT_RULE)(join(root, directory, PACKAGE_JSON_FILE), `${specifier} ${EXPORT_MESSAGE}`)));
19464
- };
19465
19541
  const declaredIn = (pattern) => (source) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source.text)), Array$1.flatMap((found) => pipe(Option.fromUndefinedOr(found.groups), Option.flatMap(Record.get(NAME_GROUP)), Option.map((name) => ({
19466
19542
  name,
19467
19543
  index: found.index ?? START$2,
19468
19544
  source
19469
19545
  })), Option.toArray)));
19470
- const elsewhere = (corpus) => ({ source }) => pipe(corpus, Array$1.filter(({ file }) => file !== source.file));
19546
+ const runIn = (source) => pipe(Array$1.fromIterable(String$1.matchAll(RUN_COMMAND)(source.text)), Array$1.flatMap((found) => pipe(Option.fromUndefinedOr(found.groups), Option.flatMap(Record.get(NAME_GROUP)), Option.toArray)));
19547
+ const isRoot$1 = ({ index, source }) => pipe(runIn(source), Array$1.some((binding) => new RegExp(`\\b${binding}\\s*=\\s*$`, "u").test(String$1.slice(START$2, index)(source.text))));
19548
+ const elsewhere = (corpus) => ({ source }) => pipe(corpus, Array$1.filter((text) => text.file !== source.file && !isTest(text)));
19471
19549
  const passesFlag = (declared) => {
19472
19550
  const passed = new RegExp(`--${declared.name}(?![\\w-])`, "u");
19473
19551
  return ({ text }) => passed.test(text);
@@ -19477,7 +19555,7 @@ const runsCommand = (bins) => (declared) => {
19477
19555
  return ({ text }) => pipe(runs, Array$1.some((run) => run.test(text)));
19478
19556
  };
19479
19557
  const commandFilesIn = (prefix, corpus) => pipe(corpus, Array$1.flatMap(({ file }) => pipe(Option.liftPredicate(file, String$1.startsWith(prefix)), Option.map(String$1.slice(prefix.length)), Option.flatMap(String$1.match(COMMAND_FILE)), Option.flatMap((found) => Option.fromUndefinedOr(found.groups)), Option.flatMap(Record.get(NAME_GROUP)), Option.toArray)));
19480
- const uncalledIn = (root, join, corpus) => (sources, kind) => pipe(sources, Array$1.flatMap(declaredIn(kind.pattern)), Array$1.filter(({ name }) => !Array$1.contains(kind.skipped, name)), Array$1.filter((declared) => !pipe(elsewhere(corpus)(declared), Array$1.some(kind.calls(declared)))), Array$1.map((declared) => problemAtIndex(kind.rule)(join(root, declared.source.file), declared.source.text)(declared.index, `${kind.label(declared.name)} ${kind.message}`)));
19558
+ const uncalledIn = (root, join, corpus) => (sources, kind) => pipe(sources, Array$1.flatMap(declaredIn(kind.pattern)), Array$1.filter((declared) => !Array$1.contains(kind.skipped, declared.name) && !kind.root(declared)), Array$1.filter((declared) => !pipe(elsewhere(corpus)(declared), Array$1.some(kind.calls(declared)))), Array$1.map((declared) => problemAtIndex(kind.rule)(join(root, declared.source.file), declared.source.text)(declared.index, `${kind.label(declared.name)} ${kind.message}`)));
19481
19559
  const commandProblems = (root, join, corpus) => ({ directory, manifest }) => {
19482
19560
  const prefix = `${directory}${SEPARATOR$3}`;
19483
19561
  const bins = pipe([...pipe(binEntriesOf(manifest), Array$1.map(([name]) => name)), ...commandFilesIn(prefix, corpus)], Array$1.filter((name) => SAFE_NAME.test(name)), Array$1.dedupe);
@@ -19488,6 +19566,7 @@ const commandProblems = (root, join, corpus) => ({ directory, manifest }) => {
19488
19566
  rule: COMMAND_RULE,
19489
19567
  pattern: DECLARED_COMMAND,
19490
19568
  skipped: bins,
19569
+ root: isRoot$1,
19491
19570
  message: COMMAND_MESSAGE,
19492
19571
  label: (name) => `The command ${name}`,
19493
19572
  calls: runsCommand(bins)
@@ -19496,6 +19575,7 @@ const commandProblems = (root, join, corpus) => ({ directory, manifest }) => {
19496
19575
  rule: FLAG_RULE,
19497
19576
  pattern: DECLARED_FLAG,
19498
19577
  skipped: [],
19578
+ root: () => false,
19499
19579
  message: FLAG_MESSAGE,
19500
19580
  label: (name) => `The flag --${name}`,
19501
19581
  calls: passesFlag
@@ -19509,13 +19589,20 @@ const surfaceProblems = Effect.fn("surfaceProblems")(function* surfaceProblems(r
19509
19589
  const corpus = [...yield* ownTexts(root), ...callers];
19510
19590
  const found = yield* Effect.forEach(directories, (directory) => workspaceOf$1(root, directory), { concurrency: READ_CONCURRENCY$6 });
19511
19591
  const workspaces = pipe(Array$1.getSomes(found), Array$1.filter((workspace) => reachOf(workspace) === reach));
19512
- return [...pipe(workspaces, Array$1.flatMap(exportProblems(root, files.join, corpus))), ...pipe(workspaces, Array$1.flatMap(commandProblems(root, files.join, corpus)))];
19592
+ return [...pipe(workspaces, Array$1.flatMap((owner) => exportProblems({
19593
+ root,
19594
+ join: files.join,
19595
+ corpus,
19596
+ owner
19597
+ }))), ...pipe(workspaces, Array$1.flatMap(commandProblems(root, files.join, corpus)))];
19513
19598
  });
19514
19599
  /** @internal */
19515
19600
  const checkSurfaceCallers = Effect.fn("checkSurfaceCallers")(function* checkSurfaceCallers(root) {
19601
+ const files = yield* RepositoryFiles;
19602
+ const skills = yield* textsUnder(files.join(root, INSTALLED_SKILLS$1), INSTALLED_SKILLS$1);
19516
19603
  return yield* surfaceProblems(root, {
19517
19604
  reach: "repository",
19518
- callers: []
19605
+ callers: skills
19519
19606
  });
19520
19607
  });
19521
19608
  // src/features/check-unused-workspaces/model/unused-workspaces.ts