skillwiki 0.10.82 → 0.10.83

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.
@@ -6351,6 +6351,7 @@ var W_WIKILINK = 3;
6351
6351
  var W_ADAMIC_ADAR = 1.5;
6352
6352
  var W_TYPE_AFFINITY = 1;
6353
6353
  var NON_SEED_FACTOR = 0.4;
6354
+ var STRUCTURAL_SEED_TOP_K = 20;
6354
6355
  var HISTORICAL_CYCLE_FACTOR = 0.55;
6355
6356
  var HISTORICAL_CYCLE_RE = /(?:^|\/)(?:\d{4}-\d{2}-\d{2}-)?.*\b(?:daily|deep|maintenance|research|office[- ]hours|sleep)\b.*\b(?:cycle|run|review|research)\b/i;
6356
6357
  var CONCEPT_INDICATORS = /* @__PURE__ */ new Set([
@@ -6419,13 +6420,23 @@ async function runQuery(input) {
6419
6420
  let results;
6420
6421
  let rankingGuardrails;
6421
6422
  if (scope === "all") {
6422
- const rankedWork = rankPages(pages.filter((page) => isWorkPath(page.relPath)), graph, queryTerms);
6423
+ const rankedWork = rankPages(
6424
+ pages.filter((page) => isWorkPath(page.relPath)),
6425
+ graph,
6426
+ queryTerms,
6427
+ STRUCTURAL_SEED_TOP_K
6428
+ );
6423
6429
  const rankedTyped = rankPages(pages.filter((page) => !isWorkPath(page.relPath)), graph, queryTerms);
6424
6430
  structural = [...rankedWork.results, ...rankedTyped.results];
6425
6431
  results = zipMergeScopeResults(rankedWork.results, rankedTyped.results, limit);
6426
6432
  rankingGuardrails = rankedTyped.rankingGuardrails;
6427
6433
  } else {
6428
- const ranked = rankPages(pages, graph, queryTerms);
6434
+ const ranked = rankPages(
6435
+ pages,
6436
+ graph,
6437
+ queryTerms,
6438
+ scope === "work" ? STRUCTURAL_SEED_TOP_K : void 0
6439
+ );
6429
6440
  structural = ranked.results;
6430
6441
  results = structural.slice(0, limit);
6431
6442
  rankingGuardrails = ranked.rankingGuardrails;
@@ -6523,21 +6534,24 @@ function zipMergeScopeResults(work, typed, limit) {
6523
6534
  }
6524
6535
  return merged;
6525
6536
  }
6526
- function rankPages(pages, graph, queryTerms) {
6527
- const seedPaths = /* @__PURE__ */ new Set();
6528
- const operationalSeedPaths = /* @__PURE__ */ new Set();
6537
+ function rankPages(pages, graph, queryTerms, structuralSeedLimit) {
6538
+ const seedPages = [];
6529
6539
  let historicalCyclePageCount = 0;
6530
6540
  let hasDirectOperationalSeed = false;
6531
6541
  for (const page of pages) {
6532
6542
  if (page.historicalCycle) historicalCyclePageCount += 1;
6533
6543
  if (page.keywordScore <= 0) continue;
6534
- seedPaths.add(page.relPath);
6535
- if (!page.historicalCycle) {
6536
- operationalSeedPaths.add(page.relPath);
6537
- hasDirectOperationalSeed = true;
6538
- }
6544
+ seedPages.push(page);
6545
+ if (!page.historicalCycle) hasDirectOperationalSeed = true;
6539
6546
  }
6540
6547
  const suppressRepetitiveHistoricalCycles = historicalCyclePageCount >= 3 && hasDirectOperationalSeed;
6548
+ const gatedSeedPages = structuralSeedLimit !== void 0 && seedPages.length > structuralSeedLimit ? [...seedPages].sort(
6549
+ (a, b) => b.keywordScore - a.keywordScore || a.relPath.localeCompare(b.relPath)
6550
+ ).slice(0, structuralSeedLimit) : seedPages;
6551
+ const seedPaths = new Set(gatedSeedPages.map((page) => page.relPath));
6552
+ const operationalSeedPaths = new Set(
6553
+ gatedSeedPages.filter((page) => !page.historicalCycle).map((page) => page.relPath)
6554
+ );
6541
6555
  const structuralSeedPaths = suppressRepetitiveHistoricalCycles ? operationalSeedPaths : seedPaths;
6542
6556
  const results = pages.map((page) => {
6543
6557
  const sourceOverlap = scoreSourceOverlap(page, pages, structuralSeedPaths);
package/dist/cli.js CHANGED
@@ -52,7 +52,7 @@ import {
52
52
  snapshotterHealthChecks,
53
53
  upsertIndexEntry,
54
54
  vectorIndexStatus
55
- } from "./chunk-YEVR5XNN.js";
55
+ } from "./chunk-W5VVEW2H.js";
56
56
  import {
57
57
  normalizeDistTag,
58
58
  readCache,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runSkillwikiMcpStdio
4
- } from "./chunk-YEVR5XNN.js";
4
+ } from "./chunk-W5VVEW2H.js";
5
5
  import "./chunk-7I2TPIV5.js";
6
6
  import "./chunk-ZUHA2EXE.js";
7
7
  import "./chunk-BO7JIJIA.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.82",
3
+ "version": "0.10.83",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.82",
3
+ "version": "0.10.83",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by the deterministic `skillwiki` CLI.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.82",
3
+ "version": "0.10.83",
4
4
  "description": "Project-aware Karpathy-style knowledge base for Codex with 21 prompt-only skills backed by the deterministic skillwiki CLI.",
5
5
  "author": {
6
6
  "name": "karlorz",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.82",
3
+ "version": "0.10.83",
4
4
  "description": "Project-aware Karpathy-style knowledge base: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by HTTP MCP wiki_capture.",
5
5
  "author": {
6
6
  "name": "karlorz"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.10.82",
3
+ "version": "0.10.83",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",