Skip to content

[BUG] Inconsistent filename generation vs permalink format for titles with forward slashes #154

@groksrc

Description

@groksrc

Bug Description

Basic Memory creates inconsistent behavior between filename generation and internal linking for titles containing forward slashes, leading to potential broken links and user confusion.

User Report:
"please, why it creates notes like Coupon Enable/Disable Feature.md but links to them as [[coupon-enable/disable-feature]] which could not work? how can i set it up properly? i would like to have filenames kebab case."

Steps to Reproduce

  1. Create a note with title containing forward slash: "Coupon Enable/Disable Feature"
  2. Use write_note() tool or Basic Memory interface
  3. Observe the created file path vs the generated permalink

Expected Behavior

Consistent filename and permalink generation, ideally with user-configurable kebab-case formatting.

Actual Behavior

  • File path created: bugs/Coupon Enable/Disable Feature.md
    • Forward slash treated as directory separator
    • Creates nested directory structure: bugs/Coupon Enable/Disable Feature.md
    • Filename contains spaces
  • Permalink generated: bugs/coupon-enable/disable-feature
    • Applies kebab-case transformation
    • Assumes flat file structure
    • Result: Mismatch between actual file location and permalink

Environment

  • Basic Memory version: 0.13.7
  • Installation method: uv and Homebrew
  • Claude Desktop version (if applicable): n/a

Impact

  • Linking inconsistency: Generated permalinks may not reliably reference actual files
  • User confusion: Unexpected directory creation from title formatting
  • File organization: Users lose control over intended file structure
  • Obsidian integration: May affect linking consistency in external editors
  • Knowledge graph integrity: Inconsistent referencing breaks semantic connections

Additional Context

  • Issue confirmed through direct reproduction
  • User report indicates this affects practical usage workflows
  • Related to core file organization and knowledge graph functionality

Possible Solutions

Option A: Configurable kebab-case filenames (Recommended)

  • Add configuration option for filename formatting
  • Convert all title characters (including /) to kebab-case for filenames
  • Result: bugs/coupon-enable-disable-feature.md
  • Permalink: bugs/coupon-enable-disable-feature
  • ✅ Consistent linking ✅ User control ✅ Predictable structure

Option B: Escape forward slashes in filenames

  • Replace / with safe characters like - or _ in filenames only
  • Keep spaces for readability
  • Result: bugs/Coupon Enable-Disable Feature.md
  • Less breaking but still inconsistent with permalink format

Option C: Fix permalink generation to match current file structure

  • Generate permalinks that accurately reflect actual directory structure
  • Less user-friendly but maintains current file creation logic

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions