Skip to content

feat(adf): migrate should classify rules into on-demand modules, not just core.adf #6

@SmartBrandStrategies

Description

@SmartBrandStrategies

Summary

charter adf migrate extracts rules from agent config files (agents.md, .cursorrules) and merges everything into core.adf, even when content clearly belongs in on-demand modules like frontend.adf or backend.adf.

Example

Given an agents.md with mixed content:

React components: PascalCase.tsx
Hooks/utilities: camelCase.ts
Hono route composition for worker/backend APIs
npm run db:local creates the local D1 schema

The migration classifies all of these as CONSTRAINTS → core.adf:

"React components: PascalCase.tsx"        → CONSTRAINTS [advisory]  core.adf
"Hono route composition for worker/..."   → CONSTRAINTS [advisory]  core.adf
"npm run db:local creates the local..."   → CONSTRAINTS [advisory]  core.adf

Expected Behavior

The migration should route rules to the appropriate on-demand module when the manifest declares them:

Rule Target
React component naming conventions frontend.adf
Vite dev server commands frontend.adf
Hono route patterns backend.adf
D1 schema/migration commands backend.adf
TypeScript strictness, commit conventions core.adf

Suggested Approach

Use the ON_DEMAND module metadata from manifest.adf (which already includes keyword hints like react, css, ui for frontend and api, node, db for backend) to classify migrated rules into the best-fit module rather than defaulting everything to core.

This would make the on-demand modules useful out of the box instead of leaving them as empty scaffolds after migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions