{"record":{"id":"af9ed1ae2e1f63f3","repo":"thedotmack/claude-mem","slug":"clock-header","errorCode":"CLOCK_HEADER","errorMessage":"CLOCK_HEADER","messagePattern":"CLOCK_HEADER","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/integrations/CcsAlignRulesWalker.ts","lineNumber":497,"sourceCode":"\n  // Build all house+project lines for deny/allow cross-layer comparison\n  const houseProjectLines: string[] = [...allHouseLines];\n  for (const entry of project.entries) {\n    for (const line of entry.lines) {\n      const trimmed = line.trim();\n      if (trimmed.length > 0) houseProjectLines.push(trimmed);\n    }\n  }\n\n  const allLayers = [...house.entries, ...project.entries, ...seat.entries];\n\n  // Walk all entries, detecting conflicts\n  for (const entry of allLayers) {\n    for (const line of entry.lines) {\n      // CLOCK_HEADER: any layer\n      if (detectClockHeader(line)) {\n        conflicts.push({\n          code: 'CLOCK_HEADER',\n          layer: entry.layer,\n          file: entry.file,\n          line,\n          detail: 'Top-of-prompt clock or \"current time is\" in a profile (house rule: no clock in prefix)',\n        });\n      }\n    }\n  }\n\n  // Seat-layer specific conflict detection (against house)\n  const shadowPatchesByFile = new Map<string, Set<string>>();\n\n  for (const entry of seat.entries) {\n    for (const line of entry.lines) {\n      const trimmed = line.trim();\n      if (trimmed.length === 0) continue;\n\n      // SHADOW_HOUSE: leaf line also at house (or starts with \"House rule\")","sourceCodeStart":479,"sourceCodeEnd":515,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/8bc631a71a487424b866756e43a6efa4574cc66b/src/services/integrations/CcsAlignRulesWalker.ts#L479-L515","documentation":"This is not a thrown exception but a conflict record emitted by CcsAlignRulesWalker.walkRules with code CLOCK_HEADER. The walker scans layered rules files (house/project/seat) and flags any line containing a top-of-prompt clock or a 'current time is' phrase, because a profile rule forcing a clock into the prompt prefix violates the house rule that prompts carry no clock.","triggerScenarios":"Running walkRules (the align-rules check) against a seat or other layer file whose lines contain a detected clock header pattern — e.g. a line like 'Always show the current time at the top of every prompt' or a time-format prefix directive.","commonSituations":"A user copied a profile snippet that adds a clock/status line into their seat-level CLAUDE-like rules file, then the project's alignment audit reports it as conflicting with house style.","solutions":["Delete the clock/time-display line from the flagged profile layer file","Move the clock preference into a tool/setting that is not part of the rules cascade","If the detection is a false positive, reword the line so it does not match detectClockHeader patterns","Accept the conflict in the walker result and document the exception if the clock is intentional"],"exampleFix":"// before (seat rules file)\nHouse rule: display current time at the top of each prompt\n// after\n(line removed — house rules forbid a clock in the prompt prefix)","handlingStrategy":"validation","validationCode":"const clockPattern = /(current time is|\\b\\d{1,2}:\\d{2}\\b.*clock|clock.*top of)/i;\nconst offenders = seatLines.filter(l => clockPattern.test(l));\nif (offenders.length) console.warn('remove clock headers from rules files:', offenders);","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Keep time/clock display in tool settings, never in rules/profile files","Run the align-rules walker in CI or on config save to catch conflicts early","Document house style (no clock in prefix) where users author seat files"],"tags":["rules-walker","conflict-detection","style-lint"],"backgroundTag":"invalid-config-value","analyzedSha":"8bc631a71a487424b866756e43a6efa4574cc66b","analyzedAt":"2026-09-09T10:47:06.009Z","contentChangedAt":"2026-09-09T10:47:06.009Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}