feat(domain): rule groups — MP rule-string parser/serializer, builtin keywords, chain evaluation wired into slot

- rules/: RuleExpr tree, '>' layers with ! & | and parens, position-aware errors
  (unknown atom with suggestions, unsupported music atoms, parens, empty layer)
- builtin keyword table aligned with MP BUILTIN_RULE_SET; field-based judgement
  where parsed fields exist, MP regex otherwise; custom atoms (MP 7 fields)
- chain evaluation: hard excludes, ladder pri 100-k, groups AND-ed, pri from last
  laddered group, readable per-atom trace
- slot: SlotSpec.rules, rule.hard_exclude / rule.no_layer_matched violations,
  pri basis switches to priority when a rule ladder is present
- differential: 66 rule chains x 32 torrents vs MP python path (parse 64/64,
  pri 2090/2112, 22 registered mp_bug)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 14:50:43 +08:00
1 parent 22856d0447
commit e994a7bcfa
13 files changed
+23919 -10

No files matched your search

+1
View File
@@ -7,4 +7,5 @@ export * from "./identity/index.ts";
export * from "./organize/index.ts";
export * from "./path/index.ts";
export * from "./release-parser/index.ts";
export * from "./rules/index.ts";
export * from "./slot/index.ts";