Skip to content

MEMORY: @path imports inside memory files (cycle-detected, recursive) #494

@Hmbown

Description

@Hmbown

Part of #489. Depends on #490, #491 shipping in v0.8.9.

Summary

Support @path syntax inside memory files (relative, ~, absolute) so users can break long files apart and share common rules.

Reference

reference-cc/src/utils/claudemd.ts:448-501.

Behavior

  • @./shared/style.md, @~/dotfiles/agents.md, @/abs/path/file.md all resolved.
  • HashSet<PathBuf> tracks already-included files to break cycles.
  • Inline at the import site, with a <imported from=...> wrapper.
  • Surface error in transcript if file missing or unreadable (don't silently swallow).

Acceptance

  • Two-level imports work (ABC).
  • Cycle (ABA) is broken and surfaces a friendly warning.
  • File-size cap applied per file, not just per top-level.

Effort: M (~250 LoC). Hardest piece in the EPIC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.9.0Targeting v0.9.0

    Projects

    Status
    In progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions