{"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/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/integrations/CcsAlignRulesWalker.ts#L479-L515","documentation":"CcsAlignRulesWalker.walkRules detects conflicts between layered prompt/rule files. The CLOCK_HEADER conflict fires when detectClockHeader() finds a top-of-prompt clock or a 'current time is' line in any layer, which violates the house rule that no clock may appear in the prompt prefix. This is a lint-style finding, not an exception.","triggerScenarios":"A layer (profile) file contains a line matching the clock-header detector, e.g. a timestamp header or 'Current time is ...' text, while walkRules iterates entry.lines.","commonSituations":"Prompt templates that auto-inject a clock/timestamp header; copied profiles carrying a date prefix; tools that stamp 'current time' at the top of generated profiles.","solutions":["Remove the clock/timestamp line from the flagged layer file at entry.file","Disable whatever tool injects the timestamp header into the prompt/profile","Regenerate or hand-edit the profile so the prefix contains no time information","Re-run walkRules to confirm the conflict is gone"],"exampleFix":"// before (profile line)\nCurrent time is 2026-09-17 10:42:00. You are an assistant...\n// after (profile line)\nYou are an assistant...","handlingStrategy":"validation","validationCode":"const clockRe = /current time is|\\d{4}-\\d{2}-\\d{2}[ T]\\d{2}:\\d{2}/i;\nif (clockRe.test(profileText)) console.warn('CLOCK_HEADER detected before walk');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never auto-inject timestamps into prompt/profile prefixes","Lint profiles in CI with the same detectClockHeader pattern","Treat CLOCK_HEADER conflicts as blocking in review","Regenerate profiles from templates that exclude time headers"],"tags":["lint","rules","prompt","conflict-detection"],"backgroundTag":"conflicting-config-options","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}