skillops-cli 1.3.0 → 1.3.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 +1 -1
- package/dist/cli.js +505 -528
- package/dist/index.d.ts +137 -137
- package/dist/index.js +492 -494
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { z } from 'zod';
|
|
|
8
8
|
* telemetry and Multi-Runtime Transpilation lockfiles.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
declare const SKILLOPS_VERSION = "1.3.
|
|
11
|
+
declare const SKILLOPS_VERSION = "1.3.1";
|
|
12
12
|
/**
|
|
13
13
|
* Count whitespace-delimited words in text.
|
|
14
14
|
*/
|
|
@@ -1189,95 +1189,6 @@ interface LoadedSkillOpsConfigResult {
|
|
|
1189
1189
|
*/
|
|
1190
1190
|
declare function loadSkillOpsConfig(repoPath: string): LoadedSkillOpsConfigResult;
|
|
1191
1191
|
|
|
1192
|
-
/**
|
|
1193
|
-
* Directory and file discovery/parsing engine for Hybrid Executable Skills (SKILL.md)
|
|
1194
|
-
* and Context-Isolated Subagents (SUBAGENT.md / *.agent.md).
|
|
1195
|
-
*/
|
|
1196
|
-
|
|
1197
|
-
interface ParsedSkillDirectory {
|
|
1198
|
-
readonly skillDir: string;
|
|
1199
|
-
readonly skillMdPath: string;
|
|
1200
|
-
readonly manifest: SkillManifest;
|
|
1201
|
-
readonly rawText: string;
|
|
1202
|
-
readonly markdownBody: string;
|
|
1203
|
-
readonly totalLines: number;
|
|
1204
|
-
readonly declaredScripts: string[];
|
|
1205
|
-
readonly missingDeclaredScripts: string[];
|
|
1206
|
-
readonly extraScripts: string[];
|
|
1207
|
-
readonly referenceFiles: string[];
|
|
1208
|
-
readonly evalsPath: string | null;
|
|
1209
|
-
}
|
|
1210
|
-
interface ParsedSubagentFile {
|
|
1211
|
-
readonly filePath: string;
|
|
1212
|
-
readonly manifest: SubagentManifest;
|
|
1213
|
-
readonly systemPromptBody: string;
|
|
1214
|
-
readonly rawText: string;
|
|
1215
|
-
}
|
|
1216
|
-
interface ParseSkillOptions {
|
|
1217
|
-
readonly requireLayout?: boolean;
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* Recursively discover all skill directories under catalogDir containing SKILL.md.
|
|
1221
|
-
*/
|
|
1222
|
-
declare function discoverSkillDirectories(catalogDir: string): string[];
|
|
1223
|
-
/**
|
|
1224
|
-
* Parse a single skill directory and validate its SKILL.md manifest and Level 3 layout.
|
|
1225
|
-
*/
|
|
1226
|
-
declare function parseSkillDirectory(skillDir: string, options?: ParseSkillOptions): ParsedSkillDirectory;
|
|
1227
|
-
/**
|
|
1228
|
-
* Discover all Subagent Markdown definitions in catalog/subagents/ and .github/agents/*.agent.md.
|
|
1229
|
-
*/
|
|
1230
|
-
declare function discoverSubagentFiles(repoOrCatalogRoot: string): string[];
|
|
1231
|
-
/**
|
|
1232
|
-
* Parse and validate a Subagent definition file.
|
|
1233
|
-
*/
|
|
1234
|
-
declare function parseSubagentFile(filePath: string): ParsedSubagentFile;
|
|
1235
|
-
|
|
1236
|
-
/**
|
|
1237
|
-
* 3-Level Progressive Disclosure & Subagent Token Budget Linter (INV-SKILL-01 & INV-SKILL-04).
|
|
1238
|
-
*/
|
|
1239
|
-
interface SkillTokenBudgetAudit {
|
|
1240
|
-
readonly skillName: string;
|
|
1241
|
-
readonly skillDir: string;
|
|
1242
|
-
readonly l1Words: number;
|
|
1243
|
-
readonly l1Tokens: number;
|
|
1244
|
-
readonly l2Lines: number;
|
|
1245
|
-
readonly l2Tokens: number;
|
|
1246
|
-
readonly totalLines: number;
|
|
1247
|
-
readonly scriptsCount: number;
|
|
1248
|
-
readonly passed: boolean;
|
|
1249
|
-
readonly errors: string[];
|
|
1250
|
-
readonly warnings: string[];
|
|
1251
|
-
}
|
|
1252
|
-
interface SubagentTokenBudgetAudit {
|
|
1253
|
-
readonly subagentName: string;
|
|
1254
|
-
readonly filePath: string;
|
|
1255
|
-
readonly descriptionTokens: number;
|
|
1256
|
-
readonly systemPromptLines: number;
|
|
1257
|
-
readonly systemPromptTokens: number;
|
|
1258
|
-
readonly maxOutputTokens: number;
|
|
1259
|
-
readonly tools: string[];
|
|
1260
|
-
readonly passed: boolean;
|
|
1261
|
-
readonly errors: string[];
|
|
1262
|
-
}
|
|
1263
|
-
interface CatalogTokenBudgetSummary {
|
|
1264
|
-
readonly catalogPath: string;
|
|
1265
|
-
readonly skills: SkillTokenBudgetAudit[];
|
|
1266
|
-
readonly subagents: SubagentTokenBudgetAudit[];
|
|
1267
|
-
readonly totalL1Tokens: number;
|
|
1268
|
-
readonly totalSubagentPromptTokens: number;
|
|
1269
|
-
readonly errors: string[];
|
|
1270
|
-
readonly warnings: string[];
|
|
1271
|
-
readonly passed: boolean;
|
|
1272
|
-
}
|
|
1273
|
-
declare function auditSkillTokenBudget(skillDir: string, options?: {
|
|
1274
|
-
requireLayout?: boolean;
|
|
1275
|
-
}): SkillTokenBudgetAudit;
|
|
1276
|
-
declare function auditSubagentTokenBudget(filePath: string): SubagentTokenBudgetAudit;
|
|
1277
|
-
declare function auditCatalogTokenBudgets(catalogDir: string, options?: {
|
|
1278
|
-
requireLayout?: boolean;
|
|
1279
|
-
}): CatalogTokenBudgetSummary;
|
|
1280
|
-
|
|
1281
1192
|
/**
|
|
1282
1193
|
* Zero-API Hybrid Lexical & Structural Semantic Collision Detector (ADR-0002).
|
|
1283
1194
|
*
|
|
@@ -1315,31 +1226,6 @@ interface AuditCatalogOptions {
|
|
|
1315
1226
|
*/
|
|
1316
1227
|
declare function auditCatalog(catalogDir: string, options?: AuditCatalogOptions): CollisionReport;
|
|
1317
1228
|
|
|
1318
|
-
/**
|
|
1319
|
-
* Repository Token Economy & Startup Context Tax Analyzer (`npx skillops@latest tokens`).
|
|
1320
|
-
*
|
|
1321
|
-
* Implements Issue #60:
|
|
1322
|
-
* - Scans always-on repository instruction files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`,
|
|
1323
|
-
* `.github/copilot-instructions.md`), `.cursor/rules/*.mdc`, and `.mcp.json` / `.cursor/mcp.json`.
|
|
1324
|
-
* - Scans catalog/repository Skills (L1 frontmatter vs L2 Markdown body vs L3 zero-token scripts)
|
|
1325
|
-
* and Context-Isolated Subagents (`SUBAGENT.md` / `*.agent.md`).
|
|
1326
|
-
* - Quantifies Startup Token Tax, Monolithic Equivalent Tokens, Progressive Disclosure L1 Tokens,
|
|
1327
|
-
* Estimated Tokens Saved, Token Savings %, and actionable TokenWasteHotspot items.
|
|
1328
|
-
*/
|
|
1329
|
-
|
|
1330
|
-
interface AnalyzeTokenEconomyOptions {
|
|
1331
|
-
readonly catalogDir?: string;
|
|
1332
|
-
readonly startupTaxBudget?: number;
|
|
1333
|
-
}
|
|
1334
|
-
/**
|
|
1335
|
-
* Analyze a repository's Startup Token Tax and Progressive Disclosure savings.
|
|
1336
|
-
*/
|
|
1337
|
-
declare function analyzeRepoTokenEconomy(repoPath: string, options?: AnalyzeTokenEconomyOptions): TokenEconomyReport;
|
|
1338
|
-
/**
|
|
1339
|
-
* Render a TokenEconomyReport as a human-readable ASCII table, Markdown report, or JSON string.
|
|
1340
|
-
*/
|
|
1341
|
-
declare function formatTokenEconomyReport(report: TokenEconomyReport, format?: "table" | "json" | "markdown" | "github"): string;
|
|
1342
|
-
|
|
1343
1229
|
/**
|
|
1344
1230
|
* Repository Environment Diagnostics & Lockfile Drift Auditor (`npx skillops-cli@latest doctor` / `status`).
|
|
1345
1231
|
*
|
|
@@ -1417,6 +1303,120 @@ declare function formatHarnessInspectionReport(report: HarnessInspectionReport,
|
|
|
1417
1303
|
*/
|
|
1418
1304
|
declare function formatDoctorReport(report: DoctorReport, format?: "table" | "json" | "markdown" | "github"): string;
|
|
1419
1305
|
|
|
1306
|
+
/**
|
|
1307
|
+
* Directory and file discovery/parsing engine for Hybrid Executable Skills (SKILL.md)
|
|
1308
|
+
* and Context-Isolated Subagents (SUBAGENT.md / *.agent.md).
|
|
1309
|
+
*/
|
|
1310
|
+
|
|
1311
|
+
interface ParsedSkillDirectory {
|
|
1312
|
+
readonly skillDir: string;
|
|
1313
|
+
readonly skillMdPath: string;
|
|
1314
|
+
readonly manifest: SkillManifest;
|
|
1315
|
+
readonly rawText: string;
|
|
1316
|
+
readonly markdownBody: string;
|
|
1317
|
+
readonly totalLines: number;
|
|
1318
|
+
readonly declaredScripts: string[];
|
|
1319
|
+
readonly missingDeclaredScripts: string[];
|
|
1320
|
+
readonly extraScripts: string[];
|
|
1321
|
+
readonly referenceFiles: string[];
|
|
1322
|
+
readonly evalsPath: string | null;
|
|
1323
|
+
}
|
|
1324
|
+
interface ParsedSubagentFile {
|
|
1325
|
+
readonly filePath: string;
|
|
1326
|
+
readonly manifest: SubagentManifest;
|
|
1327
|
+
readonly systemPromptBody: string;
|
|
1328
|
+
readonly rawText: string;
|
|
1329
|
+
}
|
|
1330
|
+
interface ParseSkillOptions {
|
|
1331
|
+
readonly requireLayout?: boolean;
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* Recursively discover all skill directories under catalogDir containing SKILL.md.
|
|
1335
|
+
*/
|
|
1336
|
+
declare function discoverSkillDirectories(catalogDir: string): string[];
|
|
1337
|
+
/**
|
|
1338
|
+
* Parse a single skill directory and validate its SKILL.md manifest and Level 3 layout.
|
|
1339
|
+
*/
|
|
1340
|
+
declare function parseSkillDirectory(skillDir: string, options?: ParseSkillOptions): ParsedSkillDirectory;
|
|
1341
|
+
/**
|
|
1342
|
+
* Discover all Subagent Markdown definitions in catalog/subagents/ and .github/agents/*.agent.md.
|
|
1343
|
+
*/
|
|
1344
|
+
declare function discoverSubagentFiles(repoOrCatalogRoot: string): string[];
|
|
1345
|
+
/**
|
|
1346
|
+
* Parse and validate a Subagent definition file.
|
|
1347
|
+
*/
|
|
1348
|
+
declare function parseSubagentFile(filePath: string): ParsedSubagentFile;
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* 3-Level Progressive Disclosure & Subagent Token Budget Linter (INV-SKILL-01 & INV-SKILL-04).
|
|
1352
|
+
*/
|
|
1353
|
+
interface SkillTokenBudgetAudit {
|
|
1354
|
+
readonly skillName: string;
|
|
1355
|
+
readonly skillDir: string;
|
|
1356
|
+
readonly l1Words: number;
|
|
1357
|
+
readonly l1Tokens: number;
|
|
1358
|
+
readonly l2Lines: number;
|
|
1359
|
+
readonly l2Tokens: number;
|
|
1360
|
+
readonly totalLines: number;
|
|
1361
|
+
readonly scriptsCount: number;
|
|
1362
|
+
readonly passed: boolean;
|
|
1363
|
+
readonly errors: string[];
|
|
1364
|
+
readonly warnings: string[];
|
|
1365
|
+
}
|
|
1366
|
+
interface SubagentTokenBudgetAudit {
|
|
1367
|
+
readonly subagentName: string;
|
|
1368
|
+
readonly filePath: string;
|
|
1369
|
+
readonly descriptionTokens: number;
|
|
1370
|
+
readonly systemPromptLines: number;
|
|
1371
|
+
readonly systemPromptTokens: number;
|
|
1372
|
+
readonly maxOutputTokens: number;
|
|
1373
|
+
readonly tools: string[];
|
|
1374
|
+
readonly passed: boolean;
|
|
1375
|
+
readonly errors: string[];
|
|
1376
|
+
}
|
|
1377
|
+
interface CatalogTokenBudgetSummary {
|
|
1378
|
+
readonly catalogPath: string;
|
|
1379
|
+
readonly skills: SkillTokenBudgetAudit[];
|
|
1380
|
+
readonly subagents: SubagentTokenBudgetAudit[];
|
|
1381
|
+
readonly totalL1Tokens: number;
|
|
1382
|
+
readonly totalSubagentPromptTokens: number;
|
|
1383
|
+
readonly errors: string[];
|
|
1384
|
+
readonly warnings: string[];
|
|
1385
|
+
readonly passed: boolean;
|
|
1386
|
+
}
|
|
1387
|
+
declare function auditSkillTokenBudget(skillDir: string, options?: {
|
|
1388
|
+
requireLayout?: boolean;
|
|
1389
|
+
}): SkillTokenBudgetAudit;
|
|
1390
|
+
declare function auditSubagentTokenBudget(filePath: string): SubagentTokenBudgetAudit;
|
|
1391
|
+
declare function auditCatalogTokenBudgets(catalogDir: string, options?: {
|
|
1392
|
+
requireLayout?: boolean;
|
|
1393
|
+
}): CatalogTokenBudgetSummary;
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Repository Token Economy & Startup Context Tax Analyzer (`npx skillops@latest tokens`).
|
|
1397
|
+
*
|
|
1398
|
+
* Implements Issue #60:
|
|
1399
|
+
* - Scans always-on repository instruction files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`,
|
|
1400
|
+
* `.github/copilot-instructions.md`), `.cursor/rules/*.mdc`, and `.mcp.json` / `.cursor/mcp.json`.
|
|
1401
|
+
* - Scans catalog/repository Skills (L1 frontmatter vs L2 Markdown body vs L3 zero-token scripts)
|
|
1402
|
+
* and Context-Isolated Subagents (`SUBAGENT.md` / `*.agent.md`).
|
|
1403
|
+
* - Quantifies Startup Token Tax, Monolithic Equivalent Tokens, Progressive Disclosure L1 Tokens,
|
|
1404
|
+
* Estimated Tokens Saved, Token Savings %, and actionable TokenWasteHotspot items.
|
|
1405
|
+
*/
|
|
1406
|
+
|
|
1407
|
+
interface AnalyzeTokenEconomyOptions {
|
|
1408
|
+
readonly catalogDir?: string;
|
|
1409
|
+
readonly startupTaxBudget?: number;
|
|
1410
|
+
}
|
|
1411
|
+
/**
|
|
1412
|
+
* Analyze a repository's Startup Token Tax and Progressive Disclosure savings.
|
|
1413
|
+
*/
|
|
1414
|
+
declare function analyzeRepoTokenEconomy(repoPath: string, options?: AnalyzeTokenEconomyOptions): TokenEconomyReport;
|
|
1415
|
+
/**
|
|
1416
|
+
* Render a TokenEconomyReport as a human-readable ASCII table, Markdown report, or JSON string.
|
|
1417
|
+
*/
|
|
1418
|
+
declare function formatTokenEconomyReport(report: TokenEconomyReport, format?: "table" | "json" | "markdown" | "github"): string;
|
|
1419
|
+
|
|
1420
1420
|
/**
|
|
1421
1421
|
* Zero-API Deterministic TDD Benchmark Runner & Static HTML/Markdown Exporter (`src/eval/index.ts`).
|
|
1422
1422
|
*
|
|
@@ -2049,22 +2049,6 @@ declare function setupMcpForHarnesses(repoPath: string, options?: McpSetupOption
|
|
|
2049
2049
|
*/
|
|
2050
2050
|
declare function formatMcpSetupReport(report: McpSetupReport, format?: "table" | "json" | "markdown"): string;
|
|
2051
2051
|
|
|
2052
|
-
/**
|
|
2053
|
-
* Deterministic, zero-execution Repository Stack Fingerprinter (`src/router/fingerprinter.ts`).
|
|
2054
|
-
*
|
|
2055
|
-
* Inspects manifest files (`pyproject.toml`, `requirements*.txt`, `uv.lock`, `package.json`,
|
|
2056
|
-
* `tsconfig.json`, `Cargo.toml`, `go.mod`, `Dockerfile`, `docker-compose*.yml`, `.github/workflows`),
|
|
2057
|
-
* SQL files, and source files without executing untrusted repository code.
|
|
2058
|
-
*/
|
|
2059
|
-
|
|
2060
|
-
declare function normalizePackageName(rawSpec: string): string;
|
|
2061
|
-
declare class RepoFingerprinter {
|
|
2062
|
-
readonly repoPath: string;
|
|
2063
|
-
constructor(repoPath: string);
|
|
2064
|
-
fingerprint(): RepoProfile;
|
|
2065
|
-
}
|
|
2066
|
-
declare function fingerprintRepository(repoPath: string): RepoProfile;
|
|
2067
|
-
|
|
2068
2052
|
/**
|
|
2069
2053
|
* Dynamic Skill & Subagent Router (`src/router/bundle_compiler.ts`).
|
|
2070
2054
|
*
|
|
@@ -2089,6 +2073,22 @@ declare function compileSkillBundle(profile: RepoProfile, catalogDir: string, op
|
|
|
2089
2073
|
declare function routeRepository(repoPath: string, catalogDir: string, options?: RouteOptions): RoutedBundle;
|
|
2090
2074
|
declare function formatRoutedBundle(bundle: RoutedBundle, format?: "table" | "json" | "markdown", colorEnabled?: boolean): string;
|
|
2091
2075
|
|
|
2076
|
+
/**
|
|
2077
|
+
* Deterministic, zero-execution Repository Stack Fingerprinter (`src/router/fingerprinter.ts`).
|
|
2078
|
+
*
|
|
2079
|
+
* Inspects manifest files (`pyproject.toml`, `requirements*.txt`, `uv.lock`, `package.json`,
|
|
2080
|
+
* `tsconfig.json`, `Cargo.toml`, `go.mod`, `Dockerfile`, `docker-compose*.yml`, `.github/workflows`),
|
|
2081
|
+
* SQL files, and source files without executing untrusted repository code.
|
|
2082
|
+
*/
|
|
2083
|
+
|
|
2084
|
+
declare function normalizePackageName(rawSpec: string): string;
|
|
2085
|
+
declare class RepoFingerprinter {
|
|
2086
|
+
readonly repoPath: string;
|
|
2087
|
+
constructor(repoPath: string);
|
|
2088
|
+
fingerprint(): RepoProfile;
|
|
2089
|
+
}
|
|
2090
|
+
declare function fingerprintRepository(repoPath: string): RepoProfile;
|
|
2091
|
+
|
|
2092
2092
|
/**
|
|
2093
2093
|
* Multi-Runtime Transpiler for Skills & Context-Isolated Subagents (`src/sync/adapters.ts`).
|
|
2094
2094
|
*
|
|
@@ -2165,7 +2165,7 @@ declare const COMMAND_HELP_SPECS: readonly CommandHelpSpec[];
|
|
|
2165
2165
|
*/
|
|
2166
2166
|
declare function findCommandHelpSpec(commandOrAlias: string): CommandHelpSpec | undefined;
|
|
2167
2167
|
/**
|
|
2168
|
-
* Render the 3-Pillar Framework & Library global help
|
|
2168
|
+
* Render the compact, emoji-free 3-Pillar Framework & Library global help tree (`npx skillops-cli --help`).
|
|
2169
2169
|
*/
|
|
2170
2170
|
declare function renderGlobalHelp(version: string, colorEnabled?: boolean): string;
|
|
2171
2171
|
/**
|
|
@@ -2228,7 +2228,7 @@ interface BoxOptions {
|
|
|
2228
2228
|
*/
|
|
2229
2229
|
declare function renderBox(lines: readonly string[], options?: BoxOptions): string;
|
|
2230
2230
|
/**
|
|
2231
|
-
* Render the official SkillOps Framework & Library top
|
|
2231
|
+
* Render the official SkillOps Framework & Library top header line (clean tree root).
|
|
2232
2232
|
*/
|
|
2233
2233
|
declare function renderHeaderBanner(subtitle?: string, options?: {
|
|
2234
2234
|
version?: string;
|
|
@@ -2258,7 +2258,7 @@ declare function renderTokenBar(current: number, max: number, options?: TokenBar
|
|
|
2258
2258
|
*/
|
|
2259
2259
|
declare const renderProgressBar: typeof renderTokenBar;
|
|
2260
2260
|
/**
|
|
2261
|
-
* Render a
|
|
2261
|
+
* Render a clean minimalist tree section header (`├─ Title`).
|
|
2262
2262
|
*/
|
|
2263
2263
|
declare function renderSectionHeader(title: string, colorEnabled?: boolean): string;
|
|
2264
2264
|
type BadgeType = "pass" | "warn" | "fail" | "info" | "skill" | "subagent";
|
|
@@ -2267,7 +2267,7 @@ type BadgeType = "pass" | "warn" | "fail" | "info" | "skill" | "subagent";
|
|
|
2267
2267
|
*/
|
|
2268
2268
|
declare function formatBadge(type: BadgeType, customLabel?: string, colorEnabled?: boolean): string;
|
|
2269
2269
|
/**
|
|
2270
|
-
* Render a numbered onboarding step line (
|
|
2270
|
+
* Render a numbered onboarding step line (`│ ✔ [1/4] Title · Detail`).
|
|
2271
2271
|
*/
|
|
2272
2272
|
declare function renderStep(step: number, total: number, title: string, detail?: string, status?: "done" | "warn" | "skip", colorEnabled?: boolean): string;
|
|
2273
2273
|
interface NextStepHint {
|
|
@@ -2275,11 +2275,11 @@ interface NextStepHint {
|
|
|
2275
2275
|
readonly description: string;
|
|
2276
2276
|
}
|
|
2277
2277
|
/**
|
|
2278
|
-
* Render an actionable "Next
|
|
2278
|
+
* Render an actionable "Next Steps" tree footer guiding the developer on what to run next.
|
|
2279
2279
|
*/
|
|
2280
2280
|
declare function renderNextSteps(hints: readonly NextStepHint[], colorEnabled?: boolean): string;
|
|
2281
2281
|
/**
|
|
2282
|
-
* Render a
|
|
2282
|
+
* Render a compact, emoji-free tree guide explaining how to invoke installed Skills & Subagents.
|
|
2283
2283
|
*/
|
|
2284
2284
|
declare function renderAiUsageGuide(targets: readonly string[], skills: readonly string[], subagents: readonly string[], colorEnabled?: boolean): string;
|
|
2285
2285
|
/**
|