@csark0812/skeleton 1.6.3 → 3.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.
- package/README.md +16 -12
- package/dist/audit/config/load.d.ts +18 -0
- package/dist/audit/config/types.d.ts +68 -0
- package/dist/audit/core/collect.d.ts +21 -0
- package/dist/audit/core/context.d.ts +46 -0
- package/dist/audit/core/draft.d.ts +11 -0
- package/dist/audit/core/fix.d.ts +29 -0
- package/dist/audit/core/git-meta.d.ts +1 -0
- package/dist/audit/core/markdown.d.ts +16 -0
- package/dist/audit/core/report.d.ts +31 -0
- package/dist/audit/core/review-deps.d.ts +16 -0
- package/dist/audit/core/review-proof.d.ts +23 -0
- package/dist/audit/core/shared.d.ts +25 -0
- package/dist/audit/core/skill-provenance.d.ts +37 -0
- package/dist/audit/core/skill-roots.d.ts +54 -0
- package/dist/audit/core/ssot-collect.d.ts +16 -0
- package/dist/audit/core/ssot-fit.d.ts +38 -0
- package/dist/audit/core/ssot.d.ts +28 -0
- package/dist/audit/fix/anchors.d.ts +6 -0
- package/dist/audit/fix/doc-meta.d.ts +4 -0
- package/dist/audit/fix/match-anchor.d.ts +8 -0
- package/dist/audit/fix/ssot.d.ts +3 -0
- package/dist/audit/policies/load.d.ts +13 -0
- package/dist/audit/policies/types.d.ts +46 -0
- package/dist/audit/rules/banned.d.ts +7 -0
- package/dist/audit/rules/doc-meta.d.ts +8 -0
- package/dist/audit/rules/index.d.ts +26 -0
- package/dist/audit/rules/links.d.ts +7 -0
- package/dist/audit/rules/near-duplicate.d.ts +8 -0
- package/dist/audit/rules/prose-policy.d.ts +7 -0
- package/dist/audit/rules/review-deps.d.ts +9 -0
- package/dist/audit/rules/review-proof.d.ts +1 -0
- package/dist/audit/rules/scan-gaps.d.ts +7 -0
- package/dist/audit/rules/scan-roots.d.ts +7 -0
- package/dist/audit/rules/skill-index.d.ts +10 -0
- package/dist/audit/rules/ssot-summary.d.ts +8 -0
- package/dist/audit/rules/ssot.d.ts +7 -0
- package/dist/cli.js +13029 -12560
- package/dist/hooks/customize-on-skill-read.js +27 -1
- package/dist/plugin-types.d.ts +12 -133
- package/dist/plugin-types.js +6 -3
- package/dist/references/check.d.ts +10 -0
- package/dist/references/constants.d.ts +9 -0
- package/dist/references/discover.d.ts +19 -0
- package/dist/result-types.d.ts +34 -0
- package/dist/result-types.js +0 -0
- package/package.json +26 -17
- package/schemas/config.schema.json +18 -12
- package/schemas/policy-file.schema.json +5 -2
- package/schemas/result.schema.json +101 -0
- package/templates/skeleton-init/skeleton.toml +6 -0
|
@@ -3520,7 +3520,12 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
3520
3520
|
}
|
|
3521
3521
|
function resolve(baseURI, relativeURI, options) {
|
|
3522
3522
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3523
|
-
const
|
|
3523
|
+
const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
|
|
3524
|
+
const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
|
|
3525
|
+
if (baseMalformed || relativeMalformed) {
|
|
3526
|
+
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
3527
|
+
}
|
|
3528
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
3524
3529
|
schemelessOptions.skipEscape = true;
|
|
3525
3530
|
return serialize(resolved, schemelessOptions);
|
|
3526
3531
|
}
|
|
@@ -3646,6 +3651,8 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
3646
3651
|
return uriTokens.join("");
|
|
3647
3652
|
}
|
|
3648
3653
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3654
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
3655
|
+
var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
3649
3656
|
function getParseError(parsed, matches) {
|
|
3650
3657
|
if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
|
|
3651
3658
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -3675,6 +3682,25 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
3675
3682
|
uri = "//" + uri;
|
|
3676
3683
|
}
|
|
3677
3684
|
}
|
|
3685
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
3686
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
3687
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
3688
|
+
malformedAuthorityOrPort = true;
|
|
3689
|
+
}
|
|
3690
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
|
|
3691
|
+
if (introducerMatch !== null) {
|
|
3692
|
+
const region = introducerMatch[1];
|
|
3693
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, "");
|
|
3694
|
+
if (normalizedRegion.length >= 2) {
|
|
3695
|
+
if (normalizedRegion.slice(0, 2) !== "//") {
|
|
3696
|
+
parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
|
|
3697
|
+
malformedAuthorityOrPort = true;
|
|
3698
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
3699
|
+
parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
|
|
3700
|
+
malformedAuthorityOrPort = true;
|
|
3701
|
+
}
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3678
3704
|
const matches = uri.match(URI_PARSE);
|
|
3679
3705
|
if (matches) {
|
|
3680
3706
|
parsed.scheme = matches[1];
|
package/dist/plugin-types.d.ts
CHANGED
|
@@ -1,135 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public types for
|
|
3
|
-
*
|
|
2
|
+
* Public types and helpers for skeleton plugin authors.
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import type { AuditRule, AuditContext } from "@csark0812/skeleton/plugin-types";
|
|
6
|
+
* import { issue, matchesGlobScope } from "@csark0812/skeleton/plugin-types";
|
|
7
|
+
* ```
|
|
4
8
|
*/
|
|
5
|
-
|
|
6
|
-
export type Severity
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
link?: string;
|
|
12
|
-
message: string;
|
|
13
|
-
severity: Severity;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export declare function issue(
|
|
17
|
-
rule: string,
|
|
18
|
-
file: string,
|
|
19
|
-
message: string,
|
|
20
|
-
opts?: { link?: string; severity?: Severity },
|
|
21
|
-
): Issue;
|
|
22
|
-
|
|
23
|
-
export type AuditSuite = "docs" | "skills";
|
|
24
|
-
|
|
25
|
-
export interface AuditRule {
|
|
26
|
-
id: string;
|
|
27
|
-
global?: boolean;
|
|
28
|
-
/** When true, still run under `--paths` (see code-fit). */
|
|
29
|
-
alwaysRun?: boolean;
|
|
30
|
-
suites?: AuditSuite[];
|
|
31
|
-
run: (ctx: AuditContext) => Issue[];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type PolicyEntry =
|
|
35
|
-
| {
|
|
36
|
-
id: string;
|
|
37
|
-
message: string;
|
|
38
|
-
mode?: "pattern";
|
|
39
|
-
pattern: string;
|
|
40
|
-
scope?: string;
|
|
41
|
-
severity?: Severity;
|
|
42
|
-
canonical?: string;
|
|
43
|
-
}
|
|
44
|
-
| {
|
|
45
|
-
id: string;
|
|
46
|
-
message: string;
|
|
47
|
-
mode: "fingerprint";
|
|
48
|
-
pattern?: string;
|
|
49
|
-
scope?: string;
|
|
50
|
-
severity?: Severity;
|
|
51
|
-
canonical?: string;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export interface CompiledPolicyEntry {
|
|
55
|
-
id: string;
|
|
56
|
-
message: string;
|
|
57
|
-
mode: "pattern" | "fingerprint";
|
|
58
|
-
pattern?: string;
|
|
59
|
-
scope?: string;
|
|
60
|
-
severity?: Severity;
|
|
61
|
-
canonical?: string;
|
|
62
|
-
regex: RegExp | null;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface PolicyFile {
|
|
66
|
-
name: string;
|
|
67
|
-
entries: CompiledPolicyEntry[];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface PolicyFileYaml {
|
|
71
|
-
name: string;
|
|
72
|
-
entries: PolicyEntry[];
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export type MatchedPolicyEntry = CompiledPolicyEntry & { policyName: string };
|
|
76
|
-
|
|
77
|
-
export interface ScanConfig {
|
|
78
|
-
include: string[];
|
|
79
|
-
exclude: string[];
|
|
80
|
-
nonPublicSkills?: string[];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export interface DenyConfig {
|
|
84
|
-
paths?: string[];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface CustomizeConfig {
|
|
88
|
-
alwaysInclude?: string[];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface DocsLintConfig {
|
|
92
|
-
nearDuplicateThreshold?: number;
|
|
93
|
-
ssotOverlapMin?: number;
|
|
94
|
-
ssotBetterMatchMargin?: number;
|
|
95
|
-
ssotPhraseCheck?: boolean;
|
|
96
|
-
ignorePairs?: [string, string][];
|
|
97
|
-
ignoreGlobs?: string[];
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface SkeletonConfig {
|
|
101
|
-
scan: ScanConfig;
|
|
102
|
-
daysUntilStale: number;
|
|
103
|
-
deny?: DenyConfig;
|
|
104
|
-
customize?: CustomizeConfig;
|
|
105
|
-
docsLint?: DocsLintConfig;
|
|
106
|
-
plugins?: string[];
|
|
107
|
-
draftPathPrefixes?: string[];
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface SkillRoot {
|
|
111
|
-
kind: "nested" | "flat";
|
|
112
|
-
relPath: string;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface SkillIndex {
|
|
116
|
-
roots: SkillRoot[];
|
|
117
|
-
slugs: string[];
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export interface AuditContext {
|
|
121
|
-
root: string;
|
|
122
|
-
config: SkeletonConfig;
|
|
123
|
-
files: string[];
|
|
124
|
-
docMetaPaths: string[];
|
|
125
|
-
ssotEntries: Array<{ path: string; summary: string; form: string }>;
|
|
126
|
-
ssotErrors: Array<{ path: string; kind: string; detail: string }>;
|
|
127
|
-
/** @deprecated Prefer ssotEntries */
|
|
128
|
-
registryPaths: string[];
|
|
129
|
-
/** @deprecated Always false */
|
|
130
|
-
registryHasTableHeader: boolean;
|
|
131
|
-
skillIndex: SkillIndex;
|
|
132
|
-
policies: PolicyFile[];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export declare function matchesGlobScope(relPath: string, scope: string | undefined): boolean;
|
|
9
|
+
export type { AuditContext } from "./audit/core/context.ts";
|
|
10
|
+
export type { Issue, Severity } from "./audit/core/report.ts";
|
|
11
|
+
export { issue } from "./audit/core/report.ts";
|
|
12
|
+
export { matchesGlobScope } from "./audit/core/shared.ts";
|
|
13
|
+
export type { CompiledPolicyEntry, MatchedPolicyEntry, PolicyEntry, PolicyFile, PolicyFileYaml, } from "./audit/policies/types.ts";
|
|
14
|
+
export type { AuditRule, AuditSuite } from "./audit/rules/index.ts";
|
package/dist/plugin-types.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
// src/audit/core/report.ts
|
|
2
|
-
function issue(rule, file, details) {
|
|
2
|
+
function issue(rule, file, details, options) {
|
|
3
3
|
const message = typeof details === "string" ? details : details.message;
|
|
4
|
+
const selected = typeof details === "string" ? options : details;
|
|
4
5
|
return {
|
|
5
6
|
rule,
|
|
7
|
+
...selected?.code ? { code: selected.code } : {},
|
|
6
8
|
file,
|
|
7
|
-
link:
|
|
9
|
+
link: selected?.link,
|
|
8
10
|
message,
|
|
9
|
-
|
|
11
|
+
...selected?.remediation ? { remediation: selected.remediation } : {},
|
|
12
|
+
severity: selected?.severity ?? "error"
|
|
10
13
|
};
|
|
11
14
|
}
|
|
12
15
|
// src/audit/core/shared.ts
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SkillOwnershipConfig } from "../audit/config/types.ts";
|
|
2
|
+
import type { AuditContext } from "../audit/core/context.ts";
|
|
3
|
+
import { type Issue } from "../audit/core/report.ts";
|
|
4
|
+
export declare function runGeneratedReferencesCheck(root: string, ownership?: SkillOwnershipConfig): Issue[];
|
|
5
|
+
export declare function runGeneratedReferencesRule(ctx: AuditContext): Issue[];
|
|
6
|
+
export declare const generatedReferencesRule: {
|
|
7
|
+
id: string;
|
|
8
|
+
global: boolean;
|
|
9
|
+
run: typeof runGeneratedReferencesRule;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CANONICAL_REFS_DIR = ".skeleton/references";
|
|
2
|
+
export declare const GENERATED_MARKER_START = "<!-- skeleton: generated-reference";
|
|
3
|
+
export declare const GENERATED_MARKER_RE: RegExp;
|
|
4
|
+
/** Markdown links targeting the old shared root references/ tree. */
|
|
5
|
+
export declare const SHARED_REF_LINK_RE: RegExp;
|
|
6
|
+
export declare function formatGeneratedHeader(sourceRelPath: string): string;
|
|
7
|
+
export declare function stripGeneratedHeader(content: string): string;
|
|
8
|
+
export declare function parseGeneratedSource(content: string): string | null;
|
|
9
|
+
export declare function isGeneratedReference(content: string): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SkillOwnershipConfig } from "../audit/config/types.ts";
|
|
2
|
+
export interface SharedRefLink {
|
|
3
|
+
refPath: string;
|
|
4
|
+
sourceFile: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SkillReferencePlan {
|
|
7
|
+
skill: string;
|
|
8
|
+
/** Repo-relative directory containing this concrete skill instance. */
|
|
9
|
+
skillDir: string;
|
|
10
|
+
refPaths: Set<string>;
|
|
11
|
+
links: SharedRefLink[];
|
|
12
|
+
}
|
|
13
|
+
/** Links still pointing at the old shared root references/ tree. */
|
|
14
|
+
export declare function findSharedRefLinks(content: string, sourceFile: string): SharedRefLink[];
|
|
15
|
+
export declare function discoverSkillReferencePlans(root: string, ownership?: SkillOwnershipConfig): SkillReferencePlan[];
|
|
16
|
+
export declare function canonicalRefPath(_root: string, refPath: string): string;
|
|
17
|
+
export declare function generatedRefPath(skillDir: string, refPath: string): string;
|
|
18
|
+
export declare function rewriteSharedRefTarget(sourceFile: string, skillDir: string, refPath: string): string;
|
|
19
|
+
export declare function rewriteSharedRefLinks(content: string, sourceFile: string, skillDir: string): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Issue } from "./audit/core/report.ts";
|
|
2
|
+
export type CatalogStatus = "current" | "missing" | "stale" | "skipped-ci" | "not-applicable";
|
|
3
|
+
export interface ReviewProofResult {
|
|
4
|
+
mode: "date" | "hash";
|
|
5
|
+
status: "not-enabled" | "not-checked" | "valid" | "invalid";
|
|
6
|
+
lockfile?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AuditResult {
|
|
9
|
+
schemaVersion: 1;
|
|
10
|
+
command: "audit";
|
|
11
|
+
ok: boolean;
|
|
12
|
+
exitCode: 0 | 1;
|
|
13
|
+
suite: string;
|
|
14
|
+
strict: boolean;
|
|
15
|
+
label: string;
|
|
16
|
+
scope: {
|
|
17
|
+
paths: string[];
|
|
18
|
+
fileCount?: number;
|
|
19
|
+
};
|
|
20
|
+
rules: {
|
|
21
|
+
requested: string[] | null;
|
|
22
|
+
executed: string[];
|
|
23
|
+
};
|
|
24
|
+
counts: {
|
|
25
|
+
errors: number;
|
|
26
|
+
warnings: number;
|
|
27
|
+
};
|
|
28
|
+
diagnostics: Issue[];
|
|
29
|
+
catalog: {
|
|
30
|
+
status: CatalogStatus;
|
|
31
|
+
};
|
|
32
|
+
reviewProof: ReviewProofResult;
|
|
33
|
+
successSuffix?: string;
|
|
34
|
+
}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csark0812/skeleton",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "SSOT audit CLI for agent harness repos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,8 +11,13 @@
|
|
|
11
11
|
"types": "./dist/plugin-types.d.ts",
|
|
12
12
|
"default": "./dist/plugin-types.js"
|
|
13
13
|
},
|
|
14
|
+
"./result-types": {
|
|
15
|
+
"types": "./dist/result-types.d.ts",
|
|
16
|
+
"default": "./dist/result-types.js"
|
|
17
|
+
},
|
|
14
18
|
"./schemas/config.schema.json": "./schemas/config.schema.json",
|
|
15
|
-
"./schemas/policy-file.schema.json": "./schemas/policy-file.schema.json"
|
|
19
|
+
"./schemas/policy-file.schema.json": "./schemas/policy-file.schema.json",
|
|
20
|
+
"./schemas/result.schema.json": "./schemas/result.schema.json"
|
|
16
21
|
},
|
|
17
22
|
"files": [
|
|
18
23
|
"dist",
|
|
@@ -29,7 +34,7 @@
|
|
|
29
34
|
},
|
|
30
35
|
"packageManager": "bun@1.2.21",
|
|
31
36
|
"scripts": {
|
|
32
|
-
"build": "bun build src/cli.ts --target=node --outfile=dist/cli.js && bun build src/hooks/customize-on-skill-read.ts --target=node --outfile=dist/hooks/customize-on-skill-read.js && bun build src/plugin-types.ts --target=node --format=esm --outfile=dist/plugin-types.js --packages=external &&
|
|
37
|
+
"build": "bun build src/cli.ts --target=node --outfile=dist/cli.js && bun build src/hooks/customize-on-skill-read.ts --target=node --outfile=dist/hooks/customize-on-skill-read.js && bun build src/plugin-types.ts --target=node --format=esm --outfile=dist/plugin-types.js --packages=external && bun build src/result-types.ts --target=node --format=esm --outfile=dist/result-types.js --packages=external && tsc -p tsconfig.types.json",
|
|
33
38
|
"test": "bun test",
|
|
34
39
|
"test:audit": "bun test src/audit/__tests__",
|
|
35
40
|
"test:cli": "bun test src/__tests__/cli",
|
|
@@ -45,6 +50,7 @@
|
|
|
45
50
|
"audit:skills": "bun src/cli.ts audit skills",
|
|
46
51
|
"audit:self": "bun src/cli.ts audit self",
|
|
47
52
|
"check": "bun run lint && bun test && bun run typecheck && bun run build && bun run audit:self",
|
|
53
|
+
"verify:package": "bun run build && bun scripts/verify-package.ts",
|
|
48
54
|
"start": "bun src/cli.ts --help",
|
|
49
55
|
"dev": "bun src/cli.ts --help",
|
|
50
56
|
"agent:test:live": "agent-test --suites-dir agent-suites --live --fail-on=behavior",
|
|
@@ -56,24 +62,27 @@
|
|
|
56
62
|
"agent:evidence:charts": "bun scripts/agent-evidence/render-charts.ts",
|
|
57
63
|
"agent:evidence:excerpt": "bun scripts/agent-evidence/excerpt-transcript.ts",
|
|
58
64
|
"agent:evidence:archive": "bash scripts/agent-evidence/archive-run.sh",
|
|
59
|
-
"prepack": "bun
|
|
65
|
+
"prepack": "bun run check && bun scripts/verify-package.ts"
|
|
60
66
|
},
|
|
61
67
|
"dependencies": {
|
|
62
|
-
"ajv": "
|
|
63
|
-
"github-slugger": "
|
|
64
|
-
"remark": "
|
|
65
|
-
"remark-gfm": "
|
|
66
|
-
"smol-toml": "
|
|
67
|
-
"tinyglobby": "
|
|
68
|
-
"unist-util-visit": "
|
|
69
|
-
"yaml": "
|
|
68
|
+
"ajv": "8.20.0",
|
|
69
|
+
"github-slugger": "2.0.0",
|
|
70
|
+
"remark": "15.0.1",
|
|
71
|
+
"remark-gfm": "4.0.1",
|
|
72
|
+
"smol-toml": "1.8.0",
|
|
73
|
+
"tinyglobby": "0.2.14",
|
|
74
|
+
"unist-util-visit": "5.0.0",
|
|
75
|
+
"yaml": "2.9.0"
|
|
70
76
|
},
|
|
71
77
|
"devDependencies": {
|
|
72
|
-
"@biomejs/biome": "
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@types/
|
|
76
|
-
"@types/github-slugger": "^2.0.0",
|
|
78
|
+
"@biomejs/biome": "2.5.3",
|
|
79
|
+
"@post-print/agent-test": "0.2.7",
|
|
80
|
+
"@types/bun": "1.3.8",
|
|
81
|
+
"@types/github-slugger": "2.0.0",
|
|
77
82
|
"typescript": "~7.0.2"
|
|
83
|
+
},
|
|
84
|
+
"overrides": {
|
|
85
|
+
"fast-uri": "3.1.5",
|
|
86
|
+
"undici": "6.28.0"
|
|
78
87
|
}
|
|
79
88
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"docsLint": {
|
|
48
48
|
"type": "object",
|
|
49
49
|
"additionalProperties": false,
|
|
50
|
-
"description": "Near-duplicate
|
|
50
|
+
"description": "Near-duplicate and SSOT-summary lint tunables",
|
|
51
51
|
"properties": {
|
|
52
52
|
"nearDuplicateThreshold": {
|
|
53
53
|
"type": "number",
|
|
@@ -85,17 +85,6 @@
|
|
|
85
85
|
"type": "array",
|
|
86
86
|
"items": { "type": "string", "minLength": 1 },
|
|
87
87
|
"description": "Globs excluded from near-dupe / duplicate-SSOT"
|
|
88
|
-
},
|
|
89
|
-
"codeFitOverlapMin": {
|
|
90
|
-
"type": "number",
|
|
91
|
-
"minimum": 0,
|
|
92
|
-
"maximum": 1,
|
|
93
|
-
"description": "Min fraction of doc tokens that must also appear as code identifiers (default 0.03)"
|
|
94
|
-
},
|
|
95
|
-
"codeFitSurfaceCap": {
|
|
96
|
-
"type": "integer",
|
|
97
|
-
"minimum": 1,
|
|
98
|
-
"description": "Max auto-extracted surface names before surface= is required (default 25)"
|
|
99
88
|
}
|
|
100
89
|
}
|
|
101
90
|
},
|
|
@@ -137,6 +126,23 @@
|
|
|
137
126
|
}
|
|
138
127
|
}
|
|
139
128
|
},
|
|
129
|
+
"reviewProof": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["mode"],
|
|
133
|
+
"description": "Bind an explicit documentation review to exact document and code-target bytes",
|
|
134
|
+
"properties": {
|
|
135
|
+
"mode": {
|
|
136
|
+
"const": "hash",
|
|
137
|
+
"description": "Store SHA-256 review evidence"
|
|
138
|
+
},
|
|
139
|
+
"lockfile": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 1,
|
|
142
|
+
"description": "Repo-relative review proof lockfile (default: .skeleton/review-lock.json)"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
140
146
|
"plugins": {
|
|
141
147
|
"type": "array",
|
|
142
148
|
"items": { "type": "string", "minLength": 1 },
|
|
@@ -28,13 +28,16 @@
|
|
|
28
28
|
"message": { "type": "string" },
|
|
29
29
|
"scope": { "type": "string" },
|
|
30
30
|
"severity": { "enum": ["error", "warning"] },
|
|
31
|
-
"canonical": { "type": "string" }
|
|
31
|
+
"canonical": { "type": "string" },
|
|
32
|
+
"caseSensitive": { "type": "boolean" },
|
|
33
|
+
"placement": { "enum": ["any", "draft-only"] },
|
|
34
|
+
"handledBy": { "type": "string", "minLength": 1 }
|
|
32
35
|
},
|
|
33
36
|
"if": {
|
|
34
37
|
"properties": { "mode": { "const": "fingerprint" } },
|
|
35
38
|
"required": ["mode"]
|
|
36
39
|
},
|
|
37
|
-
"then":
|
|
40
|
+
"then": { "required": ["handledBy"] },
|
|
38
41
|
"else": { "required": ["pattern"] }
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/csark0812/skeleton/schemas/result.schema.json",
|
|
4
|
+
"title": "Skeleton audit result",
|
|
5
|
+
"$ref": "#/$defs/auditResult",
|
|
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": { "type": "array", "items": { "$ref": "#/$defs/issue" } },
|
|
77
|
+
"catalog": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": ["status"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"status": {
|
|
83
|
+
"enum": ["current", "missing", "stale", "skipped-ci", "not-applicable"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"reviewProof": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": ["mode", "status"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"mode": { "enum": ["date", "hash"] },
|
|
93
|
+
"status": { "enum": ["not-enabled", "not-checked", "valid", "invalid"] },
|
|
94
|
+
"lockfile": { "type": "string" }
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"successSuffix": { "type": "string" }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -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 review-dependency 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"]
|