@avi2dg/checks 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 +8 -0
- package/docs/gates/checks-setup.md +3 -0
- package/package.json +1 -1
- package/src/delivery/setup.ts +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of `@avi2dg/checks`, newest first, written by the release from its conventional commits.
|
|
4
4
|
|
|
5
|
+
## 0.72.0
|
|
6
|
+
|
|
7
|
+
Released 2026-11-07.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **checks-setup:** write root AGENTS.md and CLAUDE.md when absent [#60](https://github.com/avi2d/checks/pull/60)
|
|
12
|
+
|
|
5
13
|
## 0.71.0
|
|
6
14
|
|
|
7
15
|
Released 2026-11-07.
|
|
@@ -31,6 +31,7 @@ A `--private` run pins each job to `${{ vars.CI_RUNS_ON || 'ubuntu-latest' }}`.
|
|
|
31
31
|
Setting the `CI_RUNS_ON` variable to a self-hosted runner label then lands the jobs there.
|
|
32
32
|
A public run pins each job to `ubuntu-latest`.
|
|
33
33
|
It copies each kit template under `dist/templates/` into `templates/`, so a new doc file starts from a copy there.
|
|
34
|
+
It copies `dist/templates/agents.md` to `AGENTS.md` and `dist/templates/claude.md` to `CLAUDE.md` when the root lacks them, and keeps either file it finds.
|
|
34
35
|
It names every file it wrote and every file it kept.
|
|
35
36
|
It tells the owner to declare the repository owners in `package.json` `author` or `contributors` before the first commit.
|
|
36
37
|
|
|
@@ -69,6 +70,8 @@ checks-setup: set the CI_RUNS_ON variable to a self-hosted runner label so the n
|
|
|
69
70
|
|
|
70
71
|
A repository owner runs it once in a new repository, before the first install.
|
|
71
72
|
Declare the repository owners in `package.json` `author` or `contributors` before the first commit.
|
|
73
|
+
Fill `AGENTS.md` with what an agent cannot infer from the code before the first commit.
|
|
74
|
+
`checks-docs` fails on the unfilled placeholder entry until it is filled.
|
|
72
75
|
Running it again with the same kit version changes nothing.
|
|
73
76
|
A later kit release arrives through [Upgrade the kit](../how-to/upgrade-the-kit.md).
|
|
74
77
|
|
package/package.json
CHANGED
package/src/delivery/setup.ts
CHANGED
|
@@ -130,11 +130,12 @@ const setupFile = Effect.fn("setupFile")(function* (root: string, relative: stri
|
|
|
130
130
|
const full = path.join(root, relative);
|
|
131
131
|
if (yield* system.exists(full)) {
|
|
132
132
|
yield* Console.log(NAME + ": kept " + relative + ", already there");
|
|
133
|
-
return;
|
|
133
|
+
return false;
|
|
134
134
|
}
|
|
135
135
|
yield* system.makeDirectory(path.dirname(full), { recursive: true });
|
|
136
136
|
yield* system.writeFileString(full, content);
|
|
137
137
|
yield* Console.log(NAME + ": wrote " + relative);
|
|
138
|
+
return true;
|
|
138
139
|
});
|
|
139
140
|
|
|
140
141
|
const setupIgnore = Effect.fn("setupIgnore")(function* (root: string) {
|
|
@@ -352,10 +353,15 @@ const check = Effect.gen(function* () {
|
|
|
352
353
|
for (const kind of Object.keys(TEMPLATES)) {
|
|
353
354
|
yield* setupFile(root, "templates/" + kind + ".md", yield* kitText("dist/templates/" + kind + ".md"));
|
|
354
355
|
}
|
|
356
|
+
const wroteAgents = yield* setupFile(root, "AGENTS.md", yield* kitText("dist/templates/agents.md"));
|
|
357
|
+
yield* setupFile(root, "CLAUDE.md", yield* kitText("dist/templates/claude.md"));
|
|
355
358
|
if (isPrivate) yield* Console.log(NAME + ": set the CI_RUNS_ON variable to a self-hosted runner label so the new jobs land there");
|
|
356
359
|
if (!outcome.hasOwner) {
|
|
357
360
|
yield* Console.log(NAME + ": declare the repository owners in package.json author or contributors before the first commit");
|
|
358
361
|
}
|
|
362
|
+
if (wroteAgents) {
|
|
363
|
+
yield* Console.log(NAME + ": fill AGENTS.md with what an agent cannot infer from the code before the first commit");
|
|
364
|
+
}
|
|
359
365
|
return true;
|
|
360
366
|
});
|
|
361
367
|
|