@r_masseater/msch 0.95.0 → 0.97.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.
Files changed (76) hide show
  1. package/dist/{base-revision-uiUwYlbc.mjs → base-revision-Bl-4nxAd.mjs} +2 -2
  2. package/dist/{base-revision-uiUwYlbc.mjs.map → base-revision-Bl-4nxAd.mjs.map} +1 -1
  3. package/dist/cargo-inputs.mjs +2 -2
  4. package/dist/changed.mjs +5 -5
  5. package/dist/cli.mjs +403 -196
  6. package/dist/cli.mjs.map +1 -1
  7. package/dist/config-BBdsNPSO.mjs.map +1 -1
  8. package/dist/config.d.mts +19 -16
  9. package/dist/config.mjs +23 -161
  10. package/dist/config.mjs.map +1 -1
  11. package/dist/decision-rules.d.mts +1 -1
  12. package/dist/decision-rules.mjs +1 -1
  13. package/dist/{define-lint-preset-BjHY5WNt.mjs → define-lint-preset-B-hC9_df.mjs} +60 -45
  14. package/dist/define-lint-preset-B-hC9_df.mjs.map +1 -0
  15. package/dist/exits.mjs +4 -4
  16. package/dist/{ignored-directories-BRRODOoG.mjs → ignored-directories-D-7Rm_2X.mjs} +2 -2
  17. package/dist/{ignored-directories-BRRODOoG.mjs.map → ignored-directories-D-7Rm_2X.mjs.map} +1 -1
  18. package/dist/{index-Bw2kfEek.d.mts → index-CEazCJ_w.d.mts} +38 -11
  19. package/dist/{index-CMyIrsah.d.mts → index-Dm0Gg9wS.d.mts} +2 -2
  20. package/dist/judge.mjs +4 -4
  21. package/dist/lint-rules.mjs +23 -11
  22. package/dist/lint-rules.mjs.map +1 -1
  23. package/dist/lint.d.mts +2 -2
  24. package/dist/lint.mjs +1 -1
  25. package/dist/{lookup-report-BWiDFlSS.mjs → lookup-report-L5OLXRMf.mjs} +3 -3
  26. package/dist/{lookup-report-BWiDFlSS.mjs.map → lookup-report-L5OLXRMf.mjs.map} +1 -1
  27. package/dist/{manifest-texts-Bhlz2Z2_.mjs → manifest-texts-DPgsV8kj.mjs} +2 -2
  28. package/dist/{manifest-texts-Bhlz2Z2_.mjs.map → manifest-texts-DPgsV8kj.mjs.map} +1 -1
  29. package/dist/{output-B4GNchqH.mjs → output-DAvdel9H.mjs} +3 -3
  30. package/dist/{output-B4GNchqH.mjs.map → output-DAvdel9H.mjs.map} +1 -1
  31. package/dist/oxlint.mjs +2 -2
  32. package/dist/{package-routes-BdYpOLTv.mjs → package-routes-BQWX5ttU.mjs} +2 -2
  33. package/dist/{package-routes-BdYpOLTv.mjs.map → package-routes-BQWX5ttU.mjs.map} +1 -1
  34. package/dist/{package-versions-BLtKon6D.mjs → package-versions-sx15IGwA.mjs} +4 -4
  35. package/dist/{package-versions-BLtKon6D.mjs.map → package-versions-sx15IGwA.mjs.map} +1 -1
  36. package/dist/{pass-records-ljpQ--tm.mjs → pass-records-BcAAWgiQ.mjs} +4 -4
  37. package/dist/{pass-records-ljpQ--tm.mjs.map → pass-records-BcAAWgiQ.mjs.map} +1 -1
  38. package/dist/{problem-Bi4Kgg9b.mjs → problem-DbuTeNvL.mjs} +2 -2
  39. package/dist/{problem-Bi4Kgg9b.mjs.map → problem-DbuTeNvL.mjs.map} +1 -1
  40. package/dist/publish.mjs +1 -1
  41. package/dist/{published-BGur-Htr.mjs → published-3eokcs_D.mjs} +17 -3
  42. package/dist/published-3eokcs_D.mjs.map +1 -0
  43. package/dist/published.mjs +6 -6
  44. package/dist/refs.mjs +4 -5
  45. package/dist/refs.mjs.map +1 -1
  46. package/dist/{registry-releases-CaO-8xAO.mjs → registry-releases-BBtz4wGE.mjs} +2 -2
  47. package/dist/{registry-releases-CaO-8xAO.mjs.map → registry-releases-BBtz4wGE.mjs.map} +1 -1
  48. package/dist/{repository-files-hbJpQ1i0.mjs → repository-files-DSwKJnrj.mjs} +5 -4
  49. package/dist/repository-files-DSwKJnrj.mjs.map +1 -0
  50. package/dist/repository-text-DGfYd5Wq.mjs +178 -0
  51. package/dist/repository-text-DGfYd5Wq.mjs.map +1 -0
  52. package/dist/{runtime-BdEuIL6Z.mjs → runtime-Djm7zMwu.mjs} +2 -2
  53. package/dist/{runtime-BdEuIL6Z.mjs.map → runtime-Djm7zMwu.mjs.map} +1 -1
  54. package/dist/unbumped.mjs +5 -5
  55. package/dist/{upstream-exits-BC8ofnVa.mjs → upstream-exits-4bn4gblF.mjs} +5 -6
  56. package/dist/{upstream-exits-BC8ofnVa.mjs.map → upstream-exits-4bn4gblF.mjs.map} +1 -1
  57. package/dist/{upstream-record-I5ZgAwk-.mjs → upstream-record-DRNGym9S.mjs} +2 -3
  58. package/dist/{upstream-record-I5ZgAwk-.mjs.map → upstream-record-DRNGym9S.mjs.map} +1 -1
  59. package/dist/upstream.mjs +6 -6
  60. package/dist/{workspace-projects-DnWDM8G1.mjs → workspace-projects-MpL8K7Nz.mjs} +2 -2
  61. package/dist/{workspace-projects-DnWDM8G1.mjs.map → workspace-projects-MpL8K7Nz.mjs.map} +1 -1
  62. package/dist/workspace-settings.d.mts +1 -1
  63. package/dist/workspace-settings.mjs +50 -31
  64. package/dist/workspace-settings.mjs.map +1 -1
  65. package/package.json +10 -10
  66. package/skills/msch-publishing/SKILL.md +1 -1
  67. package/skills/msch-repository-config/SKILL.md +19 -8
  68. package/skills/msch-workspace-settings/SKILL.md +8 -10
  69. package/src/app/vite.d.ts +3 -3
  70. package/dist/collections-CdEHfcEj.mjs +0 -6
  71. package/dist/collections-CdEHfcEj.mjs.map +0 -1
  72. package/dist/define-lint-preset-BjHY5WNt.mjs.map +0 -1
  73. package/dist/index-skill-Bf5Ish11.mjs +0 -19
  74. package/dist/index-skill-Bf5Ish11.mjs.map +0 -1
  75. package/dist/published-BGur-Htr.mjs.map +0 -1
  76. package/dist/repository-files-hbJpQ1i0.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"config-BBdsNPSO.mjs","names":[],"sources":["../src/shared/config/index.ts"],"sourcesContent":["export const JAPANESE = /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u;\n\n/** @msch video.intro */\nexport const VIDEO_INTROS = [\"beats\", \"plain\"] as const;\n\nexport type VideoIntro = (typeof VIDEO_INTROS)[number];\n\nexport const DECISION_MODEL = \"cloudflare/@cf/cloudflare/clef-flash\";\n\nexport const DECISION_TIMEOUT_MS = 50_000;\n\nexport { RENOVATE_PRESET, SELF_HOMEPAGE, SELF_NAME } from \"./self.ts\";\n"],"mappings":";AAAA,MAAa,WAAW;;AAGxB,MAAa,eAAe,CAAC,SAAS,OAAO;AAI7C,MAAa,iBAAiB;AAE9B,MAAa,sBAAsB"}
1
+ {"version":3,"file":"config-BBdsNPSO.mjs","names":[],"sources":["../src/shared/config/index.ts"],"sourcesContent":["export const JAPANESE = /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u;\n\n/** @msch video.intro */\nexport const VIDEO_INTROS = [\"beats\", \"plain\"] as const;\n\nexport type VideoIntro = (typeof VIDEO_INTROS)[number];\n\nexport const DECISION_MODEL = \"cloudflare/@cf/cloudflare/clef-flash\";\n\nexport const DECISION_TIMEOUT_MS = 50_000;\n\nexport { RENOVATE_PRESET, SELF_HOMEPAGE, SELF_NAME } from \"./self.ts\";\n\nexport { exempt, generated } from \"./exempt.ts\";\n"],"mappings":";AAAA,MAAa,WAAW;;AAGxB,MAAa,eAAe,CAAC,SAAS,OAAO;AAI7C,MAAa,iBAAiB;AAE9B,MAAa,sBAAsB"}
package/dist/config.d.mts CHANGED
@@ -1,28 +1,31 @@
1
- import { a as WorkspaceSettings } from "./index-CMyIrsah.mjs";
2
- import { t as MarkdownOptions } from "./index-Bw2kfEek.mjs";
1
+ import { a as WorkspaceSettings } from "./index-Dm0Gg9wS.mjs";
2
+ import { r as MarkdownOptions } from "./index-CEazCJ_w.mjs";
3
3
  import { ToolSections } from "@r_masseater/vite-plus-adopt";
4
+ import { Schema } from "effect";
4
5
  import { UserConfig } from "vite-plus";
5
- import { OxlintOverride } from "vite-plus/lint";
6
6
  import { H56mConfig } from "@r_masseater/h56m";
7
+ declare const AddedRules: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Literals<readonly ["error", "deny"]>, Schema.mutable<Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literals<readonly ["error", "deny"]>]>, readonly [Schema.Unknown]>>]>>;
8
+ type AddedRulesValue = typeof AddedRules.Type;
9
+ interface TextSource {
10
+ readonly files: readonly string[];
11
+ readonly plugins: Readonly<Record<string, boolean | object>>;
12
+ }
7
13
  interface TextOptions {
8
- readonly ignores?: readonly string[];
9
- readonly kanji?: readonly string[];
10
- readonly technicalWriting?: Readonly<Record<string, boolean | object>>;
11
- readonly rules?: Readonly<Record<string, boolean | object>>;
12
- readonly filters?: Readonly<Record<string, boolean | object>>;
13
- readonly sources?: NonNullable<NonNullable<ToolSections["textlint"]>["sources"]>;
14
+ readonly properNouns?: readonly string[];
15
+ readonly rules?: Readonly<Record<string, object>>;
16
+ readonly sources?: readonly TextSource[];
14
17
  }
15
- interface SecretOptions {
16
- readonly lines?: readonly string[];
17
- readonly paths?: readonly string[];
18
+ export declare const secretsOf: () => H56mConfig;
19
+ export interface AddedOverride {
20
+ readonly files: readonly string[];
21
+ readonly excludeFiles?: readonly string[];
22
+ readonly rules: AddedRulesValue;
18
23
  }
19
- export declare const secretsOf: ({ lines, paths }: SecretOptions) => H56mConfig;
20
24
  export interface RepositoryOptions {
21
25
  readonly workspace: WorkspaceSettings;
22
- readonly overrides?: readonly OxlintOverride[];
23
- readonly secrets?: SecretOptions;
26
+ readonly overrides?: readonly AddedOverride[];
24
27
  readonly textlint?: TextOptions;
25
- readonly markdown?: MarkdownOptions;
28
+ readonly markdown?: Omit<MarkdownOptions, "indexSkill">;
26
29
  readonly run?: {
27
30
  readonly tasks?: Readonly<Record<string, string>>;
28
31
  readonly remoteCache?: string;
package/dist/config.mjs CHANGED
@@ -1,160 +1,8 @@
1
- import { i as structureOf, l as requiredStack, m as generated, n as textlintFilters, p as decisionTestRules, r as textlintPresets, t as markdownOf, u as lint } from "./define-lint-preset-BjHY5WNt.mjs";
1
+ import { S as exempt, d as requiredStack, f as lint, h as decisionTestRules, o as structureOf, r as markdownOf } from "./define-lint-preset-B-hC9_df.mjs";
2
+ import { i as textlintOf, o as tasksOf, r as secretsOf } from "./repository-text-DGfYd5Wq.mjs";
2
3
  import { Array, Option, Record, pipe } from "effect";
3
4
  import { fileURLToPath } from "node:url";
4
5
  import { recommended } from "@r_masseater/fu4/presets";
5
- import { betterleaks } from "@r_masseater/h56m/presets";
6
- // src/app/repository-tasks.ts
7
- const NOT_INPUTS = [
8
- "!node_modules/.pnpm-store",
9
- "!node_modules/.pnpm-store/**",
10
- "!node_modules/.tmp",
11
- "!node_modules/.tmp/**",
12
- "!target/**",
13
- "!node_modules/.vitest-cache/**",
14
- "!node_modules/.cache/**"
15
- ];
16
- const UNTRACKED_ENV = [
17
- "CLOUDFLARE_ACCOUNT_ID",
18
- "CLOUDFLARE_AI_GATEWAY_ID",
19
- "CLOUDFLARE_API_TOKEN",
20
- "CLAUDECODE",
21
- "CLAUDE_CODE_REMOTE",
22
- "GITHUB_ACTIONS",
23
- "HTTPS_PROXY",
24
- "https_proxy",
25
- "NO_PROXY",
26
- "no_proxy",
27
- "SSL_CERT_FILE",
28
- "NODE_EXTRA_CA_CERTS"
29
- ];
30
- const FALLOW = pipe([
31
- "--skip dupes --fail-on-issues --quiet --format compact",
32
- "dead-code --no-production --fail-on-issues --quiet --format compact",
33
- "dead-code --no-production --quiet --format json | jq -n 'input | {prop_drilling_chains, thin_wrappers, duplicate_prop_shapes} | with_entries(select(.value | length > 0)) | if length > 0 then halt_error else empty end'",
34
- "dupes --fail-on-issues --quiet --format compact",
35
- "security --fail-on-issues --quiet"
36
- ], Array.map((args) => `FALLOW_TYPE_AWARE_BACKEND=tsrs fallow ${args}`));
37
- const CHECK = `TSRS_LINT_RUN_EXTERNAL_CODE=1 msch-changed --batch-sources ${String(1e3)} vp check --deny-warnings --continue-on-error`;
38
- const COMPAT = "msch-changed msch-publish compat-changed";
39
- const AUDIT = "before=\"$(cksum pnpm-workspace.yaml)\"; vp pm audit --fix || exit; if [ \"$before\" != \"$(cksum pnpm-workspace.yaml)\" ]; then echo \"vp pm audit --fix rewrote pnpm-workspace.yaml. Run vp install and commit the diff.\" >&2; exit 1; fi";
40
- const BROKER_TOKEN = `GH_TOKEN="\${GITHUB_APP_TOKEN:-$GH_TOKEN}"`;
41
- const DAILY = `msch-exits; ${BROKER_TOKEN} msch-upstream; ${BROKER_TOKEN} msch-refs`;
42
- const tasksOf = ({ workspace, commands }) => {
43
- const inputs = [
44
- { auto: true },
45
- ...workspace.ignoredDirectories,
46
- ...NOT_INPUTS
47
- ];
48
- const checks = {
49
- fallow: {
50
- command: FALLOW,
51
- cache: {
52
- input: [
53
- ...inputs,
54
- "!.fallow/**",
55
- "!**/dist/**",
56
- "!**/.fallow-verified"
57
- ],
58
- output: []
59
- }
60
- },
61
- check: {
62
- command: CHECK,
63
- cache: {
64
- input: inputs,
65
- untrackedEnv: UNTRACKED_ENV
66
- }
67
- },
68
- test: {
69
- command: "msch-changed vp test run --passWithNoTests",
70
- dependsOn: ["check", ...workspace.tasks.native],
71
- cache: { input: [...inputs, "!**/.cache/**"] }
72
- },
73
- msch: {
74
- command: "msch",
75
- dependsOn: ["check", ...workspace.tasks.native],
76
- cache: false
77
- },
78
- audit: {
79
- command: AUDIT,
80
- cache: false
81
- },
82
- published: {
83
- command: "msch-published",
84
- cache: false
85
- },
86
- compat: {
87
- command: COMPAT,
88
- cache: false
89
- },
90
- ...commands
91
- };
92
- return {
93
- ...checks,
94
- daily: {
95
- command: DAILY,
96
- dependsOn: [...workspace.tasks.native],
97
- cache: false
98
- },
99
- verify: {
100
- command: [],
101
- dependsOn: [...workspace.tasks.verify, ...Record.keys(checks)]
102
- }
103
- };
104
- };
105
- // src/app/repository-text.ts
106
- const TEXT_IGNORES = [
107
- "AGENTS.md",
108
- "CLAUDE.md",
109
- ".agents/skills/**",
110
- "CHANGELOG.md"
111
- ];
112
- const SENTENCE_LENGTH = 120;
113
- const KANJI_RUN = 6;
114
- const PUBLIC_LINES = [String.raw`\bCF_BEACON_TOKEN = "[0-9a-f]{32}"`];
115
- const textlintOf = ({ ignores = [], kanji = [], technicalWriting = {}, rules = {}, filters = {}, sources = [] }) => ({
116
- ignores: [...TEXT_IGNORES, ...ignores],
117
- presets: textlintPresets,
118
- filterModules: textlintFilters,
119
- reportUnusedDirectives: true,
120
- sources: pipe(sources, Array.map((source) => ({
121
- ...source,
122
- filters: {
123
- comments: true,
124
- ...source.filters
125
- }
126
- }))),
127
- filters: {
128
- comments: true,
129
- ...filters
130
- },
131
- rules: {
132
- "@textlint-ja/preset-ai-writing": true,
133
- "@r_masseater/preset-ja": true,
134
- "preset-ja-technical-writing": {
135
- "sentence-length": { max: SENTENCE_LENGTH },
136
- "ja-no-mixed-period": { allowPeriodMarks: [":"] },
137
- "no-mix-dearu-desumasu": {
138
- preferInBody: "である",
139
- preferInList: "である"
140
- },
141
- "max-kanji-continuous-len": {
142
- max: KANJI_RUN,
143
- allow: [...kanji]
144
- },
145
- ...technicalWriting
146
- },
147
- ...rules
148
- }
149
- });
150
- const anyOf = (subject) => (patterns) => {
151
- if (Array.isReadonlyArrayEmpty(patterns)) return [];
152
- return [`matchesAny(${subject}, [${pipe(patterns, Array.map((pattern) => `\`${pattern}\``), Array.join(", "))}])`];
153
- };
154
- const secretsOf = ({ lines = [], paths = [] }) => ({
155
- extend: { path: betterleaks },
156
- filter: pipe([...anyOf("finding.line")([...PUBLIC_LINES, ...lines]), ...anyOf(`attributes["path"]`)(paths)], Array.join(" || "))
157
- });
158
6
  // src/app/repository-config.ts
159
7
  const cacheOf = (remoteCache) => pipe(Option.fromNullishOr(remoteCache), Option.match({
160
8
  onNone: () => true,
@@ -170,9 +18,20 @@ const allowedIn = (allowances, field) => pipe(allowances, Record.map(({ workspac
170
18
  fields: [field]
171
19
  })));
172
20
  const COMMIT_CONVENTION = fileURLToPath(import.meta.resolve("@commitlint/config-conventional"));
21
+ const added = ({ files, excludeFiles, rules }) => pipe(Option.fromUndefinedOr(excludeFiles), Option.match({
22
+ onNone: () => ({
23
+ files: [...files],
24
+ rules: { ...rules }
25
+ }),
26
+ onSome: (excluded) => ({
27
+ files: [...files],
28
+ excludeFiles: [...excluded],
29
+ rules: { ...rules }
30
+ })
31
+ }));
173
32
  const lintOf = ({ workspace, overrides = [] }) => ({
174
33
  ...lint,
175
- ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],
34
+ ignorePatterns: exempt,
176
35
  overrides: [
177
36
  ...lint.overrides,
178
37
  {
@@ -187,7 +46,7 @@ const lintOf = ({ workspace, overrides = [] }) => ({
187
46
  ],
188
47
  rules: { "import/no-default-export": "off" }
189
48
  },
190
- ...overrides,
49
+ ...pipe(overrides, Array.map(added)),
191
50
  ...workspace.lint.overrides,
192
51
  {
193
52
  files: ["**/*.test.ts"],
@@ -196,7 +55,7 @@ const lintOf = ({ workspace, overrides = [] }) => ({
196
55
  ]
197
56
  });
198
57
  const repositoryConfig = (options) => {
199
- const { workspace, secrets = {}, textlint = {}, markdown = {}, run = {} } = options;
58
+ const { workspace, textlint = {}, markdown = {}, run = {} } = options;
200
59
  return {
201
60
  commitlint: { extends: [COMMIT_CONVENTION] },
202
61
  dependencyRules: {
@@ -207,13 +66,16 @@ const repositoryConfig = (options) => {
207
66
  banned: requiredStack,
208
67
  peerRanges: "intersect"
209
68
  },
210
- h56m: secretsOf(secrets),
69
+ h56m: secretsOf(),
211
70
  wism: structureOf({
212
71
  members: workspace.members,
213
- ignorePatterns: workspace.lint.ignorePatterns
72
+ ignorePatterns: exempt
214
73
  }),
215
74
  textlint: textlintOf(textlint),
216
- y8: markdownOf(markdown),
75
+ y8: markdownOf({
76
+ ...markdown,
77
+ indexSkill: workspace.indexSkill
78
+ }),
217
79
  fu4: recommended(),
218
80
  test: {
219
81
  projects: [...workspace.testProjects],
@@ -221,7 +83,7 @@ const repositoryConfig = (options) => {
221
83
  },
222
84
  staged: { "*": "vp fmt --no-error-on-unmatched-pattern" },
223
85
  fmt: {
224
- ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],
86
+ ignorePatterns: exempt,
225
87
  sortImports: true,
226
88
  sortTailwindcss: true,
227
89
  sortPackageJson: true
@@ -1 +1 @@
1
- {"version":3,"file":"config.mjs","names":["Arr","Rec","Arr","Rec","preset"],"sources":["../src/app/repository-tasks.ts","../src/app/repository-text.ts","../src/app/repository-config.ts"],"sourcesContent":["import { Array as Arr, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\n\ntype Tasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface TaskOptions {\n readonly workspace: WorkspaceSettings;\n readonly commands: Readonly<Record<string, string>>;\n}\n\nconst NOT_INPUTS = [\n \"!node_modules/.pnpm-store\",\n \"!node_modules/.pnpm-store/**\",\n \"!node_modules/.tmp\",\n \"!node_modules/.tmp/**\",\n \"!target/**\",\n \"!node_modules/.vitest-cache/**\",\n \"!node_modules/.cache/**\",\n];\n\nconst UNTRACKED_ENV = [\n \"CLOUDFLARE_ACCOUNT_ID\",\n \"CLOUDFLARE_AI_GATEWAY_ID\",\n \"CLOUDFLARE_API_TOKEN\",\n \"CLAUDECODE\",\n \"CLAUDE_CODE_REMOTE\",\n \"GITHUB_ACTIONS\",\n \"HTTPS_PROXY\",\n \"https_proxy\",\n \"NO_PROXY\",\n \"no_proxy\",\n \"SSL_CERT_FILE\",\n \"NODE_EXTRA_CA_CERTS\",\n];\n\nconst FALLOW_ARGS = [\n \"--skip dupes --fail-on-issues --quiet --format compact\",\n \"dead-code --no-production --fail-on-issues --quiet --format compact\",\n \"dead-code --no-production --quiet --format json | jq -n 'input | {prop_drilling_chains, thin_wrappers, duplicate_prop_shapes} | with_entries(select(.value | length > 0)) | if length > 0 then halt_error else empty end'\",\n \"dupes --fail-on-issues --quiet --format compact\",\n \"security --fail-on-issues --quiet\",\n];\n\nconst FALLOW = pipe(\n FALLOW_ARGS,\n Arr.map((args) => `FALLOW_TYPE_AWARE_BACKEND=tsrs fallow ${args}`),\n);\n\nconst CHECK_BATCH_SOURCES = 1000;\n\nconst CHECK = `TSRS_LINT_RUN_EXTERNAL_CODE=1 msch-changed --batch-sources ${String(CHECK_BATCH_SOURCES)} vp check --deny-warnings --continue-on-error`;\n\nconst COMPAT = \"msch-changed msch-publish compat-changed\";\n\nconst AUDIT =\n 'before=\"$(cksum pnpm-workspace.yaml)\"; vp pm audit --fix || exit; if [ \"$before\" != \"$(cksum pnpm-workspace.yaml)\" ]; then echo \"vp pm audit --fix rewrote pnpm-workspace.yaml. Run vp install and commit the diff.\" >&2; exit 1; fi';\n\nconst BROKER_TOKEN = `GH_TOKEN=\"\\${GITHUB_APP_TOKEN:-$GH_TOKEN}\"`;\nconst DAILY = `msch-exits; ${BROKER_TOKEN} msch-upstream; ${BROKER_TOKEN} msch-refs`;\n\nexport const tasksOf = ({\n workspace,\n commands,\n}: TaskOptions): NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]> => {\n const inputs = [{ auto: true }, ...workspace.ignoredDirectories, ...NOT_INPUTS];\n const checks: Tasks = {\n fallow: {\n command: FALLOW,\n cache: {\n input: [...inputs, \"!.fallow/**\", \"!**/dist/**\", \"!**/.fallow-verified\"],\n output: [],\n },\n },\n check: {\n command: CHECK,\n cache: { input: inputs, untrackedEnv: UNTRACKED_ENV },\n },\n test: {\n command: \"msch-changed vp test run --passWithNoTests\",\n dependsOn: [\"check\", ...workspace.tasks.native],\n cache: { input: [...inputs, \"!**/.cache/**\"] },\n },\n msch: { command: \"msch\", dependsOn: [\"check\", ...workspace.tasks.native], cache: false },\n audit: { command: AUDIT, cache: false },\n published: { command: \"msch-published\", cache: false },\n compat: { command: COMPAT, cache: false },\n ...commands,\n };\n return {\n ...checks,\n daily: { command: DAILY, dependsOn: [...workspace.tasks.native], cache: false },\n verify: { command: [], dependsOn: [...workspace.tasks.verify, ...Rec.keys(checks)] },\n };\n};\n","import type { H56mConfig } from \"@r_masseater/h56m\";\nimport { betterleaks } from \"@r_masseater/h56m/presets\";\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Array as Arr, pipe } from \"effect\";\n\nimport { textlintFilters, textlintPresets } from \"#/features/define-lint-preset/index.ts\";\n\nexport interface TextOptions {\n readonly ignores?: readonly string[];\n readonly kanji?: readonly string[];\n readonly technicalWriting?: Readonly<Record<string, boolean | object>>;\n readonly rules?: Readonly<Record<string, boolean | object>>;\n readonly filters?: Readonly<Record<string, boolean | object>>;\n readonly sources?: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"sources\"]>;\n}\n\nexport interface SecretOptions {\n readonly lines?: readonly string[];\n readonly paths?: readonly string[];\n}\n\nconst TEXT_IGNORES = [\"AGENTS.md\", \"CLAUDE.md\", \".agents/skills/**\", \"CHANGELOG.md\"];\nconst SENTENCE_LENGTH = 120;\nconst KANJI_RUN = 6;\nconst PUBLIC_LINES = [String.raw`\\bCF_BEACON_TOKEN = \"[0-9a-f]{32}\"`];\n\nexport const textlintOf = ({\n ignores = [],\n kanji = [],\n technicalWriting = {},\n rules = {},\n filters = {},\n sources = [],\n}: TextOptions): NonNullable<ToolSections[\"textlint\"]> => ({\n ignores: [...TEXT_IGNORES, ...ignores],\n presets: textlintPresets,\n filterModules: textlintFilters,\n reportUnusedDirectives: true,\n sources: pipe(\n sources,\n Arr.map((source) => ({ ...source, filters: { comments: true, ...source.filters } })),\n ),\n filters: { comments: true, ...filters },\n rules: {\n \"@textlint-ja/preset-ai-writing\": true,\n \"@r_masseater/preset-ja\": true,\n \"preset-ja-technical-writing\": {\n \"sentence-length\": { max: SENTENCE_LENGTH },\n \"ja-no-mixed-period\": { allowPeriodMarks: [\":\"] },\n \"no-mix-dearu-desumasu\": { preferInBody: \"である\", preferInList: \"である\" },\n \"max-kanji-continuous-len\": { max: KANJI_RUN, allow: [...kanji] },\n ...technicalWriting,\n },\n ...rules,\n },\n});\n\nconst anyOf =\n (subject: string) =>\n (patterns: readonly string[]): readonly string[] => {\n if (Arr.isReadonlyArrayEmpty(patterns)) {\n return [];\n }\n const listed = pipe(\n patterns,\n Arr.map((pattern) => `\\`${pattern}\\``),\n Arr.join(\", \"),\n );\n return [`matchesAny(${subject}, [${listed}])`];\n };\n\nexport const secretsOf = ({ lines = [], paths = [] }: SecretOptions): H56mConfig => ({\n extend: { path: betterleaks },\n filter: pipe(\n [...anyOf(\"finding.line\")([...PUBLIC_LINES, ...lines]), ...anyOf(`attributes[\"path\"]`)(paths)],\n Arr.join(\" || \"),\n ),\n});\n","import { fileURLToPath } from \"node:url\";\n\nimport { recommended } from \"@r_masseater/fu4/presets\";\nimport { Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport type { MarkdownOptions } from \"#/features/define-lint-preset/index.ts\";\nimport {\n decisionTestRules,\n generated,\n lint as preset,\n markdownOf,\n requiredStack,\n structureOf,\n} from \"#/features/define-lint-preset/index.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { secretsOf, textlintOf } from \"./repository-text.ts\";\nimport type { SecretOptions, TextOptions } from \"./repository-text.ts\";\n\nexport { secretsOf } from \"./repository-text.ts\";\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly OxlintOverride[];\n readonly secrets?: SecretOptions;\n readonly textlint?: TextOptions;\n readonly markdown?: MarkdownOptions;\n readonly run?: {\n readonly tasks?: Readonly<Record<string, string>>;\n readonly remoteCache?: string;\n };\n}\n\ninterface SharedCache {\n readonly scripts: true;\n readonly tasks: true;\n readonly remote: { readonly url: string };\n}\n\nconst cacheOf = (remoteCache: string | undefined): SharedCache | true =>\n pipe(\n Option.fromNullishOr(remoteCache),\n Option.match({\n onNone: (): SharedCache | true => true,\n onSome: (url) => ({ scripts: true, tasks: true, remote: { url } }),\n }),\n );\n\ntype Allowed = NonNullable<NonNullable<UserConfig[\"dependencyRules\"]>[\"allowed\"]>;\n\nconst allowedIn = (\n allowances: WorkspaceSettings[\"devDependencies\"],\n field: \"dependencies\" | \"devDependencies\",\n): Allowed =>\n pipe(\n allowances,\n Rec.map(({ workspaces, dependencies }) => ({ workspaces, dependencies, fields: [field] })),\n );\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [\n ...workspace.lint.publicEntries,\n ...workspace.lint.deployEntries,\n ...workspace.lint.siteEntries,\n ],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...overrides,\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, secrets = {}, textlint = {}, markdown = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: {\n ...allowedIn(workspace.devDependencies, \"devDependencies\"),\n ...allowedIn(workspace.dependencies, \"dependencies\"),\n },\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n h56m: secretsOf(secrets),\n wism: structureOf({\n members: workspace.members,\n ignorePatterns: workspace.lint.ignorePatterns,\n }),\n textlint: textlintOf(textlint),\n y8: markdownOf(markdown),\n fu4: recommended(),\n test: { projects: [...workspace.testProjects], passWithNoTests: true },\n staged: { \"*\": \"vp fmt --no-error-on-unmatched-pattern\" },\n fmt: {\n ignorePatterns: [...generated, ...workspace.lint.ignorePatterns],\n sortImports: true,\n sortTailwindcss: true,\n sortPackageJson: true,\n },\n lint: lintOf(options),\n run: {\n cache: cacheOf(run.remoteCache),\n tasks: tasksOf({ workspace, commands: run.tasks ?? {} }),\n },\n };\n};\n"],"mappings":";;;;;;AAYA,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,MAAM,SAAS,KACb;CARA;CACA;CACA;CACA;CACA;AAIU,GACVA,MAAI,KAAK,SAAS,yCAAyC,MAAM,CACnE;AAIA,MAAM,QAAQ,8DAA8D,OAAO,GAAmB,EAAE;AAExG,MAAM,SAAS;AAEf,MAAM,QACJ;AAEF,MAAM,eAAe;AACrB,MAAM,QAAQ,eAAe,aAAa,kBAAkB,aAAa;AAEzE,MAAa,WAAW,EACtB,WACA,eACuE;CACvE,MAAM,SAAS;EAAC,EAAE,MAAM,KAAK;EAAG,GAAG,UAAU;EAAoB,GAAG;CAAU;CAC9E,MAAM,SAAgB;EACpB,QAAQ;GACN,SAAS;GACT,OAAO;IACL,OAAO;KAAC,GAAG;KAAQ;KAAe;KAAe;IAAsB;IACvE,QAAQ,CAAC;GACX;EACF;EACA,OAAO;GACL,SAAS;GACT,OAAO;IAAE,OAAO;IAAQ,cAAc;GAAc;EACtD;EACA,MAAM;GACJ,SAAS;GACT,WAAW,CAAC,SAAS,GAAG,UAAU,MAAM,MAAM;GAC9C,OAAO,EAAE,OAAO,CAAC,GAAG,QAAQ,eAAe,EAAE;EAC/C;EACA,MAAM;GAAE,SAAS;GAAQ,WAAW,CAAC,SAAS,GAAG,UAAU,MAAM,MAAM;GAAG,OAAO;EAAM;EACvF,OAAO;GAAE,SAAS;GAAO,OAAO;EAAM;EACtC,WAAW;GAAE,SAAS;GAAkB,OAAO;EAAM;EACrD,QAAQ;GAAE,SAAS;GAAQ,OAAO;EAAM;EACxC,GAAG;CACL;CACA,OAAO;EACL,GAAG;E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,CAAC,iBAAiB,EAAE;EAC3C,iBAAiB;GACf,SAAS;IACP,GAAG,UAAU,UAAU,iBAAiB,iBAAiB;IACzD,GAAG,UAAU,UAAU,cAAc,cAAc;GACrD;GACA,QAAQ;GACR,YAAY;EACd;EACA,MAAM,UAAU,OAAO;EACvB,MAAM,YAAY;GAChB,SAAS,UAAU;GACnB,gBAAgB,UAAU,KAAK;EACjC,CAAC;EACD,UAAU,WAAW,QAAQ;EAC7B,IAAI,WAAW,QAAQ;EACvB,KAAK,YAAY;EACjB,MAAM;GAAE,UAAU,CAAC,GAAG,UAAU,YAAY;GAAG,iBAAiB;EAAK;EACrE,QAAQ,EAAE,KAAK,yCAAyC;EACxD,KAAK;GACH,gBAAgB,CAAC,GAAG,WAAW,GAAG,UAAU,KAAK,cAAc;GAC/D,aAAa;GACb,iBAAiB;GACjB,iBAAiB;EACnB;EACA,MAAM,OAAO,OAAO;EACpB,KAAK;GACH,OAAO,QAAQ,IAAI,WAAW;GAC9B,OAAO,QAAQ;IAAE;IAAW,UAAU,IAAI,SAAS,CAAC;GAAE,CAAC;EACzD;CACF;AACF"}
1
+ {"version":3,"file":"config.mjs","names":["Rec","preset","Arr"],"sources":["../src/app/repository-config.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\n\nimport { recommended } from \"@r_masseater/fu4/presets\";\nimport { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport type { MarkdownOptions } from \"#/features/define-lint-preset/index.ts\";\nimport {\n decisionTestRules,\n exempt,\n lint as preset,\n markdownOf,\n requiredStack,\n structureOf,\n} from \"#/features/define-lint-preset/index.ts\";\nimport type { AddedRulesValue } from \"#/shared/lib/added-rules.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { secretsOf, textlintOf } from \"./repository-text.ts\";\nimport type { TextOptions } from \"./repository-text.ts\";\n\nexport { secretsOf } from \"./repository-text.ts\";\n\nexport interface AddedOverride {\n readonly files: readonly string[];\n readonly excludeFiles?: readonly string[];\n readonly rules: AddedRulesValue;\n}\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly AddedOverride[];\n readonly textlint?: TextOptions;\n readonly markdown?: Omit<MarkdownOptions, \"indexSkill\">;\n readonly run?: {\n readonly tasks?: Readonly<Record<string, string>>;\n readonly remoteCache?: string;\n };\n}\n\ninterface SharedCache {\n readonly scripts: true;\n readonly tasks: true;\n readonly remote: { readonly url: string };\n}\n\nconst cacheOf = (remoteCache: string | undefined): SharedCache | true =>\n pipe(\n Option.fromNullishOr(remoteCache),\n Option.match({\n onNone: (): SharedCache | true => true,\n onSome: (url) => ({ scripts: true, tasks: true, remote: { url } }),\n }),\n );\n\ntype Allowed = NonNullable<NonNullable<UserConfig[\"dependencyRules\"]>[\"allowed\"]>;\n\nconst allowedIn = (\n allowances: WorkspaceSettings[\"devDependencies\"],\n field: \"dependencies\" | \"devDependencies\",\n): Allowed =>\n pipe(\n allowances,\n Rec.map(({ workspaces, dependencies }) => ({ workspaces, dependencies, fields: [field] })),\n );\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst added = ({ files, excludeFiles, rules }: AddedOverride): OxlintOverride =>\n pipe(\n Option.fromUndefinedOr(excludeFiles),\n Option.match({\n onNone: (): OxlintOverride => ({ files: [...files], rules: { ...rules } }),\n onSome: (excluded): OxlintOverride => ({\n files: [...files],\n excludeFiles: [...excluded],\n rules: { ...rules },\n }),\n }),\n );\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: exempt,\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [\n ...workspace.lint.publicEntries,\n ...workspace.lint.deployEntries,\n ...workspace.lint.siteEntries,\n ],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...pipe(overrides, Arr.map(added)),\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, textlint = {}, markdown = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: {\n ...allowedIn(workspace.devDependencies, \"devDependencies\"),\n ...allowedIn(workspace.dependencies, \"dependencies\"),\n },\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n h56m: secretsOf(),\n wism: structureOf({\n members: workspace.members,\n ignorePatterns: exempt,\n }),\n textlint: textlintOf(textlint),\n y8: markdownOf({ ...markdown, indexSkill: workspace.indexSkill }),\n fu4: recommended(),\n test: { projects: [...workspace.testProjects], passWithNoTests: true },\n staged: { \"*\": \"vp fmt --no-error-on-unmatched-pattern\" },\n fmt: {\n ignorePatterns: exempt,\n sortImports: true,\n sortTailwindcss: true,\n sortPackageJson: true,\n },\n lint: lintOf(options),\n run: {\n cache: cacheOf(run.remoteCache),\n tasks: tasksOf({ workspace, commands: run.tasks ?? {} }),\n },\n };\n};\n"],"mappings":";;;;;;AAgDA,MAAM,WAAW,gBACf,KACE,OAAO,cAAc,WAAW,GAChC,OAAO,MAAM;CACX,cAAkC;CAClC,SAAS,SAAS;EAAE,SAAS;EAAM,OAAO;EAAM,QAAQ,EAAE,IAAI;CAAE;AAClE,CAAC,CACH;AAIF,MAAM,aACJ,YACA,UAEA,KACE,YACAA,OAAI,KAAK,EAAE,YAAY,oBAAoB;CAAE;CAAY;CAAc,QAAQ,CAAC,KAAK;AAAE,EAAE,CAC3F;AAEF,MAAM,oBAAoB,cAAc,YAAY,QAAQ,iCAAiC,CAAC;AAE9F,MAAM,SAAS,EAAE,OAAO,cAAc,YACpC,KACE,OAAO,gBAAgB,YAAY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K;EACrE,QAAQ,EAAE,KAAK,yCAAyC;EACxD,KAAK;GACH,gBAAgB;GAChB,aAAa;GACb,iBAAiB;GACjB,iBAAiB;EACnB;EACA,MAAM,OAAO,OAAO;EACpB,KAAK;GACH,OAAO,QAAQ,IAAI,WAAW;GAC9B,OAAO,QAAQ;IAAE;IAAW,UAAU,IAAI,SAAS,CAAC;GAAE,CAAC;EACzD;CACF;AACF"}
@@ -1,2 +1,2 @@
1
- import { r as _default } from "./index-Bw2kfEek.mjs";
1
+ import { a as _default } from "./index-CEazCJ_w.mjs";
2
2
  export { _default as default };
@@ -1 +1 @@
1
- export { h as default } from "./define-lint-preset-BjHY5WNt.mjs";
1
+ export { g as default } from "./define-lint-preset-B-hC9_df.mjs";
@@ -1,9 +1,7 @@
1
- import { r as splitFrontmatter, t as isIndexSkill } from "./index-skill-Bf5Ish11.mjs";
2
1
  import { n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-BBdsNPSO.mjs";
3
2
  import { createRequire, registerHooks } from "node:module";
4
- import { Array, Option, Order, Predicate, Record, String, Struct, pipe } from "effect";
3
+ import { Array, Option, Predicate, Record, String, Struct, pipe } from "effect";
5
4
  import { fileURLToPath } from "node:url";
6
- import { createDecisionPlugin, defineDecisionRule } from "@r_masseater/oxlint-plugin-decision";
7
5
  import tanstackQuery from "@r_masseater/oxlint-typed-rules/tanstack-query";
8
6
  import tanstackRouter from "@r_masseater/oxlint-typed-rules/tanstack-router";
9
7
  import { plugin } from "@shadcn/lint";
@@ -12,12 +10,33 @@ import { presets } from "@effect/tsgo/oxlint-presets";
12
10
  import htmlReact from "@html-eslint/eslint-plugin-react";
13
11
  import eslintReact from "@r_masseater/oxlint-typed-rules/react";
14
12
  import reactHooks from "eslint-plugin-react-hooks";
13
+ import { createDecisionPlugin, defineDecisionRule } from "@r_masseater/oxlint-plugin-decision";
15
14
  import remotion from "@r_masseater/oxlint-typed-rules/remotion";
16
15
  import { rustCrate, skill, structure, workspace } from "@r_masseater/wism/presets";
17
16
  import presetJa from "@r_masseater/textlint-rule-preset-ja";
18
17
  import { recommended } from "@r_masseater/y8/presets";
19
- import { globSync, readFileSync } from "node:fs";
20
- import path from "node:path";
18
+ // src/shared/config/exempt.ts
19
+ const generated = [
20
+ "**/routeTree.gen.ts",
21
+ "**/generated/**",
22
+ "**/drizzle/**/snapshot.json",
23
+ ".claude/skills/**",
24
+ ".intent/**",
25
+ "AGENTS.md",
26
+ "CLAUDE.md",
27
+ "**/CHANGELOG.md",
28
+ ".github/release-please/*manifest.json",
29
+ "**/.release-please-manifest.json",
30
+ "**/*.d.*.ts",
31
+ "**/src-tauri/gen/**"
32
+ ];
33
+ const checkerInputs = ["**/fixtures/**"];
34
+ const vendored = ["**/upstream/**"];
35
+ const exempt = [
36
+ ...generated,
37
+ ...checkerInputs,
38
+ ...vendored
39
+ ];
21
40
  // src/features/define-lint-preset/config/lint-overrides.config.ts
22
41
  const LOGPUSH = "Property[key.name=\"logpush\"]:not([value.value=false])";
23
42
  const LOGPUSH_MESSAGE = "Worker には logpush: true を付ける。付けないと、その Worker のログが Logpush に流れない";
@@ -169,20 +188,6 @@ const webGuidanceRules = {
169
188
  }]
170
189
  };
171
190
  // src/features/define-lint-preset/config/lint.config.ts
172
- const generated = [
173
- "**/routeTree.gen.ts",
174
- "**/generated/**",
175
- "**/drizzle/**/snapshot.json",
176
- ".claude/skills/**",
177
- ".intent/**",
178
- "AGENTS.md",
179
- "CLAUDE.md",
180
- "**/CHANGELOG.md",
181
- ".github/release-please/*manifest.json",
182
- "**/.release-please-manifest.json",
183
- "**/*.d.*.ts",
184
- "**/src-tauri/gen/**"
185
- ];
186
191
  const asErrors = (names) => Record.fromEntries(pipe(names, Array.map((name) => [name, "error"])));
187
192
  const allRulesOf = ({ prefix, rules }) => asErrors(pipe(Record.keys(rules), Array.map((rule) => `${prefix}/${rule}`)));
188
193
  const reactHooksRules = asErrors(pipe(Struct.keys(reactHooks.configs["recommended-latest"].rules), Array.map(String.replace("react-hooks/", "react-hooks-js/"))));
@@ -379,6 +384,7 @@ const lint = {
379
384
  ...baselineJs.configs.recommended().rules,
380
385
  "baseline-js/use-baseline": ["error", {
381
386
  available: "widely",
387
+ ignoreFeatures: ["top-level-await"],
382
388
  includeWebApis: { preset: "auto" },
383
389
  includeJsBuiltins: { preset: "auto" }
384
390
  }],
@@ -443,6 +449,29 @@ const lint = {
443
449
  },
444
450
  overrides: [
445
451
  removalPolicyOverride,
452
+ {
453
+ files: [".github/**/*.ts"],
454
+ rules: {
455
+ "baseline-js/use-baseline": "off",
456
+ "effecttsgo/async-function": "off",
457
+ "effecttsgo/global-console": "off",
458
+ "effecttsgo/global-fetch": "off",
459
+ "effecttsgo/global-json": "off",
460
+ "effecttsgo/missing-pipeable-signature": "off",
461
+ "effecttsgo/node-builtin-import": "off",
462
+ "effecttsgo/prefer-effect-array": "off",
463
+ "effecttsgo/prefer-effect-record": "off",
464
+ "effecttsgo/prefer-effect-string": "off",
465
+ "effecttsgo/process-env": "off",
466
+ "eslint/no-console": "off",
467
+ "eslint/no-undefined": "off",
468
+ "import/no-relative-parent-imports": "off",
469
+ "node/no-process-env": "off",
470
+ "node/no-sync": "off",
471
+ "oxc/no-async-await": "off",
472
+ "unicorn/no-process-exit": "off"
473
+ }
474
+ },
446
475
  alchemyOverride,
447
476
  {
448
477
  files: [
@@ -754,24 +783,13 @@ const textlintPresets = {
754
783
  const isFilter = (value) => Predicate.isFunction(value);
755
784
  const filterIn = (specifier, loaded) => pipe(Option.liftPredicate(loaded, isFilter), Option.getOrThrowWith(() => /* @__PURE__ */ new TypeError(`${specifier} does not export a textlint filter`)));
756
785
  const textlintFilters = { comments: filterIn("textlint-filter-rule-comments", createRequire(import.meta.url)("textlint-filter-rule-comments")) };
757
- // src/features/define-lint-preset/config/index-skill.config.ts
758
- const SKILL_FILES = [
759
- ".agents/skills/*/SKILL.md",
760
- ".claude/skills/*/SKILL.md",
761
- "skills/*/SKILL.md",
762
- "plugins/*/skills/*/SKILL.md"
763
- ];
764
- const nameOf = ({ fields }) => Option.filter(Option.fromNullishOr(fields["name"]), Predicate.isString);
765
- const readSource = Option.liftThrowable((file) => readFileSync(file, "utf8"));
766
- const indexNameAt = (root) => (file) => pipe(readSource(path.join(root, file)), Option.flatMap(splitFrontmatter), Option.filter(isIndexSkill), Option.flatMap(nameOf));
767
- const indexSkillIn = (root) => pipe(globSync(SKILL_FILES, { cwd: root }), Array.sortBy(Order.String), Array.findFirst(indexNameAt(root)));
768
786
  // src/features/define-lint-preset/config/markdown.config.ts
769
- const skillNamesIn = (root) => Option.match(indexSkillIn(root), {
787
+ const skillNamesOf = (indexSkill) => Option.match(indexSkill, {
770
788
  onNone: () => ({}),
771
789
  onSome: (index) => ({ index })
772
790
  });
773
- const docsIn = (root) => {
774
- const skillNames = skillNamesIn(root);
791
+ const docsOf = (indexSkill) => {
792
+ const skillNames = skillNamesOf(indexSkill);
775
793
  return {
776
794
  agents: {
777
795
  sections: [
@@ -788,13 +806,13 @@ const docsIn = (root) => {
788
806
  };
789
807
  const MARKDOWN_IGNORES = [
790
808
  ".agents/skills/**",
791
- "**/fixtures/**",
792
- "**/upstream/**",
793
809
  "CHANGELOG.md",
794
- "**/CLAUDE.md"
810
+ "**/CLAUDE.md",
811
+ ...exempt
795
812
  ];
796
- const markdownOf = ({ ignores = [], rules = {}, docs = {} }) => {
797
- const base = docsIn(process.cwd());
813
+ const MARKDOWN_RULES = { "agnix/XP-001": "off" };
814
+ const markdownOf = ({ indexSkill, docs = {} }) => {
815
+ const base = docsOf(indexSkill);
798
816
  return {
799
817
  extends: [recommended({
800
818
  ...base,
@@ -808,14 +826,11 @@ const markdownOf = ({ ignores = [], rules = {}, docs = {} }) => {
808
826
  ...docs.skills
809
827
  }
810
828
  })],
811
- rules: {
812
- "agnix/XP-001": "off",
813
- ...rules
814
- },
829
+ rules: MARKDOWN_RULES,
815
830
  reportUnusedDirectives: true,
816
- ignores: [...MARKDOWN_IGNORES, ...ignores]
831
+ ignores: MARKDOWN_IGNORES
817
832
  };
818
833
  };
819
- export { cloudflareResourceSyntax as _, videoRules as a, removalPolicySyntax as b, INSTRUMENTATION as c, allRulesOf as d, decisionRules as f, alchemyOverride as g, decision_rules_default as h, structureOf as i, requiredStack as l, generated as m, textlintFilters as n, remotionRules as o, decisionTestRules as p, textlintPresets as r, tracedRules as s, markdownOf as t, lint as u, commandsOverride as v, removalPolicyOverride as y };
834
+ export { exempt as S, alchemyOverride as _, textlintPresets as a, removalPolicyOverride as b, remotionRules as c, requiredStack as d, lint as f, decision_rules_default as g, decisionTestRules as h, textlintFilters as i, tracedRules as l, decisionRules as m, MARKDOWN_RULES as n, structureOf as o, allRulesOf as p, markdownOf as r, videoRules as s, MARKDOWN_IGNORES as t, INSTRUMENTATION as u, cloudflareResourceSyntax as v, removalPolicySyntax as x, commandsOverride as y };
820
835
 
821
- //# sourceMappingURL=define-lint-preset-BjHY5WNt.mjs.map
836
+ //# sourceMappingURL=define-lint-preset-B-hC9_df.mjs.map