@csark0812/skeleton 2.0.0 → 3.0.1
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 +8 -9
- package/dist/audit/config/types.d.ts +1 -8
- package/dist/audit/core/review-deps.d.ts +16 -0
- package/dist/audit/rules/index.d.ts +1 -1
- package/dist/audit/rules/review-deps.d.ts +9 -0
- package/dist/cli.js +657 -753
- package/dist/result-types.d.ts +0 -38
- package/package.json +1 -1
- package/schemas/config.schema.json +1 -12
- package/schemas/result.schema.json +4 -110
- package/templates/skeleton-init/skeleton.toml +1 -1
- package/dist/audit/core/code-fit.d.ts +0 -35
- package/dist/audit/rules/code-fit.d.ts +0 -13
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- source-of-truth: Package overview -->
|
|
4
4
|
|
|
5
|
-
<!-- doc-meta: owner=eng | last-reviewed=2026-08-
|
|
5
|
+
<!-- doc-meta: owner=eng | last-reviewed=2026-08-31 -->
|
|
6
6
|
|
|
7
|
-
<!--
|
|
7
|
+
<!-- review-deps: paths=src/cli.ts,package.json -->
|
|
8
8
|
|
|
9
9
|
Agent repos get messy fast. Skills get copied around, docs disagree, links go stale, and nobody remembers which file is actually canonical.
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ That needs to be explicit — and stay true after the next 50 PRs. Skeleton turn
|
|
|
23
23
|
| Code repos | Agent repos |
|
|
24
24
|
| ------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
25
25
|
| ESLint catches broken imports, unused vars, style drift | Skeleton catches broken links, bad SSOT markers, stale doc-meta, deny.paths artifacts |
|
|
26
|
-
| `eslint --fix` on changed files | `skeleton validate changed` on changed docs, skills, and
|
|
26
|
+
| `eslint --fix` on changed files | `skeleton validate changed` on changed docs, skills, and matching document dependencies |
|
|
27
27
|
| Pre-commit + CI gate | `--staged` pre-commit + `--base` CI gate |
|
|
28
28
|
|
|
29
29
|
Skill linters ask: _"Is this SKILL.md well-formed?"_
|
|
@@ -99,8 +99,8 @@ Flag details: [install](docs/developer/install.md).
|
|
|
99
99
|
- **deny.paths** — globs for files that must not exist (often outside `scan.include`)
|
|
100
100
|
- **Coverage gaps** — markdown outside the scan perimeter (warn-only)
|
|
101
101
|
- **Doc meta + stale dates** — owner and `last-reviewed` on indexes and SSOT-bearing files
|
|
102
|
-
- **Review proof** — optional hashes bind a human review to exact document and `
|
|
103
|
-
- **
|
|
102
|
+
- **Review proof** — optional hashes bind a human review to exact document and `review-deps` bytes
|
|
103
|
+
- **Dependency routing** — changed repository files automatically pull matching documents into validation
|
|
104
104
|
- **Prose policy** (optional plugins) — YAML pattern rules; idle with no plugins
|
|
105
105
|
- **Shell / JSON syntax** — lightweight checks on changed `.sh` and `.json` files
|
|
106
106
|
|
|
@@ -160,8 +160,7 @@ skeleton customize resolve <slug>
|
|
|
160
160
|
| Foreign / lockfile-synced skill bodies | skip → lint in the owning skills/toolbox repo |
|
|
161
161
|
| `.sh`, `.bash`, `.zsh` | shellcheck or `bash -n` |
|
|
162
162
|
| Other `.json` | JSONC-tolerant syntax check |
|
|
163
|
-
|
|
|
164
|
-
| `package.json`, `project.json` | native code gates (exits 1 if no auditable paths) |
|
|
163
|
+
| Any repository file | native gates where applicable + audit documents whose `review-deps` path or glob matched |
|
|
165
164
|
|
|
166
165
|
Pre-commit: `skeleton validate changed --staged` (path-scoped, fast).
|
|
167
166
|
|
|
@@ -177,7 +176,7 @@ CI: `skeleton validate changed --base origin/main` (global rules first, then cha
|
|
|
177
176
|
|
|
178
177
|
Skeleton never calls Nx or another app task runner. Consumer repos keep ownership of test, typecheck, and build.
|
|
179
178
|
|
|
180
|
-
See [tiers](docs/tiers.md).
|
|
179
|
+
See [tiers](docs/tiers.md). Related work: [Toolbox](https://github.com/csark0812/toolbox) packages portable process skills, and [Christopher's profile](https://github.com/csark0812) connects the broader builder story.
|
|
181
180
|
|
|
182
181
|
## Docs
|
|
183
182
|
|
|
@@ -200,7 +199,7 @@ bun run check
|
|
|
200
199
|
|
|
201
200
|
`bun run check` = lint + test + typecheck + build + `audit:self`.
|
|
202
201
|
|
|
203
|
-
`validate:changed` does not replace code tests. It classifies code separately and also audits every scanned document
|
|
202
|
+
`validate:changed` does not replace code tests. It classifies code separately and also audits every scanned document whose `review-deps` declaration matches a changed file. Owned skill-body edits need `audit skills`. Code-only changes with no linked document still exit non-zero locally and point to native gates.
|
|
204
203
|
|
|
205
204
|
For code: `bun test`, `bun run typecheck`, `bun run build`.
|
|
206
205
|
|
|
@@ -31,7 +31,7 @@ export interface ReviewProofConfig {
|
|
|
31
31
|
/** Repo-relative proof lockfile (default: .skeleton/review-lock.json). */
|
|
32
32
|
lockfile?: string;
|
|
33
33
|
}
|
|
34
|
-
/** Tunables for near-duplicate
|
|
34
|
+
/** Tunables for near-duplicate and SSOT-summary docs lint. */
|
|
35
35
|
export interface DocsLintConfig {
|
|
36
36
|
/** Jaccard threshold on word shingles (0–1). Default 0.72. */
|
|
37
37
|
nearDuplicateThreshold?: number;
|
|
@@ -45,13 +45,6 @@ export interface DocsLintConfig {
|
|
|
45
45
|
ignorePairs?: [string, string][];
|
|
46
46
|
/** Globs excluded from near-dupe / duplicate-SSOT (still catalogued if they have SSOT). */
|
|
47
47
|
ignoreGlobs?: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Min fraction of code identifiers that must appear in the doc (code-fit).
|
|
50
|
-
* Default 0.03 — separate from ssotOverlapMin (doc-grounding vs large modules).
|
|
51
|
-
*/
|
|
52
|
-
codeFitOverlapMin?: number;
|
|
53
|
-
/** Max auto-extracted surface names before surface= is required (default 25). */
|
|
54
|
-
codeFitSurfaceCap?: number;
|
|
55
48
|
}
|
|
56
49
|
export interface SkeletonConfig {
|
|
57
50
|
scan: ScanConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ReviewDepsMarker {
|
|
2
|
+
paths: string[];
|
|
3
|
+
raw: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ResolvedReviewDependencies {
|
|
6
|
+
patterns: string[];
|
|
7
|
+
targets: string[];
|
|
8
|
+
}
|
|
9
|
+
/** Parse review dependency markers outside fenced and inline code. */
|
|
10
|
+
export declare function parseReviewDepsMarkers(content: string): ReviewDepsMarker[];
|
|
11
|
+
export declare function reviewDependencyPatterns(content: string): string[];
|
|
12
|
+
export declare function isReviewDependencyGlob(pattern: string): boolean;
|
|
13
|
+
export declare function isSafeReviewDependencyPath(value: string): boolean;
|
|
14
|
+
/** Resolve all declared paths against the repository, without scan-perimeter filtering. */
|
|
15
|
+
export declare function resolveReviewDependencies(root: string, patterns: string[]): ResolvedReviewDependencies;
|
|
16
|
+
export declare function reviewDependencyMatchesPath(pattern: string, relPath: string): boolean;
|
|
@@ -6,7 +6,7 @@ export interface AuditRule {
|
|
|
6
6
|
global?: boolean;
|
|
7
7
|
/**
|
|
8
8
|
* When true, still run under `--paths` / path-scoped validate (globals are skipped).
|
|
9
|
-
* Used by rules that must re-check the full scan corpus (e.g.
|
|
9
|
+
* Used by rules that must re-check the full scan corpus (e.g. review-deps markers).
|
|
10
10
|
*/
|
|
11
11
|
alwaysRun?: boolean;
|
|
12
12
|
/** Which audit suites include this rule. Default: `["docs"]`. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AuditContext } from "../core/context.ts";
|
|
2
|
+
import { type Issue } from "../core/report.ts";
|
|
3
|
+
/** Validate opt-in repository dependencies for every scanned document. */
|
|
4
|
+
export declare function runReviewDepsRule(ctx: AuditContext): Issue[];
|
|
5
|
+
export declare const reviewDepsRule: {
|
|
6
|
+
id: string;
|
|
7
|
+
alwaysRun: boolean;
|
|
8
|
+
run: typeof runReviewDepsRule;
|
|
9
|
+
};
|