Skip to content

feat(adf): inject configurable classifier/parsing rulesets #11

@SmartBrandStrategies

Description

@SmartBrandStrategies

Linked feedback: ADX-007

Problem

Classifier/parser heuristics are hardcoded, reducing reuse across organizations:

  • fixed stay patterns and heading-to-module routing in classifier
  • fixed imperative/advisory regex sets in markdown parser

Evidence:

  • packages/adf/src/content-classifier.ts:53
  • packages/adf/src/content-classifier.ts:76
  • packages/adf/src/markdown-parser.ts:36

Scope

  • Add optional config objects:
    • ClassifierConfig for stay patterns + heading/module routing + optional keyword rules
    • MarkdownStrengthConfig for imperative/advisory patterns
  • Preserve existing behavior when config is omitted.
  • Thread config through migration entry points (including CLI migrate path).

Acceptance Criteria

  • Default behavior is unchanged and existing tests pass.
  • New tests confirm custom rulesets alter classification/strength deterministically.
  • CLI migrate can accept configured behavior without breaking current default UX.

Test Plan

  • pnpm run test --filter @stackbilt/adf
  • Add tests for:
    • custom stay pattern causing STAY
    • custom heading mapping to non-default module
    • custom strength patterns overriding defaults

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:adfADF parser/bundler/patcher packagepriority:p1Should ship this cycletype:featureNew capability or extension point

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions