@yawlabs/ctxlint 0.12.3 → 0.13.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/.pre-commit-hooks.yaml +1 -1
- package/AGENT_SESSION_LINT_SPEC.md +3 -4
- package/AGENT_SKILL_LINT_SPEC.md +107 -0
- package/CONTEXT_LINT_SPEC.md +21 -4
- package/MCP_CONFIG_LINT_SPEC.md +1 -2
- package/README.md +12 -8
- package/agent-session-lint-rules.json +1 -1
- package/agent-skill-lint-rules.json +75 -0
- package/context-lint-rules.json +17 -1
- package/dist/index.js +797 -175
- package/mcp-config-lint-rules.json +1 -1
- package/mcph-config-lint-rules.json +1 -1
- package/package.json +6 -1
- package/schemas/ctxlint-catalog.schema.json +94 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/YawLabs/ctxlint/main/schemas/ctxlint-catalog.schema.json",
|
|
3
3
|
"specVersion": "1.0.0-draft",
|
|
4
4
|
"specDate": "2026-04-16",
|
|
5
5
|
"mcphSchemaReference": "https://raw.githubusercontent.com/YawLabs/mcph/main/schemas/mcph.config.v1.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/ctxlint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"mcpName": "io.github.YawLabs/ctxlint",
|
|
5
5
|
"description": "Lint your AI agent context files, MCP server configs, and session data against your actual codebase",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "node build.mjs",
|
|
12
12
|
"dev": "node build.mjs",
|
|
13
|
+
"generate": "node scripts/generate-catalog-prose.mjs",
|
|
14
|
+
"generate:check": "node scripts/generate-catalog-prose.mjs --check",
|
|
13
15
|
"test": "vitest",
|
|
14
16
|
"test:run": "vitest run",
|
|
15
17
|
"test:coverage": "vitest run --coverage --coverage.reporter=text-summary --coverage.reporter=html --coverage.exclude='**/__tests__/**' --coverage.exclude='**/fixtures/**' --coverage.exclude='dist/**' --coverage.exclude='build.mjs' --coverage.exclude='coverage-report.mjs'",
|
|
@@ -56,10 +58,13 @@
|
|
|
56
58
|
"CONTEXT_LINT_SPEC.md",
|
|
57
59
|
"MCP_CONFIG_LINT_SPEC.md",
|
|
58
60
|
"AGENT_SESSION_LINT_SPEC.md",
|
|
61
|
+
"AGENT_SKILL_LINT_SPEC.md",
|
|
59
62
|
"context-lint-rules.json",
|
|
60
63
|
"mcp-config-lint-rules.json",
|
|
61
64
|
"mcph-config-lint-rules.json",
|
|
62
65
|
"agent-session-lint-rules.json",
|
|
66
|
+
"agent-skill-lint-rules.json",
|
|
67
|
+
"schemas/ctxlint-catalog.schema.json",
|
|
63
68
|
"LICENSE",
|
|
64
69
|
"README.md"
|
|
65
70
|
],
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/YawLabs/ctxlint/main/schemas/ctxlint-catalog.schema.json",
|
|
4
|
+
"title": "ctxlint rule catalog",
|
|
5
|
+
"description": "Governing schema for the machine-readable rule catalogs that back the ctxlint specifications (context-, mcp-config-, mcph-config-, agent-session-lint-rules.json). Defines the shared metadata block + the rule/category shape every catalog must satisfy. Per-catalog extras (formats, clients, agents, dataSources, target, mcphSchemaReference) are permitted via additionalProperties.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema", "specVersion", "specDate", "repository", "categories", "rules"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Points at this governing schema so editors and CI validate against it."
|
|
13
|
+
},
|
|
14
|
+
"title": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Optional human title for the catalog."
|
|
17
|
+
},
|
|
18
|
+
"description": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Optional human description of the catalog's scope."
|
|
21
|
+
},
|
|
22
|
+
"specVersion": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Semantic version of the specification this catalog implements.",
|
|
25
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?$"
|
|
26
|
+
},
|
|
27
|
+
"specDate": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "ISO date (YYYY-MM-DD) the spec version was authored/updated.",
|
|
30
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
|
31
|
+
},
|
|
32
|
+
"mcpSpecCompatibility": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Shared optional field: the Model Context Protocol wire-spec version this catalog tracks (date-stamped, e.g. \"2025-11-25\"). Present only on catalogs whose rules are bound to the MCP protocol version (mcp-config). Absent (meaningfully) on catalogs that are protocol-agnostic (context, agent-session, mcph-config).",
|
|
35
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "uri",
|
|
40
|
+
"description": "Canonical repository URL for the reference implementation."
|
|
41
|
+
},
|
|
42
|
+
"categories": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"minItems": 1,
|
|
45
|
+
"items": { "$ref": "#/$defs/category" }
|
|
46
|
+
},
|
|
47
|
+
"rules": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"minItems": 1,
|
|
50
|
+
"items": { "$ref": "#/$defs/rule" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"$defs": {
|
|
54
|
+
"category": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["id", "name", "description"],
|
|
57
|
+
"additionalProperties": true,
|
|
58
|
+
"properties": {
|
|
59
|
+
"id": { "type": "string", "minLength": 1 },
|
|
60
|
+
"name": { "type": "string", "minLength": 1 },
|
|
61
|
+
"description": { "type": "string", "minLength": 1 },
|
|
62
|
+
"scope": { "type": "string" }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"rule": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": [
|
|
68
|
+
"id",
|
|
69
|
+
"category",
|
|
70
|
+
"severity",
|
|
71
|
+
"description",
|
|
72
|
+
"trigger",
|
|
73
|
+
"message",
|
|
74
|
+
"fixable",
|
|
75
|
+
"stability"
|
|
76
|
+
],
|
|
77
|
+
"additionalProperties": true,
|
|
78
|
+
"properties": {
|
|
79
|
+
"id": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Stable rule ID in ctxlint `category/slug` format (a single `/` separator). NOTE: the sibling mcp-compliance project uses `category-suffix` (a `-` separator) instead; the difference is deliberate -- see CONTRIBUTING.md \"Rule ID format\".",
|
|
82
|
+
"pattern": "^[a-z0-9-]+/[a-z0-9-]+$"
|
|
83
|
+
},
|
|
84
|
+
"category": { "type": "string", "minLength": 1 },
|
|
85
|
+
"severity": { "type": "string", "enum": ["error", "warning", "info"] },
|
|
86
|
+
"description": { "type": "string", "minLength": 1 },
|
|
87
|
+
"trigger": { "type": "string", "minLength": 1 },
|
|
88
|
+
"message": { "type": "string", "minLength": 1 },
|
|
89
|
+
"fixable": { "type": "boolean" },
|
|
90
|
+
"stability": { "type": "string", "enum": ["stable", "experimental"] }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|