skillwiki 0.2.0-beta.22 → 0.2.0-beta.24
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 +17 -2
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -791,9 +791,10 @@ import { dirname as dirname3, resolve, join as join3 } from "path";
|
|
|
791
791
|
|
|
792
792
|
// src/parsers/citations.ts
|
|
793
793
|
var FENCE2 = /```[\s\S]*?```/g;
|
|
794
|
+
var INLINE_CODE = /`[^`\n]+`/g;
|
|
794
795
|
var MARKER_RE = /\^\[(raw\/[^\]]+)\]/g;
|
|
795
796
|
function stripFences(body) {
|
|
796
|
-
return body.replace(FENCE2, "");
|
|
797
|
+
return body.replace(FENCE2, "").replace(INLINE_CODE, "");
|
|
797
798
|
}
|
|
798
799
|
function extractCitationMarkers(body) {
|
|
799
800
|
const stripped = stripFences(body);
|
|
@@ -1618,8 +1619,19 @@ async function runDedup(input) {
|
|
|
1618
1619
|
// src/commands/lint.ts
|
|
1619
1620
|
var STRUCT_MIN_BODY_LINES = 60;
|
|
1620
1621
|
var STRUCT_MIN_SECTIONS = 3;
|
|
1622
|
+
function hasDuplicateFrontmatter(body) {
|
|
1623
|
+
if (/^---\r?\n/.test(body)) return true;
|
|
1624
|
+
const lines = body.split(/\r?\n/);
|
|
1625
|
+
const limit = Math.min(lines.length, 20);
|
|
1626
|
+
let seenYamlKey = false;
|
|
1627
|
+
for (let i = 0; i < limit; i++) {
|
|
1628
|
+
if (/^\w[\w-]*:/.test(lines[i].trim())) seenYamlKey = true;
|
|
1629
|
+
if (seenYamlKey && lines[i].trim() === "---") return true;
|
|
1630
|
+
}
|
|
1631
|
+
return false;
|
|
1632
|
+
}
|
|
1621
1633
|
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"];
|
|
1634
|
+
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
1635
|
var INFO_ORDER = ["bridges", "low_confidence_single_source", "page_structure", "topic_map_recommended"];
|
|
1624
1636
|
async function runLint(input) {
|
|
1625
1637
|
const buckets = {};
|
|
@@ -1668,11 +1680,13 @@ async function runLint(input) {
|
|
|
1668
1680
|
const legacyPages = [];
|
|
1669
1681
|
const orphanedPages = [];
|
|
1670
1682
|
const structFlags = [];
|
|
1683
|
+
const dupFrontmatter = [];
|
|
1671
1684
|
for (const page of scan.data.typedKnowledge) {
|
|
1672
1685
|
const text = await readPage(page);
|
|
1673
1686
|
const split = splitFrontmatter(text);
|
|
1674
1687
|
if (!split.ok) continue;
|
|
1675
1688
|
const body = split.data.body;
|
|
1689
|
+
if (hasDuplicateFrontmatter(body)) dupFrontmatter.push(page.relPath);
|
|
1676
1690
|
if (isLegacyCitationStyle(body)) legacyPages.push(page.relPath);
|
|
1677
1691
|
if (hasOrphanedCitations(body)) orphanedPages.push(page.relPath);
|
|
1678
1692
|
const bodyLines = body.split("\n").filter((l) => l.trim().length > 0).length;
|
|
@@ -1692,6 +1706,7 @@ async function runLint(input) {
|
|
|
1692
1706
|
if (legacyPages.length > 0) buckets.legacy_citation_style = legacyPages;
|
|
1693
1707
|
if (orphanedPages.length > 0) buckets.orphaned_citations = orphanedPages;
|
|
1694
1708
|
if (structFlags.length > 0) buckets.page_structure = structFlags;
|
|
1709
|
+
if (dupFrontmatter.length > 0) buckets.duplicate_frontmatter = dupFrontmatter;
|
|
1695
1710
|
}
|
|
1696
1711
|
const errorOut = ERROR_ORDER.flatMap((k) => buckets[k] ? [{ kind: k, items: buckets[k] }] : []);
|
|
1697
1712
|
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.
|
|
3
|
+
"version": "0.2.0-beta.24",
|
|
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": {
|