Skip to content

Add protectedFilePatterns config option #21

@Tarquinen

Description

@Tarquinen

Problem

DCP protects certain tools from pruning (protectedTools), but there's no way to protect file operations based on the file path. Important planning files like plan.md, ARCHITECTURE.md, TODO.md can get incorrectly pruned as "stale" even though they contain critical project context.

Proposed Solution

Add protectedFilePatterns config option:

{
  "protectedFilePatterns": [
    "**/plan.md",
    "**/ARCHITECTURE.md", 
    "**/TODO.md",
    "**/AGENTS.md"
  ]
}

Check tool parameters.filePath against these patterns before allowing pruning in deduplicator.ts and janitor.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions