Skip to content

feat(adf): classify migrated rules into on-demand modules (closes #6)#15

Merged
SmartBrandStrategies merged 1 commit intomainfrom
feat/classify-content-routing
Mar 3, 2026
Merged

feat(adf): classify migrated rules into on-demand modules (closes #6)#15
SmartBrandStrategies merged 1 commit intomainfrom
feat/classify-content-routing

Conversation

@SmartBrandStrategies
Copy link
Copy Markdown
Contributor

Summary

  • adf migrate now routes rules to on-demand modules (frontend.adf, backend.adf) based on content keywords, not just heading context
  • When heading-based routing returns core.adf, the classifier falls back to checking element content against ON_DEMAND trigger keywords from manifest.adf
  • Example: "React components use PascalCase.tsx" under a generic "Conventions" heading → frontend.adf instead of core.adf
  • Fully backward compatible — without a manifest or trigger keywords, behavior is unchanged
  • 215 tests green, all LOC ceilings pass (adf-migrate: 474/500)

Test plan

  • classifyElement without triggerMap preserves existing heading-based routing
  • classifyElement with triggerMap routes React/CSS/UI content → frontend.adf
  • classifyElement with triggerMap routes API/Node/DB content → backend.adf
  • Heading-based routing takes priority over content-based (no override)
  • No keyword match in content → stays core.adf
  • buildMigrationPlan passes triggerMap through to classifier
  • charter adf migrate --dry-run on mixed-content file → rules classified to correct modules

🤖 Generated with Claude Code

… keywords

When heading-based routing returns core.adf, the classifier now checks
element content against ON_DEMAND trigger keywords from manifest.adf
(e.g. React → frontend.adf, API → backend.adf). This routes domain-
specific rules under generic headings to the correct on-demand module
instead of dumping everything into core.adf.

Closes #6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SmartBrandStrategies SmartBrandStrategies merged commit e34869d into main Mar 3, 2026
4 checks passed
@SmartBrandStrategies SmartBrandStrategies deleted the feat/classify-content-routing branch March 3, 2026 10:10
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.

2 participants