Skip to content

feat(bootstrap): integrate adf migrate into bootstrap flow #7

Closed

Description

@SmartBrandStrategies

Summary

The bootstrap command (charter bootstrap --yes) does not run charter adf migrate as part of its flow, even when it detects existing agent config files (AGENTS.md, .cursorrules) with extractable rules. This leaves the user needing to discover and run adf migrate separately.

Current Flow

[1/5] Detecting stack...
  Warning: Agent standards detected (AGENTS.md); align Charter policy with existing agent instructions.
[2/5] Setting up governance...
[3/5] Initializing ADF context...
  Created .ai/manifest.adf, core.adf, state.adf
  Generated CLAUDE.md (thin pointer)
  Generated .cursorrules (thin pointer)
[4/5] Installing dependencies...
[5/5] Running health check...

After this, charter doctor warns:

[warn] adf agent config: .cursorrules, agents.md, AGENTS.md contain stack rules that should live in .ai/. Run: charter adf migrate --dry-run

The user must then manually:

  1. Run charter adf migrate --dry-run to preview
  2. Run charter adf migrate --yes to apply

Proposed Flow

Add a step between [3/5] and [4/5]:

[3.5/6] Migrating agent config...
  Found: agents.md (36 lines, 23 extractable rules)
  Found: .cursorrules (8 lines, 1 extractable rule)
  Migrated 24 rules → core.adf
  Converted agents.md → thin pointer (backup: agents.md.pre-adf-migrate.bak)
  Converted .cursorrules → thin pointer (backup: .cursorrules.pre-adf-migrate.bak)

When --yes is passed to bootstrap, the migration should also auto-apply. Without --yes, show the dry-run summary and prompt for confirmation.

Why This Matters

Bootstrap already detects agent standards (step [1/5] logs the warning). If bootstrap knows the files exist and need migration, it should handle it — otherwise users get a "PASS" message at the end but charter doctor immediately shows warnings, which is a confusing first-run experience.

Activity

  1. SmartBrandStrategies commented on Mar 2, 2026

    @SmartBrandStrategies
    ContributorAuthor

    Update: v0.5.0 branch (`docs/adx-005-cli-ux-feedback`) does not integrate `adf migrate` into the bootstrap flow. Bootstrap still:

    1. Detects agent config files and logs a warning ("Agent standards detected")
    2. Generates thin pointers but skips files with custom content
    3. Suggests `charter adf migrate` in warnings

    The `--yes` flag does not auto-run migrate. This is the largest remaining friction gap in the bootstrap → doctor path. After bootstrap completes, doctor immediately warns about agent configs needing migration.

    Tagging for v0.5.0 inclusion. Suggested implementation: add a `runMigratePhase()` between adf-init and install that runs migrate when agent config files with custom content are detected.

  2. added this to the v0.6.0 milestone on Mar 2, 2026
  3. added a commit that references this issue on Mar 2, 2026
  4. SmartBrandStrategies commented on Mar 2, 2026

    @SmartBrandStrategies
    ContributorAuthor

    Depends on #4 and #5 — bootstrap integration should build on a working module init and on-demand module flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions