问题域/PD-508

文件区域分类

File Zone Classification

基于路径模式的文件意图分类系统,驱动检测和评分策略

子问题

1.Pattern-based zone matching (dir/suffix/prefix)

2.Zone-aware detector skipping

3.Scoring exclusion for non-production zones

4.Manual zone override support

5.Zone-aware confidence downgrade for non-critical zones

6.Language-specific zone rule composition and ordering

7.Zone statistics reporting and CLI introspection

各项目的解法1 solutions

Signals

横向对比

维度Desloppify
分类粒度六区域枚举(production/test/config/generated/script/vendor)
匹配机制五种路径模式自动推断(目录/后缀/前缀/精确/子串),first-match-wins
策略分离ZonePolicy 三维策略(skip/downgrade/exclude)独立于分类逻辑
语言扩展每种语言定义 ZONE_RULES 列表,与 COMMON_ZONE_RULES 合并
管线集成zone 元数据贯穿 finding 标记、检测器过滤、评分排除、review 选择全链路
用户干预config.json zone_overrides + CLI zone set/clear 手动修正

最佳实践

1.First-match-wins rule ordering for deterministic classification

2.Zone metadata flows through entire pipeline

3.Pattern type auto-detection from string shape eliminates explicit type field

4.FileZoneMap built once per scan, shared across all detectors via lang runtime

5.SCRIPT zone scored but with reduced detector set, unlike fully excluded zones