@csark0812/skeleton 1.6.2 → 2.0.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 (51) hide show
  1. package/README.md +19 -12
  2. package/dist/audit/config/load.d.ts +18 -0
  3. package/dist/audit/config/types.d.ts +75 -0
  4. package/dist/audit/core/code-fit.d.ts +35 -0
  5. package/dist/audit/core/collect.d.ts +21 -0
  6. package/dist/audit/core/context.d.ts +46 -0
  7. package/dist/audit/core/draft.d.ts +11 -0
  8. package/dist/audit/core/fix.d.ts +29 -0
  9. package/dist/audit/core/git-meta.d.ts +1 -0
  10. package/dist/audit/core/markdown.d.ts +16 -0
  11. package/dist/audit/core/report.d.ts +31 -0
  12. package/dist/audit/core/review-proof.d.ts +23 -0
  13. package/dist/audit/core/shared.d.ts +25 -0
  14. package/dist/audit/core/skill-provenance.d.ts +37 -0
  15. package/dist/audit/core/skill-roots.d.ts +54 -0
  16. package/dist/audit/core/ssot-collect.d.ts +16 -0
  17. package/dist/audit/core/ssot-fit.d.ts +38 -0
  18. package/dist/audit/core/ssot.d.ts +28 -0
  19. package/dist/audit/fix/anchors.d.ts +6 -0
  20. package/dist/audit/fix/doc-meta.d.ts +4 -0
  21. package/dist/audit/fix/match-anchor.d.ts +8 -0
  22. package/dist/audit/fix/ssot.d.ts +3 -0
  23. package/dist/audit/policies/load.d.ts +13 -0
  24. package/dist/audit/policies/types.d.ts +46 -0
  25. package/dist/audit/rules/banned.d.ts +7 -0
  26. package/dist/audit/rules/code-fit.d.ts +13 -0
  27. package/dist/audit/rules/doc-meta.d.ts +8 -0
  28. package/dist/audit/rules/index.d.ts +26 -0
  29. package/dist/audit/rules/links.d.ts +7 -0
  30. package/dist/audit/rules/near-duplicate.d.ts +8 -0
  31. package/dist/audit/rules/prose-policy.d.ts +7 -0
  32. package/dist/audit/rules/review-proof.d.ts +1 -0
  33. package/dist/audit/rules/scan-gaps.d.ts +7 -0
  34. package/dist/audit/rules/scan-roots.d.ts +7 -0
  35. package/dist/audit/rules/skill-index.d.ts +10 -0
  36. package/dist/audit/rules/ssot-summary.d.ts +8 -0
  37. package/dist/audit/rules/ssot.d.ts +7 -0
  38. package/dist/cli.js +4439 -3631
  39. package/dist/hooks/customize-on-skill-read.js +27 -1
  40. package/dist/plugin-types.d.ts +12 -131
  41. package/dist/plugin-types.js +6 -3
  42. package/dist/references/check.d.ts +10 -0
  43. package/dist/references/constants.d.ts +9 -0
  44. package/dist/references/discover.d.ts +19 -0
  45. package/dist/result-types.d.ts +72 -0
  46. package/dist/result-types.js +0 -0
  47. package/package.json +26 -17
  48. package/schemas/config.schema.json +29 -1
  49. package/schemas/policy-file.schema.json +5 -2
  50. package/schemas/result.schema.json +207 -0
  51. package/templates/skeleton-init/skeleton.toml +6 -0
@@ -0,0 +1,207 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/csark0812/skeleton/schemas/result.schema.json",
4
+ "title": "Skeleton command result",
5
+ "oneOf": [{ "$ref": "#/$defs/auditResult" }, { "$ref": "#/$defs/validateChangedResult" }],
6
+ "$defs": {
7
+ "issue": {
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": ["rule", "file", "message", "severity"],
11
+ "properties": {
12
+ "rule": { "type": "string", "minLength": 1 },
13
+ "code": { "type": "string", "minLength": 1 },
14
+ "file": { "type": "string", "minLength": 1 },
15
+ "link": { "type": "string" },
16
+ "message": { "type": "string", "minLength": 1 },
17
+ "remediation": { "type": "string", "minLength": 1 },
18
+ "severity": { "enum": ["error", "warning"] }
19
+ }
20
+ },
21
+ "auditResult": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "schemaVersion",
26
+ "command",
27
+ "ok",
28
+ "exitCode",
29
+ "suite",
30
+ "strict",
31
+ "label",
32
+ "scope",
33
+ "rules",
34
+ "counts",
35
+ "diagnostics",
36
+ "catalog",
37
+ "reviewProof"
38
+ ],
39
+ "properties": {
40
+ "schemaVersion": { "const": 1 },
41
+ "command": { "const": "audit" },
42
+ "ok": { "type": "boolean" },
43
+ "exitCode": { "enum": [0, 1] },
44
+ "suite": { "enum": ["docs", "skills", "self"] },
45
+ "strict": { "type": "boolean" },
46
+ "label": { "type": "string" },
47
+ "scope": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["paths"],
51
+ "properties": {
52
+ "paths": { "type": "array", "items": { "type": "string" } },
53
+ "fileCount": { "type": "integer", "minimum": 0 }
54
+ }
55
+ },
56
+ "rules": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["requested", "executed"],
60
+ "properties": {
61
+ "requested": {
62
+ "oneOf": [{ "type": "null" }, { "type": "array", "items": { "type": "string" } }]
63
+ },
64
+ "executed": { "type": "array", "items": { "type": "string" } }
65
+ }
66
+ },
67
+ "counts": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["errors", "warnings"],
71
+ "properties": {
72
+ "errors": { "type": "integer", "minimum": 0 },
73
+ "warnings": { "type": "integer", "minimum": 0 }
74
+ }
75
+ },
76
+ "diagnostics": {
77
+ "type": "array",
78
+ "items": { "$ref": "#/$defs/issue" }
79
+ },
80
+ "catalog": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["status"],
84
+ "properties": {
85
+ "status": {
86
+ "enum": ["current", "missing", "stale", "skipped-ci", "not-applicable"]
87
+ }
88
+ }
89
+ },
90
+ "reviewProof": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["mode", "status"],
94
+ "properties": {
95
+ "mode": { "enum": ["date", "hash"] },
96
+ "status": {
97
+ "enum": ["not-enabled", "not-checked", "valid", "invalid"]
98
+ },
99
+ "lockfile": { "type": "string" }
100
+ }
101
+ },
102
+ "successSuffix": { "type": "string" }
103
+ }
104
+ },
105
+ "classification": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "docs",
110
+ "code",
111
+ "skills",
112
+ "shell",
113
+ "json",
114
+ "policy",
115
+ "skipped",
116
+ "foreignSkills",
117
+ "missing",
118
+ "orphanPolicies"
119
+ ],
120
+ "properties": {
121
+ "docs": { "type": "array", "items": { "type": "string" } },
122
+ "code": { "type": "array", "items": { "type": "string" } },
123
+ "skills": { "type": "array", "items": { "type": "string" } },
124
+ "shell": { "type": "array", "items": { "type": "string" } },
125
+ "json": { "type": "array", "items": { "type": "string" } },
126
+ "policy": { "type": "array", "items": { "type": "string" } },
127
+ "skipped": { "type": "array", "items": { "type": "string" } },
128
+ "foreignSkills": { "type": "array", "items": { "type": "string" } },
129
+ "missing": { "type": "array", "items": { "type": "string" } },
130
+ "orphanPolicies": { "type": "array", "items": { "type": "string" } }
131
+ }
132
+ },
133
+ "impactReason": {
134
+ "oneOf": [
135
+ {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": ["kind"],
139
+ "properties": { "kind": { "const": "changed-document" } }
140
+ },
141
+ {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": ["kind", "target"],
145
+ "properties": {
146
+ "kind": { "const": "changed-code-target" },
147
+ "target": { "type": "string" }
148
+ }
149
+ }
150
+ ]
151
+ },
152
+ "impactedDocument": {
153
+ "type": "object",
154
+ "additionalProperties": false,
155
+ "required": ["path", "codeTargets", "reasons"],
156
+ "properties": {
157
+ "path": { "type": "string" },
158
+ "codeTargets": { "type": "array", "items": { "type": "string" } },
159
+ "reasons": { "type": "array", "items": { "$ref": "#/$defs/impactReason" } }
160
+ }
161
+ },
162
+ "validateChangedResult": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "schemaVersion",
167
+ "command",
168
+ "ok",
169
+ "exitCode",
170
+ "input",
171
+ "classification",
172
+ "impactedDocuments",
173
+ "audits",
174
+ "diagnostics"
175
+ ],
176
+ "properties": {
177
+ "schemaVersion": { "const": 1 },
178
+ "command": { "const": "validate-changed" },
179
+ "ok": { "type": "boolean" },
180
+ "exitCode": { "enum": [0, 1] },
181
+ "input": {
182
+ "type": "object",
183
+ "additionalProperties": false,
184
+ "required": ["paths", "staged"],
185
+ "properties": {
186
+ "paths": { "type": "array", "items": { "type": "string" } },
187
+ "staged": { "type": "boolean" },
188
+ "base": { "type": "string", "minLength": 1 }
189
+ }
190
+ },
191
+ "classification": { "$ref": "#/$defs/classification" },
192
+ "impactedDocuments": {
193
+ "type": "array",
194
+ "items": { "$ref": "#/$defs/impactedDocument" }
195
+ },
196
+ "audits": {
197
+ "type": "array",
198
+ "items": { "$ref": "#/$defs/auditResult" }
199
+ },
200
+ "diagnostics": {
201
+ "type": "array",
202
+ "items": { "$ref": "#/$defs/issue" }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
@@ -15,6 +15,12 @@ exclude = [
15
15
  [deny]
16
16
  paths = []
17
17
 
18
+ # Optional but recommended: make review claims verifiable against exact document
19
+ # and code-fit target bytes. Commit the generated lockfile.
20
+ # [reviewProof]
21
+ # mode = "hash"
22
+ # lockfile = ".skeleton/review-lock.json"
23
+
18
24
  # Optional: basenames under .skeleton/customize/ appended on every skill inject
19
25
  # [customize]
20
26
  # alwaysInclude = ["shared-agent-references.md"]