@shivaedev/quality 0.71.0 → 0.72.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.72.0 - 2026-11-07
4
+
5
+ ### Added
6
+
7
+ - Report an `AGENTS.md` without its sibling `CLAUDE.md` symlink and give the repair command.
8
+
3
9
  ## 0.71.0 - 2026-11-07
4
10
 
5
11
  ### Changed
package/README.md CHANGED
@@ -90,7 +90,7 @@ export default defineConfig({
90
90
 
91
91
  `docs/repository-paths` checks paths in backticks in Markdown prose. Explicit `./` and `../` paths resolve from the document; `./` may also name a path from the repository root, as in a command run there. Other paths with a file extension or trailing slash are checked when their first folder belongs to the repository inventory; they may resolve from the repository root or the document’s folder. Prefix an extensionless repository file with `./` or `../` to distinguish it from a rule id or other identifier. Line suffixes and heading fragments are removed before checking existence. Commands, URLs, package specifiers, installed `node_modules` paths, globs, placeholders, fenced examples and released changelogs are left alone. Use a placeholder such as `<app>/src/main.ts` when describing a consumer's example rather than a path in this repository.
92
92
 
93
- `docs/agent-links` requires each inventoried `CLAUDE.md`, including dangling links, to be a symlink to an existing `AGENTS.md` file beside it. Keep the instructions in that sibling file.
93
+ `docs/agent-links` requires each inventoried `AGENTS.md` to have a `CLAUDE.md` symlink beside it and each inventoried `CLAUDE.md`, including dangling links, to point to an existing sibling `AGENTS.md`. Create a missing link with `ln -s AGENTS.md CLAUDE.md` from that folder, and keep the instructions in `AGENTS.md`.
94
94
 
95
95
  `effect/service-folders` checks every folder with a `defineService` declaration and folders directly beneath a `services/` grouping. Each has a `service.ts` with exactly one named exported const initialized by a direct `defineService` call. Type exports may stay; other runtime exports belong in focused files. The existing `effect/service-definition-assembly` check enforces the operation inventory.
96
96
 
@@ -1 +1 @@
1
- {"version":3,"file":"agentLinkFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/agentLinkFindings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,iBAAiB;;;gIAiB5B,CAAC"}
1
+ {"version":3,"file":"agentLinkFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/agentLinkFindings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,iBAAiB;;;gIA2B5B,CAAC"}
@@ -3,7 +3,7 @@ import { Effect, FileSystem } from "effect";
3
3
  import { orWhenAbsent } from "#inventory/filesystem.ts";
4
4
  export const agentLinkFindings = Effect.fn("Quality.agentLinkFindings")(function* ({ files, root }) {
5
5
  const fs = yield* FileSystem.FileSystem;
6
- const findings = yield* Effect.forEach(files.filter((file) => file === "CLAUDE.md" || file.endsWith("/CLAUDE.md")), (file) => Effect.gen(function* () {
6
+ const claudeFindings = yield* Effect.forEach(files.filter((file) => file === "CLAUDE.md" || file.endsWith("/CLAUDE.md")), (file) => Effect.gen(function* () {
7
7
  const path = join(root, file);
8
8
  const info = yield* fs.lstat(path);
9
9
  const target = info.type === "SymbolicLink" ? yield* fs.readLink(path) : undefined;
@@ -13,6 +13,12 @@ export const agentLinkFindings = Effect.fn("Quality.agentLinkFindings")(function
13
13
  ? []
14
14
  : [{ file, message: "Replace CLAUDE.md with a symlink to the AGENTS.md file beside it, and keep the instructions in AGENTS.md." }];
15
15
  }));
16
- return findings.flat();
16
+ const agentsFindings = yield* Effect.forEach(files.filter((file) => file === "AGENTS.md" || file.endsWith("/AGENTS.md")), (file) => Effect.gen(function* () {
17
+ const agents = join(root, file);
18
+ const claude = join(dirname(agents), "CLAUDE.md");
19
+ const sibling = yield* orWhenAbsent(claude, fs.lstat(claude), undefined);
20
+ return sibling === undefined ? [{ file, message: "Run `ln -s AGENTS.md CLAUDE.md` beside AGENTS.md." }] : [];
21
+ }));
22
+ return [...claudeFindings, ...agentsFindings].flat();
17
23
  });
18
24
  //# sourceMappingURL=agentLinkFindings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentLinkFindings.js","sourceRoot":"","sources":["../../src/adapters/agentLinkFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAc;IAC7G,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CACrC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAC3E,CAAC,IAAI,EAAE,EAAE,CACR,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACnB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9B,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACnF,MAAM,MAAM,GAAG,IA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;QAClD,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,YAAY,CAAmC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;QAC3G,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,mDAAmD,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9G,CAAC,CAAC,CACH,CAAC;IACF,OAAO,CAAC,GAAG,cAAc,EAAE,GAAG,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;AACtD,CAAC,CAAC,CAAC"}
@@ -2,7 +2,7 @@ import { agentLinkFindings } from "#adapters/agentLinkFindings.ts";
2
2
  import { defineRule } from "#rule.ts";
3
3
  export const agentLinks = defineRule({
4
4
  check: agentLinkFindings,
5
- description: "Every CLAUDE.md is a symlink to the AGENTS.md file beside it.",
5
+ description: "Every AGENTS.md has a CLAUDE.md symlink beside it, and every CLAUDE.md points to that AGENTS.md.",
6
6
  id: "docs/agent-links",
7
7
  });
8
8
  //# sourceMappingURL=agentLinks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentLinks.js","sourceRoot":"","sources":["../../../src/rules/docs/agentLinks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACpC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,+DAA+D;IAC5E,EAAE,EAAE,kBAAkB;CACtB,CAAC,CAAC"}
1
+ {"version":3,"file":"agentLinks.js","sourceRoot":"","sources":["../../../src/rules/docs/agentLinks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACpC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,kGAAkG;IAC/G,EAAE,EAAE,kBAAkB;CACtB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/quality",
3
- "version": "0.71.0",
3
+ "version": "0.72.0",
4
4
  "description": "Repository quality gate with typed rules, a baseline of existing debt and a registry of reasoned exceptions",
5
5
  "homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/quality#readme",
6
6
  "bugs": {
@@ -5,7 +5,7 @@ import type { RuleInputs } from "#rule.ts";
5
5
 
6
6
  export const agentLinkFindings = Effect.fn("Quality.agentLinkFindings")(function* ({ files, root }: RuleInputs) {
7
7
  const fs = yield* FileSystem.FileSystem;
8
- const findings = yield* Effect.forEach(
8
+ const claudeFindings = yield* Effect.forEach(
9
9
  files.filter((file) => file === "CLAUDE.md" || file.endsWith("/CLAUDE.md")),
10
10
  (file) =>
11
11
  Effect.gen(function* () {
@@ -19,5 +19,15 @@ export const agentLinkFindings = Effect.fn("Quality.agentLinkFindings")(function
19
19
  : [{ file, message: "Replace CLAUDE.md with a symlink to the AGENTS.md file beside it, and keep the instructions in AGENTS.md." }];
20
20
  }),
21
21
  );
22
- return findings.flat();
22
+ const agentsFindings = yield* Effect.forEach(
23
+ files.filter((file) => file === "AGENTS.md" || file.endsWith("/AGENTS.md")),
24
+ (file) =>
25
+ Effect.gen(function* () {
26
+ const agents = join(root, file);
27
+ const claude = join(dirname(agents), "CLAUDE.md");
28
+ const sibling = yield* orWhenAbsent<FileSystem.File.Info | undefined>(claude, fs.lstat(claude), undefined);
29
+ return sibling === undefined ? [{ file, message: "Run `ln -s AGENTS.md CLAUDE.md` beside AGENTS.md." }] : [];
30
+ }),
31
+ );
32
+ return [...claudeFindings, ...agentsFindings].flat();
23
33
  });
@@ -3,6 +3,6 @@ import { defineRule } from "#rule.ts";
3
3
 
4
4
  export const agentLinks = defineRule({
5
5
  check: agentLinkFindings,
6
- description: "Every CLAUDE.md is a symlink to the AGENTS.md file beside it.",
6
+ description: "Every AGENTS.md has a CLAUDE.md symlink beside it, and every CLAUDE.md points to that AGENTS.md.",
7
7
  id: "docs/agent-links",
8
8
  });