@r_masseater/msch 0.124.0 → 0.125.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
@@ -15,7 +15,7 @@ import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as spl
15
15
  import { parse, resolveConfigFromFile } from "vite-plus";
16
16
  import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-B3SYjao5.mjs";
17
17
  import { _ as patternOf$1, a as CI_TASKS, c as MSCH_VERIFY_COMMANDS, f as existsAt, g as namedWorkspaces, m as isIgnored, n as builtTextRuleNames, r as secretsOf, s as MSCH_TASK_COMMANDS, t as TEXT_IGNORES, u as meteredCommand } from "./repository-text-DfTSvaqo.mjs";
18
- import { fileURLToPath } from "node:url";
18
+ import { fileURLToPath, pathToFileURL } from "node:url";
19
19
  import treeSitter from "@vscode/tree-sitter-wasm";
20
20
  import { t as startedOnce } from "./started-once-BN_hLlmU.mjs";
21
21
  import { getStaticTOMLValue, parseTOML } from "toml-eslint-parser";
@@ -35,6 +35,7 @@ import { DockerfileParser } from "dockerfile-ast";
35
35
  import { parse as parse$2 } from "sql-parser-cst";
36
36
  import { findPackageJson } from "@r_masseater/masseater-utils/kestrion/node";
37
37
  import { findSkillFiles } from "@tanstack/intent";
38
+ import { moduleFiles } from "@r_masseater/cc-effect-hooks";
38
39
  import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
39
40
  import { runMainWith } from "@r_masseater/masseater-utils/node-main";
40
41
  import { sdkAgentQuery } from "@r_masseater/masseater-utils/agent-query";
@@ -48,7 +49,7 @@ import { Buffer } from "node:buffer";
48
49
  import { createZstdDecompress } from "node:zlib";
49
50
  // package.json
50
51
  var name = "@r_masseater/msch";
51
- var version = "0.124.0";
52
+ var version = "0.125.0";
52
53
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
53
54
  var repository = {
54
55
  "type": "git",
@@ -691,7 +692,7 @@ const owningWorkspace = (directories) => (directory) => {
691
692
  const PLUGIN_FILE$4 = ".claude-plugin/plugin.json";
692
693
  const SKILLS_DIRECTORY = "skills";
693
694
  const SKILL_FILE$4 = "SKILL.md";
694
- const CONCURRENCY$6 = 16;
695
+ const CONCURRENCY$7 = 16;
695
696
  const SEPARATOR$27 = "/";
696
697
  const PluginManifest$1 = Schema.fromJsonString(Schema.Struct({
697
698
  name: Schema.String,
@@ -731,7 +732,7 @@ const skillsOf$1 = Effect.fn("skillsOf")(function* skillsOf(scan, plugin, direct
731
732
  const found = yield* Effect.forEach(names, (entry) => skillIn(scan, {
732
733
  plugin,
733
734
  skills
734
- }, entry), { concurrency: CONCURRENCY$6 });
735
+ }, entry), { concurrency: CONCURRENCY$7 });
735
736
  return Array$1.sort(Array$1.getSomes(found), bySkillName);
736
737
  });
737
738
  const packageVersionAt = Effect.fn("packageVersionAt")(function* packageVersionAt(directory) {
@@ -770,7 +771,7 @@ const pluginsIn$1 = Effect.fn("pluginsIn")(function* pluginsIn(root) {
770
771
  }, {
771
772
  directory: files.join(root, directory),
772
773
  published
773
- }), { concurrency: CONCURRENCY$6 });
774
+ }), { concurrency: CONCURRENCY$7 });
774
775
  return Array$1.getSomes(found);
775
776
  });
776
777
  const HYPHENATED = "-";
@@ -1095,12 +1096,12 @@ const scanText = Effect.fn("scanText")(function* scanText(listed, foundIn) {
1095
1096
  // src/features/check-overrides/model/git-subpath.ts
1096
1097
  const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
1097
1098
  const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
1098
- const RULE$80 = "git-subpath-dependency";
1099
+ const RULE$81 = "git-subpath-dependency";
1099
1100
  const WHOLE_MATCH$4 = 0;
1100
1101
  const problemAt$5 = ({ file }, source) => (found) => ({
1101
1102
  file,
1102
1103
  ...positionOf(source)(found.index ?? WHOLE_MATCH$4),
1103
- rule: RULE$80,
1104
+ rule: RULE$81,
1104
1105
  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])}\`.`
1105
1106
  });
1106
1107
  const problemsIn$24 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$5(entry, source)));
@@ -1111,13 +1112,13 @@ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(r
1111
1112
  return yield* scanText(pipe(listed, Array$1.filter(isDependencyFile)), problemsIn$24);
1112
1113
  });
1113
1114
  // src/features/check-overrides/model/restricted-rules.ts
1114
- const RULE$79 = "unnamed-restriction";
1115
+ const RULE$80 = "unnamed-restriction";
1115
1116
  const WHOLE_MATCH$3 = 0;
1116
1117
  const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-[a-z]+(?:-[a-z]+)*\\b`, "gu");
1117
1118
  const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(UNNAMED)(source)), Array$1.map((found) => ({
1118
1119
  file: entry.file,
1119
1120
  ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
1120
- rule: RULE$79,
1121
+ rule: RULE$80,
1121
1122
  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.`
1122
1123
  })));
1123
1124
  /** @internal */
@@ -1126,13 +1127,13 @@ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRe
1126
1127
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$23);
1127
1128
  });
1128
1129
  // src/features/check-overrides/model/type-exemptions.ts
1129
- const RULE$78 = "named-type-exemption";
1130
+ const RULE$79 = "named-type-exemption";
1130
1131
  const WHOLE_MATCH$2 = 0;
1131
1132
  const SPECIFIER = new RegExp(`["']?\\bfrom["']?\\s*:\\s*["'](?:file|lib|package)["']`, "gu");
1132
1133
  const problemsIn$22 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(SPECIFIER)(source)), Array$1.map((found) => ({
1133
1134
  file: entry.file,
1134
1135
  ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
1135
- rule: RULE$78,
1136
+ rule: RULE$79,
1136
1137
  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."
1137
1138
  })));
1138
1139
  /** @internal */
@@ -1148,7 +1149,7 @@ const INSTALL_REGISTRY = "https://npm.flatt.tech/";
1148
1149
  const withTrailingSlash = (url) => `${String$1.replace(TRAILING_SLASH$1, "")(url)}/`;
1149
1150
  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)))));
1150
1151
  // src/features/check-overrides/model/package-registry.ts
1151
- const RULE$77 = "package-registry";
1152
+ const RULE$78 = "package-registry";
1152
1153
  const WORKSPACE_FILE$6 = "pnpm-workspace.yaml";
1153
1154
  const NPMRC = /(?:^|\/)\.npmrc$/u;
1154
1155
  const WORKSPACE_REGISTRY = /^registry:/mu;
@@ -1162,7 +1163,7 @@ const offsetIn$1 = (found) => pipe(Option.fromNullishOr(found), Option.map(({ in
1162
1163
  const workspaceProblem = ({ file, source }, registry) => ({
1163
1164
  file,
1164
1165
  ...positionOf(source)(offsetIn$1(WORKSPACE_REGISTRY.exec(source))),
1165
- rule: RULE$77,
1166
+ rule: RULE$78,
1166
1167
  message: Option.match(registry, {
1167
1168
  onNone: () => `${REASON$4} Set \`registry: ${INSTALL_REGISTRY}\` in ${WORKSPACE_FILE$6}.`,
1168
1169
  onSome: (value) => `${REASON$4} \`registry\` is ${value}. Set it to ${INSTALL_REGISTRY}.`
@@ -1171,7 +1172,7 @@ const workspaceProblem = ({ file, source }, registry) => ({
1171
1172
  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) => ({
1172
1173
  file: entry.file,
1173
1174
  ...positionOf(source)(found.index ?? START$34),
1174
- rule: RULE$77,
1175
+ rule: RULE$78,
1175
1176
  message: `${REASON$4} This .npmrc overrides it with \`${String$1.trim(found[START$34])}\`. Remove the line.`
1176
1177
  })));
1177
1178
  const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root) {
@@ -1249,7 +1250,7 @@ const SELF_HOMEPAGE = homepage;
1249
1250
  const SELF_DIRECTORY = repository.directory;
1250
1251
  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`;
1251
1252
  // src/features/check-overrides/model/removed-peers.ts
1252
- const RULE$76 = "removed-peer";
1253
+ const RULE$77 = "removed-peer";
1253
1254
  const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
1254
1255
  const REMOVED = "-";
1255
1256
  const PARENT_SEPARATOR = ">";
@@ -1276,7 +1277,7 @@ const problemAt$4 = (file, { key, line, column }) => ({ peer, dependent }) => ({
1276
1277
  file,
1277
1278
  line,
1278
1279
  column,
1279
- rule: RULE$76,
1280
+ rule: RULE$77,
1280
1281
  message: `msch runs ${dependent}, which needs ${peer} as a peer, so removing ${peer} with the override ${key} breaks msch. Remove the override.`
1281
1282
  });
1282
1283
  const removalsIn = (overrides) => pipe(overrides, Record.filter(isRemoval));
@@ -3417,7 +3418,7 @@ const matcher = (patterns) => {
3417
3418
  String$1.startsWith(NEGATION$1);
3418
3419
  String$1.slice(1);
3419
3420
  // src/features/check-placement/model/colocated-git-patterns.ts
3420
- const RULE$75 = "colocated-git-patterns";
3421
+ const RULE$76 = "colocated-git-patterns";
3421
3422
  const PATTERN_FILES = [":(glob)**/.gitignore", ":(glob)**/.gitattributes"];
3422
3423
  const ROOT$3 = ".";
3423
3424
  const NEGATION = "!";
@@ -3464,7 +3465,7 @@ const entriesIn$2 = Effect.fn("entriesIn")(function* entriesIn(root, file) {
3464
3465
  const toEntry = entryOf$2(absolute, files.basename(file), files.dirname(file));
3465
3466
  return pipe(Option.getOrElse(text, () => ""), String$1.split("\n"), Array$1.map(toEntry), Array$1.getSomes);
3466
3467
  });
3467
- const patternProblem = (entry, message) => problemAtPosition(RULE$75)(entry.file, {
3468
+ const patternProblem = (entry, message) => problemAtPosition(RULE$76)(entry.file, {
3468
3469
  line: entry.line,
3469
3470
  column: FIRST$26
3470
3471
  }, message);
@@ -3527,7 +3528,7 @@ const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(functio
3527
3528
  return Array$1.getSomes([...misplacedFound, ...repeatedFound]);
3528
3529
  });
3529
3530
  // src/features/check-placement/model/colocated-tests.ts
3530
- const RULE$74 = "colocated-test";
3531
+ const RULE$75 = "colocated-test";
3531
3532
  const FIRST$25 = 1;
3532
3533
  const READ_CONCURRENCY$39 = 64;
3533
3534
  const ROOT_SUBPATH$1 = ".";
@@ -3550,7 +3551,7 @@ const problemFor$11 = (test, message) => ({
3550
3551
  file: test.file,
3551
3552
  line: FIRST$25,
3552
3553
  column: FIRST$25,
3553
- rule: RULE$74,
3554
+ rule: RULE$75,
3554
3555
  message: `${test.base} ${message}`
3555
3556
  });
3556
3557
  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);
@@ -3633,7 +3634,7 @@ const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblem
3633
3634
  // src/features/check-placement/model/agent-docs-length.ts
3634
3635
  const RECOMMENDED_LINES = 200;
3635
3636
  const FIRST$24 = 1;
3636
- const RULE$73 = "agent-docs-length";
3637
+ const RULE$74 = "agent-docs-length";
3637
3638
  const lineCount = (source) => pipe(String$1.trimEnd(source), String$1.split("\n")).length;
3638
3639
  const problemFor$10 = (file) => (lines) => {
3639
3640
  if (lines <= RECOMMENDED_LINES) return Option.none();
@@ -3641,14 +3642,14 @@ const problemFor$10 = (file) => (lines) => {
3641
3642
  file,
3642
3643
  line: 201,
3643
3644
  column: FIRST$24,
3644
- rule: RULE$73,
3645
+ rule: RULE$74,
3645
3646
  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.`
3646
3647
  });
3647
3648
  };
3648
3649
  /** @internal */
3649
3650
  const checkAgentDocsLength = (root) => agentDocProblems(root, (file) => (source) => problemFor$10(file)(lineCount(source)));
3650
3651
  // src/features/check-placement/model/claude-link.ts
3651
- const RULE$72 = "claude-md-link";
3652
+ const RULE$73 = "claude-md-link";
3652
3653
  const CLAUDE = "CLAUDE.md";
3653
3654
  const AGENTS = "AGENTS.md";
3654
3655
  const FIRST$23 = 1;
@@ -3667,7 +3668,7 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3667
3668
  file: path,
3668
3669
  line: FIRST$23,
3669
3670
  column: FIRST$23,
3670
- rule: RULE$72,
3671
+ rule: RULE$73,
3671
3672
  message: MESSAGE$15
3672
3673
  })));
3673
3674
  });
@@ -3676,7 +3677,7 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3676
3677
  return Array$1.getSomes(found);
3677
3678
  });
3678
3679
  // src/features/check-placement/model/dangling-links.ts
3679
- const RULE$71 = "dangling-link";
3680
+ const RULE$72 = "dangling-link";
3680
3681
  const SEPARATOR$26 = "/";
3681
3682
  const FIRST$22 = 1;
3682
3683
  const READ_CONCURRENCY$36 = 16;
@@ -3692,7 +3693,7 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
3692
3693
  file,
3693
3694
  line: FIRST$22,
3694
3695
  column: FIRST$22,
3695
- rule: RULE$71,
3696
+ rule: RULE$72,
3696
3697
  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.`
3697
3698
  })));
3698
3699
  });
@@ -3750,7 +3751,7 @@ const readReadme = Effect.fn("readReadme")(function* readReadme({ root, director
3750
3751
  }));
3751
3752
  });
3752
3753
  // src/features/check-placement/model/deployed-readme.ts
3753
- const RULE$70 = "deployed-readme";
3754
+ const RULE$71 = "deployed-readme";
3754
3755
  const ROOT_DIRECTORY$4 = "";
3755
3756
  const READ_CONCURRENCY$35 = 16;
3756
3757
  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.";
@@ -3790,14 +3791,14 @@ const problemIn$7 = Effect.fn("problemIn")(function* problemIn(root, directory)
3790
3791
  const readme = yield* readReadme({
3791
3792
  root,
3792
3793
  directory,
3793
- rule: RULE$70,
3794
+ rule: RULE$71,
3794
3795
  missingMessage: MISSING_MESSAGE$2
3795
3796
  });
3796
3797
  return Result.match(readme, {
3797
3798
  onFailure: Option.some,
3798
3799
  onSuccess: ({ file, source }) => pipe(Option.liftPredicate(source, (text) => !URL_PATTERN.test(text)), Option.map(() => fileProblem$1({
3799
3800
  file,
3800
- rule: RULE$70,
3801
+ rule: RULE$71,
3801
3802
  message: NO_URL_MESSAGE
3802
3803
  })))
3803
3804
  });
@@ -3814,7 +3815,7 @@ const checkDeployedReadme = Effect.fn("checkDeployedReadme")(function* checkDepl
3814
3815
  return Array$1.getSomes(found);
3815
3816
  });
3816
3817
  // src/features/check-placement/model/nested-docs.ts
3817
- const RULE$69 = "nested-docs";
3818
+ const RULE$70 = "nested-docs";
3818
3819
  const CONFIG_FILE$9 = "vite.config.ts";
3819
3820
  const SEPARATOR$24 = "/";
3820
3821
  const READ_CONCURRENCY$34 = 64;
@@ -3827,7 +3828,7 @@ const RootConfig$1 = Schema.Struct({ msch: Schema.Struct({ workspaceAgentsMd: Sc
3827
3828
  const taggedError$13 = Schema.TaggedError;
3828
3829
  var RootConfigUnreadable = class extends taggedError$13()("RootConfigUnreadable", { file: Schema.String }) {};
3829
3830
  const isNested = (name) => String$1.includes(SEPARATOR$24)(name);
3830
- const problemFor$9 = problemInFile(RULE$69);
3831
+ const problemFor$9 = problemInFile(RULE$70);
3831
3832
  const AGENT_DOCS_MESSAGE = "belongs only at the repository root. Move what agents need into the root AGENTS.md and delete this file.";
3832
3833
  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.";
3833
3834
  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.";
@@ -3884,7 +3885,7 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3884
3885
  return [...Array$1.getSomes(found), ...missing];
3885
3886
  });
3886
3887
  // src/features/check-placement/model/published-readme.ts
3887
- const RULE$68 = "published-readme";
3888
+ const RULE$69 = "published-readme";
3888
3889
  const READ_CONCURRENCY$33 = 16;
3889
3890
  const MESSAGE$14 = "contains Japanese. This package is published to npm, so write its README in English.";
3890
3891
  const MISSING_MESSAGE = "is missing. This package is published to npm, so give it an English README.md.";
@@ -3892,7 +3893,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3892
3893
  const readme = yield* readReadme({
3893
3894
  root,
3894
3895
  directory,
3895
- rule: RULE$68,
3896
+ rule: RULE$69,
3896
3897
  missingMessage: MISSING_MESSAGE
3897
3898
  });
3898
3899
  return Result.match(readme, {
@@ -3903,7 +3904,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3903
3904
  file,
3904
3905
  line,
3905
3906
  column,
3906
- rule: RULE$68,
3907
+ rule: RULE$69,
3907
3908
  message: MESSAGE$14
3908
3909
  };
3909
3910
  }))
@@ -3916,7 +3917,7 @@ const checkPublishedReadme = Effect.fn("checkPublishedReadme")(function* checkPu
3916
3917
  return Array$1.getSomes(found);
3917
3918
  });
3918
3919
  // src/features/check-placement/model/published-tests.ts
3919
- const RULE$67 = "published-tests";
3920
+ const RULE$68 = "published-tests";
3920
3921
  const FILE_START = 1;
3921
3922
  const TEST_FILE$3 = /\.test\.[cm]?[jt]sx?$/u;
3922
3923
  const MESSAGE$13 = "belongs to a package published to npm that has no tests. Write tests for what the package offers before publishing it.";
@@ -3930,7 +3931,7 @@ const problemFor$8 = Effect.fn("problemFor")(function* problemFor(root, listed,
3930
3931
  file: files.join(absolute, PACKAGE_JSON_FILE),
3931
3932
  line: FILE_START,
3932
3933
  column: FILE_START,
3933
- rule: RULE$67,
3934
+ rule: RULE$68,
3934
3935
  message: MESSAGE$13
3935
3936
  });
3936
3937
  });
@@ -3944,7 +3945,7 @@ const checkPublishedTests = Effect.fn("checkPublishedTests")(function* checkPubl
3944
3945
  return Array$1.getSomes(found);
3945
3946
  });
3946
3947
  // src/features/check-placement/model/root-docs.ts
3947
- const RULE$66 = "root-docs";
3948
+ const RULE$67 = "root-docs";
3948
3949
  const SEPARATOR$23 = "/";
3949
3950
  const FIRST$20 = 1;
3950
3951
  const MARKDOWN$6 = /\.(?:md|mdx|markdown)$/iu;
@@ -3959,12 +3960,12 @@ const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
3959
3960
  file: files.join(root, name),
3960
3961
  line: FIRST$20,
3961
3962
  column: FIRST$20,
3962
- rule: RULE$66,
3963
+ rule: RULE$67,
3963
3964
  message: `${name} ${MESSAGE$12}`
3964
3965
  })));
3965
3966
  });
3966
3967
  // src/features/check-placement/model/root-readme.ts
3967
- const RULE$65 = "root-readme";
3968
+ const RULE$66 = "root-readme";
3968
3969
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
3969
3970
  const READ_CONCURRENCY$32 = 16;
3970
3971
  const START$32 = 0;
@@ -4007,7 +4008,7 @@ const problemsIn$21 = (file, source, plugins) => (workspace) => {
4007
4008
  const message = messageFor$5(workspace.directory);
4008
4009
  const at = positionOf(source);
4009
4010
  const pattern = patternFor(plugins)(workspace);
4010
- return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$65)(file, at(found.index ?? START$32), message)));
4011
+ return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$66)(file, at(found.index ?? START$32), message)));
4011
4012
  };
4012
4013
  const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces, plugins) {
4013
4014
  const text = yield* (yield* RepositoryFiles).readFile(file);
@@ -4044,7 +4045,7 @@ const checkDocPlacement = Effect.fn("checkDocPlacement")(function* checkDocPlace
4044
4045
  return Array$1.flatten(found);
4045
4046
  });
4046
4047
  // src/features/check-placement/model/docs-mirror.ts
4047
- const RULE$64 = "docs-mirror";
4048
+ const RULE$65 = "docs-mirror";
4048
4049
  const DOC = /(?:^|\/)(?:README|AGENTS|ARCHITECTURE|CLAUDE|SKILL)\.md$/u;
4049
4050
  const MIRROR_LIMIT = 3;
4050
4051
  const READ_CONCURRENCY$31 = 16;
@@ -4069,7 +4070,7 @@ const problemFor$7 = (file, source, mentions) => pipe(Array$1.head(mentions), Op
4069
4070
  file,
4070
4071
  line,
4071
4072
  column,
4072
- rule: RULE$64,
4073
+ rule: RULE$65,
4073
4074
  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.`
4074
4075
  };
4075
4076
  }), Option.toArray);
@@ -4101,7 +4102,7 @@ const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(r
4101
4102
  return Array$1.flatten(found);
4102
4103
  });
4103
4104
  // src/features/check-placement/model/ignored-sources.ts
4104
- const RULE$63 = "ignored-sources";
4105
+ const RULE$64 = "ignored-sources";
4105
4106
  const SOURCES = [":(glob)**/src/**", ":(exclude,glob)**/node_modules/**"];
4106
4107
  const FIRST$19 = 1;
4107
4108
  const MESSAGE$11 = "is under src/ but .gitignore ignores it, so verify passes here while the file never reaches the commit. Narrow the pattern in .gitignore.";
@@ -4113,7 +4114,7 @@ const checkIgnoredSources = Effect.fn("checkIgnoredSources")(function* checkIgno
4113
4114
  file: files.join(root, file),
4114
4115
  line: FIRST$19,
4115
4116
  column: FIRST$19,
4116
- rule: RULE$63,
4117
+ rule: RULE$64,
4117
4118
  message: MESSAGE$11
4118
4119
  })));
4119
4120
  });
@@ -12870,13 +12871,13 @@ const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModule
12870
12871
  return [...sliceNameProblems(root, files.join, sources), ...Array$1.flatMap(Array$1.getSomes(read), problemsOf$4)];
12871
12872
  });
12872
12873
  // src/features/check-placement/model/shadcn-ui-alias.ts
12873
- const RULE$62 = "shadcn-ui-alias";
12874
+ const RULE$63 = "shadcn-ui-alias";
12874
12875
  const FIRST$18 = 1;
12875
12876
  const problemOf$12 = (directory, { file, alias }) => ({
12876
12877
  file,
12877
12878
  line: FIRST$18,
12878
12879
  column: FIRST$18,
12879
- rule: RULE$62,
12880
+ rule: RULE$63,
12880
12881
  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/*".`
12881
12882
  });
12882
12883
  /** @internal */
@@ -13144,7 +13145,7 @@ const tsconfigMentions = Effect.fn("tsconfigMentions")(function* tsconfigMention
13144
13145
  ])));
13145
13146
  });
13146
13147
  // src/features/check-repository-layout/model/config-paths.ts
13147
- const RULE$61 = "config-path";
13148
+ const RULE$62 = "config-path";
13148
13149
  const WORKSPACE_FILE$4 = "pnpm-workspace.yaml";
13149
13150
  const CARGO_MANIFEST = /(?:^|\/)Cargo\.toml$/u;
13150
13151
  const TSCONFIG = /(?:^|\/)tsconfig(?:\.[\w-]+)?\.json$/u;
@@ -13163,7 +13164,7 @@ const byIndex = Order.mapInput(Order.Number, ({ index }) => index);
13163
13164
  const problemOf$11 = (file, source) => (mention) => ({
13164
13165
  file,
13165
13166
  ...positionOf(source)(mention.index),
13166
- rule: RULE$61,
13167
+ rule: RULE$62,
13167
13168
  message: `${mention.field} names ${mention.text}, which does not exist in this repository. Point it at a path that exists or remove the entry.`
13168
13169
  });
13169
13170
  const mentionsIn = Effect.fn("mentionsIn")(function* mentionsIn(file, source) {
@@ -13188,7 +13189,7 @@ const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatt
13188
13189
  return pipe(patterns, Array$1.map((pattern) => ({
13189
13190
  file,
13190
13191
  ...positionOf(source.value)(indexOfText(source.value)(pattern)),
13191
- rule: RULE$61,
13192
+ rule: RULE$62,
13192
13193
  message: `packages lists ${pattern}, which matches no workspace package. Point it at directories that have a package.json or remove the entry.`
13193
13194
  })));
13194
13195
  });
@@ -13200,7 +13201,7 @@ const checkConfigPaths = Effect.fn("checkConfigPaths")(function* checkConfigPath
13200
13201
  return [...Array$1.flatten(found), ...patterns];
13201
13202
  });
13202
13203
  // src/features/check-repository-layout/model/crates.ts
13203
- const RULE$60 = "unverified-crate";
13204
+ const RULE$61 = "unverified-crate";
13204
13205
  const VERSION_RULE = "release-version";
13205
13206
  const APP_DIRECTORIES = ["", "src-tauri"];
13206
13207
  const CARGO_FILE$1 = "Cargo.toml";
@@ -13212,7 +13213,7 @@ const problemFor$6 = (crate, message) => ({
13212
13213
  file: crate.manifest,
13213
13214
  line: FIRST$16,
13214
13215
  column: FIRST$16,
13215
- rule: RULE$60,
13216
+ rule: RULE$61,
13216
13217
  message: `crate ${crate.name} ${message}, so vp run verify never checks it.`
13217
13218
  });
13218
13219
  const problemIn$3 = Effect.fn("problemIn")(function* problemIn(root, directories, crate) {
@@ -13251,7 +13252,7 @@ const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
13251
13252
  return Array$1.getSomes(Array$1.flatten(found));
13252
13253
  });
13253
13254
  // src/features/check-repository-layout/model/deploy-entry-patterns.ts
13254
- const RULE$59 = "deploy-entry-pattern";
13255
+ const RULE$60 = "deploy-entry-pattern";
13255
13256
  const FALLOW_KEYS = [
13256
13257
  "entry",
13257
13258
  "entryPoints",
@@ -13322,7 +13323,7 @@ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(request) {
13322
13323
  return pipe(Array$1.getSomes(flagged), Array$1.map(({ text: pattern, start }) => ({
13323
13324
  file: path,
13324
13325
  ...positionOf(text.value)(start - kind.offset),
13325
- rule: RULE$59,
13326
+ rule: RULE$60,
13326
13327
  message: `${pattern} ${MESSAGE$10}`
13327
13328
  })));
13328
13329
  });
@@ -13355,7 +13356,7 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
13355
13356
  return Array$1.flatten(found);
13356
13357
  });
13357
13358
  // src/features/check-repository-layout/model/fallow-entries.ts
13358
- const RULE$58 = "listed-entry";
13359
+ const RULE$59 = "listed-entry";
13359
13360
  const ENTRY_KEYS = [
13360
13361
  "entry",
13361
13362
  "entryPoints",
@@ -13385,7 +13386,7 @@ const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
13385
13386
  return pipe(entryPatternsIn(parsed.program), Array$1.filter(namesOneFile(directories)), Array$1.map(({ text: pattern, start }) => ({
13386
13387
  file: path,
13387
13388
  ...positionOf(text.value)(start),
13388
- rule: RULE$58,
13389
+ rule: RULE$59,
13389
13390
  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.`
13390
13391
  })));
13391
13392
  });
@@ -13397,7 +13398,7 @@ const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallow
13397
13398
  return Array$1.flatten(found);
13398
13399
  });
13399
13400
  // src/features/check-repository-layout/model/root-workspace-paths.ts
13400
- const RULE$57 = "root-workspace-path";
13401
+ const RULE$58 = "root-workspace-path";
13401
13402
  const CONFIG_FILE$7 = "vite.config.ts";
13402
13403
  const PATH_CHARACTER = /[\w.@/-]/u;
13403
13404
  const NAME_CHARACTER = /[\w.@-]/u;
@@ -13416,7 +13417,7 @@ const mentions = (directory) => (text) => {
13416
13417
  const problemsIn$16 = (file, source, directories) => (found) => pipe(directories, Array$1.filter((directory) => mentions(directory)(found.text)), Array$1.map((directory) => ({
13417
13418
  file,
13418
13419
  ...positionOf(source)(found.start),
13419
- rule: RULE$57,
13420
+ rule: RULE$58,
13420
13421
  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.`
13421
13422
  })));
13422
13423
  /** @internal */
@@ -13430,7 +13431,7 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
13430
13431
  return pipe(stringsIn(parsed.program), Array$1.flatMap(problemsIn$16(file, source.value, directories)));
13431
13432
  });
13432
13433
  // src/features/check-repository-layout/model/hidden-verify.ts
13433
- const RULE$56 = "hidden-verify";
13434
+ const RULE$57 = "hidden-verify";
13434
13435
  const CONFIG_FILE$6 = "vite.config.ts";
13435
13436
  const FIRST$14 = 1;
13436
13437
  const READ_CONCURRENCY$24 = 8;
@@ -13444,7 +13445,7 @@ const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory)
13444
13445
  file,
13445
13446
  line: FIRST$14,
13446
13447
  column: FIRST$14,
13447
- rule: RULE$56,
13448
+ rule: RULE$57,
13448
13449
  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}.`
13449
13450
  }).pipe(Option.filter(() => verified));
13450
13451
  });
@@ -13455,7 +13456,7 @@ const checkHiddenVerify = Effect.fn("checkHiddenVerify")(function* checkHiddenVe
13455
13456
  return Array$1.getSomes(found);
13456
13457
  });
13457
13458
  // src/features/check-repository-layout/model/shared-uncached-tasks.ts
13458
- const RULE$55 = "shared-uncached-task";
13459
+ const RULE$56 = "shared-uncached-task";
13459
13460
  const READ_CONCURRENCY$23 = 8;
13460
13461
  const SHARED = 2;
13461
13462
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
@@ -13498,7 +13499,7 @@ const problemsOf$3 = (definitions) => {
13498
13499
  return pipe(definitions, Array$1.map(({ file, position, name, command }) => ({
13499
13500
  file,
13500
13501
  ...position,
13501
- rule: RULE$55,
13502
+ rule: RULE$56,
13502
13503
  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.`
13503
13504
  })));
13504
13505
  };
@@ -13509,7 +13510,7 @@ const checkSharedUncachedTasks = Effect.fn("checkSharedUncachedTasks")(function*
13509
13510
  return pipe(Array$1.flatten(found), Array$1.groupBy(({ name, definition }) => `${name}\u0000${definition}`), Record.values, Array$1.flatMap(problemsOf$3));
13510
13511
  });
13511
13512
  // src/features/check-repository-layout/model/tested-verify.ts
13512
- const RULE$54 = "tested-verify";
13513
+ const RULE$55 = "tested-verify";
13513
13514
  const READ_CONCURRENCY$22 = 8;
13514
13515
  const TESTS = new Set(TEST_TASK_NAMES);
13515
13516
  const RUNS_TESTS = /\b(?:vp|cargo) test\b/u;
@@ -13538,7 +13539,7 @@ const problemsIn$15 = Effect.fn("problemsIn")(function* problemsIn(root, directo
13538
13539
  return pipe(Option.toArray(config), Array$1.flatMap(({ file, source, program }) => pipe(testedEdges(runTasksIn(program)), Array$1.map(({ to, at }) => ({
13539
13540
  file,
13540
13541
  ...positionOf(source)(at.start),
13541
- rule: RULE$54,
13542
+ rule: RULE$55,
13542
13543
  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.`
13543
13544
  })))));
13544
13545
  });
@@ -13549,7 +13550,7 @@ const checkTestedVerify = Effect.fn("checkTestedVerify")(function* checkTestedVe
13549
13550
  return Array$1.flatten(found);
13550
13551
  });
13551
13552
  // src/features/check-repository-layout/model/unlocked-tasks.ts
13552
- const RULE$53 = "unlocked-task";
13553
+ const RULE$54 = "unlocked-task";
13553
13554
  const READ_CONCURRENCY$21 = 8;
13554
13555
  const READS_DEPENDENCIES = /^vp (?:test|pack|build)\b/u;
13555
13556
  const decodeCommand = Schema.decodeUnknownOption(Schema.Union([Schema.String, Schema.NonEmptyArray(Schema.String)]));
@@ -13561,7 +13562,7 @@ const tracksLockfiles = (task) => pipe(propertyValue("cache")(task.value), Optio
13561
13562
  const problemsOf$2 = ({ file, source, tasks }) => pipe(tasks, Array$1.filter(tracksLockfiles), Array$1.flatMap((task) => pipe(commandOf(task), Option.map((command) => ({
13562
13563
  file,
13563
13564
  ...positionOf(source)(task.start),
13564
- rule: RULE$53,
13565
+ rule: RULE$54,
13565
13566
  message: `The task ${keyName(task.key)} runs ${command} with inputs written by hand. It then reruns after every lockfile change, and it does not rerun when a dependency of a dependency moves. Set cache to LOCKED from @r_masseater/msch/locked-inputs.`
13566
13567
  })), Option.toArray)));
13567
13568
  /** @internal */
@@ -13877,7 +13878,7 @@ const baseRevision = Effect.fn("baseRevision")(function* baseRevision(root) {
13877
13878
  return yield* files.mergeBase(root, base);
13878
13879
  });
13879
13880
  // src/features/check-migration-order/model/migration-order.ts
13880
- const RULE$52 = "migration-order";
13881
+ const RULE$53 = "migration-order";
13881
13882
  const SNAPSHOT = "snapshot.json";
13882
13883
  const MIGRATION = "migration.sql";
13883
13884
  const SNAPSHOTS = [`*/${SNAPSHOT}`];
@@ -13911,7 +13912,7 @@ const outOfOrder = (root, base, join) => (migrations) => pipe(latestOf(migration
13911
13912
  file: join(root, file),
13912
13913
  line: FIRST$13,
13913
13914
  column: FIRST$13,
13914
- rule: RULE$52,
13915
+ rule: RULE$53,
13915
13916
  message: `${folder} is new, but it sorts before ${latest.folder}, which ${base} already has. A database that has applied ${latest.folder} rejects an earlier migration, so delete ${folder} and generate it again after ${latest.folder}.`
13916
13917
  })))), Option.getOrElse(() => []));
13917
13918
  /** @internal */
@@ -14014,15 +14015,15 @@ const vendorFiles = Effect.fn("vendorFiles")(function* vendorFiles(request) {
14014
14015
  return pipe(output.output, Array$1.filter(isChunk$2), Array$1.map((chunk) => [chunk.fileName, chunk.code]), Record.fromEntries, Record.set(`${request.name}.d.ts`, `export * from "${request.name}";\n`));
14015
14016
  });
14016
14017
  // src/features/check-mod-vendor/model/mod-vendor.ts
14017
- const RULE$51 = "mod-vendor";
14018
+ const RULE$52 = "mod-vendor";
14018
14019
  const VENDOR = "vendor";
14019
14020
  const SOURCE_FILE$2 = /\.[cm]?[jt]sx?$/u;
14020
14021
  const RELATIVE$1 = /^\.\.?\//u;
14021
14022
  const FILE_LIMIT = 1048576;
14022
14023
  const TOTAL_LIMIT = 8388608;
14023
- const CONCURRENCY$5 = 4;
14024
+ const CONCURRENCY$6 = 4;
14024
14025
  const EMPTY$3 = "";
14025
- const problemFor$5 = problemInFile(RULE$51);
14026
+ const problemFor$5 = problemInFile(RULE$52);
14026
14027
  const isModSource = (directory) => (file) => String$1.startsWith(directory)(file) && !String$1.startsWith(`${directory}${VENDOR}/`)(file) && SOURCE_FILE$2.test(file);
14027
14028
  const sourcesOf$2 = (plugin, directory, join) => pipe(plugin.files, Array$1.filter(isModSource(directory)), Array$1.map((file) => join(plugin.directory, file)));
14028
14029
  const modsOf = Effect.fn("modsOf")(function* modsOf(root, plugin) {
@@ -14045,7 +14046,7 @@ const wantedIn$1 = Effect.fn("wantedIn")(function* wantedIn(mod, file) {
14045
14046
  return pipe(declarations, Array$1.filter(({ specifier }) => RELATIVE$1.test(specifier)), Array$1.flatMap(({ specifier, names }) => pipe(packagesOf(specifier), Array$1.map((name) => [name, names]))));
14046
14047
  });
14047
14048
  const wantedOf = Effect.fn("wantedOf")(function* wantedOf(mod) {
14048
- const found = yield* Effect.forEach(mod.sources, (file) => wantedIn$1(mod, file), { concurrency: CONCURRENCY$5 });
14049
+ const found = yield* Effect.forEach(mod.sources, (file) => wantedIn$1(mod, file), { concurrency: CONCURRENCY$6 });
14049
14050
  return pipe(Array$1.flatten(found), Array$1.groupBy(([name]) => name), Record.map(Array$1.flatMap(([, names]) => names)));
14050
14051
  });
14051
14052
  const expectedOf = Effect.fn("expectedOf")(function* expectedOf(mod, wanted) {
@@ -14060,7 +14061,7 @@ const expectedOf = Effect.fn("expectedOf")(function* expectedOf(mod, wanted) {
14060
14061
  const currentOf = Effect.fn("currentOf")(function* currentOf(mod) {
14061
14062
  const files = yield* RepositoryFiles;
14062
14063
  const entries = yield* files.walkDirectory(mod.vendor);
14063
- const read = yield* Effect.forEach(entries, (name) => files.readFile(files.join(mod.vendor, name)).pipe(Effect.map(Option.map((text) => [name, text]))), { concurrency: CONCURRENCY$5 });
14064
+ const read = yield* Effect.forEach(entries, (name) => files.readFile(files.join(mod.vendor, name)).pipe(Effect.map(Option.map((text) => [name, text]))), { concurrency: CONCURRENCY$6 });
14064
14065
  return Record.fromEntries(Array$1.getSomes(read));
14065
14066
  });
14066
14067
  const byteLength = (text) => new TextEncoder().encode(text).length;
@@ -14071,15 +14072,15 @@ const sizeProblems = (mod, expected) => {
14071
14072
  return [...fileProblems(mod, sizes), ...totalProblems(mod, sizes)];
14072
14073
  };
14073
14074
  const sameFiles = (current, expected) => Record.size(current) === Record.size(expected) && pipe(Record.toEntries(expected), Array$1.every(([name, text]) => Option.contains(Record.get(current, name), text)));
14074
- const rewrite$1 = Effect.fn("rewrite")(function* rewrite(mod, current, expected) {
14075
+ const rewrite$2 = Effect.fn("rewrite")(function* rewrite(mod, current, expected) {
14075
14076
  const files = yield* RepositoryFiles;
14076
14077
  const stale = pipe(Record.keys(current), Array$1.filter((name) => !Record.has(expected, name)));
14077
14078
  yield* Effect.forEach(stale, (name) => files.removeFile(files.join(mod.vendor, name)), {
14078
- concurrency: CONCURRENCY$5,
14079
+ concurrency: CONCURRENCY$6,
14079
14080
  discard: true
14080
14081
  });
14081
14082
  yield* Effect.forEach(Record.toEntries(expected), ([name, text]) => files.writeFile(files.join(mod.vendor, name), text), {
14082
- concurrency: CONCURRENCY$5,
14083
+ concurrency: CONCURRENCY$6,
14083
14084
  discard: true
14084
14085
  });
14085
14086
  });
@@ -14090,7 +14091,7 @@ const syncMod = Effect.fn("syncMod")(function* syncMod(mod) {
14090
14091
  const current = yield* currentOf(mod);
14091
14092
  const sized = sizeProblems(mod, expected);
14092
14093
  if (sameFiles(current, expected)) return sized;
14093
- yield* rewrite$1(mod, current, expected);
14094
+ yield* rewrite$2(mod, current, expected);
14094
14095
  return [problemFor$5(mod.vendor, REWRITTEN), ...sized];
14095
14096
  });
14096
14097
  const failedBundle = (mod) => (detail) => [problemFor$5(mod.vendor, `The vendor directory could not be bundled. ${detail}`)];
@@ -14100,8 +14101,8 @@ const checkMod = Effect.fn("checkMod")(function* checkMod(mod) {
14100
14101
  /** @internal */
14101
14102
  const checkModVendor = Effect.fn("checkModVendor")(function* checkModVendor(root) {
14102
14103
  const plugins = yield* pluginsIn$1(root);
14103
- const mods = yield* Effect.forEach(plugins, (plugin) => modsOf(root, plugin), { concurrency: CONCURRENCY$5 });
14104
- const found = yield* Effect.forEach(Array$1.flatten(mods), checkMod, { concurrency: CONCURRENCY$5 });
14104
+ const mods = yield* Effect.forEach(plugins, (plugin) => modsOf(root, plugin), { concurrency: CONCURRENCY$6 });
14105
+ const found = yield* Effect.forEach(Array$1.flatten(mods), checkMod, { concurrency: CONCURRENCY$6 });
14105
14106
  return Array$1.flatten(found);
14106
14107
  });
14107
14108
  // src/features/check-plugin-dependencies/model/unresolved-imports.ts
@@ -14128,7 +14129,7 @@ const unresolvedFrom = (entries) => Effect.acquireUseRelease(Effect.tryPromise({
14128
14129
  catch: bundleErrorDetail
14129
14130
  }), (bundle) => Effect.promise(() => bundle.close())).pipe(Effect.map(({ output }) => unresolvedIn(pipe(output, Array$1.filter(isChunk$1)))));
14130
14131
  // src/features/check-plugin-dependencies/model/plugin-dependencies.ts
14131
- const RULE$50 = "plugin-dependencies";
14132
+ const RULE$51 = "plugin-dependencies";
14132
14133
  const PLUGIN_FILE$3 = ".claude-plugin/plugin.json";
14133
14134
  const LOCK_FILE = "bun.lock";
14134
14135
  const SOURCE_FILE$1 = /\.[cm]?[jt]sx?$/u;
@@ -14137,7 +14138,7 @@ const SUCCESS$6 = 0;
14137
14138
  const NOT_STARTED = -1;
14138
14139
  const DETAIL_LINES = 3;
14139
14140
  const PLUGIN_CONCURRENCY = 2;
14140
- const problemFor$4 = problemInFile(RULE$50);
14141
+ const problemFor$4 = problemInFile(RULE$51);
14141
14142
  const hasDependencies = Effect.fn("hasDependencies")(function* hasDependencies(directory) {
14142
14143
  const files = yield* RepositoryFiles;
14143
14144
  const text = yield* files.readFile(files.join(directory, PACKAGE_JSON_FILE));
@@ -14366,7 +14367,7 @@ const bundleScopeOf = ({ manifest, workspace }) => ({
14366
14367
  });
14367
14368
  const stackPackagesOf = ({ devDependencies }) => pipe(Option.fromUndefinedOr(devDependencies), Option.map(Record.filter((specifier) => specifier === STACK_CATALOG)), Option.map(Record.keys), Option.getOrElse(() => []));
14368
14369
  // src/features/check-tree-shaking/model/optional-peers.ts
14369
- const RULE$49 = "optional-peer";
14370
+ const RULE$50 = "optional-peer";
14370
14371
  const REQUIRED_RULE = "required-peer";
14371
14372
  const START$28 = 0;
14372
14373
  const SINGLE$3 = 1;
@@ -14383,7 +14384,7 @@ const positionIn = (located, key, name) => {
14383
14384
  const problemFor$3 = (located, name, importers) => ({
14384
14385
  file: located.file,
14385
14386
  ...positionIn(located, DEPENDENCIES_KEY, name),
14386
- rule: RULE$49,
14387
+ rule: RULE$50,
14387
14388
  message: `${name} is imported only from ${labelsOf$1(importers)}, so installing the other entries must not require it. Move it to peerDependencies, mark it optional in peerDependenciesMeta and keep it in devDependencies.`
14388
14389
  });
14389
14390
  const requiredPeerAdvice = (fromStack) => {
@@ -14419,7 +14420,7 @@ const requiredPeerProblems = ({ located, manifest, used }) => {
14419
14420
  }));
14420
14421
  };
14421
14422
  // src/features/check-tree-shaking/model/side-effects.ts
14422
- const RULE$48 = "side-effects";
14423
+ const RULE$49 = "side-effects";
14423
14424
  const BUNDLE_CONCURRENCY$2 = 4;
14424
14425
  const START$27 = 0;
14425
14426
  const FIRST$12 = 1;
@@ -14471,11 +14472,11 @@ const keyIndex$1 = (source) => pipe(String$1.indexOf(SIDE_EFFECTS_KEY)(source),
14471
14472
  const sideEffectProblems = ({ file, source, excesses }) => pipe(excesses, Array$1.sortBy(largest), Array$1.head, Option.map((worst) => ({
14472
14473
  file,
14473
14474
  ...positionOf(source)(keyIndex$1(source)),
14474
- rule: RULE$48,
14475
+ rule: RULE$49,
14475
14476
  message: messageOf$5(worst, excesses.length)
14476
14477
  })), Option.toArray);
14477
14478
  // src/features/check-tree-shaking/model/top-level-effects.ts
14478
- const RULE$47 = "top-level-effect";
14479
+ const RULE$48 = "top-level-effect";
14479
14480
  const CODE$1 = /\.[cm]?[jt]sx?$/u;
14480
14481
  const READ_CONCURRENCY$19 = 16;
14481
14482
  const IMPORT_MESSAGE = "imports a module only for its effect, but sideEffects in package.json does not list this file, so a bundler drops the import. Import what the module exports, or list the entry that exists for its effect in sideEffects.";
@@ -14491,7 +14492,7 @@ const messageOf$4 = (statement) => {
14491
14492
  const problemsIn$14 = (api) => (file) => (source) => {
14492
14493
  const retained = api.createSourceFile(file, source);
14493
14494
  const problems = pipe(retained.sourceFile.statements, Array$1.fromIterable, Array$1.filter(isEffect), Array$1.map((statement) => problemAt$6({
14494
- rule: RULE$47,
14495
+ rule: RULE$48,
14495
14496
  message: messageOf$4(statement)
14496
14497
  })(statement)));
14497
14498
  retained.dispose();
@@ -14660,7 +14661,7 @@ const checkTreeShaking = Effect.fn("checkTreeShaking")(function* checkTreeShakin
14660
14661
  return Array$1.flatten(found);
14661
14662
  });
14662
14663
  // src/features/check-typescript-generation/model/typescript-generation.ts
14663
- const RULE$46 = "legacy-typescript";
14664
+ const RULE$47 = "legacy-typescript";
14664
14665
  const LOCKFILE = "pnpm-lock.yaml";
14665
14666
  const COMPILER = "typescript";
14666
14667
  const CURRENT_MAJOR = 7;
@@ -14691,12 +14692,12 @@ const checkTypescriptGeneration = Effect.fn("checkTypescriptGeneration")(functio
14691
14692
  file,
14692
14693
  line: lineOf$4(source)(legacy.id),
14693
14694
  column: FIRST$11,
14694
- rule: RULE$46,
14695
+ rule: RULE$47,
14695
14696
  message: messageOf$3(legacy, dependentsOf$1(Option.getOrElse(nodes, () => []))(legacy.id))
14696
14697
  })));
14697
14698
  });
14698
14699
  // src/features/check-worker-bundles/model/worker-bundles.ts
14699
- const RULE$45 = "worker-bundle";
14700
+ const RULE$46 = "worker-bundle";
14700
14701
  const BUNDLE_CONCURRENCY = 4;
14701
14702
  const PLATFORM_MODULES = [/^cloudflare:/u, /^node:/u];
14702
14703
  const CONDITIONS = [
@@ -14707,7 +14708,7 @@ const CONDITIONS = [
14707
14708
  "module",
14708
14709
  "default"
14709
14710
  ];
14710
- const problemFor$2 = problemInFile(RULE$45);
14711
+ const problemFor$2 = problemInFile(RULE$46);
14711
14712
  const problemOf$10 = (file, detail) => problemFor$2(file, `does not bundle as a Worker, so the deploy would fail. ${detail}`);
14712
14713
  const bundleProblem = (file) => Effect.gen(function* bundle() {
14713
14714
  const built = yield* Effect.tryPromise({
@@ -14900,7 +14901,7 @@ const weakeningsOf = (expected) => (config) => [
14900
14901
  ...secretWeakenings(config.h56m, expected.secrets)
14901
14902
  ];
14902
14903
  // src/app/disabled-rules.ts
14903
- const RULE$44 = "disabled-rule";
14904
+ const RULE$45 = "disabled-rule";
14904
14905
  const CONFIG_FILE$5 = "vite.config.ts";
14905
14906
  const START$25 = 0;
14906
14907
  const SIDE_CONFIG = /(?:^|\/)(?:\.oxlintrc(?:\.jsonc?)?|oxlint\.config\.[cm]?[jt]s|\.oxlintignore|\.eslintrc(?:\.\w+)?|eslint\.config\.[cm]?[jt]s|\.eslintignore|\.textlintrc(?:\.\w+)?|\.textlintignore|\.markdownlint(?:-cli2)?(?:\.\w+)?|\.markdownlintignore|\.prettierignore|\.oxfmtrc(?:\.jsonc?)?|knip\.jsonc?)$/u;
@@ -14914,7 +14915,7 @@ const sideConfigs = Effect.fn("sideConfigs")(function* sideConfigs(root) {
14914
14915
  const files = yield* RepositoryFiles;
14915
14916
  const listed = yield* files.listedFiles(root);
14916
14917
  const isExempt = matcher(exempt);
14917
- return pipe(listed, Array$1.filter((name) => SIDE_CONFIG.test(name) && !isExempt(name)), Array$1.map((name) => problemAtIndex(RULE$44)(files.join(root, name), "")(START$25, SIDE_CONFIG_MESSAGE)));
14918
+ return pipe(listed, Array$1.filter((name) => SIDE_CONFIG.test(name) && !isExempt(name)), Array$1.map((name) => problemAtIndex(RULE$45)(files.join(root, name), "")(START$25, SIDE_CONFIG_MESSAGE)));
14918
14919
  });
14919
14920
  const configWeakenings = Effect.fn("configWeakenings")(function* configWeakenings(root, source) {
14920
14921
  const file = (yield* RepositoryFiles).join(root, CONFIG_FILE$5);
@@ -14926,7 +14927,7 @@ const configWeakenings = Effect.fn("configWeakenings")(function* configWeakening
14926
14927
  })
14927
14928
  });
14928
14929
  const expected = yield* expectationsIn(root);
14929
- const at = problemAtIndex(RULE$44)(file, source);
14930
+ const at = problemAtIndex(RULE$45)(file, source);
14930
14931
  return pipe(weakeningsOf(expected)(config), Array$1.map(({ anchor, message }) => at(Option.getOrElse(String$1.indexOf(anchor)(source), () => START$25), message)));
14931
14932
  });
14932
14933
  /** @internal */
@@ -14934,7 +14935,7 @@ const checkDisabledRules = Effect.fn("checkDisabledRules")(function* checkDisabl
14934
14935
  const files = yield* RepositoryFiles;
14935
14936
  const text = yield* files.readFile(files.join(root, CONFIG_FILE$5));
14936
14937
  if (Option.isNone(text)) return [];
14937
- return [...yield* configWeakenings(root, text.value).pipe(Effect.catchTag("DisabledRulesConfigUnreadable", ({ file, reason }) => Effect.succeed([problemAtIndex(RULE$44)(file, "")(START$25, `msch could not load this file: ${reason}`)]))), ...yield* sideConfigs(root)];
14938
+ return [...yield* configWeakenings(root, text.value).pipe(Effect.catchTag("DisabledRulesConfigUnreadable", ({ file, reason }) => Effect.succeed([problemAtIndex(RULE$45)(file, "")(START$25, `msch could not load this file: ${reason}`)]))), ...yield* sideConfigs(root)];
14938
14939
  });
14939
14940
  // src/app/build-checks.ts
14940
14941
  /** @internal */
@@ -15031,7 +15032,7 @@ const fileFactsIn = (checker) => (sourceFiles, excluded) => pipe(sourceFiles, Ar
15031
15032
  imports: importedFilesOf(checker)(sourceFile)
15032
15033
  })), Array$1.filter((facts) => Array$1.isReadonlyArrayNonEmpty(facts.values) || Array$1.isReadonlyArrayNonEmpty(facts.imports)));
15033
15034
  // src/features/check-value-owners/model/name-lists.ts
15034
- const RULE$43 = "hand-written-names";
15035
+ const RULE$44 = "hand-written-names";
15035
15036
  const TEST_FILE$1 = /\.test(?:\.[\w-]+)?\.[cm]?tsx?$/u;
15036
15037
  const nameListOf = (site) => {
15037
15038
  if (TEST_FILE$1.test(site.file) || site.values.length < 2) return Option.none();
@@ -15046,7 +15047,7 @@ const listedProblem = ({ file, line, column, names, reason }) => ({
15046
15047
  file,
15047
15048
  line,
15048
15049
  column,
15049
- rule: RULE$43,
15050
+ rule: RULE$44,
15050
15051
  message: `The names ${formatValues(names)} are listed by hand, but ${reason}`
15051
15052
  });
15052
15053
  const problemOf$9 = ({ list, reason }) => listedProblem({
@@ -15837,7 +15838,7 @@ const checkRepository = Effect.fn("checkRepository")(function* checkRepository(r
15837
15838
  return sortProblems([...ownerScan.problems, ...repositoryProblems(repository)(analyses)]);
15838
15839
  }, Effect.scoped);
15839
15840
  // src/features/source-code/find-namespace-destructuring/model/namespace-destructuring.ts
15840
- const RULE$42 = "namespace-destructuring";
15841
+ const RULE$43 = "namespace-destructuring";
15841
15842
  const LOCAL = /^[.#/]/u;
15842
15843
  const messageOf$2 = (name) => `Destructuring ${name}, which comes from a package, makes the bundler keep everything ${name} exports. Write ${name}.<member> where it is used.`;
15843
15844
  const isPackage = (specifier) => isStringLiteral(specifier) && !LOCAL.test(specifier.text);
@@ -15853,7 +15854,7 @@ const destructuredName = (declaration) => {
15853
15854
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
15854
15855
  };
15855
15856
  const problemOf$8 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$6({
15856
- rule: RULE$42,
15857
+ rule: RULE$43,
15857
15858
  message: messageOf$2(name)
15858
15859
  })), Option.map((report) => report(declaration)));
15859
15860
  const namespaceDestructuringIn = () => (sourceFile) => {
@@ -15861,7 +15862,7 @@ const namespaceDestructuringIn = () => (sourceFile) => {
15861
15862
  return pipe(descendantsOf(sourceFile), Array$1.filter(isVariableDeclaration), Array$1.map(problemOf$8(names)), Array$1.getSomes);
15862
15863
  };
15863
15864
  // src/features/source-code/find-pass-through-wrappers/model/pass-through-wrappers.ts
15864
- const RULE$41 = "pass-through-wrapper";
15865
+ const RULE$42 = "pass-through-wrapper";
15865
15866
  const SINGLE_STATEMENT = 1;
15866
15867
  const SINGLE_DECLARATION = 1;
15867
15868
  const THIS_PARAMETER = "this";
@@ -15958,7 +15959,7 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
15958
15959
  const problemOf$7 = (checker) => (candidate) => {
15959
15960
  if (changesTheCall(candidate.wrapper)) return Option.none();
15960
15961
  return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$6({
15961
- rule: RULE$41,
15962
+ rule: RULE$42,
15962
15963
  message: messageOf$1(forward.callee.getText())
15963
15964
  })(candidate.name)));
15964
15965
  };
@@ -15981,7 +15982,7 @@ const repositoryOrigin = Effect.fn("repositoryOrigin")(function* repositoryOrigi
15981
15982
  /** @internal */
15982
15983
  const slugOf = ({ owner, name }) => `${owner}/${name}`;
15983
15984
  // src/features/check-agent-settings/model/known-plugins.ts
15984
- const RULE$40 = "known-plugins";
15985
+ const RULE$41 = "known-plugins";
15985
15986
  const SETTINGS_FILE$3 = ".claude/settings.json";
15986
15987
  const MARKETPLACE_FILE$2 = ".claude-plugin/marketplace.json";
15987
15988
  const GITHUB$5 = "github";
@@ -16002,12 +16003,12 @@ const MarketplaceSchema = Schema.Struct({
16002
16003
  plugins: Schema.Array(Schema.Struct({ name: Schema.String }))
16003
16004
  });
16004
16005
  const decodeMarketplace = Schema.decodeUnknownOption(Schema.fromJsonString(MarketplaceSchema));
16005
- const problem$5 = problemInFile(RULE$40);
16006
+ const problem$6 = problemInFile(RULE$41);
16006
16007
  const knownFrom = (repository, marketplace, settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(marketplace.name)), Option.exists(({ source }) => source.source === GITHUB$5 && source.repo === repository));
16007
16008
  const pluginEnabled = (settings) => (plugin) => pipe(Option.fromUndefinedOr(settings.enabledPlugins), Option.flatMap(Record.get(plugin)), Option.getOrElse(() => false));
16008
16009
  const pluginProblems = (marketplace, file, settings) => {
16009
16010
  const enabled = pluginEnabled(settings);
16010
- return pipe(marketplace.plugins, Array$1.map(({ name }) => `${name}@${marketplace.name}`), Array$1.filter((plugin) => !enabled(plugin)), Array$1.map((plugin) => problem$5(file, `The settings know this repository's own ${marketplace.name} marketplace but leave "${plugin}" off. Enable it in "enabledPlugins" so every session here gets it.`)));
16011
+ return pipe(marketplace.plugins, Array$1.map(({ name }) => `${name}@${marketplace.name}`), Array$1.filter((plugin) => !enabled(plugin)), Array$1.map((plugin) => problem$6(file, `The settings know this repository's own ${marketplace.name} marketplace but leave "${plugin}" off. Enable it in "enabledPlugins" so every session here gets it.`)));
16011
16012
  };
16012
16013
  /** @internal */
16013
16014
  const checkKnownPlugins = Effect.fn("checkKnownPlugins")(function* checkKnownPlugins(root) {
@@ -16027,7 +16028,7 @@ const checkKnownPlugins = Effect.fn("checkKnownPlugins")(function* checkKnownPlu
16027
16028
  }));
16028
16029
  });
16029
16030
  // src/features/check-agent-settings/model/missing-hooks.ts
16030
- const RULE$39 = "missing-hook";
16031
+ const RULE$40 = "missing-hook";
16031
16032
  const SETTINGS_FILE$2 = /^\.claude\/settings\.json$/u;
16032
16033
  const PLUGIN_HOOKS_FILE = /(?:^|\/)hooks\/hooks\.json$/u;
16033
16034
  const PROJECT_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PROJECT_DIR\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
@@ -16052,7 +16053,7 @@ const problemsIn$13 = Effect.fn("problemsIn")(function* problemsIn({ root, file,
16052
16053
  return pipe(missing, Array$1.map(({ path, index }) => ({
16053
16054
  file,
16054
16055
  ...positionOf(source)(index),
16055
- rule: RULE$39,
16056
+ rule: RULE$40,
16056
16057
  message: `runs ${path}, which does not exist. The hook fails every time it fires. Point it at a file that exists or remove the hook.`
16057
16058
  })));
16058
16059
  });
@@ -16080,7 +16081,7 @@ const checkMissingHooks = Effect.fn("checkMissingHooks")(function* checkMissingH
16080
16081
  return Array$1.flatten(found);
16081
16082
  });
16082
16083
  // src/features/check-agent-settings/model/project-extensions.ts
16083
- const RULE$38 = "project-claude-extensions";
16084
+ const RULE$39 = "project-claude-extensions";
16084
16085
  const SETTINGS_FILE$1 = ".claude/settings.json";
16085
16086
  const SETUP_EVENT = "SessionStart";
16086
16087
  const EXTENSION_DIRECTORIES = [
@@ -16096,8 +16097,8 @@ const decodeSettings$1 = Schema.decodeUnknownOption(Schema.fromJsonString(Settin
16096
16097
  const hookProblems = (file, source) => pipe(decodeSettings$1(source), Option.flatMap(({ hooks }) => Option.fromUndefinedOr(hooks)), Option.map(Record.keys), Option.getOrElse(() => []), Array$1.filter((event) => event !== SETUP_EVENT), Array$1.map((event) => {
16097
16098
  const message = `runs a ${event} hook from the project settings. ${REASON$3}`;
16098
16099
  return pipe(source, String$1.indexOf(`"${event}"`), Option.match({
16099
- onNone: () => problemInFile(RULE$38)(file, message),
16100
- onSome: (index) => problemAtIndex(RULE$38)(file, source)(index, message)
16100
+ onNone: () => problemInFile(RULE$39)(file, message),
16101
+ onSome: (index) => problemAtIndex(RULE$39)(file, source)(index, message)
16101
16102
  }));
16102
16103
  }));
16103
16104
  const checkProjectExtensions = Effect.fn("checkProjectExtensions")(function* checkProjectExtensions(root) {
@@ -16105,7 +16106,7 @@ const checkProjectExtensions = Effect.fn("checkProjectExtensions")(function* che
16105
16106
  const settingsFile = files.join(root, SETTINGS_FILE$1);
16106
16107
  const settings = yield* files.readFile(settingsFile);
16107
16108
  const tracked = yield* files.trackedFiles(root, EXTENSION_DIRECTORIES);
16108
- const extensionProblems = pipe(tracked, Array$1.filter((name) => pipe(EXTENSION_DIRECTORIES, Array$1.some((directory) => String$1.startsWith(directory)(name)))), Array$1.map((name) => problemInFile(RULE$38)(files.join(root, name), `is a Claude Code extension in .claude. ${REASON$3}`)));
16109
+ const extensionProblems = pipe(tracked, Array$1.filter((name) => pipe(EXTENSION_DIRECTORIES, Array$1.some((directory) => String$1.startsWith(directory)(name)))), Array$1.map((name) => problemInFile(RULE$39)(files.join(root, name), `is a Claude Code extension in .claude. ${REASON$3}`)));
16109
16110
  return [...Option.match(settings, {
16110
16111
  onNone: () => [],
16111
16112
  onSome: (source) => hookProblems(settingsFile, source)
@@ -16137,7 +16138,7 @@ const listedTasks = Effect.fn("listedTasks")(function* listedTasks(root) {
16137
16138
  }, Effect.scoped, Effect.orElseSucceed(() => Option.none()));
16138
16139
  const GivenTaskGraph = Context.Reference("msch/GivenTaskGraph", { defaultValue: () => Option.none() });
16139
16140
  // src/features/check-documented-commands/model/commands.ts
16140
- const RULE$37 = "documented-commands";
16141
+ const RULE$38 = "documented-commands";
16141
16142
  const DOCUMENTS = ["*AGENTS.md", "*CLAUDE.md"];
16142
16143
  const DOCUMENT_NAMES = /* @__PURE__ */ new Set(["AGENTS.md", "CLAUDE.md"]);
16143
16144
  const COMMAND = /`vp run (?<args>[^`]+)`/gu;
@@ -16215,7 +16216,7 @@ const isMissing = (graph, file) => ({ task, scope }) => !pipe(packagesOf(graph,
16215
16216
  const problemsIn$12 = (graph, absolute, { file, text }) => pipe(Array$1.fromIterable(String$1.matchAll(COMMAND)(text)), Array$1.flatMap((match) => pipe(Option.fromNullishOr(match.groups), Option.flatMap(Record.get(ARGS)), Option.flatMap(parsed), Option.filter(isMissing(graph, file)), Option.map(({ task, scope }) => ({
16216
16217
  file: absolute(file),
16217
16218
  ...positionOf(text)(match.index ?? START$23),
16218
- rule: RULE$37,
16219
+ rule: RULE$38,
16219
16220
  message: `${match[START$23]} runs task ${task}, but ${whereOf(scope, file)} has no such task. Fix the command or the task`
16220
16221
  })), Option.toArray)));
16221
16222
  const isDocument = (file) => pipe(String$1.split(file, SEPARATOR$12), Array$1.last, Option.exists((name) => DOCUMENT_NAMES.has(name)));
@@ -16240,14 +16241,14 @@ const checkDocumentedCommands = Effect.fn("checkDocumentedCommands")(function* c
16240
16241
  file: absolute(Array$1.headNonEmpty(commanded).file),
16241
16242
  line: ONE$2,
16242
16243
  column: ONE$2,
16243
- rule: RULE$37,
16244
+ rule: RULE$38,
16244
16245
  message: "msch could not list the tasks with `vp run --json`"
16245
16246
  }],
16246
16247
  onSome: (found) => pipe(commanded, Array$1.flatMap((document) => problemsIn$12(found, absolute, document)))
16247
16248
  });
16248
16249
  });
16249
16250
  // src/features/check-legacy-web/model/legacy-web.ts
16250
- const RULE$36 = "legacy-web";
16251
+ const RULE$37 = "legacy-web";
16251
16252
  const FIRST_COLUMN$7 = 1;
16252
16253
  const SCANNER = fileURLToPath(new URL("./skills/modern-web-guidance/modern-web.mjs", import.meta.resolve("modern-web-guidance/package.json")));
16253
16254
  const Finding = Schema.Struct({
@@ -16286,7 +16287,7 @@ const checkLegacyWeb = Effect.fn("checkLegacyWeb")(function* checkLegacyWeb(root
16286
16287
  file: files.join(root, file),
16287
16288
  line,
16288
16289
  column: FIRST_COLUMN$7,
16289
- rule: RULE$36,
16290
+ rule: RULE$37,
16290
16291
  message: `${ruleId}: ${message} Read the guide with \`modern-web-guidance retrieve ${guideId}\` and apply it.`
16291
16292
  });
16292
16293
  return pipe(scan.guides, Array$1.flatMap(({ guideId, rules }) => pipe(rules, Array$1.flatMap(({ ruleId, findings }) => pipe(findings, Array$1.map(problemOf(guideId, ruleId)))))));
@@ -16359,7 +16360,7 @@ const SETTINGS_FILE = ".claude/settings.json";
16359
16360
  const PLUGIN_HOOKS = /(?:^|\/)hooks\/hooks\.json$/u;
16360
16361
  const PLUGIN_ROOT = /\$\{CLAUDE_PLUGIN_ROOT\}/gu;
16361
16362
  const READ_CONCURRENCY$17 = 64;
16362
- const RULE$35 = "shell-script";
16363
+ const RULE$36 = "shell-script";
16363
16364
  const MESSAGE$9 = "is a shell script. Do the work in TypeScript as a Vite+ task in vite.config.ts, a test, or the tool's own hook, and delete this file. Only a SessionStart hook in .claude/settings.json or a plugin's hooks/hooks.json, which installs the toolchain or the plugin's dependencies before TypeScript can run, stays a shell script.";
16364
16365
  const HookSchema = Schema.Struct({
16365
16366
  command: Schema.optional(Schema.String),
@@ -16403,7 +16404,7 @@ const checkShellScripts = Effect.fn("checkShellScripts")(function* checkShellScr
16403
16404
  };
16404
16405
  const candidates = pipe(names, Array$1.filter((name) => !isSessionStartHook(name)));
16405
16406
  const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$17 });
16406
- return pipe(shell, Array$1.map((name) => problemInFile(RULE$35)(files.join(root, name), MESSAGE$9)));
16407
+ return pipe(shell, Array$1.map((name) => problemInFile(RULE$36)(files.join(root, name), MESSAGE$9)));
16407
16408
  });
16408
16409
  // src/features/check-structure/model/structure.ts
16409
16410
  const checkStructure = checkSection({
@@ -16641,7 +16642,7 @@ const commandSources = Effect.fn("commandSources")(function* commandSources(root
16641
16642
  return Array$1.flatten(found);
16642
16643
  });
16643
16644
  // src/features/check-vite-plus/model/package-scripts.ts
16644
- const RULE$34 = "package-script";
16645
+ const RULE$35 = "package-script";
16645
16646
  const LIFECYCLE = [
16646
16647
  "preinstall",
16647
16648
  "install",
@@ -16664,12 +16665,12 @@ const LIFECYCLE = [
16664
16665
  const problemOf$6 = ({ file, position, name }) => ({
16665
16666
  file,
16666
16667
  ...position,
16667
- rule: RULE$34,
16668
+ rule: RULE$35,
16668
16669
  message: `The script ${name} is not a lifecycle script. package.json scripts hold only the scripts the package manager runs by itself, such as prepare and prepack. Write ${name} as a task in run.tasks of this package's vite.config.ts, where its shape is type-checked.`
16669
16670
  });
16670
16671
  const packageScriptProblems = (sources) => pipe(sources, Array$1.filter(({ kind, name }) => kind === "script" && !Array$1.contains(LIFECYCLE, name)), Array$1.map(problemOf$6));
16671
16672
  // src/features/check-vite-plus/model/vite-plus-block.ts
16672
- const RULE$33 = "vite-plus-block";
16673
+ const RULE$34 = "vite-plus-block";
16673
16674
  const MARKER = Array$1.join([
16674
16675
  "<!--",
16675
16676
  "VITE PLUS START",
@@ -16682,7 +16683,7 @@ const problemIn = (file) => (source) => {
16682
16683
  return Option.some({
16683
16684
  file,
16684
16685
  ...positionOf(source)(index.value),
16685
- rule: RULE$33,
16686
+ rule: RULE$34,
16686
16687
  message: MESSAGE$8
16687
16688
  });
16688
16689
  };
@@ -16715,7 +16716,7 @@ const checkCiDrift = Effect.fn("checkCiDrift")(function* checkCiDrift(root) {
16715
16716
  return pipe(drifts, Array$1.map(problemOf$5));
16716
16717
  });
16717
16718
  // src/features/check-workflows/model/release-please.ts
16718
- const RULE$32 = "release-please";
16719
+ const RULE$33 = "release-please";
16719
16720
  const RELEASE_PLEASE_FILE = /(?:^|\/)(?:release-please-config|\.release-please-manifest)\.json$/u;
16720
16721
  const FIRST$8 = 1;
16721
16722
  const MESSAGE$7 = "releases with release-please. Releases are manual: bump the version in a PR, then run the publish workflow, which runs `msch publish` for the workspace.";
@@ -16727,7 +16728,7 @@ const checkReleasePlease = Effect.fn("checkReleasePlease")(function* checkReleas
16727
16728
  file: files.join(root, name),
16728
16729
  line: FIRST$8,
16729
16730
  column: FIRST$8,
16730
- rule: RULE$32,
16731
+ rule: RULE$33,
16731
16732
  message: MESSAGE$7
16732
16733
  })));
16733
16734
  });
@@ -17016,7 +17017,7 @@ const scannedFiles = Effect.fn("scannedFiles")(function* scannedFiles(root) {
17016
17017
  })), Array$1.filter(({ file }) => !HashSet.has(skipped, file)));
17017
17018
  });
17018
17019
  // src/features/ban-comments/model/comments.ts
17019
- const RULE$31 = "comment";
17020
+ const RULE$32 = "comment";
17020
17021
  const SUPPRESSION_RULE = "suppression";
17021
17022
  const UNUSED_RULE = "unused-comment-allowance";
17022
17023
  const CONFIG_FILE$3 = "vite.config.ts";
@@ -17048,7 +17049,7 @@ const NOTHING = {
17048
17049
  used: []
17049
17050
  };
17050
17051
  const unusedMessage = (entry) => `allows the comment pattern \`${entry}\`, but no comment in the repository matches it. Delete the entry and add it back when a comment needs it.`;
17051
- const problemOf$4 = (file, source) => (comment) => Match.value(isSuppression(comment)).pipe(Match.when(true, () => problemAtIndex(SUPPRESSION_RULE)(file, source)(comment.index, SUPPRESSION_MESSAGE)), Match.orElse(() => problemAtIndex(RULE$31)(file, source)(comment.index, MESSAGE$6)));
17052
+ const problemOf$4 = (file, source) => (comment) => Match.value(isSuppression(comment)).pipe(Match.when(true, () => problemAtIndex(SUPPRESSION_RULE)(file, source)(comment.index, SUPPRESSION_MESSAGE)), Match.orElse(() => problemAtIndex(RULE$32)(file, source)(comment.index, MESSAGE$6)));
17052
17053
  const settingsOf = ({ msch }) => ({ allow: pipe(Option.fromUndefinedOr(msch), Option.flatMap(({ comments }) => Option.fromUndefinedOr(comments)), Option.match({
17053
17054
  onNone: () => NO_SETTINGS.allow,
17054
17055
  onSome: ({ allow }) => allow
@@ -17085,7 +17086,7 @@ const scanFile = ({ directives, allowances, comments }) => ({ name, file }, sour
17085
17086
  problems: pipe(found, Array$1.filter(kept), Array$1.map(toProblem)),
17086
17087
  used: usedAllowances(allowances, found)
17087
17088
  })), Effect.catchTag("CommentsUnreadable", ({ message }) => Effect.succeed({
17088
- problems: [problemAtIndex(RULE$31)(file, source)(START$19, `msch could not read the comments in this file: ${message}`)],
17089
+ problems: [problemAtIndex(RULE$32)(file, source)(START$19, `msch could not read the comments in this file: ${message}`)],
17089
17090
  used: []
17090
17091
  })))
17091
17092
  });
@@ -17198,7 +17199,7 @@ const PYTHON = {
17198
17199
  /** @internal */
17199
17200
  const checkPython = (root) => checkBannedTool(root, PYTHON);
17200
17201
  // src/features/check-catalog-entries/model/uncataloged-dependencies.ts
17201
- const RULE$30 = "uncataloged-dependency";
17202
+ const RULE$31 = "uncataloged-dependency";
17202
17203
  const OWNED_ELSEWHERE = [
17203
17204
  "catalog:",
17204
17205
  "workspace:",
@@ -17212,7 +17213,7 @@ const isOwnedElsewhere = ({ specifier }) => pipe(OWNED_ELSEWHERE, Array$1.some((
17212
17213
  const problemsIn$11 = (entry, source) => pipe(manifestSpecifiers(source), Array$1.filter((found) => !isOwnedElsewhere(found)), Array$1.map((found) => ({
17213
17214
  file: entry.file,
17214
17215
  ...positionOf(source)(offsetIn(source)(manifestPattern(found))),
17215
- rule: RULE$30,
17216
+ rule: RULE$31,
17216
17217
  message: `\`${found.name}\` \`${found.specifier}\` ${MESSAGE$5}`
17217
17218
  })));
17218
17219
  /** @internal */
@@ -17233,7 +17234,7 @@ const uncatalogedDependencies = Effect.fn("uncatalogedDependencies")(function* u
17233
17234
  const WORKSPACE_FILE$3 = "pnpm-workspace.yaml";
17234
17235
  const FIRST_LINE$5 = 1;
17235
17236
  const FIRST_COLUMN$5 = 1;
17236
- const RULE$29 = "prune-setting-off";
17237
+ const RULE$30 = "prune-setting-off";
17237
17238
  const PRUNE_SETTINGS = [["catalogPrune", "removes catalog entries no package refers to, so the catalog holds only versions in use."], ["minimumReleaseAgeExcludePrune", "removes `minimumReleaseAgeExclude` entries the lockfile no longer resolves, which only exempted that one version while it was new."]];
17238
17239
  const decodeTrue = Schema.decodeUnknownOption(Schema.Literal(true));
17239
17240
  const lineOf$3 = (source) => (setting) => pipe(String$1.split(source, "\n"), Array$1.findFirstIndex(String$1.startsWith(`${setting}:`)), Option.match({
@@ -17247,7 +17248,7 @@ const pruneProblems = Effect.fn("pruneProblems")(function* pruneProblems(file, s
17247
17248
  file,
17248
17249
  line: at(setting),
17249
17250
  column: FIRST_COLUMN$5,
17250
- rule: RULE$29,
17251
+ rule: RULE$30,
17251
17252
  message: `Set \`${setting}: true\`. It ${effect}`
17252
17253
  })));
17253
17254
  });
@@ -17341,13 +17342,13 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
17341
17342
  ];
17342
17343
  });
17343
17344
  // src/features/check-skills/model/published-skills.ts
17344
- const RULE$28 = "published-skills";
17345
+ const RULE$29 = "published-skills";
17345
17346
  const KEYWORD = "tanstack-intent";
17346
17347
  const SKILLS = "skills";
17347
17348
  const SKILL_FILE$3 = "SKILL.md";
17348
17349
  const SUCCEEDED = 0;
17349
17350
  const INTENT_CLI = fileURLToPath(new URL("./cli.mjs", import.meta.resolve("@tanstack/intent")));
17350
- const problemAt$2 = problemInFile(RULE$28);
17351
+ const problemAt$2 = problemInFile(RULE$29);
17351
17352
  const skillDirectoriesIn = (files, directory) => pipe(findSkillFiles(files.join(directory, SKILLS)), Array$1.filter((file) => files.basename(file) === SKILL_FILE$3), Array$1.map((file) => files.relative(directory, files.dirname(file))));
17352
17353
  const isShipped = (listed) => (skill) => Array$1.contains(listed, SKILLS) || Array$1.contains(listed, skill);
17353
17354
  const packagingMessages = ({ keywords, files }, skills) => {
@@ -17384,7 +17385,7 @@ const checkPublishedSkills = Effect.fn("checkPublishedSkills")(function* checkPu
17384
17385
  return Array$1.flatten(problems);
17385
17386
  });
17386
17387
  // src/features/check-skills/model/skill-files.ts
17387
- const RULE$27 = "skill-file";
17388
+ const RULE$28 = "skill-file";
17388
17389
  const SKILL_FILE$2 = /(?:^|\/)SKILL\.md$/u;
17389
17390
  const INSTALLED = /(?:^|\/)\.(?:agents|claude|codex)\/skills\//u;
17390
17391
  const FIXTURE$1 = /(?:^|\/)fixtures\//u;
@@ -17441,7 +17442,7 @@ const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source),
17441
17442
  ]), Option.getOrElse(() => []), Array$1.map(({ index, message }) => ({
17442
17443
  file: skill.file,
17443
17444
  ...positionOf(skill.source)(index),
17444
- rule: RULE$27,
17445
+ rule: RULE$28,
17445
17446
  message
17446
17447
  })));
17447
17448
  const linkOf = (found) => pipe(groupOf("target")(found), Option.filter((target) => !EXTERNAL.test(target)), Option.map((target) => String$1.replace(FRAGMENT, "")(target)), Option.filter(String$1.isNonEmpty), Option.map((target) => ({
@@ -17468,7 +17469,7 @@ const linkProblems = Effect.fn("linkProblems")(function* linkProblems(file) {
17468
17469
  return pipe(missing, Array$1.map(({ target, index }) => ({
17469
17470
  file,
17470
17471
  ...positionOf(source)(index),
17471
- rule: RULE$27,
17472
+ rule: RULE$28,
17472
17473
  message: `links to ${target}, which does not exist. Fix the path or remove the link.`
17473
17474
  })));
17474
17475
  });
@@ -17484,7 +17485,7 @@ const problemsIn$9 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
17484
17485
  file: files.join(root, entry),
17485
17486
  line: FIRST$7,
17486
17487
  column: FIRST$7,
17487
- rule: RULE$27,
17488
+ rule: RULE$28,
17488
17489
  message: "is a license file inside a skill. Skills here carry neither a license field nor a LICENSE file. Delete it."
17489
17490
  })));
17490
17491
  return [
@@ -17562,7 +17563,7 @@ const cargoEntries = (text) => {
17562
17563
  };
17563
17564
  const toolchainEntries = (text) => singleEntry("channel", fieldOf("channel")(parseToml(text)["toolchain"]));
17564
17565
  // src/features/check-version-downgrades/model/version-downgrade.ts
17565
- const RULE$26 = "version-downgrade";
17566
+ const RULE$27 = "version-downgrade";
17566
17567
  const READ_CONCURRENCY$13 = 16;
17567
17568
  const READERS = [
17568
17569
  [/(?:^|\/)package\.json$/u, manifestEntries],
@@ -17587,7 +17588,7 @@ const downgradesIn = ({ file, text, before, after }) => {
17587
17588
  file,
17588
17589
  line: lineOf$2(text, entry),
17589
17590
  column: FIRST_LINE$4,
17590
- rule: RULE$26,
17591
+ rule: RULE$27,
17591
17592
  message: message$1(old, entry)
17592
17593
  })), Option.toArray)));
17593
17594
  };
@@ -17670,7 +17671,7 @@ const manifestTexts = Effect.fn("manifestTexts")(function* manifestTexts(root) {
17670
17671
  return Array$1.getSomes(read);
17671
17672
  });
17672
17673
  // src/features/check-version-downgrades/model/package-versions.ts
17673
- const RULE$25 = "unbumped-package";
17674
+ const RULE$26 = "unbumped-package";
17674
17675
  const UNSHIPPED = /(?:\.test\.[\w.]+$|(?:^|\/)(?:fixtures|__tests__|tests?)\/|(?:^|\/)(?:AGENTS|CLAUDE|CHANGELOG)\.md$)/u;
17675
17676
  const UNVERSIONED$5 = "0.0.0";
17676
17677
  const FIRST_LINE$3 = 1;
@@ -17745,7 +17746,7 @@ const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPa
17745
17746
  file: files.join(root, pack.file),
17746
17747
  line: versionLine(pack.text),
17747
17748
  column: FIRST_COLUMN$4,
17748
- rule: RULE$25,
17749
+ rule: RULE$26,
17749
17750
  message: message(pack, part, lowest)
17750
17751
  })), Option.toArray);
17751
17752
  }), { concurrency: READ_CONCURRENCY$10 });
@@ -17754,7 +17755,7 @@ const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPa
17754
17755
  // src/features/find-unneeded-files/model/applied-packages.ts
17755
17756
  const SCOPE$1 = Option.getOrElse(scopeOfName(SELF_NAME), () => SELF_NAME);
17756
17757
  const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
17757
- const RULE$24 = "applied-package";
17758
+ const RULE$25 = "applied-package";
17758
17759
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
17759
17760
  const NOT_FOUND$4 = -1;
17760
17761
  const SEPARATOR$9 = "/";
@@ -17790,7 +17791,7 @@ const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
17790
17791
  const problemAt$1 = (file, source) => (index, name) => ({
17791
17792
  file,
17792
17793
  ...positionOf(source)(index),
17793
- rule: RULE$24,
17794
+ rule: RULE$25,
17794
17795
  message: `msch applies ${name}. Remove this use and let msch apply it.`
17795
17796
  });
17796
17797
  const specifierPattern = ({ name }) => new RegExp(`["'\`]${escaped$1(name)}(?=["'\`/])`, "gu");
@@ -17845,7 +17846,7 @@ const checkAppliedPackages = Effect.fn("checkAppliedPackages")(function* checkAp
17845
17846
  return yield* appliedPackageProblems(root, applied);
17846
17847
  });
17847
17848
  // src/features/find-unneeded-files/model/replaced-tools.ts
17848
- const RULE$23 = "replaced-tool";
17849
+ const RULE$24 = "replaced-tool";
17849
17850
  const FIRST$6 = 1;
17850
17851
  const TASKS = "Vite+ tasks in run.tasks of vite.config.ts, run with `vp run`";
17851
17852
  const HOOKS = "the hooks in .vite-hooks/ that `vp config` installs";
@@ -17926,7 +17927,7 @@ const problemFor$1 = ({ name, file }) => pipe(REPLACED, Array$1.findFirst(({ pat
17926
17927
  file,
17927
17928
  line: FIRST$6,
17928
17929
  column: FIRST$6,
17929
- rule: RULE$23,
17930
+ rule: RULE$24,
17930
17931
  message: `belongs to ${tool}, which this repository replaced with ${replacement}. Move what is still needed there and delete this file.`
17931
17932
  })));
17932
17933
  /** @internal */
@@ -18065,7 +18066,7 @@ const checkUnneededFiles = Effect.fn("checkUnneededFiles")(function* checkUnneed
18065
18066
  return yield* unneededIn(root, cargoEnabled(workspace.value));
18066
18067
  });
18067
18068
  // src/features/check-markdown-directives/model/directives.ts
18068
- const RULE$22 = "markdown-directive";
18069
+ const RULE$23 = "markdown-directive";
18069
18070
  const START$14 = 0;
18070
18071
  const SECOND = 1;
18071
18072
  const ODD = 1;
@@ -18090,7 +18091,7 @@ const problemsIn$7 = (file, source) => {
18090
18091
  const { line, column } = positionOf(source)(index);
18091
18092
  return pipe(Array$1.get(fenced, line - SECOND), Option.getOrElse(() => false)) || pipe(Array$1.get(lines, line - SECOND), Option.map(String$1.slice(START$14, column - SECOND)), Option.exists(insideCodeSpan));
18092
18093
  };
18093
- return pipe(Array$1.fromIterable(String$1.matchAll(DISABLE)(source)), Array$1.filter((match) => !isCode(match.index ?? START$14)), Array$1.map((match) => problemAtIndex(RULE$22)(file, source)(match.index ?? START$14, MESSAGE$4)));
18094
+ return pipe(Array$1.fromIterable(String$1.matchAll(DISABLE)(source)), Array$1.filter((match) => !isCode(match.index ?? START$14)), Array$1.map((match) => problemAtIndex(RULE$23)(file, source)(match.index ?? START$14, MESSAGE$4)));
18094
18095
  };
18095
18096
  const isChecked$1 = (name) => String$1.endsWith(MARKDOWN$4)(name) && !pipe(SKIPPED_DIRECTORIES, Array$1.some((directory) => String$1.includes(directory)(`/${name}`))) && !pipe(SKIPPED_FILES, Array$1.some((skipped) => name === skipped || String$1.endsWith(`/${skipped}`)(name)));
18096
18097
  /** @internal */
@@ -18103,7 +18104,7 @@ const checkMarkdownDirectives = Effect.fn("checkMarkdownDirectives")(function* c
18103
18104
  }))), ({ file }, source) => problemsIn$7(file, source));
18104
18105
  });
18105
18106
  // src/features/check-owner-names/model/owner-names.ts
18106
- const RULE$21 = "owner-name";
18107
+ const RULE$22 = "owner-name";
18107
18108
  const TEXT_FILE$1 = /\.(?:[cm]?[jt]sx?|jsonc?|md|ya?ml|toml)$/u;
18108
18109
  const REGEX_SPECIAL = /[.*+?^${}()|[\]\\/]/gu;
18109
18110
  const SEPARATOR$7 = "/";
@@ -18145,7 +18146,7 @@ const manifestProblems$3 = ({ owner, file, manifest }) => pipe(ownerOffsets({
18145
18146
  }), Array$1.head, Option.toArray, Array$1.map(() => ({
18146
18147
  file,
18147
18148
  ...positionOf("")(START$13),
18148
- rule: RULE$21,
18149
+ rule: RULE$22,
18149
18150
  message: `Its description or keywords ${messageFor$4(owner)}`
18150
18151
  })));
18151
18152
  const workspaceProblems = Effect.fn("workspaceProblems")(function* workspaceProblems(root, owner, directory) {
@@ -18166,7 +18167,7 @@ const workspaceProblems = Effect.fn("workspaceProblems")(function* workspaceProb
18166
18167
  }), Array$1.map((offset) => ({
18167
18168
  file,
18168
18169
  ...positionOf(source)(offset),
18169
- rule: RULE$21,
18170
+ rule: RULE$22,
18170
18171
  message: messageFor$4(owner)
18171
18172
  }))));
18172
18173
  return [...manifestProblems$3({
@@ -18199,7 +18200,7 @@ const branchCarries = Effect.fn("branchCarries")(function* branchCarries(root, b
18199
18200
  return pipe(messages, Array$1.some((commit) => trailer.test(commit)));
18200
18201
  });
18201
18202
  // src/features/check-owner-principles/model/owner-principles.ts
18202
- const RULE$20 = "owner-principle-changed";
18203
+ const RULE$21 = "owner-principle-changed";
18203
18204
  const PRINCIPLE_FILE = /(?:^|\/)(?:skills\/principle-[^/]+\/|PRINCIPLE\.md$)/u;
18204
18205
  const TRAILER = /^Owner-Said:[ \t]*\S/mu;
18205
18206
  const MESSAGE$3 = "changes a principle. Only the owner changes a principle: change it in a session the owner opened with /do-principle, and add the trailer \"Owner-Said: <the owner's words>\" to a commit of the branch. When you only found a fact at odds with the principle, record it as a lesson instead.";
@@ -18211,7 +18212,7 @@ const checkOwnerPrinciples = Effect.fn("checkOwnerPrinciples")(function* checkOw
18211
18212
  const all = yield* files.changedFiles(root, base.value);
18212
18213
  const changed = pipe(all, Array$1.filter((name) => PRINCIPLE_FILE.test(name)));
18213
18214
  if (!Array$1.isReadonlyArrayNonEmpty(changed) || (yield* branchCarries(root, base.value, TRAILER))) return [];
18214
- return pipe(changed, Array$1.map((name) => problemInFile(RULE$20)(files.join(root, name), MESSAGE$3)));
18215
+ return pipe(changed, Array$1.map((name) => problemInFile(RULE$21)(files.join(root, name), MESSAGE$3)));
18215
18216
  });
18216
18217
  // src/features/find-invisible-characters/model/hidden-unicode.ts
18217
18218
  const HIDDEN = /[\u00AD\u180E\u200B\u200C\u200E\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]|(?<![\p{Extended_Pictographic}\p{Emoji_Modifier}\uFE0F])\u200D|\u200D(?!\p{Extended_Pictographic})|[\u{E0000}-\u{E007F}]/gu;
@@ -18220,14 +18221,14 @@ const START$12 = 0;
18220
18221
  const HEX = 16;
18221
18222
  const CODE_POINT_WIDTH = 4;
18222
18223
  const READ_CONCURRENCY$9 = 64;
18223
- const RULE$19 = "hidden-unicode";
18224
+ const RULE$20 = "hidden-unicode";
18224
18225
  const hexOf = (character) => pipe(String$1.codePointAt(START$12)(character), Option.getOrElse(() => START$12), (code) => code.toString(HEX), String$1.toUpperCase, String$1.padStart(CODE_POINT_WIDTH, "0"));
18225
18226
  const problemOf$3 = (file, source) => (found) => {
18226
18227
  const hex = hexOf(found[START$12]);
18227
18228
  return {
18228
18229
  file,
18229
18230
  ...positionOf(source)(found.index ?? START$12),
18230
- rule: RULE$19,
18231
+ rule: RULE$20,
18231
18232
  message: `U+${hex} is invisible in editors and reviews and can change what the text means. Remove it, or write it as the escape \\u${hex}.`
18232
18233
  };
18233
18234
  };
@@ -18260,7 +18261,7 @@ const checkDocuments = Effect.fn("checkDocuments")(function* checkDocuments(root
18260
18261
  return Array$1.flatten(found);
18261
18262
  });
18262
18263
  // src/features/check-effect-diagnostics/model/effect-diagnostics.ts
18263
- const RULE$18 = "effect-diagnostics-once";
18264
+ const RULE$19 = "effect-diagnostics-once";
18264
18265
  const PLUGIN = "@effect/language-service";
18265
18266
  const CONFIG_PATHSPEC = ":(glob)**/tsconfig*.json";
18266
18267
  const EXCLUDED$4 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
@@ -18278,7 +18279,7 @@ const reportsDiagnostics = (plugin) => plugin.name === PLUGIN && plugin.diagnost
18278
18279
  const problemsIn$5 = (entry, source) => pipe(decodeConfig(source), Option.flatMap(({ compilerOptions }) => Option.fromUndefinedOr(compilerOptions)), Option.flatMap(({ plugins }) => Option.fromUndefinedOr(plugins)), Option.filter(Array$1.some(reportsDiagnostics)), Option.map(() => ({
18279
18280
  file: entry.file,
18280
18281
  ...positionOf(source)(pipe(String$1.indexOf(`"${PLUGIN}"`)(source), Option.getOrElse(() => START$11))),
18281
- rule: RULE$18,
18282
+ rule: RULE$19,
18282
18283
  message: MESSAGE$2
18283
18284
  })), Option.toArray);
18284
18285
  /** @internal */
@@ -18291,7 +18292,7 @@ const checkEffectDiagnostics = Effect.fn("checkEffectDiagnostics")(function* che
18291
18292
  }))), problemsIn$5);
18292
18293
  });
18293
18294
  // src/features/check-exact-versions/model/exact-versions.ts
18294
- const RULE$17 = "version-range";
18295
+ const RULE$18 = "version-range";
18295
18296
  const WORKSPACE_FILE = "pnpm-workspace.yaml";
18296
18297
  const ALIAS = /^npm:(?:@[^/@]+\/)?[^@]+@(?<version>.+)$/u;
18297
18298
  const PROTOCOL = /^[a-z+]+:/u;
@@ -18307,7 +18308,7 @@ const isRange = (specifier) => {
18307
18308
  const problemsFor = (file, source, pattern) => (found) => pipe(found, Array$1.filter(({ specifier }) => isRange(specifier)), Array$1.map((range) => ({
18308
18309
  file,
18309
18310
  ...positionOf(source)(offsetIn(source)(pattern(range))),
18310
- rule: RULE$17,
18311
+ rule: RULE$18,
18311
18312
  message: `\`${range.name}\` \`${range.specifier}\` ${MESSAGE$1}`
18312
18313
  })));
18313
18314
  const catalogPattern = ({ name }) => new RegExp(`^\\s+["']?${quoted$1(name)}["']?:`, "mu");
@@ -18336,7 +18337,7 @@ const checkExactVersions = Effect.fn("checkExactVersions")(function* checkExactV
18336
18337
  return [...fromManifests, ...fromCatalogs];
18337
18338
  });
18338
18339
  // src/features/check-pack-settings/model/pack-settings.ts
18339
- const RULE$16 = "pack-publint";
18340
+ const RULE$17 = "pack-publint";
18340
18341
  const CONFIG_FILE = "vite.config.ts";
18341
18342
  const PACK_KEY = "pack:";
18342
18343
  const START$10 = 0;
@@ -18352,7 +18353,7 @@ const runsStrictPublint = (config) => pipe(decodePackConfig(config), Option.flat
18352
18353
  const problemFor = (file, source) => ({
18353
18354
  file,
18354
18355
  ...positionOf(source)(Option.getOrElse(String$1.indexOf(PACK_KEY)(source), () => START$10)),
18355
- rule: RULE$16,
18356
+ rule: RULE$17,
18356
18357
  message: "This package is published, so its pack must run publint with `publint: { strict: true }`. Without it, publishConfig can point at files vp pack never writes, and the published package fails to import."
18357
18358
  });
18358
18359
  const strictPublintIn = Effect.fn("strictPublintIn")(function* strictPublintIn(configFile) {
@@ -18382,7 +18383,7 @@ const checkPackSettings = Effect.fn("checkPackSettings")(function* checkPackSett
18382
18383
  return Array$1.flatten(found);
18383
18384
  });
18384
18385
  // src/features/check-published-manifest/model/private-dependency.ts
18385
- const RULE$15 = "private-workspace-dependency";
18386
+ const RULE$16 = "private-workspace-dependency";
18386
18387
  const START$9 = 0;
18387
18388
  const listedIn = (manifest) => pipe(RUNTIME_SECTIONS, Array$1.flatMap((section) => pipe(Option.fromUndefinedOr(manifest[section]), Option.map(Record.keys), Option.getOrElse(() => []), Array$1.map((name) => ({
18388
18389
  section,
@@ -18392,9 +18393,9 @@ const messageFor$3 = ({ section, name }) => `lists the private workspace package
18392
18393
  /** @internal */
18393
18394
  const quotedNameIndex = (source) => (name) => pipe(String$1.indexOf(`"${name}"`)(source), Option.getOrElse(() => START$9));
18394
18395
  /** @internal */
18395
- const privateDependencyProblems = (privateNames) => (found) => pipe(listedIn(found.manifest), Array$1.filter(({ name }) => privateNames.has(name)), Array$1.map((listed) => problemAtIndex(RULE$15)(found.entry.file, found.source)(quotedNameIndex(found.source)(listed.name), messageFor$3(listed))));
18396
+ const privateDependencyProblems = (privateNames) => (found) => pipe(listedIn(found.manifest), Array$1.filter(({ name }) => privateNames.has(name)), Array$1.map((listed) => problemAtIndex(RULE$16)(found.entry.file, found.source)(quotedNameIndex(found.source)(listed.name), messageFor$3(listed))));
18396
18397
  // src/features/check-published-manifest/model/dependency-peer-floor.ts
18397
- const RULE$14 = "dependency-peer-floor";
18398
+ const RULE$15 = "dependency-peer-floor";
18398
18399
  const NODE_MODULES = "node_modules";
18399
18400
  const namesOf$1 = (section) => pipe(Option.fromUndefinedOr(section), Option.map(Record.keys), Option.getOrElse(() => []));
18400
18401
  const isOptional = (manifest, peer) => pipe(Option.fromUndefinedOr(manifest.peerDependenciesMeta), Option.flatMap(Record.get(peer)), Option.exists((meta) => meta.optional === true));
@@ -18457,10 +18458,10 @@ const ownPeers = ({ manifest }) => requiredPeersOf(manifest);
18457
18458
  /** @internal */
18458
18459
  const dependencyPeerFloorProblems = (installed) => (found) => {
18459
18460
  const mismatches = mismatchOf(ownPeers(found));
18460
- return pipe(Option.fromUndefinedOr(installed.get(found.entry.file)), Option.getOrElse(() => []), Array$1.flatMap(mismatches), Array$1.map((mismatch) => problemAtIndex(RULE$14)(found.entry.file, found.source)(quotedNameIndex(found.source)(mismatch.listed), messageFor$2(mismatch))));
18461
+ return pipe(Option.fromUndefinedOr(installed.get(found.entry.file)), Option.getOrElse(() => []), Array$1.flatMap(mismatches), Array$1.map((mismatch) => problemAtIndex(RULE$15)(found.entry.file, found.source)(quotedNameIndex(found.source)(mismatch.listed), messageFor$2(mismatch))));
18461
18462
  };
18462
18463
  // src/features/check-published-manifest/model/package-homepage.ts
18463
- const RULE$13 = "package-homepage";
18464
+ const RULE$14 = "package-homepage";
18464
18465
  const BRANCH = "main";
18465
18466
  const ROOT_DIRECTORY$1 = ".";
18466
18467
  const START$8 = 0;
@@ -18491,9 +18492,9 @@ const messagesOf = (manifest, directory) => pipe(decodeRepository$1(manifest.rep
18491
18492
  }));
18492
18493
  const firstKeyIndex = (source) => pipe(KEYS, Array$1.findFirst((key) => String$1.includes(key)(source)), Option.flatMap((key) => String$1.indexOf(key)(source)), Option.getOrElse(() => START$8));
18493
18494
  /** @internal */
18494
- const homepageProblems = (dirname) => ({ entry, source, manifest }) => pipe(Option.some(dirname(entry.name)), Option.filter((directory) => directory !== ROOT_DIRECTORY$1), Option.map((directory) => messagesOf(manifest, directory)), Option.getOrElse(() => []), Array$1.map((message) => problemAtIndex(RULE$13)(entry.file, source)(firstKeyIndex(source), message)));
18495
+ const homepageProblems = (dirname) => ({ entry, source, manifest }) => pipe(Option.some(dirname(entry.name)), Option.filter((directory) => directory !== ROOT_DIRECTORY$1), Option.map((directory) => messagesOf(manifest, directory)), Option.getOrElse(() => []), Array$1.map((message) => problemAtIndex(RULE$14)(entry.file, source)(firstKeyIndex(source), message)));
18495
18496
  // src/features/check-published-manifest/model/package-scope.ts
18496
- const RULE$12 = "package-scope";
18497
+ const RULE$13 = "package-scope";
18497
18498
  const NAME_KEY = "\"name\"";
18498
18499
  const START$7 = 0;
18499
18500
  const unscopedName = (scope) => ({ manifest }) => pipe(Option.fromUndefinedOr(manifest.name), Option.filter((name) => !String$1.startsWith(scope)(name)));
@@ -18506,7 +18507,7 @@ const sharedScope = (names) => pipe(names, Array$1.flatMap((name) => Option.toAr
18506
18507
  }));
18507
18508
  const messageFor$1 = (scope, name) => `Most packages of this repository are published under the ${scope} scope, and one scope tells whose packages they are. Rename "${name}" to "${scope}${String$1.replace(/^@[^/]+\//u, "")(name)}".`;
18508
18509
  /** @internal */
18509
- const scopeProblems = (scope) => (found) => pipe(unscopedName(scope)(found), Option.map((name) => problemAtIndex(RULE$12)(found.entry.file, found.source)(nameIndex(found.source), messageFor$1(scope, name))), Option.toArray);
18510
+ const scopeProblems = (scope) => (found) => pipe(unscopedName(scope)(found), Option.map((name) => problemAtIndex(RULE$13)(found.entry.file, found.source)(nameIndex(found.source), messageFor$1(scope, name))), Option.toArray);
18510
18511
  // src/features/check-published-manifest/model/published-manifests.ts
18511
18512
  const privateNamesIn = Effect.fn("privateNamesIn")(function* privateNamesIn(root) {
18512
18513
  const manifests = yield* manifestTexts(root);
@@ -18539,7 +18540,7 @@ const checkPublishedManifests = Effect.fn("checkPublishedManifests")(function* c
18539
18540
  ]);
18540
18541
  });
18541
18542
  // src/features/check-runtime-version/model/node-version.ts
18542
- const RULE$11 = "node-version";
18543
+ const RULE$12 = "node-version";
18543
18544
  const MINIMUM = 26;
18544
18545
  const SUPPORTED = `Node.js ${String(MINIMUM)} or later is the only supported runtime.`;
18545
18546
  const MANIFEST$1 = /(?:^|\/)package\.json$/u;
@@ -18563,7 +18564,7 @@ const floorIsOld = (alternative) => pipe(floorOf$1(alternative), Option.match({
18563
18564
  onSome: isOld
18564
18565
  }));
18565
18566
  const admitsOld = (range) => pipe(String$1.split(range, ALTERNATIVE$1), Array$1.some(floorIsOld));
18566
- const problemAt = ({ entry, source, index }, message) => problemAtIndex(RULE$11)(entry.file, source)(index, message);
18567
+ const problemAt = ({ entry, source, index }, message) => problemAtIndex(RULE$12)(entry.file, source)(index, message);
18567
18568
  const offsetOf = (source, text) => pipe(String$1.indexOf(text)(source), Option.getOrElse(() => START$6));
18568
18569
  const unstatedProblem = (entry, source) => problemAt({
18569
18570
  entry,
@@ -18614,7 +18615,7 @@ const checkNodeVersion = Effect.fn("checkNodeVersion")(function* checkNodeVersio
18614
18615
  return yield* scanText(sources, problemsIn$3);
18615
18616
  });
18616
18617
  // src/features/check-workspace-descriptions/model/workspace-descriptions.ts
18617
- const RULE$10 = "workspace-description";
18618
+ const RULE$11 = "workspace-description";
18618
18619
  const FIRST$5 = 1;
18619
18620
  /** @internal */
18620
18621
  const checkWorkspaceDescriptions = Effect.fn("checkWorkspaceDescriptions")(function* checkWorkspaceDescriptions(root) {
@@ -18624,12 +18625,12 @@ const checkWorkspaceDescriptions = Effect.fn("checkWorkspaceDescriptions")(funct
18624
18625
  file: files.join(root, directory, PACKAGE_JSON_FILE),
18625
18626
  line: FIRST$5,
18626
18627
  column: FIRST$5,
18627
- rule: RULE$10,
18628
+ rule: RULE$11,
18628
18629
  message: "Add a one-line \"description\" that says what this workspace is for. Agents find existing tools by these descriptions, so a workspace without one is invisible to them."
18629
18630
  })));
18630
18631
  });
18631
18632
  // src/features/check-plugin-layout/model/plugin-layout.ts
18632
- const RULE$9 = "plugin-layout";
18633
+ const RULE$10 = "plugin-layout";
18633
18634
  const PLUGIN_FILE$2 = ".claude-plugin/plugin.json";
18634
18635
  const MARKETPLACE_FILE$1 = ".claude-plugin/marketplace.json";
18635
18636
  const SKILL_FILE$1 = "SKILL.md";
@@ -18640,7 +18641,7 @@ const LONGEST_PATH = 472;
18640
18641
  const MOST_DEPTH = 12;
18641
18642
  const LONGEST_PART = 255;
18642
18643
  const LONGEST_DESCRIPTION = 500;
18643
- const CONCURRENCY$4 = 16;
18644
+ const CONCURRENCY$5 = 16;
18644
18645
  const PLUGIN_NAME = /^[\p{Ll}\p{Nd}-]{1,64}$/u;
18645
18646
  const ALLOWED_PATH = /^[A-Za-z0-9 _.\-/(),]+$/u;
18646
18647
  const XML_TAG = /<[A-Za-z][^>]*>/u;
@@ -18651,7 +18652,7 @@ const SkillFields$1 = Schema.Struct({
18651
18652
  description: Schema.optionalKey(Schema.String)
18652
18653
  });
18653
18654
  const decodeSkillFields = Schema.decodeUnknownOption(SkillFields$1);
18654
- const problem$4 = problemInFile(RULE$9);
18655
+ const problem$5 = problemInFile(RULE$10);
18655
18656
  const violation = (path, message) => ({
18656
18657
  path,
18657
18658
  message
@@ -18715,7 +18716,7 @@ const skillViolations = (skills) => {
18715
18716
  const skillFilesOf = (plugin) => pipe(plugin.files, Array$1.filter((file) => file === SKILL_FILE$1 || String$1.endsWith(`${SEPARATOR$6}${SKILL_FILE$1}`)(file)));
18716
18717
  const violationsOf = Effect.fn("violationsOf")(function* violationsOf(root, plugin, links) {
18717
18718
  const prefix = `${(yield* RepositoryFiles).relative(root, plugin.directory)}${SEPARATOR$6}`;
18718
- const skills = yield* Effect.forEach(skillFilesOf(plugin), (file) => skillTextOf(plugin, file), { concurrency: CONCURRENCY$4 });
18719
+ const skills = yield* Effect.forEach(skillFilesOf(plugin), (file) => skillTextOf(plugin, file), { concurrency: CONCURRENCY$5 });
18719
18720
  return [
18720
18721
  ...manifestViolations(plugin),
18721
18722
  ...nestedManifests(plugin),
@@ -18731,7 +18732,7 @@ const rootProblems = Effect.fn("rootProblems")(function* rootProblems(root) {
18731
18732
  const marketplace = yield* files.exists(files.join(root, MARKETPLACE_FILE$1));
18732
18733
  const manifest = files.join(root, PLUGIN_FILE$2);
18733
18734
  const isPlugin = yield* files.exists(manifest);
18734
- return pipe(Option.liftPredicate(problem$4(manifest, "makes the marketplace root a plugin. The marketplace is not itself a plugin."), () => marketplace && isPlugin), Option.toArray);
18735
+ return pipe(Option.liftPredicate(problem$5(manifest, "makes the marketplace root a plugin. The marketplace is not itself a plugin."), () => marketplace && isPlugin), Option.toArray);
18735
18736
  });
18736
18737
  /** @internal */
18737
18738
  const checkPluginLayout = Effect.fn("checkPluginLayout")(function* checkPluginLayout(root) {
@@ -18739,12 +18740,12 @@ const checkPluginLayout = Effect.fn("checkPluginLayout")(function* checkPluginLa
18739
18740
  const plugins = yield* pluginsIn$1(root);
18740
18741
  const linked = yield* files.linkedFiles(root);
18741
18742
  const links = new Set(linked);
18742
- const found = yield* Effect.forEach(plugins, (plugin) => violationsOf(root, plugin, links).pipe(Effect.map(Array$1.map(({ path, message }) => problem$4(files.join(plugin.directory, path), message)))), { concurrency: CONCURRENCY$4 });
18743
+ const found = yield* Effect.forEach(plugins, (plugin) => violationsOf(root, plugin, links).pipe(Effect.map(Array$1.map(({ path, message }) => problem$5(files.join(plugin.directory, path), message)))), { concurrency: CONCURRENCY$5 });
18743
18744
  const marketplace = yield* rootProblems(root);
18744
18745
  return [...Array$1.flatten(found), ...marketplace];
18745
18746
  });
18746
18747
  // src/features/check-plugin-marketplace/model/plugin-marketplace.ts
18747
- const RULE$8 = "plugin-marketplace";
18748
+ const RULE$9 = "plugin-marketplace";
18748
18749
  const PLUGIN_DIRECTORY = ".claude-plugin";
18749
18750
  const PLUGIN_FILE$1 = `${PLUGIN_DIRECTORY}/plugin.json`;
18750
18751
  const MARKETPLACE_FILE = `${PLUGIN_DIRECTORY}/marketplace.json`;
@@ -18800,7 +18801,7 @@ const pluginIn = Effect.fn("pluginIn")(function* pluginIn(root, project) {
18800
18801
  description: Option.getOrElse(project.description, () => "")
18801
18802
  })));
18802
18803
  });
18803
- const problem$3 = problemInFile(RULE$8);
18804
+ const problem$4 = problemInFile(RULE$9);
18804
18805
  const pluginsIn = Effect.fn("pluginsIn")(function* pluginsIn(root) {
18805
18806
  const projects = yield* workspaceProjects(root);
18806
18807
  const found = yield* Effect.forEach(projects, (project) => pluginIn(root, project), { concurrency: "unbounded" });
@@ -18819,16 +18820,16 @@ const ownerIn = Effect.fn("ownerIn")(function* ownerIn(root) {
18819
18820
  ...described(description)
18820
18821
  })))));
18821
18822
  });
18822
- const rewrite = Effect.fn("rewrite")(function* rewrite(file, expected) {
18823
+ const rewrite$1 = Effect.fn("rewrite")(function* rewrite(file, expected) {
18823
18824
  const files = yield* RepositoryFiles;
18824
18825
  const written = yield* files.readFile(file);
18825
18826
  if (Option.exists(written, (text) => text === expected)) return [];
18826
18827
  yield* files.writeFile(file, expected);
18827
- return [problem$3(file, `${MARKETPLACE_FILE} is generated from the workspaces that have ${PLUGIN_FILE$1}. msch rewrote it; commit the result.`)];
18828
+ return [problem$4(file, `${MARKETPLACE_FILE} is generated from the workspaces that have ${PLUGIN_FILE$1}. msch rewrote it; commit the result.`)];
18828
18829
  });
18829
18830
  const withoutPlugins = Effect.fn("withoutPlugins")(function* withoutPlugins(file) {
18830
18831
  if (!(yield* (yield* RepositoryFiles).exists(file))) return [];
18831
- return [problem$3(file, `No workspace has ${PLUGIN_FILE$1}. Delete ${MARKETPLACE_FILE}.`)];
18832
+ return [problem$4(file, `No workspace has ${PLUGIN_FILE$1}. Delete ${MARKETPLACE_FILE}.`)];
18832
18833
  });
18833
18834
  /** @internal */
18834
18835
  const checkPluginMarketplace = Effect.fn("checkPluginMarketplace")(function* checkPluginMarketplace(root) {
@@ -18837,15 +18838,15 @@ const checkPluginMarketplace = Effect.fn("checkPluginMarketplace")(function* che
18837
18838
  const plugins = yield* pluginsIn(root);
18838
18839
  if (!Array$1.isReadonlyArrayNonEmpty(plugins)) return yield* withoutPlugins(file);
18839
18840
  const header = yield* ownerIn(root);
18840
- if (Option.isNone(header)) return [problem$3(files.join(root, PACKAGE_JSON_FILE), `Workspaces ship Claude Code plugins, so ${MARKETPLACE_FILE} lists them. Add "author" to the root ${PACKAGE_JSON_FILE}; it becomes the marketplace owner.`)];
18841
+ if (Option.isNone(header)) return [problem$4(files.join(root, PACKAGE_JSON_FILE), `Workspaces ship Claude Code plugins, so ${MARKETPLACE_FILE} lists them. Add "author" to the root ${PACKAGE_JSON_FILE}; it becomes the marketplace owner.`)];
18841
18842
  const text = yield* encodeMarketplace({
18842
18843
  ...header.value,
18843
18844
  plugins
18844
18845
  });
18845
- return yield* rewrite(file, `${text}\n`);
18846
+ return yield* rewrite$1(file, `${text}\n`);
18846
18847
  });
18847
18848
  // src/features/check-readme-skills/model/readme-skills.ts
18848
- const RULE$7 = "readme-skills";
18849
+ const RULE$8 = "readme-skills";
18849
18850
  const README_FILE = "README.md";
18850
18851
  const FIRST_SENTENCE = /^[\s\S]*?(?:。|\.(?=\s|$))/u;
18851
18852
  const CALLED_SKILL$1 = /`(?<name>[a-z0-9-]+:[a-z0-9-]+)`/u;
@@ -18869,7 +18870,7 @@ const SkillFields = Schema.Struct({
18869
18870
  "disable-model-invocation": Schema.optionalKey(Schema.Boolean)
18870
18871
  });
18871
18872
  const decodeFields = Schema.decodeUnknownOption(SkillFields);
18872
- const problem$2 = problemInFile(RULE$7);
18873
+ const problem$3 = problemInFile(RULE$8);
18873
18874
  const cell = (text) => pipe(text, String$1.replaceAll("|", String.raw`\|`), String$1.replaceAll("\n", " "));
18874
18875
  const sceneOf = (description) => pipe(Option.fromNullishOr(FIRST_SENTENCE.exec(description)), Option.flatMap(Array$1.head), Option.getOrElse(() => description));
18875
18876
  const targetOf = (fields, body) => pipe(Option.liftPredicate(body, () => fields["disable-model-invocation"] === true), Option.flatMap((text) => groupOf("name")(CALLED_SKILL$1.exec(text))), Option.map((name) => `\`${name}\``), Option.getOrElse(() => EMPTY$1));
@@ -18919,7 +18920,7 @@ const syncReadme = Effect.fn("syncReadme")(function* syncReadme({ directory, ski
18919
18920
  });
18920
18921
  if (canonical(expected) === canonical(current)) return [];
18921
18922
  yield* files.writeFile(file, expected);
18922
- return [problem$2(file, `The skills table between ${SKILLS_START} and ${SKILLS_END} is generated from the SKILL.md frontmatter of the plugin. msch rewrote it; commit the result.`)];
18923
+ return [problem$3(file, `The skills table between ${SKILLS_START} and ${SKILLS_END} is generated from the SKILL.md frontmatter of the plugin. msch rewrote it; commit the result.`)];
18923
18924
  });
18924
18925
  const labelsOf = ({ published }) => pipe(Option.liftPredicate(ENGLISH_LABELS, () => published), Option.getOrElse(() => JAPANESE_LABELS));
18925
18926
  /** @internal */
@@ -19002,11 +19003,11 @@ const enumerationSignals = (entities) => (file, text) => {
19002
19003
  }));
19003
19004
  };
19004
19005
  // src/features/check-skill-enumerations/model/skill-enumerations.ts
19005
- const RULE$6 = "skill-enumeration";
19006
+ const RULE$7 = "skill-enumeration";
19006
19007
  const FIRST$3 = 1;
19007
- const CONCURRENCY$3 = 16;
19008
+ const CONCURRENCY$4 = 16;
19008
19009
  const DOCUMENT_FILE = /\.(?:md|ts|tsx)$/u;
19009
- const position = problemAtPosition(RULE$6);
19010
+ const position = problemAtPosition(RULE$7);
19010
19011
  const problemsIn$2 = Effect.fn("problemsIn")(function* problemsIn(root, name, entities) {
19011
19012
  const files = yield* RepositoryFiles;
19012
19013
  const file = files.join(root, name);
@@ -19024,21 +19025,21 @@ const checkSkillEnumerations = Effect.fn("checkSkillEnumerations")(function* che
19024
19025
  if (!Array$1.isReadonlyArrayNonEmpty(entities)) return [];
19025
19026
  const listed = yield* files.listedFiles(root);
19026
19027
  const documents = pipe(listed, Array$1.filter((name) => DOCUMENT_FILE.test(name)));
19027
- const found = yield* Effect.forEach(documents, (name) => problemsIn$2(root, name, entities), { concurrency: CONCURRENCY$3 });
19028
+ const found = yield* Effect.forEach(documents, (name) => problemsIn$2(root, name, entities), { concurrency: CONCURRENCY$4 });
19028
19029
  return Array$1.flatten(found);
19029
19030
  });
19030
19031
  // src/features/check-skill-references/model/skill-references.ts
19031
- const RULE$5 = "skill-reference";
19032
+ const RULE$6 = "skill-reference";
19032
19033
  const OWNER_PREFIX = "do-";
19033
19034
  const MARKDOWN$2 = ".md";
19034
- const CONCURRENCY$2 = 16;
19035
+ const CONCURRENCY$3 = 16;
19035
19036
  const MOST_OWNER_LINES = 4;
19036
19037
  const NAMED_IN_BACKTICKS = /`(?<name>[a-z0-9]+(?:-[a-z0-9]+)*)`(?!\]\()/gu;
19037
19038
  const CALLED_SKILL = /`(?<name>[a-z0-9-]+:[a-z0-9-]+)`/gu;
19038
19039
  const LIST_ITEM = /^\s*(?:[-*]|\d+\.)\s/u;
19039
19040
  const TOOL_NAME = /ツール|\bgh\b|\bgit\b|\bcurl\b|\bclaude\b|\bvp\b|\bbun\b/u;
19040
19041
  const QUALIFIER = ":";
19041
- const problem$1 = problemInFile(RULE$5);
19042
+ const problem$2 = problemInFile(RULE$6);
19042
19043
  const groupsOf = (pattern, text) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(text)), Array$1.flatMap((found) => Option.toArray(groupOf("name")(found))));
19043
19044
  const isOwnerEntry = ({ name }) => String$1.startsWith(OWNER_PREFIX)(name);
19044
19045
  const isOwnerOnly = ({ frontmatter }) => frontmatter.fields["disable-model-invocation"] === true;
@@ -19060,24 +19061,24 @@ const ownerOnlyMessages = (skill, qualified) => pipe(Option.liftPredicate(skill,
19060
19061
  toolMessage(owner),
19061
19062
  calledMessage(owner, qualified)
19062
19063
  ]));
19063
- const ownerProblems = (skill, qualified) => pipe([prefixMessage(skill), ...ownerOnlyMessages(skill, qualified)], Array$1.getSomes, Array$1.map((message) => problem$1(skill.file, message)));
19064
- const hubProblems = (hub, names) => pipe(groupsOf(NAMED_IN_BACKTICKS, hub.source), Array$1.filter((name) => !names.has(name)), Array$1.map((name) => problem$1(hub.file, `names ${name}, which is not a skill.`)));
19064
+ const ownerProblems = (skill, qualified) => pipe([prefixMessage(skill), ...ownerOnlyMessages(skill, qualified)], Array$1.getSomes, Array$1.map((message) => problem$2(skill.file, message)));
19065
+ const hubProblems = (hub, names) => pipe(groupsOf(NAMED_IN_BACKTICKS, hub.source), Array$1.filter((name) => !names.has(name)), Array$1.map((name) => problem$2(hub.file, `names ${name}, which is not a skill.`)));
19065
19066
  const documentProblems = Effect.fn("documentProblems")(function* documentProblems({ file, hub }, skill, others) {
19066
19067
  const text = yield* (yield* RepositoryFiles).readFile(file);
19067
19068
  const body = String$1.replace(FRONTMATTER, "")(Option.getOrElse(text, () => ""));
19068
- return pipe(others, Array$1.filter((other) => other.name !== skill.name && namesSkill(other.name)(body)), Array$1.map((other) => problem$1(file, `names ${other.name}. Only ${hub.name} names other skills; point to it from the hub instead.`)));
19069
+ return pipe(others, Array$1.filter((other) => other.name !== skill.name && namesSkill(other.name)(body)), Array$1.map((other) => problem$2(file, `names ${other.name}. Only ${hub.name} names other skills; point to it from the hub instead.`)));
19069
19070
  });
19070
19071
  const spokeProblems = Effect.fn("spokeProblems")(function* spokeProblems(hub, skill, others) {
19071
19072
  const documents = pipe(skill.files, Array$1.filter(String$1.endsWith(MARKDOWN$2)));
19072
19073
  const found = yield* Effect.forEach(documents, (file) => documentProblems({
19073
19074
  file,
19074
19075
  hub
19075
- }, skill, others), { concurrency: CONCURRENCY$2 });
19076
+ }, skill, others), { concurrency: CONCURRENCY$3 });
19076
19077
  return Array$1.flatten(found);
19077
19078
  });
19078
19079
  const referencesFrom = Effect.fn("referencesFrom")(function* referencesFrom(hub, skills) {
19079
19080
  const others = pipe(skills, Array$1.filter((skill) => skill.name !== hub.name && !isOwnerEntry(skill)));
19080
- const spokes = yield* Effect.forEach(others, (skill) => spokeProblems(hub, skill, others), { concurrency: CONCURRENCY$2 });
19081
+ const spokes = yield* Effect.forEach(others, (skill) => spokeProblems(hub, skill, others), { concurrency: CONCURRENCY$3 });
19081
19082
  const names = new Set(pipe(skills, Array$1.map(({ name }) => name)));
19082
19083
  return [...hubProblems(hub, names), ...Array$1.flatten(spokes)];
19083
19084
  });
@@ -19095,8 +19096,8 @@ const checkSkillReferences = Effect.fn("checkSkillReferences")(function* checkSk
19095
19096
  return [...owners, ...hubbed];
19096
19097
  });
19097
19098
  // src/features/check-skill-structure/model/skill-structure.ts
19098
- const RULE$4 = "skill-maintainer-context";
19099
- const CONCURRENCY$1 = 16;
19099
+ const RULE$5 = "skill-maintainer-context";
19100
+ const CONCURRENCY$2 = 16;
19100
19101
  const MARKDOWN$1 = ".md";
19101
19102
  const PROJECT_FILE = /(?:^|\/)(?:package\.json|tsconfig[^/]*\.json|vite\.config\.[cm]?[jt]s|vitest\.config\.[cm]?[jt]s)$|\.[jt]sx$/u;
19102
19103
  const SCRIPT_FILE = /\.[cm]?[jt]s$/u;
@@ -19105,7 +19106,7 @@ const BINARY_FILE = /\.(?:png|jpe?g|gif|webp|pdf|woff2?)$/u;
19105
19106
  const WRITE_CALL = /\b(?:writeFileSync|cpSync|renameSync|appendFileSync|copyFileSync)\(/u;
19106
19107
  const MAINTAINER_HEADING = /^#{1,6}\s.*(?:メンテナンス|保守|更新手順|再生成|撮り直|maintenance|maintainer|regenerat)/imu;
19107
19108
  const REASON$2 = "A distributed skill holds only what the model needs while using it, so loading it does not carry maintainer context. Turn this into something that runs on its own, such as a check, a hook or a task in the repository that owns what the skill describes. A note that only asks to be read before a change is never read.";
19108
- const problem = problemInFile(RULE$4);
19109
+ const problem$1 = problemInFile(RULE$5);
19109
19110
  const signalsOf = (file, text) => [
19110
19111
  ...pipe(Option.liftPredicate("a build project file (package.json, tsconfig, vite config or a .tsx source)", () => PROJECT_FILE.test(file)), Option.toArray),
19111
19112
  ...pipe(Option.liftPredicate("a script that writes files next to itself, which regenerates the skill's own files", () => SCRIPT_FILE.test(file) && !TEST_FILE.test(file) && String$1.includes("import.meta.dirname")(text) && WRITE_CALL.test(text)), Option.toArray),
@@ -19115,18 +19116,69 @@ const problemsIn$1 = Effect.fn("problemsIn")(function* problemsIn(file) {
19115
19116
  const files = yield* RepositoryFiles;
19116
19117
  const text = yield* files.readFile(file);
19117
19118
  const source = pipe(text, Option.filter(() => !BINARY_FILE.test(file)));
19118
- return pipe(signalsOf(files.basename(file), Option.getOrElse(source, () => "")), Array$1.map((signal) => problem(file, `is ${signal}. ${REASON$2}`)));
19119
+ return pipe(signalsOf(files.basename(file), Option.getOrElse(source, () => "")), Array$1.map((signal) => problem$1(file, `is ${signal}. ${REASON$2}`)));
19119
19120
  });
19120
19121
  /** @internal */
19121
19122
  const checkSkillStructure = Effect.fn("checkSkillStructure")(function* checkSkillStructure(root) {
19122
19123
  const plugins = yield* pluginsIn$1(root);
19123
19124
  const inside = pipe(plugins, Array$1.flatMap(({ skills }) => skills), Array$1.flatMap(({ files }) => files));
19124
- const found = yield* Effect.forEach(inside, problemsIn$1, { concurrency: CONCURRENCY$1 });
19125
+ const found = yield* Effect.forEach(inside, problemsIn$1, { concurrency: CONCURRENCY$2 });
19126
+ return Array$1.flatten(found);
19127
+ });
19128
+ // src/features/write-plugin-definition/model/plugin-definition.ts
19129
+ const RULE$4 = "plugin-definition";
19130
+ const DEFINITION = "plugin.ts";
19131
+ const CONCURRENCY$1 = 4;
19132
+ const problem = problemInFile(RULE$4);
19133
+ const reasonOf$2 = (failure) => {
19134
+ if (failure instanceof Error) return failure.message;
19135
+ return String(failure);
19136
+ };
19137
+ const load = (file) => Effect.tryPromise({
19138
+ try: () => import(pathToFileURL(file).href),
19139
+ catch: reasonOf$2
19140
+ });
19141
+ const rewrite = Effect.fn("rewrite")(function* rewrite(directory, { path, text }) {
19142
+ const files = yield* RepositoryFiles;
19143
+ const file = files.join(directory, path);
19144
+ const written = yield* files.readFile(file);
19145
+ if (Option.exists(written, (found) => found === text)) return Option.none();
19146
+ yield* files.writeFile(file, text);
19147
+ return Option.some(problem(file, `${path} is generated from ${DEFINITION}. msch rewrote it; commit the result.`));
19148
+ });
19149
+ const pluginName = (packageName) => pipe(packageName, String$1.replace(/^@[^/]+\//u, ""));
19150
+ const filesOf = (project, definition) => Effect.gen(function* generate() {
19151
+ const name = yield* Effect.fromOption(project.packageName).pipe(Effect.mapError(() => `${project.directory}/package.json has no name for plugin.json.`));
19152
+ const loaded = yield* load(definition);
19153
+ return yield* moduleFiles(loaded, {
19154
+ name: pluginName(name),
19155
+ ...Option.match(project.description, {
19156
+ onNone: () => ({}),
19157
+ onSome: (description) => ({ description })
19158
+ })
19159
+ }).pipe(Effect.mapError(reasonOf$2));
19160
+ });
19161
+ const writeOne = Effect.fn("writeOne")(function* writeOne(root, project) {
19162
+ const files = yield* RepositoryFiles;
19163
+ const directory = files.join(root, project.directory);
19164
+ const definition = files.join(directory, DEFINITION);
19165
+ if (!(yield* files.exists(definition))) return [];
19166
+ const generated = yield* Effect.result(filesOf(project, definition));
19167
+ return yield* Result.match(generated, {
19168
+ onFailure: (reason) => Effect.succeed([problem(definition, `msch could not load the plugin definition: ${reason}`)]),
19169
+ onSuccess: (written) => Effect.forEach(written, (file) => rewrite(directory, file), { concurrency: 1 }).pipe(Effect.map(Array$1.getSomes))
19170
+ });
19171
+ });
19172
+ /** @internal */
19173
+ const writePluginDefinitions = Effect.fn("writePluginDefinitions")(function* writePluginDefinitions(root) {
19174
+ const projects = yield* workspaceProjects(root);
19175
+ const found = yield* Effect.forEach(projects, (project) => writeOne(root, project), { concurrency: CONCURRENCY$1 });
19125
19176
  return Array$1.flatten(found);
19126
19177
  });
19127
19178
  // src/app/plugin-checks.ts
19128
19179
  /** @internal */
19129
19180
  const checkPlugins = Effect.fn("checkPlugins")(function* checkPlugins(root) {
19181
+ const generated = yield* writePluginDefinitions(root);
19130
19182
  const found = yield* Effect.all([
19131
19183
  checkPluginMarketplace(root),
19132
19184
  checkPluginLayout(root),
@@ -19135,7 +19187,7 @@ const checkPlugins = Effect.fn("checkPlugins")(function* checkPlugins(root) {
19135
19187
  checkSkillReferences(root),
19136
19188
  checkSkillEnumerations(root)
19137
19189
  ], { concurrency: "unbounded" });
19138
- return Array$1.flatten(found);
19190
+ return [...generated, ...Array$1.flatten(found)];
19139
19191
  });
19140
19192
  // src/features/check-upstream-exits/model/deviation-entries.ts
19141
19193
  const WORKSPACE_SECTIONS = [