@csark0812/skeleton 2.0.0 → 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 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-19 -->
5
+ <!-- doc-meta: owner=eng | last-reviewed=2026-08-24 -->
6
6
 
7
- <!-- code-fit: targets=src/cli.ts surface=audit,validate,catalog,init,build-plugin,references -->
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 docs linked to changed code |
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 `code-fit` target bytes
103
- - **Code impact routing** — changed source files automatically pull linked documents into validation
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
- | `.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.py` | native code gates + audit documents whose `code-fit` target changed |
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
 
@@ -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 that names a changed file in `code-fit`. Owned skill-body edits need `audit skills`. Code-only changes with no linked document still exit non-zero locally and point to native gates.
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, SSOT-summary, and code-fit docs lint. */
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. code-fit markers).
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
+ };