@chrisdudek/yg 2.4.0 → 2.4.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/dist/bin.js CHANGED
@@ -160,6 +160,7 @@ You have broken Yggdrasil if you do any of the following:
160
160
  - \u274C Placed a cross-cutting requirement in a local artifact instead of an aspect, or used an aspect id with no \`aspects/\` directory.
161
161
  - \u274C Invented a rationale, business rule, or decision \u2014 or recorded a decision without documenting rejected alternatives and rationale (use "rationale: unknown" if unknown).
162
162
  - \u274C Used blackbox coverage for greenfield (new) code.
163
+ - \u274C Deleted or shortened graph artifact content to reduce context package size instead of splitting the node.
163
164
 
164
165
  ### Escape Hatch
165
166
 
@@ -348,6 +349,7 @@ When reviewing graph quality (triggered by user or quality improvement):
348
349
  - **\`yg\` not found** \u2192 inform user: "yg CLI is not installed or not in PATH." Stop.
349
350
  - **Unfixable validate errors** \u2192 if not resolved after 3 attempts, stop and report to user. Do not loop.
350
351
  - **Budget exceeded** \u2192 if \`yg build-context\` exits with error (context package exceeds budget), warn user: "This node should be split." Do not proceed with implementation.
352
+ - **Budget warning (W005)** \u2192 if \`yg validate\` shows W005 (context near budget), the node needs splitting. NEVER delete knowledge from artifacts to reduce token count \u2014 knowledge destroyed is irrecoverable. Instead: identify a cohesive subset of the node's responsibilities, propose a split to the user, create child nodes, and redistribute artifacts. The total knowledge must be preserved or increased, never reduced.
351
353
  - **Corrupted \`.yggdrasil/\` files** \u2192 report to user. Do not attempt repair.
352
354
  - **Incremental sync** \u2192 run \`yg drift-sync\` every 3-5 source files during multi-file tasks. Do not defer to end.`;
353
355
  var KNOWLEDGE_BASE = `## KNOWLEDGE BASE
@@ -2979,7 +2981,7 @@ async function checkContextBudget(graph) {
2979
2981
  severity: "warning",
2980
2982
  code: "W005",
2981
2983
  rule: "budget-warning",
2982
- message: `Context is ${pkg2.tokenCount.toLocaleString()} tokens (warning threshold: ${warningThreshold.toLocaleString()}). Consider splitting the node or reducing dependencies.`,
2984
+ message: `Context is ${pkg2.tokenCount.toLocaleString()} tokens (warning threshold: ${warningThreshold.toLocaleString()}). Split the node into smaller units \u2014 do not delete knowledge from artifacts to reduce size.`,
2983
2985
  nodePath
2984
2986
  });
2985
2987
  }