Skip to content

openwiki init overwrites existing AGENTS.md and CLAUDE.md without warning #573

Description

@wupengbo125

Problem

Running openwiki init overwrites the project's existing AGENTS.md and CLAUDE.md files, destroying all user content silently.

These files often contain project-specific agent rules, skill configurations, and development guidelines that users have carefully maintained.

Expected Behavior

openwiki init should append the OpenWiki block (between <- If AGENTS.mdorCLAUDE.mdalready exists,openwiki init should OPENWIKI:START --> and <- If AGENTS.mdorCLAUDE.mdalready exists,openwiki init should OPENWIKI:END --> markers) to existing AGENTS.md / CLAUDE.md files, preserving all original content.

Actual Behavior

openwiki init silently replaces the entire content of AGENTS.md and CLAUDE.md with OpenWiki's boilerplate.

Steps to Reproduce

  1. Have a project with an existing AGENTS.md or CLAUDE.md containing custom content.
  2. Run openwiki init.
  3. Original file content is completely replaced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions