diffwiki-core 0.15.0-rc.202608040914.07e70ce → 0.15.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/dist/index.cjs CHANGED
@@ -2652,21 +2652,18 @@ var import_node_path14 = __toESM(require("path"), 1);
2652
2652
  init_collections();
2653
2653
  init_errors();
2654
2654
  var BUDGETS = {
2655
- recipe: { min: 50, max: 1e3 },
2656
- "recipe-steps": { min: 100, max: 1500 },
2655
+ recipe: { min: 300, max: 1e3 },
2656
+ "recipe-steps": { min: 500, max: 1500 },
2657
2657
  guide: { min: 1500, max: 5e3 },
2658
2658
  reference: { min: 300, max: 2e3 },
2659
2659
  // Generic fallback budget for a bare `architecture` tag (no dedicated template).
2660
- architecture: { min: 1e3, max: 6e3 },
2661
- // Index pages: headings + bullet links only, no prose.
2662
- "collection-index": { min: 100, max: 500 }
2660
+ architecture: { min: 1e3, max: 6e3 }
2663
2661
  };
2664
2662
  function estimateTokens(body) {
2665
2663
  return Math.ceil(body.trim().length / 4);
2666
2664
  }
2667
2665
  function inferShape(tags, body) {
2668
2666
  const t = new Set(tags.map((x) => x.toLowerCase()));
2669
- if (t.has("collection-index")) return "collection-index";
2670
2667
  if (t.has("guide")) return "guide";
2671
2668
  if (t.has("reference")) return "reference";
2672
2669
  if (t.has("architecture")) return "architecture";
@@ -2694,21 +2691,19 @@ function lintArticle(article) {
2694
2691
  }
2695
2692
  const hasRefsSection = /^##\s+References\b/im.test(body);
2696
2693
  const hasInlineLink = /\]\([^)]+\)/.test(body);
2697
- if (shape !== "collection-index") {
2698
- if (!hasRefsSection && !hasInlineLink) {
2699
- findings.push({
2700
- level: "error",
2701
- rule: "no-references",
2702
- message: "has no ## References section and no inline links"
2703
- });
2704
- }
2705
- if ((shape === "guide" || shape === "architecture") && !hasRefsSection) {
2706
- findings.push({
2707
- level: "warn",
2708
- rule: "missing-references-section",
2709
- message: `${shape} should end with a ## References section`
2710
- });
2711
- }
2694
+ if (!hasRefsSection && !hasInlineLink) {
2695
+ findings.push({
2696
+ level: "error",
2697
+ rule: "no-references",
2698
+ message: "has no ## References section and no inline links"
2699
+ });
2700
+ }
2701
+ if ((shape === "guide" || shape === "architecture") && !hasRefsSection) {
2702
+ findings.push({
2703
+ level: "warn",
2704
+ rule: "missing-references-section",
2705
+ message: `${shape} should end with a ## References section`
2706
+ });
2712
2707
  }
2713
2708
  if (tokens > budget.max) {
2714
2709
  findings.push({
package/dist/index.js CHANGED
@@ -1806,21 +1806,18 @@ async function appendPluginDiagnostics(out, config) {
1806
1806
  import fs12 from "fs/promises";
1807
1807
  import path11 from "path";
1808
1808
  var BUDGETS = {
1809
- recipe: { min: 50, max: 1e3 },
1810
- "recipe-steps": { min: 100, max: 1500 },
1809
+ recipe: { min: 300, max: 1e3 },
1810
+ "recipe-steps": { min: 500, max: 1500 },
1811
1811
  guide: { min: 1500, max: 5e3 },
1812
1812
  reference: { min: 300, max: 2e3 },
1813
1813
  // Generic fallback budget for a bare `architecture` tag (no dedicated template).
1814
- architecture: { min: 1e3, max: 6e3 },
1815
- // Index pages: headings + bullet links only, no prose.
1816
- "collection-index": { min: 100, max: 500 }
1814
+ architecture: { min: 1e3, max: 6e3 }
1817
1815
  };
1818
1816
  function estimateTokens(body) {
1819
1817
  return Math.ceil(body.trim().length / 4);
1820
1818
  }
1821
1819
  function inferShape(tags, body) {
1822
1820
  const t = new Set(tags.map((x) => x.toLowerCase()));
1823
- if (t.has("collection-index")) return "collection-index";
1824
1821
  if (t.has("guide")) return "guide";
1825
1822
  if (t.has("reference")) return "reference";
1826
1823
  if (t.has("architecture")) return "architecture";
@@ -1848,21 +1845,19 @@ function lintArticle(article) {
1848
1845
  }
1849
1846
  const hasRefsSection = /^##\s+References\b/im.test(body);
1850
1847
  const hasInlineLink = /\]\([^)]+\)/.test(body);
1851
- if (shape !== "collection-index") {
1852
- if (!hasRefsSection && !hasInlineLink) {
1853
- findings.push({
1854
- level: "error",
1855
- rule: "no-references",
1856
- message: "has no ## References section and no inline links"
1857
- });
1858
- }
1859
- if ((shape === "guide" || shape === "architecture") && !hasRefsSection) {
1860
- findings.push({
1861
- level: "warn",
1862
- rule: "missing-references-section",
1863
- message: `${shape} should end with a ## References section`
1864
- });
1865
- }
1848
+ if (!hasRefsSection && !hasInlineLink) {
1849
+ findings.push({
1850
+ level: "error",
1851
+ rule: "no-references",
1852
+ message: "has no ## References section and no inline links"
1853
+ });
1854
+ }
1855
+ if ((shape === "guide" || shape === "architecture") && !hasRefsSection) {
1856
+ findings.push({
1857
+ level: "warn",
1858
+ rule: "missing-references-section",
1859
+ message: `${shape} should end with a ## References section`
1860
+ });
1866
1861
  }
1867
1862
  if (tokens > budget.max) {
1868
1863
  findings.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diffwiki-core",
3
- "version": "0.15.0-rc.202608040914.07e70ce",
3
+ "version": "0.15.0",
4
4
  "description": "Core configuration, registry, and article management for diffwiki",
5
5
  "license": "MIT",
6
6
  "type": "module",