skillwiki 0.2.0-beta.22 → 0.2.0-beta.23

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/dist/cli.js CHANGED
@@ -1618,8 +1618,19 @@ async function runDedup(input) {
1618
1618
  // src/commands/lint.ts
1619
1619
  var STRUCT_MIN_BODY_LINES = 60;
1620
1620
  var STRUCT_MIN_SECTIONS = 3;
1621
+ function hasDuplicateFrontmatter(body) {
1622
+ if (/^---\r?\n/.test(body)) return true;
1623
+ const lines = body.split(/\r?\n/);
1624
+ const limit = Math.min(lines.length, 20);
1625
+ let seenYamlKey = false;
1626
+ for (let i = 0; i < limit; i++) {
1627
+ if (/^\w[\w-]*:/.test(lines[i].trim())) seenYamlKey = true;
1628
+ if (seenYamlKey && lines[i].trim() === "---") return true;
1629
+ }
1630
+ return false;
1631
+ }
1621
1632
  var ERROR_ORDER = ["broken_wikilinks", "invalid_frontmatter", "raw_dedup", "tag_not_in_taxonomy"];
1622
- var WARNING_ORDER = ["index_incomplete", "index_link_format", "stale_page", "page_too_large", "log_rotate_needed", "contested", "orphans", "legacy_citation_style", "orphaned_citations"];
1633
+ var WARNING_ORDER = ["index_incomplete", "index_link_format", "stale_page", "page_too_large", "log_rotate_needed", "contested", "orphans", "legacy_citation_style", "orphaned_citations", "duplicate_frontmatter"];
1623
1634
  var INFO_ORDER = ["bridges", "low_confidence_single_source", "page_structure", "topic_map_recommended"];
1624
1635
  async function runLint(input) {
1625
1636
  const buckets = {};
@@ -1668,11 +1679,13 @@ async function runLint(input) {
1668
1679
  const legacyPages = [];
1669
1680
  const orphanedPages = [];
1670
1681
  const structFlags = [];
1682
+ const dupFrontmatter = [];
1671
1683
  for (const page of scan.data.typedKnowledge) {
1672
1684
  const text = await readPage(page);
1673
1685
  const split = splitFrontmatter(text);
1674
1686
  if (!split.ok) continue;
1675
1687
  const body = split.data.body;
1688
+ if (hasDuplicateFrontmatter(body)) dupFrontmatter.push(page.relPath);
1676
1689
  if (isLegacyCitationStyle(body)) legacyPages.push(page.relPath);
1677
1690
  if (hasOrphanedCitations(body)) orphanedPages.push(page.relPath);
1678
1691
  const bodyLines = body.split("\n").filter((l) => l.trim().length > 0).length;
@@ -1692,6 +1705,7 @@ async function runLint(input) {
1692
1705
  if (legacyPages.length > 0) buckets.legacy_citation_style = legacyPages;
1693
1706
  if (orphanedPages.length > 0) buckets.orphaned_citations = orphanedPages;
1694
1707
  if (structFlags.length > 0) buckets.page_structure = structFlags;
1708
+ if (dupFrontmatter.length > 0) buckets.duplicate_frontmatter = dupFrontmatter;
1695
1709
  }
1696
1710
  const errorOut = ERROR_ORDER.flatMap((k) => buckets[k] ? [{ kind: k, items: buckets[k] }] : []);
1697
1711
  const warningOut = WARNING_ORDER.flatMap((k) => buckets[k] ? [{ kind: k, items: buckets[k] }] : []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.2.0-beta.22",
3
+ "version": "0.2.0-beta.23",
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.2.0-beta.22",
3
+ "version": "0.2.0-beta.23",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 11 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI (8 subcommands, JSON-by-default).",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.2.0-beta.22",
3
+ "version": "0.2.0-beta.23",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",