Skip to content

Managed CLAUDE.md injection with TTL #187

@dean0x

Description

@dean0x

Summary

Enable skills and hooks to inject transient guidance blocks into CLAUDE.md that auto-expire after a configurable TTL. Prevents CLAUDE.md bloat from accumulated stale injections.

Key Features

  • Marker-delimited blocks with embedded timestamp
  • Configurable TTL (default 48h)
  • SessionStart cleanup: scan for and remove expired blocks
  • Atomic writes (tmp+rename) for crash safety
  • Multiple independent blocks supported (different section names)

Competitive Reference

Ref: SIEVE — injection.py:1-156. Uses <!-- TOKEN_OPTIMIZER:SECTION:TIMESTAMP --> markers, DEFAULT_MAX_AGE_HOURS=48, atomic tmp+rename.

Implementation Notes

  • Could benefit project knowledge (decisions.md, pitfalls.md) with time-sensitive guidance
  • Consider integration with self-learning: rendered artifacts could use TTL for experimental guidance
  • Marker format should be namespaced to devflow to avoid collisions with other injectors (e.g. skim)
  • Related to the existing skim CLAUDE.md block injection (<!-- skim-start --> markers)

Milestone

post-v2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions