thedotmack/claude-mem · warning

SHADOW_HOUSE

SHADOW_HOUSE

Error message

SHADOW_HOUSE

What it means

walkRules flags SHADOW_HOUSE when a seat-layer leaf line duplicates a house line (matched via detectShadowHouse against houseLineSet) or begins with 'House rule', meaning the leaf shadows/redeclares the cascade instead of inheriting it. Reported as a conflict with layer='seat'.

Solutions

  1. Delete the duplicated line from the seat file at entry.file so it inherits from house
  2. If the leaf intentionally starts with 'House rule', rewrite it to reference rather than restate the rule
  3. Regenerate the seat file from the current cascade to remove stale copies
  4. Re-run the walker to verify the conflict cleared

Example fix

// before (seat file)
House rule: no clock in prompt prefix
// after (seat file)
# removed - inherited from house rules
Defensive patterns

Strategy: validation

Validate before calling

const trimmed = line.trim();
if (houseLineSet.has(trimmed) || trimmed.startsWith('House rule')) {
  console.warn('SHADOW_HOUSE candidate:', trimmed);
}

Prevention

When it happens

Trigger: A seat rules file contains a line textually identical (after trimming) to a house line, or any line starting with 'House rule', during leaf-line iteration.

Common situations: Copy-pasting house rules into seat-level files 'to be safe'; generated seat files that re-emit inherited rules; refactors that left a duplicated line behind.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17). Data as JSON: /api/errors/d13673dede6debcd. Report an issue: GitHub.

Appendix: source

Thrown at src/services/integrations/CcsAlignRulesWalker.ts:519

          detail: 'Top-of-prompt clock or "current time is" in a profile (house rule: no clock in prefix)',
        });
      }
    }
  }

  // Seat-layer specific conflict detection (against house)
  const shadowPatchesByFile = new Map<string, Set<string>>();

  for (const entry of seat.entries) {
    for (const line of entry.lines) {
      const trimmed = line.trim();
      if (trimmed.length === 0) continue;

      // SHADOW_HOUSE: leaf line also at house (or starts with "House rule")
      const shadow = detectShadowHouse(trimmed, houseLineSet);
      if (shadow.isShadow) {
        conflicts.push({
          code: 'SHADOW_HOUSE',
          layer: 'seat',
          file: entry.file,
          line: trimmed,
          detail: shadow.matchedHouseLine
            ? `Leaf duplicates house line: "${shadow.matchedHouseLine}"`
            : 'Leaf starts with "House rule" — shadows the cascade',
          houseMatch: shadow.matchedHouseLine,
        });

        if (!shadowPatchesByFile.has(entry.file)) {
          shadowPatchesByFile.set(entry.file, new Set());
        }
        shadowPatchesByFile.get(entry.file)!.add(trimmed);
      }

      // DRIFT: leaf line is close-but-not-exact to a house line
      if (!shadow.isShadow) {
        const drift = detectDrift(trimmed, allHouseLines);

View on GitHub (pinned to d8bc9755e7)