@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Esben Wiberg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# @esbenwiberg/corpus-default
|
|
2
|
+
|
|
3
|
+
Default probe corpus for [repofit](https://github.com/esbenwiberg/repofit) —
|
|
4
|
+
the bundled set of probes and dimensions that ships with the CLI.
|
|
5
|
+
|
|
6
|
+
This package is not consumed directly; install `@esbenwiberg/repofit`
|
|
7
|
+
or use `npx @esbenwiberg/repofit`. The corpus is loaded automatically.
|
|
8
|
+
|
|
9
|
+
Run `repofit explain <probe-id>` to see what any probe in this corpus
|
|
10
|
+
measures and how it scores.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consistency.d.ts","sourceRoot":"","sources":["../../src/dimensions/consistency.ts"],"names":[],"mappings":";AAEA,wBAKG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineDimension } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
export default defineDimension({
|
|
3
|
+
id: "consistency",
|
|
4
|
+
name: "Consistency",
|
|
5
|
+
description: "Will the agent's output blend in with what's already here?",
|
|
6
|
+
gating: false,
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=consistency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consistency.js","sourceRoot":"","sources":["../../src/dimensions/consistency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,eAAe,eAAe,CAAC;IAC7B,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,4DAA4D;IACzE,MAAM,EAAE,KAAK;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/dimensions/context.ts"],"names":[],"mappings":";AAEA,wBAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/dimensions/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,eAAe,eAAe,CAAC;IAC7B,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,mDAAmD;IAChE,MAAM,EAAE,KAAK;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/dimensions/cost.ts"],"names":[],"mappings":";AAEA,wBAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cost.js","sourceRoot":"","sources":["../../src/dimensions/cost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,eAAe,eAAe,CAAC;IAC7B,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,+CAA+C;IAC5D,MAAM,EAAE,KAAK;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/dimensions/feedback.ts"],"names":[],"mappings":";AAEA,wBAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../src/dimensions/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,eAAe,eAAe,CAAC;IAC7B,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,uCAAuC;IACpD,MAAM,EAAE,KAAK;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latency.d.ts","sourceRoot":"","sources":["../../src/dimensions/latency.ts"],"names":[],"mappings":";AAEA,wBAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latency.js","sourceRoot":"","sources":["../../src/dimensions/latency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,eAAe,eAAe,CAAC;IAC7B,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,0CAA0C;IACvD,MAAM,EAAE,KAAK;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety.d.ts","sourceRoot":"","sources":["../../src/dimensions/safety.ts"],"names":[],"mappings":";AAEA,wBAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety.js","sourceRoot":"","sources":["../../src/dimensions/safety.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,eAAe,eAAe,CAAC;IAC7B,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,uCAAuC;IACpD,MAAM,EAAE,IAAI;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guidance-present-llm.d.ts","sourceRoot":"","sources":["../../src/fixers/agent-guidance-present-llm.ts"],"names":[],"mappings":";AAiBA,wBAsBG"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { defineFixer } from "@esbenwiberg/repofit/sdk";
|
|
4
|
+
const SYSTEM = `You are writing a CLAUDE.md (or AGENTS.md) for a software project. This file helps AI coding agents get oriented quickly.
|
|
5
|
+
|
|
6
|
+
Write concise markdown. No fluff, no marketing language. If you don't know something, write a TODO marker like '<!-- TODO: describe X -->' instead of inventing details. Do not wrap the output in code fences — the output IS the file content.
|
|
7
|
+
|
|
8
|
+
Required sections (in order):
|
|
9
|
+
1. A level-1 heading with the project name and a one-sentence description.
|
|
10
|
+
2. ## Build & Test — concrete commands derived from package.json scripts (or pyproject/Makefile/etc).
|
|
11
|
+
3. ## Architecture — one or two paragraphs describing the layout, based on the directory structure.
|
|
12
|
+
4. ## Conventions — only include this section if you can identify real conventions from the codebase (commit style, branching, lint config). If you can't, omit the section entirely.
|
|
13
|
+
5. ## Where to find things — a small markdown table mapping topics to paths.
|
|
14
|
+
|
|
15
|
+
Target 40–80 lines total.`;
|
|
16
|
+
export default defineFixer({
|
|
17
|
+
probeId: "agent.guidance-present",
|
|
18
|
+
mode: "llm",
|
|
19
|
+
describe: "generate CLAUDE.md with Claude",
|
|
20
|
+
async plan({ cwd, generate }) {
|
|
21
|
+
const context = await collectContext(cwd);
|
|
22
|
+
const prompt = buildPrompt(context);
|
|
23
|
+
const content = await generate(prompt, { system: SYSTEM, maxTokens: 4096 });
|
|
24
|
+
return {
|
|
25
|
+
actions: [
|
|
26
|
+
{
|
|
27
|
+
kind: "write-file",
|
|
28
|
+
path: "CLAUDE.md",
|
|
29
|
+
content: ensureTrailingNewline(content),
|
|
30
|
+
ifMissing: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
notes: [
|
|
34
|
+
"review the generated content before committing — it may include TODO markers or guesses",
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
async function collectContext(cwd) {
|
|
40
|
+
const projectName = path.basename(cwd) || "project";
|
|
41
|
+
const packageJson = await readFileSafe(path.join(cwd, "package.json"));
|
|
42
|
+
const readme = (await readFileSafe(path.join(cwd, "README.md"))) ?? undefined;
|
|
43
|
+
const { dirs, files } = await listTopLevel(cwd);
|
|
44
|
+
return {
|
|
45
|
+
cwd,
|
|
46
|
+
projectName,
|
|
47
|
+
...(packageJson ? { packageJson } : {}),
|
|
48
|
+
...(readme ? { readme: readme.slice(0, 2000) } : {}),
|
|
49
|
+
topLevelDirs: dirs,
|
|
50
|
+
topLevelFiles: files,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async function readFileSafe(p) {
|
|
54
|
+
try {
|
|
55
|
+
return await readFile(p, "utf8");
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async function listTopLevel(cwd) {
|
|
62
|
+
try {
|
|
63
|
+
const entries = await readdir(cwd, { withFileTypes: true });
|
|
64
|
+
const dirs = [];
|
|
65
|
+
const files = [];
|
|
66
|
+
for (const e of entries) {
|
|
67
|
+
if (e.name.startsWith(".") || e.name === "node_modules" || e.name === "dist")
|
|
68
|
+
continue;
|
|
69
|
+
if (e.isDirectory())
|
|
70
|
+
dirs.push(e.name);
|
|
71
|
+
else
|
|
72
|
+
files.push(e.name);
|
|
73
|
+
}
|
|
74
|
+
dirs.sort();
|
|
75
|
+
files.sort();
|
|
76
|
+
return { dirs, files };
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return { dirs: [], files: [] };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function buildPrompt(ctx) {
|
|
83
|
+
const parts = [];
|
|
84
|
+
parts.push(`Project name (inferred from directory): ${ctx.projectName}`);
|
|
85
|
+
parts.push("");
|
|
86
|
+
parts.push(`Top-level directories: ${ctx.topLevelDirs.join(", ") || "(none)"}`);
|
|
87
|
+
parts.push(`Top-level files: ${ctx.topLevelFiles.join(", ") || "(none)"}`);
|
|
88
|
+
if (ctx.packageJson) {
|
|
89
|
+
parts.push("");
|
|
90
|
+
parts.push("package.json:");
|
|
91
|
+
parts.push("```json");
|
|
92
|
+
parts.push(ctx.packageJson.slice(0, 3000));
|
|
93
|
+
parts.push("```");
|
|
94
|
+
}
|
|
95
|
+
if (ctx.readme) {
|
|
96
|
+
parts.push("");
|
|
97
|
+
parts.push("Existing README excerpt (use as background only — your output is a NEW CLAUDE.md):");
|
|
98
|
+
parts.push("```markdown");
|
|
99
|
+
parts.push(ctx.readme);
|
|
100
|
+
parts.push("```");
|
|
101
|
+
}
|
|
102
|
+
parts.push("");
|
|
103
|
+
parts.push("Write the CLAUDE.md now.");
|
|
104
|
+
return parts.join("\n");
|
|
105
|
+
}
|
|
106
|
+
function ensureTrailingNewline(s) {
|
|
107
|
+
return s.endsWith("\n") ? s : `${s}\n`;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=agent-guidance-present-llm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guidance-present-llm.js","sourceRoot":"","sources":["../../src/fixers/agent-guidance-present-llm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,GAAG;;;;;;;;;;;0BAWW,CAAC;AAE3B,eAAe,WAAW,CAAC;IACzB,OAAO,EAAE,wBAAwB;IACjC,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,gCAAgC;IAC1C,KAAK,CAAC,IAAI,CAAC,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;AACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guidance-present.d.ts","sourceRoot":"","sources":["../../src/fixers/agent-guidance-present.ts"],"names":[],"mappings":";AAkCA,wBAYG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineFixer } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
const CLAUDE_MD_SCAFFOLD = `# {{name}}
|
|
3
|
+
|
|
4
|
+
> One-sentence description of what this project is and who it's for.
|
|
5
|
+
|
|
6
|
+
## Build & Test
|
|
7
|
+
|
|
8
|
+
\`\`\`bash
|
|
9
|
+
# install deps
|
|
10
|
+
# build
|
|
11
|
+
# test
|
|
12
|
+
\`\`\`
|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+
|
|
16
|
+
A paragraph (or a small diagram) describing the top-level shape: packages,
|
|
17
|
+
entrypoints, key modules, and how they relate.
|
|
18
|
+
|
|
19
|
+
## Conventions
|
|
20
|
+
|
|
21
|
+
- Commit style: …
|
|
22
|
+
- Branching: …
|
|
23
|
+
- Code style: see \`.editorconfig\` and lint config.
|
|
24
|
+
|
|
25
|
+
## Where to find things
|
|
26
|
+
|
|
27
|
+
| What | Where |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Tests | … |
|
|
30
|
+
| Docs | … |
|
|
31
|
+
| Examples | … |
|
|
32
|
+
`;
|
|
33
|
+
export default defineFixer({
|
|
34
|
+
probeId: "agent.guidance-present",
|
|
35
|
+
mode: "static",
|
|
36
|
+
describe: "scaffold CLAUDE.md",
|
|
37
|
+
async plan({ cwd }) {
|
|
38
|
+
const name = cwd.split("/").filter(Boolean).pop() ?? "project";
|
|
39
|
+
const content = CLAUDE_MD_SCAFFOLD.replace("{{name}}", name);
|
|
40
|
+
return {
|
|
41
|
+
actions: [{ kind: "write-file", path: "CLAUDE.md", content, ifMissing: true }],
|
|
42
|
+
notes: ["edit the scaffold to reflect the actual project before committing"],
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=agent-guidance-present.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guidance-present.js","sourceRoot":"","sources":["../../src/fixers/agent-guidance-present.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B1B,CAAC;AAEF,eAAe,WAAW,CAAC;IACzB,OAAO,EAAE,wBAAwB;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,oBAAoB;IAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE;QAChB,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,CAAC;QAC/D,MAAM,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;YAC9E,KAAK,EAAE,CAAC,mEAAmE,CAAC;SAC7E,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-readme-present-llm.d.ts","sourceRoot":"","sources":["../../src/fixers/docs-readme-present-llm.ts"],"names":[],"mappings":";AAiBA,wBAsBG"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { defineFixer } from "@esbenwiberg/repofit/sdk";
|
|
4
|
+
const SYSTEM = `You are writing a README.md for a software project. The audience is humans (not AI agents).
|
|
5
|
+
|
|
6
|
+
Write concise markdown. No filler, no marketing language. If you don't know something, write a TODO marker like '<!-- TODO: describe X -->' rather than fabricate details. Do not wrap the output in code fences — the output IS the file content.
|
|
7
|
+
|
|
8
|
+
Required sections (in order):
|
|
9
|
+
1. A level-1 heading with the project name, followed by a one-sentence description.
|
|
10
|
+
2. ## Install — exact command (npm/pip/cargo/etc.) based on the package manifest.
|
|
11
|
+
3. ## Usage — a small example (a few lines of code or a CLI invocation) that demonstrates the simplest use case.
|
|
12
|
+
4. ## Development — install/build/test commands derived from package scripts.
|
|
13
|
+
5. ## License — state the license if you can identify one (LICENSE file, package.json license field). Otherwise put 'TBD'.
|
|
14
|
+
|
|
15
|
+
Target 40–100 lines.`;
|
|
16
|
+
export default defineFixer({
|
|
17
|
+
probeId: "docs.readme-present",
|
|
18
|
+
mode: "llm",
|
|
19
|
+
describe: "generate README.md with Claude",
|
|
20
|
+
async plan({ cwd, generate }) {
|
|
21
|
+
const context = await collectContext(cwd);
|
|
22
|
+
const prompt = buildPrompt(context);
|
|
23
|
+
const content = await generate(prompt, { system: SYSTEM, maxTokens: 4096 });
|
|
24
|
+
return {
|
|
25
|
+
actions: [
|
|
26
|
+
{
|
|
27
|
+
kind: "write-file",
|
|
28
|
+
path: "README.md",
|
|
29
|
+
content: ensureTrailingNewline(content),
|
|
30
|
+
ifMissing: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
notes: [
|
|
34
|
+
"review the generated content before committing — sections may have TODO markers or guesses",
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
async function collectContext(cwd) {
|
|
40
|
+
const projectName = path.basename(cwd) || "project";
|
|
41
|
+
const packageJson = await readFileSafe(path.join(cwd, "package.json"));
|
|
42
|
+
const license = await readFileSafe(path.join(cwd, "LICENSE"));
|
|
43
|
+
const { dirs, files } = await listTopLevel(cwd);
|
|
44
|
+
return {
|
|
45
|
+
cwd,
|
|
46
|
+
projectName,
|
|
47
|
+
...(packageJson ? { packageJson } : {}),
|
|
48
|
+
...(license ? { license: license.slice(0, 500) } : {}),
|
|
49
|
+
topLevelDirs: dirs,
|
|
50
|
+
topLevelFiles: files,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async function readFileSafe(p) {
|
|
54
|
+
try {
|
|
55
|
+
return await readFile(p, "utf8");
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async function listTopLevel(cwd) {
|
|
62
|
+
try {
|
|
63
|
+
const entries = await readdir(cwd, { withFileTypes: true });
|
|
64
|
+
const dirs = [];
|
|
65
|
+
const files = [];
|
|
66
|
+
for (const e of entries) {
|
|
67
|
+
if (e.name.startsWith(".") || e.name === "node_modules" || e.name === "dist")
|
|
68
|
+
continue;
|
|
69
|
+
if (e.isDirectory())
|
|
70
|
+
dirs.push(e.name);
|
|
71
|
+
else
|
|
72
|
+
files.push(e.name);
|
|
73
|
+
}
|
|
74
|
+
dirs.sort();
|
|
75
|
+
files.sort();
|
|
76
|
+
return { dirs, files };
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return { dirs: [], files: [] };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function buildPrompt(ctx) {
|
|
83
|
+
const parts = [];
|
|
84
|
+
parts.push(`Project name (inferred from directory): ${ctx.projectName}`);
|
|
85
|
+
parts.push("");
|
|
86
|
+
parts.push(`Top-level directories: ${ctx.topLevelDirs.join(", ") || "(none)"}`);
|
|
87
|
+
parts.push(`Top-level files: ${ctx.topLevelFiles.join(", ") || "(none)"}`);
|
|
88
|
+
if (ctx.packageJson) {
|
|
89
|
+
parts.push("");
|
|
90
|
+
parts.push("package.json:");
|
|
91
|
+
parts.push("```json");
|
|
92
|
+
parts.push(ctx.packageJson.slice(0, 3000));
|
|
93
|
+
parts.push("```");
|
|
94
|
+
}
|
|
95
|
+
if (ctx.license) {
|
|
96
|
+
parts.push("");
|
|
97
|
+
parts.push("LICENSE excerpt:");
|
|
98
|
+
parts.push("```");
|
|
99
|
+
parts.push(ctx.license);
|
|
100
|
+
parts.push("```");
|
|
101
|
+
}
|
|
102
|
+
parts.push("");
|
|
103
|
+
parts.push("Write the README.md now.");
|
|
104
|
+
return parts.join("\n");
|
|
105
|
+
}
|
|
106
|
+
function ensureTrailingNewline(s) {
|
|
107
|
+
return s.endsWith("\n") ? s : `${s}\n`;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=docs-readme-present-llm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-readme-present-llm.js","sourceRoot":"","sources":["../../src/fixers/docs-readme-present-llm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,GAAG;;;;;;;;;;;qBAWM,CAAC;AAEtB,eAAe,WAAW,CAAC;IACzB,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,gCAAgC;IAC1C,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE;QAC1B,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5E,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,qBAAqB,CAAC,OAAO,CAAC;oBACvC,SAAS,EAAE,IAAI;iBAChB;aACF;Y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AK,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;QAC3C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,qBAAqB,CAAC,CAAS;IACtC,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-readme-present.d.ts","sourceRoot":"","sources":["../../src/fixers/docs-readme-present.ts"],"names":[],"mappings":";AA6BA,wBAYG"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineFixer } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
const README_SCAFFOLD = `# {{name}}
|
|
3
|
+
|
|
4
|
+
> One-sentence description.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
\`\`\`bash
|
|
9
|
+
# package manager install command
|
|
10
|
+
\`\`\`
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
\`\`\`bash
|
|
15
|
+
# the simplest command that demonstrates the tool
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
## Development
|
|
19
|
+
|
|
20
|
+
\`\`\`bash
|
|
21
|
+
# install, build, test
|
|
22
|
+
\`\`\`
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
TBD.
|
|
27
|
+
`;
|
|
28
|
+
export default defineFixer({
|
|
29
|
+
probeId: "docs.readme-present",
|
|
30
|
+
mode: "static",
|
|
31
|
+
describe: "scaffold README.md",
|
|
32
|
+
async plan({ cwd }) {
|
|
33
|
+
const name = cwd.split("/").filter(Boolean).pop() ?? "project";
|
|
34
|
+
const content = README_SCAFFOLD.replace("{{name}}", name);
|
|
35
|
+
return {
|
|
36
|
+
actions: [{ kind: "write-file", path: "README.md", content, ifMissing: true }],
|
|
37
|
+
notes: ["fill in install, usage, and license before publishing"],
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=docs-readme-present.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-readme-present.js","sourceRoot":"","sources":["../../src/fixers/docs-readme-present.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBvB,CAAC;AAEF,eAAe,WAAW,CAAC;IACzB,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,oBAAoB;IAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE;QAChB,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,CAAC;QAC/D,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC1D,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;YAC9E,KAAK,EAAE,CAAC,uDAAuD,CAAC;SACjE,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorconfig-present.d.ts","sourceRoot":"","sources":["../../src/fixers/editorconfig-present.ts"],"names":[],"mappings":";AAmBA,wBAWG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineFixer } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
const EDITORCONFIG = `root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
charset = utf-8
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
insert_final_newline = true
|
|
11
|
+
|
|
12
|
+
[*.md]
|
|
13
|
+
trim_trailing_whitespace = false
|
|
14
|
+
|
|
15
|
+
[Makefile]
|
|
16
|
+
indent_style = tab
|
|
17
|
+
`;
|
|
18
|
+
export default defineFixer({
|
|
19
|
+
probeId: "editorconfig.present",
|
|
20
|
+
mode: "static",
|
|
21
|
+
describe: "write .editorconfig",
|
|
22
|
+
async plan() {
|
|
23
|
+
return {
|
|
24
|
+
actions: [
|
|
25
|
+
{ kind: "write-file", path: ".editorconfig", content: EDITORCONFIG, ifMissing: true },
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=editorconfig-present.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorconfig-present.js","sourceRoot":"","sources":["../../src/fixers/editorconfig-present.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;CAepB,CAAC;AAEF,eAAe,WAAW,CAAC;IACzB,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,qBAAqB;IAC/B,KAAK,CAAC,IAAI;QACR,OAAO;YACL,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE;aACtF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitignore-comprehensive.d.ts","sourceRoot":"","sources":["../../src/fixers/gitignore-comprehensive.ts"],"names":[],"mappings":";AA2BA,wBAmCG"}
|