Skip to content

feat: legacy structural rule deprecation (spec 16)#41

Merged
DarlingtonDeveloper merged 1 commit into
mainfrom
feat/legacy-rule-deprecation
Mar 15, 2026
Merged

feat: legacy structural rule deprecation (spec 16)#41
DarlingtonDeveloper merged 1 commit into
mainfrom
feat/legacy-rule-deprecation

Conversation

@DarlingtonDeveloper
Copy link
Copy Markdown
Contributor

Summary

  • Add wildcard kind support ("*") to ConfigRule so rules can target any node kind
  • Ship 6 default config rules in cortex.example.toml and cortex init that replicate legacy hardcoded behaviour (same_agent, temporal_proximity, shared_tags, decision→event, observation→pattern, fact supersedes)
  • Log a deprecation warning at startup when legacy rules are active (no config rules defined)
  • Legacy StructuralRule code is preserved — removal deferred to next major version

Test plan

  • 6 new wildcard tests pass (validation, evaluation, deserialization)
  • All 176+ existing tests pass without modification
  • Clippy clean
  • Verify cortex init generates config with default rules
  • Verify deprecation warning appears when starting with no [[auto_linker.rules]]
  • Verify warning disappears when rules are defined in cortex.toml

🤖 Generated with Claude Code

…pec 16)

Add wildcard kind support ("*") to ConfigRule so rules can match any node
kind, enabling the three cross-kind legacy rules (same_agent,
temporal_proximity, shared_tags) to be expressed as config rules. Ship
default config rules in cortex.example.toml and cortex init that replicate
legacy behaviour. Log a deprecation warning when legacy rules are active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DarlingtonDeveloper DarlingtonDeveloper merged commit 6e814d5 into main Mar 15, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant