@kirill.konshin/lint 0.5.4 → 0.6.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/README.md +47 -7
- package/commands/spec-author.md +39 -0
- package/dist/configs/base.d.ts +4 -3
- package/dist/configs/base.js +61 -74
- package/dist/configs/imports.d.ts +3 -2
- package/dist/configs/imports.js +95 -146
- package/dist/configs/nx.d.ts +4 -3
- package/dist/configs/nx.js +31 -41
- package/dist/configs/prettier.d.ts +3 -2
- package/dist/configs/prettier.js +19 -16
- package/dist/configs/promise.d.ts +3 -2
- package/dist/configs/promise.js +16 -16
- package/dist/configs/react.d.ts +4 -3
- package/dist/configs/react.js +178 -217
- package/dist/configs/storybook.d.ts +4 -3
- package/dist/configs/storybook.js +22 -22
- package/dist/configs/tailwind.d.ts +4 -3
- package/dist/configs/tailwind.js +67 -91
- package/dist/configs/testing.d.ts +7 -6
- package/dist/configs/testing.js +112 -136
- package/dist/configs/turbo.d.ts +4 -3
- package/dist/configs/turbo.js +19 -27
- package/dist/configs/typescriptTypeAware.d.ts +4 -3
- package/dist/configs/typescriptTypeAware.js +99 -95
- package/dist/configs/unicorn.d.ts +3 -2
- package/dist/configs/unicorn.js +34 -41
- package/dist/exts.d.ts +2 -1
- package/dist/exts.js +10 -11
- package/dist/index.d.ts +44 -41
- package/dist/index.js +53 -84
- package/dist/lib.d.ts +21 -21
- package/dist/lib.js +261 -301
- package/dist/lintPrepare.d.ts +33 -28
- package/dist/lintPrepare.js +347 -376
- package/dist/lintStaged.d.ts +4 -3
- package/dist/lintStaged.js +25 -22
- package/dist/prettier.d.ts +4 -3
- package/dist/prettier.js +16 -17
- package/dist/restrictions.d.ts +24 -0
- package/dist/restrictions.js +20 -0
- package/dist/yarn.cjs +79 -98
- package/dist/yarn.d.cts +3 -2
- package/package.json +24 -8
- package/rules/agent.md +7 -4
- package/rules/openspec.md +1 -1
- package/skills/spec-steward/SKILL.md +4 -12
- package/skills/spec-steward/references/audit.md +18 -43
- package/skills/spec-steward/references/contract.md +7 -7
- package/skills/spec-steward/references/criteria.md +4 -4
- package/skills/spec-steward/references/model.md +1 -1
- package/skills/spec-steward/references/review-format.md +6 -6
- package/skills/spec-steward/references/wiring.md +4 -4
- package/skills/spec-steward/references/worker.md +67 -0
- package/skills/spec-steward/scripts/lib/align.mjs +7 -6
- package/skills/spec-steward/scripts/lib/checks.mjs +6 -1
- package/skills/spec-steward/scripts/lib/corpus.mjs +5 -8
- package/skills/spec-steward/scripts/lib/coverage.mjs +2 -3
- package/skills/spec-steward/scripts/lib/evidence.mjs +2 -148
- package/skills/spec-steward/scripts/lib/wire.mjs +6 -4
- package/skills/spec-steward/scripts/steward.mjs +30 -91
- package/skills/spec-steward/sweeps.json +49 -0
- package/skills/spec-tools/SKILL.md +46 -0
- package/skills/spec-tools/references/contract.md +111 -0
- package/skills/spec-tools/references/gitlab.md +122 -0
- package/skills/spec-verify/SKILL.md +153 -0
- package/spec-tools/dist/audit-DkZZulq6.mjs +130 -0
- package/spec-tools/dist/auditChanged-CNGjlake.mjs +1 -0
- package/spec-tools/dist/auditChanged-CZCvMgyZ.mjs +618 -0
- package/spec-tools/dist/auditReport-xgq4wK2i.mjs +458 -0
- package/spec-tools/dist/auditScope-CBuBtfPG.mjs +104 -0
- package/spec-tools/dist/changeGates-DdeQKfle.mjs +333 -0
- package/spec-tools/dist/changeGates-uy4Ti8rK.mjs +1 -0
- package/spec-tools/dist/ci-BUewHJS3.mjs +143 -0
- package/spec-tools/dist/ci-CFBzn8Of.mjs +1 -0
- package/spec-tools/dist/cli.mjs +93 -0
- package/spec-tools/dist/comment-szasMMg2.mjs +57 -0
- package/spec-tools/dist/files-Bppsb34B.mjs +1 -0
- package/spec-tools/dist/files-QlzY687_.mjs +38 -0
- package/spec-tools/dist/html-BMTkpbUN.mjs +1766 -0
- package/spec-tools/dist/jsonrepair-Dlm5dEen.mjs +742 -0
- package/spec-tools/dist/repo-CjIoUPYl.mjs +16 -0
- package/spec-tools/dist/repo-DUcnJw3c.mjs +1 -0
- package/spec-tools/dist/run-BElA9du3.mjs +67 -0
- package/spec-tools/dist/specDiff-8G56jMYn.mjs +123 -0
- package/spec-tools/dist/steward-DeieyOcj.mjs +34 -0
- package/spec-tools/dist/stewardAudit-BRMM0lrD.mjs +1 -0
- package/spec-tools/dist/stewardAudit-v0vOMfLN.mjs +271 -0
- package/spec-tools/dist/tier-Cn0P7juM.mjs +1 -0
- package/spec-tools/dist/tier-c3s_mA_I.mjs +65 -0
- package/spec-tools/dist/util-wnxhsnWO.mjs +49 -0
- package/spec-tools/dist/verdict-BFfN9PO8.mjs +58 -0
- package/spec-tools/dist/workers-BcIgckeq.mjs +417 -0
- package/spec-tools/dist/workflowEvidence-DyBj8EdG.mjs +1 -0
- package/spec-tools/dist/workflowEvidence-oui6ghPI.mjs +78 -0
- package/dist/configs/base.d.ts.map +0 -1
- package/dist/configs/imports.d.ts.map +0 -1
- package/dist/configs/nx.d.ts.map +0 -1
- package/dist/configs/prettier.d.ts.map +0 -1
- package/dist/configs/promise.d.ts.map +0 -1
- package/dist/configs/react.d.ts.map +0 -1
- package/dist/configs/storybook.d.ts.map +0 -1
- package/dist/configs/tailwind.d.ts.map +0 -1
- package/dist/configs/testing.d.ts.map +0 -1
- package/dist/configs/turbo.d.ts.map +0 -1
- package/dist/configs/typescriptTypeAware.d.ts.map +0 -1
- package/dist/configs/unicorn.d.ts.map +0 -1
- package/dist/exts.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib.d.ts.map +0 -1
- package/dist/lintPrepare.d.ts.map +0 -1
- package/dist/lintStaged.d.ts.map +0 -1
- package/dist/prettier.d.ts.map +0 -1
- package/dist/yarn.d.cts.map +0 -1
- package/skills/spec-steward/workflows/audit.js +0 -539
package/dist/lintPrepare.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/lintPrepare.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* @kirill.konshin/lint
|
|
4
4
|
*
|
|
5
5
|
* This script makes `rules`, `commands` and `skills` real directories in the consuming project's
|
|
6
|
-
* `.agents` (canonical, cross-tool)
|
|
7
|
-
* file symlinks only: package rules and skills (every file a skill folder ships, plus the package
|
|
8
|
-
* README.md next to its SKILL.md, so a skill can reference `@README.md`) go into
|
|
9
|
-
* straight at the installed package; the user's own files in `.agents` are mirrored into `.claude
|
|
10
|
-
* and `.codex`. It also
|
|
6
|
+
* `.agents` (canonical, cross-tool) and `.claude` (Claude Code), and fills them with
|
|
7
|
+
* file symlinks only: package rules, commands and skills (every file a skill folder ships, plus the package
|
|
8
|
+
* README.md next to its SKILL.md, so a skill can reference `@README.md`) go into both, pointing
|
|
9
|
+
* straight at the installed package; the user's own files in `.agents` are mirrored into `.claude`. It also
|
|
11
10
|
* generates an `AGENTS.md` file for other tools, with `CLAUDE.md` symlinked to `AGENTS.md`.
|
|
12
11
|
*
|
|
13
12
|
* Usage:
|
|
@@ -18,19 +17,23 @@
|
|
|
18
17
|
* The module also exports its functions and only runs `main()` when executed directly,
|
|
19
18
|
* so it can be imported (for testing/reuse) without side effects.
|
|
20
19
|
*/
|
|
20
|
+
/**
|
|
21
|
+
* A rule file. `paths` scopes it: Claude Code loads it only for matching files.
|
|
22
|
+
*/
|
|
21
23
|
type Rule = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
file: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
paths?: string[];
|
|
28
|
+
content: string;
|
|
26
29
|
};
|
|
27
30
|
type Skill = {
|
|
28
|
-
|
|
31
|
+
name: string;
|
|
29
32
|
};
|
|
30
33
|
type ExistingFile = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
exists: boolean;
|
|
35
|
+
generated: boolean;
|
|
36
|
+
customSection: string | null;
|
|
34
37
|
};
|
|
35
38
|
/**
|
|
36
39
|
* Read all markdown files from the package rules directory.
|
|
@@ -42,11 +45,15 @@ export declare function readRules(): Rule[];
|
|
|
42
45
|
*/
|
|
43
46
|
export declare function readSkills(): Skill[];
|
|
44
47
|
/**
|
|
45
|
-
*
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
* Read the package commands directory: every markdown file is a command named after the file.
|
|
49
|
+
*/
|
|
50
|
+
export declare function readCommands(): string[];
|
|
51
|
+
/**
|
|
52
|
+
* Package files to link, keyed by their path inside an agent dir: `rules/<file>`, `commands/<file>`, and every file
|
|
53
|
+
* of a skill at its own relative path, plus the package README.md next to its `SKILL.md` (unless the skill ships
|
|
54
|
+
* one), so a skill can reference `@README.md`.
|
|
48
55
|
*/
|
|
49
|
-
export declare function packageFiles(rules: Rule[], skills: Skill[]): Map<string, string>;
|
|
56
|
+
export declare function packageFiles(rules: Rule[], skills: Skill[], commands?: string[]): Map<string, string>;
|
|
50
57
|
/**
|
|
51
58
|
* The user's own files in `.agents` `rules`, `commands` and `skills`, keyed like packageFiles() - everything there
|
|
52
59
|
* except the package links (and dotfiles).
|
|
@@ -54,8 +61,8 @@ export declare function packageFiles(rules: Rule[], skills: Skill[]): Map<string
|
|
|
54
61
|
export declare function readUserFiles(cwd: string): Map<string, string>;
|
|
55
62
|
/**
|
|
56
63
|
* Make `rules`, `commands` and `skills` real directories in every agent dir and link the files we know into them:
|
|
57
|
-
* package files into
|
|
58
|
-
*
|
|
64
|
+
* package files into both, pointing straight at the package, and the user's own `.agents` files into `.claude`.
|
|
65
|
+
* Real files and linked directories are the user's - never written over or through. Dead links are
|
|
59
66
|
* removed, and so are links from the previous run that are no longer placed: each directory's generated `.gitignore`
|
|
60
67
|
* records them (and keeps them out of git, so the user's own files there stay tracked).
|
|
61
68
|
*
|
|
@@ -82,13 +89,12 @@ export declare function checkClaudeMdSafety(claudeMdPath: string): void;
|
|
|
82
89
|
*/
|
|
83
90
|
export declare function symlinkClaudeMd(cwd: string): void;
|
|
84
91
|
/**
|
|
85
|
-
* Generate AGENTS.md with a `# Rules` section:
|
|
86
|
-
*
|
|
92
|
+
* Generate AGENTS.md with a `# Rules` section: one entry per rule (the package's and the user's own) with
|
|
93
|
+
* its frontmatter `description`, the `paths` it is scoped to and a plain link to its `.agents/rules` entry.
|
|
87
94
|
*
|
|
88
|
-
* `.claude/rules
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* The sections below are for other tools that only read AGENTS.md.
|
|
95
|
+
* The links are plain, never `@path` imports: Claude Code loads `.claude/rules` itself (syncAgentDirs() links them
|
|
96
|
+
* there) and honours each rule's `paths`, while an `@` import would load every rule into every session, scoped or not.
|
|
97
|
+
* Codex, which expands no `@`, reads this index.
|
|
92
98
|
*/
|
|
93
99
|
export declare function generateAgentsFile(rules: Rule[], customSection: string | null): string;
|
|
94
100
|
/**
|
|
@@ -102,5 +108,4 @@ export declare function checkExisting(targetPath: string): ExistingFile;
|
|
|
102
108
|
* Main function
|
|
103
109
|
*/
|
|
104
110
|
export declare function main(): void;
|
|
105
|
-
|
|
106
|
-
//# sourceMappingURL=lintPrepare.d.ts.map
|
|
111
|
+
//#endregion
|