Skip to content

RFE: Add brownfield agent context discovery to apm init #1122

@chkp-roniz

Description

@chkp-roniz

Summary

apm init should support a preview-first discovery mode for existing projects that already contain agent context files. The goal is to inventory context used by tools such as Claude, Codex, Copilot/GitHub, Cursor, OpenCode, Windsurf, and Gemini, classify what APM can already consume, and propose an apm.yml that helps teams migrate toward reproducible agent configuration.

Proposed UX

  • apm init --discover scans known project, user, and safe system-level agent context locations.
  • Default mode is read-only and prints an inventory plus proposed apm.yml.
  • --write writes the proposed manifest after confirmation.
  • --format json|yaml|text supports automation and review workflows.

Discovery Output

Discovery should report files by:

  • tool, such as Claude, Codex, Copilot/GitHub, Cursor, OpenCode, Windsurf, Gemini, APM, or shared agent skills
  • scope, such as project, user, or safe system config
  • type, such as instruction, agent, command, skill, context, settings, or MCP config
  • importability, such as APM-native, convertible, reference-only, or ignored

Acceptance Criteria

  • Plain apm init behavior remains minimal.
  • Discovery reports files by tool, scope, type, and importability.
  • Output avoids raw context content by default and redacts sensitive paths or credentials.
  • Existing APM-native discovery is reused where possible rather than duplicated.
  • Tests cover major agent folders, existing manifests, unreadable or binary files, symlinks, and redaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions