mustflow 2.84.0 → 2.99.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.
Files changed (105) hide show
  1. package/README.md +11 -2
  2. package/dist/cli/commands/script-pack.js +14 -0
  3. package/dist/cli/i18n/en.js +262 -0
  4. package/dist/cli/i18n/es.js +262 -0
  5. package/dist/cli/i18n/fr.js +262 -0
  6. package/dist/cli/i18n/hi.js +262 -0
  7. package/dist/cli/i18n/ko.js +262 -0
  8. package/dist/cli/i18n/zh.js +262 -0
  9. package/dist/cli/lib/repo-map.js +27 -6
  10. package/dist/cli/lib/run-root-trust.js +15 -1
  11. package/dist/cli/lib/script-pack-registry.js +397 -0
  12. package/dist/cli/lib/validation/index.js +2 -2
  13. package/dist/cli/lib/validation/primitives.js +4 -1
  14. package/dist/cli/script-packs/code-change-impact.js +178 -0
  15. package/dist/cli/script-packs/code-dependency-graph.js +181 -0
  16. package/dist/cli/script-packs/code-import-cycle.js +193 -0
  17. package/dist/cli/script-packs/docs-link-integrity.js +145 -0
  18. package/dist/cli/script-packs/repo-approval-gate.js +100 -0
  19. package/dist/cli/script-packs/repo-env-contract.js +156 -0
  20. package/dist/cli/script-packs/repo-git-ignore-audit.js +119 -0
  21. package/dist/cli/script-packs/repo-manifest-lock-drift.js +122 -0
  22. package/dist/cli/script-packs/repo-merge-conflict-scan.js +123 -0
  23. package/dist/cli/script-packs/repo-secret-risk-scan.js +147 -0
  24. package/dist/cli/script-packs/repo-skill-route-audit.js +86 -0
  25. package/dist/cli/script-packs/repo-version-source.js +92 -0
  26. package/dist/cli/script-packs/test-performance-report.js +247 -0
  27. package/dist/cli/script-packs/test-regression-selector.js +167 -0
  28. package/dist/core/change-impact.js +355 -0
  29. package/dist/core/change-surface-classification.js +198 -0
  30. package/dist/core/change-verification.js +32 -5
  31. package/dist/core/config-loading.js +121 -4
  32. package/dist/core/dependency-graph.js +490 -0
  33. package/dist/core/docs-link-integrity.js +443 -0
  34. package/dist/core/env-contract.js +450 -0
  35. package/dist/core/import-cycle.js +152 -0
  36. package/dist/core/line-endings.js +26 -13
  37. package/dist/core/public-json-contracts.js +167 -0
  38. package/dist/core/repo-approval-gate.js +116 -0
  39. package/dist/core/repo-git-ignore-audit.js +302 -0
  40. package/dist/core/repo-manifest-lock-drift.js +321 -0
  41. package/dist/core/repo-merge-conflict-scan.js +335 -0
  42. package/dist/core/repo-version-source.js +82 -0
  43. package/dist/core/route-outline.js +57 -5
  44. package/dist/core/script-pack-suggestions.js +97 -1
  45. package/dist/core/secret-risk-scan.js +440 -0
  46. package/dist/core/skill-route-audit.js +354 -0
  47. package/dist/core/test-performance-report.js +697 -0
  48. package/dist/core/test-regression-selector.js +335 -0
  49. package/package.json +1 -1
  50. package/schemas/README.md +54 -0
  51. package/schemas/change-impact-report.schema.json +184 -0
  52. package/schemas/commands.schema.json +12 -0
  53. package/schemas/dependency-graph-report.schema.json +149 -0
  54. package/schemas/env-contract-report.schema.json +203 -0
  55. package/schemas/import-cycle-report.schema.json +157 -0
  56. package/schemas/link-integrity-report.schema.json +176 -0
  57. package/schemas/repo-approval-gate-report.schema.json +115 -0
  58. package/schemas/repo-git-ignore-audit-report.schema.json +201 -0
  59. package/schemas/repo-manifest-lock-drift-report.schema.json +202 -0
  60. package/schemas/repo-merge-conflict-scan-report.schema.json +169 -0
  61. package/schemas/repo-version-source-report.schema.json +127 -0
  62. package/schemas/secret-risk-scan-report.schema.json +152 -0
  63. package/schemas/skill-route-audit-report.schema.json +144 -0
  64. package/schemas/test-performance-report.schema.json +319 -0
  65. package/schemas/test-regression-selector-report.schema.json +187 -0
  66. package/templates/default/i18n.toml +80 -26
  67. package/templates/default/locales/en/.mustflow/skills/INDEX.md +51 -9
  68. package/templates/default/locales/en/.mustflow/skills/api-access-control-review/SKILL.md +48 -27
  69. package/templates/default/locales/en/.mustflow/skills/api-failure-triage/SKILL.md +270 -0
  70. package/templates/default/locales/en/.mustflow/skills/architecture-deepening-review/SKILL.md +28 -11
  71. package/templates/default/locales/en/.mustflow/skills/astro-code-change/SKILL.md +71 -27
  72. package/templates/default/locales/en/.mustflow/skills/auth-flow-triage/SKILL.md +192 -0
  73. package/templates/default/locales/en/.mustflow/skills/auth-permission-change/SKILL.md +59 -13
  74. package/templates/default/locales/en/.mustflow/skills/backend-log-evidence-review/SKILL.md +14 -5
  75. package/templates/default/locales/en/.mustflow/skills/cache-integrity-review/SKILL.md +30 -15
  76. package/templates/default/locales/en/.mustflow/skills/change-blast-radius-review/SKILL.md +45 -32
  77. package/templates/default/locales/en/.mustflow/skills/ci-pipeline-triage/SKILL.md +200 -0
  78. package/templates/default/locales/en/.mustflow/skills/clarifying-question-gate/SKILL.md +87 -13
  79. package/templates/default/locales/en/.mustflow/skills/cross-agent-session-reference/SKILL.md +23 -8
  80. package/templates/default/locales/en/.mustflow/skills/dependency-upgrade-review/SKILL.md +3 -1
  81. package/templates/default/locales/en/.mustflow/skills/docker-runtime-triage/SKILL.md +191 -0
  82. package/templates/default/locales/en/.mustflow/skills/github-contribution-quality-gate/SKILL.md +48 -11
  83. package/templates/default/locales/en/.mustflow/skills/go-code-change/SKILL.md +18 -13
  84. package/templates/default/locales/en/.mustflow/skills/javascript-code-change/SKILL.md +15 -13
  85. package/templates/default/locales/en/.mustflow/skills/line-ending-hygiene/SKILL.md +18 -10
  86. package/templates/default/locales/en/.mustflow/skills/llm-hallucination-control-review/SKILL.md +4 -1
  87. package/templates/default/locales/en/.mustflow/skills/motion-system-contract-review/SKILL.md +155 -0
  88. package/templates/default/locales/en/.mustflow/skills/next-action-menu/SKILL.md +177 -0
  89. package/templates/default/locales/en/.mustflow/skills/node-code-change/SKILL.md +16 -14
  90. package/templates/default/locales/en/.mustflow/skills/observability-debuggability-review/SKILL.md +15 -7
  91. package/templates/default/locales/en/.mustflow/skills/payment-integrity-review/SKILL.md +59 -35
  92. package/templates/default/locales/en/.mustflow/skills/powershell-code-change/SKILL.md +16 -6
  93. package/templates/default/locales/en/.mustflow/skills/prompt-contract-quality-review/SKILL.md +4 -1
  94. package/templates/default/locales/en/.mustflow/skills/python-code-change/SKILL.md +19 -10
  95. package/templates/default/locales/en/.mustflow/skills/rag-pipeline-triage/SKILL.md +206 -0
  96. package/templates/default/locales/en/.mustflow/skills/routes.toml +69 -9
  97. package/templates/default/locales/en/.mustflow/skills/rust-code-change/SKILL.md +10 -4
  98. package/templates/default/locales/en/.mustflow/skills/search-index-integrity-review/SKILL.md +181 -0
  99. package/templates/default/locales/en/.mustflow/skills/security-privacy-review/SKILL.md +3 -1
  100. package/templates/default/locales/en/.mustflow/skills/service-boundary-architecture/SKILL.md +37 -23
  101. package/templates/default/locales/en/.mustflow/skills/test-suite-performance-review/SKILL.md +323 -0
  102. package/templates/default/locales/en/.mustflow/skills/typescript-code-change/SKILL.md +18 -10
  103. package/templates/default/locales/en/.mustflow/skills/vector-search-integrity-review/SKILL.md +209 -0
  104. package/templates/default/locales/en/.mustflow/skills/version-freshness-check/SKILL.md +16 -14
  105. package/templates/default/manifest.toml +71 -1
@@ -0,0 +1,149 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/dependency-graph-report.schema.json",
4
+ "title": "mustflow dependency-graph report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "policy",
18
+ "input_hash",
19
+ "targets",
20
+ "nodes",
21
+ "edges",
22
+ "cycles",
23
+ "truncated",
24
+ "findings",
25
+ "issues"
26
+ ],
27
+ "properties": {
28
+ "schema_version": { "const": "1" },
29
+ "command": { "const": "script-pack" },
30
+ "pack_id": { "const": "code" },
31
+ "script_id": { "const": "dependency-graph" },
32
+ "script_ref": { "const": "code/dependency-graph" },
33
+ "action": { "const": "scan" },
34
+ "status": { "enum": ["passed", "failed", "error"] },
35
+ "ok": { "type": "boolean" },
36
+ "mustflow_root": { "type": "string" },
37
+ "policy": { "$ref": "#/$defs/policy" },
38
+ "input_hash": { "$ref": "#/$defs/sha256" },
39
+ "targets": { "type": "array", "items": { "$ref": "#/$defs/target" } },
40
+ "nodes": { "type": "array", "items": { "$ref": "#/$defs/node" } },
41
+ "edges": { "type": "array", "items": { "$ref": "#/$defs/edge" } },
42
+ "cycles": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "array",
46
+ "items": { "type": "string" }
47
+ }
48
+ },
49
+ "truncated": { "type": "boolean" },
50
+ "findings": { "type": "array", "items": { "$ref": "#/$defs/finding" } },
51
+ "issues": { "type": "array", "items": { "type": "string" } }
52
+ },
53
+ "$defs": {
54
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
55
+ "stringArray": { "type": "array", "items": { "type": "string" } },
56
+ "language": {
57
+ "enum": [
58
+ "typescript",
59
+ "tsx",
60
+ "javascript",
61
+ "jsx",
62
+ "javascript-module",
63
+ "javascript-commonjs",
64
+ "json",
65
+ "other"
66
+ ]
67
+ },
68
+ "targetKind": { "enum": ["file", "directory", "missing", "other", "unknown"] },
69
+ "edgeKind": { "enum": ["static_import", "static_export", "dynamic_import", "require"] },
70
+ "policy": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": [
74
+ "max_file_bytes",
75
+ "max_files",
76
+ "max_depth",
77
+ "max_nodes",
78
+ "max_edges",
79
+ "extensions",
80
+ "ignored_directories"
81
+ ],
82
+ "properties": {
83
+ "max_file_bytes": { "type": "integer", "minimum": 1 },
84
+ "max_files": { "type": "integer", "minimum": 1 },
85
+ "max_depth": { "type": "integer", "minimum": 1 },
86
+ "max_nodes": { "type": "integer", "minimum": 1 },
87
+ "max_edges": { "type": "integer", "minimum": 1 },
88
+ "extensions": { "$ref": "#/$defs/stringArray" },
89
+ "ignored_directories": { "$ref": "#/$defs/stringArray" }
90
+ }
91
+ },
92
+ "target": {
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "required": ["input", "path", "exists", "kind", "language"],
96
+ "properties": {
97
+ "input": { "type": "string" },
98
+ "path": { "type": "string" },
99
+ "exists": { "type": ["boolean", "null"] },
100
+ "kind": { "$ref": "#/$defs/targetKind" },
101
+ "language": { "$ref": "#/$defs/language" }
102
+ }
103
+ },
104
+ "node": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["path", "language", "target", "depth", "import_count", "importer_count"],
108
+ "properties": {
109
+ "path": { "type": "string" },
110
+ "language": { "$ref": "#/$defs/language" },
111
+ "target": { "type": "boolean" },
112
+ "depth": { "type": "integer", "minimum": 0 },
113
+ "import_count": { "type": "integer", "minimum": 0 },
114
+ "importer_count": { "type": "integer", "minimum": 0 }
115
+ }
116
+ },
117
+ "edge": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": ["source_path", "target_path", "specifier", "line", "kind"],
121
+ "properties": {
122
+ "source_path": { "type": "string" },
123
+ "target_path": { "type": "string" },
124
+ "specifier": { "type": "string" },
125
+ "line": { "type": "integer", "minimum": 1 },
126
+ "kind": { "$ref": "#/$defs/edgeKind" }
127
+ }
128
+ },
129
+ "finding": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": ["code", "severity", "message", "path"],
133
+ "properties": {
134
+ "code": {
135
+ "enum": [
136
+ "dependency_graph_path_outside_root",
137
+ "dependency_graph_unreadable_path",
138
+ "dependency_graph_max_files_exceeded",
139
+ "dependency_graph_max_nodes_exceeded",
140
+ "dependency_graph_max_edges_exceeded"
141
+ ]
142
+ },
143
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
144
+ "message": { "type": "string" },
145
+ "path": { "type": "string" }
146
+ }
147
+ }
148
+ }
149
+ }
@@ -0,0 +1,203 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/env-contract-report.schema.json",
4
+ "title": "mustflow env-contract report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "policy",
18
+ "input_hash",
19
+ "targets",
20
+ "summary",
21
+ "keys",
22
+ "truncated",
23
+ "findings",
24
+ "issues"
25
+ ],
26
+ "properties": {
27
+ "schema_version": { "const": "1" },
28
+ "command": { "const": "script-pack" },
29
+ "pack_id": { "const": "repo" },
30
+ "script_id": { "const": "env-contract" },
31
+ "script_ref": { "const": "repo/env-contract" },
32
+ "action": { "const": "scan" },
33
+ "status": { "enum": ["passed", "failed", "error"] },
34
+ "ok": { "type": "boolean" },
35
+ "mustflow_root": { "type": "string" },
36
+ "policy": { "$ref": "#/$defs/policy" },
37
+ "input_hash": { "$ref": "#/$defs/sha256" },
38
+ "targets": {
39
+ "type": "array",
40
+ "items": { "$ref": "#/$defs/target" }
41
+ },
42
+ "summary": { "$ref": "#/$defs/summary" },
43
+ "keys": {
44
+ "type": "array",
45
+ "items": { "$ref": "#/$defs/envKey" }
46
+ },
47
+ "truncated": { "type": "boolean" },
48
+ "findings": {
49
+ "type": "array",
50
+ "items": { "$ref": "#/$defs/finding" }
51
+ },
52
+ "issues": {
53
+ "type": "array",
54
+ "items": { "type": "string" }
55
+ }
56
+ },
57
+ "$defs": {
58
+ "sha256": {
59
+ "type": "string",
60
+ "pattern": "^sha256:[a-f0-9]{64}$"
61
+ },
62
+ "stringArray": {
63
+ "type": "array",
64
+ "items": { "type": "string" }
65
+ },
66
+ "policy": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "max_file_bytes",
71
+ "max_files",
72
+ "max_keys",
73
+ "extensions",
74
+ "env_example_names",
75
+ "skipped_secret_names",
76
+ "ignored_directories"
77
+ ],
78
+ "properties": {
79
+ "max_file_bytes": { "type": "integer", "minimum": 1 },
80
+ "max_files": { "type": "integer", "minimum": 1 },
81
+ "max_keys": { "type": "integer", "minimum": 1 },
82
+ "extensions": { "$ref": "#/$defs/stringArray" },
83
+ "env_example_names": { "$ref": "#/$defs/stringArray" },
84
+ "skipped_secret_names": { "$ref": "#/$defs/stringArray" },
85
+ "ignored_directories": { "$ref": "#/$defs/stringArray" }
86
+ }
87
+ },
88
+ "target": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["input", "path", "exists", "kind"],
92
+ "properties": {
93
+ "input": { "type": "string" },
94
+ "path": { "type": "string" },
95
+ "exists": { "type": ["boolean", "null"] },
96
+ "kind": { "enum": ["file", "directory", "missing", "other", "unknown"] }
97
+ }
98
+ },
99
+ "summary": {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": [
103
+ "target_count",
104
+ "file_count",
105
+ "key_count",
106
+ "code_key_count",
107
+ "example_key_count",
108
+ "documented_key_count",
109
+ "ci_key_count"
110
+ ],
111
+ "properties": {
112
+ "target_count": { "type": "integer", "minimum": 0 },
113
+ "file_count": { "type": "integer", "minimum": 0 },
114
+ "key_count": { "type": "integer", "minimum": 0 },
115
+ "code_key_count": { "type": "integer", "minimum": 0 },
116
+ "example_key_count": { "type": "integer", "minimum": 0 },
117
+ "documented_key_count": { "type": "integer", "minimum": 0 },
118
+ "ci_key_count": { "type": "integer", "minimum": 0 }
119
+ }
120
+ },
121
+ "surface": {
122
+ "enum": ["code", "config", "ci", "docs", "example"]
123
+ },
124
+ "referenceKind": {
125
+ "enum": [
126
+ "process_env_dot",
127
+ "process_env_bracket",
128
+ "process_env_destructure",
129
+ "bun_env_dot",
130
+ "import_meta_env",
131
+ "env_example",
132
+ "ci_secret",
133
+ "ci_var",
134
+ "ci_env",
135
+ "documented"
136
+ ]
137
+ },
138
+ "reference": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": ["key", "path", "line", "surface", "kind"],
142
+ "properties": {
143
+ "key": { "type": "string" },
144
+ "path": { "type": "string" },
145
+ "line": { "type": "integer", "minimum": 1 },
146
+ "surface": { "$ref": "#/$defs/surface" },
147
+ "kind": { "$ref": "#/$defs/referenceKind" }
148
+ }
149
+ },
150
+ "envKey": {
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "required": [
154
+ "key",
155
+ "used_in_code",
156
+ "declared_in_example",
157
+ "referenced_in_ci",
158
+ "documented",
159
+ "secret_like",
160
+ "public_like",
161
+ "source_count",
162
+ "sources"
163
+ ],
164
+ "properties": {
165
+ "key": { "type": "string" },
166
+ "used_in_code": { "type": "boolean" },
167
+ "declared_in_example": { "type": "boolean" },
168
+ "referenced_in_ci": { "type": "boolean" },
169
+ "documented": { "type": "boolean" },
170
+ "secret_like": { "type": "boolean" },
171
+ "public_like": { "type": "boolean" },
172
+ "source_count": { "type": "integer", "minimum": 0 },
173
+ "sources": {
174
+ "type": "array",
175
+ "items": { "$ref": "#/$defs/reference" }
176
+ }
177
+ }
178
+ },
179
+ "finding": {
180
+ "type": "object",
181
+ "additionalProperties": false,
182
+ "required": ["code", "severity", "message", "path"],
183
+ "properties": {
184
+ "code": {
185
+ "enum": [
186
+ "env_contract_path_outside_root",
187
+ "env_contract_unreadable_path",
188
+ "env_contract_secret_file_skipped",
189
+ "env_contract_max_files_exceeded",
190
+ "env_contract_max_keys_exceeded",
191
+ "env_contract_missing_example",
192
+ "env_contract_unused_example",
193
+ "env_contract_secret_like_public_name"
194
+ ]
195
+ },
196
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
197
+ "message": { "type": "string" },
198
+ "path": { "type": "string" },
199
+ "key": { "type": "string" }
200
+ }
201
+ }
202
+ }
203
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/import-cycle-report.schema.json",
4
+ "title": "mustflow import-cycle report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "policy",
18
+ "input_hash",
19
+ "targets",
20
+ "graph",
21
+ "cycles",
22
+ "truncated",
23
+ "findings",
24
+ "issues"
25
+ ],
26
+ "properties": {
27
+ "schema_version": { "const": "1" },
28
+ "command": { "const": "script-pack" },
29
+ "pack_id": { "const": "code" },
30
+ "script_id": { "const": "import-cycle" },
31
+ "script_ref": { "const": "code/import-cycle" },
32
+ "action": { "const": "check" },
33
+ "status": { "enum": ["passed", "failed", "error"] },
34
+ "ok": { "type": "boolean" },
35
+ "mustflow_root": { "type": "string" },
36
+ "policy": { "$ref": "#/$defs/policy" },
37
+ "input_hash": { "$ref": "#/$defs/sha256" },
38
+ "targets": { "type": "array", "items": { "$ref": "#/$defs/target" } },
39
+ "graph": { "$ref": "#/$defs/graph" },
40
+ "cycles": { "type": "array", "items": { "$ref": "#/$defs/cycle" } },
41
+ "truncated": { "type": "boolean" },
42
+ "findings": { "type": "array", "items": { "$ref": "#/$defs/finding" } },
43
+ "issues": { "type": "array", "items": { "type": "string" } }
44
+ },
45
+ "$defs": {
46
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
47
+ "stringArray": { "type": "array", "items": { "type": "string" } },
48
+ "language": {
49
+ "enum": [
50
+ "typescript",
51
+ "tsx",
52
+ "javascript",
53
+ "jsx",
54
+ "javascript-module",
55
+ "javascript-commonjs",
56
+ "json",
57
+ "other"
58
+ ]
59
+ },
60
+ "targetKind": { "enum": ["file", "directory", "missing", "other", "unknown"] },
61
+ "edgeKind": { "enum": ["static_import", "static_export", "dynamic_import", "require"] },
62
+ "policy": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "max_file_bytes",
67
+ "max_files",
68
+ "max_depth",
69
+ "max_nodes",
70
+ "max_edges",
71
+ "extensions",
72
+ "ignored_directories",
73
+ "max_cycles"
74
+ ],
75
+ "properties": {
76
+ "max_file_bytes": { "type": "integer", "minimum": 1 },
77
+ "max_files": { "type": "integer", "minimum": 1 },
78
+ "max_depth": { "type": "integer", "minimum": 1 },
79
+ "max_nodes": { "type": "integer", "minimum": 1 },
80
+ "max_edges": { "type": "integer", "minimum": 1 },
81
+ "extensions": { "$ref": "#/$defs/stringArray" },
82
+ "ignored_directories": { "$ref": "#/$defs/stringArray" },
83
+ "max_cycles": { "type": "integer", "minimum": 1 }
84
+ }
85
+ },
86
+ "target": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": ["input", "path", "exists", "kind", "language"],
90
+ "properties": {
91
+ "input": { "type": "string" },
92
+ "path": { "type": "string" },
93
+ "exists": { "type": ["boolean", "null"] },
94
+ "kind": { "$ref": "#/$defs/targetKind" },
95
+ "language": { "$ref": "#/$defs/language" }
96
+ }
97
+ },
98
+ "graph": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["script_ref", "status", "node_count", "edge_count", "cycle_hint_count", "truncated"],
102
+ "properties": {
103
+ "script_ref": { "const": "code/dependency-graph" },
104
+ "status": { "enum": ["passed", "failed", "error"] },
105
+ "node_count": { "type": "integer", "minimum": 0 },
106
+ "edge_count": { "type": "integer", "minimum": 0 },
107
+ "cycle_hint_count": { "type": "integer", "minimum": 0 },
108
+ "truncated": { "type": "boolean" }
109
+ }
110
+ },
111
+ "edge": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["source_path", "target_path", "specifier", "line", "kind"],
115
+ "properties": {
116
+ "source_path": { "type": "string" },
117
+ "target_path": { "type": "string" },
118
+ "specifier": { "type": "string" },
119
+ "line": { "type": "integer", "minimum": 1 },
120
+ "kind": { "$ref": "#/$defs/edgeKind" }
121
+ }
122
+ },
123
+ "cycle": {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": ["cycle_id", "path_count", "paths", "edges"],
127
+ "properties": {
128
+ "cycle_id": { "type": "string", "pattern": "^cycle:[a-f0-9]{12}$" },
129
+ "path_count": { "type": "integer", "minimum": 0 },
130
+ "paths": { "$ref": "#/$defs/stringArray" },
131
+ "edges": { "type": "array", "items": { "$ref": "#/$defs/edge" } }
132
+ }
133
+ },
134
+ "finding": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["code", "severity", "message", "path"],
138
+ "properties": {
139
+ "code": {
140
+ "enum": [
141
+ "dependency_graph_path_outside_root",
142
+ "dependency_graph_unreadable_path",
143
+ "dependency_graph_max_files_exceeded",
144
+ "dependency_graph_max_nodes_exceeded",
145
+ "dependency_graph_max_edges_exceeded",
146
+ "import_cycle_detected",
147
+ "import_cycle_max_cycles_exceeded"
148
+ ]
149
+ },
150
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
151
+ "message": { "type": "string" },
152
+ "path": { "type": "string" },
153
+ "cycle_id": { "type": "string", "pattern": "^cycle:[a-f0-9]{12}$" }
154
+ }
155
+ }
156
+ }
157
+ }