@esbenwiberg/corpus-default 1.1.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/LICENSE +21 -0
- package/README.md +10 -0
- package/dist/dimensions/consistency.d.ts +3 -0
- package/dist/dimensions/consistency.d.ts.map +1 -0
- package/dist/dimensions/consistency.js +8 -0
- package/dist/dimensions/consistency.js.map +1 -0
- package/dist/dimensions/context.d.ts +3 -0
- package/dist/dimensions/context.d.ts.map +1 -0
- package/dist/dimensions/context.js +8 -0
- package/dist/dimensions/context.js.map +1 -0
- package/dist/dimensions/cost.d.ts +3 -0
- package/dist/dimensions/cost.d.ts.map +1 -0
- package/dist/dimensions/cost.js +8 -0
- package/dist/dimensions/cost.js.map +1 -0
- package/dist/dimensions/feedback.d.ts +3 -0
- package/dist/dimensions/feedback.d.ts.map +1 -0
- package/dist/dimensions/feedback.js +8 -0
- package/dist/dimensions/feedback.js.map +1 -0
- package/dist/dimensions/latency.d.ts +3 -0
- package/dist/dimensions/latency.d.ts.map +1 -0
- package/dist/dimensions/latency.js +8 -0
- package/dist/dimensions/latency.js.map +1 -0
- package/dist/dimensions/safety.d.ts +3 -0
- package/dist/dimensions/safety.d.ts.map +1 -0
- package/dist/dimensions/safety.js +8 -0
- package/dist/dimensions/safety.js.map +1 -0
- package/dist/fixers/agent-guidance-present-llm.d.ts +3 -0
- package/dist/fixers/agent-guidance-present-llm.d.ts.map +1 -0
- package/dist/fixers/agent-guidance-present-llm.js +109 -0
- package/dist/fixers/agent-guidance-present-llm.js.map +1 -0
- package/dist/fixers/agent-guidance-present.d.ts +3 -0
- package/dist/fixers/agent-guidance-present.d.ts.map +1 -0
- package/dist/fixers/agent-guidance-present.js +46 -0
- package/dist/fixers/agent-guidance-present.js.map +1 -0
- package/dist/fixers/docs-readme-present-llm.d.ts +3 -0
- package/dist/fixers/docs-readme-present-llm.d.ts.map +1 -0
- package/dist/fixers/docs-readme-present-llm.js +109 -0
- package/dist/fixers/docs-readme-present-llm.js.map +1 -0
- package/dist/fixers/docs-readme-present.d.ts +3 -0
- package/dist/fixers/docs-readme-present.d.ts.map +1 -0
- package/dist/fixers/docs-readme-present.js +41 -0
- package/dist/fixers/docs-readme-present.js.map +1 -0
- package/dist/fixers/editorconfig-present.d.ts +3 -0
- package/dist/fixers/editorconfig-present.d.ts.map +1 -0
- package/dist/fixers/editorconfig-present.js +30 -0
- package/dist/fixers/editorconfig-present.js.map +1 -0
- package/dist/fixers/gitignore-comprehensive.d.ts +3 -0
- package/dist/fixers/gitignore-comprehensive.d.ts.map +1 -0
- package/dist/fixers/gitignore-comprehensive.js +61 -0
- package/dist/fixers/gitignore-comprehensive.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/probes/_shared/latency-bands.d.ts +3 -0
- package/dist/probes/_shared/latency-bands.d.ts.map +1 -0
- package/dist/probes/_shared/latency-bands.js +8 -0
- package/dist/probes/_shared/latency-bands.js.map +1 -0
- package/dist/probes/agent-guidance-fresh.d.ts +3 -0
- package/dist/probes/agent-guidance-fresh.d.ts.map +1 -0
- package/dist/probes/agent-guidance-fresh.js +198 -0
- package/dist/probes/agent-guidance-fresh.js.map +1 -0
- package/dist/probes/agent-guidance-nested.d.ts +3 -0
- package/dist/probes/agent-guidance-nested.d.ts.map +1 -0
- package/dist/probes/agent-guidance-nested.js +177 -0
- package/dist/probes/agent-guidance-nested.js.map +1 -0
- package/dist/probes/agent-guidance-present.d.ts +3 -0
- package/dist/probes/agent-guidance-present.d.ts.map +1 -0
- package/dist/probes/agent-guidance-present.js +32 -0
- package/dist/probes/agent-guidance-present.js.map +1 -0
- package/dist/probes/agent-guidance-quality.d.ts +3 -0
- package/dist/probes/agent-guidance-quality.d.ts.map +1 -0
- package/dist/probes/agent-guidance-quality.js +134 -0
- package/dist/probes/agent-guidance-quality.js.map +1 -0
- package/dist/probes/agent-guidance-substance.d.ts +3 -0
- package/dist/probes/agent-guidance-substance.d.ts.map +1 -0
- package/dist/probes/agent-guidance-substance.js +64 -0
- package/dist/probes/agent-guidance-substance.js.map +1 -0
- package/dist/probes/arch-boundaries-clear.d.ts +3 -0
- package/dist/probes/arch-boundaries-clear.d.ts.map +1 -0
- package/dist/probes/arch-boundaries-clear.js +202 -0
- package/dist/probes/arch-boundaries-clear.js.map +1 -0
- package/dist/probes/arch-doc-present.d.ts +3 -0
- package/dist/probes/arch-doc-present.d.ts.map +1 -0
- package/dist/probes/arch-doc-present.js +46 -0
- package/dist/probes/arch-doc-present.js.map +1 -0
- package/dist/probes/arch-doc-quality.d.ts +3 -0
- package/dist/probes/arch-doc-quality.d.ts.map +1 -0
- package/dist/probes/arch-doc-quality.js +138 -0
- package/dist/probes/arch-doc-quality.js.map +1 -0
- package/dist/probes/arch-fitness-tests-configured.d.ts +3 -0
- package/dist/probes/arch-fitness-tests-configured.d.ts.map +1 -0
- package/dist/probes/arch-fitness-tests-configured.js +180 -0
- package/dist/probes/arch-fitness-tests-configured.js.map +1 -0
- package/dist/probes/build-clean.d.ts +3 -0
- package/dist/probes/build-clean.d.ts.map +1 -0
- package/dist/probes/build-clean.js +72 -0
- package/dist/probes/build-clean.js.map +1 -0
- package/dist/probes/build-configured.d.ts +3 -0
- package/dist/probes/build-configured.d.ts.map +1 -0
- package/dist/probes/build-configured.js +158 -0
- package/dist/probes/build-configured.js.map +1 -0
- package/dist/probes/changelog-strategy-declared.d.ts +3 -0
- package/dist/probes/changelog-strategy-declared.d.ts.map +1 -0
- package/dist/probes/changelog-strategy-declared.js +81 -0
- package/dist/probes/changelog-strategy-declared.js.map +1 -0
- package/dist/probes/ci-configured.d.ts +3 -0
- package/dist/probes/ci-configured.d.ts.map +1 -0
- package/dist/probes/ci-configured.js +164 -0
- package/dist/probes/ci-configured.js.map +1 -0
- package/dist/probes/ci-runs-build.d.ts +3 -0
- package/dist/probes/ci-runs-build.d.ts.map +1 -0
- package/dist/probes/ci-runs-build.js +92 -0
- package/dist/probes/ci-runs-build.js.map +1 -0
- package/dist/probes/ci-runs-lint.d.ts +3 -0
- package/dist/probes/ci-runs-lint.d.ts.map +1 -0
- package/dist/probes/ci-runs-lint.js +84 -0
- package/dist/probes/ci-runs-lint.js.map +1 -0
- package/dist/probes/ci-runs-tests.d.ts +3 -0
- package/dist/probes/ci-runs-tests.d.ts.map +1 -0
- package/dist/probes/ci-runs-tests.js +68 -0
- package/dist/probes/ci-runs-tests.js.map +1 -0
- package/dist/probes/ci-runs-typecheck.d.ts +3 -0
- package/dist/probes/ci-runs-typecheck.d.ts.map +1 -0
- package/dist/probes/ci-runs-typecheck.js +89 -0
- package/dist/probes/ci-runs-typecheck.js.map +1 -0
- package/dist/probes/commits-conventional-followed.d.ts +3 -0
- package/dist/probes/commits-conventional-followed.d.ts.map +1 -0
- package/dist/probes/commits-conventional-followed.js +80 -0
- package/dist/probes/commits-conventional-followed.js.map +1 -0
- package/dist/probes/dead-code-configured.d.ts +3 -0
- package/dist/probes/dead-code-configured.d.ts.map +1 -0
- package/dist/probes/dead-code-configured.js +218 -0
- package/dist/probes/dead-code-configured.js.map +1 -0
- package/dist/probes/deps-audit-configured.d.ts +3 -0
- package/dist/probes/deps-audit-configured.d.ts.map +1 -0
- package/dist/probes/deps-audit-configured.js +172 -0
- package/dist/probes/deps-audit-configured.js.map +1 -0
- package/dist/probes/deps-lockfile-present.d.ts +3 -0
- package/dist/probes/deps-lockfile-present.d.ts.map +1 -0
- package/dist/probes/deps-lockfile-present.js +190 -0
- package/dist/probes/deps-lockfile-present.js.map +1 -0
- package/dist/probes/docs-adr-presence.d.ts +3 -0
- package/dist/probes/docs-adr-presence.d.ts.map +1 -0
- package/dist/probes/docs-adr-presence.js +76 -0
- package/dist/probes/docs-adr-presence.js.map +1 -0
- package/dist/probes/docs-adr-quality.d.ts +3 -0
- package/dist/probes/docs-adr-quality.d.ts.map +1 -0
- package/dist/probes/docs-adr-quality.js +128 -0
- package/dist/probes/docs-adr-quality.js.map +1 -0
- package/dist/probes/docs-contributing-present.d.ts +3 -0
- package/dist/probes/docs-contributing-present.d.ts.map +1 -0
- package/dist/probes/docs-contributing-present.js +15 -0
- package/dist/probes/docs-contributing-present.js.map +1 -0
- package/dist/probes/docs-links-resolved.d.ts +3 -0
- package/dist/probes/docs-links-resolved.d.ts.map +1 -0
- package/dist/probes/docs-links-resolved.js +252 -0
- package/dist/probes/docs-links-resolved.js.map +1 -0
- package/dist/probes/docs-readme-clarity.d.ts +3 -0
- package/dist/probes/docs-readme-clarity.d.ts.map +1 -0
- package/dist/probes/docs-readme-clarity.js +118 -0
- package/dist/probes/docs-readme-clarity.js.map +1 -0
- package/dist/probes/docs-readme-present.d.ts +3 -0
- package/dist/probes/docs-readme-present.d.ts.map +1 -0
- package/dist/probes/docs-readme-present.js +15 -0
- package/dist/probes/docs-readme-present.js.map +1 -0
- package/dist/probes/docs-readme-substance.d.ts +3 -0
- package/dist/probes/docs-readme-substance.d.ts.map +1 -0
- package/dist/probes/docs-readme-substance.js +62 -0
- package/dist/probes/docs-readme-substance.js.map +1 -0
- package/dist/probes/editorconfig-present.d.ts +3 -0
- package/dist/probes/editorconfig-present.d.ts.map +1 -0
- package/dist/probes/editorconfig-present.js +15 -0
- package/dist/probes/editorconfig-present.js.map +1 -0
- package/dist/probes/errors-actionability.d.ts +3 -0
- package/dist/probes/errors-actionability.d.ts.map +1 -0
- package/dist/probes/errors-actionability.js +180 -0
- package/dist/probes/errors-actionability.js.map +1 -0
- package/dist/probes/format-clean.d.ts +3 -0
- package/dist/probes/format-clean.d.ts.map +1 -0
- package/dist/probes/format-clean.js +114 -0
- package/dist/probes/format-clean.js.map +1 -0
- package/dist/probes/format-configured.d.ts +3 -0
- package/dist/probes/format-configured.d.ts.map +1 -0
- package/dist/probes/format-configured.js +243 -0
- package/dist/probes/format-configured.js.map +1 -0
- package/dist/probes/git-branch-protection.d.ts +3 -0
- package/dist/probes/git-branch-protection.d.ts.map +1 -0
- package/dist/probes/git-branch-protection.js +47 -0
- package/dist/probes/git-branch-protection.js.map +1 -0
- package/dist/probes/gitignore-comprehensive.d.ts +3 -0
- package/dist/probes/gitignore-comprehensive.d.ts.map +1 -0
- package/dist/probes/gitignore-comprehensive.js +59 -0
- package/dist/probes/gitignore-comprehensive.js.map +1 -0
- package/dist/probes/hooks-gates-lint-test-build.d.ts +3 -0
- package/dist/probes/hooks-gates-lint-test-build.d.ts.map +1 -0
- package/dist/probes/hooks-gates-lint-test-build.js +231 -0
- package/dist/probes/hooks-gates-lint-test-build.js.map +1 -0
- package/dist/probes/hooks-precommit-present.d.ts +3 -0
- package/dist/probes/hooks-precommit-present.d.ts.map +1 -0
- package/dist/probes/hooks-precommit-present.js +43 -0
- package/dist/probes/hooks-precommit-present.js.map +1 -0
- package/dist/probes/latency-build.d.ts +3 -0
- package/dist/probes/latency-build.d.ts.map +1 -0
- package/dist/probes/latency-build.js +53 -0
- package/dist/probes/latency-build.js.map +1 -0
- package/dist/probes/latency-lint.d.ts +3 -0
- package/dist/probes/latency-lint.d.ts.map +1 -0
- package/dist/probes/latency-lint.js +50 -0
- package/dist/probes/latency-lint.js.map +1 -0
- package/dist/probes/latency-test-suite.d.ts +3 -0
- package/dist/probes/latency-test-suite.d.ts.map +1 -0
- package/dist/probes/latency-test-suite.js +75 -0
- package/dist/probes/latency-test-suite.js.map +1 -0
- package/dist/probes/latency-typecheck.d.ts +3 -0
- package/dist/probes/latency-typecheck.d.ts.map +1 -0
- package/dist/probes/latency-typecheck.js +67 -0
- package/dist/probes/latency-typecheck.js.map +1 -0
- package/dist/probes/lint-clean.d.ts +3 -0
- package/dist/probes/lint-clean.d.ts.map +1 -0
- package/dist/probes/lint-clean.js +109 -0
- package/dist/probes/lint-clean.js.map +1 -0
- package/dist/probes/lint-configured.d.ts +3 -0
- package/dist/probes/lint-configured.d.ts.map +1 -0
- package/dist/probes/lint-configured.js +268 -0
- package/dist/probes/lint-configured.js.map +1 -0
- package/dist/probes/readme-commands-runnable.d.ts +3 -0
- package/dist/probes/readme-commands-runnable.d.ts.map +1 -0
- package/dist/probes/readme-commands-runnable.js +307 -0
- package/dist/probes/readme-commands-runnable.js.map +1 -0
- package/dist/probes/runtime-dev-loop-bootable.d.ts +3 -0
- package/dist/probes/runtime-dev-loop-bootable.d.ts.map +1 -0
- package/dist/probes/runtime-dev-loop-bootable.js +239 -0
- package/dist/probes/runtime-dev-loop-bootable.js.map +1 -0
- package/dist/probes/safety-dangerous-script-flags.d.ts +3 -0
- package/dist/probes/safety-dangerous-script-flags.d.ts.map +1 -0
- package/dist/probes/safety-dangerous-script-flags.js +126 -0
- package/dist/probes/safety-dangerous-script-flags.js.map +1 -0
- package/dist/probes/secrets-dotenv-gitignored.d.ts +3 -0
- package/dist/probes/secrets-dotenv-gitignored.d.ts.map +1 -0
- package/dist/probes/secrets-dotenv-gitignored.js +45 -0
- package/dist/probes/secrets-dotenv-gitignored.js.map +1 -0
- package/dist/probes/secrets-precommit-scan-configured.d.ts +3 -0
- package/dist/probes/secrets-precommit-scan-configured.d.ts.map +1 -0
- package/dist/probes/secrets-precommit-scan-configured.js +130 -0
- package/dist/probes/secrets-precommit-scan-configured.js.map +1 -0
- package/dist/probes/secrets-scan-clean.d.ts +3 -0
- package/dist/probes/secrets-scan-clean.d.ts.map +1 -0
- package/dist/probes/secrets-scan-clean.js +80 -0
- package/dist/probes/secrets-scan-clean.js.map +1 -0
- package/dist/probes/size-directory-depth.d.ts +3 -0
- package/dist/probes/size-directory-depth.d.ts.map +1 -0
- package/dist/probes/size-directory-depth.js +80 -0
- package/dist/probes/size-directory-depth.js.map +1 -0
- package/dist/probes/size-large-files.d.ts +3 -0
- package/dist/probes/size-large-files.d.ts.map +1 -0
- package/dist/probes/size-large-files.js +117 -0
- package/dist/probes/size-large-files.js.map +1 -0
- package/dist/probes/size-repo-token-estimate.d.ts +3 -0
- package/dist/probes/size-repo-token-estimate.d.ts.map +1 -0
- package/dist/probes/size-repo-token-estimate.js +83 -0
- package/dist/probes/size-repo-token-estimate.js.map +1 -0
- package/dist/probes/specs-present.d.ts +3 -0
- package/dist/probes/specs-present.d.ts.map +1 -0
- package/dist/probes/specs-present.js +77 -0
- package/dist/probes/specs-present.js.map +1 -0
- package/dist/probes/specs-quality.d.ts +3 -0
- package/dist/probes/specs-quality.d.ts.map +1 -0
- package/dist/probes/specs-quality.js +153 -0
- package/dist/probes/specs-quality.js.map +1 -0
- package/dist/probes/tests-clean.d.ts +3 -0
- package/dist/probes/tests-clean.d.ts.map +1 -0
- package/dist/probes/tests-clean.js +69 -0
- package/dist/probes/tests-clean.js.map +1 -0
- package/dist/probes/tests-cover-public-surface.d.ts +3 -0
- package/dist/probes/tests-cover-public-surface.d.ts.map +1 -0
- package/dist/probes/tests-cover-public-surface.js +172 -0
- package/dist/probes/tests-cover-public-surface.js.map +1 -0
- package/dist/probes/tests-runner-configured.d.ts +3 -0
- package/dist/probes/tests-runner-configured.d.ts.map +1 -0
- package/dist/probes/tests-runner-configured.js +261 -0
- package/dist/probes/tests-runner-configured.js.map +1 -0
- package/dist/probes/types-clean.d.ts +3 -0
- package/dist/probes/types-clean.d.ts.map +1 -0
- package/dist/probes/types-clean.js +72 -0
- package/dist/probes/types-clean.js.map +1 -0
- package/dist/probes/types-configured.d.ts +3 -0
- package/dist/probes/types-configured.d.ts.map +1 -0
- package/dist/probes/types-configured.js +77 -0
- package/dist/probes/types-configured.js.map +1 -0
- package/package.json +30 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { defineFixer } from "@esbenwiberg/repofit/sdk";
|
|
4
|
+
const STANDARD_ENTRIES = [
|
|
5
|
+
"# dependencies",
|
|
6
|
+
"node_modules/",
|
|
7
|
+
"",
|
|
8
|
+
"# build artifacts",
|
|
9
|
+
"dist/",
|
|
10
|
+
"build/",
|
|
11
|
+
"out/",
|
|
12
|
+
"",
|
|
13
|
+
"# env",
|
|
14
|
+
".env",
|
|
15
|
+
".env.local",
|
|
16
|
+
".env.*.local",
|
|
17
|
+
"",
|
|
18
|
+
"# OS junk",
|
|
19
|
+
".DS_Store",
|
|
20
|
+
"Thumbs.db",
|
|
21
|
+
"",
|
|
22
|
+
"# editor state",
|
|
23
|
+
".idea/",
|
|
24
|
+
".vscode/",
|
|
25
|
+
];
|
|
26
|
+
export default defineFixer({
|
|
27
|
+
probeId: "gitignore.comprehensive",
|
|
28
|
+
mode: "static",
|
|
29
|
+
describe: "add standard entries to .gitignore",
|
|
30
|
+
async plan({ cwd }) {
|
|
31
|
+
const filePath = path.join(cwd, ".gitignore");
|
|
32
|
+
let existing = "";
|
|
33
|
+
try {
|
|
34
|
+
existing = await readFile(filePath, "utf8");
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
existing = "";
|
|
38
|
+
}
|
|
39
|
+
const existingLines = new Set(existing.split("\n").map((l) => l.trim()));
|
|
40
|
+
const missing = STANDARD_ENTRIES.filter((line) => line === "" || line.startsWith("#") || !existingLines.has(line.trim()));
|
|
41
|
+
if (existing.length === 0) {
|
|
42
|
+
return {
|
|
43
|
+
actions: [
|
|
44
|
+
{
|
|
45
|
+
kind: "append-lines",
|
|
46
|
+
path: ".gitignore",
|
|
47
|
+
lines: STANDARD_ENTRIES,
|
|
48
|
+
createIfMissing: true,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const nonComment = missing.filter((l) => l !== "" && !l.startsWith("#"));
|
|
54
|
+
if (nonComment.length === 0)
|
|
55
|
+
return null;
|
|
56
|
+
return {
|
|
57
|
+
actions: [{ kind: "append-lines", path: ".gitignore", lines: nonComment }],
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=gitignore-comprehensive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitignore-comprehensive.js","sourceRoot":"","sources":["../../src/fixers/git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,EAAE,CAAC,CACjF,CAAC;QAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,cAAc;wBACpB,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,gBAAgB;wBACvB,eAAe,EAAE,IAAI;qBACtB;iBACF;aACF,CAAC;QACJ,CAAC;QACD,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;QACzE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;SAC3E,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const meta: {
|
|
2
|
+
name: string;
|
|
3
|
+
version: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const probes: import("@esbenwiberg/repofit/sdk").Probe[];
|
|
6
|
+
export declare const dimensions: import("@esbenwiberg/repofit/sdk").DimensionRecipe[];
|
|
7
|
+
export declare const fixers: import("@esbenwiberg/repofit/sdk").Fixer[];
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA0EA,eAAO,MAAM,IAAI;;;CAGhB,CAAC;AAEF,eAAO,MAAM,MAAM,4CA2DlB,CAAC;AAEF,eAAO,MAAM,UAAU,sDAOtB,CAAC;AAEF,eAAO,MAAM,MAAM,4CAOlB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import consistencyDimension from "./dimensions/consistency.js";
|
|
3
|
+
import contextDimension from "./dimensions/context.js";
|
|
4
|
+
import costDimension from "./dimensions/cost.js";
|
|
5
|
+
import feedbackDimension from "./dimensions/feedback.js";
|
|
6
|
+
import latencyDimension from "./dimensions/latency.js";
|
|
7
|
+
import safetyDimension from "./dimensions/safety.js";
|
|
8
|
+
import agentGuidancePresentFixer from "./fixers/agent-guidance-present.js";
|
|
9
|
+
import agentGuidancePresentLlmFixer from "./fixers/agent-guidance-present-llm.js";
|
|
10
|
+
import docsReadmePresentFixer from "./fixers/docs-readme-present.js";
|
|
11
|
+
import docsReadmePresentLlmFixer from "./fixers/docs-readme-present-llm.js";
|
|
12
|
+
import editorconfigPresentFixer from "./fixers/editorconfig-present.js";
|
|
13
|
+
import gitignoreComprehensiveFixer from "./fixers/gitignore-comprehensive.js";
|
|
14
|
+
import agentGuidanceFresh from "./probes/agent-guidance-fresh.js";
|
|
15
|
+
import agentGuidanceNested from "./probes/agent-guidance-nested.js";
|
|
16
|
+
import agentGuidancePresent from "./probes/agent-guidance-present.js";
|
|
17
|
+
import agentGuidanceQuality from "./probes/agent-guidance-quality.js";
|
|
18
|
+
import agentGuidanceSubstance from "./probes/agent-guidance-substance.js";
|
|
19
|
+
import archBoundariesClear from "./probes/arch-boundaries-clear.js";
|
|
20
|
+
import archDocPresent from "./probes/arch-doc-present.js";
|
|
21
|
+
import archDocQuality from "./probes/arch-doc-quality.js";
|
|
22
|
+
import archFitnessTestsConfigured from "./probes/arch-fitness-tests-configured.js";
|
|
23
|
+
import buildClean from "./probes/build-clean.js";
|
|
24
|
+
import buildConfigured from "./probes/build-configured.js";
|
|
25
|
+
import changelogStrategyDeclared from "./probes/changelog-strategy-declared.js";
|
|
26
|
+
import ciConfigured from "./probes/ci-configured.js";
|
|
27
|
+
import ciRunsBuild from "./probes/ci-runs-build.js";
|
|
28
|
+
import ciRunsLint from "./probes/ci-runs-lint.js";
|
|
29
|
+
import ciRunsTests from "./probes/ci-runs-tests.js";
|
|
30
|
+
import ciRunsTypecheck from "./probes/ci-runs-typecheck.js";
|
|
31
|
+
import commitsConventionalFollowed from "./probes/commits-conventional-followed.js";
|
|
32
|
+
import deadCodeConfigured from "./probes/dead-code-configured.js";
|
|
33
|
+
import depsAuditConfigured from "./probes/deps-audit-configured.js";
|
|
34
|
+
import depsLockfilePresent from "./probes/deps-lockfile-present.js";
|
|
35
|
+
import docsAdrPresence from "./probes/docs-adr-presence.js";
|
|
36
|
+
import docsAdrQuality from "./probes/docs-adr-quality.js";
|
|
37
|
+
import docsContributingPresent from "./probes/docs-contributing-present.js";
|
|
38
|
+
import docsLinksResolved from "./probes/docs-links-resolved.js";
|
|
39
|
+
import docsReadmeClarity from "./probes/docs-readme-clarity.js";
|
|
40
|
+
import docsReadmePresent from "./probes/docs-readme-present.js";
|
|
41
|
+
import docsReadmeSubstance from "./probes/docs-readme-substance.js";
|
|
42
|
+
import editorconfigPresent from "./probes/editorconfig-present.js";
|
|
43
|
+
import errorsActionability from "./probes/errors-actionability.js";
|
|
44
|
+
import formatClean from "./probes/format-clean.js";
|
|
45
|
+
import formatConfigured from "./probes/format-configured.js";
|
|
46
|
+
import gitBranchProtection from "./probes/git-branch-protection.js";
|
|
47
|
+
import gitignoreComprehensive from "./probes/gitignore-comprehensive.js";
|
|
48
|
+
import hooksGatesLintTestBuild from "./probes/hooks-gates-lint-test-build.js";
|
|
49
|
+
import hooksPrecommitPresent from "./probes/hooks-precommit-present.js";
|
|
50
|
+
import latencyBuild from "./probes/latency-build.js";
|
|
51
|
+
import latencyLint from "./probes/latency-lint.js";
|
|
52
|
+
import latencyTestSuite from "./probes/latency-test-suite.js";
|
|
53
|
+
import latencyTypecheck from "./probes/latency-typecheck.js";
|
|
54
|
+
import lintClean from "./probes/lint-clean.js";
|
|
55
|
+
import lintConfigured from "./probes/lint-configured.js";
|
|
56
|
+
import readmeCommandsRunnable from "./probes/readme-commands-runnable.js";
|
|
57
|
+
import runtimeDevLoopBootable from "./probes/runtime-dev-loop-bootable.js";
|
|
58
|
+
import safetyDangerousScriptFlags from "./probes/safety-dangerous-script-flags.js";
|
|
59
|
+
import secretsDotenvGitignored from "./probes/secrets-dotenv-gitignored.js";
|
|
60
|
+
import secretsPrecommitScanConfigured from "./probes/secrets-precommit-scan-configured.js";
|
|
61
|
+
import secretsScanClean from "./probes/secrets-scan-clean.js";
|
|
62
|
+
import sizeDirectoryDepth from "./probes/size-directory-depth.js";
|
|
63
|
+
import sizeLargeFiles from "./probes/size-large-files.js";
|
|
64
|
+
import sizeRepoTokenEstimate from "./probes/size-repo-token-estimate.js";
|
|
65
|
+
import specsPresent from "./probes/specs-present.js";
|
|
66
|
+
import specsQuality from "./probes/specs-quality.js";
|
|
67
|
+
import testsClean from "./probes/tests-clean.js";
|
|
68
|
+
import testsCoverPublicSurface from "./probes/tests-cover-public-surface.js";
|
|
69
|
+
import testsRunnerConfigured from "./probes/tests-runner-configured.js";
|
|
70
|
+
import typesClean from "./probes/types-clean.js";
|
|
71
|
+
import typesConfigured from "./probes/types-configured.js";
|
|
72
|
+
const pkg = createRequire(import.meta.url)("../package.json");
|
|
73
|
+
export const meta = {
|
|
74
|
+
name: pkg.name,
|
|
75
|
+
version: pkg.version,
|
|
76
|
+
};
|
|
77
|
+
export const probes = [
|
|
78
|
+
agentGuidanceFresh,
|
|
79
|
+
agentGuidanceNested,
|
|
80
|
+
agentGuidancePresent,
|
|
81
|
+
agentGuidanceQuality,
|
|
82
|
+
agentGuidanceSubstance,
|
|
83
|
+
archBoundariesClear,
|
|
84
|
+
archDocPresent,
|
|
85
|
+
archDocQuality,
|
|
86
|
+
archFitnessTestsConfigured,
|
|
87
|
+
buildClean,
|
|
88
|
+
buildConfigured,
|
|
89
|
+
changelogStrategyDeclared,
|
|
90
|
+
ciConfigured,
|
|
91
|
+
ciRunsBuild,
|
|
92
|
+
ciRunsLint,
|
|
93
|
+
ciRunsTests,
|
|
94
|
+
ciRunsTypecheck,
|
|
95
|
+
commitsConventionalFollowed,
|
|
96
|
+
deadCodeConfigured,
|
|
97
|
+
depsAuditConfigured,
|
|
98
|
+
depsLockfilePresent,
|
|
99
|
+
docsAdrPresence,
|
|
100
|
+
docsAdrQuality,
|
|
101
|
+
docsContributingPresent,
|
|
102
|
+
docsLinksResolved,
|
|
103
|
+
docsReadmeClarity,
|
|
104
|
+
docsReadmePresent,
|
|
105
|
+
docsReadmeSubstance,
|
|
106
|
+
editorconfigPresent,
|
|
107
|
+
errorsActionability,
|
|
108
|
+
formatClean,
|
|
109
|
+
formatConfigured,
|
|
110
|
+
gitBranchProtection,
|
|
111
|
+
gitignoreComprehensive,
|
|
112
|
+
hooksGatesLintTestBuild,
|
|
113
|
+
hooksPrecommitPresent,
|
|
114
|
+
latencyBuild,
|
|
115
|
+
latencyLint,
|
|
116
|
+
latencyTestSuite,
|
|
117
|
+
latencyTypecheck,
|
|
118
|
+
lintClean,
|
|
119
|
+
lintConfigured,
|
|
120
|
+
readmeCommandsRunnable,
|
|
121
|
+
runtimeDevLoopBootable,
|
|
122
|
+
safetyDangerousScriptFlags,
|
|
123
|
+
secretsDotenvGitignored,
|
|
124
|
+
secretsPrecommitScanConfigured,
|
|
125
|
+
secretsScanClean,
|
|
126
|
+
sizeDirectoryDepth,
|
|
127
|
+
sizeLargeFiles,
|
|
128
|
+
sizeRepoTokenEstimate,
|
|
129
|
+
specsPresent,
|
|
130
|
+
specsQuality,
|
|
131
|
+
testsClean,
|
|
132
|
+
testsCoverPublicSurface,
|
|
133
|
+
testsRunnerConfigured,
|
|
134
|
+
typesClean,
|
|
135
|
+
typesConfigured,
|
|
136
|
+
];
|
|
137
|
+
export const dimensions = [
|
|
138
|
+
contextDimension,
|
|
139
|
+
consistencyDimension,
|
|
140
|
+
costDimension,
|
|
141
|
+
feedbackDimension,
|
|
142
|
+
latencyDimension,
|
|
143
|
+
safetyDimension,
|
|
144
|
+
];
|
|
145
|
+
export const fixers = [
|
|
146
|
+
agentGuidancePresentFixer,
|
|
147
|
+
agentGuidancePresentLlmFixer,
|
|
148
|
+
docsReadmePresentFixer,
|
|
149
|
+
docsReadmePresentLlmFixer,
|
|
150
|
+
editorconfigPresentFixer,
|
|
151
|
+
gitignoreComprehensiveFixer,
|
|
152
|
+
];
|
|
153
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,oBAAoB,MAAM,6BAA6B,CAAC;AAC/D,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,yBAAyB,MAAM,oCAAoC,CAAC;AAC3E,OAAO,4BAA4B,MAAM,wCAAwC,CAAC;AAClF,OAAO,sBAAsB,MAAM,iCAAiC,CAAC;AACrE,OAAO,yBAAyB,MAAM,qCAAqC,CAAC;AAC5E,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,2BAA2B,MAAM,qCAAqC,CAAC;AAC9E,OAAO,kBAAkB,MAAM,kCAAkC,CAAC;AAClE,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AACpE,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;AACtE,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;AACtE,OAAO,sBAAsB,MAAM,sCAAsC,CAAC;AAC1E,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AACpE,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,0BAA0B,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,eAAe;IACf,2BAA2B;IAC3B,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;IACf,cAAc;IACd,uBAAuB;IACvB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,WAAW;IACX,gBAAgB;IAChB,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,qBAAqB;IACrB,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,gBAAgB;IAChB,SAAS;IACT,cAAc;IACd,sBAAsB;IACtB,sBAAsB;IACtB,0BAA0B;IAC1B,uBAAuB;IACvB,8BAA8B;IAC9B,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,qBAAqB;IACrB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,uBAAuB;IACvB,qBAAqB;IACrB,UAAU;IACV,eAAe;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,gBAAgB;IAChB,oBAAoB;IACpB,aAAa;IACb,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,yBAAyB;IACzB,4BAA4B;IAC5B,sBAAsB;IACtB,yBAAyB;IACzB,wBAAwB;IACxB,2BAA2B;CAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latency-bands.d.ts","sourceRoot":"","sources":["../../../src/probes/_shared/latency-bands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,IAAI,EAM/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latency-bands.js","sourceRoot":"","sources":["../../../src/probes/_shared/latency-bands.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAW;IACnC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE;IAC5B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3B,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5B,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5B,EAAE,KAAK,EAAE,CAAC,EAAE;CACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guidance-fresh.d.ts","sourceRoot":"","sources":["../../src/probes/agent-guidance-fresh.ts"],"names":[],"mappings":";AAgCA,wBAwLG"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { defineProbe } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
const PROBE_VERSION = "1.0.0";
|
|
3
|
+
const MAX_GUIDANCE_CHARS = 12_000;
|
|
4
|
+
const MAX_TREE_ENTRIES = 200;
|
|
5
|
+
const RUBRIC = {
|
|
6
|
+
task: "Score how FRESH the agent-guidance file is — does it still match the current state of the repo? You will see the guidance content alongside a snapshot of the repo (top-level tree, package.json scripts). Penalise stale claims; reward content that aligns with what's actually there.",
|
|
7
|
+
criteria: [
|
|
8
|
+
{
|
|
9
|
+
id: "paths-exist",
|
|
10
|
+
description: "Do the file paths and directory names mentioned in the guidance still exist in the tree snapshot? Penalise references to paths that have been removed or renamed.",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "commands-valid",
|
|
14
|
+
description: "Do the build/test/run commands referenced in the guidance match the actual scripts in package.json (or the actual tooling visible in the tree)? Penalise commands that no longer resolve.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "architecture-matches",
|
|
18
|
+
description: "Does the architectural description (modules, packages, layering) match the current directory layout? Penalise stale claims about packages or modules that no longer exist, or omissions of major new ones.",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "no-stale-claims",
|
|
22
|
+
description: "Are there claims about features, status, deadlines, or in-progress work that look outdated relative to the current state? A '🚧 in progress' note for something that's clearly shipped, or a 'coming soon' for something that's been there for a year, costs points.",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
export default defineProbe({
|
|
27
|
+
id: "agent.guidance-fresh",
|
|
28
|
+
version: PROBE_VERSION,
|
|
29
|
+
dimensions: [
|
|
30
|
+
{ id: "context", weight: 1 },
|
|
31
|
+
{ id: "consistency", weight: 0.5 },
|
|
32
|
+
],
|
|
33
|
+
tier: "reasoned",
|
|
34
|
+
evidence: ["agent_config", "files", "node_package", "size_stats", "judge"],
|
|
35
|
+
rationale: `
|
|
36
|
+
A CLAUDE.md or AGENTS.md that's well-written but out-of-date is worse than
|
|
37
|
+
no guidance at all — the agent will confidently follow stale directions
|
|
38
|
+
into dead ends. This probe asks an LLM to compare guidance content
|
|
39
|
+
against a snapshot of the actual repo (top-level tree, package.json
|
|
40
|
+
scripts) and flag references that no longer resolve: paths that have
|
|
41
|
+
moved, commands that don't exist, architecture descriptions that don't
|
|
42
|
+
match the current layout, in-progress markers for shipped features.
|
|
43
|
+
`,
|
|
44
|
+
remediation: "Sweep your CLAUDE.md / AGENTS.md against the current repo: every path mentioned should exist, every command should resolve to a real script, every architecture claim should match the layout, every status note ('in progress', 'coming soon') should still be true. Re-run this probe after the sweep — a stale guidance file silently misdirects every agent that lands.",
|
|
45
|
+
async detect(ev) {
|
|
46
|
+
const guidance = ev.agent_config.guidance;
|
|
47
|
+
if (guidance.length === 0) {
|
|
48
|
+
return { kind: "na", reason: "no agent-guidance file present" };
|
|
49
|
+
}
|
|
50
|
+
const parts = [];
|
|
51
|
+
let remaining = MAX_GUIDANCE_CHARS;
|
|
52
|
+
for (const g of guidance) {
|
|
53
|
+
if (remaining <= 0)
|
|
54
|
+
break;
|
|
55
|
+
const text = await ev.files.readText(g.path);
|
|
56
|
+
if (!text)
|
|
57
|
+
continue;
|
|
58
|
+
const slice = text.slice(0, remaining);
|
|
59
|
+
parts.push(`# ${g.path}\n\n${slice}`);
|
|
60
|
+
remaining -= slice.length;
|
|
61
|
+
}
|
|
62
|
+
if (parts.length === 0) {
|
|
63
|
+
return { kind: "na", reason: "agent-guidance files declared but unreadable" };
|
|
64
|
+
}
|
|
65
|
+
const topLevel = new Set();
|
|
66
|
+
for (const f of ev.size_stats.files) {
|
|
67
|
+
const top = f.path.split("/")[0];
|
|
68
|
+
if (top)
|
|
69
|
+
topLevel.add(top);
|
|
70
|
+
}
|
|
71
|
+
const treeEntries = Array.from(topLevel).sort().slice(0, MAX_TREE_ENTRIES);
|
|
72
|
+
const treeSection = `## Top-level entries\n${treeEntries.join("\n")}`;
|
|
73
|
+
let scriptsSection = "";
|
|
74
|
+
if (ev.node_package.present) {
|
|
75
|
+
const names = Object.keys(ev.node_package.scripts).sort();
|
|
76
|
+
scriptsSection = `\n\n## package.json scripts\n${names.join("\n")}`;
|
|
77
|
+
}
|
|
78
|
+
const repoSnapshot = `${treeSection}${scriptsSection}`;
|
|
79
|
+
const guidanceCombined = parts.join("\n\n---\n\n");
|
|
80
|
+
const input = `# REPO SNAPSHOT\n\n${repoSnapshot}\n\n---\n\n# AGENT GUIDANCE\n\n${guidanceCombined}`;
|
|
81
|
+
const result = await ev.judge.score({
|
|
82
|
+
probeId: "agent.guidance-fresh",
|
|
83
|
+
probeVersion: PROBE_VERSION,
|
|
84
|
+
input,
|
|
85
|
+
rubric: RUBRIC,
|
|
86
|
+
});
|
|
87
|
+
return {
|
|
88
|
+
kind: "judge",
|
|
89
|
+
score: result.score,
|
|
90
|
+
perCriterion: result.perCriterion,
|
|
91
|
+
rationale: result.rationale,
|
|
92
|
+
model: result.model,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
score: { kind: "judge" },
|
|
96
|
+
fixtures: [
|
|
97
|
+
{
|
|
98
|
+
name: "no-guidance",
|
|
99
|
+
evidence: {
|
|
100
|
+
agent_config: { guidance: [] },
|
|
101
|
+
node_package: { present: false },
|
|
102
|
+
size_stats: { files: [], totalBytes: 0, totalFiles: 0, source: "git-ls-files" },
|
|
103
|
+
},
|
|
104
|
+
expect: { reading: { kind: "na", reason: "no agent-guidance file present" }, score: null },
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "fresh-guidance",
|
|
108
|
+
evidence: {
|
|
109
|
+
agent_config: { guidance: [{ path: "CLAUDE.md", bytes: 500, lines: 20 }] },
|
|
110
|
+
files: {
|
|
111
|
+
"CLAUDE.md": "# Project\n\nMain code lives in `src/`. Run `npm test` and `npm run build`.",
|
|
112
|
+
},
|
|
113
|
+
node_package: { present: true, scripts: { test: "vitest", build: "tsc" } },
|
|
114
|
+
size_stats: {
|
|
115
|
+
source: "git-ls-files",
|
|
116
|
+
totalBytes: 500,
|
|
117
|
+
totalFiles: 2,
|
|
118
|
+
files: [
|
|
119
|
+
{ path: "src/index.ts", bytes: 300, lines: 10, depth: 1 },
|
|
120
|
+
{ path: "CLAUDE.md", bytes: 200, lines: 10, depth: 0 },
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
judge: {
|
|
124
|
+
score: 90,
|
|
125
|
+
perCriterion: {
|
|
126
|
+
"paths-exist": 100,
|
|
127
|
+
"commands-valid": 100,
|
|
128
|
+
"architecture-matches": 80,
|
|
129
|
+
"no-stale-claims": 80,
|
|
130
|
+
},
|
|
131
|
+
rationale: "All references match repo state.",
|
|
132
|
+
model: "fixture",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
expect: {
|
|
136
|
+
reading: {
|
|
137
|
+
kind: "judge",
|
|
138
|
+
score: 90,
|
|
139
|
+
perCriterion: {
|
|
140
|
+
"paths-exist": 100,
|
|
141
|
+
"commands-valid": 100,
|
|
142
|
+
"architecture-matches": 80,
|
|
143
|
+
"no-stale-claims": 80,
|
|
144
|
+
},
|
|
145
|
+
rationale: "All references match repo state.",
|
|
146
|
+
model: "fixture",
|
|
147
|
+
},
|
|
148
|
+
score: 90,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "stale-guidance",
|
|
153
|
+
evidence: {
|
|
154
|
+
agent_config: { guidance: [{ path: "CLAUDE.md", bytes: 500, lines: 20 }] },
|
|
155
|
+
files: {
|
|
156
|
+
"CLAUDE.md": "# Project\n\nCode lives in `lib/`. Run `npm run dev` for the dev server. The `experimental/` folder is 🚧 in progress.",
|
|
157
|
+
},
|
|
158
|
+
node_package: { present: true, scripts: { test: "vitest" } },
|
|
159
|
+
size_stats: {
|
|
160
|
+
source: "git-ls-files",
|
|
161
|
+
totalBytes: 500,
|
|
162
|
+
totalFiles: 2,
|
|
163
|
+
files: [
|
|
164
|
+
{ path: "src/index.ts", bytes: 300, lines: 10, depth: 1 },
|
|
165
|
+
{ path: "CLAUDE.md", bytes: 200, lines: 10, depth: 0 },
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
judge: {
|
|
169
|
+
score: 25,
|
|
170
|
+
perCriterion: {
|
|
171
|
+
"paths-exist": 20,
|
|
172
|
+
"commands-valid": 20,
|
|
173
|
+
"architecture-matches": 30,
|
|
174
|
+
"no-stale-claims": 30,
|
|
175
|
+
},
|
|
176
|
+
rationale: "References lib/ and experimental/ which don't exist; npm run dev not a script.",
|
|
177
|
+
model: "fixture",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
expect: {
|
|
181
|
+
reading: {
|
|
182
|
+
kind: "judge",
|
|
183
|
+
score: 25,
|
|
184
|
+
perCriterion: {
|
|
185
|
+
"paths-exist": 20,
|
|
186
|
+
"commands-valid": 20,
|
|
187
|
+
"architecture-matches": 30,
|
|
188
|
+
"no-stale-claims": 30,
|
|
189
|
+
},
|
|
190
|
+
rationale: "References lib/ and experimental/ which don't exist; npm run dev not a script.",
|
|
191
|
+
model: "fixture",
|
|
192
|
+
},
|
|
193
|
+
score: 25,
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
});
|
|
198
|
+
//# sourceMappingURL=agent-guidance-fresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guidance-fresh.js","sourceRoot":"","sources":["../../src/probes/agent-guidance-fresh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,aAAa,GAAG,OAAO,CAAC;AAC9B,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,0RAA0R;IAChS,QAAQ,EAAE;QACR;YACE,EAAE,EAAE,aAAa;YACjB,WAAW,EACT,mKAAmK;SACtK;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,WAAW,EACT,2LAA2L;SAC9L;QACD;YACE,EAAE,EAAE,sBAAsB;YAC1B,WAAW,EACT,4MAA4M;SAC/M;QACD;YACE,EAAE,EAAE,iBAAiB;YACrB,WAAW,EACT,sQAAsQ;SACzQ;KACF;CACO,CAAC;AAEX,eAAe,WAAW,CAAC;IACzB,EAAE,EAAE,sBAAsB;IAC1B,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE;QACV,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE;QAC5B,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE;KACnC;IACD,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,OAAO,CAAC;IAE1E,SAAS,EAAE;;;;;;;;GAQV;IAED,WAAW,EACT,6WAA6W;IAE/W,KAAK,CAAC,MAAM,CAAC,EAAE;QACb,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;QAC1C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,E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,SAAS,EACP,gFAAgF;oBAClF,KAAK,EAAE,SAAS;iBACjB;gBACD,KAAK,EAAE,EAAE;aACV;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guidance-nested.d.ts","sourceRoot":"","sources":["../../src/probes/agent-guidance-nested.ts"],"names":[],"mappings":";AA8BA,wBAgKG"}
|