← Engineering Work & Open Source
Merged UpstreamThe Bushido Collective · Claude Code Tooling

The Bushido Collective Han: Windows Project Path Slug Sanitization

Cross-platform slug sanitization ensuring Windows absolute file paths with drive letter colons correctly normalize to Claude Code double-dash directory encoding.

The Bushido Collective Han PR #105 merged upstream - Windows Path Slug Sanitization

PR #105

merged upstream

6529db3

merge commit

#104

issue resolved

43 Tests

windows slug parity

01 · Engineering problem

The failure mode

On Windows systems, absolute file paths containing drive letters (e.g. C:\Users\alice\repo) failed to map to the canonical directory encoding expected by Claude Code sessions. The drive letter colon and backslash path delimiters were insufficiently sanitized, resulting in broken session transcript lookups, cache misses, and marketplace directory mismatches.

02 · Technical response

What changed

  1. 01Unified pathToSlug() normalization across transcript, event-path, and marketplace-cache operations.
  2. 02Sanitized Windows drive letter colons, forward slashes, backslashes, and dot delimiters into Claude Code canonical double-dash slug format.
  3. 03Eliminated duplicate pathToSlug helper implementations across the codebase.
  4. 04Added Windows path regression coverage verifying C:\Users\... maps to C--Users-... with 43 focused tests passing.

03 · Verified outcome

Evidence, not implication

  • ✓Deterministic Windows parity: Windows project paths seamlessly resolve to canonical Claude Code directory slugs.
  • ✓Cross-platform session stability: Transcript resolution and marketplace cache paths operate identically across Windows, Linux, and macOS.
  • ✓43 focused transcript, event-path, and marketplace-cache tests verified green.
  • ✓Merged upstream into TheBushidoCollective/han main branch by maintainer jwaldrip (August 25, 2026).

04 · Public record

Source evidence

Independent engineering and open-source work by Patrick Ribbsaeter / Ribbsaeter Systems. References to maintainers, repositories, or companies identify the public technical context only. No employment, client, vendor, or partnership relationship is implied unless explicitly stated.