From c05f41e812f20fdbddbe17f915f0ada96469f676 Mon Sep 17 00:00:00 2001 From: bowlerjim Date: Sun, 20 Sep 2026 23:35:53 -0400 Subject: [PATCH] fix(DocCheck): match LIFEOS/ as well as LifeOS/ so the main reference class is checked (#2191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three of the six PATH_PATTERNS spelled the tree `LifeOS/`, case-sensitive, while the shipped tree is `LIFEOS/` — including the @-import pattern, whose own comment example is `@LIFEOS/USER/FILE.md`. Every backticked `LIFEOS/...` reference and every @-import in CLAUDE.md was therefore invisible to the checker. This is the class fixed in ReferenceCheck.ts as #1541 (@tzioup); DocCheck was left behind. Both casings are listed rather than swapped, since a legacy `LifeOS/`-cased reference is itself broken and should be reported, not skipped. Verified on a doc carrying three deliberately broken refs (real casing, legacy casing, and a `hooks/` control): before, refsChecked 2 with the `LIFEOS/` ref never extracted; after, refsChecked 3 and all three reported missing. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01PuS77R8a6Lhp7jK6dnwdTh --- LifeOS/install/LIFEOS/TOOLS/DocCheck.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/LifeOS/install/LIFEOS/TOOLS/DocCheck.ts b/LifeOS/install/LIFEOS/TOOLS/DocCheck.ts index 2db5259143..49bcc3df14 100644 --- a/LifeOS/install/LIFEOS/TOOLS/DocCheck.ts +++ b/LifeOS/install/LIFEOS/TOOLS/DocCheck.ts @@ -32,17 +32,23 @@ const quiet = args.includes('--quiet'); // ── Path Reference Extraction ── +// Case matters (public issue #1541, @tzioup): the shipped tree is LIFEOS/, and +// the LifeOS/-cased alternative these patterns carried never matched anything, +// so the main backticked reference class and every @-import went unchecked. +// ReferenceCheck.ts was fixed for this; these were left behind. Both casings +// are listed now: a legacy LifeOS/-cased reference is itself broken and should +// still be reported rather than skipped. const PATH_PATTERNS = [ // Backtick-quoted paths: `LIFEOS/DOCUMENTATION/Hooks/HookSystem.md`, `hooks/PromptInjection.hook.ts` - /`((?:LifeOS|hooks|skills|agents|Pulse|USER|MEMORY|Components|Algorithm|Tools)\/[\w/.@-]+\.\w+)`/g, + /`((?:LIFEOS|LifeOS|hooks|skills|agents|Pulse|USER|MEMORY|Components|Algorithm|Tools)\/[\w/.@-]+\.\w+)`/g, // Backtick-quoted paths with ~/.claude/ prefix /`~\/\.claude\/([\w/.@-]+\.\w+)`/g, // Backtick-quoted paths with $HOME/.claude/ prefix /`\$HOME\/\.claude\/([\w/.@-]+\.\w+)`/g, // @-imports: @LIFEOS/USER/FILE.md - /^@(LifeOS\/[\w/.@-]+\.md)/gm, + /^@((?:LIFEOS|LifeOS)\/[\w/.@-]+\.md)/gm, // Table cell paths: | `path` | or | path | - /\|\s*`?((?:LifeOS|hooks|skills|Pulse|USER)\/[\w/.@-]+\.\w+)`?\s*\|/g, + /\|\s*`?((?:LIFEOS|LifeOS|hooks|skills|Pulse|USER)\/[\w/.@-]+\.\w+)`?\s*\|/g, // Arrow notation in TOPOLOGY.md: → file: `path` /→\s+[\w\s]+:\s+`([\w/.@-]+\.\w+)`/g, ];