Skip to content

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

@SmartBrandStrategies

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.

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